PluginProbe
Gutenberg / 23.3.0
Gutenberg v23.3.0
23.9.1 23.9.0 23.8.0 23.7.2 23.7.1 23.7.0 23.6.1 23.6.2 23.6.0 23.5.3 23.5.2 23.5.1 23.5.0 23.4.0 23.3.2 23.3.1 23.3.0 23.2.0 23.2.1 23.2.2 23.1.1 23.1.0 23.0.1 12.6.0 7.4.0 All 402 releases
gutenberg / build / scripts / vendors / react-dom.js

react-dom.js in Gutenberg 23.3.0, at build/scripts/vendors/react-dom.js

20,500 lines 1.0 MB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var ReactDOM = (() => {
2 var __getOwnPropNames = Object.getOwnPropertyNames;
3 var __commonJS = (cb, mod) => function __require() {
4 return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
5 };
6
7 // react-external:react
8 var require_react = __commonJS({
9 "react-external:react"(exports, module) {
10 module.exports = globalThis.React;
11 }
12 });
13
14 // node_modules/react-dom/cjs/react-dom.development.js
15 var require_react_dom_development = __commonJS({
16 "node_modules/react-dom/cjs/react-dom.development.js"(exports) {
17 "use strict";
18 (function() {
19 function noop() {
20 }
21 function testStringCoercion(value) {
22 return "" + value;
23 }
24 function createPortal$1(children, containerInfo, implementation) {
25 var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
26 try {
27 testStringCoercion(key);
28 var JSCompiler_inline_result = false;
29 } catch (e) {
30 JSCompiler_inline_result = true;
31 }
32 JSCompiler_inline_result && (console.error(
33 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
34 "function" === typeof Symbol && Symbol.toStringTag && key[Symbol.toStringTag] || key.constructor.name || "Object"
35 ), testStringCoercion(key));
36 return {
37 $$typeof: REACT_PORTAL_TYPE,
38 key: null == key ? null : "" + key,
39 children,
40 containerInfo,
41 implementation
42 };
43 }
44 function getCrossOriginStringAs(as, input) {
45 if ("font" === as) return "";
46 if ("string" === typeof input)
47 return "use-credentials" === input ? input : "";
48 }
49 function getValueDescriptorExpectingObjectForWarning(thing) {
50 return null === thing ? "`null`" : void 0 === thing ? "`undefined`" : "" === thing ? "an empty string" : 'something with type "' + typeof thing + '"';
51 }
52 function getValueDescriptorExpectingEnumForWarning(thing) {
53 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 + '"';
54 }
55 function resolveDispatcher() {
56 var dispatcher = ReactSharedInternals.H;
57 null === dispatcher && console.error(
58 "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."
59 );
60 return dispatcher;
61 }
62 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
63 var React = require_react(), Internals = {
64 d: {
65 f: noop,
66 r: function() {
67 throw Error(
68 "Invalid form element. requestFormReset must be passed a form that was rendered by React."
69 );
70 },
71 D: noop,
72 C: noop,
73 L: noop,
74 m: noop,
75 X: noop,
76 S: noop,
77 M: noop
78 },
79 p: 0,
80 findDOMNode: null
81 }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
82 "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(
83 "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"
84 );
85 exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
86 exports.createPortal = function(children, container) {
87 var key = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
88 if (!container || 1 !== container.nodeType && 9 !== container.nodeType && 11 !== container.nodeType)
89 throw Error("Target container is not a DOM element.");
90 return createPortal$1(children, container, null, key);
91 };
92 exports.flushSync = function(fn) {
93 var previousTransition = ReactSharedInternals.T, previousUpdatePriority = Internals.p;
94 try {
95 if (ReactSharedInternals.T = null, Internals.p = 2, fn)
96 return fn();
97 } finally {
98 ReactSharedInternals.T = previousTransition, Internals.p = previousUpdatePriority, Internals.d.f() && console.error(
99 "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."
100 );
101 }
102 };
103 exports.preconnect = function(href, options) {
104 "string" === typeof href && href ? null != options && "object" !== typeof options ? console.error(
105 "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.",
106 getValueDescriptorExpectingEnumForWarning(options)
107 ) : null != options && "string" !== typeof options.crossOrigin && console.error(
108 "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.",
109 getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
110 ) : console.error(
111 "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
112 getValueDescriptorExpectingObjectForWarning(href)
113 );
114 "string" === typeof href && (options ? (options = options.crossOrigin, options = "string" === typeof options ? "use-credentials" === options ? options : "" : void 0) : options = null, Internals.d.C(href, options));
115 };
116 exports.prefetchDNS = function(href) {
117 if ("string" !== typeof href || !href)
118 console.error(
119 "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
120 getValueDescriptorExpectingObjectForWarning(href)
121 );
122 else if (1 < arguments.length) {
123 var options = arguments[1];
124 "object" === typeof options && options.hasOwnProperty("crossOrigin") ? console.error(
125 "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`.",
126 getValueDescriptorExpectingEnumForWarning(options)
127 ) : console.error(
128 "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`.",
129 getValueDescriptorExpectingEnumForWarning(options)
130 );
131 }
132 "string" === typeof href && Internals.d.D(href);
133 };
134 exports.preinit = function(href, options) {
135 "string" === typeof href && href ? null == options || "object" !== typeof options ? console.error(
136 "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.",
137 getValueDescriptorExpectingEnumForWarning(options)
138 ) : "style" !== options.as && "script" !== options.as && console.error(
139 '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".',
140 getValueDescriptorExpectingEnumForWarning(options.as)
141 ) : console.error(
142 "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
143 getValueDescriptorExpectingObjectForWarning(href)
144 );
145 if ("string" === typeof href && options && "string" === typeof options.as) {
146 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;
147 "style" === as ? Internals.d.S(
148 href,
149 "string" === typeof options.precedence ? options.precedence : void 0,
150 {
151 crossOrigin,
152 integrity,
153 fetchPriority
154 }
155 ) : "script" === as && Internals.d.X(href, {
156 crossOrigin,
157 integrity,
158 fetchPriority,
159 nonce: "string" === typeof options.nonce ? options.nonce : void 0
160 });
161 }
162 };
163 exports.preinitModule = function(href, options) {
164 var encountered = "";
165 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
166 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) + ".");
167 if (encountered)
168 console.error(
169 "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
170 encountered
171 );
172 else
173 switch (encountered = options && "string" === typeof options.as ? options.as : "script", encountered) {
174 case "script":
175 break;
176 default:
177 encountered = getValueDescriptorExpectingEnumForWarning(encountered), console.error(
178 '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)',
179 encountered,
180 href
181 );
182 }
183 if ("string" === typeof href)
184 if ("object" === typeof options && null !== options) {
185 if (null == options.as || "script" === options.as)
186 encountered = getCrossOriginStringAs(
187 options.as,
188 options.crossOrigin
189 ), Internals.d.M(href, {
190 crossOrigin: encountered,
191 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
192 nonce: "string" === typeof options.nonce ? options.nonce : void 0
193 });
194 } else null == options && Internals.d.M(href);
195 };
196 exports.preload = function(href, options) {
197 var encountered = "";
198 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
199 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) + ".");
200 encountered && console.error(
201 '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',
202 encountered
203 );
204 if ("string" === typeof href && "object" === typeof options && null !== options && "string" === typeof options.as) {
205 encountered = options.as;
206 var crossOrigin = getCrossOriginStringAs(
207 encountered,
208 options.crossOrigin
209 );
210 Internals.d.L(href, encountered, {
211 crossOrigin,
212 integrity: "string" === typeof options.integrity ? options.integrity : void 0,
213 nonce: "string" === typeof options.nonce ? options.nonce : void 0,
214 type: "string" === typeof options.type ? options.type : void 0,
215 fetchPriority: "string" === typeof options.fetchPriority ? options.fetchPriority : void 0,
216 referrerPolicy: "string" === typeof options.referrerPolicy ? options.referrerPolicy : void 0,
217 imageSrcSet: "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
218 imageSizes: "string" === typeof options.imageSizes ? options.imageSizes : void 0,
219 media: "string" === typeof options.media ? options.media : void 0
220 });
221 }
222 };
223 exports.preloadModule = function(href, options) {
224 var encountered = "";
225 "string" === typeof href && href || (encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".");
226 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) + ".");
227 encountered && console.error(
228 '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',
229 encountered
230 );
231 "string" === typeof href && (options ? (encountered = getCrossOriginStringAs(
232 options.as,
233 options.crossOrigin
234 ), Internals.d.m(href, {
235 as: "string" === typeof options.as && "script" !== options.as ? options.as : void 0,
236 crossOrigin: encountered,
237 integrity: "string" === typeof options.integrity ? options.integrity : void 0
238 })) : Internals.d.m(href));
239 };
240 exports.requestFormReset = function(form) {
241 Internals.d.r(form);
242 };
243 exports.unstable_batchedUpdates = function(fn, a) {
244 return fn(a);
245 };
246 exports.useFormState = function(action, initialState, permalink) {
247 return resolveDispatcher().useFormState(action, initialState, permalink);
248 };
249 exports.useFormStatus = function() {
250 return resolveDispatcher().useHostTransitionStatus();
251 };
252 exports.version = "19.2.4";
253 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
254 })();
255 }
256 });
257
258 // node_modules/react-dom/index.js
259 var require_react_dom = __commonJS({
260 "node_modules/react-dom/index.js"(exports, module) {
261 "use strict";
262 if (false) {
263 checkDCE();
264 module.exports = null;
265 } else {
266 module.exports = require_react_dom_development();
267 }
268 }
269 });
270
271 // node_modules/scheduler/cjs/scheduler.development.js
272 var require_scheduler_development = __commonJS({
273 "node_modules/scheduler/cjs/scheduler.development.js"(exports) {
274 "use strict";
275 (function() {
276 function performWorkUntilDeadline() {
277 needsPaint = false;
278 if (isMessageLoopRunning) {
279 var currentTime = exports.unstable_now();
280 startTime = currentTime;
281 var hasMoreWork = true;
282 try {
283 a: {
284 isHostCallbackScheduled = false;
285 isHostTimeoutScheduled && (isHostTimeoutScheduled = false, localClearTimeout(taskTimeoutID), taskTimeoutID = -1);
286 isPerformingWork = true;
287 var previousPriorityLevel = currentPriorityLevel;
288 try {
289 b: {
290 advanceTimers(currentTime);
291 for (currentTask = peek(taskQueue); null !== currentTask && !(currentTask.expirationTime > currentTime && shouldYieldToHost()); ) {
292 var callback = currentTask.callback;
293 if ("function" === typeof callback) {
294 currentTask.callback = null;
295 currentPriorityLevel = currentTask.priorityLevel;
296 var continuationCallback = callback(
297 currentTask.expirationTime <= currentTime
298 );
299 currentTime = exports.unstable_now();
300 if ("function" === typeof continuationCallback) {
301 currentTask.callback = continuationCallback;
302 advanceTimers(currentTime);
303 hasMoreWork = true;
304 break b;
305 }
306 currentTask === peek(taskQueue) && pop(taskQueue);
307 advanceTimers(currentTime);
308 } else pop(taskQueue);
309 currentTask = peek(taskQueue);
310 }
311 if (null !== currentTask) hasMoreWork = true;
312 else {
313 var firstTimer = peek(timerQueue);
314 null !== firstTimer && requestHostTimeout(
315 handleTimeout,
316 firstTimer.startTime - currentTime
317 );
318 hasMoreWork = false;
319 }
320 }
321 break a;
322 } finally {
323 currentTask = null, currentPriorityLevel = previousPriorityLevel, isPerformingWork = false;
324 }
325 hasMoreWork = void 0;
326 }
327 } finally {
328 hasMoreWork ? schedulePerformWorkUntilDeadline() : isMessageLoopRunning = false;
329 }
330 }
331 }
332 function push(heap, node) {
333 var index = heap.length;
334 heap.push(node);
335 a: for (; 0 < index; ) {
336 var parentIndex = index - 1 >>> 1, parent = heap[parentIndex];
337 if (0 < compare(parent, node))
338 heap[parentIndex] = node, heap[index] = parent, index = parentIndex;
339 else break a;
340 }
341 }
342 function peek(heap) {
343 return 0 === heap.length ? null : heap[0];
344 }
345 function pop(heap) {
346 if (0 === heap.length) return null;
347 var first = heap[0], last = heap.pop();
348 if (last !== first) {
349 heap[0] = last;
350 a: for (var index = 0, length = heap.length, halfLength = length >>> 1; index < halfLength; ) {
351 var leftIndex = 2 * (index + 1) - 1, left = heap[leftIndex], rightIndex = leftIndex + 1, right = heap[rightIndex];
352 if (0 > compare(left, last))
353 rightIndex < length && 0 > compare(right, left) ? (heap[index] = right, heap[rightIndex] = last, index = rightIndex) : (heap[index] = left, heap[leftIndex] = last, index = leftIndex);
354 else if (rightIndex < length && 0 > compare(right, last))
355 heap[index] = right, heap[rightIndex] = last, index = rightIndex;
356 else break a;
357 }
358 }
359 return first;
360 }
361 function compare(a, b) {
362 var diff = a.sortIndex - b.sortIndex;
363 return 0 !== diff ? diff : a.id - b.id;
364 }
365 function advanceTimers(currentTime) {
366 for (var timer = peek(timerQueue); null !== timer; ) {
367 if (null === timer.callback) pop(timerQueue);
368 else if (timer.startTime <= currentTime)
369 pop(timerQueue), timer.sortIndex = timer.expirationTime, push(taskQueue, timer);
370 else break;
371 timer = peek(timerQueue);
372 }
373 }
374 function handleTimeout(currentTime) {
375 isHostTimeoutScheduled = false;
376 advanceTimers(currentTime);
377 if (!isHostCallbackScheduled)
378 if (null !== peek(taskQueue))
379 isHostCallbackScheduled = true, isMessageLoopRunning || (isMessageLoopRunning = true, schedulePerformWorkUntilDeadline());
380 else {
381 var firstTimer = peek(timerQueue);
382 null !== firstTimer && requestHostTimeout(
383 handleTimeout,
384 firstTimer.startTime - currentTime
385 );
386 }
387 }
388 function shouldYieldToHost() {
389 return needsPaint ? true : exports.unstable_now() - startTime < frameInterval ? false : true;
390 }
391 function requestHostTimeout(callback, ms) {
392 taskTimeoutID = localSetTimeout(function() {
393 callback(exports.unstable_now());
394 }, ms);
395 }
396 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
397 exports.unstable_now = void 0;
398 if ("object" === typeof performance && "function" === typeof performance.now) {
399 var localPerformance = performance;
400 exports.unstable_now = function() {
401 return localPerformance.now();
402 };
403 } else {
404 var localDate = Date, initialTime = localDate.now();
405 exports.unstable_now = function() {
406 return localDate.now() - initialTime;
407 };
408 }
409 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;
410 if ("function" === typeof localSetImmediate)
411 var schedulePerformWorkUntilDeadline = function() {
412 localSetImmediate(performWorkUntilDeadline);
413 };
414 else if ("undefined" !== typeof MessageChannel) {
415 var channel = new MessageChannel(), port = channel.port2;
416 channel.port1.onmessage = performWorkUntilDeadline;
417 schedulePerformWorkUntilDeadline = function() {
418 port.postMessage(null);
419 };
420 } else
421 schedulePerformWorkUntilDeadline = function() {
422 localSetTimeout(performWorkUntilDeadline, 0);
423 };
424 exports.unstable_IdlePriority = 5;
425 exports.unstable_ImmediatePriority = 1;
426 exports.unstable_LowPriority = 4;
427 exports.unstable_NormalPriority = 3;
428 exports.unstable_Profiling = null;
429 exports.unstable_UserBlockingPriority = 2;
430 exports.unstable_cancelCallback = function(task) {
431 task.callback = null;
432 };
433 exports.unstable_forceFrameRate = function(fps) {
434 0 > fps || 125 < fps ? console.error(
435 "forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"
436 ) : frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5;
437 };
438 exports.unstable_getCurrentPriorityLevel = function() {
439 return currentPriorityLevel;
440 };
441 exports.unstable_next = function(eventHandler) {
442 switch (currentPriorityLevel) {
443 case 1:
444 case 2:
445 case 3:
446 var priorityLevel = 3;
447 break;
448 default:
449 priorityLevel = currentPriorityLevel;
450 }
451 var previousPriorityLevel = currentPriorityLevel;
452 currentPriorityLevel = priorityLevel;
453 try {
454 return eventHandler();
455 } finally {
456 currentPriorityLevel = previousPriorityLevel;
457 }
458 };
459 exports.unstable_requestPaint = function() {
460 needsPaint = true;
461 };
462 exports.unstable_runWithPriority = function(priorityLevel, eventHandler) {
463 switch (priorityLevel) {
464 case 1:
465 case 2:
466 case 3:
467 case 4:
468 case 5:
469 break;
470 default:
471 priorityLevel = 3;
472 }
473 var previousPriorityLevel = currentPriorityLevel;
474 currentPriorityLevel = priorityLevel;
475 try {
476 return eventHandler();
477 } finally {
478 currentPriorityLevel = previousPriorityLevel;
479 }
480 };
481 exports.unstable_scheduleCallback = function(priorityLevel, callback, options) {
482 var currentTime = exports.unstable_now();
483 "object" === typeof options && null !== options ? (options = options.delay, options = "number" === typeof options && 0 < options ? currentTime + options : currentTime) : options = currentTime;
484 switch (priorityLevel) {
485 case 1:
486 var timeout = -1;
487 break;
488 case 2:
489 timeout = 250;
490 break;
491 case 5:
492 timeout = 1073741823;
493 break;
494 case 4:
495 timeout = 1e4;
496 break;
497 default:
498 timeout = 5e3;
499 }
500 timeout = options + timeout;
501 priorityLevel = {
502 id: taskIdCounter++,
503 callback,
504 priorityLevel,
505 startTime: options,
506 expirationTime: timeout,
507 sortIndex: -1
508 };
509 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())));
510 return priorityLevel;
511 };
512 exports.unstable_shouldYield = shouldYieldToHost;
513 exports.unstable_wrapCallback = function(callback) {
514 var parentPriorityLevel = currentPriorityLevel;
515 return function() {
516 var previousPriorityLevel = currentPriorityLevel;
517 currentPriorityLevel = parentPriorityLevel;
518 try {
519 return callback.apply(this, arguments);
520 } finally {
521 currentPriorityLevel = previousPriorityLevel;
522 }
523 };
524 };
525 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
526 })();
527 }
528 });
529
530 // node_modules/scheduler/index.js
531 var require_scheduler = __commonJS({
532 "node_modules/scheduler/index.js"(exports, module) {
533 "use strict";
534 if (false) {
535 module.exports = null;
536 } else {
537 module.exports = require_scheduler_development();
538 }
539 }
540 });
541
542 // node_modules/react-dom/cjs/react-dom-client.development.js
543 var require_react_dom_client_development = __commonJS({
544 "node_modules/react-dom/cjs/react-dom-client.development.js"(exports) {
545 "use strict";
546 (function() {
547 function findHook(fiber, id) {
548 for (fiber = fiber.memoizedState; null !== fiber && 0 < id; )
549 fiber = fiber.next, id--;
550 return fiber;
551 }
552 function copyWithSetImpl(obj, path, index, value) {
553 if (index >= path.length) return value;
554 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
555 updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
556 return updated;
557 }
558 function copyWithRename(obj, oldPath, newPath) {
559 if (oldPath.length !== newPath.length)
560 console.warn("copyWithRename() expects paths of the same length");
561 else {
562 for (var i = 0; i < newPath.length - 1; i++)
563 if (oldPath[i] !== newPath[i]) {
564 console.warn(
565 "copyWithRename() expects paths to be the same except for the deepest key"
566 );
567 return;
568 }
569 return copyWithRenameImpl(obj, oldPath, newPath, 0);
570 }
571 }
572 function copyWithRenameImpl(obj, oldPath, newPath, index) {
573 var oldKey = oldPath[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
574 index + 1 === oldPath.length ? (updated[newPath[index]] = updated[oldKey], isArrayImpl(updated) ? updated.splice(oldKey, 1) : delete updated[oldKey]) : updated[oldKey] = copyWithRenameImpl(
575 obj[oldKey],
576 oldPath,
577 newPath,
578 index + 1
579 );
580 return updated;
581 }
582 function copyWithDeleteImpl(obj, path, index) {
583 var key = path[index], updated = isArrayImpl(obj) ? obj.slice() : assign({}, obj);
584 if (index + 1 === path.length)
585 return isArrayImpl(updated) ? updated.splice(key, 1) : delete updated[key], updated;
586 updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
587 return updated;
588 }
589 function shouldSuspendImpl() {
590 return false;
591 }
592 function shouldErrorImpl() {
593 return null;
594 }
595 function warnInvalidHookAccess() {
596 console.error(
597 "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"
598 );
599 }
600 function warnInvalidContextAccess() {
601 console.error(
602 "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()."
603 );
604 }
605 function noop() {
606 }
607 function warnForMissingKey() {
608 }
609 function setToSortedString(set) {
610 var array = [];
611 set.forEach(function(value) {
612 array.push(value);
613 });
614 return array.sort().join(", ");
615 }
616 function createFiber(tag, pendingProps, key, mode) {
617 return new FiberNode(tag, pendingProps, key, mode);
618 }
619 function scheduleRoot(root2, element) {
620 root2.context === emptyContextObject && (updateContainerImpl(root2.current, 2, element, root2, null, null), flushSyncWork$1());
621 }
622 function scheduleRefresh(root2, update) {
623 if (null !== resolveFamily) {
624 var staleFamilies = update.staleFamilies;
625 update = update.updatedFamilies;
626 flushPendingEffects();
627 scheduleFibersWithFamiliesRecursively(
628 root2.current,
629 update,
630 staleFamilies
631 );
632 flushSyncWork$1();
633 }
634 }
635 function setRefreshHandler(handler) {
636 resolveFamily = handler;
637 }
638 function isValidContainer(node) {
639 return !(!node || 1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType);
640 }
641 function getNearestMountedFiber(fiber) {
642 var node = fiber, nearestMounted = fiber;
643 if (fiber.alternate) for (; node.return; ) node = node.return;
644 else {
645 fiber = node;
646 do
647 node = fiber, 0 !== (node.flags & 4098) && (nearestMounted = node.return), fiber = node.return;
648 while (fiber);
649 }
650 return 3 === node.tag ? nearestMounted : null;
651 }
652 function getSuspenseInstanceFromFiber(fiber) {
653 if (13 === fiber.tag) {
654 var suspenseState = fiber.memoizedState;
655 null === suspenseState && (fiber = fiber.alternate, null !== fiber && (suspenseState = fiber.memoizedState));
656 if (null !== suspenseState) return suspenseState.dehydrated;
657 }
658 return null;
659 }
660 function getActivityInstanceFromFiber(fiber) {
661 if (31 === fiber.tag) {
662 var activityState = fiber.memoizedState;
663 null === activityState && (fiber = fiber.alternate, null !== fiber && (activityState = fiber.memoizedState));
664 if (null !== activityState) return activityState.dehydrated;
665 }
666 return null;
667 }
668 function assertIsMounted(fiber) {
669 if (getNearestMountedFiber(fiber) !== fiber)
670 throw Error("Unable to find node on an unmounted component.");
671 }
672 function findCurrentFiberUsingSlowPath(fiber) {
673 var alternate = fiber.alternate;
674 if (!alternate) {
675 alternate = getNearestMountedFiber(fiber);
676 if (null === alternate)
677 throw Error("Unable to find node on an unmounted component.");
678 return alternate !== fiber ? null : fiber;
679 }
680 for (var a = fiber, b = alternate; ; ) {
681 var parentA = a.return;
682 if (null === parentA) break;
683 var parentB = parentA.alternate;
684 if (null === parentB) {
685 b = parentA.return;
686 if (null !== b) {
687 a = b;
688 continue;
689 }
690 break;
691 }
692 if (parentA.child === parentB.child) {
693 for (parentB = parentA.child; parentB; ) {
694 if (parentB === a) return assertIsMounted(parentA), fiber;
695 if (parentB === b) return assertIsMounted(parentA), alternate;
696 parentB = parentB.sibling;
697 }
698 throw Error("Unable to find node on an unmounted component.");
699 }
700 if (a.return !== b.return) a = parentA, b = parentB;
701 else {
702 for (var didFindChild = false, _child = parentA.child; _child; ) {
703 if (_child === a) {
704 didFindChild = true;
705 a = parentA;
706 b = parentB;
707 break;
708 }
709 if (_child === b) {
710 didFindChild = true;
711 b = parentA;
712 a = parentB;
713 break;
714 }
715 _child = _child.sibling;
716 }
717 if (!didFindChild) {
718 for (_child = parentB.child; _child; ) {
719 if (_child === a) {
720 didFindChild = true;
721 a = parentB;
722 b = parentA;
723 break;
724 }
725 if (_child === b) {
726 didFindChild = true;
727 b = parentB;
728 a = parentA;
729 break;
730 }
731 _child = _child.sibling;
732 }
733 if (!didFindChild)
734 throw Error(
735 "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue."
736 );
737 }
738 }
739 if (a.alternate !== b)
740 throw Error(
741 "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue."
742 );
743 }
744 if (3 !== a.tag)
745 throw Error("Unable to find node on an unmounted component.");
746 return a.stateNode.current === a ? fiber : alternate;
747 }
748 function findCurrentHostFiberImpl(node) {
749 var tag = node.tag;
750 if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;
751 for (node = node.child; null !== node; ) {
752 tag = findCurrentHostFiberImpl(node);
753 if (null !== tag) return tag;
754 node = node.sibling;
755 }
756 return null;
757 }
758 function getIteratorFn(maybeIterable) {
759 if (null === maybeIterable || "object" !== typeof maybeIterable)
760 return null;
761 maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
762 return "function" === typeof maybeIterable ? maybeIterable : null;
763 }
764 function getComponentNameFromType(type) {
765 if (null == type) return null;
766 if ("function" === typeof type)
767 return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
768 if ("string" === typeof type) return type;
769 switch (type) {
770 case REACT_FRAGMENT_TYPE:
771 return "Fragment";
772 case REACT_PROFILER_TYPE:
773 return "Profiler";
774 case REACT_STRICT_MODE_TYPE:
775 return "StrictMode";
776 case REACT_SUSPENSE_TYPE:
777 return "Suspense";
778 case REACT_SUSPENSE_LIST_TYPE:
779 return "SuspenseList";
780 case REACT_ACTIVITY_TYPE:
781 return "Activity";
782 }
783 if ("object" === typeof type)
784 switch ("number" === typeof type.tag && console.error(
785 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
786 ), type.$$typeof) {
787 case REACT_PORTAL_TYPE:
788 return "Portal";
789 case REACT_CONTEXT_TYPE:
790 return type.displayName || "Context";
791 case REACT_CONSUMER_TYPE:
792 return (type._context.displayName || "Context") + ".Consumer";
793 case REACT_FORWARD_REF_TYPE:
794 var innerType = type.render;
795 type = type.displayName;
796 type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
797 return type;
798 case REACT_MEMO_TYPE:
799 return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
800 case REACT_LAZY_TYPE:
801 innerType = type._payload;
802 type = type._init;
803 try {
804 return getComponentNameFromType(type(innerType));
805 } catch (x) {
806 }
807 }
808 return null;
809 }
810 function getComponentNameFromOwner(owner) {
811 return "number" === typeof owner.tag ? getComponentNameFromFiber(owner) : "string" === typeof owner.name ? owner.name : null;
812 }
813 function getComponentNameFromFiber(fiber) {
814 var type = fiber.type;
815 switch (fiber.tag) {
816 case 31:
817 return "Activity";
818 case 24:
819 return "Cache";
820 case 9:
821 return (type._context.displayName || "Context") + ".Consumer";
822 case 10:
823 return type.displayName || "Context";
824 case 18:
825 return "DehydratedFragment";
826 case 11:
827 return fiber = type.render, fiber = fiber.displayName || fiber.name || "", type.displayName || ("" !== fiber ? "ForwardRef(" + fiber + ")" : "ForwardRef");
828 case 7:
829 return "Fragment";
830 case 26:
831 case 27:
832 case 5:
833 return type;
834 case 4:
835 return "Portal";
836 case 3:
837 return "Root";
838 case 6:
839 return "Text";
840 case 16:
841 return getComponentNameFromType(type);
842 case 8:
843 return type === REACT_STRICT_MODE_TYPE ? "StrictMode" : "Mode";
844 case 22:
845 return "Offscreen";
846 case 12:
847 return "Profiler";
848 case 21:
849 return "Scope";
850 case 13:
851 return "Suspense";
852 case 19:
853 return "SuspenseList";
854 case 25:
855 return "TracingMarker";
856 case 1:
857 case 0:
858 case 14:
859 case 15:
860 if ("function" === typeof type)
861 return type.displayName || type.name || null;
862 if ("string" === typeof type) return type;
863 break;
864 case 29:
865 type = fiber._debugInfo;
866 if (null != type) {
867 for (var i = type.length - 1; 0 <= i; i--)
868 if ("string" === typeof type[i].name) return type[i].name;
869 }
870 if (null !== fiber.return)
871 return getComponentNameFromFiber(fiber.return);
872 }
873 return null;
874 }
875 function createCursor(defaultValue) {
876 return { current: defaultValue };
877 }
878 function pop(cursor, fiber) {
879 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--);
880 }
881 function push(cursor, value, fiber) {
882 index$jscomp$0++;
883 valueStack[index$jscomp$0] = cursor.current;
884 fiberStack[index$jscomp$0] = fiber;
885 cursor.current = value;
886 }
887 function requiredContext(c) {
888 null === c && console.error(
889 "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue."
890 );
891 return c;
892 }
893 function pushHostContainer(fiber, nextRootInstance) {
894 push(rootInstanceStackCursor, nextRootInstance, fiber);
895 push(contextFiberStackCursor, fiber, fiber);
896 push(contextStackCursor, null, fiber);
897 var nextRootContext = nextRootInstance.nodeType;
898 switch (nextRootContext) {
899 case 9:
900 case 11:
901 nextRootContext = 9 === nextRootContext ? "#document" : "#fragment";
902 nextRootInstance = (nextRootInstance = nextRootInstance.documentElement) ? (nextRootInstance = nextRootInstance.namespaceURI) ? getOwnHostContext(nextRootInstance) : HostContextNamespaceNone : HostContextNamespaceNone;
903 break;
904 default:
905 if (nextRootContext = nextRootInstance.tagName, nextRootInstance = nextRootInstance.namespaceURI)
906 nextRootInstance = getOwnHostContext(nextRootInstance), nextRootInstance = getChildHostContextProd(
907 nextRootInstance,
908 nextRootContext
909 );
910 else
911 switch (nextRootContext) {
912 case "svg":
913 nextRootInstance = HostContextNamespaceSvg;
914 break;
915 case "math":
916 nextRootInstance = HostContextNamespaceMath;
917 break;
918 default:
919 nextRootInstance = HostContextNamespaceNone;
920 }
921 }
922 nextRootContext = nextRootContext.toLowerCase();
923 nextRootContext = updatedAncestorInfoDev(null, nextRootContext);
924 nextRootContext = {
925 context: nextRootInstance,
926 ancestorInfo: nextRootContext
927 };
928 pop(contextStackCursor, fiber);
929 push(contextStackCursor, nextRootContext, fiber);
930 }
931 function popHostContainer(fiber) {
932 pop(contextStackCursor, fiber);
933 pop(contextFiberStackCursor, fiber);
934 pop(rootInstanceStackCursor, fiber);
935 }
936 function getHostContext() {
937 return requiredContext(contextStackCursor.current);
938 }
939 function pushHostContext(fiber) {
940 null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber, fiber);
941 var context = requiredContext(contextStackCursor.current);
942 var type = fiber.type;
943 var nextContext = getChildHostContextProd(context.context, type);
944 type = updatedAncestorInfoDev(context.ancestorInfo, type);
945 nextContext = { context: nextContext, ancestorInfo: type };
946 context !== nextContext && (push(contextFiberStackCursor, fiber, fiber), push(contextStackCursor, nextContext, fiber));
947 }
948 function popHostContext(fiber) {
949 contextFiberStackCursor.current === fiber && (pop(contextStackCursor, fiber), pop(contextFiberStackCursor, fiber));
950 hostTransitionProviderCursor.current === fiber && (pop(hostTransitionProviderCursor, fiber), HostTransitionContext._currentValue = NotPendingTransition);
951 }
952 function disabledLog() {
953 }
954 function disableLogs() {
955 if (0 === disabledDepth) {
956 prevLog = console.log;
957 prevInfo = console.info;
958 prevWarn = console.warn;
959 prevError = console.error;
960 prevGroup = console.group;
961 prevGroupCollapsed = console.groupCollapsed;
962 prevGroupEnd = console.groupEnd;
963 var props = {
964 configurable: true,
965 enumerable: true,
966 value: disabledLog,
967 writable: true
968 };
969 Object.defineProperties(console, {
970 info: props,
971 log: props,
972 warn: props,
973 error: props,
974 group: props,
975 groupCollapsed: props,
976 groupEnd: props
977 });
978 }
979 disabledDepth++;
980 }
981 function reenableLogs() {
982 disabledDepth--;
983 if (0 === disabledDepth) {
984 var props = { configurable: true, enumerable: true, writable: true };
985 Object.defineProperties(console, {
986 log: assign({}, props, { value: prevLog }),
987 info: assign({}, props, { value: prevInfo }),
988 warn: assign({}, props, { value: prevWarn }),
989 error: assign({}, props, { value: prevError }),
990 group: assign({}, props, { value: prevGroup }),
991 groupCollapsed: assign({}, props, { value: prevGroupCollapsed }),
992 groupEnd: assign({}, props, { value: prevGroupEnd })
993 });
994 }
995 0 > disabledDepth && console.error(
996 "disabledDepth fell below zero. This is a bug in React. Please file an issue."
997 );
998 }
999 function formatOwnerStack(error) {
1000 var prevPrepareStackTrace = Error.prepareStackTrace;
1001 Error.prepareStackTrace = void 0;
1002 error = error.stack;
1003 Error.prepareStackTrace = prevPrepareStackTrace;
1004 error.startsWith("Error: react-stack-top-frame\n") && (error = error.slice(29));
1005 prevPrepareStackTrace = error.indexOf("\n");
1006 -1 !== prevPrepareStackTrace && (error = error.slice(prevPrepareStackTrace + 1));
1007 prevPrepareStackTrace = error.indexOf("react_stack_bottom_frame");
1008 -1 !== prevPrepareStackTrace && (prevPrepareStackTrace = error.lastIndexOf(
1009 "\n",
1010 prevPrepareStackTrace
1011 ));
1012 if (-1 !== prevPrepareStackTrace)
1013 error = error.slice(0, prevPrepareStackTrace);
1014 else return "";
1015 return error;
1016 }
1017 function describeBuiltInComponentFrame(name) {
1018 if (void 0 === prefix)
1019 try {
1020 throw Error();
1021 } catch (x) {
1022 var match = x.stack.trim().match(/\n( *(at )?)/);
1023 prefix = match && match[1] || "";
1024 suffix = -1 < x.stack.indexOf("\n at") ? " (<anonymous>)" : -1 < x.stack.indexOf("@") ? "@unknown:0:0" : "";
1025 }
1026 return "\n" + prefix + name + suffix;
1027 }
1028 function describeNativeComponentFrame(fn, construct) {
1029 if (!fn || reentry) return "";
1030 var frame = componentFrameCache.get(fn);
1031 if (void 0 !== frame) return frame;
1032 reentry = true;
1033 frame = Error.prepareStackTrace;
1034 Error.prepareStackTrace = void 0;
1035 var previousDispatcher2 = null;
1036 previousDispatcher2 = ReactSharedInternals.H;
1037 ReactSharedInternals.H = null;
1038 disableLogs();
1039 try {
1040 var RunInRootFrame = {
1041 DetermineComponentFrameRoot: function() {
1042 try {
1043 if (construct) {
1044 var Fake = function() {
1045 throw Error();
1046 };
1047 Object.defineProperty(Fake.prototype, "props", {
1048 set: function() {
1049 throw Error();
1050 }
1051 });
1052 if ("object" === typeof Reflect && Reflect.construct) {
1053 try {
1054 Reflect.construct(Fake, []);
1055 } catch (x) {
1056 var control = x;
1057 }
1058 Reflect.construct(fn, [], Fake);
1059 } else {
1060 try {
1061 Fake.call();
1062 } catch (x$0) {
1063 control = x$0;
1064 }
1065 fn.call(Fake.prototype);
1066 }
1067 } else {
1068 try {
1069 throw Error();
1070 } catch (x$1) {
1071 control = x$1;
1072 }
1073 (Fake = fn()) && "function" === typeof Fake.catch && Fake.catch(function() {
1074 });
1075 }
1076 } catch (sample) {
1077 if (sample && control && "string" === typeof sample.stack)
1078 return [sample.stack, control.stack];
1079 }
1080 return [null, null];
1081 }
1082 };
1083 RunInRootFrame.DetermineComponentFrameRoot.displayName = "DetermineComponentFrameRoot";
1084 var namePropDescriptor = Object.getOwnPropertyDescriptor(
1085 RunInRootFrame.DetermineComponentFrameRoot,
1086 "name"
1087 );
1088 namePropDescriptor && namePropDescriptor.configurable && Object.defineProperty(
1089 RunInRootFrame.DetermineComponentFrameRoot,
1090 "name",
1091 { value: "DetermineComponentFrameRoot" }
1092 );
1093 var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(), sampleStack = _RunInRootFrame$Deter[0], controlStack = _RunInRootFrame$Deter[1];
1094 if (sampleStack && controlStack) {
1095 var sampleLines = sampleStack.split("\n"), controlLines = controlStack.split("\n");
1096 for (_RunInRootFrame$Deter = namePropDescriptor = 0; namePropDescriptor < sampleLines.length && !sampleLines[namePropDescriptor].includes(
1097 "DetermineComponentFrameRoot"
1098 ); )
1099 namePropDescriptor++;
1100 for (; _RunInRootFrame$Deter < controlLines.length && !controlLines[_RunInRootFrame$Deter].includes(
1101 "DetermineComponentFrameRoot"
1102 ); )
1103 _RunInRootFrame$Deter++;
1104 if (namePropDescriptor === sampleLines.length || _RunInRootFrame$Deter === controlLines.length)
1105 for (namePropDescriptor = sampleLines.length - 1, _RunInRootFrame$Deter = controlLines.length - 1; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter && sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]; )
1106 _RunInRootFrame$Deter--;
1107 for (; 1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter; namePropDescriptor--, _RunInRootFrame$Deter--)
1108 if (sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1109 if (1 !== namePropDescriptor || 1 !== _RunInRootFrame$Deter) {
1110 do
1111 if (namePropDescriptor--, _RunInRootFrame$Deter--, 0 > _RunInRootFrame$Deter || sampleLines[namePropDescriptor] !== controlLines[_RunInRootFrame$Deter]) {
1112 var _frame = "\n" + sampleLines[namePropDescriptor].replace(
1113 " at new ",
1114 " at "
1115 );
1116 fn.displayName && _frame.includes("<anonymous>") && (_frame = _frame.replace("<anonymous>", fn.displayName));
1117 "function" === typeof fn && componentFrameCache.set(fn, _frame);
1118 return _frame;
1119 }
1120 while (1 <= namePropDescriptor && 0 <= _RunInRootFrame$Deter);
1121 }
1122 break;
1123 }
1124 }
1125 } finally {
1126 reentry = false, ReactSharedInternals.H = previousDispatcher2, reenableLogs(), Error.prepareStackTrace = frame;
1127 }
1128 sampleLines = (sampleLines = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(sampleLines) : "";
1129 "function" === typeof fn && componentFrameCache.set(fn, sampleLines);
1130 return sampleLines;
1131 }
1132 function describeFiber(fiber, childFiber) {
1133 switch (fiber.tag) {
1134 case 26:
1135 case 27:
1136 case 5:
1137 return describeBuiltInComponentFrame(fiber.type);
1138 case 16:
1139 return describeBuiltInComponentFrame("Lazy");
1140 case 13:
1141 return fiber.child !== childFiber && null !== childFiber ? describeBuiltInComponentFrame("Suspense Fallback") : describeBuiltInComponentFrame("Suspense");
1142 case 19:
1143 return describeBuiltInComponentFrame("SuspenseList");
1144 case 0:
1145 case 15:
1146 return describeNativeComponentFrame(fiber.type, false);
1147 case 11:
1148 return describeNativeComponentFrame(fiber.type.render, false);
1149 case 1:
1150 return describeNativeComponentFrame(fiber.type, true);
1151 case 31:
1152 return describeBuiltInComponentFrame("Activity");
1153 default:
1154 return "";
1155 }
1156 }
1157 function getStackByFiberInDevAndProd(workInProgress2) {
1158 try {
1159 var info = "", previous = null;
1160 do {
1161 info += describeFiber(workInProgress2, previous);
1162 var debugInfo = workInProgress2._debugInfo;
1163 if (debugInfo)
1164 for (var i = debugInfo.length - 1; 0 <= i; i--) {
1165 var entry = debugInfo[i];
1166 if ("string" === typeof entry.name) {
1167 var JSCompiler_temp_const = info;
1168 a: {
1169 var name = entry.name, env = entry.env, location = entry.debugLocation;
1170 if (null != location) {
1171 var childStack = formatOwnerStack(location), idx = childStack.lastIndexOf("\n"), lastLine = -1 === idx ? childStack : childStack.slice(idx + 1);
1172 if (-1 !== lastLine.indexOf(name)) {
1173 var JSCompiler_inline_result = "\n" + lastLine;
1174 break a;
1175 }
1176 }
1177 JSCompiler_inline_result = describeBuiltInComponentFrame(
1178 name + (env ? " [" + env + "]" : "")
1179 );
1180 }
1181 info = JSCompiler_temp_const + JSCompiler_inline_result;
1182 }
1183 }
1184 previous = workInProgress2;
1185 workInProgress2 = workInProgress2.return;
1186 } while (workInProgress2);
1187 return info;
1188 } catch (x) {
1189 return "\nError generating stack: " + x.message + "\n" + x.stack;
1190 }
1191 }
1192 function describeFunctionComponentFrameWithoutLineNumber(fn) {
1193 return (fn = fn ? fn.displayName || fn.name : "") ? describeBuiltInComponentFrame(fn) : "";
1194 }
1195 function getCurrentFiberOwnerNameInDevOrNull() {
1196 if (null === current) return null;
1197 var owner = current._debugOwner;
1198 return null != owner ? getComponentNameFromOwner(owner) : null;
1199 }
1200 function getCurrentFiberStackInDev() {
1201 if (null === current) return "";
1202 var workInProgress2 = current;
1203 try {
1204 var info = "";
1205 6 === workInProgress2.tag && (workInProgress2 = workInProgress2.return);
1206 switch (workInProgress2.tag) {
1207 case 26:
1208 case 27:
1209 case 5:
1210 info += describeBuiltInComponentFrame(workInProgress2.type);
1211 break;
1212 case 13:
1213 info += describeBuiltInComponentFrame("Suspense");
1214 break;
1215 case 19:
1216 info += describeBuiltInComponentFrame("SuspenseList");
1217 break;
1218 case 31:
1219 info += describeBuiltInComponentFrame("Activity");
1220 break;
1221 case 30:
1222 case 0:
1223 case 15:
1224 case 1:
1225 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1226 workInProgress2.type
1227 ));
1228 break;
1229 case 11:
1230 workInProgress2._debugOwner || "" !== info || (info += describeFunctionComponentFrameWithoutLineNumber(
1231 workInProgress2.type.render
1232 ));
1233 }
1234 for (; workInProgress2; )
1235 if ("number" === typeof workInProgress2.tag) {
1236 var fiber = workInProgress2;
1237 workInProgress2 = fiber._debugOwner;
1238 var debugStack = fiber._debugStack;
1239 if (workInProgress2 && debugStack) {
1240 var formattedStack = formatOwnerStack(debugStack);
1241 "" !== formattedStack && (info += "\n" + formattedStack);
1242 }
1243 } else if (null != workInProgress2.debugStack) {
1244 var ownerStack = workInProgress2.debugStack;
1245 (workInProgress2 = workInProgress2.owner) && ownerStack && (info += "\n" + formatOwnerStack(ownerStack));
1246 } else break;
1247 var JSCompiler_inline_result = info;
1248 } catch (x) {
1249 JSCompiler_inline_result = "\nError generating stack: " + x.message + "\n" + x.stack;
1250 }
1251 return JSCompiler_inline_result;
1252 }
1253 function runWithFiberInDEV(fiber, callback, arg0, arg1, arg2, arg3, arg4) {
1254 var previousFiber = current;
1255 setCurrentFiber(fiber);
1256 try {
1257 return null !== fiber && fiber._debugTask ? fiber._debugTask.run(
1258 callback.bind(null, arg0, arg1, arg2, arg3, arg4)
1259 ) : callback(arg0, arg1, arg2, arg3, arg4);
1260 } finally {
1261 setCurrentFiber(previousFiber);
1262 }
1263 throw Error(
1264 "runWithFiberInDEV should never be called in production. This is a bug in React."
1265 );
1266 }
1267 function setCurrentFiber(fiber) {
1268 ReactSharedInternals.getCurrentStack = null === fiber ? null : getCurrentFiberStackInDev;
1269 isRendering = false;
1270 current = fiber;
1271 }
1272 function typeName(value) {
1273 return "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
1274 }
1275 function willCoercionThrow(value) {
1276 try {
1277 return testStringCoercion(value), false;
1278 } catch (e) {
1279 return true;
1280 }
1281 }
1282 function testStringCoercion(value) {
1283 return "" + value;
1284 }
1285 function checkAttributeStringCoercion(value, attributeName) {
1286 if (willCoercionThrow(value))
1287 return console.error(
1288 "The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",
1289 attributeName,
1290 typeName(value)
1291 ), testStringCoercion(value);
1292 }
1293 function checkCSSPropertyStringCoercion(value, propName) {
1294 if (willCoercionThrow(value))
1295 return console.error(
1296 "The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",
1297 propName,
1298 typeName(value)
1299 ), testStringCoercion(value);
1300 }
1301 function checkFormFieldValueStringCoercion(value) {
1302 if (willCoercionThrow(value))
1303 return console.error(
1304 "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.",
1305 typeName(value)
1306 ), testStringCoercion(value);
1307 }
1308 function injectInternals(internals) {
1309 if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return false;
1310 var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
1311 if (hook.isDisabled) return true;
1312 if (!hook.supportsFiber)
1313 return console.error(
1314 "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"
1315 ), true;
1316 try {
1317 rendererID = hook.inject(internals), injectedHook = hook;
1318 } catch (err) {
1319 console.error("React instrumentation encountered an error: %o.", err);
1320 }
1321 return hook.checkDCE ? true : false;
1322 }
1323 function setIsStrictModeForDevtools(newIsStrictMode) {
1324 "function" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);
1325 if (injectedHook && "function" === typeof injectedHook.setStrictMode)
1326 try {
1327 injectedHook.setStrictMode(rendererID, newIsStrictMode);
1328 } catch (err) {
1329 hasLoggedError || (hasLoggedError = true, console.error(
1330 "React instrumentation encountered an error: %o",
1331 err
1332 ));
1333 }
1334 }
1335 function clz32Fallback(x) {
1336 x >>>= 0;
1337 return 0 === x ? 32 : 31 - (log(x) / LN2 | 0) | 0;
1338 }
1339 function getHighestPriorityLanes(lanes) {
1340 var pendingSyncLanes = lanes & 42;
1341 if (0 !== pendingSyncLanes) return pendingSyncLanes;
1342 switch (lanes & -lanes) {
1343 case 1:
1344 return 1;
1345 case 2:
1346 return 2;
1347 case 4:
1348 return 4;
1349 case 8:
1350 return 8;
1351 case 16:
1352 return 16;
1353 case 32:
1354 return 32;
1355 case 64:
1356 return 64;
1357 case 128:
1358 return 128;
1359 case 256:
1360 case 512:
1361 case 1024:
1362 case 2048:
1363 case 4096:
1364 case 8192:
1365 case 16384:
1366 case 32768:
1367 case 65536:
1368 case 131072:
1369 return lanes & 261888;
1370 case 262144:
1371 case 524288:
1372 case 1048576:
1373 case 2097152:
1374 return lanes & 3932160;
1375 case 4194304:
1376 case 8388608:
1377 case 16777216:
1378 case 33554432:
1379 return lanes & 62914560;
1380 case 67108864:
1381 return 67108864;
1382 case 134217728:
1383 return 134217728;
1384 case 268435456:
1385 return 268435456;
1386 case 536870912:
1387 return 536870912;
1388 case 1073741824:
1389 return 0;
1390 default:
1391 return console.error(
1392 "Should have found matching lanes. This is a bug in React."
1393 ), lanes;
1394 }
1395 }
1396 function getNextLanes(root2, wipLanes, rootHasPendingCommit) {
1397 var pendingLanes = root2.pendingLanes;
1398 if (0 === pendingLanes) return 0;
1399 var nextLanes = 0, suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
1400 root2 = root2.warmLanes;
1401 var nonIdlePendingLanes = pendingLanes & 134217727;
1402 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))));
1403 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;
1404 }
1405 function checkIfRootIsPrerendering(root2, renderLanes2) {
1406 return 0 === (root2.pendingLanes & ~(root2.suspendedLanes & ~root2.pingedLanes) & renderLanes2);
1407 }
1408 function computeExpirationTime(lane, currentTime) {
1409 switch (lane) {
1410 case 1:
1411 case 2:
1412 case 4:
1413 case 8:
1414 case 64:
1415 return currentTime + 250;
1416 case 16:
1417 case 32:
1418 case 128:
1419 case 256:
1420 case 512:
1421 case 1024:
1422 case 2048:
1423 case 4096:
1424 case 8192:
1425 case 16384:
1426 case 32768:
1427 case 65536:
1428 case 131072:
1429 case 262144:
1430 case 524288:
1431 case 1048576:
1432 case 2097152:
1433 return currentTime + 5e3;
1434 case 4194304:
1435 case 8388608:
1436 case 16777216:
1437 case 33554432:
1438 return -1;
1439 case 67108864:
1440 case 134217728:
1441 case 268435456:
1442 case 536870912:
1443 case 1073741824:
1444 return -1;
1445 default:
1446 return console.error(
1447 "Should have found matching lanes. This is a bug in React."
1448 ), -1;
1449 }
1450 }
1451 function claimNextRetryLane() {
1452 var lane = nextRetryLane;
1453 nextRetryLane <<= 1;
1454 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);
1455 return lane;
1456 }
1457 function createLaneMap(initial) {
1458 for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);
1459 return laneMap;
1460 }
1461 function markRootUpdated$1(root2, updateLane) {
1462 root2.pendingLanes |= updateLane;
1463 268435456 !== updateLane && (root2.suspendedLanes = 0, root2.pingedLanes = 0, root2.warmLanes = 0);
1464 }
1465 function markRootFinished(root2, finishedLanes, remainingLanes, spawnedLane, updatedLanes, suspendedRetryLanes) {
1466 var previouslyPendingLanes = root2.pendingLanes;
1467 root2.pendingLanes = remainingLanes;
1468 root2.suspendedLanes = 0;
1469 root2.pingedLanes = 0;
1470 root2.warmLanes = 0;
1471 root2.expiredLanes &= remainingLanes;
1472 root2.entangledLanes &= remainingLanes;
1473 root2.errorRecoveryDisabledLanes &= remainingLanes;
1474 root2.shellSuspendCounter = 0;
1475 var entanglements = root2.entanglements, expirationTimes = root2.expirationTimes, hiddenUpdates = root2.hiddenUpdates;
1476 for (remainingLanes = previouslyPendingLanes & ~remainingLanes; 0 < remainingLanes; ) {
1477 var index = 31 - clz32(remainingLanes), lane = 1 << index;
1478 entanglements[index] = 0;
1479 expirationTimes[index] = -1;
1480 var hiddenUpdatesForLane = hiddenUpdates[index];
1481 if (null !== hiddenUpdatesForLane)
1482 for (hiddenUpdates[index] = null, index = 0; index < hiddenUpdatesForLane.length; index++) {
1483 var update = hiddenUpdatesForLane[index];
1484 null !== update && (update.lane &= -536870913);
1485 }
1486 remainingLanes &= ~lane;
1487 }
1488 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, 0);
1489 0 !== suspendedRetryLanes && 0 === updatedLanes && 0 !== root2.tag && (root2.suspendedLanes |= suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));
1490 }
1491 function markSpawnedDeferredLane(root2, spawnedLane, entangledLanes) {
1492 root2.pendingLanes |= spawnedLane;
1493 root2.suspendedLanes &= ~spawnedLane;
1494 var spawnedLaneIndex = 31 - clz32(spawnedLane);
1495 root2.entangledLanes |= spawnedLane;
1496 root2.entanglements[spawnedLaneIndex] = root2.entanglements[spawnedLaneIndex] | 1073741824 | entangledLanes & 261930;
1497 }
1498 function markRootEntangled(root2, entangledLanes) {
1499 var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
1500 for (root2 = root2.entanglements; rootEntangledLanes; ) {
1501 var index = 31 - clz32(rootEntangledLanes), lane = 1 << index;
1502 lane & entangledLanes | root2[index] & entangledLanes && (root2[index] |= entangledLanes);
1503 rootEntangledLanes &= ~lane;
1504 }
1505 }
1506 function getBumpedLaneForHydration(root2, renderLanes2) {
1507 var renderLane = renderLanes2 & -renderLanes2;
1508 renderLane = 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);
1509 return 0 !== (renderLane & (root2.suspendedLanes | renderLanes2)) ? 0 : renderLane;
1510 }
1511 function getBumpedLaneForHydrationByLane(lane) {
1512 switch (lane) {
1513 case 2:
1514 lane = 1;
1515 break;
1516 case 8:
1517 lane = 4;
1518 break;
1519 case 32:
1520 lane = 16;
1521 break;
1522 case 256:
1523 case 512:
1524 case 1024:
1525 case 2048:
1526 case 4096:
1527 case 8192:
1528 case 16384:
1529 case 32768:
1530 case 65536:
1531 case 131072:
1532 case 262144:
1533 case 524288:
1534 case 1048576:
1535 case 2097152:
1536 case 4194304:
1537 case 8388608:
1538 case 16777216:
1539 case 33554432:
1540 lane = 128;
1541 break;
1542 case 268435456:
1543 lane = 134217728;
1544 break;
1545 default:
1546 lane = 0;
1547 }
1548 return lane;
1549 }
1550 function addFiberToLanesMap(root2, fiber, lanes) {
1551 if (isDevToolsPresent)
1552 for (root2 = root2.pendingUpdatersLaneMap; 0 < lanes; ) {
1553 var index = 31 - clz32(lanes), lane = 1 << index;
1554 root2[index].add(fiber);
1555 lanes &= ~lane;
1556 }
1557 }
1558 function movePendingFibersToMemoized(root2, lanes) {
1559 if (isDevToolsPresent)
1560 for (var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap, memoizedUpdaters = root2.memoizedUpdaters; 0 < lanes; ) {
1561 var index = 31 - clz32(lanes);
1562 root2 = 1 << index;
1563 index = pendingUpdatersLaneMap[index];
1564 0 < index.size && (index.forEach(function(fiber) {
1565 var alternate = fiber.alternate;
1566 null !== alternate && memoizedUpdaters.has(alternate) || memoizedUpdaters.add(fiber);
1567 }), index.clear());
1568 lanes &= ~root2;
1569 }
1570 }
1571 function lanesToEventPriority(lanes) {
1572 lanes &= -lanes;
1573 return 0 !== DiscreteEventPriority && DiscreteEventPriority < lanes ? 0 !== ContinuousEventPriority && ContinuousEventPriority < lanes ? 0 !== (lanes & 134217727) ? DefaultEventPriority : IdleEventPriority : ContinuousEventPriority : DiscreteEventPriority;
1574 }
1575 function resolveUpdatePriority() {
1576 var updatePriority = ReactDOMSharedInternals.p;
1577 if (0 !== updatePriority) return updatePriority;
1578 updatePriority = window.event;
1579 return void 0 === updatePriority ? DefaultEventPriority : getEventPriority(updatePriority.type);
1580 }
1581 function runWithPriority(priority, fn) {
1582 var previousPriority = ReactDOMSharedInternals.p;
1583 try {
1584 return ReactDOMSharedInternals.p = priority, fn();
1585 } finally {
1586 ReactDOMSharedInternals.p = previousPriority;
1587 }
1588 }
1589 function detachDeletedInstance(node) {
1590 delete node[internalInstanceKey];
1591 delete node[internalPropsKey];
1592 delete node[internalEventHandlersKey];
1593 delete node[internalEventHandlerListenersKey];
1594 delete node[internalEventHandlesSetKey];
1595 }
1596 function getClosestInstanceFromNode(targetNode) {
1597 var targetInst = targetNode[internalInstanceKey];
1598 if (targetInst) return targetInst;
1599 for (var parentNode = targetNode.parentNode; parentNode; ) {
1600 if (targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey]) {
1601 parentNode = targetInst.alternate;
1602 if (null !== targetInst.child || null !== parentNode && null !== parentNode.child)
1603 for (targetNode = getParentHydrationBoundary(targetNode); null !== targetNode; ) {
1604 if (parentNode = targetNode[internalInstanceKey])
1605 return parentNode;
1606 targetNode = getParentHydrationBoundary(targetNode);
1607 }
1608 return targetInst;
1609 }
1610 targetNode = parentNode;
1611 parentNode = targetNode.parentNode;
1612 }
1613 return null;
1614 }
1615 function getInstanceFromNode(node) {
1616 if (node = node[internalInstanceKey] || node[internalContainerInstanceKey]) {
1617 var tag = node.tag;
1618 if (5 === tag || 6 === tag || 13 === tag || 31 === tag || 26 === tag || 27 === tag || 3 === tag)
1619 return node;
1620 }
1621 return null;
1622 }
1623 function getNodeFromInstance(inst) {
1624 var tag = inst.tag;
1625 if (5 === tag || 26 === tag || 27 === tag || 6 === tag)
1626 return inst.stateNode;
1627 throw Error("getNodeFromInstance: Invalid argument.");
1628 }
1629 function getResourcesFromRoot(root2) {
1630 var resources = root2[internalRootNodeResourcesKey];
1631 resources || (resources = root2[internalRootNodeResourcesKey] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() });
1632 return resources;
1633 }
1634 function markNodeAsHoistable(node) {
1635 node[internalHoistableMarker] = true;
1636 }
1637 function registerTwoPhaseEvent(registrationName, dependencies) {
1638 registerDirectEvent(registrationName, dependencies);
1639 registerDirectEvent(registrationName + "Capture", dependencies);
1640 }
1641 function registerDirectEvent(registrationName, dependencies) {
1642 registrationNameDependencies[registrationName] && console.error(
1643 "EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",
1644 registrationName
1645 );
1646 registrationNameDependencies[registrationName] = dependencies;
1647 var lowerCasedName = registrationName.toLowerCase();
1648 possibleRegistrationNames[lowerCasedName] = registrationName;
1649 "onDoubleClick" === registrationName && (possibleRegistrationNames.ondblclick = registrationName);
1650 for (registrationName = 0; registrationName < dependencies.length; registrationName++)
1651 allNativeEvents.add(dependencies[registrationName]);
1652 }
1653 function checkControlledValueProps(tagName, props) {
1654 hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || null == props.value || ("select" === tagName ? console.error(
1655 "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`."
1656 ) : console.error(
1657 "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`."
1658 ));
1659 props.onChange || props.readOnly || props.disabled || null == props.checked || console.error(
1660 "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`."
1661 );
1662 }
1663 function isAttributeNameSafe(attributeName) {
1664 if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))
1665 return true;
1666 if (hasOwnProperty.call(illegalAttributeNameCache, attributeName))
1667 return false;
1668 if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))
1669 return validatedAttributeNameCache[attributeName] = true;
1670 illegalAttributeNameCache[attributeName] = true;
1671 console.error("Invalid attribute name: `%s`", attributeName);
1672 return false;
1673 }
1674 function getValueForAttributeOnCustomComponent(node, name, expected) {
1675 if (isAttributeNameSafe(name)) {
1676 if (!node.hasAttribute(name)) {
1677 switch (typeof expected) {
1678 case "symbol":
1679 case "object":
1680 return expected;
1681 case "function":
1682 return expected;
1683 case "boolean":
1684 if (false === expected) return expected;
1685 }
1686 return void 0 === expected ? void 0 : null;
1687 }
1688 node = node.getAttribute(name);
1689 if ("" === node && true === expected) return true;
1690 checkAttributeStringCoercion(expected, name);
1691 return node === "" + expected ? expected : node;
1692 }
1693 }
1694 function setValueForAttribute(node, name, value) {
1695 if (isAttributeNameSafe(name))
1696 if (null === value) node.removeAttribute(name);
1697 else {
1698 switch (typeof value) {
1699 case "undefined":
1700 case "function":
1701 case "symbol":
1702 node.removeAttribute(name);
1703 return;
1704 case "boolean":
1705 var prefix2 = name.toLowerCase().slice(0, 5);
1706 if ("data-" !== prefix2 && "aria-" !== prefix2) {
1707 node.removeAttribute(name);
1708 return;
1709 }
1710 }
1711 checkAttributeStringCoercion(value, name);
1712 node.setAttribute(name, "" + value);
1713 }
1714 }
1715 function setValueForKnownAttribute(node, name, value) {
1716 if (null === value) node.removeAttribute(name);
1717 else {
1718 switch (typeof value) {
1719 case "undefined":
1720 case "function":
1721 case "symbol":
1722 case "boolean":
1723 node.removeAttribute(name);
1724 return;
1725 }
1726 checkAttributeStringCoercion(value, name);
1727 node.setAttribute(name, "" + value);
1728 }
1729 }
1730 function setValueForNamespacedAttribute(node, namespace, name, value) {
1731 if (null === value) node.removeAttribute(name);
1732 else {
1733 switch (typeof value) {
1734 case "undefined":
1735 case "function":
1736 case "symbol":
1737 case "boolean":
1738 node.removeAttribute(name);
1739 return;
1740 }
1741 checkAttributeStringCoercion(value, name);
1742 node.setAttributeNS(namespace, name, "" + value);
1743 }
1744 }
1745 function getToStringValue(value) {
1746 switch (typeof value) {
1747 case "bigint":
1748 case "boolean":
1749 case "number":
1750 case "string":
1751 case "undefined":
1752 return value;
1753 case "object":
1754 return checkFormFieldValueStringCoercion(value), value;
1755 default:
1756 return "";
1757 }
1758 }
1759 function isCheckable(elem) {
1760 var type = elem.type;
1761 return (elem = elem.nodeName) && "input" === elem.toLowerCase() && ("checkbox" === type || "radio" === type);
1762 }
1763 function trackValueOnNode(node, valueField, currentValue) {
1764 var descriptor = Object.getOwnPropertyDescriptor(
1765 node.constructor.prototype,
1766 valueField
1767 );
1768 if (!node.hasOwnProperty(valueField) && "undefined" !== typeof descriptor && "function" === typeof descriptor.get && "function" === typeof descriptor.set) {
1769 var get = descriptor.get, set = descriptor.set;
1770 Object.defineProperty(node, valueField, {
1771 configurable: true,
1772 get: function() {
1773 return get.call(this);
1774 },
1775 set: function(value) {
1776 checkFormFieldValueStringCoercion(value);
1777 currentValue = "" + value;
1778 set.call(this, value);
1779 }
1780 });
1781 Object.defineProperty(node, valueField, {
1782 enumerable: descriptor.enumerable
1783 });
1784 return {
1785 getValue: function() {
1786 return currentValue;
1787 },
1788 setValue: function(value) {
1789 checkFormFieldValueStringCoercion(value);
1790 currentValue = "" + value;
1791 },
1792 stopTracking: function() {
1793 node._valueTracker = null;
1794 delete node[valueField];
1795 }
1796 };
1797 }
1798 }
1799 function track(node) {
1800 if (!node._valueTracker) {
1801 var valueField = isCheckable(node) ? "checked" : "value";
1802 node._valueTracker = trackValueOnNode(
1803 node,
1804 valueField,
1805 "" + node[valueField]
1806 );
1807 }
1808 }
1809 function updateValueIfChanged(node) {
1810 if (!node) return false;
1811 var tracker = node._valueTracker;
1812 if (!tracker) return true;
1813 var lastValue = tracker.getValue();
1814 var value = "";
1815 node && (value = isCheckable(node) ? node.checked ? "true" : "false" : node.value);
1816 node = value;
1817 return node !== lastValue ? (tracker.setValue(node), true) : false;
1818 }
1819 function getActiveElement(doc) {
1820 doc = doc || ("undefined" !== typeof document ? document : void 0);
1821 if ("undefined" === typeof doc) return null;
1822 try {
1823 return doc.activeElement || doc.body;
1824 } catch (e) {
1825 return doc.body;
1826 }
1827 }
1828 function escapeSelectorAttributeValueInsideDoubleQuotes(value) {
1829 return value.replace(
1830 escapeSelectorAttributeValueInsideDoubleQuotesRegex,
1831 function(ch) {
1832 return "\\" + ch.charCodeAt(0).toString(16) + " ";
1833 }
1834 );
1835 }
1836 function validateInputProps(element, props) {
1837 void 0 === props.checked || void 0 === props.defaultChecked || didWarnCheckedDefaultChecked || (console.error(
1838 "%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",
1839 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1840 props.type
1841 ), didWarnCheckedDefaultChecked = true);
1842 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue$1 || (console.error(
1843 "%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",
1844 getCurrentFiberOwnerNameInDevOrNull() || "A component",
1845 props.type
1846 ), didWarnValueDefaultValue$1 = true);
1847 }
1848 function updateInput(element, value, defaultValue, lastDefaultValue, checked, defaultChecked, type, name) {
1849 element.name = "";
1850 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type ? (checkAttributeStringCoercion(type, "type"), element.type = type) : element.removeAttribute("type");
1851 if (null != value)
1852 if ("number" === type) {
1853 if (0 === value && "" === element.value || element.value != value)
1854 element.value = "" + getToStringValue(value);
1855 } else
1856 element.value !== "" + getToStringValue(value) && (element.value = "" + getToStringValue(value));
1857 else
1858 "submit" !== type && "reset" !== type || element.removeAttribute("value");
1859 null != value ? setDefaultValue(element, type, getToStringValue(value)) : null != defaultValue ? setDefaultValue(element, type, getToStringValue(defaultValue)) : null != lastDefaultValue && element.removeAttribute("value");
1860 null == checked && null != defaultChecked && (element.defaultChecked = !!defaultChecked);
1861 null != checked && (element.checked = checked && "function" !== typeof checked && "symbol" !== typeof checked);
1862 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name ? (checkAttributeStringCoercion(name, "name"), element.name = "" + getToStringValue(name)) : element.removeAttribute("name");
1863 }
1864 function initInput(element, value, defaultValue, checked, defaultChecked, type, name, isHydrating2) {
1865 null != type && "function" !== typeof type && "symbol" !== typeof type && "boolean" !== typeof type && (checkAttributeStringCoercion(type, "type"), element.type = type);
1866 if (null != value || null != defaultValue) {
1867 if (!("submit" !== type && "reset" !== type || void 0 !== value && null !== value)) {
1868 track(element);
1869 return;
1870 }
1871 defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1872 value = null != value ? "" + getToStringValue(value) : defaultValue;
1873 isHydrating2 || value === element.value || (element.value = value);
1874 element.defaultValue = value;
1875 }
1876 checked = null != checked ? checked : defaultChecked;
1877 checked = "function" !== typeof checked && "symbol" !== typeof checked && !!checked;
1878 element.checked = isHydrating2 ? element.checked : !!checked;
1879 element.defaultChecked = !!checked;
1880 null != name && "function" !== typeof name && "symbol" !== typeof name && "boolean" !== typeof name && (checkAttributeStringCoercion(name, "name"), element.name = name);
1881 track(element);
1882 }
1883 function setDefaultValue(node, type, value) {
1884 "number" === type && getActiveElement(node.ownerDocument) === node || node.defaultValue === "" + value || (node.defaultValue = "" + value);
1885 }
1886 function validateOptionProps(element, props) {
1887 null == props.value && ("object" === typeof props.children && null !== props.children ? React.Children.forEach(props.children, function(child) {
1888 null == child || "string" === typeof child || "number" === typeof child || "bigint" === typeof child || didWarnInvalidChild || (didWarnInvalidChild = true, console.error(
1889 "Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."
1890 ));
1891 }) : null == props.dangerouslySetInnerHTML || didWarnInvalidInnerHTML || (didWarnInvalidInnerHTML = true, console.error(
1892 "Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."
1893 )));
1894 null == props.selected || didWarnSelectedSetOnOption || (console.error(
1895 "Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."
1896 ), didWarnSelectedSetOnOption = true);
1897 }
1898 function getDeclarationErrorAddendum() {
1899 var ownerName = getCurrentFiberOwnerNameInDevOrNull();
1900 return ownerName ? "\n\nCheck the render method of `" + ownerName + "`." : "";
1901 }
1902 function updateOptions(node, multiple, propValue, setDefaultSelected) {
1903 node = node.options;
1904 if (multiple) {
1905 multiple = {};
1906 for (var i = 0; i < propValue.length; i++)
1907 multiple["$" + propValue[i]] = true;
1908 for (propValue = 0; propValue < node.length; propValue++)
1909 i = multiple.hasOwnProperty("$" + node[propValue].value), node[propValue].selected !== i && (node[propValue].selected = i), i && setDefaultSelected && (node[propValue].defaultSelected = true);
1910 } else {
1911 propValue = "" + getToStringValue(propValue);
1912 multiple = null;
1913 for (i = 0; i < node.length; i++) {
1914 if (node[i].value === propValue) {
1915 node[i].selected = true;
1916 setDefaultSelected && (node[i].defaultSelected = true);
1917 return;
1918 }
1919 null !== multiple || node[i].disabled || (multiple = node[i]);
1920 }
1921 null !== multiple && (multiple.selected = true);
1922 }
1923 }
1924 function validateSelectProps(element, props) {
1925 for (element = 0; element < valuePropNames.length; element++) {
1926 var propName = valuePropNames[element];
1927 if (null != props[propName]) {
1928 var propNameIsArray = isArrayImpl(props[propName]);
1929 props.multiple && !propNameIsArray ? console.error(
1930 "The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",
1931 propName,
1932 getDeclarationErrorAddendum()
1933 ) : !props.multiple && propNameIsArray && console.error(
1934 "The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",
1935 propName,
1936 getDeclarationErrorAddendum()
1937 );
1938 }
1939 }
1940 void 0 === props.value || void 0 === props.defaultValue || didWarnValueDefaultValue || (console.error(
1941 "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"
1942 ), didWarnValueDefaultValue = true);
1943 }
1944 function validateTextareaProps(element, props) {
1945 void 0 === props.value || void 0 === props.defaultValue || didWarnValDefaultVal || (console.error(
1946 "%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",
1947 getCurrentFiberOwnerNameInDevOrNull() || "A component"
1948 ), didWarnValDefaultVal = true);
1949 null != props.children && null == props.value && console.error(
1950 "Use the `defaultValue` or `value` props instead of setting children on <textarea>."
1951 );
1952 }
1953 function updateTextarea(element, value, defaultValue) {
1954 if (null != value && (value = "" + getToStringValue(value), value !== element.value && (element.value = value), null == defaultValue)) {
1955 element.defaultValue !== value && (element.defaultValue = value);
1956 return;
1957 }
1958 element.defaultValue = null != defaultValue ? "" + getToStringValue(defaultValue) : "";
1959 }
1960 function initTextarea(element, value, defaultValue, children) {
1961 if (null == value) {
1962 if (null != children) {
1963 if (null != defaultValue)
1964 throw Error(
1965 "If you supply `defaultValue` on a <textarea>, do not pass children."
1966 );
1967 if (isArrayImpl(children)) {
1968 if (1 < children.length)
1969 throw Error("<textarea> can only have at most one child.");
1970 children = children[0];
1971 }
1972 defaultValue = children;
1973 }
1974 null == defaultValue && (defaultValue = "");
1975 value = defaultValue;
1976 }
1977 defaultValue = getToStringValue(value);
1978 element.defaultValue = defaultValue;
1979 children = element.textContent;
1980 children === defaultValue && "" !== children && null !== children && (element.value = children);
1981 track(element);
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 31:
2004 return "Activity";
2005 case 13:
2006 return "Suspense";
2007 case 19:
2008 return "SuspenseList";
2009 case 0:
2010 case 15:
2011 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2012 case 11:
2013 return fiber = fiber.type.render, fiber.displayName || fiber.name || null;
2014 case 1:
2015 return fiber = fiber.type, fiber.displayName || fiber.name || null;
2016 default:
2017 return null;
2018 }
2019 }
2020 function describeTextNode(content, maxLength) {
2021 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;
2022 }
2023 function describeTextDiff(clientText, serverProps, indent) {
2024 var maxLength = 120 - 2 * indent;
2025 if (null === serverProps)
2026 return added(indent) + describeTextNode(clientText, maxLength) + "\n";
2027 if ("string" === typeof serverProps) {
2028 for (var firstDiff = 0; firstDiff < serverProps.length && firstDiff < clientText.length && serverProps.charCodeAt(firstDiff) === clientText.charCodeAt(firstDiff); firstDiff++) ;
2029 firstDiff > maxLength - 8 && 10 < firstDiff && (clientText = "..." + clientText.slice(firstDiff - 8), serverProps = "..." + serverProps.slice(firstDiff - 8));
2030 return added(indent) + describeTextNode(clientText, maxLength) + "\n" + removed(indent) + describeTextNode(serverProps, maxLength) + "\n";
2031 }
2032 return indentation(indent) + describeTextNode(clientText, maxLength) + "\n";
2033 }
2034 function objectName(object) {
2035 return Object.prototype.toString.call(object).replace(/^\[object (.*)\]$/, function(m, p0) {
2036 return p0;
2037 });
2038 }
2039 function describeValue(value, maxLength) {
2040 switch (typeof value) {
2041 case "string":
2042 return value = JSON.stringify(value), value.length > maxLength ? 5 > maxLength ? '"..."' : value.slice(0, maxLength - 4) + '..."' : value;
2043 case "object":
2044 if (null === value) return "null";
2045 if (isArrayImpl(value)) return "[...]";
2046 if (value.$$typeof === REACT_ELEMENT_TYPE)
2047 return (maxLength = getComponentNameFromType(value.type)) ? "<" + maxLength + ">" : "<...>";
2048 var name = objectName(value);
2049 if ("Object" === name) {
2050 name = "";
2051 maxLength -= 2;
2052 for (var propName in value)
2053 if (value.hasOwnProperty(propName)) {
2054 var jsonPropName = JSON.stringify(propName);
2055 jsonPropName !== '"' + propName + '"' && (propName = jsonPropName);
2056 maxLength -= propName.length - 2;
2057 jsonPropName = describeValue(
2058 value[propName],
2059 15 > maxLength ? maxLength : 15
2060 );
2061 maxLength -= jsonPropName.length;
2062 if (0 > maxLength) {
2063 name += "" === name ? "..." : ", ...";
2064 break;
2065 }
2066 name += ("" === name ? "" : ",") + propName + ":" + jsonPropName;
2067 }
2068 return "{" + name + "}";
2069 }
2070 return name;
2071 case "function":
2072 return (maxLength = value.displayName || value.name) ? "function " + maxLength : "function";
2073 default:
2074 return String(value);
2075 }
2076 }
2077 function describePropValue(value, maxLength) {
2078 return "string" !== typeof value || needsEscaping.test(value) ? "{" + describeValue(value, maxLength - 2) + "}" : value.length > maxLength - 2 ? 5 > maxLength ? '"..."' : '"' + value.slice(0, maxLength - 5) + '..."' : '"' + value + '"';
2079 }
2080 function describeExpandedElement(type, props, rowPrefix) {
2081 var remainingRowLength = 120 - rowPrefix.length - type.length, properties = [], propName;
2082 for (propName in props)
2083 if (props.hasOwnProperty(propName) && "children" !== propName) {
2084 var propValue = describePropValue(
2085 props[propName],
2086 120 - rowPrefix.length - propName.length - 1
2087 );
2088 remainingRowLength -= propName.length + propValue.length + 2;
2089 properties.push(propName + "=" + propValue);
2090 }
2091 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";
2092 }
2093 function describePropertiesDiff(clientObject, serverObject, indent) {
2094 var properties = "", remainingServerProperties = assign({}, serverObject), propName;
2095 for (propName in clientObject)
2096 if (clientObject.hasOwnProperty(propName)) {
2097 delete remainingServerProperties[propName];
2098 var maxLength = 120 - 2 * indent - propName.length - 2, clientPropValue = describeValue(clientObject[propName], maxLength);
2099 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";
2100 }
2101 for (var _propName in remainingServerProperties)
2102 remainingServerProperties.hasOwnProperty(_propName) && (clientObject = describeValue(
2103 remainingServerProperties[_propName],
2104 120 - 2 * indent - _propName.length - 2
2105 ), properties += removed(indent) + _propName + ": " + clientObject + "\n");
2106 return properties;
2107 }
2108 function describeElementDiff(type, clientProps, serverProps, indent) {
2109 var content = "", serverPropNames = /* @__PURE__ */ new Map();
2110 for (propName$jscomp$0 in serverProps)
2111 serverProps.hasOwnProperty(propName$jscomp$0) && serverPropNames.set(
2112 propName$jscomp$0.toLowerCase(),
2113 propName$jscomp$0
2114 );
2115 if (1 === serverPropNames.size && serverPropNames.has("children"))
2116 content += describeExpandedElement(
2117 type,
2118 clientProps,
2119 indentation(indent)
2120 );
2121 else {
2122 for (var _propName2 in clientProps)
2123 if (clientProps.hasOwnProperty(_propName2) && "children" !== _propName2) {
2124 var maxLength$jscomp$0 = 120 - 2 * (indent + 1) - _propName2.length - 1, serverPropName = serverPropNames.get(_propName2.toLowerCase());
2125 if (void 0 !== serverPropName) {
2126 serverPropNames.delete(_propName2.toLowerCase());
2127 var propName$jscomp$0 = clientProps[_propName2];
2128 serverPropName = serverProps[serverPropName];
2129 var clientPropValue = describePropValue(
2130 propName$jscomp$0,
2131 maxLength$jscomp$0
2132 );
2133 maxLength$jscomp$0 = describePropValue(
2134 serverPropName,
2135 maxLength$jscomp$0
2136 );
2137 "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(
2138 propName$jscomp$0,
2139 serverPropName,
2140 indent + 2
2141 ) + indentation(indent + 1) + "}}\n" : (content += added(indent + 1) + _propName2 + "=" + clientPropValue + "\n", content += removed(indent + 1) + _propName2 + "=" + maxLength$jscomp$0 + "\n");
2142 } else
2143 content += indentation(indent + 1) + _propName2 + "=" + describePropValue(clientProps[_propName2], maxLength$jscomp$0) + "\n";
2144 }
2145 serverPropNames.forEach(function(propName) {
2146 if ("children" !== propName) {
2147 var maxLength = 120 - 2 * (indent + 1) - propName.length - 1;
2148 content += removed(indent + 1) + propName + "=" + describePropValue(serverProps[propName], maxLength) + "\n";
2149 }
2150 });
2151 content = "" === content ? indentation(indent) + "<" + type + ">\n" : indentation(indent) + "<" + type + "\n" + content + indentation(indent) + ">\n";
2152 }
2153 type = serverProps.children;
2154 clientProps = clientProps.children;
2155 if ("string" === typeof type || "number" === typeof type || "bigint" === typeof type) {
2156 serverPropNames = "";
2157 if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2158 serverPropNames = "" + clientProps;
2159 content += describeTextDiff(serverPropNames, "" + type, indent + 1);
2160 } else if ("string" === typeof clientProps || "number" === typeof clientProps || "bigint" === typeof clientProps)
2161 content = null == type ? content + describeTextDiff("" + clientProps, null, indent + 1) : content + describeTextDiff("" + clientProps, void 0, indent + 1);
2162 return content;
2163 }
2164 function describeSiblingFiber(fiber, indent) {
2165 var type = describeFiberType(fiber);
2166 if (null === type) {
2167 type = "";
2168 for (fiber = fiber.child; fiber; )
2169 type += describeSiblingFiber(fiber, indent), fiber = fiber.sibling;
2170 return type;
2171 }
2172 return indentation(indent) + "<" + type + ">\n";
2173 }
2174 function describeNode(node, indent) {
2175 var skipToNode = findNotableNode(node, indent);
2176 if (skipToNode !== node && (1 !== node.children.length || node.children[0] !== skipToNode))
2177 return indentation(indent) + "...\n" + describeNode(skipToNode, indent + 1);
2178 skipToNode = "";
2179 var debugInfo = node.fiber._debugInfo;
2180 if (debugInfo)
2181 for (var i = 0; i < debugInfo.length; i++) {
2182 var serverComponentName = debugInfo[i].name;
2183 "string" === typeof serverComponentName && (skipToNode += indentation(indent) + "<" + serverComponentName + ">\n", indent++);
2184 }
2185 debugInfo = "";
2186 i = node.fiber.pendingProps;
2187 if (6 === node.fiber.tag)
2188 debugInfo = describeTextDiff(i, node.serverProps, indent), indent++;
2189 else if (serverComponentName = describeFiberType(node.fiber), null !== serverComponentName)
2190 if (void 0 === node.serverProps) {
2191 debugInfo = indent;
2192 var maxLength = 120 - 2 * debugInfo - serverComponentName.length - 2, content = "";
2193 for (propName in i)
2194 if (i.hasOwnProperty(propName) && "children" !== propName) {
2195 var propValue = describePropValue(i[propName], 15);
2196 maxLength -= propName.length + propValue.length + 2;
2197 if (0 > maxLength) {
2198 content += " ...";
2199 break;
2200 }
2201 content += " " + propName + "=" + propValue;
2202 }
2203 debugInfo = indentation(debugInfo) + "<" + serverComponentName + content + ">\n";
2204 indent++;
2205 } else
2206 null === node.serverProps ? (debugInfo = describeExpandedElement(
2207 serverComponentName,
2208 i,
2209 added(indent)
2210 ), indent++) : "string" === typeof node.serverProps ? console.error(
2211 "Should not have matched a non HostText fiber to a Text node. This is a bug in React."
2212 ) : (debugInfo = describeElementDiff(
2213 serverComponentName,
2214 i,
2215 node.serverProps,
2216 indent
2217 ), indent++);
2218 var propName = "";
2219 i = node.fiber.child;
2220 for (serverComponentName = 0; i && serverComponentName < node.children.length; )
2221 maxLength = node.children[serverComponentName], maxLength.fiber === i ? (propName += describeNode(maxLength, indent), serverComponentName++) : propName += describeSiblingFiber(i, indent), i = i.sibling;
2222 i && 0 < node.children.length && (propName += indentation(indent) + "...\n");
2223 i = node.serverTail;
2224 null === node.serverProps && indent--;
2225 for (node = 0; node < i.length; node++)
2226 serverComponentName = i[node], propName = "string" === typeof serverComponentName ? propName + (removed(indent) + describeTextNode(serverComponentName, 120 - 2 * indent) + "\n") : propName + describeExpandedElement(
2227 serverComponentName.type,
2228 serverComponentName.props,
2229 removed(indent)
2230 );
2231 return skipToNode + debugInfo + propName;
2232 }
2233 function describeDiff(rootNode) {
2234 try {
2235 return "\n\n" + describeNode(rootNode, 0);
2236 } catch (x) {
2237 return "";
2238 }
2239 }
2240 function describeAncestors(ancestor, child, props) {
2241 for (var fiber = child, node = null, distanceFromLeaf = 0; fiber; )
2242 fiber === ancestor && (distanceFromLeaf = 0), node = {
2243 fiber,
2244 children: null !== node ? [node] : [],
2245 serverProps: fiber === child ? props : fiber === ancestor ? null : void 0,
2246 serverTail: [],
2247 distanceFromLeaf
2248 }, distanceFromLeaf++, fiber = fiber.return;
2249 return null !== node ? describeDiff(node).replaceAll(/^[+-]/gm, ">") : "";
2250 }
2251 function updatedAncestorInfoDev(oldInfo, tag) {
2252 var ancestorInfo = assign({}, oldInfo || emptyAncestorInfoDev), info = { tag };
2253 -1 !== inScopeTags.indexOf(tag) && (ancestorInfo.aTagInScope = null, ancestorInfo.buttonTagInScope = null, ancestorInfo.nobrTagInScope = null);
2254 -1 !== buttonScopeTags.indexOf(tag) && (ancestorInfo.pTagInButtonScope = null);
2255 -1 !== specialTags.indexOf(tag) && "address" !== tag && "div" !== tag && "p" !== tag && (ancestorInfo.listItemTagAutoclosing = null, ancestorInfo.dlItemTagAutoclosing = null);
2256 ancestorInfo.current = info;
2257 "form" === tag && (ancestorInfo.formTag = info);
2258 "a" === tag && (ancestorInfo.aTagInScope = info);
2259 "button" === tag && (ancestorInfo.buttonTagInScope = info);
2260 "nobr" === tag && (ancestorInfo.nobrTagInScope = info);
2261 "p" === tag && (ancestorInfo.pTagInButtonScope = info);
2262 "li" === tag && (ancestorInfo.listItemTagAutoclosing = info);
2263 if ("dd" === tag || "dt" === tag)
2264 ancestorInfo.dlItemTagAutoclosing = info;
2265 "#document" === tag || "html" === tag ? ancestorInfo.containerTagInScope = null : ancestorInfo.containerTagInScope || (ancestorInfo.containerTagInScope = info);
2266 null !== oldInfo || "#document" !== tag && "html" !== tag && "body" !== tag ? true === ancestorInfo.implicitRootScope && (ancestorInfo.implicitRootScope = false) : ancestorInfo.implicitRootScope = true;
2267 return ancestorInfo;
2268 }
2269 function isTagValidWithParent(tag, parentTag, implicitRootScope) {
2270 switch (parentTag) {
2271 case "select":
2272 return "hr" === tag || "option" === tag || "optgroup" === tag || "script" === tag || "template" === tag || "#text" === tag;
2273 case "optgroup":
2274 return "option" === tag || "#text" === tag;
2275 case "option":
2276 return "#text" === tag;
2277 case "tr":
2278 return "th" === tag || "td" === tag || "style" === tag || "script" === tag || "template" === tag;
2279 case "tbody":
2280 case "thead":
2281 case "tfoot":
2282 return "tr" === tag || "style" === tag || "script" === tag || "template" === tag;
2283 case "colgroup":
2284 return "col" === tag || "template" === tag;
2285 case "table":
2286 return "caption" === tag || "colgroup" === tag || "tbody" === tag || "tfoot" === tag || "thead" === tag || "style" === tag || "script" === tag || "template" === tag;
2287 case "head":
2288 return "base" === tag || "basefont" === tag || "bgsound" === tag || "link" === tag || "meta" === tag || "title" === tag || "noscript" === tag || "noframes" === tag || "style" === tag || "script" === tag || "template" === tag;
2289 case "html":
2290 if (implicitRootScope) break;
2291 return "head" === tag || "body" === tag || "frameset" === tag;
2292 case "frameset":
2293 return "frame" === tag;
2294 case "#document":
2295 if (!implicitRootScope) return "html" === tag;
2296 }
2297 switch (tag) {
2298 case "h1":
2299 case "h2":
2300 case "h3":
2301 case "h4":
2302 case "h5":
2303 case "h6":
2304 return "h1" !== parentTag && "h2" !== parentTag && "h3" !== parentTag && "h4" !== parentTag && "h5" !== parentTag && "h6" !== parentTag;
2305 case "rp":
2306 case "rt":
2307 return -1 === impliedEndTags.indexOf(parentTag);
2308 case "caption":
2309 case "col":
2310 case "colgroup":
2311 case "frameset":
2312 case "frame":
2313 case "tbody":
2314 case "td":
2315 case "tfoot":
2316 case "th":
2317 case "thead":
2318 case "tr":
2319 return null == parentTag;
2320 case "head":
2321 return implicitRootScope || null === parentTag;
2322 case "html":
2323 return implicitRootScope && "#document" === parentTag || null === parentTag;
2324 case "body":
2325 return implicitRootScope && ("#document" === parentTag || "html" === parentTag) || null === parentTag;
2326 }
2327 return true;
2328 }
2329 function findInvalidAncestorForTag(tag, ancestorInfo) {
2330 switch (tag) {
2331 case "address":
2332 case "article":
2333 case "aside":
2334 case "blockquote":
2335 case "center":
2336 case "details":
2337 case "dialog":
2338 case "dir":
2339 case "div":
2340 case "dl":
2341 case "fieldset":
2342 case "figcaption":
2343 case "figure":
2344 case "footer":
2345 case "header":
2346 case "hgroup":
2347 case "main":
2348 case "menu":
2349 case "nav":
2350 case "ol":
2351 case "p":
2352 case "section":
2353 case "summary":
2354 case "ul":
2355 case "pre":
2356 case "listing":
2357 case "table":
2358 case "hr":
2359 case "xmp":
2360 case "h1":
2361 case "h2":
2362 case "h3":
2363 case "h4":
2364 case "h5":
2365 case "h6":
2366 return ancestorInfo.pTagInButtonScope;
2367 case "form":
2368 return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
2369 case "li":
2370 return ancestorInfo.listItemTagAutoclosing;
2371 case "dd":
2372 case "dt":
2373 return ancestorInfo.dlItemTagAutoclosing;
2374 case "button":
2375 return ancestorInfo.buttonTagInScope;
2376 case "a":
2377 return ancestorInfo.aTagInScope;
2378 case "nobr":
2379 return ancestorInfo.nobrTagInScope;
2380 }
2381 return null;
2382 }
2383 function findAncestor(parent, tagName) {
2384 for (; parent; ) {
2385 switch (parent.tag) {
2386 case 5:
2387 case 26:
2388 case 27:
2389 if (parent.type === tagName) return parent;
2390 }
2391 parent = parent.return;
2392 }
2393 return null;
2394 }
2395 function validateDOMNesting(childTag, ancestorInfo) {
2396 ancestorInfo = ancestorInfo || emptyAncestorInfoDev;
2397 var parentInfo = ancestorInfo.current;
2398 ancestorInfo = (parentInfo = isTagValidWithParent(
2399 childTag,
2400 parentInfo && parentInfo.tag,
2401 ancestorInfo.implicitRootScope
2402 ) ? null : parentInfo) ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
2403 ancestorInfo = parentInfo || ancestorInfo;
2404 if (!ancestorInfo) return true;
2405 var ancestorTag = ancestorInfo.tag;
2406 ancestorInfo = String(!!parentInfo) + "|" + childTag + "|" + ancestorTag;
2407 if (didWarn[ancestorInfo]) return false;
2408 didWarn[ancestorInfo] = true;
2409 var ancestor = (ancestorInfo = current) ? findAncestor(ancestorInfo.return, ancestorTag) : null, ancestorDescription = null !== ancestorInfo && null !== ancestor ? describeAncestors(ancestor, ancestorInfo, null) : "", tagDisplayName = "<" + childTag + ">";
2410 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(
2411 "In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s",
2412 tagDisplayName,
2413 ancestorTag,
2414 parentInfo,
2415 ancestorDescription
2416 )) : console.error(
2417 "In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s",
2418 tagDisplayName,
2419 ancestorTag,
2420 ancestorDescription
2421 );
2422 ancestorInfo && (childTag = ancestorInfo.return, null === ancestor || null === childTag || ancestor === childTag && childTag._debugOwner === ancestorInfo._debugOwner || runWithFiberInDEV(ancestor, function() {
2423 console.error(
2424 "<%s> cannot contain a nested %s.\nSee this log for the ancestor stack trace.",
2425 ancestorTag,
2426 tagDisplayName
2427 );
2428 }));
2429 return false;
2430 }
2431 function validateTextNesting(childText, parentTag, implicitRootScope) {
2432 if (implicitRootScope || isTagValidWithParent("#text", parentTag, false))
2433 return true;
2434 implicitRootScope = "#text|" + parentTag;
2435 if (didWarn[implicitRootScope]) return false;
2436 didWarn[implicitRootScope] = true;
2437 var ancestor = (implicitRootScope = current) ? findAncestor(implicitRootScope, parentTag) : null;
2438 implicitRootScope = null !== implicitRootScope && null !== ancestor ? describeAncestors(
2439 ancestor,
2440 implicitRootScope,
2441 6 !== implicitRootScope.tag ? { children: null } : null
2442 ) : "";
2443 /\S/.test(childText) ? console.error(
2444 "In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.%s",
2445 parentTag,
2446 implicitRootScope
2447 ) : console.error(
2448 "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",
2449 parentTag,
2450 implicitRootScope
2451 );
2452 return false;
2453 }
2454 function setTextContent(node, text) {
2455 if (text) {
2456 var firstChild = node.firstChild;
2457 if (firstChild && firstChild === node.lastChild && 3 === firstChild.nodeType) {
2458 firstChild.nodeValue = text;
2459 return;
2460 }
2461 }
2462 node.textContent = text;
2463 }
2464 function camelize(string) {
2465 return string.replace(hyphenPattern, function(_, character) {
2466 return character.toUpperCase();
2467 });
2468 }
2469 function setValueForStyle(style2, styleName, value) {
2470 var isCustomProperty = 0 === styleName.indexOf("--");
2471 isCustomProperty || (-1 < styleName.indexOf("-") ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2472 "Unsupported style property %s. Did you mean %s?",
2473 styleName,
2474 camelize(styleName.replace(msPattern, "ms-"))
2475 )) : badVendoredStyleNamePattern.test(styleName) ? warnedStyleNames.hasOwnProperty(styleName) && warnedStyleNames[styleName] || (warnedStyleNames[styleName] = true, console.error(
2476 "Unsupported vendor-prefixed style property %s. Did you mean %s?",
2477 styleName,
2478 styleName.charAt(0).toUpperCase() + styleName.slice(1)
2479 )) : !badStyleValueWithSemicolonPattern.test(value) || warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value] || (warnedStyleValues[value] = true, console.error(
2480 `Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,
2481 styleName,
2482 value.replace(badStyleValueWithSemicolonPattern, "")
2483 )), "number" === typeof value && (isNaN(value) ? warnedForNaNValue || (warnedForNaNValue = true, console.error(
2484 "`NaN` is an invalid value for the `%s` css style property.",
2485 styleName
2486 )) : isFinite(value) || warnedForInfinityValue || (warnedForInfinityValue = true, console.error(
2487 "`Infinity` is an invalid value for the `%s` css style property.",
2488 styleName
2489 ))));
2490 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";
2491 }
2492 function setValueForStyles(node, styles, prevStyles) {
2493 if (null != styles && "object" !== typeof styles)
2494 throw Error(
2495 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
2496 );
2497 styles && Object.freeze(styles);
2498 node = node.style;
2499 if (null != prevStyles) {
2500 if (styles) {
2501 var expandedUpdates = {};
2502 if (prevStyles) {
2503 for (var key in prevStyles)
2504 if (prevStyles.hasOwnProperty(key) && !styles.hasOwnProperty(key))
2505 for (var longhands = shorthandToLonghand[key] || [key], i = 0; i < longhands.length; i++)
2506 expandedUpdates[longhands[i]] = key;
2507 }
2508 for (var _key in styles)
2509 if (styles.hasOwnProperty(_key) && (!prevStyles || prevStyles[_key] !== styles[_key]))
2510 for (key = shorthandToLonghand[_key] || [_key], longhands = 0; longhands < key.length; longhands++)
2511 expandedUpdates[key[longhands]] = _key;
2512 _key = {};
2513 for (var key$jscomp$0 in styles)
2514 for (key = shorthandToLonghand[key$jscomp$0] || [key$jscomp$0], longhands = 0; longhands < key.length; longhands++)
2515 _key[key[longhands]] = key$jscomp$0;
2516 key$jscomp$0 = {};
2517 for (var _key2 in expandedUpdates)
2518 if (key = expandedUpdates[_key2], (longhands = _key[_key2]) && key !== longhands && (i = key + "," + longhands, !key$jscomp$0[i])) {
2519 key$jscomp$0[i] = true;
2520 i = console;
2521 var value = styles[key];
2522 i.error.call(
2523 i,
2524 "%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.",
2525 null == value || "boolean" === typeof value || "" === value ? "Removing" : "Updating",
2526 key,
2527 longhands
2528 );
2529 }
2530 }
2531 for (var styleName in prevStyles)
2532 !prevStyles.hasOwnProperty(styleName) || null != styles && styles.hasOwnProperty(styleName) || (0 === styleName.indexOf("--") ? node.setProperty(styleName, "") : "float" === styleName ? node.cssFloat = "" : node[styleName] = "");
2533 for (var _styleName in styles)
2534 _key2 = styles[_styleName], styles.hasOwnProperty(_styleName) && prevStyles[_styleName] !== _key2 && setValueForStyle(node, _styleName, _key2);
2535 } else
2536 for (expandedUpdates in styles)
2537 styles.hasOwnProperty(expandedUpdates) && setValueForStyle(node, expandedUpdates, styles[expandedUpdates]);
2538 }
2539 function isCustomElement(tagName) {
2540 if (-1 === tagName.indexOf("-")) return false;
2541 switch (tagName) {
2542 case "annotation-xml":
2543 case "color-profile":
2544 case "font-face":
2545 case "font-face-src":
2546 case "font-face-uri":
2547 case "font-face-format":
2548 case "font-face-name":
2549 case "missing-glyph":
2550 return false;
2551 default:
2552 return true;
2553 }
2554 }
2555 function getAttributeAlias(name) {
2556 return aliases.get(name) || name;
2557 }
2558 function validateProperty$1(tagName, name) {
2559 if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name])
2560 return true;
2561 if (rARIACamel$1.test(name)) {
2562 tagName = "aria-" + name.slice(4).toLowerCase();
2563 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2564 if (null == tagName)
2565 return console.error(
2566 "Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",
2567 name
2568 ), warnedProperties$1[name] = true;
2569 if (name !== tagName)
2570 return console.error(
2571 "Invalid ARIA attribute `%s`. Did you mean `%s`?",
2572 name,
2573 tagName
2574 ), warnedProperties$1[name] = true;
2575 }
2576 if (rARIA$1.test(name)) {
2577 tagName = name.toLowerCase();
2578 tagName = ariaProperties.hasOwnProperty(tagName) ? tagName : null;
2579 if (null == tagName) return warnedProperties$1[name] = true, false;
2580 name !== tagName && (console.error(
2581 "Unknown ARIA attribute `%s`. Did you mean `%s`?",
2582 name,
2583 tagName
2584 ), warnedProperties$1[name] = true);
2585 }
2586 return true;
2587 }
2588 function validateProperties$2(type, props) {
2589 var invalidProps = [], key;
2590 for (key in props)
2591 validateProperty$1(type, key) || invalidProps.push(key);
2592 props = invalidProps.map(function(prop) {
2593 return "`" + prop + "`";
2594 }).join(", ");
2595 1 === invalidProps.length ? console.error(
2596 "Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2597 props,
2598 type
2599 ) : 1 < invalidProps.length && console.error(
2600 "Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",
2601 props,
2602 type
2603 );
2604 }
2605 function validateProperty(tagName, name, value, eventRegistry) {
2606 if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name])
2607 return true;
2608 var lowerCasedName = name.toLowerCase();
2609 if ("onfocusin" === lowerCasedName || "onfocusout" === lowerCasedName)
2610 return console.error(
2611 "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."
2612 ), warnedProperties[name] = true;
2613 if ("function" === typeof value && ("form" === tagName && "action" === name || "input" === tagName && "formAction" === name || "button" === tagName && "formAction" === name))
2614 return true;
2615 if (null != eventRegistry) {
2616 tagName = eventRegistry.possibleRegistrationNames;
2617 if (eventRegistry.registrationNameDependencies.hasOwnProperty(name))
2618 return true;
2619 eventRegistry = tagName.hasOwnProperty(lowerCasedName) ? tagName[lowerCasedName] : null;
2620 if (null != eventRegistry)
2621 return console.error(
2622 "Invalid event handler property `%s`. Did you mean `%s`?",
2623 name,
2624 eventRegistry
2625 ), warnedProperties[name] = true;
2626 if (EVENT_NAME_REGEX.test(name))
2627 return console.error(
2628 "Unknown event handler property `%s`. It will be ignored.",
2629 name
2630 ), warnedProperties[name] = true;
2631 } else if (EVENT_NAME_REGEX.test(name))
2632 return INVALID_EVENT_NAME_REGEX.test(name) && console.error(
2633 "Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",
2634 name
2635 ), warnedProperties[name] = true;
2636 if (rARIA.test(name) || rARIACamel.test(name)) return true;
2637 if ("innerhtml" === lowerCasedName)
2638 return console.error(
2639 "Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."
2640 ), warnedProperties[name] = true;
2641 if ("aria" === lowerCasedName)
2642 return console.error(
2643 "The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."
2644 ), warnedProperties[name] = true;
2645 if ("is" === lowerCasedName && null !== value && void 0 !== value && "string" !== typeof value)
2646 return console.error(
2647 "Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",
2648 typeof value
2649 ), warnedProperties[name] = true;
2650 if ("number" === typeof value && isNaN(value))
2651 return console.error(
2652 "Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",
2653 name
2654 ), warnedProperties[name] = true;
2655 if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
2656 if (lowerCasedName = possibleStandardNames[lowerCasedName], lowerCasedName !== name)
2657 return console.error(
2658 "Invalid DOM property `%s`. Did you mean `%s`?",
2659 name,
2660 lowerCasedName
2661 ), warnedProperties[name] = true;
2662 } else if (name !== lowerCasedName)
2663 return console.error(
2664 "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.",
2665 name,
2666 lowerCasedName
2667 ), warnedProperties[name] = true;
2668 switch (name) {
2669 case "dangerouslySetInnerHTML":
2670 case "children":
2671 case "style":
2672 case "suppressContentEditableWarning":
2673 case "suppressHydrationWarning":
2674 case "defaultValue":
2675 case "defaultChecked":
2676 case "innerHTML":
2677 case "ref":
2678 return true;
2679 case "innerText":
2680 case "textContent":
2681 return true;
2682 }
2683 switch (typeof value) {
2684 case "boolean":
2685 switch (name) {
2686 case "autoFocus":
2687 case "checked":
2688 case "multiple":
2689 case "muted":
2690 case "selected":
2691 case "contentEditable":
2692 case "spellCheck":
2693 case "draggable":
2694 case "value":
2695 case "autoReverse":
2696 case "externalResourcesRequired":
2697 case "focusable":
2698 case "preserveAlpha":
2699 case "allowFullScreen":
2700 case "async":
2701 case "autoPlay":
2702 case "controls":
2703 case "default":
2704 case "defer":
2705 case "disabled":
2706 case "disablePictureInPicture":
2707 case "disableRemotePlayback":
2708 case "formNoValidate":
2709 case "hidden":
2710 case "loop":
2711 case "noModule":
2712 case "noValidate":
2713 case "open":
2714 case "playsInline":
2715 case "readOnly":
2716 case "required":
2717 case "reversed":
2718 case "scoped":
2719 case "seamless":
2720 case "itemScope":
2721 case "capture":
2722 case "download":
2723 case "inert":
2724 return true;
2725 default:
2726 lowerCasedName = name.toLowerCase().slice(0, 5);
2727 if ("data-" === lowerCasedName || "aria-" === lowerCasedName)
2728 return true;
2729 value ? console.error(
2730 '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()}.',
2731 value,
2732 name,
2733 name,
2734 value,
2735 name
2736 ) : console.error(
2737 '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.',
2738 value,
2739 name,
2740 name,
2741 value,
2742 name,
2743 name,
2744 name
2745 );
2746 return warnedProperties[name] = true;
2747 }
2748 case "function":
2749 case "symbol":
2750 return warnedProperties[name] = true, false;
2751 case "string":
2752 if ("false" === value || "true" === value) {
2753 switch (name) {
2754 case "checked":
2755 case "selected":
2756 case "multiple":
2757 case "muted":
2758 case "allowFullScreen":
2759 case "async":
2760 case "autoPlay":
2761 case "controls":
2762 case "default":
2763 case "defer":
2764 case "disabled":
2765 case "disablePictureInPicture":
2766 case "disableRemotePlayback":
2767 case "formNoValidate":
2768 case "hidden":
2769 case "loop":
2770 case "noModule":
2771 case "noValidate":
2772 case "open":
2773 case "playsInline":
2774 case "readOnly":
2775 case "required":
2776 case "reversed":
2777 case "scoped":
2778 case "seamless":
2779 case "itemScope":
2780 case "inert":
2781 break;
2782 default:
2783 return true;
2784 }
2785 console.error(
2786 "Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",
2787 value,
2788 name,
2789 "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".',
2790 name,
2791 value
2792 );
2793 warnedProperties[name] = true;
2794 }
2795 }
2796 return true;
2797 }
2798 function warnUnknownProperties(type, props, eventRegistry) {
2799 var unknownProps = [], key;
2800 for (key in props)
2801 validateProperty(type, key, props[key], eventRegistry) || unknownProps.push(key);
2802 props = unknownProps.map(function(prop) {
2803 return "`" + prop + "`";
2804 }).join(", ");
2805 1 === unknownProps.length ? console.error(
2806 "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 ",
2807 props,
2808 type
2809 ) : 1 < unknownProps.length && console.error(
2810 "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 ",
2811 props,
2812 type
2813 );
2814 }
2815 function sanitizeURL(url) {
2816 return isJavaScriptProtocol.test("" + url) ? "javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')" : url;
2817 }
2818 function noop$1() {
2819 }
2820 function getEventTarget(nativeEvent) {
2821 nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;
2822 nativeEvent.correspondingUseElement && (nativeEvent = nativeEvent.correspondingUseElement);
2823 return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;
2824 }
2825 function restoreStateOfTarget(target) {
2826 var internalInstance = getInstanceFromNode(target);
2827 if (internalInstance && (target = internalInstance.stateNode)) {
2828 var props = target[internalPropsKey] || null;
2829 a: switch (target = internalInstance.stateNode, internalInstance.type) {
2830 case "input":
2831 updateInput(
2832 target,
2833 props.value,
2834 props.defaultValue,
2835 props.defaultValue,
2836 props.checked,
2837 props.defaultChecked,
2838 props.type,
2839 props.name
2840 );
2841 internalInstance = props.name;
2842 if ("radio" === props.type && null != internalInstance) {
2843 for (props = target; props.parentNode; ) props = props.parentNode;
2844 checkAttributeStringCoercion(internalInstance, "name");
2845 props = props.querySelectorAll(
2846 'input[name="' + escapeSelectorAttributeValueInsideDoubleQuotes(
2847 "" + internalInstance
2848 ) + '"][type="radio"]'
2849 );
2850 for (internalInstance = 0; internalInstance < props.length; internalInstance++) {
2851 var otherNode = props[internalInstance];
2852 if (otherNode !== target && otherNode.form === target.form) {
2853 var otherProps = otherNode[internalPropsKey] || null;
2854 if (!otherProps)
2855 throw Error(
2856 "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported."
2857 );
2858 updateInput(
2859 otherNode,
2860 otherProps.value,
2861 otherProps.defaultValue,
2862 otherProps.defaultValue,
2863 otherProps.checked,
2864 otherProps.defaultChecked,
2865 otherProps.type,
2866 otherProps.name
2867 );
2868 }
2869 }
2870 for (internalInstance = 0; internalInstance < props.length; internalInstance++)
2871 otherNode = props[internalInstance], otherNode.form === target.form && updateValueIfChanged(otherNode);
2872 }
2873 break a;
2874 case "textarea":
2875 updateTextarea(target, props.value, props.defaultValue);
2876 break a;
2877 case "select":
2878 internalInstance = props.value, null != internalInstance && updateOptions(target, !!props.multiple, internalInstance, false);
2879 }
2880 }
2881 }
2882 function batchedUpdates$1(fn, a, b) {
2883 if (isInsideEventHandler) return fn(a, b);
2884 isInsideEventHandler = true;
2885 try {
2886 var JSCompiler_inline_result = fn(a);
2887 return JSCompiler_inline_result;
2888 } finally {
2889 if (isInsideEventHandler = false, null !== restoreTarget || null !== restoreQueue) {
2890 if (flushSyncWork$1(), restoreTarget && (a = restoreTarget, fn = restoreQueue, restoreQueue = restoreTarget = null, restoreStateOfTarget(a), fn))
2891 for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);
2892 }
2893 }
2894 }
2895 function getListener(inst, registrationName) {
2896 var stateNode = inst.stateNode;
2897 if (null === stateNode) return null;
2898 var props = stateNode[internalPropsKey] || null;
2899 if (null === props) return null;
2900 stateNode = props[registrationName];
2901 a: switch (registrationName) {
2902 case "onClick":
2903 case "onClickCapture":
2904 case "onDoubleClick":
2905 case "onDoubleClickCapture":
2906 case "onMouseDown":
2907 case "onMouseDownCapture":
2908 case "onMouseMove":
2909 case "onMouseMoveCapture":
2910 case "onMouseUp":
2911 case "onMouseUpCapture":
2912 case "onMouseEnter":
2913 (props = !props.disabled) || (inst = inst.type, props = !("button" === inst || "input" === inst || "select" === inst || "textarea" === inst));
2914 inst = !props;
2915 break a;
2916 default:
2917 inst = false;
2918 }
2919 if (inst) return null;
2920 if (stateNode && "function" !== typeof stateNode)
2921 throw Error(
2922 "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof stateNode + "` type."
2923 );
2924 return stateNode;
2925 }
2926 function getData() {
2927 if (fallbackText) return fallbackText;
2928 var start, startValue = startText, startLength = startValue.length, end, endValue = "value" in root ? root.value : root.textContent, endLength = endValue.length;
2929 for (start = 0; start < startLength && startValue[start] === endValue[start]; start++) ;
2930 var minEnd = startLength - start;
2931 for (end = 1; end <= minEnd && startValue[startLength - end] === endValue[endLength - end]; end++) ;
2932 return fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0);
2933 }
2934 function getEventCharCode(nativeEvent) {
2935 var keyCode = nativeEvent.keyCode;
2936 "charCode" in nativeEvent ? (nativeEvent = nativeEvent.charCode, 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13)) : nativeEvent = keyCode;
2937 10 === nativeEvent && (nativeEvent = 13);
2938 return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;
2939 }
2940 function functionThatReturnsTrue() {
2941 return true;
2942 }
2943 function functionThatReturnsFalse() {
2944 return false;
2945 }
2946 function createSyntheticEvent(Interface) {
2947 function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
2948 this._reactName = reactName;
2949 this._targetInst = targetInst;
2950 this.type = reactEventType;
2951 this.nativeEvent = nativeEvent;
2952 this.target = nativeEventTarget;
2953 this.currentTarget = null;
2954 for (var propName in Interface)
2955 Interface.hasOwnProperty(propName) && (reactName = Interface[propName], this[propName] = reactName ? reactName(nativeEvent) : nativeEvent[propName]);
2956 this.isDefaultPrevented = (null != nativeEvent.defaultPrevented ? nativeEvent.defaultPrevented : false === nativeEvent.returnValue) ? functionThatReturnsTrue : functionThatReturnsFalse;
2957 this.isPropagationStopped = functionThatReturnsFalse;
2958 return this;
2959 }
2960 assign(SyntheticBaseEvent.prototype, {
2961 preventDefault: function() {
2962 this.defaultPrevented = true;
2963 var event = this.nativeEvent;
2964 event && (event.preventDefault ? event.preventDefault() : "unknown" !== typeof event.returnValue && (event.returnValue = false), this.isDefaultPrevented = functionThatReturnsTrue);
2965 },
2966 stopPropagation: function() {
2967 var event = this.nativeEvent;
2968 event && (event.stopPropagation ? event.stopPropagation() : "unknown" !== typeof event.cancelBubble && (event.cancelBubble = true), this.isPropagationStopped = functionThatReturnsTrue);
2969 },
2970 persist: function() {
2971 },
2972 isPersistent: functionThatReturnsTrue
2973 });
2974 return SyntheticBaseEvent;
2975 }
2976 function modifierStateGetter(keyArg) {
2977 var nativeEvent = this.nativeEvent;
2978 return nativeEvent.getModifierState ? nativeEvent.getModifierState(keyArg) : (keyArg = modifierKeyToProp[keyArg]) ? !!nativeEvent[keyArg] : false;
2979 }
2980 function getEventModifierState() {
2981 return modifierStateGetter;
2982 }
2983 function isFallbackCompositionEnd(domEventName, nativeEvent) {
2984 switch (domEventName) {
2985 case "keyup":
2986 return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);
2987 case "keydown":
2988 return nativeEvent.keyCode !== START_KEYCODE;
2989 case "keypress":
2990 case "mousedown":
2991 case "focusout":
2992 return true;
2993 default:
2994 return false;
2995 }
2996 }
2997 function getDataFromCustomEvent(nativeEvent) {
2998 nativeEvent = nativeEvent.detail;
2999 return "object" === typeof nativeEvent && "data" in nativeEvent ? nativeEvent.data : null;
3000 }
3001 function getNativeBeforeInputChars(domEventName, nativeEvent) {
3002 switch (domEventName) {
3003 case "compositionend":
3004 return getDataFromCustomEvent(nativeEvent);
3005 case "keypress":
3006 if (nativeEvent.which !== SPACEBAR_CODE) return null;
3007 hasSpaceKeypress = true;
3008 return SPACEBAR_CHAR;
3009 case "textInput":
3010 return domEventName = nativeEvent.data, domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName;
3011 default:
3012 return null;
3013 }
3014 }
3015 function getFallbackBeforeInputChars(domEventName, nativeEvent) {
3016 if (isComposing)
3017 return "compositionend" === domEventName || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent) ? (domEventName = getData(), fallbackText = startText = root = null, isComposing = false, domEventName) : null;
3018 switch (domEventName) {
3019 case "paste":
3020 return null;
3021 case "keypress":
3022 if (!(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) || nativeEvent.ctrlKey && nativeEvent.altKey) {
3023 if (nativeEvent.char && 1 < nativeEvent.char.length)
3024 return nativeEvent.char;
3025 if (nativeEvent.which)
3026 return String.fromCharCode(nativeEvent.which);
3027 }
3028 return null;
3029 case "compositionend":
3030 return useFallbackCompositionData && "ko" !== nativeEvent.locale ? null : nativeEvent.data;
3031 default:
3032 return null;
3033 }
3034 }
3035 function isTextInputElement(elem) {
3036 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3037 return "input" === nodeName ? !!supportedInputTypes[elem.type] : "textarea" === nodeName ? true : false;
3038 }
3039 function isEventSupported(eventNameSuffix) {
3040 if (!canUseDOM) return false;
3041 eventNameSuffix = "on" + eventNameSuffix;
3042 var isSupported = eventNameSuffix in document;
3043 isSupported || (isSupported = document.createElement("div"), isSupported.setAttribute(eventNameSuffix, "return;"), isSupported = "function" === typeof isSupported[eventNameSuffix]);
3044 return isSupported;
3045 }
3046 function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
3047 restoreTarget ? restoreQueue ? restoreQueue.push(target) : restoreQueue = [target] : restoreTarget = target;
3048 inst = accumulateTwoPhaseListeners(inst, "onChange");
3049 0 < inst.length && (nativeEvent = new SyntheticEvent(
3050 "onChange",
3051 "change",
3052 null,
3053 nativeEvent,
3054 target
3055 ), dispatchQueue.push({ event: nativeEvent, listeners: inst }));
3056 }
3057 function runEventInBatch(dispatchQueue) {
3058 processDispatchQueue(dispatchQueue, 0);
3059 }
3060 function getInstIfValueChanged(targetInst) {
3061 var targetNode = getNodeFromInstance(targetInst);
3062 if (updateValueIfChanged(targetNode)) return targetInst;
3063 }
3064 function getTargetInstForChangeEvent(domEventName, targetInst) {
3065 if ("change" === domEventName) return targetInst;
3066 }
3067 function stopWatchingForValueChange() {
3068 activeElement$1 && (activeElement$1.detachEvent("onpropertychange", handlePropertyChange), activeElementInst$1 = activeElement$1 = null);
3069 }
3070 function handlePropertyChange(nativeEvent) {
3071 if ("value" === nativeEvent.propertyName && getInstIfValueChanged(activeElementInst$1)) {
3072 var dispatchQueue = [];
3073 createAndAccumulateChangeEvent(
3074 dispatchQueue,
3075 activeElementInst$1,
3076 nativeEvent,
3077 getEventTarget(nativeEvent)
3078 );
3079 batchedUpdates$1(runEventInBatch, dispatchQueue);
3080 }
3081 }
3082 function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
3083 "focusin" === domEventName ? (stopWatchingForValueChange(), activeElement$1 = target, activeElementInst$1 = targetInst, activeElement$1.attachEvent("onpropertychange", handlePropertyChange)) : "focusout" === domEventName && stopWatchingForValueChange();
3084 }
3085 function getTargetInstForInputEventPolyfill(domEventName) {
3086 if ("selectionchange" === domEventName || "keyup" === domEventName || "keydown" === domEventName)
3087 return getInstIfValueChanged(activeElementInst$1);
3088 }
3089 function getTargetInstForClickEvent(domEventName, targetInst) {
3090 if ("click" === domEventName) return getInstIfValueChanged(targetInst);
3091 }
3092 function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
3093 if ("input" === domEventName || "change" === domEventName)
3094 return getInstIfValueChanged(targetInst);
3095 }
3096 function is(x, y) {
3097 return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
3098 }
3099 function shallowEqual(objA, objB) {
3100 if (objectIs(objA, objB)) return true;
3101 if ("object" !== typeof objA || null === objA || "object" !== typeof objB || null === objB)
3102 return false;
3103 var keysA = Object.keys(objA), keysB = Object.keys(objB);
3104 if (keysA.length !== keysB.length) return false;
3105 for (keysB = 0; keysB < keysA.length; keysB++) {
3106 var currentKey = keysA[keysB];
3107 if (!hasOwnProperty.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey]))
3108 return false;
3109 }
3110 return true;
3111 }
3112 function getLeafNode(node) {
3113 for (; node && node.firstChild; ) node = node.firstChild;
3114 return node;
3115 }
3116 function getNodeForCharacterOffset(root2, offset) {
3117 var node = getLeafNode(root2);
3118 root2 = 0;
3119 for (var nodeEnd; node; ) {
3120 if (3 === node.nodeType) {
3121 nodeEnd = root2 + node.textContent.length;
3122 if (root2 <= offset && nodeEnd >= offset)
3123 return { node, offset: offset - root2 };
3124 root2 = nodeEnd;
3125 }
3126 a: {
3127 for (; node; ) {
3128 if (node.nextSibling) {
3129 node = node.nextSibling;
3130 break a;
3131 }
3132 node = node.parentNode;
3133 }
3134 node = void 0;
3135 }
3136 node = getLeafNode(node);
3137 }
3138 }
3139 function containsNode(outerNode, innerNode) {
3140 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;
3141 }
3142 function getActiveElementDeep(containerInfo) {
3143 containerInfo = null != containerInfo && null != containerInfo.ownerDocument && null != containerInfo.ownerDocument.defaultView ? containerInfo.ownerDocument.defaultView : window;
3144 for (var element = getActiveElement(containerInfo.document); element instanceof containerInfo.HTMLIFrameElement; ) {
3145 try {
3146 var JSCompiler_inline_result = "string" === typeof element.contentWindow.location.href;
3147 } catch (err) {
3148 JSCompiler_inline_result = false;
3149 }
3150 if (JSCompiler_inline_result) containerInfo = element.contentWindow;
3151 else break;
3152 element = getActiveElement(containerInfo.document);
3153 }
3154 return element;
3155 }
3156 function hasSelectionCapabilities(elem) {
3157 var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
3158 return nodeName && ("input" === nodeName && ("text" === elem.type || "search" === elem.type || "tel" === elem.type || "url" === elem.type || "password" === elem.type) || "textarea" === nodeName || "true" === elem.contentEditable);
3159 }
3160 function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
3161 var doc = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget.document : 9 === nativeEventTarget.nodeType ? nativeEventTarget : nativeEventTarget.ownerDocument;
3162 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 = {
3163 anchorNode: doc.anchorNode,
3164 anchorOffset: doc.anchorOffset,
3165 focusNode: doc.focusNode,
3166 focusOffset: doc.focusOffset
3167 }), lastSelection && shallowEqual(lastSelection, doc) || (lastSelection = doc, doc = accumulateTwoPhaseListeners(activeElementInst, "onSelect"), 0 < doc.length && (nativeEvent = new SyntheticEvent(
3168 "onSelect",
3169 "select",
3170 null,
3171 nativeEvent,
3172 nativeEventTarget
3173 ), dispatchQueue.push({ event: nativeEvent, listeners: doc }), nativeEvent.target = activeElement)));
3174 }
3175 function makePrefixMap(styleProp, eventName) {
3176 var prefixes = {};
3177 prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
3178 prefixes["Webkit" + styleProp] = "webkit" + eventName;
3179 prefixes["Moz" + styleProp] = "moz" + eventName;
3180 return prefixes;
3181 }
3182 function getVendorPrefixedEventName(eventName) {
3183 if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];
3184 if (!vendorPrefixes[eventName]) return eventName;
3185 var prefixMap = vendorPrefixes[eventName], styleProp;
3186 for (styleProp in prefixMap)
3187 if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)
3188 return prefixedEventNames[eventName] = prefixMap[styleProp];
3189 return eventName;
3190 }
3191 function registerSimpleEvent(domEventName, reactName) {
3192 topLevelEventsToReactNames.set(domEventName, reactName);
3193 registerTwoPhaseEvent(reactName, [domEventName]);
3194 }
3195 function getArrayKind(array) {
3196 for (var kind = EMPTY_ARRAY, i = 0; i < array.length; i++) {
3197 var value = array[i];
3198 if ("object" === typeof value && null !== value)
3199 if (isArrayImpl(value) && 2 === value.length && "string" === typeof value[0]) {
3200 if (kind !== EMPTY_ARRAY && kind !== ENTRIES_ARRAY)
3201 return COMPLEX_ARRAY;
3202 kind = ENTRIES_ARRAY;
3203 } else return COMPLEX_ARRAY;
3204 else {
3205 if ("function" === typeof value || "string" === typeof value && 50 < value.length || kind !== EMPTY_ARRAY && kind !== PRIMITIVE_ARRAY)
3206 return COMPLEX_ARRAY;
3207 kind = PRIMITIVE_ARRAY;
3208 }
3209 }
3210 return kind;
3211 }
3212 function addObjectToProperties(object, properties, indent, prefix2) {
3213 for (var key in object)
3214 hasOwnProperty.call(object, key) && "_" !== key[0] && addValueToProperties(key, object[key], properties, indent, prefix2);
3215 }
3216 function addValueToProperties(propertyName, value, properties, indent, prefix2) {
3217 switch (typeof value) {
3218 case "object":
3219 if (null === value) {
3220 value = "null";
3221 break;
3222 } else {
3223 if (value.$$typeof === REACT_ELEMENT_TYPE) {
3224 var typeName2 = getComponentNameFromType(value.type) || "\u2026", key = value.key;
3225 value = value.props;
3226 var propsKeys = Object.keys(value), propsLength = propsKeys.length;
3227 if (null == key && 0 === propsLength) {
3228 value = "<" + typeName2 + " />";
3229 break;
3230 }
3231 if (3 > indent || 1 === propsLength && "children" === propsKeys[0] && null == key) {
3232 value = "<" + typeName2 + " \u2026 />";
3233 break;
3234 }
3235 properties.push([
3236 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3237 "<" + typeName2
3238 ]);
3239 null !== key && addValueToProperties(
3240 "key",
3241 key,
3242 properties,
3243 indent + 1,
3244 prefix2
3245 );
3246 propertyName = false;
3247 for (var propKey in value)
3248 "children" === propKey ? null != value.children && (!isArrayImpl(value.children) || 0 < value.children.length) && (propertyName = true) : hasOwnProperty.call(value, propKey) && "_" !== propKey[0] && addValueToProperties(
3249 propKey,
3250 value[propKey],
3251 properties,
3252 indent + 1,
3253 prefix2
3254 );
3255 properties.push([
3256 "",
3257 propertyName ? ">\u2026</" + typeName2 + ">" : "/>"
3258 ]);
3259 return;
3260 }
3261 typeName2 = Object.prototype.toString.call(value);
3262 typeName2 = typeName2.slice(8, typeName2.length - 1);
3263 if ("Array" === typeName2) {
3264 if (propKey = getArrayKind(value), propKey === PRIMITIVE_ARRAY || propKey === EMPTY_ARRAY) {
3265 value = JSON.stringify(value);
3266 break;
3267 } else if (propKey === ENTRIES_ARRAY) {
3268 properties.push([
3269 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3270 ""
3271 ]);
3272 for (propertyName = 0; propertyName < value.length; propertyName++)
3273 typeName2 = value[propertyName], addValueToProperties(
3274 typeName2[0],
3275 typeName2[1],
3276 properties,
3277 indent + 1,
3278 prefix2
3279 );
3280 return;
3281 }
3282 }
3283 if ("Promise" === typeName2) {
3284 if ("fulfilled" === value.status) {
3285 if (typeName2 = properties.length, addValueToProperties(
3286 propertyName,
3287 value.value,
3288 properties,
3289 indent,
3290 prefix2
3291 ), properties.length > typeName2) {
3292 properties = properties[typeName2];
3293 properties[1] = "Promise<" + (properties[1] || "Object") + ">";
3294 return;
3295 }
3296 } else if ("rejected" === value.status && (typeName2 = properties.length, addValueToProperties(
3297 propertyName,
3298 value.reason,
3299 properties,
3300 indent,
3301 prefix2
3302 ), properties.length > typeName2)) {
3303 properties = properties[typeName2];
3304 properties[1] = "Rejected Promise<" + properties[1] + ">";
3305 return;
3306 }
3307 properties.push([
3308 "\xA0\xA0".repeat(indent) + propertyName,
3309 "Promise"
3310 ]);
3311 return;
3312 }
3313 "Object" === typeName2 && (propKey = Object.getPrototypeOf(value)) && "function" === typeof propKey.constructor && (typeName2 = propKey.constructor.name);
3314 properties.push([
3315 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3316 "Object" === typeName2 ? 3 > indent ? "" : "\u2026" : typeName2
3317 ]);
3318 3 > indent && addObjectToProperties(value, properties, indent + 1, prefix2);
3319 return;
3320 }
3321 case "function":
3322 value = "" === value.name ? "() => {}" : value.name + "() {}";
3323 break;
3324 case "string":
3325 value = value === OMITTED_PROP_ERROR ? "\u2026" : JSON.stringify(value);
3326 break;
3327 case "undefined":
3328 value = "undefined";
3329 break;
3330 case "boolean":
3331 value = value ? "true" : "false";
3332 break;
3333 default:
3334 value = String(value);
3335 }
3336 properties.push([
3337 prefix2 + "\xA0\xA0".repeat(indent) + propertyName,
3338 value
3339 ]);
3340 }
3341 function addObjectDiffToProperties(prev, next, properties, indent) {
3342 var isDeeplyEqual = true;
3343 for (key in prev)
3344 key in next || (properties.push([
3345 REMOVED + "\xA0\xA0".repeat(indent) + key,
3346 "\u2026"
3347 ]), isDeeplyEqual = false);
3348 for (var _key in next)
3349 if (_key in prev) {
3350 var key = prev[_key];
3351 var nextValue = next[_key];
3352 if (key !== nextValue) {
3353 if (0 === indent && "children" === _key)
3354 isDeeplyEqual = "\xA0\xA0".repeat(indent) + _key, properties.push(
3355 [REMOVED + isDeeplyEqual, "\u2026"],
3356 [ADDED + isDeeplyEqual, "\u2026"]
3357 );
3358 else {
3359 if (!(3 <= indent)) {
3360 if ("object" === typeof key && "object" === typeof nextValue && null !== key && null !== nextValue && key.$$typeof === nextValue.$$typeof)
3361 if (nextValue.$$typeof === REACT_ELEMENT_TYPE) {
3362 if (key.type === nextValue.type && key.key === nextValue.key) {
3363 key = getComponentNameFromType(nextValue.type) || "\u2026";
3364 isDeeplyEqual = "\xA0\xA0".repeat(indent) + _key;
3365 key = "<" + key + " \u2026 />";
3366 properties.push(
3367 [REMOVED + isDeeplyEqual, key],
3368 [ADDED + isDeeplyEqual, key]
3369 );
3370 isDeeplyEqual = false;
3371 continue;
3372 }
3373 } else {
3374 var prevKind = Object.prototype.toString.call(key), nextKind = Object.prototype.toString.call(nextValue);
3375 if (prevKind === nextKind && ("[object Object]" === nextKind || "[object Array]" === nextKind)) {
3376 prevKind = [
3377 UNCHANGED + "\xA0\xA0".repeat(indent) + _key,
3378 "[object Array]" === nextKind ? "Array" : ""
3379 ];
3380 properties.push(prevKind);
3381 nextKind = properties.length;
3382 addObjectDiffToProperties(
3383 key,
3384 nextValue,
3385 properties,
3386 indent + 1
3387 ) ? nextKind === properties.length && (prevKind[1] = "Referentially unequal but deeply equal objects. Consider memoization.") : isDeeplyEqual = false;
3388 continue;
3389 }
3390 }
3391 else if ("function" === typeof key && "function" === typeof nextValue && key.name === nextValue.name && key.length === nextValue.length && (prevKind = Function.prototype.toString.call(key), nextKind = Function.prototype.toString.call(nextValue), prevKind === nextKind)) {
3392 key = "" === nextValue.name ? "() => {}" : nextValue.name + "() {}";
3393 properties.push([
3394 UNCHANGED + "\xA0\xA0".repeat(indent) + _key,
3395 key + " Referentially unequal function closure. Consider memoization."
3396 ]);
3397 continue;
3398 }
3399 }
3400 addValueToProperties(_key, key, properties, indent, REMOVED);
3401 addValueToProperties(_key, nextValue, properties, indent, ADDED);
3402 }
3403 isDeeplyEqual = false;
3404 }
3405 } else
3406 properties.push([
3407 ADDED + "\xA0\xA0".repeat(indent) + _key,
3408 "\u2026"
3409 ]), isDeeplyEqual = false;
3410 return isDeeplyEqual;
3411 }
3412 function setCurrentTrackFromLanes(lanes) {
3413 currentTrack = lanes & 63 ? "Blocking" : lanes & 64 ? "Gesture" : lanes & 4194176 ? "Transition" : lanes & 62914560 ? "Suspense" : lanes & 2080374784 ? "Idle" : "Other";
3414 }
3415 function logComponentTrigger(fiber, startTime, endTime, trigger) {
3416 supportsUserTiming && (reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = trigger, reusableComponentDevToolDetails.properties = null, (fiber = fiber._debugTask) ? fiber.run(
3417 performance.measure.bind(
3418 performance,
3419 trigger,
3420 reusableComponentOptions
3421 )
3422 ) : performance.measure(trigger, reusableComponentOptions));
3423 }
3424 function logComponentReappeared(fiber, startTime, endTime) {
3425 logComponentTrigger(fiber, startTime, endTime, "Reconnect");
3426 }
3427 function logComponentRender(fiber, startTime, endTime, wasHydrated, committedLanes) {
3428 var name = getComponentNameFromFiber(fiber);
3429 if (null !== name && supportsUserTiming) {
3430 var alternate = fiber.alternate, selfTime = fiber.actualDuration;
3431 if (null === alternate || alternate.child !== fiber.child)
3432 for (var child = fiber.child; null !== child; child = child.sibling)
3433 selfTime -= child.actualDuration;
3434 wasHydrated = 0.5 > selfTime ? wasHydrated ? "tertiary-light" : "primary-light" : 10 > selfTime ? wasHydrated ? "tertiary" : "primary" : 100 > selfTime ? wasHydrated ? "tertiary-dark" : "primary-dark" : "error";
3435 var props = fiber.memoizedProps;
3436 selfTime = fiber._debugTask;
3437 null !== props && null !== alternate && alternate.memoizedProps !== props ? (child = [resuableChangedPropsEntry], props = addObjectDiffToProperties(
3438 alternate.memoizedProps,
3439 props,
3440 child,
3441 0
3442 ), 1 < child.length && (props && !alreadyWarnedForDeepEquality && 0 === (alternate.lanes & committedLanes) && 100 < fiber.actualDuration ? (alreadyWarnedForDeepEquality = true, child[0] = reusableDeeplyEqualPropsEntry, reusableComponentDevToolDetails.color = "warning", reusableComponentDevToolDetails.tooltipText = DEEP_EQUALITY_WARNING) : (reusableComponentDevToolDetails.color = wasHydrated, reusableComponentDevToolDetails.tooltipText = name), reusableComponentDevToolDetails.properties = child, reusableComponentOptions.start = startTime, reusableComponentOptions.end = endTime, null != selfTime ? selfTime.run(
3443 performance.measure.bind(
3444 performance,
3445 "\u200B" + name,
3446 reusableComponentOptions
3447 )
3448 ) : performance.measure(
3449 "\u200B" + name,
3450 reusableComponentOptions
3451 ))) : null != selfTime ? selfTime.run(
3452 console.timeStamp.bind(
3453 console,
3454 name,
3455 startTime,
3456 endTime,
3457 COMPONENTS_TRACK,
3458 void 0,
3459 wasHydrated
3460 )
3461 ) : console.timeStamp(
3462 name,
3463 startTime,
3464 endTime,
3465 COMPONENTS_TRACK,
3466 void 0,
3467 wasHydrated
3468 );
3469 }
3470 }
3471 function logComponentErrored(fiber, startTime, endTime, errors) {
3472 if (supportsUserTiming) {
3473 var name = getComponentNameFromFiber(fiber);
3474 if (null !== name) {
3475 for (var debugTask = null, properties = [], i = 0; i < errors.length; i++) {
3476 var capturedValue = errors[i];
3477 null == debugTask && null !== capturedValue.source && (debugTask = capturedValue.source._debugTask);
3478 capturedValue = capturedValue.value;
3479 properties.push([
3480 "Error",
3481 "object" === typeof capturedValue && null !== capturedValue && "string" === typeof capturedValue.message ? String(capturedValue.message) : String(capturedValue)
3482 ]);
3483 }
3484 null !== fiber.key && addValueToProperties("key", fiber.key, properties, 0, "");
3485 null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, properties, 0, "");
3486 null == debugTask && (debugTask = fiber._debugTask);
3487 fiber = {
3488 start: startTime,
3489 end: endTime,
3490 detail: {
3491 devtools: {
3492 color: "error",
3493 track: COMPONENTS_TRACK,
3494 tooltipText: 13 === fiber.tag ? "Hydration failed" : "Error boundary caught an error",
3495 properties
3496 }
3497 }
3498 };
3499 debugTask ? debugTask.run(
3500 performance.measure.bind(performance, "\u200B" + name, fiber)
3501 ) : performance.measure("\u200B" + name, fiber);
3502 }
3503 }
3504 }
3505 function logComponentEffect(fiber, startTime, endTime, selfTime, errors) {
3506 if (null !== errors) {
3507 if (supportsUserTiming) {
3508 var name = getComponentNameFromFiber(fiber);
3509 if (null !== name) {
3510 selfTime = [];
3511 for (var i = 0; i < errors.length; i++) {
3512 var error = errors[i].value;
3513 selfTime.push([
3514 "Error",
3515 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3516 ]);
3517 }
3518 null !== fiber.key && addValueToProperties("key", fiber.key, selfTime, 0, "");
3519 null !== fiber.memoizedProps && addObjectToProperties(fiber.memoizedProps, selfTime, 0, "");
3520 startTime = {
3521 start: startTime,
3522 end: endTime,
3523 detail: {
3524 devtools: {
3525 color: "error",
3526 track: COMPONENTS_TRACK,
3527 tooltipText: "A lifecycle or effect errored",
3528 properties: selfTime
3529 }
3530 }
3531 };
3532 (fiber = fiber._debugTask) ? fiber.run(
3533 performance.measure.bind(
3534 performance,
3535 "\u200B" + name,
3536 startTime
3537 )
3538 ) : performance.measure("\u200B" + name, startTime);
3539 }
3540 }
3541 } else
3542 name = getComponentNameFromFiber(fiber), null !== name && supportsUserTiming && (errors = 1 > selfTime ? "secondary-light" : 100 > selfTime ? "secondary" : 500 > selfTime ? "secondary-dark" : "error", (fiber = fiber._debugTask) ? fiber.run(
3543 console.timeStamp.bind(
3544 console,
3545 name,
3546 startTime,
3547 endTime,
3548 COMPONENTS_TRACK,
3549 void 0,
3550 errors
3551 )
3552 ) : console.timeStamp(
3553 name,
3554 startTime,
3555 endTime,
3556 COMPONENTS_TRACK,
3557 void 0,
3558 errors
3559 ));
3560 }
3561 function logRenderPhase(startTime, endTime, lanes, debugTask) {
3562 if (supportsUserTiming && !(endTime <= startTime)) {
3563 var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark";
3564 lanes = (lanes & 536870912) === lanes ? "Prepared" : (lanes & 201326741) === lanes ? "Hydrated" : "Render";
3565 debugTask ? debugTask.run(
3566 console.timeStamp.bind(
3567 console,
3568 lanes,
3569 startTime,
3570 endTime,
3571 currentTrack,
3572 LANES_TRACK_GROUP,
3573 color
3574 )
3575 ) : console.timeStamp(
3576 lanes,
3577 startTime,
3578 endTime,
3579 currentTrack,
3580 LANES_TRACK_GROUP,
3581 color
3582 );
3583 }
3584 }
3585 function logSuspendedRenderPhase(startTime, endTime, lanes, debugTask) {
3586 !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
3587 console.timeStamp.bind(
3588 console,
3589 "Prewarm",
3590 startTime,
3591 endTime,
3592 currentTrack,
3593 LANES_TRACK_GROUP,
3594 lanes
3595 )
3596 ) : console.timeStamp(
3597 "Prewarm",
3598 startTime,
3599 endTime,
3600 currentTrack,
3601 LANES_TRACK_GROUP,
3602 lanes
3603 ));
3604 }
3605 function logSuspendedWithDelayPhase(startTime, endTime, lanes, debugTask) {
3606 !supportsUserTiming || endTime <= startTime || (lanes = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", debugTask ? debugTask.run(
3607 console.timeStamp.bind(
3608 console,
3609 "Suspended",
3610 startTime,
3611 endTime,
3612 currentTrack,
3613 LANES_TRACK_GROUP,
3614 lanes
3615 )
3616 ) : console.timeStamp(
3617 "Suspended",
3618 startTime,
3619 endTime,
3620 currentTrack,
3621 LANES_TRACK_GROUP,
3622 lanes
3623 ));
3624 }
3625 function logRecoveredRenderPhase(startTime, endTime, lanes, recoverableErrors, hydrationFailed, debugTask) {
3626 if (supportsUserTiming && !(endTime <= startTime)) {
3627 lanes = [];
3628 for (var i = 0; i < recoverableErrors.length; i++) {
3629 var error = recoverableErrors[i].value;
3630 lanes.push([
3631 "Recoverable Error",
3632 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3633 ]);
3634 }
3635 startTime = {
3636 start: startTime,
3637 end: endTime,
3638 detail: {
3639 devtools: {
3640 color: "primary-dark",
3641 track: currentTrack,
3642 trackGroup: LANES_TRACK_GROUP,
3643 tooltipText: hydrationFailed ? "Hydration Failed" : "Recovered after Error",
3644 properties: lanes
3645 }
3646 }
3647 };
3648 debugTask ? debugTask.run(
3649 performance.measure.bind(performance, "Recovered", startTime)
3650 ) : performance.measure("Recovered", startTime);
3651 }
3652 }
3653 function logErroredRenderPhase(startTime, endTime, lanes, debugTask) {
3654 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3655 console.timeStamp.bind(
3656 console,
3657 "Errored",
3658 startTime,
3659 endTime,
3660 currentTrack,
3661 LANES_TRACK_GROUP,
3662 "error"
3663 )
3664 ) : console.timeStamp(
3665 "Errored",
3666 startTime,
3667 endTime,
3668 currentTrack,
3669 LANES_TRACK_GROUP,
3670 "error"
3671 ));
3672 }
3673 function logSuspendedCommitPhase(startTime, endTime, reason, debugTask) {
3674 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3675 console.timeStamp.bind(
3676 console,
3677 reason,
3678 startTime,
3679 endTime,
3680 currentTrack,
3681 LANES_TRACK_GROUP,
3682 "secondary-light"
3683 )
3684 ) : console.timeStamp(
3685 reason,
3686 startTime,
3687 endTime,
3688 currentTrack,
3689 LANES_TRACK_GROUP,
3690 "secondary-light"
3691 ));
3692 }
3693 function logCommitErrored(startTime, endTime, errors, passive, debugTask) {
3694 if (supportsUserTiming && !(endTime <= startTime)) {
3695 for (var properties = [], i = 0; i < errors.length; i++) {
3696 var error = errors[i].value;
3697 properties.push([
3698 "Error",
3699 "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error)
3700 ]);
3701 }
3702 startTime = {
3703 start: startTime,
3704 end: endTime,
3705 detail: {
3706 devtools: {
3707 color: "error",
3708 track: currentTrack,
3709 trackGroup: LANES_TRACK_GROUP,
3710 tooltipText: passive ? "Remaining Effects Errored" : "Commit Errored",
3711 properties
3712 }
3713 }
3714 };
3715 debugTask ? debugTask.run(
3716 performance.measure.bind(performance, "Errored", startTime)
3717 ) : performance.measure("Errored", startTime);
3718 }
3719 }
3720 function logAnimatingPhase(startTime, endTime, debugTask) {
3721 !supportsUserTiming || endTime <= startTime || (debugTask ? debugTask.run(
3722 console.timeStamp.bind(
3723 console,
3724 "Animating",
3725 startTime,
3726 endTime,
3727 currentTrack,
3728 LANES_TRACK_GROUP,
3729 "secondary-dark"
3730 )
3731 ) : console.timeStamp(
3732 "Animating",
3733 startTime,
3734 endTime,
3735 currentTrack,
3736 LANES_TRACK_GROUP,
3737 "secondary-dark"
3738 ));
3739 }
3740 function finishQueueingConcurrentUpdates() {
3741 for (var endIndex = concurrentQueuesIndex, i = concurrentlyUpdatedLanes = concurrentQueuesIndex = 0; i < endIndex; ) {
3742 var fiber = concurrentQueues[i];
3743 concurrentQueues[i++] = null;
3744 var queue = concurrentQueues[i];
3745 concurrentQueues[i++] = null;
3746 var update = concurrentQueues[i];
3747 concurrentQueues[i++] = null;
3748 var lane = concurrentQueues[i];
3749 concurrentQueues[i++] = null;
3750 if (null !== queue && null !== update) {
3751 var pending = queue.pending;
3752 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
3753 queue.pending = update;
3754 }
3755 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);
3756 }
3757 }
3758 function enqueueUpdate$1(fiber, queue, update, lane) {
3759 concurrentQueues[concurrentQueuesIndex++] = fiber;
3760 concurrentQueues[concurrentQueuesIndex++] = queue;
3761 concurrentQueues[concurrentQueuesIndex++] = update;
3762 concurrentQueues[concurrentQueuesIndex++] = lane;
3763 concurrentlyUpdatedLanes |= lane;
3764 fiber.lanes |= lane;
3765 fiber = fiber.alternate;
3766 null !== fiber && (fiber.lanes |= lane);
3767 }
3768 function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
3769 enqueueUpdate$1(fiber, queue, update, lane);
3770 return getRootForUpdatedFiber(fiber);
3771 }
3772 function enqueueConcurrentRenderForLane(fiber, lane) {
3773 enqueueUpdate$1(fiber, null, null, lane);
3774 return getRootForUpdatedFiber(fiber);
3775 }
3776 function markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {
3777 sourceFiber.lanes |= lane;
3778 var alternate = sourceFiber.alternate;
3779 null !== alternate && (alternate.lanes |= lane);
3780 for (var isHidden = false, parent = sourceFiber.return; null !== parent; )
3781 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;
3782 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;
3783 }
3784 function getRootForUpdatedFiber(sourceFiber) {
3785 if (nestedUpdateCount > NESTED_UPDATE_LIMIT)
3786 throw nestedPassiveUpdateCount = nestedUpdateCount = 0, rootWithPassiveNestedUpdates = rootWithNestedUpdates = null, Error(
3787 "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."
3788 );
3789 nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT && (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null, console.error(
3790 "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."
3791 ));
3792 null === sourceFiber.alternate && 0 !== (sourceFiber.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
3793 for (var node = sourceFiber, parent = node.return; null !== parent; )
3794 null === node.alternate && 0 !== (node.flags & 4098) && warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber), node = parent, parent = node.return;
3795 return 3 === node.tag ? node.stateNode : null;
3796 }
3797 function resolveFunctionForHotReloading(type) {
3798 if (null === resolveFamily) return type;
3799 var family = resolveFamily(type);
3800 return void 0 === family ? type : family.current;
3801 }
3802 function resolveForwardRefForHotReloading(type) {
3803 if (null === resolveFamily) return type;
3804 var family = resolveFamily(type);
3805 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;
3806 }
3807 function isCompatibleFamilyForHotReloading(fiber, element) {
3808 if (null === resolveFamily) return false;
3809 var prevType = fiber.elementType;
3810 element = element.type;
3811 var needsCompareFamilies = false, $$typeofNextType = "object" === typeof element && null !== element ? element.$$typeof : null;
3812 switch (fiber.tag) {
3813 case 1:
3814 "function" === typeof element && (needsCompareFamilies = true);
3815 break;
3816 case 0:
3817 "function" === typeof element ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3818 break;
3819 case 11:
3820 $$typeofNextType === REACT_FORWARD_REF_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3821 break;
3822 case 14:
3823 case 15:
3824 $$typeofNextType === REACT_MEMO_TYPE ? needsCompareFamilies = true : $$typeofNextType === REACT_LAZY_TYPE && (needsCompareFamilies = true);
3825 break;
3826 default:
3827 return false;
3828 }
3829 return needsCompareFamilies && (fiber = resolveFamily(prevType), void 0 !== fiber && fiber === resolveFamily(element)) ? true : false;
3830 }
3831 function markFailedErrorBoundaryForHotReloading(fiber) {
3832 null !== resolveFamily && "function" === typeof WeakSet && (null === failedBoundaries && (failedBoundaries = /* @__PURE__ */ new WeakSet()), failedBoundaries.add(fiber));
3833 }
3834 function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
3835 do {
3836 var _fiber = fiber, alternate = _fiber.alternate, child = _fiber.child, sibling = _fiber.sibling, tag = _fiber.tag;
3837 _fiber = _fiber.type;
3838 var candidateType = null;
3839 switch (tag) {
3840 case 0:
3841 case 15:
3842 case 1:
3843 candidateType = _fiber;
3844 break;
3845 case 11:
3846 candidateType = _fiber.render;
3847 }
3848 if (null === resolveFamily)
3849 throw Error("Expected resolveFamily to be set during hot reload.");
3850 var needsRender = false;
3851 _fiber = false;
3852 null !== candidateType && (candidateType = resolveFamily(candidateType), void 0 !== candidateType && (staleFamilies.has(candidateType) ? _fiber = true : updatedFamilies.has(candidateType) && (1 === tag ? _fiber = true : needsRender = true)));
3853 null !== failedBoundaries && (failedBoundaries.has(fiber) || null !== alternate && failedBoundaries.has(alternate)) && (_fiber = true);
3854 _fiber && (fiber._debugNeedsRemount = true);
3855 if (_fiber || needsRender)
3856 alternate = enqueueConcurrentRenderForLane(fiber, 2), null !== alternate && scheduleUpdateOnFiber(alternate, fiber, 2);
3857 null === child || _fiber || scheduleFibersWithFamiliesRecursively(
3858 child,
3859 updatedFamilies,
3860 staleFamilies
3861 );
3862 if (null === sibling) break;
3863 fiber = sibling;
3864 } while (1);
3865 }
3866 function FiberNode(tag, pendingProps, key, mode) {
3867 this.tag = tag;
3868 this.key = key;
3869 this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
3870 this.index = 0;
3871 this.refCleanup = this.ref = null;
3872 this.pendingProps = pendingProps;
3873 this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
3874 this.mode = mode;
3875 this.subtreeFlags = this.flags = 0;
3876 this.deletions = null;
3877 this.childLanes = this.lanes = 0;
3878 this.alternate = null;
3879 this.actualDuration = -0;
3880 this.actualStartTime = -1.1;
3881 this.treeBaseDuration = this.selfBaseDuration = -0;
3882 this._debugTask = this._debugStack = this._debugOwner = this._debugInfo = null;
3883 this._debugNeedsRemount = false;
3884 this._debugHookTypes = null;
3885 hasBadMapPolyfill || "function" !== typeof Object.preventExtensions || Object.preventExtensions(this);
3886 }
3887 function shouldConstruct(Component) {
3888 Component = Component.prototype;
3889 return !(!Component || !Component.isReactComponent);
3890 }
3891 function createWorkInProgress(current2, pendingProps) {
3892 var workInProgress2 = current2.alternate;
3893 null === workInProgress2 ? (workInProgress2 = createFiber(
3894 current2.tag,
3895 pendingProps,
3896 current2.key,
3897 current2.mode
3898 ), 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);
3899 workInProgress2.flags = current2.flags & 65011712;
3900 workInProgress2.childLanes = current2.childLanes;
3901 workInProgress2.lanes = current2.lanes;
3902 workInProgress2.child = current2.child;
3903 workInProgress2.memoizedProps = current2.memoizedProps;
3904 workInProgress2.memoizedState = current2.memoizedState;
3905 workInProgress2.updateQueue = current2.updateQueue;
3906 pendingProps = current2.dependencies;
3907 workInProgress2.dependencies = null === pendingProps ? null : {
3908 lanes: pendingProps.lanes,
3909 firstContext: pendingProps.firstContext,
3910 _debugThenableState: pendingProps._debugThenableState
3911 };
3912 workInProgress2.sibling = current2.sibling;
3913 workInProgress2.index = current2.index;
3914 workInProgress2.ref = current2.ref;
3915 workInProgress2.refCleanup = current2.refCleanup;
3916 workInProgress2.selfBaseDuration = current2.selfBaseDuration;
3917 workInProgress2.treeBaseDuration = current2.treeBaseDuration;
3918 workInProgress2._debugInfo = current2._debugInfo;
3919 workInProgress2._debugNeedsRemount = current2._debugNeedsRemount;
3920 switch (workInProgress2.tag) {
3921 case 0:
3922 case 15:
3923 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3924 break;
3925 case 1:
3926 workInProgress2.type = resolveFunctionForHotReloading(current2.type);
3927 break;
3928 case 11:
3929 workInProgress2.type = resolveForwardRefForHotReloading(current2.type);
3930 }
3931 return workInProgress2;
3932 }
3933 function resetWorkInProgress(workInProgress2, renderLanes2) {
3934 workInProgress2.flags &= 65011714;
3935 var current2 = workInProgress2.alternate;
3936 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 : {
3937 lanes: renderLanes2.lanes,
3938 firstContext: renderLanes2.firstContext,
3939 _debugThenableState: renderLanes2._debugThenableState
3940 }, workInProgress2.selfBaseDuration = current2.selfBaseDuration, workInProgress2.treeBaseDuration = current2.treeBaseDuration);
3941 return workInProgress2;
3942 }
3943 function createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes) {
3944 var fiberTag = 0, resolvedType = type;
3945 if ("function" === typeof type)
3946 shouldConstruct(type) && (fiberTag = 1), resolvedType = resolveFunctionForHotReloading(resolvedType);
3947 else if ("string" === typeof type)
3948 fiberTag = getHostContext(), fiberTag = isHostHoistableType(type, pendingProps, fiberTag) ? 26 : "html" === type || "head" === type || "body" === type ? 27 : 5;
3949 else
3950 a: switch (type) {
3951 case REACT_ACTIVITY_TYPE:
3952 return key = createFiber(31, pendingProps, key, mode), key.elementType = REACT_ACTIVITY_TYPE, key.lanes = lanes, key;
3953 case REACT_FRAGMENT_TYPE:
3954 return createFiberFromFragment(
3955 pendingProps.children,
3956 mode,
3957 lanes,
3958 key
3959 );
3960 case REACT_STRICT_MODE_TYPE:
3961 fiberTag = 8;
3962 mode |= StrictLegacyMode;
3963 mode |= StrictEffectsMode;
3964 break;
3965 case REACT_PROFILER_TYPE:
3966 return type = pendingProps, owner = mode, "string" !== typeof type.id && console.error(
3967 'Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',
3968 typeof type.id
3969 ), key = createFiber(12, type, key, owner | ProfileMode), key.elementType = REACT_PROFILER_TYPE, key.lanes = lanes, key.stateNode = { effectDuration: 0, passiveEffectDuration: 0 }, key;
3970 case REACT_SUSPENSE_TYPE:
3971 return key = createFiber(13, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_TYPE, key.lanes = lanes, key;
3972 case REACT_SUSPENSE_LIST_TYPE:
3973 return key = createFiber(19, pendingProps, key, mode), key.elementType = REACT_SUSPENSE_LIST_TYPE, key.lanes = lanes, key;
3974 default:
3975 if ("object" === typeof type && null !== type)
3976 switch (type.$$typeof) {
3977 case REACT_CONTEXT_TYPE:
3978 fiberTag = 10;
3979 break a;
3980 case REACT_CONSUMER_TYPE:
3981 fiberTag = 9;
3982 break a;
3983 case REACT_FORWARD_REF_TYPE:
3984 fiberTag = 11;
3985 resolvedType = resolveForwardRefForHotReloading(resolvedType);
3986 break a;
3987 case REACT_MEMO_TYPE:
3988 fiberTag = 14;
3989 break a;
3990 case REACT_LAZY_TYPE:
3991 fiberTag = 16;
3992 resolvedType = null;
3993 break a;
3994 }
3995 resolvedType = "";
3996 if (void 0 === type || "object" === typeof type && null !== type && 0 === Object.keys(type).length)
3997 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.";
3998 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;
3999 (fiberTag = owner ? getComponentNameFromOwner(owner) : null) && (resolvedType += "\n\nCheck the render method of `" + fiberTag + "`.");
4000 fiberTag = 29;
4001 pendingProps = Error(
4002 "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (pendingProps + "." + resolvedType)
4003 );
4004 resolvedType = null;
4005 }
4006 key = createFiber(fiberTag, pendingProps, key, mode);
4007 key.elementType = type;
4008 key.type = resolvedType;
4009 key.lanes = lanes;
4010 key._debugOwner = owner;
4011 return key;
4012 }
4013 function createFiberFromElement(element, mode, lanes) {
4014 mode = createFiberFromTypeAndProps(
4015 element.type,
4016 element.key,
4017 element.props,
4018 element._owner,
4019 mode,
4020 lanes
4021 );
4022 mode._debugOwner = element._owner;
4023 mode._debugStack = element._debugStack;
4024 mode._debugTask = element._debugTask;
4025 return mode;
4026 }
4027 function createFiberFromFragment(elements, mode, lanes, key) {
4028 elements = createFiber(7, elements, key, mode);
4029 elements.lanes = lanes;
4030 return elements;
4031 }
4032 function createFiberFromText(content, mode, lanes) {
4033 content = createFiber(6, content, null, mode);
4034 content.lanes = lanes;
4035 return content;
4036 }
4037 function createFiberFromDehydratedFragment(dehydratedNode) {
4038 var fiber = createFiber(18, null, null, NoMode);
4039 fiber.stateNode = dehydratedNode;
4040 return fiber;
4041 }
4042 function createFiberFromPortal(portal, mode, lanes) {
4043 mode = createFiber(
4044 4,
4045 null !== portal.children ? portal.children : [],
4046 portal.key,
4047 mode
4048 );
4049 mode.lanes = lanes;
4050 mode.stateNode = {
4051 containerInfo: portal.containerInfo,
4052 pendingChildren: null,
4053 implementation: portal.implementation
4054 };
4055 return mode;
4056 }
4057 function createCapturedValueAtFiber(value, source) {
4058 if ("object" === typeof value && null !== value) {
4059 var existing = CapturedStacks.get(value);
4060 if (void 0 !== existing) return existing;
4061 source = {
4062 value,
4063 source,
4064 stack: getStackByFiberInDevAndProd(source)
4065 };
4066 CapturedStacks.set(value, source);
4067 return source;
4068 }
4069 return {
4070 value,
4071 source,
4072 stack: getStackByFiberInDevAndProd(source)
4073 };
4074 }
4075 function pushTreeFork(workInProgress2, totalChildren) {
4076 warnIfNotHydrating();
4077 forkStack[forkStackIndex++] = treeForkCount;
4078 forkStack[forkStackIndex++] = treeForkProvider;
4079 treeForkProvider = workInProgress2;
4080 treeForkCount = totalChildren;
4081 }
4082 function pushTreeId(workInProgress2, totalChildren, index) {
4083 warnIfNotHydrating();
4084 idStack[idStackIndex++] = treeContextId;
4085 idStack[idStackIndex++] = treeContextOverflow;
4086 idStack[idStackIndex++] = treeContextProvider;
4087 treeContextProvider = workInProgress2;
4088 var baseIdWithLeadingBit = treeContextId;
4089 workInProgress2 = treeContextOverflow;
4090 var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;
4091 baseIdWithLeadingBit &= ~(1 << baseLength);
4092 index += 1;
4093 var length = 32 - clz32(totalChildren) + baseLength;
4094 if (30 < length) {
4095 var numberOfOverflowBits = baseLength - baseLength % 5;
4096 length = (baseIdWithLeadingBit & (1 << numberOfOverflowBits) - 1).toString(32);
4097 baseIdWithLeadingBit >>= numberOfOverflowBits;
4098 baseLength -= numberOfOverflowBits;
4099 treeContextId = 1 << 32 - clz32(totalChildren) + baseLength | index << baseLength | baseIdWithLeadingBit;
4100 treeContextOverflow = length + workInProgress2;
4101 } else
4102 treeContextId = 1 << length | index << baseLength | baseIdWithLeadingBit, treeContextOverflow = workInProgress2;
4103 }
4104 function pushMaterializedTreeId(workInProgress2) {
4105 warnIfNotHydrating();
4106 null !== workInProgress2.return && (pushTreeFork(workInProgress2, 1), pushTreeId(workInProgress2, 1, 0));
4107 }
4108 function popTreeContext(workInProgress2) {
4109 for (; workInProgress2 === treeForkProvider; )
4110 treeForkProvider = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null, treeForkCount = forkStack[--forkStackIndex], forkStack[forkStackIndex] = null;
4111 for (; workInProgress2 === treeContextProvider; )
4112 treeContextProvider = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextOverflow = idStack[--idStackIndex], idStack[idStackIndex] = null, treeContextId = idStack[--idStackIndex], idStack[idStackIndex] = null;
4113 }
4114 function getSuspendedTreeContext() {
4115 warnIfNotHydrating();
4116 return null !== treeContextProvider ? { id: treeContextId, overflow: treeContextOverflow } : null;
4117 }
4118 function restoreSuspendedTreeContext(workInProgress2, suspendedContext) {
4119 warnIfNotHydrating();
4120 idStack[idStackIndex++] = treeContextId;
4121 idStack[idStackIndex++] = treeContextOverflow;
4122 idStack[idStackIndex++] = treeContextProvider;
4123 treeContextId = suspendedContext.id;
4124 treeContextOverflow = suspendedContext.overflow;
4125 treeContextProvider = workInProgress2;
4126 }
4127 function warnIfNotHydrating() {
4128 isHydrating || console.error(
4129 "Expected to be hydrating. This is a bug in React. Please file an issue."
4130 );
4131 }
4132 function buildHydrationDiffNode(fiber, distanceFromLeaf) {
4133 if (null === fiber.return) {
4134 if (null === hydrationDiffRootDEV)
4135 hydrationDiffRootDEV = {
4136 fiber,
4137 children: [],
4138 serverProps: void 0,
4139 serverTail: [],
4140 distanceFromLeaf
4141 };
4142 else {
4143 if (hydrationDiffRootDEV.fiber !== fiber)
4144 throw Error(
4145 "Saw multiple hydration diff roots in a pass. This is a bug in React."
4146 );
4147 hydrationDiffRootDEV.distanceFromLeaf > distanceFromLeaf && (hydrationDiffRootDEV.distanceFromLeaf = distanceFromLeaf);
4148 }
4149 return hydrationDiffRootDEV;
4150 }
4151 var siblings = buildHydrationDiffNode(
4152 fiber.return,
4153 distanceFromLeaf + 1
4154 ).children;
4155 if (0 < siblings.length && siblings[siblings.length - 1].fiber === fiber)
4156 return siblings = siblings[siblings.length - 1], siblings.distanceFromLeaf > distanceFromLeaf && (siblings.distanceFromLeaf = distanceFromLeaf), siblings;
4157 distanceFromLeaf = {
4158 fiber,
4159 children: [],
4160 serverProps: void 0,
4161 serverTail: [],
4162 distanceFromLeaf
4163 };
4164 siblings.push(distanceFromLeaf);
4165 return distanceFromLeaf;
4166 }
4167 function warnIfHydrating() {
4168 isHydrating && console.error(
4169 "We should not be hydrating here. This is a bug in React. Please file a bug."
4170 );
4171 }
4172 function warnNonHydratedInstance(fiber, rejectedCandidate) {
4173 didSuspendOrErrorDEV || (fiber = buildHydrationDiffNode(fiber, 0), fiber.serverProps = null, null !== rejectedCandidate && (rejectedCandidate = describeHydratableInstanceForDevWarnings(rejectedCandidate), fiber.serverTail.push(rejectedCandidate)));
4174 }
4175 function throwOnHydrationMismatch(fiber) {
4176 var fromText = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : false, diff = "", diffRoot = hydrationDiffRootDEV;
4177 null !== diffRoot && (hydrationDiffRootDEV = null, diff = describeDiff(diffRoot));
4178 queueHydrationError(
4179 createCapturedValueAtFiber(
4180 Error(
4181 "Hydration failed because the server rendered " + (fromText ? "text" : "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
4182 ),
4183 fiber
4184 )
4185 );
4186 throw HydrationMismatchException;
4187 }
4188 function prepareToHydrateHostInstance(fiber) {
4189 var didHydrate = fiber.stateNode;
4190 var type = fiber.type, props = fiber.memoizedProps;
4191 didHydrate[internalInstanceKey] = fiber;
4192 didHydrate[internalPropsKey] = props;
4193 validatePropertiesInDevelopment(type, props);
4194 switch (type) {
4195 case "dialog":
4196 listenToNonDelegatedEvent("cancel", didHydrate);
4197 listenToNonDelegatedEvent("close", didHydrate);
4198 break;
4199 case "iframe":
4200 case "object":
4201 case "embed":
4202 listenToNonDelegatedEvent("load", didHydrate);
4203 break;
4204 case "video":
4205 case "audio":
4206 for (type = 0; type < mediaEventTypes.length; type++)
4207 listenToNonDelegatedEvent(mediaEventTypes[type], didHydrate);
4208 break;
4209 case "source":
4210 listenToNonDelegatedEvent("error", didHydrate);
4211 break;
4212 case "img":
4213 case "image":
4214 case "link":
4215 listenToNonDelegatedEvent("error", didHydrate);
4216 listenToNonDelegatedEvent("load", didHydrate);
4217 break;
4218 case "details":
4219 listenToNonDelegatedEvent("toggle", didHydrate);
4220 break;
4221 case "input":
4222 checkControlledValueProps("input", props);
4223 listenToNonDelegatedEvent("invalid", didHydrate);
4224 validateInputProps(didHydrate, props);
4225 initInput(
4226 didHydrate,
4227 props.value,
4228 props.defaultValue,
4229 props.checked,
4230 props.defaultChecked,
4231 props.type,
4232 props.name,
4233 true
4234 );
4235 break;
4236 case "option":
4237 validateOptionProps(didHydrate, props);
4238 break;
4239 case "select":
4240 checkControlledValueProps("select", props);
4241 listenToNonDelegatedEvent("invalid", didHydrate);
4242 validateSelectProps(didHydrate, props);
4243 break;
4244 case "textarea":
4245 checkControlledValueProps("textarea", props), listenToNonDelegatedEvent("invalid", didHydrate), validateTextareaProps(didHydrate, props), initTextarea(
4246 didHydrate,
4247 props.value,
4248 props.defaultValue,
4249 props.children
4250 );
4251 }
4252 type = props.children;
4253 "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;
4254 didHydrate || throwOnHydrationMismatch(fiber, true);
4255 }
4256 function popToNextHostParent(fiber) {
4257 for (hydrationParentFiber = fiber.return; hydrationParentFiber; )
4258 switch (hydrationParentFiber.tag) {
4259 case 5:
4260 case 31:
4261 case 13:
4262 rootOrSingletonContext = false;
4263 return;
4264 case 27:
4265 case 3:
4266 rootOrSingletonContext = true;
4267 return;
4268 default:
4269 hydrationParentFiber = hydrationParentFiber.return;
4270 }
4271 }
4272 function popHydrationState(fiber) {
4273 if (fiber !== hydrationParentFiber) return false;
4274 if (!isHydrating)
4275 return popToNextHostParent(fiber), isHydrating = true, false;
4276 var tag = fiber.tag, JSCompiler_temp;
4277 if (JSCompiler_temp = 3 !== tag && 27 !== tag) {
4278 if (JSCompiler_temp = 5 === tag)
4279 JSCompiler_temp = fiber.type, JSCompiler_temp = !("form" !== JSCompiler_temp && "button" !== JSCompiler_temp) || shouldSetTextContent(fiber.type, fiber.memoizedProps);
4280 JSCompiler_temp = !JSCompiler_temp;
4281 }
4282 if (JSCompiler_temp && nextHydratableInstance) {
4283 for (JSCompiler_temp = nextHydratableInstance; JSCompiler_temp; ) {
4284 var diffNode = buildHydrationDiffNode(fiber, 0), description = describeHydratableInstanceForDevWarnings(JSCompiler_temp);
4285 diffNode.serverTail.push(description);
4286 JSCompiler_temp = "Suspense" === description.type ? getNextHydratableInstanceAfterHydrationBoundary(JSCompiler_temp) : getNextHydratable(JSCompiler_temp.nextSibling);
4287 }
4288 throwOnHydrationMismatch(fiber);
4289 }
4290 popToNextHostParent(fiber);
4291 if (13 === tag) {
4292 fiber = fiber.memoizedState;
4293 fiber = null !== fiber ? fiber.dehydrated : null;
4294 if (!fiber)
4295 throw Error(
4296 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
4297 );
4298 nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
4299 } else if (31 === tag) {
4300 fiber = fiber.memoizedState;
4301 fiber = null !== fiber ? fiber.dehydrated : null;
4302 if (!fiber)
4303 throw Error(
4304 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
4305 );
4306 nextHydratableInstance = getNextHydratableInstanceAfterHydrationBoundary(fiber);
4307 } else
4308 27 === tag ? (tag = nextHydratableInstance, isSingletonScope(fiber.type) ? (fiber = previousHydratableOnEnteringScopedSingleton, previousHydratableOnEnteringScopedSingleton = null, nextHydratableInstance = fiber) : nextHydratableInstance = tag) : nextHydratableInstance = hydrationParentFiber ? getNextHydratable(fiber.stateNode.nextSibling) : null;
4309 return true;
4310 }
4311 function resetHydrationState() {
4312 nextHydratableInstance = hydrationParentFiber = null;
4313 didSuspendOrErrorDEV = isHydrating = false;
4314 }
4315 function upgradeHydrationErrorsToRecoverable() {
4316 var queuedErrors = hydrationErrors;
4317 null !== queuedErrors && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = queuedErrors : workInProgressRootRecoverableErrors.push.apply(
4318 workInProgressRootRecoverableErrors,
4319 queuedErrors
4320 ), hydrationErrors = null);
4321 return queuedErrors;
4322 }
4323 function queueHydrationError(error) {
4324 null === hydrationErrors ? hydrationErrors = [error] : hydrationErrors.push(error);
4325 }
4326 function emitPendingHydrationWarnings() {
4327 var diffRoot = hydrationDiffRootDEV;
4328 if (null !== diffRoot) {
4329 hydrationDiffRootDEV = null;
4330 for (var diff = describeDiff(diffRoot); 0 < diffRoot.children.length; )
4331 diffRoot = diffRoot.children[0];
4332 runWithFiberInDEV(diffRoot.fiber, function() {
4333 console.error(
4334 "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",
4335 "https://react.dev/link/hydration-mismatch",
4336 diff
4337 );
4338 });
4339 }
4340 }
4341 function resetContextDependencies() {
4342 lastContextDependency = currentlyRenderingFiber$1 = null;
4343 isDisallowedContextReadInDEV = false;
4344 }
4345 function pushProvider(providerFiber, context, nextValue) {
4346 push(valueCursor, context._currentValue, providerFiber);
4347 context._currentValue = nextValue;
4348 push(rendererCursorDEV, context._currentRenderer, providerFiber);
4349 void 0 !== context._currentRenderer && null !== context._currentRenderer && context._currentRenderer !== rendererSigil && console.error(
4350 "Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."
4351 );
4352 context._currentRenderer = rendererSigil;
4353 }
4354 function popProvider(context, providerFiber) {
4355 context._currentValue = valueCursor.current;
4356 var currentRenderer = rendererCursorDEV.current;
4357 pop(rendererCursorDEV, providerFiber);
4358 context._currentRenderer = currentRenderer;
4359 pop(valueCursor, providerFiber);
4360 }
4361 function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
4362 for (; null !== parent; ) {
4363 var alternate = parent.alternate;
4364 (parent.childLanes & renderLanes2) !== renderLanes2 ? (parent.childLanes |= renderLanes2, null !== alternate && (alternate.childLanes |= renderLanes2)) : null !== alternate && (alternate.childLanes & renderLanes2) !== renderLanes2 && (alternate.childLanes |= renderLanes2);
4365 if (parent === propagationRoot) break;
4366 parent = parent.return;
4367 }
4368 parent !== propagationRoot && console.error(
4369 "Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue."
4370 );
4371 }
4372 function propagateContextChanges(workInProgress2, contexts, renderLanes2, forcePropagateEntireTree) {
4373 var fiber = workInProgress2.child;
4374 null !== fiber && (fiber.return = workInProgress2);
4375 for (; null !== fiber; ) {
4376 var list = fiber.dependencies;
4377 if (null !== list) {
4378 var nextFiber = fiber.child;
4379 list = list.firstContext;
4380 a: for (; null !== list; ) {
4381 var dependency = list;
4382 list = fiber;
4383 for (var i = 0; i < contexts.length; i++)
4384 if (dependency.context === contexts[i]) {
4385 list.lanes |= renderLanes2;
4386 dependency = list.alternate;
4387 null !== dependency && (dependency.lanes |= renderLanes2);
4388 scheduleContextWorkOnParentPath(
4389 list.return,
4390 renderLanes2,
4391 workInProgress2
4392 );
4393 forcePropagateEntireTree || (nextFiber = null);
4394 break a;
4395 }
4396 list = dependency.next;
4397 }
4398 } else if (18 === fiber.tag) {
4399 nextFiber = fiber.return;
4400 if (null === nextFiber)
4401 throw Error(
4402 "We just came from a parent so we must have had a parent. This is a bug in React."
4403 );
4404 nextFiber.lanes |= renderLanes2;
4405 list = nextFiber.alternate;
4406 null !== list && (list.lanes |= renderLanes2);
4407 scheduleContextWorkOnParentPath(
4408 nextFiber,
4409 renderLanes2,
4410 workInProgress2
4411 );
4412 nextFiber = null;
4413 } else nextFiber = fiber.child;
4414 if (null !== nextFiber) nextFiber.return = fiber;
4415 else
4416 for (nextFiber = fiber; null !== nextFiber; ) {
4417 if (nextFiber === workInProgress2) {
4418 nextFiber = null;
4419 break;
4420 }
4421 fiber = nextFiber.sibling;
4422 if (null !== fiber) {
4423 fiber.return = nextFiber.return;
4424 nextFiber = fiber;
4425 break;
4426 }
4427 nextFiber = nextFiber.return;
4428 }
4429 fiber = nextFiber;
4430 }
4431 }
4432 function propagateParentContextChanges(current2, workInProgress2, renderLanes2, forcePropagateEntireTree) {
4433 current2 = null;
4434 for (var parent = workInProgress2, isInsidePropagationBailout = false; null !== parent; ) {
4435 if (!isInsidePropagationBailout) {
4436 if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = true;
4437 else if (0 !== (parent.flags & 262144)) break;
4438 }
4439 if (10 === parent.tag) {
4440 var currentParent = parent.alternate;
4441 if (null === currentParent)
4442 throw Error("Should have a current fiber. This is a bug in React.");
4443 currentParent = currentParent.memoizedProps;
4444 if (null !== currentParent) {
4445 var context = parent.type;
4446 objectIs(parent.pendingProps.value, currentParent.value) || (null !== current2 ? current2.push(context) : current2 = [context]);
4447 }
4448 } else if (parent === hostTransitionProviderCursor.current) {
4449 currentParent = parent.alternate;
4450 if (null === currentParent)
4451 throw Error("Should have a current fiber. This is a bug in React.");
4452 currentParent.memoizedState.memoizedState !== parent.memoizedState.memoizedState && (null !== current2 ? current2.push(HostTransitionContext) : current2 = [HostTransitionContext]);
4453 }
4454 parent = parent.return;
4455 }
4456 null !== current2 && propagateContextChanges(
4457 workInProgress2,
4458 current2,
4459 renderLanes2,
4460 forcePropagateEntireTree
4461 );
4462 workInProgress2.flags |= 262144;
4463 }
4464 function checkIfContextChanged(currentDependencies) {
4465 for (currentDependencies = currentDependencies.firstContext; null !== currentDependencies; ) {
4466 if (!objectIs(
4467 currentDependencies.context._currentValue,
4468 currentDependencies.memoizedValue
4469 ))
4470 return true;
4471 currentDependencies = currentDependencies.next;
4472 }
4473 return false;
4474 }
4475 function prepareToReadContext(workInProgress2) {
4476 currentlyRenderingFiber$1 = workInProgress2;
4477 lastContextDependency = null;
4478 workInProgress2 = workInProgress2.dependencies;
4479 null !== workInProgress2 && (workInProgress2.firstContext = null);
4480 }
4481 function readContext(context) {
4482 isDisallowedContextReadInDEV && console.error(
4483 "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()."
4484 );
4485 return readContextForConsumer(currentlyRenderingFiber$1, context);
4486 }
4487 function readContextDuringReconciliation(consumer, context) {
4488 null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);
4489 return readContextForConsumer(consumer, context);
4490 }
4491 function readContextForConsumer(consumer, context) {
4492 var value = context._currentValue;
4493 context = { context, memoizedValue: value, next: null };
4494 if (null === lastContextDependency) {
4495 if (null === consumer)
4496 throw Error(
4497 "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()."
4498 );
4499 lastContextDependency = context;
4500 consumer.dependencies = {
4501 lanes: 0,
4502 firstContext: context,
4503 _debugThenableState: null
4504 };
4505 consumer.flags |= 524288;
4506 } else lastContextDependency = lastContextDependency.next = context;
4507 return value;
4508 }
4509 function createCache() {
4510 return {
4511 controller: new AbortControllerLocal(),
4512 data: /* @__PURE__ */ new Map(),
4513 refCount: 0
4514 };
4515 }
4516 function retainCache(cache) {
4517 cache.controller.signal.aborted && console.warn(
4518 "A cache instance was retained after it was already freed. This likely indicates a bug in React."
4519 );
4520 cache.refCount++;
4521 }
4522 function releaseCache(cache) {
4523 cache.refCount--;
4524 0 > cache.refCount && console.warn(
4525 "A cache instance was released after it was already freed. This likely indicates a bug in React."
4526 );
4527 0 === cache.refCount && scheduleCallback$2(NormalPriority, function() {
4528 cache.controller.abort();
4529 });
4530 }
4531 function startUpdateTimerByLane(lane, method, fiber) {
4532 if (0 !== (lane & 127))
4533 0 > blockingUpdateTime && (blockingUpdateTime = now(), blockingUpdateTask = createTask(method), blockingUpdateMethodName = method, null != fiber && (blockingUpdateComponentName = getComponentNameFromFiber(fiber)), (executionContext & (RenderContext | CommitContext)) !== NoContext && (componentEffectSpawnedUpdate = true, blockingUpdateType = SPAWNED_UPDATE), lane = resolveEventTimeStamp(), method = resolveEventType(), lane !== blockingEventRepeatTime || method !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== method && (blockingUpdateType = SPAWNED_UPDATE), blockingEventTime = lane, blockingEventType = method);
4534 else if (0 !== (lane & 4194048) && 0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = createTask(method), transitionUpdateMethodName = method, null != fiber && (transitionUpdateComponentName = getComponentNameFromFiber(fiber)), 0 > transitionStartTime)) {
4535 lane = resolveEventTimeStamp();
4536 method = resolveEventType();
4537 if (lane !== transitionEventRepeatTime || method !== transitionEventType)
4538 transitionEventRepeatTime = -1.1;
4539 transitionEventTime = lane;
4540 transitionEventType = method;
4541 }
4542 }
4543 function startHostActionTimer(fiber) {
4544 if (0 > blockingUpdateTime) {
4545 blockingUpdateTime = now();
4546 blockingUpdateTask = null != fiber._debugTask ? fiber._debugTask : null;
4547 (executionContext & (RenderContext | CommitContext)) !== NoContext && (blockingUpdateType = SPAWNED_UPDATE);
4548 var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
4549 newEventTime !== blockingEventRepeatTime || newEventType !== blockingEventType ? blockingEventRepeatTime = -1.1 : null !== newEventType && (blockingUpdateType = SPAWNED_UPDATE);
4550 blockingEventTime = newEventTime;
4551 blockingEventType = newEventType;
4552 }
4553 if (0 > transitionUpdateTime && (transitionUpdateTime = now(), transitionUpdateTask = null != fiber._debugTask ? fiber._debugTask : null, 0 > transitionStartTime)) {
4554 fiber = resolveEventTimeStamp();
4555 newEventTime = resolveEventType();
4556 if (fiber !== transitionEventRepeatTime || newEventTime !== transitionEventType)
4557 transitionEventRepeatTime = -1.1;
4558 transitionEventTime = fiber;
4559 transitionEventType = newEventTime;
4560 }
4561 }
4562 function pushNestedEffectDurations() {
4563 var prevEffectDuration = profilerEffectDuration;
4564 profilerEffectDuration = 0;
4565 return prevEffectDuration;
4566 }
4567 function popNestedEffectDurations(prevEffectDuration) {
4568 var elapsedTime = profilerEffectDuration;
4569 profilerEffectDuration = prevEffectDuration;
4570 return elapsedTime;
4571 }
4572 function bubbleNestedEffectDurations(prevEffectDuration) {
4573 var elapsedTime = profilerEffectDuration;
4574 profilerEffectDuration += prevEffectDuration;
4575 return elapsedTime;
4576 }
4577 function resetComponentEffectTimers() {
4578 componentEffectEndTime = componentEffectStartTime = -1.1;
4579 }
4580 function pushComponentEffectStart() {
4581 var prevEffectStart = componentEffectStartTime;
4582 componentEffectStartTime = -1.1;
4583 return prevEffectStart;
4584 }
4585 function popComponentEffectStart(prevEffectStart) {
4586 0 <= prevEffectStart && (componentEffectStartTime = prevEffectStart);
4587 }
4588 function pushComponentEffectDuration() {
4589 var prevEffectDuration = componentEffectDuration;
4590 componentEffectDuration = -0;
4591 return prevEffectDuration;
4592 }
4593 function popComponentEffectDuration(prevEffectDuration) {
4594 0 <= prevEffectDuration && (componentEffectDuration = prevEffectDuration);
4595 }
4596 function pushComponentEffectErrors() {
4597 var prevErrors = componentEffectErrors;
4598 componentEffectErrors = null;
4599 return prevErrors;
4600 }
4601 function pushComponentEffectDidSpawnUpdate() {
4602 var prev = componentEffectSpawnedUpdate;
4603 componentEffectSpawnedUpdate = false;
4604 return prev;
4605 }
4606 function startProfilerTimer(fiber) {
4607 profilerStartTime = now();
4608 0 > fiber.actualStartTime && (fiber.actualStartTime = profilerStartTime);
4609 }
4610 function stopProfilerTimerIfRunningAndRecordDuration(fiber) {
4611 if (0 <= profilerStartTime) {
4612 var elapsedTime = now() - profilerStartTime;
4613 fiber.actualDuration += elapsedTime;
4614 fiber.selfBaseDuration = elapsedTime;
4615 profilerStartTime = -1;
4616 }
4617 }
4618 function stopProfilerTimerIfRunningAndRecordIncompleteDuration(fiber) {
4619 if (0 <= profilerStartTime) {
4620 var elapsedTime = now() - profilerStartTime;
4621 fiber.actualDuration += elapsedTime;
4622 profilerStartTime = -1;
4623 }
4624 }
4625 function recordEffectDuration() {
4626 if (0 <= profilerStartTime) {
4627 var endTime = now(), elapsedTime = endTime - profilerStartTime;
4628 profilerStartTime = -1;
4629 profilerEffectDuration += elapsedTime;
4630 componentEffectDuration += elapsedTime;
4631 componentEffectEndTime = endTime;
4632 }
4633 }
4634 function recordEffectError(errorInfo) {
4635 null === componentEffectErrors && (componentEffectErrors = []);
4636 componentEffectErrors.push(errorInfo);
4637 null === commitErrors && (commitErrors = []);
4638 commitErrors.push(errorInfo);
4639 }
4640 function startEffectTimer() {
4641 profilerStartTime = now();
4642 0 > componentEffectStartTime && (componentEffectStartTime = profilerStartTime);
4643 }
4644 function transferActualDuration(fiber) {
4645 for (var child = fiber.child; child; )
4646 fiber.actualDuration += child.actualDuration, child = child.sibling;
4647 }
4648 function entangleAsyncAction(transition, thenable) {
4649 if (null === currentEntangledListeners) {
4650 var entangledListeners = currentEntangledListeners = [];
4651 currentEntangledPendingCount = 0;
4652 currentEntangledLane = requestTransitionLane();
4653 currentEntangledActionThenable = {
4654 status: "pending",
4655 value: void 0,
4656 then: function(resolve) {
4657 entangledListeners.push(resolve);
4658 }
4659 };
4660 }
4661 currentEntangledPendingCount++;
4662 thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);
4663 return thenable;
4664 }
4665 function pingEngtangledActionScope() {
4666 if (0 === --currentEntangledPendingCount && (-1 < transitionUpdateTime || (transitionStartTime = -1.1), null !== currentEntangledListeners)) {
4667 null !== currentEntangledActionThenable && (currentEntangledActionThenable.status = "fulfilled");
4668 var listeners = currentEntangledListeners;
4669 currentEntangledListeners = null;
4670 currentEntangledLane = 0;
4671 currentEntangledActionThenable = null;
4672 for (var i = 0; i < listeners.length; i++) (0, listeners[i])();
4673 }
4674 }
4675 function chainThenableValue(thenable, result) {
4676 var listeners = [], thenableWithOverride = {
4677 status: "pending",
4678 value: null,
4679 reason: null,
4680 then: function(resolve) {
4681 listeners.push(resolve);
4682 }
4683 };
4684 thenable.then(
4685 function() {
4686 thenableWithOverride.status = "fulfilled";
4687 thenableWithOverride.value = result;
4688 for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);
4689 },
4690 function(error) {
4691 thenableWithOverride.status = "rejected";
4692 thenableWithOverride.reason = error;
4693 for (error = 0; error < listeners.length; error++)
4694 (0, listeners[error])(void 0);
4695 }
4696 );
4697 return thenableWithOverride;
4698 }
4699 function peekCacheFromPool() {
4700 var cacheResumedFromPreviousRender = resumedCache.current;
4701 return null !== cacheResumedFromPreviousRender ? cacheResumedFromPreviousRender : workInProgressRoot.pooledCache;
4702 }
4703 function pushTransition(offscreenWorkInProgress, prevCachePool) {
4704 null === prevCachePool ? push(resumedCache, resumedCache.current, offscreenWorkInProgress) : push(resumedCache, prevCachePool.pool, offscreenWorkInProgress);
4705 }
4706 function getSuspendedCache() {
4707 var cacheFromPool = peekCacheFromPool();
4708 return null === cacheFromPool ? null : { parent: CacheContext._currentValue, pool: cacheFromPool };
4709 }
4710 function createThenableState() {
4711 return { didWarnAboutUncachedPromise: false, thenables: [] };
4712 }
4713 function isThenableResolved(thenable) {
4714 thenable = thenable.status;
4715 return "fulfilled" === thenable || "rejected" === thenable;
4716 }
4717 function trackUsedThenable(thenableState2, thenable, index) {
4718 null !== ReactSharedInternals.actQueue && (ReactSharedInternals.didUsePromise = true);
4719 var trackedThenables = thenableState2.thenables;
4720 index = trackedThenables[index];
4721 void 0 === index ? trackedThenables.push(thenable) : index !== thenable && (thenableState2.didWarnAboutUncachedPromise || (thenableState2.didWarnAboutUncachedPromise = true, console.error(
4722 "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."
4723 )), thenable.then(noop$1, noop$1), thenable = index);
4724 if (void 0 === thenable._debugInfo) {
4725 thenableState2 = performance.now();
4726 trackedThenables = thenable.displayName;
4727 var ioInfo = {
4728 name: "string" === typeof trackedThenables ? trackedThenables : "Promise",
4729 start: thenableState2,
4730 end: thenableState2,
4731 value: thenable
4732 };
4733 thenable._debugInfo = [{ awaited: ioInfo }];
4734 "fulfilled" !== thenable.status && "rejected" !== thenable.status && (thenableState2 = function() {
4735 ioInfo.end = performance.now();
4736 }, thenable.then(thenableState2, thenableState2));
4737 }
4738 switch (thenable.status) {
4739 case "fulfilled":
4740 return thenable.value;
4741 case "rejected":
4742 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4743 default:
4744 if ("string" === typeof thenable.status)
4745 thenable.then(noop$1, noop$1);
4746 else {
4747 thenableState2 = workInProgressRoot;
4748 if (null !== thenableState2 && 100 < thenableState2.shellSuspendCounter)
4749 throw Error(
4750 "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."
4751 );
4752 thenableState2 = thenable;
4753 thenableState2.status = "pending";
4754 thenableState2.then(
4755 function(fulfilledValue) {
4756 if ("pending" === thenable.status) {
4757 var fulfilledThenable = thenable;
4758 fulfilledThenable.status = "fulfilled";
4759 fulfilledThenable.value = fulfilledValue;
4760 }
4761 },
4762 function(error) {
4763 if ("pending" === thenable.status) {
4764 var rejectedThenable = thenable;
4765 rejectedThenable.status = "rejected";
4766 rejectedThenable.reason = error;
4767 }
4768 }
4769 );
4770 }
4771 switch (thenable.status) {
4772 case "fulfilled":
4773 return thenable.value;
4774 case "rejected":
4775 throw thenableState2 = thenable.reason, checkIfUseWrappedInAsyncCatch(thenableState2), thenableState2;
4776 }
4777 suspendedThenable = thenable;
4778 needsToResetSuspendedThenableDEV = true;
4779 throw SuspenseException;
4780 }
4781 }
4782 function resolveLazy(lazyType) {
4783 try {
4784 return callLazyInitInDEV(lazyType);
4785 } catch (x) {
4786 if (null !== x && "object" === typeof x && "function" === typeof x.then)
4787 throw suspendedThenable = x, needsToResetSuspendedThenableDEV = true, SuspenseException;
4788 throw x;
4789 }
4790 }
4791 function getSuspendedThenable() {
4792 if (null === suspendedThenable)
4793 throw Error(
4794 "Expected a suspended thenable. This is a bug in React. Please file an issue."
4795 );
4796 var thenable = suspendedThenable;
4797 suspendedThenable = null;
4798 needsToResetSuspendedThenableDEV = false;
4799 return thenable;
4800 }
4801 function checkIfUseWrappedInAsyncCatch(rejectedReason) {
4802 if (rejectedReason === SuspenseException || rejectedReason === SuspenseActionException)
4803 throw Error(
4804 "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."
4805 );
4806 }
4807 function pushDebugInfo(debugInfo) {
4808 var previousDebugInfo = currentDebugInfo;
4809 null != debugInfo && (currentDebugInfo = null === previousDebugInfo ? debugInfo : previousDebugInfo.concat(debugInfo));
4810 return previousDebugInfo;
4811 }
4812 function getCurrentDebugTask() {
4813 var debugInfo = currentDebugInfo;
4814 if (null != debugInfo) {
4815 for (var i = debugInfo.length - 1; 0 <= i; i--)
4816 if (null != debugInfo[i].name) {
4817 var debugTask = debugInfo[i].debugTask;
4818 if (null != debugTask) return debugTask;
4819 }
4820 }
4821 return null;
4822 }
4823 function validateFragmentProps(element, fiber, returnFiber) {
4824 for (var keys = Object.keys(element.props), i = 0; i < keys.length; i++) {
4825 var key = keys[i];
4826 if ("children" !== key && "key" !== key) {
4827 null === fiber && (fiber = createFiberFromElement(element, returnFiber.mode, 0), fiber._debugInfo = currentDebugInfo, fiber.return = returnFiber);
4828 runWithFiberInDEV(
4829 fiber,
4830 function(erroredKey) {
4831 console.error(
4832 "Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",
4833 erroredKey
4834 );
4835 },
4836 key
4837 );
4838 break;
4839 }
4840 }
4841 }
4842 function unwrapThenable(thenable) {
4843 var index = thenableIndexCounter$1;
4844 thenableIndexCounter$1 += 1;
4845 null === thenableState$1 && (thenableState$1 = createThenableState());
4846 return trackUsedThenable(thenableState$1, thenable, index);
4847 }
4848 function coerceRef(workInProgress2, element) {
4849 element = element.props.ref;
4850 workInProgress2.ref = void 0 !== element ? element : null;
4851 }
4852 function throwOnInvalidObjectTypeImpl(returnFiber, newChild) {
4853 if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)
4854 throw Error(
4855 '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.'
4856 );
4857 returnFiber = Object.prototype.toString.call(newChild);
4858 throw Error(
4859 "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."
4860 );
4861 }
4862 function throwOnInvalidObjectType(returnFiber, newChild) {
4863 var debugTask = getCurrentDebugTask();
4864 null !== debugTask ? debugTask.run(
4865 throwOnInvalidObjectTypeImpl.bind(null, returnFiber, newChild)
4866 ) : throwOnInvalidObjectTypeImpl(returnFiber, newChild);
4867 }
4868 function warnOnFunctionTypeImpl(returnFiber, invalidChild) {
4869 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
4870 ownerHasFunctionTypeWarning[parentName] || (ownerHasFunctionTypeWarning[parentName] = true, invalidChild = invalidChild.displayName || invalidChild.name || "Component", 3 === returnFiber.tag ? console.error(
4871 "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)",
4872 invalidChild,
4873 invalidChild,
4874 invalidChild
4875 ) : console.error(
4876 "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>",
4877 invalidChild,
4878 invalidChild,
4879 parentName,
4880 invalidChild,
4881 parentName
4882 ));
4883 }
4884 function warnOnFunctionType(returnFiber, invalidChild) {
4885 var debugTask = getCurrentDebugTask();
4886 null !== debugTask ? debugTask.run(
4887 warnOnFunctionTypeImpl.bind(null, returnFiber, invalidChild)
4888 ) : warnOnFunctionTypeImpl(returnFiber, invalidChild);
4889 }
4890 function warnOnSymbolTypeImpl(returnFiber, invalidChild) {
4891 var parentName = getComponentNameFromFiber(returnFiber) || "Component";
4892 ownerHasSymbolTypeWarning[parentName] || (ownerHasSymbolTypeWarning[parentName] = true, invalidChild = String(invalidChild), 3 === returnFiber.tag ? console.error(
4893 "Symbols are not valid as a React child.\n root.render(%s)",
4894 invalidChild
4895 ) : console.error(
4896 "Symbols are not valid as a React child.\n <%s>%s</%s>",
4897 parentName,
4898 invalidChild,
4899 parentName
4900 ));
4901 }
4902 function warnOnSymbolType(returnFiber, invalidChild) {
4903 var debugTask = getCurrentDebugTask();
4904 null !== debugTask ? debugTask.run(
4905 warnOnSymbolTypeImpl.bind(null, returnFiber, invalidChild)
4906 ) : warnOnSymbolTypeImpl(returnFiber, invalidChild);
4907 }
4908 function createChildReconciler(shouldTrackSideEffects) {
4909 function deleteChild(returnFiber, childToDelete) {
4910 if (shouldTrackSideEffects) {
4911 var deletions = returnFiber.deletions;
4912 null === deletions ? (returnFiber.deletions = [childToDelete], returnFiber.flags |= 16) : deletions.push(childToDelete);
4913 }
4914 }
4915 function deleteRemainingChildren(returnFiber, currentFirstChild) {
4916 if (!shouldTrackSideEffects) return null;
4917 for (; null !== currentFirstChild; )
4918 deleteChild(returnFiber, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
4919 return null;
4920 }
4921 function mapRemainingChildren(currentFirstChild) {
4922 for (var existingChildren = /* @__PURE__ */ new Map(); null !== currentFirstChild; )
4923 null !== currentFirstChild.key ? existingChildren.set(currentFirstChild.key, currentFirstChild) : existingChildren.set(currentFirstChild.index, currentFirstChild), currentFirstChild = currentFirstChild.sibling;
4924 return existingChildren;
4925 }
4926 function useFiber(fiber, pendingProps) {
4927 fiber = createWorkInProgress(fiber, pendingProps);
4928 fiber.index = 0;
4929 fiber.sibling = null;
4930 return fiber;
4931 }
4932 function placeChild(newFiber, lastPlacedIndex, newIndex) {
4933 newFiber.index = newIndex;
4934 if (!shouldTrackSideEffects)
4935 return newFiber.flags |= 1048576, lastPlacedIndex;
4936 newIndex = newFiber.alternate;
4937 if (null !== newIndex)
4938 return newIndex = newIndex.index, newIndex < lastPlacedIndex ? (newFiber.flags |= 67108866, lastPlacedIndex) : newIndex;
4939 newFiber.flags |= 67108866;
4940 return lastPlacedIndex;
4941 }
4942 function placeSingleChild(newFiber) {
4943 shouldTrackSideEffects && null === newFiber.alternate && (newFiber.flags |= 67108866);
4944 return newFiber;
4945 }
4946 function updateTextNode(returnFiber, current2, textContent, lanes) {
4947 if (null === current2 || 6 !== current2.tag)
4948 return current2 = createFiberFromText(
4949 textContent,
4950 returnFiber.mode,
4951 lanes
4952 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
4953 current2 = useFiber(current2, textContent);
4954 current2.return = returnFiber;
4955 current2._debugInfo = currentDebugInfo;
4956 return current2;
4957 }
4958 function updateElement(returnFiber, current2, element, lanes) {
4959 var elementType = element.type;
4960 if (elementType === REACT_FRAGMENT_TYPE)
4961 return current2 = updateFragment(
4962 returnFiber,
4963 current2,
4964 element.props.children,
4965 lanes,
4966 element.key
4967 ), validateFragmentProps(element, current2, returnFiber), current2;
4968 if (null !== current2 && (current2.elementType === elementType || isCompatibleFamilyForHotReloading(current2, element) || "object" === typeof elementType && null !== elementType && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current2.type))
4969 return current2 = useFiber(current2, element.props), coerceRef(current2, element), current2.return = returnFiber, current2._debugOwner = element._owner, current2._debugInfo = currentDebugInfo, current2;
4970 current2 = createFiberFromElement(element, returnFiber.mode, lanes);
4971 coerceRef(current2, element);
4972 current2.return = returnFiber;
4973 current2._debugInfo = currentDebugInfo;
4974 return current2;
4975 }
4976 function updatePortal(returnFiber, current2, portal, lanes) {
4977 if (null === current2 || 4 !== current2.tag || current2.stateNode.containerInfo !== portal.containerInfo || current2.stateNode.implementation !== portal.implementation)
4978 return current2 = createFiberFromPortal(portal, returnFiber.mode, lanes), current2.return = returnFiber, current2._debugInfo = currentDebugInfo, current2;
4979 current2 = useFiber(current2, portal.children || []);
4980 current2.return = returnFiber;
4981 current2._debugInfo = currentDebugInfo;
4982 return current2;
4983 }
4984 function updateFragment(returnFiber, current2, fragment, lanes, key) {
4985 if (null === current2 || 7 !== current2.tag)
4986 return current2 = createFiberFromFragment(
4987 fragment,
4988 returnFiber.mode,
4989 lanes,
4990 key
4991 ), current2.return = returnFiber, current2._debugOwner = returnFiber, current2._debugTask = returnFiber._debugTask, current2._debugInfo = currentDebugInfo, current2;
4992 current2 = useFiber(current2, fragment);
4993 current2.return = returnFiber;
4994 current2._debugInfo = currentDebugInfo;
4995 return current2;
4996 }
4997 function createChild(returnFiber, newChild, lanes) {
4998 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
4999 return newChild = createFiberFromText(
5000 "" + newChild,
5001 returnFiber.mode,
5002 lanes
5003 ), newChild.return = returnFiber, newChild._debugOwner = returnFiber, newChild._debugTask = returnFiber._debugTask, newChild._debugInfo = currentDebugInfo, newChild;
5004 if ("object" === typeof newChild && null !== newChild) {
5005 switch (newChild.$$typeof) {
5006 case REACT_ELEMENT_TYPE:
5007 return lanes = createFiberFromElement(
5008 newChild,
5009 returnFiber.mode,
5010 lanes
5011 ), coerceRef(lanes, newChild), lanes.return = returnFiber, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5012 case REACT_PORTAL_TYPE:
5013 return newChild = createFiberFromPortal(
5014 newChild,
5015 returnFiber.mode,
5016 lanes
5017 ), newChild.return = returnFiber, newChild._debugInfo = currentDebugInfo, newChild;
5018 case REACT_LAZY_TYPE:
5019 var _prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5020 newChild = resolveLazy(newChild);
5021 returnFiber = createChild(returnFiber, newChild, lanes);
5022 currentDebugInfo = _prevDebugInfo;
5023 return returnFiber;
5024 }
5025 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5026 return lanes = createFiberFromFragment(
5027 newChild,
5028 returnFiber.mode,
5029 lanes,
5030 null
5031 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, returnFiber = pushDebugInfo(newChild._debugInfo), lanes._debugInfo = currentDebugInfo, currentDebugInfo = returnFiber, lanes;
5032 if ("function" === typeof newChild.then)
5033 return _prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = createChild(
5034 returnFiber,
5035 unwrapThenable(newChild),
5036 lanes
5037 ), currentDebugInfo = _prevDebugInfo, returnFiber;
5038 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5039 return createChild(
5040 returnFiber,
5041 readContextDuringReconciliation(returnFiber, newChild),
5042 lanes
5043 );
5044 throwOnInvalidObjectType(returnFiber, newChild);
5045 }
5046 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5047 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5048 return null;
5049 }
5050 function updateSlot(returnFiber, oldFiber, newChild, lanes) {
5051 var key = null !== oldFiber ? oldFiber.key : null;
5052 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5053 return null !== key ? null : updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
5054 if ("object" === typeof newChild && null !== newChild) {
5055 switch (newChild.$$typeof) {
5056 case REACT_ELEMENT_TYPE:
5057 return newChild.key === key ? (key = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5058 returnFiber,
5059 oldFiber,
5060 newChild,
5061 lanes
5062 ), currentDebugInfo = key, returnFiber) : null;
5063 case REACT_PORTAL_TYPE:
5064 return newChild.key === key ? updatePortal(returnFiber, oldFiber, newChild, lanes) : null;
5065 case REACT_LAZY_TYPE:
5066 return key = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = updateSlot(
5067 returnFiber,
5068 oldFiber,
5069 newChild,
5070 lanes
5071 ), currentDebugInfo = key, returnFiber;
5072 }
5073 if (isArrayImpl(newChild) || getIteratorFn(newChild)) {
5074 if (null !== key) return null;
5075 key = pushDebugInfo(newChild._debugInfo);
5076 returnFiber = updateFragment(
5077 returnFiber,
5078 oldFiber,
5079 newChild,
5080 lanes,
5081 null
5082 );
5083 currentDebugInfo = key;
5084 return returnFiber;
5085 }
5086 if ("function" === typeof newChild.then)
5087 return key = pushDebugInfo(newChild._debugInfo), returnFiber = updateSlot(
5088 returnFiber,
5089 oldFiber,
5090 unwrapThenable(newChild),
5091 lanes
5092 ), currentDebugInfo = key, returnFiber;
5093 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5094 return updateSlot(
5095 returnFiber,
5096 oldFiber,
5097 readContextDuringReconciliation(returnFiber, newChild),
5098 lanes
5099 );
5100 throwOnInvalidObjectType(returnFiber, newChild);
5101 }
5102 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5103 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5104 return null;
5105 }
5106 function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
5107 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5108 return existingChildren = existingChildren.get(newIdx) || null, updateTextNode(returnFiber, existingChildren, "" + newChild, lanes);
5109 if ("object" === typeof newChild && null !== newChild) {
5110 switch (newChild.$$typeof) {
5111 case REACT_ELEMENT_TYPE:
5112 return newIdx = existingChildren.get(
5113 null === newChild.key ? newIdx : newChild.key
5114 ) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateElement(
5115 returnFiber,
5116 newIdx,
5117 newChild,
5118 lanes
5119 ), currentDebugInfo = existingChildren, returnFiber;
5120 case REACT_PORTAL_TYPE:
5121 return existingChildren = existingChildren.get(
5122 null === newChild.key ? newIdx : newChild.key
5123 ) || null, updatePortal(returnFiber, existingChildren, newChild, lanes);
5124 case REACT_LAZY_TYPE:
5125 var _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo);
5126 newChild = resolveLazy(newChild);
5127 returnFiber = updateFromMap(
5128 existingChildren,
5129 returnFiber,
5130 newIdx,
5131 newChild,
5132 lanes
5133 );
5134 currentDebugInfo = _prevDebugInfo7;
5135 return returnFiber;
5136 }
5137 if (isArrayImpl(newChild) || getIteratorFn(newChild))
5138 return newIdx = existingChildren.get(newIdx) || null, existingChildren = pushDebugInfo(newChild._debugInfo), returnFiber = updateFragment(
5139 returnFiber,
5140 newIdx,
5141 newChild,
5142 lanes,
5143 null
5144 ), currentDebugInfo = existingChildren, returnFiber;
5145 if ("function" === typeof newChild.then)
5146 return _prevDebugInfo7 = pushDebugInfo(newChild._debugInfo), returnFiber = updateFromMap(
5147 existingChildren,
5148 returnFiber,
5149 newIdx,
5150 unwrapThenable(newChild),
5151 lanes
5152 ), currentDebugInfo = _prevDebugInfo7, returnFiber;
5153 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5154 return updateFromMap(
5155 existingChildren,
5156 returnFiber,
5157 newIdx,
5158 readContextDuringReconciliation(returnFiber, newChild),
5159 lanes
5160 );
5161 throwOnInvalidObjectType(returnFiber, newChild);
5162 }
5163 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5164 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5165 return null;
5166 }
5167 function warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys) {
5168 if ("object" !== typeof child || null === child) return knownKeys;
5169 switch (child.$$typeof) {
5170 case REACT_ELEMENT_TYPE:
5171 case REACT_PORTAL_TYPE:
5172 warnForMissingKey(returnFiber, workInProgress2, child);
5173 var key = child.key;
5174 if ("string" !== typeof key) break;
5175 if (null === knownKeys) {
5176 knownKeys = /* @__PURE__ */ new Set();
5177 knownKeys.add(key);
5178 break;
5179 }
5180 if (!knownKeys.has(key)) {
5181 knownKeys.add(key);
5182 break;
5183 }
5184 runWithFiberInDEV(workInProgress2, function() {
5185 console.error(
5186 "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.",
5187 key
5188 );
5189 });
5190 break;
5191 case REACT_LAZY_TYPE:
5192 child = resolveLazy(child), warnOnInvalidKey(returnFiber, workInProgress2, child, knownKeys);
5193 }
5194 return knownKeys;
5195 }
5196 function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
5197 for (var knownKeys = null, resultingFirstChild = null, previousNewFiber = null, oldFiber = currentFirstChild, newIdx = currentFirstChild = 0, nextOldFiber = null; null !== oldFiber && newIdx < newChildren.length; newIdx++) {
5198 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
5199 var newFiber = updateSlot(
5200 returnFiber,
5201 oldFiber,
5202 newChildren[newIdx],
5203 lanes
5204 );
5205 if (null === newFiber) {
5206 null === oldFiber && (oldFiber = nextOldFiber);
5207 break;
5208 }
5209 knownKeys = warnOnInvalidKey(
5210 returnFiber,
5211 newFiber,
5212 newChildren[newIdx],
5213 knownKeys
5214 );
5215 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
5216 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
5217 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
5218 previousNewFiber = newFiber;
5219 oldFiber = nextOldFiber;
5220 }
5221 if (newIdx === newChildren.length)
5222 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
5223 if (null === oldFiber) {
5224 for (; newIdx < newChildren.length; newIdx++)
5225 oldFiber = createChild(returnFiber, newChildren[newIdx], lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
5226 returnFiber,
5227 oldFiber,
5228 newChildren[newIdx],
5229 knownKeys
5230 ), currentFirstChild = placeChild(
5231 oldFiber,
5232 currentFirstChild,
5233 newIdx
5234 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
5235 isHydrating && pushTreeFork(returnFiber, newIdx);
5236 return resultingFirstChild;
5237 }
5238 for (oldFiber = mapRemainingChildren(oldFiber); newIdx < newChildren.length; newIdx++)
5239 nextOldFiber = updateFromMap(
5240 oldFiber,
5241 returnFiber,
5242 newIdx,
5243 newChildren[newIdx],
5244 lanes
5245 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
5246 returnFiber,
5247 nextOldFiber,
5248 newChildren[newIdx],
5249 knownKeys
5250 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
5251 null === nextOldFiber.key ? newIdx : nextOldFiber.key
5252 ), currentFirstChild = placeChild(
5253 nextOldFiber,
5254 currentFirstChild,
5255 newIdx
5256 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
5257 shouldTrackSideEffects && oldFiber.forEach(function(child) {
5258 return deleteChild(returnFiber, child);
5259 });
5260 isHydrating && pushTreeFork(returnFiber, newIdx);
5261 return resultingFirstChild;
5262 }
5263 function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildren, lanes) {
5264 if (null == newChildren)
5265 throw Error("An iterable object provided no iterator.");
5266 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()) {
5267 oldFiber.index > newIdx ? (nextOldFiber = oldFiber, oldFiber = null) : nextOldFiber = oldFiber.sibling;
5268 var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
5269 if (null === newFiber) {
5270 null === oldFiber && (oldFiber = nextOldFiber);
5271 break;
5272 }
5273 knownKeys = warnOnInvalidKey(
5274 returnFiber,
5275 newFiber,
5276 step.value,
5277 knownKeys
5278 );
5279 shouldTrackSideEffects && oldFiber && null === newFiber.alternate && deleteChild(returnFiber, oldFiber);
5280 currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);
5281 null === previousNewFiber ? resultingFirstChild = newFiber : previousNewFiber.sibling = newFiber;
5282 previousNewFiber = newFiber;
5283 oldFiber = nextOldFiber;
5284 }
5285 if (step.done)
5286 return deleteRemainingChildren(returnFiber, oldFiber), isHydrating && pushTreeFork(returnFiber, newIdx), resultingFirstChild;
5287 if (null === oldFiber) {
5288 for (; !step.done; newIdx++, step = newChildren.next())
5289 oldFiber = createChild(returnFiber, step.value, lanes), null !== oldFiber && (knownKeys = warnOnInvalidKey(
5290 returnFiber,
5291 oldFiber,
5292 step.value,
5293 knownKeys
5294 ), currentFirstChild = placeChild(
5295 oldFiber,
5296 currentFirstChild,
5297 newIdx
5298 ), null === previousNewFiber ? resultingFirstChild = oldFiber : previousNewFiber.sibling = oldFiber, previousNewFiber = oldFiber);
5299 isHydrating && pushTreeFork(returnFiber, newIdx);
5300 return resultingFirstChild;
5301 }
5302 for (oldFiber = mapRemainingChildren(oldFiber); !step.done; newIdx++, step = newChildren.next())
5303 nextOldFiber = updateFromMap(
5304 oldFiber,
5305 returnFiber,
5306 newIdx,
5307 step.value,
5308 lanes
5309 ), null !== nextOldFiber && (knownKeys = warnOnInvalidKey(
5310 returnFiber,
5311 nextOldFiber,
5312 step.value,
5313 knownKeys
5314 ), shouldTrackSideEffects && null !== nextOldFiber.alternate && oldFiber.delete(
5315 null === nextOldFiber.key ? newIdx : nextOldFiber.key
5316 ), currentFirstChild = placeChild(
5317 nextOldFiber,
5318 currentFirstChild,
5319 newIdx
5320 ), null === previousNewFiber ? resultingFirstChild = nextOldFiber : previousNewFiber.sibling = nextOldFiber, previousNewFiber = nextOldFiber);
5321 shouldTrackSideEffects && oldFiber.forEach(function(child) {
5322 return deleteChild(returnFiber, child);
5323 });
5324 isHydrating && pushTreeFork(returnFiber, newIdx);
5325 return resultingFirstChild;
5326 }
5327 function reconcileChildFibersImpl(returnFiber, currentFirstChild, newChild, lanes) {
5328 "object" === typeof newChild && null !== newChild && newChild.type === REACT_FRAGMENT_TYPE && null === newChild.key && (validateFragmentProps(newChild, null, returnFiber), newChild = newChild.props.children);
5329 if ("object" === typeof newChild && null !== newChild) {
5330 switch (newChild.$$typeof) {
5331 case REACT_ELEMENT_TYPE:
5332 var prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5333 a: {
5334 for (var key = newChild.key; null !== currentFirstChild; ) {
5335 if (currentFirstChild.key === key) {
5336 key = newChild.type;
5337 if (key === REACT_FRAGMENT_TYPE) {
5338 if (7 === currentFirstChild.tag) {
5339 deleteRemainingChildren(
5340 returnFiber,
5341 currentFirstChild.sibling
5342 );
5343 lanes = useFiber(
5344 currentFirstChild,
5345 newChild.props.children
5346 );
5347 lanes.return = returnFiber;
5348 lanes._debugOwner = newChild._owner;
5349 lanes._debugInfo = currentDebugInfo;
5350 validateFragmentProps(newChild, lanes, returnFiber);
5351 returnFiber = lanes;
5352 break a;
5353 }
5354 } else if (currentFirstChild.elementType === key || isCompatibleFamilyForHotReloading(
5355 currentFirstChild,
5356 newChild
5357 ) || "object" === typeof key && null !== key && key.$$typeof === REACT_LAZY_TYPE && resolveLazy(key) === currentFirstChild.type) {
5358 deleteRemainingChildren(
5359 returnFiber,
5360 currentFirstChild.sibling
5361 );
5362 lanes = useFiber(currentFirstChild, newChild.props);
5363 coerceRef(lanes, newChild);
5364 lanes.return = returnFiber;
5365 lanes._debugOwner = newChild._owner;
5366 lanes._debugInfo = currentDebugInfo;
5367 returnFiber = lanes;
5368 break a;
5369 }
5370 deleteRemainingChildren(returnFiber, currentFirstChild);
5371 break;
5372 } else deleteChild(returnFiber, currentFirstChild);
5373 currentFirstChild = currentFirstChild.sibling;
5374 }
5375 newChild.type === REACT_FRAGMENT_TYPE ? (lanes = createFiberFromFragment(
5376 newChild.props.children,
5377 returnFiber.mode,
5378 lanes,
5379 newChild.key
5380 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, validateFragmentProps(newChild, lanes, returnFiber), returnFiber = lanes) : (lanes = createFiberFromElement(
5381 newChild,
5382 returnFiber.mode,
5383 lanes
5384 ), coerceRef(lanes, newChild), lanes.return = returnFiber, lanes._debugInfo = currentDebugInfo, returnFiber = lanes);
5385 }
5386 returnFiber = placeSingleChild(returnFiber);
5387 currentDebugInfo = prevDebugInfo;
5388 return returnFiber;
5389 case REACT_PORTAL_TYPE:
5390 a: {
5391 prevDebugInfo = newChild;
5392 for (newChild = prevDebugInfo.key; null !== currentFirstChild; ) {
5393 if (currentFirstChild.key === newChild)
5394 if (4 === currentFirstChild.tag && currentFirstChild.stateNode.containerInfo === prevDebugInfo.containerInfo && currentFirstChild.stateNode.implementation === prevDebugInfo.implementation) {
5395 deleteRemainingChildren(
5396 returnFiber,
5397 currentFirstChild.sibling
5398 );
5399 lanes = useFiber(
5400 currentFirstChild,
5401 prevDebugInfo.children || []
5402 );
5403 lanes.return = returnFiber;
5404 returnFiber = lanes;
5405 break a;
5406 } else {
5407 deleteRemainingChildren(returnFiber, currentFirstChild);
5408 break;
5409 }
5410 else deleteChild(returnFiber, currentFirstChild);
5411 currentFirstChild = currentFirstChild.sibling;
5412 }
5413 lanes = createFiberFromPortal(
5414 prevDebugInfo,
5415 returnFiber.mode,
5416 lanes
5417 );
5418 lanes.return = returnFiber;
5419 returnFiber = lanes;
5420 }
5421 return placeSingleChild(returnFiber);
5422 case REACT_LAZY_TYPE:
5423 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), newChild = resolveLazy(newChild), returnFiber = reconcileChildFibersImpl(
5424 returnFiber,
5425 currentFirstChild,
5426 newChild,
5427 lanes
5428 ), currentDebugInfo = prevDebugInfo, returnFiber;
5429 }
5430 if (isArrayImpl(newChild))
5431 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildrenArray(
5432 returnFiber,
5433 currentFirstChild,
5434 newChild,
5435 lanes
5436 ), currentDebugInfo = prevDebugInfo, returnFiber;
5437 if (getIteratorFn(newChild)) {
5438 prevDebugInfo = pushDebugInfo(newChild._debugInfo);
5439 key = getIteratorFn(newChild);
5440 if ("function" !== typeof key)
5441 throw Error(
5442 "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue."
5443 );
5444 var newChildren = key.call(newChild);
5445 if (newChildren === newChild) {
5446 if (0 !== returnFiber.tag || "[object GeneratorFunction]" !== Object.prototype.toString.call(returnFiber.type) || "[object Generator]" !== Object.prototype.toString.call(newChildren))
5447 didWarnAboutGenerators || console.error(
5448 "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."
5449 ), didWarnAboutGenerators = true;
5450 } else
5451 newChild.entries !== key || didWarnAboutMaps || (console.error(
5452 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
5453 ), didWarnAboutMaps = true);
5454 returnFiber = reconcileChildrenIterator(
5455 returnFiber,
5456 currentFirstChild,
5457 newChildren,
5458 lanes
5459 );
5460 currentDebugInfo = prevDebugInfo;
5461 return returnFiber;
5462 }
5463 if ("function" === typeof newChild.then)
5464 return prevDebugInfo = pushDebugInfo(newChild._debugInfo), returnFiber = reconcileChildFibersImpl(
5465 returnFiber,
5466 currentFirstChild,
5467 unwrapThenable(newChild),
5468 lanes
5469 ), currentDebugInfo = prevDebugInfo, returnFiber;
5470 if (newChild.$$typeof === REACT_CONTEXT_TYPE)
5471 return reconcileChildFibersImpl(
5472 returnFiber,
5473 currentFirstChild,
5474 readContextDuringReconciliation(returnFiber, newChild),
5475 lanes
5476 );
5477 throwOnInvalidObjectType(returnFiber, newChild);
5478 }
5479 if ("string" === typeof newChild && "" !== newChild || "number" === typeof newChild || "bigint" === typeof newChild)
5480 return prevDebugInfo = "" + newChild, null !== currentFirstChild && 6 === currentFirstChild.tag ? (deleteRemainingChildren(
5481 returnFiber,
5482 currentFirstChild.sibling
5483 ), lanes = useFiber(currentFirstChild, prevDebugInfo), lanes.return = returnFiber, returnFiber = lanes) : (deleteRemainingChildren(returnFiber, currentFirstChild), lanes = createFiberFromText(
5484 prevDebugInfo,
5485 returnFiber.mode,
5486 lanes
5487 ), lanes.return = returnFiber, lanes._debugOwner = returnFiber, lanes._debugTask = returnFiber._debugTask, lanes._debugInfo = currentDebugInfo, returnFiber = lanes), placeSingleChild(returnFiber);
5488 "function" === typeof newChild && warnOnFunctionType(returnFiber, newChild);
5489 "symbol" === typeof newChild && warnOnSymbolType(returnFiber, newChild);
5490 return deleteRemainingChildren(returnFiber, currentFirstChild);
5491 }
5492 return function(returnFiber, currentFirstChild, newChild, lanes) {
5493 var prevDebugInfo = currentDebugInfo;
5494 currentDebugInfo = null;
5495 try {
5496 thenableIndexCounter$1 = 0;
5497 var firstChildFiber = reconcileChildFibersImpl(
5498 returnFiber,
5499 currentFirstChild,
5500 newChild,
5501 lanes
5502 );
5503 thenableState$1 = null;
5504 return firstChildFiber;
5505 } catch (x) {
5506 if (x === SuspenseException || x === SuspenseActionException) throw x;
5507 var fiber = createFiber(29, x, null, returnFiber.mode);
5508 fiber.lanes = lanes;
5509 fiber.return = returnFiber;
5510 var debugInfo = fiber._debugInfo = currentDebugInfo;
5511 fiber._debugOwner = returnFiber._debugOwner;
5512 fiber._debugTask = returnFiber._debugTask;
5513 if (null != debugInfo) {
5514 for (var i = debugInfo.length - 1; 0 <= i; i--)
5515 if ("string" === typeof debugInfo[i].stack) {
5516 fiber._debugOwner = debugInfo[i];
5517 fiber._debugTask = debugInfo[i].debugTask;
5518 break;
5519 }
5520 }
5521 return fiber;
5522 } finally {
5523 currentDebugInfo = prevDebugInfo;
5524 }
5525 };
5526 }
5527 function validateSuspenseListNestedChild(childSlot, index) {
5528 var isAnArray = isArrayImpl(childSlot);
5529 childSlot = !isAnArray && "function" === typeof getIteratorFn(childSlot);
5530 return isAnArray || childSlot ? (isAnArray = isAnArray ? "array" : "iterable", console.error(
5531 "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>",
5532 isAnArray,
5533 index,
5534 isAnArray
5535 ), false) : true;
5536 }
5537 function initializeUpdateQueue(fiber) {
5538 fiber.updateQueue = {
5539 baseState: fiber.memoizedState,
5540 firstBaseUpdate: null,
5541 lastBaseUpdate: null,
5542 shared: { pending: null, lanes: 0, hiddenCallbacks: null },
5543 callbacks: null
5544 };
5545 }
5546 function cloneUpdateQueue(current2, workInProgress2) {
5547 current2 = current2.updateQueue;
5548 workInProgress2.updateQueue === current2 && (workInProgress2.updateQueue = {
5549 baseState: current2.baseState,
5550 firstBaseUpdate: current2.firstBaseUpdate,
5551 lastBaseUpdate: current2.lastBaseUpdate,
5552 shared: current2.shared,
5553 callbacks: null
5554 });
5555 }
5556 function createUpdate(lane) {
5557 return {
5558 lane,
5559 tag: UpdateState,
5560 payload: null,
5561 callback: null,
5562 next: null
5563 };
5564 }
5565 function enqueueUpdate(fiber, update, lane) {
5566 var updateQueue = fiber.updateQueue;
5567 if (null === updateQueue) return null;
5568 updateQueue = updateQueue.shared;
5569 if (currentlyProcessingQueue === updateQueue && !didWarnUpdateInsideUpdate) {
5570 var componentName2 = getComponentNameFromFiber(fiber);
5571 console.error(
5572 "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",
5573 componentName2
5574 );
5575 didWarnUpdateInsideUpdate = true;
5576 }
5577 if ((executionContext & RenderContext) !== NoContext)
5578 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;
5579 enqueueUpdate$1(fiber, updateQueue, update, lane);
5580 return getRootForUpdatedFiber(fiber);
5581 }
5582 function entangleTransitions(root2, fiber, lane) {
5583 fiber = fiber.updateQueue;
5584 if (null !== fiber && (fiber = fiber.shared, 0 !== (lane & 4194048))) {
5585 var queueLanes = fiber.lanes;
5586 queueLanes &= root2.pendingLanes;
5587 lane |= queueLanes;
5588 fiber.lanes = lane;
5589 markRootEntangled(root2, lane);
5590 }
5591 }
5592 function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
5593 var queue = workInProgress2.updateQueue, current2 = workInProgress2.alternate;
5594 if (null !== current2 && (current2 = current2.updateQueue, queue === current2)) {
5595 var newFirst = null, newLast = null;
5596 queue = queue.firstBaseUpdate;
5597 if (null !== queue) {
5598 do {
5599 var clone = {
5600 lane: queue.lane,
5601 tag: queue.tag,
5602 payload: queue.payload,
5603 callback: null,
5604 next: null
5605 };
5606 null === newLast ? newFirst = newLast = clone : newLast = newLast.next = clone;
5607 queue = queue.next;
5608 } while (null !== queue);
5609 null === newLast ? newFirst = newLast = capturedUpdate : newLast = newLast.next = capturedUpdate;
5610 } else newFirst = newLast = capturedUpdate;
5611 queue = {
5612 baseState: current2.baseState,
5613 firstBaseUpdate: newFirst,
5614 lastBaseUpdate: newLast,
5615 shared: current2.shared,
5616 callbacks: current2.callbacks
5617 };
5618 workInProgress2.updateQueue = queue;
5619 return;
5620 }
5621 workInProgress2 = queue.lastBaseUpdate;
5622 null === workInProgress2 ? queue.firstBaseUpdate = capturedUpdate : workInProgress2.next = capturedUpdate;
5623 queue.lastBaseUpdate = capturedUpdate;
5624 }
5625 function suspendIfUpdateReadFromEntangledAsyncAction() {
5626 if (didReadFromEntangledAsyncAction) {
5627 var entangledActionThenable = currentEntangledActionThenable;
5628 if (null !== entangledActionThenable) throw entangledActionThenable;
5629 }
5630 }
5631 function processUpdateQueue(workInProgress2, props, instance$jscomp$0, renderLanes2) {
5632 didReadFromEntangledAsyncAction = false;
5633 var queue = workInProgress2.updateQueue;
5634 hasForceUpdate = false;
5635 currentlyProcessingQueue = queue.shared;
5636 var firstBaseUpdate = queue.firstBaseUpdate, lastBaseUpdate = queue.lastBaseUpdate, pendingQueue = queue.shared.pending;
5637 if (null !== pendingQueue) {
5638 queue.shared.pending = null;
5639 var lastPendingUpdate = pendingQueue, firstPendingUpdate = lastPendingUpdate.next;
5640 lastPendingUpdate.next = null;
5641 null === lastBaseUpdate ? firstBaseUpdate = firstPendingUpdate : lastBaseUpdate.next = firstPendingUpdate;
5642 lastBaseUpdate = lastPendingUpdate;
5643 var current2 = workInProgress2.alternate;
5644 null !== current2 && (current2 = current2.updateQueue, pendingQueue = current2.lastBaseUpdate, pendingQueue !== lastBaseUpdate && (null === pendingQueue ? current2.firstBaseUpdate = firstPendingUpdate : pendingQueue.next = firstPendingUpdate, current2.lastBaseUpdate = lastPendingUpdate));
5645 }
5646 if (null !== firstBaseUpdate) {
5647 var newState = queue.baseState;
5648 lastBaseUpdate = 0;
5649 current2 = firstPendingUpdate = lastPendingUpdate = null;
5650 pendingQueue = firstBaseUpdate;
5651 do {
5652 var updateLane = pendingQueue.lane & -536870913, isHiddenUpdate = updateLane !== pendingQueue.lane;
5653 if (isHiddenUpdate ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes2 & updateLane) === updateLane) {
5654 0 !== updateLane && updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction = true);
5655 null !== current2 && (current2 = current2.next = {
5656 lane: 0,
5657 tag: pendingQueue.tag,
5658 payload: pendingQueue.payload,
5659 callback: null,
5660 next: null
5661 });
5662 a: {
5663 updateLane = workInProgress2;
5664 var partialState = pendingQueue;
5665 var nextProps = props, instance = instance$jscomp$0;
5666 switch (partialState.tag) {
5667 case ReplaceState:
5668 partialState = partialState.payload;
5669 if ("function" === typeof partialState) {
5670 isDisallowedContextReadInDEV = true;
5671 var nextState = partialState.call(
5672 instance,
5673 newState,
5674 nextProps
5675 );
5676 if (updateLane.mode & StrictLegacyMode) {
5677 setIsStrictModeForDevtools(true);
5678 try {
5679 partialState.call(instance, newState, nextProps);
5680 } finally {
5681 setIsStrictModeForDevtools(false);
5682 }
5683 }
5684 isDisallowedContextReadInDEV = false;
5685 newState = nextState;
5686 break a;
5687 }
5688 newState = partialState;
5689 break a;
5690 case CaptureUpdate:
5691 updateLane.flags = updateLane.flags & -65537 | 128;
5692 case UpdateState:
5693 nextState = partialState.payload;
5694 if ("function" === typeof nextState) {
5695 isDisallowedContextReadInDEV = true;
5696 partialState = nextState.call(
5697 instance,
5698 newState,
5699 nextProps
5700 );
5701 if (updateLane.mode & StrictLegacyMode) {
5702 setIsStrictModeForDevtools(true);
5703 try {
5704 nextState.call(instance, newState, nextProps);
5705 } finally {
5706 setIsStrictModeForDevtools(false);
5707 }
5708 }
5709 isDisallowedContextReadInDEV = false;
5710 } else partialState = nextState;
5711 if (null === partialState || void 0 === partialState) break a;
5712 newState = assign({}, newState, partialState);
5713 break a;
5714 case ForceUpdate:
5715 hasForceUpdate = true;
5716 }
5717 }
5718 updateLane = pendingQueue.callback;
5719 null !== updateLane && (workInProgress2.flags |= 64, isHiddenUpdate && (workInProgress2.flags |= 8192), isHiddenUpdate = queue.callbacks, null === isHiddenUpdate ? queue.callbacks = [updateLane] : isHiddenUpdate.push(updateLane));
5720 } else
5721 isHiddenUpdate = {
5722 lane: updateLane,
5723 tag: pendingQueue.tag,
5724 payload: pendingQueue.payload,
5725 callback: pendingQueue.callback,
5726 next: null
5727 }, null === current2 ? (firstPendingUpdate = current2 = isHiddenUpdate, lastPendingUpdate = newState) : current2 = current2.next = isHiddenUpdate, lastBaseUpdate |= updateLane;
5728 pendingQueue = pendingQueue.next;
5729 if (null === pendingQueue)
5730 if (pendingQueue = queue.shared.pending, null === pendingQueue)
5731 break;
5732 else
5733 isHiddenUpdate = pendingQueue, pendingQueue = isHiddenUpdate.next, isHiddenUpdate.next = null, queue.lastBaseUpdate = isHiddenUpdate, queue.shared.pending = null;
5734 } while (1);
5735 null === current2 && (lastPendingUpdate = newState);
5736 queue.baseState = lastPendingUpdate;
5737 queue.firstBaseUpdate = firstPendingUpdate;
5738 queue.lastBaseUpdate = current2;
5739 null === firstBaseUpdate && (queue.shared.lanes = 0);
5740 workInProgressRootSkippedLanes |= lastBaseUpdate;
5741 workInProgress2.lanes = lastBaseUpdate;
5742 workInProgress2.memoizedState = newState;
5743 }
5744 currentlyProcessingQueue = null;
5745 }
5746 function callCallback(callback, context) {
5747 if ("function" !== typeof callback)
5748 throw Error(
5749 "Invalid argument passed as callback. Expected a function. Instead received: " + callback
5750 );
5751 callback.call(context);
5752 }
5753 function commitHiddenCallbacks(updateQueue, context) {
5754 var hiddenCallbacks = updateQueue.shared.hiddenCallbacks;
5755 if (null !== hiddenCallbacks)
5756 for (updateQueue.shared.hiddenCallbacks = null, updateQueue = 0; updateQueue < hiddenCallbacks.length; updateQueue++)
5757 callCallback(hiddenCallbacks[updateQueue], context);
5758 }
5759 function commitCallbacks(updateQueue, context) {
5760 var callbacks = updateQueue.callbacks;
5761 if (null !== callbacks)
5762 for (updateQueue.callbacks = null, updateQueue = 0; updateQueue < callbacks.length; updateQueue++)
5763 callCallback(callbacks[updateQueue], context);
5764 }
5765 function pushHiddenContext(fiber, context) {
5766 var prevEntangledRenderLanes = entangledRenderLanes;
5767 push(prevEntangledRenderLanesCursor, prevEntangledRenderLanes, fiber);
5768 push(currentTreeHiddenStackCursor, context, fiber);
5769 entangledRenderLanes = prevEntangledRenderLanes | context.baseLanes;
5770 }
5771 function reuseHiddenContextOnStack(fiber) {
5772 push(prevEntangledRenderLanesCursor, entangledRenderLanes, fiber);
5773 push(
5774 currentTreeHiddenStackCursor,
5775 currentTreeHiddenStackCursor.current,
5776 fiber
5777 );
5778 }
5779 function popHiddenContext(fiber) {
5780 entangledRenderLanes = prevEntangledRenderLanesCursor.current;
5781 pop(currentTreeHiddenStackCursor, fiber);
5782 pop(prevEntangledRenderLanesCursor, fiber);
5783 }
5784 function pushPrimaryTreeSuspenseHandler(handler) {
5785 var current2 = handler.alternate;
5786 push(
5787 suspenseStackCursor,
5788 suspenseStackCursor.current & SubtreeSuspenseContextMask,
5789 handler
5790 );
5791 push(suspenseHandlerStackCursor, handler, handler);
5792 null === shellBoundary && (null === current2 || null !== currentTreeHiddenStackCursor.current ? shellBoundary = handler : null !== current2.memoizedState && (shellBoundary = handler));
5793 }
5794 function pushDehydratedActivitySuspenseHandler(fiber) {
5795 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
5796 push(suspenseHandlerStackCursor, fiber, fiber);
5797 null === shellBoundary && (shellBoundary = fiber);
5798 }
5799 function pushOffscreenSuspenseHandler(fiber) {
5800 22 === fiber.tag ? (push(suspenseStackCursor, suspenseStackCursor.current, fiber), push(suspenseHandlerStackCursor, fiber, fiber), null === shellBoundary && (shellBoundary = fiber)) : reuseSuspenseHandlerOnStack(fiber);
5801 }
5802 function reuseSuspenseHandlerOnStack(fiber) {
5803 push(suspenseStackCursor, suspenseStackCursor.current, fiber);
5804 push(
5805 suspenseHandlerStackCursor,
5806 suspenseHandlerStackCursor.current,
5807 fiber
5808 );
5809 }
5810 function popSuspenseHandler(fiber) {
5811 pop(suspenseHandlerStackCursor, fiber);
5812 shellBoundary === fiber && (shellBoundary = null);
5813 pop(suspenseStackCursor, fiber);
5814 }
5815 function findFirstSuspended(row) {
5816 for (var node = row; null !== node; ) {
5817 if (13 === node.tag) {
5818 var state = node.memoizedState;
5819 if (null !== state && (state = state.dehydrated, null === state || isSuspenseInstancePending(state) || isSuspenseInstanceFallback(state)))
5820 return node;
5821 } else if (19 === node.tag && ("forwards" === node.memoizedProps.revealOrder || "backwards" === node.memoizedProps.revealOrder || "unstable_legacy-backwards" === node.memoizedProps.revealOrder || "together" === node.memoizedProps.revealOrder)) {
5822 if (0 !== (node.flags & 128)) return node;
5823 } else if (null !== node.child) {
5824 node.child.return = node;
5825 node = node.child;
5826 continue;
5827 }
5828 if (node === row) break;
5829 for (; null === node.sibling; ) {
5830 if (null === node.return || node.return === row) return null;
5831 node = node.return;
5832 }
5833 node.sibling.return = node.return;
5834 node = node.sibling;
5835 }
5836 return null;
5837 }
5838 function mountHookTypesDev() {
5839 var hookName = currentHookNameInDev;
5840 null === hookTypesDev ? hookTypesDev = [hookName] : hookTypesDev.push(hookName);
5841 }
5842 function updateHookTypesDev() {
5843 var hookName = currentHookNameInDev;
5844 if (null !== hookTypesDev && (hookTypesUpdateIndexDev++, hookTypesDev[hookTypesUpdateIndexDev] !== hookName)) {
5845 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
5846 if (!didWarnAboutMismatchedHooksForComponent.has(componentName2) && (didWarnAboutMismatchedHooksForComponent.add(componentName2), null !== hookTypesDev)) {
5847 for (var table = "", i = 0; i <= hookTypesUpdateIndexDev; i++) {
5848 var oldHookName = hookTypesDev[i], newHookName = i === hookTypesUpdateIndexDev ? hookName : oldHookName;
5849 for (oldHookName = i + 1 + ". " + oldHookName; 30 > oldHookName.length; )
5850 oldHookName += " ";
5851 oldHookName += newHookName + "\n";
5852 table += oldHookName;
5853 }
5854 console.error(
5855 "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",
5856 componentName2,
5857 table
5858 );
5859 }
5860 }
5861 }
5862 function checkDepsAreArrayDev(deps) {
5863 void 0 === deps || null === deps || isArrayImpl(deps) || console.error(
5864 "%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",
5865 currentHookNameInDev,
5866 typeof deps
5867 );
5868 }
5869 function warnOnUseFormStateInDev() {
5870 var componentName2 = getComponentNameFromFiber(currentlyRenderingFiber);
5871 didWarnAboutUseFormState.has(componentName2) || (didWarnAboutUseFormState.add(componentName2), console.error(
5872 "ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",
5873 componentName2
5874 ));
5875 }
5876 function throwInvalidHookError() {
5877 throw Error(
5878 "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."
5879 );
5880 }
5881 function areHookInputsEqual(nextDeps, prevDeps) {
5882 if (ignorePreviousDependencies) return false;
5883 if (null === prevDeps)
5884 return console.error(
5885 "%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.",
5886 currentHookNameInDev
5887 ), false;
5888 nextDeps.length !== prevDeps.length && console.error(
5889 "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",
5890 currentHookNameInDev,
5891 "[" + prevDeps.join(", ") + "]",
5892 "[" + nextDeps.join(", ") + "]"
5893 );
5894 for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)
5895 if (!objectIs(nextDeps[i], prevDeps[i])) return false;
5896 return true;
5897 }
5898 function renderWithHooks(current2, workInProgress2, Component, props, secondArg, nextRenderLanes) {
5899 renderLanes = nextRenderLanes;
5900 currentlyRenderingFiber = workInProgress2;
5901 hookTypesDev = null !== current2 ? current2._debugHookTypes : null;
5902 hookTypesUpdateIndexDev = -1;
5903 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
5904 if ("[object AsyncFunction]" === Object.prototype.toString.call(Component) || "[object AsyncGeneratorFunction]" === Object.prototype.toString.call(Component))
5905 nextRenderLanes = getComponentNameFromFiber(currentlyRenderingFiber), didWarnAboutAsyncClientComponent.has(nextRenderLanes) || (didWarnAboutAsyncClientComponent.add(nextRenderLanes), console.error(
5906 "%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.",
5907 null === nextRenderLanes ? "An unknown Component" : "<" + nextRenderLanes + ">"
5908 ));
5909 workInProgress2.memoizedState = null;
5910 workInProgress2.updateQueue = null;
5911 workInProgress2.lanes = 0;
5912 ReactSharedInternals.H = null !== current2 && null !== current2.memoizedState ? HooksDispatcherOnUpdateInDEV : null !== hookTypesDev ? HooksDispatcherOnMountWithHookTypesInDEV : HooksDispatcherOnMountInDEV;
5913 shouldDoubleInvokeUserFnsInHooksDEV = nextRenderLanes = (workInProgress2.mode & StrictLegacyMode) !== NoMode;
5914 var children = callComponentInDEV(Component, props, secondArg);
5915 shouldDoubleInvokeUserFnsInHooksDEV = false;
5916 didScheduleRenderPhaseUpdateDuringThisPass && (children = renderWithHooksAgain(
5917 workInProgress2,
5918 Component,
5919 props,
5920 secondArg
5921 ));
5922 if (nextRenderLanes) {
5923 setIsStrictModeForDevtools(true);
5924 try {
5925 children = renderWithHooksAgain(
5926 workInProgress2,
5927 Component,
5928 props,
5929 secondArg
5930 );
5931 } finally {
5932 setIsStrictModeForDevtools(false);
5933 }
5934 }
5935 finishRenderingHooks(current2, workInProgress2);
5936 return children;
5937 }
5938 function finishRenderingHooks(current2, workInProgress2) {
5939 workInProgress2._debugHookTypes = hookTypesDev;
5940 null === workInProgress2.dependencies ? null !== thenableState && (workInProgress2.dependencies = {
5941 lanes: 0,
5942 firstContext: null,
5943 _debugThenableState: thenableState
5944 }) : workInProgress2.dependencies._debugThenableState = thenableState;
5945 ReactSharedInternals.H = ContextOnlyDispatcher;
5946 var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;
5947 renderLanes = 0;
5948 hookTypesDev = currentHookNameInDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
5949 hookTypesUpdateIndexDev = -1;
5950 null !== current2 && (current2.flags & 65011712) !== (workInProgress2.flags & 65011712) && console.error(
5951 "Internal React error: Expected static flag was missing. Please notify the React team."
5952 );
5953 didScheduleRenderPhaseUpdate = false;
5954 thenableIndexCounter = 0;
5955 thenableState = null;
5956 if (didRenderTooFewHooks)
5957 throw Error(
5958 "Rendered fewer hooks than expected. This may be caused by an accidental early return statement."
5959 );
5960 null === current2 || didReceiveUpdate || (current2 = current2.dependencies, null !== current2 && checkIfContextChanged(current2) && (didReceiveUpdate = true));
5961 needsToResetSuspendedThenableDEV ? (needsToResetSuspendedThenableDEV = false, current2 = true) : current2 = false;
5962 current2 && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Unknown", didWarnAboutUseWrappedInTryCatch.has(workInProgress2) || didWarnAboutAsyncClientComponent.has(workInProgress2) || (didWarnAboutUseWrappedInTryCatch.add(workInProgress2), console.error(
5963 "`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."
5964 )));
5965 }
5966 function renderWithHooksAgain(workInProgress2, Component, props, secondArg) {
5967 currentlyRenderingFiber = workInProgress2;
5968 var numberOfReRenders = 0;
5969 do {
5970 didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);
5971 thenableIndexCounter = 0;
5972 didScheduleRenderPhaseUpdateDuringThisPass = false;
5973 if (numberOfReRenders >= RE_RENDER_LIMIT)
5974 throw Error(
5975 "Too many re-renders. React limits the number of renders to prevent an infinite loop."
5976 );
5977 numberOfReRenders += 1;
5978 ignorePreviousDependencies = false;
5979 workInProgressHook = currentHook = null;
5980 if (null != workInProgress2.updateQueue) {
5981 var children = workInProgress2.updateQueue;
5982 children.lastEffect = null;
5983 children.events = null;
5984 children.stores = null;
5985 null != children.memoCache && (children.memoCache.index = 0);
5986 }
5987 hookTypesUpdateIndexDev = -1;
5988 ReactSharedInternals.H = HooksDispatcherOnRerenderInDEV;
5989 children = callComponentInDEV(Component, props, secondArg);
5990 } while (didScheduleRenderPhaseUpdateDuringThisPass);
5991 return children;
5992 }
5993 function TransitionAwareHostComponent() {
5994 var dispatcher = ReactSharedInternals.H, maybeThenable = dispatcher.useState()[0];
5995 maybeThenable = "function" === typeof maybeThenable.then ? useThenable(maybeThenable) : maybeThenable;
5996 dispatcher = dispatcher.useState()[0];
5997 (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher && (currentlyRenderingFiber.flags |= 1024);
5998 return maybeThenable;
5999 }
6000 function checkDidRenderIdHook() {
6001 var didRenderIdHook = 0 !== localIdCounter;
6002 localIdCounter = 0;
6003 return didRenderIdHook;
6004 }
6005 function bailoutHooks(current2, workInProgress2, lanes) {
6006 workInProgress2.updateQueue = current2.updateQueue;
6007 workInProgress2.flags = (workInProgress2.mode & StrictEffectsMode) !== NoMode ? workInProgress2.flags & -402655237 : workInProgress2.flags & -2053;
6008 current2.lanes &= ~lanes;
6009 }
6010 function resetHooksOnUnwind(workInProgress2) {
6011 if (didScheduleRenderPhaseUpdate) {
6012 for (workInProgress2 = workInProgress2.memoizedState; null !== workInProgress2; ) {
6013 var queue = workInProgress2.queue;
6014 null !== queue && (queue.pending = null);
6015 workInProgress2 = workInProgress2.next;
6016 }
6017 didScheduleRenderPhaseUpdate = false;
6018 }
6019 renderLanes = 0;
6020 hookTypesDev = workInProgressHook = currentHook = currentlyRenderingFiber = null;
6021 hookTypesUpdateIndexDev = -1;
6022 currentHookNameInDev = null;
6023 didScheduleRenderPhaseUpdateDuringThisPass = false;
6024 thenableIndexCounter = localIdCounter = 0;
6025 thenableState = null;
6026 }
6027 function mountWorkInProgressHook() {
6028 var hook = {
6029 memoizedState: null,
6030 baseState: null,
6031 baseQueue: null,
6032 queue: null,
6033 next: null
6034 };
6035 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = hook : workInProgressHook = workInProgressHook.next = hook;
6036 return workInProgressHook;
6037 }
6038 function updateWorkInProgressHook() {
6039 if (null === currentHook) {
6040 var nextCurrentHook = currentlyRenderingFiber.alternate;
6041 nextCurrentHook = null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;
6042 } else nextCurrentHook = currentHook.next;
6043 var nextWorkInProgressHook = null === workInProgressHook ? currentlyRenderingFiber.memoizedState : workInProgressHook.next;
6044 if (null !== nextWorkInProgressHook)
6045 workInProgressHook = nextWorkInProgressHook, currentHook = nextCurrentHook;
6046 else {
6047 if (null === nextCurrentHook) {
6048 if (null === currentlyRenderingFiber.alternate)
6049 throw Error(
6050 "Update hook called on initial render. This is likely a bug in React. Please file an issue."
6051 );
6052 throw Error("Rendered more hooks than during the previous render.");
6053 }
6054 currentHook = nextCurrentHook;
6055 nextCurrentHook = {
6056 memoizedState: currentHook.memoizedState,
6057 baseState: currentHook.baseState,
6058 baseQueue: currentHook.baseQueue,
6059 queue: currentHook.queue,
6060 next: null
6061 };
6062 null === workInProgressHook ? currentlyRenderingFiber.memoizedState = workInProgressHook = nextCurrentHook : workInProgressHook = workInProgressHook.next = nextCurrentHook;
6063 }
6064 return workInProgressHook;
6065 }
6066 function createFunctionComponentUpdateQueue() {
6067 return { lastEffect: null, events: null, stores: null, memoCache: null };
6068 }
6069 function useThenable(thenable) {
6070 var index = thenableIndexCounter;
6071 thenableIndexCounter += 1;
6072 null === thenableState && (thenableState = createThenableState());
6073 thenable = trackUsedThenable(thenableState, thenable, index);
6074 index = currentlyRenderingFiber;
6075 null === (null === workInProgressHook ? index.memoizedState : workInProgressHook.next) && (index = index.alternate, ReactSharedInternals.H = null !== index && null !== index.memoizedState ? HooksDispatcherOnUpdateInDEV : HooksDispatcherOnMountInDEV);
6076 return thenable;
6077 }
6078 function use(usable) {
6079 if (null !== usable && "object" === typeof usable) {
6080 if ("function" === typeof usable.then) return useThenable(usable);
6081 if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);
6082 }
6083 throw Error("An unsupported type was passed to use(): " + String(usable));
6084 }
6085 function useMemoCache(size) {
6086 var memoCache = null, updateQueue = currentlyRenderingFiber.updateQueue;
6087 null !== updateQueue && (memoCache = updateQueue.memoCache);
6088 if (null == memoCache) {
6089 var current2 = currentlyRenderingFiber.alternate;
6090 null !== current2 && (current2 = current2.updateQueue, null !== current2 && (current2 = current2.memoCache, null != current2 && (memoCache = {
6091 data: current2.data.map(function(array) {
6092 return array.slice();
6093 }),
6094 index: 0
6095 })));
6096 }
6097 null == memoCache && (memoCache = { data: [], index: 0 });
6098 null === updateQueue && (updateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = updateQueue);
6099 updateQueue.memoCache = memoCache;
6100 updateQueue = memoCache.data[memoCache.index];
6101 if (void 0 === updateQueue || ignorePreviousDependencies)
6102 for (updateQueue = memoCache.data[memoCache.index] = Array(size), current2 = 0; current2 < size; current2++)
6103 updateQueue[current2] = REACT_MEMO_CACHE_SENTINEL;
6104 else
6105 updateQueue.length !== size && console.error(
6106 "Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.",
6107 updateQueue.length,
6108 size
6109 );
6110 memoCache.index++;
6111 return updateQueue;
6112 }
6113 function basicStateReducer(state, action) {
6114 return "function" === typeof action ? action(state) : action;
6115 }
6116 function mountReducer(reducer, initialArg, init) {
6117 var hook = mountWorkInProgressHook();
6118 if (void 0 !== init) {
6119 var initialState = init(initialArg);
6120 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6121 setIsStrictModeForDevtools(true);
6122 try {
6123 init(initialArg);
6124 } finally {
6125 setIsStrictModeForDevtools(false);
6126 }
6127 }
6128 } else initialState = initialArg;
6129 hook.memoizedState = hook.baseState = initialState;
6130 reducer = {
6131 pending: null,
6132 lanes: 0,
6133 dispatch: null,
6134 lastRenderedReducer: reducer,
6135 lastRenderedState: initialState
6136 };
6137 hook.queue = reducer;
6138 reducer = reducer.dispatch = dispatchReducerAction.bind(
6139 null,
6140 currentlyRenderingFiber,
6141 reducer
6142 );
6143 return [hook.memoizedState, reducer];
6144 }
6145 function updateReducer(reducer) {
6146 var hook = updateWorkInProgressHook();
6147 return updateReducerImpl(hook, currentHook, reducer);
6148 }
6149 function updateReducerImpl(hook, current2, reducer) {
6150 var queue = hook.queue;
6151 if (null === queue)
6152 throw Error(
6153 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
6154 );
6155 queue.lastRenderedReducer = reducer;
6156 var baseQueue = hook.baseQueue, pendingQueue = queue.pending;
6157 if (null !== pendingQueue) {
6158 if (null !== baseQueue) {
6159 var baseFirst = baseQueue.next;
6160 baseQueue.next = pendingQueue.next;
6161 pendingQueue.next = baseFirst;
6162 }
6163 current2.baseQueue !== baseQueue && console.error(
6164 "Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."
6165 );
6166 current2.baseQueue = baseQueue = pendingQueue;
6167 queue.pending = null;
6168 }
6169 pendingQueue = hook.baseState;
6170 if (null === baseQueue) hook.memoizedState = pendingQueue;
6171 else {
6172 current2 = baseQueue.next;
6173 var newBaseQueueFirst = baseFirst = null, newBaseQueueLast = null, update = current2, didReadFromEntangledAsyncAction2 = false;
6174 do {
6175 var updateLane = update.lane & -536870913;
6176 if (updateLane !== update.lane ? (workInProgressRootRenderLanes & updateLane) === updateLane : (renderLanes & updateLane) === updateLane) {
6177 var revertLane = update.revertLane;
6178 if (0 === revertLane)
6179 null !== newBaseQueueLast && (newBaseQueueLast = newBaseQueueLast.next = {
6180 lane: 0,
6181 revertLane: 0,
6182 gesture: null,
6183 action: update.action,
6184 hasEagerState: update.hasEagerState,
6185 eagerState: update.eagerState,
6186 next: null
6187 }), updateLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
6188 else if ((renderLanes & revertLane) === revertLane) {
6189 update = update.next;
6190 revertLane === currentEntangledLane && (didReadFromEntangledAsyncAction2 = true);
6191 continue;
6192 } else
6193 updateLane = {
6194 lane: 0,
6195 revertLane: update.revertLane,
6196 gesture: null,
6197 action: update.action,
6198 hasEagerState: update.hasEagerState,
6199 eagerState: update.eagerState,
6200 next: null
6201 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = updateLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = updateLane, currentlyRenderingFiber.lanes |= revertLane, workInProgressRootSkippedLanes |= revertLane;
6202 updateLane = update.action;
6203 shouldDoubleInvokeUserFnsInHooksDEV && reducer(pendingQueue, updateLane);
6204 pendingQueue = update.hasEagerState ? update.eagerState : reducer(pendingQueue, updateLane);
6205 } else
6206 revertLane = {
6207 lane: updateLane,
6208 revertLane: update.revertLane,
6209 gesture: update.gesture,
6210 action: update.action,
6211 hasEagerState: update.hasEagerState,
6212 eagerState: update.eagerState,
6213 next: null
6214 }, null === newBaseQueueLast ? (newBaseQueueFirst = newBaseQueueLast = revertLane, baseFirst = pendingQueue) : newBaseQueueLast = newBaseQueueLast.next = revertLane, currentlyRenderingFiber.lanes |= updateLane, workInProgressRootSkippedLanes |= updateLane;
6215 update = update.next;
6216 } while (null !== update && update !== current2);
6217 null === newBaseQueueLast ? baseFirst = pendingQueue : newBaseQueueLast.next = newBaseQueueFirst;
6218 if (!objectIs(pendingQueue, hook.memoizedState) && (didReceiveUpdate = true, didReadFromEntangledAsyncAction2 && (reducer = currentEntangledActionThenable, null !== reducer)))
6219 throw reducer;
6220 hook.memoizedState = pendingQueue;
6221 hook.baseState = baseFirst;
6222 hook.baseQueue = newBaseQueueLast;
6223 queue.lastRenderedState = pendingQueue;
6224 }
6225 null === baseQueue && (queue.lanes = 0);
6226 return [hook.memoizedState, queue.dispatch];
6227 }
6228 function rerenderReducer(reducer) {
6229 var hook = updateWorkInProgressHook(), queue = hook.queue;
6230 if (null === queue)
6231 throw Error(
6232 "Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)"
6233 );
6234 queue.lastRenderedReducer = reducer;
6235 var dispatch = queue.dispatch, lastRenderPhaseUpdate = queue.pending, newState = hook.memoizedState;
6236 if (null !== lastRenderPhaseUpdate) {
6237 queue.pending = null;
6238 var update = lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
6239 do
6240 newState = reducer(newState, update.action), update = update.next;
6241 while (update !== lastRenderPhaseUpdate);
6242 objectIs(newState, hook.memoizedState) || (didReceiveUpdate = true);
6243 hook.memoizedState = newState;
6244 null === hook.baseQueue && (hook.baseState = newState);
6245 queue.lastRenderedState = newState;
6246 }
6247 return [newState, dispatch];
6248 }
6249 function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
6250 var fiber = currentlyRenderingFiber, hook = mountWorkInProgressHook();
6251 if (isHydrating) {
6252 if (void 0 === getServerSnapshot)
6253 throw Error(
6254 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
6255 );
6256 var nextSnapshot = getServerSnapshot();
6257 didWarnUncachedGetSnapshot || nextSnapshot === getServerSnapshot() || (console.error(
6258 "The result of getServerSnapshot should be cached to avoid an infinite loop"
6259 ), didWarnUncachedGetSnapshot = true);
6260 } else {
6261 nextSnapshot = getSnapshot();
6262 didWarnUncachedGetSnapshot || (getServerSnapshot = getSnapshot(), objectIs(nextSnapshot, getServerSnapshot) || (console.error(
6263 "The result of getSnapshot should be cached to avoid an infinite loop"
6264 ), didWarnUncachedGetSnapshot = true));
6265 if (null === workInProgressRoot)
6266 throw Error(
6267 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6268 );
6269 0 !== (workInProgressRootRenderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
6270 }
6271 hook.memoizedState = nextSnapshot;
6272 getServerSnapshot = { value: nextSnapshot, getSnapshot };
6273 hook.queue = getServerSnapshot;
6274 mountEffect(
6275 subscribeToStore.bind(null, fiber, getServerSnapshot, subscribe),
6276 [subscribe]
6277 );
6278 fiber.flags |= 2048;
6279 pushSimpleEffect(
6280 HasEffect | Passive,
6281 { destroy: void 0 },
6282 updateStoreInstance.bind(
6283 null,
6284 fiber,
6285 getServerSnapshot,
6286 nextSnapshot,
6287 getSnapshot
6288 ),
6289 null
6290 );
6291 return nextSnapshot;
6292 }
6293 function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
6294 var fiber = currentlyRenderingFiber, hook = updateWorkInProgressHook(), isHydrating$jscomp$0 = isHydrating;
6295 if (isHydrating$jscomp$0) {
6296 if (void 0 === getServerSnapshot)
6297 throw Error(
6298 "Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering."
6299 );
6300 getServerSnapshot = getServerSnapshot();
6301 } else if (getServerSnapshot = getSnapshot(), !didWarnUncachedGetSnapshot) {
6302 var cachedSnapshot = getSnapshot();
6303 objectIs(getServerSnapshot, cachedSnapshot) || (console.error(
6304 "The result of getSnapshot should be cached to avoid an infinite loop"
6305 ), didWarnUncachedGetSnapshot = true);
6306 }
6307 if (cachedSnapshot = !objectIs(
6308 (currentHook || hook).memoizedState,
6309 getServerSnapshot
6310 ))
6311 hook.memoizedState = getServerSnapshot, didReceiveUpdate = true;
6312 hook = hook.queue;
6313 var create = subscribeToStore.bind(null, fiber, hook, subscribe);
6314 updateEffectImpl(2048, Passive, create, [subscribe]);
6315 if (hook.getSnapshot !== getSnapshot || cachedSnapshot || null !== workInProgressHook && workInProgressHook.memoizedState.tag & HasEffect) {
6316 fiber.flags |= 2048;
6317 pushSimpleEffect(
6318 HasEffect | Passive,
6319 { destroy: void 0 },
6320 updateStoreInstance.bind(
6321 null,
6322 fiber,
6323 hook,
6324 getServerSnapshot,
6325 getSnapshot
6326 ),
6327 null
6328 );
6329 if (null === workInProgressRoot)
6330 throw Error(
6331 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
6332 );
6333 isHydrating$jscomp$0 || 0 !== (renderLanes & 127) || pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);
6334 }
6335 return getServerSnapshot;
6336 }
6337 function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
6338 fiber.flags |= 16384;
6339 fiber = { getSnapshot, value: renderedSnapshot };
6340 getSnapshot = currentlyRenderingFiber.updateQueue;
6341 null === getSnapshot ? (getSnapshot = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = getSnapshot, getSnapshot.stores = [fiber]) : (renderedSnapshot = getSnapshot.stores, null === renderedSnapshot ? getSnapshot.stores = [fiber] : renderedSnapshot.push(fiber));
6342 }
6343 function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
6344 inst.value = nextSnapshot;
6345 inst.getSnapshot = getSnapshot;
6346 checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);
6347 }
6348 function subscribeToStore(fiber, inst, subscribe) {
6349 return subscribe(function() {
6350 checkIfSnapshotChanged(inst) && (startUpdateTimerByLane(2, "updateSyncExternalStore()", fiber), forceStoreRerender(fiber));
6351 });
6352 }
6353 function checkIfSnapshotChanged(inst) {
6354 var latestGetSnapshot = inst.getSnapshot;
6355 inst = inst.value;
6356 try {
6357 var nextValue = latestGetSnapshot();
6358 return !objectIs(inst, nextValue);
6359 } catch (error) {
6360 return true;
6361 }
6362 }
6363 function forceStoreRerender(fiber) {
6364 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
6365 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
6366 }
6367 function mountStateImpl(initialState) {
6368 var hook = mountWorkInProgressHook();
6369 if ("function" === typeof initialState) {
6370 var initialStateInitializer = initialState;
6371 initialState = initialStateInitializer();
6372 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6373 setIsStrictModeForDevtools(true);
6374 try {
6375 initialStateInitializer();
6376 } finally {
6377 setIsStrictModeForDevtools(false);
6378 }
6379 }
6380 }
6381 hook.memoizedState = hook.baseState = initialState;
6382 hook.queue = {
6383 pending: null,
6384 lanes: 0,
6385 dispatch: null,
6386 lastRenderedReducer: basicStateReducer,
6387 lastRenderedState: initialState
6388 };
6389 return hook;
6390 }
6391 function mountState(initialState) {
6392 initialState = mountStateImpl(initialState);
6393 var queue = initialState.queue, dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);
6394 queue.dispatch = dispatch;
6395 return [initialState.memoizedState, dispatch];
6396 }
6397 function mountOptimistic(passthrough) {
6398 var hook = mountWorkInProgressHook();
6399 hook.memoizedState = hook.baseState = passthrough;
6400 var queue = {
6401 pending: null,
6402 lanes: 0,
6403 dispatch: null,
6404 lastRenderedReducer: null,
6405 lastRenderedState: null
6406 };
6407 hook.queue = queue;
6408 hook = dispatchOptimisticSetState.bind(
6409 null,
6410 currentlyRenderingFiber,
6411 true,
6412 queue
6413 );
6414 queue.dispatch = hook;
6415 return [passthrough, hook];
6416 }
6417 function updateOptimistic(passthrough, reducer) {
6418 var hook = updateWorkInProgressHook();
6419 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6420 }
6421 function updateOptimisticImpl(hook, current2, passthrough, reducer) {
6422 hook.baseState = passthrough;
6423 return updateReducerImpl(
6424 hook,
6425 currentHook,
6426 "function" === typeof reducer ? reducer : basicStateReducer
6427 );
6428 }
6429 function rerenderOptimistic(passthrough, reducer) {
6430 var hook = updateWorkInProgressHook();
6431 if (null !== currentHook)
6432 return updateOptimisticImpl(hook, currentHook, passthrough, reducer);
6433 hook.baseState = passthrough;
6434 return [passthrough, hook.queue.dispatch];
6435 }
6436 function dispatchActionState(fiber, actionQueue, setPendingState, setState, payload) {
6437 if (isRenderPhaseUpdate(fiber))
6438 throw Error("Cannot update form state while rendering.");
6439 fiber = actionQueue.action;
6440 if (null !== fiber) {
6441 var actionNode = {
6442 payload,
6443 action: fiber,
6444 next: null,
6445 isTransition: true,
6446 status: "pending",
6447 value: null,
6448 reason: null,
6449 listeners: [],
6450 then: function(listener) {
6451 actionNode.listeners.push(listener);
6452 }
6453 };
6454 null !== ReactSharedInternals.T ? setPendingState(true) : actionNode.isTransition = false;
6455 setState(actionNode);
6456 setPendingState = actionQueue.pending;
6457 null === setPendingState ? (actionNode.next = actionQueue.pending = actionNode, runActionStateAction(actionQueue, actionNode)) : (actionNode.next = setPendingState.next, actionQueue.pending = setPendingState.next = actionNode);
6458 }
6459 }
6460 function runActionStateAction(actionQueue, node) {
6461 var action = node.action, payload = node.payload, prevState = actionQueue.state;
6462 if (node.isTransition) {
6463 var prevTransition = ReactSharedInternals.T, currentTransition = {};
6464 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
6465 ReactSharedInternals.T = currentTransition;
6466 try {
6467 var returnValue = action(prevState, payload), onStartTransitionFinish = ReactSharedInternals.S;
6468 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
6469 handleActionReturnValue(actionQueue, node, returnValue);
6470 } catch (error) {
6471 onActionError(actionQueue, node, error);
6472 } finally {
6473 null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
6474 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
6475 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (actionQueue = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < actionQueue && console.warn(
6476 "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."
6477 ));
6478 }
6479 } else
6480 try {
6481 currentTransition = action(prevState, payload), handleActionReturnValue(actionQueue, node, currentTransition);
6482 } catch (error$4) {
6483 onActionError(actionQueue, node, error$4);
6484 }
6485 }
6486 function handleActionReturnValue(actionQueue, node, returnValue) {
6487 null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then ? (ReactSharedInternals.asyncTransitions++, returnValue.then(releaseAsyncTransition, releaseAsyncTransition), returnValue.then(
6488 function(nextState) {
6489 onActionSuccess(actionQueue, node, nextState);
6490 },
6491 function(error) {
6492 return onActionError(actionQueue, node, error);
6493 }
6494 ), node.isTransition || console.error(
6495 "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."
6496 )) : onActionSuccess(actionQueue, node, returnValue);
6497 }
6498 function onActionSuccess(actionQueue, actionNode, nextState) {
6499 actionNode.status = "fulfilled";
6500 actionNode.value = nextState;
6501 notifyActionListeners(actionNode);
6502 actionQueue.state = nextState;
6503 actionNode = actionQueue.pending;
6504 null !== actionNode && (nextState = actionNode.next, nextState === actionNode ? actionQueue.pending = null : (nextState = nextState.next, actionNode.next = nextState, runActionStateAction(actionQueue, nextState)));
6505 }
6506 function onActionError(actionQueue, actionNode, error) {
6507 var last = actionQueue.pending;
6508 actionQueue.pending = null;
6509 if (null !== last) {
6510 last = last.next;
6511 do
6512 actionNode.status = "rejected", actionNode.reason = error, notifyActionListeners(actionNode), actionNode = actionNode.next;
6513 while (actionNode !== last);
6514 }
6515 actionQueue.action = null;
6516 }
6517 function notifyActionListeners(actionNode) {
6518 actionNode = actionNode.listeners;
6519 for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();
6520 }
6521 function actionStateReducer(oldState, newState) {
6522 return newState;
6523 }
6524 function mountActionState(action, initialStateProp) {
6525 if (isHydrating) {
6526 var ssrFormState = workInProgressRoot.formState;
6527 if (null !== ssrFormState) {
6528 a: {
6529 var isMatching = currentlyRenderingFiber;
6530 if (isHydrating) {
6531 if (nextHydratableInstance) {
6532 b: {
6533 var markerInstance = nextHydratableInstance;
6534 for (var inRootOrSingleton = rootOrSingletonContext; 8 !== markerInstance.nodeType; ) {
6535 if (!inRootOrSingleton) {
6536 markerInstance = null;
6537 break b;
6538 }
6539 markerInstance = getNextHydratable(
6540 markerInstance.nextSibling
6541 );
6542 if (null === markerInstance) {
6543 markerInstance = null;
6544 break b;
6545 }
6546 }
6547 inRootOrSingleton = markerInstance.data;
6548 markerInstance = inRootOrSingleton === FORM_STATE_IS_MATCHING || inRootOrSingleton === FORM_STATE_IS_NOT_MATCHING ? markerInstance : null;
6549 }
6550 if (markerInstance) {
6551 nextHydratableInstance = getNextHydratable(
6552 markerInstance.nextSibling
6553 );
6554 isMatching = markerInstance.data === FORM_STATE_IS_MATCHING;
6555 break a;
6556 }
6557 }
6558 throwOnHydrationMismatch(isMatching);
6559 }
6560 isMatching = false;
6561 }
6562 isMatching && (initialStateProp = ssrFormState[0]);
6563 }
6564 }
6565 ssrFormState = mountWorkInProgressHook();
6566 ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;
6567 isMatching = {
6568 pending: null,
6569 lanes: 0,
6570 dispatch: null,
6571 lastRenderedReducer: actionStateReducer,
6572 lastRenderedState: initialStateProp
6573 };
6574 ssrFormState.queue = isMatching;
6575 ssrFormState = dispatchSetState.bind(
6576 null,
6577 currentlyRenderingFiber,
6578 isMatching
6579 );
6580 isMatching.dispatch = ssrFormState;
6581 isMatching = mountStateImpl(false);
6582 inRootOrSingleton = dispatchOptimisticSetState.bind(
6583 null,
6584 currentlyRenderingFiber,
6585 false,
6586 isMatching.queue
6587 );
6588 isMatching = mountWorkInProgressHook();
6589 markerInstance = {
6590 state: initialStateProp,
6591 dispatch: null,
6592 action,
6593 pending: null
6594 };
6595 isMatching.queue = markerInstance;
6596 ssrFormState = dispatchActionState.bind(
6597 null,
6598 currentlyRenderingFiber,
6599 markerInstance,
6600 inRootOrSingleton,
6601 ssrFormState
6602 );
6603 markerInstance.dispatch = ssrFormState;
6604 isMatching.memoizedState = action;
6605 return [initialStateProp, ssrFormState, false];
6606 }
6607 function updateActionState(action) {
6608 var stateHook = updateWorkInProgressHook();
6609 return updateActionStateImpl(stateHook, currentHook, action);
6610 }
6611 function updateActionStateImpl(stateHook, currentStateHook, action) {
6612 currentStateHook = updateReducerImpl(
6613 stateHook,
6614 currentStateHook,
6615 actionStateReducer
6616 )[0];
6617 stateHook = updateReducer(basicStateReducer)[0];
6618 if ("object" === typeof currentStateHook && null !== currentStateHook && "function" === typeof currentStateHook.then)
6619 try {
6620 var state = useThenable(currentStateHook);
6621 } catch (x) {
6622 if (x === SuspenseException) throw SuspenseActionException;
6623 throw x;
6624 }
6625 else state = currentStateHook;
6626 currentStateHook = updateWorkInProgressHook();
6627 var actionQueue = currentStateHook.queue, dispatch = actionQueue.dispatch;
6628 action !== currentStateHook.memoizedState && (currentlyRenderingFiber.flags |= 2048, pushSimpleEffect(
6629 HasEffect | Passive,
6630 { destroy: void 0 },
6631 actionStateActionEffect.bind(null, actionQueue, action),
6632 null
6633 ));
6634 return [state, dispatch, stateHook];
6635 }
6636 function actionStateActionEffect(actionQueue, action) {
6637 actionQueue.action = action;
6638 }
6639 function rerenderActionState(action) {
6640 var stateHook = updateWorkInProgressHook(), currentStateHook = currentHook;
6641 if (null !== currentStateHook)
6642 return updateActionStateImpl(stateHook, currentStateHook, action);
6643 updateWorkInProgressHook();
6644 stateHook = stateHook.memoizedState;
6645 currentStateHook = updateWorkInProgressHook();
6646 var dispatch = currentStateHook.queue.dispatch;
6647 currentStateHook.memoizedState = action;
6648 return [stateHook, dispatch, false];
6649 }
6650 function pushSimpleEffect(tag, inst, create, deps) {
6651 tag = { tag, create, deps, inst, next: null };
6652 inst = currentlyRenderingFiber.updateQueue;
6653 null === inst && (inst = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = inst);
6654 create = inst.lastEffect;
6655 null === create ? inst.lastEffect = tag.next = tag : (deps = create.next, create.next = tag, tag.next = deps, inst.lastEffect = tag);
6656 return tag;
6657 }
6658 function mountRef(initialValue) {
6659 var hook = mountWorkInProgressHook();
6660 initialValue = { current: initialValue };
6661 return hook.memoizedState = initialValue;
6662 }
6663 function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
6664 var hook = mountWorkInProgressHook();
6665 currentlyRenderingFiber.flags |= fiberFlags;
6666 hook.memoizedState = pushSimpleEffect(
6667 HasEffect | hookFlags,
6668 { destroy: void 0 },
6669 create,
6670 void 0 === deps ? null : deps
6671 );
6672 }
6673 function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
6674 var hook = updateWorkInProgressHook();
6675 deps = void 0 === deps ? null : deps;
6676 var inst = hook.memoizedState.inst;
6677 null !== currentHook && null !== deps && areHookInputsEqual(deps, currentHook.memoizedState.deps) ? hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps) : (currentlyRenderingFiber.flags |= fiberFlags, hook.memoizedState = pushSimpleEffect(
6678 HasEffect | hookFlags,
6679 inst,
6680 create,
6681 deps
6682 ));
6683 }
6684 function mountEffect(create, deps) {
6685 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode ? mountEffectImpl(276826112, Passive, create, deps) : mountEffectImpl(8390656, Passive, create, deps);
6686 }
6687 function useEffectEventImpl(payload) {
6688 currentlyRenderingFiber.flags |= 4;
6689 var componentUpdateQueue = currentlyRenderingFiber.updateQueue;
6690 if (null === componentUpdateQueue)
6691 componentUpdateQueue = createFunctionComponentUpdateQueue(), currentlyRenderingFiber.updateQueue = componentUpdateQueue, componentUpdateQueue.events = [payload];
6692 else {
6693 var events = componentUpdateQueue.events;
6694 null === events ? componentUpdateQueue.events = [payload] : events.push(payload);
6695 }
6696 }
6697 function mountEvent(callback) {
6698 var hook = mountWorkInProgressHook(), ref = { impl: callback };
6699 hook.memoizedState = ref;
6700 return function() {
6701 if ((executionContext & RenderContext) !== NoContext)
6702 throw Error(
6703 "A function wrapped in useEffectEvent can't be called during rendering."
6704 );
6705 return ref.impl.apply(void 0, arguments);
6706 };
6707 }
6708 function updateEvent(callback) {
6709 var ref = updateWorkInProgressHook().memoizedState;
6710 useEffectEventImpl({ ref, nextImpl: callback });
6711 return function() {
6712 if ((executionContext & RenderContext) !== NoContext)
6713 throw Error(
6714 "A function wrapped in useEffectEvent can't be called during rendering."
6715 );
6716 return ref.impl.apply(void 0, arguments);
6717 };
6718 }
6719 function mountLayoutEffect(create, deps) {
6720 var fiberFlags = 4194308;
6721 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
6722 return mountEffectImpl(fiberFlags, Layout, create, deps);
6723 }
6724 function imperativeHandleEffect(create, ref) {
6725 if ("function" === typeof ref) {
6726 create = create();
6727 var refCleanup = ref(create);
6728 return function() {
6729 "function" === typeof refCleanup ? refCleanup() : ref(null);
6730 };
6731 }
6732 if (null !== ref && void 0 !== ref)
6733 return ref.hasOwnProperty("current") || console.error(
6734 "Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.",
6735 "an object with keys {" + Object.keys(ref).join(", ") + "}"
6736 ), create = create(), ref.current = create, function() {
6737 ref.current = null;
6738 };
6739 }
6740 function mountImperativeHandle(ref, create, deps) {
6741 "function" !== typeof create && console.error(
6742 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
6743 null !== create ? typeof create : "null"
6744 );
6745 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6746 var fiberFlags = 4194308;
6747 (currentlyRenderingFiber.mode & StrictEffectsMode) !== NoMode && (fiberFlags |= 134217728);
6748 mountEffectImpl(
6749 fiberFlags,
6750 Layout,
6751 imperativeHandleEffect.bind(null, create, ref),
6752 deps
6753 );
6754 }
6755 function updateImperativeHandle(ref, create, deps) {
6756 "function" !== typeof create && console.error(
6757 "Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",
6758 null !== create ? typeof create : "null"
6759 );
6760 deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;
6761 updateEffectImpl(
6762 4,
6763 Layout,
6764 imperativeHandleEffect.bind(null, create, ref),
6765 deps
6766 );
6767 }
6768 function mountCallback(callback, deps) {
6769 mountWorkInProgressHook().memoizedState = [
6770 callback,
6771 void 0 === deps ? null : deps
6772 ];
6773 return callback;
6774 }
6775 function updateCallback(callback, deps) {
6776 var hook = updateWorkInProgressHook();
6777 deps = void 0 === deps ? null : deps;
6778 var prevState = hook.memoizedState;
6779 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6780 return prevState[0];
6781 hook.memoizedState = [callback, deps];
6782 return callback;
6783 }
6784 function mountMemo(nextCreate, deps) {
6785 var hook = mountWorkInProgressHook();
6786 deps = void 0 === deps ? null : deps;
6787 var nextValue = nextCreate();
6788 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6789 setIsStrictModeForDevtools(true);
6790 try {
6791 nextCreate();
6792 } finally {
6793 setIsStrictModeForDevtools(false);
6794 }
6795 }
6796 hook.memoizedState = [nextValue, deps];
6797 return nextValue;
6798 }
6799 function updateMemo(nextCreate, deps) {
6800 var hook = updateWorkInProgressHook();
6801 deps = void 0 === deps ? null : deps;
6802 var prevState = hook.memoizedState;
6803 if (null !== deps && areHookInputsEqual(deps, prevState[1]))
6804 return prevState[0];
6805 prevState = nextCreate();
6806 if (shouldDoubleInvokeUserFnsInHooksDEV) {
6807 setIsStrictModeForDevtools(true);
6808 try {
6809 nextCreate();
6810 } finally {
6811 setIsStrictModeForDevtools(false);
6812 }
6813 }
6814 hook.memoizedState = [prevState, deps];
6815 return prevState;
6816 }
6817 function mountDeferredValue(value, initialValue) {
6818 var hook = mountWorkInProgressHook();
6819 return mountDeferredValueImpl(hook, value, initialValue);
6820 }
6821 function updateDeferredValue(value, initialValue) {
6822 var hook = updateWorkInProgressHook();
6823 return updateDeferredValueImpl(
6824 hook,
6825 currentHook.memoizedState,
6826 value,
6827 initialValue
6828 );
6829 }
6830 function rerenderDeferredValue(value, initialValue) {
6831 var hook = updateWorkInProgressHook();
6832 return null === currentHook ? mountDeferredValueImpl(hook, value, initialValue) : updateDeferredValueImpl(
6833 hook,
6834 currentHook.memoizedState,
6835 value,
6836 initialValue
6837 );
6838 }
6839 function mountDeferredValueImpl(hook, value, initialValue) {
6840 if (void 0 === initialValue || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
6841 return hook.memoizedState = value;
6842 hook.memoizedState = initialValue;
6843 hook = requestDeferredLane();
6844 currentlyRenderingFiber.lanes |= hook;
6845 workInProgressRootSkippedLanes |= hook;
6846 return initialValue;
6847 }
6848 function updateDeferredValueImpl(hook, prevValue, value, initialValue) {
6849 if (objectIs(value, prevValue)) return value;
6850 if (null !== currentTreeHiddenStackCursor.current)
6851 return hook = mountDeferredValueImpl(hook, value, initialValue), objectIs(hook, prevValue) || (didReceiveUpdate = true), hook;
6852 if (0 === (renderLanes & 42) || 0 !== (renderLanes & 1073741824) && 0 === (workInProgressRootRenderLanes & 261930))
6853 return didReceiveUpdate = true, hook.memoizedState = value;
6854 hook = requestDeferredLane();
6855 currentlyRenderingFiber.lanes |= hook;
6856 workInProgressRootSkippedLanes |= hook;
6857 return prevValue;
6858 }
6859 function releaseAsyncTransition() {
6860 ReactSharedInternals.asyncTransitions--;
6861 }
6862 function startTransition(fiber, queue, pendingState, finishedState, callback) {
6863 var previousPriority = ReactDOMSharedInternals.p;
6864 ReactDOMSharedInternals.p = 0 !== previousPriority && previousPriority < ContinuousEventPriority ? previousPriority : ContinuousEventPriority;
6865 var prevTransition = ReactSharedInternals.T, currentTransition = {};
6866 currentTransition._updatedFibers = /* @__PURE__ */ new Set();
6867 ReactSharedInternals.T = currentTransition;
6868 dispatchOptimisticSetState(fiber, false, queue, pendingState);
6869 try {
6870 var returnValue = callback(), onStartTransitionFinish = ReactSharedInternals.S;
6871 null !== onStartTransitionFinish && onStartTransitionFinish(currentTransition, returnValue);
6872 if (null !== returnValue && "object" === typeof returnValue && "function" === typeof returnValue.then) {
6873 ReactSharedInternals.asyncTransitions++;
6874 returnValue.then(releaseAsyncTransition, releaseAsyncTransition);
6875 var thenableForFinishedState = chainThenableValue(
6876 returnValue,
6877 finishedState
6878 );
6879 dispatchSetStateInternal(
6880 fiber,
6881 queue,
6882 thenableForFinishedState,
6883 requestUpdateLane(fiber)
6884 );
6885 } else
6886 dispatchSetStateInternal(
6887 fiber,
6888 queue,
6889 finishedState,
6890 requestUpdateLane(fiber)
6891 );
6892 } catch (error) {
6893 dispatchSetStateInternal(
6894 fiber,
6895 queue,
6896 { then: function() {
6897 }, status: "rejected", reason: error },
6898 requestUpdateLane(fiber)
6899 );
6900 } finally {
6901 ReactDOMSharedInternals.p = previousPriority, null !== prevTransition && null !== currentTransition.types && (null !== prevTransition.types && prevTransition.types !== currentTransition.types && console.error(
6902 "We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."
6903 ), prevTransition.types = currentTransition.types), ReactSharedInternals.T = prevTransition, null === prevTransition && currentTransition._updatedFibers && (fiber = currentTransition._updatedFibers.size, currentTransition._updatedFibers.clear(), 10 < fiber && console.warn(
6904 "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."
6905 ));
6906 }
6907 }
6908 function startHostTransition(formFiber, pendingState, action, formData) {
6909 if (5 !== formFiber.tag)
6910 throw Error(
6911 "Expected the form instance to be a HostComponent. This is a bug in React."
6912 );
6913 var queue = ensureFormComponentIsStateful(formFiber).queue;
6914 startHostActionTimer(formFiber);
6915 startTransition(
6916 formFiber,
6917 queue,
6918 pendingState,
6919 NotPendingTransition,
6920 null === action ? noop : function() {
6921 requestFormReset$1(formFiber);
6922 return action(formData);
6923 }
6924 );
6925 }
6926 function ensureFormComponentIsStateful(formFiber) {
6927 var existingStateHook = formFiber.memoizedState;
6928 if (null !== existingStateHook) return existingStateHook;
6929 existingStateHook = {
6930 memoizedState: NotPendingTransition,
6931 baseState: NotPendingTransition,
6932 baseQueue: null,
6933 queue: {
6934 pending: null,
6935 lanes: 0,
6936 dispatch: null,
6937 lastRenderedReducer: basicStateReducer,
6938 lastRenderedState: NotPendingTransition
6939 },
6940 next: null
6941 };
6942 var initialResetState = {};
6943 existingStateHook.next = {
6944 memoizedState: initialResetState,
6945 baseState: initialResetState,
6946 baseQueue: null,
6947 queue: {
6948 pending: null,
6949 lanes: 0,
6950 dispatch: null,
6951 lastRenderedReducer: basicStateReducer,
6952 lastRenderedState: initialResetState
6953 },
6954 next: null
6955 };
6956 formFiber.memoizedState = existingStateHook;
6957 formFiber = formFiber.alternate;
6958 null !== formFiber && (formFiber.memoizedState = existingStateHook);
6959 return existingStateHook;
6960 }
6961 function requestFormReset$1(formFiber) {
6962 null === ReactSharedInternals.T && console.error(
6963 "requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition."
6964 );
6965 var stateHook = ensureFormComponentIsStateful(formFiber);
6966 null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);
6967 dispatchSetStateInternal(
6968 formFiber,
6969 stateHook.next.queue,
6970 {},
6971 requestUpdateLane(formFiber)
6972 );
6973 }
6974 function mountTransition() {
6975 var stateHook = mountStateImpl(false);
6976 stateHook = startTransition.bind(
6977 null,
6978 currentlyRenderingFiber,
6979 stateHook.queue,
6980 true,
6981 false
6982 );
6983 mountWorkInProgressHook().memoizedState = stateHook;
6984 return [false, stateHook];
6985 }
6986 function updateTransition() {
6987 var booleanOrThenable = updateReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
6988 return [
6989 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
6990 start
6991 ];
6992 }
6993 function rerenderTransition() {
6994 var booleanOrThenable = rerenderReducer(basicStateReducer)[0], start = updateWorkInProgressHook().memoizedState;
6995 return [
6996 "boolean" === typeof booleanOrThenable ? booleanOrThenable : useThenable(booleanOrThenable),
6997 start
6998 ];
6999 }
7000 function useHostTransitionStatus() {
7001 return readContext(HostTransitionContext);
7002 }
7003 function mountId() {
7004 var hook = mountWorkInProgressHook(), identifierPrefix = workInProgressRoot.identifierPrefix;
7005 if (isHydrating) {
7006 var treeId = treeContextOverflow;
7007 var idWithLeadingBit = treeContextId;
7008 treeId = (idWithLeadingBit & ~(1 << 32 - clz32(idWithLeadingBit) - 1)).toString(32) + treeId;
7009 identifierPrefix = "_" + identifierPrefix + "R_" + treeId;
7010 treeId = localIdCounter++;
7011 0 < treeId && (identifierPrefix += "H" + treeId.toString(32));
7012 identifierPrefix += "_";
7013 } else
7014 treeId = globalClientIdCounter++, identifierPrefix = "_" + identifierPrefix + "r_" + treeId.toString(32) + "_";
7015 return hook.memoizedState = identifierPrefix;
7016 }
7017 function mountRefresh() {
7018 return mountWorkInProgressHook().memoizedState = refreshCache.bind(
7019 null,
7020 currentlyRenderingFiber
7021 );
7022 }
7023 function refreshCache(fiber, seedKey) {
7024 for (var provider = fiber.return; null !== provider; ) {
7025 switch (provider.tag) {
7026 case 24:
7027 case 3:
7028 var lane = requestUpdateLane(provider), refreshUpdate = createUpdate(lane), root2 = enqueueUpdate(provider, refreshUpdate, lane);
7029 null !== root2 && (startUpdateTimerByLane(lane, "refresh()", fiber), scheduleUpdateOnFiber(root2, provider, lane), entangleTransitions(root2, provider, lane));
7030 fiber = createCache();
7031 null !== seedKey && void 0 !== seedKey && null !== root2 && console.error(
7032 "The seed argument is not enabled outside experimental channels."
7033 );
7034 refreshUpdate.payload = { cache: fiber };
7035 return;
7036 }
7037 provider = provider.return;
7038 }
7039 }
7040 function dispatchReducerAction(fiber, queue, action) {
7041 var args = arguments;
7042 "function" === typeof args[3] && console.error(
7043 "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()."
7044 );
7045 args = requestUpdateLane(fiber);
7046 var update = {
7047 lane: args,
7048 revertLane: 0,
7049 gesture: null,
7050 action,
7051 hasEagerState: false,
7052 eagerState: null,
7053 next: null
7054 };
7055 isRenderPhaseUpdate(fiber) ? enqueueRenderPhaseUpdate(queue, update) : (update = enqueueConcurrentHookUpdate(fiber, queue, update, args), null !== update && (startUpdateTimerByLane(args, "dispatch()", fiber), scheduleUpdateOnFiber(update, fiber, args), entangleTransitionUpdate(update, queue, args)));
7056 }
7057 function dispatchSetState(fiber, queue, action) {
7058 var args = arguments;
7059 "function" === typeof args[3] && console.error(
7060 "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()."
7061 );
7062 args = requestUpdateLane(fiber);
7063 dispatchSetStateInternal(fiber, queue, action, args) && startUpdateTimerByLane(args, "setState()", fiber);
7064 }
7065 function dispatchSetStateInternal(fiber, queue, action, lane) {
7066 var update = {
7067 lane,
7068 revertLane: 0,
7069 gesture: null,
7070 action,
7071 hasEagerState: false,
7072 eagerState: null,
7073 next: null
7074 };
7075 if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);
7076 else {
7077 var alternate = fiber.alternate;
7078 if (0 === fiber.lanes && (null === alternate || 0 === alternate.lanes) && (alternate = queue.lastRenderedReducer, null !== alternate)) {
7079 var prevDispatcher = ReactSharedInternals.H;
7080 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
7081 try {
7082 var currentState = queue.lastRenderedState, eagerState = alternate(currentState, action);
7083 update.hasEagerState = true;
7084 update.eagerState = eagerState;
7085 if (objectIs(eagerState, currentState))
7086 return enqueueUpdate$1(fiber, queue, update, 0), null === workInProgressRoot && finishQueueingConcurrentUpdates(), false;
7087 } catch (error) {
7088 } finally {
7089 ReactSharedInternals.H = prevDispatcher;
7090 }
7091 }
7092 action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
7093 if (null !== action)
7094 return scheduleUpdateOnFiber(action, fiber, lane), entangleTransitionUpdate(action, queue, lane), true;
7095 }
7096 return false;
7097 }
7098 function dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {
7099 null === ReactSharedInternals.T && 0 === currentEntangledLane && console.error(
7100 "An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition."
7101 );
7102 action = {
7103 lane: 2,
7104 revertLane: requestTransitionLane(),
7105 gesture: null,
7106 action,
7107 hasEagerState: false,
7108 eagerState: null,
7109 next: null
7110 };
7111 if (isRenderPhaseUpdate(fiber)) {
7112 if (throwIfDuringRender)
7113 throw Error("Cannot update optimistic state while rendering.");
7114 console.error("Cannot call startTransition while rendering.");
7115 } else
7116 throwIfDuringRender = enqueueConcurrentHookUpdate(
7117 fiber,
7118 queue,
7119 action,
7120 2
7121 ), null !== throwIfDuringRender && (startUpdateTimerByLane(2, "setOptimistic()", fiber), scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2));
7122 }
7123 function isRenderPhaseUpdate(fiber) {
7124 var alternate = fiber.alternate;
7125 return fiber === currentlyRenderingFiber || null !== alternate && alternate === currentlyRenderingFiber;
7126 }
7127 function enqueueRenderPhaseUpdate(queue, update) {
7128 didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
7129 var pending = queue.pending;
7130 null === pending ? update.next = update : (update.next = pending.next, pending.next = update);
7131 queue.pending = update;
7132 }
7133 function entangleTransitionUpdate(root2, queue, lane) {
7134 if (0 !== (lane & 4194048)) {
7135 var queueLanes = queue.lanes;
7136 queueLanes &= root2.pendingLanes;
7137 lane |= queueLanes;
7138 queue.lanes = lane;
7139 markRootEntangled(root2, lane);
7140 }
7141 }
7142 function warnOnInvalidCallback(callback) {
7143 if (null !== callback && "function" !== typeof callback) {
7144 var key = String(callback);
7145 didWarnOnInvalidCallback.has(key) || (didWarnOnInvalidCallback.add(key), console.error(
7146 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
7147 callback
7148 ));
7149 }
7150 }
7151 function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
7152 var prevState = workInProgress2.memoizedState, partialState = getDerivedStateFromProps(nextProps, prevState);
7153 if (workInProgress2.mode & StrictLegacyMode) {
7154 setIsStrictModeForDevtools(true);
7155 try {
7156 partialState = getDerivedStateFromProps(nextProps, prevState);
7157 } finally {
7158 setIsStrictModeForDevtools(false);
7159 }
7160 }
7161 void 0 === partialState && (ctor = getComponentNameFromType(ctor) || "Component", didWarnAboutUndefinedDerivedState.has(ctor) || (didWarnAboutUndefinedDerivedState.add(ctor), console.error(
7162 "%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",
7163 ctor
7164 )));
7165 prevState = null === partialState || void 0 === partialState ? prevState : assign({}, prevState, partialState);
7166 workInProgress2.memoizedState = prevState;
7167 0 === workInProgress2.lanes && (workInProgress2.updateQueue.baseState = prevState);
7168 }
7169 function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
7170 var instance = workInProgress2.stateNode;
7171 if ("function" === typeof instance.shouldComponentUpdate) {
7172 oldProps = instance.shouldComponentUpdate(
7173 newProps,
7174 newState,
7175 nextContext
7176 );
7177 if (workInProgress2.mode & StrictLegacyMode) {
7178 setIsStrictModeForDevtools(true);
7179 try {
7180 oldProps = instance.shouldComponentUpdate(
7181 newProps,
7182 newState,
7183 nextContext
7184 );
7185 } finally {
7186 setIsStrictModeForDevtools(false);
7187 }
7188 }
7189 void 0 === oldProps && console.error(
7190 "%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",
7191 getComponentNameFromType(ctor) || "Component"
7192 );
7193 return oldProps;
7194 }
7195 return ctor.prototype && ctor.prototype.isPureReactComponent ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState) : true;
7196 }
7197 function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
7198 var oldState = instance.state;
7199 "function" === typeof instance.componentWillReceiveProps && instance.componentWillReceiveProps(newProps, nextContext);
7200 "function" === typeof instance.UNSAFE_componentWillReceiveProps && instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
7201 instance.state !== oldState && (workInProgress2 = getComponentNameFromFiber(workInProgress2) || "Component", didWarnAboutStateAssignmentForComponent.has(workInProgress2) || (didWarnAboutStateAssignmentForComponent.add(workInProgress2), console.error(
7202 "%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
7203 workInProgress2
7204 )), classComponentUpdater.enqueueReplaceState(
7205 instance,
7206 instance.state,
7207 null
7208 ));
7209 }
7210 function resolveClassComponentProps(Component, baseProps) {
7211 var newProps = baseProps;
7212 if ("ref" in baseProps) {
7213 newProps = {};
7214 for (var propName in baseProps)
7215 "ref" !== propName && (newProps[propName] = baseProps[propName]);
7216 }
7217 if (Component = Component.defaultProps) {
7218 newProps === baseProps && (newProps = assign({}, newProps));
7219 for (var _propName in Component)
7220 void 0 === newProps[_propName] && (newProps[_propName] = Component[_propName]);
7221 }
7222 return newProps;
7223 }
7224 function defaultOnUncaughtError(error) {
7225 reportGlobalError(error);
7226 console.warn(
7227 "%s\n\n%s\n",
7228 componentName ? "An error occurred in the <" + componentName + "> component." : "An error occurred in one of your React components.",
7229 "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."
7230 );
7231 }
7232 function defaultOnCaughtError(error) {
7233 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") + ".");
7234 if ("object" === typeof error && null !== error && "string" === typeof error.environmentName) {
7235 var JSCompiler_inline_result = error.environmentName;
7236 error = [
7237 "%o\n\n%s\n\n%s\n",
7238 error,
7239 componentNameMessage,
7240 recreateMessage
7241 ].slice(0);
7242 "string" === typeof error[0] ? error.splice(
7243 0,
7244 1,
7245 badgeFormat + " " + error[0],
7246 badgeStyle,
7247 pad + JSCompiler_inline_result + pad,
7248 resetStyle
7249 ) : error.splice(
7250 0,
7251 0,
7252 badgeFormat,
7253 badgeStyle,
7254 pad + JSCompiler_inline_result + pad,
7255 resetStyle
7256 );
7257 error.unshift(console);
7258 JSCompiler_inline_result = bind.apply(console.error, error);
7259 JSCompiler_inline_result();
7260 } else
7261 console.error(
7262 "%o\n\n%s\n\n%s\n",
7263 error,
7264 componentNameMessage,
7265 recreateMessage
7266 );
7267 }
7268 function defaultOnRecoverableError(error) {
7269 reportGlobalError(error);
7270 }
7271 function logUncaughtError(root2, errorInfo) {
7272 try {
7273 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
7274 errorBoundaryName = null;
7275 var error = errorInfo.value;
7276 if (null !== ReactSharedInternals.actQueue)
7277 ReactSharedInternals.thrownErrors.push(error);
7278 else {
7279 var onUncaughtError = root2.onUncaughtError;
7280 onUncaughtError(error, { componentStack: errorInfo.stack });
7281 }
7282 } catch (e$5) {
7283 setTimeout(function() {
7284 throw e$5;
7285 });
7286 }
7287 }
7288 function logCaughtError(root2, boundary, errorInfo) {
7289 try {
7290 componentName = errorInfo.source ? getComponentNameFromFiber(errorInfo.source) : null;
7291 errorBoundaryName = getComponentNameFromFiber(boundary);
7292 var onCaughtError = root2.onCaughtError;
7293 onCaughtError(errorInfo.value, {
7294 componentStack: errorInfo.stack,
7295 errorBoundary: 1 === boundary.tag ? boundary.stateNode : null
7296 });
7297 } catch (e$6) {
7298 setTimeout(function() {
7299 throw e$6;
7300 });
7301 }
7302 }
7303 function createRootErrorUpdate(root2, errorInfo, lane) {
7304 lane = createUpdate(lane);
7305 lane.tag = CaptureUpdate;
7306 lane.payload = { element: null };
7307 lane.callback = function() {
7308 runWithFiberInDEV(errorInfo.source, logUncaughtError, root2, errorInfo);
7309 };
7310 return lane;
7311 }
7312 function createClassErrorUpdate(lane) {
7313 lane = createUpdate(lane);
7314 lane.tag = CaptureUpdate;
7315 return lane;
7316 }
7317 function initializeClassErrorUpdate(update, root2, fiber, errorInfo) {
7318 var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
7319 if ("function" === typeof getDerivedStateFromError) {
7320 var error = errorInfo.value;
7321 update.payload = function() {
7322 return getDerivedStateFromError(error);
7323 };
7324 update.callback = function() {
7325 markFailedErrorBoundaryForHotReloading(fiber);
7326 runWithFiberInDEV(
7327 errorInfo.source,
7328 logCaughtError,
7329 root2,
7330 fiber,
7331 errorInfo
7332 );
7333 };
7334 }
7335 var inst = fiber.stateNode;
7336 null !== inst && "function" === typeof inst.componentDidCatch && (update.callback = function() {
7337 markFailedErrorBoundaryForHotReloading(fiber);
7338 runWithFiberInDEV(
7339 errorInfo.source,
7340 logCaughtError,
7341 root2,
7342 fiber,
7343 errorInfo
7344 );
7345 "function" !== typeof getDerivedStateFromError && (null === legacyErrorBoundariesThatAlreadyFailed ? legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([this]) : legacyErrorBoundariesThatAlreadyFailed.add(this));
7346 callComponentDidCatchInDEV(this, errorInfo);
7347 "function" === typeof getDerivedStateFromError || 0 === (fiber.lanes & 2) && console.error(
7348 "%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",
7349 getComponentNameFromFiber(fiber) || "Unknown"
7350 );
7351 });
7352 }
7353 function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
7354 sourceFiber.flags |= 32768;
7355 isDevToolsPresent && restorePendingUpdaters(root2, rootRenderLanes);
7356 if (null !== value && "object" === typeof value && "function" === typeof value.then) {
7357 returnFiber = sourceFiber.alternate;
7358 null !== returnFiber && propagateParentContextChanges(
7359 returnFiber,
7360 sourceFiber,
7361 rootRenderLanes,
7362 true
7363 );
7364 isHydrating && (didSuspendOrErrorDEV = true);
7365 sourceFiber = suspenseHandlerStackCursor.current;
7366 if (null !== sourceFiber) {
7367 switch (sourceFiber.tag) {
7368 case 31:
7369 case 13:
7370 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;
7371 case 22:
7372 return sourceFiber.flags |= 65536, value === noopSuspenseyCommitThenable ? sourceFiber.flags |= 16384 : (returnFiber = sourceFiber.updateQueue, null === returnFiber ? (returnFiber = {
7373 transitions: null,
7374 markerInstances: null,
7375 retryQueue: /* @__PURE__ */ new Set([value])
7376 }, sourceFiber.updateQueue = returnFiber) : (sourceFiber = returnFiber.retryQueue, null === sourceFiber ? returnFiber.retryQueue = /* @__PURE__ */ new Set([value]) : sourceFiber.add(value)), attachPingListener(root2, value, rootRenderLanes)), false;
7377 }
7378 throw Error(
7379 "Unexpected Suspense handler tag (" + sourceFiber.tag + "). This is a bug in React."
7380 );
7381 }
7382 attachPingListener(root2, value, rootRenderLanes);
7383 renderDidSuspendDelayIfPossible();
7384 return false;
7385 }
7386 if (isHydrating)
7387 return didSuspendOrErrorDEV = true, returnFiber = suspenseHandlerStackCursor.current, null !== returnFiber ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256), returnFiber.flags |= 65536, returnFiber.lanes = rootRenderLanes, value !== HydrationMismatchException && queueHydrationError(
7388 createCapturedValueAtFiber(
7389 Error(
7390 "There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",
7391 { cause: value }
7392 ),
7393 sourceFiber
7394 )
7395 )) : (value !== HydrationMismatchException && queueHydrationError(
7396 createCapturedValueAtFiber(
7397 Error(
7398 "There was an error while hydrating but React was able to recover by instead client rendering the entire root.",
7399 { cause: value }
7400 ),
7401 sourceFiber
7402 )
7403 ), root2 = root2.current.alternate, root2.flags |= 65536, rootRenderLanes &= -rootRenderLanes, root2.lanes |= rootRenderLanes, value = createCapturedValueAtFiber(value, sourceFiber), rootRenderLanes = createRootErrorUpdate(
7404 root2.stateNode,
7405 value,
7406 rootRenderLanes
7407 ), enqueueCapturedUpdate(root2, rootRenderLanes), workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored)), false;
7408 var error = createCapturedValueAtFiber(
7409 Error(
7410 "There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",
7411 { cause: value }
7412 ),
7413 sourceFiber
7414 );
7415 null === workInProgressRootConcurrentErrors ? workInProgressRootConcurrentErrors = [error] : workInProgressRootConcurrentErrors.push(error);
7416 workInProgressRootExitStatus !== RootSuspendedWithDelay && (workInProgressRootExitStatus = RootErrored);
7417 if (null === returnFiber) return true;
7418 value = createCapturedValueAtFiber(value, sourceFiber);
7419 sourceFiber = returnFiber;
7420 do {
7421 switch (sourceFiber.tag) {
7422 case 3:
7423 return sourceFiber.flags |= 65536, root2 = rootRenderLanes & -rootRenderLanes, sourceFiber.lanes |= root2, root2 = createRootErrorUpdate(
7424 sourceFiber.stateNode,
7425 value,
7426 root2
7427 ), enqueueCapturedUpdate(sourceFiber, root2), false;
7428 case 1:
7429 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))))
7430 return sourceFiber.flags |= 65536, rootRenderLanes &= -rootRenderLanes, sourceFiber.lanes |= rootRenderLanes, rootRenderLanes = createClassErrorUpdate(rootRenderLanes), initializeClassErrorUpdate(
7431 rootRenderLanes,
7432 root2,
7433 sourceFiber,
7434 value
7435 ), enqueueCapturedUpdate(sourceFiber, rootRenderLanes), false;
7436 }
7437 sourceFiber = sourceFiber.return;
7438 } while (null !== sourceFiber);
7439 return false;
7440 }
7441 function reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2) {
7442 workInProgress2.child = null === current2 ? mountChildFibers(workInProgress2, null, nextChildren, renderLanes2) : reconcileChildFibers(
7443 workInProgress2,
7444 current2.child,
7445 nextChildren,
7446 renderLanes2
7447 );
7448 }
7449 function updateForwardRef(current2, workInProgress2, Component, nextProps, renderLanes2) {
7450 Component = Component.render;
7451 var ref = workInProgress2.ref;
7452 if ("ref" in nextProps) {
7453 var propsWithoutRef = {};
7454 for (var key in nextProps)
7455 "ref" !== key && (propsWithoutRef[key] = nextProps[key]);
7456 } else propsWithoutRef = nextProps;
7457 prepareToReadContext(workInProgress2);
7458 nextProps = renderWithHooks(
7459 current2,
7460 workInProgress2,
7461 Component,
7462 propsWithoutRef,
7463 ref,
7464 renderLanes2
7465 );
7466 key = checkDidRenderIdHook();
7467 if (null !== current2 && !didReceiveUpdate)
7468 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7469 isHydrating && key && pushMaterializedTreeId(workInProgress2);
7470 workInProgress2.flags |= 1;
7471 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7472 return workInProgress2.child;
7473 }
7474 function updateMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7475 if (null === current2) {
7476 var type = Component.type;
7477 if ("function" === typeof type && !shouldConstruct(type) && void 0 === type.defaultProps && null === Component.compare)
7478 return Component = resolveFunctionForHotReloading(type), workInProgress2.tag = 15, workInProgress2.type = Component, validateFunctionComponentInDev(workInProgress2, type), updateSimpleMemoComponent(
7479 current2,
7480 workInProgress2,
7481 Component,
7482 nextProps,
7483 renderLanes2
7484 );
7485 current2 = createFiberFromTypeAndProps(
7486 Component.type,
7487 null,
7488 nextProps,
7489 workInProgress2,
7490 workInProgress2.mode,
7491 renderLanes2
7492 );
7493 current2.ref = workInProgress2.ref;
7494 current2.return = workInProgress2;
7495 return workInProgress2.child = current2;
7496 }
7497 type = current2.child;
7498 if (!checkScheduledUpdateOrContext(current2, renderLanes2)) {
7499 var prevProps = type.memoizedProps;
7500 Component = Component.compare;
7501 Component = null !== Component ? Component : shallowEqual;
7502 if (Component(prevProps, nextProps) && current2.ref === workInProgress2.ref)
7503 return bailoutOnAlreadyFinishedWork(
7504 current2,
7505 workInProgress2,
7506 renderLanes2
7507 );
7508 }
7509 workInProgress2.flags |= 1;
7510 current2 = createWorkInProgress(type, nextProps);
7511 current2.ref = workInProgress2.ref;
7512 current2.return = workInProgress2;
7513 return workInProgress2.child = current2;
7514 }
7515 function updateSimpleMemoComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7516 if (null !== current2) {
7517 var prevProps = current2.memoizedProps;
7518 if (shallowEqual(prevProps, nextProps) && current2.ref === workInProgress2.ref && workInProgress2.type === current2.type)
7519 if (didReceiveUpdate = false, workInProgress2.pendingProps = nextProps = prevProps, checkScheduledUpdateOrContext(current2, renderLanes2))
7520 0 !== (current2.flags & 131072) && (didReceiveUpdate = true);
7521 else
7522 return workInProgress2.lanes = current2.lanes, bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7523 }
7524 return updateFunctionComponent(
7525 current2,
7526 workInProgress2,
7527 Component,
7528 nextProps,
7529 renderLanes2
7530 );
7531 }
7532 function updateOffscreenComponent(current2, workInProgress2, renderLanes2, nextProps) {
7533 var nextChildren = nextProps.children, prevState = null !== current2 ? current2.memoizedState : null;
7534 null === current2 && null === workInProgress2.stateNode && (workInProgress2.stateNode = {
7535 _visibility: OffscreenVisible,
7536 _pendingMarkers: null,
7537 _retryCache: null,
7538 _transitions: null
7539 });
7540 if ("hidden" === nextProps.mode) {
7541 if (0 !== (workInProgress2.flags & 128)) {
7542 prevState = null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2;
7543 if (null !== current2) {
7544 nextProps = workInProgress2.child = current2.child;
7545 for (nextChildren = 0; null !== nextProps; )
7546 nextChildren = nextChildren | nextProps.lanes | nextProps.childLanes, nextProps = nextProps.sibling;
7547 nextProps = nextChildren & ~prevState;
7548 } else nextProps = 0, workInProgress2.child = null;
7549 return deferHiddenOffscreenComponent(
7550 current2,
7551 workInProgress2,
7552 prevState,
7553 renderLanes2,
7554 nextProps
7555 );
7556 }
7557 if (0 !== (renderLanes2 & 536870912))
7558 workInProgress2.memoizedState = { baseLanes: 0, cachePool: null }, null !== current2 && pushTransition(
7559 workInProgress2,
7560 null !== prevState ? prevState.cachePool : null
7561 ), null !== prevState ? pushHiddenContext(workInProgress2, prevState) : reuseHiddenContextOnStack(workInProgress2), pushOffscreenSuspenseHandler(workInProgress2);
7562 else
7563 return nextProps = workInProgress2.lanes = 536870912, deferHiddenOffscreenComponent(
7564 current2,
7565 workInProgress2,
7566 null !== prevState ? prevState.baseLanes | renderLanes2 : renderLanes2,
7567 renderLanes2,
7568 nextProps
7569 );
7570 } else
7571 null !== prevState ? (pushTransition(workInProgress2, prevState.cachePool), pushHiddenContext(workInProgress2, prevState), reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.memoizedState = null) : (null !== current2 && pushTransition(workInProgress2, null), reuseHiddenContextOnStack(workInProgress2), reuseSuspenseHandlerOnStack(workInProgress2));
7572 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
7573 return workInProgress2.child;
7574 }
7575 function bailoutOffscreenComponent(current2, workInProgress2) {
7576 null !== current2 && 22 === current2.tag || null !== workInProgress2.stateNode || (workInProgress2.stateNode = {
7577 _visibility: OffscreenVisible,
7578 _pendingMarkers: null,
7579 _retryCache: null,
7580 _transitions: null
7581 });
7582 return workInProgress2.sibling;
7583 }
7584 function deferHiddenOffscreenComponent(current2, workInProgress2, nextBaseLanes, renderLanes2, remainingChildLanes) {
7585 var JSCompiler_inline_result = peekCacheFromPool();
7586 JSCompiler_inline_result = null === JSCompiler_inline_result ? null : {
7587 parent: CacheContext._currentValue,
7588 pool: JSCompiler_inline_result
7589 };
7590 workInProgress2.memoizedState = {
7591 baseLanes: nextBaseLanes,
7592 cachePool: JSCompiler_inline_result
7593 };
7594 null !== current2 && pushTransition(workInProgress2, null);
7595 reuseHiddenContextOnStack(workInProgress2);
7596 pushOffscreenSuspenseHandler(workInProgress2);
7597 null !== current2 && propagateParentContextChanges(current2, workInProgress2, renderLanes2, true);
7598 workInProgress2.childLanes = remainingChildLanes;
7599 return null;
7600 }
7601 function mountActivityChildren(workInProgress2, nextProps) {
7602 var hiddenProp = nextProps.hidden;
7603 void 0 !== hiddenProp && console.error(
7604 `<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
7605 - <Activity %s>
7606 + <Activity %s>`,
7607 true === hiddenProp ? "hidden" : false === hiddenProp ? "hidden={false}" : "hidden={...}",
7608 hiddenProp ? 'mode="hidden"' : 'mode="visible"'
7609 );
7610 nextProps = mountWorkInProgressOffscreenFiber(
7611 { mode: nextProps.mode, children: nextProps.children },
7612 workInProgress2.mode
7613 );
7614 nextProps.ref = workInProgress2.ref;
7615 workInProgress2.child = nextProps;
7616 nextProps.return = workInProgress2;
7617 return nextProps;
7618 }
7619 function retryActivityComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
7620 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
7621 current2 = mountActivityChildren(
7622 workInProgress2,
7623 workInProgress2.pendingProps
7624 );
7625 current2.flags |= 2;
7626 popSuspenseHandler(workInProgress2);
7627 workInProgress2.memoizedState = null;
7628 return current2;
7629 }
7630 function updateActivityComponent(current2, workInProgress2, renderLanes2) {
7631 var nextProps = workInProgress2.pendingProps, didSuspend = 0 !== (workInProgress2.flags & 128);
7632 workInProgress2.flags &= -129;
7633 if (null === current2) {
7634 if (isHydrating) {
7635 if ("hidden" === nextProps.mode)
7636 return current2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.lanes = 536870912, bailoutOffscreenComponent(null, current2);
7637 pushDehydratedActivitySuspenseHandler(workInProgress2);
7638 (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
7639 current2,
7640 rootOrSingletonContext
7641 ), renderLanes2 = null !== renderLanes2 && renderLanes2.data === ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (nextProps = {
7642 dehydrated: renderLanes2,
7643 treeContext: getSuspendedTreeContext(),
7644 retryLane: 536870912,
7645 hydrationErrors: null
7646 }, workInProgress2.memoizedState = nextProps, nextProps = createFiberFromDehydratedFragment(renderLanes2), nextProps.return = workInProgress2, workInProgress2.child = nextProps, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
7647 if (null === renderLanes2)
7648 throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
7649 workInProgress2.lanes = 536870912;
7650 return null;
7651 }
7652 return mountActivityChildren(workInProgress2, nextProps);
7653 }
7654 var prevState = current2.memoizedState;
7655 if (null !== prevState) {
7656 var activityInstance = prevState.dehydrated;
7657 pushDehydratedActivitySuspenseHandler(workInProgress2);
7658 if (didSuspend)
7659 if (workInProgress2.flags & 256)
7660 workInProgress2.flags &= -257, workInProgress2 = retryActivityComponentWithoutHydrating(
7661 current2,
7662 workInProgress2,
7663 renderLanes2
7664 );
7665 else if (null !== workInProgress2.memoizedState)
7666 workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null;
7667 else
7668 throw Error(
7669 "Client rendering an Activity suspended it again. This is a bug in React."
7670 );
7671 else if (warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), didReceiveUpdate || propagateParentContextChanges(
7672 current2,
7673 workInProgress2,
7674 renderLanes2,
7675 false
7676 ), didSuspend = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || didSuspend) {
7677 nextProps = workInProgressRoot;
7678 if (null !== nextProps && (activityInstance = getBumpedLaneForHydration(
7679 nextProps,
7680 renderLanes2
7681 ), 0 !== activityInstance && activityInstance !== prevState.retryLane))
7682 throw prevState.retryLane = activityInstance, enqueueConcurrentRenderForLane(current2, activityInstance), scheduleUpdateOnFiber(nextProps, current2, activityInstance), SelectiveHydrationException;
7683 renderDidSuspendDelayIfPossible();
7684 workInProgress2 = retryActivityComponentWithoutHydrating(
7685 current2,
7686 workInProgress2,
7687 renderLanes2
7688 );
7689 } else
7690 current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
7691 activityInstance.nextSibling
7692 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountActivityChildren(workInProgress2, nextProps), workInProgress2.flags |= 4096;
7693 return workInProgress2;
7694 }
7695 prevState = current2.child;
7696 nextProps = { mode: nextProps.mode, children: nextProps.children };
7697 0 !== (renderLanes2 & 536870912) && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
7698 current2 = createWorkInProgress(prevState, nextProps);
7699 current2.ref = workInProgress2.ref;
7700 workInProgress2.child = current2;
7701 current2.return = workInProgress2;
7702 return current2;
7703 }
7704 function markRef(current2, workInProgress2) {
7705 var ref = workInProgress2.ref;
7706 if (null === ref)
7707 null !== current2 && null !== current2.ref && (workInProgress2.flags |= 4194816);
7708 else {
7709 if ("function" !== typeof ref && "object" !== typeof ref)
7710 throw Error(
7711 "Expected ref to be a function, an object returned by React.createRef(), or undefined/null."
7712 );
7713 if (null === current2 || current2.ref !== ref)
7714 workInProgress2.flags |= 4194816;
7715 }
7716 }
7717 function updateFunctionComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7718 if (Component.prototype && "function" === typeof Component.prototype.render) {
7719 var componentName2 = getComponentNameFromType(Component) || "Unknown";
7720 didWarnAboutBadClass[componentName2] || (console.error(
7721 "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.",
7722 componentName2,
7723 componentName2
7724 ), didWarnAboutBadClass[componentName2] = true);
7725 }
7726 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7727 workInProgress2,
7728 null
7729 );
7730 null === current2 && (validateFunctionComponentInDev(workInProgress2, workInProgress2.type), Component.contextTypes && (componentName2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypes[componentName2] || (didWarnAboutContextTypes[componentName2] = true, console.error(
7731 "%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)",
7732 componentName2
7733 ))));
7734 prepareToReadContext(workInProgress2);
7735 Component = renderWithHooks(
7736 current2,
7737 workInProgress2,
7738 Component,
7739 nextProps,
7740 void 0,
7741 renderLanes2
7742 );
7743 nextProps = checkDidRenderIdHook();
7744 if (null !== current2 && !didReceiveUpdate)
7745 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7746 isHydrating && nextProps && pushMaterializedTreeId(workInProgress2);
7747 workInProgress2.flags |= 1;
7748 reconcileChildren(current2, workInProgress2, Component, renderLanes2);
7749 return workInProgress2.child;
7750 }
7751 function replayFunctionComponent(current2, workInProgress2, nextProps, Component, secondArg, renderLanes2) {
7752 prepareToReadContext(workInProgress2);
7753 hookTypesUpdateIndexDev = -1;
7754 ignorePreviousDependencies = null !== current2 && current2.type !== workInProgress2.type;
7755 workInProgress2.updateQueue = null;
7756 nextProps = renderWithHooksAgain(
7757 workInProgress2,
7758 Component,
7759 nextProps,
7760 secondArg
7761 );
7762 finishRenderingHooks(current2, workInProgress2);
7763 Component = checkDidRenderIdHook();
7764 if (null !== current2 && !didReceiveUpdate)
7765 return bailoutHooks(current2, workInProgress2, renderLanes2), bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
7766 isHydrating && Component && pushMaterializedTreeId(workInProgress2);
7767 workInProgress2.flags |= 1;
7768 reconcileChildren(current2, workInProgress2, nextProps, renderLanes2);
7769 return workInProgress2.child;
7770 }
7771 function updateClassComponent(current2, workInProgress2, Component, nextProps, renderLanes2) {
7772 switch (shouldErrorImpl(workInProgress2)) {
7773 case false:
7774 var _instance = workInProgress2.stateNode, state = new workInProgress2.type(
7775 workInProgress2.memoizedProps,
7776 _instance.context
7777 ).state;
7778 _instance.updater.enqueueSetState(_instance, state, null);
7779 break;
7780 case true:
7781 workInProgress2.flags |= 128;
7782 workInProgress2.flags |= 65536;
7783 _instance = Error("Simulated error coming from DevTools");
7784 var lane = renderLanes2 & -renderLanes2;
7785 workInProgress2.lanes |= lane;
7786 state = workInProgressRoot;
7787 if (null === state)
7788 throw Error(
7789 "Expected a work-in-progress root. This is a bug in React. Please file an issue."
7790 );
7791 lane = createClassErrorUpdate(lane);
7792 initializeClassErrorUpdate(
7793 lane,
7794 state,
7795 workInProgress2,
7796 createCapturedValueAtFiber(_instance, workInProgress2)
7797 );
7798 enqueueCapturedUpdate(workInProgress2, lane);
7799 }
7800 prepareToReadContext(workInProgress2);
7801 if (null === workInProgress2.stateNode) {
7802 state = emptyContextObject;
7803 _instance = Component.contextType;
7804 "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(
7805 "%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",
7806 getComponentNameFromType(Component) || "Component",
7807 lane
7808 ));
7809 "object" === typeof _instance && null !== _instance && (state = readContext(_instance));
7810 _instance = new Component(nextProps, state);
7811 if (workInProgress2.mode & StrictLegacyMode) {
7812 setIsStrictModeForDevtools(true);
7813 try {
7814 _instance = new Component(nextProps, state);
7815 } finally {
7816 setIsStrictModeForDevtools(false);
7817 }
7818 }
7819 state = workInProgress2.memoizedState = null !== _instance.state && void 0 !== _instance.state ? _instance.state : null;
7820 _instance.updater = classComponentUpdater;
7821 workInProgress2.stateNode = _instance;
7822 _instance._reactInternals = workInProgress2;
7823 _instance._reactInternalInstance = fakeInternalInstance;
7824 "function" === typeof Component.getDerivedStateFromProps && null === state && (state = getComponentNameFromType(Component) || "Component", didWarnAboutUninitializedState.has(state) || (didWarnAboutUninitializedState.add(state), console.error(
7825 "`%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.",
7826 state,
7827 null === _instance.state ? "null" : "undefined",
7828 state
7829 )));
7830 if ("function" === typeof Component.getDerivedStateFromProps || "function" === typeof _instance.getSnapshotBeforeUpdate) {
7831 var foundWillUpdateName = lane = state = null;
7832 "function" === typeof _instance.componentWillMount && true !== _instance.componentWillMount.__suppressDeprecationWarning ? state = "componentWillMount" : "function" === typeof _instance.UNSAFE_componentWillMount && (state = "UNSAFE_componentWillMount");
7833 "function" === typeof _instance.componentWillReceiveProps && true !== _instance.componentWillReceiveProps.__suppressDeprecationWarning ? lane = "componentWillReceiveProps" : "function" === typeof _instance.UNSAFE_componentWillReceiveProps && (lane = "UNSAFE_componentWillReceiveProps");
7834 "function" === typeof _instance.componentWillUpdate && true !== _instance.componentWillUpdate.__suppressDeprecationWarning ? foundWillUpdateName = "componentWillUpdate" : "function" === typeof _instance.UNSAFE_componentWillUpdate && (foundWillUpdateName = "UNSAFE_componentWillUpdate");
7835 if (null !== state || null !== lane || null !== foundWillUpdateName) {
7836 _instance = getComponentNameFromType(Component) || "Component";
7837 var newApiName = "function" === typeof Component.getDerivedStateFromProps ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
7838 didWarnAboutLegacyLifecyclesAndDerivedState.has(_instance) || (didWarnAboutLegacyLifecyclesAndDerivedState.add(_instance), console.error(
7839 "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",
7840 _instance,
7841 newApiName,
7842 null !== state ? "\n " + state : "",
7843 null !== lane ? "\n " + lane : "",
7844 null !== foundWillUpdateName ? "\n " + foundWillUpdateName : ""
7845 ));
7846 }
7847 }
7848 _instance = workInProgress2.stateNode;
7849 state = getComponentNameFromType(Component) || "Component";
7850 _instance.render || (Component.prototype && "function" === typeof Component.prototype.render ? console.error(
7851 "No `render` method found on the %s instance: did you accidentally return an object from the constructor?",
7852 state
7853 ) : console.error(
7854 "No `render` method found on the %s instance: you may have forgotten to define `render`.",
7855 state
7856 ));
7857 !_instance.getInitialState || _instance.getInitialState.isReactClassApproved || _instance.state || console.error(
7858 "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?",
7859 state
7860 );
7861 _instance.getDefaultProps && !_instance.getDefaultProps.isReactClassApproved && console.error(
7862 "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.",
7863 state
7864 );
7865 _instance.contextType && console.error(
7866 "contextType was defined as an instance property on %s. Use a static property to define contextType instead.",
7867 state
7868 );
7869 Component.childContextTypes && !didWarnAboutChildContextTypes.has(Component) && (didWarnAboutChildContextTypes.add(Component), console.error(
7870 "%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",
7871 state
7872 ));
7873 Component.contextTypes && !didWarnAboutContextTypes$1.has(Component) && (didWarnAboutContextTypes$1.add(Component), console.error(
7874 "%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)",
7875 state
7876 ));
7877 "function" === typeof _instance.componentShouldUpdate && console.error(
7878 "%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.",
7879 state
7880 );
7881 Component.prototype && Component.prototype.isPureReactComponent && "undefined" !== typeof _instance.shouldComponentUpdate && console.error(
7882 "%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",
7883 getComponentNameFromType(Component) || "A pure component"
7884 );
7885 "function" === typeof _instance.componentDidUnmount && console.error(
7886 "%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",
7887 state
7888 );
7889 "function" === typeof _instance.componentDidReceiveProps && console.error(
7890 "%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().",
7891 state
7892 );
7893 "function" === typeof _instance.componentWillRecieveProps && console.error(
7894 "%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",
7895 state
7896 );
7897 "function" === typeof _instance.UNSAFE_componentWillRecieveProps && console.error(
7898 "%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",
7899 state
7900 );
7901 lane = _instance.props !== nextProps;
7902 void 0 !== _instance.props && lane && console.error(
7903 "When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",
7904 state
7905 );
7906 _instance.defaultProps && console.error(
7907 "Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",
7908 state,
7909 state
7910 );
7911 "function" !== typeof _instance.getSnapshotBeforeUpdate || "function" === typeof _instance.componentDidUpdate || didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(Component) || (didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(Component), console.error(
7912 "%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
7913 getComponentNameFromType(Component)
7914 ));
7915 "function" === typeof _instance.getDerivedStateFromProps && console.error(
7916 "%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7917 state
7918 );
7919 "function" === typeof _instance.getDerivedStateFromError && console.error(
7920 "%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",
7921 state
7922 );
7923 "function" === typeof Component.getSnapshotBeforeUpdate && console.error(
7924 "%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",
7925 state
7926 );
7927 (lane = _instance.state) && ("object" !== typeof lane || isArrayImpl(lane)) && console.error("%s.state: must be set to an object or null", state);
7928 "function" === typeof _instance.getChildContext && "object" !== typeof Component.childContextTypes && console.error(
7929 "%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",
7930 state
7931 );
7932 _instance = workInProgress2.stateNode;
7933 _instance.props = nextProps;
7934 _instance.state = workInProgress2.memoizedState;
7935 _instance.refs = {};
7936 initializeUpdateQueue(workInProgress2);
7937 state = Component.contextType;
7938 _instance.context = "object" === typeof state && null !== state ? readContext(state) : emptyContextObject;
7939 _instance.state === nextProps && (state = getComponentNameFromType(Component) || "Component", didWarnAboutDirectlyAssigningPropsToState.has(state) || (didWarnAboutDirectlyAssigningPropsToState.add(state), console.error(
7940 "%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.",
7941 state
7942 )));
7943 workInProgress2.mode & StrictLegacyMode && ReactStrictModeWarnings.recordLegacyContextWarning(
7944 workInProgress2,
7945 _instance
7946 );
7947 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(
7948 workInProgress2,
7949 _instance
7950 );
7951 _instance.state = workInProgress2.memoizedState;
7952 state = Component.getDerivedStateFromProps;
7953 "function" === typeof state && (applyDerivedStateFromProps(
7954 workInProgress2,
7955 Component,
7956 state,
7957 nextProps
7958 ), _instance.state = workInProgress2.memoizedState);
7959 "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(
7960 "%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",
7961 getComponentNameFromFiber(workInProgress2) || "Component"
7962 ), classComponentUpdater.enqueueReplaceState(
7963 _instance,
7964 _instance.state,
7965 null
7966 )), processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2), suspendIfUpdateReadFromEntangledAsyncAction(), _instance.state = workInProgress2.memoizedState);
7967 "function" === typeof _instance.componentDidMount && (workInProgress2.flags |= 4194308);
7968 (workInProgress2.mode & StrictEffectsMode) !== NoMode && (workInProgress2.flags |= 134217728);
7969 _instance = true;
7970 } else if (null === current2) {
7971 _instance = workInProgress2.stateNode;
7972 var unresolvedOldProps = workInProgress2.memoizedProps;
7973 lane = resolveClassComponentProps(Component, unresolvedOldProps);
7974 _instance.props = lane;
7975 var oldContext = _instance.context;
7976 foundWillUpdateName = Component.contextType;
7977 state = emptyContextObject;
7978 "object" === typeof foundWillUpdateName && null !== foundWillUpdateName && (state = readContext(foundWillUpdateName));
7979 newApiName = Component.getDerivedStateFromProps;
7980 foundWillUpdateName = "function" === typeof newApiName || "function" === typeof _instance.getSnapshotBeforeUpdate;
7981 unresolvedOldProps = workInProgress2.pendingProps !== unresolvedOldProps;
7982 foundWillUpdateName || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (unresolvedOldProps || oldContext !== state) && callComponentWillReceiveProps(
7983 workInProgress2,
7984 _instance,
7985 nextProps,
7986 state
7987 );
7988 hasForceUpdate = false;
7989 var oldState = workInProgress2.memoizedState;
7990 _instance.state = oldState;
7991 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
7992 suspendIfUpdateReadFromEntangledAsyncAction();
7993 oldContext = workInProgress2.memoizedState;
7994 unresolvedOldProps || oldState !== oldContext || hasForceUpdate ? ("function" === typeof newApiName && (applyDerivedStateFromProps(
7995 workInProgress2,
7996 Component,
7997 newApiName,
7998 nextProps
7999 ), oldContext = workInProgress2.memoizedState), (lane = hasForceUpdate || checkShouldComponentUpdate(
8000 workInProgress2,
8001 Component,
8002 lane,
8003 nextProps,
8004 oldState,
8005 oldContext,
8006 state
8007 )) ? (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);
8008 } else {
8009 _instance = workInProgress2.stateNode;
8010 cloneUpdateQueue(current2, workInProgress2);
8011 state = workInProgress2.memoizedProps;
8012 foundWillUpdateName = resolveClassComponentProps(Component, state);
8013 _instance.props = foundWillUpdateName;
8014 newApiName = workInProgress2.pendingProps;
8015 oldState = _instance.context;
8016 oldContext = Component.contextType;
8017 lane = emptyContextObject;
8018 "object" === typeof oldContext && null !== oldContext && (lane = readContext(oldContext));
8019 unresolvedOldProps = Component.getDerivedStateFromProps;
8020 (oldContext = "function" === typeof unresolvedOldProps || "function" === typeof _instance.getSnapshotBeforeUpdate) || "function" !== typeof _instance.UNSAFE_componentWillReceiveProps && "function" !== typeof _instance.componentWillReceiveProps || (state !== newApiName || oldState !== lane) && callComponentWillReceiveProps(
8021 workInProgress2,
8022 _instance,
8023 nextProps,
8024 lane
8025 );
8026 hasForceUpdate = false;
8027 oldState = workInProgress2.memoizedState;
8028 _instance.state = oldState;
8029 processUpdateQueue(workInProgress2, nextProps, _instance, renderLanes2);
8030 suspendIfUpdateReadFromEntangledAsyncAction();
8031 var newState = workInProgress2.memoizedState;
8032 state !== newApiName || oldState !== newState || hasForceUpdate || null !== current2 && null !== current2.dependencies && checkIfContextChanged(current2.dependencies) ? ("function" === typeof unresolvedOldProps && (applyDerivedStateFromProps(
8033 workInProgress2,
8034 Component,
8035 unresolvedOldProps,
8036 nextProps
8037 ), newState = workInProgress2.memoizedState), (foundWillUpdateName = hasForceUpdate || checkShouldComponentUpdate(
8038 workInProgress2,
8039 Component,
8040 foundWillUpdateName,
8041 nextProps,
8042 oldState,
8043 newState,
8044 lane
8045 ) || 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(
8046 nextProps,
8047 newState,
8048 lane
8049 )), "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);
8050 }
8051 lane = _instance;
8052 markRef(current2, workInProgress2);
8053 state = 0 !== (workInProgress2.flags & 128);
8054 if (lane || state) {
8055 lane = workInProgress2.stateNode;
8056 setCurrentFiber(workInProgress2);
8057 if (state && "function" !== typeof Component.getDerivedStateFromError)
8058 Component = null, profilerStartTime = -1;
8059 else if (Component = callRenderInDEV(lane), workInProgress2.mode & StrictLegacyMode) {
8060 setIsStrictModeForDevtools(true);
8061 try {
8062 callRenderInDEV(lane);
8063 } finally {
8064 setIsStrictModeForDevtools(false);
8065 }
8066 }
8067 workInProgress2.flags |= 1;
8068 null !== current2 && state ? (workInProgress2.child = reconcileChildFibers(
8069 workInProgress2,
8070 current2.child,
8071 null,
8072 renderLanes2
8073 ), workInProgress2.child = reconcileChildFibers(
8074 workInProgress2,
8075 null,
8076 Component,
8077 renderLanes2
8078 )) : reconcileChildren(current2, workInProgress2, Component, renderLanes2);
8079 workInProgress2.memoizedState = lane.state;
8080 current2 = workInProgress2.child;
8081 } else
8082 current2 = bailoutOnAlreadyFinishedWork(
8083 current2,
8084 workInProgress2,
8085 renderLanes2
8086 );
8087 renderLanes2 = workInProgress2.stateNode;
8088 _instance && renderLanes2.props !== nextProps && (didWarnAboutReassigningProps || console.error(
8089 "It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",
8090 getComponentNameFromFiber(workInProgress2) || "a component"
8091 ), didWarnAboutReassigningProps = true);
8092 return current2;
8093 }
8094 function mountHostRootWithoutHydrating(current2, workInProgress2, nextChildren, renderLanes2) {
8095 resetHydrationState();
8096 workInProgress2.flags |= 256;
8097 reconcileChildren(current2, workInProgress2, nextChildren, renderLanes2);
8098 return workInProgress2.child;
8099 }
8100 function validateFunctionComponentInDev(workInProgress2, Component) {
8101 Component && Component.childContextTypes && console.error(
8102 "childContextTypes cannot be defined on a function component.\n %s.childContextTypes = ...",
8103 Component.displayName || Component.name || "Component"
8104 );
8105 "function" === typeof Component.getDerivedStateFromProps && (workInProgress2 = getComponentNameFromType(Component) || "Unknown", didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] || (console.error(
8106 "%s: Function components do not support getDerivedStateFromProps.",
8107 workInProgress2
8108 ), didWarnAboutGetDerivedStateOnFunctionComponent[workInProgress2] = true));
8109 "object" === typeof Component.contextType && null !== Component.contextType && (Component = getComponentNameFromType(Component) || "Unknown", didWarnAboutContextTypeOnFunctionComponent[Component] || (console.error(
8110 "%s: Function components do not support contextType.",
8111 Component
8112 ), didWarnAboutContextTypeOnFunctionComponent[Component] = true));
8113 }
8114 function mountSuspenseOffscreenState(renderLanes2) {
8115 return { baseLanes: renderLanes2, cachePool: getSuspendedCache() };
8116 }
8117 function getRemainingWorkInPrimaryTree(current2, primaryTreeDidDefer, renderLanes2) {
8118 current2 = null !== current2 ? current2.childLanes & ~renderLanes2 : 0;
8119 primaryTreeDidDefer && (current2 |= workInProgressDeferredLane);
8120 return current2;
8121 }
8122 function updateSuspenseComponent(current2, workInProgress2, renderLanes2) {
8123 var JSCompiler_object_inline_digest_2724;
8124 var JSCompiler_object_inline_stack_2725 = workInProgress2.pendingProps;
8125 shouldSuspendImpl(workInProgress2) && (workInProgress2.flags |= 128);
8126 var JSCompiler_object_inline_message_2723 = false;
8127 var didSuspend = 0 !== (workInProgress2.flags & 128);
8128 (JSCompiler_object_inline_digest_2724 = didSuspend) || (JSCompiler_object_inline_digest_2724 = null !== current2 && null === current2.memoizedState ? false : 0 !== (suspenseStackCursor.current & ForceSuspenseFallback));
8129 JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_message_2723 = true, workInProgress2.flags &= -129);
8130 JSCompiler_object_inline_digest_2724 = 0 !== (workInProgress2.flags & 32);
8131 workInProgress2.flags &= -33;
8132 if (null === current2) {
8133 if (isHydrating) {
8134 JSCompiler_object_inline_message_2723 ? pushPrimaryTreeSuspenseHandler(workInProgress2) : reuseSuspenseHandlerOnStack(workInProgress2);
8135 (current2 = nextHydratableInstance) ? (renderLanes2 = canHydrateHydrationBoundary(
8136 current2,
8137 rootOrSingletonContext
8138 ), renderLanes2 = null !== renderLanes2 && renderLanes2.data !== ACTIVITY_START_DATA ? renderLanes2 : null, null !== renderLanes2 && (JSCompiler_object_inline_digest_2724 = {
8139 dehydrated: renderLanes2,
8140 treeContext: getSuspendedTreeContext(),
8141 retryLane: 536870912,
8142 hydrationErrors: null
8143 }, workInProgress2.memoizedState = JSCompiler_object_inline_digest_2724, JSCompiler_object_inline_digest_2724 = createFiberFromDehydratedFragment(renderLanes2), JSCompiler_object_inline_digest_2724.return = workInProgress2, workInProgress2.child = JSCompiler_object_inline_digest_2724, hydrationParentFiber = workInProgress2, nextHydratableInstance = null)) : renderLanes2 = null;
8144 if (null === renderLanes2)
8145 throw warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2);
8146 isSuspenseInstanceFallback(renderLanes2) ? workInProgress2.lanes = 32 : workInProgress2.lanes = 536870912;
8147 return null;
8148 }
8149 var nextPrimaryChildren = JSCompiler_object_inline_stack_2725.children;
8150 JSCompiler_object_inline_stack_2725 = JSCompiler_object_inline_stack_2725.fallback;
8151 if (JSCompiler_object_inline_message_2723) {
8152 reuseSuspenseHandlerOnStack(workInProgress2);
8153 var mode = workInProgress2.mode;
8154 nextPrimaryChildren = mountWorkInProgressOffscreenFiber(
8155 { mode: "hidden", children: nextPrimaryChildren },
8156 mode
8157 );
8158 JSCompiler_object_inline_stack_2725 = createFiberFromFragment(
8159 JSCompiler_object_inline_stack_2725,
8160 mode,
8161 renderLanes2,
8162 null
8163 );
8164 nextPrimaryChildren.return = workInProgress2;
8165 JSCompiler_object_inline_stack_2725.return = workInProgress2;
8166 nextPrimaryChildren.sibling = JSCompiler_object_inline_stack_2725;
8167 workInProgress2.child = nextPrimaryChildren;
8168 JSCompiler_object_inline_stack_2725 = workInProgress2.child;
8169 JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2);
8170 JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8171 current2,
8172 JSCompiler_object_inline_digest_2724,
8173 renderLanes2
8174 );
8175 workInProgress2.memoizedState = SUSPENDED_MARKER;
8176 return bailoutOffscreenComponent(
8177 null,
8178 JSCompiler_object_inline_stack_2725
8179 );
8180 }
8181 pushPrimaryTreeSuspenseHandler(workInProgress2);
8182 return mountSuspensePrimaryChildren(
8183 workInProgress2,
8184 nextPrimaryChildren
8185 );
8186 }
8187 var prevState = current2.memoizedState;
8188 if (null !== prevState) {
8189 var JSCompiler_object_inline_componentStack_2726 = prevState.dehydrated;
8190 if (null !== JSCompiler_object_inline_componentStack_2726) {
8191 if (didSuspend)
8192 workInProgress2.flags & 256 ? (pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags &= -257, workInProgress2 = retrySuspenseComponentWithoutHydrating(
8193 current2,
8194 workInProgress2,
8195 renderLanes2
8196 )) : null !== workInProgress2.memoizedState ? (reuseSuspenseHandlerOnStack(workInProgress2), workInProgress2.child = current2.child, workInProgress2.flags |= 128, workInProgress2 = null) : (reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, JSCompiler_object_inline_stack_2725 = mountWorkInProgressOffscreenFiber(
8197 {
8198 mode: "visible",
8199 children: JSCompiler_object_inline_stack_2725.children
8200 },
8201 mode
8202 ), nextPrimaryChildren = createFiberFromFragment(
8203 nextPrimaryChildren,
8204 mode,
8205 renderLanes2,
8206 null
8207 ), nextPrimaryChildren.flags |= 2, JSCompiler_object_inline_stack_2725.return = workInProgress2, nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, reconcileChildFibers(
8208 workInProgress2,
8209 current2.child,
8210 null,
8211 renderLanes2
8212 ), JSCompiler_object_inline_stack_2725 = workInProgress2.child, JSCompiler_object_inline_stack_2725.memoizedState = mountSuspenseOffscreenState(renderLanes2), JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8213 current2,
8214 JSCompiler_object_inline_digest_2724,
8215 renderLanes2
8216 ), workInProgress2.memoizedState = SUSPENDED_MARKER, workInProgress2 = bailoutOffscreenComponent(
8217 null,
8218 JSCompiler_object_inline_stack_2725
8219 ));
8220 else if (pushPrimaryTreeSuspenseHandler(workInProgress2), warnIfHydrating(), 0 !== (renderLanes2 & 536870912) && markRenderDerivedCause(workInProgress2), isSuspenseInstanceFallback(
8221 JSCompiler_object_inline_componentStack_2726
8222 )) {
8223 JSCompiler_object_inline_digest_2724 = JSCompiler_object_inline_componentStack_2726.nextSibling && JSCompiler_object_inline_componentStack_2726.nextSibling.dataset;
8224 if (JSCompiler_object_inline_digest_2724) {
8225 nextPrimaryChildren = JSCompiler_object_inline_digest_2724.dgst;
8226 var message = JSCompiler_object_inline_digest_2724.msg;
8227 mode = JSCompiler_object_inline_digest_2724.stck;
8228 var componentStack = JSCompiler_object_inline_digest_2724.cstck;
8229 }
8230 JSCompiler_object_inline_message_2723 = message;
8231 JSCompiler_object_inline_digest_2724 = nextPrimaryChildren;
8232 JSCompiler_object_inline_stack_2725 = mode;
8233 JSCompiler_object_inline_componentStack_2726 = componentStack;
8234 nextPrimaryChildren = JSCompiler_object_inline_message_2723;
8235 mode = JSCompiler_object_inline_componentStack_2726;
8236 nextPrimaryChildren = nextPrimaryChildren ? Error(nextPrimaryChildren) : Error(
8237 "The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."
8238 );
8239 nextPrimaryChildren.stack = JSCompiler_object_inline_stack_2725 || "";
8240 nextPrimaryChildren.digest = JSCompiler_object_inline_digest_2724;
8241 JSCompiler_object_inline_digest_2724 = void 0 === mode ? null : mode;
8242 JSCompiler_object_inline_stack_2725 = {
8243 value: nextPrimaryChildren,
8244 source: null,
8245 stack: JSCompiler_object_inline_digest_2724
8246 };
8247 "string" === typeof JSCompiler_object_inline_digest_2724 && CapturedStacks.set(
8248 nextPrimaryChildren,
8249 JSCompiler_object_inline_stack_2725
8250 );
8251 queueHydrationError(JSCompiler_object_inline_stack_2725);
8252 workInProgress2 = retrySuspenseComponentWithoutHydrating(
8253 current2,
8254 workInProgress2,
8255 renderLanes2
8256 );
8257 } else if (didReceiveUpdate || propagateParentContextChanges(
8258 current2,
8259 workInProgress2,
8260 renderLanes2,
8261 false
8262 ), JSCompiler_object_inline_digest_2724 = 0 !== (renderLanes2 & current2.childLanes), didReceiveUpdate || JSCompiler_object_inline_digest_2724) {
8263 JSCompiler_object_inline_digest_2724 = workInProgressRoot;
8264 if (null !== JSCompiler_object_inline_digest_2724 && (JSCompiler_object_inline_stack_2725 = getBumpedLaneForHydration(
8265 JSCompiler_object_inline_digest_2724,
8266 renderLanes2
8267 ), 0 !== JSCompiler_object_inline_stack_2725 && JSCompiler_object_inline_stack_2725 !== prevState.retryLane))
8268 throw prevState.retryLane = JSCompiler_object_inline_stack_2725, enqueueConcurrentRenderForLane(
8269 current2,
8270 JSCompiler_object_inline_stack_2725
8271 ), scheduleUpdateOnFiber(
8272 JSCompiler_object_inline_digest_2724,
8273 current2,
8274 JSCompiler_object_inline_stack_2725
8275 ), SelectiveHydrationException;
8276 isSuspenseInstancePending(
8277 JSCompiler_object_inline_componentStack_2726
8278 ) || renderDidSuspendDelayIfPossible();
8279 workInProgress2 = retrySuspenseComponentWithoutHydrating(
8280 current2,
8281 workInProgress2,
8282 renderLanes2
8283 );
8284 } else
8285 isSuspenseInstancePending(
8286 JSCompiler_object_inline_componentStack_2726
8287 ) ? (workInProgress2.flags |= 192, workInProgress2.child = current2.child, workInProgress2 = null) : (current2 = prevState.treeContext, nextHydratableInstance = getNextHydratable(
8288 JSCompiler_object_inline_componentStack_2726.nextSibling
8289 ), hydrationParentFiber = workInProgress2, isHydrating = true, hydrationErrors = null, didSuspendOrErrorDEV = false, hydrationDiffRootDEV = null, rootOrSingletonContext = false, null !== current2 && restoreSuspendedTreeContext(workInProgress2, current2), workInProgress2 = mountSuspensePrimaryChildren(
8290 workInProgress2,
8291 JSCompiler_object_inline_stack_2725.children
8292 ), workInProgress2.flags |= 4096);
8293 return workInProgress2;
8294 }
8295 }
8296 if (JSCompiler_object_inline_message_2723)
8297 return reuseSuspenseHandlerOnStack(workInProgress2), nextPrimaryChildren = JSCompiler_object_inline_stack_2725.fallback, mode = workInProgress2.mode, componentStack = current2.child, JSCompiler_object_inline_componentStack_2726 = componentStack.sibling, JSCompiler_object_inline_stack_2725 = createWorkInProgress(
8298 componentStack,
8299 {
8300 mode: "hidden",
8301 children: JSCompiler_object_inline_stack_2725.children
8302 }
8303 ), JSCompiler_object_inline_stack_2725.subtreeFlags = componentStack.subtreeFlags & 65011712, null !== JSCompiler_object_inline_componentStack_2726 ? nextPrimaryChildren = createWorkInProgress(
8304 JSCompiler_object_inline_componentStack_2726,
8305 nextPrimaryChildren
8306 ) : (nextPrimaryChildren = createFiberFromFragment(
8307 nextPrimaryChildren,
8308 mode,
8309 renderLanes2,
8310 null
8311 ), nextPrimaryChildren.flags |= 2), nextPrimaryChildren.return = workInProgress2, JSCompiler_object_inline_stack_2725.return = workInProgress2, JSCompiler_object_inline_stack_2725.sibling = nextPrimaryChildren, workInProgress2.child = JSCompiler_object_inline_stack_2725, bailoutOffscreenComponent(null, JSCompiler_object_inline_stack_2725), JSCompiler_object_inline_stack_2725 = workInProgress2.child, nextPrimaryChildren = current2.child.memoizedState, null === nextPrimaryChildren ? nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes2) : (mode = nextPrimaryChildren.cachePool, null !== mode ? (componentStack = CacheContext._currentValue, mode = mode.parent !== componentStack ? { parent: componentStack, pool: componentStack } : mode) : mode = getSuspendedCache(), nextPrimaryChildren = {
8312 baseLanes: nextPrimaryChildren.baseLanes | renderLanes2,
8313 cachePool: mode
8314 }), JSCompiler_object_inline_stack_2725.memoizedState = nextPrimaryChildren, JSCompiler_object_inline_stack_2725.childLanes = getRemainingWorkInPrimaryTree(
8315 current2,
8316 JSCompiler_object_inline_digest_2724,
8317 renderLanes2
8318 ), workInProgress2.memoizedState = SUSPENDED_MARKER, bailoutOffscreenComponent(
8319 current2.child,
8320 JSCompiler_object_inline_stack_2725
8321 );
8322 null !== prevState && (renderLanes2 & 62914560) === renderLanes2 && 0 !== (renderLanes2 & current2.lanes) && markRenderDerivedCause(workInProgress2);
8323 pushPrimaryTreeSuspenseHandler(workInProgress2);
8324 renderLanes2 = current2.child;
8325 current2 = renderLanes2.sibling;
8326 renderLanes2 = createWorkInProgress(renderLanes2, {
8327 mode: "visible",
8328 children: JSCompiler_object_inline_stack_2725.children
8329 });
8330 renderLanes2.return = workInProgress2;
8331 renderLanes2.sibling = null;
8332 null !== current2 && (JSCompiler_object_inline_digest_2724 = workInProgress2.deletions, null === JSCompiler_object_inline_digest_2724 ? (workInProgress2.deletions = [current2], workInProgress2.flags |= 16) : JSCompiler_object_inline_digest_2724.push(current2));
8333 workInProgress2.child = renderLanes2;
8334 workInProgress2.memoizedState = null;
8335 return renderLanes2;
8336 }
8337 function mountSuspensePrimaryChildren(workInProgress2, primaryChildren) {
8338 primaryChildren = mountWorkInProgressOffscreenFiber(
8339 { mode: "visible", children: primaryChildren },
8340 workInProgress2.mode
8341 );
8342 primaryChildren.return = workInProgress2;
8343 return workInProgress2.child = primaryChildren;
8344 }
8345 function mountWorkInProgressOffscreenFiber(offscreenProps, mode) {
8346 offscreenProps = createFiber(22, offscreenProps, null, mode);
8347 offscreenProps.lanes = 0;
8348 return offscreenProps;
8349 }
8350 function retrySuspenseComponentWithoutHydrating(current2, workInProgress2, renderLanes2) {
8351 reconcileChildFibers(workInProgress2, current2.child, null, renderLanes2);
8352 current2 = mountSuspensePrimaryChildren(
8353 workInProgress2,
8354 workInProgress2.pendingProps.children
8355 );
8356 current2.flags |= 2;
8357 workInProgress2.memoizedState = null;
8358 return current2;
8359 }
8360 function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
8361 fiber.lanes |= renderLanes2;
8362 var alternate = fiber.alternate;
8363 null !== alternate && (alternate.lanes |= renderLanes2);
8364 scheduleContextWorkOnParentPath(
8365 fiber.return,
8366 renderLanes2,
8367 propagationRoot
8368 );
8369 }
8370 function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode, treeForkCount2) {
8371 var renderState = workInProgress2.memoizedState;
8372 null === renderState ? workInProgress2.memoizedState = {
8373 isBackwards,
8374 rendering: null,
8375 renderingStartTime: 0,
8376 last: lastContentRow,
8377 tail,
8378 tailMode,
8379 treeForkCount: treeForkCount2
8380 } : (renderState.isBackwards = isBackwards, renderState.rendering = null, renderState.renderingStartTime = 0, renderState.last = lastContentRow, renderState.tail = tail, renderState.tailMode = tailMode, renderState.treeForkCount = treeForkCount2);
8381 }
8382 function updateSuspenseListComponent(current2, workInProgress2, renderLanes2) {
8383 var nextProps = workInProgress2.pendingProps, revealOrder = nextProps.revealOrder, tailMode = nextProps.tail, newChildren = nextProps.children, suspenseContext = suspenseStackCursor.current;
8384 (nextProps = 0 !== (suspenseContext & ForceSuspenseFallback)) ? (suspenseContext = suspenseContext & SubtreeSuspenseContextMask | ForceSuspenseFallback, workInProgress2.flags |= 128) : suspenseContext &= SubtreeSuspenseContextMask;
8385 push(suspenseStackCursor, suspenseContext, workInProgress2);
8386 suspenseContext = null == revealOrder ? "null" : revealOrder;
8387 if ("forwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && "together" !== revealOrder && "independent" !== revealOrder && !didWarnAboutRevealOrder[suspenseContext])
8388 if (didWarnAboutRevealOrder[suspenseContext] = true, null == revealOrder)
8389 console.error(
8390 'The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".'
8391 );
8392 else if ("backwards" === revealOrder)
8393 console.error(
8394 'The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.'
8395 );
8396 else if ("string" === typeof revealOrder)
8397 switch (revealOrder.toLowerCase()) {
8398 case "together":
8399 case "forwards":
8400 case "backwards":
8401 case "independent":
8402 console.error(
8403 '"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',
8404 revealOrder,
8405 revealOrder.toLowerCase()
8406 );
8407 break;
8408 case "forward":
8409 case "backward":
8410 console.error(
8411 '"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',
8412 revealOrder,
8413 revealOrder.toLowerCase()
8414 );
8415 break;
8416 default:
8417 console.error(
8418 '"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
8419 revealOrder
8420 );
8421 }
8422 else
8423 console.error(
8424 '%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',
8425 revealOrder
8426 );
8427 suspenseContext = null == tailMode ? "null" : tailMode;
8428 if (!didWarnAboutTailOptions[suspenseContext])
8429 if (null == tailMode) {
8430 if ("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder)
8431 didWarnAboutTailOptions[suspenseContext] = true, console.error(
8432 'The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".'
8433 );
8434 } else
8435 "visible" !== tailMode && "collapsed" !== tailMode && "hidden" !== tailMode ? (didWarnAboutTailOptions[suspenseContext] = true, console.error(
8436 '"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',
8437 tailMode
8438 )) : "forwards" !== revealOrder && "backwards" !== revealOrder && "unstable_legacy-backwards" !== revealOrder && (didWarnAboutTailOptions[suspenseContext] = true, console.error(
8439 '<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',
8440 tailMode
8441 ));
8442 a: if (("forwards" === revealOrder || "backwards" === revealOrder || "unstable_legacy-backwards" === revealOrder) && void 0 !== newChildren && null !== newChildren && false !== newChildren)
8443 if (isArrayImpl(newChildren))
8444 for (suspenseContext = 0; suspenseContext < newChildren.length; suspenseContext++) {
8445 if (!validateSuspenseListNestedChild(
8446 newChildren[suspenseContext],
8447 suspenseContext
8448 ))
8449 break a;
8450 }
8451 else if (suspenseContext = getIteratorFn(newChildren), "function" === typeof suspenseContext) {
8452 if (suspenseContext = suspenseContext.call(newChildren))
8453 for (var step = suspenseContext.next(), _i = 0; !step.done; step = suspenseContext.next()) {
8454 if (!validateSuspenseListNestedChild(step.value, _i)) break a;
8455 _i++;
8456 }
8457 } else
8458 console.error(
8459 '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?',
8460 revealOrder
8461 );
8462 reconcileChildren(current2, workInProgress2, newChildren, renderLanes2);
8463 isHydrating ? (warnIfNotHydrating(), newChildren = treeForkCount) : newChildren = 0;
8464 if (!nextProps && null !== current2 && 0 !== (current2.flags & 128))
8465 a: for (current2 = workInProgress2.child; null !== current2; ) {
8466 if (13 === current2.tag)
8467 null !== current2.memoizedState && scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
8468 else if (19 === current2.tag)
8469 scheduleSuspenseWorkOnFiber(current2, renderLanes2, workInProgress2);
8470 else if (null !== current2.child) {
8471 current2.child.return = current2;
8472 current2 = current2.child;
8473 continue;
8474 }
8475 if (current2 === workInProgress2) break a;
8476 for (; null === current2.sibling; ) {
8477 if (null === current2.return || current2.return === workInProgress2)
8478 break a;
8479 current2 = current2.return;
8480 }
8481 current2.sibling.return = current2.return;
8482 current2 = current2.sibling;
8483 }
8484 switch (revealOrder) {
8485 case "forwards":
8486 renderLanes2 = workInProgress2.child;
8487 for (revealOrder = null; null !== renderLanes2; )
8488 current2 = renderLanes2.alternate, null !== current2 && null === findFirstSuspended(current2) && (revealOrder = renderLanes2), renderLanes2 = renderLanes2.sibling;
8489 renderLanes2 = revealOrder;
8490 null === renderLanes2 ? (revealOrder = workInProgress2.child, workInProgress2.child = null) : (revealOrder = renderLanes2.sibling, renderLanes2.sibling = null);
8491 initSuspenseListRenderState(
8492 workInProgress2,
8493 false,
8494 revealOrder,
8495 renderLanes2,
8496 tailMode,
8497 newChildren
8498 );
8499 break;
8500 case "backwards":
8501 case "unstable_legacy-backwards":
8502 renderLanes2 = null;
8503 revealOrder = workInProgress2.child;
8504 for (workInProgress2.child = null; null !== revealOrder; ) {
8505 current2 = revealOrder.alternate;
8506 if (null !== current2 && null === findFirstSuspended(current2)) {
8507 workInProgress2.child = revealOrder;
8508 break;
8509 }
8510 current2 = revealOrder.sibling;
8511 revealOrder.sibling = renderLanes2;
8512 renderLanes2 = revealOrder;
8513 revealOrder = current2;
8514 }
8515 initSuspenseListRenderState(
8516 workInProgress2,
8517 true,
8518 renderLanes2,
8519 null,
8520 tailMode,
8521 newChildren
8522 );
8523 break;
8524 case "together":
8525 initSuspenseListRenderState(
8526 workInProgress2,
8527 false,
8528 null,
8529 null,
8530 void 0,
8531 newChildren
8532 );
8533 break;
8534 default:
8535 workInProgress2.memoizedState = null;
8536 }
8537 return workInProgress2.child;
8538 }
8539 function bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2) {
8540 null !== current2 && (workInProgress2.dependencies = current2.dependencies);
8541 profilerStartTime = -1;
8542 workInProgressRootSkippedLanes |= workInProgress2.lanes;
8543 if (0 === (renderLanes2 & workInProgress2.childLanes))
8544 if (null !== current2) {
8545 if (propagateParentContextChanges(
8546 current2,
8547 workInProgress2,
8548 renderLanes2,
8549 false
8550 ), 0 === (renderLanes2 & workInProgress2.childLanes))
8551 return null;
8552 } else return null;
8553 if (null !== current2 && workInProgress2.child !== current2.child)
8554 throw Error("Resuming work not yet implemented.");
8555 if (null !== workInProgress2.child) {
8556 current2 = workInProgress2.child;
8557 renderLanes2 = createWorkInProgress(current2, current2.pendingProps);
8558 workInProgress2.child = renderLanes2;
8559 for (renderLanes2.return = workInProgress2; null !== current2.sibling; )
8560 current2 = current2.sibling, renderLanes2 = renderLanes2.sibling = createWorkInProgress(current2, current2.pendingProps), renderLanes2.return = workInProgress2;
8561 renderLanes2.sibling = null;
8562 }
8563 return workInProgress2.child;
8564 }
8565 function checkScheduledUpdateOrContext(current2, renderLanes2) {
8566 if (0 !== (current2.lanes & renderLanes2)) return true;
8567 current2 = current2.dependencies;
8568 return null !== current2 && checkIfContextChanged(current2) ? true : false;
8569 }
8570 function attemptEarlyBailoutIfNoScheduledUpdate(current2, workInProgress2, renderLanes2) {
8571 switch (workInProgress2.tag) {
8572 case 3:
8573 pushHostContainer(
8574 workInProgress2,
8575 workInProgress2.stateNode.containerInfo
8576 );
8577 pushProvider(
8578 workInProgress2,
8579 CacheContext,
8580 current2.memoizedState.cache
8581 );
8582 resetHydrationState();
8583 break;
8584 case 27:
8585 case 5:
8586 pushHostContext(workInProgress2);
8587 break;
8588 case 4:
8589 pushHostContainer(
8590 workInProgress2,
8591 workInProgress2.stateNode.containerInfo
8592 );
8593 break;
8594 case 10:
8595 pushProvider(
8596 workInProgress2,
8597 workInProgress2.type,
8598 workInProgress2.memoizedProps.value
8599 );
8600 break;
8601 case 12:
8602 0 !== (renderLanes2 & workInProgress2.childLanes) && (workInProgress2.flags |= 4);
8603 workInProgress2.flags |= 2048;
8604 var stateNode = workInProgress2.stateNode;
8605 stateNode.effectDuration = -0;
8606 stateNode.passiveEffectDuration = -0;
8607 break;
8608 case 31:
8609 if (null !== workInProgress2.memoizedState)
8610 return workInProgress2.flags |= 128, pushDehydratedActivitySuspenseHandler(workInProgress2), null;
8611 break;
8612 case 13:
8613 stateNode = workInProgress2.memoizedState;
8614 if (null !== stateNode) {
8615 if (null !== stateNode.dehydrated)
8616 return pushPrimaryTreeSuspenseHandler(workInProgress2), workInProgress2.flags |= 128, null;
8617 if (0 !== (renderLanes2 & workInProgress2.child.childLanes))
8618 return updateSuspenseComponent(
8619 current2,
8620 workInProgress2,
8621 renderLanes2
8622 );
8623 pushPrimaryTreeSuspenseHandler(workInProgress2);
8624 current2 = bailoutOnAlreadyFinishedWork(
8625 current2,
8626 workInProgress2,
8627 renderLanes2
8628 );
8629 return null !== current2 ? current2.sibling : null;
8630 }
8631 pushPrimaryTreeSuspenseHandler(workInProgress2);
8632 break;
8633 case 19:
8634 var didSuspendBefore = 0 !== (current2.flags & 128);
8635 stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes);
8636 stateNode || (propagateParentContextChanges(
8637 current2,
8638 workInProgress2,
8639 renderLanes2,
8640 false
8641 ), stateNode = 0 !== (renderLanes2 & workInProgress2.childLanes));
8642 if (didSuspendBefore) {
8643 if (stateNode)
8644 return updateSuspenseListComponent(
8645 current2,
8646 workInProgress2,
8647 renderLanes2
8648 );
8649 workInProgress2.flags |= 128;
8650 }
8651 didSuspendBefore = workInProgress2.memoizedState;
8652 null !== didSuspendBefore && (didSuspendBefore.rendering = null, didSuspendBefore.tail = null, didSuspendBefore.lastEffect = null);
8653 push(
8654 suspenseStackCursor,
8655 suspenseStackCursor.current,
8656 workInProgress2
8657 );
8658 if (stateNode) break;
8659 else return null;
8660 case 22:
8661 return workInProgress2.lanes = 0, updateOffscreenComponent(
8662 current2,
8663 workInProgress2,
8664 renderLanes2,
8665 workInProgress2.pendingProps
8666 );
8667 case 24:
8668 pushProvider(
8669 workInProgress2,
8670 CacheContext,
8671 current2.memoizedState.cache
8672 );
8673 }
8674 return bailoutOnAlreadyFinishedWork(current2, workInProgress2, renderLanes2);
8675 }
8676 function beginWork(current2, workInProgress2, renderLanes2) {
8677 if (workInProgress2._debugNeedsRemount && null !== current2) {
8678 renderLanes2 = createFiberFromTypeAndProps(
8679 workInProgress2.type,
8680 workInProgress2.key,
8681 workInProgress2.pendingProps,
8682 workInProgress2._debugOwner || null,
8683 workInProgress2.mode,
8684 workInProgress2.lanes
8685 );
8686 renderLanes2._debugStack = workInProgress2._debugStack;
8687 renderLanes2._debugTask = workInProgress2._debugTask;
8688 var returnFiber = workInProgress2.return;
8689 if (null === returnFiber) throw Error("Cannot swap the root fiber.");
8690 current2.alternate = null;
8691 workInProgress2.alternate = null;
8692 renderLanes2.index = workInProgress2.index;
8693 renderLanes2.sibling = workInProgress2.sibling;
8694 renderLanes2.return = workInProgress2.return;
8695 renderLanes2.ref = workInProgress2.ref;
8696 renderLanes2._debugInfo = workInProgress2._debugInfo;
8697 if (workInProgress2 === returnFiber.child)
8698 returnFiber.child = renderLanes2;
8699 else {
8700 var prevSibling = returnFiber.child;
8701 if (null === prevSibling)
8702 throw Error("Expected parent to have a child.");
8703 for (; prevSibling.sibling !== workInProgress2; )
8704 if (prevSibling = prevSibling.sibling, null === prevSibling)
8705 throw Error("Expected to find the previous sibling.");
8706 prevSibling.sibling = renderLanes2;
8707 }
8708 workInProgress2 = returnFiber.deletions;
8709 null === workInProgress2 ? (returnFiber.deletions = [current2], returnFiber.flags |= 16) : workInProgress2.push(current2);
8710 renderLanes2.flags |= 2;
8711 return renderLanes2;
8712 }
8713 if (null !== current2)
8714 if (current2.memoizedProps !== workInProgress2.pendingProps || workInProgress2.type !== current2.type)
8715 didReceiveUpdate = true;
8716 else {
8717 if (!checkScheduledUpdateOrContext(current2, renderLanes2) && 0 === (workInProgress2.flags & 128))
8718 return didReceiveUpdate = false, attemptEarlyBailoutIfNoScheduledUpdate(
8719 current2,
8720 workInProgress2,
8721 renderLanes2
8722 );
8723 didReceiveUpdate = 0 !== (current2.flags & 131072) ? true : false;
8724 }
8725 else {
8726 didReceiveUpdate = false;
8727 if (returnFiber = isHydrating)
8728 warnIfNotHydrating(), returnFiber = 0 !== (workInProgress2.flags & 1048576);
8729 returnFiber && (returnFiber = workInProgress2.index, warnIfNotHydrating(), pushTreeId(workInProgress2, treeForkCount, returnFiber));
8730 }
8731 workInProgress2.lanes = 0;
8732 switch (workInProgress2.tag) {
8733 case 16:
8734 a: if (returnFiber = workInProgress2.pendingProps, current2 = resolveLazy(workInProgress2.elementType), workInProgress2.type = current2, "function" === typeof current2)
8735 shouldConstruct(current2) ? (returnFiber = resolveClassComponentProps(
8736 current2,
8737 returnFiber
8738 ), workInProgress2.tag = 1, workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateClassComponent(
8739 null,
8740 workInProgress2,
8741 current2,
8742 returnFiber,
8743 renderLanes2
8744 )) : (workInProgress2.tag = 0, validateFunctionComponentInDev(workInProgress2, current2), workInProgress2.type = current2 = resolveFunctionForHotReloading(current2), workInProgress2 = updateFunctionComponent(
8745 null,
8746 workInProgress2,
8747 current2,
8748 returnFiber,
8749 renderLanes2
8750 ));
8751 else {
8752 if (void 0 !== current2 && null !== current2) {
8753 if (prevSibling = current2.$$typeof, prevSibling === REACT_FORWARD_REF_TYPE) {
8754 workInProgress2.tag = 11;
8755 workInProgress2.type = current2 = resolveForwardRefForHotReloading(current2);
8756 workInProgress2 = updateForwardRef(
8757 null,
8758 workInProgress2,
8759 current2,
8760 returnFiber,
8761 renderLanes2
8762 );
8763 break a;
8764 } else if (prevSibling === REACT_MEMO_TYPE) {
8765 workInProgress2.tag = 14;
8766 workInProgress2 = updateMemoComponent(
8767 null,
8768 workInProgress2,
8769 current2,
8770 returnFiber,
8771 renderLanes2
8772 );
8773 break a;
8774 }
8775 }
8776 workInProgress2 = "";
8777 null !== current2 && "object" === typeof current2 && current2.$$typeof === REACT_LAZY_TYPE && (workInProgress2 = " Did you wrap a component in React.lazy() more than once?");
8778 renderLanes2 = getComponentNameFromType(current2) || current2;
8779 throw Error(
8780 "Element type is invalid. Received a promise that resolves to: " + renderLanes2 + ". Lazy element type must resolve to a class or function." + workInProgress2
8781 );
8782 }
8783 return workInProgress2;
8784 case 0:
8785 return updateFunctionComponent(
8786 current2,
8787 workInProgress2,
8788 workInProgress2.type,
8789 workInProgress2.pendingProps,
8790 renderLanes2
8791 );
8792 case 1:
8793 return returnFiber = workInProgress2.type, prevSibling = resolveClassComponentProps(
8794 returnFiber,
8795 workInProgress2.pendingProps
8796 ), updateClassComponent(
8797 current2,
8798 workInProgress2,
8799 returnFiber,
8800 prevSibling,
8801 renderLanes2
8802 );
8803 case 3:
8804 a: {
8805 pushHostContainer(
8806 workInProgress2,
8807 workInProgress2.stateNode.containerInfo
8808 );
8809 if (null === current2)
8810 throw Error(
8811 "Should have a current fiber. This is a bug in React."
8812 );
8813 returnFiber = workInProgress2.pendingProps;
8814 var prevState = workInProgress2.memoizedState;
8815 prevSibling = prevState.element;
8816 cloneUpdateQueue(current2, workInProgress2);
8817 processUpdateQueue(workInProgress2, returnFiber, null, renderLanes2);
8818 var nextState = workInProgress2.memoizedState;
8819 returnFiber = nextState.cache;
8820 pushProvider(workInProgress2, CacheContext, returnFiber);
8821 returnFiber !== prevState.cache && propagateContextChanges(
8822 workInProgress2,
8823 [CacheContext],
8824 renderLanes2,
8825 true
8826 );
8827 suspendIfUpdateReadFromEntangledAsyncAction();
8828 returnFiber = nextState.element;
8829 if (prevState.isDehydrated)
8830 if (prevState = {
8831 element: returnFiber,
8832 isDehydrated: false,
8833 cache: nextState.cache
8834 }, workInProgress2.updateQueue.baseState = prevState, workInProgress2.memoizedState = prevState, workInProgress2.flags & 256) {
8835 workInProgress2 = mountHostRootWithoutHydrating(
8836 current2,
8837 workInProgress2,
8838 returnFiber,
8839 renderLanes2
8840 );
8841 break a;
8842 } else if (returnFiber !== prevSibling) {
8843 prevSibling = createCapturedValueAtFiber(
8844 Error(
8845 "This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."
8846 ),
8847 workInProgress2
8848 );
8849 queueHydrationError(prevSibling);
8850 workInProgress2 = mountHostRootWithoutHydrating(
8851 current2,
8852 workInProgress2,
8853 returnFiber,
8854 renderLanes2
8855 );
8856 break a;
8857 } else {
8858 current2 = workInProgress2.stateNode.containerInfo;
8859 switch (current2.nodeType) {
8860 case 9:
8861 current2 = current2.body;
8862 break;
8863 default:
8864 current2 = "HTML" === current2.nodeName ? current2.ownerDocument.body : current2;
8865 }
8866 nextHydratableInstance = getNextHydratable(current2.firstChild);
8867 hydrationParentFiber = workInProgress2;
8868 isHydrating = true;
8869 hydrationErrors = null;
8870 didSuspendOrErrorDEV = false;
8871 hydrationDiffRootDEV = null;
8872 rootOrSingletonContext = true;
8873 renderLanes2 = mountChildFibers(
8874 workInProgress2,
8875 null,
8876 returnFiber,
8877 renderLanes2
8878 );
8879 for (workInProgress2.child = renderLanes2; renderLanes2; )
8880 renderLanes2.flags = renderLanes2.flags & -3 | 4096, renderLanes2 = renderLanes2.sibling;
8881 }
8882 else {
8883 resetHydrationState();
8884 if (returnFiber === prevSibling) {
8885 workInProgress2 = bailoutOnAlreadyFinishedWork(
8886 current2,
8887 workInProgress2,
8888 renderLanes2
8889 );
8890 break a;
8891 }
8892 reconcileChildren(
8893 current2,
8894 workInProgress2,
8895 returnFiber,
8896 renderLanes2
8897 );
8898 }
8899 workInProgress2 = workInProgress2.child;
8900 }
8901 return workInProgress2;
8902 case 26:
8903 return markRef(current2, workInProgress2), null === current2 ? (renderLanes2 = getResource(
8904 workInProgress2.type,
8905 null,
8906 workInProgress2.pendingProps,
8907 null
8908 )) ? workInProgress2.memoizedState = renderLanes2 : isHydrating || (renderLanes2 = workInProgress2.type, current2 = workInProgress2.pendingProps, returnFiber = requiredContext(
8909 rootInstanceStackCursor.current
8910 ), returnFiber = getOwnerDocumentFromRootContainer(
8911 returnFiber
8912 ).createElement(renderLanes2), returnFiber[internalInstanceKey] = workInProgress2, returnFiber[internalPropsKey] = current2, setInitialProperties(returnFiber, renderLanes2, current2), markNodeAsHoistable(returnFiber), workInProgress2.stateNode = returnFiber) : workInProgress2.memoizedState = getResource(
8913 workInProgress2.type,
8914 current2.memoizedProps,
8915 workInProgress2.pendingProps,
8916 current2.memoizedState
8917 ), null;
8918 case 27:
8919 return pushHostContext(workInProgress2), null === current2 && isHydrating && (returnFiber = requiredContext(rootInstanceStackCursor.current), prevSibling = getHostContext(), returnFiber = workInProgress2.stateNode = resolveSingletonInstance(
8920 workInProgress2.type,
8921 workInProgress2.pendingProps,
8922 returnFiber,
8923 prevSibling,
8924 false
8925 ), didSuspendOrErrorDEV || (prevSibling = diffHydratedProperties(
8926 returnFiber,
8927 workInProgress2.type,
8928 workInProgress2.pendingProps,
8929 prevSibling
8930 ), null !== prevSibling && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevSibling)), hydrationParentFiber = workInProgress2, rootOrSingletonContext = true, prevSibling = nextHydratableInstance, isSingletonScope(workInProgress2.type) ? (previousHydratableOnEnteringScopedSingleton = prevSibling, nextHydratableInstance = getNextHydratable(
8931 returnFiber.firstChild
8932 )) : nextHydratableInstance = prevSibling), reconcileChildren(
8933 current2,
8934 workInProgress2,
8935 workInProgress2.pendingProps.children,
8936 renderLanes2
8937 ), markRef(current2, workInProgress2), null === current2 && (workInProgress2.flags |= 4194304), workInProgress2.child;
8938 case 5:
8939 return null === current2 && isHydrating && (prevState = getHostContext(), returnFiber = validateDOMNesting(
8940 workInProgress2.type,
8941 prevState.ancestorInfo
8942 ), prevSibling = nextHydratableInstance, (nextState = !prevSibling) || (nextState = canHydrateInstance(
8943 prevSibling,
8944 workInProgress2.type,
8945 workInProgress2.pendingProps,
8946 rootOrSingletonContext
8947 ), null !== nextState ? (workInProgress2.stateNode = nextState, didSuspendOrErrorDEV || (prevState = diffHydratedProperties(
8948 nextState,
8949 workInProgress2.type,
8950 workInProgress2.pendingProps,
8951 prevState
8952 ), null !== prevState && (buildHydrationDiffNode(workInProgress2, 0).serverProps = prevState)), hydrationParentFiber = workInProgress2, nextHydratableInstance = getNextHydratable(
8953 nextState.firstChild
8954 ), 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(
8955 current2,
8956 workInProgress2,
8957 TransitionAwareHostComponent,
8958 null,
8959 null,
8960 renderLanes2
8961 ), HostTransitionContext._currentValue = prevSibling), markRef(current2, workInProgress2), reconcileChildren(
8962 current2,
8963 workInProgress2,
8964 returnFiber,
8965 renderLanes2
8966 ), workInProgress2.child;
8967 case 6:
8968 return null === current2 && isHydrating && (renderLanes2 = workInProgress2.pendingProps, current2 = getHostContext(), returnFiber = current2.ancestorInfo.current, renderLanes2 = null != returnFiber ? validateTextNesting(
8969 renderLanes2,
8970 returnFiber.tag,
8971 current2.ancestorInfo.implicitRootScope
8972 ) : true, current2 = nextHydratableInstance, (returnFiber = !current2) || (returnFiber = canHydrateTextInstance(
8973 current2,
8974 workInProgress2.pendingProps,
8975 rootOrSingletonContext
8976 ), null !== returnFiber ? (workInProgress2.stateNode = returnFiber, hydrationParentFiber = workInProgress2, nextHydratableInstance = null, returnFiber = true) : returnFiber = false, returnFiber = !returnFiber), returnFiber && (renderLanes2 && warnNonHydratedInstance(workInProgress2, current2), throwOnHydrationMismatch(workInProgress2))), null;
8977 case 13:
8978 return updateSuspenseComponent(current2, workInProgress2, renderLanes2);
8979 case 4:
8980 return pushHostContainer(
8981 workInProgress2,
8982 workInProgress2.stateNode.containerInfo
8983 ), returnFiber = workInProgress2.pendingProps, null === current2 ? workInProgress2.child = reconcileChildFibers(
8984 workInProgress2,
8985 null,
8986 returnFiber,
8987 renderLanes2
8988 ) : reconcileChildren(
8989 current2,
8990 workInProgress2,
8991 returnFiber,
8992 renderLanes2
8993 ), workInProgress2.child;
8994 case 11:
8995 return updateForwardRef(
8996 current2,
8997 workInProgress2,
8998 workInProgress2.type,
8999 workInProgress2.pendingProps,
9000 renderLanes2
9001 );
9002 case 7:
9003 return reconcileChildren(
9004 current2,
9005 workInProgress2,
9006 workInProgress2.pendingProps,
9007 renderLanes2
9008 ), workInProgress2.child;
9009 case 8:
9010 return reconcileChildren(
9011 current2,
9012 workInProgress2,
9013 workInProgress2.pendingProps.children,
9014 renderLanes2
9015 ), workInProgress2.child;
9016 case 12:
9017 return workInProgress2.flags |= 4, workInProgress2.flags |= 2048, returnFiber = workInProgress2.stateNode, returnFiber.effectDuration = -0, returnFiber.passiveEffectDuration = -0, reconcileChildren(
9018 current2,
9019 workInProgress2,
9020 workInProgress2.pendingProps.children,
9021 renderLanes2
9022 ), workInProgress2.child;
9023 case 10:
9024 return returnFiber = workInProgress2.type, prevSibling = workInProgress2.pendingProps, prevState = prevSibling.value, "value" in prevSibling || hasWarnedAboutUsingNoValuePropOnContextProvider || (hasWarnedAboutUsingNoValuePropOnContextProvider = true, console.error(
9025 "The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?"
9026 )), pushProvider(workInProgress2, returnFiber, prevState), reconcileChildren(
9027 current2,
9028 workInProgress2,
9029 prevSibling.children,
9030 renderLanes2
9031 ), workInProgress2.child;
9032 case 9:
9033 return prevSibling = workInProgress2.type._context, returnFiber = workInProgress2.pendingProps.children, "function" !== typeof returnFiber && console.error(
9034 "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."
9035 ), prepareToReadContext(workInProgress2), prevSibling = readContext(prevSibling), returnFiber = callComponentInDEV(
9036 returnFiber,
9037 prevSibling,
9038 void 0
9039 ), workInProgress2.flags |= 1, reconcileChildren(
9040 current2,
9041 workInProgress2,
9042 returnFiber,
9043 renderLanes2
9044 ), workInProgress2.child;
9045 case 14:
9046 return updateMemoComponent(
9047 current2,
9048 workInProgress2,
9049 workInProgress2.type,
9050 workInProgress2.pendingProps,
9051 renderLanes2
9052 );
9053 case 15:
9054 return updateSimpleMemoComponent(
9055 current2,
9056 workInProgress2,
9057 workInProgress2.type,
9058 workInProgress2.pendingProps,
9059 renderLanes2
9060 );
9061 case 19:
9062 return updateSuspenseListComponent(
9063 current2,
9064 workInProgress2,
9065 renderLanes2
9066 );
9067 case 31:
9068 return updateActivityComponent(current2, workInProgress2, renderLanes2);
9069 case 22:
9070 return updateOffscreenComponent(
9071 current2,
9072 workInProgress2,
9073 renderLanes2,
9074 workInProgress2.pendingProps
9075 );
9076 case 24:
9077 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 = {
9078 parent: returnFiber,
9079 cache: prevSibling
9080 }, 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 = {
9081 parent: returnFiber,
9082 cache: returnFiber
9083 }, 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(
9084 workInProgress2,
9085 [CacheContext],
9086 renderLanes2,
9087 true
9088 ))), reconcileChildren(
9089 current2,
9090 workInProgress2,
9091 workInProgress2.pendingProps.children,
9092 renderLanes2
9093 ), workInProgress2.child;
9094 case 29:
9095 throw workInProgress2.pendingProps;
9096 }
9097 throw Error(
9098 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
9099 );
9100 }
9101 function markUpdate(workInProgress2) {
9102 workInProgress2.flags |= 4;
9103 }
9104 function preloadInstanceAndSuspendIfNeeded(workInProgress2, type, oldProps, newProps, renderLanes2) {
9105 if (type = (workInProgress2.mode & SuspenseyImagesMode) !== NoMode)
9106 type = false;
9107 if (type) {
9108 if (workInProgress2.flags |= 16777216, (renderLanes2 & 335544128) === renderLanes2)
9109 if (workInProgress2.stateNode.complete) workInProgress2.flags |= 8192;
9110 else if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
9111 else
9112 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
9113 } else workInProgress2.flags &= -16777217;
9114 }
9115 function preloadResourceAndSuspendIfNeeded(workInProgress2, resource) {
9116 if ("stylesheet" !== resource.type || (resource.state.loading & Inserted) !== NotLoaded)
9117 workInProgress2.flags &= -16777217;
9118 else if (workInProgress2.flags |= 16777216, !preloadResource(resource))
9119 if (shouldRemainOnPreviousScreen()) workInProgress2.flags |= 8192;
9120 else
9121 throw suspendedThenable = noopSuspenseyCommitThenable, SuspenseyCommitException;
9122 }
9123 function scheduleRetryEffect(workInProgress2, retryQueue) {
9124 null !== retryQueue && (workInProgress2.flags |= 4);
9125 workInProgress2.flags & 16384 && (retryQueue = 22 !== workInProgress2.tag ? claimNextRetryLane() : 536870912, workInProgress2.lanes |= retryQueue, workInProgressSuspendedRetryLanes |= retryQueue);
9126 }
9127 function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
9128 if (!isHydrating)
9129 switch (renderState.tailMode) {
9130 case "hidden":
9131 hasRenderedATailFallback = renderState.tail;
9132 for (var lastTailNode = null; null !== hasRenderedATailFallback; )
9133 null !== hasRenderedATailFallback.alternate && (lastTailNode = hasRenderedATailFallback), hasRenderedATailFallback = hasRenderedATailFallback.sibling;
9134 null === lastTailNode ? renderState.tail = null : lastTailNode.sibling = null;
9135 break;
9136 case "collapsed":
9137 lastTailNode = renderState.tail;
9138 for (var _lastTailNode = null; null !== lastTailNode; )
9139 null !== lastTailNode.alternate && (_lastTailNode = lastTailNode), lastTailNode = lastTailNode.sibling;
9140 null === _lastTailNode ? hasRenderedATailFallback || null === renderState.tail ? renderState.tail = null : renderState.tail.sibling = null : _lastTailNode.sibling = null;
9141 }
9142 }
9143 function bubbleProperties(completedWork) {
9144 var didBailout = null !== completedWork.alternate && completedWork.alternate.child === completedWork.child, newChildLanes = 0, subtreeFlags = 0;
9145 if (didBailout)
9146 if ((completedWork.mode & ProfileMode) !== NoMode) {
9147 for (var _treeBaseDuration = completedWork.selfBaseDuration, _child2 = completedWork.child; null !== _child2; )
9148 newChildLanes |= _child2.lanes | _child2.childLanes, subtreeFlags |= _child2.subtreeFlags & 65011712, subtreeFlags |= _child2.flags & 65011712, _treeBaseDuration += _child2.treeBaseDuration, _child2 = _child2.sibling;
9149 completedWork.treeBaseDuration = _treeBaseDuration;
9150 } else
9151 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
9152 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags & 65011712, subtreeFlags |= _treeBaseDuration.flags & 65011712, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
9153 else if ((completedWork.mode & ProfileMode) !== NoMode) {
9154 _treeBaseDuration = completedWork.actualDuration;
9155 _child2 = completedWork.selfBaseDuration;
9156 for (var child = completedWork.child; null !== child; )
9157 newChildLanes |= child.lanes | child.childLanes, subtreeFlags |= child.subtreeFlags, subtreeFlags |= child.flags, _treeBaseDuration += child.actualDuration, _child2 += child.treeBaseDuration, child = child.sibling;
9158 completedWork.actualDuration = _treeBaseDuration;
9159 completedWork.treeBaseDuration = _child2;
9160 } else
9161 for (_treeBaseDuration = completedWork.child; null !== _treeBaseDuration; )
9162 newChildLanes |= _treeBaseDuration.lanes | _treeBaseDuration.childLanes, subtreeFlags |= _treeBaseDuration.subtreeFlags, subtreeFlags |= _treeBaseDuration.flags, _treeBaseDuration.return = completedWork, _treeBaseDuration = _treeBaseDuration.sibling;
9163 completedWork.subtreeFlags |= subtreeFlags;
9164 completedWork.childLanes = newChildLanes;
9165 return didBailout;
9166 }
9167 function completeWork(current2, workInProgress2, renderLanes2) {
9168 var newProps = workInProgress2.pendingProps;
9169 popTreeContext(workInProgress2);
9170 switch (workInProgress2.tag) {
9171 case 16:
9172 case 15:
9173 case 0:
9174 case 11:
9175 case 7:
9176 case 8:
9177 case 12:
9178 case 9:
9179 case 14:
9180 return bubbleProperties(workInProgress2), null;
9181 case 1:
9182 return bubbleProperties(workInProgress2), null;
9183 case 3:
9184 renderLanes2 = workInProgress2.stateNode;
9185 newProps = null;
9186 null !== current2 && (newProps = current2.memoizedState.cache);
9187 workInProgress2.memoizedState.cache !== newProps && (workInProgress2.flags |= 2048);
9188 popProvider(CacheContext, workInProgress2);
9189 popHostContainer(workInProgress2);
9190 renderLanes2.pendingContext && (renderLanes2.context = renderLanes2.pendingContext, renderLanes2.pendingContext = null);
9191 if (null === current2 || null === current2.child)
9192 popHydrationState(workInProgress2) ? (emitPendingHydrationWarnings(), markUpdate(workInProgress2)) : null === current2 || current2.memoizedState.isDehydrated && 0 === (workInProgress2.flags & 256) || (workInProgress2.flags |= 1024, upgradeHydrationErrorsToRecoverable());
9193 bubbleProperties(workInProgress2);
9194 return null;
9195 case 26:
9196 var type = workInProgress2.type, nextResource = workInProgress2.memoizedState;
9197 null === current2 ? (markUpdate(workInProgress2), null !== nextResource ? (bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
9198 workInProgress2,
9199 nextResource
9200 )) : (bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
9201 workInProgress2,
9202 type,
9203 null,
9204 newProps,
9205 renderLanes2
9206 ))) : nextResource ? nextResource !== current2.memoizedState ? (markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadResourceAndSuspendIfNeeded(
9207 workInProgress2,
9208 nextResource
9209 )) : (bubbleProperties(workInProgress2), workInProgress2.flags &= -16777217) : (current2 = current2.memoizedProps, current2 !== newProps && markUpdate(workInProgress2), bubbleProperties(workInProgress2), preloadInstanceAndSuspendIfNeeded(
9210 workInProgress2,
9211 type,
9212 current2,
9213 newProps,
9214 renderLanes2
9215 ));
9216 return null;
9217 case 27:
9218 popHostContext(workInProgress2);
9219 renderLanes2 = requiredContext(rootInstanceStackCursor.current);
9220 type = workInProgress2.type;
9221 if (null !== current2 && null != workInProgress2.stateNode)
9222 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9223 else {
9224 if (!newProps) {
9225 if (null === workInProgress2.stateNode)
9226 throw Error(
9227 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9228 );
9229 bubbleProperties(workInProgress2);
9230 return null;
9231 }
9232 current2 = getHostContext();
9233 popHydrationState(workInProgress2) ? prepareToHydrateHostInstance(workInProgress2, current2) : (current2 = resolveSingletonInstance(
9234 type,
9235 newProps,
9236 renderLanes2,
9237 current2,
9238 true
9239 ), workInProgress2.stateNode = current2, markUpdate(workInProgress2));
9240 }
9241 bubbleProperties(workInProgress2);
9242 return null;
9243 case 5:
9244 popHostContext(workInProgress2);
9245 type = workInProgress2.type;
9246 if (null !== current2 && null != workInProgress2.stateNode)
9247 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9248 else {
9249 if (!newProps) {
9250 if (null === workInProgress2.stateNode)
9251 throw Error(
9252 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9253 );
9254 bubbleProperties(workInProgress2);
9255 return null;
9256 }
9257 var _currentHostContext = getHostContext();
9258 if (popHydrationState(workInProgress2))
9259 prepareToHydrateHostInstance(workInProgress2, _currentHostContext);
9260 else {
9261 nextResource = requiredContext(rootInstanceStackCursor.current);
9262 validateDOMNesting(type, _currentHostContext.ancestorInfo);
9263 _currentHostContext = _currentHostContext.context;
9264 nextResource = getOwnerDocumentFromRootContainer(nextResource);
9265 switch (_currentHostContext) {
9266 case HostContextNamespaceSvg:
9267 nextResource = nextResource.createElementNS(
9268 SVG_NAMESPACE,
9269 type
9270 );
9271 break;
9272 case HostContextNamespaceMath:
9273 nextResource = nextResource.createElementNS(
9274 MATH_NAMESPACE,
9275 type
9276 );
9277 break;
9278 default:
9279 switch (type) {
9280 case "svg":
9281 nextResource = nextResource.createElementNS(
9282 SVG_NAMESPACE,
9283 type
9284 );
9285 break;
9286 case "math":
9287 nextResource = nextResource.createElementNS(
9288 MATH_NAMESPACE,
9289 type
9290 );
9291 break;
9292 case "script":
9293 nextResource = nextResource.createElement("div");
9294 nextResource.innerHTML = "<script><\/script>";
9295 nextResource = nextResource.removeChild(
9296 nextResource.firstChild
9297 );
9298 break;
9299 case "select":
9300 nextResource = "string" === typeof newProps.is ? nextResource.createElement("select", {
9301 is: newProps.is
9302 }) : nextResource.createElement("select");
9303 newProps.multiple ? nextResource.multiple = true : newProps.size && (nextResource.size = newProps.size);
9304 break;
9305 default:
9306 nextResource = "string" === typeof newProps.is ? nextResource.createElement(type, {
9307 is: newProps.is
9308 }) : nextResource.createElement(type), -1 === type.indexOf("-") && (type !== type.toLowerCase() && console.error(
9309 "<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",
9310 type
9311 ), "[object HTMLUnknownElement]" !== Object.prototype.toString.call(nextResource) || hasOwnProperty.call(warnedUnknownTags, type) || (warnedUnknownTags[type] = true, console.error(
9312 "The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",
9313 type
9314 )));
9315 }
9316 }
9317 nextResource[internalInstanceKey] = workInProgress2;
9318 nextResource[internalPropsKey] = newProps;
9319 a: for (_currentHostContext = workInProgress2.child; null !== _currentHostContext; ) {
9320 if (5 === _currentHostContext.tag || 6 === _currentHostContext.tag)
9321 nextResource.appendChild(_currentHostContext.stateNode);
9322 else if (4 !== _currentHostContext.tag && 27 !== _currentHostContext.tag && null !== _currentHostContext.child) {
9323 _currentHostContext.child.return = _currentHostContext;
9324 _currentHostContext = _currentHostContext.child;
9325 continue;
9326 }
9327 if (_currentHostContext === workInProgress2) break a;
9328 for (; null === _currentHostContext.sibling; ) {
9329 if (null === _currentHostContext.return || _currentHostContext.return === workInProgress2)
9330 break a;
9331 _currentHostContext = _currentHostContext.return;
9332 }
9333 _currentHostContext.sibling.return = _currentHostContext.return;
9334 _currentHostContext = _currentHostContext.sibling;
9335 }
9336 workInProgress2.stateNode = nextResource;
9337 a: switch (setInitialProperties(nextResource, type, newProps), type) {
9338 case "button":
9339 case "input":
9340 case "select":
9341 case "textarea":
9342 newProps = !!newProps.autoFocus;
9343 break a;
9344 case "img":
9345 newProps = true;
9346 break a;
9347 default:
9348 newProps = false;
9349 }
9350 newProps && markUpdate(workInProgress2);
9351 }
9352 }
9353 bubbleProperties(workInProgress2);
9354 preloadInstanceAndSuspendIfNeeded(
9355 workInProgress2,
9356 workInProgress2.type,
9357 null === current2 ? null : current2.memoizedProps,
9358 workInProgress2.pendingProps,
9359 renderLanes2
9360 );
9361 return null;
9362 case 6:
9363 if (current2 && null != workInProgress2.stateNode)
9364 current2.memoizedProps !== newProps && markUpdate(workInProgress2);
9365 else {
9366 if ("string" !== typeof newProps && null === workInProgress2.stateNode)
9367 throw Error(
9368 "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue."
9369 );
9370 current2 = requiredContext(rootInstanceStackCursor.current);
9371 renderLanes2 = getHostContext();
9372 if (popHydrationState(workInProgress2)) {
9373 current2 = workInProgress2.stateNode;
9374 renderLanes2 = workInProgress2.memoizedProps;
9375 type = !didSuspendOrErrorDEV;
9376 newProps = null;
9377 nextResource = hydrationParentFiber;
9378 if (null !== nextResource)
9379 switch (nextResource.tag) {
9380 case 3:
9381 type && (type = diffHydratedTextForDevWarnings(
9382 current2,
9383 renderLanes2,
9384 newProps
9385 ), null !== type && (buildHydrationDiffNode(workInProgress2, 0).serverProps = type));
9386 break;
9387 case 27:
9388 case 5:
9389 newProps = nextResource.memoizedProps, type && (type = diffHydratedTextForDevWarnings(
9390 current2,
9391 renderLanes2,
9392 newProps
9393 ), null !== type && (buildHydrationDiffNode(
9394 workInProgress2,
9395 0
9396 ).serverProps = type));
9397 }
9398 current2[internalInstanceKey] = workInProgress2;
9399 current2 = current2.nodeValue === renderLanes2 || null !== newProps && true === newProps.suppressHydrationWarning || checkForUnmatchedText(current2.nodeValue, renderLanes2) ? true : false;
9400 current2 || throwOnHydrationMismatch(workInProgress2, true);
9401 } else
9402 type = renderLanes2.ancestorInfo.current, null != type && validateTextNesting(
9403 newProps,
9404 type.tag,
9405 renderLanes2.ancestorInfo.implicitRootScope
9406 ), current2 = getOwnerDocumentFromRootContainer(current2).createTextNode(
9407 newProps
9408 ), current2[internalInstanceKey] = workInProgress2, workInProgress2.stateNode = current2;
9409 }
9410 bubbleProperties(workInProgress2);
9411 return null;
9412 case 31:
9413 renderLanes2 = workInProgress2.memoizedState;
9414 if (null === current2 || null !== current2.memoizedState) {
9415 newProps = popHydrationState(workInProgress2);
9416 if (null !== renderLanes2) {
9417 if (null === current2) {
9418 if (!newProps)
9419 throw Error(
9420 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
9421 );
9422 current2 = workInProgress2.memoizedState;
9423 current2 = null !== current2 ? current2.dehydrated : null;
9424 if (!current2)
9425 throw Error(
9426 "Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue."
9427 );
9428 current2[internalInstanceKey] = workInProgress2;
9429 bubbleProperties(workInProgress2);
9430 (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9431 } else
9432 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (renderLanes2 = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9433 current2 = false;
9434 } else
9435 renderLanes2 = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = renderLanes2), current2 = true;
9436 if (!current2) {
9437 if (workInProgress2.flags & 256)
9438 return popSuspenseHandler(workInProgress2), workInProgress2;
9439 popSuspenseHandler(workInProgress2);
9440 return null;
9441 }
9442 if (0 !== (workInProgress2.flags & 128))
9443 throw Error(
9444 "Client rendering an Activity suspended it again. This is a bug in React."
9445 );
9446 }
9447 bubbleProperties(workInProgress2);
9448 return null;
9449 case 13:
9450 newProps = workInProgress2.memoizedState;
9451 if (null === current2 || null !== current2.memoizedState && null !== current2.memoizedState.dehydrated) {
9452 type = newProps;
9453 nextResource = popHydrationState(workInProgress2);
9454 if (null !== type && null !== type.dehydrated) {
9455 if (null === current2) {
9456 if (!nextResource)
9457 throw Error(
9458 "A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React."
9459 );
9460 nextResource = workInProgress2.memoizedState;
9461 nextResource = null !== nextResource ? nextResource.dehydrated : null;
9462 if (!nextResource)
9463 throw Error(
9464 "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue."
9465 );
9466 nextResource[internalInstanceKey] = workInProgress2;
9467 bubbleProperties(workInProgress2);
9468 (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
9469 } else
9470 emitPendingHydrationWarnings(), resetHydrationState(), 0 === (workInProgress2.flags & 128) && (type = workInProgress2.memoizedState = null), workInProgress2.flags |= 4, bubbleProperties(workInProgress2), (workInProgress2.mode & ProfileMode) !== NoMode && null !== type && (type = workInProgress2.child, null !== type && (workInProgress2.treeBaseDuration -= type.treeBaseDuration));
9471 type = false;
9472 } else
9473 type = upgradeHydrationErrorsToRecoverable(), null !== current2 && null !== current2.memoizedState && (current2.memoizedState.hydrationErrors = type), type = true;
9474 if (!type) {
9475 if (workInProgress2.flags & 256)
9476 return popSuspenseHandler(workInProgress2), workInProgress2;
9477 popSuspenseHandler(workInProgress2);
9478 return null;
9479 }
9480 }
9481 popSuspenseHandler(workInProgress2);
9482 if (0 !== (workInProgress2.flags & 128))
9483 return workInProgress2.lanes = renderLanes2, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2;
9484 renderLanes2 = null !== newProps;
9485 current2 = null !== current2 && null !== current2.memoizedState;
9486 renderLanes2 && (newProps = workInProgress2.child, type = null, null !== newProps.alternate && null !== newProps.alternate.memoizedState && null !== newProps.alternate.memoizedState.cachePool && (type = newProps.alternate.memoizedState.cachePool.pool), nextResource = null, null !== newProps.memoizedState && null !== newProps.memoizedState.cachePool && (nextResource = newProps.memoizedState.cachePool.pool), nextResource !== type && (newProps.flags |= 2048));
9487 renderLanes2 !== current2 && renderLanes2 && (workInProgress2.child.flags |= 8192);
9488 scheduleRetryEffect(workInProgress2, workInProgress2.updateQueue);
9489 bubbleProperties(workInProgress2);
9490 (workInProgress2.mode & ProfileMode) !== NoMode && renderLanes2 && (current2 = workInProgress2.child, null !== current2 && (workInProgress2.treeBaseDuration -= current2.treeBaseDuration));
9491 return null;
9492 case 4:
9493 return popHostContainer(workInProgress2), null === current2 && listenToAllSupportedEvents(
9494 workInProgress2.stateNode.containerInfo
9495 ), bubbleProperties(workInProgress2), null;
9496 case 10:
9497 return popProvider(workInProgress2.type, workInProgress2), bubbleProperties(workInProgress2), null;
9498 case 19:
9499 pop(suspenseStackCursor, workInProgress2);
9500 newProps = workInProgress2.memoizedState;
9501 if (null === newProps) return bubbleProperties(workInProgress2), null;
9502 type = 0 !== (workInProgress2.flags & 128);
9503 nextResource = newProps.rendering;
9504 if (null === nextResource)
9505 if (type) cutOffTailIfNeeded(newProps, false);
9506 else {
9507 if (workInProgressRootExitStatus !== RootInProgress || null !== current2 && 0 !== (current2.flags & 128))
9508 for (current2 = workInProgress2.child; null !== current2; ) {
9509 nextResource = findFirstSuspended(current2);
9510 if (null !== nextResource) {
9511 workInProgress2.flags |= 128;
9512 cutOffTailIfNeeded(newProps, false);
9513 current2 = nextResource.updateQueue;
9514 workInProgress2.updateQueue = current2;
9515 scheduleRetryEffect(workInProgress2, current2);
9516 workInProgress2.subtreeFlags = 0;
9517 current2 = renderLanes2;
9518 for (renderLanes2 = workInProgress2.child; null !== renderLanes2; )
9519 resetWorkInProgress(renderLanes2, current2), renderLanes2 = renderLanes2.sibling;
9520 push(
9521 suspenseStackCursor,
9522 suspenseStackCursor.current & SubtreeSuspenseContextMask | ForceSuspenseFallback,
9523 workInProgress2
9524 );
9525 isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount);
9526 return workInProgress2.child;
9527 }
9528 current2 = current2.sibling;
9529 }
9530 null !== newProps.tail && now$1() > workInProgressRootRenderTargetTime && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
9531 }
9532 else {
9533 if (!type)
9534 if (current2 = findFirstSuspended(nextResource), null !== current2) {
9535 if (workInProgress2.flags |= 128, type = true, current2 = current2.updateQueue, workInProgress2.updateQueue = current2, scheduleRetryEffect(workInProgress2, current2), cutOffTailIfNeeded(newProps, true), null === newProps.tail && "hidden" === newProps.tailMode && !nextResource.alternate && !isHydrating)
9536 return bubbleProperties(workInProgress2), null;
9537 } else
9538 2 * now$1() - newProps.renderingStartTime > workInProgressRootRenderTargetTime && 536870912 !== renderLanes2 && (workInProgress2.flags |= 128, type = true, cutOffTailIfNeeded(newProps, false), workInProgress2.lanes = 4194304);
9539 newProps.isBackwards ? (nextResource.sibling = workInProgress2.child, workInProgress2.child = nextResource) : (current2 = newProps.last, null !== current2 ? current2.sibling = nextResource : workInProgress2.child = nextResource, newProps.last = nextResource);
9540 }
9541 if (null !== newProps.tail)
9542 return current2 = newProps.tail, newProps.rendering = current2, newProps.tail = current2.sibling, newProps.renderingStartTime = now$1(), current2.sibling = null, renderLanes2 = suspenseStackCursor.current, renderLanes2 = type ? renderLanes2 & SubtreeSuspenseContextMask | ForceSuspenseFallback : renderLanes2 & SubtreeSuspenseContextMask, push(suspenseStackCursor, renderLanes2, workInProgress2), isHydrating && pushTreeFork(workInProgress2, newProps.treeForkCount), current2;
9543 bubbleProperties(workInProgress2);
9544 return null;
9545 case 22:
9546 case 23:
9547 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;
9548 case 24:
9549 return renderLanes2 = null, null !== current2 && (renderLanes2 = current2.memoizedState.cache), workInProgress2.memoizedState.cache !== renderLanes2 && (workInProgress2.flags |= 2048), popProvider(CacheContext, workInProgress2), bubbleProperties(workInProgress2), null;
9550 case 25:
9551 return null;
9552 case 30:
9553 return null;
9554 }
9555 throw Error(
9556 "Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue."
9557 );
9558 }
9559 function unwindWork(current2, workInProgress2) {
9560 popTreeContext(workInProgress2);
9561 switch (workInProgress2.tag) {
9562 case 1:
9563 return current2 = workInProgress2.flags, current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9564 case 3:
9565 return popProvider(CacheContext, workInProgress2), popHostContainer(workInProgress2), current2 = workInProgress2.flags, 0 !== (current2 & 65536) && 0 === (current2 & 128) ? (workInProgress2.flags = current2 & -65537 | 128, workInProgress2) : null;
9566 case 26:
9567 case 27:
9568 case 5:
9569 return popHostContext(workInProgress2), null;
9570 case 31:
9571 if (null !== workInProgress2.memoizedState) {
9572 popSuspenseHandler(workInProgress2);
9573 if (null === workInProgress2.alternate)
9574 throw Error(
9575 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
9576 );
9577 resetHydrationState();
9578 }
9579 current2 = workInProgress2.flags;
9580 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9581 case 13:
9582 popSuspenseHandler(workInProgress2);
9583 current2 = workInProgress2.memoizedState;
9584 if (null !== current2 && null !== current2.dehydrated) {
9585 if (null === workInProgress2.alternate)
9586 throw Error(
9587 "Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue."
9588 );
9589 resetHydrationState();
9590 }
9591 current2 = workInProgress2.flags;
9592 return current2 & 65536 ? (workInProgress2.flags = current2 & -65537 | 128, (workInProgress2.mode & ProfileMode) !== NoMode && transferActualDuration(workInProgress2), workInProgress2) : null;
9593 case 19:
9594 return pop(suspenseStackCursor, workInProgress2), null;
9595 case 4:
9596 return popHostContainer(workInProgress2), null;
9597 case 10:
9598 return popProvider(workInProgress2.type, workInProgress2), null;
9599 case 22:
9600 case 23:
9601 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;
9602 case 24:
9603 return popProvider(CacheContext, workInProgress2), null;
9604 case 25:
9605 return null;
9606 default:
9607 return null;
9608 }
9609 }
9610 function unwindInterruptedWork(current2, interruptedWork) {
9611 popTreeContext(interruptedWork);
9612 switch (interruptedWork.tag) {
9613 case 3:
9614 popProvider(CacheContext, interruptedWork);
9615 popHostContainer(interruptedWork);
9616 break;
9617 case 26:
9618 case 27:
9619 case 5:
9620 popHostContext(interruptedWork);
9621 break;
9622 case 4:
9623 popHostContainer(interruptedWork);
9624 break;
9625 case 31:
9626 null !== interruptedWork.memoizedState && popSuspenseHandler(interruptedWork);
9627 break;
9628 case 13:
9629 popSuspenseHandler(interruptedWork);
9630 break;
9631 case 19:
9632 pop(suspenseStackCursor, interruptedWork);
9633 break;
9634 case 10:
9635 popProvider(interruptedWork.type, interruptedWork);
9636 break;
9637 case 22:
9638 case 23:
9639 popSuspenseHandler(interruptedWork);
9640 popHiddenContext(interruptedWork);
9641 null !== current2 && pop(resumedCache, interruptedWork);
9642 break;
9643 case 24:
9644 popProvider(CacheContext, interruptedWork);
9645 }
9646 }
9647 function shouldProfile(current2) {
9648 return (current2.mode & ProfileMode) !== NoMode;
9649 }
9650 function commitHookLayoutEffects(finishedWork, hookFlags) {
9651 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
9652 }
9653 function commitHookLayoutUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
9654 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
9655 hookFlags,
9656 finishedWork,
9657 nearestMountedAncestor
9658 ), recordEffectDuration()) : commitHookEffectListUnmount(
9659 hookFlags,
9660 finishedWork,
9661 nearestMountedAncestor
9662 );
9663 }
9664 function commitHookEffectListMount(flags, finishedWork) {
9665 try {
9666 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
9667 if (null !== lastEffect) {
9668 var firstEffect = lastEffect.next;
9669 updateQueue = firstEffect;
9670 do {
9671 if ((updateQueue.tag & flags) === flags && (lastEffect = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = runWithFiberInDEV(
9672 finishedWork,
9673 callCreateInDEV,
9674 updateQueue
9675 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false), void 0 !== lastEffect && "function" !== typeof lastEffect)) {
9676 var hookName = void 0;
9677 hookName = 0 !== (updateQueue.tag & Layout) ? "useLayoutEffect" : 0 !== (updateQueue.tag & Insertion) ? "useInsertionEffect" : "useEffect";
9678 var addendum = void 0;
9679 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;
9680 runWithFiberInDEV(
9681 finishedWork,
9682 function(n, a) {
9683 console.error(
9684 "%s must not return anything besides a function, which is used for clean-up.%s",
9685 n,
9686 a
9687 );
9688 },
9689 hookName,
9690 addendum
9691 );
9692 }
9693 updateQueue = updateQueue.next;
9694 } while (updateQueue !== firstEffect);
9695 }
9696 } catch (error) {
9697 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9698 }
9699 }
9700 function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
9701 try {
9702 var updateQueue = finishedWork.updateQueue, lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;
9703 if (null !== lastEffect) {
9704 var firstEffect = lastEffect.next;
9705 updateQueue = firstEffect;
9706 do {
9707 if ((updateQueue.tag & flags) === flags) {
9708 var inst = updateQueue.inst, destroy = inst.destroy;
9709 void 0 !== destroy && (inst.destroy = void 0, (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = true), lastEffect = finishedWork, runWithFiberInDEV(
9710 lastEffect,
9711 callDestroyInDEV,
9712 lastEffect,
9713 nearestMountedAncestor,
9714 destroy
9715 ), (flags & Insertion) !== NoFlags && (isRunningInsertionEffect = false));
9716 }
9717 updateQueue = updateQueue.next;
9718 } while (updateQueue !== firstEffect);
9719 }
9720 } catch (error) {
9721 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9722 }
9723 }
9724 function commitHookPassiveMountEffects(finishedWork, hookFlags) {
9725 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListMount(hookFlags, finishedWork), recordEffectDuration()) : commitHookEffectListMount(hookFlags, finishedWork);
9726 }
9727 function commitHookPassiveUnmountEffects(finishedWork, nearestMountedAncestor, hookFlags) {
9728 shouldProfile(finishedWork) ? (startEffectTimer(), commitHookEffectListUnmount(
9729 hookFlags,
9730 finishedWork,
9731 nearestMountedAncestor
9732 ), recordEffectDuration()) : commitHookEffectListUnmount(
9733 hookFlags,
9734 finishedWork,
9735 nearestMountedAncestor
9736 );
9737 }
9738 function commitClassCallbacks(finishedWork) {
9739 var updateQueue = finishedWork.updateQueue;
9740 if (null !== updateQueue) {
9741 var instance = finishedWork.stateNode;
9742 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (instance.props !== finishedWork.memoizedProps && console.error(
9743 "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.",
9744 getComponentNameFromFiber(finishedWork) || "instance"
9745 ), instance.state !== finishedWork.memoizedState && console.error(
9746 "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.",
9747 getComponentNameFromFiber(finishedWork) || "instance"
9748 ));
9749 try {
9750 runWithFiberInDEV(
9751 finishedWork,
9752 commitCallbacks,
9753 updateQueue,
9754 instance
9755 );
9756 } catch (error) {
9757 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9758 }
9759 }
9760 }
9761 function callGetSnapshotBeforeUpdates(instance, prevProps, prevState) {
9762 return instance.getSnapshotBeforeUpdate(prevProps, prevState);
9763 }
9764 function commitClassSnapshot(finishedWork, current2) {
9765 var prevProps = current2.memoizedProps, prevState = current2.memoizedState;
9766 current2 = finishedWork.stateNode;
9767 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (current2.props !== finishedWork.memoizedProps && console.error(
9768 "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.",
9769 getComponentNameFromFiber(finishedWork) || "instance"
9770 ), current2.state !== finishedWork.memoizedState && console.error(
9771 "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.",
9772 getComponentNameFromFiber(finishedWork) || "instance"
9773 ));
9774 try {
9775 var resolvedPrevProps = resolveClassComponentProps(
9776 finishedWork.type,
9777 prevProps
9778 );
9779 var snapshot = runWithFiberInDEV(
9780 finishedWork,
9781 callGetSnapshotBeforeUpdates,
9782 current2,
9783 resolvedPrevProps,
9784 prevState
9785 );
9786 prevProps = didWarnAboutUndefinedSnapshotBeforeUpdate;
9787 void 0 !== snapshot || prevProps.has(finishedWork.type) || (prevProps.add(finishedWork.type), runWithFiberInDEV(finishedWork, function() {
9788 console.error(
9789 "%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",
9790 getComponentNameFromFiber(finishedWork)
9791 );
9792 }));
9793 current2.__reactInternalSnapshotBeforeUpdate = snapshot;
9794 } catch (error) {
9795 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9796 }
9797 }
9798 function safelyCallComponentWillUnmount(current2, nearestMountedAncestor, instance) {
9799 instance.props = resolveClassComponentProps(
9800 current2.type,
9801 current2.memoizedProps
9802 );
9803 instance.state = current2.memoizedState;
9804 shouldProfile(current2) ? (startEffectTimer(), runWithFiberInDEV(
9805 current2,
9806 callComponentWillUnmountInDEV,
9807 current2,
9808 nearestMountedAncestor,
9809 instance
9810 ), recordEffectDuration()) : runWithFiberInDEV(
9811 current2,
9812 callComponentWillUnmountInDEV,
9813 current2,
9814 nearestMountedAncestor,
9815 instance
9816 );
9817 }
9818 function commitAttachRef(finishedWork) {
9819 var ref = finishedWork.ref;
9820 if (null !== ref) {
9821 switch (finishedWork.tag) {
9822 case 26:
9823 case 27:
9824 case 5:
9825 var instanceToUse = finishedWork.stateNode;
9826 break;
9827 case 30:
9828 instanceToUse = finishedWork.stateNode;
9829 break;
9830 default:
9831 instanceToUse = finishedWork.stateNode;
9832 }
9833 if ("function" === typeof ref)
9834 if (shouldProfile(finishedWork))
9835 try {
9836 startEffectTimer(), finishedWork.refCleanup = ref(instanceToUse);
9837 } finally {
9838 recordEffectDuration();
9839 }
9840 else finishedWork.refCleanup = ref(instanceToUse);
9841 else
9842 "string" === typeof ref ? console.error("String refs are no longer supported.") : ref.hasOwnProperty("current") || console.error(
9843 "Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",
9844 getComponentNameFromFiber(finishedWork)
9845 ), ref.current = instanceToUse;
9846 }
9847 }
9848 function safelyAttachRef(current2, nearestMountedAncestor) {
9849 try {
9850 runWithFiberInDEV(current2, commitAttachRef, current2);
9851 } catch (error) {
9852 captureCommitPhaseError(current2, nearestMountedAncestor, error);
9853 }
9854 }
9855 function safelyDetachRef(current2, nearestMountedAncestor) {
9856 var ref = current2.ref, refCleanup = current2.refCleanup;
9857 if (null !== ref)
9858 if ("function" === typeof refCleanup)
9859 try {
9860 if (shouldProfile(current2))
9861 try {
9862 startEffectTimer(), runWithFiberInDEV(current2, refCleanup);
9863 } finally {
9864 recordEffectDuration(current2);
9865 }
9866 else runWithFiberInDEV(current2, refCleanup);
9867 } catch (error) {
9868 captureCommitPhaseError(current2, nearestMountedAncestor, error);
9869 } finally {
9870 current2.refCleanup = null, current2 = current2.alternate, null != current2 && (current2.refCleanup = null);
9871 }
9872 else if ("function" === typeof ref)
9873 try {
9874 if (shouldProfile(current2))
9875 try {
9876 startEffectTimer(), runWithFiberInDEV(current2, ref, null);
9877 } finally {
9878 recordEffectDuration(current2);
9879 }
9880 else runWithFiberInDEV(current2, ref, null);
9881 } catch (error$7) {
9882 captureCommitPhaseError(current2, nearestMountedAncestor, error$7);
9883 }
9884 else ref.current = null;
9885 }
9886 function commitProfiler(finishedWork, current2, commitStartTime2, effectDuration) {
9887 var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onCommit = _finishedWork$memoize.onCommit;
9888 _finishedWork$memoize = _finishedWork$memoize.onRender;
9889 current2 = null === current2 ? "mount" : "update";
9890 currentUpdateIsNested && (current2 = "nested-update");
9891 "function" === typeof _finishedWork$memoize && _finishedWork$memoize(
9892 id,
9893 current2,
9894 finishedWork.actualDuration,
9895 finishedWork.treeBaseDuration,
9896 finishedWork.actualStartTime,
9897 commitStartTime2
9898 );
9899 "function" === typeof onCommit && onCommit(id, current2, effectDuration, commitStartTime2);
9900 }
9901 function commitProfilerPostCommitImpl(finishedWork, current2, commitStartTime2, passiveEffectDuration) {
9902 var _finishedWork$memoize2 = finishedWork.memoizedProps;
9903 finishedWork = _finishedWork$memoize2.id;
9904 _finishedWork$memoize2 = _finishedWork$memoize2.onPostCommit;
9905 current2 = null === current2 ? "mount" : "update";
9906 currentUpdateIsNested && (current2 = "nested-update");
9907 "function" === typeof _finishedWork$memoize2 && _finishedWork$memoize2(
9908 finishedWork,
9909 current2,
9910 passiveEffectDuration,
9911 commitStartTime2
9912 );
9913 }
9914 function commitHostMount(finishedWork) {
9915 var type = finishedWork.type, props = finishedWork.memoizedProps, instance = finishedWork.stateNode;
9916 try {
9917 runWithFiberInDEV(
9918 finishedWork,
9919 commitMount,
9920 instance,
9921 type,
9922 props,
9923 finishedWork
9924 );
9925 } catch (error) {
9926 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9927 }
9928 }
9929 function commitHostUpdate(finishedWork, newProps, oldProps) {
9930 try {
9931 runWithFiberInDEV(
9932 finishedWork,
9933 commitUpdate,
9934 finishedWork.stateNode,
9935 finishedWork.type,
9936 oldProps,
9937 newProps,
9938 finishedWork
9939 );
9940 } catch (error) {
9941 captureCommitPhaseError(finishedWork, finishedWork.return, error);
9942 }
9943 }
9944 function isHostParent(fiber) {
9945 return 5 === fiber.tag || 3 === fiber.tag || 26 === fiber.tag || 27 === fiber.tag && isSingletonScope(fiber.type) || 4 === fiber.tag;
9946 }
9947 function getHostSibling(fiber) {
9948 a: for (; ; ) {
9949 for (; null === fiber.sibling; ) {
9950 if (null === fiber.return || isHostParent(fiber.return)) return null;
9951 fiber = fiber.return;
9952 }
9953 fiber.sibling.return = fiber.return;
9954 for (fiber = fiber.sibling; 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag; ) {
9955 if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;
9956 if (fiber.flags & 2) continue a;
9957 if (null === fiber.child || 4 === fiber.tag) continue a;
9958 else fiber.child.return = fiber, fiber = fiber.child;
9959 }
9960 if (!(fiber.flags & 2)) return fiber.stateNode;
9961 }
9962 }
9963 function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
9964 var tag = node.tag;
9965 if (5 === tag || 6 === tag)
9966 node = node.stateNode, before ? (warnForReactChildrenConflict(parent), (9 === parent.nodeType ? parent.body : "HTML" === parent.nodeName ? parent.ownerDocument.body : parent).insertBefore(node, before)) : (warnForReactChildrenConflict(parent), 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));
9967 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode, before = null), node = node.child, null !== node))
9968 for (insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling; null !== node; )
9969 insertOrAppendPlacementNodeIntoContainer(node, before, parent), node = node.sibling;
9970 }
9971 function insertOrAppendPlacementNode(node, before, parent) {
9972 var tag = node.tag;
9973 if (5 === tag || 6 === tag)
9974 node = node.stateNode, before ? parent.insertBefore(node, before) : parent.appendChild(node);
9975 else if (4 !== tag && (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode), node = node.child, null !== node))
9976 for (insertOrAppendPlacementNode(node, before, parent), node = node.sibling; null !== node; )
9977 insertOrAppendPlacementNode(node, before, parent), node = node.sibling;
9978 }
9979 function commitPlacement(finishedWork) {
9980 for (var hostParentFiber, parentFiber = finishedWork.return; null !== parentFiber; ) {
9981 if (isHostParent(parentFiber)) {
9982 hostParentFiber = parentFiber;
9983 break;
9984 }
9985 parentFiber = parentFiber.return;
9986 }
9987 if (null == hostParentFiber)
9988 throw Error(
9989 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
9990 );
9991 switch (hostParentFiber.tag) {
9992 case 27:
9993 hostParentFiber = hostParentFiber.stateNode;
9994 parentFiber = getHostSibling(finishedWork);
9995 insertOrAppendPlacementNode(
9996 finishedWork,
9997 parentFiber,
9998 hostParentFiber
9999 );
10000 break;
10001 case 5:
10002 parentFiber = hostParentFiber.stateNode;
10003 hostParentFiber.flags & 32 && (resetTextContent(parentFiber), hostParentFiber.flags &= -33);
10004 hostParentFiber = getHostSibling(finishedWork);
10005 insertOrAppendPlacementNode(
10006 finishedWork,
10007 hostParentFiber,
10008 parentFiber
10009 );
10010 break;
10011 case 3:
10012 case 4:
10013 hostParentFiber = hostParentFiber.stateNode.containerInfo;
10014 parentFiber = getHostSibling(finishedWork);
10015 insertOrAppendPlacementNodeIntoContainer(
10016 finishedWork,
10017 parentFiber,
10018 hostParentFiber
10019 );
10020 break;
10021 default:
10022 throw Error(
10023 "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue."
10024 );
10025 }
10026 }
10027 function commitHostSingletonAcquisition(finishedWork) {
10028 var singleton = finishedWork.stateNode, props = finishedWork.memoizedProps;
10029 try {
10030 runWithFiberInDEV(
10031 finishedWork,
10032 acquireSingletonInstance,
10033 finishedWork.type,
10034 props,
10035 singleton,
10036 finishedWork
10037 );
10038 } catch (error) {
10039 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10040 }
10041 }
10042 function isHydratingParent(current2, finishedWork) {
10043 return 31 === finishedWork.tag ? (finishedWork = finishedWork.memoizedState, null !== current2.memoizedState && null === finishedWork) : 13 === finishedWork.tag ? (current2 = current2.memoizedState, finishedWork = finishedWork.memoizedState, null !== current2 && null !== current2.dehydrated && (null === finishedWork || null === finishedWork.dehydrated)) : 3 === finishedWork.tag ? current2.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256) : false;
10044 }
10045 function commitBeforeMutationEffects(root2, firstChild) {
10046 root2 = root2.containerInfo;
10047 eventsEnabled = _enabled;
10048 root2 = getActiveElementDeep(root2);
10049 if (hasSelectionCapabilities(root2)) {
10050 if ("selectionStart" in root2)
10051 var JSCompiler_temp = {
10052 start: root2.selectionStart,
10053 end: root2.selectionEnd
10054 };
10055 else
10056 a: {
10057 JSCompiler_temp = (JSCompiler_temp = root2.ownerDocument) && JSCompiler_temp.defaultView || window;
10058 var selection = JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();
10059 if (selection && 0 !== selection.rangeCount) {
10060 JSCompiler_temp = selection.anchorNode;
10061 var anchorOffset = selection.anchorOffset, focusNode = selection.focusNode;
10062 selection = selection.focusOffset;
10063 try {
10064 JSCompiler_temp.nodeType, focusNode.nodeType;
10065 } catch (e$2) {
10066 JSCompiler_temp = null;
10067 break a;
10068 }
10069 var length = 0, start = -1, end = -1, indexWithinAnchor = 0, indexWithinFocus = 0, node = root2, parentNode = null;
10070 b: for (; ; ) {
10071 for (var next; ; ) {
10072 node !== JSCompiler_temp || 0 !== anchorOffset && 3 !== node.nodeType || (start = length + anchorOffset);
10073 node !== focusNode || 0 !== selection && 3 !== node.nodeType || (end = length + selection);
10074 3 === node.nodeType && (length += node.nodeValue.length);
10075 if (null === (next = node.firstChild)) break;
10076 parentNode = node;
10077 node = next;
10078 }
10079 for (; ; ) {
10080 if (node === root2) break b;
10081 parentNode === JSCompiler_temp && ++indexWithinAnchor === anchorOffset && (start = length);
10082 parentNode === focusNode && ++indexWithinFocus === selection && (end = length);
10083 if (null !== (next = node.nextSibling)) break;
10084 node = parentNode;
10085 parentNode = node.parentNode;
10086 }
10087 node = next;
10088 }
10089 JSCompiler_temp = -1 === start || -1 === end ? null : { start, end };
10090 } else JSCompiler_temp = null;
10091 }
10092 JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };
10093 } else JSCompiler_temp = null;
10094 selectionInformation = {
10095 focusedElem: root2,
10096 selectionRange: JSCompiler_temp
10097 };
10098 _enabled = false;
10099 for (nextEffect = firstChild; null !== nextEffect; )
10100 if (firstChild = nextEffect, root2 = firstChild.child, 0 !== (firstChild.subtreeFlags & 1028) && null !== root2)
10101 root2.return = firstChild, nextEffect = root2;
10102 else
10103 for (; null !== nextEffect; ) {
10104 root2 = firstChild = nextEffect;
10105 JSCompiler_temp = root2.alternate;
10106 anchorOffset = root2.flags;
10107 switch (root2.tag) {
10108 case 0:
10109 if (0 !== (anchorOffset & 4) && (root2 = root2.updateQueue, root2 = null !== root2 ? root2.events : null, null !== root2))
10110 for (JSCompiler_temp = 0; JSCompiler_temp < root2.length; JSCompiler_temp++)
10111 anchorOffset = root2[JSCompiler_temp], anchorOffset.ref.impl = anchorOffset.nextImpl;
10112 break;
10113 case 11:
10114 case 15:
10115 break;
10116 case 1:
10117 0 !== (anchorOffset & 1024) && null !== JSCompiler_temp && commitClassSnapshot(root2, JSCompiler_temp);
10118 break;
10119 case 3:
10120 if (0 !== (anchorOffset & 1024)) {
10121 if (root2 = root2.stateNode.containerInfo, JSCompiler_temp = root2.nodeType, 9 === JSCompiler_temp)
10122 clearContainerSparingly(root2);
10123 else if (1 === JSCompiler_temp)
10124 switch (root2.nodeName) {
10125 case "HEAD":
10126 case "HTML":
10127 case "BODY":
10128 clearContainerSparingly(root2);
10129 break;
10130 default:
10131 root2.textContent = "";
10132 }
10133 }
10134 break;
10135 case 5:
10136 case 26:
10137 case 27:
10138 case 6:
10139 case 4:
10140 case 17:
10141 break;
10142 default:
10143 if (0 !== (anchorOffset & 1024))
10144 throw Error(
10145 "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue."
10146 );
10147 }
10148 root2 = firstChild.sibling;
10149 if (null !== root2) {
10150 root2.return = firstChild.return;
10151 nextEffect = root2;
10152 break;
10153 }
10154 nextEffect = firstChild.return;
10155 }
10156 }
10157 function commitLayoutEffectOnFiber(finishedRoot, current2, finishedWork) {
10158 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
10159 switch (finishedWork.tag) {
10160 case 0:
10161 case 11:
10162 case 15:
10163 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10164 flags & 4 && commitHookLayoutEffects(finishedWork, Layout | HasEffect);
10165 break;
10166 case 1:
10167 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10168 if (flags & 4)
10169 if (finishedRoot = finishedWork.stateNode, null === current2)
10170 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
10171 "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.",
10172 getComponentNameFromFiber(finishedWork) || "instance"
10173 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
10174 "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.",
10175 getComponentNameFromFiber(finishedWork) || "instance"
10176 )), shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
10177 finishedWork,
10178 callComponentDidMountInDEV,
10179 finishedWork,
10180 finishedRoot
10181 ), recordEffectDuration()) : runWithFiberInDEV(
10182 finishedWork,
10183 callComponentDidMountInDEV,
10184 finishedWork,
10185 finishedRoot
10186 );
10187 else {
10188 var prevProps = resolveClassComponentProps(
10189 finishedWork.type,
10190 current2.memoizedProps
10191 );
10192 current2 = current2.memoizedState;
10193 finishedWork.type.defaultProps || "ref" in finishedWork.memoizedProps || didWarnAboutReassigningProps || (finishedRoot.props !== finishedWork.memoizedProps && console.error(
10194 "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.",
10195 getComponentNameFromFiber(finishedWork) || "instance"
10196 ), finishedRoot.state !== finishedWork.memoizedState && console.error(
10197 "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.",
10198 getComponentNameFromFiber(finishedWork) || "instance"
10199 ));
10200 shouldProfile(finishedWork) ? (startEffectTimer(), runWithFiberInDEV(
10201 finishedWork,
10202 callComponentDidUpdateInDEV,
10203 finishedWork,
10204 finishedRoot,
10205 prevProps,
10206 current2,
10207 finishedRoot.__reactInternalSnapshotBeforeUpdate
10208 ), recordEffectDuration()) : runWithFiberInDEV(
10209 finishedWork,
10210 callComponentDidUpdateInDEV,
10211 finishedWork,
10212 finishedRoot,
10213 prevProps,
10214 current2,
10215 finishedRoot.__reactInternalSnapshotBeforeUpdate
10216 );
10217 }
10218 flags & 64 && commitClassCallbacks(finishedWork);
10219 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
10220 break;
10221 case 3:
10222 current2 = pushNestedEffectDurations();
10223 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10224 if (flags & 64 && (flags = finishedWork.updateQueue, null !== flags)) {
10225 prevProps = null;
10226 if (null !== finishedWork.child)
10227 switch (finishedWork.child.tag) {
10228 case 27:
10229 case 5:
10230 prevProps = finishedWork.child.stateNode;
10231 break;
10232 case 1:
10233 prevProps = finishedWork.child.stateNode;
10234 }
10235 try {
10236 runWithFiberInDEV(
10237 finishedWork,
10238 commitCallbacks,
10239 flags,
10240 prevProps
10241 );
10242 } catch (error) {
10243 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10244 }
10245 }
10246 finishedRoot.effectDuration += popNestedEffectDurations(current2);
10247 break;
10248 case 27:
10249 null === current2 && flags & 4 && commitHostSingletonAcquisition(finishedWork);
10250 case 26:
10251 case 5:
10252 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10253 if (null === current2) {
10254 if (flags & 4) commitHostMount(finishedWork);
10255 else if (flags & 64) {
10256 finishedRoot = finishedWork.type;
10257 current2 = finishedWork.memoizedProps;
10258 prevProps = finishedWork.stateNode;
10259 try {
10260 runWithFiberInDEV(
10261 finishedWork,
10262 commitHydratedInstance,
10263 prevProps,
10264 finishedRoot,
10265 current2,
10266 finishedWork
10267 );
10268 } catch (error) {
10269 captureCommitPhaseError(
10270 finishedWork,
10271 finishedWork.return,
10272 error
10273 );
10274 }
10275 }
10276 }
10277 flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);
10278 break;
10279 case 12:
10280 if (flags & 4) {
10281 flags = pushNestedEffectDurations();
10282 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10283 finishedRoot = finishedWork.stateNode;
10284 finishedRoot.effectDuration += bubbleNestedEffectDurations(flags);
10285 try {
10286 runWithFiberInDEV(
10287 finishedWork,
10288 commitProfiler,
10289 finishedWork,
10290 current2,
10291 commitStartTime,
10292 finishedRoot.effectDuration
10293 );
10294 } catch (error) {
10295 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10296 }
10297 } else recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10298 break;
10299 case 31:
10300 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10301 flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
10302 break;
10303 case 13:
10304 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10305 flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
10306 flags & 64 && (finishedRoot = finishedWork.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot && (flags = retryDehydratedSuspenseBoundary.bind(
10307 null,
10308 finishedWork
10309 ), registerSuspenseInstanceRetry(finishedRoot, flags))));
10310 break;
10311 case 22:
10312 flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;
10313 if (!flags) {
10314 current2 = null !== current2 && null !== current2.memoizedState || offscreenSubtreeWasHidden;
10315 prevProps = offscreenSubtreeIsHidden;
10316 var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10317 offscreenSubtreeIsHidden = flags;
10318 (offscreenSubtreeWasHidden = current2) && !prevOffscreenSubtreeWasHidden ? (recursivelyTraverseReappearLayoutEffects(
10319 finishedRoot,
10320 finishedWork,
10321 0 !== (finishedWork.subtreeFlags & 8772)
10322 ), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
10323 finishedWork,
10324 componentEffectStartTime,
10325 componentEffectEndTime
10326 )) : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10327 offscreenSubtreeIsHidden = prevProps;
10328 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10329 }
10330 break;
10331 case 30:
10332 break;
10333 default:
10334 recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);
10335 }
10336 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
10337 finishedWork,
10338 componentEffectStartTime,
10339 componentEffectEndTime,
10340 componentEffectDuration,
10341 componentEffectErrors
10342 ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
10343 finishedWork.return.alternate,
10344 finishedWork.return
10345 ) || logComponentTrigger(
10346 finishedWork,
10347 componentEffectStartTime,
10348 componentEffectEndTime,
10349 "Mount"
10350 )));
10351 popComponentEffectStart(prevEffectStart);
10352 popComponentEffectDuration(prevEffectDuration);
10353 componentEffectErrors = prevEffectErrors;
10354 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
10355 }
10356 function detachFiberAfterEffects(fiber) {
10357 var alternate = fiber.alternate;
10358 null !== alternate && (fiber.alternate = null, detachFiberAfterEffects(alternate));
10359 fiber.child = null;
10360 fiber.deletions = null;
10361 fiber.sibling = null;
10362 5 === fiber.tag && (alternate = fiber.stateNode, null !== alternate && detachDeletedInstance(alternate));
10363 fiber.stateNode = null;
10364 fiber._debugOwner = null;
10365 fiber.return = null;
10366 fiber.dependencies = null;
10367 fiber.memoizedProps = null;
10368 fiber.memoizedState = null;
10369 fiber.pendingProps = null;
10370 fiber.stateNode = null;
10371 fiber.updateQueue = null;
10372 }
10373 function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
10374 for (parent = parent.child; null !== parent; )
10375 commitDeletionEffectsOnFiber(
10376 finishedRoot,
10377 nearestMountedAncestor,
10378 parent
10379 ), parent = parent.sibling;
10380 }
10381 function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
10382 if (injectedHook && "function" === typeof injectedHook.onCommitFiberUnmount)
10383 try {
10384 injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);
10385 } catch (err) {
10386 hasLoggedError || (hasLoggedError = true, console.error(
10387 "React instrumentation encountered an error: %o",
10388 err
10389 ));
10390 }
10391 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
10392 switch (deletedFiber.tag) {
10393 case 26:
10394 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10395 recursivelyTraverseDeletionEffects(
10396 finishedRoot,
10397 nearestMountedAncestor,
10398 deletedFiber
10399 );
10400 deletedFiber.memoizedState ? deletedFiber.memoizedState.count-- : deletedFiber.stateNode && (finishedRoot = deletedFiber.stateNode, finishedRoot.parentNode.removeChild(finishedRoot));
10401 break;
10402 case 27:
10403 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10404 var prevHostParent = hostParent, prevHostParentIsContainer = hostParentIsContainer;
10405 isSingletonScope(deletedFiber.type) && (hostParent = deletedFiber.stateNode, hostParentIsContainer = false);
10406 recursivelyTraverseDeletionEffects(
10407 finishedRoot,
10408 nearestMountedAncestor,
10409 deletedFiber
10410 );
10411 runWithFiberInDEV(
10412 deletedFiber,
10413 releaseSingletonInstance,
10414 deletedFiber.stateNode
10415 );
10416 hostParent = prevHostParent;
10417 hostParentIsContainer = prevHostParentIsContainer;
10418 break;
10419 case 5:
10420 offscreenSubtreeWasHidden || safelyDetachRef(deletedFiber, nearestMountedAncestor);
10421 case 6:
10422 prevHostParent = hostParent;
10423 prevHostParentIsContainer = hostParentIsContainer;
10424 hostParent = null;
10425 recursivelyTraverseDeletionEffects(
10426 finishedRoot,
10427 nearestMountedAncestor,
10428 deletedFiber
10429 );
10430 hostParent = prevHostParent;
10431 hostParentIsContainer = prevHostParentIsContainer;
10432 if (null !== hostParent)
10433 if (hostParentIsContainer)
10434 try {
10435 runWithFiberInDEV(
10436 deletedFiber,
10437 removeChildFromContainer,
10438 hostParent,
10439 deletedFiber.stateNode
10440 );
10441 } catch (error) {
10442 captureCommitPhaseError(
10443 deletedFiber,
10444 nearestMountedAncestor,
10445 error
10446 );
10447 }
10448 else
10449 try {
10450 runWithFiberInDEV(
10451 deletedFiber,
10452 removeChild,
10453 hostParent,
10454 deletedFiber.stateNode
10455 );
10456 } catch (error) {
10457 captureCommitPhaseError(
10458 deletedFiber,
10459 nearestMountedAncestor,
10460 error
10461 );
10462 }
10463 break;
10464 case 18:
10465 null !== hostParent && (hostParentIsContainer ? (finishedRoot = hostParent, clearHydrationBoundary(
10466 9 === finishedRoot.nodeType ? finishedRoot.body : "HTML" === finishedRoot.nodeName ? finishedRoot.ownerDocument.body : finishedRoot,
10467 deletedFiber.stateNode
10468 ), retryIfBlockedOn(finishedRoot)) : clearHydrationBoundary(hostParent, deletedFiber.stateNode));
10469 break;
10470 case 4:
10471 prevHostParent = hostParent;
10472 prevHostParentIsContainer = hostParentIsContainer;
10473 hostParent = deletedFiber.stateNode.containerInfo;
10474 hostParentIsContainer = true;
10475 recursivelyTraverseDeletionEffects(
10476 finishedRoot,
10477 nearestMountedAncestor,
10478 deletedFiber
10479 );
10480 hostParent = prevHostParent;
10481 hostParentIsContainer = prevHostParentIsContainer;
10482 break;
10483 case 0:
10484 case 11:
10485 case 14:
10486 case 15:
10487 commitHookEffectListUnmount(
10488 Insertion,
10489 deletedFiber,
10490 nearestMountedAncestor
10491 );
10492 offscreenSubtreeWasHidden || commitHookLayoutUnmountEffects(
10493 deletedFiber,
10494 nearestMountedAncestor,
10495 Layout
10496 );
10497 recursivelyTraverseDeletionEffects(
10498 finishedRoot,
10499 nearestMountedAncestor,
10500 deletedFiber
10501 );
10502 break;
10503 case 1:
10504 offscreenSubtreeWasHidden || (safelyDetachRef(deletedFiber, nearestMountedAncestor), prevHostParent = deletedFiber.stateNode, "function" === typeof prevHostParent.componentWillUnmount && safelyCallComponentWillUnmount(
10505 deletedFiber,
10506 nearestMountedAncestor,
10507 prevHostParent
10508 ));
10509 recursivelyTraverseDeletionEffects(
10510 finishedRoot,
10511 nearestMountedAncestor,
10512 deletedFiber
10513 );
10514 break;
10515 case 21:
10516 recursivelyTraverseDeletionEffects(
10517 finishedRoot,
10518 nearestMountedAncestor,
10519 deletedFiber
10520 );
10521 break;
10522 case 22:
10523 offscreenSubtreeWasHidden = (prevHostParent = offscreenSubtreeWasHidden) || null !== deletedFiber.memoizedState;
10524 recursivelyTraverseDeletionEffects(
10525 finishedRoot,
10526 nearestMountedAncestor,
10527 deletedFiber
10528 );
10529 offscreenSubtreeWasHidden = prevHostParent;
10530 break;
10531 default:
10532 recursivelyTraverseDeletionEffects(
10533 finishedRoot,
10534 nearestMountedAncestor,
10535 deletedFiber
10536 );
10537 }
10538 (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
10539 deletedFiber,
10540 componentEffectStartTime,
10541 componentEffectEndTime,
10542 componentEffectDuration,
10543 componentEffectErrors
10544 );
10545 popComponentEffectStart(prevEffectStart);
10546 popComponentEffectDuration(prevEffectDuration);
10547 componentEffectErrors = prevEffectErrors;
10548 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
10549 }
10550 function commitActivityHydrationCallbacks(finishedRoot, finishedWork) {
10551 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot))) {
10552 finishedRoot = finishedRoot.dehydrated;
10553 try {
10554 runWithFiberInDEV(
10555 finishedWork,
10556 commitHydratedActivityInstance,
10557 finishedRoot
10558 );
10559 } catch (error) {
10560 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10561 }
10562 }
10563 }
10564 function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
10565 if (null === finishedWork.memoizedState && (finishedRoot = finishedWork.alternate, null !== finishedRoot && (finishedRoot = finishedRoot.memoizedState, null !== finishedRoot && (finishedRoot = finishedRoot.dehydrated, null !== finishedRoot))))
10566 try {
10567 runWithFiberInDEV(
10568 finishedWork,
10569 commitHydratedSuspenseInstance,
10570 finishedRoot
10571 );
10572 } catch (error) {
10573 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10574 }
10575 }
10576 function getRetryCache(finishedWork) {
10577 switch (finishedWork.tag) {
10578 case 31:
10579 case 13:
10580 case 19:
10581 var retryCache = finishedWork.stateNode;
10582 null === retryCache && (retryCache = finishedWork.stateNode = new PossiblyWeakSet());
10583 return retryCache;
10584 case 22:
10585 return finishedWork = finishedWork.stateNode, retryCache = finishedWork._retryCache, null === retryCache && (retryCache = finishedWork._retryCache = new PossiblyWeakSet()), retryCache;
10586 default:
10587 throw Error(
10588 "Unexpected Suspense handler tag (" + finishedWork.tag + "). This is a bug in React."
10589 );
10590 }
10591 }
10592 function attachSuspenseRetryListeners(finishedWork, wakeables) {
10593 var retryCache = getRetryCache(finishedWork);
10594 wakeables.forEach(function(wakeable) {
10595 if (!retryCache.has(wakeable)) {
10596 retryCache.add(wakeable);
10597 if (isDevToolsPresent)
10598 if (null !== inProgressLanes && null !== inProgressRoot)
10599 restorePendingUpdaters(inProgressRoot, inProgressLanes);
10600 else
10601 throw Error(
10602 "Expected finished root and lanes to be set. This is a bug in React."
10603 );
10604 var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
10605 wakeable.then(retry, retry);
10606 }
10607 });
10608 }
10609 function recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {
10610 var deletions = parentFiber.deletions;
10611 if (null !== deletions)
10612 for (var i = 0; i < deletions.length; i++) {
10613 var root2 = root$jscomp$0, returnFiber = parentFiber, deletedFiber = deletions[i], prevEffectStart = pushComponentEffectStart(), parent = returnFiber;
10614 a: for (; null !== parent; ) {
10615 switch (parent.tag) {
10616 case 27:
10617 if (isSingletonScope(parent.type)) {
10618 hostParent = parent.stateNode;
10619 hostParentIsContainer = false;
10620 break a;
10621 }
10622 break;
10623 case 5:
10624 hostParent = parent.stateNode;
10625 hostParentIsContainer = false;
10626 break a;
10627 case 3:
10628 case 4:
10629 hostParent = parent.stateNode.containerInfo;
10630 hostParentIsContainer = true;
10631 break a;
10632 }
10633 parent = parent.return;
10634 }
10635 if (null === hostParent)
10636 throw Error(
10637 "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue."
10638 );
10639 commitDeletionEffectsOnFiber(root2, returnFiber, deletedFiber);
10640 hostParent = null;
10641 hostParentIsContainer = false;
10642 (deletedFiber.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
10643 deletedFiber,
10644 componentEffectStartTime,
10645 componentEffectEndTime,
10646 "Unmount"
10647 );
10648 popComponentEffectStart(prevEffectStart);
10649 root2 = deletedFiber;
10650 returnFiber = root2.alternate;
10651 null !== returnFiber && (returnFiber.return = null);
10652 root2.return = null;
10653 }
10654 if (parentFiber.subtreeFlags & 13886)
10655 for (parentFiber = parentFiber.child; null !== parentFiber; )
10656 commitMutationEffectsOnFiber(parentFiber, root$jscomp$0), parentFiber = parentFiber.sibling;
10657 }
10658 function commitMutationEffectsOnFiber(finishedWork, root2) {
10659 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), current2 = finishedWork.alternate, flags = finishedWork.flags;
10660 switch (finishedWork.tag) {
10661 case 0:
10662 case 11:
10663 case 14:
10664 case 15:
10665 recursivelyTraverseMutationEffects(root2, finishedWork);
10666 commitReconciliationEffects(finishedWork);
10667 flags & 4 && (commitHookEffectListUnmount(
10668 Insertion | HasEffect,
10669 finishedWork,
10670 finishedWork.return
10671 ), commitHookEffectListMount(Insertion | HasEffect, finishedWork), commitHookLayoutUnmountEffects(
10672 finishedWork,
10673 finishedWork.return,
10674 Layout | HasEffect
10675 ));
10676 break;
10677 case 1:
10678 recursivelyTraverseMutationEffects(root2, finishedWork);
10679 commitReconciliationEffects(finishedWork);
10680 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10681 if (flags & 64 && offscreenSubtreeIsHidden && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.callbacks, null !== current2))) {
10682 var existingHiddenCallbacks = flags.shared.hiddenCallbacks;
10683 flags.shared.hiddenCallbacks = null === existingHiddenCallbacks ? current2 : existingHiddenCallbacks.concat(current2);
10684 }
10685 break;
10686 case 26:
10687 existingHiddenCallbacks = currentHoistableRoot;
10688 recursivelyTraverseMutationEffects(root2, finishedWork);
10689 commitReconciliationEffects(finishedWork);
10690 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10691 if (flags & 4) {
10692 var currentResource = null !== current2 ? current2.memoizedState : null;
10693 flags = finishedWork.memoizedState;
10694 if (null === current2)
10695 if (null === flags)
10696 if (null === finishedWork.stateNode) {
10697 a: {
10698 flags = finishedWork.type;
10699 current2 = finishedWork.memoizedProps;
10700 existingHiddenCallbacks = existingHiddenCallbacks.ownerDocument || existingHiddenCallbacks;
10701 b: switch (flags) {
10702 case "title":
10703 currentResource = existingHiddenCallbacks.getElementsByTagName(
10704 "title"
10705 )[0];
10706 if (!currentResource || currentResource[internalHoistableMarker] || currentResource[internalInstanceKey] || currentResource.namespaceURI === SVG_NAMESPACE || currentResource.hasAttribute("itemprop"))
10707 currentResource = existingHiddenCallbacks.createElement(flags), existingHiddenCallbacks.head.insertBefore(
10708 currentResource,
10709 existingHiddenCallbacks.querySelector(
10710 "head > title"
10711 )
10712 );
10713 setInitialProperties(currentResource, flags, current2);
10714 currentResource[internalInstanceKey] = finishedWork;
10715 markNodeAsHoistable(currentResource);
10716 flags = currentResource;
10717 break a;
10718 case "link":
10719 var maybeNodes = getHydratableHoistableCache(
10720 "link",
10721 "href",
10722 existingHiddenCallbacks
10723 ).get(flags + (current2.href || ""));
10724 if (maybeNodes) {
10725 for (var i = 0; i < maybeNodes.length; i++)
10726 if (currentResource = maybeNodes[i], currentResource.getAttribute("href") === (null == current2.href || "" === current2.href ? null : current2.href) && currentResource.getAttribute("rel") === (null == current2.rel ? null : current2.rel) && currentResource.getAttribute("title") === (null == current2.title ? null : current2.title) && currentResource.getAttribute("crossorigin") === (null == current2.crossOrigin ? null : current2.crossOrigin)) {
10727 maybeNodes.splice(i, 1);
10728 break b;
10729 }
10730 }
10731 currentResource = existingHiddenCallbacks.createElement(flags);
10732 setInitialProperties(currentResource, flags, current2);
10733 existingHiddenCallbacks.head.appendChild(
10734 currentResource
10735 );
10736 break;
10737 case "meta":
10738 if (maybeNodes = getHydratableHoistableCache(
10739 "meta",
10740 "content",
10741 existingHiddenCallbacks
10742 ).get(flags + (current2.content || ""))) {
10743 for (i = 0; i < maybeNodes.length; i++)
10744 if (currentResource = maybeNodes[i], checkAttributeStringCoercion(
10745 current2.content,
10746 "content"
10747 ), currentResource.getAttribute("content") === (null == current2.content ? null : "" + current2.content) && currentResource.getAttribute("name") === (null == current2.name ? null : current2.name) && currentResource.getAttribute("property") === (null == current2.property ? null : current2.property) && currentResource.getAttribute("http-equiv") === (null == current2.httpEquiv ? null : current2.httpEquiv) && currentResource.getAttribute("charset") === (null == current2.charSet ? null : current2.charSet)) {
10748 maybeNodes.splice(i, 1);
10749 break b;
10750 }
10751 }
10752 currentResource = existingHiddenCallbacks.createElement(flags);
10753 setInitialProperties(currentResource, flags, current2);
10754 existingHiddenCallbacks.head.appendChild(
10755 currentResource
10756 );
10757 break;
10758 default:
10759 throw Error(
10760 'getNodesForType encountered a type it did not expect: "' + flags + '". This is a bug in React.'
10761 );
10762 }
10763 currentResource[internalInstanceKey] = finishedWork;
10764 markNodeAsHoistable(currentResource);
10765 flags = currentResource;
10766 }
10767 finishedWork.stateNode = flags;
10768 } else
10769 mountHoistable(
10770 existingHiddenCallbacks,
10771 finishedWork.type,
10772 finishedWork.stateNode
10773 );
10774 else
10775 finishedWork.stateNode = acquireResource(
10776 existingHiddenCallbacks,
10777 flags,
10778 finishedWork.memoizedProps
10779 );
10780 else
10781 currentResource !== flags ? (null === currentResource ? null !== current2.stateNode && (current2 = current2.stateNode, current2.parentNode.removeChild(current2)) : currentResource.count--, null === flags ? mountHoistable(
10782 existingHiddenCallbacks,
10783 finishedWork.type,
10784 finishedWork.stateNode
10785 ) : acquireResource(
10786 existingHiddenCallbacks,
10787 flags,
10788 finishedWork.memoizedProps
10789 )) : null === flags && null !== finishedWork.stateNode && commitHostUpdate(
10790 finishedWork,
10791 finishedWork.memoizedProps,
10792 current2.memoizedProps
10793 );
10794 }
10795 break;
10796 case 27:
10797 recursivelyTraverseMutationEffects(root2, finishedWork);
10798 commitReconciliationEffects(finishedWork);
10799 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10800 null !== current2 && flags & 4 && commitHostUpdate(
10801 finishedWork,
10802 finishedWork.memoizedProps,
10803 current2.memoizedProps
10804 );
10805 break;
10806 case 5:
10807 recursivelyTraverseMutationEffects(root2, finishedWork);
10808 commitReconciliationEffects(finishedWork);
10809 flags & 512 && (offscreenSubtreeWasHidden || null === current2 || safelyDetachRef(current2, current2.return));
10810 if (finishedWork.flags & 32) {
10811 existingHiddenCallbacks = finishedWork.stateNode;
10812 try {
10813 runWithFiberInDEV(
10814 finishedWork,
10815 resetTextContent,
10816 existingHiddenCallbacks
10817 );
10818 } catch (error) {
10819 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10820 }
10821 }
10822 flags & 4 && null != finishedWork.stateNode && (existingHiddenCallbacks = finishedWork.memoizedProps, commitHostUpdate(
10823 finishedWork,
10824 existingHiddenCallbacks,
10825 null !== current2 ? current2.memoizedProps : existingHiddenCallbacks
10826 ));
10827 flags & 1024 && (needsFormReset = true, "form" !== finishedWork.type && console.error(
10828 "Unexpected host component type. Expected a form. This is a bug in React."
10829 ));
10830 break;
10831 case 6:
10832 recursivelyTraverseMutationEffects(root2, finishedWork);
10833 commitReconciliationEffects(finishedWork);
10834 if (flags & 4) {
10835 if (null === finishedWork.stateNode)
10836 throw Error(
10837 "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue."
10838 );
10839 flags = finishedWork.memoizedProps;
10840 current2 = null !== current2 ? current2.memoizedProps : flags;
10841 existingHiddenCallbacks = finishedWork.stateNode;
10842 try {
10843 runWithFiberInDEV(
10844 finishedWork,
10845 commitTextUpdate,
10846 existingHiddenCallbacks,
10847 current2,
10848 flags
10849 );
10850 } catch (error) {
10851 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10852 }
10853 }
10854 break;
10855 case 3:
10856 existingHiddenCallbacks = pushNestedEffectDurations();
10857 tagCaches = null;
10858 currentResource = currentHoistableRoot;
10859 currentHoistableRoot = getHoistableRoot(root2.containerInfo);
10860 recursivelyTraverseMutationEffects(root2, finishedWork);
10861 currentHoistableRoot = currentResource;
10862 commitReconciliationEffects(finishedWork);
10863 if (flags & 4 && null !== current2 && current2.memoizedState.isDehydrated)
10864 try {
10865 runWithFiberInDEV(
10866 finishedWork,
10867 commitHydratedContainer,
10868 root2.containerInfo
10869 );
10870 } catch (error) {
10871 captureCommitPhaseError(finishedWork, finishedWork.return, error);
10872 }
10873 needsFormReset && (needsFormReset = false, recursivelyResetForms(finishedWork));
10874 root2.effectDuration += popNestedEffectDurations(
10875 existingHiddenCallbacks
10876 );
10877 break;
10878 case 4:
10879 flags = currentHoistableRoot;
10880 currentHoistableRoot = getHoistableRoot(
10881 finishedWork.stateNode.containerInfo
10882 );
10883 recursivelyTraverseMutationEffects(root2, finishedWork);
10884 commitReconciliationEffects(finishedWork);
10885 currentHoistableRoot = flags;
10886 break;
10887 case 12:
10888 flags = pushNestedEffectDurations();
10889 recursivelyTraverseMutationEffects(root2, finishedWork);
10890 commitReconciliationEffects(finishedWork);
10891 finishedWork.stateNode.effectDuration += bubbleNestedEffectDurations(flags);
10892 break;
10893 case 31:
10894 recursivelyTraverseMutationEffects(root2, finishedWork);
10895 commitReconciliationEffects(finishedWork);
10896 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
10897 break;
10898 case 13:
10899 recursivelyTraverseMutationEffects(root2, finishedWork);
10900 commitReconciliationEffects(finishedWork);
10901 finishedWork.child.flags & 8192 && null !== finishedWork.memoizedState !== (null !== current2 && null !== current2.memoizedState) && (globalMostRecentFallbackTime = now$1());
10902 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
10903 break;
10904 case 22:
10905 existingHiddenCallbacks = null !== finishedWork.memoizedState;
10906 var wasHidden = null !== current2 && null !== current2.memoizedState, prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden, prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
10907 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || existingHiddenCallbacks;
10908 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;
10909 recursivelyTraverseMutationEffects(root2, finishedWork);
10910 offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
10911 offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
10912 wasHidden && !existingHiddenCallbacks && !prevOffscreenSubtreeIsHidden && !prevOffscreenSubtreeWasHidden && (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
10913 finishedWork,
10914 componentEffectStartTime,
10915 componentEffectEndTime
10916 );
10917 commitReconciliationEffects(finishedWork);
10918 if (flags & 8192)
10919 a: for (root2 = finishedWork.stateNode, root2._visibility = existingHiddenCallbacks ? root2._visibility & ~OffscreenVisible : root2._visibility | OffscreenVisible, !existingHiddenCallbacks || null === current2 || wasHidden || offscreenSubtreeIsHidden || offscreenSubtreeWasHidden || (recursivelyTraverseDisappearLayoutEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
10920 finishedWork,
10921 componentEffectStartTime,
10922 componentEffectEndTime,
10923 "Disconnect"
10924 )), current2 = null, root2 = finishedWork; ; ) {
10925 if (5 === root2.tag || 26 === root2.tag) {
10926 if (null === current2) {
10927 wasHidden = current2 = root2;
10928 try {
10929 currentResource = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10930 wasHidden,
10931 hideInstance,
10932 currentResource
10933 ) : runWithFiberInDEV(
10934 wasHidden,
10935 unhideInstance,
10936 wasHidden.stateNode,
10937 wasHidden.memoizedProps
10938 );
10939 } catch (error) {
10940 captureCommitPhaseError(wasHidden, wasHidden.return, error);
10941 }
10942 }
10943 } else if (6 === root2.tag) {
10944 if (null === current2) {
10945 wasHidden = root2;
10946 try {
10947 maybeNodes = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10948 wasHidden,
10949 hideTextInstance,
10950 maybeNodes
10951 ) : runWithFiberInDEV(
10952 wasHidden,
10953 unhideTextInstance,
10954 maybeNodes,
10955 wasHidden.memoizedProps
10956 );
10957 } catch (error) {
10958 captureCommitPhaseError(wasHidden, wasHidden.return, error);
10959 }
10960 }
10961 } else if (18 === root2.tag) {
10962 if (null === current2) {
10963 wasHidden = root2;
10964 try {
10965 i = wasHidden.stateNode, existingHiddenCallbacks ? runWithFiberInDEV(
10966 wasHidden,
10967 hideDehydratedBoundary,
10968 i
10969 ) : runWithFiberInDEV(
10970 wasHidden,
10971 unhideDehydratedBoundary,
10972 wasHidden.stateNode
10973 );
10974 } catch (error) {
10975 captureCommitPhaseError(wasHidden, wasHidden.return, error);
10976 }
10977 }
10978 } else if ((22 !== root2.tag && 23 !== root2.tag || null === root2.memoizedState || root2 === finishedWork) && null !== root2.child) {
10979 root2.child.return = root2;
10980 root2 = root2.child;
10981 continue;
10982 }
10983 if (root2 === finishedWork) break a;
10984 for (; null === root2.sibling; ) {
10985 if (null === root2.return || root2.return === finishedWork)
10986 break a;
10987 current2 === root2 && (current2 = null);
10988 root2 = root2.return;
10989 }
10990 current2 === root2 && (current2 = null);
10991 root2.sibling.return = root2.return;
10992 root2 = root2.sibling;
10993 }
10994 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (current2 = flags.retryQueue, null !== current2 && (flags.retryQueue = null, attachSuspenseRetryListeners(finishedWork, current2))));
10995 break;
10996 case 19:
10997 recursivelyTraverseMutationEffects(root2, finishedWork);
10998 commitReconciliationEffects(finishedWork);
10999 flags & 4 && (flags = finishedWork.updateQueue, null !== flags && (finishedWork.updateQueue = null, attachSuspenseRetryListeners(finishedWork, flags)));
11000 break;
11001 case 30:
11002 break;
11003 case 21:
11004 break;
11005 default:
11006 recursivelyTraverseMutationEffects(root2, finishedWork), commitReconciliationEffects(finishedWork);
11007 }
11008 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11009 finishedWork,
11010 componentEffectStartTime,
11011 componentEffectEndTime,
11012 componentEffectDuration,
11013 componentEffectErrors
11014 ), null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate && 0.05 < componentEffectEndTime - componentEffectStartTime && (isHydratingParent(
11015 finishedWork.return.alternate,
11016 finishedWork.return
11017 ) || logComponentTrigger(
11018 finishedWork,
11019 componentEffectStartTime,
11020 componentEffectEndTime,
11021 "Mount"
11022 )));
11023 popComponentEffectStart(prevEffectStart);
11024 popComponentEffectDuration(prevEffectDuration);
11025 componentEffectErrors = prevEffectErrors;
11026 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11027 }
11028 function commitReconciliationEffects(finishedWork) {
11029 var flags = finishedWork.flags;
11030 if (flags & 2) {
11031 try {
11032 runWithFiberInDEV(finishedWork, commitPlacement, finishedWork);
11033 } catch (error) {
11034 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11035 }
11036 finishedWork.flags &= -3;
11037 }
11038 flags & 4096 && (finishedWork.flags &= -4097);
11039 }
11040 function recursivelyResetForms(parentFiber) {
11041 if (parentFiber.subtreeFlags & 1024)
11042 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11043 var fiber = parentFiber;
11044 recursivelyResetForms(fiber);
11045 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();
11046 parentFiber = parentFiber.sibling;
11047 }
11048 }
11049 function recursivelyTraverseLayoutEffects(root2, parentFiber) {
11050 if (parentFiber.subtreeFlags & 8772)
11051 for (parentFiber = parentFiber.child; null !== parentFiber; )
11052 commitLayoutEffectOnFiber(root2, parentFiber.alternate, parentFiber), parentFiber = parentFiber.sibling;
11053 }
11054 function disappearLayoutEffects(finishedWork) {
11055 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11056 switch (finishedWork.tag) {
11057 case 0:
11058 case 11:
11059 case 14:
11060 case 15:
11061 commitHookLayoutUnmountEffects(
11062 finishedWork,
11063 finishedWork.return,
11064 Layout
11065 );
11066 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11067 break;
11068 case 1:
11069 safelyDetachRef(finishedWork, finishedWork.return);
11070 var instance = finishedWork.stateNode;
11071 "function" === typeof instance.componentWillUnmount && safelyCallComponentWillUnmount(
11072 finishedWork,
11073 finishedWork.return,
11074 instance
11075 );
11076 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11077 break;
11078 case 27:
11079 runWithFiberInDEV(
11080 finishedWork,
11081 releaseSingletonInstance,
11082 finishedWork.stateNode
11083 );
11084 case 26:
11085 case 5:
11086 safelyDetachRef(finishedWork, finishedWork.return);
11087 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11088 break;
11089 case 22:
11090 null === finishedWork.memoizedState && recursivelyTraverseDisappearLayoutEffects(finishedWork);
11091 break;
11092 case 30:
11093 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11094 break;
11095 default:
11096 recursivelyTraverseDisappearLayoutEffects(finishedWork);
11097 }
11098 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11099 finishedWork,
11100 componentEffectStartTime,
11101 componentEffectEndTime,
11102 componentEffectDuration,
11103 componentEffectErrors
11104 );
11105 popComponentEffectStart(prevEffectStart);
11106 popComponentEffectDuration(prevEffectDuration);
11107 componentEffectErrors = prevEffectErrors;
11108 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11109 }
11110 function recursivelyTraverseDisappearLayoutEffects(parentFiber) {
11111 for (parentFiber = parentFiber.child; null !== parentFiber; )
11112 disappearLayoutEffects(parentFiber), parentFiber = parentFiber.sibling;
11113 }
11114 function reappearLayoutEffects(finishedRoot, current2, finishedWork, includeWorkInProgressEffects) {
11115 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), flags = finishedWork.flags;
11116 switch (finishedWork.tag) {
11117 case 0:
11118 case 11:
11119 case 15:
11120 recursivelyTraverseReappearLayoutEffects(
11121 finishedRoot,
11122 finishedWork,
11123 includeWorkInProgressEffects
11124 );
11125 commitHookLayoutEffects(finishedWork, Layout);
11126 break;
11127 case 1:
11128 recursivelyTraverseReappearLayoutEffects(
11129 finishedRoot,
11130 finishedWork,
11131 includeWorkInProgressEffects
11132 );
11133 current2 = finishedWork.stateNode;
11134 "function" === typeof current2.componentDidMount && runWithFiberInDEV(
11135 finishedWork,
11136 callComponentDidMountInDEV,
11137 finishedWork,
11138 current2
11139 );
11140 current2 = finishedWork.updateQueue;
11141 if (null !== current2) {
11142 finishedRoot = finishedWork.stateNode;
11143 try {
11144 runWithFiberInDEV(
11145 finishedWork,
11146 commitHiddenCallbacks,
11147 current2,
11148 finishedRoot
11149 );
11150 } catch (error) {
11151 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11152 }
11153 }
11154 includeWorkInProgressEffects && flags & 64 && commitClassCallbacks(finishedWork);
11155 safelyAttachRef(finishedWork, finishedWork.return);
11156 break;
11157 case 27:
11158 commitHostSingletonAcquisition(finishedWork);
11159 case 26:
11160 case 5:
11161 recursivelyTraverseReappearLayoutEffects(
11162 finishedRoot,
11163 finishedWork,
11164 includeWorkInProgressEffects
11165 );
11166 includeWorkInProgressEffects && null === current2 && flags & 4 && commitHostMount(finishedWork);
11167 safelyAttachRef(finishedWork, finishedWork.return);
11168 break;
11169 case 12:
11170 if (includeWorkInProgressEffects && flags & 4) {
11171 flags = pushNestedEffectDurations();
11172 recursivelyTraverseReappearLayoutEffects(
11173 finishedRoot,
11174 finishedWork,
11175 includeWorkInProgressEffects
11176 );
11177 includeWorkInProgressEffects = finishedWork.stateNode;
11178 includeWorkInProgressEffects.effectDuration += bubbleNestedEffectDurations(flags);
11179 try {
11180 runWithFiberInDEV(
11181 finishedWork,
11182 commitProfiler,
11183 finishedWork,
11184 current2,
11185 commitStartTime,
11186 includeWorkInProgressEffects.effectDuration
11187 );
11188 } catch (error) {
11189 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11190 }
11191 } else
11192 recursivelyTraverseReappearLayoutEffects(
11193 finishedRoot,
11194 finishedWork,
11195 includeWorkInProgressEffects
11196 );
11197 break;
11198 case 31:
11199 recursivelyTraverseReappearLayoutEffects(
11200 finishedRoot,
11201 finishedWork,
11202 includeWorkInProgressEffects
11203 );
11204 includeWorkInProgressEffects && flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);
11205 break;
11206 case 13:
11207 recursivelyTraverseReappearLayoutEffects(
11208 finishedRoot,
11209 finishedWork,
11210 includeWorkInProgressEffects
11211 );
11212 includeWorkInProgressEffects && flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
11213 break;
11214 case 22:
11215 null === finishedWork.memoizedState && recursivelyTraverseReappearLayoutEffects(
11216 finishedRoot,
11217 finishedWork,
11218 includeWorkInProgressEffects
11219 );
11220 safelyAttachRef(finishedWork, finishedWork.return);
11221 break;
11222 case 30:
11223 break;
11224 default:
11225 recursivelyTraverseReappearLayoutEffects(
11226 finishedRoot,
11227 finishedWork,
11228 includeWorkInProgressEffects
11229 );
11230 }
11231 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11232 finishedWork,
11233 componentEffectStartTime,
11234 componentEffectEndTime,
11235 componentEffectDuration,
11236 componentEffectErrors
11237 );
11238 popComponentEffectStart(prevEffectStart);
11239 popComponentEffectDuration(prevEffectDuration);
11240 componentEffectErrors = prevEffectErrors;
11241 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11242 }
11243 function recursivelyTraverseReappearLayoutEffects(finishedRoot, parentFiber, includeWorkInProgressEffects) {
11244 includeWorkInProgressEffects = includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);
11245 for (parentFiber = parentFiber.child; null !== parentFiber; )
11246 reappearLayoutEffects(
11247 finishedRoot,
11248 parentFiber.alternate,
11249 parentFiber,
11250 includeWorkInProgressEffects
11251 ), parentFiber = parentFiber.sibling;
11252 }
11253 function commitOffscreenPassiveMountEffects(current2, finishedWork) {
11254 var previousCache = null;
11255 null !== current2 && null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (previousCache = current2.memoizedState.cachePool.pool);
11256 current2 = null;
11257 null !== finishedWork.memoizedState && null !== finishedWork.memoizedState.cachePool && (current2 = finishedWork.memoizedState.cachePool.pool);
11258 current2 !== previousCache && (null != current2 && retainCache(current2), null != previousCache && releaseCache(previousCache));
11259 }
11260 function commitCachePassiveMountEffect(current2, finishedWork) {
11261 current2 = null;
11262 null !== finishedWork.alternate && (current2 = finishedWork.alternate.memoizedState.cache);
11263 finishedWork = finishedWork.memoizedState.cache;
11264 finishedWork !== current2 && (retainCache(finishedWork), null != current2 && releaseCache(current2));
11265 }
11266 function recursivelyTraversePassiveMountEffects(root2, parentFiber, committedLanes, committedTransitions, endTime) {
11267 if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
11268 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11269 var nextSibling = parentFiber.sibling;
11270 commitPassiveMountOnFiber(
11271 root2,
11272 parentFiber,
11273 committedLanes,
11274 committedTransitions,
11275 null !== nextSibling ? nextSibling.actualStartTime : endTime
11276 );
11277 parentFiber = nextSibling;
11278 }
11279 }
11280 function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions, endTime) {
11281 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality, flags = finishedWork.flags;
11282 switch (finishedWork.tag) {
11283 case 0:
11284 case 11:
11285 case 15:
11286 (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
11287 finishedWork,
11288 finishedWork.actualStartTime,
11289 endTime,
11290 inHydratedSubtree,
11291 committedLanes
11292 );
11293 recursivelyTraversePassiveMountEffects(
11294 finishedRoot,
11295 finishedWork,
11296 committedLanes,
11297 committedTransitions,
11298 endTime
11299 );
11300 flags & 2048 && commitHookPassiveMountEffects(finishedWork, Passive | HasEffect);
11301 break;
11302 case 1:
11303 (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && (0 !== (finishedWork.flags & 128) ? logComponentErrored(
11304 finishedWork,
11305 finishedWork.actualStartTime,
11306 endTime,
11307 []
11308 ) : 0 !== (finishedWork.flags & 1) && logComponentRender(
11309 finishedWork,
11310 finishedWork.actualStartTime,
11311 endTime,
11312 inHydratedSubtree,
11313 committedLanes
11314 ));
11315 recursivelyTraversePassiveMountEffects(
11316 finishedRoot,
11317 finishedWork,
11318 committedLanes,
11319 committedTransitions,
11320 endTime
11321 );
11322 break;
11323 case 3:
11324 var prevProfilerEffectDuration = pushNestedEffectDurations(), wasInHydratedSubtree = inHydratedSubtree;
11325 inHydratedSubtree = null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 === (finishedWork.flags & 256);
11326 recursivelyTraversePassiveMountEffects(
11327 finishedRoot,
11328 finishedWork,
11329 committedLanes,
11330 committedTransitions,
11331 endTime
11332 );
11333 inHydratedSubtree = wasInHydratedSubtree;
11334 flags & 2048 && (committedLanes = null, null !== finishedWork.alternate && (committedLanes = finishedWork.alternate.memoizedState.cache), committedTransitions = finishedWork.memoizedState.cache, committedTransitions !== committedLanes && (retainCache(committedTransitions), null != committedLanes && releaseCache(committedLanes)));
11335 finishedRoot.passiveEffectDuration += popNestedEffectDurations(
11336 prevProfilerEffectDuration
11337 );
11338 break;
11339 case 12:
11340 if (flags & 2048) {
11341 flags = pushNestedEffectDurations();
11342 recursivelyTraversePassiveMountEffects(
11343 finishedRoot,
11344 finishedWork,
11345 committedLanes,
11346 committedTransitions,
11347 endTime
11348 );
11349 finishedRoot = finishedWork.stateNode;
11350 finishedRoot.passiveEffectDuration += bubbleNestedEffectDurations(flags);
11351 try {
11352 runWithFiberInDEV(
11353 finishedWork,
11354 commitProfilerPostCommitImpl,
11355 finishedWork,
11356 finishedWork.alternate,
11357 commitStartTime,
11358 finishedRoot.passiveEffectDuration
11359 );
11360 } catch (error) {
11361 captureCommitPhaseError(finishedWork, finishedWork.return, error);
11362 }
11363 } else
11364 recursivelyTraversePassiveMountEffects(
11365 finishedRoot,
11366 finishedWork,
11367 committedLanes,
11368 committedTransitions,
11369 endTime
11370 );
11371 break;
11372 case 31:
11373 flags = inHydratedSubtree;
11374 prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
11375 wasInHydratedSubtree = finishedWork.memoizedState;
11376 null !== prevProfilerEffectDuration && null === wasInHydratedSubtree ? (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
11377 finishedWork,
11378 finishedWork.actualStartTime,
11379 endTime,
11380 prevProfilerEffectDuration
11381 )) : inHydratedSubtree = true) : inHydratedSubtree = false;
11382 recursivelyTraversePassiveMountEffects(
11383 finishedRoot,
11384 finishedWork,
11385 committedLanes,
11386 committedTransitions,
11387 endTime
11388 );
11389 inHydratedSubtree = flags;
11390 break;
11391 case 13:
11392 flags = inHydratedSubtree;
11393 prevProfilerEffectDuration = null !== finishedWork.alternate ? finishedWork.alternate.memoizedState : null;
11394 wasInHydratedSubtree = finishedWork.memoizedState;
11395 null === prevProfilerEffectDuration || null === prevProfilerEffectDuration.dehydrated || null !== wasInHydratedSubtree && null !== wasInHydratedSubtree.dehydrated ? inHydratedSubtree = false : (wasInHydratedSubtree = finishedWork.deletions, null !== wasInHydratedSubtree && 0 < wasInHydratedSubtree.length && 18 === wasInHydratedSubtree[0].tag ? (inHydratedSubtree = false, prevProfilerEffectDuration = prevProfilerEffectDuration.hydrationErrors, null !== prevProfilerEffectDuration && logComponentErrored(
11396 finishedWork,
11397 finishedWork.actualStartTime,
11398 endTime,
11399 prevProfilerEffectDuration
11400 )) : inHydratedSubtree = true);
11401 recursivelyTraversePassiveMountEffects(
11402 finishedRoot,
11403 finishedWork,
11404 committedLanes,
11405 committedTransitions,
11406 endTime
11407 );
11408 inHydratedSubtree = flags;
11409 break;
11410 case 23:
11411 break;
11412 case 22:
11413 wasInHydratedSubtree = finishedWork.stateNode;
11414 prevProfilerEffectDuration = finishedWork.alternate;
11415 null !== finishedWork.memoizedState ? wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
11416 finishedRoot,
11417 finishedWork,
11418 committedLanes,
11419 committedTransitions,
11420 endTime
11421 ) : recursivelyTraverseAtomicPassiveEffects(
11422 finishedRoot,
11423 finishedWork,
11424 committedLanes,
11425 committedTransitions,
11426 endTime
11427 ) : wasInHydratedSubtree._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraversePassiveMountEffects(
11428 finishedRoot,
11429 finishedWork,
11430 committedLanes,
11431 committedTransitions,
11432 endTime
11433 ) : (wasInHydratedSubtree._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
11434 finishedRoot,
11435 finishedWork,
11436 committedLanes,
11437 committedTransitions,
11438 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== finishedWork.actualDuration && (null === finishedWork.alternate || finishedWork.alternate.child !== finishedWork.child),
11439 endTime
11440 ), (finishedWork.mode & ProfileMode) === NoMode || inHydratedSubtree || (finishedRoot = finishedWork.actualStartTime, 0 <= finishedRoot && 0.05 < endTime - finishedRoot && logComponentReappeared(finishedWork, finishedRoot, endTime), 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentReappeared(
11441 finishedWork,
11442 componentEffectStartTime,
11443 componentEffectEndTime
11444 )));
11445 flags & 2048 && commitOffscreenPassiveMountEffects(
11446 prevProfilerEffectDuration,
11447 finishedWork
11448 );
11449 break;
11450 case 24:
11451 recursivelyTraversePassiveMountEffects(
11452 finishedRoot,
11453 finishedWork,
11454 committedLanes,
11455 committedTransitions,
11456 endTime
11457 );
11458 flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
11459 break;
11460 default:
11461 recursivelyTraversePassiveMountEffects(
11462 finishedRoot,
11463 finishedWork,
11464 committedLanes,
11465 committedTransitions,
11466 endTime
11467 );
11468 }
11469 if ((finishedWork.mode & ProfileMode) !== NoMode) {
11470 if (finishedRoot = !inHydratedSubtree && null === finishedWork.alternate && null !== finishedWork.return && null !== finishedWork.return.alternate)
11471 committedLanes = finishedWork.actualStartTime, 0 <= committedLanes && 0.05 < endTime - committedLanes && logComponentTrigger(
11472 finishedWork,
11473 committedLanes,
11474 endTime,
11475 "Mount"
11476 );
11477 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && ((componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11478 finishedWork,
11479 componentEffectStartTime,
11480 componentEffectEndTime,
11481 componentEffectDuration,
11482 componentEffectErrors
11483 ), finishedRoot && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11484 finishedWork,
11485 componentEffectStartTime,
11486 componentEffectEndTime,
11487 "Mount"
11488 ));
11489 }
11490 popComponentEffectStart(prevEffectStart);
11491 popComponentEffectDuration(prevEffectDuration);
11492 componentEffectErrors = prevEffectErrors;
11493 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11494 alreadyWarnedForDeepEquality = prevDeepEquality;
11495 }
11496 function recursivelyTraverseReconnectPassiveEffects(finishedRoot, parentFiber, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
11497 includeWorkInProgressEffects = includeWorkInProgressEffects && (0 !== (parentFiber.subtreeFlags & 10256) || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child));
11498 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
11499 var nextSibling = parentFiber.sibling;
11500 reconnectPassiveEffects(
11501 finishedRoot,
11502 parentFiber,
11503 committedLanes,
11504 committedTransitions,
11505 includeWorkInProgressEffects,
11506 null !== nextSibling ? nextSibling.actualStartTime : endTime
11507 );
11508 parentFiber = nextSibling;
11509 }
11510 }
11511 function reconnectPassiveEffects(finishedRoot, finishedWork, committedLanes, committedTransitions, includeWorkInProgressEffects, endTime) {
11512 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate(), prevDeepEquality = alreadyWarnedForDeepEquality;
11513 includeWorkInProgressEffects && (finishedWork.mode & ProfileMode) !== NoMode && 0 < finishedWork.actualStartTime && 0 !== (finishedWork.flags & 1) && logComponentRender(
11514 finishedWork,
11515 finishedWork.actualStartTime,
11516 endTime,
11517 inHydratedSubtree,
11518 committedLanes
11519 );
11520 var flags = finishedWork.flags;
11521 switch (finishedWork.tag) {
11522 case 0:
11523 case 11:
11524 case 15:
11525 recursivelyTraverseReconnectPassiveEffects(
11526 finishedRoot,
11527 finishedWork,
11528 committedLanes,
11529 committedTransitions,
11530 includeWorkInProgressEffects,
11531 endTime
11532 );
11533 commitHookPassiveMountEffects(finishedWork, Passive);
11534 break;
11535 case 23:
11536 break;
11537 case 22:
11538 var _instance2 = finishedWork.stateNode;
11539 null !== finishedWork.memoizedState ? _instance2._visibility & OffscreenPassiveEffectsConnected ? recursivelyTraverseReconnectPassiveEffects(
11540 finishedRoot,
11541 finishedWork,
11542 committedLanes,
11543 committedTransitions,
11544 includeWorkInProgressEffects,
11545 endTime
11546 ) : recursivelyTraverseAtomicPassiveEffects(
11547 finishedRoot,
11548 finishedWork,
11549 committedLanes,
11550 committedTransitions,
11551 endTime
11552 ) : (_instance2._visibility |= OffscreenPassiveEffectsConnected, recursivelyTraverseReconnectPassiveEffects(
11553 finishedRoot,
11554 finishedWork,
11555 committedLanes,
11556 committedTransitions,
11557 includeWorkInProgressEffects,
11558 endTime
11559 ));
11560 includeWorkInProgressEffects && flags & 2048 && commitOffscreenPassiveMountEffects(
11561 finishedWork.alternate,
11562 finishedWork
11563 );
11564 break;
11565 case 24:
11566 recursivelyTraverseReconnectPassiveEffects(
11567 finishedRoot,
11568 finishedWork,
11569 committedLanes,
11570 committedTransitions,
11571 includeWorkInProgressEffects,
11572 endTime
11573 );
11574 includeWorkInProgressEffects && flags & 2048 && commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);
11575 break;
11576 default:
11577 recursivelyTraverseReconnectPassiveEffects(
11578 finishedRoot,
11579 finishedWork,
11580 committedLanes,
11581 committedTransitions,
11582 includeWorkInProgressEffects,
11583 endTime
11584 );
11585 }
11586 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11587 finishedWork,
11588 componentEffectStartTime,
11589 componentEffectEndTime,
11590 componentEffectDuration,
11591 componentEffectErrors
11592 );
11593 popComponentEffectStart(prevEffectStart);
11594 popComponentEffectDuration(prevEffectDuration);
11595 componentEffectErrors = prevEffectErrors;
11596 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11597 alreadyWarnedForDeepEquality = prevDeepEquality;
11598 }
11599 function recursivelyTraverseAtomicPassiveEffects(finishedRoot$jscomp$0, parentFiber, committedLanes$jscomp$0, committedTransitions$jscomp$0, endTime$jscomp$0) {
11600 if (parentFiber.subtreeFlags & 10256 || 0 !== parentFiber.actualDuration && (null === parentFiber.alternate || parentFiber.alternate.child !== parentFiber.child))
11601 for (var child = parentFiber.child; null !== child; ) {
11602 parentFiber = child.sibling;
11603 var finishedRoot = finishedRoot$jscomp$0, committedLanes = committedLanes$jscomp$0, committedTransitions = committedTransitions$jscomp$0, endTime = null !== parentFiber ? parentFiber.actualStartTime : endTime$jscomp$0, prevDeepEquality = alreadyWarnedForDeepEquality;
11604 (child.mode & ProfileMode) !== NoMode && 0 < child.actualStartTime && 0 !== (child.flags & 1) && logComponentRender(
11605 child,
11606 child.actualStartTime,
11607 endTime,
11608 inHydratedSubtree,
11609 committedLanes
11610 );
11611 var flags = child.flags;
11612 switch (child.tag) {
11613 case 22:
11614 recursivelyTraverseAtomicPassiveEffects(
11615 finishedRoot,
11616 child,
11617 committedLanes,
11618 committedTransitions,
11619 endTime
11620 );
11621 flags & 2048 && commitOffscreenPassiveMountEffects(child.alternate, child);
11622 break;
11623 case 24:
11624 recursivelyTraverseAtomicPassiveEffects(
11625 finishedRoot,
11626 child,
11627 committedLanes,
11628 committedTransitions,
11629 endTime
11630 );
11631 flags & 2048 && commitCachePassiveMountEffect(child.alternate, child);
11632 break;
11633 default:
11634 recursivelyTraverseAtomicPassiveEffects(
11635 finishedRoot,
11636 child,
11637 committedLanes,
11638 committedTransitions,
11639 endTime
11640 );
11641 }
11642 alreadyWarnedForDeepEquality = prevDeepEquality;
11643 child = parentFiber;
11644 }
11645 }
11646 function recursivelyAccumulateSuspenseyCommit(parentFiber, committedLanes, suspendedState) {
11647 if (parentFiber.subtreeFlags & suspenseyCommitFlag)
11648 for (parentFiber = parentFiber.child; null !== parentFiber; )
11649 accumulateSuspenseyCommitOnFiber(
11650 parentFiber,
11651 committedLanes,
11652 suspendedState
11653 ), parentFiber = parentFiber.sibling;
11654 }
11655 function accumulateSuspenseyCommitOnFiber(fiber, committedLanes, suspendedState) {
11656 switch (fiber.tag) {
11657 case 26:
11658 recursivelyAccumulateSuspenseyCommit(
11659 fiber,
11660 committedLanes,
11661 suspendedState
11662 );
11663 fiber.flags & suspenseyCommitFlag && null !== fiber.memoizedState && suspendResource(
11664 suspendedState,
11665 currentHoistableRoot,
11666 fiber.memoizedState,
11667 fiber.memoizedProps
11668 );
11669 break;
11670 case 5:
11671 recursivelyAccumulateSuspenseyCommit(
11672 fiber,
11673 committedLanes,
11674 suspendedState
11675 );
11676 break;
11677 case 3:
11678 case 4:
11679 var previousHoistableRoot = currentHoistableRoot;
11680 currentHoistableRoot = getHoistableRoot(
11681 fiber.stateNode.containerInfo
11682 );
11683 recursivelyAccumulateSuspenseyCommit(
11684 fiber,
11685 committedLanes,
11686 suspendedState
11687 );
11688 currentHoistableRoot = previousHoistableRoot;
11689 break;
11690 case 22:
11691 null === fiber.memoizedState && (previousHoistableRoot = fiber.alternate, null !== previousHoistableRoot && null !== previousHoistableRoot.memoizedState ? (previousHoistableRoot = suspenseyCommitFlag, suspenseyCommitFlag = 16777216, recursivelyAccumulateSuspenseyCommit(
11692 fiber,
11693 committedLanes,
11694 suspendedState
11695 ), suspenseyCommitFlag = previousHoistableRoot) : recursivelyAccumulateSuspenseyCommit(
11696 fiber,
11697 committedLanes,
11698 suspendedState
11699 ));
11700 break;
11701 default:
11702 recursivelyAccumulateSuspenseyCommit(
11703 fiber,
11704 committedLanes,
11705 suspendedState
11706 );
11707 }
11708 }
11709 function detachAlternateSiblings(parentFiber) {
11710 var previousFiber = parentFiber.alternate;
11711 if (null !== previousFiber && (parentFiber = previousFiber.child, null !== parentFiber)) {
11712 previousFiber.child = null;
11713 do
11714 previousFiber = parentFiber.sibling, parentFiber.sibling = null, parentFiber = previousFiber;
11715 while (null !== parentFiber);
11716 }
11717 }
11718 function recursivelyTraversePassiveUnmountEffects(parentFiber) {
11719 var deletions = parentFiber.deletions;
11720 if (0 !== (parentFiber.flags & 16)) {
11721 if (null !== deletions)
11722 for (var i = 0; i < deletions.length; i++) {
11723 var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
11724 nextEffect = childToDelete;
11725 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
11726 childToDelete,
11727 parentFiber
11728 );
11729 (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11730 childToDelete,
11731 componentEffectStartTime,
11732 componentEffectEndTime,
11733 "Unmount"
11734 );
11735 popComponentEffectStart(prevEffectStart);
11736 }
11737 detachAlternateSiblings(parentFiber);
11738 }
11739 if (parentFiber.subtreeFlags & 10256)
11740 for (parentFiber = parentFiber.child; null !== parentFiber; )
11741 commitPassiveUnmountOnFiber(parentFiber), parentFiber = parentFiber.sibling;
11742 }
11743 function commitPassiveUnmountOnFiber(finishedWork) {
11744 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11745 switch (finishedWork.tag) {
11746 case 0:
11747 case 11:
11748 case 15:
11749 recursivelyTraversePassiveUnmountEffects(finishedWork);
11750 finishedWork.flags & 2048 && commitHookPassiveUnmountEffects(
11751 finishedWork,
11752 finishedWork.return,
11753 Passive | HasEffect
11754 );
11755 break;
11756 case 3:
11757 var prevProfilerEffectDuration = pushNestedEffectDurations();
11758 recursivelyTraversePassiveUnmountEffects(finishedWork);
11759 finishedWork.stateNode.passiveEffectDuration += popNestedEffectDurations(prevProfilerEffectDuration);
11760 break;
11761 case 12:
11762 prevProfilerEffectDuration = pushNestedEffectDurations();
11763 recursivelyTraversePassiveUnmountEffects(finishedWork);
11764 finishedWork.stateNode.passiveEffectDuration += bubbleNestedEffectDurations(prevProfilerEffectDuration);
11765 break;
11766 case 22:
11767 prevProfilerEffectDuration = finishedWork.stateNode;
11768 null !== finishedWork.memoizedState && prevProfilerEffectDuration._visibility & OffscreenPassiveEffectsConnected && (null === finishedWork.return || 13 !== finishedWork.return.tag) ? (prevProfilerEffectDuration._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork), (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11769 finishedWork,
11770 componentEffectStartTime,
11771 componentEffectEndTime,
11772 "Disconnect"
11773 )) : recursivelyTraversePassiveUnmountEffects(finishedWork);
11774 break;
11775 default:
11776 recursivelyTraversePassiveUnmountEffects(finishedWork);
11777 }
11778 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11779 finishedWork,
11780 componentEffectStartTime,
11781 componentEffectEndTime,
11782 componentEffectDuration,
11783 componentEffectErrors
11784 );
11785 popComponentEffectStart(prevEffectStart);
11786 popComponentEffectDuration(prevEffectDuration);
11787 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11788 componentEffectErrors = prevEffectErrors;
11789 }
11790 function recursivelyTraverseDisconnectPassiveEffects(parentFiber) {
11791 var deletions = parentFiber.deletions;
11792 if (0 !== (parentFiber.flags & 16)) {
11793 if (null !== deletions)
11794 for (var i = 0; i < deletions.length; i++) {
11795 var childToDelete = deletions[i], prevEffectStart = pushComponentEffectStart();
11796 nextEffect = childToDelete;
11797 commitPassiveUnmountEffectsInsideOfDeletedTree_begin(
11798 childToDelete,
11799 parentFiber
11800 );
11801 (childToDelete.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && 0.05 < componentEffectEndTime - componentEffectStartTime && logComponentTrigger(
11802 childToDelete,
11803 componentEffectStartTime,
11804 componentEffectEndTime,
11805 "Unmount"
11806 );
11807 popComponentEffectStart(prevEffectStart);
11808 }
11809 detachAlternateSiblings(parentFiber);
11810 }
11811 for (parentFiber = parentFiber.child; null !== parentFiber; )
11812 disconnectPassiveEffect(parentFiber), parentFiber = parentFiber.sibling;
11813 }
11814 function disconnectPassiveEffect(finishedWork) {
11815 var prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11816 switch (finishedWork.tag) {
11817 case 0:
11818 case 11:
11819 case 15:
11820 commitHookPassiveUnmountEffects(
11821 finishedWork,
11822 finishedWork.return,
11823 Passive
11824 );
11825 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
11826 break;
11827 case 22:
11828 var instance = finishedWork.stateNode;
11829 instance._visibility & OffscreenPassiveEffectsConnected && (instance._visibility &= ~OffscreenPassiveEffectsConnected, recursivelyTraverseDisconnectPassiveEffects(finishedWork));
11830 break;
11831 default:
11832 recursivelyTraverseDisconnectPassiveEffects(finishedWork);
11833 }
11834 (finishedWork.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11835 finishedWork,
11836 componentEffectStartTime,
11837 componentEffectEndTime,
11838 componentEffectDuration,
11839 componentEffectErrors
11840 );
11841 popComponentEffectStart(prevEffectStart);
11842 popComponentEffectDuration(prevEffectDuration);
11843 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11844 componentEffectErrors = prevEffectErrors;
11845 }
11846 function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor$jscomp$0) {
11847 for (; null !== nextEffect; ) {
11848 var fiber = nextEffect, current2 = fiber, nearestMountedAncestor = nearestMountedAncestor$jscomp$0, prevEffectStart = pushComponentEffectStart(), prevEffectDuration = pushComponentEffectDuration(), prevEffectErrors = pushComponentEffectErrors(), prevEffectDidSpawnUpdate = pushComponentEffectDidSpawnUpdate();
11849 switch (current2.tag) {
11850 case 0:
11851 case 11:
11852 case 15:
11853 commitHookPassiveUnmountEffects(
11854 current2,
11855 nearestMountedAncestor,
11856 Passive
11857 );
11858 break;
11859 case 23:
11860 case 22:
11861 null !== current2.memoizedState && null !== current2.memoizedState.cachePool && (nearestMountedAncestor = current2.memoizedState.cachePool.pool, null != nearestMountedAncestor && retainCache(nearestMountedAncestor));
11862 break;
11863 case 24:
11864 releaseCache(current2.memoizedState.cache);
11865 }
11866 (current2.mode & ProfileMode) !== NoMode && 0 <= componentEffectStartTime && 0 <= componentEffectEndTime && (componentEffectSpawnedUpdate || 0.05 < componentEffectDuration) && logComponentEffect(
11867 current2,
11868 componentEffectStartTime,
11869 componentEffectEndTime,
11870 componentEffectDuration,
11871 componentEffectErrors
11872 );
11873 popComponentEffectStart(prevEffectStart);
11874 popComponentEffectDuration(prevEffectDuration);
11875 componentEffectSpawnedUpdate = prevEffectDidSpawnUpdate;
11876 componentEffectErrors = prevEffectErrors;
11877 current2 = fiber.child;
11878 if (null !== current2) current2.return = fiber, nextEffect = current2;
11879 else
11880 a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {
11881 current2 = nextEffect;
11882 prevEffectStart = current2.sibling;
11883 prevEffectDuration = current2.return;
11884 detachFiberAfterEffects(current2);
11885 if (current2 === fiber) {
11886 nextEffect = null;
11887 break a;
11888 }
11889 if (null !== prevEffectStart) {
11890 prevEffectStart.return = prevEffectDuration;
11891 nextEffect = prevEffectStart;
11892 break a;
11893 }
11894 nextEffect = prevEffectDuration;
11895 }
11896 }
11897 }
11898 function onCommitRoot() {
11899 commitHooks.forEach(function(commitHook) {
11900 return commitHook();
11901 });
11902 }
11903 function isConcurrentActEnvironment() {
11904 var isReactActEnvironmentGlobal = "undefined" !== typeof IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0;
11905 isReactActEnvironmentGlobal || null === ReactSharedInternals.actQueue || console.error(
11906 "The current testing environment is not configured to support act(...)"
11907 );
11908 return isReactActEnvironmentGlobal;
11909 }
11910 function requestUpdateLane(fiber) {
11911 if ((executionContext & RenderContext) !== NoContext && 0 !== workInProgressRootRenderLanes)
11912 return workInProgressRootRenderLanes & -workInProgressRootRenderLanes;
11913 var transition = ReactSharedInternals.T;
11914 return null !== transition ? (transition._updatedFibers || (transition._updatedFibers = /* @__PURE__ */ new Set()), transition._updatedFibers.add(fiber), requestTransitionLane()) : resolveUpdatePriority();
11915 }
11916 function requestDeferredLane() {
11917 if (0 === workInProgressDeferredLane)
11918 if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {
11919 var lane = nextTransitionDeferredLane;
11920 nextTransitionDeferredLane <<= 1;
11921 0 === (nextTransitionDeferredLane & 3932160) && (nextTransitionDeferredLane = 262144);
11922 workInProgressDeferredLane = lane;
11923 } else workInProgressDeferredLane = 536870912;
11924 lane = suspenseHandlerStackCursor.current;
11925 null !== lane && (lane.flags |= 32);
11926 return workInProgressDeferredLane;
11927 }
11928 function scheduleUpdateOnFiber(root2, fiber, lane) {
11929 isRunningInsertionEffect && console.error("useInsertionEffect must not schedule updates.");
11930 isFlushingPassiveEffects && (didScheduleUpdateDuringPassiveEffects = true);
11931 if (root2 === workInProgressRoot && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
11932 prepareFreshStack(root2, 0), markRootSuspended(
11933 root2,
11934 workInProgressRootRenderLanes,
11935 workInProgressDeferredLane,
11936 false
11937 );
11938 markRootUpdated$1(root2, lane);
11939 if ((executionContext & RenderContext) !== NoContext && root2 === workInProgressRoot) {
11940 if (isRendering)
11941 switch (fiber.tag) {
11942 case 0:
11943 case 11:
11944 case 15:
11945 root2 = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
11946 didWarnAboutUpdateInRenderForAnotherComponent.has(root2) || (didWarnAboutUpdateInRenderForAnotherComponent.add(root2), fiber = getComponentNameFromFiber(fiber) || "Unknown", console.error(
11947 "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",
11948 fiber,
11949 root2,
11950 root2
11951 ));
11952 break;
11953 case 1:
11954 didWarnAboutUpdateInRender || (console.error(
11955 "Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."
11956 ), didWarnAboutUpdateInRender = true);
11957 }
11958 } else
11959 isDevToolsPresent && addFiberToLanesMap(root2, fiber, lane), warnIfUpdatesNotWrappedWithActDEV(fiber), root2 === workInProgressRoot && ((executionContext & RenderContext) === NoContext && (workInProgressRootInterleavedUpdatedLanes |= lane), workInProgressRootExitStatus === RootSuspendedWithDelay && markRootSuspended(
11960 root2,
11961 workInProgressRootRenderLanes,
11962 workInProgressDeferredLane,
11963 false
11964 )), ensureRootIsScheduled(root2);
11965 }
11966 function performWorkOnRoot(root2, lanes, forceSync) {
11967 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
11968 throw Error("Should not already be working.");
11969 if (0 !== workInProgressRootRenderLanes && null !== workInProgress) {
11970 var yieldedFiber = workInProgress, yieldEndTime = now$1();
11971 switch (yieldReason) {
11972 case SuspendedOnImmediate:
11973 case SuspendedOnData:
11974 var startTime = yieldStartTime;
11975 supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
11976 console.timeStamp.bind(
11977 console,
11978 "Suspended",
11979 startTime,
11980 yieldEndTime,
11981 COMPONENTS_TRACK,
11982 void 0,
11983 "primary-light"
11984 )
11985 ) : console.timeStamp(
11986 "Suspended",
11987 startTime,
11988 yieldEndTime,
11989 COMPONENTS_TRACK,
11990 void 0,
11991 "primary-light"
11992 ));
11993 break;
11994 case SuspendedOnAction:
11995 startTime = yieldStartTime;
11996 supportsUserTiming && ((yieldedFiber = yieldedFiber._debugTask) ? yieldedFiber.run(
11997 console.timeStamp.bind(
11998 console,
11999 "Action",
12000 startTime,
12001 yieldEndTime,
12002 COMPONENTS_TRACK,
12003 void 0,
12004 "primary-light"
12005 )
12006 ) : console.timeStamp(
12007 "Action",
12008 startTime,
12009 yieldEndTime,
12010 COMPONENTS_TRACK,
12011 void 0,
12012 "primary-light"
12013 ));
12014 break;
12015 default:
12016 supportsUserTiming && (yieldedFiber = yieldEndTime - yieldStartTime, 3 > yieldedFiber || console.timeStamp(
12017 "Blocked",
12018 yieldStartTime,
12019 yieldEndTime,
12020 COMPONENTS_TRACK,
12021 void 0,
12022 5 > yieldedFiber ? "primary-light" : 10 > yieldedFiber ? "primary" : 100 > yieldedFiber ? "primary-dark" : "error"
12023 ));
12024 }
12025 }
12026 startTime = (forceSync = !forceSync && 0 === (lanes & 127) && 0 === (lanes & root2.expiredLanes) || checkIfRootIsPrerendering(root2, lanes)) ? renderRootConcurrent(root2, lanes) : renderRootSync(root2, lanes, true);
12027 var renderWasConcurrent = forceSync;
12028 do {
12029 if (startTime === RootInProgress) {
12030 workInProgressRootIsPrerendering && !forceSync && markRootSuspended(root2, lanes, 0, false);
12031 lanes = workInProgressSuspendedReason;
12032 yieldStartTime = now();
12033 yieldReason = lanes;
12034 break;
12035 } else {
12036 yieldedFiber = now$1();
12037 yieldEndTime = root2.current.alternate;
12038 if (renderWasConcurrent && !isRenderConsistentWithExternalStores(yieldEndTime)) {
12039 setCurrentTrackFromLanes(lanes);
12040 yieldEndTime = renderStartTime;
12041 startTime = yieldedFiber;
12042 !supportsUserTiming || startTime <= yieldEndTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
12043 console.timeStamp.bind(
12044 console,
12045 "Teared Render",
12046 yieldEndTime,
12047 startTime,
12048 currentTrack,
12049 LANES_TRACK_GROUP,
12050 "error"
12051 )
12052 ) : console.timeStamp(
12053 "Teared Render",
12054 yieldEndTime,
12055 startTime,
12056 currentTrack,
12057 LANES_TRACK_GROUP,
12058 "error"
12059 ));
12060 finalizeRender(lanes, yieldedFiber);
12061 startTime = renderRootSync(root2, lanes, false);
12062 renderWasConcurrent = false;
12063 continue;
12064 }
12065 if (startTime === RootErrored) {
12066 renderWasConcurrent = lanes;
12067 if (root2.errorRecoveryDisabledLanes & renderWasConcurrent)
12068 var errorRetryLanes = 0;
12069 else
12070 errorRetryLanes = root2.pendingLanes & -536870913, errorRetryLanes = 0 !== errorRetryLanes ? errorRetryLanes : errorRetryLanes & 536870912 ? 536870912 : 0;
12071 if (0 !== errorRetryLanes) {
12072 setCurrentTrackFromLanes(lanes);
12073 logErroredRenderPhase(
12074 renderStartTime,
12075 yieldedFiber,
12076 lanes,
12077 workInProgressUpdateTask
12078 );
12079 finalizeRender(lanes, yieldedFiber);
12080 lanes = errorRetryLanes;
12081 a: {
12082 yieldedFiber = root2;
12083 startTime = renderWasConcurrent;
12084 renderWasConcurrent = workInProgressRootConcurrentErrors;
12085 var wasRootDehydrated = yieldedFiber.current.memoizedState.isDehydrated;
12086 wasRootDehydrated && (prepareFreshStack(yieldedFiber, errorRetryLanes).flags |= 256);
12087 errorRetryLanes = renderRootSync(
12088 yieldedFiber,
12089 errorRetryLanes,
12090 false
12091 );
12092 if (errorRetryLanes !== RootErrored) {
12093 if (workInProgressRootDidAttachPingListener && !wasRootDehydrated) {
12094 yieldedFiber.errorRecoveryDisabledLanes |= startTime;
12095 workInProgressRootInterleavedUpdatedLanes |= startTime;
12096 startTime = RootSuspendedWithDelay;
12097 break a;
12098 }
12099 yieldedFiber = workInProgressRootRecoverableErrors;
12100 workInProgressRootRecoverableErrors = renderWasConcurrent;
12101 null !== yieldedFiber && (null === workInProgressRootRecoverableErrors ? workInProgressRootRecoverableErrors = yieldedFiber : workInProgressRootRecoverableErrors.push.apply(
12102 workInProgressRootRecoverableErrors,
12103 yieldedFiber
12104 ));
12105 }
12106 startTime = errorRetryLanes;
12107 }
12108 renderWasConcurrent = false;
12109 if (startTime !== RootErrored) continue;
12110 else yieldedFiber = now$1();
12111 }
12112 }
12113 if (startTime === RootFatalErrored) {
12114 setCurrentTrackFromLanes(lanes);
12115 logErroredRenderPhase(
12116 renderStartTime,
12117 yieldedFiber,
12118 lanes,
12119 workInProgressUpdateTask
12120 );
12121 finalizeRender(lanes, yieldedFiber);
12122 prepareFreshStack(root2, 0);
12123 markRootSuspended(root2, lanes, 0, true);
12124 break;
12125 }
12126 a: {
12127 forceSync = root2;
12128 switch (startTime) {
12129 case RootInProgress:
12130 case RootFatalErrored:
12131 throw Error("Root did not complete. This is a bug in React.");
12132 case RootSuspendedWithDelay:
12133 if ((lanes & 4194048) !== lanes) break;
12134 case RootSuspendedAtTheShell:
12135 setCurrentTrackFromLanes(lanes);
12136 logSuspendedRenderPhase(
12137 renderStartTime,
12138 yieldedFiber,
12139 lanes,
12140 workInProgressUpdateTask
12141 );
12142 finalizeRender(lanes, yieldedFiber);
12143 yieldEndTime = lanes;
12144 0 !== (yieldEndTime & 127) ? blockingSuspendedTime = yieldedFiber : 0 !== (yieldEndTime & 4194048) && (transitionSuspendedTime = yieldedFiber);
12145 markRootSuspended(
12146 forceSync,
12147 lanes,
12148 workInProgressDeferredLane,
12149 !workInProgressRootDidSkipSuspendedSiblings
12150 );
12151 break a;
12152 case RootErrored:
12153 workInProgressRootRecoverableErrors = null;
12154 break;
12155 case RootSuspended:
12156 case RootCompleted:
12157 break;
12158 default:
12159 throw Error("Unknown root exit status.");
12160 }
12161 if (null !== ReactSharedInternals.actQueue)
12162 commitRoot(
12163 forceSync,
12164 yieldEndTime,
12165 lanes,
12166 workInProgressRootRecoverableErrors,
12167 workInProgressTransitions,
12168 workInProgressRootDidIncludeRecursiveRenderUpdate,
12169 workInProgressDeferredLane,
12170 workInProgressRootInterleavedUpdatedLanes,
12171 workInProgressSuspendedRetryLanes,
12172 startTime,
12173 null,
12174 null,
12175 renderStartTime,
12176 yieldedFiber
12177 );
12178 else {
12179 if ((lanes & 62914560) === lanes && (renderWasConcurrent = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now$1(), 10 < renderWasConcurrent)) {
12180 markRootSuspended(
12181 forceSync,
12182 lanes,
12183 workInProgressDeferredLane,
12184 !workInProgressRootDidSkipSuspendedSiblings
12185 );
12186 if (0 !== getNextLanes(forceSync, 0, true)) break a;
12187 pendingEffectsLanes = lanes;
12188 forceSync.timeoutHandle = scheduleTimeout(
12189 commitRootWhenReady.bind(
12190 null,
12191 forceSync,
12192 yieldEndTime,
12193 workInProgressRootRecoverableErrors,
12194 workInProgressTransitions,
12195 workInProgressRootDidIncludeRecursiveRenderUpdate,
12196 lanes,
12197 workInProgressDeferredLane,
12198 workInProgressRootInterleavedUpdatedLanes,
12199 workInProgressSuspendedRetryLanes,
12200 workInProgressRootDidSkipSuspendedSiblings,
12201 startTime,
12202 "Throttled",
12203 renderStartTime,
12204 yieldedFiber
12205 ),
12206 renderWasConcurrent
12207 );
12208 break a;
12209 }
12210 commitRootWhenReady(
12211 forceSync,
12212 yieldEndTime,
12213 workInProgressRootRecoverableErrors,
12214 workInProgressTransitions,
12215 workInProgressRootDidIncludeRecursiveRenderUpdate,
12216 lanes,
12217 workInProgressDeferredLane,
12218 workInProgressRootInterleavedUpdatedLanes,
12219 workInProgressSuspendedRetryLanes,
12220 workInProgressRootDidSkipSuspendedSiblings,
12221 startTime,
12222 null,
12223 renderStartTime,
12224 yieldedFiber
12225 );
12226 }
12227 }
12228 }
12229 break;
12230 } while (1);
12231 ensureRootIsScheduled(root2);
12232 }
12233 function commitRootWhenReady(root2, finishedWork, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, lanes, spawnedLane, updatedLanes, suspendedRetryLanes, didSkipSuspendedSiblings, exitStatus, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
12234 root2.timeoutHandle = noTimeout;
12235 var subtreeFlags = finishedWork.subtreeFlags, suspendedState = null;
12236 if (subtreeFlags & 8192 || 16785408 === (subtreeFlags & 16785408)) {
12237 if (suspendedState = {
12238 stylesheets: null,
12239 count: 0,
12240 imgCount: 0,
12241 imgBytes: 0,
12242 suspenseyImages: [],
12243 waitingForImages: true,
12244 waitingForViewTransition: false,
12245 unsuspend: noop$1
12246 }, accumulateSuspenseyCommitOnFiber(finishedWork, lanes, suspendedState), subtreeFlags = (lanes & 62914560) === lanes ? globalMostRecentFallbackTime - now$1() : (lanes & 4194048) === lanes ? globalMostRecentTransitionTime - now$1() : 0, subtreeFlags = waitForCommitToBeReady(suspendedState, subtreeFlags), null !== subtreeFlags) {
12247 pendingEffectsLanes = lanes;
12248 root2.cancelPendingCommit = subtreeFlags(
12249 commitRoot.bind(
12250 null,
12251 root2,
12252 finishedWork,
12253 lanes,
12254 recoverableErrors,
12255 transitions,
12256 didIncludeRenderPhaseUpdate,
12257 spawnedLane,
12258 updatedLanes,
12259 suspendedRetryLanes,
12260 exitStatus,
12261 suspendedState,
12262 suspendedState.waitingForViewTransition ? "Waiting for the previous Animation" : 0 < suspendedState.count ? 0 < suspendedState.imgCount ? "Suspended on CSS and Images" : "Suspended on CSS" : 1 === suspendedState.imgCount ? "Suspended on an Image" : 0 < suspendedState.imgCount ? "Suspended on Images" : null,
12263 completedRenderStartTime,
12264 completedRenderEndTime
12265 )
12266 );
12267 markRootSuspended(
12268 root2,
12269 lanes,
12270 spawnedLane,
12271 !didSkipSuspendedSiblings
12272 );
12273 return;
12274 }
12275 }
12276 commitRoot(
12277 root2,
12278 finishedWork,
12279 lanes,
12280 recoverableErrors,
12281 transitions,
12282 didIncludeRenderPhaseUpdate,
12283 spawnedLane,
12284 updatedLanes,
12285 suspendedRetryLanes,
12286 exitStatus,
12287 suspendedState,
12288 suspendedCommitReason,
12289 completedRenderStartTime,
12290 completedRenderEndTime
12291 );
12292 }
12293 function isRenderConsistentWithExternalStores(finishedWork) {
12294 for (var node = finishedWork; ; ) {
12295 var tag = node.tag;
12296 if ((0 === tag || 11 === tag || 15 === tag) && node.flags & 16384 && (tag = node.updateQueue, null !== tag && (tag = tag.stores, null !== tag)))
12297 for (var i = 0; i < tag.length; i++) {
12298 var check = tag[i], getSnapshot = check.getSnapshot;
12299 check = check.value;
12300 try {
12301 if (!objectIs(getSnapshot(), check)) return false;
12302 } catch (error) {
12303 return false;
12304 }
12305 }
12306 tag = node.child;
12307 if (node.subtreeFlags & 16384 && null !== tag)
12308 tag.return = node, node = tag;
12309 else {
12310 if (node === finishedWork) break;
12311 for (; null === node.sibling; ) {
12312 if (null === node.return || node.return === finishedWork) return true;
12313 node = node.return;
12314 }
12315 node.sibling.return = node.return;
12316 node = node.sibling;
12317 }
12318 }
12319 return true;
12320 }
12321 function markRootSuspended(root2, suspendedLanes, spawnedLane, didAttemptEntireTree) {
12322 suspendedLanes &= ~workInProgressRootPingedLanes;
12323 suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;
12324 root2.suspendedLanes |= suspendedLanes;
12325 root2.pingedLanes &= ~suspendedLanes;
12326 didAttemptEntireTree && (root2.warmLanes |= suspendedLanes);
12327 didAttemptEntireTree = root2.expirationTimes;
12328 for (var lanes = suspendedLanes; 0 < lanes; ) {
12329 var index = 31 - clz32(lanes), lane = 1 << index;
12330 didAttemptEntireTree[index] = -1;
12331 lanes &= ~lane;
12332 }
12333 0 !== spawnedLane && markSpawnedDeferredLane(root2, spawnedLane, suspendedLanes);
12334 }
12335 function flushSyncWork$1() {
12336 return (executionContext & (RenderContext | CommitContext)) === NoContext ? (flushSyncWorkAcrossRoots_impl(0, false), false) : true;
12337 }
12338 function resetWorkInProgressStack() {
12339 if (null !== workInProgress) {
12340 if (workInProgressSuspendedReason === NotSuspended)
12341 var interruptedWork = workInProgress.return;
12342 else
12343 interruptedWork = workInProgress, resetContextDependencies(), resetHooksOnUnwind(interruptedWork), thenableState$1 = null, thenableIndexCounter$1 = 0, interruptedWork = workInProgress;
12344 for (; null !== interruptedWork; )
12345 unwindInterruptedWork(interruptedWork.alternate, interruptedWork), interruptedWork = interruptedWork.return;
12346 workInProgress = null;
12347 }
12348 }
12349 function finalizeRender(lanes, finalizationTime) {
12350 0 !== (lanes & 127) && (blockingClampTime = finalizationTime);
12351 0 !== (lanes & 4194048) && (transitionClampTime = finalizationTime);
12352 0 !== (lanes & 62914560) && (retryClampTime = finalizationTime);
12353 0 !== (lanes & 2080374784) && (idleClampTime = finalizationTime);
12354 }
12355 function prepareFreshStack(root2, lanes) {
12356 supportsUserTiming && (console.timeStamp(
12357 "Blocking Track",
12358 3e-3,
12359 3e-3,
12360 "Blocking",
12361 LANES_TRACK_GROUP,
12362 "primary-light"
12363 ), console.timeStamp(
12364 "Transition Track",
12365 3e-3,
12366 3e-3,
12367 "Transition",
12368 LANES_TRACK_GROUP,
12369 "primary-light"
12370 ), console.timeStamp(
12371 "Suspense Track",
12372 3e-3,
12373 3e-3,
12374 "Suspense",
12375 LANES_TRACK_GROUP,
12376 "primary-light"
12377 ), console.timeStamp(
12378 "Idle Track",
12379 3e-3,
12380 3e-3,
12381 "Idle",
12382 LANES_TRACK_GROUP,
12383 "primary-light"
12384 ));
12385 var previousRenderStartTime = renderStartTime;
12386 renderStartTime = now();
12387 if (0 !== workInProgressRootRenderLanes && 0 < previousRenderStartTime) {
12388 setCurrentTrackFromLanes(workInProgressRootRenderLanes);
12389 if (workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootSuspendedWithDelay)
12390 logSuspendedRenderPhase(
12391 previousRenderStartTime,
12392 renderStartTime,
12393 lanes,
12394 workInProgressUpdateTask
12395 );
12396 else {
12397 var endTime = renderStartTime, debugTask = workInProgressUpdateTask;
12398 if (supportsUserTiming && !(endTime <= previousRenderStartTime)) {
12399 var color = (lanes & 738197653) === lanes ? "tertiary-dark" : "primary-dark", label = (lanes & 536870912) === lanes ? "Prewarm" : (lanes & 201326741) === lanes ? "Interrupted Hydration" : "Interrupted Render";
12400 debugTask ? debugTask.run(
12401 console.timeStamp.bind(
12402 console,
12403 label,
12404 previousRenderStartTime,
12405 endTime,
12406 currentTrack,
12407 LANES_TRACK_GROUP,
12408 color
12409 )
12410 ) : console.timeStamp(
12411 label,
12412 previousRenderStartTime,
12413 endTime,
12414 currentTrack,
12415 LANES_TRACK_GROUP,
12416 color
12417 );
12418 }
12419 }
12420 finalizeRender(workInProgressRootRenderLanes, renderStartTime);
12421 }
12422 previousRenderStartTime = workInProgressUpdateTask;
12423 workInProgressUpdateTask = null;
12424 if (0 !== (lanes & 127)) {
12425 workInProgressUpdateTask = blockingUpdateTask;
12426 debugTask = 0 <= blockingUpdateTime && blockingUpdateTime < blockingClampTime ? blockingClampTime : blockingUpdateTime;
12427 endTime = 0 <= blockingEventTime && blockingEventTime < blockingClampTime ? blockingClampTime : blockingEventTime;
12428 color = 0 <= endTime ? endTime : 0 <= debugTask ? debugTask : renderStartTime;
12429 0 <= blockingSuspendedTime ? (setCurrentTrackFromLanes(2), logSuspendedWithDelayPhase(
12430 blockingSuspendedTime,
12431 color,
12432 lanes,
12433 previousRenderStartTime
12434 )) : 0 !== (animatingLanes & 127) && (setCurrentTrackFromLanes(2), logAnimatingPhase(blockingClampTime, color, animatingTask));
12435 previousRenderStartTime = debugTask;
12436 var eventTime = endTime, eventType = blockingEventType, eventIsRepeat = 0 < blockingEventRepeatTime, isSpawnedUpdate = blockingUpdateType === SPAWNED_UPDATE, isPingedUpdate = blockingUpdateType === PINGED_UPDATE;
12437 debugTask = renderStartTime;
12438 endTime = blockingUpdateTask;
12439 color = blockingUpdateMethodName;
12440 label = blockingUpdateComponentName;
12441 if (supportsUserTiming) {
12442 currentTrack = "Blocking";
12443 0 < previousRenderStartTime ? previousRenderStartTime > debugTask && (previousRenderStartTime = debugTask) : previousRenderStartTime = debugTask;
12444 0 < eventTime ? eventTime > previousRenderStartTime && (eventTime = previousRenderStartTime) : eventTime = previousRenderStartTime;
12445 if (null !== eventType && previousRenderStartTime > eventTime) {
12446 var color$jscomp$0 = eventIsRepeat ? "secondary-light" : "warning";
12447 endTime ? endTime.run(
12448 console.timeStamp.bind(
12449 console,
12450 eventIsRepeat ? "Consecutive" : "Event: " + eventType,
12451 eventTime,
12452 previousRenderStartTime,
12453 currentTrack,
12454 LANES_TRACK_GROUP,
12455 color$jscomp$0
12456 )
12457 ) : console.timeStamp(
12458 eventIsRepeat ? "Consecutive" : "Event: " + eventType,
12459 eventTime,
12460 previousRenderStartTime,
12461 currentTrack,
12462 LANES_TRACK_GROUP,
12463 color$jscomp$0
12464 );
12465 }
12466 debugTask > previousRenderStartTime && (eventTime = isSpawnedUpdate ? "error" : (lanes & 738197653) === lanes ? "tertiary-light" : "primary-light", isSpawnedUpdate = isPingedUpdate ? "Promise Resolved" : isSpawnedUpdate ? "Cascading Update" : 5 < debugTask - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != label && isPingedUpdate.push(["Component name", label]), null != color && isPingedUpdate.push(["Method name", color]), previousRenderStartTime = {
12467 start: previousRenderStartTime,
12468 end: debugTask,
12469 detail: {
12470 devtools: {
12471 properties: isPingedUpdate,
12472 track: currentTrack,
12473 trackGroup: LANES_TRACK_GROUP,
12474 color: eventTime
12475 }
12476 }
12477 }, endTime ? endTime.run(
12478 performance.measure.bind(
12479 performance,
12480 isSpawnedUpdate,
12481 previousRenderStartTime
12482 )
12483 ) : performance.measure(isSpawnedUpdate, previousRenderStartTime));
12484 }
12485 blockingUpdateTime = -1.1;
12486 blockingUpdateType = 0;
12487 blockingUpdateComponentName = blockingUpdateMethodName = null;
12488 blockingSuspendedTime = -1.1;
12489 blockingEventRepeatTime = blockingEventTime;
12490 blockingEventTime = -1.1;
12491 blockingClampTime = now();
12492 }
12493 0 !== (lanes & 4194048) && (workInProgressUpdateTask = transitionUpdateTask, debugTask = 0 <= transitionStartTime && transitionStartTime < transitionClampTime ? transitionClampTime : transitionStartTime, previousRenderStartTime = 0 <= transitionUpdateTime && transitionUpdateTime < transitionClampTime ? transitionClampTime : transitionUpdateTime, endTime = 0 <= transitionEventTime && transitionEventTime < transitionClampTime ? transitionClampTime : transitionEventTime, color = 0 <= endTime ? endTime : 0 <= previousRenderStartTime ? previousRenderStartTime : renderStartTime, 0 <= transitionSuspendedTime ? (setCurrentTrackFromLanes(256), logSuspendedWithDelayPhase(
12494 transitionSuspendedTime,
12495 color,
12496 lanes,
12497 workInProgressUpdateTask
12498 )) : 0 !== (animatingLanes & 4194048) && (setCurrentTrackFromLanes(256), logAnimatingPhase(transitionClampTime, color, animatingTask)), isPingedUpdate = endTime, eventTime = transitionEventType, eventType = 0 < transitionEventRepeatTime, eventIsRepeat = transitionUpdateType === PINGED_UPDATE, color = renderStartTime, endTime = transitionUpdateTask, label = transitionUpdateMethodName, isSpawnedUpdate = transitionUpdateComponentName, supportsUserTiming && (currentTrack = "Transition", 0 < previousRenderStartTime ? previousRenderStartTime > color && (previousRenderStartTime = color) : previousRenderStartTime = color, 0 < debugTask ? debugTask > previousRenderStartTime && (debugTask = previousRenderStartTime) : debugTask = previousRenderStartTime, 0 < isPingedUpdate ? isPingedUpdate > debugTask && (isPingedUpdate = debugTask) : isPingedUpdate = debugTask, debugTask > isPingedUpdate && null !== eventTime && (color$jscomp$0 = eventType ? "secondary-light" : "warning", endTime ? endTime.run(
12499 console.timeStamp.bind(
12500 console,
12501 eventType ? "Consecutive" : "Event: " + eventTime,
12502 isPingedUpdate,
12503 debugTask,
12504 currentTrack,
12505 LANES_TRACK_GROUP,
12506 color$jscomp$0
12507 )
12508 ) : console.timeStamp(
12509 eventType ? "Consecutive" : "Event: " + eventTime,
12510 isPingedUpdate,
12511 debugTask,
12512 currentTrack,
12513 LANES_TRACK_GROUP,
12514 color$jscomp$0
12515 )), previousRenderStartTime > debugTask && (endTime ? endTime.run(
12516 console.timeStamp.bind(
12517 console,
12518 "Action",
12519 debugTask,
12520 previousRenderStartTime,
12521 currentTrack,
12522 LANES_TRACK_GROUP,
12523 "primary-dark"
12524 )
12525 ) : console.timeStamp(
12526 "Action",
12527 debugTask,
12528 previousRenderStartTime,
12529 currentTrack,
12530 LANES_TRACK_GROUP,
12531 "primary-dark"
12532 )), color > previousRenderStartTime && (debugTask = eventIsRepeat ? "Promise Resolved" : 5 < color - previousRenderStartTime ? "Update Blocked" : "Update", isPingedUpdate = [], null != isSpawnedUpdate && isPingedUpdate.push(["Component name", isSpawnedUpdate]), null != label && isPingedUpdate.push(["Method name", label]), previousRenderStartTime = {
12533 start: previousRenderStartTime,
12534 end: color,
12535 detail: {
12536 devtools: {
12537 properties: isPingedUpdate,
12538 track: currentTrack,
12539 trackGroup: LANES_TRACK_GROUP,
12540 color: "primary-light"
12541 }
12542 }
12543 }, endTime ? endTime.run(
12544 performance.measure.bind(
12545 performance,
12546 debugTask,
12547 previousRenderStartTime
12548 )
12549 ) : performance.measure(debugTask, previousRenderStartTime))), transitionUpdateTime = transitionStartTime = -1.1, transitionUpdateType = 0, transitionSuspendedTime = -1.1, transitionEventRepeatTime = transitionEventTime, transitionEventTime = -1.1, transitionClampTime = now());
12550 0 !== (lanes & 62914560) && 0 !== (animatingLanes & 62914560) && (setCurrentTrackFromLanes(4194304), logAnimatingPhase(retryClampTime, renderStartTime, animatingTask));
12551 0 !== (lanes & 2080374784) && 0 !== (animatingLanes & 2080374784) && (setCurrentTrackFromLanes(268435456), logAnimatingPhase(idleClampTime, renderStartTime, animatingTask));
12552 previousRenderStartTime = root2.timeoutHandle;
12553 previousRenderStartTime !== noTimeout && (root2.timeoutHandle = noTimeout, cancelTimeout(previousRenderStartTime));
12554 previousRenderStartTime = root2.cancelPendingCommit;
12555 null !== previousRenderStartTime && (root2.cancelPendingCommit = null, previousRenderStartTime());
12556 pendingEffectsLanes = 0;
12557 resetWorkInProgressStack();
12558 workInProgressRoot = root2;
12559 workInProgress = previousRenderStartTime = createWorkInProgress(
12560 root2.current,
12561 null
12562 );
12563 workInProgressRootRenderLanes = lanes;
12564 workInProgressSuspendedReason = NotSuspended;
12565 workInProgressThrownValue = null;
12566 workInProgressRootDidSkipSuspendedSiblings = false;
12567 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root2, lanes);
12568 workInProgressRootDidAttachPingListener = false;
12569 workInProgressRootExitStatus = RootInProgress;
12570 workInProgressSuspendedRetryLanes = workInProgressDeferredLane = workInProgressRootPingedLanes = workInProgressRootInterleavedUpdatedLanes = workInProgressRootSkippedLanes = 0;
12571 workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors = null;
12572 workInProgressRootDidIncludeRecursiveRenderUpdate = false;
12573 0 !== (lanes & 8) && (lanes |= lanes & 32);
12574 endTime = root2.entangledLanes;
12575 if (0 !== endTime)
12576 for (root2 = root2.entanglements, endTime &= lanes; 0 < endTime; )
12577 debugTask = 31 - clz32(endTime), color = 1 << debugTask, lanes |= root2[debugTask], endTime &= ~color;
12578 entangledRenderLanes = lanes;
12579 finishQueueingConcurrentUpdates();
12580 root2 = getCurrentTime();
12581 1e3 < root2 - lastResetTime && (ReactSharedInternals.recentlyCreatedOwnerStacks = 0, lastResetTime = root2);
12582 ReactStrictModeWarnings.discardPendingWarnings();
12583 return previousRenderStartTime;
12584 }
12585 function handleThrow(root2, thrownValue) {
12586 currentlyRenderingFiber = null;
12587 ReactSharedInternals.H = ContextOnlyDispatcher;
12588 ReactSharedInternals.getCurrentStack = null;
12589 isRendering = false;
12590 current = null;
12591 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;
12592 workInProgressThrownValue = thrownValue;
12593 var erroredWork = workInProgress;
12594 null === erroredWork ? (workInProgressRootExitStatus = RootFatalErrored, logUncaughtError(
12595 root2,
12596 createCapturedValueAtFiber(thrownValue, root2.current)
12597 )) : erroredWork.mode & ProfileMode && stopProfilerTimerIfRunningAndRecordDuration(erroredWork);
12598 }
12599 function shouldRemainOnPreviousScreen() {
12600 var handler = suspenseHandlerStackCursor.current;
12601 return null === handler ? true : (workInProgressRootRenderLanes & 4194048) === workInProgressRootRenderLanes ? null === shellBoundary ? true : false : (workInProgressRootRenderLanes & 62914560) === workInProgressRootRenderLanes || 0 !== (workInProgressRootRenderLanes & 536870912) ? handler === shellBoundary : false;
12602 }
12603 function pushDispatcher() {
12604 var prevDispatcher = ReactSharedInternals.H;
12605 ReactSharedInternals.H = ContextOnlyDispatcher;
12606 return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;
12607 }
12608 function pushAsyncDispatcher() {
12609 var prevAsyncDispatcher = ReactSharedInternals.A;
12610 ReactSharedInternals.A = DefaultAsyncDispatcher;
12611 return prevAsyncDispatcher;
12612 }
12613 function markRenderDerivedCause(fiber) {
12614 null === workInProgressUpdateTask && (workInProgressUpdateTask = null == fiber._debugTask ? null : fiber._debugTask);
12615 }
12616 function renderDidSuspendDelayIfPossible() {
12617 workInProgressRootExitStatus = RootSuspendedWithDelay;
12618 workInProgressRootDidSkipSuspendedSiblings || (workInProgressRootRenderLanes & 4194048) !== workInProgressRootRenderLanes && null !== suspenseHandlerStackCursor.current || (workInProgressRootIsPrerendering = true);
12619 0 === (workInProgressRootSkippedLanes & 134217727) && 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727) || null === workInProgressRoot || markRootSuspended(
12620 workInProgressRoot,
12621 workInProgressRootRenderLanes,
12622 workInProgressDeferredLane,
12623 false
12624 );
12625 }
12626 function renderRootSync(root2, lanes, shouldYieldForPrerendering) {
12627 var prevExecutionContext = executionContext;
12628 executionContext |= RenderContext;
12629 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
12630 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
12631 if (isDevToolsPresent) {
12632 var memoizedUpdaters = root2.memoizedUpdaters;
12633 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
12634 movePendingFibersToMemoized(root2, lanes);
12635 }
12636 workInProgressTransitions = null;
12637 prepareFreshStack(root2, lanes);
12638 }
12639 lanes = false;
12640 memoizedUpdaters = workInProgressRootExitStatus;
12641 a: do
12642 try {
12643 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress) {
12644 var unitOfWork = workInProgress, thrownValue = workInProgressThrownValue;
12645 switch (workInProgressSuspendedReason) {
12646 case SuspendedOnHydration:
12647 resetWorkInProgressStack();
12648 memoizedUpdaters = RootSuspendedAtTheShell;
12649 break a;
12650 case SuspendedOnImmediate:
12651 case SuspendedOnData:
12652 case SuspendedOnAction:
12653 case SuspendedOnDeprecatedThrowPromise:
12654 null === suspenseHandlerStackCursor.current && (lanes = true);
12655 var reason = workInProgressSuspendedReason;
12656 workInProgressSuspendedReason = NotSuspended;
12657 workInProgressThrownValue = null;
12658 throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
12659 if (shouldYieldForPrerendering && workInProgressRootIsPrerendering) {
12660 memoizedUpdaters = RootInProgress;
12661 break a;
12662 }
12663 break;
12664 default:
12665 reason = workInProgressSuspendedReason, workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, reason);
12666 }
12667 }
12668 workLoopSync();
12669 memoizedUpdaters = workInProgressRootExitStatus;
12670 break;
12671 } catch (thrownValue$8) {
12672 handleThrow(root2, thrownValue$8);
12673 }
12674 while (1);
12675 lanes && root2.shellSuspendCounter++;
12676 resetContextDependencies();
12677 executionContext = prevExecutionContext;
12678 ReactSharedInternals.H = prevDispatcher;
12679 ReactSharedInternals.A = prevAsyncDispatcher;
12680 null === workInProgress && (workInProgressRoot = null, workInProgressRootRenderLanes = 0, finishQueueingConcurrentUpdates());
12681 return memoizedUpdaters;
12682 }
12683 function workLoopSync() {
12684 for (; null !== workInProgress; ) performUnitOfWork(workInProgress);
12685 }
12686 function renderRootConcurrent(root2, lanes) {
12687 var prevExecutionContext = executionContext;
12688 executionContext |= RenderContext;
12689 var prevDispatcher = pushDispatcher(), prevAsyncDispatcher = pushAsyncDispatcher();
12690 if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
12691 if (isDevToolsPresent) {
12692 var memoizedUpdaters = root2.memoizedUpdaters;
12693 0 < memoizedUpdaters.size && (restorePendingUpdaters(root2, workInProgressRootRenderLanes), memoizedUpdaters.clear());
12694 movePendingFibersToMemoized(root2, lanes);
12695 }
12696 workInProgressTransitions = null;
12697 workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS;
12698 prepareFreshStack(root2, lanes);
12699 } else
12700 workInProgressRootIsPrerendering = checkIfRootIsPrerendering(
12701 root2,
12702 lanes
12703 );
12704 a: do
12705 try {
12706 if (workInProgressSuspendedReason !== NotSuspended && null !== workInProgress)
12707 b: switch (lanes = workInProgress, memoizedUpdaters = workInProgressThrownValue, workInProgressSuspendedReason) {
12708 case SuspendedOnError:
12709 workInProgressSuspendedReason = NotSuspended;
12710 workInProgressThrownValue = null;
12711 throwAndUnwindWorkLoop(
12712 root2,
12713 lanes,
12714 memoizedUpdaters,
12715 SuspendedOnError
12716 );
12717 break;
12718 case SuspendedOnData:
12719 case SuspendedOnAction:
12720 if (isThenableResolved(memoizedUpdaters)) {
12721 workInProgressSuspendedReason = NotSuspended;
12722 workInProgressThrownValue = null;
12723 replaySuspendedUnitOfWork(lanes);
12724 break;
12725 }
12726 lanes = function() {
12727 workInProgressSuspendedReason !== SuspendedOnData && workInProgressSuspendedReason !== SuspendedOnAction || workInProgressRoot !== root2 || (workInProgressSuspendedReason = SuspendedAndReadyToContinue);
12728 ensureRootIsScheduled(root2);
12729 };
12730 memoizedUpdaters.then(lanes, lanes);
12731 break a;
12732 case SuspendedOnImmediate:
12733 workInProgressSuspendedReason = SuspendedAndReadyToContinue;
12734 break a;
12735 case SuspendedOnInstance:
12736 workInProgressSuspendedReason = SuspendedOnInstanceAndReadyToContinue;
12737 break a;
12738 case SuspendedAndReadyToContinue:
12739 isThenableResolved(memoizedUpdaters) ? (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, replaySuspendedUnitOfWork(lanes)) : (workInProgressSuspendedReason = NotSuspended, workInProgressThrownValue = null, throwAndUnwindWorkLoop(
12740 root2,
12741 lanes,
12742 memoizedUpdaters,
12743 SuspendedAndReadyToContinue
12744 ));
12745 break;
12746 case SuspendedOnInstanceAndReadyToContinue:
12747 var resource = null;
12748 switch (workInProgress.tag) {
12749 case 26:
12750 resource = workInProgress.memoizedState;
12751 case 5:
12752 case 27:
12753 var hostFiber = workInProgress;
12754 if (resource ? preloadResource(resource) : hostFiber.stateNode.complete) {
12755 workInProgressSuspendedReason = NotSuspended;
12756 workInProgressThrownValue = null;
12757 var sibling = hostFiber.sibling;
12758 if (null !== sibling) workInProgress = sibling;
12759 else {
12760 var returnFiber = hostFiber.return;
12761 null !== returnFiber ? (workInProgress = returnFiber, completeUnitOfWork(returnFiber)) : workInProgress = null;
12762 }
12763 break b;
12764 }
12765 break;
12766 default:
12767 console.error(
12768 "Unexpected type of fiber triggered a suspensey commit. This is a bug in React."
12769 );
12770 }
12771 workInProgressSuspendedReason = NotSuspended;
12772 workInProgressThrownValue = null;
12773 throwAndUnwindWorkLoop(
12774 root2,
12775 lanes,
12776 memoizedUpdaters,
12777 SuspendedOnInstanceAndReadyToContinue
12778 );
12779 break;
12780 case SuspendedOnDeprecatedThrowPromise:
12781 workInProgressSuspendedReason = NotSuspended;
12782 workInProgressThrownValue = null;
12783 throwAndUnwindWorkLoop(
12784 root2,
12785 lanes,
12786 memoizedUpdaters,
12787 SuspendedOnDeprecatedThrowPromise
12788 );
12789 break;
12790 case SuspendedOnHydration:
12791 resetWorkInProgressStack();
12792 workInProgressRootExitStatus = RootSuspendedAtTheShell;
12793 break a;
12794 default:
12795 throw Error(
12796 "Unexpected SuspendedReason. This is a bug in React."
12797 );
12798 }
12799 null !== ReactSharedInternals.actQueue ? workLoopSync() : workLoopConcurrentByScheduler();
12800 break;
12801 } catch (thrownValue$9) {
12802 handleThrow(root2, thrownValue$9);
12803 }
12804 while (1);
12805 resetContextDependencies();
12806 ReactSharedInternals.H = prevDispatcher;
12807 ReactSharedInternals.A = prevAsyncDispatcher;
12808 executionContext = prevExecutionContext;
12809 if (null !== workInProgress) return RootInProgress;
12810 workInProgressRoot = null;
12811 workInProgressRootRenderLanes = 0;
12812 finishQueueingConcurrentUpdates();
12813 return workInProgressRootExitStatus;
12814 }
12815 function workLoopConcurrentByScheduler() {
12816 for (; null !== workInProgress && !shouldYield(); )
12817 performUnitOfWork(workInProgress);
12818 }
12819 function performUnitOfWork(unitOfWork) {
12820 var current2 = unitOfWork.alternate;
12821 (unitOfWork.mode & ProfileMode) !== NoMode ? (startProfilerTimer(unitOfWork), current2 = runWithFiberInDEV(
12822 unitOfWork,
12823 beginWork,
12824 current2,
12825 unitOfWork,
12826 entangledRenderLanes
12827 ), stopProfilerTimerIfRunningAndRecordDuration(unitOfWork)) : current2 = runWithFiberInDEV(
12828 unitOfWork,
12829 beginWork,
12830 current2,
12831 unitOfWork,
12832 entangledRenderLanes
12833 );
12834 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12835 null === current2 ? completeUnitOfWork(unitOfWork) : workInProgress = current2;
12836 }
12837 function replaySuspendedUnitOfWork(unitOfWork) {
12838 var next = runWithFiberInDEV(unitOfWork, replayBeginWork, unitOfWork);
12839 unitOfWork.memoizedProps = unitOfWork.pendingProps;
12840 null === next ? completeUnitOfWork(unitOfWork) : workInProgress = next;
12841 }
12842 function replayBeginWork(unitOfWork) {
12843 var current2 = unitOfWork.alternate, isProfilingMode = (unitOfWork.mode & ProfileMode) !== NoMode;
12844 isProfilingMode && startProfilerTimer(unitOfWork);
12845 switch (unitOfWork.tag) {
12846 case 15:
12847 case 0:
12848 current2 = replayFunctionComponent(
12849 current2,
12850 unitOfWork,
12851 unitOfWork.pendingProps,
12852 unitOfWork.type,
12853 void 0,
12854 workInProgressRootRenderLanes
12855 );
12856 break;
12857 case 11:
12858 current2 = replayFunctionComponent(
12859 current2,
12860 unitOfWork,
12861 unitOfWork.pendingProps,
12862 unitOfWork.type.render,
12863 unitOfWork.ref,
12864 workInProgressRootRenderLanes
12865 );
12866 break;
12867 case 5:
12868 resetHooksOnUnwind(unitOfWork);
12869 default:
12870 unwindInterruptedWork(current2, unitOfWork), unitOfWork = workInProgress = resetWorkInProgress(unitOfWork, entangledRenderLanes), current2 = beginWork(current2, unitOfWork, entangledRenderLanes);
12871 }
12872 isProfilingMode && stopProfilerTimerIfRunningAndRecordDuration(unitOfWork);
12873 return current2;
12874 }
12875 function throwAndUnwindWorkLoop(root2, unitOfWork, thrownValue, suspendedReason) {
12876 resetContextDependencies();
12877 resetHooksOnUnwind(unitOfWork);
12878 thenableState$1 = null;
12879 thenableIndexCounter$1 = 0;
12880 var returnFiber = unitOfWork.return;
12881 try {
12882 if (throwException(
12883 root2,
12884 returnFiber,
12885 unitOfWork,
12886 thrownValue,
12887 workInProgressRootRenderLanes
12888 )) {
12889 workInProgressRootExitStatus = RootFatalErrored;
12890 logUncaughtError(
12891 root2,
12892 createCapturedValueAtFiber(thrownValue, root2.current)
12893 );
12894 workInProgress = null;
12895 return;
12896 }
12897 } catch (error) {
12898 if (null !== returnFiber) throw workInProgress = returnFiber, error;
12899 workInProgressRootExitStatus = RootFatalErrored;
12900 logUncaughtError(
12901 root2,
12902 createCapturedValueAtFiber(thrownValue, root2.current)
12903 );
12904 workInProgress = null;
12905 return;
12906 }
12907 if (unitOfWork.flags & 32768) {
12908 if (isHydrating || suspendedReason === SuspendedOnError) root2 = true;
12909 else if (workInProgressRootIsPrerendering || 0 !== (workInProgressRootRenderLanes & 536870912))
12910 root2 = false;
12911 else if (workInProgressRootDidSkipSuspendedSiblings = root2 = true, suspendedReason === SuspendedOnData || suspendedReason === SuspendedOnAction || suspendedReason === SuspendedOnImmediate || suspendedReason === SuspendedOnDeprecatedThrowPromise)
12912 suspendedReason = suspenseHandlerStackCursor.current, null !== suspendedReason && 13 === suspendedReason.tag && (suspendedReason.flags |= 16384);
12913 unwindUnitOfWork(unitOfWork, root2);
12914 } else completeUnitOfWork(unitOfWork);
12915 }
12916 function completeUnitOfWork(unitOfWork) {
12917 var completedWork = unitOfWork;
12918 do {
12919 if (0 !== (completedWork.flags & 32768)) {
12920 unwindUnitOfWork(
12921 completedWork,
12922 workInProgressRootDidSkipSuspendedSiblings
12923 );
12924 return;
12925 }
12926 var current2 = completedWork.alternate;
12927 unitOfWork = completedWork.return;
12928 startProfilerTimer(completedWork);
12929 current2 = runWithFiberInDEV(
12930 completedWork,
12931 completeWork,
12932 current2,
12933 completedWork,
12934 entangledRenderLanes
12935 );
12936 (completedWork.mode & ProfileMode) !== NoMode && stopProfilerTimerIfRunningAndRecordIncompleteDuration(completedWork);
12937 if (null !== current2) {
12938 workInProgress = current2;
12939 return;
12940 }
12941 completedWork = completedWork.sibling;
12942 if (null !== completedWork) {
12943 workInProgress = completedWork;
12944 return;
12945 }
12946 workInProgress = completedWork = unitOfWork;
12947 } while (null !== completedWork);
12948 workInProgressRootExitStatus === RootInProgress && (workInProgressRootExitStatus = RootCompleted);
12949 }
12950 function unwindUnitOfWork(unitOfWork, skipSiblings) {
12951 do {
12952 var next = unwindWork(unitOfWork.alternate, unitOfWork);
12953 if (null !== next) {
12954 next.flags &= 32767;
12955 workInProgress = next;
12956 return;
12957 }
12958 if ((unitOfWork.mode & ProfileMode) !== NoMode) {
12959 stopProfilerTimerIfRunningAndRecordIncompleteDuration(unitOfWork);
12960 next = unitOfWork.actualDuration;
12961 for (var child = unitOfWork.child; null !== child; )
12962 next += child.actualDuration, child = child.sibling;
12963 unitOfWork.actualDuration = next;
12964 }
12965 next = unitOfWork.return;
12966 null !== next && (next.flags |= 32768, next.subtreeFlags = 0, next.deletions = null);
12967 if (!skipSiblings && (unitOfWork = unitOfWork.sibling, null !== unitOfWork)) {
12968 workInProgress = unitOfWork;
12969 return;
12970 }
12971 workInProgress = unitOfWork = next;
12972 } while (null !== unitOfWork);
12973 workInProgressRootExitStatus = RootSuspendedAtTheShell;
12974 workInProgress = null;
12975 }
12976 function commitRoot(root2, finishedWork, lanes, recoverableErrors, transitions, didIncludeRenderPhaseUpdate, spawnedLane, updatedLanes, suspendedRetryLanes, exitStatus, suspendedState, suspendedCommitReason, completedRenderStartTime, completedRenderEndTime) {
12977 root2.cancelPendingCommit = null;
12978 do
12979 flushPendingEffects();
12980 while (pendingEffectsStatus !== NO_PENDING_EFFECTS);
12981 ReactStrictModeWarnings.flushLegacyContextWarning();
12982 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
12983 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
12984 throw Error("Should not already be working.");
12985 setCurrentTrackFromLanes(lanes);
12986 exitStatus === RootErrored ? logErroredRenderPhase(
12987 completedRenderStartTime,
12988 completedRenderEndTime,
12989 lanes,
12990 workInProgressUpdateTask
12991 ) : null !== recoverableErrors ? logRecoveredRenderPhase(
12992 completedRenderStartTime,
12993 completedRenderEndTime,
12994 lanes,
12995 recoverableErrors,
12996 null !== finishedWork && null !== finishedWork.alternate && finishedWork.alternate.memoizedState.isDehydrated && 0 !== (finishedWork.flags & 256),
12997 workInProgressUpdateTask
12998 ) : logRenderPhase(
12999 completedRenderStartTime,
13000 completedRenderEndTime,
13001 lanes,
13002 workInProgressUpdateTask
13003 );
13004 if (null !== finishedWork) {
13005 0 === lanes && console.error(
13006 "finishedLanes should not be empty during a commit. This is a bug in React."
13007 );
13008 if (finishedWork === root2.current)
13009 throw Error(
13010 "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue."
13011 );
13012 didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;
13013 didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;
13014 markRootFinished(
13015 root2,
13016 lanes,
13017 didIncludeRenderPhaseUpdate,
13018 spawnedLane,
13019 updatedLanes,
13020 suspendedRetryLanes
13021 );
13022 root2 === workInProgressRoot && (workInProgress = workInProgressRoot = null, workInProgressRootRenderLanes = 0);
13023 pendingFinishedWork = finishedWork;
13024 pendingEffectsRoot = root2;
13025 pendingEffectsLanes = lanes;
13026 pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;
13027 pendingPassiveTransitions = transitions;
13028 pendingRecoverableErrors = recoverableErrors;
13029 pendingEffectsRenderEndTime = completedRenderEndTime;
13030 pendingSuspendedCommitReason = suspendedCommitReason;
13031 pendingDelayedCommitReason = IMMEDIATE_COMMIT;
13032 pendingSuspendedViewTransitionReason = null;
13033 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256) ? (root2.callbackNode = null, root2.callbackPriority = 0, scheduleCallback$1(NormalPriority$1, function() {
13034 schedulerEvent = window.event;
13035 pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
13036 flushPassiveEffects();
13037 return null;
13038 })) : (root2.callbackNode = null, root2.callbackPriority = 0);
13039 commitErrors = null;
13040 commitStartTime = now();
13041 null !== suspendedCommitReason && logSuspendedCommitPhase(
13042 completedRenderEndTime,
13043 commitStartTime,
13044 suspendedCommitReason,
13045 workInProgressUpdateTask
13046 );
13047 recoverableErrors = 0 !== (finishedWork.flags & 13878);
13048 if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {
13049 recoverableErrors = ReactSharedInternals.T;
13050 ReactSharedInternals.T = null;
13051 transitions = ReactDOMSharedInternals.p;
13052 ReactDOMSharedInternals.p = DiscreteEventPriority;
13053 spawnedLane = executionContext;
13054 executionContext |= CommitContext;
13055 try {
13056 commitBeforeMutationEffects(root2, finishedWork, lanes);
13057 } finally {
13058 executionContext = spawnedLane, ReactDOMSharedInternals.p = transitions, ReactSharedInternals.T = recoverableErrors;
13059 }
13060 }
13061 pendingEffectsStatus = PENDING_MUTATION_PHASE;
13062 flushMutationEffects();
13063 flushLayoutEffects();
13064 flushSpawnedWork();
13065 }
13066 }
13067 function flushMutationEffects() {
13068 if (pendingEffectsStatus === PENDING_MUTATION_PHASE) {
13069 pendingEffectsStatus = NO_PENDING_EFFECTS;
13070 var root2 = pendingEffectsRoot, finishedWork = pendingFinishedWork, lanes = pendingEffectsLanes, rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);
13071 if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {
13072 rootMutationHasEffect = ReactSharedInternals.T;
13073 ReactSharedInternals.T = null;
13074 var previousPriority = ReactDOMSharedInternals.p;
13075 ReactDOMSharedInternals.p = DiscreteEventPriority;
13076 var prevExecutionContext = executionContext;
13077 executionContext |= CommitContext;
13078 try {
13079 inProgressLanes = lanes;
13080 inProgressRoot = root2;
13081 resetComponentEffectTimers();
13082 commitMutationEffectsOnFiber(finishedWork, root2);
13083 inProgressRoot = inProgressLanes = null;
13084 lanes = selectionInformation;
13085 var curFocusedElem = getActiveElementDeep(root2.containerInfo), priorFocusedElem = lanes.focusedElem, priorSelectionRange = lanes.selectionRange;
13086 if (curFocusedElem !== priorFocusedElem && priorFocusedElem && priorFocusedElem.ownerDocument && containsNode(
13087 priorFocusedElem.ownerDocument.documentElement,
13088 priorFocusedElem
13089 )) {
13090 if (null !== priorSelectionRange && hasSelectionCapabilities(priorFocusedElem)) {
13091 var start = priorSelectionRange.start, end = priorSelectionRange.end;
13092 void 0 === end && (end = start);
13093 if ("selectionStart" in priorFocusedElem)
13094 priorFocusedElem.selectionStart = start, priorFocusedElem.selectionEnd = Math.min(
13095 end,
13096 priorFocusedElem.value.length
13097 );
13098 else {
13099 var doc = priorFocusedElem.ownerDocument || document, win = doc && doc.defaultView || window;
13100 if (win.getSelection) {
13101 var selection = win.getSelection(), length = priorFocusedElem.textContent.length, start$jscomp$0 = Math.min(
13102 priorSelectionRange.start,
13103 length
13104 ), end$jscomp$0 = void 0 === priorSelectionRange.end ? start$jscomp$0 : Math.min(priorSelectionRange.end, length);
13105 !selection.extend && start$jscomp$0 > end$jscomp$0 && (curFocusedElem = end$jscomp$0, end$jscomp$0 = start$jscomp$0, start$jscomp$0 = curFocusedElem);
13106 var startMarker = getNodeForCharacterOffset(
13107 priorFocusedElem,
13108 start$jscomp$0
13109 ), endMarker = getNodeForCharacterOffset(
13110 priorFocusedElem,
13111 end$jscomp$0
13112 );
13113 if (startMarker && endMarker && (1 !== selection.rangeCount || selection.anchorNode !== startMarker.node || selection.anchorOffset !== startMarker.offset || selection.focusNode !== endMarker.node || selection.focusOffset !== endMarker.offset)) {
13114 var range = doc.createRange();
13115 range.setStart(startMarker.node, startMarker.offset);
13116 selection.removeAllRanges();
13117 start$jscomp$0 > end$jscomp$0 ? (selection.addRange(range), selection.extend(endMarker.node, endMarker.offset)) : (range.setEnd(endMarker.node, endMarker.offset), selection.addRange(range));
13118 }
13119 }
13120 }
13121 }
13122 doc = [];
13123 for (selection = priorFocusedElem; selection = selection.parentNode; )
13124 1 === selection.nodeType && doc.push({
13125 element: selection,
13126 left: selection.scrollLeft,
13127 top: selection.scrollTop
13128 });
13129 "function" === typeof priorFocusedElem.focus && priorFocusedElem.focus();
13130 for (priorFocusedElem = 0; priorFocusedElem < doc.length; priorFocusedElem++) {
13131 var info = doc[priorFocusedElem];
13132 info.element.scrollLeft = info.left;
13133 info.element.scrollTop = info.top;
13134 }
13135 }
13136 _enabled = !!eventsEnabled;
13137 selectionInformation = eventsEnabled = null;
13138 } finally {
13139 executionContext = prevExecutionContext, ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = rootMutationHasEffect;
13140 }
13141 }
13142 root2.current = finishedWork;
13143 pendingEffectsStatus = PENDING_LAYOUT_PHASE;
13144 }
13145 }
13146 function flushLayoutEffects() {
13147 if (pendingEffectsStatus === PENDING_LAYOUT_PHASE) {
13148 pendingEffectsStatus = NO_PENDING_EFFECTS;
13149 var suspendedViewTransitionReason = pendingSuspendedViewTransitionReason;
13150 if (null !== suspendedViewTransitionReason) {
13151 commitStartTime = now();
13152 var startTime = commitEndTime, endTime = commitStartTime;
13153 !supportsUserTiming || endTime <= startTime || (animatingTask ? animatingTask.run(
13154 console.timeStamp.bind(
13155 console,
13156 suspendedViewTransitionReason,
13157 startTime,
13158 endTime,
13159 currentTrack,
13160 LANES_TRACK_GROUP,
13161 "secondary-light"
13162 )
13163 ) : console.timeStamp(
13164 suspendedViewTransitionReason,
13165 startTime,
13166 endTime,
13167 currentTrack,
13168 LANES_TRACK_GROUP,
13169 "secondary-light"
13170 ));
13171 }
13172 suspendedViewTransitionReason = pendingEffectsRoot;
13173 startTime = pendingFinishedWork;
13174 endTime = pendingEffectsLanes;
13175 var rootHasLayoutEffect = 0 !== (startTime.flags & 8772);
13176 if (0 !== (startTime.subtreeFlags & 8772) || rootHasLayoutEffect) {
13177 rootHasLayoutEffect = ReactSharedInternals.T;
13178 ReactSharedInternals.T = null;
13179 var _previousPriority = ReactDOMSharedInternals.p;
13180 ReactDOMSharedInternals.p = DiscreteEventPriority;
13181 var _prevExecutionContext = executionContext;
13182 executionContext |= CommitContext;
13183 try {
13184 inProgressLanes = endTime, inProgressRoot = suspendedViewTransitionReason, resetComponentEffectTimers(), commitLayoutEffectOnFiber(
13185 suspendedViewTransitionReason,
13186 startTime.alternate,
13187 startTime
13188 ), inProgressRoot = inProgressLanes = null;
13189 } finally {
13190 executionContext = _prevExecutionContext, ReactDOMSharedInternals.p = _previousPriority, ReactSharedInternals.T = rootHasLayoutEffect;
13191 }
13192 }
13193 suspendedViewTransitionReason = pendingEffectsRenderEndTime;
13194 startTime = pendingSuspendedCommitReason;
13195 commitEndTime = now();
13196 suspendedViewTransitionReason = null === startTime ? suspendedViewTransitionReason : commitStartTime;
13197 startTime = commitEndTime;
13198 endTime = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
13199 rootHasLayoutEffect = workInProgressUpdateTask;
13200 null !== commitErrors ? logCommitErrored(
13201 suspendedViewTransitionReason,
13202 startTime,
13203 commitErrors,
13204 false,
13205 rootHasLayoutEffect
13206 ) : !supportsUserTiming || startTime <= suspendedViewTransitionReason || (rootHasLayoutEffect ? rootHasLayoutEffect.run(
13207 console.timeStamp.bind(
13208 console,
13209 endTime ? "Commit Interrupted View Transition" : "Commit",
13210 suspendedViewTransitionReason,
13211 startTime,
13212 currentTrack,
13213 LANES_TRACK_GROUP,
13214 endTime ? "error" : "secondary-dark"
13215 )
13216 ) : console.timeStamp(
13217 endTime ? "Commit Interrupted View Transition" : "Commit",
13218 suspendedViewTransitionReason,
13219 startTime,
13220 currentTrack,
13221 LANES_TRACK_GROUP,
13222 endTime ? "error" : "secondary-dark"
13223 ));
13224 pendingEffectsStatus = PENDING_AFTER_MUTATION_PHASE;
13225 }
13226 }
13227 function flushSpawnedWork() {
13228 if (pendingEffectsStatus === PENDING_SPAWNED_WORK || pendingEffectsStatus === PENDING_AFTER_MUTATION_PHASE) {
13229 if (pendingEffectsStatus === PENDING_SPAWNED_WORK) {
13230 var startViewTransitionStartTime = commitEndTime;
13231 commitEndTime = now();
13232 var endTime = commitEndTime, abortedViewTransition = pendingDelayedCommitReason === ABORTED_VIEW_TRANSITION_COMMIT;
13233 !supportsUserTiming || endTime <= startViewTransitionStartTime || (animatingTask ? animatingTask.run(
13234 console.timeStamp.bind(
13235 console,
13236 abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
13237 startViewTransitionStartTime,
13238 endTime,
13239 currentTrack,
13240 LANES_TRACK_GROUP,
13241 abortedViewTransition ? "error" : "secondary-light"
13242 )
13243 ) : console.timeStamp(
13244 abortedViewTransition ? "Interrupted View Transition" : "Starting Animation",
13245 startViewTransitionStartTime,
13246 endTime,
13247 currentTrack,
13248 LANES_TRACK_GROUP,
13249 abortedViewTransition ? " error" : "secondary-light"
13250 ));
13251 pendingDelayedCommitReason !== ABORTED_VIEW_TRANSITION_COMMIT && (pendingDelayedCommitReason = ANIMATION_STARTED_COMMIT);
13252 }
13253 pendingEffectsStatus = NO_PENDING_EFFECTS;
13254 requestPaint();
13255 startViewTransitionStartTime = pendingEffectsRoot;
13256 var finishedWork = pendingFinishedWork;
13257 endTime = pendingEffectsLanes;
13258 abortedViewTransition = pendingRecoverableErrors;
13259 var rootDidHavePassiveEffects = 0 !== finishedWork.actualDuration || 0 !== (finishedWork.subtreeFlags & 10256) || 0 !== (finishedWork.flags & 10256);
13260 rootDidHavePassiveEffects ? pendingEffectsStatus = PENDING_PASSIVE_PHASE : (pendingEffectsStatus = NO_PENDING_EFFECTS, pendingFinishedWork = pendingEffectsRoot = null, releaseRootPooledCache(
13261 startViewTransitionStartTime,
13262 startViewTransitionStartTime.pendingLanes
13263 ), nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = null);
13264 var remainingLanes = startViewTransitionStartTime.pendingLanes;
13265 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);
13266 rootDidHavePassiveEffects || commitDoubleInvokeEffectsInDEV(startViewTransitionStartTime);
13267 remainingLanes = lanesToEventPriority(endTime);
13268 finishedWork = finishedWork.stateNode;
13269 if (injectedHook && "function" === typeof injectedHook.onCommitFiberRoot)
13270 try {
13271 var didError = 128 === (finishedWork.current.flags & 128);
13272 switch (remainingLanes) {
13273 case DiscreteEventPriority:
13274 var schedulerPriority = ImmediatePriority;
13275 break;
13276 case ContinuousEventPriority:
13277 schedulerPriority = UserBlockingPriority;
13278 break;
13279 case DefaultEventPriority:
13280 schedulerPriority = NormalPriority$1;
13281 break;
13282 case IdleEventPriority:
13283 schedulerPriority = IdlePriority;
13284 break;
13285 default:
13286 schedulerPriority = NormalPriority$1;
13287 }
13288 injectedHook.onCommitFiberRoot(
13289 rendererID,
13290 finishedWork,
13291 schedulerPriority,
13292 didError
13293 );
13294 } catch (err) {
13295 hasLoggedError || (hasLoggedError = true, console.error(
13296 "React instrumentation encountered an error: %o",
13297 err
13298 ));
13299 }
13300 isDevToolsPresent && startViewTransitionStartTime.memoizedUpdaters.clear();
13301 onCommitRoot();
13302 if (null !== abortedViewTransition) {
13303 didError = ReactSharedInternals.T;
13304 schedulerPriority = ReactDOMSharedInternals.p;
13305 ReactDOMSharedInternals.p = DiscreteEventPriority;
13306 ReactSharedInternals.T = null;
13307 try {
13308 var onRecoverableError = startViewTransitionStartTime.onRecoverableError;
13309 for (finishedWork = 0; finishedWork < abortedViewTransition.length; finishedWork++) {
13310 var recoverableError = abortedViewTransition[finishedWork], errorInfo = makeErrorInfo(recoverableError.stack);
13311 runWithFiberInDEV(
13312 recoverableError.source,
13313 onRecoverableError,
13314 recoverableError.value,
13315 errorInfo
13316 );
13317 }
13318 } finally {
13319 ReactSharedInternals.T = didError, ReactDOMSharedInternals.p = schedulerPriority;
13320 }
13321 }
13322 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();
13323 ensureRootIsScheduled(startViewTransitionStartTime);
13324 remainingLanes = startViewTransitionStartTime.pendingLanes;
13325 0 !== (endTime & 261930) && 0 !== (remainingLanes & 42) ? (nestedUpdateScheduled = true, startViewTransitionStartTime === rootWithNestedUpdates ? nestedUpdateCount++ : (nestedUpdateCount = 0, rootWithNestedUpdates = startViewTransitionStartTime)) : nestedUpdateCount = 0;
13326 rootDidHavePassiveEffects || finalizeRender(endTime, commitEndTime);
13327 flushSyncWorkAcrossRoots_impl(0, false);
13328 }
13329 }
13330 function makeErrorInfo(componentStack) {
13331 componentStack = { componentStack };
13332 Object.defineProperty(componentStack, "digest", {
13333 get: function() {
13334 console.error(
13335 '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.'
13336 );
13337 }
13338 });
13339 return componentStack;
13340 }
13341 function releaseRootPooledCache(root2, remainingLanes) {
13342 0 === (root2.pooledCacheLanes &= remainingLanes) && (remainingLanes = root2.pooledCache, null != remainingLanes && (root2.pooledCache = null, releaseCache(remainingLanes)));
13343 }
13344 function flushPendingEffects() {
13345 flushMutationEffects();
13346 flushLayoutEffects();
13347 flushSpawnedWork();
13348 return flushPassiveEffects();
13349 }
13350 function flushPassiveEffects() {
13351 if (pendingEffectsStatus !== PENDING_PASSIVE_PHASE) return false;
13352 var root2 = pendingEffectsRoot, remainingLanes = pendingEffectsRemainingLanes;
13353 pendingEffectsRemainingLanes = 0;
13354 var renderPriority = lanesToEventPriority(pendingEffectsLanes), priority = 0 === DefaultEventPriority || DefaultEventPriority > renderPriority ? DefaultEventPriority : renderPriority;
13355 renderPriority = ReactSharedInternals.T;
13356 var previousPriority = ReactDOMSharedInternals.p;
13357 try {
13358 ReactDOMSharedInternals.p = priority;
13359 ReactSharedInternals.T = null;
13360 var transitions = pendingPassiveTransitions;
13361 pendingPassiveTransitions = null;
13362 priority = pendingEffectsRoot;
13363 var lanes = pendingEffectsLanes;
13364 pendingEffectsStatus = NO_PENDING_EFFECTS;
13365 pendingFinishedWork = pendingEffectsRoot = null;
13366 pendingEffectsLanes = 0;
13367 if ((executionContext & (RenderContext | CommitContext)) !== NoContext)
13368 throw Error("Cannot flush passive effects while already rendering.");
13369 setCurrentTrackFromLanes(lanes);
13370 isFlushingPassiveEffects = true;
13371 didScheduleUpdateDuringPassiveEffects = false;
13372 var passiveEffectStartTime = 0;
13373 commitErrors = null;
13374 passiveEffectStartTime = now$1();
13375 if (pendingDelayedCommitReason === ANIMATION_STARTED_COMMIT)
13376 logAnimatingPhase(
13377 commitEndTime,
13378 passiveEffectStartTime,
13379 animatingTask
13380 );
13381 else {
13382 var startTime = commitEndTime, endTime = passiveEffectStartTime, delayedUntilPaint = pendingDelayedCommitReason === DELAYED_PASSIVE_COMMIT;
13383 !supportsUserTiming || endTime <= startTime || (workInProgressUpdateTask ? workInProgressUpdateTask.run(
13384 console.timeStamp.bind(
13385 console,
13386 delayedUntilPaint ? "Waiting for Paint" : "Waiting",
13387 startTime,
13388 endTime,
13389 currentTrack,
13390 LANES_TRACK_GROUP,
13391 "secondary-light"
13392 )
13393 ) : console.timeStamp(
13394 delayedUntilPaint ? "Waiting for Paint" : "Waiting",
13395 startTime,
13396 endTime,
13397 currentTrack,
13398 LANES_TRACK_GROUP,
13399 "secondary-light"
13400 ));
13401 }
13402 startTime = executionContext;
13403 executionContext |= CommitContext;
13404 var finishedWork = priority.current;
13405 resetComponentEffectTimers();
13406 commitPassiveUnmountOnFiber(finishedWork);
13407 var finishedWork$jscomp$0 = priority.current;
13408 finishedWork = pendingEffectsRenderEndTime;
13409 resetComponentEffectTimers();
13410 commitPassiveMountOnFiber(
13411 priority,
13412 finishedWork$jscomp$0,
13413 lanes,
13414 transitions,
13415 finishedWork
13416 );
13417 commitDoubleInvokeEffectsInDEV(priority);
13418 executionContext = startTime;
13419 var passiveEffectsEndTime = now$1();
13420 finishedWork$jscomp$0 = passiveEffectStartTime;
13421 finishedWork = workInProgressUpdateTask;
13422 null !== commitErrors ? logCommitErrored(
13423 finishedWork$jscomp$0,
13424 passiveEffectsEndTime,
13425 commitErrors,
13426 true,
13427 finishedWork
13428 ) : !supportsUserTiming || passiveEffectsEndTime <= finishedWork$jscomp$0 || (finishedWork ? finishedWork.run(
13429 console.timeStamp.bind(
13430 console,
13431 "Remaining Effects",
13432 finishedWork$jscomp$0,
13433 passiveEffectsEndTime,
13434 currentTrack,
13435 LANES_TRACK_GROUP,
13436 "secondary-dark"
13437 )
13438 ) : console.timeStamp(
13439 "Remaining Effects",
13440 finishedWork$jscomp$0,
13441 passiveEffectsEndTime,
13442 currentTrack,
13443 LANES_TRACK_GROUP,
13444 "secondary-dark"
13445 ));
13446 finalizeRender(lanes, passiveEffectsEndTime);
13447 flushSyncWorkAcrossRoots_impl(0, false);
13448 didScheduleUpdateDuringPassiveEffects ? priority === rootWithPassiveNestedUpdates ? nestedPassiveUpdateCount++ : (nestedPassiveUpdateCount = 0, rootWithPassiveNestedUpdates = priority) : nestedPassiveUpdateCount = 0;
13449 didScheduleUpdateDuringPassiveEffects = isFlushingPassiveEffects = false;
13450 if (injectedHook && "function" === typeof injectedHook.onPostCommitFiberRoot)
13451 try {
13452 injectedHook.onPostCommitFiberRoot(rendererID, priority);
13453 } catch (err) {
13454 hasLoggedError || (hasLoggedError = true, console.error(
13455 "React instrumentation encountered an error: %o",
13456 err
13457 ));
13458 }
13459 var stateNode = priority.current.stateNode;
13460 stateNode.effectDuration = 0;
13461 stateNode.passiveEffectDuration = 0;
13462 return true;
13463 } finally {
13464 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = renderPriority, releaseRootPooledCache(root2, remainingLanes);
13465 }
13466 }
13467 function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
13468 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
13469 recordEffectError(sourceFiber);
13470 sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);
13471 rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);
13472 null !== rootFiber && (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));
13473 }
13474 function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {
13475 isRunningInsertionEffect = false;
13476 if (3 === sourceFiber.tag)
13477 captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
13478 else {
13479 for (; null !== nearestMountedAncestor; ) {
13480 if (3 === nearestMountedAncestor.tag) {
13481 captureCommitPhaseErrorOnRoot(
13482 nearestMountedAncestor,
13483 sourceFiber,
13484 error
13485 );
13486 return;
13487 }
13488 if (1 === nearestMountedAncestor.tag) {
13489 var instance = nearestMountedAncestor.stateNode;
13490 if ("function" === typeof nearestMountedAncestor.type.getDerivedStateFromError || "function" === typeof instance.componentDidCatch && (null === legacyErrorBoundariesThatAlreadyFailed || !legacyErrorBoundariesThatAlreadyFailed.has(instance))) {
13491 sourceFiber = createCapturedValueAtFiber(error, sourceFiber);
13492 recordEffectError(sourceFiber);
13493 error = createClassErrorUpdate(2);
13494 instance = enqueueUpdate(nearestMountedAncestor, error, 2);
13495 null !== instance && (initializeClassErrorUpdate(
13496 error,
13497 instance,
13498 nearestMountedAncestor,
13499 sourceFiber
13500 ), markRootUpdated$1(instance, 2), ensureRootIsScheduled(instance));
13501 return;
13502 }
13503 }
13504 nearestMountedAncestor = nearestMountedAncestor.return;
13505 }
13506 console.error(
13507 "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",
13508 error
13509 );
13510 }
13511 }
13512 function attachPingListener(root2, wakeable, lanes) {
13513 var pingCache = root2.pingCache;
13514 if (null === pingCache) {
13515 pingCache = root2.pingCache = new PossiblyWeakMap();
13516 var threadIDs = /* @__PURE__ */ new Set();
13517 pingCache.set(wakeable, threadIDs);
13518 } else
13519 threadIDs = pingCache.get(wakeable), void 0 === threadIDs && (threadIDs = /* @__PURE__ */ new Set(), pingCache.set(wakeable, threadIDs));
13520 threadIDs.has(lanes) || (workInProgressRootDidAttachPingListener = true, threadIDs.add(lanes), pingCache = pingSuspendedRoot.bind(null, root2, wakeable, lanes), isDevToolsPresent && restorePendingUpdaters(root2, lanes), wakeable.then(pingCache, pingCache));
13521 }
13522 function pingSuspendedRoot(root2, wakeable, pingedLanes) {
13523 var pingCache = root2.pingCache;
13524 null !== pingCache && pingCache.delete(wakeable);
13525 root2.pingedLanes |= root2.suspendedLanes & pingedLanes;
13526 root2.warmLanes &= ~pingedLanes;
13527 0 !== (pingedLanes & 127) ? 0 > blockingUpdateTime && (blockingClampTime = blockingUpdateTime = now(), blockingUpdateTask = createTask("Promise Resolved"), blockingUpdateType = PINGED_UPDATE) : 0 !== (pingedLanes & 4194048) && 0 > transitionUpdateTime && (transitionClampTime = transitionUpdateTime = now(), transitionUpdateTask = createTask("Promise Resolved"), transitionUpdateType = PINGED_UPDATE);
13528 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && console.error(
13529 "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"
13530 );
13531 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));
13532 ensureRootIsScheduled(root2);
13533 }
13534 function retryTimedOutBoundary(boundaryFiber, retryLane) {
13535 0 === retryLane && (retryLane = claimNextRetryLane());
13536 boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
13537 null !== boundaryFiber && (markRootUpdated$1(boundaryFiber, retryLane), ensureRootIsScheduled(boundaryFiber));
13538 }
13539 function retryDehydratedSuspenseBoundary(boundaryFiber) {
13540 var suspenseState = boundaryFiber.memoizedState, retryLane = 0;
13541 null !== suspenseState && (retryLane = suspenseState.retryLane);
13542 retryTimedOutBoundary(boundaryFiber, retryLane);
13543 }
13544 function resolveRetryWakeable(boundaryFiber, wakeable) {
13545 var retryLane = 0;
13546 switch (boundaryFiber.tag) {
13547 case 31:
13548 case 13:
13549 var retryCache = boundaryFiber.stateNode;
13550 var suspenseState = boundaryFiber.memoizedState;
13551 null !== suspenseState && (retryLane = suspenseState.retryLane);
13552 break;
13553 case 19:
13554 retryCache = boundaryFiber.stateNode;
13555 break;
13556 case 22:
13557 retryCache = boundaryFiber.stateNode._retryCache;
13558 break;
13559 default:
13560 throw Error(
13561 "Pinged unknown suspense boundary type. This is probably a bug in React."
13562 );
13563 }
13564 null !== retryCache && retryCache.delete(wakeable);
13565 retryTimedOutBoundary(boundaryFiber, retryLane);
13566 }
13567 function recursivelyTraverseAndDoubleInvokeEffectsInDEV(root$jscomp$0, parentFiber, isInStrictMode) {
13568 if (0 !== (parentFiber.subtreeFlags & 67117056))
13569 for (parentFiber = parentFiber.child; null !== parentFiber; ) {
13570 var root2 = root$jscomp$0, fiber = parentFiber, isStrictModeFiber = fiber.type === REACT_STRICT_MODE_TYPE;
13571 isStrictModeFiber = isInStrictMode || isStrictModeFiber;
13572 22 !== fiber.tag ? fiber.flags & 67108864 ? isStrictModeFiber && runWithFiberInDEV(
13573 fiber,
13574 doubleInvokeEffectsOnFiber,
13575 root2,
13576 fiber
13577 ) : recursivelyTraverseAndDoubleInvokeEffectsInDEV(
13578 root2,
13579 fiber,
13580 isStrictModeFiber
13581 ) : null === fiber.memoizedState && (isStrictModeFiber && fiber.flags & 8192 ? runWithFiberInDEV(
13582 fiber,
13583 doubleInvokeEffectsOnFiber,
13584 root2,
13585 fiber
13586 ) : fiber.subtreeFlags & 67108864 && runWithFiberInDEV(
13587 fiber,
13588 recursivelyTraverseAndDoubleInvokeEffectsInDEV,
13589 root2,
13590 fiber,
13591 isStrictModeFiber
13592 ));
13593 parentFiber = parentFiber.sibling;
13594 }
13595 }
13596 function doubleInvokeEffectsOnFiber(root2, fiber) {
13597 setIsStrictModeForDevtools(true);
13598 try {
13599 disappearLayoutEffects(fiber), disconnectPassiveEffect(fiber), reappearLayoutEffects(root2, fiber.alternate, fiber, false), reconnectPassiveEffects(root2, fiber, 0, null, false, 0);
13600 } finally {
13601 setIsStrictModeForDevtools(false);
13602 }
13603 }
13604 function commitDoubleInvokeEffectsInDEV(root2) {
13605 var doubleInvokeEffects = true;
13606 root2.current.mode & (StrictLegacyMode | StrictEffectsMode) || (doubleInvokeEffects = false);
13607 recursivelyTraverseAndDoubleInvokeEffectsInDEV(
13608 root2,
13609 root2.current,
13610 doubleInvokeEffects
13611 );
13612 }
13613 function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
13614 if ((executionContext & RenderContext) === NoContext) {
13615 var tag = fiber.tag;
13616 if (3 === tag || 1 === tag || 0 === tag || 11 === tag || 14 === tag || 15 === tag) {
13617 tag = getComponentNameFromFiber(fiber) || "ReactComponent";
13618 if (null !== didWarnStateUpdateForNotYetMountedComponent) {
13619 if (didWarnStateUpdateForNotYetMountedComponent.has(tag)) return;
13620 didWarnStateUpdateForNotYetMountedComponent.add(tag);
13621 } else didWarnStateUpdateForNotYetMountedComponent = /* @__PURE__ */ new Set([tag]);
13622 runWithFiberInDEV(fiber, function() {
13623 console.error(
13624 "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 tries to update the component. Move this work to useEffect instead."
13625 );
13626 });
13627 }
13628 }
13629 }
13630 function restorePendingUpdaters(root2, lanes) {
13631 isDevToolsPresent && root2.memoizedUpdaters.forEach(function(schedulingFiber) {
13632 addFiberToLanesMap(root2, schedulingFiber, lanes);
13633 });
13634 }
13635 function scheduleCallback$1(priorityLevel, callback) {
13636 var actQueue = ReactSharedInternals.actQueue;
13637 return null !== actQueue ? (actQueue.push(callback), fakeActCallbackNode$1) : scheduleCallback$3(priorityLevel, callback);
13638 }
13639 function warnIfUpdatesNotWrappedWithActDEV(fiber) {
13640 isConcurrentActEnvironment() && null === ReactSharedInternals.actQueue && runWithFiberInDEV(fiber, function() {
13641 console.error(
13642 "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",
13643 getComponentNameFromFiber(fiber)
13644 );
13645 });
13646 }
13647 function ensureRootIsScheduled(root2) {
13648 root2 !== lastScheduledRoot && null === root2.next && (null === lastScheduledRoot ? firstScheduledRoot = lastScheduledRoot = root2 : lastScheduledRoot = lastScheduledRoot.next = root2);
13649 mightHavePendingSyncWork = true;
13650 null !== ReactSharedInternals.actQueue ? didScheduleMicrotask_act || (didScheduleMicrotask_act = true, scheduleImmediateRootScheduleTask()) : didScheduleMicrotask || (didScheduleMicrotask = true, scheduleImmediateRootScheduleTask());
13651 }
13652 function flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {
13653 if (!isFlushingWork && mightHavePendingSyncWork) {
13654 isFlushingWork = true;
13655 do {
13656 var didPerformSomeWork = false;
13657 for (var root2 = firstScheduledRoot; null !== root2; ) {
13658 if (!onlyLegacy)
13659 if (0 !== syncTransitionLanes) {
13660 var pendingLanes = root2.pendingLanes;
13661 if (0 === pendingLanes) var nextLanes = 0;
13662 else {
13663 var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes;
13664 nextLanes = (1 << 31 - clz32(42 | syncTransitionLanes) + 1) - 1;
13665 nextLanes &= pendingLanes & ~(suspendedLanes & ~pingedLanes);
13666 nextLanes = nextLanes & 201326741 ? nextLanes & 201326741 | 1 : nextLanes ? nextLanes | 2 : 0;
13667 }
13668 0 !== nextLanes && (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
13669 } else
13670 nextLanes = workInProgressRootRenderLanes, nextLanes = getNextLanes(
13671 root2,
13672 root2 === workInProgressRoot ? nextLanes : 0,
13673 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13674 ), 0 === (nextLanes & 3) || checkIfRootIsPrerendering(root2, nextLanes) || (didPerformSomeWork = true, performSyncWorkOnRoot(root2, nextLanes));
13675 root2 = root2.next;
13676 }
13677 } while (didPerformSomeWork);
13678 isFlushingWork = false;
13679 }
13680 }
13681 function processRootScheduleInImmediateTask() {
13682 schedulerEvent = window.event;
13683 processRootScheduleInMicrotask();
13684 }
13685 function processRootScheduleInMicrotask() {
13686 mightHavePendingSyncWork = didScheduleMicrotask_act = didScheduleMicrotask = false;
13687 var syncTransitionLanes = 0;
13688 0 !== currentEventTransitionLane && shouldAttemptEagerTransition() && (syncTransitionLanes = currentEventTransitionLane);
13689 for (var currentTime = now$1(), prev = null, root2 = firstScheduledRoot; null !== root2; ) {
13690 var next = root2.next, nextLanes = scheduleTaskForRootDuringMicrotask(root2, currentTime);
13691 if (0 === nextLanes)
13692 root2.next = null, null === prev ? firstScheduledRoot = next : prev.next = next, null === next && (lastScheduledRoot = prev);
13693 else if (prev = root2, 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))
13694 mightHavePendingSyncWork = true;
13695 root2 = next;
13696 }
13697 pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE || flushSyncWorkAcrossRoots_impl(syncTransitionLanes, false);
13698 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);
13699 }
13700 function scheduleTaskForRootDuringMicrotask(root2, currentTime) {
13701 for (var suspendedLanes = root2.suspendedLanes, pingedLanes = root2.pingedLanes, expirationTimes = root2.expirationTimes, lanes = root2.pendingLanes & -62914561; 0 < lanes; ) {
13702 var index = 31 - clz32(lanes), lane = 1 << index, expirationTime = expirationTimes[index];
13703 if (-1 === expirationTime) {
13704 if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))
13705 expirationTimes[index] = computeExpirationTime(lane, currentTime);
13706 } else expirationTime <= currentTime && (root2.expiredLanes |= lane);
13707 lanes &= ~lane;
13708 }
13709 currentTime = workInProgressRoot;
13710 suspendedLanes = workInProgressRootRenderLanes;
13711 suspendedLanes = getNextLanes(
13712 root2,
13713 root2 === currentTime ? suspendedLanes : 0,
13714 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13715 );
13716 pingedLanes = root2.callbackNode;
13717 if (0 === suspendedLanes || root2 === currentTime && (workInProgressSuspendedReason === SuspendedOnData || workInProgressSuspendedReason === SuspendedOnAction) || null !== root2.cancelPendingCommit)
13718 return null !== pingedLanes && cancelCallback(pingedLanes), root2.callbackNode = null, root2.callbackPriority = 0;
13719 if (0 === (suspendedLanes & 3) || checkIfRootIsPrerendering(root2, suspendedLanes)) {
13720 currentTime = suspendedLanes & -suspendedLanes;
13721 if (currentTime !== root2.callbackPriority || null !== ReactSharedInternals.actQueue && pingedLanes !== fakeActCallbackNode)
13722 cancelCallback(pingedLanes);
13723 else return currentTime;
13724 switch (lanesToEventPriority(suspendedLanes)) {
13725 case DiscreteEventPriority:
13726 case ContinuousEventPriority:
13727 suspendedLanes = UserBlockingPriority;
13728 break;
13729 case DefaultEventPriority:
13730 suspendedLanes = NormalPriority$1;
13731 break;
13732 case IdleEventPriority:
13733 suspendedLanes = IdlePriority;
13734 break;
13735 default:
13736 suspendedLanes = NormalPriority$1;
13737 }
13738 pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root2);
13739 null !== ReactSharedInternals.actQueue ? (ReactSharedInternals.actQueue.push(pingedLanes), suspendedLanes = fakeActCallbackNode) : suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);
13740 root2.callbackPriority = currentTime;
13741 root2.callbackNode = suspendedLanes;
13742 return currentTime;
13743 }
13744 null !== pingedLanes && cancelCallback(pingedLanes);
13745 root2.callbackPriority = 2;
13746 root2.callbackNode = null;
13747 return 2;
13748 }
13749 function performWorkOnRootViaSchedulerTask(root2, didTimeout) {
13750 nestedUpdateScheduled = currentUpdateIsNested = false;
13751 schedulerEvent = window.event;
13752 if (pendingEffectsStatus !== NO_PENDING_EFFECTS && pendingEffectsStatus !== PENDING_PASSIVE_PHASE)
13753 return root2.callbackNode = null, root2.callbackPriority = 0, null;
13754 var originalCallbackNode = root2.callbackNode;
13755 pendingDelayedCommitReason === IMMEDIATE_COMMIT && (pendingDelayedCommitReason = DELAYED_PASSIVE_COMMIT);
13756 if (flushPendingEffects() && root2.callbackNode !== originalCallbackNode)
13757 return null;
13758 var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;
13759 workInProgressRootRenderLanes$jscomp$0 = getNextLanes(
13760 root2,
13761 root2 === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,
13762 null !== root2.cancelPendingCommit || root2.timeoutHandle !== noTimeout
13763 );
13764 if (0 === workInProgressRootRenderLanes$jscomp$0) return null;
13765 performWorkOnRoot(
13766 root2,
13767 workInProgressRootRenderLanes$jscomp$0,
13768 didTimeout
13769 );
13770 scheduleTaskForRootDuringMicrotask(root2, now$1());
13771 return null != root2.callbackNode && root2.callbackNode === originalCallbackNode ? performWorkOnRootViaSchedulerTask.bind(null, root2) : null;
13772 }
13773 function performSyncWorkOnRoot(root2, lanes) {
13774 if (flushPendingEffects()) return null;
13775 currentUpdateIsNested = nestedUpdateScheduled;
13776 nestedUpdateScheduled = false;
13777 performWorkOnRoot(root2, lanes, true);
13778 }
13779 function cancelCallback(callbackNode) {
13780 callbackNode !== fakeActCallbackNode && null !== callbackNode && cancelCallback$1(callbackNode);
13781 }
13782 function scheduleImmediateRootScheduleTask() {
13783 null !== ReactSharedInternals.actQueue && ReactSharedInternals.actQueue.push(function() {
13784 processRootScheduleInMicrotask();
13785 return null;
13786 });
13787 scheduleMicrotask(function() {
13788 (executionContext & (RenderContext | CommitContext)) !== NoContext ? scheduleCallback$3(
13789 ImmediatePriority,
13790 processRootScheduleInImmediateTask
13791 ) : processRootScheduleInMicrotask();
13792 });
13793 }
13794 function requestTransitionLane() {
13795 if (0 === currentEventTransitionLane) {
13796 var actionScopeLane = currentEntangledLane;
13797 0 === actionScopeLane && (actionScopeLane = nextTransitionUpdateLane, nextTransitionUpdateLane <<= 1, 0 === (nextTransitionUpdateLane & 261888) && (nextTransitionUpdateLane = 256));
13798 currentEventTransitionLane = actionScopeLane;
13799 }
13800 return currentEventTransitionLane;
13801 }
13802 function coerceFormActionProp(actionProp) {
13803 if (null == actionProp || "symbol" === typeof actionProp || "boolean" === typeof actionProp)
13804 return null;
13805 if ("function" === typeof actionProp) return actionProp;
13806 checkAttributeStringCoercion(actionProp, "action");
13807 return sanitizeURL("" + actionProp);
13808 }
13809 function createFormDataWithSubmitter(form, submitter) {
13810 var temp = submitter.ownerDocument.createElement("input");
13811 temp.name = submitter.name;
13812 temp.value = submitter.value;
13813 form.id && temp.setAttribute("form", form.id);
13814 submitter.parentNode.insertBefore(temp, submitter);
13815 form = new FormData(form);
13816 temp.parentNode.removeChild(temp);
13817 return form;
13818 }
13819 function extractEvents$1(dispatchQueue, domEventName, maybeTargetInst, nativeEvent, nativeEventTarget) {
13820 if ("submit" === domEventName && maybeTargetInst && maybeTargetInst.stateNode === nativeEventTarget) {
13821 var action = coerceFormActionProp(
13822 (nativeEventTarget[internalPropsKey] || null).action
13823 ), submitter = nativeEvent.submitter;
13824 submitter && (domEventName = (domEventName = submitter[internalPropsKey] || null) ? coerceFormActionProp(domEventName.formAction) : submitter.getAttribute("formAction"), null !== domEventName && (action = domEventName, submitter = null));
13825 var event = new SyntheticEvent(
13826 "action",
13827 "action",
13828 null,
13829 nativeEvent,
13830 nativeEventTarget
13831 );
13832 dispatchQueue.push({
13833 event,
13834 listeners: [
13835 {
13836 instance: null,
13837 listener: function() {
13838 if (nativeEvent.defaultPrevented) {
13839 if (0 !== currentEventTransitionLane) {
13840 var formData = submitter ? createFormDataWithSubmitter(
13841 nativeEventTarget,
13842 submitter
13843 ) : new FormData(nativeEventTarget), pendingState = {
13844 pending: true,
13845 data: formData,
13846 method: nativeEventTarget.method,
13847 action
13848 };
13849 Object.freeze(pendingState);
13850 startHostTransition(
13851 maybeTargetInst,
13852 pendingState,
13853 null,
13854 formData
13855 );
13856 }
13857 } else
13858 "function" === typeof action && (event.preventDefault(), formData = submitter ? createFormDataWithSubmitter(
13859 nativeEventTarget,
13860 submitter
13861 ) : new FormData(nativeEventTarget), pendingState = {
13862 pending: true,
13863 data: formData,
13864 method: nativeEventTarget.method,
13865 action
13866 }, Object.freeze(pendingState), startHostTransition(
13867 maybeTargetInst,
13868 pendingState,
13869 action,
13870 formData
13871 ));
13872 },
13873 currentTarget: nativeEventTarget
13874 }
13875 ]
13876 });
13877 }
13878 }
13879 function executeDispatch(event, listener, currentTarget) {
13880 event.currentTarget = currentTarget;
13881 try {
13882 listener(event);
13883 } catch (error) {
13884 reportGlobalError(error);
13885 }
13886 event.currentTarget = null;
13887 }
13888 function processDispatchQueue(dispatchQueue, eventSystemFlags) {
13889 eventSystemFlags = 0 !== (eventSystemFlags & 4);
13890 for (var i = 0; i < dispatchQueue.length; i++) {
13891 var _dispatchQueue$i = dispatchQueue[i];
13892 a: {
13893 var previousInstance = void 0, event = _dispatchQueue$i.event;
13894 _dispatchQueue$i = _dispatchQueue$i.listeners;
13895 if (eventSystemFlags)
13896 for (var i$jscomp$0 = _dispatchQueue$i.length - 1; 0 <= i$jscomp$0; i$jscomp$0--) {
13897 var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget;
13898 _dispatchListeners$i = _dispatchListeners$i.listener;
13899 if (instance !== previousInstance && event.isPropagationStopped())
13900 break a;
13901 null !== instance ? runWithFiberInDEV(
13902 instance,
13903 executeDispatch,
13904 event,
13905 _dispatchListeners$i,
13906 currentTarget
13907 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
13908 previousInstance = instance;
13909 }
13910 else
13911 for (i$jscomp$0 = 0; i$jscomp$0 < _dispatchQueue$i.length; i$jscomp$0++) {
13912 _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];
13913 instance = _dispatchListeners$i.instance;
13914 currentTarget = _dispatchListeners$i.currentTarget;
13915 _dispatchListeners$i = _dispatchListeners$i.listener;
13916 if (instance !== previousInstance && event.isPropagationStopped())
13917 break a;
13918 null !== instance ? runWithFiberInDEV(
13919 instance,
13920 executeDispatch,
13921 event,
13922 _dispatchListeners$i,
13923 currentTarget
13924 ) : executeDispatch(event, _dispatchListeners$i, currentTarget);
13925 previousInstance = instance;
13926 }
13927 }
13928 }
13929 }
13930 function listenToNonDelegatedEvent(domEventName, targetElement) {
13931 nonDelegatedEvents.has(domEventName) || console.error(
13932 'Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',
13933 domEventName
13934 );
13935 var listenerSet = targetElement[internalEventHandlersKey];
13936 void 0 === listenerSet && (listenerSet = targetElement[internalEventHandlersKey] = /* @__PURE__ */ new Set());
13937 var listenerSetKey = domEventName + "__bubble";
13938 listenerSet.has(listenerSetKey) || (addTrappedEventListener(targetElement, domEventName, 2, false), listenerSet.add(listenerSetKey));
13939 }
13940 function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
13941 nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener && console.error(
13942 'Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',
13943 domEventName
13944 );
13945 var eventSystemFlags = 0;
13946 isCapturePhaseListener && (eventSystemFlags |= 4);
13947 addTrappedEventListener(
13948 target,
13949 domEventName,
13950 eventSystemFlags,
13951 isCapturePhaseListener
13952 );
13953 }
13954 function listenToAllSupportedEvents(rootContainerElement) {
13955 if (!rootContainerElement[listeningMarker]) {
13956 rootContainerElement[listeningMarker] = true;
13957 allNativeEvents.forEach(function(domEventName) {
13958 "selectionchange" !== domEventName && (nonDelegatedEvents.has(domEventName) || listenToNativeEvent(domEventName, false, rootContainerElement), listenToNativeEvent(domEventName, true, rootContainerElement));
13959 });
13960 var ownerDocument = 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
13961 null === ownerDocument || ownerDocument[listeningMarker] || (ownerDocument[listeningMarker] = true, listenToNativeEvent("selectionchange", false, ownerDocument));
13962 }
13963 }
13964 function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener) {
13965 switch (getEventPriority(domEventName)) {
13966 case DiscreteEventPriority:
13967 var listenerWrapper = dispatchDiscreteEvent;
13968 break;
13969 case ContinuousEventPriority:
13970 listenerWrapper = dispatchContinuousEvent;
13971 break;
13972 default:
13973 listenerWrapper = dispatchEvent;
13974 }
13975 eventSystemFlags = listenerWrapper.bind(
13976 null,
13977 domEventName,
13978 eventSystemFlags,
13979 targetContainer
13980 );
13981 listenerWrapper = void 0;
13982 !passiveBrowserEventsSupported || "touchstart" !== domEventName && "touchmove" !== domEventName && "wheel" !== domEventName || (listenerWrapper = true);
13983 isCapturePhaseListener ? void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
13984 capture: true,
13985 passive: listenerWrapper
13986 }) : targetContainer.addEventListener(domEventName, eventSystemFlags, true) : void 0 !== listenerWrapper ? targetContainer.addEventListener(domEventName, eventSystemFlags, {
13987 passive: listenerWrapper
13988 }) : targetContainer.addEventListener(
13989 domEventName,
13990 eventSystemFlags,
13991 false
13992 );
13993 }
13994 function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst$jscomp$0, targetContainer) {
13995 var ancestorInst = targetInst$jscomp$0;
13996 if (0 === (eventSystemFlags & 1) && 0 === (eventSystemFlags & 2) && null !== targetInst$jscomp$0)
13997 a: for (; ; ) {
13998 if (null === targetInst$jscomp$0) return;
13999 var nodeTag = targetInst$jscomp$0.tag;
14000 if (3 === nodeTag || 4 === nodeTag) {
14001 var container = targetInst$jscomp$0.stateNode.containerInfo;
14002 if (container === targetContainer) break;
14003 if (4 === nodeTag)
14004 for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {
14005 var grandTag = nodeTag.tag;
14006 if ((3 === grandTag || 4 === grandTag) && nodeTag.stateNode.containerInfo === targetContainer)
14007 return;
14008 nodeTag = nodeTag.return;
14009 }
14010 for (; null !== container; ) {
14011 nodeTag = getClosestInstanceFromNode(container);
14012 if (null === nodeTag) return;
14013 grandTag = nodeTag.tag;
14014 if (5 === grandTag || 6 === grandTag || 26 === grandTag || 27 === grandTag) {
14015 targetInst$jscomp$0 = ancestorInst = nodeTag;
14016 continue a;
14017 }
14018 container = container.parentNode;
14019 }
14020 }
14021 targetInst$jscomp$0 = targetInst$jscomp$0.return;
14022 }
14023 batchedUpdates$1(function() {
14024 var targetInst = ancestorInst, nativeEventTarget = getEventTarget(nativeEvent), dispatchQueue = [];
14025 a: {
14026 var reactName = topLevelEventsToReactNames.get(domEventName);
14027 if (void 0 !== reactName) {
14028 var SyntheticEventCtor = SyntheticEvent, reactEventType = domEventName;
14029 switch (domEventName) {
14030 case "keypress":
14031 if (0 === getEventCharCode(nativeEvent)) break a;
14032 case "keydown":
14033 case "keyup":
14034 SyntheticEventCtor = SyntheticKeyboardEvent;
14035 break;
14036 case "focusin":
14037 reactEventType = "focus";
14038 SyntheticEventCtor = SyntheticFocusEvent;
14039 break;
14040 case "focusout":
14041 reactEventType = "blur";
14042 SyntheticEventCtor = SyntheticFocusEvent;
14043 break;
14044 case "beforeblur":
14045 case "afterblur":
14046 SyntheticEventCtor = SyntheticFocusEvent;
14047 break;
14048 case "click":
14049 if (2 === nativeEvent.button) break a;
14050 case "auxclick":
14051 case "dblclick":
14052 case "mousedown":
14053 case "mousemove":
14054 case "mouseup":
14055 case "mouseout":
14056 case "mouseover":
14057 case "contextmenu":
14058 SyntheticEventCtor = SyntheticMouseEvent;
14059 break;
14060 case "drag":
14061 case "dragend":
14062 case "dragenter":
14063 case "dragexit":
14064 case "dragleave":
14065 case "dragover":
14066 case "dragstart":
14067 case "drop":
14068 SyntheticEventCtor = SyntheticDragEvent;
14069 break;
14070 case "touchcancel":
14071 case "touchend":
14072 case "touchmove":
14073 case "touchstart":
14074 SyntheticEventCtor = SyntheticTouchEvent;
14075 break;
14076 case ANIMATION_END:
14077 case ANIMATION_ITERATION:
14078 case ANIMATION_START:
14079 SyntheticEventCtor = SyntheticAnimationEvent;
14080 break;
14081 case TRANSITION_END:
14082 SyntheticEventCtor = SyntheticTransitionEvent;
14083 break;
14084 case "scroll":
14085 case "scrollend":
14086 SyntheticEventCtor = SyntheticUIEvent;
14087 break;
14088 case "wheel":
14089 SyntheticEventCtor = SyntheticWheelEvent;
14090 break;
14091 case "copy":
14092 case "cut":
14093 case "paste":
14094 SyntheticEventCtor = SyntheticClipboardEvent;
14095 break;
14096 case "gotpointercapture":
14097 case "lostpointercapture":
14098 case "pointercancel":
14099 case "pointerdown":
14100 case "pointermove":
14101 case "pointerout":
14102 case "pointerover":
14103 case "pointerup":
14104 SyntheticEventCtor = SyntheticPointerEvent;
14105 break;
14106 case "toggle":
14107 case "beforetoggle":
14108 SyntheticEventCtor = SyntheticToggleEvent;
14109 }
14110 var inCapturePhase = 0 !== (eventSystemFlags & 4), accumulateTargetOnly = !inCapturePhase && ("scroll" === domEventName || "scrollend" === domEventName), reactEventName = inCapturePhase ? null !== reactName ? reactName + "Capture" : null : reactName;
14111 inCapturePhase = [];
14112 for (var instance = targetInst, lastHostComponent; null !== instance; ) {
14113 var _instance2 = instance;
14114 lastHostComponent = _instance2.stateNode;
14115 _instance2 = _instance2.tag;
14116 5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2 || null === lastHostComponent || null === reactEventName || (_instance2 = getListener(instance, reactEventName), null != _instance2 && inCapturePhase.push(
14117 createDispatchListener(
14118 instance,
14119 _instance2,
14120 lastHostComponent
14121 )
14122 ));
14123 if (accumulateTargetOnly) break;
14124 instance = instance.return;
14125 }
14126 0 < inCapturePhase.length && (reactName = new SyntheticEventCtor(
14127 reactName,
14128 reactEventType,
14129 null,
14130 nativeEvent,
14131 nativeEventTarget
14132 ), dispatchQueue.push({
14133 event: reactName,
14134 listeners: inCapturePhase
14135 }));
14136 }
14137 }
14138 if (0 === (eventSystemFlags & 7)) {
14139 a: {
14140 reactName = "mouseover" === domEventName || "pointerover" === domEventName;
14141 SyntheticEventCtor = "mouseout" === domEventName || "pointerout" === domEventName;
14142 if (reactName && nativeEvent !== currentReplayingEvent && (reactEventType = nativeEvent.relatedTarget || nativeEvent.fromElement) && (getClosestInstanceFromNode(reactEventType) || reactEventType[internalContainerInstanceKey]))
14143 break a;
14144 if (SyntheticEventCtor || reactName) {
14145 reactName = nativeEventTarget.window === nativeEventTarget ? nativeEventTarget : (reactName = nativeEventTarget.ownerDocument) ? reactName.defaultView || reactName.parentWindow : window;
14146 if (SyntheticEventCtor) {
14147 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))
14148 reactEventType = null;
14149 } else SyntheticEventCtor = null, reactEventType = targetInst;
14150 if (SyntheticEventCtor !== reactEventType) {
14151 inCapturePhase = SyntheticMouseEvent;
14152 _instance2 = "onMouseLeave";
14153 reactEventName = "onMouseEnter";
14154 instance = "mouse";
14155 if ("pointerout" === domEventName || "pointerover" === domEventName)
14156 inCapturePhase = SyntheticPointerEvent, _instance2 = "onPointerLeave", reactEventName = "onPointerEnter", instance = "pointer";
14157 accumulateTargetOnly = null == SyntheticEventCtor ? reactName : getNodeFromInstance(SyntheticEventCtor);
14158 lastHostComponent = null == reactEventType ? reactName : getNodeFromInstance(reactEventType);
14159 reactName = new inCapturePhase(
14160 _instance2,
14161 instance + "leave",
14162 SyntheticEventCtor,
14163 nativeEvent,
14164 nativeEventTarget
14165 );
14166 reactName.target = accumulateTargetOnly;
14167 reactName.relatedTarget = lastHostComponent;
14168 _instance2 = null;
14169 getClosestInstanceFromNode(nativeEventTarget) === targetInst && (inCapturePhase = new inCapturePhase(
14170 reactEventName,
14171 instance + "enter",
14172 reactEventType,
14173 nativeEvent,
14174 nativeEventTarget
14175 ), inCapturePhase.target = lastHostComponent, inCapturePhase.relatedTarget = accumulateTargetOnly, _instance2 = inCapturePhase);
14176 accumulateTargetOnly = _instance2;
14177 if (SyntheticEventCtor && reactEventType)
14178 b: {
14179 inCapturePhase = getParent;
14180 reactEventName = SyntheticEventCtor;
14181 instance = reactEventType;
14182 lastHostComponent = 0;
14183 for (_instance2 = reactEventName; _instance2; _instance2 = inCapturePhase(_instance2))
14184 lastHostComponent++;
14185 _instance2 = 0;
14186 for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))
14187 _instance2++;
14188 for (; 0 < lastHostComponent - _instance2; )
14189 reactEventName = inCapturePhase(reactEventName), lastHostComponent--;
14190 for (; 0 < _instance2 - lastHostComponent; )
14191 instance = inCapturePhase(instance), _instance2--;
14192 for (; lastHostComponent--; ) {
14193 if (reactEventName === instance || null !== instance && reactEventName === instance.alternate) {
14194 inCapturePhase = reactEventName;
14195 break b;
14196 }
14197 reactEventName = inCapturePhase(reactEventName);
14198 instance = inCapturePhase(instance);
14199 }
14200 inCapturePhase = null;
14201 }
14202 else inCapturePhase = null;
14203 null !== SyntheticEventCtor && accumulateEnterLeaveListenersForEvent(
14204 dispatchQueue,
14205 reactName,
14206 SyntheticEventCtor,
14207 inCapturePhase,
14208 false
14209 );
14210 null !== reactEventType && null !== accumulateTargetOnly && accumulateEnterLeaveListenersForEvent(
14211 dispatchQueue,
14212 accumulateTargetOnly,
14213 reactEventType,
14214 inCapturePhase,
14215 true
14216 );
14217 }
14218 }
14219 }
14220 a: {
14221 reactName = targetInst ? getNodeFromInstance(targetInst) : window;
14222 SyntheticEventCtor = reactName.nodeName && reactName.nodeName.toLowerCase();
14223 if ("select" === SyntheticEventCtor || "input" === SyntheticEventCtor && "file" === reactName.type)
14224 var getTargetInstFunc = getTargetInstForChangeEvent;
14225 else if (isTextInputElement(reactName))
14226 if (isInputEventSupported)
14227 getTargetInstFunc = getTargetInstForInputOrChangeEvent;
14228 else {
14229 getTargetInstFunc = getTargetInstForInputEventPolyfill;
14230 var handleEventFunc = handleEventsForInputEventPolyfill;
14231 }
14232 else
14233 SyntheticEventCtor = reactName.nodeName, !SyntheticEventCtor || "input" !== SyntheticEventCtor.toLowerCase() || "checkbox" !== reactName.type && "radio" !== reactName.type ? targetInst && isCustomElement(targetInst.elementType) && (getTargetInstFunc = getTargetInstForChangeEvent) : getTargetInstFunc = getTargetInstForClickEvent;
14234 if (getTargetInstFunc && (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))) {
14235 createAndAccumulateChangeEvent(
14236 dispatchQueue,
14237 getTargetInstFunc,
14238 nativeEvent,
14239 nativeEventTarget
14240 );
14241 break a;
14242 }
14243 handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);
14244 "focusout" === domEventName && targetInst && "number" === reactName.type && null != targetInst.memoizedProps.value && setDefaultValue(reactName, "number", reactName.value);
14245 }
14246 handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;
14247 switch (domEventName) {
14248 case "focusin":
14249 if (isTextInputElement(handleEventFunc) || "true" === handleEventFunc.contentEditable)
14250 activeElement = handleEventFunc, activeElementInst = targetInst, lastSelection = null;
14251 break;
14252 case "focusout":
14253 lastSelection = activeElementInst = activeElement = null;
14254 break;
14255 case "mousedown":
14256 mouseDown = true;
14257 break;
14258 case "contextmenu":
14259 case "mouseup":
14260 case "dragend":
14261 mouseDown = false;
14262 constructSelectEvent(
14263 dispatchQueue,
14264 nativeEvent,
14265 nativeEventTarget
14266 );
14267 break;
14268 case "selectionchange":
14269 if (skipSelectionChangeEvent) break;
14270 case "keydown":
14271 case "keyup":
14272 constructSelectEvent(
14273 dispatchQueue,
14274 nativeEvent,
14275 nativeEventTarget
14276 );
14277 }
14278 var fallbackData;
14279 if (canUseCompositionEvent)
14280 b: {
14281 switch (domEventName) {
14282 case "compositionstart":
14283 var eventType = "onCompositionStart";
14284 break b;
14285 case "compositionend":
14286 eventType = "onCompositionEnd";
14287 break b;
14288 case "compositionupdate":
14289 eventType = "onCompositionUpdate";
14290 break b;
14291 }
14292 eventType = void 0;
14293 }
14294 else
14295 isComposing ? isFallbackCompositionEnd(domEventName, nativeEvent) && (eventType = "onCompositionEnd") : "keydown" === domEventName && nativeEvent.keyCode === START_KEYCODE && (eventType = "onCompositionStart");
14296 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(
14297 targetInst,
14298 eventType
14299 ), 0 < handleEventFunc.length && (eventType = new SyntheticCompositionEvent(
14300 eventType,
14301 domEventName,
14302 null,
14303 nativeEvent,
14304 nativeEventTarget
14305 ), dispatchQueue.push({
14306 event: eventType,
14307 listeners: handleEventFunc
14308 }), fallbackData ? eventType.data = fallbackData : (fallbackData = getDataFromCustomEvent(nativeEvent), null !== fallbackData && (eventType.data = fallbackData))));
14309 if (fallbackData = canUseTextInputEvent ? getNativeBeforeInputChars(domEventName, nativeEvent) : getFallbackBeforeInputChars(domEventName, nativeEvent))
14310 eventType = accumulateTwoPhaseListeners(
14311 targetInst,
14312 "onBeforeInput"
14313 ), 0 < eventType.length && (handleEventFunc = new SyntheticInputEvent(
14314 "onBeforeInput",
14315 "beforeinput",
14316 null,
14317 nativeEvent,
14318 nativeEventTarget
14319 ), dispatchQueue.push({
14320 event: handleEventFunc,
14321 listeners: eventType
14322 }), handleEventFunc.data = fallbackData);
14323 extractEvents$1(
14324 dispatchQueue,
14325 domEventName,
14326 targetInst,
14327 nativeEvent,
14328 nativeEventTarget
14329 );
14330 }
14331 processDispatchQueue(dispatchQueue, eventSystemFlags);
14332 });
14333 }
14334 function createDispatchListener(instance, listener, currentTarget) {
14335 return {
14336 instance,
14337 listener,
14338 currentTarget
14339 };
14340 }
14341 function accumulateTwoPhaseListeners(targetFiber, reactName) {
14342 for (var captureName = reactName + "Capture", listeners = []; null !== targetFiber; ) {
14343 var _instance3 = targetFiber, stateNode = _instance3.stateNode;
14344 _instance3 = _instance3.tag;
14345 5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3 || null === stateNode || (_instance3 = getListener(targetFiber, captureName), null != _instance3 && listeners.unshift(
14346 createDispatchListener(targetFiber, _instance3, stateNode)
14347 ), _instance3 = getListener(targetFiber, reactName), null != _instance3 && listeners.push(
14348 createDispatchListener(targetFiber, _instance3, stateNode)
14349 ));
14350 if (3 === targetFiber.tag) return listeners;
14351 targetFiber = targetFiber.return;
14352 }
14353 return [];
14354 }
14355 function getParent(inst) {
14356 if (null === inst) return null;
14357 do
14358 inst = inst.return;
14359 while (inst && 5 !== inst.tag && 27 !== inst.tag);
14360 return inst ? inst : null;
14361 }
14362 function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
14363 for (var registrationName = event._reactName, listeners = []; null !== target && target !== common; ) {
14364 var _instance4 = target, alternate = _instance4.alternate, stateNode = _instance4.stateNode;
14365 _instance4 = _instance4.tag;
14366 if (null !== alternate && alternate === common) break;
14367 5 !== _instance4 && 26 !== _instance4 && 27 !== _instance4 || null === stateNode || (alternate = stateNode, inCapturePhase ? (stateNode = getListener(target, registrationName), null != stateNode && listeners.unshift(
14368 createDispatchListener(target, stateNode, alternate)
14369 )) : inCapturePhase || (stateNode = getListener(target, registrationName), null != stateNode && listeners.push(
14370 createDispatchListener(target, stateNode, alternate)
14371 )));
14372 target = target.return;
14373 }
14374 0 !== listeners.length && dispatchQueue.push({ event, listeners });
14375 }
14376 function validatePropertiesInDevelopment(type, props) {
14377 validateProperties$2(type, props);
14378 "input" !== type && "textarea" !== type && "select" !== type || null == props || null !== props.value || didWarnValueNull || (didWarnValueNull = true, "select" === type && props.multiple ? console.error(
14379 "`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.",
14380 type
14381 ) : console.error(
14382 "`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",
14383 type
14384 ));
14385 var eventRegistry = {
14386 registrationNameDependencies,
14387 possibleRegistrationNames
14388 };
14389 isCustomElement(type) || "string" === typeof props.is || warnUnknownProperties(type, props, eventRegistry);
14390 props.contentEditable && !props.suppressContentEditableWarning && null != props.children && console.error(
14391 "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."
14392 );
14393 }
14394 function warnForPropDifference(propName, serverValue, clientValue, serverDifferences) {
14395 serverValue !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(serverValue) !== clientValue && (serverDifferences[propName] = serverValue));
14396 }
14397 function warnForExtraAttributes(domElement, attributeNames, serverDifferences) {
14398 attributeNames.forEach(function(attributeName) {
14399 serverDifferences[getPropNameFromAttributeName(attributeName)] = "style" === attributeName ? getStylesObjectFromElement(domElement) : domElement.getAttribute(attributeName);
14400 });
14401 }
14402 function warnForInvalidEventListener(registrationName, listener) {
14403 false === listener ? console.error(
14404 "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.",
14405 registrationName,
14406 registrationName,
14407 registrationName
14408 ) : console.error(
14409 "Expected `%s` listener to be a function, instead got a value of `%s` type.",
14410 registrationName,
14411 typeof listener
14412 );
14413 }
14414 function normalizeHTML(parent, html) {
14415 parent = parent.namespaceURI === MATH_NAMESPACE || parent.namespaceURI === SVG_NAMESPACE ? parent.ownerDocument.createElementNS(
14416 parent.namespaceURI,
14417 parent.tagName
14418 ) : parent.ownerDocument.createElement(parent.tagName);
14419 parent.innerHTML = html;
14420 return parent.innerHTML;
14421 }
14422 function normalizeMarkupForTextOrAttribute(markup) {
14423 willCoercionThrow(markup) && (console.error(
14424 "The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.",
14425 typeName(markup)
14426 ), testStringCoercion(markup));
14427 return ("string" === typeof markup ? markup : "" + markup).replace(NORMALIZE_NEWLINES_REGEX, "\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
14428 }
14429 function checkForUnmatchedText(serverText, clientText) {
14430 clientText = normalizeMarkupForTextOrAttribute(clientText);
14431 return normalizeMarkupForTextOrAttribute(serverText) === clientText ? true : false;
14432 }
14433 function setProp(domElement, tag, key, value, props, prevValue) {
14434 switch (key) {
14435 case "children":
14436 if ("string" === typeof value)
14437 validateTextNesting(value, tag, false), "body" === tag || "textarea" === tag && "" === value || setTextContent(domElement, value);
14438 else if ("number" === typeof value || "bigint" === typeof value)
14439 validateTextNesting("" + value, tag, false), "body" !== tag && setTextContent(domElement, "" + value);
14440 break;
14441 case "className":
14442 setValueForKnownAttribute(domElement, "class", value);
14443 break;
14444 case "tabIndex":
14445 setValueForKnownAttribute(domElement, "tabindex", value);
14446 break;
14447 case "dir":
14448 case "role":
14449 case "viewBox":
14450 case "width":
14451 case "height":
14452 setValueForKnownAttribute(domElement, key, value);
14453 break;
14454 case "style":
14455 setValueForStyles(domElement, value, prevValue);
14456 break;
14457 case "data":
14458 if ("object" !== tag) {
14459 setValueForKnownAttribute(domElement, "data", value);
14460 break;
14461 }
14462 case "src":
14463 case "href":
14464 if ("" === value && ("a" !== tag || "href" !== key)) {
14465 "src" === key ? console.error(
14466 '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.',
14467 key,
14468 key
14469 ) : console.error(
14470 '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.',
14471 key,
14472 key
14473 );
14474 domElement.removeAttribute(key);
14475 break;
14476 }
14477 if (null == value || "function" === typeof value || "symbol" === typeof value || "boolean" === typeof value) {
14478 domElement.removeAttribute(key);
14479 break;
14480 }
14481 checkAttributeStringCoercion(value, key);
14482 value = sanitizeURL("" + value);
14483 domElement.setAttribute(key, value);
14484 break;
14485 case "action":
14486 case "formAction":
14487 null != value && ("form" === tag ? "formAction" === key ? console.error(
14488 "You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."
14489 ) : "function" === typeof value && (null == props.encType && null == props.method || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
14490 "Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden."
14491 )), null == props.target || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
14492 "Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window."
14493 ))) : "input" === tag || "button" === tag ? "action" === key ? console.error(
14494 "You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."
14495 ) : "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(
14496 '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.'
14497 )), null == props.formEncType && null == props.formMethod || didWarnFormActionMethod || (didWarnFormActionMethod = true, console.error(
14498 "Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden."
14499 )), null == props.formTarget || didWarnFormActionTarget || (didWarnFormActionTarget = true, console.error(
14500 "Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window."
14501 ))) : (didWarnFormActionType = true, console.error(
14502 'A button can only specify a formAction along with type="submit" or no type.'
14503 )) : (didWarnFormActionType = true, console.error(
14504 'An input can only specify a formAction along with type="submit" or type="image".'
14505 )) : "action" === key ? console.error(
14506 "You can only pass the action prop to <form>."
14507 ) : console.error(
14508 "You can only pass the formAction prop to <input> or <button>."
14509 ));
14510 if ("function" === typeof value) {
14511 domElement.setAttribute(
14512 key,
14513 "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().')"
14514 );
14515 break;
14516 } else
14517 "function" === typeof prevValue && ("formAction" === key ? ("input" !== tag && setProp(domElement, tag, "name", props.name, props, null), setProp(
14518 domElement,
14519 tag,
14520 "formEncType",
14521 props.formEncType,
14522 props,
14523 null
14524 ), setProp(
14525 domElement,
14526 tag,
14527 "formMethod",
14528 props.formMethod,
14529 props,
14530 null
14531 ), setProp(
14532 domElement,
14533 tag,
14534 "formTarget",
14535 props.formTarget,
14536 props,
14537 null
14538 )) : (setProp(
14539 domElement,
14540 tag,
14541 "encType",
14542 props.encType,
14543 props,
14544 null
14545 ), setProp(domElement, tag, "method", props.method, props, null), setProp(
14546 domElement,
14547 tag,
14548 "target",
14549 props.target,
14550 props,
14551 null
14552 )));
14553 if (null == value || "symbol" === typeof value || "boolean" === typeof value) {
14554 domElement.removeAttribute(key);
14555 break;
14556 }
14557 checkAttributeStringCoercion(value, key);
14558 value = sanitizeURL("" + value);
14559 domElement.setAttribute(key, value);
14560 break;
14561 case "onClick":
14562 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
14563 break;
14564 case "onScroll":
14565 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
14566 break;
14567 case "onScrollEnd":
14568 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
14569 break;
14570 case "dangerouslySetInnerHTML":
14571 if (null != value) {
14572 if ("object" !== typeof value || !("__html" in value))
14573 throw Error(
14574 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
14575 );
14576 key = value.__html;
14577 if (null != key) {
14578 if (null != props.children)
14579 throw Error(
14580 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
14581 );
14582 domElement.innerHTML = key;
14583 }
14584 }
14585 break;
14586 case "multiple":
14587 domElement.multiple = value && "function" !== typeof value && "symbol" !== typeof value;
14588 break;
14589 case "muted":
14590 domElement.muted = value && "function" !== typeof value && "symbol" !== typeof value;
14591 break;
14592 case "suppressContentEditableWarning":
14593 case "suppressHydrationWarning":
14594 case "defaultValue":
14595 case "defaultChecked":
14596 case "innerHTML":
14597 case "ref":
14598 break;
14599 case "autoFocus":
14600 break;
14601 case "xlinkHref":
14602 if (null == value || "function" === typeof value || "boolean" === typeof value || "symbol" === typeof value) {
14603 domElement.removeAttribute("xlink:href");
14604 break;
14605 }
14606 checkAttributeStringCoercion(value, key);
14607 key = sanitizeURL("" + value);
14608 domElement.setAttributeNS(xlinkNamespace, "xlink:href", key);
14609 break;
14610 case "contentEditable":
14611 case "spellCheck":
14612 case "draggable":
14613 case "value":
14614 case "autoReverse":
14615 case "externalResourcesRequired":
14616 case "focusable":
14617 case "preserveAlpha":
14618 null != value && "function" !== typeof value && "symbol" !== typeof value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, "" + value)) : domElement.removeAttribute(key);
14619 break;
14620 case "inert":
14621 "" !== value || didWarnForNewBooleanPropsWithEmptyValue[key] || (didWarnForNewBooleanPropsWithEmptyValue[key] = true, console.error(
14622 "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.",
14623 key
14624 ));
14625 case "allowFullScreen":
14626 case "async":
14627 case "autoPlay":
14628 case "controls":
14629 case "default":
14630 case "defer":
14631 case "disabled":
14632 case "disablePictureInPicture":
14633 case "disableRemotePlayback":
14634 case "formNoValidate":
14635 case "hidden":
14636 case "loop":
14637 case "noModule":
14638 case "noValidate":
14639 case "open":
14640 case "playsInline":
14641 case "readOnly":
14642 case "required":
14643 case "reversed":
14644 case "scoped":
14645 case "seamless":
14646 case "itemScope":
14647 value && "function" !== typeof value && "symbol" !== typeof value ? domElement.setAttribute(key, "") : domElement.removeAttribute(key);
14648 break;
14649 case "capture":
14650 case "download":
14651 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);
14652 break;
14653 case "cols":
14654 case "rows":
14655 case "size":
14656 case "span":
14657 null != value && "function" !== typeof value && "symbol" !== typeof value && !isNaN(value) && 1 <= value ? (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value)) : domElement.removeAttribute(key);
14658 break;
14659 case "rowSpan":
14660 case "start":
14661 null == value || "function" === typeof value || "symbol" === typeof value || isNaN(value) ? domElement.removeAttribute(key) : (checkAttributeStringCoercion(value, key), domElement.setAttribute(key, value));
14662 break;
14663 case "popover":
14664 listenToNonDelegatedEvent("beforetoggle", domElement);
14665 listenToNonDelegatedEvent("toggle", domElement);
14666 setValueForAttribute(domElement, "popover", value);
14667 break;
14668 case "xlinkActuate":
14669 setValueForNamespacedAttribute(
14670 domElement,
14671 xlinkNamespace,
14672 "xlink:actuate",
14673 value
14674 );
14675 break;
14676 case "xlinkArcrole":
14677 setValueForNamespacedAttribute(
14678 domElement,
14679 xlinkNamespace,
14680 "xlink:arcrole",
14681 value
14682 );
14683 break;
14684 case "xlinkRole":
14685 setValueForNamespacedAttribute(
14686 domElement,
14687 xlinkNamespace,
14688 "xlink:role",
14689 value
14690 );
14691 break;
14692 case "xlinkShow":
14693 setValueForNamespacedAttribute(
14694 domElement,
14695 xlinkNamespace,
14696 "xlink:show",
14697 value
14698 );
14699 break;
14700 case "xlinkTitle":
14701 setValueForNamespacedAttribute(
14702 domElement,
14703 xlinkNamespace,
14704 "xlink:title",
14705 value
14706 );
14707 break;
14708 case "xlinkType":
14709 setValueForNamespacedAttribute(
14710 domElement,
14711 xlinkNamespace,
14712 "xlink:type",
14713 value
14714 );
14715 break;
14716 case "xmlBase":
14717 setValueForNamespacedAttribute(
14718 domElement,
14719 xmlNamespace,
14720 "xml:base",
14721 value
14722 );
14723 break;
14724 case "xmlLang":
14725 setValueForNamespacedAttribute(
14726 domElement,
14727 xmlNamespace,
14728 "xml:lang",
14729 value
14730 );
14731 break;
14732 case "xmlSpace":
14733 setValueForNamespacedAttribute(
14734 domElement,
14735 xmlNamespace,
14736 "xml:space",
14737 value
14738 );
14739 break;
14740 case "is":
14741 null != prevValue && console.error(
14742 'Cannot update the "is" prop after it has been initialized.'
14743 );
14744 setValueForAttribute(domElement, "is", value);
14745 break;
14746 case "innerText":
14747 case "textContent":
14748 break;
14749 case "popoverTarget":
14750 didWarnPopoverTargetObject || null == value || "object" !== typeof value || (didWarnPopoverTargetObject = true, console.error(
14751 "The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",
14752 value
14753 ));
14754 default:
14755 !(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);
14756 }
14757 }
14758 function setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {
14759 switch (key) {
14760 case "style":
14761 setValueForStyles(domElement, value, prevValue);
14762 break;
14763 case "dangerouslySetInnerHTML":
14764 if (null != value) {
14765 if ("object" !== typeof value || !("__html" in value))
14766 throw Error(
14767 "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information."
14768 );
14769 key = value.__html;
14770 if (null != key) {
14771 if (null != props.children)
14772 throw Error(
14773 "Can only set one of `children` or `props.dangerouslySetInnerHTML`."
14774 );
14775 domElement.innerHTML = key;
14776 }
14777 }
14778 break;
14779 case "children":
14780 "string" === typeof value ? setTextContent(domElement, value) : ("number" === typeof value || "bigint" === typeof value) && setTextContent(domElement, "" + value);
14781 break;
14782 case "onScroll":
14783 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scroll", domElement));
14784 break;
14785 case "onScrollEnd":
14786 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), listenToNonDelegatedEvent("scrollend", domElement));
14787 break;
14788 case "onClick":
14789 null != value && ("function" !== typeof value && warnForInvalidEventListener(key, value), domElement.onclick = noop$1);
14790 break;
14791 case "suppressContentEditableWarning":
14792 case "suppressHydrationWarning":
14793 case "innerHTML":
14794 case "ref":
14795 break;
14796 case "innerText":
14797 case "textContent":
14798 break;
14799 default:
14800 if (registrationNameDependencies.hasOwnProperty(key))
14801 null != value && "function" !== typeof value && warnForInvalidEventListener(key, value);
14802 else
14803 a: {
14804 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)) {
14805 "function" !== typeof prevValue && null !== prevValue && (key in domElement ? domElement[key] = null : domElement.hasAttribute(key) && domElement.removeAttribute(key));
14806 domElement.addEventListener(tag, value, props);
14807 break a;
14808 }
14809 key in domElement ? domElement[key] = value : true === value ? domElement.setAttribute(key, "") : setValueForAttribute(domElement, key, value);
14810 }
14811 }
14812 }
14813 function setInitialProperties(domElement, tag, props) {
14814 validatePropertiesInDevelopment(tag, props);
14815 switch (tag) {
14816 case "div":
14817 case "span":
14818 case "svg":
14819 case "path":
14820 case "a":
14821 case "g":
14822 case "p":
14823 case "li":
14824 break;
14825 case "img":
14826 listenToNonDelegatedEvent("error", domElement);
14827 listenToNonDelegatedEvent("load", domElement);
14828 var hasSrc = false, hasSrcSet = false, propKey;
14829 for (propKey in props)
14830 if (props.hasOwnProperty(propKey)) {
14831 var propValue = props[propKey];
14832 if (null != propValue)
14833 switch (propKey) {
14834 case "src":
14835 hasSrc = true;
14836 break;
14837 case "srcSet":
14838 hasSrcSet = true;
14839 break;
14840 case "children":
14841 case "dangerouslySetInnerHTML":
14842 throw Error(
14843 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
14844 );
14845 default:
14846 setProp(domElement, tag, propKey, propValue, props, null);
14847 }
14848 }
14849 hasSrcSet && setProp(domElement, tag, "srcSet", props.srcSet, props, null);
14850 hasSrc && setProp(domElement, tag, "src", props.src, props, null);
14851 return;
14852 case "input":
14853 checkControlledValueProps("input", props);
14854 listenToNonDelegatedEvent("invalid", domElement);
14855 var defaultValue = propKey = propValue = hasSrcSet = null, checked = null, defaultChecked = null;
14856 for (hasSrc in props)
14857 if (props.hasOwnProperty(hasSrc)) {
14858 var _propValue = props[hasSrc];
14859 if (null != _propValue)
14860 switch (hasSrc) {
14861 case "name":
14862 hasSrcSet = _propValue;
14863 break;
14864 case "type":
14865 propValue = _propValue;
14866 break;
14867 case "checked":
14868 checked = _propValue;
14869 break;
14870 case "defaultChecked":
14871 defaultChecked = _propValue;
14872 break;
14873 case "value":
14874 propKey = _propValue;
14875 break;
14876 case "defaultValue":
14877 defaultValue = _propValue;
14878 break;
14879 case "children":
14880 case "dangerouslySetInnerHTML":
14881 if (null != _propValue)
14882 throw Error(
14883 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
14884 );
14885 break;
14886 default:
14887 setProp(domElement, tag, hasSrc, _propValue, props, null);
14888 }
14889 }
14890 validateInputProps(domElement, props);
14891 initInput(
14892 domElement,
14893 propKey,
14894 defaultValue,
14895 checked,
14896 defaultChecked,
14897 propValue,
14898 hasSrcSet,
14899 false
14900 );
14901 return;
14902 case "select":
14903 checkControlledValueProps("select", props);
14904 listenToNonDelegatedEvent("invalid", domElement);
14905 hasSrc = propValue = propKey = null;
14906 for (hasSrcSet in props)
14907 if (props.hasOwnProperty(hasSrcSet) && (defaultValue = props[hasSrcSet], null != defaultValue))
14908 switch (hasSrcSet) {
14909 case "value":
14910 propKey = defaultValue;
14911 break;
14912 case "defaultValue":
14913 propValue = defaultValue;
14914 break;
14915 case "multiple":
14916 hasSrc = defaultValue;
14917 default:
14918 setProp(
14919 domElement,
14920 tag,
14921 hasSrcSet,
14922 defaultValue,
14923 props,
14924 null
14925 );
14926 }
14927 validateSelectProps(domElement, props);
14928 tag = propKey;
14929 props = propValue;
14930 domElement.multiple = !!hasSrc;
14931 null != tag ? updateOptions(domElement, !!hasSrc, tag, false) : null != props && updateOptions(domElement, !!hasSrc, props, true);
14932 return;
14933 case "textarea":
14934 checkControlledValueProps("textarea", props);
14935 listenToNonDelegatedEvent("invalid", domElement);
14936 propKey = hasSrcSet = hasSrc = null;
14937 for (propValue in props)
14938 if (props.hasOwnProperty(propValue) && (defaultValue = props[propValue], null != defaultValue))
14939 switch (propValue) {
14940 case "value":
14941 hasSrc = defaultValue;
14942 break;
14943 case "defaultValue":
14944 hasSrcSet = defaultValue;
14945 break;
14946 case "children":
14947 propKey = defaultValue;
14948 break;
14949 case "dangerouslySetInnerHTML":
14950 if (null != defaultValue)
14951 throw Error(
14952 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
14953 );
14954 break;
14955 default:
14956 setProp(
14957 domElement,
14958 tag,
14959 propValue,
14960 defaultValue,
14961 props,
14962 null
14963 );
14964 }
14965 validateTextareaProps(domElement, props);
14966 initTextarea(domElement, hasSrc, hasSrcSet, propKey);
14967 return;
14968 case "option":
14969 validateOptionProps(domElement, props);
14970 for (checked in props)
14971 if (props.hasOwnProperty(checked) && (hasSrc = props[checked], null != hasSrc))
14972 switch (checked) {
14973 case "selected":
14974 domElement.selected = hasSrc && "function" !== typeof hasSrc && "symbol" !== typeof hasSrc;
14975 break;
14976 default:
14977 setProp(domElement, tag, checked, hasSrc, props, null);
14978 }
14979 return;
14980 case "dialog":
14981 listenToNonDelegatedEvent("beforetoggle", domElement);
14982 listenToNonDelegatedEvent("toggle", domElement);
14983 listenToNonDelegatedEvent("cancel", domElement);
14984 listenToNonDelegatedEvent("close", domElement);
14985 break;
14986 case "iframe":
14987 case "object":
14988 listenToNonDelegatedEvent("load", domElement);
14989 break;
14990 case "video":
14991 case "audio":
14992 for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)
14993 listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);
14994 break;
14995 case "image":
14996 listenToNonDelegatedEvent("error", domElement);
14997 listenToNonDelegatedEvent("load", domElement);
14998 break;
14999 case "details":
15000 listenToNonDelegatedEvent("toggle", domElement);
15001 break;
15002 case "embed":
15003 case "source":
15004 case "link":
15005 listenToNonDelegatedEvent("error", domElement), listenToNonDelegatedEvent("load", domElement);
15006 case "area":
15007 case "base":
15008 case "br":
15009 case "col":
15010 case "hr":
15011 case "keygen":
15012 case "meta":
15013 case "param":
15014 case "track":
15015 case "wbr":
15016 case "menuitem":
15017 for (defaultChecked in props)
15018 if (props.hasOwnProperty(defaultChecked) && (hasSrc = props[defaultChecked], null != hasSrc))
15019 switch (defaultChecked) {
15020 case "children":
15021 case "dangerouslySetInnerHTML":
15022 throw Error(
15023 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15024 );
15025 default:
15026 setProp(domElement, tag, defaultChecked, hasSrc, props, null);
15027 }
15028 return;
15029 default:
15030 if (isCustomElement(tag)) {
15031 for (_propValue in props)
15032 props.hasOwnProperty(_propValue) && (hasSrc = props[_propValue], void 0 !== hasSrc && setPropOnCustomElement(
15033 domElement,
15034 tag,
15035 _propValue,
15036 hasSrc,
15037 props,
15038 void 0
15039 ));
15040 return;
15041 }
15042 }
15043 for (defaultValue in props)
15044 props.hasOwnProperty(defaultValue) && (hasSrc = props[defaultValue], null != hasSrc && setProp(domElement, tag, defaultValue, hasSrc, props, null));
15045 }
15046 function updateProperties(domElement, tag, lastProps, nextProps) {
15047 validatePropertiesInDevelopment(tag, nextProps);
15048 switch (tag) {
15049 case "div":
15050 case "span":
15051 case "svg":
15052 case "path":
15053 case "a":
15054 case "g":
15055 case "p":
15056 case "li":
15057 break;
15058 case "input":
15059 var name = null, type = null, value = null, defaultValue = null, lastDefaultValue = null, checked = null, defaultChecked = null;
15060 for (propKey in lastProps) {
15061 var lastProp = lastProps[propKey];
15062 if (lastProps.hasOwnProperty(propKey) && null != lastProp)
15063 switch (propKey) {
15064 case "checked":
15065 break;
15066 case "value":
15067 break;
15068 case "defaultValue":
15069 lastDefaultValue = lastProp;
15070 default:
15071 nextProps.hasOwnProperty(propKey) || setProp(
15072 domElement,
15073 tag,
15074 propKey,
15075 null,
15076 nextProps,
15077 lastProp
15078 );
15079 }
15080 }
15081 for (var _propKey8 in nextProps) {
15082 var propKey = nextProps[_propKey8];
15083 lastProp = lastProps[_propKey8];
15084 if (nextProps.hasOwnProperty(_propKey8) && (null != propKey || null != lastProp))
15085 switch (_propKey8) {
15086 case "type":
15087 type = propKey;
15088 break;
15089 case "name":
15090 name = propKey;
15091 break;
15092 case "checked":
15093 checked = propKey;
15094 break;
15095 case "defaultChecked":
15096 defaultChecked = propKey;
15097 break;
15098 case "value":
15099 value = propKey;
15100 break;
15101 case "defaultValue":
15102 defaultValue = propKey;
15103 break;
15104 case "children":
15105 case "dangerouslySetInnerHTML":
15106 if (null != propKey)
15107 throw Error(
15108 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15109 );
15110 break;
15111 default:
15112 propKey !== lastProp && setProp(
15113 domElement,
15114 tag,
15115 _propKey8,
15116 propKey,
15117 nextProps,
15118 lastProp
15119 );
15120 }
15121 }
15122 tag = "checkbox" === lastProps.type || "radio" === lastProps.type ? null != lastProps.checked : null != lastProps.value;
15123 nextProps = "checkbox" === nextProps.type || "radio" === nextProps.type ? null != nextProps.checked : null != nextProps.value;
15124 tag || !nextProps || didWarnUncontrolledToControlled || (console.error(
15125 "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"
15126 ), didWarnUncontrolledToControlled = true);
15127 !tag || nextProps || didWarnControlledToUncontrolled || (console.error(
15128 "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"
15129 ), didWarnControlledToUncontrolled = true);
15130 updateInput(
15131 domElement,
15132 value,
15133 defaultValue,
15134 lastDefaultValue,
15135 checked,
15136 defaultChecked,
15137 type,
15138 name
15139 );
15140 return;
15141 case "select":
15142 propKey = value = defaultValue = _propKey8 = null;
15143 for (type in lastProps)
15144 if (lastDefaultValue = lastProps[type], lastProps.hasOwnProperty(type) && null != lastDefaultValue)
15145 switch (type) {
15146 case "value":
15147 break;
15148 case "multiple":
15149 propKey = lastDefaultValue;
15150 default:
15151 nextProps.hasOwnProperty(type) || setProp(
15152 domElement,
15153 tag,
15154 type,
15155 null,
15156 nextProps,
15157 lastDefaultValue
15158 );
15159 }
15160 for (name in nextProps)
15161 if (type = nextProps[name], lastDefaultValue = lastProps[name], nextProps.hasOwnProperty(name) && (null != type || null != lastDefaultValue))
15162 switch (name) {
15163 case "value":
15164 _propKey8 = type;
15165 break;
15166 case "defaultValue":
15167 defaultValue = type;
15168 break;
15169 case "multiple":
15170 value = type;
15171 default:
15172 type !== lastDefaultValue && setProp(
15173 domElement,
15174 tag,
15175 name,
15176 type,
15177 nextProps,
15178 lastDefaultValue
15179 );
15180 }
15181 nextProps = defaultValue;
15182 tag = value;
15183 lastProps = propKey;
15184 null != _propKey8 ? updateOptions(domElement, !!tag, _propKey8, false) : !!lastProps !== !!tag && (null != nextProps ? updateOptions(domElement, !!tag, nextProps, true) : updateOptions(domElement, !!tag, tag ? [] : "", false));
15185 return;
15186 case "textarea":
15187 propKey = _propKey8 = null;
15188 for (defaultValue in lastProps)
15189 if (name = lastProps[defaultValue], lastProps.hasOwnProperty(defaultValue) && null != name && !nextProps.hasOwnProperty(defaultValue))
15190 switch (defaultValue) {
15191 case "value":
15192 break;
15193 case "children":
15194 break;
15195 default:
15196 setProp(domElement, tag, defaultValue, null, nextProps, name);
15197 }
15198 for (value in nextProps)
15199 if (name = nextProps[value], type = lastProps[value], nextProps.hasOwnProperty(value) && (null != name || null != type))
15200 switch (value) {
15201 case "value":
15202 _propKey8 = name;
15203 break;
15204 case "defaultValue":
15205 propKey = name;
15206 break;
15207 case "children":
15208 break;
15209 case "dangerouslySetInnerHTML":
15210 if (null != name)
15211 throw Error(
15212 "`dangerouslySetInnerHTML` does not make sense on <textarea>."
15213 );
15214 break;
15215 default:
15216 name !== type && setProp(domElement, tag, value, name, nextProps, type);
15217 }
15218 updateTextarea(domElement, _propKey8, propKey);
15219 return;
15220 case "option":
15221 for (var _propKey13 in lastProps)
15222 if (_propKey8 = lastProps[_propKey13], lastProps.hasOwnProperty(_propKey13) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey13))
15223 switch (_propKey13) {
15224 case "selected":
15225 domElement.selected = false;
15226 break;
15227 default:
15228 setProp(
15229 domElement,
15230 tag,
15231 _propKey13,
15232 null,
15233 nextProps,
15234 _propKey8
15235 );
15236 }
15237 for (lastDefaultValue in nextProps)
15238 if (_propKey8 = nextProps[lastDefaultValue], propKey = lastProps[lastDefaultValue], nextProps.hasOwnProperty(lastDefaultValue) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
15239 switch (lastDefaultValue) {
15240 case "selected":
15241 domElement.selected = _propKey8 && "function" !== typeof _propKey8 && "symbol" !== typeof _propKey8;
15242 break;
15243 default:
15244 setProp(
15245 domElement,
15246 tag,
15247 lastDefaultValue,
15248 _propKey8,
15249 nextProps,
15250 propKey
15251 );
15252 }
15253 return;
15254 case "img":
15255 case "link":
15256 case "area":
15257 case "base":
15258 case "br":
15259 case "col":
15260 case "embed":
15261 case "hr":
15262 case "keygen":
15263 case "meta":
15264 case "param":
15265 case "source":
15266 case "track":
15267 case "wbr":
15268 case "menuitem":
15269 for (var _propKey15 in lastProps)
15270 _propKey8 = lastProps[_propKey15], lastProps.hasOwnProperty(_propKey15) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey15) && setProp(
15271 domElement,
15272 tag,
15273 _propKey15,
15274 null,
15275 nextProps,
15276 _propKey8
15277 );
15278 for (checked in nextProps)
15279 if (_propKey8 = nextProps[checked], propKey = lastProps[checked], nextProps.hasOwnProperty(checked) && _propKey8 !== propKey && (null != _propKey8 || null != propKey))
15280 switch (checked) {
15281 case "children":
15282 case "dangerouslySetInnerHTML":
15283 if (null != _propKey8)
15284 throw Error(
15285 tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`."
15286 );
15287 break;
15288 default:
15289 setProp(
15290 domElement,
15291 tag,
15292 checked,
15293 _propKey8,
15294 nextProps,
15295 propKey
15296 );
15297 }
15298 return;
15299 default:
15300 if (isCustomElement(tag)) {
15301 for (var _propKey17 in lastProps)
15302 _propKey8 = lastProps[_propKey17], lastProps.hasOwnProperty(_propKey17) && void 0 !== _propKey8 && !nextProps.hasOwnProperty(_propKey17) && setPropOnCustomElement(
15303 domElement,
15304 tag,
15305 _propKey17,
15306 void 0,
15307 nextProps,
15308 _propKey8
15309 );
15310 for (defaultChecked in nextProps)
15311 _propKey8 = nextProps[defaultChecked], propKey = lastProps[defaultChecked], !nextProps.hasOwnProperty(defaultChecked) || _propKey8 === propKey || void 0 === _propKey8 && void 0 === propKey || setPropOnCustomElement(
15312 domElement,
15313 tag,
15314 defaultChecked,
15315 _propKey8,
15316 nextProps,
15317 propKey
15318 );
15319 return;
15320 }
15321 }
15322 for (var _propKey19 in lastProps)
15323 _propKey8 = lastProps[_propKey19], lastProps.hasOwnProperty(_propKey19) && null != _propKey8 && !nextProps.hasOwnProperty(_propKey19) && setProp(domElement, tag, _propKey19, null, nextProps, _propKey8);
15324 for (lastProp in nextProps)
15325 _propKey8 = nextProps[lastProp], propKey = lastProps[lastProp], !nextProps.hasOwnProperty(lastProp) || _propKey8 === propKey || null == _propKey8 && null == propKey || setProp(domElement, tag, lastProp, _propKey8, nextProps, propKey);
15326 }
15327 function getPropNameFromAttributeName(attrName) {
15328 switch (attrName) {
15329 case "class":
15330 return "className";
15331 case "for":
15332 return "htmlFor";
15333 default:
15334 return attrName;
15335 }
15336 }
15337 function getStylesObjectFromElement(domElement) {
15338 var serverValueInObjectForm = {};
15339 domElement = domElement.style;
15340 for (var i = 0; i < domElement.length; i++) {
15341 var styleName = domElement[i];
15342 serverValueInObjectForm[styleName] = domElement.getPropertyValue(styleName);
15343 }
15344 return serverValueInObjectForm;
15345 }
15346 function diffHydratedStyles(domElement, value$jscomp$0, serverDifferences) {
15347 if (null != value$jscomp$0 && "object" !== typeof value$jscomp$0)
15348 console.error(
15349 "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX."
15350 );
15351 else {
15352 var clientValue;
15353 var delimiter = clientValue = "", styleName;
15354 for (styleName in value$jscomp$0)
15355 if (value$jscomp$0.hasOwnProperty(styleName)) {
15356 var value = value$jscomp$0[styleName];
15357 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 = ";");
15358 }
15359 clientValue = clientValue || null;
15360 value$jscomp$0 = domElement.getAttribute("style");
15361 value$jscomp$0 !== clientValue && (clientValue = normalizeMarkupForTextOrAttribute(clientValue), normalizeMarkupForTextOrAttribute(value$jscomp$0) !== clientValue && (serverDifferences.style = getStylesObjectFromElement(domElement)));
15362 }
15363 }
15364 function hydrateAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15365 extraAttributes.delete(attributeName);
15366 domElement = domElement.getAttribute(attributeName);
15367 if (null === domElement)
15368 switch (typeof value) {
15369 case "undefined":
15370 case "function":
15371 case "symbol":
15372 case "boolean":
15373 return;
15374 }
15375 else if (null != value)
15376 switch (typeof value) {
15377 case "function":
15378 case "symbol":
15379 case "boolean":
15380 break;
15381 default:
15382 if (checkAttributeStringCoercion(value, propKey), domElement === "" + value)
15383 return;
15384 }
15385 warnForPropDifference(propKey, domElement, value, serverDifferences);
15386 }
15387 function hydrateBooleanAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15388 extraAttributes.delete(attributeName);
15389 domElement = domElement.getAttribute(attributeName);
15390 if (null === domElement) {
15391 switch (typeof value) {
15392 case "function":
15393 case "symbol":
15394 return;
15395 }
15396 if (!value) return;
15397 } else
15398 switch (typeof value) {
15399 case "function":
15400 case "symbol":
15401 break;
15402 default:
15403 if (value) return;
15404 }
15405 warnForPropDifference(propKey, domElement, value, serverDifferences);
15406 }
15407 function hydrateBooleanishAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15408 extraAttributes.delete(attributeName);
15409 domElement = domElement.getAttribute(attributeName);
15410 if (null === domElement)
15411 switch (typeof value) {
15412 case "undefined":
15413 case "function":
15414 case "symbol":
15415 return;
15416 }
15417 else if (null != value)
15418 switch (typeof value) {
15419 case "function":
15420 case "symbol":
15421 break;
15422 default:
15423 if (checkAttributeStringCoercion(value, attributeName), domElement === "" + value)
15424 return;
15425 }
15426 warnForPropDifference(propKey, domElement, value, serverDifferences);
15427 }
15428 function hydrateNumericAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15429 extraAttributes.delete(attributeName);
15430 domElement = domElement.getAttribute(attributeName);
15431 if (null === domElement)
15432 switch (typeof value) {
15433 case "undefined":
15434 case "function":
15435 case "symbol":
15436 case "boolean":
15437 return;
15438 default:
15439 if (isNaN(value)) return;
15440 }
15441 else if (null != value)
15442 switch (typeof value) {
15443 case "function":
15444 case "symbol":
15445 case "boolean":
15446 break;
15447 default:
15448 if (!isNaN(value) && (checkAttributeStringCoercion(value, propKey), domElement === "" + value))
15449 return;
15450 }
15451 warnForPropDifference(propKey, domElement, value, serverDifferences);
15452 }
15453 function hydrateSanitizedAttribute(domElement, propKey, attributeName, value, extraAttributes, serverDifferences) {
15454 extraAttributes.delete(attributeName);
15455 domElement = domElement.getAttribute(attributeName);
15456 if (null === domElement)
15457 switch (typeof value) {
15458 case "undefined":
15459 case "function":
15460 case "symbol":
15461 case "boolean":
15462 return;
15463 }
15464 else if (null != value)
15465 switch (typeof value) {
15466 case "function":
15467 case "symbol":
15468 case "boolean":
15469 break;
15470 default:
15471 if (checkAttributeStringCoercion(value, propKey), attributeName = sanitizeURL("" + value), domElement === attributeName)
15472 return;
15473 }
15474 warnForPropDifference(propKey, domElement, value, serverDifferences);
15475 }
15476 function diffHydratedProperties(domElement, tag, props, hostContext) {
15477 for (var serverDifferences = {}, extraAttributes = /* @__PURE__ */ new Set(), attributes = domElement.attributes, i = 0; i < attributes.length; i++)
15478 switch (attributes[i].name.toLowerCase()) {
15479 case "value":
15480 break;
15481 case "checked":
15482 break;
15483 case "selected":
15484 break;
15485 default:
15486 extraAttributes.add(attributes[i].name);
15487 }
15488 if (isCustomElement(tag))
15489 for (var propKey in props) {
15490 if (props.hasOwnProperty(propKey)) {
15491 var value = props[propKey];
15492 if (null != value) {
15493 if (registrationNameDependencies.hasOwnProperty(propKey))
15494 "function" !== typeof value && warnForInvalidEventListener(propKey, value);
15495 else if (true !== props.suppressHydrationWarning)
15496 switch (propKey) {
15497 case "children":
15498 "string" !== typeof value && "number" !== typeof value || warnForPropDifference(
15499 "children",
15500 domElement.textContent,
15501 value,
15502 serverDifferences
15503 );
15504 continue;
15505 case "suppressContentEditableWarning":
15506 case "suppressHydrationWarning":
15507 case "defaultValue":
15508 case "defaultChecked":
15509 case "innerHTML":
15510 case "ref":
15511 continue;
15512 case "dangerouslySetInnerHTML":
15513 attributes = domElement.innerHTML;
15514 value = value ? value.__html : void 0;
15515 null != value && (value = normalizeHTML(domElement, value), warnForPropDifference(
15516 propKey,
15517 attributes,
15518 value,
15519 serverDifferences
15520 ));
15521 continue;
15522 case "style":
15523 extraAttributes.delete(propKey);
15524 diffHydratedStyles(domElement, value, serverDifferences);
15525 continue;
15526 case "offsetParent":
15527 case "offsetTop":
15528 case "offsetLeft":
15529 case "offsetWidth":
15530 case "offsetHeight":
15531 case "isContentEditable":
15532 case "outerText":
15533 case "outerHTML":
15534 extraAttributes.delete(propKey.toLowerCase());
15535 console.error(
15536 "Assignment to read-only property will result in a no-op: `%s`",
15537 propKey
15538 );
15539 continue;
15540 case "className":
15541 extraAttributes.delete("class");
15542 attributes = getValueForAttributeOnCustomComponent(
15543 domElement,
15544 "class",
15545 value
15546 );
15547 warnForPropDifference(
15548 "className",
15549 attributes,
15550 value,
15551 serverDifferences
15552 );
15553 continue;
15554 default:
15555 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(propKey.toLowerCase()) : extraAttributes.delete(propKey), attributes = getValueForAttributeOnCustomComponent(
15556 domElement,
15557 propKey,
15558 value
15559 ), warnForPropDifference(
15560 propKey,
15561 attributes,
15562 value,
15563 serverDifferences
15564 );
15565 }
15566 }
15567 }
15568 }
15569 else
15570 for (value in props)
15571 if (props.hasOwnProperty(value) && (propKey = props[value], null != propKey)) {
15572 if (registrationNameDependencies.hasOwnProperty(value))
15573 "function" !== typeof propKey && warnForInvalidEventListener(value, propKey);
15574 else if (true !== props.suppressHydrationWarning)
15575 switch (value) {
15576 case "children":
15577 "string" !== typeof propKey && "number" !== typeof propKey || warnForPropDifference(
15578 "children",
15579 domElement.textContent,
15580 propKey,
15581 serverDifferences
15582 );
15583 continue;
15584 case "suppressContentEditableWarning":
15585 case "suppressHydrationWarning":
15586 case "value":
15587 case "checked":
15588 case "selected":
15589 case "defaultValue":
15590 case "defaultChecked":
15591 case "innerHTML":
15592 case "ref":
15593 continue;
15594 case "dangerouslySetInnerHTML":
15595 attributes = domElement.innerHTML;
15596 propKey = propKey ? propKey.__html : void 0;
15597 null != propKey && (propKey = normalizeHTML(domElement, propKey), attributes !== propKey && (serverDifferences[value] = { __html: attributes }));
15598 continue;
15599 case "className":
15600 hydrateAttribute(
15601 domElement,
15602 value,
15603 "class",
15604 propKey,
15605 extraAttributes,
15606 serverDifferences
15607 );
15608 continue;
15609 case "tabIndex":
15610 hydrateAttribute(
15611 domElement,
15612 value,
15613 "tabindex",
15614 propKey,
15615 extraAttributes,
15616 serverDifferences
15617 );
15618 continue;
15619 case "style":
15620 extraAttributes.delete(value);
15621 diffHydratedStyles(domElement, propKey, serverDifferences);
15622 continue;
15623 case "multiple":
15624 extraAttributes.delete(value);
15625 warnForPropDifference(
15626 value,
15627 domElement.multiple,
15628 propKey,
15629 serverDifferences
15630 );
15631 continue;
15632 case "muted":
15633 extraAttributes.delete(value);
15634 warnForPropDifference(
15635 value,
15636 domElement.muted,
15637 propKey,
15638 serverDifferences
15639 );
15640 continue;
15641 case "autoFocus":
15642 extraAttributes.delete("autofocus");
15643 warnForPropDifference(
15644 value,
15645 domElement.autofocus,
15646 propKey,
15647 serverDifferences
15648 );
15649 continue;
15650 case "data":
15651 if ("object" !== tag) {
15652 extraAttributes.delete(value);
15653 attributes = domElement.getAttribute("data");
15654 warnForPropDifference(
15655 value,
15656 attributes,
15657 propKey,
15658 serverDifferences
15659 );
15660 continue;
15661 }
15662 case "src":
15663 case "href":
15664 if (!("" !== propKey || "a" === tag && "href" === value || "object" === tag && "data" === value)) {
15665 "src" === value ? console.error(
15666 '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.',
15667 value,
15668 value
15669 ) : console.error(
15670 '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.',
15671 value,
15672 value
15673 );
15674 continue;
15675 }
15676 hydrateSanitizedAttribute(
15677 domElement,
15678 value,
15679 value,
15680 propKey,
15681 extraAttributes,
15682 serverDifferences
15683 );
15684 continue;
15685 case "action":
15686 case "formAction":
15687 attributes = domElement.getAttribute(value);
15688 if ("function" === typeof propKey) {
15689 extraAttributes.delete(value.toLowerCase());
15690 "formAction" === value ? (extraAttributes.delete("name"), extraAttributes.delete("formenctype"), extraAttributes.delete("formmethod"), extraAttributes.delete("formtarget")) : (extraAttributes.delete("enctype"), extraAttributes.delete("method"), extraAttributes.delete("target"));
15691 continue;
15692 } else if (attributes === EXPECTED_FORM_ACTION_URL) {
15693 extraAttributes.delete(value.toLowerCase());
15694 warnForPropDifference(
15695 value,
15696 "function",
15697 propKey,
15698 serverDifferences
15699 );
15700 continue;
15701 }
15702 hydrateSanitizedAttribute(
15703 domElement,
15704 value,
15705 value.toLowerCase(),
15706 propKey,
15707 extraAttributes,
15708 serverDifferences
15709 );
15710 continue;
15711 case "xlinkHref":
15712 hydrateSanitizedAttribute(
15713 domElement,
15714 value,
15715 "xlink:href",
15716 propKey,
15717 extraAttributes,
15718 serverDifferences
15719 );
15720 continue;
15721 case "contentEditable":
15722 hydrateBooleanishAttribute(
15723 domElement,
15724 value,
15725 "contenteditable",
15726 propKey,
15727 extraAttributes,
15728 serverDifferences
15729 );
15730 continue;
15731 case "spellCheck":
15732 hydrateBooleanishAttribute(
15733 domElement,
15734 value,
15735 "spellcheck",
15736 propKey,
15737 extraAttributes,
15738 serverDifferences
15739 );
15740 continue;
15741 case "draggable":
15742 case "autoReverse":
15743 case "externalResourcesRequired":
15744 case "focusable":
15745 case "preserveAlpha":
15746 hydrateBooleanishAttribute(
15747 domElement,
15748 value,
15749 value,
15750 propKey,
15751 extraAttributes,
15752 serverDifferences
15753 );
15754 continue;
15755 case "allowFullScreen":
15756 case "async":
15757 case "autoPlay":
15758 case "controls":
15759 case "default":
15760 case "defer":
15761 case "disabled":
15762 case "disablePictureInPicture":
15763 case "disableRemotePlayback":
15764 case "formNoValidate":
15765 case "hidden":
15766 case "loop":
15767 case "noModule":
15768 case "noValidate":
15769 case "open":
15770 case "playsInline":
15771 case "readOnly":
15772 case "required":
15773 case "reversed":
15774 case "scoped":
15775 case "seamless":
15776 case "itemScope":
15777 hydrateBooleanAttribute(
15778 domElement,
15779 value,
15780 value.toLowerCase(),
15781 propKey,
15782 extraAttributes,
15783 serverDifferences
15784 );
15785 continue;
15786 case "capture":
15787 case "download":
15788 a: {
15789 i = domElement;
15790 var attributeName = attributes = value, serverDifferences$jscomp$0 = serverDifferences;
15791 extraAttributes.delete(attributeName);
15792 i = i.getAttribute(attributeName);
15793 if (null === i)
15794 switch (typeof propKey) {
15795 case "undefined":
15796 case "function":
15797 case "symbol":
15798 break a;
15799 default:
15800 if (false === propKey) break a;
15801 }
15802 else if (null != propKey)
15803 switch (typeof propKey) {
15804 case "function":
15805 case "symbol":
15806 break;
15807 case "boolean":
15808 if (true === propKey && "" === i) break a;
15809 break;
15810 default:
15811 if (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey)
15812 break a;
15813 }
15814 warnForPropDifference(
15815 attributes,
15816 i,
15817 propKey,
15818 serverDifferences$jscomp$0
15819 );
15820 }
15821 continue;
15822 case "cols":
15823 case "rows":
15824 case "size":
15825 case "span":
15826 a: {
15827 i = domElement;
15828 attributeName = attributes = value;
15829 serverDifferences$jscomp$0 = serverDifferences;
15830 extraAttributes.delete(attributeName);
15831 i = i.getAttribute(attributeName);
15832 if (null === i)
15833 switch (typeof propKey) {
15834 case "undefined":
15835 case "function":
15836 case "symbol":
15837 case "boolean":
15838 break a;
15839 default:
15840 if (isNaN(propKey) || 1 > propKey) break a;
15841 }
15842 else if (null != propKey)
15843 switch (typeof propKey) {
15844 case "function":
15845 case "symbol":
15846 case "boolean":
15847 break;
15848 default:
15849 if (!(isNaN(propKey) || 1 > propKey) && (checkAttributeStringCoercion(propKey, attributes), i === "" + propKey))
15850 break a;
15851 }
15852 warnForPropDifference(
15853 attributes,
15854 i,
15855 propKey,
15856 serverDifferences$jscomp$0
15857 );
15858 }
15859 continue;
15860 case "rowSpan":
15861 hydrateNumericAttribute(
15862 domElement,
15863 value,
15864 "rowspan",
15865 propKey,
15866 extraAttributes,
15867 serverDifferences
15868 );
15869 continue;
15870 case "start":
15871 hydrateNumericAttribute(
15872 domElement,
15873 value,
15874 value,
15875 propKey,
15876 extraAttributes,
15877 serverDifferences
15878 );
15879 continue;
15880 case "xHeight":
15881 hydrateAttribute(
15882 domElement,
15883 value,
15884 "x-height",
15885 propKey,
15886 extraAttributes,
15887 serverDifferences
15888 );
15889 continue;
15890 case "xlinkActuate":
15891 hydrateAttribute(
15892 domElement,
15893 value,
15894 "xlink:actuate",
15895 propKey,
15896 extraAttributes,
15897 serverDifferences
15898 );
15899 continue;
15900 case "xlinkArcrole":
15901 hydrateAttribute(
15902 domElement,
15903 value,
15904 "xlink:arcrole",
15905 propKey,
15906 extraAttributes,
15907 serverDifferences
15908 );
15909 continue;
15910 case "xlinkRole":
15911 hydrateAttribute(
15912 domElement,
15913 value,
15914 "xlink:role",
15915 propKey,
15916 extraAttributes,
15917 serverDifferences
15918 );
15919 continue;
15920 case "xlinkShow":
15921 hydrateAttribute(
15922 domElement,
15923 value,
15924 "xlink:show",
15925 propKey,
15926 extraAttributes,
15927 serverDifferences
15928 );
15929 continue;
15930 case "xlinkTitle":
15931 hydrateAttribute(
15932 domElement,
15933 value,
15934 "xlink:title",
15935 propKey,
15936 extraAttributes,
15937 serverDifferences
15938 );
15939 continue;
15940 case "xlinkType":
15941 hydrateAttribute(
15942 domElement,
15943 value,
15944 "xlink:type",
15945 propKey,
15946 extraAttributes,
15947 serverDifferences
15948 );
15949 continue;
15950 case "xmlBase":
15951 hydrateAttribute(
15952 domElement,
15953 value,
15954 "xml:base",
15955 propKey,
15956 extraAttributes,
15957 serverDifferences
15958 );
15959 continue;
15960 case "xmlLang":
15961 hydrateAttribute(
15962 domElement,
15963 value,
15964 "xml:lang",
15965 propKey,
15966 extraAttributes,
15967 serverDifferences
15968 );
15969 continue;
15970 case "xmlSpace":
15971 hydrateAttribute(
15972 domElement,
15973 value,
15974 "xml:space",
15975 propKey,
15976 extraAttributes,
15977 serverDifferences
15978 );
15979 continue;
15980 case "inert":
15981 "" !== propKey || didWarnForNewBooleanPropsWithEmptyValue[value] || (didWarnForNewBooleanPropsWithEmptyValue[value] = true, console.error(
15982 "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.",
15983 value
15984 ));
15985 hydrateBooleanAttribute(
15986 domElement,
15987 value,
15988 value,
15989 propKey,
15990 extraAttributes,
15991 serverDifferences
15992 );
15993 continue;
15994 default:
15995 if (!(2 < value.length) || "o" !== value[0] && "O" !== value[0] || "n" !== value[1] && "N" !== value[1]) {
15996 i = getAttributeAlias(value);
15997 attributes = false;
15998 hostContext.context === HostContextNamespaceNone && "svg" !== tag && "math" !== tag ? extraAttributes.delete(i.toLowerCase()) : (attributeName = value.toLowerCase(), attributeName = possibleStandardNames.hasOwnProperty(
15999 attributeName
16000 ) ? possibleStandardNames[attributeName] || null : null, null !== attributeName && attributeName !== value && (attributes = true, extraAttributes.delete(attributeName)), extraAttributes.delete(i));
16001 a: if (attributeName = domElement, serverDifferences$jscomp$0 = i, i = propKey, isAttributeNameSafe(serverDifferences$jscomp$0))
16002 if (attributeName.hasAttribute(serverDifferences$jscomp$0))
16003 attributeName = attributeName.getAttribute(
16004 serverDifferences$jscomp$0
16005 ), checkAttributeStringCoercion(
16006 i,
16007 serverDifferences$jscomp$0
16008 ), i = attributeName === "" + i ? i : attributeName;
16009 else {
16010 switch (typeof i) {
16011 case "function":
16012 case "symbol":
16013 break a;
16014 case "boolean":
16015 if (attributeName = serverDifferences$jscomp$0.toLowerCase().slice(0, 5), "data-" !== attributeName && "aria-" !== attributeName)
16016 break a;
16017 }
16018 i = void 0 === i ? void 0 : null;
16019 }
16020 else i = void 0;
16021 attributes || warnForPropDifference(
16022 value,
16023 i,
16024 propKey,
16025 serverDifferences
16026 );
16027 }
16028 }
16029 }
16030 0 < extraAttributes.size && true !== props.suppressHydrationWarning && warnForExtraAttributes(domElement, extraAttributes, serverDifferences);
16031 return 0 === Object.keys(serverDifferences).length ? null : serverDifferences;
16032 }
16033 function propNamesListJoin(list, combinator) {
16034 switch (list.length) {
16035 case 0:
16036 return "";
16037 case 1:
16038 return list[0];
16039 case 2:
16040 return list[0] + " " + combinator + " " + list[1];
16041 default:
16042 return list.slice(0, -1).join(", ") + ", " + combinator + " " + list[list.length - 1];
16043 }
16044 }
16045 function isLikelyStaticResource(initiatorType) {
16046 switch (initiatorType) {
16047 case "css":
16048 case "script":
16049 case "font":
16050 case "img":
16051 case "image":
16052 case "input":
16053 case "link":
16054 return true;
16055 default:
16056 return false;
16057 }
16058 }
16059 function estimateBandwidth() {
16060 if ("function" === typeof performance.getEntriesByType) {
16061 for (var count = 0, bits = 0, resourceEntries = performance.getEntriesByType("resource"), i = 0; i < resourceEntries.length; i++) {
16062 var entry = resourceEntries[i], transferSize = entry.transferSize, initiatorType = entry.initiatorType, duration = entry.duration;
16063 if (transferSize && duration && isLikelyStaticResource(initiatorType)) {
16064 initiatorType = 0;
16065 duration = entry.responseEnd;
16066 for (i += 1; i < resourceEntries.length; i++) {
16067 var overlapEntry = resourceEntries[i], overlapStartTime = overlapEntry.startTime;
16068 if (overlapStartTime > duration) break;
16069 var overlapTransferSize = overlapEntry.transferSize, overlapInitiatorType = overlapEntry.initiatorType;
16070 overlapTransferSize && isLikelyStaticResource(overlapInitiatorType) && (overlapEntry = overlapEntry.responseEnd, initiatorType += overlapTransferSize * (overlapEntry < duration ? 1 : (duration - overlapStartTime) / (overlapEntry - overlapStartTime)));
16071 }
16072 --i;
16073 bits += 8 * (transferSize + initiatorType) / (entry.duration / 1e3);
16074 count++;
16075 if (10 < count) break;
16076 }
16077 }
16078 if (0 < count) return bits / count / 1e6;
16079 }
16080 return navigator.connection && (count = navigator.connection.downlink, "number" === typeof count) ? count : 5;
16081 }
16082 function getOwnerDocumentFromRootContainer(rootContainerElement) {
16083 return 9 === rootContainerElement.nodeType ? rootContainerElement : rootContainerElement.ownerDocument;
16084 }
16085 function getOwnHostContext(namespaceURI) {
16086 switch (namespaceURI) {
16087 case SVG_NAMESPACE:
16088 return HostContextNamespaceSvg;
16089 case MATH_NAMESPACE:
16090 return HostContextNamespaceMath;
16091 default:
16092 return HostContextNamespaceNone;
16093 }
16094 }
16095 function getChildHostContextProd(parentNamespace, type) {
16096 if (parentNamespace === HostContextNamespaceNone)
16097 switch (type) {
16098 case "svg":
16099 return HostContextNamespaceSvg;
16100 case "math":
16101 return HostContextNamespaceMath;
16102 default:
16103 return HostContextNamespaceNone;
16104 }
16105 return parentNamespace === HostContextNamespaceSvg && "foreignObject" === type ? HostContextNamespaceNone : parentNamespace;
16106 }
16107 function shouldSetTextContent(type, props) {
16108 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;
16109 }
16110 function shouldAttemptEagerTransition() {
16111 var event = window.event;
16112 if (event && "popstate" === event.type) {
16113 if (event === currentPopstateTransitionEvent) return false;
16114 currentPopstateTransitionEvent = event;
16115 return true;
16116 }
16117 currentPopstateTransitionEvent = null;
16118 return false;
16119 }
16120 function resolveEventType() {
16121 var event = window.event;
16122 return event && event !== schedulerEvent ? event.type : null;
16123 }
16124 function resolveEventTimeStamp() {
16125 var event = window.event;
16126 return event && event !== schedulerEvent ? event.timeStamp : -1.1;
16127 }
16128 function handleErrorInNextTick(error) {
16129 setTimeout(function() {
16130 throw error;
16131 });
16132 }
16133 function commitMount(domElement, type, newProps) {
16134 switch (type) {
16135 case "button":
16136 case "input":
16137 case "select":
16138 case "textarea":
16139 newProps.autoFocus && domElement.focus();
16140 break;
16141 case "img":
16142 newProps.src ? domElement.src = newProps.src : newProps.srcSet && (domElement.srcset = newProps.srcSet);
16143 }
16144 }
16145 function commitHydratedInstance() {
16146 }
16147 function commitUpdate(domElement, type, oldProps, newProps) {
16148 updateProperties(domElement, type, oldProps, newProps);
16149 domElement[internalPropsKey] = newProps;
16150 }
16151 function resetTextContent(domElement) {
16152 setTextContent(domElement, "");
16153 }
16154 function commitTextUpdate(textInstance, oldText, newText) {
16155 textInstance.nodeValue = newText;
16156 }
16157 function warnForReactChildrenConflict(container) {
16158 if (!container.__reactWarnedAboutChildrenConflict) {
16159 var props = container[internalPropsKey] || null;
16160 if (null !== props) {
16161 var fiber = getInstanceFromNode(container);
16162 null !== fiber && ("string" === typeof props.children || "number" === typeof props.children ? (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
16163 console.error(
16164 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
16165 );
16166 })) : null != props.dangerouslySetInnerHTML && (container.__reactWarnedAboutChildrenConflict = true, runWithFiberInDEV(fiber, function() {
16167 console.error(
16168 'Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.'
16169 );
16170 })));
16171 }
16172 }
16173 }
16174 function isSingletonScope(type) {
16175 return "head" === type;
16176 }
16177 function removeChild(parentInstance, child) {
16178 parentInstance.removeChild(child);
16179 }
16180 function removeChildFromContainer(container, child) {
16181 (9 === container.nodeType ? container.body : "HTML" === container.nodeName ? container.ownerDocument.body : container).removeChild(child);
16182 }
16183 function clearHydrationBoundary(parentInstance, hydrationInstance) {
16184 var node = hydrationInstance, depth = 0;
16185 do {
16186 var nextNode = node.nextSibling;
16187 parentInstance.removeChild(node);
16188 if (nextNode && 8 === nextNode.nodeType)
16189 if (node = nextNode.data, node === SUSPENSE_END_DATA || node === ACTIVITY_END_DATA) {
16190 if (0 === depth) {
16191 parentInstance.removeChild(nextNode);
16192 retryIfBlockedOn(hydrationInstance);
16193 return;
16194 }
16195 depth--;
16196 } else if (node === SUSPENSE_START_DATA || node === SUSPENSE_PENDING_START_DATA || node === SUSPENSE_QUEUED_START_DATA || node === SUSPENSE_FALLBACK_START_DATA || node === ACTIVITY_START_DATA)
16197 depth++;
16198 else if (node === PREAMBLE_CONTRIBUTION_HTML)
16199 releaseSingletonInstance(
16200 parentInstance.ownerDocument.documentElement
16201 );
16202 else if (node === PREAMBLE_CONTRIBUTION_HEAD) {
16203 node = parentInstance.ownerDocument.head;
16204 releaseSingletonInstance(node);
16205 for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {
16206 var nextNode$jscomp$0 = node$jscomp$0.nextSibling, nodeName = node$jscomp$0.nodeName;
16207 node$jscomp$0[internalHoistableMarker] || "SCRIPT" === nodeName || "STYLE" === nodeName || "LINK" === nodeName && "stylesheet" === node$jscomp$0.rel.toLowerCase() || node.removeChild(node$jscomp$0);
16208 node$jscomp$0 = nextNode$jscomp$0;
16209 }
16210 } else
16211 node === PREAMBLE_CONTRIBUTION_BODY && releaseSingletonInstance(parentInstance.ownerDocument.body);
16212 node = nextNode;
16213 } while (node);
16214 retryIfBlockedOn(hydrationInstance);
16215 }
16216 function hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {
16217 var node = suspenseInstance;
16218 suspenseInstance = 0;
16219 do {
16220 var nextNode = node.nextSibling;
16221 1 === node.nodeType ? isHidden ? (node._stashedDisplay = node.style.display, node.style.display = "none") : (node.style.display = node._stashedDisplay || "", "" === node.getAttribute("style") && node.removeAttribute("style")) : 3 === node.nodeType && (isHidden ? (node._stashedText = node.nodeValue, node.nodeValue = "") : node.nodeValue = node._stashedText || "");
16222 if (nextNode && 8 === nextNode.nodeType)
16223 if (node = nextNode.data, node === SUSPENSE_END_DATA)
16224 if (0 === suspenseInstance) break;
16225 else suspenseInstance--;
16226 else
16227 node !== SUSPENSE_START_DATA && node !== SUSPENSE_PENDING_START_DATA && node !== SUSPENSE_QUEUED_START_DATA && node !== SUSPENSE_FALLBACK_START_DATA || suspenseInstance++;
16228 node = nextNode;
16229 } while (node);
16230 }
16231 function hideDehydratedBoundary(suspenseInstance) {
16232 hideOrUnhideDehydratedBoundary(suspenseInstance, true);
16233 }
16234 function hideInstance(instance) {
16235 instance = instance.style;
16236 "function" === typeof instance.setProperty ? instance.setProperty("display", "none", "important") : instance.display = "none";
16237 }
16238 function hideTextInstance(textInstance) {
16239 textInstance.nodeValue = "";
16240 }
16241 function unhideDehydratedBoundary(dehydratedInstance) {
16242 hideOrUnhideDehydratedBoundary(dehydratedInstance, false);
16243 }
16244 function unhideInstance(instance, props) {
16245 props = props[STYLE];
16246 props = void 0 !== props && null !== props && props.hasOwnProperty("display") ? props.display : null;
16247 instance.style.display = null == props || "boolean" === typeof props ? "" : ("" + props).trim();
16248 }
16249 function unhideTextInstance(textInstance, text) {
16250 textInstance.nodeValue = text;
16251 }
16252 function clearContainerSparingly(container) {
16253 var nextNode = container.firstChild;
16254 nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);
16255 for (; nextNode; ) {
16256 var node = nextNode;
16257 nextNode = nextNode.nextSibling;
16258 switch (node.nodeName) {
16259 case "HTML":
16260 case "HEAD":
16261 case "BODY":
16262 clearContainerSparingly(node);
16263 detachDeletedInstance(node);
16264 continue;
16265 case "SCRIPT":
16266 case "STYLE":
16267 continue;
16268 case "LINK":
16269 if ("stylesheet" === node.rel.toLowerCase()) continue;
16270 }
16271 container.removeChild(node);
16272 }
16273 }
16274 function canHydrateInstance(instance, type, props, inRootOrSingleton) {
16275 for (; 1 === instance.nodeType; ) {
16276 var anyProps = props;
16277 if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {
16278 if (!inRootOrSingleton && ("INPUT" !== instance.nodeName || "hidden" !== instance.type))
16279 break;
16280 } else if (!inRootOrSingleton)
16281 if ("input" === type && "hidden" === instance.type) {
16282 checkAttributeStringCoercion(anyProps.name, "name");
16283 var name = null == anyProps.name ? null : "" + anyProps.name;
16284 if ("hidden" === anyProps.type && instance.getAttribute("name") === name)
16285 return instance;
16286 } else return instance;
16287 else if (!instance[internalHoistableMarker])
16288 switch (type) {
16289 case "meta":
16290 if (!instance.hasAttribute("itemprop")) break;
16291 return instance;
16292 case "link":
16293 name = instance.getAttribute("rel");
16294 if ("stylesheet" === name && instance.hasAttribute("data-precedence"))
16295 break;
16296 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))
16297 break;
16298 return instance;
16299 case "style":
16300 if (instance.hasAttribute("data-precedence")) break;
16301 return instance;
16302 case "script":
16303 name = instance.getAttribute("src");
16304 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"))
16305 break;
16306 return instance;
16307 default:
16308 return instance;
16309 }
16310 instance = getNextHydratable(instance.nextSibling);
16311 if (null === instance) break;
16312 }
16313 return null;
16314 }
16315 function canHydrateTextInstance(instance, text, inRootOrSingleton) {
16316 if ("" === text) return null;
16317 for (; 3 !== instance.nodeType; ) {
16318 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
16319 return null;
16320 instance = getNextHydratable(instance.nextSibling);
16321 if (null === instance) return null;
16322 }
16323 return instance;
16324 }
16325 function canHydrateHydrationBoundary(instance, inRootOrSingleton) {
16326 for (; 8 !== instance.nodeType; ) {
16327 if ((1 !== instance.nodeType || "INPUT" !== instance.nodeName || "hidden" !== instance.type) && !inRootOrSingleton)
16328 return null;
16329 instance = getNextHydratable(instance.nextSibling);
16330 if (null === instance) return null;
16331 }
16332 return instance;
16333 }
16334 function isSuspenseInstancePending(instance) {
16335 return instance.data === SUSPENSE_PENDING_START_DATA || instance.data === SUSPENSE_QUEUED_START_DATA;
16336 }
16337 function isSuspenseInstanceFallback(instance) {
16338 return instance.data === SUSPENSE_FALLBACK_START_DATA || instance.data === SUSPENSE_PENDING_START_DATA && instance.ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING;
16339 }
16340 function registerSuspenseInstanceRetry(instance, callback) {
16341 var ownerDocument = instance.ownerDocument;
16342 if (instance.data === SUSPENSE_QUEUED_START_DATA)
16343 instance._reactRetry = callback;
16344 else if (instance.data !== SUSPENSE_PENDING_START_DATA || ownerDocument.readyState !== DOCUMENT_READY_STATE_LOADING)
16345 callback();
16346 else {
16347 var listener = function() {
16348 callback();
16349 ownerDocument.removeEventListener("DOMContentLoaded", listener);
16350 };
16351 ownerDocument.addEventListener("DOMContentLoaded", listener);
16352 instance._reactRetry = listener;
16353 }
16354 }
16355 function getNextHydratable(node) {
16356 for (; null != node; node = node.nextSibling) {
16357 var nodeType = node.nodeType;
16358 if (1 === nodeType || 3 === nodeType) break;
16359 if (8 === nodeType) {
16360 nodeType = node.data;
16361 if (nodeType === SUSPENSE_START_DATA || nodeType === SUSPENSE_FALLBACK_START_DATA || nodeType === SUSPENSE_PENDING_START_DATA || nodeType === SUSPENSE_QUEUED_START_DATA || nodeType === ACTIVITY_START_DATA || nodeType === FORM_STATE_IS_MATCHING || nodeType === FORM_STATE_IS_NOT_MATCHING)
16362 break;
16363 if (nodeType === SUSPENSE_END_DATA || nodeType === ACTIVITY_END_DATA)
16364 return null;
16365 }
16366 }
16367 return node;
16368 }
16369 function describeHydratableInstanceForDevWarnings(instance) {
16370 if (1 === instance.nodeType) {
16371 for (var JSCompiler_temp_const = instance.nodeName.toLowerCase(), serverDifferences = {}, attributes = instance.attributes, i = 0; i < attributes.length; i++) {
16372 var attr = attributes[i];
16373 serverDifferences[getPropNameFromAttributeName(attr.name)] = "style" === attr.name.toLowerCase() ? getStylesObjectFromElement(instance) : attr.value;
16374 }
16375 return { type: JSCompiler_temp_const, props: serverDifferences };
16376 }
16377 return 8 === instance.nodeType ? instance.data === ACTIVITY_START_DATA ? { type: "Activity", props: {} } : { type: "Suspense", props: {} } : instance.nodeValue;
16378 }
16379 function diffHydratedTextForDevWarnings(textInstance, text, parentProps) {
16380 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;
16381 }
16382 function getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {
16383 hydrationInstance = hydrationInstance.nextSibling;
16384 for (var depth = 0; hydrationInstance; ) {
16385 if (8 === hydrationInstance.nodeType) {
16386 var data = hydrationInstance.data;
16387 if (data === SUSPENSE_END_DATA || data === ACTIVITY_END_DATA) {
16388 if (0 === depth)
16389 return getNextHydratable(hydrationInstance.nextSibling);
16390 depth--;
16391 } else
16392 data !== SUSPENSE_START_DATA && data !== SUSPENSE_FALLBACK_START_DATA && data !== SUSPENSE_PENDING_START_DATA && data !== SUSPENSE_QUEUED_START_DATA && data !== ACTIVITY_START_DATA || depth++;
16393 }
16394 hydrationInstance = hydrationInstance.nextSibling;
16395 }
16396 return null;
16397 }
16398 function getParentHydrationBoundary(targetInstance) {
16399 targetInstance = targetInstance.previousSibling;
16400 for (var depth = 0; targetInstance; ) {
16401 if (8 === targetInstance.nodeType) {
16402 var data = targetInstance.data;
16403 if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_QUEUED_START_DATA || data === ACTIVITY_START_DATA) {
16404 if (0 === depth) return targetInstance;
16405 depth--;
16406 } else
16407 data !== SUSPENSE_END_DATA && data !== ACTIVITY_END_DATA || depth++;
16408 }
16409 targetInstance = targetInstance.previousSibling;
16410 }
16411 return null;
16412 }
16413 function commitHydratedContainer(container) {
16414 retryIfBlockedOn(container);
16415 }
16416 function commitHydratedActivityInstance(activityInstance) {
16417 retryIfBlockedOn(activityInstance);
16418 }
16419 function commitHydratedSuspenseInstance(suspenseInstance) {
16420 retryIfBlockedOn(suspenseInstance);
16421 }
16422 function resolveSingletonInstance(type, props, rootContainerInstance, hostContext, validateDOMNestingDev) {
16423 validateDOMNestingDev && validateDOMNesting(type, hostContext.ancestorInfo);
16424 props = getOwnerDocumentFromRootContainer(rootContainerInstance);
16425 switch (type) {
16426 case "html":
16427 type = props.documentElement;
16428 if (!type)
16429 throw Error(
16430 "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."
16431 );
16432 return type;
16433 case "head":
16434 type = props.head;
16435 if (!type)
16436 throw Error(
16437 "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."
16438 );
16439 return type;
16440 case "body":
16441 type = props.body;
16442 if (!type)
16443 throw Error(
16444 "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."
16445 );
16446 return type;
16447 default:
16448 throw Error(
16449 "resolveSingletonInstance was called with an element type that is not supported. This is a bug in React."
16450 );
16451 }
16452 }
16453 function acquireSingletonInstance(type, props, instance, internalInstanceHandle) {
16454 if (!instance[internalContainerInstanceKey] && getInstanceFromNode(instance)) {
16455 var tagName = instance.tagName.toLowerCase();
16456 console.error(
16457 "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.",
16458 tagName,
16459 tagName,
16460 tagName
16461 );
16462 }
16463 switch (type) {
16464 case "html":
16465 case "head":
16466 case "body":
16467 break;
16468 default:
16469 console.error(
16470 "acquireSingletonInstance was called with an element type that is not supported. This is a bug in React."
16471 );
16472 }
16473 for (tagName = instance.attributes; tagName.length; )
16474 instance.removeAttributeNode(tagName[0]);
16475 setInitialProperties(instance, type, props);
16476 instance[internalInstanceKey] = internalInstanceHandle;
16477 instance[internalPropsKey] = props;
16478 }
16479 function releaseSingletonInstance(instance) {
16480 for (var attributes = instance.attributes; attributes.length; )
16481 instance.removeAttributeNode(attributes[0]);
16482 detachDeletedInstance(instance);
16483 }
16484 function getHoistableRoot(container) {
16485 return "function" === typeof container.getRootNode ? container.getRootNode() : 9 === container.nodeType ? container : container.ownerDocument;
16486 }
16487 function preconnectAs(rel, href, crossOrigin) {
16488 var ownerDocument = globalDocument;
16489 if (ownerDocument && "string" === typeof href && href) {
16490 var limitedEscapedHref = escapeSelectorAttributeValueInsideDoubleQuotes(href);
16491 limitedEscapedHref = 'link[rel="' + rel + '"][href="' + limitedEscapedHref + '"]';
16492 "string" === typeof crossOrigin && (limitedEscapedHref += '[crossorigin="' + crossOrigin + '"]');
16493 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)));
16494 }
16495 }
16496 function getResource(type, currentProps, pendingProps, currentResource) {
16497 var resourceRoot = (resourceRoot = rootInstanceStackCursor.current) ? getHoistableRoot(resourceRoot) : null;
16498 if (!resourceRoot)
16499 throw Error(
16500 '"resourceRoot" was expected to exist. This is a bug in React.'
16501 );
16502 switch (type) {
16503 case "meta":
16504 case "title":
16505 return null;
16506 case "style":
16507 return "string" === typeof pendingProps.precedence && "string" === typeof pendingProps.href ? (pendingProps = getStyleKey(pendingProps.href), currentProps = getResourcesFromRoot(resourceRoot).hoistableStyles, currentResource = currentProps.get(pendingProps), currentResource || (currentResource = {
16508 type: "style",
16509 instance: null,
16510 count: 0,
16511 state: null
16512 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
16513 case "link":
16514 if ("stylesheet" === pendingProps.rel && "string" === typeof pendingProps.href && "string" === typeof pendingProps.precedence) {
16515 type = getStyleKey(pendingProps.href);
16516 var _styles = getResourcesFromRoot(resourceRoot).hoistableStyles, _resource = _styles.get(type);
16517 if (!_resource && (resourceRoot = resourceRoot.ownerDocument || resourceRoot, _resource = {
16518 type: "stylesheet",
16519 instance: null,
16520 count: 0,
16521 state: { loading: NotLoaded, preload: null }
16522 }, _styles.set(type, _resource), (_styles = resourceRoot.querySelector(
16523 getStylesheetSelectorFromKey(type)
16524 )) && !_styles._p && (_resource.instance = _styles, _resource.state.loading = Loaded | Inserted), !preloadPropsMap.has(type))) {
16525 var preloadProps = {
16526 rel: "preload",
16527 as: "style",
16528 href: pendingProps.href,
16529 crossOrigin: pendingProps.crossOrigin,
16530 integrity: pendingProps.integrity,
16531 media: pendingProps.media,
16532 hrefLang: pendingProps.hrefLang,
16533 referrerPolicy: pendingProps.referrerPolicy
16534 };
16535 preloadPropsMap.set(type, preloadProps);
16536 _styles || preloadStylesheet(
16537 resourceRoot,
16538 type,
16539 preloadProps,
16540 _resource.state
16541 );
16542 }
16543 if (currentProps && null === currentResource)
16544 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
16545 "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
16546 );
16547 return _resource;
16548 }
16549 if (currentProps && null !== currentResource)
16550 throw pendingProps = "\n\n - " + describeLinkForResourceErrorDEV(currentProps) + "\n + " + describeLinkForResourceErrorDEV(pendingProps), Error(
16551 "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
16552 );
16553 return null;
16554 case "script":
16555 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 = {
16556 type: "script",
16557 instance: null,
16558 count: 0,
16559 state: null
16560 }, currentProps.set(pendingProps, currentResource)), currentResource) : { type: "void", instance: null, count: 0, state: null };
16561 default:
16562 throw Error(
16563 'getResource encountered a type it did not expect: "' + type + '". this is a bug in React.'
16564 );
16565 }
16566 }
16567 function describeLinkForResourceErrorDEV(props) {
16568 var describedProps = 0, description = "<link";
16569 "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) + '"');
16570 "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) + '"');
16571 "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) + "}");
16572 Object.getOwnPropertyNames(props).length > describedProps && (description += " ...");
16573 return description + " />";
16574 }
16575 function getStyleKey(href) {
16576 return 'href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"';
16577 }
16578 function getStylesheetSelectorFromKey(key) {
16579 return 'link[rel="stylesheet"][' + key + "]";
16580 }
16581 function stylesheetPropsFromRawProps(rawProps) {
16582 return assign({}, rawProps, {
16583 "data-precedence": rawProps.precedence,
16584 precedence: null
16585 });
16586 }
16587 function preloadStylesheet(ownerDocument, key, preloadProps, state) {
16588 ownerDocument.querySelector(
16589 'link[rel="preload"][as="style"][' + key + "]"
16590 ) ? state.loading = Loaded : (key = ownerDocument.createElement("link"), state.preload = key, key.addEventListener("load", function() {
16591 return state.loading |= Loaded;
16592 }), key.addEventListener("error", function() {
16593 return state.loading |= Errored;
16594 }), setInitialProperties(key, "link", preloadProps), markNodeAsHoistable(key), ownerDocument.head.appendChild(key));
16595 }
16596 function getScriptKey(src) {
16597 return '[src="' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '"]';
16598 }
16599 function getScriptSelectorFromKey(key) {
16600 return "script[async]" + key;
16601 }
16602 function acquireResource(hoistableRoot, resource, props) {
16603 resource.count++;
16604 if (null === resource.instance)
16605 switch (resource.type) {
16606 case "style":
16607 var instance = hoistableRoot.querySelector(
16608 'style[data-href~="' + escapeSelectorAttributeValueInsideDoubleQuotes(props.href) + '"]'
16609 );
16610 if (instance)
16611 return resource.instance = instance, markNodeAsHoistable(instance), instance;
16612 var styleProps = assign({}, props, {
16613 "data-href": props.href,
16614 "data-precedence": props.precedence,
16615 href: null,
16616 precedence: null
16617 });
16618 instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("style");
16619 markNodeAsHoistable(instance);
16620 setInitialProperties(instance, "style", styleProps);
16621 insertStylesheet(instance, props.precedence, hoistableRoot);
16622 return resource.instance = instance;
16623 case "stylesheet":
16624 styleProps = getStyleKey(props.href);
16625 var _instance = hoistableRoot.querySelector(
16626 getStylesheetSelectorFromKey(styleProps)
16627 );
16628 if (_instance)
16629 return resource.state.loading |= Inserted, resource.instance = _instance, markNodeAsHoistable(_instance), _instance;
16630 instance = stylesheetPropsFromRawProps(props);
16631 (styleProps = preloadPropsMap.get(styleProps)) && adoptPreloadPropsForStylesheet(instance, styleProps);
16632 _instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement("link");
16633 markNodeAsHoistable(_instance);
16634 var linkInstance = _instance;
16635 linkInstance._p = new Promise(function(resolve, reject) {
16636 linkInstance.onload = resolve;
16637 linkInstance.onerror = reject;
16638 });
16639 setInitialProperties(_instance, "link", instance);
16640 resource.state.loading |= Inserted;
16641 insertStylesheet(_instance, props.precedence, hoistableRoot);
16642 return resource.instance = _instance;
16643 case "script":
16644 _instance = getScriptKey(props.src);
16645 if (styleProps = hoistableRoot.querySelector(
16646 getScriptSelectorFromKey(_instance)
16647 ))
16648 return resource.instance = styleProps, markNodeAsHoistable(styleProps), styleProps;
16649 instance = props;
16650 if (styleProps = preloadPropsMap.get(_instance))
16651 instance = assign({}, props), adoptPreloadPropsForScript(instance, styleProps);
16652 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
16653 styleProps = hoistableRoot.createElement("script");
16654 markNodeAsHoistable(styleProps);
16655 setInitialProperties(styleProps, "link", instance);
16656 hoistableRoot.head.appendChild(styleProps);
16657 return resource.instance = styleProps;
16658 case "void":
16659 return null;
16660 default:
16661 throw Error(
16662 'acquireResource encountered a resource type it did not expect: "' + resource.type + '". this is a bug in React.'
16663 );
16664 }
16665 else
16666 "stylesheet" === resource.type && (resource.state.loading & Inserted) === NotLoaded && (instance = resource.instance, resource.state.loading |= Inserted, insertStylesheet(instance, props.precedence, hoistableRoot));
16667 return resource.instance;
16668 }
16669 function insertStylesheet(instance, precedence, root2) {
16670 for (var nodes = root2.querySelectorAll(
16671 'link[rel="stylesheet"][data-precedence],style[data-precedence]'
16672 ), last = nodes.length ? nodes[nodes.length - 1] : null, prior = last, i = 0; i < nodes.length; i++) {
16673 var node = nodes[i];
16674 if (node.dataset.precedence === precedence) prior = node;
16675 else if (prior !== last) break;
16676 }
16677 prior ? prior.parentNode.insertBefore(instance, prior.nextSibling) : (precedence = 9 === root2.nodeType ? root2.head : root2, precedence.insertBefore(instance, precedence.firstChild));
16678 }
16679 function adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {
16680 null == stylesheetProps.crossOrigin && (stylesheetProps.crossOrigin = preloadProps.crossOrigin);
16681 null == stylesheetProps.referrerPolicy && (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);
16682 null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);
16683 }
16684 function adoptPreloadPropsForScript(scriptProps, preloadProps) {
16685 null == scriptProps.crossOrigin && (scriptProps.crossOrigin = preloadProps.crossOrigin);
16686 null == scriptProps.referrerPolicy && (scriptProps.referrerPolicy = preloadProps.referrerPolicy);
16687 null == scriptProps.integrity && (scriptProps.integrity = preloadProps.integrity);
16688 }
16689 function getHydratableHoistableCache(type, keyAttribute, ownerDocument) {
16690 if (null === tagCaches) {
16691 var cache = /* @__PURE__ */ new Map();
16692 var caches = tagCaches = /* @__PURE__ */ new Map();
16693 caches.set(ownerDocument, cache);
16694 } else
16695 caches = tagCaches, cache = caches.get(ownerDocument), cache || (cache = /* @__PURE__ */ new Map(), caches.set(ownerDocument, cache));
16696 if (cache.has(type)) return cache;
16697 cache.set(type, null);
16698 ownerDocument = ownerDocument.getElementsByTagName(type);
16699 for (caches = 0; caches < ownerDocument.length; caches++) {
16700 var node = ownerDocument[caches];
16701 if (!(node[internalHoistableMarker] || node[internalInstanceKey] || "link" === type && "stylesheet" === node.getAttribute("rel")) && node.namespaceURI !== SVG_NAMESPACE) {
16702 var nodeKey = node.getAttribute(keyAttribute) || "";
16703 nodeKey = type + nodeKey;
16704 var existing = cache.get(nodeKey);
16705 existing ? existing.push(node) : cache.set(nodeKey, [node]);
16706 }
16707 }
16708 return cache;
16709 }
16710 function mountHoistable(hoistableRoot, type, instance) {
16711 hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;
16712 hoistableRoot.head.insertBefore(
16713 instance,
16714 "title" === type ? hoistableRoot.querySelector("head > title") : null
16715 );
16716 }
16717 function isHostHoistableType(type, props, hostContext) {
16718 var outsideHostContainerContext = !hostContext.ancestorInfo.containerTagInScope;
16719 if (hostContext.context === HostContextNamespaceSvg || null != props.itemProp)
16720 return !outsideHostContainerContext || null == props.itemProp || "meta" !== type && "title" !== type && "style" !== type && "link" !== type && "script" !== type || console.error(
16721 "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.",
16722 type,
16723 type
16724 ), false;
16725 switch (type) {
16726 case "meta":
16727 case "title":
16728 return true;
16729 case "style":
16730 if ("string" !== typeof props.precedence || "string" !== typeof props.href || "" === props.href) {
16731 outsideHostContainerContext && console.error(
16732 '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"`.'
16733 );
16734 break;
16735 }
16736 return true;
16737 case "link":
16738 if ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href || props.onLoad || props.onError) {
16739 if ("stylesheet" === props.rel && "string" === typeof props.precedence) {
16740 type = props.href;
16741 var onError = props.onError, disabled = props.disabled;
16742 hostContext = [];
16743 props.onLoad && hostContext.push("`onLoad`");
16744 onError && hostContext.push("`onError`");
16745 null != disabled && hostContext.push("`disabled`");
16746 onError = propNamesListJoin(hostContext, "and");
16747 onError += 1 === hostContext.length ? " prop" : " props";
16748 disabled = 1 === hostContext.length ? "an " + onError : "the " + onError;
16749 hostContext.length && console.error(
16750 '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.',
16751 type,
16752 disabled,
16753 onError
16754 );
16755 }
16756 outsideHostContainerContext && ("string" !== typeof props.rel || "string" !== typeof props.href || "" === props.href ? console.error(
16757 "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"
16758 ) : (props.onError || props.onLoad) && console.error(
16759 "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>."
16760 ));
16761 break;
16762 }
16763 switch (props.rel) {
16764 case "stylesheet":
16765 return type = props.precedence, props = props.disabled, "string" !== typeof type && outsideHostContainerContext && console.error(
16766 '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.'
16767 ), "string" === typeof type && null == props;
16768 default:
16769 return true;
16770 }
16771 case "script":
16772 type = props.async && "function" !== typeof props.async && "symbol" !== typeof props.async;
16773 if (!type || props.onLoad || props.onError || !props.src || "string" !== typeof props.src) {
16774 outsideHostContainerContext && (type ? props.onLoad || props.onError ? console.error(
16775 "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>."
16776 ) : console.error(
16777 "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>."
16778 ) : console.error(
16779 '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.'
16780 ));
16781 break;
16782 }
16783 return true;
16784 case "noscript":
16785 case "template":
16786 outsideHostContainerContext && console.error(
16787 "Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",
16788 type
16789 );
16790 }
16791 return false;
16792 }
16793 function preloadResource(resource) {
16794 return "stylesheet" === resource.type && (resource.state.loading & Settled) === NotLoaded ? false : true;
16795 }
16796 function suspendResource(state, hoistableRoot, resource, props) {
16797 if ("stylesheet" === resource.type && ("string" !== typeof props.media || false !== matchMedia(props.media).matches) && (resource.state.loading & Inserted) === NotLoaded) {
16798 if (null === resource.instance) {
16799 var key = getStyleKey(props.href), instance = hoistableRoot.querySelector(
16800 getStylesheetSelectorFromKey(key)
16801 );
16802 if (instance) {
16803 hoistableRoot = instance._p;
16804 null !== hoistableRoot && "object" === typeof hoistableRoot && "function" === typeof hoistableRoot.then && (state.count++, state = onUnsuspend.bind(state), hoistableRoot.then(state, state));
16805 resource.state.loading |= Inserted;
16806 resource.instance = instance;
16807 markNodeAsHoistable(instance);
16808 return;
16809 }
16810 instance = hoistableRoot.ownerDocument || hoistableRoot;
16811 props = stylesheetPropsFromRawProps(props);
16812 (key = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(props, key);
16813 instance = instance.createElement("link");
16814 markNodeAsHoistable(instance);
16815 var linkInstance = instance;
16816 linkInstance._p = new Promise(function(resolve, reject) {
16817 linkInstance.onload = resolve;
16818 linkInstance.onerror = reject;
16819 });
16820 setInitialProperties(instance, "link", props);
16821 resource.instance = instance;
16822 }
16823 null === state.stylesheets && (state.stylesheets = /* @__PURE__ */ new Map());
16824 state.stylesheets.set(resource, hoistableRoot);
16825 (hoistableRoot = resource.state.preload) && (resource.state.loading & Settled) === NotLoaded && (state.count++, resource = onUnsuspend.bind(state), hoistableRoot.addEventListener("load", resource), hoistableRoot.addEventListener("error", resource));
16826 }
16827 }
16828 function waitForCommitToBeReady(state, timeoutOffset) {
16829 state.stylesheets && 0 === state.count && insertSuspendedStylesheets(state, state.stylesheets);
16830 return 0 < state.count || 0 < state.imgCount ? function(commit) {
16831 var stylesheetTimer = setTimeout(function() {
16832 state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets);
16833 if (state.unsuspend) {
16834 var unsuspend = state.unsuspend;
16835 state.unsuspend = null;
16836 unsuspend();
16837 }
16838 }, SUSPENSEY_STYLESHEET_TIMEOUT + timeoutOffset);
16839 0 < state.imgBytes && 0 === estimatedBytesWithinLimit && (estimatedBytesWithinLimit = 125 * estimateBandwidth() * SUSPENSEY_IMAGE_TIME_ESTIMATE);
16840 var imgTimer = setTimeout(
16841 function() {
16842 state.waitingForImages = false;
16843 if (0 === state.count && (state.stylesheets && insertSuspendedStylesheets(state, state.stylesheets), state.unsuspend)) {
16844 var unsuspend = state.unsuspend;
16845 state.unsuspend = null;
16846 unsuspend();
16847 }
16848 },
16849 (state.imgBytes > estimatedBytesWithinLimit ? 50 : SUSPENSEY_IMAGE_TIMEOUT) + timeoutOffset
16850 );
16851 state.unsuspend = commit;
16852 return function() {
16853 state.unsuspend = null;
16854 clearTimeout(stylesheetTimer);
16855 clearTimeout(imgTimer);
16856 };
16857 } : null;
16858 }
16859 function onUnsuspend() {
16860 this.count--;
16861 if (0 === this.count && (0 === this.imgCount || !this.waitingForImages)) {
16862 if (this.stylesheets)
16863 insertSuspendedStylesheets(this, this.stylesheets);
16864 else if (this.unsuspend) {
16865 var unsuspend = this.unsuspend;
16866 this.unsuspend = null;
16867 unsuspend();
16868 }
16869 }
16870 }
16871 function insertSuspendedStylesheets(state, resources) {
16872 state.stylesheets = null;
16873 null !== state.unsuspend && (state.count++, precedencesByRoot = /* @__PURE__ */ new Map(), resources.forEach(insertStylesheetIntoRoot, state), precedencesByRoot = null, onUnsuspend.call(state));
16874 }
16875 function insertStylesheetIntoRoot(root2, resource) {
16876 if (!(resource.state.loading & Inserted)) {
16877 var precedences = precedencesByRoot.get(root2);
16878 if (precedences) var last = precedences.get(LAST_PRECEDENCE);
16879 else {
16880 precedences = /* @__PURE__ */ new Map();
16881 precedencesByRoot.set(root2, precedences);
16882 for (var nodes = root2.querySelectorAll(
16883 "link[data-precedence],style[data-precedence]"
16884 ), i = 0; i < nodes.length; i++) {
16885 var node = nodes[i];
16886 if ("LINK" === node.nodeName || "not all" !== node.getAttribute("media"))
16887 precedences.set(node.dataset.precedence, node), last = node;
16888 }
16889 last && precedences.set(LAST_PRECEDENCE, last);
16890 }
16891 nodes = resource.instance;
16892 node = nodes.getAttribute("data-precedence");
16893 i = precedences.get(node) || last;
16894 i === last && precedences.set(LAST_PRECEDENCE, nodes);
16895 precedences.set(node, nodes);
16896 this.count++;
16897 last = onUnsuspend.bind(this);
16898 nodes.addEventListener("load", last);
16899 nodes.addEventListener("error", last);
16900 i ? i.parentNode.insertBefore(nodes, i.nextSibling) : (root2 = 9 === root2.nodeType ? root2.head : root2, root2.insertBefore(nodes, root2.firstChild));
16901 resource.state.loading |= Inserted;
16902 }
16903 }
16904 function FiberRootNode(containerInfo, tag, hydrate, identifierPrefix, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator, formState) {
16905 this.tag = 1;
16906 this.containerInfo = containerInfo;
16907 this.pingCache = this.current = this.pendingChildren = null;
16908 this.timeoutHandle = noTimeout;
16909 this.callbackNode = this.next = this.pendingContext = this.context = this.cancelPendingCommit = null;
16910 this.callbackPriority = 0;
16911 this.expirationTimes = createLaneMap(-1);
16912 this.entangledLanes = this.shellSuspendCounter = this.errorRecoveryDisabledLanes = this.expiredLanes = this.warmLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
16913 this.entanglements = createLaneMap(0);
16914 this.hiddenUpdates = createLaneMap(null);
16915 this.identifierPrefix = identifierPrefix;
16916 this.onUncaughtError = onUncaughtError;
16917 this.onCaughtError = onCaughtError;
16918 this.onRecoverableError = onRecoverableError;
16919 this.pooledCache = null;
16920 this.pooledCacheLanes = 0;
16921 this.formState = formState;
16922 this.incompleteTransitions = /* @__PURE__ */ new Map();
16923 this.passiveEffectDuration = this.effectDuration = -0;
16924 this.memoizedUpdaters = /* @__PURE__ */ new Set();
16925 containerInfo = this.pendingUpdatersLaneMap = [];
16926 for (tag = 0; 31 > tag; tag++) containerInfo.push(/* @__PURE__ */ new Set());
16927 this._debugRootType = hydrate ? "hydrateRoot()" : "createRoot()";
16928 }
16929 function createFiberRoot(containerInfo, tag, hydrate, initialChildren, hydrationCallbacks, isStrictMode, identifierPrefix, formState, onUncaughtError, onCaughtError, onRecoverableError, onDefaultTransitionIndicator) {
16930 containerInfo = new FiberRootNode(
16931 containerInfo,
16932 tag,
16933 hydrate,
16934 identifierPrefix,
16935 onUncaughtError,
16936 onCaughtError,
16937 onRecoverableError,
16938 onDefaultTransitionIndicator,
16939 formState
16940 );
16941 tag = ConcurrentMode;
16942 true === isStrictMode && (tag |= StrictLegacyMode | StrictEffectsMode);
16943 tag |= ProfileMode;
16944 isStrictMode = createFiber(3, null, null, tag);
16945 containerInfo.current = isStrictMode;
16946 isStrictMode.stateNode = containerInfo;
16947 tag = createCache();
16948 retainCache(tag);
16949 containerInfo.pooledCache = tag;
16950 retainCache(tag);
16951 isStrictMode.memoizedState = {
16952 element: initialChildren,
16953 isDehydrated: hydrate,
16954 cache: tag
16955 };
16956 initializeUpdateQueue(isStrictMode);
16957 return containerInfo;
16958 }
16959 function getContextForSubtree(parentComponent) {
16960 if (!parentComponent) return emptyContextObject;
16961 parentComponent = emptyContextObject;
16962 return parentComponent;
16963 }
16964 function updateContainerImpl(rootFiber, lane, element, container, parentComponent, callback) {
16965 if (injectedHook && "function" === typeof injectedHook.onScheduleFiberRoot)
16966 try {
16967 injectedHook.onScheduleFiberRoot(rendererID, container, element);
16968 } catch (err) {
16969 hasLoggedError || (hasLoggedError = true, console.error(
16970 "React instrumentation encountered an error: %o",
16971 err
16972 ));
16973 }
16974 parentComponent = getContextForSubtree(parentComponent);
16975 null === container.context ? container.context = parentComponent : container.pendingContext = parentComponent;
16976 isRendering && null !== current && !didWarnAboutNestedUpdates && (didWarnAboutNestedUpdates = true, console.error(
16977 "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.",
16978 getComponentNameFromFiber(current) || "Unknown"
16979 ));
16980 container = createUpdate(lane);
16981 container.payload = { element };
16982 callback = void 0 === callback ? null : callback;
16983 null !== callback && ("function" !== typeof callback && console.error(
16984 "Expected the last optional `callback` argument to be a function. Instead received: %s.",
16985 callback
16986 ), container.callback = callback);
16987 element = enqueueUpdate(rootFiber, container, lane);
16988 null !== element && (startUpdateTimerByLane(lane, "root.render()", null), scheduleUpdateOnFiber(element, rootFiber, lane), entangleTransitions(element, rootFiber, lane));
16989 }
16990 function markRetryLaneImpl(fiber, retryLane) {
16991 fiber = fiber.memoizedState;
16992 if (null !== fiber && null !== fiber.dehydrated) {
16993 var a = fiber.retryLane;
16994 fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;
16995 }
16996 }
16997 function markRetryLaneIfNotHydrated(fiber, retryLane) {
16998 markRetryLaneImpl(fiber, retryLane);
16999 (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);
17000 }
17001 function attemptContinuousHydration(fiber) {
17002 if (13 === fiber.tag || 31 === fiber.tag) {
17003 var root2 = enqueueConcurrentRenderForLane(fiber, 67108864);
17004 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 67108864);
17005 markRetryLaneIfNotHydrated(fiber, 67108864);
17006 }
17007 }
17008 function attemptHydrationAtCurrentPriority(fiber) {
17009 if (13 === fiber.tag || 31 === fiber.tag) {
17010 var lane = requestUpdateLane(fiber);
17011 lane = getBumpedLaneForHydrationByLane(lane);
17012 var root2 = enqueueConcurrentRenderForLane(fiber, lane);
17013 null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
17014 markRetryLaneIfNotHydrated(fiber, lane);
17015 }
17016 }
17017 function getCurrentFiberForDevTools() {
17018 return current;
17019 }
17020 function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
17021 var prevTransition = ReactSharedInternals.T;
17022 ReactSharedInternals.T = null;
17023 var previousPriority = ReactDOMSharedInternals.p;
17024 try {
17025 ReactDOMSharedInternals.p = DiscreteEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
17026 } finally {
17027 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
17028 }
17029 }
17030 function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
17031 var prevTransition = ReactSharedInternals.T;
17032 ReactSharedInternals.T = null;
17033 var previousPriority = ReactDOMSharedInternals.p;
17034 try {
17035 ReactDOMSharedInternals.p = ContinuousEventPriority, dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
17036 } finally {
17037 ReactDOMSharedInternals.p = previousPriority, ReactSharedInternals.T = prevTransition;
17038 }
17039 }
17040 function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17041 if (_enabled) {
17042 var blockedOn = findInstanceBlockingEvent(nativeEvent);
17043 if (null === blockedOn)
17044 dispatchEventForPluginEventSystem(
17045 domEventName,
17046 eventSystemFlags,
17047 nativeEvent,
17048 return_targetInst,
17049 targetContainer
17050 ), clearIfContinuousEvent(domEventName, nativeEvent);
17051 else if (queueIfContinuousEvent(
17052 blockedOn,
17053 domEventName,
17054 eventSystemFlags,
17055 targetContainer,
17056 nativeEvent
17057 ))
17058 nativeEvent.stopPropagation();
17059 else if (clearIfContinuousEvent(domEventName, nativeEvent), eventSystemFlags & 4 && -1 < discreteReplayableEvents.indexOf(domEventName)) {
17060 for (; null !== blockedOn; ) {
17061 var fiber = getInstanceFromNode(blockedOn);
17062 if (null !== fiber)
17063 switch (fiber.tag) {
17064 case 3:
17065 fiber = fiber.stateNode;
17066 if (fiber.current.memoizedState.isDehydrated) {
17067 var lanes = getHighestPriorityLanes(fiber.pendingLanes);
17068 if (0 !== lanes) {
17069 var root2 = fiber;
17070 root2.pendingLanes |= 2;
17071 for (root2.entangledLanes |= 2; lanes; ) {
17072 var lane = 1 << 31 - clz32(lanes);
17073 root2.entanglements[1] |= lane;
17074 lanes &= ~lane;
17075 }
17076 ensureRootIsScheduled(fiber);
17077 (executionContext & (RenderContext | CommitContext)) === NoContext && (workInProgressRootRenderTargetTime = now$1() + RENDER_TIMEOUT_MS, flushSyncWorkAcrossRoots_impl(0, false));
17078 }
17079 }
17080 break;
17081 case 31:
17082 case 13:
17083 root2 = enqueueConcurrentRenderForLane(fiber, 2), null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2), flushSyncWork$1(), markRetryLaneIfNotHydrated(fiber, 2);
17084 }
17085 fiber = findInstanceBlockingEvent(nativeEvent);
17086 null === fiber && dispatchEventForPluginEventSystem(
17087 domEventName,
17088 eventSystemFlags,
17089 nativeEvent,
17090 return_targetInst,
17091 targetContainer
17092 );
17093 if (fiber === blockedOn) break;
17094 blockedOn = fiber;
17095 }
17096 null !== blockedOn && nativeEvent.stopPropagation();
17097 } else
17098 dispatchEventForPluginEventSystem(
17099 domEventName,
17100 eventSystemFlags,
17101 nativeEvent,
17102 null,
17103 targetContainer
17104 );
17105 }
17106 }
17107 function findInstanceBlockingEvent(nativeEvent) {
17108 nativeEvent = getEventTarget(nativeEvent);
17109 return findInstanceBlockingTarget(nativeEvent);
17110 }
17111 function findInstanceBlockingTarget(targetNode) {
17112 return_targetInst = null;
17113 targetNode = getClosestInstanceFromNode(targetNode);
17114 if (null !== targetNode) {
17115 var nearestMounted = getNearestMountedFiber(targetNode);
17116 if (null === nearestMounted) targetNode = null;
17117 else {
17118 var tag = nearestMounted.tag;
17119 if (13 === tag) {
17120 targetNode = getSuspenseInstanceFromFiber(nearestMounted);
17121 if (null !== targetNode) return targetNode;
17122 targetNode = null;
17123 } else if (31 === tag) {
17124 targetNode = getActivityInstanceFromFiber(nearestMounted);
17125 if (null !== targetNode) return targetNode;
17126 targetNode = null;
17127 } else if (3 === tag) {
17128 if (nearestMounted.stateNode.current.memoizedState.isDehydrated)
17129 return 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
17130 targetNode = null;
17131 } else nearestMounted !== targetNode && (targetNode = null);
17132 }
17133 }
17134 return_targetInst = targetNode;
17135 return null;
17136 }
17137 function getEventPriority(domEventName) {
17138 switch (domEventName) {
17139 case "beforetoggle":
17140 case "cancel":
17141 case "click":
17142 case "close":
17143 case "contextmenu":
17144 case "copy":
17145 case "cut":
17146 case "auxclick":
17147 case "dblclick":
17148 case "dragend":
17149 case "dragstart":
17150 case "drop":
17151 case "focusin":
17152 case "focusout":
17153 case "input":
17154 case "invalid":
17155 case "keydown":
17156 case "keypress":
17157 case "keyup":
17158 case "mousedown":
17159 case "mouseup":
17160 case "paste":
17161 case "pause":
17162 case "play":
17163 case "pointercancel":
17164 case "pointerdown":
17165 case "pointerup":
17166 case "ratechange":
17167 case "reset":
17168 case "resize":
17169 case "seeked":
17170 case "submit":
17171 case "toggle":
17172 case "touchcancel":
17173 case "touchend":
17174 case "touchstart":
17175 case "volumechange":
17176 case "change":
17177 case "selectionchange":
17178 case "textInput":
17179 case "compositionstart":
17180 case "compositionend":
17181 case "compositionupdate":
17182 case "beforeblur":
17183 case "afterblur":
17184 case "beforeinput":
17185 case "blur":
17186 case "fullscreenchange":
17187 case "focus":
17188 case "hashchange":
17189 case "popstate":
17190 case "select":
17191 case "selectstart":
17192 return DiscreteEventPriority;
17193 case "drag":
17194 case "dragenter":
17195 case "dragexit":
17196 case "dragleave":
17197 case "dragover":
17198 case "mousemove":
17199 case "mouseout":
17200 case "mouseover":
17201 case "pointermove":
17202 case "pointerout":
17203 case "pointerover":
17204 case "scroll":
17205 case "touchmove":
17206 case "wheel":
17207 case "mouseenter":
17208 case "mouseleave":
17209 case "pointerenter":
17210 case "pointerleave":
17211 return ContinuousEventPriority;
17212 case "message":
17213 switch (getCurrentPriorityLevel()) {
17214 case ImmediatePriority:
17215 return DiscreteEventPriority;
17216 case UserBlockingPriority:
17217 return ContinuousEventPriority;
17218 case NormalPriority$1:
17219 case LowPriority:
17220 return DefaultEventPriority;
17221 case IdlePriority:
17222 return IdleEventPriority;
17223 default:
17224 return DefaultEventPriority;
17225 }
17226 default:
17227 return DefaultEventPriority;
17228 }
17229 }
17230 function clearIfContinuousEvent(domEventName, nativeEvent) {
17231 switch (domEventName) {
17232 case "focusin":
17233 case "focusout":
17234 queuedFocus = null;
17235 break;
17236 case "dragenter":
17237 case "dragleave":
17238 queuedDrag = null;
17239 break;
17240 case "mouseover":
17241 case "mouseout":
17242 queuedMouse = null;
17243 break;
17244 case "pointerover":
17245 case "pointerout":
17246 queuedPointers.delete(nativeEvent.pointerId);
17247 break;
17248 case "gotpointercapture":
17249 case "lostpointercapture":
17250 queuedPointerCaptures.delete(nativeEvent.pointerId);
17251 }
17252 }
17253 function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17254 if (null === existingQueuedEvent || existingQueuedEvent.nativeEvent !== nativeEvent)
17255 return existingQueuedEvent = {
17256 blockedOn,
17257 domEventName,
17258 eventSystemFlags,
17259 nativeEvent,
17260 targetContainers: [targetContainer]
17261 }, null !== blockedOn && (blockedOn = getInstanceFromNode(blockedOn), null !== blockedOn && attemptContinuousHydration(blockedOn)), existingQueuedEvent;
17262 existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
17263 blockedOn = existingQueuedEvent.targetContainers;
17264 null !== targetContainer && -1 === blockedOn.indexOf(targetContainer) && blockedOn.push(targetContainer);
17265 return existingQueuedEvent;
17266 }
17267 function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
17268 switch (domEventName) {
17269 case "focusin":
17270 return queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(
17271 queuedFocus,
17272 blockedOn,
17273 domEventName,
17274 eventSystemFlags,
17275 targetContainer,
17276 nativeEvent
17277 ), true;
17278 case "dragenter":
17279 return queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(
17280 queuedDrag,
17281 blockedOn,
17282 domEventName,
17283 eventSystemFlags,
17284 targetContainer,
17285 nativeEvent
17286 ), true;
17287 case "mouseover":
17288 return queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(
17289 queuedMouse,
17290 blockedOn,
17291 domEventName,
17292 eventSystemFlags,
17293 targetContainer,
17294 nativeEvent
17295 ), true;
17296 case "pointerover":
17297 var pointerId = nativeEvent.pointerId;
17298 queuedPointers.set(
17299 pointerId,
17300 accumulateOrCreateContinuousQueuedReplayableEvent(
17301 queuedPointers.get(pointerId) || null,
17302 blockedOn,
17303 domEventName,
17304 eventSystemFlags,
17305 targetContainer,
17306 nativeEvent
17307 )
17308 );
17309 return true;
17310 case "gotpointercapture":
17311 return pointerId = nativeEvent.pointerId, queuedPointerCaptures.set(
17312 pointerId,
17313 accumulateOrCreateContinuousQueuedReplayableEvent(
17314 queuedPointerCaptures.get(pointerId) || null,
17315 blockedOn,
17316 domEventName,
17317 eventSystemFlags,
17318 targetContainer,
17319 nativeEvent
17320 )
17321 ), true;
17322 }
17323 return false;
17324 }
17325 function attemptExplicitHydrationTarget(queuedTarget) {
17326 var targetInst = getClosestInstanceFromNode(queuedTarget.target);
17327 if (null !== targetInst) {
17328 var nearestMounted = getNearestMountedFiber(targetInst);
17329 if (null !== nearestMounted) {
17330 if (targetInst = nearestMounted.tag, 13 === targetInst) {
17331 if (targetInst = getSuspenseInstanceFromFiber(nearestMounted), null !== targetInst) {
17332 queuedTarget.blockedOn = targetInst;
17333 runWithPriority(queuedTarget.priority, function() {
17334 attemptHydrationAtCurrentPriority(nearestMounted);
17335 });
17336 return;
17337 }
17338 } else if (31 === targetInst) {
17339 if (targetInst = getActivityInstanceFromFiber(nearestMounted), null !== targetInst) {
17340 queuedTarget.blockedOn = targetInst;
17341 runWithPriority(queuedTarget.priority, function() {
17342 attemptHydrationAtCurrentPriority(nearestMounted);
17343 });
17344 return;
17345 }
17346 } else if (3 === targetInst && nearestMounted.stateNode.current.memoizedState.isDehydrated) {
17347 queuedTarget.blockedOn = 3 === nearestMounted.tag ? nearestMounted.stateNode.containerInfo : null;
17348 return;
17349 }
17350 }
17351 }
17352 queuedTarget.blockedOn = null;
17353 }
17354 function attemptReplayContinuousQueuedEvent(queuedEvent) {
17355 if (null !== queuedEvent.blockedOn) return false;
17356 for (var targetContainers = queuedEvent.targetContainers; 0 < targetContainers.length; ) {
17357 var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);
17358 if (null === nextBlockedOn) {
17359 nextBlockedOn = queuedEvent.nativeEvent;
17360 var nativeEventClone = new nextBlockedOn.constructor(
17361 nextBlockedOn.type,
17362 nextBlockedOn
17363 ), event = nativeEventClone;
17364 null !== currentReplayingEvent && console.error(
17365 "Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."
17366 );
17367 currentReplayingEvent = event;
17368 nextBlockedOn.target.dispatchEvent(nativeEventClone);
17369 null === currentReplayingEvent && console.error(
17370 "Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."
17371 );
17372 currentReplayingEvent = null;
17373 } else
17374 return targetContainers = getInstanceFromNode(nextBlockedOn), null !== targetContainers && attemptContinuousHydration(targetContainers), queuedEvent.blockedOn = nextBlockedOn, false;
17375 targetContainers.shift();
17376 }
17377 return true;
17378 }
17379 function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
17380 attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);
17381 }
17382 function replayUnblockedEvents() {
17383 hasScheduledReplayAttempt = false;
17384 null !== queuedFocus && attemptReplayContinuousQueuedEvent(queuedFocus) && (queuedFocus = null);
17385 null !== queuedDrag && attemptReplayContinuousQueuedEvent(queuedDrag) && (queuedDrag = null);
17386 null !== queuedMouse && attemptReplayContinuousQueuedEvent(queuedMouse) && (queuedMouse = null);
17387 queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
17388 queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
17389 }
17390 function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
17391 queuedEvent.blockedOn === unblocked && (queuedEvent.blockedOn = null, hasScheduledReplayAttempt || (hasScheduledReplayAttempt = true, Scheduler.unstable_scheduleCallback(
17392 Scheduler.unstable_NormalPriority,
17393 replayUnblockedEvents
17394 )));
17395 }
17396 function scheduleReplayQueueIfNeeded(formReplayingQueue) {
17397 lastScheduledReplayQueue !== formReplayingQueue && (lastScheduledReplayQueue = formReplayingQueue, Scheduler.unstable_scheduleCallback(
17398 Scheduler.unstable_NormalPriority,
17399 function() {
17400 lastScheduledReplayQueue === formReplayingQueue && (lastScheduledReplayQueue = null);
17401 for (var i = 0; i < formReplayingQueue.length; i += 3) {
17402 var form = formReplayingQueue[i], submitterOrAction = formReplayingQueue[i + 1], formData = formReplayingQueue[i + 2];
17403 if ("function" !== typeof submitterOrAction)
17404 if (null === findInstanceBlockingTarget(submitterOrAction || form))
17405 continue;
17406 else break;
17407 var formInst = getInstanceFromNode(form);
17408 null !== formInst && (formReplayingQueue.splice(i, 3), i -= 3, form = {
17409 pending: true,
17410 data: formData,
17411 method: form.method,
17412 action: submitterOrAction
17413 }, Object.freeze(form), startHostTransition(
17414 formInst,
17415 form,
17416 submitterOrAction,
17417 formData
17418 ));
17419 }
17420 }
17421 ));
17422 }
17423 function retryIfBlockedOn(unblocked) {
17424 function unblock(queuedEvent) {
17425 return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
17426 }
17427 null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);
17428 null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);
17429 null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);
17430 queuedPointers.forEach(unblock);
17431 queuedPointerCaptures.forEach(unblock);
17432 for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {
17433 var queuedTarget = queuedExplicitHydrationTargets[i];
17434 queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);
17435 }
17436 for (; 0 < queuedExplicitHydrationTargets.length && (i = queuedExplicitHydrationTargets[0], null === i.blockedOn); )
17437 attemptExplicitHydrationTarget(i), null === i.blockedOn && queuedExplicitHydrationTargets.shift();
17438 i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;
17439 if (null != i)
17440 for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {
17441 var form = i[queuedTarget], submitterOrAction = i[queuedTarget + 1], formProps = form[internalPropsKey] || null;
17442 if ("function" === typeof submitterOrAction)
17443 formProps || scheduleReplayQueueIfNeeded(i);
17444 else if (formProps) {
17445 var action = null;
17446 if (submitterOrAction && submitterOrAction.hasAttribute("formAction"))
17447 if (form = submitterOrAction, formProps = submitterOrAction[internalPropsKey] || null)
17448 action = formProps.formAction;
17449 else {
17450 if (null !== findInstanceBlockingTarget(form)) continue;
17451 }
17452 else action = formProps.action;
17453 "function" === typeof action ? i[queuedTarget + 1] = action : (i.splice(queuedTarget, 3), queuedTarget -= 3);
17454 scheduleReplayQueueIfNeeded(i);
17455 }
17456 }
17457 }
17458 function defaultOnDefaultTransitionIndicator() {
17459 function handleNavigate(event) {
17460 event.canIntercept && "react-transition" === event.info && event.intercept({
17461 handler: function() {
17462 return new Promise(function(resolve) {
17463 return pendingResolve = resolve;
17464 });
17465 },
17466 focusReset: "manual",
17467 scroll: "manual"
17468 });
17469 }
17470 function handleNavigateComplete() {
17471 null !== pendingResolve && (pendingResolve(), pendingResolve = null);
17472 isCancelled || setTimeout(startFakeNavigation, 20);
17473 }
17474 function startFakeNavigation() {
17475 if (!isCancelled && !navigation.transition) {
17476 var currentEntry = navigation.currentEntry;
17477 currentEntry && null != currentEntry.url && navigation.navigate(currentEntry.url, {
17478 state: currentEntry.getState(),
17479 info: "react-transition",
17480 history: "replace"
17481 });
17482 }
17483 }
17484 if ("object" === typeof navigation) {
17485 var isCancelled = false, pendingResolve = null;
17486 navigation.addEventListener("navigate", handleNavigate);
17487 navigation.addEventListener("navigatesuccess", handleNavigateComplete);
17488 navigation.addEventListener("navigateerror", handleNavigateComplete);
17489 setTimeout(startFakeNavigation, 100);
17490 return function() {
17491 isCancelled = true;
17492 navigation.removeEventListener("navigate", handleNavigate);
17493 navigation.removeEventListener(
17494 "navigatesuccess",
17495 handleNavigateComplete
17496 );
17497 navigation.removeEventListener(
17498 "navigateerror",
17499 handleNavigateComplete
17500 );
17501 null !== pendingResolve && (pendingResolve(), pendingResolve = null);
17502 };
17503 }
17504 }
17505 function ReactDOMRoot(internalRoot) {
17506 this._internalRoot = internalRoot;
17507 }
17508 function ReactDOMHydrationRoot(internalRoot) {
17509 this._internalRoot = internalRoot;
17510 }
17511 function warnIfReactDOMContainerInDEV(container) {
17512 container[internalContainerInstanceKey] && (container._reactRootContainer ? console.error(
17513 "You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."
17514 ) : console.error(
17515 "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."
17516 ));
17517 }
17518 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
17519 var Scheduler = require_scheduler(), React = require_react(), ReactDOM = require_react_dom(), assign = Object.assign, REACT_LEGACY_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element"), REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
17520 /* @__PURE__ */ Symbol.for("react.scope");
17521 var REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity");
17522 /* @__PURE__ */ Symbol.for("react.legacy_hidden");
17523 /* @__PURE__ */ Symbol.for("react.tracing_marker");
17524 var REACT_MEMO_CACHE_SENTINEL = /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel");
17525 /* @__PURE__ */ Symbol.for("react.view_transition");
17526 var MAYBE_ITERATOR_SYMBOL = Symbol.iterator, REACT_CLIENT_REFERENCE = /* @__PURE__ */ Symbol.for("react.client.reference"), isArrayImpl = Array.isArray, ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ReactDOMSharedInternals = ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, NotPending = Object.freeze({
17527 pending: false,
17528 data: null,
17529 method: null,
17530 action: null
17531 }), valueStack = [];
17532 var fiberStack = [];
17533 var index$jscomp$0 = -1, contextStackCursor = createCursor(null), contextFiberStackCursor = createCursor(null), rootInstanceStackCursor = createCursor(null), hostTransitionProviderCursor = createCursor(null), disabledDepth = 0, prevLog, prevInfo, prevWarn, prevError, prevGroup, prevGroupCollapsed, prevGroupEnd;
17534 disabledLog.__reactDisabledLog = true;
17535 var prefix, suffix, reentry = false;
17536 var componentFrameCache = new ("function" === typeof WeakMap ? WeakMap : Map)();
17537 var current = null, isRendering = false, 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, hasLoggedError = false, isDevToolsPresent = "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__, clz32 = Math.clz32 ? Math.clz32 : clz32Fallback, log = Math.log, LN2 = Math.LN2, nextTransitionUpdateLane = 256, nextTransitionDeferredLane = 262144, 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 = {
17538 button: true,
17539 checkbox: true,
17540 image: true,
17541 hidden: true,
17542 radio: true,
17543 reset: true,
17544 submit: true
17545 }, VALID_ATTRIBUTE_NAME_REGEX = RegExp(
17546 "^[: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]*$"
17547 ), illegalAttributeNameCache = {}, validatedAttributeNameCache = {}, escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\n"\\]/g, didWarnValueDefaultValue$1 = false, didWarnCheckedDefaultChecked = false, didWarnSelectedSetOnOption = false, didWarnInvalidChild = false, didWarnInvalidInnerHTML = false;
17548 var didWarnValueDefaultValue = false;
17549 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(
17550 " "
17551 ), inScopeTags = "applet caption html table td th marquee object template foreignObject desc title".split(
17552 " "
17553 ), buttonScopeTags = inScopeTags.concat(["button"]), impliedEndTags = "dd dt li option optgroup p rp rt".split(" "), emptyAncestorInfoDev = {
17554 current: null,
17555 formTag: null,
17556 aTagInScope: null,
17557 buttonTagInScope: null,
17558 nobrTagInScope: null,
17559 pTagInButtonScope: null,
17560 listItemTagAutoclosing: null,
17561 dlItemTagAutoclosing: null,
17562 containerTagInScope: null,
17563 implicitRootScope: false
17564 }, didWarn = {}, shorthandToLonghand = {
17565 animation: "animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction".split(
17566 " "
17567 ),
17568 background: "backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize".split(
17569 " "
17570 ),
17571 backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
17572 border: "borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth".split(
17573 " "
17574 ),
17575 borderBlockEnd: [
17576 "borderBlockEndColor",
17577 "borderBlockEndStyle",
17578 "borderBlockEndWidth"
17579 ],
17580 borderBlockStart: [
17581 "borderBlockStartColor",
17582 "borderBlockStartStyle",
17583 "borderBlockStartWidth"
17584 ],
17585 borderBottom: [
17586 "borderBottomColor",
17587 "borderBottomStyle",
17588 "borderBottomWidth"
17589 ],
17590 borderColor: [
17591 "borderBottomColor",
17592 "borderLeftColor",
17593 "borderRightColor",
17594 "borderTopColor"
17595 ],
17596 borderImage: [
17597 "borderImageOutset",
17598 "borderImageRepeat",
17599 "borderImageSlice",
17600 "borderImageSource",
17601 "borderImageWidth"
17602 ],
17603 borderInlineEnd: [
17604 "borderInlineEndColor",
17605 "borderInlineEndStyle",
17606 "borderInlineEndWidth"
17607 ],
17608 borderInlineStart: [
17609 "borderInlineStartColor",
17610 "borderInlineStartStyle",
17611 "borderInlineStartWidth"
17612 ],
17613 borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
17614 borderRadius: [
17615 "borderBottomLeftRadius",
17616 "borderBottomRightRadius",
17617 "borderTopLeftRadius",
17618 "borderTopRightRadius"
17619 ],
17620 borderRight: [
17621 "borderRightColor",
17622 "borderRightStyle",
17623 "borderRightWidth"
17624 ],
17625 borderStyle: [
17626 "borderBottomStyle",
17627 "borderLeftStyle",
17628 "borderRightStyle",
17629 "borderTopStyle"
17630 ],
17631 borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
17632 borderWidth: [
17633 "borderBottomWidth",
17634 "borderLeftWidth",
17635 "borderRightWidth",
17636 "borderTopWidth"
17637 ],
17638 columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
17639 columns: ["columnCount", "columnWidth"],
17640 flex: ["flexBasis", "flexGrow", "flexShrink"],
17641 flexFlow: ["flexDirection", "flexWrap"],
17642 font: "fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight".split(
17643 " "
17644 ),
17645 fontVariant: "fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition".split(
17646 " "
17647 ),
17648 gap: ["columnGap", "rowGap"],
17649 grid: "gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows".split(
17650 " "
17651 ),
17652 gridArea: [
17653 "gridColumnEnd",
17654 "gridColumnStart",
17655 "gridRowEnd",
17656 "gridRowStart"
17657 ],
17658 gridColumn: ["gridColumnEnd", "gridColumnStart"],
17659 gridColumnGap: ["columnGap"],
17660 gridGap: ["columnGap", "rowGap"],
17661 gridRow: ["gridRowEnd", "gridRowStart"],
17662 gridRowGap: ["rowGap"],
17663 gridTemplate: [
17664 "gridTemplateAreas",
17665 "gridTemplateColumns",
17666 "gridTemplateRows"
17667 ],
17668 listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
17669 margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
17670 marker: ["markerEnd", "markerMid", "markerStart"],
17671 mask: "maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize".split(
17672 " "
17673 ),
17674 maskPosition: ["maskPositionX", "maskPositionY"],
17675 outline: ["outlineColor", "outlineStyle", "outlineWidth"],
17676 overflow: ["overflowX", "overflowY"],
17677 padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
17678 placeContent: ["alignContent", "justifyContent"],
17679 placeItems: ["alignItems", "justifyItems"],
17680 placeSelf: ["alignSelf", "justifySelf"],
17681 textDecoration: [
17682 "textDecorationColor",
17683 "textDecorationLine",
17684 "textDecorationStyle"
17685 ],
17686 textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
17687 transition: [
17688 "transitionDelay",
17689 "transitionDuration",
17690 "transitionProperty",
17691 "transitionTimingFunction"
17692 ],
17693 wordWrap: ["overflowWrap"]
17694 }, 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(
17695 "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(
17696 " "
17697 )
17698 ), MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML", SVG_NAMESPACE = "http://www.w3.org/2000/svg", aliases = /* @__PURE__ */ new Map([
17699 ["acceptCharset", "accept-charset"],
17700 ["htmlFor", "for"],
17701 ["httpEquiv", "http-equiv"],
17702 ["crossOrigin", "crossorigin"],
17703 ["accentHeight", "accent-height"],
17704 ["alignmentBaseline", "alignment-baseline"],
17705 ["arabicForm", "arabic-form"],
17706 ["baselineShift", "baseline-shift"],
17707 ["capHeight", "cap-height"],
17708 ["clipPath", "clip-path"],
17709 ["clipRule", "clip-rule"],
17710 ["colorInterpolation", "color-interpolation"],
17711 ["colorInterpolationFilters", "color-interpolation-filters"],
17712 ["colorProfile", "color-profile"],
17713 ["colorRendering", "color-rendering"],
17714 ["dominantBaseline", "dominant-baseline"],
17715 ["enableBackground", "enable-background"],
17716 ["fillOpacity", "fill-opacity"],
17717 ["fillRule", "fill-rule"],
17718 ["floodColor", "flood-color"],
17719 ["floodOpacity", "flood-opacity"],
17720 ["fontFamily", "font-family"],
17721 ["fontSize", "font-size"],
17722 ["fontSizeAdjust", "font-size-adjust"],
17723 ["fontStretch", "font-stretch"],
17724 ["fontStyle", "font-style"],
17725 ["fontVariant", "font-variant"],
17726 ["fontWeight", "font-weight"],
17727 ["glyphName", "glyph-name"],
17728 ["glyphOrientationHorizontal", "glyph-orientation-horizontal"],
17729 ["glyphOrientationVertical", "glyph-orientation-vertical"],
17730 ["horizAdvX", "horiz-adv-x"],
17731 ["horizOriginX", "horiz-origin-x"],
17732 ["imageRendering", "image-rendering"],
17733 ["letterSpacing", "letter-spacing"],
17734 ["lightingColor", "lighting-color"],
17735 ["markerEnd", "marker-end"],
17736 ["markerMid", "marker-mid"],
17737 ["markerStart", "marker-start"],
17738 ["overlinePosition", "overline-position"],
17739 ["overlineThickness", "overline-thickness"],
17740 ["paintOrder", "paint-order"],
17741 ["panose-1", "panose-1"],
17742 ["pointerEvents", "pointer-events"],
17743 ["renderingIntent", "rendering-intent"],
17744 ["shapeRendering", "shape-rendering"],
17745 ["stopColor", "stop-color"],
17746 ["stopOpacity", "stop-opacity"],
17747 ["strikethroughPosition", "strikethrough-position"],
17748 ["strikethroughThickness", "strikethrough-thickness"],
17749 ["strokeDasharray", "stroke-dasharray"],
17750 ["strokeDashoffset", "stroke-dashoffset"],
17751 ["strokeLinecap", "stroke-linecap"],
17752 ["strokeLinejoin", "stroke-linejoin"],
17753 ["strokeMiterlimit", "stroke-miterlimit"],
17754 ["strokeOpacity", "stroke-opacity"],
17755 ["strokeWidth", "stroke-width"],
17756 ["textAnchor", "text-anchor"],
17757 ["textDecoration", "text-decoration"],
17758 ["textRendering", "text-rendering"],
17759 ["transformOrigin", "transform-origin"],
17760 ["underlinePosition", "underline-position"],
17761 ["underlineThickness", "underline-thickness"],
17762 ["unicodeBidi", "unicode-bidi"],
17763 ["unicodeRange", "unicode-range"],
17764 ["unitsPerEm", "units-per-em"],
17765 ["vAlphabetic", "v-alphabetic"],
17766 ["vHanging", "v-hanging"],
17767 ["vIdeographic", "v-ideographic"],
17768 ["vMathematical", "v-mathematical"],
17769 ["vectorEffect", "vector-effect"],
17770 ["vertAdvY", "vert-adv-y"],
17771 ["vertOriginX", "vert-origin-x"],
17772 ["vertOriginY", "vert-origin-y"],
17773 ["wordSpacing", "word-spacing"],
17774 ["writingMode", "writing-mode"],
17775 ["xmlnsXlink", "xmlns:xlink"],
17776 ["xHeight", "x-height"]
17777 ]), possibleStandardNames = {
17778 accept: "accept",
17779 acceptcharset: "acceptCharset",
17780 "accept-charset": "acceptCharset",
17781 accesskey: "accessKey",
17782 action: "action",
17783 allowfullscreen: "allowFullScreen",
17784 alt: "alt",
17785 as: "as",
17786 async: "async",
17787 autocapitalize: "autoCapitalize",
17788 autocomplete: "autoComplete",
17789 autocorrect: "autoCorrect",
17790 autofocus: "autoFocus",
17791 autoplay: "autoPlay",
17792 autosave: "autoSave",
17793 capture: "capture",
17794 cellpadding: "cellPadding",
17795 cellspacing: "cellSpacing",
17796 challenge: "challenge",
17797 charset: "charSet",
17798 checked: "checked",
17799 children: "children",
17800 cite: "cite",
17801 class: "className",
17802 classid: "classID",
17803 classname: "className",
17804 cols: "cols",
17805 colspan: "colSpan",
17806 content: "content",
17807 contenteditable: "contentEditable",
17808 contextmenu: "contextMenu",
17809 controls: "controls",
17810 controlslist: "controlsList",
17811 coords: "coords",
17812 crossorigin: "crossOrigin",
17813 dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
17814 data: "data",
17815 datetime: "dateTime",
17816 default: "default",
17817 defaultchecked: "defaultChecked",
17818 defaultvalue: "defaultValue",
17819 defer: "defer",
17820 dir: "dir",
17821 disabled: "disabled",
17822 disablepictureinpicture: "disablePictureInPicture",
17823 disableremoteplayback: "disableRemotePlayback",
17824 download: "download",
17825 draggable: "draggable",
17826 enctype: "encType",
17827 enterkeyhint: "enterKeyHint",
17828 fetchpriority: "fetchPriority",
17829 for: "htmlFor",
17830 form: "form",
17831 formmethod: "formMethod",
17832 formaction: "formAction",
17833 formenctype: "formEncType",
17834 formnovalidate: "formNoValidate",
17835 formtarget: "formTarget",
17836 frameborder: "frameBorder",
17837 headers: "headers",
17838 height: "height",
17839 hidden: "hidden",
17840 high: "high",
17841 href: "href",
17842 hreflang: "hrefLang",
17843 htmlfor: "htmlFor",
17844 httpequiv: "httpEquiv",
17845 "http-equiv": "httpEquiv",
17846 icon: "icon",
17847 id: "id",
17848 imagesizes: "imageSizes",
17849 imagesrcset: "imageSrcSet",
17850 inert: "inert",
17851 innerhtml: "innerHTML",
17852 inputmode: "inputMode",
17853 integrity: "integrity",
17854 is: "is",
17855 itemid: "itemID",
17856 itemprop: "itemProp",
17857 itemref: "itemRef",
17858 itemscope: "itemScope",
17859 itemtype: "itemType",
17860 keyparams: "keyParams",
17861 keytype: "keyType",
17862 kind: "kind",
17863 label: "label",
17864 lang: "lang",
17865 list: "list",
17866 loop: "loop",
17867 low: "low",
17868 manifest: "manifest",
17869 marginwidth: "marginWidth",
17870 marginheight: "marginHeight",
17871 max: "max",
17872 maxlength: "maxLength",
17873 media: "media",
17874 mediagroup: "mediaGroup",
17875 method: "method",
17876 min: "min",
17877 minlength: "minLength",
17878 multiple: "multiple",
17879 muted: "muted",
17880 name: "name",
17881 nomodule: "noModule",
17882 nonce: "nonce",
17883 novalidate: "noValidate",
17884 open: "open",
17885 optimum: "optimum",
17886 pattern: "pattern",
17887 placeholder: "placeholder",
17888 playsinline: "playsInline",
17889 poster: "poster",
17890 preload: "preload",
17891 profile: "profile",
17892 radiogroup: "radioGroup",
17893 readonly: "readOnly",
17894 referrerpolicy: "referrerPolicy",
17895 rel: "rel",
17896 required: "required",
17897 reversed: "reversed",
17898 role: "role",
17899 rows: "rows",
17900 rowspan: "rowSpan",
17901 sandbox: "sandbox",
17902 scope: "scope",
17903 scoped: "scoped",
17904 scrolling: "scrolling",
17905 seamless: "seamless",
17906 selected: "selected",
17907 shape: "shape",
17908 size: "size",
17909 sizes: "sizes",
17910 span: "span",
17911 spellcheck: "spellCheck",
17912 src: "src",
17913 srcdoc: "srcDoc",
17914 srclang: "srcLang",
17915 srcset: "srcSet",
17916 start: "start",
17917 step: "step",
17918 style: "style",
17919 summary: "summary",
17920 tabindex: "tabIndex",
17921 target: "target",
17922 title: "title",
17923 type: "type",
17924 usemap: "useMap",
17925 value: "value",
17926 width: "width",
17927 wmode: "wmode",
17928 wrap: "wrap",
17929 about: "about",
17930 accentheight: "accentHeight",
17931 "accent-height": "accentHeight",
17932 accumulate: "accumulate",
17933 additive: "additive",
17934 alignmentbaseline: "alignmentBaseline",
17935 "alignment-baseline": "alignmentBaseline",
17936 allowreorder: "allowReorder",
17937 alphabetic: "alphabetic",
17938 amplitude: "amplitude",
17939 arabicform: "arabicForm",
17940 "arabic-form": "arabicForm",
17941 ascent: "ascent",
17942 attributename: "attributeName",
17943 attributetype: "attributeType",
17944 autoreverse: "autoReverse",
17945 azimuth: "azimuth",
17946 basefrequency: "baseFrequency",
17947 baselineshift: "baselineShift",
17948 "baseline-shift": "baselineShift",
17949 baseprofile: "baseProfile",
17950 bbox: "bbox",
17951 begin: "begin",
17952 bias: "bias",
17953 by: "by",
17954 calcmode: "calcMode",
17955 capheight: "capHeight",
17956 "cap-height": "capHeight",
17957 clip: "clip",
17958 clippath: "clipPath",
17959 "clip-path": "clipPath",
17960 clippathunits: "clipPathUnits",
17961 cliprule: "clipRule",
17962 "clip-rule": "clipRule",
17963 color: "color",
17964 colorinterpolation: "colorInterpolation",
17965 "color-interpolation": "colorInterpolation",
17966 colorinterpolationfilters: "colorInterpolationFilters",
17967 "color-interpolation-filters": "colorInterpolationFilters",
17968 colorprofile: "colorProfile",
17969 "color-profile": "colorProfile",
17970 colorrendering: "colorRendering",
17971 "color-rendering": "colorRendering",
17972 contentscripttype: "contentScriptType",
17973 contentstyletype: "contentStyleType",
17974 cursor: "cursor",
17975 cx: "cx",
17976 cy: "cy",
17977 d: "d",
17978 datatype: "datatype",
17979 decelerate: "decelerate",
17980 descent: "descent",
17981 diffuseconstant: "diffuseConstant",
17982 direction: "direction",
17983 display: "display",
17984 divisor: "divisor",
17985 dominantbaseline: "dominantBaseline",
17986 "dominant-baseline": "dominantBaseline",
17987 dur: "dur",
17988 dx: "dx",
17989 dy: "dy",
17990 edgemode: "edgeMode",
17991 elevation: "elevation",
17992 enablebackground: "enableBackground",
17993 "enable-background": "enableBackground",
17994 end: "end",
17995 exponent: "exponent",
17996 externalresourcesrequired: "externalResourcesRequired",
17997 fill: "fill",
17998 fillopacity: "fillOpacity",
17999 "fill-opacity": "fillOpacity",
18000 fillrule: "fillRule",
18001 "fill-rule": "fillRule",
18002 filter: "filter",
18003 filterres: "filterRes",
18004 filterunits: "filterUnits",
18005 floodopacity: "floodOpacity",
18006 "flood-opacity": "floodOpacity",
18007 floodcolor: "floodColor",
18008 "flood-color": "floodColor",
18009 focusable: "focusable",
18010 fontfamily: "fontFamily",
18011 "font-family": "fontFamily",
18012 fontsize: "fontSize",
18013 "font-size": "fontSize",
18014 fontsizeadjust: "fontSizeAdjust",
18015 "font-size-adjust": "fontSizeAdjust",
18016 fontstretch: "fontStretch",
18017 "font-stretch": "fontStretch",
18018 fontstyle: "fontStyle",
18019 "font-style": "fontStyle",
18020 fontvariant: "fontVariant",
18021 "font-variant": "fontVariant",
18022 fontweight: "fontWeight",
18023 "font-weight": "fontWeight",
18024 format: "format",
18025 from: "from",
18026 fx: "fx",
18027 fy: "fy",
18028 g1: "g1",
18029 g2: "g2",
18030 glyphname: "glyphName",
18031 "glyph-name": "glyphName",
18032 glyphorientationhorizontal: "glyphOrientationHorizontal",
18033 "glyph-orientation-horizontal": "glyphOrientationHorizontal",
18034 glyphorientationvertical: "glyphOrientationVertical",
18035 "glyph-orientation-vertical": "glyphOrientationVertical",
18036 glyphref: "glyphRef",
18037 gradienttransform: "gradientTransform",
18038 gradientunits: "gradientUnits",
18039 hanging: "hanging",
18040 horizadvx: "horizAdvX",
18041 "horiz-adv-x": "horizAdvX",
18042 horizoriginx: "horizOriginX",
18043 "horiz-origin-x": "horizOriginX",
18044 ideographic: "ideographic",
18045 imagerendering: "imageRendering",
18046 "image-rendering": "imageRendering",
18047 in2: "in2",
18048 in: "in",
18049 inlist: "inlist",
18050 intercept: "intercept",
18051 k1: "k1",
18052 k2: "k2",
18053 k3: "k3",
18054 k4: "k4",
18055 k: "k",
18056 kernelmatrix: "kernelMatrix",
18057 kernelunitlength: "kernelUnitLength",
18058 kerning: "kerning",
18059 keypoints: "keyPoints",
18060 keysplines: "keySplines",
18061 keytimes: "keyTimes",
18062 lengthadjust: "lengthAdjust",
18063 letterspacing: "letterSpacing",
18064 "letter-spacing": "letterSpacing",
18065 lightingcolor: "lightingColor",
18066 "lighting-color": "lightingColor",
18067 limitingconeangle: "limitingConeAngle",
18068 local: "local",
18069 markerend: "markerEnd",
18070 "marker-end": "markerEnd",
18071 markerheight: "markerHeight",
18072 markermid: "markerMid",
18073 "marker-mid": "markerMid",
18074 markerstart: "markerStart",
18075 "marker-start": "markerStart",
18076 markerunits: "markerUnits",
18077 markerwidth: "markerWidth",
18078 mask: "mask",
18079 maskcontentunits: "maskContentUnits",
18080 maskunits: "maskUnits",
18081 mathematical: "mathematical",
18082 mode: "mode",
18083 numoctaves: "numOctaves",
18084 offset: "offset",
18085 opacity: "opacity",
18086 operator: "operator",
18087 order: "order",
18088 orient: "orient",
18089 orientation: "orientation",
18090 origin: "origin",
18091 overflow: "overflow",
18092 overlineposition: "overlinePosition",
18093 "overline-position": "overlinePosition",
18094 overlinethickness: "overlineThickness",
18095 "overline-thickness": "overlineThickness",
18096 paintorder: "paintOrder",
18097 "paint-order": "paintOrder",
18098 panose1: "panose1",
18099 "panose-1": "panose1",
18100 pathlength: "pathLength",
18101 patterncontentunits: "patternContentUnits",
18102 patterntransform: "patternTransform",
18103 patternunits: "patternUnits",
18104 pointerevents: "pointerEvents",
18105 "pointer-events": "pointerEvents",
18106 points: "points",
18107 pointsatx: "pointsAtX",
18108 pointsaty: "pointsAtY",
18109 pointsatz: "pointsAtZ",
18110 popover: "popover",
18111 popovertarget: "popoverTarget",
18112 popovertargetaction: "popoverTargetAction",
18113 prefix: "prefix",
18114 preservealpha: "preserveAlpha",
18115 preserveaspectratio: "preserveAspectRatio",
18116 primitiveunits: "primitiveUnits",
18117 property: "property",
18118 r: "r",
18119 radius: "radius",
18120 refx: "refX",
18121 refy: "refY",
18122 renderingintent: "renderingIntent",
18123 "rendering-intent": "renderingIntent",
18124 repeatcount: "repeatCount",
18125 repeatdur: "repeatDur",
18126 requiredextensions: "requiredExtensions",
18127 requiredfeatures: "requiredFeatures",
18128 resource: "resource",
18129 restart: "restart",
18130 result: "result",
18131 results: "results",
18132 rotate: "rotate",
18133 rx: "rx",
18134 ry: "ry",
18135 scale: "scale",
18136 security: "security",
18137 seed: "seed",
18138 shaperendering: "shapeRendering",
18139 "shape-rendering": "shapeRendering",
18140 slope: "slope",
18141 spacing: "spacing",
18142 specularconstant: "specularConstant",
18143 specularexponent: "specularExponent",
18144 speed: "speed",
18145 spreadmethod: "spreadMethod",
18146 startoffset: "startOffset",
18147 stddeviation: "stdDeviation",
18148 stemh: "stemh",
18149 stemv: "stemv",
18150 stitchtiles: "stitchTiles",
18151 stopcolor: "stopColor",
18152 "stop-color": "stopColor",
18153 stopopacity: "stopOpacity",
18154 "stop-opacity": "stopOpacity",
18155 strikethroughposition: "strikethroughPosition",
18156 "strikethrough-position": "strikethroughPosition",
18157 strikethroughthickness: "strikethroughThickness",
18158 "strikethrough-thickness": "strikethroughThickness",
18159 string: "string",
18160 stroke: "stroke",
18161 strokedasharray: "strokeDasharray",
18162 "stroke-dasharray": "strokeDasharray",
18163 strokedashoffset: "strokeDashoffset",
18164 "stroke-dashoffset": "strokeDashoffset",
18165 strokelinecap: "strokeLinecap",
18166 "stroke-linecap": "strokeLinecap",
18167 strokelinejoin: "strokeLinejoin",
18168 "stroke-linejoin": "strokeLinejoin",
18169 strokemiterlimit: "strokeMiterlimit",
18170 "stroke-miterlimit": "strokeMiterlimit",
18171 strokewidth: "strokeWidth",
18172 "stroke-width": "strokeWidth",
18173 strokeopacity: "strokeOpacity",
18174 "stroke-opacity": "strokeOpacity",
18175 suppresscontenteditablewarning: "suppressContentEditableWarning",
18176 suppresshydrationwarning: "suppressHydrationWarning",
18177 surfacescale: "surfaceScale",
18178 systemlanguage: "systemLanguage",
18179 tablevalues: "tableValues",
18180 targetx: "targetX",
18181 targety: "targetY",
18182 textanchor: "textAnchor",
18183 "text-anchor": "textAnchor",
18184 textdecoration: "textDecoration",
18185 "text-decoration": "textDecoration",
18186 textlength: "textLength",
18187 textrendering: "textRendering",
18188 "text-rendering": "textRendering",
18189 to: "to",
18190 transform: "transform",
18191 transformorigin: "transformOrigin",
18192 "transform-origin": "transformOrigin",
18193 typeof: "typeof",
18194 u1: "u1",
18195 u2: "u2",
18196 underlineposition: "underlinePosition",
18197 "underline-position": "underlinePosition",
18198 underlinethickness: "underlineThickness",
18199 "underline-thickness": "underlineThickness",
18200 unicode: "unicode",
18201 unicodebidi: "unicodeBidi",
18202 "unicode-bidi": "unicodeBidi",
18203 unicoderange: "unicodeRange",
18204 "unicode-range": "unicodeRange",
18205 unitsperem: "unitsPerEm",
18206 "units-per-em": "unitsPerEm",
18207 unselectable: "unselectable",
18208 valphabetic: "vAlphabetic",
18209 "v-alphabetic": "vAlphabetic",
18210 values: "values",
18211 vectoreffect: "vectorEffect",
18212 "vector-effect": "vectorEffect",
18213 version: "version",
18214 vertadvy: "vertAdvY",
18215 "vert-adv-y": "vertAdvY",
18216 vertoriginx: "vertOriginX",
18217 "vert-origin-x": "vertOriginX",
18218 vertoriginy: "vertOriginY",
18219 "vert-origin-y": "vertOriginY",
18220 vhanging: "vHanging",
18221 "v-hanging": "vHanging",
18222 videographic: "vIdeographic",
18223 "v-ideographic": "vIdeographic",
18224 viewbox: "viewBox",
18225 viewtarget: "viewTarget",
18226 visibility: "visibility",
18227 vmathematical: "vMathematical",
18228 "v-mathematical": "vMathematical",
18229 vocab: "vocab",
18230 widths: "widths",
18231 wordspacing: "wordSpacing",
18232 "word-spacing": "wordSpacing",
18233 writingmode: "writingMode",
18234 "writing-mode": "writingMode",
18235 x1: "x1",
18236 x2: "x2",
18237 x: "x",
18238 xchannelselector: "xChannelSelector",
18239 xheight: "xHeight",
18240 "x-height": "xHeight",
18241 xlinkactuate: "xlinkActuate",
18242 "xlink:actuate": "xlinkActuate",
18243 xlinkarcrole: "xlinkArcrole",
18244 "xlink:arcrole": "xlinkArcrole",
18245 xlinkhref: "xlinkHref",
18246 "xlink:href": "xlinkHref",
18247 xlinkrole: "xlinkRole",
18248 "xlink:role": "xlinkRole",
18249 xlinkshow: "xlinkShow",
18250 "xlink:show": "xlinkShow",
18251 xlinktitle: "xlinkTitle",
18252 "xlink:title": "xlinkTitle",
18253 xlinktype: "xlinkType",
18254 "xlink:type": "xlinkType",
18255 xmlbase: "xmlBase",
18256 "xml:base": "xmlBase",
18257 xmllang: "xmlLang",
18258 "xml:lang": "xmlLang",
18259 xmlns: "xmlns",
18260 "xml:space": "xmlSpace",
18261 xmlnsxlink: "xmlnsXlink",
18262 "xmlns:xlink": "xmlnsXlink",
18263 xmlspace: "xmlSpace",
18264 y1: "y1",
18265 y2: "y2",
18266 y: "y",
18267 ychannelselector: "yChannelSelector",
18268 z: "z",
18269 zoomandpan: "zoomAndPan"
18270 }, ariaProperties = {
18271 "aria-current": 0,
18272 "aria-description": 0,
18273 "aria-details": 0,
18274 "aria-disabled": 0,
18275 "aria-hidden": 0,
18276 "aria-invalid": 0,
18277 "aria-keyshortcuts": 0,
18278 "aria-label": 0,
18279 "aria-roledescription": 0,
18280 "aria-autocomplete": 0,
18281 "aria-checked": 0,
18282 "aria-expanded": 0,
18283 "aria-haspopup": 0,
18284 "aria-level": 0,
18285 "aria-modal": 0,
18286 "aria-multiline": 0,
18287 "aria-multiselectable": 0,
18288 "aria-orientation": 0,
18289 "aria-placeholder": 0,
18290 "aria-pressed": 0,
18291 "aria-readonly": 0,
18292 "aria-required": 0,
18293 "aria-selected": 0,
18294 "aria-sort": 0,
18295 "aria-valuemax": 0,
18296 "aria-valuemin": 0,
18297 "aria-valuenow": 0,
18298 "aria-valuetext": 0,
18299 "aria-atomic": 0,
18300 "aria-busy": 0,
18301 "aria-live": 0,
18302 "aria-relevant": 0,
18303 "aria-dropeffect": 0,
18304 "aria-grabbed": 0,
18305 "aria-activedescendant": 0,
18306 "aria-colcount": 0,
18307 "aria-colindex": 0,
18308 "aria-colspan": 0,
18309 "aria-controls": 0,
18310 "aria-describedby": 0,
18311 "aria-errormessage": 0,
18312 "aria-flowto": 0,
18313 "aria-labelledby": 0,
18314 "aria-owns": 0,
18315 "aria-posinset": 0,
18316 "aria-rowcount": 0,
18317 "aria-rowindex": 0,
18318 "aria-rowspan": 0,
18319 "aria-setsize": 0,
18320 "aria-braillelabel": 0,
18321 "aria-brailleroledescription": 0,
18322 "aria-colindextext": 0,
18323 "aria-rowindextext": 0
18324 }, warnedProperties$1 = {}, rARIA$1 = RegExp(
18325 "^(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]*$"
18326 ), rARIACamel$1 = RegExp(
18327 "^(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]*$"
18328 ), didWarnValueNull = false, warnedProperties = {}, EVENT_NAME_REGEX = /^on./, INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/, rARIA = RegExp(
18329 "^(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]*$"
18330 ), rARIACamel = RegExp(
18331 "^(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]*$"
18332 ), 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;
18333 if (canUseDOM)
18334 try {
18335 var options$jscomp$0 = {};
18336 Object.defineProperty(options$jscomp$0, "passive", {
18337 get: function() {
18338 passiveBrowserEventsSupported = true;
18339 }
18340 });
18341 window.addEventListener("test", options$jscomp$0, options$jscomp$0);
18342 window.removeEventListener("test", options$jscomp$0, options$jscomp$0);
18343 } catch (e) {
18344 passiveBrowserEventsSupported = false;
18345 }
18346 var root = null, startText = null, fallbackText = null, EventInterface = {
18347 eventPhase: 0,
18348 bubbles: 0,
18349 cancelable: 0,
18350 timeStamp: function(event) {
18351 return event.timeStamp || Date.now();
18352 },
18353 defaultPrevented: 0,
18354 isTrusted: 0
18355 }, SyntheticEvent = createSyntheticEvent(EventInterface), UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }), SyntheticUIEvent = createSyntheticEvent(UIEventInterface), lastMovementX, lastMovementY, lastMouseEvent, MouseEventInterface = assign({}, UIEventInterface, {
18356 screenX: 0,
18357 screenY: 0,
18358 clientX: 0,
18359 clientY: 0,
18360 pageX: 0,
18361 pageY: 0,
18362 ctrlKey: 0,
18363 shiftKey: 0,
18364 altKey: 0,
18365 metaKey: 0,
18366 getModifierState: getEventModifierState,
18367 button: 0,
18368 buttons: 0,
18369 relatedTarget: function(event) {
18370 return void 0 === event.relatedTarget ? event.fromElement === event.srcElement ? event.toElement : event.fromElement : event.relatedTarget;
18371 },
18372 movementX: function(event) {
18373 if ("movementX" in event) return event.movementX;
18374 event !== lastMouseEvent && (lastMouseEvent && "mousemove" === event.type ? (lastMovementX = event.screenX - lastMouseEvent.screenX, lastMovementY = event.screenY - lastMouseEvent.screenY) : lastMovementY = lastMovementX = 0, lastMouseEvent = event);
18375 return lastMovementX;
18376 },
18377 movementY: function(event) {
18378 return "movementY" in event ? event.movementY : lastMovementY;
18379 }
18380 }), SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface), DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }), SyntheticDragEvent = createSyntheticEvent(DragEventInterface), FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }), SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface), AnimationEventInterface = assign({}, EventInterface, {
18381 animationName: 0,
18382 elapsedTime: 0,
18383 pseudoElement: 0
18384 }), SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface), ClipboardEventInterface = assign({}, EventInterface, {
18385 clipboardData: function(event) {
18386 return "clipboardData" in event ? event.clipboardData : window.clipboardData;
18387 }
18388 }), SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface), CompositionEventInterface = assign({}, EventInterface, { data: 0 }), SyntheticCompositionEvent = createSyntheticEvent(
18389 CompositionEventInterface
18390 ), SyntheticInputEvent = SyntheticCompositionEvent, normalizeKey = {
18391 Esc: "Escape",
18392 Spacebar: " ",
18393 Left: "ArrowLeft",
18394 Up: "ArrowUp",
18395 Right: "ArrowRight",
18396 Down: "ArrowDown",
18397 Del: "Delete",
18398 Win: "OS",
18399 Menu: "ContextMenu",
18400 Apps: "ContextMenu",
18401 Scroll: "ScrollLock",
18402 MozPrintableKey: "Unidentified"
18403 }, translateToKey = {
18404 8: "Backspace",
18405 9: "Tab",
18406 12: "Clear",
18407 13: "Enter",
18408 16: "Shift",
18409 17: "Control",
18410 18: "Alt",
18411 19: "Pause",
18412 20: "CapsLock",
18413 27: "Escape",
18414 32: " ",
18415 33: "PageUp",
18416 34: "PageDown",
18417 35: "End",
18418 36: "Home",
18419 37: "ArrowLeft",
18420 38: "ArrowUp",
18421 39: "ArrowRight",
18422 40: "ArrowDown",
18423 45: "Insert",
18424 46: "Delete",
18425 112: "F1",
18426 113: "F2",
18427 114: "F3",
18428 115: "F4",
18429 116: "F5",
18430 117: "F6",
18431 118: "F7",
18432 119: "F8",
18433 120: "F9",
18434 121: "F10",
18435 122: "F11",
18436 123: "F12",
18437 144: "NumLock",
18438 145: "ScrollLock",
18439 224: "Meta"
18440 }, modifierKeyToProp = {
18441 Alt: "altKey",
18442 Control: "ctrlKey",
18443 Meta: "metaKey",
18444 Shift: "shiftKey"
18445 }, KeyboardEventInterface = assign({}, UIEventInterface, {
18446 key: function(nativeEvent) {
18447 if (nativeEvent.key) {
18448 var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
18449 if ("Unidentified" !== key) return key;
18450 }
18451 return "keypress" === nativeEvent.type ? (nativeEvent = getEventCharCode(nativeEvent), 13 === nativeEvent ? "Enter" : String.fromCharCode(nativeEvent)) : "keydown" === nativeEvent.type || "keyup" === nativeEvent.type ? translateToKey[nativeEvent.keyCode] || "Unidentified" : "";
18452 },
18453 code: 0,
18454 location: 0,
18455 ctrlKey: 0,
18456 shiftKey: 0,
18457 altKey: 0,
18458 metaKey: 0,
18459 repeat: 0,
18460 locale: 0,
18461 getModifierState: getEventModifierState,
18462 charCode: function(event) {
18463 return "keypress" === event.type ? getEventCharCode(event) : 0;
18464 },
18465 keyCode: function(event) {
18466 return "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
18467 },
18468 which: function(event) {
18469 return "keypress" === event.type ? getEventCharCode(event) : "keydown" === event.type || "keyup" === event.type ? event.keyCode : 0;
18470 }
18471 }), SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface), PointerEventInterface = assign({}, MouseEventInterface, {
18472 pointerId: 0,
18473 width: 0,
18474 height: 0,
18475 pressure: 0,
18476 tangentialPressure: 0,
18477 tiltX: 0,
18478 tiltY: 0,
18479 twist: 0,
18480 pointerType: 0,
18481 isPrimary: 0
18482 }), SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface), TouchEventInterface = assign({}, UIEventInterface, {
18483 touches: 0,
18484 targetTouches: 0,
18485 changedTouches: 0,
18486 altKey: 0,
18487 metaKey: 0,
18488 ctrlKey: 0,
18489 shiftKey: 0,
18490 getModifierState: getEventModifierState
18491 }), SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface), TransitionEventInterface = assign({}, EventInterface, {
18492 propertyName: 0,
18493 elapsedTime: 0,
18494 pseudoElement: 0
18495 }), SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface), WheelEventInterface = assign({}, MouseEventInterface, {
18496 deltaX: function(event) {
18497 return "deltaX" in event ? event.deltaX : "wheelDeltaX" in event ? -event.wheelDeltaX : 0;
18498 },
18499 deltaY: function(event) {
18500 return "deltaY" in event ? event.deltaY : "wheelDeltaY" in event ? -event.wheelDeltaY : "wheelDelta" in event ? -event.wheelDelta : 0;
18501 },
18502 deltaZ: 0,
18503 deltaMode: 0
18504 }), SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface), ToggleEventInterface = assign({}, EventInterface, {
18505 newState: 0,
18506 oldState: 0
18507 }), SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface), END_KEYCODES = [9, 13, 27, 32], START_KEYCODE = 229, canUseCompositionEvent = canUseDOM && "CompositionEvent" in window, documentMode = null;
18508 canUseDOM && "documentMode" in document && (documentMode = document.documentMode);
18509 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 = {
18510 color: true,
18511 date: true,
18512 datetime: true,
18513 "datetime-local": true,
18514 email: true,
18515 month: true,
18516 number: true,
18517 password: true,
18518 range: true,
18519 search: true,
18520 tel: true,
18521 text: true,
18522 time: true,
18523 url: true,
18524 week: true
18525 }, activeElement$1 = null, activeElementInst$1 = null, isInputEventSupported = false;
18526 canUseDOM && (isInputEventSupported = isEventSupported("input") && (!document.documentMode || 9 < document.documentMode));
18527 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 = {
18528 animationend: makePrefixMap("Animation", "AnimationEnd"),
18529 animationiteration: makePrefixMap("Animation", "AnimationIteration"),
18530 animationstart: makePrefixMap("Animation", "AnimationStart"),
18531 transitionrun: makePrefixMap("Transition", "TransitionRun"),
18532 transitionstart: makePrefixMap("Transition", "TransitionStart"),
18533 transitioncancel: makePrefixMap("Transition", "TransitionCancel"),
18534 transitionend: makePrefixMap("Transition", "TransitionEnd")
18535 }, prefixedEventNames = {}, style = {};
18536 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);
18537 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(
18538 " "
18539 );
18540 simpleEventPluginEvents.push("scrollEnd");
18541 var lastResetTime = 0;
18542 if ("object" === typeof performance && "function" === typeof performance.now) {
18543 var localPerformance = performance;
18544 var getCurrentTime = function() {
18545 return localPerformance.now();
18546 };
18547 } else {
18548 var localDate = Date;
18549 getCurrentTime = function() {
18550 return localDate.now();
18551 };
18552 }
18553 var reportGlobalError = "function" === typeof reportError ? reportError : function(error) {
18554 if ("object" === typeof window && "function" === typeof window.ErrorEvent) {
18555 var event = new window.ErrorEvent("error", {
18556 bubbles: true,
18557 cancelable: true,
18558 message: "object" === typeof error && null !== error && "string" === typeof error.message ? String(error.message) : String(error),
18559 error
18560 });
18561 if (!window.dispatchEvent(event)) return;
18562 } else if ("object" === typeof process && "function" === typeof process.emit) {
18563 process.emit("uncaughtException", error);
18564 return;
18565 }
18566 console.error(error);
18567 }, OMITTED_PROP_ERROR = "This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.", EMPTY_ARRAY = 0, COMPLEX_ARRAY = 1, PRIMITIVE_ARRAY = 2, ENTRIES_ARRAY = 3, REMOVED = "\u2013\xA0", ADDED = "+\xA0", UNCHANGED = "\u2007\xA0", supportsUserTiming = "undefined" !== typeof console && "function" === typeof console.timeStamp && "undefined" !== typeof performance && "function" === typeof performance.measure, COMPONENTS_TRACK = "Components \u269B", LANES_TRACK_GROUP = "Scheduler \u269B", currentTrack = "Blocking", alreadyWarnedForDeepEquality = false, reusableComponentDevToolDetails = {
18568 color: "primary",
18569 properties: null,
18570 tooltipText: "",
18571 track: COMPONENTS_TRACK
18572 }, reusableComponentOptions = {
18573 start: -0,
18574 end: -0,
18575 detail: { devtools: reusableComponentDevToolDetails }
18576 }, resuableChangedPropsEntry = ["Changed Props", ""], DEEP_EQUALITY_WARNING = "This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.", reusableDeeplyEqualPropsEntry = ["Changed Props", DEEP_EQUALITY_WARNING], OffscreenVisible = 1, OffscreenPassiveEffectsConnected = 2, concurrentQueues = [], concurrentQueuesIndex = 0, concurrentlyUpdatedLanes = 0, emptyContextObject = {};
18577 Object.freeze(emptyContextObject);
18578 var resolveFamily = null, failedBoundaries = null, NoMode = 0, ConcurrentMode = 1, ProfileMode = 2, StrictLegacyMode = 8, StrictEffectsMode = 16, SuspenseyImagesMode = 32;
18579 var hasBadMapPolyfill = false;
18580 try {
18581 var nonExtensibleObject = Object.preventExtensions({});
18582 /* @__PURE__ */ new Map([[nonExtensibleObject, null]]);
18583 /* @__PURE__ */ new Set([nonExtensibleObject]);
18584 } catch (e$3) {
18585 hasBadMapPolyfill = true;
18586 }
18587 var CapturedStacks = /* @__PURE__ */ new WeakMap(), 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(
18588 "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."
18589 ), valueCursor = createCursor(null);
18590 var rendererCursorDEV = createCursor(null);
18591 var rendererSigil = {};
18592 var currentlyRenderingFiber$1 = null, lastContextDependency = null, isDisallowedContextReadInDEV = false, AbortControllerLocal = "undefined" !== typeof AbortController ? AbortController : function() {
18593 var listeners = [], signal = this.signal = {
18594 aborted: false,
18595 addEventListener: function(type, listener) {
18596 listeners.push(listener);
18597 }
18598 };
18599 this.abort = function() {
18600 signal.aborted = true;
18601 listeners.forEach(function(listener) {
18602 return listener();
18603 });
18604 };
18605 }, scheduleCallback$2 = Scheduler.unstable_scheduleCallback, NormalPriority = Scheduler.unstable_NormalPriority, CacheContext = {
18606 $$typeof: REACT_CONTEXT_TYPE,
18607 Consumer: null,
18608 Provider: null,
18609 _currentValue: null,
18610 _currentValue2: null,
18611 _threadCount: 0,
18612 _currentRenderer: null,
18613 _currentRenderer2: null
18614 }, now = Scheduler.unstable_now, createTask = console.createTask ? console.createTask : function() {
18615 return null;
18616 }, SPAWNED_UPDATE = 1, PINGED_UPDATE = 2, renderStartTime = -0, commitStartTime = -0, commitEndTime = -0, commitErrors = null, profilerStartTime = -1.1, profilerEffectDuration = -0, componentEffectDuration = -0, componentEffectStartTime = -1.1, componentEffectEndTime = -1.1, componentEffectErrors = null, componentEffectSpawnedUpdate = false, blockingClampTime = -0, blockingUpdateTime = -1.1, blockingUpdateTask = null, blockingUpdateType = 0, blockingUpdateMethodName = null, blockingUpdateComponentName = null, blockingEventTime = -1.1, blockingEventType = null, blockingEventRepeatTime = -1.1, blockingSuspendedTime = -1.1, transitionClampTime = -0, transitionStartTime = -1.1, transitionUpdateTime = -1.1, transitionUpdateType = 0, transitionUpdateTask = null, transitionUpdateMethodName = null, transitionUpdateComponentName = null, transitionEventTime = -1.1, transitionEventType = null, transitionEventRepeatTime = -1.1, transitionSuspendedTime = -1.1, retryClampTime = -0, idleClampTime = -0, animatingLanes = 0, animatingTask = null, yieldReason = 0, yieldStartTime = -1.1, currentUpdateIsNested = false, nestedUpdateScheduled = false, currentEntangledListeners = null, currentEntangledPendingCount = 0, currentEntangledLane = 0, currentEntangledActionThenable = null, prevOnStartTransitionFinish = ReactSharedInternals.S;
18617 ReactSharedInternals.S = function(transition, returnValue) {
18618 globalMostRecentTransitionTime = now$1();
18619 if ("object" === typeof returnValue && null !== returnValue && "function" === typeof returnValue.then) {
18620 if (0 > transitionStartTime && 0 > transitionUpdateTime) {
18621 transitionStartTime = now();
18622 var newEventTime = resolveEventTimeStamp(), newEventType = resolveEventType();
18623 if (newEventTime !== transitionEventRepeatTime || newEventType !== transitionEventType)
18624 transitionEventRepeatTime = -1.1;
18625 transitionEventTime = newEventTime;
18626 transitionEventType = newEventType;
18627 }
18628 entangleAsyncAction(transition, returnValue);
18629 }
18630 null !== prevOnStartTransitionFinish && prevOnStartTransitionFinish(transition, returnValue);
18631 };
18632 var resumedCache = createCursor(null), ReactStrictModeWarnings = {
18633 recordUnsafeLifecycleWarnings: function() {
18634 },
18635 flushPendingUnsafeLifecycleWarnings: function() {
18636 },
18637 recordLegacyContextWarning: function() {
18638 },
18639 flushLegacyContextWarning: function() {
18640 },
18641 discardPendingWarnings: function() {
18642 }
18643 }, pendingComponentWillMountWarnings = [], pendingUNSAFE_ComponentWillMountWarnings = [], pendingComponentWillReceivePropsWarnings = [], pendingUNSAFE_ComponentWillReceivePropsWarnings = [], pendingComponentWillUpdateWarnings = [], pendingUNSAFE_ComponentWillUpdateWarnings = [], didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
18644 ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
18645 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));
18646 };
18647 ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
18648 var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
18649 0 < pendingComponentWillMountWarnings.length && (pendingComponentWillMountWarnings.forEach(function(fiber) {
18650 componentWillMountUniqueNames.add(
18651 getComponentNameFromFiber(fiber) || "Component"
18652 );
18653 didWarnAboutUnsafeLifecycles.add(fiber.type);
18654 }), pendingComponentWillMountWarnings = []);
18655 var UNSAFE_componentWillMountUniqueNames = /* @__PURE__ */ new Set();
18656 0 < pendingUNSAFE_ComponentWillMountWarnings.length && (pendingUNSAFE_ComponentWillMountWarnings.forEach(function(fiber) {
18657 UNSAFE_componentWillMountUniqueNames.add(
18658 getComponentNameFromFiber(fiber) || "Component"
18659 );
18660 didWarnAboutUnsafeLifecycles.add(fiber.type);
18661 }), pendingUNSAFE_ComponentWillMountWarnings = []);
18662 var componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
18663 0 < pendingComponentWillReceivePropsWarnings.length && (pendingComponentWillReceivePropsWarnings.forEach(function(fiber) {
18664 componentWillReceivePropsUniqueNames.add(
18665 getComponentNameFromFiber(fiber) || "Component"
18666 );
18667 didWarnAboutUnsafeLifecycles.add(fiber.type);
18668 }), pendingComponentWillReceivePropsWarnings = []);
18669 var UNSAFE_componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
18670 0 < pendingUNSAFE_ComponentWillReceivePropsWarnings.length && (pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(
18671 function(fiber) {
18672 UNSAFE_componentWillReceivePropsUniqueNames.add(
18673 getComponentNameFromFiber(fiber) || "Component"
18674 );
18675 didWarnAboutUnsafeLifecycles.add(fiber.type);
18676 }
18677 ), pendingUNSAFE_ComponentWillReceivePropsWarnings = []);
18678 var componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
18679 0 < pendingComponentWillUpdateWarnings.length && (pendingComponentWillUpdateWarnings.forEach(function(fiber) {
18680 componentWillUpdateUniqueNames.add(
18681 getComponentNameFromFiber(fiber) || "Component"
18682 );
18683 didWarnAboutUnsafeLifecycles.add(fiber.type);
18684 }), pendingComponentWillUpdateWarnings = []);
18685 var UNSAFE_componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
18686 0 < pendingUNSAFE_ComponentWillUpdateWarnings.length && (pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
18687 UNSAFE_componentWillUpdateUniqueNames.add(
18688 getComponentNameFromFiber(fiber) || "Component"
18689 );
18690 didWarnAboutUnsafeLifecycles.add(fiber.type);
18691 }), pendingUNSAFE_ComponentWillUpdateWarnings = []);
18692 if (0 < UNSAFE_componentWillMountUniqueNames.size) {
18693 var sortedNames = setToSortedString(
18694 UNSAFE_componentWillMountUniqueNames
18695 );
18696 console.error(
18697 "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",
18698 sortedNames
18699 );
18700 }
18701 0 < UNSAFE_componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
18702 UNSAFE_componentWillReceivePropsUniqueNames
18703 ), console.error(
18704 "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",
18705 sortedNames
18706 ));
18707 0 < UNSAFE_componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(
18708 UNSAFE_componentWillUpdateUniqueNames
18709 ), console.error(
18710 "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",
18711 sortedNames
18712 ));
18713 0 < componentWillMountUniqueNames.size && (sortedNames = setToSortedString(componentWillMountUniqueNames), console.warn(
18714 "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",
18715 sortedNames
18716 ));
18717 0 < componentWillReceivePropsUniqueNames.size && (sortedNames = setToSortedString(
18718 componentWillReceivePropsUniqueNames
18719 ), console.warn(
18720 "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",
18721 sortedNames
18722 ));
18723 0 < componentWillUpdateUniqueNames.size && (sortedNames = setToSortedString(componentWillUpdateUniqueNames), console.warn(
18724 "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",
18725 sortedNames
18726 ));
18727 };
18728 var pendingLegacyContextWarning = /* @__PURE__ */ new Map(), didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
18729 ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
18730 var strictRoot = null;
18731 for (var node = fiber; null !== node; )
18732 node.mode & StrictLegacyMode && (strictRoot = node), node = node.return;
18733 null === strictRoot ? console.error(
18734 "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."
18735 ) : !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));
18736 };
18737 ReactStrictModeWarnings.flushLegacyContextWarning = function() {
18738 pendingLegacyContextWarning.forEach(function(fiberArray) {
18739 if (0 !== fiberArray.length) {
18740 var firstFiber = fiberArray[0], uniqueNames = /* @__PURE__ */ new Set();
18741 fiberArray.forEach(function(fiber) {
18742 uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
18743 didWarnAboutLegacyContext.add(fiber.type);
18744 });
18745 var sortedNames = setToSortedString(uniqueNames);
18746 runWithFiberInDEV(firstFiber, function() {
18747 console.error(
18748 "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",
18749 sortedNames
18750 );
18751 });
18752 }
18753 });
18754 };
18755 ReactStrictModeWarnings.discardPendingWarnings = function() {
18756 pendingComponentWillMountWarnings = [];
18757 pendingUNSAFE_ComponentWillMountWarnings = [];
18758 pendingComponentWillReceivePropsWarnings = [];
18759 pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
18760 pendingComponentWillUpdateWarnings = [];
18761 pendingUNSAFE_ComponentWillUpdateWarnings = [];
18762 pendingLegacyContextWarning = /* @__PURE__ */ new Map();
18763 };
18764 var callComponent = {
18765 react_stack_bottom_frame: function(Component, props, secondArg) {
18766 var wasRendering = isRendering;
18767 isRendering = true;
18768 try {
18769 return Component(props, secondArg);
18770 } finally {
18771 isRendering = wasRendering;
18772 }
18773 }
18774 }, callComponentInDEV = callComponent.react_stack_bottom_frame.bind(callComponent), callRender = {
18775 react_stack_bottom_frame: function(instance) {
18776 var wasRendering = isRendering;
18777 isRendering = true;
18778 try {
18779 return instance.render();
18780 } finally {
18781 isRendering = wasRendering;
18782 }
18783 }
18784 }, callRenderInDEV = callRender.react_stack_bottom_frame.bind(callRender), callComponentDidMount = {
18785 react_stack_bottom_frame: function(finishedWork, instance) {
18786 try {
18787 instance.componentDidMount();
18788 } catch (error) {
18789 captureCommitPhaseError(finishedWork, finishedWork.return, error);
18790 }
18791 }
18792 }, callComponentDidMountInDEV = callComponentDidMount.react_stack_bottom_frame.bind(
18793 callComponentDidMount
18794 ), callComponentDidUpdate = {
18795 react_stack_bottom_frame: function(finishedWork, instance, prevProps, prevState, snapshot) {
18796 try {
18797 instance.componentDidUpdate(prevProps, prevState, snapshot);
18798 } catch (error) {
18799 captureCommitPhaseError(finishedWork, finishedWork.return, error);
18800 }
18801 }
18802 }, callComponentDidUpdateInDEV = callComponentDidUpdate.react_stack_bottom_frame.bind(
18803 callComponentDidUpdate
18804 ), callComponentDidCatch = {
18805 react_stack_bottom_frame: function(instance, errorInfo) {
18806 var stack = errorInfo.stack;
18807 instance.componentDidCatch(errorInfo.value, {
18808 componentStack: null !== stack ? stack : ""
18809 });
18810 }
18811 }, callComponentDidCatchInDEV = callComponentDidCatch.react_stack_bottom_frame.bind(
18812 callComponentDidCatch
18813 ), callComponentWillUnmount = {
18814 react_stack_bottom_frame: function(current2, nearestMountedAncestor, instance) {
18815 try {
18816 instance.componentWillUnmount();
18817 } catch (error) {
18818 captureCommitPhaseError(current2, nearestMountedAncestor, error);
18819 }
18820 }
18821 }, callComponentWillUnmountInDEV = callComponentWillUnmount.react_stack_bottom_frame.bind(
18822 callComponentWillUnmount
18823 ), callCreate = {
18824 react_stack_bottom_frame: function(effect) {
18825 var create = effect.create;
18826 effect = effect.inst;
18827 create = create();
18828 return effect.destroy = create;
18829 }
18830 }, callCreateInDEV = callCreate.react_stack_bottom_frame.bind(callCreate), callDestroy = {
18831 react_stack_bottom_frame: function(current2, nearestMountedAncestor, destroy) {
18832 try {
18833 destroy();
18834 } catch (error) {
18835 captureCommitPhaseError(current2, nearestMountedAncestor, error);
18836 }
18837 }
18838 }, callDestroyInDEV = callDestroy.react_stack_bottom_frame.bind(callDestroy), callLazyInit = {
18839 react_stack_bottom_frame: function(lazy) {
18840 var init = lazy._init;
18841 return init(lazy._payload);
18842 }
18843 }, callLazyInitInDEV = callLazyInit.react_stack_bottom_frame.bind(callLazyInit), SuspenseException = Error(
18844 "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`."
18845 ), SuspenseyCommitException = Error(
18846 "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."
18847 ), SuspenseActionException = Error(
18848 "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."
18849 ), noopSuspenseyCommitThenable = {
18850 then: function() {
18851 console.error(
18852 'Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.'
18853 );
18854 }
18855 }, suspendedThenable = null, needsToResetSuspendedThenableDEV = false, thenableState$1 = null, thenableIndexCounter$1 = 0, currentDebugInfo = null, didWarnAboutMaps;
18856 var didWarnAboutGenerators = didWarnAboutMaps = false;
18857 var ownerHasKeyUseWarning = {};
18858 var ownerHasFunctionTypeWarning = {};
18859 var ownerHasSymbolTypeWarning = {};
18860 warnForMissingKey = function(returnFiber, workInProgress2, child) {
18861 if (null !== child && "object" === typeof child && child._store && (!child._store.validated && null == child.key || 2 === child._store.validated)) {
18862 if ("object" !== typeof child._store)
18863 throw Error(
18864 "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue."
18865 );
18866 child._store.validated = 1;
18867 var componentName2 = getComponentNameFromFiber(returnFiber), componentKey = componentName2 || "null";
18868 if (!ownerHasKeyUseWarning[componentKey]) {
18869 ownerHasKeyUseWarning[componentKey] = true;
18870 child = child._owner;
18871 returnFiber = returnFiber._debugOwner;
18872 var currentComponentErrorInfo = "";
18873 returnFiber && "number" === typeof returnFiber.tag && (componentKey = getComponentNameFromFiber(returnFiber)) && (currentComponentErrorInfo = "\n\nCheck the render method of `" + componentKey + "`.");
18874 currentComponentErrorInfo || componentName2 && (currentComponentErrorInfo = "\n\nCheck the top-level render call using <" + componentName2 + ">.");
18875 var childOwnerAppendix = "";
18876 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 + "."));
18877 runWithFiberInDEV(workInProgress2, function() {
18878 console.error(
18879 'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
18880 currentComponentErrorInfo,
18881 childOwnerAppendix
18882 );
18883 });
18884 }
18885 }
18886 };
18887 var reconcileChildFibers = createChildReconciler(true), mountChildFibers = createChildReconciler(false), UpdateState = 0, ReplaceState = 1, ForceUpdate = 2, CaptureUpdate = 3, hasForceUpdate = false;
18888 var didWarnUpdateInsideUpdate = false;
18889 var currentlyProcessingQueue = null;
18890 var didReadFromEntangledAsyncAction = false, currentTreeHiddenStackCursor = createCursor(null), prevEntangledRenderLanesCursor = createCursor(0), suspenseHandlerStackCursor = createCursor(null), shellBoundary = null, SubtreeSuspenseContextMask = 1, ForceSuspenseFallback = 2, suspenseStackCursor = createCursor(0), NoFlags = 0, HasEffect = 1, Insertion = 2, Layout = 4, Passive = 8, didWarnUncachedGetSnapshot;
18891 var didWarnAboutMismatchedHooksForComponent = /* @__PURE__ */ new Set();
18892 var didWarnAboutUseWrappedInTryCatch = /* @__PURE__ */ new Set();
18893 var didWarnAboutAsyncClientComponent = /* @__PURE__ */ new Set();
18894 var didWarnAboutUseFormState = /* @__PURE__ */ new Set();
18895 var renderLanes = 0, currentlyRenderingFiber = null, currentHook = null, workInProgressHook = null, didScheduleRenderPhaseUpdate = false, didScheduleRenderPhaseUpdateDuringThisPass = false, shouldDoubleInvokeUserFnsInHooksDEV = false, localIdCounter = 0, thenableIndexCounter = 0, thenableState = null, globalClientIdCounter = 0, RE_RENDER_LIMIT = 25, currentHookNameInDev = null, hookTypesDev = null, hookTypesUpdateIndexDev = -1, ignorePreviousDependencies = false, ContextOnlyDispatcher = {
18896 readContext,
18897 use,
18898 useCallback: throwInvalidHookError,
18899 useContext: throwInvalidHookError,
18900 useEffect: throwInvalidHookError,
18901 useImperativeHandle: throwInvalidHookError,
18902 useLayoutEffect: throwInvalidHookError,
18903 useInsertionEffect: throwInvalidHookError,
18904 useMemo: throwInvalidHookError,
18905 useReducer: throwInvalidHookError,
18906 useRef: throwInvalidHookError,
18907 useState: throwInvalidHookError,
18908 useDebugValue: throwInvalidHookError,
18909 useDeferredValue: throwInvalidHookError,
18910 useTransition: throwInvalidHookError,
18911 useSyncExternalStore: throwInvalidHookError,
18912 useId: throwInvalidHookError,
18913 useHostTransitionStatus: throwInvalidHookError,
18914 useFormState: throwInvalidHookError,
18915 useActionState: throwInvalidHookError,
18916 useOptimistic: throwInvalidHookError,
18917 useMemoCache: throwInvalidHookError,
18918 useCacheRefresh: throwInvalidHookError
18919 };
18920 ContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;
18921 var HooksDispatcherOnMountInDEV = null, HooksDispatcherOnMountWithHookTypesInDEV = null, HooksDispatcherOnUpdateInDEV = null, HooksDispatcherOnRerenderInDEV = null, InvalidNestedHooksDispatcherOnMountInDEV = null, InvalidNestedHooksDispatcherOnUpdateInDEV = null, InvalidNestedHooksDispatcherOnRerenderInDEV = null;
18922 HooksDispatcherOnMountInDEV = {
18923 readContext: function(context) {
18924 return readContext(context);
18925 },
18926 use,
18927 useCallback: function(callback, deps) {
18928 currentHookNameInDev = "useCallback";
18929 mountHookTypesDev();
18930 checkDepsAreArrayDev(deps);
18931 return mountCallback(callback, deps);
18932 },
18933 useContext: function(context) {
18934 currentHookNameInDev = "useContext";
18935 mountHookTypesDev();
18936 return readContext(context);
18937 },
18938 useEffect: function(create, deps) {
18939 currentHookNameInDev = "useEffect";
18940 mountHookTypesDev();
18941 checkDepsAreArrayDev(deps);
18942 return mountEffect(create, deps);
18943 },
18944 useImperativeHandle: function(ref, create, deps) {
18945 currentHookNameInDev = "useImperativeHandle";
18946 mountHookTypesDev();
18947 checkDepsAreArrayDev(deps);
18948 return mountImperativeHandle(ref, create, deps);
18949 },
18950 useInsertionEffect: function(create, deps) {
18951 currentHookNameInDev = "useInsertionEffect";
18952 mountHookTypesDev();
18953 checkDepsAreArrayDev(deps);
18954 mountEffectImpl(4, Insertion, create, deps);
18955 },
18956 useLayoutEffect: function(create, deps) {
18957 currentHookNameInDev = "useLayoutEffect";
18958 mountHookTypesDev();
18959 checkDepsAreArrayDev(deps);
18960 return mountLayoutEffect(create, deps);
18961 },
18962 useMemo: function(create, deps) {
18963 currentHookNameInDev = "useMemo";
18964 mountHookTypesDev();
18965 checkDepsAreArrayDev(deps);
18966 var prevDispatcher = ReactSharedInternals.H;
18967 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
18968 try {
18969 return mountMemo(create, deps);
18970 } finally {
18971 ReactSharedInternals.H = prevDispatcher;
18972 }
18973 },
18974 useReducer: function(reducer, initialArg, init) {
18975 currentHookNameInDev = "useReducer";
18976 mountHookTypesDev();
18977 var prevDispatcher = ReactSharedInternals.H;
18978 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
18979 try {
18980 return mountReducer(reducer, initialArg, init);
18981 } finally {
18982 ReactSharedInternals.H = prevDispatcher;
18983 }
18984 },
18985 useRef: function(initialValue) {
18986 currentHookNameInDev = "useRef";
18987 mountHookTypesDev();
18988 return mountRef(initialValue);
18989 },
18990 useState: function(initialState) {
18991 currentHookNameInDev = "useState";
18992 mountHookTypesDev();
18993 var prevDispatcher = ReactSharedInternals.H;
18994 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
18995 try {
18996 return mountState(initialState);
18997 } finally {
18998 ReactSharedInternals.H = prevDispatcher;
18999 }
19000 },
19001 useDebugValue: function() {
19002 currentHookNameInDev = "useDebugValue";
19003 mountHookTypesDev();
19004 },
19005 useDeferredValue: function(value, initialValue) {
19006 currentHookNameInDev = "useDeferredValue";
19007 mountHookTypesDev();
19008 return mountDeferredValue(value, initialValue);
19009 },
19010 useTransition: function() {
19011 currentHookNameInDev = "useTransition";
19012 mountHookTypesDev();
19013 return mountTransition();
19014 },
19015 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19016 currentHookNameInDev = "useSyncExternalStore";
19017 mountHookTypesDev();
19018 return mountSyncExternalStore(
19019 subscribe,
19020 getSnapshot,
19021 getServerSnapshot
19022 );
19023 },
19024 useId: function() {
19025 currentHookNameInDev = "useId";
19026 mountHookTypesDev();
19027 return mountId();
19028 },
19029 useFormState: function(action, initialState) {
19030 currentHookNameInDev = "useFormState";
19031 mountHookTypesDev();
19032 warnOnUseFormStateInDev();
19033 return mountActionState(action, initialState);
19034 },
19035 useActionState: function(action, initialState) {
19036 currentHookNameInDev = "useActionState";
19037 mountHookTypesDev();
19038 return mountActionState(action, initialState);
19039 },
19040 useOptimistic: function(passthrough) {
19041 currentHookNameInDev = "useOptimistic";
19042 mountHookTypesDev();
19043 return mountOptimistic(passthrough);
19044 },
19045 useHostTransitionStatus,
19046 useMemoCache,
19047 useCacheRefresh: function() {
19048 currentHookNameInDev = "useCacheRefresh";
19049 mountHookTypesDev();
19050 return mountRefresh();
19051 },
19052 useEffectEvent: function(callback) {
19053 currentHookNameInDev = "useEffectEvent";
19054 mountHookTypesDev();
19055 return mountEvent(callback);
19056 }
19057 };
19058 HooksDispatcherOnMountWithHookTypesInDEV = {
19059 readContext: function(context) {
19060 return readContext(context);
19061 },
19062 use,
19063 useCallback: function(callback, deps) {
19064 currentHookNameInDev = "useCallback";
19065 updateHookTypesDev();
19066 return mountCallback(callback, deps);
19067 },
19068 useContext: function(context) {
19069 currentHookNameInDev = "useContext";
19070 updateHookTypesDev();
19071 return readContext(context);
19072 },
19073 useEffect: function(create, deps) {
19074 currentHookNameInDev = "useEffect";
19075 updateHookTypesDev();
19076 return mountEffect(create, deps);
19077 },
19078 useImperativeHandle: function(ref, create, deps) {
19079 currentHookNameInDev = "useImperativeHandle";
19080 updateHookTypesDev();
19081 return mountImperativeHandle(ref, create, deps);
19082 },
19083 useInsertionEffect: function(create, deps) {
19084 currentHookNameInDev = "useInsertionEffect";
19085 updateHookTypesDev();
19086 mountEffectImpl(4, Insertion, create, deps);
19087 },
19088 useLayoutEffect: function(create, deps) {
19089 currentHookNameInDev = "useLayoutEffect";
19090 updateHookTypesDev();
19091 return mountLayoutEffect(create, deps);
19092 },
19093 useMemo: function(create, deps) {
19094 currentHookNameInDev = "useMemo";
19095 updateHookTypesDev();
19096 var prevDispatcher = ReactSharedInternals.H;
19097 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19098 try {
19099 return mountMemo(create, deps);
19100 } finally {
19101 ReactSharedInternals.H = prevDispatcher;
19102 }
19103 },
19104 useReducer: function(reducer, initialArg, init) {
19105 currentHookNameInDev = "useReducer";
19106 updateHookTypesDev();
19107 var prevDispatcher = ReactSharedInternals.H;
19108 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19109 try {
19110 return mountReducer(reducer, initialArg, init);
19111 } finally {
19112 ReactSharedInternals.H = prevDispatcher;
19113 }
19114 },
19115 useRef: function(initialValue) {
19116 currentHookNameInDev = "useRef";
19117 updateHookTypesDev();
19118 return mountRef(initialValue);
19119 },
19120 useState: function(initialState) {
19121 currentHookNameInDev = "useState";
19122 updateHookTypesDev();
19123 var prevDispatcher = ReactSharedInternals.H;
19124 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19125 try {
19126 return mountState(initialState);
19127 } finally {
19128 ReactSharedInternals.H = prevDispatcher;
19129 }
19130 },
19131 useDebugValue: function() {
19132 currentHookNameInDev = "useDebugValue";
19133 updateHookTypesDev();
19134 },
19135 useDeferredValue: function(value, initialValue) {
19136 currentHookNameInDev = "useDeferredValue";
19137 updateHookTypesDev();
19138 return mountDeferredValue(value, initialValue);
19139 },
19140 useTransition: function() {
19141 currentHookNameInDev = "useTransition";
19142 updateHookTypesDev();
19143 return mountTransition();
19144 },
19145 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19146 currentHookNameInDev = "useSyncExternalStore";
19147 updateHookTypesDev();
19148 return mountSyncExternalStore(
19149 subscribe,
19150 getSnapshot,
19151 getServerSnapshot
19152 );
19153 },
19154 useId: function() {
19155 currentHookNameInDev = "useId";
19156 updateHookTypesDev();
19157 return mountId();
19158 },
19159 useActionState: function(action, initialState) {
19160 currentHookNameInDev = "useActionState";
19161 updateHookTypesDev();
19162 return mountActionState(action, initialState);
19163 },
19164 useFormState: function(action, initialState) {
19165 currentHookNameInDev = "useFormState";
19166 updateHookTypesDev();
19167 warnOnUseFormStateInDev();
19168 return mountActionState(action, initialState);
19169 },
19170 useOptimistic: function(passthrough) {
19171 currentHookNameInDev = "useOptimistic";
19172 updateHookTypesDev();
19173 return mountOptimistic(passthrough);
19174 },
19175 useHostTransitionStatus,
19176 useMemoCache,
19177 useCacheRefresh: function() {
19178 currentHookNameInDev = "useCacheRefresh";
19179 updateHookTypesDev();
19180 return mountRefresh();
19181 },
19182 useEffectEvent: function(callback) {
19183 currentHookNameInDev = "useEffectEvent";
19184 updateHookTypesDev();
19185 return mountEvent(callback);
19186 }
19187 };
19188 HooksDispatcherOnUpdateInDEV = {
19189 readContext: function(context) {
19190 return readContext(context);
19191 },
19192 use,
19193 useCallback: function(callback, deps) {
19194 currentHookNameInDev = "useCallback";
19195 updateHookTypesDev();
19196 return updateCallback(callback, deps);
19197 },
19198 useContext: function(context) {
19199 currentHookNameInDev = "useContext";
19200 updateHookTypesDev();
19201 return readContext(context);
19202 },
19203 useEffect: function(create, deps) {
19204 currentHookNameInDev = "useEffect";
19205 updateHookTypesDev();
19206 updateEffectImpl(2048, Passive, create, deps);
19207 },
19208 useImperativeHandle: function(ref, create, deps) {
19209 currentHookNameInDev = "useImperativeHandle";
19210 updateHookTypesDev();
19211 return updateImperativeHandle(ref, create, deps);
19212 },
19213 useInsertionEffect: function(create, deps) {
19214 currentHookNameInDev = "useInsertionEffect";
19215 updateHookTypesDev();
19216 return updateEffectImpl(4, Insertion, create, deps);
19217 },
19218 useLayoutEffect: function(create, deps) {
19219 currentHookNameInDev = "useLayoutEffect";
19220 updateHookTypesDev();
19221 return updateEffectImpl(4, Layout, create, deps);
19222 },
19223 useMemo: function(create, deps) {
19224 currentHookNameInDev = "useMemo";
19225 updateHookTypesDev();
19226 var prevDispatcher = ReactSharedInternals.H;
19227 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19228 try {
19229 return updateMemo(create, deps);
19230 } finally {
19231 ReactSharedInternals.H = prevDispatcher;
19232 }
19233 },
19234 useReducer: function(reducer, initialArg, init) {
19235 currentHookNameInDev = "useReducer";
19236 updateHookTypesDev();
19237 var prevDispatcher = ReactSharedInternals.H;
19238 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19239 try {
19240 return updateReducer(reducer, initialArg, init);
19241 } finally {
19242 ReactSharedInternals.H = prevDispatcher;
19243 }
19244 },
19245 useRef: function() {
19246 currentHookNameInDev = "useRef";
19247 updateHookTypesDev();
19248 return updateWorkInProgressHook().memoizedState;
19249 },
19250 useState: function() {
19251 currentHookNameInDev = "useState";
19252 updateHookTypesDev();
19253 var prevDispatcher = ReactSharedInternals.H;
19254 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19255 try {
19256 return updateReducer(basicStateReducer);
19257 } finally {
19258 ReactSharedInternals.H = prevDispatcher;
19259 }
19260 },
19261 useDebugValue: function() {
19262 currentHookNameInDev = "useDebugValue";
19263 updateHookTypesDev();
19264 },
19265 useDeferredValue: function(value, initialValue) {
19266 currentHookNameInDev = "useDeferredValue";
19267 updateHookTypesDev();
19268 return updateDeferredValue(value, initialValue);
19269 },
19270 useTransition: function() {
19271 currentHookNameInDev = "useTransition";
19272 updateHookTypesDev();
19273 return updateTransition();
19274 },
19275 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19276 currentHookNameInDev = "useSyncExternalStore";
19277 updateHookTypesDev();
19278 return updateSyncExternalStore(
19279 subscribe,
19280 getSnapshot,
19281 getServerSnapshot
19282 );
19283 },
19284 useId: function() {
19285 currentHookNameInDev = "useId";
19286 updateHookTypesDev();
19287 return updateWorkInProgressHook().memoizedState;
19288 },
19289 useFormState: function(action) {
19290 currentHookNameInDev = "useFormState";
19291 updateHookTypesDev();
19292 warnOnUseFormStateInDev();
19293 return updateActionState(action);
19294 },
19295 useActionState: function(action) {
19296 currentHookNameInDev = "useActionState";
19297 updateHookTypesDev();
19298 return updateActionState(action);
19299 },
19300 useOptimistic: function(passthrough, reducer) {
19301 currentHookNameInDev = "useOptimistic";
19302 updateHookTypesDev();
19303 return updateOptimistic(passthrough, reducer);
19304 },
19305 useHostTransitionStatus,
19306 useMemoCache,
19307 useCacheRefresh: function() {
19308 currentHookNameInDev = "useCacheRefresh";
19309 updateHookTypesDev();
19310 return updateWorkInProgressHook().memoizedState;
19311 },
19312 useEffectEvent: function(callback) {
19313 currentHookNameInDev = "useEffectEvent";
19314 updateHookTypesDev();
19315 return updateEvent(callback);
19316 }
19317 };
19318 HooksDispatcherOnRerenderInDEV = {
19319 readContext: function(context) {
19320 return readContext(context);
19321 },
19322 use,
19323 useCallback: function(callback, deps) {
19324 currentHookNameInDev = "useCallback";
19325 updateHookTypesDev();
19326 return updateCallback(callback, deps);
19327 },
19328 useContext: function(context) {
19329 currentHookNameInDev = "useContext";
19330 updateHookTypesDev();
19331 return readContext(context);
19332 },
19333 useEffect: function(create, deps) {
19334 currentHookNameInDev = "useEffect";
19335 updateHookTypesDev();
19336 updateEffectImpl(2048, Passive, create, deps);
19337 },
19338 useImperativeHandle: function(ref, create, deps) {
19339 currentHookNameInDev = "useImperativeHandle";
19340 updateHookTypesDev();
19341 return updateImperativeHandle(ref, create, deps);
19342 },
19343 useInsertionEffect: function(create, deps) {
19344 currentHookNameInDev = "useInsertionEffect";
19345 updateHookTypesDev();
19346 return updateEffectImpl(4, Insertion, create, deps);
19347 },
19348 useLayoutEffect: function(create, deps) {
19349 currentHookNameInDev = "useLayoutEffect";
19350 updateHookTypesDev();
19351 return updateEffectImpl(4, Layout, create, deps);
19352 },
19353 useMemo: function(create, deps) {
19354 currentHookNameInDev = "useMemo";
19355 updateHookTypesDev();
19356 var prevDispatcher = ReactSharedInternals.H;
19357 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19358 try {
19359 return updateMemo(create, deps);
19360 } finally {
19361 ReactSharedInternals.H = prevDispatcher;
19362 }
19363 },
19364 useReducer: function(reducer, initialArg, init) {
19365 currentHookNameInDev = "useReducer";
19366 updateHookTypesDev();
19367 var prevDispatcher = ReactSharedInternals.H;
19368 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19369 try {
19370 return rerenderReducer(reducer, initialArg, init);
19371 } finally {
19372 ReactSharedInternals.H = prevDispatcher;
19373 }
19374 },
19375 useRef: function() {
19376 currentHookNameInDev = "useRef";
19377 updateHookTypesDev();
19378 return updateWorkInProgressHook().memoizedState;
19379 },
19380 useState: function() {
19381 currentHookNameInDev = "useState";
19382 updateHookTypesDev();
19383 var prevDispatcher = ReactSharedInternals.H;
19384 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnRerenderInDEV;
19385 try {
19386 return rerenderReducer(basicStateReducer);
19387 } finally {
19388 ReactSharedInternals.H = prevDispatcher;
19389 }
19390 },
19391 useDebugValue: function() {
19392 currentHookNameInDev = "useDebugValue";
19393 updateHookTypesDev();
19394 },
19395 useDeferredValue: function(value, initialValue) {
19396 currentHookNameInDev = "useDeferredValue";
19397 updateHookTypesDev();
19398 return rerenderDeferredValue(value, initialValue);
19399 },
19400 useTransition: function() {
19401 currentHookNameInDev = "useTransition";
19402 updateHookTypesDev();
19403 return rerenderTransition();
19404 },
19405 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19406 currentHookNameInDev = "useSyncExternalStore";
19407 updateHookTypesDev();
19408 return updateSyncExternalStore(
19409 subscribe,
19410 getSnapshot,
19411 getServerSnapshot
19412 );
19413 },
19414 useId: function() {
19415 currentHookNameInDev = "useId";
19416 updateHookTypesDev();
19417 return updateWorkInProgressHook().memoizedState;
19418 },
19419 useFormState: function(action) {
19420 currentHookNameInDev = "useFormState";
19421 updateHookTypesDev();
19422 warnOnUseFormStateInDev();
19423 return rerenderActionState(action);
19424 },
19425 useActionState: function(action) {
19426 currentHookNameInDev = "useActionState";
19427 updateHookTypesDev();
19428 return rerenderActionState(action);
19429 },
19430 useOptimistic: function(passthrough, reducer) {
19431 currentHookNameInDev = "useOptimistic";
19432 updateHookTypesDev();
19433 return rerenderOptimistic(passthrough, reducer);
19434 },
19435 useHostTransitionStatus,
19436 useMemoCache,
19437 useCacheRefresh: function() {
19438 currentHookNameInDev = "useCacheRefresh";
19439 updateHookTypesDev();
19440 return updateWorkInProgressHook().memoizedState;
19441 },
19442 useEffectEvent: function(callback) {
19443 currentHookNameInDev = "useEffectEvent";
19444 updateHookTypesDev();
19445 return updateEvent(callback);
19446 }
19447 };
19448 InvalidNestedHooksDispatcherOnMountInDEV = {
19449 readContext: function(context) {
19450 warnInvalidContextAccess();
19451 return readContext(context);
19452 },
19453 use: function(usable) {
19454 warnInvalidHookAccess();
19455 return use(usable);
19456 },
19457 useCallback: function(callback, deps) {
19458 currentHookNameInDev = "useCallback";
19459 warnInvalidHookAccess();
19460 mountHookTypesDev();
19461 return mountCallback(callback, deps);
19462 },
19463 useContext: function(context) {
19464 currentHookNameInDev = "useContext";
19465 warnInvalidHookAccess();
19466 mountHookTypesDev();
19467 return readContext(context);
19468 },
19469 useEffect: function(create, deps) {
19470 currentHookNameInDev = "useEffect";
19471 warnInvalidHookAccess();
19472 mountHookTypesDev();
19473 return mountEffect(create, deps);
19474 },
19475 useImperativeHandle: function(ref, create, deps) {
19476 currentHookNameInDev = "useImperativeHandle";
19477 warnInvalidHookAccess();
19478 mountHookTypesDev();
19479 return mountImperativeHandle(ref, create, deps);
19480 },
19481 useInsertionEffect: function(create, deps) {
19482 currentHookNameInDev = "useInsertionEffect";
19483 warnInvalidHookAccess();
19484 mountHookTypesDev();
19485 mountEffectImpl(4, Insertion, create, deps);
19486 },
19487 useLayoutEffect: function(create, deps) {
19488 currentHookNameInDev = "useLayoutEffect";
19489 warnInvalidHookAccess();
19490 mountHookTypesDev();
19491 return mountLayoutEffect(create, deps);
19492 },
19493 useMemo: function(create, deps) {
19494 currentHookNameInDev = "useMemo";
19495 warnInvalidHookAccess();
19496 mountHookTypesDev();
19497 var prevDispatcher = ReactSharedInternals.H;
19498 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19499 try {
19500 return mountMemo(create, deps);
19501 } finally {
19502 ReactSharedInternals.H = prevDispatcher;
19503 }
19504 },
19505 useReducer: function(reducer, initialArg, init) {
19506 currentHookNameInDev = "useReducer";
19507 warnInvalidHookAccess();
19508 mountHookTypesDev();
19509 var prevDispatcher = ReactSharedInternals.H;
19510 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19511 try {
19512 return mountReducer(reducer, initialArg, init);
19513 } finally {
19514 ReactSharedInternals.H = prevDispatcher;
19515 }
19516 },
19517 useRef: function(initialValue) {
19518 currentHookNameInDev = "useRef";
19519 warnInvalidHookAccess();
19520 mountHookTypesDev();
19521 return mountRef(initialValue);
19522 },
19523 useState: function(initialState) {
19524 currentHookNameInDev = "useState";
19525 warnInvalidHookAccess();
19526 mountHookTypesDev();
19527 var prevDispatcher = ReactSharedInternals.H;
19528 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnMountInDEV;
19529 try {
19530 return mountState(initialState);
19531 } finally {
19532 ReactSharedInternals.H = prevDispatcher;
19533 }
19534 },
19535 useDebugValue: function() {
19536 currentHookNameInDev = "useDebugValue";
19537 warnInvalidHookAccess();
19538 mountHookTypesDev();
19539 },
19540 useDeferredValue: function(value, initialValue) {
19541 currentHookNameInDev = "useDeferredValue";
19542 warnInvalidHookAccess();
19543 mountHookTypesDev();
19544 return mountDeferredValue(value, initialValue);
19545 },
19546 useTransition: function() {
19547 currentHookNameInDev = "useTransition";
19548 warnInvalidHookAccess();
19549 mountHookTypesDev();
19550 return mountTransition();
19551 },
19552 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19553 currentHookNameInDev = "useSyncExternalStore";
19554 warnInvalidHookAccess();
19555 mountHookTypesDev();
19556 return mountSyncExternalStore(
19557 subscribe,
19558 getSnapshot,
19559 getServerSnapshot
19560 );
19561 },
19562 useId: function() {
19563 currentHookNameInDev = "useId";
19564 warnInvalidHookAccess();
19565 mountHookTypesDev();
19566 return mountId();
19567 },
19568 useFormState: function(action, initialState) {
19569 currentHookNameInDev = "useFormState";
19570 warnInvalidHookAccess();
19571 mountHookTypesDev();
19572 return mountActionState(action, initialState);
19573 },
19574 useActionState: function(action, initialState) {
19575 currentHookNameInDev = "useActionState";
19576 warnInvalidHookAccess();
19577 mountHookTypesDev();
19578 return mountActionState(action, initialState);
19579 },
19580 useOptimistic: function(passthrough) {
19581 currentHookNameInDev = "useOptimistic";
19582 warnInvalidHookAccess();
19583 mountHookTypesDev();
19584 return mountOptimistic(passthrough);
19585 },
19586 useMemoCache: function(size) {
19587 warnInvalidHookAccess();
19588 return useMemoCache(size);
19589 },
19590 useHostTransitionStatus,
19591 useCacheRefresh: function() {
19592 currentHookNameInDev = "useCacheRefresh";
19593 mountHookTypesDev();
19594 return mountRefresh();
19595 },
19596 useEffectEvent: function(callback) {
19597 currentHookNameInDev = "useEffectEvent";
19598 warnInvalidHookAccess();
19599 mountHookTypesDev();
19600 return mountEvent(callback);
19601 }
19602 };
19603 InvalidNestedHooksDispatcherOnUpdateInDEV = {
19604 readContext: function(context) {
19605 warnInvalidContextAccess();
19606 return readContext(context);
19607 },
19608 use: function(usable) {
19609 warnInvalidHookAccess();
19610 return use(usable);
19611 },
19612 useCallback: function(callback, deps) {
19613 currentHookNameInDev = "useCallback";
19614 warnInvalidHookAccess();
19615 updateHookTypesDev();
19616 return updateCallback(callback, deps);
19617 },
19618 useContext: function(context) {
19619 currentHookNameInDev = "useContext";
19620 warnInvalidHookAccess();
19621 updateHookTypesDev();
19622 return readContext(context);
19623 },
19624 useEffect: function(create, deps) {
19625 currentHookNameInDev = "useEffect";
19626 warnInvalidHookAccess();
19627 updateHookTypesDev();
19628 updateEffectImpl(2048, Passive, create, deps);
19629 },
19630 useImperativeHandle: function(ref, create, deps) {
19631 currentHookNameInDev = "useImperativeHandle";
19632 warnInvalidHookAccess();
19633 updateHookTypesDev();
19634 return updateImperativeHandle(ref, create, deps);
19635 },
19636 useInsertionEffect: function(create, deps) {
19637 currentHookNameInDev = "useInsertionEffect";
19638 warnInvalidHookAccess();
19639 updateHookTypesDev();
19640 return updateEffectImpl(4, Insertion, create, deps);
19641 },
19642 useLayoutEffect: function(create, deps) {
19643 currentHookNameInDev = "useLayoutEffect";
19644 warnInvalidHookAccess();
19645 updateHookTypesDev();
19646 return updateEffectImpl(4, Layout, create, deps);
19647 },
19648 useMemo: function(create, deps) {
19649 currentHookNameInDev = "useMemo";
19650 warnInvalidHookAccess();
19651 updateHookTypesDev();
19652 var prevDispatcher = ReactSharedInternals.H;
19653 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19654 try {
19655 return updateMemo(create, deps);
19656 } finally {
19657 ReactSharedInternals.H = prevDispatcher;
19658 }
19659 },
19660 useReducer: function(reducer, initialArg, init) {
19661 currentHookNameInDev = "useReducer";
19662 warnInvalidHookAccess();
19663 updateHookTypesDev();
19664 var prevDispatcher = ReactSharedInternals.H;
19665 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19666 try {
19667 return updateReducer(reducer, initialArg, init);
19668 } finally {
19669 ReactSharedInternals.H = prevDispatcher;
19670 }
19671 },
19672 useRef: function() {
19673 currentHookNameInDev = "useRef";
19674 warnInvalidHookAccess();
19675 updateHookTypesDev();
19676 return updateWorkInProgressHook().memoizedState;
19677 },
19678 useState: function() {
19679 currentHookNameInDev = "useState";
19680 warnInvalidHookAccess();
19681 updateHookTypesDev();
19682 var prevDispatcher = ReactSharedInternals.H;
19683 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19684 try {
19685 return updateReducer(basicStateReducer);
19686 } finally {
19687 ReactSharedInternals.H = prevDispatcher;
19688 }
19689 },
19690 useDebugValue: function() {
19691 currentHookNameInDev = "useDebugValue";
19692 warnInvalidHookAccess();
19693 updateHookTypesDev();
19694 },
19695 useDeferredValue: function(value, initialValue) {
19696 currentHookNameInDev = "useDeferredValue";
19697 warnInvalidHookAccess();
19698 updateHookTypesDev();
19699 return updateDeferredValue(value, initialValue);
19700 },
19701 useTransition: function() {
19702 currentHookNameInDev = "useTransition";
19703 warnInvalidHookAccess();
19704 updateHookTypesDev();
19705 return updateTransition();
19706 },
19707 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19708 currentHookNameInDev = "useSyncExternalStore";
19709 warnInvalidHookAccess();
19710 updateHookTypesDev();
19711 return updateSyncExternalStore(
19712 subscribe,
19713 getSnapshot,
19714 getServerSnapshot
19715 );
19716 },
19717 useId: function() {
19718 currentHookNameInDev = "useId";
19719 warnInvalidHookAccess();
19720 updateHookTypesDev();
19721 return updateWorkInProgressHook().memoizedState;
19722 },
19723 useFormState: function(action) {
19724 currentHookNameInDev = "useFormState";
19725 warnInvalidHookAccess();
19726 updateHookTypesDev();
19727 return updateActionState(action);
19728 },
19729 useActionState: function(action) {
19730 currentHookNameInDev = "useActionState";
19731 warnInvalidHookAccess();
19732 updateHookTypesDev();
19733 return updateActionState(action);
19734 },
19735 useOptimistic: function(passthrough, reducer) {
19736 currentHookNameInDev = "useOptimistic";
19737 warnInvalidHookAccess();
19738 updateHookTypesDev();
19739 return updateOptimistic(passthrough, reducer);
19740 },
19741 useMemoCache: function(size) {
19742 warnInvalidHookAccess();
19743 return useMemoCache(size);
19744 },
19745 useHostTransitionStatus,
19746 useCacheRefresh: function() {
19747 currentHookNameInDev = "useCacheRefresh";
19748 updateHookTypesDev();
19749 return updateWorkInProgressHook().memoizedState;
19750 },
19751 useEffectEvent: function(callback) {
19752 currentHookNameInDev = "useEffectEvent";
19753 warnInvalidHookAccess();
19754 updateHookTypesDev();
19755 return updateEvent(callback);
19756 }
19757 };
19758 InvalidNestedHooksDispatcherOnRerenderInDEV = {
19759 readContext: function(context) {
19760 warnInvalidContextAccess();
19761 return readContext(context);
19762 },
19763 use: function(usable) {
19764 warnInvalidHookAccess();
19765 return use(usable);
19766 },
19767 useCallback: function(callback, deps) {
19768 currentHookNameInDev = "useCallback";
19769 warnInvalidHookAccess();
19770 updateHookTypesDev();
19771 return updateCallback(callback, deps);
19772 },
19773 useContext: function(context) {
19774 currentHookNameInDev = "useContext";
19775 warnInvalidHookAccess();
19776 updateHookTypesDev();
19777 return readContext(context);
19778 },
19779 useEffect: function(create, deps) {
19780 currentHookNameInDev = "useEffect";
19781 warnInvalidHookAccess();
19782 updateHookTypesDev();
19783 updateEffectImpl(2048, Passive, create, deps);
19784 },
19785 useImperativeHandle: function(ref, create, deps) {
19786 currentHookNameInDev = "useImperativeHandle";
19787 warnInvalidHookAccess();
19788 updateHookTypesDev();
19789 return updateImperativeHandle(ref, create, deps);
19790 },
19791 useInsertionEffect: function(create, deps) {
19792 currentHookNameInDev = "useInsertionEffect";
19793 warnInvalidHookAccess();
19794 updateHookTypesDev();
19795 return updateEffectImpl(4, Insertion, create, deps);
19796 },
19797 useLayoutEffect: function(create, deps) {
19798 currentHookNameInDev = "useLayoutEffect";
19799 warnInvalidHookAccess();
19800 updateHookTypesDev();
19801 return updateEffectImpl(4, Layout, create, deps);
19802 },
19803 useMemo: function(create, deps) {
19804 currentHookNameInDev = "useMemo";
19805 warnInvalidHookAccess();
19806 updateHookTypesDev();
19807 var prevDispatcher = ReactSharedInternals.H;
19808 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19809 try {
19810 return updateMemo(create, deps);
19811 } finally {
19812 ReactSharedInternals.H = prevDispatcher;
19813 }
19814 },
19815 useReducer: function(reducer, initialArg, init) {
19816 currentHookNameInDev = "useReducer";
19817 warnInvalidHookAccess();
19818 updateHookTypesDev();
19819 var prevDispatcher = ReactSharedInternals.H;
19820 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19821 try {
19822 return rerenderReducer(reducer, initialArg, init);
19823 } finally {
19824 ReactSharedInternals.H = prevDispatcher;
19825 }
19826 },
19827 useRef: function() {
19828 currentHookNameInDev = "useRef";
19829 warnInvalidHookAccess();
19830 updateHookTypesDev();
19831 return updateWorkInProgressHook().memoizedState;
19832 },
19833 useState: function() {
19834 currentHookNameInDev = "useState";
19835 warnInvalidHookAccess();
19836 updateHookTypesDev();
19837 var prevDispatcher = ReactSharedInternals.H;
19838 ReactSharedInternals.H = InvalidNestedHooksDispatcherOnUpdateInDEV;
19839 try {
19840 return rerenderReducer(basicStateReducer);
19841 } finally {
19842 ReactSharedInternals.H = prevDispatcher;
19843 }
19844 },
19845 useDebugValue: function() {
19846 currentHookNameInDev = "useDebugValue";
19847 warnInvalidHookAccess();
19848 updateHookTypesDev();
19849 },
19850 useDeferredValue: function(value, initialValue) {
19851 currentHookNameInDev = "useDeferredValue";
19852 warnInvalidHookAccess();
19853 updateHookTypesDev();
19854 return rerenderDeferredValue(value, initialValue);
19855 },
19856 useTransition: function() {
19857 currentHookNameInDev = "useTransition";
19858 warnInvalidHookAccess();
19859 updateHookTypesDev();
19860 return rerenderTransition();
19861 },
19862 useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
19863 currentHookNameInDev = "useSyncExternalStore";
19864 warnInvalidHookAccess();
19865 updateHookTypesDev();
19866 return updateSyncExternalStore(
19867 subscribe,
19868 getSnapshot,
19869 getServerSnapshot
19870 );
19871 },
19872 useId: function() {
19873 currentHookNameInDev = "useId";
19874 warnInvalidHookAccess();
19875 updateHookTypesDev();
19876 return updateWorkInProgressHook().memoizedState;
19877 },
19878 useFormState: function(action) {
19879 currentHookNameInDev = "useFormState";
19880 warnInvalidHookAccess();
19881 updateHookTypesDev();
19882 return rerenderActionState(action);
19883 },
19884 useActionState: function(action) {
19885 currentHookNameInDev = "useActionState";
19886 warnInvalidHookAccess();
19887 updateHookTypesDev();
19888 return rerenderActionState(action);
19889 },
19890 useOptimistic: function(passthrough, reducer) {
19891 currentHookNameInDev = "useOptimistic";
19892 warnInvalidHookAccess();
19893 updateHookTypesDev();
19894 return rerenderOptimistic(passthrough, reducer);
19895 },
19896 useMemoCache: function(size) {
19897 warnInvalidHookAccess();
19898 return useMemoCache(size);
19899 },
19900 useHostTransitionStatus,
19901 useCacheRefresh: function() {
19902 currentHookNameInDev = "useCacheRefresh";
19903 updateHookTypesDev();
19904 return updateWorkInProgressHook().memoizedState;
19905 },
19906 useEffectEvent: function(callback) {
19907 currentHookNameInDev = "useEffectEvent";
19908 warnInvalidHookAccess();
19909 updateHookTypesDev();
19910 return updateEvent(callback);
19911 }
19912 };
19913 var fakeInternalInstance = {};
19914 var didWarnAboutStateAssignmentForComponent = /* @__PURE__ */ new Set();
19915 var didWarnAboutUninitializedState = /* @__PURE__ */ new Set();
19916 var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = /* @__PURE__ */ new Set();
19917 var didWarnAboutLegacyLifecyclesAndDerivedState = /* @__PURE__ */ new Set();
19918 var didWarnAboutDirectlyAssigningPropsToState = /* @__PURE__ */ new Set();
19919 var didWarnAboutUndefinedDerivedState = /* @__PURE__ */ new Set();
19920 var didWarnAboutContextTypes$1 = /* @__PURE__ */ new Set();
19921 var didWarnAboutChildContextTypes = /* @__PURE__ */ new Set();
19922 var didWarnAboutInvalidateContextType = /* @__PURE__ */ new Set();
19923 var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
19924 Object.freeze(fakeInternalInstance);
19925 var classComponentUpdater = {
19926 enqueueSetState: function(inst, payload, callback) {
19927 inst = inst._reactInternals;
19928 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19929 update.payload = payload;
19930 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19931 payload = enqueueUpdate(inst, update, lane);
19932 null !== payload && (startUpdateTimerByLane(lane, "this.setState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
19933 },
19934 enqueueReplaceState: function(inst, payload, callback) {
19935 inst = inst._reactInternals;
19936 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19937 update.tag = ReplaceState;
19938 update.payload = payload;
19939 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19940 payload = enqueueUpdate(inst, update, lane);
19941 null !== payload && (startUpdateTimerByLane(lane, "this.replaceState()", inst), scheduleUpdateOnFiber(payload, inst, lane), entangleTransitions(payload, inst, lane));
19942 },
19943 enqueueForceUpdate: function(inst, callback) {
19944 inst = inst._reactInternals;
19945 var lane = requestUpdateLane(inst), update = createUpdate(lane);
19946 update.tag = ForceUpdate;
19947 void 0 !== callback && null !== callback && (warnOnInvalidCallback(callback), update.callback = callback);
19948 callback = enqueueUpdate(inst, update, lane);
19949 null !== callback && (startUpdateTimerByLane(lane, "this.forceUpdate()", inst), scheduleUpdateOnFiber(callback, inst, lane), entangleTransitions(callback, inst, lane));
19950 }
19951 }, componentName = null, errorBoundaryName = null, SelectiveHydrationException = Error(
19952 "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."
19953 ), didReceiveUpdate = false;
19954 var didWarnAboutBadClass = {};
19955 var didWarnAboutContextTypeOnFunctionComponent = {};
19956 var didWarnAboutContextTypes = {};
19957 var didWarnAboutGetDerivedStateOnFunctionComponent = {};
19958 var didWarnAboutReassigningProps = false;
19959 var didWarnAboutRevealOrder = {};
19960 var didWarnAboutTailOptions = {};
19961 var SUSPENDED_MARKER = {
19962 dehydrated: null,
19963 treeContext: null,
19964 retryLane: 0,
19965 hydrationErrors: null
19966 }, hasWarnedAboutUsingNoValuePropOnContextProvider = false, didWarnAboutUndefinedSnapshotBeforeUpdate = null;
19967 didWarnAboutUndefinedSnapshotBeforeUpdate = /* @__PURE__ */ new Set();
19968 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, inHydratedSubtree = false, suspenseyCommitFlag = 8192, DefaultAsyncDispatcher = {
19969 getCacheForType: function(resourceType) {
19970 var cache = readContext(CacheContext), cacheForType = cache.data.get(resourceType);
19971 void 0 === cacheForType && (cacheForType = resourceType(), cache.data.set(resourceType, cacheForType));
19972 return cacheForType;
19973 },
19974 cacheSignal: function() {
19975 return readContext(CacheContext).controller.signal;
19976 },
19977 getOwner: function() {
19978 return current;
19979 }
19980 };
19981 if ("function" === typeof Symbol && Symbol.for) {
19982 var symbolFor = Symbol.for;
19983 symbolFor("selector.component");
19984 symbolFor("selector.has_pseudo_class");
19985 symbolFor("selector.role");
19986 symbolFor("selector.test_id");
19987 symbolFor("selector.text");
19988 }
19989 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, globalMostRecentTransitionTime = 0, FALLBACK_THROTTLE_MS = 300, workInProgressRootRenderTargetTime = Infinity, RENDER_TIMEOUT_MS = 500, workInProgressTransitions = null, workInProgressUpdateTask = null, legacyErrorBoundariesThatAlreadyFailed = null, IMMEDIATE_COMMIT = 0, ABORTED_VIEW_TRANSITION_COMMIT = 1, DELAYED_PASSIVE_COMMIT = 2, ANIMATION_STARTED_COMMIT = 3, 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, pendingEffectsRenderEndTime = -0, pendingPassiveTransitions = null, pendingRecoverableErrors = null, pendingSuspendedCommitReason = null, pendingDelayedCommitReason = IMMEDIATE_COMMIT, pendingSuspendedViewTransitionReason = 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;
19990 var didWarnAboutUpdateInRenderForAnotherComponent = /* @__PURE__ */ new Set();
19991 var fakeActCallbackNode$1 = {}, firstScheduledRoot = null, lastScheduledRoot = null, didScheduleMicrotask = false, didScheduleMicrotask_act = false, mightHavePendingSyncWork = false, isFlushingWork = false, currentEventTransitionLane = 0, fakeActCallbackNode = {};
19992 (function() {
19993 for (var i = 0; i < simpleEventPluginEvents.length; i++) {
19994 var eventName = simpleEventPluginEvents[i], domEventName = eventName.toLowerCase();
19995 eventName = eventName[0].toUpperCase() + eventName.slice(1);
19996 registerSimpleEvent(domEventName, "on" + eventName);
19997 }
19998 registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
19999 registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
20000 registerSimpleEvent(ANIMATION_START, "onAnimationStart");
20001 registerSimpleEvent("dblclick", "onDoubleClick");
20002 registerSimpleEvent("focusin", "onFocus");
20003 registerSimpleEvent("focusout", "onBlur");
20004 registerSimpleEvent(TRANSITION_RUN, "onTransitionRun");
20005 registerSimpleEvent(TRANSITION_START, "onTransitionStart");
20006 registerSimpleEvent(TRANSITION_CANCEL, "onTransitionCancel");
20007 registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
20008 })();
20009 registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
20010 registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
20011 registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
20012 registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
20013 registerTwoPhaseEvent(
20014 "onChange",
20015 "change click focusin focusout input keydown keyup selectionchange".split(
20016 " "
20017 )
20018 );
20019 registerTwoPhaseEvent(
20020 "onSelect",
20021 "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(
20022 " "
20023 )
20024 );
20025 registerTwoPhaseEvent("onBeforeInput", [
20026 "compositionend",
20027 "keypress",
20028 "textInput",
20029 "paste"
20030 ]);
20031 registerTwoPhaseEvent(
20032 "onCompositionEnd",
20033 "compositionend focusout keydown keypress keyup mousedown".split(" ")
20034 );
20035 registerTwoPhaseEvent(
20036 "onCompositionStart",
20037 "compositionstart focusout keydown keypress keyup mousedown".split(" ")
20038 );
20039 registerTwoPhaseEvent(
20040 "onCompositionUpdate",
20041 "compositionupdate focusout keydown keypress keyup mousedown".split(" ")
20042 );
20043 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(
20044 " "
20045 ), nonDelegatedEvents = new Set(
20046 "beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(mediaEventTypes)
20047 ), listeningMarker = "_reactListening" + Math.random().toString(36).slice(2), didWarnControlledToUncontrolled = false, didWarnUncontrolledToControlled = false, didWarnFormActionType = false, didWarnFormActionName = false, didWarnFormActionTarget = false, didWarnFormActionMethod = false, didWarnPopoverTargetObject = false;
20048 var didWarnForNewBooleanPropsWithEmptyValue = {};
20049 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", ACTIVITY_START_DATA = "&", ACTIVITY_END_DATA = "/&", SUSPENSE_START_DATA = "$", SUSPENSE_END_DATA = "/$", SUSPENSE_PENDING_START_DATA = "$?", SUSPENSE_QUEUED_START_DATA = "$~", SUSPENSE_FALLBACK_START_DATA = "$!", PREAMBLE_CONTRIBUTION_HTML = "html", PREAMBLE_CONTRIBUTION_BODY = "body", PREAMBLE_CONTRIBUTION_HEAD = "head", FORM_STATE_IS_MATCHING = "F!", FORM_STATE_IS_NOT_MATCHING = "F", DOCUMENT_READY_STATE_LOADING = "loading", STYLE = "style", HostContextNamespaceNone = 0, HostContextNamespaceSvg = 1, HostContextNamespaceMath = 2, eventsEnabled = null, selectionInformation = null, warnedUnknownTags = { dialog: true, webview: true }, currentPopstateTransitionEvent = null, schedulerEvent = void 0, 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) {
20050 return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
20051 } : scheduleTimeout, previousHydratableOnEnteringScopedSingleton = null, NotLoaded = 0, Loaded = 1, Errored = 2, Settled = 3, Inserted = 4, preloadPropsMap = /* @__PURE__ */ new Map(), preconnectsSet = /* @__PURE__ */ new Set(), previousDispatcher = ReactDOMSharedInternals.d;
20052 ReactDOMSharedInternals.d = {
20053 f: function() {
20054 var previousWasRendering = previousDispatcher.f(), wasRendering = flushSyncWork$1();
20055 return previousWasRendering || wasRendering;
20056 },
20057 r: function(form) {
20058 var formInst = getInstanceFromNode(form);
20059 null !== formInst && 5 === formInst.tag && "form" === formInst.type ? requestFormReset$1(formInst) : previousDispatcher.r(form);
20060 },
20061 D: function(href) {
20062 previousDispatcher.D(href);
20063 preconnectAs("dns-prefetch", href, null);
20064 },
20065 C: function(href, crossOrigin) {
20066 previousDispatcher.C(href, crossOrigin);
20067 preconnectAs("preconnect", href, crossOrigin);
20068 },
20069 L: function(href, as, options) {
20070 previousDispatcher.L(href, as, options);
20071 var ownerDocument = globalDocument;
20072 if (ownerDocument && href && as) {
20073 var preloadSelector = 'link[rel="preload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"]';
20074 "image" === as ? options && options.imageSrcSet ? (preloadSelector += '[imagesrcset="' + escapeSelectorAttributeValueInsideDoubleQuotes(
20075 options.imageSrcSet
20076 ) + '"]', "string" === typeof options.imageSizes && (preloadSelector += '[imagesizes="' + escapeSelectorAttributeValueInsideDoubleQuotes(
20077 options.imageSizes
20078 ) + '"]')) : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]' : preloadSelector += '[href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]';
20079 var key = preloadSelector;
20080 switch (as) {
20081 case "style":
20082 key = getStyleKey(href);
20083 break;
20084 case "script":
20085 key = getScriptKey(href);
20086 }
20087 preloadPropsMap.has(key) || (href = assign(
20088 {
20089 rel: "preload",
20090 href: "image" === as && options && options.imageSrcSet ? void 0 : href,
20091 as
20092 },
20093 options
20094 ), preloadPropsMap.set(key, href), null !== ownerDocument.querySelector(preloadSelector) || "style" === as && ownerDocument.querySelector(
20095 getStylesheetSelectorFromKey(key)
20096 ) || "script" === as && ownerDocument.querySelector(getScriptSelectorFromKey(key)) || (as = ownerDocument.createElement("link"), setInitialProperties(as, "link", href), markNodeAsHoistable(as), ownerDocument.head.appendChild(as)));
20097 }
20098 },
20099 m: function(href, options) {
20100 previousDispatcher.m(href, options);
20101 var ownerDocument = globalDocument;
20102 if (ownerDocument && href) {
20103 var as = options && "string" === typeof options.as ? options.as : "script", preloadSelector = 'link[rel="modulepreload"][as="' + escapeSelectorAttributeValueInsideDoubleQuotes(as) + '"][href="' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '"]', key = preloadSelector;
20104 switch (as) {
20105 case "audioworklet":
20106 case "paintworklet":
20107 case "serviceworker":
20108 case "sharedworker":
20109 case "worker":
20110 case "script":
20111 key = getScriptKey(href);
20112 }
20113 if (!preloadPropsMap.has(key) && (href = assign({ rel: "modulepreload", href }, options), preloadPropsMap.set(key, href), null === ownerDocument.querySelector(preloadSelector))) {
20114 switch (as) {
20115 case "audioworklet":
20116 case "paintworklet":
20117 case "serviceworker":
20118 case "sharedworker":
20119 case "worker":
20120 case "script":
20121 if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))
20122 return;
20123 }
20124 as = ownerDocument.createElement("link");
20125 setInitialProperties(as, "link", href);
20126 markNodeAsHoistable(as);
20127 ownerDocument.head.appendChild(as);
20128 }
20129 }
20130 },
20131 X: function(src, options) {
20132 previousDispatcher.X(src, options);
20133 var ownerDocument = globalDocument;
20134 if (ownerDocument && src) {
20135 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
20136 resource || (resource = ownerDocument.querySelector(
20137 getScriptSelectorFromKey(key)
20138 ), 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 = {
20139 type: "script",
20140 instance: resource,
20141 count: 1,
20142 state: null
20143 }, scripts.set(key, resource));
20144 }
20145 },
20146 S: function(href, precedence, options) {
20147 previousDispatcher.S(href, precedence, options);
20148 var ownerDocument = globalDocument;
20149 if (ownerDocument && href) {
20150 var styles = getResourcesFromRoot(ownerDocument).hoistableStyles, key = getStyleKey(href);
20151 precedence = precedence || "default";
20152 var resource = styles.get(key);
20153 if (!resource) {
20154 var state = { loading: NotLoaded, preload: null };
20155 if (resource = ownerDocument.querySelector(
20156 getStylesheetSelectorFromKey(key)
20157 ))
20158 state.loading = Loaded | Inserted;
20159 else {
20160 href = assign(
20161 {
20162 rel: "stylesheet",
20163 href,
20164 "data-precedence": precedence
20165 },
20166 options
20167 );
20168 (options = preloadPropsMap.get(key)) && adoptPreloadPropsForStylesheet(href, options);
20169 var link = resource = ownerDocument.createElement("link");
20170 markNodeAsHoistable(link);
20171 setInitialProperties(link, "link", href);
20172 link._p = new Promise(function(resolve, reject) {
20173 link.onload = resolve;
20174 link.onerror = reject;
20175 });
20176 link.addEventListener("load", function() {
20177 state.loading |= Loaded;
20178 });
20179 link.addEventListener("error", function() {
20180 state.loading |= Errored;
20181 });
20182 state.loading |= Inserted;
20183 insertStylesheet(resource, precedence, ownerDocument);
20184 }
20185 resource = {
20186 type: "stylesheet",
20187 instance: resource,
20188 count: 1,
20189 state
20190 };
20191 styles.set(key, resource);
20192 }
20193 }
20194 },
20195 M: function(src, options) {
20196 previousDispatcher.M(src, options);
20197 var ownerDocument = globalDocument;
20198 if (ownerDocument && src) {
20199 var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts, key = getScriptKey(src), resource = scripts.get(key);
20200 resource || (resource = ownerDocument.querySelector(
20201 getScriptSelectorFromKey(key)
20202 ), 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 = {
20203 type: "script",
20204 instance: resource,
20205 count: 1,
20206 state: null
20207 }, scripts.set(key, resource));
20208 }
20209 }
20210 };
20211 var globalDocument = "undefined" === typeof document ? null : document, tagCaches = null, SUSPENSEY_STYLESHEET_TIMEOUT = 6e4, SUSPENSEY_IMAGE_TIMEOUT = 800, SUSPENSEY_IMAGE_TIME_ESTIMATE = 500, estimatedBytesWithinLimit = 0, LAST_PRECEDENCE = null, precedencesByRoot = null, NotPendingTransition = NotPending, HostTransitionContext = {
20212 $$typeof: REACT_CONTEXT_TYPE,
20213 Provider: null,
20214 Consumer: null,
20215 _currentValue: NotPendingTransition,
20216 _currentValue2: NotPendingTransition,
20217 _threadCount: 0
20218 }, 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;
20219 var didWarnAboutNestedUpdates = false;
20220 var overrideHookState = null, overrideHookStateDeletePath = null, overrideHookStateRenamePath = null, overrideProps = null, overridePropsDeletePath = null, overridePropsRenamePath = null, scheduleUpdate = null, scheduleRetry = null, setErrorHandler = null, setSuspenseHandler = null;
20221 overrideHookState = function(fiber, id, path, value) {
20222 id = findHook(fiber, id);
20223 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));
20224 };
20225 overrideHookStateDeletePath = function(fiber, id, path) {
20226 id = findHook(fiber, id);
20227 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));
20228 };
20229 overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
20230 id = findHook(fiber, id);
20231 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));
20232 };
20233 overrideProps = function(fiber, path, value) {
20234 fiber.pendingProps = copyWithSetImpl(fiber.memoizedProps, path, 0, value);
20235 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20236 path = enqueueConcurrentRenderForLane(fiber, 2);
20237 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
20238 };
20239 overridePropsDeletePath = function(fiber, path) {
20240 fiber.pendingProps = copyWithDeleteImpl(fiber.memoizedProps, path, 0);
20241 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20242 path = enqueueConcurrentRenderForLane(fiber, 2);
20243 null !== path && scheduleUpdateOnFiber(path, fiber, 2);
20244 };
20245 overridePropsRenamePath = function(fiber, oldPath, newPath) {
20246 fiber.pendingProps = copyWithRename(
20247 fiber.memoizedProps,
20248 oldPath,
20249 newPath
20250 );
20251 fiber.alternate && (fiber.alternate.pendingProps = fiber.pendingProps);
20252 oldPath = enqueueConcurrentRenderForLane(fiber, 2);
20253 null !== oldPath && scheduleUpdateOnFiber(oldPath, fiber, 2);
20254 };
20255 scheduleUpdate = function(fiber) {
20256 var root2 = enqueueConcurrentRenderForLane(fiber, 2);
20257 null !== root2 && scheduleUpdateOnFiber(root2, fiber, 2);
20258 };
20259 scheduleRetry = function(fiber) {
20260 var lane = claimNextRetryLane(), root2 = enqueueConcurrentRenderForLane(fiber, lane);
20261 null !== root2 && scheduleUpdateOnFiber(root2, fiber, lane);
20262 };
20263 setErrorHandler = function(newShouldErrorImpl) {
20264 shouldErrorImpl = newShouldErrorImpl;
20265 };
20266 setSuspenseHandler = function(newShouldSuspendImpl) {
20267 shouldSuspendImpl = newShouldSuspendImpl;
20268 };
20269 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(
20270 " "
20271 ), lastScheduledReplayQueue = null;
20272 ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
20273 var root2 = this._internalRoot;
20274 if (null === root2) throw Error("Cannot update an unmounted root.");
20275 var args = arguments;
20276 "function" === typeof args[1] ? console.error(
20277 "does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
20278 ) : isValidContainer(args[1]) ? console.error(
20279 "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."
20280 ) : "undefined" !== typeof args[1] && console.error(
20281 "You passed a second argument to root.render(...) but it only accepts one argument."
20282 );
20283 args = children;
20284 var current2 = root2.current, lane = requestUpdateLane(current2);
20285 updateContainerImpl(current2, lane, args, root2, null, null);
20286 };
20287 ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
20288 var args = arguments;
20289 "function" === typeof args[0] && console.error(
20290 "does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect()."
20291 );
20292 args = this._internalRoot;
20293 if (null !== args) {
20294 this._internalRoot = null;
20295 var container = args.containerInfo;
20296 (executionContext & (RenderContext | CommitContext)) !== NoContext && console.error(
20297 "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."
20298 );
20299 updateContainerImpl(args.current, 2, null, args, null, null);
20300 flushSyncWork$1();
20301 container[internalContainerInstanceKey] = null;
20302 }
20303 };
20304 ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function(target) {
20305 if (target) {
20306 var updatePriority = resolveUpdatePriority();
20307 target = { blockedOn: null, target, priority: updatePriority };
20308 for (var i = 0; i < queuedExplicitHydrationTargets.length && 0 !== updatePriority && updatePriority < queuedExplicitHydrationTargets[i].priority; i++) ;
20309 queuedExplicitHydrationTargets.splice(i, 0, target);
20310 0 === i && attemptExplicitHydrationTarget(target);
20311 }
20312 };
20313 (function() {
20314 var isomorphicReactPackageVersion = React.version;
20315 if ("19.2.4" !== isomorphicReactPackageVersion)
20316 throw Error(
20317 'Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:\n - react: ' + (isomorphicReactPackageVersion + "\n - react-dom: 19.2.4\nLearn more: https://react.dev/warnings/version-mismatch")
20318 );
20319 })();
20320 "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(
20321 "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"
20322 );
20323 ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
20324 var fiber = componentOrElement._reactInternals;
20325 if (void 0 === fiber) {
20326 if ("function" === typeof componentOrElement.render)
20327 throw Error("Unable to find node on an unmounted component.");
20328 componentOrElement = Object.keys(componentOrElement).join(",");
20329 throw Error(
20330 "Argument appears to not be a ReactComponent. Keys: " + componentOrElement
20331 );
20332 }
20333 componentOrElement = findCurrentFiberUsingSlowPath(fiber);
20334 componentOrElement = null !== componentOrElement ? findCurrentHostFiberImpl(componentOrElement) : null;
20335 componentOrElement = null === componentOrElement ? null : componentOrElement.stateNode;
20336 return componentOrElement;
20337 };
20338 if (!(function() {
20339 var internals = {
20340 bundleType: 1,
20341 version: "19.2.4",
20342 rendererPackageName: "react-dom",
20343 currentDispatcherRef: ReactSharedInternals,
20344 reconcilerVersion: "19.2.4"
20345 };
20346 internals.overrideHookState = overrideHookState;
20347 internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
20348 internals.overrideHookStateRenamePath = overrideHookStateRenamePath;
20349 internals.overrideProps = overrideProps;
20350 internals.overridePropsDeletePath = overridePropsDeletePath;
20351 internals.overridePropsRenamePath = overridePropsRenamePath;
20352 internals.scheduleUpdate = scheduleUpdate;
20353 internals.scheduleRetry = scheduleRetry;
20354 internals.setErrorHandler = setErrorHandler;
20355 internals.setSuspenseHandler = setSuspenseHandler;
20356 internals.scheduleRefresh = scheduleRefresh;
20357 internals.scheduleRoot = scheduleRoot;
20358 internals.setRefreshHandler = setRefreshHandler;
20359 internals.getCurrentFiber = getCurrentFiberForDevTools;
20360 return injectInternals(internals);
20361 })() && canUseDOM && window.top === window.self && (-1 < navigator.userAgent.indexOf("Chrome") && -1 === navigator.userAgent.indexOf("Edge") || -1 < navigator.userAgent.indexOf("Firefox"))) {
20362 var protocol = window.location.protocol;
20363 /^(https?|file):$/.test(protocol) && console.info(
20364 "%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" : ""),
20365 "font-weight:bold"
20366 );
20367 }
20368 exports.createRoot = function(container, options) {
20369 if (!isValidContainer(container))
20370 throw Error("Target container is not a DOM element.");
20371 warnIfReactDOMContainerInDEV(container);
20372 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError;
20373 null !== options && void 0 !== options && (options.hydrate ? console.warn(
20374 "hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."
20375 ) : "object" === typeof options && null !== options && options.$$typeof === REACT_ELEMENT_TYPE && console.error(
20376 "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 />);"
20377 ), 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));
20378 options = createFiberRoot(
20379 container,
20380 1,
20381 false,
20382 null,
20383 null,
20384 isStrictMode,
20385 identifierPrefix,
20386 null,
20387 onUncaughtError,
20388 onCaughtError,
20389 onRecoverableError,
20390 defaultOnDefaultTransitionIndicator
20391 );
20392 container[internalContainerInstanceKey] = options.current;
20393 listenToAllSupportedEvents(container);
20394 return new ReactDOMRoot(options);
20395 };
20396 exports.hydrateRoot = function(container, initialChildren, options) {
20397 if (!isValidContainer(container))
20398 throw Error("Target container is not a DOM element.");
20399 warnIfReactDOMContainerInDEV(container);
20400 void 0 === initialChildren && console.error(
20401 "Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)"
20402 );
20403 var isStrictMode = false, identifierPrefix = "", onUncaughtError = defaultOnUncaughtError, onCaughtError = defaultOnCaughtError, onRecoverableError = defaultOnRecoverableError, formState = null;
20404 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.formState && (formState = options.formState));
20405 initialChildren = createFiberRoot(
20406 container,
20407 1,
20408 true,
20409 initialChildren,
20410 null != options ? options : null,
20411 isStrictMode,
20412 identifierPrefix,
20413 formState,
20414 onUncaughtError,
20415 onCaughtError,
20416 onRecoverableError,
20417 defaultOnDefaultTransitionIndicator
20418 );
20419 initialChildren.context = getContextForSubtree(null);
20420 options = initialChildren.current;
20421 isStrictMode = requestUpdateLane(options);
20422 isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);
20423 identifierPrefix = createUpdate(isStrictMode);
20424 identifierPrefix.callback = null;
20425 enqueueUpdate(options, identifierPrefix, isStrictMode);
20426 startUpdateTimerByLane(isStrictMode, "hydrateRoot()", null);
20427 options = isStrictMode;
20428 initialChildren.current.lanes = options;
20429 markRootUpdated$1(initialChildren, options);
20430 ensureRootIsScheduled(initialChildren);
20431 container[internalContainerInstanceKey] = initialChildren.current;
20432 listenToAllSupportedEvents(container);
20433 return new ReactDOMHydrationRoot(initialChildren);
20434 };
20435 exports.version = "19.2.4";
20436 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
20437 })();
20438 }
20439 });
20440
20441 // node_modules/react-dom/client.js
20442 var require_client = __commonJS({
20443 "node_modules/react-dom/client.js"(exports, module) {
20444 "use strict";
20445 if (false) {
20446 checkDCE();
20447 module.exports = null;
20448 } else {
20449 module.exports = require_react_dom_client_development();
20450 }
20451 }
20452 });
20453
20454 // <stdin>
20455 var require_stdin = __commonJS({
20456 "<stdin>"(exports, module) {
20457 module.exports = {
20458 ...require_react_dom(),
20459 ...require_client()
20460 };
20461 }
20462 });
20463 return require_stdin();
20464 })();
20465 /*! Bundled license information:
20466
20467 react-dom/cjs/react-dom.development.js:
20468 (**
20469 * @license React
20470 * react-dom.development.js
20471 *
20472 * Copyright (c) Meta Platforms, Inc. and affiliates.
20473 *
20474 * This source code is licensed under the MIT license found in the
20475 * LICENSE file in the root directory of this source tree.
20476 *)
20477
20478 scheduler/cjs/scheduler.development.js:
20479 (**
20480 * @license React
20481 * scheduler.development.js
20482 *
20483 * Copyright (c) Meta Platforms, Inc. and affiliates.
20484 *
20485 * This source code is licensed under the MIT license found in the
20486 * LICENSE file in the root directory of this source tree.
20487 *)
20488
20489 react-dom/cjs/react-dom-client.development.js:
20490 (**
20491 * @license React
20492 * react-dom-client.development.js
20493 *
20494 * Copyright (c) Meta Platforms, Inc. and affiliates.
20495 *
20496 * This source code is licensed under the MIT license found in the
20497 * LICENSE file in the root directory of this source tree.
20498 *)
20499 */
20500