react 18.2.0 → 19.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/cjs/react-compiler-runtime.development.js +24 -0
  4. package/cjs/react-compiler-runtime.production.js +16 -0
  5. package/cjs/react-compiler-runtime.profiling.js +16 -0
  6. package/cjs/react-jsx-dev-runtime.development.js +308 -1266
  7. package/cjs/react-jsx-dev-runtime.production.js +14 -0
  8. package/cjs/react-jsx-dev-runtime.profiling.js +14 -0
  9. package/cjs/react-jsx-dev-runtime.react-server.development.js +370 -0
  10. package/cjs/react-jsx-dev-runtime.react-server.production.js +40 -0
  11. package/cjs/react-jsx-runtime.development.js +322 -1284
  12. package/cjs/react-jsx-runtime.production.js +34 -0
  13. package/cjs/react-jsx-runtime.profiling.js +34 -0
  14. package/cjs/react-jsx-runtime.react-server.development.js +370 -0
  15. package/cjs/react-jsx-runtime.react-server.production.js +40 -0
  16. package/cjs/react.development.js +1240 -2695
  17. package/cjs/react.production.js +542 -0
  18. package/cjs/react.react-server.development.js +848 -0
  19. package/cjs/react.react-server.production.js +423 -0
  20. package/compiler-runtime.js +14 -0
  21. package/index.js +1 -1
  22. package/jsx-dev-runtime.js +1 -1
  23. package/jsx-dev-runtime.react-server.js +7 -0
  24. package/jsx-runtime.js +1 -1
  25. package/jsx-runtime.react-server.js +7 -0
  26. package/package.json +19 -15
  27. package/react.react-server.js +7 -0
  28. package/cjs/react-jsx-dev-runtime.production.min.js +0 -10
  29. package/cjs/react-jsx-dev-runtime.profiling.min.js +0 -10
  30. package/cjs/react-jsx-runtime.production.min.js +0 -11
  31. package/cjs/react-jsx-runtime.profiling.min.js +0 -11
  32. package/cjs/react.production.min.js +0 -26
  33. package/cjs/react.shared-subset.development.js +0 -20
  34. package/cjs/react.shared-subset.production.min.js +0 -10
  35. package/react.shared-subset.js +0 -7
  36. package/umd/react.development.js +0 -3342
  37. package/umd/react.production.min.js +0 -31
  38. package/umd/react.profiling.min.js +0 -31
