react.development.js 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284
  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. "use strict";
  11. "production" !== process.env.NODE_ENV &&
  12. (function () {
  13. function defineDeprecationWarning(methodName, info) {
  14. Object.defineProperty(Component.prototype, methodName, {
  15. get: function () {
  16. console.warn(
  17. "%s(...) is deprecated in plain JavaScript React classes. %s",
  18. info[0],
  19. info[1]
  20. );
  21. }
  22. });
  23. }
  24. function getIteratorFn(maybeIterable) {
  25. if (null === maybeIterable || "object" !== typeof maybeIterable)
  26. return null;
  27. maybeIterable =
  28. (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
  29. maybeIterable["@@iterator"];
  30. return "function" === typeof maybeIterable ? maybeIterable : null;
  31. }
  32. function warnNoop(publicInstance, callerName) {
  33. publicInstance =
  34. ((publicInstance = publicInstance.constructor) &&
  35. (publicInstance.displayName || publicInstance.name)) ||
  36. "ReactClass";
  37. var warningKey = publicInstance + "." + callerName;
  38. didWarnStateUpdateForUnmountedComponent[warningKey] ||
  39. (console.error(
  40. "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.",
  41. callerName,
  42. publicInstance
  43. ),
  44. (didWarnStateUpdateForUnmountedComponent[warningKey] = !0));
  45. }
  46. function Component(props, context, updater) {
  47. this.props = props;
  48. this.context = context;
  49. this.refs = emptyObject;
  50. this.updater = updater || ReactNoopUpdateQueue;
  51. }
  52. function ComponentDummy() {}
  53. function PureComponent(props, context, updater) {
  54. this.props = props;
  55. this.context = context;
  56. this.refs = emptyObject;
  57. this.updater = updater || ReactNoopUpdateQueue;
  58. }
  59. function noop() {}
  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";
  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(type, key, props, owner, debugStack, debugTask) {
  200. var refProp = props.ref;
  201. type = {
  202. $$typeof: REACT_ELEMENT_TYPE,
  203. type: type,
  204. key: key,
  205. props: props,
  206. _owner: owner
  207. };
  208. null !== (void 0 !== refProp ? refProp : null)
  209. ? Object.defineProperty(type, "ref", {
  210. enumerable: !1,
  211. get: elementRefGetterWithDeprecationWarning
  212. })
  213. : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
  214. type._store = {};
  215. Object.defineProperty(type._store, "validated", {
  216. configurable: !1,
  217. enumerable: !1,
  218. writable: !0,
  219. value: 0
  220. });
  221. Object.defineProperty(type, "_debugInfo", {
  222. configurable: !1,
  223. enumerable: !1,
  224. writable: !0,
  225. value: null
  226. });
  227. Object.defineProperty(type, "_debugStack", {
  228. configurable: !1,
  229. enumerable: !1,
  230. writable: !0,
  231. value: debugStack
  232. });
  233. Object.defineProperty(type, "_debugTask", {
  234. configurable: !1,
  235. enumerable: !1,
  236. writable: !0,
  237. value: debugTask
  238. });
  239. Object.freeze && (Object.freeze(type.props), Object.freeze(type));
  240. return type;
  241. }
  242. function cloneAndReplaceKey(oldElement, newKey) {
  243. newKey = ReactElement(
  244. oldElement.type,
  245. newKey,
  246. oldElement.props,
  247. oldElement._owner,
  248. oldElement._debugStack,
  249. oldElement._debugTask
  250. );
  251. oldElement._store &&
  252. (newKey._store.validated = oldElement._store.validated);
  253. return newKey;
  254. }
  255. function validateChildKeys(node) {
  256. isValidElement(node)
  257. ? node._store && (node._store.validated = 1)
  258. : "object" === typeof node &&
  259. null !== node &&
  260. node.$$typeof === REACT_LAZY_TYPE &&
  261. ("fulfilled" === node._payload.status
  262. ? isValidElement(node._payload.value) &&
  263. node._payload.value._store &&
  264. (node._payload.value._store.validated = 1)
  265. : node._store && (node._store.validated = 1));
  266. }
  267. function isValidElement(object) {
  268. return (
  269. "object" === typeof object &&
  270. null !== object &&
  271. object.$$typeof === REACT_ELEMENT_TYPE
  272. );
  273. }
  274. function escape(key) {
  275. var escaperLookup = { "=": "=0", ":": "=2" };
  276. return (
  277. "$" +
  278. key.replace(/[=:]/g, function (match) {
  279. return escaperLookup[match];
  280. })
  281. );
  282. }
  283. function getElementKey(element, index) {
  284. return "object" === typeof element &&
  285. null !== element &&
  286. null != element.key
  287. ? (checkKeyStringCoercion(element.key), escape("" + element.key))
  288. : index.toString(36);
  289. }
  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, noop)
  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. (nameSoFar = nameSoFar.value),
  421. (type = childKey + getElementKey(nameSoFar, i++)),
  422. (invokeCallback += mapIntoArray(
  423. nameSoFar,
  424. array,
  425. escapedPrefix,
  426. type,
  427. callback
  428. ));
  429. else if ("object" === type) {
  430. if ("function" === typeof children.then)
  431. return mapIntoArray(
  432. resolveThenable(children),
  433. array,
  434. escapedPrefix,
  435. nameSoFar,
  436. callback
  437. );
  438. array = String(children);
  439. throw Error(
  440. "Objects are not valid as a React child (found: " +
  441. ("[object Object]" === array
  442. ? "object with keys {" + Object.keys(children).join(", ") + "}"
  443. : array) +
  444. "). If you meant to render a collection of children, use an array instead."
  445. );
  446. }
  447. return invokeCallback;
  448. }
  449. function mapChildren(children, func, context) {
  450. if (null == children) return children;
  451. var result = [],
  452. count = 0;
  453. mapIntoArray(children, result, "", "", function (child) {
  454. return func.call(context, child, count++);
  455. });
  456. return result;
  457. }
  458. function lazyInitializer(payload) {
  459. if (-1 === payload._status) {
  460. var ioInfo = payload._ioInfo;
  461. null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
  462. ioInfo = payload._result;
  463. var thenable = ioInfo();
  464. thenable.then(
  465. function (moduleObject) {
  466. if (0 === payload._status || -1 === payload._status) {
  467. payload._status = 1;
  468. payload._result = moduleObject;
  469. var _ioInfo = payload._ioInfo;
  470. null != _ioInfo && (_ioInfo.end = performance.now());
  471. void 0 === thenable.status &&
  472. ((thenable.status = "fulfilled"),
  473. (thenable.value = moduleObject));
  474. }
  475. },
  476. function (error) {
  477. if (0 === payload._status || -1 === payload._status) {
  478. payload._status = 2;
  479. payload._result = error;
  480. var _ioInfo2 = payload._ioInfo;
  481. null != _ioInfo2 && (_ioInfo2.end = performance.now());
  482. void 0 === thenable.status &&
  483. ((thenable.status = "rejected"), (thenable.reason = error));
  484. }
  485. }
  486. );
  487. ioInfo = payload._ioInfo;
  488. if (null != ioInfo) {
  489. ioInfo.value = thenable;
  490. var displayName = thenable.displayName;
  491. "string" === typeof displayName && (ioInfo.name = displayName);
  492. }
  493. -1 === payload._status &&
  494. ((payload._status = 0), (payload._result = thenable));
  495. }
  496. if (1 === payload._status)
  497. return (
  498. (ioInfo = payload._result),
  499. void 0 === ioInfo &&
  500. console.error(
  501. "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?",
  502. ioInfo
  503. ),
  504. "default" in ioInfo ||
  505. console.error(
  506. "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
  507. ioInfo
  508. ),
  509. ioInfo.default
  510. );
  511. throw payload._result;
  512. }
  513. function resolveDispatcher() {
  514. var dispatcher = ReactSharedInternals.H;
  515. null === dispatcher &&
  516. console.error(
  517. "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."
  518. );
  519. return dispatcher;
  520. }
  521. function releaseAsyncTransition() {
  522. ReactSharedInternals.asyncTransitions--;
  523. }
  524. function enqueueTask(task) {
  525. if (null === enqueueTaskImpl)
  526. try {
  527. var requireString = ("require" + Math.random()).slice(0, 7);
  528. enqueueTaskImpl = (module && module[requireString]).call(
  529. module,
  530. "timers"
  531. ).setImmediate;
  532. } catch (_err) {
  533. enqueueTaskImpl = function (callback) {
  534. !1 === didWarnAboutMessageChannel &&
  535. ((didWarnAboutMessageChannel = !0),
  536. "undefined" === typeof MessageChannel &&
  537. console.error(
  538. "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."
  539. ));
  540. var channel = new MessageChannel();
  541. channel.port1.onmessage = callback;
  542. channel.port2.postMessage(void 0);
  543. };
  544. }
  545. return enqueueTaskImpl(task);
  546. }
  547. function aggregateErrors(errors) {
  548. return 1 < errors.length && "function" === typeof AggregateError
  549. ? new AggregateError(errors)
  550. : errors[0];
  551. }
  552. function popActScope(prevActQueue, prevActScopeDepth) {
  553. prevActScopeDepth !== actScopeDepth - 1 &&
  554. console.error(
  555. "You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "
  556. );
  557. actScopeDepth = prevActScopeDepth;
  558. }
  559. function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
  560. var queue = ReactSharedInternals.actQueue;
  561. if (null !== queue)
  562. if (0 !== queue.length)
  563. try {
  564. flushActQueue(queue);
  565. enqueueTask(function () {
  566. return recursivelyFlushAsyncActWork(returnValue, resolve, reject);
  567. });
  568. return;
  569. } catch (error) {
  570. ReactSharedInternals.thrownErrors.push(error);
  571. }
  572. else ReactSharedInternals.actQueue = null;
  573. 0 < ReactSharedInternals.thrownErrors.length
  574. ? ((queue = aggregateErrors(ReactSharedInternals.thrownErrors)),
  575. (ReactSharedInternals.thrownErrors.length = 0),
  576. reject(queue))
  577. : resolve(returnValue);
  578. }
  579. function flushActQueue(queue) {
  580. if (!isFlushing) {
  581. isFlushing = !0;
  582. var i = 0;
  583. try {
  584. for (; i < queue.length; i++) {
  585. var callback = queue[i];
  586. do {
  587. ReactSharedInternals.didUsePromise = !1;
  588. var continuation = callback(!1);
  589. if (null !== continuation) {
  590. if (ReactSharedInternals.didUsePromise) {
  591. queue[i] = callback;
  592. queue.splice(0, i);
  593. return;
  594. }
  595. callback = continuation;
  596. } else break;
  597. } while (1);
  598. }
  599. queue.length = 0;
  600. } catch (error) {
  601. queue.splice(0, i + 1), ReactSharedInternals.thrownErrors.push(error);
  602. } finally {
  603. isFlushing = !1;
  604. }
  605. }
  606. }
  607. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  608. "function" ===
  609. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
  610. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
  611. var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
  612. REACT_PORTAL_TYPE = Symbol.for("react.portal"),
  613. REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
  614. REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
  615. REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
  616. REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
  617. REACT_CONTEXT_TYPE = Symbol.for("react.context"),
  618. REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
  619. REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
  620. REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
  621. REACT_MEMO_TYPE = Symbol.for("react.memo"),
  622. REACT_LAZY_TYPE = Symbol.for("react.lazy"),
  623. REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
  624. MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
  625. didWarnStateUpdateForUnmountedComponent = {},
  626. ReactNoopUpdateQueue = {
  627. isMounted: function () {
  628. return !1;
  629. },
  630. enqueueForceUpdate: function (publicInstance) {
  631. warnNoop(publicInstance, "forceUpdate");
  632. },
  633. enqueueReplaceState: function (publicInstance) {
  634. warnNoop(publicInstance, "replaceState");
  635. },
  636. enqueueSetState: function (publicInstance) {
  637. warnNoop(publicInstance, "setState");
  638. }
  639. },
  640. assign = Object.assign,
  641. emptyObject = {};
  642. Object.freeze(emptyObject);
  643. Component.prototype.isReactComponent = {};
  644. Component.prototype.setState = function (partialState, callback) {
  645. if (
  646. "object" !== typeof partialState &&
  647. "function" !== typeof partialState &&
  648. null != partialState
  649. )
  650. throw Error(
  651. "takes an object of state variables to update or a function which returns an object of state variables."
  652. );
  653. this.updater.enqueueSetState(this, partialState, callback, "setState");
  654. };
  655. Component.prototype.forceUpdate = function (callback) {
  656. this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
  657. };
  658. var deprecatedAPIs = {
  659. isMounted: [
  660. "isMounted",
  661. "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."
  662. ],
  663. replaceState: [
  664. "replaceState",
  665. "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."
  666. ]
  667. };
  668. for (fnName in deprecatedAPIs)
  669. deprecatedAPIs.hasOwnProperty(fnName) &&
  670. defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
  671. ComponentDummy.prototype = Component.prototype;
  672. deprecatedAPIs = PureComponent.prototype = new ComponentDummy();
  673. deprecatedAPIs.constructor = PureComponent;
  674. assign(deprecatedAPIs, Component.prototype);
  675. deprecatedAPIs.isPureReactComponent = !0;
  676. var isArrayImpl = Array.isArray,
  677. REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
  678. ReactSharedInternals = {
  679. H: null,
  680. A: null,
  681. T: null,
  682. S: null,
  683. actQueue: null,
  684. asyncTransitions: 0,
  685. isBatchingLegacy: !1,
  686. didScheduleLegacyUpdate: !1,
  687. didUsePromise: !1,
  688. thrownErrors: [],
  689. getCurrentStack: null,
  690. recentlyCreatedOwnerStacks: 0
  691. },
  692. hasOwnProperty = Object.prototype.hasOwnProperty,
  693. createTask = console.createTask
  694. ? console.createTask
  695. : function () {
  696. return null;
  697. };
  698. deprecatedAPIs = {
  699. react_stack_bottom_frame: function (callStackForError) {
  700. return callStackForError();
  701. }
  702. };
  703. var specialPropKeyWarningShown, didWarnAboutOldJSXRuntime;
  704. var didWarnAboutElementRef = {};
  705. var unknownOwnerDebugStack = deprecatedAPIs.react_stack_bottom_frame.bind(
  706. deprecatedAPIs,
  707. UnknownOwner
  708. )();
  709. var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
  710. var didWarnAboutMaps = !1,
  711. userProvidedKeyEscapeRegex = /\/+/g,
  712. reportGlobalError =
  713. "function" === typeof reportError
  714. ? reportError
  715. : function (error) {
  716. if (
  717. "object" === typeof window &&
  718. "function" === typeof window.ErrorEvent
  719. ) {
  720. var event = new window.ErrorEvent("error", {
  721. bubbles: !0,
  722. cancelable: !0,
  723. message:
  724. "object" === typeof error &&
  725. null !== error &&
  726. "string" === typeof error.message
  727. ? String(error.message)
  728. : String(error),
  729. error: error
  730. });
  731. if (!window.dispatchEvent(event)) return;
  732. } else if (
  733. "object" === typeof process &&
  734. "function" === typeof process.emit
  735. ) {
  736. process.emit("uncaughtException", error);
  737. return;
  738. }
  739. console.error(error);
  740. },
  741. didWarnAboutMessageChannel = !1,
  742. enqueueTaskImpl = null,
  743. actScopeDepth = 0,
  744. didWarnNoAwaitAct = !1,
  745. isFlushing = !1,
  746. queueSeveralMicrotasks =
  747. "function" === typeof queueMicrotask
  748. ? function (callback) {
  749. queueMicrotask(function () {
  750. return queueMicrotask(callback);
  751. });
  752. }
  753. : enqueueTask;
  754. deprecatedAPIs = Object.freeze({
  755. __proto__: null,
  756. c: function (size) {
  757. return resolveDispatcher().useMemoCache(size);
  758. }
  759. });
  760. var fnName = {
  761. map: mapChildren,
  762. forEach: function (children, forEachFunc, forEachContext) {
  763. mapChildren(
  764. children,
  765. function () {
  766. forEachFunc.apply(this, arguments);
  767. },
  768. forEachContext
  769. );
  770. },
  771. count: function (children) {
  772. var n = 0;
  773. mapChildren(children, function () {
  774. n++;
  775. });
  776. return n;
  777. },
  778. toArray: function (children) {
  779. return (
  780. mapChildren(children, function (child) {
  781. return child;
  782. }) || []
  783. );
  784. },
  785. only: function (children) {
  786. if (!isValidElement(children))
  787. throw Error(
  788. "React.Children.only expected to receive a single React element child."
  789. );
  790. return children;
  791. }
  792. };
  793. exports.Activity = REACT_ACTIVITY_TYPE;
  794. exports.Children = fnName;
  795. exports.Component = Component;
  796. exports.Fragment = REACT_FRAGMENT_TYPE;
  797. exports.Profiler = REACT_PROFILER_TYPE;
  798. exports.PureComponent = PureComponent;
  799. exports.StrictMode = REACT_STRICT_MODE_TYPE;
  800. exports.Suspense = REACT_SUSPENSE_TYPE;
  801. exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
  802. ReactSharedInternals;
  803. exports.__COMPILER_RUNTIME = deprecatedAPIs;
  804. exports.act = function (callback) {
  805. var prevActQueue = ReactSharedInternals.actQueue,
  806. prevActScopeDepth = actScopeDepth;
  807. actScopeDepth++;
  808. var queue = (ReactSharedInternals.actQueue =
  809. null !== prevActQueue ? prevActQueue : []),
  810. didAwaitActCall = !1;
  811. try {
  812. var result = callback();
  813. } catch (error) {
  814. ReactSharedInternals.thrownErrors.push(error);
  815. }
  816. if (0 < ReactSharedInternals.thrownErrors.length)
  817. throw (
  818. (popActScope(prevActQueue, prevActScopeDepth),
  819. (callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
  820. (ReactSharedInternals.thrownErrors.length = 0),
  821. callback)
  822. );
  823. if (
  824. null !== result &&
  825. "object" === typeof result &&
  826. "function" === typeof result.then
  827. ) {
  828. var thenable = result;
  829. queueSeveralMicrotasks(function () {
  830. didAwaitActCall ||
  831. didWarnNoAwaitAct ||
  832. ((didWarnNoAwaitAct = !0),
  833. console.error(
  834. "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 () => ...);"
  835. ));
  836. });
  837. return {
  838. then: function (resolve, reject) {
  839. didAwaitActCall = !0;
  840. thenable.then(
  841. function (returnValue) {
  842. popActScope(prevActQueue, prevActScopeDepth);
  843. if (0 === prevActScopeDepth) {
  844. try {
  845. flushActQueue(queue),
  846. enqueueTask(function () {
  847. return recursivelyFlushAsyncActWork(
  848. returnValue,
  849. resolve,
  850. reject
  851. );
  852. });
  853. } catch (error$0) {
  854. ReactSharedInternals.thrownErrors.push(error$0);
  855. }
  856. if (0 < ReactSharedInternals.thrownErrors.length) {
  857. var _thrownError = aggregateErrors(
  858. ReactSharedInternals.thrownErrors
  859. );
  860. ReactSharedInternals.thrownErrors.length = 0;
  861. reject(_thrownError);
  862. }
  863. } else resolve(returnValue);
  864. },
  865. function (error) {
  866. popActScope(prevActQueue, prevActScopeDepth);
  867. 0 < ReactSharedInternals.thrownErrors.length
  868. ? ((error = aggregateErrors(
  869. ReactSharedInternals.thrownErrors
  870. )),
  871. (ReactSharedInternals.thrownErrors.length = 0),
  872. reject(error))
  873. : reject(error);
  874. }
  875. );
  876. }
  877. };
  878. }
  879. var returnValue$jscomp$0 = result;
  880. popActScope(prevActQueue, prevActScopeDepth);
  881. 0 === prevActScopeDepth &&
  882. (flushActQueue(queue),
  883. 0 !== queue.length &&
  884. queueSeveralMicrotasks(function () {
  885. didAwaitActCall ||
  886. didWarnNoAwaitAct ||
  887. ((didWarnNoAwaitAct = !0),
  888. console.error(
  889. "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(() => ...)"
  890. ));
  891. }),
  892. (ReactSharedInternals.actQueue = null));
  893. if (0 < ReactSharedInternals.thrownErrors.length)
  894. throw (
  895. ((callback = aggregateErrors(ReactSharedInternals.thrownErrors)),
  896. (ReactSharedInternals.thrownErrors.length = 0),
  897. callback)
  898. );
  899. return {
  900. then: function (resolve, reject) {
  901. didAwaitActCall = !0;
  902. 0 === prevActScopeDepth
  903. ? ((ReactSharedInternals.actQueue = queue),
  904. enqueueTask(function () {
  905. return recursivelyFlushAsyncActWork(
  906. returnValue$jscomp$0,
  907. resolve,
  908. reject
  909. );
  910. }))
  911. : resolve(returnValue$jscomp$0);
  912. }
  913. };
  914. };
  915. exports.cache = function (fn) {
  916. return function () {
  917. return fn.apply(null, arguments);
  918. };
  919. };
  920. exports.cacheSignal = function () {
  921. return null;
  922. };
  923. exports.captureOwnerStack = function () {
  924. var getCurrentStack = ReactSharedInternals.getCurrentStack;
  925. return null === getCurrentStack ? null : getCurrentStack();
  926. };
  927. exports.cloneElement = function (element, config, children) {
  928. if (null === element || void 0 === element)
  929. throw Error(
  930. "The argument must be a React element, but you passed " +
  931. element +
  932. "."
  933. );
  934. var props = assign({}, element.props),
  935. key = element.key,
  936. owner = element._owner;
  937. if (null != config) {
  938. var JSCompiler_inline_result;
  939. a: {
  940. if (
  941. hasOwnProperty.call(config, "ref") &&
  942. (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
  943. config,
  944. "ref"
  945. ).get) &&
  946. JSCompiler_inline_result.isReactWarning
  947. ) {
  948. JSCompiler_inline_result = !1;
  949. break a;
  950. }
  951. JSCompiler_inline_result = void 0 !== config.ref;
  952. }
  953. JSCompiler_inline_result && (owner = getOwner());
  954. hasValidKey(config) &&
  955. (checkKeyStringCoercion(config.key), (key = "" + config.key));
  956. for (propName in config)
  957. !hasOwnProperty.call(config, propName) ||
  958. "key" === propName ||
  959. "__self" === propName ||
  960. "__source" === propName ||
  961. ("ref" === propName && void 0 === config.ref) ||
  962. (props[propName] = config[propName]);
  963. }
  964. var propName = arguments.length - 2;
  965. if (1 === propName) props.children = children;
  966. else if (1 < propName) {
  967. JSCompiler_inline_result = Array(propName);
  968. for (var i = 0; i < propName; i++)
  969. JSCompiler_inline_result[i] = arguments[i + 2];
  970. props.children = JSCompiler_inline_result;
  971. }
  972. props = ReactElement(
  973. element.type,
  974. key,
  975. props,
  976. owner,
  977. element._debugStack,
  978. element._debugTask
  979. );
  980. for (key = 2; key < arguments.length; key++)
  981. validateChildKeys(arguments[key]);
  982. return props;
  983. };
  984. exports.createContext = function (defaultValue) {
  985. defaultValue = {
  986. $$typeof: REACT_CONTEXT_TYPE,
  987. _currentValue: defaultValue,
  988. _currentValue2: defaultValue,
  989. _threadCount: 0,
  990. Provider: null,
  991. Consumer: null
  992. };
  993. defaultValue.Provider = defaultValue;
  994. defaultValue.Consumer = {
  995. $$typeof: REACT_CONSUMER_TYPE,
  996. _context: defaultValue
  997. };
  998. defaultValue._currentRenderer = null;
  999. defaultValue._currentRenderer2 = null;
  1000. return defaultValue;
  1001. };
  1002. exports.createElement = function (type, config, children) {
  1003. for (var i = 2; i < arguments.length; i++)
  1004. validateChildKeys(arguments[i]);
  1005. i = {};
  1006. var key = null;
  1007. if (null != config)
  1008. for (propName in (didWarnAboutOldJSXRuntime ||
  1009. !("__self" in config) ||
  1010. "key" in config ||
  1011. ((didWarnAboutOldJSXRuntime = !0),
  1012. console.warn(
  1013. "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"
  1014. )),
  1015. hasValidKey(config) &&
  1016. (checkKeyStringCoercion(config.key), (key = "" + config.key)),
  1017. config))
  1018. hasOwnProperty.call(config, propName) &&
  1019. "key" !== propName &&
  1020. "__self" !== propName &&
  1021. "__source" !== propName &&
  1022. (i[propName] = config[propName]);
  1023. var childrenLength = arguments.length - 2;
  1024. if (1 === childrenLength) i.children = children;
  1025. else if (1 < childrenLength) {
  1026. for (
  1027. var childArray = Array(childrenLength), _i = 0;
  1028. _i < childrenLength;
  1029. _i++
  1030. )
  1031. childArray[_i] = arguments[_i + 2];
  1032. Object.freeze && Object.freeze(childArray);
  1033. i.children = childArray;
  1034. }
  1035. if (type && type.defaultProps)
  1036. for (propName in ((childrenLength = type.defaultProps), childrenLength))
  1037. void 0 === i[propName] && (i[propName] = childrenLength[propName]);
  1038. key &&
  1039. defineKeyPropWarningGetter(
  1040. i,
  1041. "function" === typeof type
  1042. ? type.displayName || type.name || "Unknown"
  1043. : type
  1044. );
  1045. var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
  1046. return ReactElement(
  1047. type,
  1048. key,
  1049. i,
  1050. getOwner(),
  1051. propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
  1052. propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
  1053. );
  1054. };
  1055. exports.createRef = function () {
  1056. var refObject = { current: null };
  1057. Object.seal(refObject);
  1058. return refObject;
  1059. };
  1060. exports.forwardRef = function (render) {
  1061. null != render && render.$$typeof === REACT_MEMO_TYPE
  1062. ? console.error(
  1063. "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
  1064. )
  1065. : "function" !== typeof render
  1066. ? console.error(
  1067. "forwardRef requires a render function but was given %s.",
  1068. null === render ? "null" : typeof render
  1069. )
  1070. : 0 !== render.length &&
  1071. 2 !== render.length &&
  1072. console.error(
  1073. "forwardRef render functions accept exactly two parameters: props and ref. %s",
  1074. 1 === render.length
  1075. ? "Did you forget to use the ref parameter?"
  1076. : "Any additional parameter will be undefined."
  1077. );
  1078. null != render &&
  1079. null != render.defaultProps &&
  1080. console.error(
  1081. "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
  1082. );
  1083. var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
  1084. ownName;
  1085. Object.defineProperty(elementType, "displayName", {
  1086. enumerable: !1,
  1087. configurable: !0,
  1088. get: function () {
  1089. return ownName;
  1090. },
  1091. set: function (name) {
  1092. ownName = name;
  1093. render.name ||
  1094. render.displayName ||
  1095. (Object.defineProperty(render, "name", { value: name }),
  1096. (render.displayName = name));
  1097. }
  1098. });
  1099. return elementType;
  1100. };
  1101. exports.isValidElement = isValidElement;
  1102. exports.lazy = function (ctor) {
  1103. ctor = { _status: -1, _result: ctor };
  1104. var lazyType = {
  1105. $$typeof: REACT_LAZY_TYPE,
  1106. _payload: ctor,
  1107. _init: lazyInitializer
  1108. },
  1109. ioInfo = {
  1110. name: "lazy",
  1111. start: -1,
  1112. end: -1,
  1113. value: null,
  1114. owner: null,
  1115. debugStack: Error("react-stack-top-frame"),
  1116. debugTask: console.createTask ? console.createTask("lazy()") : null
  1117. };
  1118. ctor._ioInfo = ioInfo;
  1119. lazyType._debugInfo = [{ awaited: ioInfo }];
  1120. return lazyType;
  1121. };
  1122. exports.memo = function (type, compare) {
  1123. null == type &&
  1124. console.error(
  1125. "memo: The first argument must be a component. Instead received: %s",
  1126. null === type ? "null" : typeof type
  1127. );
  1128. compare = {
  1129. $$typeof: REACT_MEMO_TYPE,
  1130. type: type,
  1131. compare: void 0 === compare ? null : compare
  1132. };
  1133. var ownName;
  1134. Object.defineProperty(compare, "displayName", {
  1135. enumerable: !1,
  1136. configurable: !0,
  1137. get: function () {
  1138. return ownName;
  1139. },
  1140. set: function (name) {
  1141. ownName = name;
  1142. type.name ||
  1143. type.displayName ||
  1144. (Object.defineProperty(type, "name", { value: name }),
  1145. (type.displayName = name));
  1146. }
  1147. });
  1148. return compare;
  1149. };
  1150. exports.startTransition = function (scope) {
  1151. var prevTransition = ReactSharedInternals.T,
  1152. currentTransition = {};
  1153. currentTransition._updatedFibers = new Set();
  1154. ReactSharedInternals.T = currentTransition;
  1155. try {
  1156. var returnValue = scope(),
  1157. onStartTransitionFinish = ReactSharedInternals.S;
  1158. null !== onStartTransitionFinish &&
  1159. onStartTransitionFinish(currentTransition, returnValue);
  1160. "object" === typeof returnValue &&
  1161. null !== returnValue &&
  1162. "function" === typeof returnValue.then &&
  1163. (ReactSharedInternals.asyncTransitions++,
  1164. returnValue.then(releaseAsyncTransition, releaseAsyncTransition),
  1165. returnValue.then(noop, reportGlobalError));
  1166. } catch (error) {
  1167. reportGlobalError(error);
  1168. } finally {
  1169. null === prevTransition &&
  1170. currentTransition._updatedFibers &&
  1171. ((scope = currentTransition._updatedFibers.size),
  1172. currentTransition._updatedFibers.clear(),
  1173. 10 < scope &&
  1174. console.warn(
  1175. "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."
  1176. )),
  1177. null !== prevTransition &&
  1178. null !== currentTransition.types &&
  1179. (null !== prevTransition.types &&
  1180. prevTransition.types !== currentTransition.types &&
  1181. console.error(
  1182. "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."
  1183. ),
  1184. (prevTransition.types = currentTransition.types)),
  1185. (ReactSharedInternals.T = prevTransition);
  1186. }
  1187. };
  1188. exports.unstable_useCacheRefresh = function () {
  1189. return resolveDispatcher().useCacheRefresh();
  1190. };
  1191. exports.use = function (usable) {
  1192. return resolveDispatcher().use(usable);
  1193. };
  1194. exports.useActionState = function (action, initialState, permalink) {
  1195. return resolveDispatcher().useActionState(
  1196. action,
  1197. initialState,
  1198. permalink
  1199. );
  1200. };
  1201. exports.useCallback = function (callback, deps) {
  1202. return resolveDispatcher().useCallback(callback, deps);
  1203. };
  1204. exports.useContext = function (Context) {
  1205. var dispatcher = resolveDispatcher();
  1206. Context.$$typeof === REACT_CONSUMER_TYPE &&
  1207. console.error(
  1208. "Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"
  1209. );
  1210. return dispatcher.useContext(Context);
  1211. };
  1212. exports.useDebugValue = function (value, formatterFn) {
  1213. return resolveDispatcher().useDebugValue(value, formatterFn);
  1214. };
  1215. exports.useDeferredValue = function (value, initialValue) {
  1216. return resolveDispatcher().useDeferredValue(value, initialValue);
  1217. };
  1218. exports.useEffect = function (create, deps) {
  1219. null == create &&
  1220. console.warn(
  1221. "React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"
  1222. );
  1223. return resolveDispatcher().useEffect(create, deps);
  1224. };
  1225. exports.useEffectEvent = function (callback) {
  1226. return resolveDispatcher().useEffectEvent(callback);
  1227. };
  1228. exports.useId = function () {
  1229. return resolveDispatcher().useId();
  1230. };
  1231. exports.useImperativeHandle = function (ref, create, deps) {
  1232. return resolveDispatcher().useImperativeHandle(ref, create, deps);
  1233. };
  1234. exports.useInsertionEffect = function (create, deps) {
  1235. null == create &&
  1236. console.warn(
  1237. "React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"
  1238. );
  1239. return resolveDispatcher().useInsertionEffect(create, deps);
  1240. };
  1241. exports.useLayoutEffect = function (create, deps) {
  1242. null == create &&
  1243. console.warn(
  1244. "React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"
  1245. );
  1246. return resolveDispatcher().useLayoutEffect(create, deps);
  1247. };
  1248. exports.useMemo = function (create, deps) {
  1249. return resolveDispatcher().useMemo(create, deps);
  1250. };
  1251. exports.useOptimistic = function (passthrough, reducer) {
  1252. return resolveDispatcher().useOptimistic(passthrough, reducer);
  1253. };
  1254. exports.useReducer = function (reducer, initialArg, init) {
  1255. return resolveDispatcher().useReducer(reducer, initialArg, init);
  1256. };
  1257. exports.useRef = function (initialValue) {
  1258. return resolveDispatcher().useRef(initialValue);
  1259. };
  1260. exports.useState = function (initialState) {
  1261. return resolveDispatcher().useState(initialState);
  1262. };
  1263. exports.useSyncExternalStore = function (
  1264. subscribe,
  1265. getSnapshot,
  1266. getServerSnapshot
  1267. ) {
  1268. return resolveDispatcher().useSyncExternalStore(
  1269. subscribe,
  1270. getSnapshot,
  1271. getServerSnapshot
  1272. );
  1273. };
  1274. exports.useTransition = function () {
  1275. return resolveDispatcher().useTransition();
  1276. };
  1277. exports.version = "19.2.4";
  1278. "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
  1279. "function" ===
  1280. typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
  1281. __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
  1282. })();