UNPKG

45 kBJavaScriptView Raw
1/**
2 * @license React
3 * react.development.js
4 *
5 * Copyright (c) Meta Platforms, Inc. and affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */
10
11"use strict";
12"production" !== process.env.NODE_ENV &&
13 (function () {
14 function defineDeprecationWarning(methodName, info) {
15 Object.defineProperty(Component.prototype, methodName, {
16 get: function () {
17 console.warn(
18 "%s(...) is deprecated in plain JavaScript React classes. %s",
19 info[0],
20 info[1]
21 );
22 }
23 });
24 }
25 function getIteratorFn(maybeIterable) {
26 if (null === maybeIterable || "object" !== typeof maybeIterable)
27 return null;
28 maybeIterable =
29 (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
30 maybeIterable["@@iterator"];
31 return "function" === typeof maybeIterable ? maybeIterable : null;
32 }
33 function warnNoop(publicInstance, callerName) {
34 publicInstance =
35 ((publicInstance = publicInstance.constructor) &&
36 (publicInstance.displayName || publicInstance.name)) ||
37 "ReactClass";
38 var warningKey = publicInstance + "." + callerName;
39 didWarnStateUpdateForUnmountedComponent[warningKey] ||
40 (console.error(
41 "Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",
42 callerName,
43 publicInstance
44 ),
45 (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));
46 }
47 function Component(props, context, updater) {
48 this.props = props;
49 this.context = context;
50 this.refs = emptyObject;
51 this.updater = updater || ReactNoopUpdateQueue;
52 }
53 function ComponentDummy() {}
54 function PureComponent(props, context, updater) {
55 this.props = props;
56 this.context = context;
57 this.refs = emptyObject;
58 this.updater = updater || ReactNoopUpdateQueue;
59 }
60 function testStringCoercion(value) {
61 return "" + value;
62 }
63 function checkKeyStringCoercion(value) {
64 try {
65 testStringCoercion(value);
66 var JSCompiler_inline_result = !1;
67 } catch (e) {
68 JSCompiler_inline_result = !0;
69 }
70 if (JSCompiler_inline_result) {
71 JSCompiler_inline_result = console;
72 var JSCompiler_temp_const = JSCompiler_inline_result.error;
73 var JSCompiler_inline_result$jscomp$0 =
74 ("function" === typeof Symbol &&
75 Symbol.toStringTag &&
76 value[Symbol.toStringTag]) ||
77 value.constructor.name ||
78 "Object";
79 JSCompiler_temp_const.call(
80 JSCompiler_inline_result,
81 "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
82 JSCompiler_inline_result$jscomp$0
83 );
84 return testStringCoercion(value);
85 }
86 }
87 function getComponentNameFromType(type) {
88 if (null == type) return null;
89 if ("function" === typeof type)
90 return type.$$typeof === REACT_CLIENT_REFERENCE
91 ? null
92 : type.displayName || type.name || null;
93 if ("string" === typeof type) return type;
94 switch (type) {
95 case REACT_FRAGMENT_TYPE:
96 return "Fragment";
97 case REACT_PROFILER_TYPE:
98 return "Profiler";
99 case REACT_STRICT_MODE_TYPE:
100 return "StrictMode";
101 case REACT_SUSPENSE_TYPE:
102 return "Suspense";
103 case REACT_SUSPENSE_LIST_TYPE:
104 return "SuspenseList";
105 case REACT_ACTIVITY_TYPE:
106 return "Activity";
107 }
108 if ("object" === typeof type)
109 switch (
110 ("number" === typeof type.tag &&
111 console.error(
112 "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
113 ),
114 type.$$typeof)
115 ) {
116 case REACT_PORTAL_TYPE:
117 return "Portal";
118 case REACT_CONTEXT_TYPE:
119 return (type.displayName || "Context") + ".Provider";
120 case REACT_CONSUMER_TYPE:
121 return (type._context.displayName || "Context") + ".Consumer";
122 case REACT_FORWARD_REF_TYPE:
123 var innerType = type.render;
124 type = type.displayName;
125 type ||
126 ((type = innerType.displayName || innerType.name || ""),
127 (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
128 return type;
129 case REACT_MEMO_TYPE:
130 return (
131 (innerType = type.displayName || null),
132 null !== innerType
133 ? innerType
134 : getComponentNameFromType(type.type) || "Memo"
135 );
136 case REACT_LAZY_TYPE:
137 innerType = type._payload;
138 type = type._init;
139 try {
140 return getComponentNameFromType(type(innerType));
141 } catch (x) {}
142 }
143 return null;
144 }
145 function getTaskName(type) {
146 if (type === REACT_FRAGMENT_TYPE) return "<>";
147 if (
148 "object" === typeof type &&
149 null !== type &&
150 type.$$typeof === REACT_LAZY_TYPE
151 )
152 return "<...>";
153 try {
154 var name = getComponentNameFromType(type);
155 return name ? "<" + name + ">" : "<...>";
156 } catch (x) {
157 return "<...>";
158 }
159 }
160 function getOwner() {
161 var dispatcher = ReactSharedInternals.A;
162 return null === dispatcher ? null : dispatcher.getOwner();
163 }
164 function UnknownOwner() {
165 return Error("react-stack-top-frame");
166 }
167 function hasValidKey(config) {
168 if (hasOwnProperty.call(config, "key")) {
169 var getter = Object.getOwnPropertyDescriptor(config, "key").get;
170 if (getter && getter.isReactWarning) return !1;
171 }
172 return void 0 !== config.key;
173 }
174 function defineKeyPropWarningGetter(props, displayName) {
175 function warnAboutAccessingKey() {
176 specialPropKeyWarningShown ||
177 ((specialPropKeyWarningShown = !0),
178 console.error(
179 "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
180 displayName
181 ));
182 }
183 warnAboutAccessingKey.isReactWarning = !0;
184 Object.defineProperty(props, "key", {
185 get: warnAboutAccessingKey,
186 configurable: !0
187 });
188 }
189 function elementRefGetterWithDeprecationWarning() {
190 var componentName = getComponentNameFromType(this.type);
191 didWarnAboutElementRef[componentName] ||
192 ((didWarnAboutElementRef[componentName] = !0),
193 console.error(
194 "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
195 ));
196 componentName = this.props.ref;
197 return void 0 !== componentName ? componentName : null;
198 }
199 function ReactElement(
200 type,
201 key,
202 self,
203 source,
204 owner,
205 props,
206 debugStack,
207 debugTask
208 ) {
209 self = props.ref;
210 type = {
211 $$typeof: REACT_ELEMENT_TYPE,
212 type: type,
213 key: key,
214 props: props,
215 _owner: owner
216 };
217 null !== (void 0 !== self ? self : null)
218 ? Object.defineProperty(type, "ref", {
219 enumerable: !1,
220 get: elementRefGetterWithDeprecationWarning
221 })
222 : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
223 type._store = {};
224 Object.defineProperty(type._store, "validated", {
225 configurable: !1,
226 enumerable: !1,
227 writable: !0,
228 value: 0
229 });
230 Object.defineProperty(type, "_debugInfo", {
231 configurable: !1,
232 enumerable: !1,
233 writable: !0,
234 value: null
235 });
236 Object.defineProperty(type, "_debugStack", {
237 configurable: !1,
238 enumerable: !1,
239 writable: !0,
240 value: debugStack
241 });
242 Object.defineProperty(type, "_debugTask", {
243 configurable: !1,
244 enumerable: !1,
245 writable: !0,
246 value: debugTask
247 });
248 Object.freeze && (Object.freeze(type.props), Object.freeze(type));
249 return type;
250 }
251 function cloneAndReplaceKey(oldElement, newKey) {
252 newKey = ReactElement(
253 oldElement.type,
254 newKey,
255 void 0,
256 void 0,
257 oldElement._owner,
258 oldElement.props,
259 oldElement._debugStack,
260 oldElement._debugTask
261 );
262 oldElement._store &&
263 (newKey._store.validated = oldElement._store.validated);
264 return newKey;
265 }
266 function isValidElement(object) {
267 return (
268 "object" === typeof object &&
269 null !== object &&
270 object.$$typeof === REACT_ELEMENT_TYPE
271 );
272 }
273 function escape(key) {
274 var escaperLookup = { "=": "=0", ":": "=2" };
275 return (
276 "$" +
277 key.replace(/[=:]/g, function (match) {
278 return escaperLookup[match];
279 })
280 );
281 }
282 function getElementKey(element, index) {
283 return "object" === typeof element &&
284 null !== element &&
285 null != element.key
286 ? (checkKeyStringCoercion(element.key), escape("" + element.key))
287 : index.toString(36);
288 }
289 function noop$1() {}
290 function resolveThenable(thenable) {
291 switch (thenable.status) {
292 case "fulfilled":
293 return thenable.value;
294 case "rejected":
295 throw thenable.reason;
296 default:
297 switch (
298 ("string" === typeof thenable.status
299 ? thenable.then(noop$1, noop$1)
300 : ((thenable.status = "pending"),
301 thenable.then(
302 function (fulfilledValue) {
303 "pending" === thenable.status &&
304 ((thenable.status = "fulfilled"),
305 (thenable.value = fulfilledValue));
306 },
307 function (error) {
308 "pending" === thenable.status &&
309 ((thenable.status = "rejected"),
310 (thenable.reason = error));
311 }
312 )),
313 thenable.status)
314 ) {
315 case "fulfilled":
316 return thenable.value;
317 case "rejected":
318 throw thenable.reason;
319 }
320 }
321 throw thenable;
322 }
323 function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
324 var type = typeof children;
325 if ("undefined" === type || "boolean" === type) children = null;
326 var invokeCallback = !1;
327 if (null === children) invokeCallback = !0;
328 else
329 switch (type) {
330 case "bigint":
331 case "string":
332 case "number":
333 invokeCallback = !0;
334 break;
335 case "object":
336 switch (children.$$typeof) {
337 case REACT_ELEMENT_TYPE:
338 case REACT_PORTAL_TYPE:
339 invokeCallback = !0;
340 break;
341 case REACT_LAZY_TYPE:
342 return (
343 (invokeCallback = children._init),
344 mapIntoArray(
345 invokeCallback(children._payload),
346 array,
347 escapedPrefix,
348 nameSoFar,
349 callback
350 )
351 );
352 }
353 }
354 if (invokeCallback) {
355 invokeCallback = children;
356 callback = callback(invokeCallback);
357 var childKey =
358 "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
359 isArrayImpl(callback)
360 ? ((escapedPrefix = ""),
361 null != childKey &&
362 (escapedPrefix =
363 childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
364 mapIntoArray(callback, array, escapedPrefix, "", function (c) {
365 return c;
366 }))
367 : null != callback &&
368 (isValidElement(callback) &&
369 (null != callback.key &&
370 ((invokeCallback && invokeCallback.key === callback.key) ||
371 checkKeyStringCoercion(callback.key)),
372 (escapedPrefix = cloneAndReplaceKey(
373 callback,
374 escapedPrefix +
375 (null == callback.key ||
376 (invokeCallback && invokeCallback.key === callback.key)
377 ? ""
378 : ("" + callback.key).replace(
379 userProvidedKeyEscapeRegex,
380 "$&/"
381 ) + "/") +
382 childKey
383 )),
384 "" !== nameSoFar &&
385 null != invokeCallback &&
386 isValidElement(invokeCallback) &&
387 null == invokeCallback.key &&
388 invokeCallback._store &&
389 !invokeCallback._store.validated &&
390 (escapedPrefix._store.validated = 2),
391 (callback = escapedPrefix)),
392 array.push(callback));
393 return 1;
394 }
395 invokeCallback = 0;
396 childKey = "" === nameSoFar ? "." : nameSoFar + ":";
397 if (isArrayImpl(children))
398 for (var i = 0; i < children.length; i++)
399 (nameSoFar = children[i]),
400 (type = childKey + getElementKey(nameSoFar, i)),
401 (invokeCallback += mapIntoArray(
402 nameSoFar,
403 array,
404 escapedPrefix,
405 type,
406 callback
407 ));
408 else if (((i = getIteratorFn(children)), "function" === typeof i))
409 for (
410 i === children.entries &&
411 (didWarnAboutMaps ||
412 console.warn(
413 "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
414 ),
415 (didWarnAboutMaps = !0)),
416 children = i.call(children),
417 i = 0;
418 !(nameSoFar = children.next()).done;
419
420 )
421 (nameSoFar = nameSoFar.value),
422 (type = childKey + getElementKey(nameSoFar, i++)),
423 (invokeCallback += mapIntoArray(
424 nameSoFar,
425 array,
426 escapedPrefix,
427 type,
428 callback
429 ));
430 else if ("object" === type) {
431 if ("function" === typeof children.then)
432 return mapIntoArray(
433 resolveThenable(children),
434 array,
435 escapedPrefix,
436 nameSoFar,
437 callback
438 );
439 array = String(children);
440 throw Error(
441 "Objects are not valid as a React child (found: " +
442 ("[object Object]" === array
443 ? "object with keys {" + Object.keys(children).join(", ") + "}"
444 : array) +
445 "). If you meant to render a collection of children, use an array instead."
446 );
447 }
448 return invokeCallback;
449 }
450 function mapChildren(children, func, context) {
451 if (null == children) return children;
452 var result = [],
453 count = 0;
454 mapIntoArray(children, result, "", "", function (child) {
455 return func.call(context, child, count++);
456 });
457 return result;
458 }
459 function lazyInitializer(payload) {
460 if (-1 === payload._status) {
461 var ctor = payload._result;
462 ctor = ctor();
463 ctor.then(
464 function (moduleObject) {
465 if (0 === payload._status || -1 === payload._status)
466 (payload._status = 1), (payload._result = moduleObject);
467 },
468 function (error) {
469 if (0 === payload._status || -1 === payload._status)
470 (payload._status = 2), (payload._result = error);
471 }
472 );
473 -1 === payload._status &&
474 ((payload._status = 0), (payload._result = ctor));
475 }
476 if (1 === payload._status)
477 return (
478 (ctor = payload._result),
479 void 0 === ctor &&
480 console.error(
481 "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
482 ctor
483 ),
484 "default" in ctor ||
485 console.error(
486 "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
487 ctor
488 ),
489 ctor.default
490 );
491 throw payload._result;
492 }
493 function resolveDispatcher() {
494 var dispatcher = ReactSharedInternals.H;
495 null === dispatcher &&
496 console.error(
497 "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."
498 );
499 return dispatcher;
500 }
501 function noop() {}
502 function enqueueTask(task) {
503 if (null === enqueueTaskImpl)
504 try {
505 var requireString = ("require" + Math.random()).slice(0, 7);
506 enqueueTaskImpl = (module && module[requireString]).call(
507 module,
508 "timers"
509 ).setImmediate;
510 } catch (_err) {
511 enqueueTaskImpl = function (callback) {
512 !1 === didWarnAboutMessageChannel &&
513 ((didWarnAboutMessageChannel = !0),
514 "undefined" === typeof MessageChannel &&
515 console.error(
516 "This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."
517 ));
518 var channel = new MessageChannel();
519 channel.port1.onmessage = callback;
520 channel.port2.postMessage(void 0);
521 };
522 }
523 return enqueueTaskImpl(task);
524 }
525 function aggregateErrors(errors) {
526 return 1 < errors.length && "function" === typeof AggregateError
527 ? new AggregateError(errors)
528 : errors[0];
529 }
530 function popActScope(prevActQueue, prevActScopeDepth) {
531 prevActScopeDepth !== actScopeDepth - 1 &&
532 console.error(
533 "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
534 );
535 actScopeDepth = prevActScopeDepth;
536 }
537 function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
538 var queue = ReactSharedInternals.actQueue;
539 if (null !== queue)
540 if (0 !== queue.length)
541 try {
542 flushActQueue(queue);
543 enqueueTask(function () {
544 return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
545 });
546 return;
547 } catch (error) {
548 ReactSharedInternals.thrownErrors.push(error);
549 }
550 else ReactSharedInternals.actQueue = null;
551 0 < ReactSharedInternals.thrownErrors.length
552 ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
553 (ReactSharedInternals.thrownErrors.length = 0),
554 reject(queue))
555 : resolve(returnValue);
556 }
557 function flushActQueue(queue) {
558 if (!isFlushing) {
559 isFlushing = !0;
560 var i = 0;
561 try {
562 for (; i < queue.length; i++) {
563 var callback = queue[i];
564 do {
565 ReactSharedInternals.didUsePromise = !1;
566 var continuation = callback(!1);
567 if (null !== continuation) {
568 if (ReactSharedInternals.didUsePromise) {
569 queue[i] = callback;
570 queue.splice(0, i);
571 return;
572 }
573 callback = continuation;
574 } else break;
575 } while (1);
576 }
577 queue.length = 0;
578 } catch (error) {
579 queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
580 } finally {
581 isFlushing = !1;
582 }
583 }
584 }
585 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
586 "function" ===
587 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
588 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
589 var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
590 REACT_PORTAL_TYPE = Symbol.for("react.portal"),
591 REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
592 REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
593 REACT_PROFILER_TYPE = Symbol.for("react.profiler");
594 Symbol.for("react.provider");
595 var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
596 REACT_CONTEXT_TYPE = Symbol.for("react.context"),
597 REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
598 REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
599 REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
600 REACT_MEMO_TYPE = Symbol.for("react.memo"),
601 REACT_LAZY_TYPE = Symbol.for("react.lazy"),
602 REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
603 MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
604 didWarnStateUpdateForUnmountedComponent = {},
605 ReactNoopUpdateQueue = {
606 isMounted: function () {
607 return !1;
608 },
609 enqueueForceUpdate: function (publicInstance) {
610 warnNoop(publicInstance, "forceUpdate");
611 },
612 enqueueReplaceState: function (publicInstance) {
613 warnNoop(publicInstance, "replaceState");
614 },
615 enqueueSetState: function (publicInstance) {
616 warnNoop(publicInstance, "setState");
617 }
618 },
619 assign = Object.assign,
620 emptyObject = {};
621 Object.freeze(emptyObject);
622 Component.prototype.isReactComponent = {};
623 Component.prototype.setState = function (partialState, callback) {
624 if (
625 "object" !== typeof partialState &&
626 "function" !== typeof partialState &&
627 null != partialState
628 )
629 throw Error(
630 "takes an object of state variables to update or a function which returns an object of state variables."
631 );
632 this.updater.enqueueSetState(this, partialState, callback, "setState");
633 };
634 Component.prototype.forceUpdate = function (callback) {
635 this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
636 };
637 var deprecatedAPIs = {
638 isMounted: [
639 "isMounted",
640 "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
641 ],
642 replaceState: [
643 "replaceState",
644 "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
645 ]
646 },
647 fnName;
648 for (fnName in deprecatedAPIs)
649 deprecatedAPIs.hasOwnProperty(fnName) &&
650 defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
651 ComponentDummy.prototype = Component.prototype;
652 deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
653 deprecatedAPIs.constructor = PureComponent;
654 assign(deprecatedAPIs, Component.prototype);
655 deprecatedAPIs.isPureReactComponent = !0;
656 var isArrayImpl = Array.isArray,
657 REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
658 ReactSharedInternals = {
659 H: null,
660 A: null,
661 T: null,
662 S: null,
663 V: null,
664 actQueue: null,
665 isBatchingLegacy: !1,
666 didScheduleLegacyUpdate: !1,
667 didUsePromise: !1,
668 thrownErrors: [],
669 getCurrentStack: null,
670 recentlyCreatedOwnerStacks: 0
671 },
672 hasOwnProperty = Object.prototype.hasOwnProperty,
673 createTask = console.createTask
674 ? console.createTask
675 : function () {
676 return null;
677 };
678 deprecatedAPIs = {
679 react_stack_bottom_frame: function (callStackForError) {
680 return callStackForError();
681 }
682 };
683 var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
684 var didWarnAboutElementRef = {};
685 var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
686 deprecatedAPIs,
687 UnknownOwner
688 )();
689 var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
690 var didWarnAboutMaps = !1,
691 userProvidedKeyEscapeRegex = /\/+/g,
692 reportGlobalError =
693 "function" === typeof reportError
694 ? reportError
695 : function (error) {
696 if (
697 "object" === typeof window &&
698 "function" === typeof window.ErrorEvent
699 ) {
700 var event = new window.ErrorEvent("error", {
701 bubbles: !0,
702 cancelable: !0,
703 message:
704 "object" === typeof error &&
705 null !== error &&
706 "string" === typeof error.message
707 ? String(error.message)
708 : String(error),
709 error: error
710 });
711 if (!window.dispatchEvent(event)) return;
712 } else if (
713 "object" === typeof process &&
714 "function" === typeof process.emit
715 ) {
716 process.emit("uncaughtException", error);
717 return;
718 }
719 console.error(error);
720 },
721 didWarnAboutMessageChannel = !1,
722 enqueueTaskImpl = null,
723 actScopeDepth = 0,
724 didWarnNoAwaitAct = !1,
725 isFlushing = !1,
726 queueSeveralMicrotasks =
727 "function" === typeof queueMicrotask
728 ? function (callback) {
729 queueMicrotask(function () {
730 return queueMicrotask(callback);
731 });
732 }
733 : enqueueTask;
734 deprecatedAPIs = Object.freeze({
735 __proto__: null,
736 c: function (size) {
737 return resolveDispatcher().useMemoCache(size);
738 }
739 });
740 exports.Children = {
741 map: mapChildren,
742 forEach: function (children, forEachFunc, forEachContext) {
743 mapChildren(
744 children,
745 function () {
746 forEachFunc.apply(this, arguments);
747 },
748 forEachContext
749 );
750 },
751 count: function (children) {
752 var n = 0;
753 mapChildren(children, function () {
754 n++;
755 });
756 return n;
757 },
758 toArray: function (children) {
759 return (
760 mapChildren(children, function (child) {
761 return child;
762 }) || []
763 );
764 },
765 only: function (children) {
766 if (!isValidElement(children))
767 throw Error(
768 "React.Children.only expected to receive a single React element child."
769 );
770 return children;
771 }
772 };
773 exports.Component = Component;
774 exports.Fragment = REACT_FRAGMENT_TYPE;
775 exports.Profiler = REACT_PROFILER_TYPE;
776 exports.PureComponent = PureComponent;
777 exports.StrictMode = REACT_STRICT_MODE_TYPE;
778 exports.Suspense = REACT_SUSPENSE_TYPE;
779 exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
780 ReactSharedInternals;
781 exports.__COMPILER_RUNTIME = deprecatedAPIs;
782 exports.act = function (callback) {
783 var prevActQueue = ReactSharedInternals.actQueue,
784 prevActScopeDepth = actScopeDepth;
785 actScopeDepth++;
786 var queue = (ReactSharedInternals.actQueue =
787 null !== prevActQueue ? prevActQueue : []),
788 didAwaitActCall = !1;
789 try {
790 var result = callback();
791 } catch (error) {
792 ReactSharedInternals.thrownErrors.push(error);
793 }
794 if (0 < ReactSharedInternals.thrownErrors.length)
795 throw (
796 (popActScope(prevActQueue, prevActScopeDepth),
797 (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
798 (ReactSharedInternals.thrownErrors.length = 0),
799 callback)
800 );
801 if (
802 null !== result &&
803 "object" === typeof result &&
804 "function" === typeof result.then
805 ) {
806 var thenable = result;
807 queueSeveralMicrotasks(function () {
808 didAwaitActCall ||
809 didWarnNoAwaitAct ||
810 ((didWarnNoAwaitAct = !0),
811 console.error(
812 "You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"
813 ));
814 });
815 return {
816 then: function (resolve, reject) {
817 didAwaitActCall = !0;
818 thenable.then(
819 function (returnValue) {
820 popActScope(prevActQueue, prevActScopeDepth);
821 if (0 === prevActScopeDepth) {
822 try {
823 flushActQueue(queue),
824 enqueueTask(function () {
825 return recursivelyFlushAsyncActWork(
826 returnValue,
827 resolve,
828 reject
829 );
830 });
831 } catch (error$0) {
832 ReactSharedInternals.thrownErrors.push(error$0);
833 }
834 if (0 < ReactSharedInternals.thrownErrors.length) {
835 var _thrownError = aggregateErrors(
836 ReactSharedInternals.thrownErrors
837 );
838 ReactSharedInternals.thrownErrors.length = 0;
839 reject(_thrownError);
840 }
841 } else resolve(returnValue);
842 },
843 function (error) {
844 popActScope(prevActQueue, prevActScopeDepth);
845 0 < ReactSharedInternals.thrownErrors.length
846 ? ((error = aggregateErrors(
847 ReactSharedInternals.thrownErrors
848 )),
849 (ReactSharedInternals.thrownErrors.length = 0),
850 reject(error))
851 : reject(error);
852 }
853 );
854 }
855 };
856 }
857 var returnValue$jscomp$0 = result;
858 popActScope(prevActQueue, prevActScopeDepth);
859 0 === prevActScopeDepth &&
860 (flushActQueue(queue),
861 0 !== queue.length &&
862 queueSeveralMicrotasks(function () {
863 didAwaitActCall ||
864 didWarnNoAwaitAct ||
865 ((didWarnNoAwaitAct = !0),
866 console.error(
867 "A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"
868 ));
869 }),
870 (ReactSharedInternals.actQueue = null));
871 if (0 < ReactSharedInternals.thrownErrors.length)
872 throw (
873 ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
874 (ReactSharedInternals.thrownErrors.length = 0),
875 callback)
876 );
877 return {
878 then: function (resolve, reject) {
879 didAwaitActCall = !0;
880 0 === prevActScopeDepth
881 ? ((ReactSharedInternals.actQueue = queue),
882 enqueueTask(function () {
883 return recursivelyFlushAsyncActWork(
884 returnValue$jscomp$0,
885 resolve,
886 reject
887 );
888 }))
889 : resolve(returnValue$jscomp$0);
890 }
891 };
892 };
893 exports.cache = function (fn) {
894 return function () {
895 return fn.apply(null, arguments);
896 };
897 };
898 exports.captureOwnerStack = function () {
899 var getCurrentStack = ReactSharedInternals.getCurrentStack;
900 return null === getCurrentStack ? null : getCurrentStack();
901 };
902 exports.cloneElement = function (element, config, children) {
903 if (null === element || void 0 === element)
904 throw Error(
905 "The argument must be a React element, but you passed " +
906 element +
907 "."
908 );
909 var props = assign({}, element.props),
910 key = element.key,
911 owner = element._owner;
912 if (null != config) {
913 var JSCompiler_inline_result;
914 a: {
915 if (
916 hasOwnProperty.call(config, "ref") &&
917 (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
918 config,
919 "ref"
920 ).get) &&
921 JSCompiler_inline_result.isReactWarning
922 ) {
923 JSCompiler_inline_result = !1;
924 break a;
925 }
926 JSCompiler_inline_result = void 0 !== config.ref;
927 }
928 JSCompiler_inline_result && (owner = getOwner());
929 hasValidKey(config) &&
930 (checkKeyStringCoercion(config.key), (key = "" + config.key));
931 for (propName in config)
932 !hasOwnProperty.call(config, propName) ||
933 "key" === propName ||
934 "__self" === propName ||
935 "__source" === propName ||
936 ("ref" === propName && void 0 === config.ref) ||
937 (props[propName] = config[propName]);
938 }
939 var propName = arguments.length - 2;
940 if (1 === propName) props.children = children;
941 else if (1 < propName) {
942 JSCompiler_inline_result = Array(propName);
943 for (var i = 0; i < propName; i++)
944 JSCompiler_inline_result[i] = arguments[i + 2];
945 props.children = JSCompiler_inline_result;
946 }
947 props = ReactElement(
948 element.type,
949 key,
950 void 0,
951 void 0,
952 owner,
953 props,
954 element._debugStack,
955 element._debugTask
956 );
957 for (key = 2; key < arguments.length; key++)
958 (owner = arguments[key]),
959 isValidElement(owner) && owner._store && (owner._store.validated = 1);
960 return props;
961 };
962 exports.createContext = function (defaultValue) {
963 defaultValue = {
964 $$typeof: REACT_CONTEXT_TYPE,
965 _currentValue: defaultValue,
966 _currentValue2: defaultValue,
967 _threadCount: 0,
968 Provider: null,
969 Consumer: null
970 };
971 defaultValue.Provider = defaultValue;
972 defaultValue.Consumer = {
973 $$typeof: REACT_CONSUMER_TYPE,
974 _context: defaultValue
975 };
976 defaultValue._currentRenderer = null;
977 defaultValue._currentRenderer2 = null;
978 return defaultValue;
979 };
980 exports.createElement = function (type, config, children) {
981 for (var i = 2; i < arguments.length; i++) {
982 var node = arguments[i];
983 isValidElement(node) && node._store && (node._store.validated = 1);
984 }
985 i = {};
986 node = null;
987 if (null != config)
988 for (propName in (didWarnAboutOldJSXRuntime ||
989 !("__self" in config) ||
990 "key" in config ||
991 ((didWarnAboutOldJSXRuntime = !0),
992 console.warn(
993 "Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform"
994 )),
995 hasValidKey(config) &&
996 (checkKeyStringCoercion(config.key), (node = "" + config.key)),
997 config))
998 hasOwnProperty.call(config, propName) &&
999 "key" !== propName &&
1000 "__self" !== propName &&
1001 "__source" !== propName &&
1002 (i[propName] = config[propName]);
1003 var childrenLength = arguments.length - 2;
1004 if (1 === childrenLength) i.children = children;
1005 else if (1 < childrenLength) {
1006 for (
1007 var childArray = Array(childrenLength), _i = 0;
1008 _i < childrenLength;
1009 _i++
1010 )
1011 childArray[_i] = arguments[_i + 2];
1012 Object.freeze && Object.freeze(childArray);
1013 i.children = childArray;
1014 }
1015 if (type && type.defaultProps)
1016 for (propName in ((childrenLength = type.defaultProps), childrenLength))
1017 void 0 === i[propName] && (i[propName] = childrenLength[propName]);
1018 node &&
1019 defineKeyPropWarningGetter(
1020 i,
1021 "function" === typeof type
1022 ? type.displayName || type.name || "Unknown"
1023 : type
1024 );
1025 var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1026 return ReactElement(
1027 type,
1028 node,
1029 void 0,
1030 void 0,
1031 getOwner(),
1032 i,
1033 propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1034 propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1035 );
1036 };
1037 exports.createRef = function () {
1038 var refObject = { current: null };
1039 Object.seal(refObject);
1040 return refObject;
1041 };
1042 exports.forwardRef = function (render) {
1043 null != render && render.$$typeof === REACT_MEMO_TYPE
1044 ? console.error(
1045 "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
1046 )
1047 : "function" !== typeof render
1048 ? console.error(
1049 "forwardRef requires a render function but was given %s.",
1050 null === render ? "null" : typeof render
1051 )
1052 : 0 !== render.length &&
1053 2 !== render.length &&
1054 console.error(
1055 "forwardRef render functions accept exactly two parameters: props and ref. %s",
1056 1 === render.length
1057 ? "Did you forget to use the ref parameter?"
1058 : "Any additional parameter will be undefined."
1059 );
1060 null != render &&
1061 null != render.defaultProps &&
1062 console.error(
1063 "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
1064 );
1065 var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
1066 ownName;
1067 Object.defineProperty(elementType, "displayName", {
1068 enumerable: !1,
1069 configurable: !0,
1070 get: function () {
1071 return ownName;
1072 },
1073 set: function (name) {
1074 ownName = name;
1075 render.name ||
1076 render.displayName ||
1077 (Object.defineProperty(render, "name", { value: name }),
1078 (render.displayName = name));
1079 }
1080 });
1081 return elementType;
1082 };
1083 exports.isValidElement = isValidElement;
1084 exports.lazy = function (ctor) {
1085 return {
1086 $$typeof: REACT_LAZY_TYPE,
1087 _payload: { _status: -1, _result: ctor },
1088 _init: lazyInitializer
1089 };
1090 };
1091 exports.memo = function (type, compare) {
1092 null == type &&
1093 console.error(
1094 "memo: The first argument must be a component. Instead received: %s",
1095 null === type ? "null" : typeof type
1096 );
1097 compare = {
1098 $$typeof: REACT_MEMO_TYPE,
1099 type: type,
1100 compare: void 0 === compare ? null : compare
1101 };
1102 var ownName;
1103 Object.defineProperty(compare, "displayName", {
1104 enumerable: !1,
1105 configurable: !0,
1106 get: function () {
1107 return ownName;
1108 },
1109 set: function (name) {
1110 ownName = name;
1111 type.name ||
1112 type.displayName ||
1113 (Object.defineProperty(type, "name", { value: name }),
1114 (type.displayName = name));
1115 }
1116 });
1117 return compare;
1118 };
1119 exports.startTransition = function (scope) {
1120 var prevTransition = ReactSharedInternals.T,
1121 currentTransition = {};
1122 ReactSharedInternals.T = currentTransition;
1123 currentTransition._updatedFibers = new Set();
1124 try {
1125 var returnValue = scope(),
1126 onStartTransitionFinish = ReactSharedInternals.S;
1127 null !== onStartTransitionFinish &&
1128 onStartTransitionFinish(currentTransition, returnValue);
1129 "object" === typeof returnValue &&
1130 null !== returnValue &&
1131 "function" === typeof returnValue.then &&
1132 returnValue.then(noop, reportGlobalError);
1133 } catch (error) {
1134 reportGlobalError(error);
1135 } finally {
1136 null === prevTransition &&
1137 currentTransition._updatedFibers &&
1138 ((scope = currentTransition._updatedFibers.size),
1139 currentTransition._updatedFibers.clear(),
1140 10 < scope &&
1141 console.warn(
1142 "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."
1143 )),
1144 (ReactSharedInternals.T = prevTransition);
1145 }
1146 };
1147 exports.unstable_useCacheRefresh = function () {
1148 return resolveDispatcher().useCacheRefresh();
1149 };
1150 exports.use = function (usable) {
1151 return resolveDispatcher().use(usable);
1152 };
1153 exports.useActionState = function (action, initialState, permalink) {
1154 return resolveDispatcher().useActionState(
1155 action,
1156 initialState,
1157 permalink
1158 );
1159 };
1160 exports.useCallback = function (callback, deps) {
1161 return resolveDispatcher().useCallback(callback, deps);
1162 };
1163 exports.useContext = function (Context) {
1164 var dispatcher = resolveDispatcher();
1165 Context.$$typeof === REACT_CONSUMER_TYPE &&
1166 console.error(
1167 "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
1168 );
1169 return dispatcher.useContext(Context);
1170 };
1171 exports.useDebugValue = function (value, formatterFn) {
1172 return resolveDispatcher().useDebugValue(value, formatterFn);
1173 };
1174 exports.useDeferredValue = function (value, initialValue) {
1175 return resolveDispatcher().useDeferredValue(value, initialValue);
1176 };
1177 exports.useEffect = function (create, createDeps, update) {
1178 null == create &&
1179 console.warn(
1180 "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1181 );
1182 var dispatcher = resolveDispatcher();
1183 if ("function" === typeof update)
1184 throw Error(
1185 "useEffect CRUD overload is not enabled in this build of React."
1186 );
1187 return dispatcher.useEffect(create, createDeps);
1188 };
1189 exports.useId = function () {
1190 return resolveDispatcher().useId();
1191 };
1192 exports.useImperativeHandle = function (ref, create, deps) {
1193 return resolveDispatcher().useImperativeHandle(ref, create, deps);
1194 };
1195 exports.useInsertionEffect = function (create, deps) {
1196 null == create &&
1197 console.warn(
1198 "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1199 );
1200 return resolveDispatcher().useInsertionEffect(create, deps);
1201 };
1202 exports.useLayoutEffect = function (create, deps) {
1203 null == create &&
1204 console.warn(
1205 "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
1206 );
1207 return resolveDispatcher().useLayoutEffect(create, deps);
1208 };
1209 exports.useMemo = function (create, deps) {
1210 return resolveDispatcher().useMemo(create, deps);
1211 };
1212 exports.useOptimistic = function (passthrough, reducer) {
1213 return resolveDispatcher().useOptimistic(passthrough, reducer);
1214 };
1215 exports.useReducer = function (reducer, initialArg, init) {
1216 return resolveDispatcher().useReducer(reducer, initialArg, init);
1217 };
1218 exports.useRef = function (initialValue) {
1219 return resolveDispatcher().useRef(initialValue);
1220 };
1221 exports.useState = function (initialState) {
1222 return resolveDispatcher().useState(initialState);
1223 };
1224 exports.useSyncExternalStore = function (
1225 subscribe,
1226 getSnapshot,
1227 getServerSnapshot
1228 ) {
1229 return resolveDispatcher().useSyncExternalStore(
1230 subscribe,
1231 getSnapshot,
1232 getServerSnapshot
1233 );
1234 };
1235 exports.useTransition = function () {
1236 return resolveDispatcher().useTransition();
1237 };
1238 exports.version = "19.1.1";
1239 "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1240 "function" ===
1241 typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
1242 __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1243 })();