@@ -0,0 +1,848 @@
1
+ /**
2
+ * @license React
3
+ * react.react-server.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 noop() {}
15
+ function getIteratorFn(maybeIterable) {
16
+ if (null === maybeIterable || "object" !== typeof maybeIterable)
17
+ return null;
18
+ maybeIterable =
19
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
20
+ maybeIterable["@@iterator"];
21
+ return "function" === typeof maybeIterable ? maybeIterable : null;
22
+ }
23
+ function testStringCoercion(value) {
24
+ return "" + value;
25
+ }
26
+ function checkKeyStringCoercion(value) {
27
+ try {
28
+ testStringCoercion(value);
29
+ var JSCompiler_inline_result = !1;
30
+ } catch (e) {
31
+ JSCompiler_inline_result = !0;
32
+ }
33
+ if (JSCompiler_inline_result) {
34
+ JSCompiler_inline_result = console;
35
+ var JSCompiler_temp_const = JSCompiler_inline_result.error;
36
+ var JSCompiler_inline_result$jscomp$0 =
37
+ ("function" === typeof Symbol &&
38
+ Symbol.toStringTag &&
39
+ value[Symbol.toStringTag]) ||
40
+ value.constructor.name ||
41
+ "Object";
42
+ JSCompiler_temp_const.call(
43
+ JSCompiler_inline_result,
44
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
45
+ JSCompiler_inline_result$jscomp$0
46
+ );
47
+ return testStringCoercion(value);
48
+ }
49
+ }
50
+ function getComponentNameFromType(type) {
51
+ if (null == type) return null;
52
+ if ("function" === typeof type)
53
+ return type.$$typeof === REACT_CLIENT_REFERENCE
54
+ ? null
55
+ : type.displayName || type.name || null;
56
+ if ("string" === typeof type) return type;
57
+ switch (type) {
58
+ case REACT_FRAGMENT_TYPE:
59
+ return "Fragment";
60
+ case REACT_PROFILER_TYPE:
61
+ return "Profiler";
62
+ case REACT_STRICT_MODE_TYPE:
63
+ return "StrictMode";
64
+ case REACT_SUSPENSE_TYPE:
65
+ return "Suspense";
66
+ case REACT_SUSPENSE_LIST_TYPE:
67
+ return "SuspenseList";
68
+ case REACT_ACTIVITY_TYPE:
69
+ return "Activity";
70
+ }
71
+ if ("object" === typeof type)
72
+ switch (
73
+ ("number" === typeof type.tag &&
74
+ console.error(
75
+ "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
76
+ ),
77
+ type.$$typeof)
78
+ ) {
79
+ case REACT_PORTAL_TYPE:
80
+ return "Portal";
81
+ case REACT_CONTEXT_TYPE:
82
+ return type.displayName || "Context";
83
+ case REACT_CONSUMER_TYPE:
84
+ return (type._context.displayName || "Context") + ".Consumer";
85
+ case REACT_FORWARD_REF_TYPE:
86
+ var innerType = type.render;
87
+ type = type.displayName;
88
+ type ||
89
+ ((type = innerType.displayName || innerType.name || ""),
90
+ (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
91
+ return type;
92
+ case REACT_MEMO_TYPE:
93
+ return (
94
+ (innerType = type.displayName || null),
95
+ null !== innerType
96
+ ? innerType
97
+ : getComponentNameFromType(type.type) || "Memo"
98
+ );
99
+ case REACT_LAZY_TYPE:
100
+ innerType = type._payload;
101
+ type = type._init;
102
+ try {
103
+ return getComponentNameFromType(type(innerType));
104
+ } catch (x) {}
105
+ }
106
+ return null;
107
+ }
108
+ function getTaskName(type) {
109
+ if (type === REACT_FRAGMENT_TYPE) return "<>";
110
+ if (
111
+ "object" === typeof type &&
112
+ null !== type &&
113
+ type.$$typeof === REACT_LAZY_TYPE
114
+ )
115
+ return "<...>";
116
+ try {
117
+ var name = getComponentNameFromType(type);
118
+ return name ? "<" + name + ">" : "<...>";
119
+ } catch (x) {
120
+ return "<...>";
121
+ }
122
+ }
123
+ function getOwner() {
124
+ var dispatcher = ReactSharedInternals.A;
125
+ return null === dispatcher ? null : dispatcher.getOwner();
126
+ }
127
+ function UnknownOwner() {
128
+ return Error("react-stack-top-frame");
129
+ }
130
+ function hasValidKey(config) {
131
+ if (hasOwnProperty.call(config, "key")) {
132
+ var getter = Object.getOwnPropertyDescriptor(config, "key").get;
133
+ if (getter && getter.isReactWarning) return !1;
134
+ }
135
+ return void 0 !== config.key;
136
+ }
137
+ function defineKeyPropWarningGetter(props, displayName) {
138
+ function warnAboutAccessingKey() {
139
+ specialPropKeyWarningShown ||
140
+ ((specialPropKeyWarningShown = !0),
141
+ console.error(
142
+ "%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)",
143
+ displayName
144
+ ));
145
+ }
146
+ warnAboutAccessingKey.isReactWarning = !0;
147
+ Object.defineProperty(props, "key", {
148
+ get: warnAboutAccessingKey,
149
+ configurable: !0
150
+ });
151
+ }
152
+ function elementRefGetterWithDeprecationWarning() {
153
+ var componentName = getComponentNameFromType(this.type);
154
+ didWarnAboutElementRef[componentName] ||
155
+ ((didWarnAboutElementRef[componentName] = !0),
156
+ console.error(
157
+ "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."
158
+ ));
159
+ componentName = this.props.ref;
160
+ return void 0 !== componentName ? componentName : null;
161
+ }
162
+ function ReactElement(type, key, props, owner, debugStack, debugTask) {
163
+ var refProp = props.ref;
164
+ type = {
165
+ $$typeof: REACT_ELEMENT_TYPE,
166
+ type: type,
167
+ key: key,
168
+ props: props,
169
+ _owner: owner
170
+ };
171
+ null !== (void 0 !== refProp ? refProp : null)
172
+ ? Object.defineProperty(type, "ref", {
173
+ enumerable: !1,
174
+ get: elementRefGetterWithDeprecationWarning
175
+ })
176
+ : Object.defineProperty(type, "ref", { enumerable: !1, value: null });
177
+ type._store = {};
178
+ Object.defineProperty(type._store, "validated", {
179
+ configurable: !1,
180
+ enumerable: !1,
181
+ writable: !0,
182
+ value: 0
183
+ });
184
+ Object.defineProperty(type, "_debugInfo", {
185
+ configurable: !1,
186
+ enumerable: !1,
187
+ writable: !0,
188
+ value: null
189
+ });
190
+ Object.defineProperty(type, "_debugStack", {
191
+ configurable: !1,
192
+ enumerable: !1,
193
+ writable: !0,
194
+ value: debugStack
195
+ });
196
+ Object.defineProperty(type, "_debugTask", {
197
+ configurable: !1,
198
+ enumerable: !1,
199
+ writable: !0,
200
+ value: debugTask
201
+ });
202
+ Object.freeze && (Object.freeze(type.props), Object.freeze(type));
203
+ return type;
204
+ }
205
+ function cloneAndReplaceKey(oldElement, newKey) {
206
+ newKey = ReactElement(
207
+ oldElement.type,
208
+ newKey,
209
+ oldElement.props,
210
+ oldElement._owner,
211
+ oldElement._debugStack,
212
+ oldElement._debugTask
213
+ );
214
+ oldElement._store &&
215
+ (newKey._store.validated = oldElement._store.validated);
216
+ return newKey;
217
+ }
218
+ function validateChildKeys(node) {
219
+ isValidElement(node)
220
+ ? node._store && (node._store.validated = 1)
221
+ : "object" === typeof node &&
222
+ null !== node &&
223
+ node.$$typeof === REACT_LAZY_TYPE &&
224
+ ("fulfilled" === node._payload.status
225
+ ? isValidElement(node._payload.value) &&
226
+ node._payload.value._store &&
227
+ (node._payload.value._store.validated = 1)
228
+ : node._store && (node._store.validated = 1));
229
+ }
230
+ function isValidElement(object) {
231
+ return (
232
+ "object" === typeof object &&
233
+ null !== object &&
234
+ object.$$typeof === REACT_ELEMENT_TYPE
235
+ );
236
+ }
237
+ function escape(key) {
238
+ var escaperLookup = { "=": "=0", ":": "=2" };
239
+ return (
240
+ "$" +
241
+ key.replace(/[=:]/g, function (match) {
242
+ return escaperLookup[match];
243
+ })
244
+ );
245
+ }
246
+ function getElementKey(element, index) {
247
+ return "object" === typeof element &&
248
+ null !== element &&
249
+ null != element.key
250
+ ? (checkKeyStringCoercion(element.key), escape("" + element.key))
251
+ : index.toString(36);
252
+ }
253
+ function resolveThenable(thenable) {
254
+ switch (thenable.status) {
255
+ case "fulfilled":
256
+ return thenable.value;
257
+ case "rejected":
258
+ throw thenable.reason;
259
+ default:
260
+ switch (
261
+ ("string" === typeof thenable.status
262
+ ? thenable.then(noop, noop)
263
+ : ((thenable.status = "pending"),
264
+ thenable.then(
265
+ function (fulfilledValue) {
266
+ "pending" === thenable.status &&
267
+ ((thenable.status = "fulfilled"),
268
+ (thenable.value = fulfilledValue));
269
+ },
270
+ function (error) {
271
+ "pending" === thenable.status &&
272
+ ((thenable.status = "rejected"),
273
+ (thenable.reason = error));
274
+ }
275
+ )),
276
+ thenable.status)
277
+ ) {
278
+ case "fulfilled":
279
+ return thenable.value;
280
+ case "rejected":
281
+ throw thenable.reason;
282
+ }
283
+ }
284
+ throw thenable;
285
+ }
286
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
287
+ var type = typeof children;
288
+ if ("undefined" === type || "boolean" === type) children = null;
289
+ var invokeCallback = !1;
290
+ if (null === children) invokeCallback = !0;
291
+ else
292
+ switch (type) {
293
+ case "bigint":
294
+ case "string":
295
+ case "number":
296
+ invokeCallback = !0;
297
+ break;
298
+ case "object":
299
+ switch (children.$$typeof) {
300
+ case REACT_ELEMENT_TYPE:
301
+ case REACT_PORTAL_TYPE:
302
+ invokeCallback = !0;
303
+ break;
304
+ case REACT_LAZY_TYPE:
305
+ return (
306
+ (invokeCallback = children._init),
307
+ mapIntoArray(
308
+ invokeCallback(children._payload),
309
+ array,
310
+ escapedPrefix,
311
+ nameSoFar,
312
+ callback
313
+ )
314
+ );
315
+ }
316
+ }
317
+ if (invokeCallback) {
318
+ invokeCallback = children;
319
+ callback = callback(invokeCallback);
320
+ var childKey =
321
+ "" === nameSoFar ? "." + getElementKey(invokeCallback, 0) : nameSoFar;
322
+ isArrayImpl(callback)
323
+ ? ((escapedPrefix = ""),
324
+ null != childKey &&
325
+ (escapedPrefix =
326
+ childKey.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
327
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
328
+ return c;
329
+ }))
330
+ : null != callback &&
331
+ (isValidElement(callback) &&
332
+ (null != callback.key &&
333
+ ((invokeCallback && invokeCallback.key === callback.key) ||
334
+ checkKeyStringCoercion(callback.key)),
335
+ (escapedPrefix = cloneAndReplaceKey(
336
+ callback,
337
+ escapedPrefix +
338
+ (null == callback.key ||
339
+ (invokeCallback && invokeCallback.key === callback.key)
340
+ ? ""
341
+ : ("" + callback.key).replace(
342
+ userProvidedKeyEscapeRegex,
343
+ "$&/"
344
+ ) + "/") +
345
+ childKey
346
+ )),
347
+ "" !== nameSoFar &&
348
+ null != invokeCallback &&
349
+ isValidElement(invokeCallback) &&
350
+ null == invokeCallback.key &&
351
+ invokeCallback._store &&
352
+ !invokeCallback._store.validated &&
353
+ (escapedPrefix._store.validated = 2),
354
+ (callback = escapedPrefix)),
355
+ array.push(callback));
356
+ return 1;
357
+ }
358
+ invokeCallback = 0;
359
+ childKey = "" === nameSoFar ? "." : nameSoFar + ":";
360
+ if (isArrayImpl(children))
361
+ for (var i = 0; i < children.length; i++)
362
+ (nameSoFar = children[i]),
363
+ (type = childKey + getElementKey(nameSoFar, i)),
364
+ (invokeCallback += mapIntoArray(
365
+ nameSoFar,
366
+ array,
367
+ escapedPrefix,
368
+ type,
369
+ callback
370
+ ));
371
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
372
+ for (
373
+ i === children.entries &&
374
+ (didWarnAboutMaps ||
375
+ console.warn(
376
+ "Using Maps as children is not supported. Use an array of keyed ReactElements instead."
377
+ ),
378
+ (didWarnAboutMaps = !0)),
379
+ children = i.call(children),
380
+ i = 0;
381
+ !(nameSoFar = children.next()).done;
382
+
383
+ )
384
+ (nameSoFar = nameSoFar.value),
385
+ (type = childKey + getElementKey(nameSoFar, i++)),
386
+ (invokeCallback += mapIntoArray(
387
+ nameSoFar,
388
+ array,
389
+ escapedPrefix,
390
+ type,
391
+ callback
392
+ ));
393
+ else if ("object" === type) {
394
+ if ("function" === typeof children.then)
395
+ return mapIntoArray(
396
+ resolveThenable(children),
397
+ array,
398
+ escapedPrefix,
399
+ nameSoFar,
400
+ callback
401
+ );
402
+ array = String(children);
403
+ throw Error(
404
+ "Objects are not valid as a React child (found: " +
405
+ ("[object Object]" === array
406
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
407
+ : array) +
408
+ "). If you meant to render a collection of children, use an array instead."
409
+ );
410
+ }
411
+ return invokeCallback;
412
+ }
413
+ function mapChildren(children, func, context) {
414
+ if (null == children) return children;
415
+ var result = [],
416
+ count = 0;
417
+ mapIntoArray(children, result, "", "", function (child) {
418
+ return func.call(context, child, count++);
419
+ });
420
+ return result;
421
+ }
422
+ function resolveDispatcher() {
423
+ var dispatcher = ReactSharedInternals.H;
424
+ null === dispatcher &&
425
+ console.error(
426
+ "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."
427
+ );
428
+ return dispatcher;
429
+ }
430
+ function lazyInitializer(payload) {
431
+ if (-1 === payload._status) {
432
+ var ioInfo = payload._ioInfo;
433
+ null != ioInfo && (ioInfo.start = ioInfo.end = performance.now());
434
+ ioInfo = payload._result;
435
+ var thenable = ioInfo();
436
+ thenable.then(
437
+ function (moduleObject) {
438
+ if (0 === payload._status || -1 === payload._status) {
439
+ payload._status = 1;
440
+ payload._result = moduleObject;
441
+ var _ioInfo = payload._ioInfo;
442
+ null != _ioInfo && (_ioInfo.end = performance.now());
443
+ void 0 === thenable.status &&
444
+ ((thenable.status = "fulfilled"),
445
+ (thenable.value = moduleObject));
446
+ }
447
+ },
448
+ function (error) {
449
+ if (0 === payload._status || -1 === payload._status) {
450
+ payload._status = 2;
451
+ payload._result = error;
452
+ var _ioInfo2 = payload._ioInfo;
453
+ null != _ioInfo2 && (_ioInfo2.end = performance.now());
454
+ void 0 === thenable.status &&
455
+ ((thenable.status = "rejected"), (thenable.reason = error));
456
+ }
457
+ }
458
+ );
459
+ ioInfo = payload._ioInfo;
460
+ if (null != ioInfo) {
461
+ ioInfo.value = thenable;
462
+ var displayName = thenable.displayName;
463
+ "string" === typeof displayName && (ioInfo.name = displayName);
464
+ }
465
+ -1 === payload._status &&
466
+ ((payload._status = 0), (payload._result = thenable));
467
+ }
468
+ if (1 === payload._status)
469
+ return (
470
+ (ioInfo = payload._result),
471
+ void 0 === ioInfo &&
472
+ console.error(
473
+ "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?",
474
+ ioInfo
475
+ ),
476
+ "default" in ioInfo ||
477
+ console.error(
478
+ "lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
479
+ ioInfo
480
+ ),
481
+ ioInfo.default
482
+ );
483
+ throw payload._result;
484
+ }
485
+ function createCacheRoot() {
486
+ return new WeakMap();
487
+ }
488
+ function createCacheNode() {
489
+ return { s: 0, v: void 0, o: null, p: null };
490
+ }
491
+ var ReactSharedInternals = {
492
+ H: null,
493
+ A: null,
494
+ getCurrentStack: null,
495
+ recentlyCreatedOwnerStacks: 0
496
+ },
497
+ isArrayImpl = Array.isArray,
498
+ REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
499
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
500
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
501
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
502
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
503
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
504
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
505
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
506
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
507
+ REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
508
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
509
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
510
+ REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
511
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator,
512
+ REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
513
+ hasOwnProperty = Object.prototype.hasOwnProperty,
514
+ assign = Object.assign,
515
+ createTask = console.createTask
516
+ ? console.createTask
517
+ : function () {
518
+ return null;
519
+ },
520
+ createFakeCallStack = {
521
+ react_stack_bottom_frame: function (callStackForError) {
522
+ return callStackForError();
523
+ }
524
+ },
525
+ specialPropKeyWarningShown,
526
+ didWarnAboutOldJSXRuntime;
527
+ var didWarnAboutElementRef = {};
528
+ var unknownOwnerDebugStack =
529
+ createFakeCallStack.react_stack_bottom_frame.bind(
530
+ createFakeCallStack,
531
+ UnknownOwner
532
+ )();
533
+ var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
534
+ var didWarnAboutMaps = !1,
535
+ userProvidedKeyEscapeRegex = /\/+/g;
536
+ exports.Children = {
537
+ map: mapChildren,
538
+ forEach: function (children, forEachFunc, forEachContext) {
539
+ mapChildren(
540
+ children,
541
+ function () {
542
+ forEachFunc.apply(this, arguments);
543
+ },
544
+ forEachContext
545
+ );
546
+ },
547
+ count: function (children) {
548
+ var n = 0;
549
+ mapChildren(children, function () {
550
+ n++;
551
+ });
552
+ return n;
553
+ },
554
+ toArray: function (children) {
555
+ return (
556
+ mapChildren(children, function (child) {
557
+ return child;
558
+ }) || []
559
+ );
560
+ },
561
+ only: function (children) {
562
+ if (!isValidElement(children))
563
+ throw Error(
564
+ "React.Children.only expected to receive a single React element child."
565
+ );
566
+ return children;
567
+ }
568
+ };
569
+ exports.Fragment = REACT_FRAGMENT_TYPE;
570
+ exports.Profiler = REACT_PROFILER_TYPE;
571
+ exports.StrictMode = REACT_STRICT_MODE_TYPE;
572
+ exports.Suspense = REACT_SUSPENSE_TYPE;
573
+ exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
574
+ ReactSharedInternals;
575
+ exports.cache = function (fn) {
576
+ return function () {
577
+ var dispatcher = ReactSharedInternals.A;
578
+ if (!dispatcher) return fn.apply(null, arguments);
579
+ var fnMap = dispatcher.getCacheForType(createCacheRoot);
580
+ dispatcher = fnMap.get(fn);
581
+ void 0 === dispatcher &&
582
+ ((dispatcher = createCacheNode()), fnMap.set(fn, dispatcher));
583
+ fnMap = 0;
584
+ for (var l = arguments.length; fnMap < l; fnMap++) {
585
+ var arg = arguments[fnMap];
586
+ if (
587
+ "function" === typeof arg ||
588
+ ("object" === typeof arg && null !== arg)
589
+ ) {
590
+ var objectCache = dispatcher.o;
591
+ null === objectCache &&
592
+ (dispatcher.o = objectCache = new WeakMap());
593
+ dispatcher = objectCache.get(arg);
594
+ void 0 === dispatcher &&
595
+ ((dispatcher = createCacheNode()),
596
+ objectCache.set(arg, dispatcher));
597
+ } else
598
+ (objectCache = dispatcher.p),
599
+ null === objectCache && (dispatcher.p = objectCache = new Map()),
600
+ (dispatcher = objectCache.get(arg)),
601
+ void 0 === dispatcher &&
602
+ ((dispatcher = createCacheNode()),
603
+ objectCache.set(arg, dispatcher));
604
+ }
605
+ if (1 === dispatcher.s) return dispatcher.v;
606
+ if (2 === dispatcher.s) throw dispatcher.v;
607
+ try {
608
+ var result = fn.apply(null, arguments);
609
+ fnMap = dispatcher;
610
+ fnMap.s = 1;
611
+ return (fnMap.v = result);
612
+ } catch (error) {
613
+ throw (
614
+ ((result = dispatcher), (result.s = 2), (result.v = error), error)
615
+ );
616
+ }
617
+ };
618
+ };
619
+ exports.cacheSignal = function () {
620
+ var dispatcher = ReactSharedInternals.A;
621
+ return dispatcher ? dispatcher.cacheSignal() : null;
622
+ };
623
+ exports.captureOwnerStack = function () {
624
+ var getCurrentStack = ReactSharedInternals.getCurrentStack;
625
+ return null === getCurrentStack ? null : getCurrentStack();
626
+ };
627
+ exports.cloneElement = function (element, config, children) {
628
+ if (null === element || void 0 === element)
629
+ throw Error(
630
+ "The argument must be a React element, but you passed " +
631
+ element +
632
+ "."
633
+ );
634
+ var props = assign({}, element.props),
635
+ key = element.key,
636
+ owner = element._owner;
637
+ if (null != config) {
638
+ var JSCompiler_inline_result;
639
+ a: {
640
+ if (
641
+ hasOwnProperty.call(config, "ref") &&
642
+ (JSCompiler_inline_result = Object.getOwnPropertyDescriptor(
643
+ config,
644
+ "ref"
645
+ ).get) &&
646
+ JSCompiler_inline_result.isReactWarning
647
+ ) {
648
+ JSCompiler_inline_result = !1;
649
+ break a;
650
+ }
651
+ JSCompiler_inline_result = void 0 !== config.ref;
652
+ }
653
+ JSCompiler_inline_result && (owner = getOwner());
654
+ hasValidKey(config) &&
655
+ (checkKeyStringCoercion(config.key), (key = "" + config.key));
656
+ for (propName in config)
657
+ !hasOwnProperty.call(config, propName) ||
658
+ "key" === propName ||
659
+ "__self" === propName ||
660
+ "__source" === propName ||
661
+ ("ref" === propName && void 0 === config.ref) ||
662
+ (props[propName] = config[propName]);
663
+ }
664
+ var propName = arguments.length - 2;
665
+ if (1 === propName) props.children = children;
666
+ else if (1 < propName) {
667
+ JSCompiler_inline_result = Array(propName);
668
+ for (var i = 0; i < propName; i++)
669
+ JSCompiler_inline_result[i] = arguments[i + 2];
670
+ props.children = JSCompiler_inline_result;
671
+ }
672
+ props = ReactElement(
673
+ element.type,
674
+ key,
675
+ props,
676
+ owner,
677
+ element._debugStack,
678
+ element._debugTask
679
+ );
680
+ for (key = 2; key < arguments.length; key++)
681
+ validateChildKeys(arguments[key]);
682
+ return props;
683
+ };
684
+ exports.createElement = function (type, config, children) {
685
+ for (var i = 2; i < arguments.length; i++)
686
+ validateChildKeys(arguments[i]);
687
+ i = {};
688
+ var key = null;
689
+ if (null != config)
690
+ for (propName in (didWarnAboutOldJSXRuntime ||
691
+ !("__self" in config) ||
692
+ "key" in config ||
693
+ ((didWarnAboutOldJSXRuntime = !0),
694
+ console.warn(
695
+ "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"
696
+ )),
697
+ hasValidKey(config) &&
698
+ (checkKeyStringCoercion(config.key), (key = "" + config.key)),
699
+ config))
700
+ hasOwnProperty.call(config, propName) &&
701
+ "key" !== propName &&
702
+ "__self" !== propName &&
703
+ "__source" !== propName &&
704
+ (i[propName] = config[propName]);
705
+ var childrenLength = arguments.length - 2;
706
+ if (1 === childrenLength) i.children = children;
707
+ else if (1 < childrenLength) {
708
+ for (
709
+ var childArray = Array(childrenLength), _i = 0;
710
+ _i < childrenLength;
711
+ _i++
712
+ )
713
+ childArray[_i] = arguments[_i + 2];
714
+ Object.freeze && Object.freeze(childArray);
715
+ i.children = childArray;
716
+ }
717
+ if (type && type.defaultProps)
718
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
719
+ void 0 === i[propName] && (i[propName] = childrenLength[propName]);
720
+ key &&
721
+ defineKeyPropWarningGetter(
722
+ i,
723
+ "function" === typeof type
724
+ ? type.displayName || type.name || "Unknown"
725
+ : type
726
+ );
727
+ var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
728
+ return ReactElement(
729
+ type,
730
+ key,
731
+ i,
732
+ getOwner(),
733
+ propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
734
+ propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
735
+ );
736
+ };
737
+ exports.createRef = function () {
738
+ var refObject = { current: null };
739
+ Object.seal(refObject);
740
+ return refObject;
741
+ };
742
+ exports.forwardRef = function (render) {
743
+ null != render && render.$$typeof === REACT_MEMO_TYPE
744
+ ? console.error(
745
+ "forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."
746
+ )
747
+ : "function" !== typeof render
748
+ ? console.error(
749
+ "forwardRef requires a render function but was given %s.",
750
+ null === render ? "null" : typeof render
751
+ )
752
+ : 0 !== render.length &&
753
+ 2 !== render.length &&
754
+ console.error(
755
+ "forwardRef render functions accept exactly two parameters: props and ref. %s",
756
+ 1 === render.length
757
+ ? "Did you forget to use the ref parameter?"
758
+ : "Any additional parameter will be undefined."
759
+ );
760
+ null != render &&
761
+ null != render.defaultProps &&
762
+ console.error(
763
+ "forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?"
764
+ );
765
+ var elementType = { $$typeof: REACT_FORWARD_REF_TYPE, render: render },
766
+ ownName;
767
+ Object.defineProperty(elementType, "displayName", {
768
+ enumerable: !1,
769
+ configurable: !0,
770
+ get: function () {
771
+ return ownName;
772
+ },
773
+ set: function (name) {
774
+ ownName = name;
775
+ render.name ||
776
+ render.displayName ||
777
+ (Object.defineProperty(render, "name", { value: name }),
778
+ (render.displayName = name));
779
+ }
780
+ });
781
+ return elementType;
782
+ };
783
+ exports.isValidElement = isValidElement;
784
+ exports.lazy = function (ctor) {
785
+ ctor = { _status: -1, _result: ctor };
786
+ var lazyType = {
787
+ $$typeof: REACT_LAZY_TYPE,
788
+ _payload: ctor,
789
+ _init: lazyInitializer
790
+ },
791
+ ioInfo = {
792
+ name: "lazy",
793
+ start: -1,
794
+ end: -1,
795
+ value: null,
796
+ owner: null,
797
+ debugStack: Error("react-stack-top-frame"),
798
+ debugTask: console.createTask ? console.createTask("lazy()") : null
799
+ };
800
+ ctor._ioInfo = ioInfo;
801
+ lazyType._debugInfo = [{ awaited: ioInfo }];
802
+ return lazyType;
803
+ };
804
+ exports.memo = function (type, compare) {
805
+ null == type &&
806
+ console.error(
807
+ "memo: The first argument must be a component. Instead received: %s",
808
+ null === type ? "null" : typeof type
809
+ );
810
+ compare = {
811
+ $$typeof: REACT_MEMO_TYPE,
812
+ type: type,
813
+ compare: void 0 === compare ? null : compare
814
+ };
815
+ var ownName;
816
+ Object.defineProperty(compare, "displayName", {
817
+ enumerable: !1,
818
+ configurable: !0,
819
+ get: function () {
820
+ return ownName;
821
+ },
822
+ set: function (name) {
823
+ ownName = name;
824
+ type.name ||
825
+ type.displayName ||
826
+ (Object.defineProperty(type, "name", { value: name }),
827
+ (type.displayName = name));
828
+ }
829
+ });
830
+ return compare;
831
+ };
832
+ exports.use = function (usable) {
833
+ return resolveDispatcher().use(usable);
834
+ };
835
+ exports.useCallback = function (callback, deps) {
836
+ return resolveDispatcher().useCallback(callback, deps);
837
+ };
838
+ exports.useDebugValue = function (value, formatterFn) {
839
+ return resolveDispatcher().useDebugValue(value, formatterFn);
840
+ };
841
+ exports.useId = function () {
842
+ return resolveDispatcher().useId();
843
+ };
844
+ exports.useMemo = function (create, deps) {
845
+ return resolveDispatcher().useMemo(create, deps);
846
+ };
847
+ exports.version = "19.2.4";
848
+ })();