react 19.0.0-canary-cb151849e1-20240424 → 19.0.0-rc-915b914b3a-20240515

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.
@@ -0,0 +1,1318 @@
1
+ /**
2
+ * @license React
3
+ * react-jsx-dev-runtime.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
+
13
+ if (process.env.NODE_ENV !== "production") {
14
+ (function() {
15
+ 'use strict';
16
+
17
+ var React = require('react');
18
+
19
+ // -----------------------------------------------------------------------------
20
+
21
+ var enableScopeAPI = false; // Experimental Create Event Handle API.
22
+ var enableTransitionTracing = false; // No known bugs, but needs performance testing
23
+
24
+ var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
25
+ // as a normal prop instead of stripping it from the props object.
26
+ // Passes `ref` as a normal prop instead of stripping it from the props object
27
+ // during element creation.
28
+
29
+ var enableRefAsProp = true;
30
+
31
+ var enableRenderableContext = true; // Enables the `initialValue` option for `useDeferredValue`
32
+ // stuff. Intended to enable React core members to more easily debug scheduling
33
+ // issues in DEV builds.
34
+
35
+ var enableDebugTracing = false;
36
+
37
+ var REACT_ELEMENT_TYPE = Symbol.for('react.transitional.element') ;
38
+ var REACT_PORTAL_TYPE = Symbol.for('react.portal');
39
+ var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
40
+ var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
41
+ var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
42
+ var REACT_PROVIDER_TYPE = Symbol.for('react.provider'); // TODO: Delete with enableRenderableContext
43
+
44
+ var REACT_CONSUMER_TYPE = Symbol.for('react.consumer');
45
+ var REACT_CONTEXT_TYPE = Symbol.for('react.context');
46
+ var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
47
+ var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
48
+ var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
49
+ var REACT_MEMO_TYPE = Symbol.for('react.memo');
50
+ var REACT_LAZY_TYPE = Symbol.for('react.lazy');
51
+ var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
52
+ var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
53
+ var FAUX_ITERATOR_SYMBOL = '@@iterator';
54
+ function getIteratorFn(maybeIterable) {
55
+ if (maybeIterable === null || typeof maybeIterable !== 'object') {
56
+ return null;
57
+ }
58
+
59
+ var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
60
+
61
+ if (typeof maybeIterator === 'function') {
62
+ return maybeIterator;
63
+ }
64
+
65
+ return null;
66
+ }
67
+
68
+ var ReactSharedInternalsServer = // $FlowFixMe: It's defined in the one we resolve to.
69
+ React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
70
+
71
+ if (!ReactSharedInternalsServer) {
72
+ throw new Error('The "react" package in this environment is not configured correctly. ' + 'The "react-server" condition must be enabled in any environment that ' + 'runs React Server Components.');
73
+ }
74
+
75
+ function error(format) {
76
+ {
77
+ {
78
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
79
+ args[_key2 - 1] = arguments[_key2];
80
+ }
81
+
82
+ printWarning('error', format, args);
83
+ }
84
+ }
85
+ }
86
+
87
+ function printWarning(level, format, args) {
88
+ // When changing this logic, you might want to also
89
+ // update consoleWithStackDev.www.js as well.
90
+ {
91
+ var stack = ReactSharedInternalsServer.getStackAddendum();
92
+
93
+ if (stack !== '') {
94
+ format += '%s';
95
+ args = args.concat([stack]);
96
+ } // eslint-disable-next-line react-internal/safe-string-coercion
97
+
98
+
99
+ var argsWithFormat = args.map(function (item) {
100
+ return String(item);
101
+ }); // Careful: RN currently depends on this prefix
102
+
103
+ argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
104
+ // breaks IE9: https://github.com/facebook/react/issues/13610
105
+ // eslint-disable-next-line react-internal/no-production-logging
106
+
107
+ Function.prototype.apply.call(console[level], console, argsWithFormat);
108
+ }
109
+ }
110
+
111
+ function getWrappedName(outerType, innerType, wrapperName) {
112
+ var displayName = outerType.displayName;
113
+
114
+ if (displayName) {
115
+ return displayName;
116
+ }
117
+
118
+ var functionName = innerType.displayName || innerType.name || '';
119
+ return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
120
+ } // Keep in sync with react-reconciler/getComponentNameFromFiber
121
+
122
+
123
+ function getContextName(type) {
124
+ return type.displayName || 'Context';
125
+ }
126
+
127
+ var REACT_CLIENT_REFERENCE$2 = Symbol.for('react.client.reference'); // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
128
+
129
+ function getComponentNameFromType(type) {
130
+ if (type == null) {
131
+ // Host root, text node or just invalid type.
132
+ return null;
133
+ }
134
+
135
+ if (typeof type === 'function') {
136
+ if (type.$$typeof === REACT_CLIENT_REFERENCE$2) {
137
+ // TODO: Create a convention for naming client references with debug info.
138
+ return null;
139
+ }
140
+
141
+ return type.displayName || type.name || null;
142
+ }
143
+
144
+ if (typeof type === 'string') {
145
+ return type;
146
+ }
147
+
148
+ switch (type) {
149
+ case REACT_FRAGMENT_TYPE:
150
+ return 'Fragment';
151
+
152
+ case REACT_PORTAL_TYPE:
153
+ return 'Portal';
154
+
155
+ case REACT_PROFILER_TYPE:
156
+ return 'Profiler';
157
+
158
+ case REACT_STRICT_MODE_TYPE:
159
+ return 'StrictMode';
160
+
161
+ case REACT_SUSPENSE_TYPE:
162
+ return 'Suspense';
163
+
164
+ case REACT_SUSPENSE_LIST_TYPE:
165
+ return 'SuspenseList';
166
+
167
+ }
168
+
169
+ if (typeof type === 'object') {
170
+ {
171
+ if (typeof type.tag === 'number') {
172
+ error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
173
+ }
174
+ }
175
+
176
+ switch (type.$$typeof) {
177
+ case REACT_PROVIDER_TYPE:
178
+ {
179
+ return null;
180
+ }
181
+
182
+ case REACT_CONTEXT_TYPE:
183
+ var context = type;
184
+
185
+ {
186
+ return getContextName(context) + '.Provider';
187
+ }
188
+
189
+ case REACT_CONSUMER_TYPE:
190
+ {
191
+ var consumer = type;
192
+ return getContextName(consumer._context) + '.Consumer';
193
+ }
194
+
195
+ case REACT_FORWARD_REF_TYPE:
196
+ return getWrappedName(type, type.render, 'ForwardRef');
197
+
198
+ case REACT_MEMO_TYPE:
199
+ var outerName = type.displayName || null;
200
+
201
+ if (outerName !== null) {
202
+ return outerName;
203
+ }
204
+
205
+ return getComponentNameFromType(type.type) || 'Memo';
206
+
207
+ case REACT_LAZY_TYPE:
208
+ {
209
+ var lazyComponent = type;
210
+ var payload = lazyComponent._payload;
211
+ var init = lazyComponent._init;
212
+
213
+ try {
214
+ return getComponentNameFromType(init(payload));
215
+ } catch (x) {
216
+ return null;
217
+ }
218
+ }
219
+ }
220
+ }
221
+
222
+ return null;
223
+ }
224
+
225
+ // $FlowFixMe[method-unbinding]
226
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
227
+
228
+ var assign = Object.assign;
229
+
230
+ /*
231
+ * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
232
+ * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
233
+ *
234
+ * The functions in this module will throw an easier-to-understand,
235
+ * easier-to-debug exception with a clear errors message message explaining the
236
+ * problem. (Instead of a confusing exception thrown inside the implementation
237
+ * of the `value` object).
238
+ */
239
+ // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
240
+ function typeName(value) {
241
+ {
242
+ // toStringTag is needed for namespaced types like Temporal.Instant
243
+ var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
244
+ var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]
245
+
246
+ return type;
247
+ }
248
+ } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
249
+
250
+
251
+ function willCoercionThrow(value) {
252
+ {
253
+ try {
254
+ testStringCoercion(value);
255
+ return false;
256
+ } catch (e) {
257
+ return true;
258
+ }
259
+ }
260
+ }
261
+
262
+ function testStringCoercion(value) {
263
+ // If you ended up here by following an exception call stack, here's what's
264
+ // happened: you supplied an object or symbol value to React (as a prop, key,
265
+ // DOM attribute, CSS property, string ref, etc.) and when React tried to
266
+ // coerce it to a string using `'' + value`, an exception was thrown.
267
+ //
268
+ // The most common types that will cause this exception are `Symbol` instances
269
+ // and Temporal objects like `Temporal.Instant`. But any object that has a
270
+ // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
271
+ // exception. (Library authors do this to prevent users from using built-in
272
+ // numeric operators like `+` or comparison operators like `>=` because custom
273
+ // methods are needed to perform accurate arithmetic or comparison.)
274
+ //
275
+ // To fix the problem, coerce this object or symbol value to a string before
276
+ // passing it to React. The most reliable way is usually `String(value)`.
277
+ //
278
+ // To find which value is throwing, check the browser or debugger console.
279
+ // Before this exception was thrown, there should be `console.error` output
280
+ // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
281
+ // problem and how that type was used: key, atrribute, input value prop, etc.
282
+ // In most cases, this console output also shows the component and its
283
+ // ancestor components where the exception happened.
284
+ //
285
+ // eslint-disable-next-line react-internal/safe-string-coercion
286
+ return '' + value;
287
+ }
288
+ function checkKeyStringCoercion(value) {
289
+ {
290
+ if (willCoercionThrow(value)) {
291
+ error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));
292
+
293
+ return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
294
+ }
295
+ }
296
+ }
297
+
298
+ var REACT_CLIENT_REFERENCE$1 = Symbol.for('react.client.reference');
299
+ function isValidElementType(type) {
300
+ if (typeof type === 'string' || typeof type === 'function') {
301
+ return true;
302
+ } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
303
+
304
+
305
+ if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableTransitionTracing ) {
306
+ return true;
307
+ }
308
+
309
+ if (typeof type === 'object' && type !== null) {
310
+ if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || !enableRenderableContext || type.$$typeof === REACT_CONSUMER_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
311
+ // types supported by any Flight configuration anywhere since
312
+ // we don't know which Flight build this will end up being used
313
+ // with.
314
+ type.$$typeof === REACT_CLIENT_REFERENCE$1 || type.getModuleId !== undefined) {
315
+ return true;
316
+ }
317
+ }
318
+
319
+ return false;
320
+ }
321
+
322
+ var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
323
+
324
+ function isArray(a) {
325
+ return isArrayImpl(a);
326
+ }
327
+
328
+ // Helpers to patch console.logs to avoid logging during side-effect free
329
+ // replaying on render function. This currently only patches the object
330
+ // lazily which won't cover if the log function was extracted eagerly.
331
+ // We could also eagerly patch the method.
332
+ var disabledDepth = 0;
333
+ var prevLog;
334
+ var prevInfo;
335
+ var prevWarn;
336
+ var prevError;
337
+ var prevGroup;
338
+ var prevGroupCollapsed;
339
+ var prevGroupEnd;
340
+
341
+ function disabledLog() {}
342
+
343
+ disabledLog.__reactDisabledLog = true;
344
+ function disableLogs() {
345
+ {
346
+ if (disabledDepth === 0) {
347
+ /* eslint-disable react-internal/no-production-logging */
348
+ prevLog = console.log;
349
+ prevInfo = console.info;
350
+ prevWarn = console.warn;
351
+ prevError = console.error;
352
+ prevGroup = console.group;
353
+ prevGroupCollapsed = console.groupCollapsed;
354
+ prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
355
+
356
+ var props = {
357
+ configurable: true,
358
+ enumerable: true,
359
+ value: disabledLog,
360
+ writable: true
361
+ }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.
362
+
363
+ Object.defineProperties(console, {
364
+ info: props,
365
+ log: props,
366
+ warn: props,
367
+ error: props,
368
+ group: props,
369
+ groupCollapsed: props,
370
+ groupEnd: props
371
+ });
372
+ /* eslint-enable react-internal/no-production-logging */
373
+ }
374
+
375
+ disabledDepth++;
376
+ }
377
+ }
378
+ function reenableLogs() {
379
+ {
380
+ disabledDepth--;
381
+
382
+ if (disabledDepth === 0) {
383
+ /* eslint-disable react-internal/no-production-logging */
384
+ var props = {
385
+ configurable: true,
386
+ enumerable: true,
387
+ writable: true
388
+ }; // $FlowFixMe[cannot-write] Flow thinks console is immutable.
389
+
390
+ Object.defineProperties(console, {
391
+ log: assign({}, props, {
392
+ value: prevLog
393
+ }),
394
+ info: assign({}, props, {
395
+ value: prevInfo
396
+ }),
397
+ warn: assign({}, props, {
398
+ value: prevWarn
399
+ }),
400
+ error: assign({}, props, {
401
+ value: prevError
402
+ }),
403
+ group: assign({}, props, {
404
+ value: prevGroup
405
+ }),
406
+ groupCollapsed: assign({}, props, {
407
+ value: prevGroupCollapsed
408
+ }),
409
+ groupEnd: assign({}, props, {
410
+ value: prevGroupEnd
411
+ })
412
+ });
413
+ /* eslint-enable react-internal/no-production-logging */
414
+ }
415
+
416
+ if (disabledDepth < 0) {
417
+ error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
418
+ }
419
+ }
420
+ }
421
+
422
+ var prefix;
423
+ function describeBuiltInComponentFrame(name) {
424
+ {
425
+ if (prefix === undefined) {
426
+ // Extract the VM specific prefix used by each line.
427
+ try {
428
+ throw Error();
429
+ } catch (x) {
430
+ var match = x.stack.trim().match(/\n( *(at )?)/);
431
+ prefix = match && match[1] || '';
432
+ }
433
+ } // We use the prefix to ensure our stacks line up with native stack frames.
434
+
435
+
436
+ return '\n' + prefix + name;
437
+ }
438
+ }
439
+ var reentry = false;
440
+ var componentFrameCache;
441
+
442
+ {
443
+ var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
444
+ componentFrameCache = new PossiblyWeakMap();
445
+ }
446
+ /**
447
+ * Leverages native browser/VM stack frames to get proper details (e.g.
448
+ * filename, line + col number) for a single component in a component stack. We
449
+ * do this by:
450
+ * (1) throwing and catching an error in the function - this will be our
451
+ * control error.
452
+ * (2) calling the component which will eventually throw an error that we'll
453
+ * catch - this will be our sample error.
454
+ * (3) diffing the control and sample error stacks to find the stack frame
455
+ * which represents our component.
456
+ */
457
+
458
+
459
+ function describeNativeComponentFrame(fn, construct) {
460
+ // If something asked for a stack inside a fake render, it should get ignored.
461
+ if (!fn || reentry) {
462
+ return '';
463
+ }
464
+
465
+ {
466
+ var frame = componentFrameCache.get(fn);
467
+
468
+ if (frame !== undefined) {
469
+ return frame;
470
+ }
471
+ }
472
+
473
+ reentry = true;
474
+ var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe[incompatible-type] It does accept undefined.
475
+
476
+ Error.prepareStackTrace = undefined;
477
+ var previousDispatcher = null;
478
+
479
+ {
480
+ previousDispatcher = ReactSharedInternalsServer.H; // Set the dispatcher in DEV because this might be call in the render function
481
+ // for warnings.
482
+
483
+ ReactSharedInternalsServer.H = null;
484
+ disableLogs();
485
+ }
486
+ /**
487
+ * Finding a common stack frame between sample and control errors can be
488
+ * tricky given the different types and levels of stack trace truncation from
489
+ * different JS VMs. So instead we'll attempt to control what that common
490
+ * frame should be through this object method:
491
+ * Having both the sample and control errors be in the function under the
492
+ * `DescribeNativeComponentFrameRoot` property, + setting the `name` and
493
+ * `displayName` properties of the function ensures that a stack
494
+ * frame exists that has the method name `DescribeNativeComponentFrameRoot` in
495
+ * it for both control and sample stacks.
496
+ */
497
+
498
+
499
+ var RunInRootFrame = {
500
+ DetermineComponentFrameRoot: function () {
501
+ var control;
502
+
503
+ try {
504
+ // This should throw.
505
+ if (construct) {
506
+ // Something should be setting the props in the constructor.
507
+ var Fake = function () {
508
+ throw Error();
509
+ }; // $FlowFixMe[prop-missing]
510
+
511
+
512
+ Object.defineProperty(Fake.prototype, 'props', {
513
+ set: function () {
514
+ // We use a throwing setter instead of frozen or non-writable props
515
+ // because that won't throw in a non-strict mode function.
516
+ throw Error();
517
+ }
518
+ });
519
+
520
+ if (typeof Reflect === 'object' && Reflect.construct) {
521
+ // We construct a different control for this case to include any extra
522
+ // frames added by the construct call.
523
+ try {
524
+ Reflect.construct(Fake, []);
525
+ } catch (x) {
526
+ control = x;
527
+ }
528
+
529
+ Reflect.construct(fn, [], Fake);
530
+ } else {
531
+ try {
532
+ Fake.call();
533
+ } catch (x) {
534
+ control = x;
535
+ } // $FlowFixMe[prop-missing] found when upgrading Flow
536
+
537
+
538
+ fn.call(Fake.prototype);
539
+ }
540
+ } else {
541
+ try {
542
+ throw Error();
543
+ } catch (x) {
544
+ control = x;
545
+ } // TODO(luna): This will currently only throw if the function component
546
+ // tries to access React/ReactDOM/props. We should probably make this throw
547
+ // in simple components too
548
+
549
+
550
+ var maybePromise = fn(); // If the function component returns a promise, it's likely an async
551
+ // component, which we don't yet support. Attach a noop catch handler to
552
+ // silence the error.
553
+ // TODO: Implement component stacks for async client components?
554
+
555
+ if (maybePromise && typeof maybePromise.catch === 'function') {
556
+ maybePromise.catch(function () {});
557
+ }
558
+ }
559
+ } catch (sample) {
560
+ // This is inlined manually because closure doesn't do it for us.
561
+ if (sample && control && typeof sample.stack === 'string') {
562
+ return [sample.stack, control.stack];
563
+ }
564
+ }
565
+
566
+ return [null, null];
567
+ }
568
+ }; // $FlowFixMe[prop-missing]
569
+
570
+ RunInRootFrame.DetermineComponentFrameRoot.displayName = 'DetermineComponentFrameRoot';
571
+ var namePropDescriptor = Object.getOwnPropertyDescriptor(RunInRootFrame.DetermineComponentFrameRoot, 'name'); // Before ES6, the `name` property was not configurable.
572
+
573
+ if (namePropDescriptor && namePropDescriptor.configurable) {
574
+ // V8 utilizes a function's `name` property when generating a stack trace.
575
+ Object.defineProperty(RunInRootFrame.DetermineComponentFrameRoot, // Configurable properties can be updated even if its writable descriptor
576
+ // is set to `false`.
577
+ // $FlowFixMe[cannot-write]
578
+ 'name', {
579
+ value: 'DetermineComponentFrameRoot'
580
+ });
581
+ }
582
+
583
+ try {
584
+ var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),
585
+ sampleStack = _RunInRootFrame$Deter[0],
586
+ controlStack = _RunInRootFrame$Deter[1];
587
+
588
+ if (sampleStack && controlStack) {
589
+ // This extracts the first frame from the sample that isn't also in the control.
590
+ // Skipping one frame that we assume is the frame that calls the two.
591
+ var sampleLines = sampleStack.split('\n');
592
+ var controlLines = controlStack.split('\n');
593
+ var s = 0;
594
+ var c = 0;
595
+
596
+ while (s < sampleLines.length && !sampleLines[s].includes('DetermineComponentFrameRoot')) {
597
+ s++;
598
+ }
599
+
600
+ while (c < controlLines.length && !controlLines[c].includes('DetermineComponentFrameRoot')) {
601
+ c++;
602
+ } // We couldn't find our intentionally injected common root frame, attempt
603
+ // to find another common root frame by search from the bottom of the
604
+ // control stack...
605
+
606
+
607
+ if (s === sampleLines.length || c === controlLines.length) {
608
+ s = sampleLines.length - 1;
609
+ c = controlLines.length - 1;
610
+
611
+ while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
612
+ // We expect at least one stack frame to be shared.
613
+ // Typically this will be the root most one. However, stack frames may be
614
+ // cut off due to maximum stack limits. In this case, one maybe cut off
615
+ // earlier than the other. We assume that the sample is longer or the same
616
+ // and there for cut off earlier. So we should find the root most frame in
617
+ // the sample somewhere in the control.
618
+ c--;
619
+ }
620
+ }
621
+
622
+ for (; s >= 1 && c >= 0; s--, c--) {
623
+ // Next we find the first one that isn't the same which should be the
624
+ // frame that called our sample function and the control.
625
+ if (sampleLines[s] !== controlLines[c]) {
626
+ // In V8, the first line is describing the message but other VMs don't.
627
+ // If we're about to return the first line, and the control is also on the same
628
+ // line, that's a pretty good indicator that our sample threw at same line as
629
+ // the control. I.e. before we entered the sample frame. So we ignore this result.
630
+ // This can happen if you passed a class to function component, or non-function.
631
+ if (s !== 1 || c !== 1) {
632
+ do {
633
+ s--;
634
+ c--; // We may still have similar intermediate frames from the construct call.
635
+ // The next one that isn't the same should be our match though.
636
+
637
+ if (c < 0 || sampleLines[s] !== controlLines[c]) {
638
+ // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
639
+ var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
640
+ // but we have a user-provided "displayName"
641
+ // splice it in to make the stack more readable.
642
+
643
+
644
+ if (fn.displayName && _frame.includes('<anonymous>')) {
645
+ _frame = _frame.replace('<anonymous>', fn.displayName);
646
+ }
647
+
648
+ if (true) {
649
+ if (typeof fn === 'function') {
650
+ componentFrameCache.set(fn, _frame);
651
+ }
652
+ } // Return the line we found.
653
+
654
+
655
+ return _frame;
656
+ }
657
+ } while (s >= 1 && c >= 0);
658
+ }
659
+
660
+ break;
661
+ }
662
+ }
663
+ }
664
+ } finally {
665
+ reentry = false;
666
+
667
+ {
668
+ ReactSharedInternalsServer.H = previousDispatcher;
669
+ reenableLogs();
670
+ }
671
+
672
+ Error.prepareStackTrace = previousPrepareStackTrace;
673
+ } // Fallback to just using the name if we couldn't make it throw.
674
+
675
+
676
+ var name = fn ? fn.displayName || fn.name : '';
677
+ var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
678
+
679
+ {
680
+ if (typeof fn === 'function') {
681
+ componentFrameCache.set(fn, syntheticFrame);
682
+ }
683
+ }
684
+
685
+ return syntheticFrame;
686
+ }
687
+ function describeFunctionComponentFrame(fn) {
688
+ {
689
+ return describeNativeComponentFrame(fn, false);
690
+ }
691
+ }
692
+
693
+ function shouldConstruct(Component) {
694
+ var prototype = Component.prototype;
695
+ return !!(prototype && prototype.isReactComponent);
696
+ }
697
+
698
+ function describeUnknownElementTypeFrameInDEV(type) {
699
+
700
+ if (type == null) {
701
+ return '';
702
+ }
703
+
704
+ if (typeof type === 'function') {
705
+ {
706
+ return describeNativeComponentFrame(type, shouldConstruct(type));
707
+ }
708
+ }
709
+
710
+ if (typeof type === 'string') {
711
+ return describeBuiltInComponentFrame(type);
712
+ }
713
+
714
+ switch (type) {
715
+ case REACT_SUSPENSE_TYPE:
716
+ return describeBuiltInComponentFrame('Suspense');
717
+
718
+ case REACT_SUSPENSE_LIST_TYPE:
719
+ return describeBuiltInComponentFrame('SuspenseList');
720
+ }
721
+
722
+ if (typeof type === 'object') {
723
+ switch (type.$$typeof) {
724
+ case REACT_FORWARD_REF_TYPE:
725
+ return describeFunctionComponentFrame(type.render);
726
+
727
+ case REACT_MEMO_TYPE:
728
+ // Memo may contain any component type so we recursively resolve it.
729
+ return describeUnknownElementTypeFrameInDEV(type.type);
730
+
731
+ case REACT_LAZY_TYPE:
732
+ {
733
+ var lazyComponent = type;
734
+ var payload = lazyComponent._payload;
735
+ var init = lazyComponent._init;
736
+
737
+ try {
738
+ // Lazy may contain any component type so we recursively resolve it.
739
+ return describeUnknownElementTypeFrameInDEV(init(payload));
740
+ } catch (x) {}
741
+ }
742
+ }
743
+ }
744
+
745
+ return '';
746
+ }
747
+
748
+ var REACT_CLIENT_REFERENCE = Symbol.for('react.client.reference');
749
+
750
+ function getOwner() {
751
+ {
752
+ var dispatcher = ReactSharedInternalsServer.A;
753
+
754
+ if (dispatcher === null) {
755
+ return null;
756
+ }
757
+
758
+ return dispatcher.getOwner();
759
+ }
760
+ }
761
+
762
+ var specialPropKeyWarningShown;
763
+ var didWarnAboutElementRef;
764
+
765
+ {
766
+ didWarnAboutElementRef = {};
767
+ }
768
+
769
+ function hasValidRef(config) {
770
+ {
771
+ if (hasOwnProperty.call(config, 'ref')) {
772
+ var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
773
+
774
+ if (getter && getter.isReactWarning) {
775
+ return false;
776
+ }
777
+ }
778
+ }
779
+
780
+ return config.ref !== undefined;
781
+ }
782
+
783
+ function hasValidKey(config) {
784
+ {
785
+ if (hasOwnProperty.call(config, 'key')) {
786
+ var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
787
+
788
+ if (getter && getter.isReactWarning) {
789
+ return false;
790
+ }
791
+ }
792
+ }
793
+
794
+ return config.key !== undefined;
795
+ }
796
+
797
+ function defineKeyPropWarningGetter(props, displayName) {
798
+ {
799
+ var warnAboutAccessingKey = function () {
800
+ if (!specialPropKeyWarningShown) {
801
+ specialPropKeyWarningShown = true;
802
+
803
+ error('%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)', displayName);
804
+ }
805
+ };
806
+
807
+ warnAboutAccessingKey.isReactWarning = true;
808
+ Object.defineProperty(props, 'key', {
809
+ get: warnAboutAccessingKey,
810
+ configurable: true
811
+ });
812
+ }
813
+ }
814
+
815
+ function elementRefGetterWithDeprecationWarning() {
816
+ {
817
+ var componentName = getComponentNameFromType(this.type);
818
+
819
+ if (!didWarnAboutElementRef[componentName]) {
820
+ didWarnAboutElementRef[componentName] = true;
821
+
822
+ error('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.');
823
+ } // An undefined `element.ref` is coerced to `null` for
824
+ // backwards compatibility.
825
+
826
+
827
+ var refProp = this.props.ref;
828
+ return refProp !== undefined ? refProp : null;
829
+ }
830
+ }
831
+ /**
832
+ * Factory method to create a new React element. This no longer adheres to
833
+ * the class pattern, so do not use new to call it. Also, instanceof check
834
+ * will not work. Instead test $$typeof field against Symbol.for('react.transitional.element') to check
835
+ * if something is a React Element.
836
+ *
837
+ * @param {*} type
838
+ * @param {*} props
839
+ * @param {*} key
840
+ * @param {string|object} ref
841
+ * @param {*} owner
842
+ * @param {*} self A *temporary* helper to detect places where `this` is
843
+ * different from the `owner` when React.createElement is called, so that we
844
+ * can warn. We want to get rid of owner and replace string `ref`s with arrow
845
+ * functions, and as long as `this` and owner are the same, there will be no
846
+ * change in behavior.
847
+ * @param {*} source An annotation object (added by a transpiler or otherwise)
848
+ * indicating filename, line number, and/or other information.
849
+ * @internal
850
+ */
851
+
852
+
853
+ function ReactElement(type, key, _ref, self, source, owner, props, debugStack, debugTask) {
854
+ var ref;
855
+
856
+ {
857
+ // When enableRefAsProp is on, ignore whatever was passed as the ref
858
+ // argument and treat `props.ref` as the source of truth. The only thing we
859
+ // use this for is `element.ref`, which will log a deprecation warning on
860
+ // access. In the next release, we can remove `element.ref` as well as the
861
+ // `ref` argument.
862
+ var refProp = props.ref; // An undefined `element.ref` is coerced to `null` for
863
+ // backwards compatibility.
864
+
865
+ ref = refProp !== undefined ? refProp : null;
866
+ }
867
+
868
+ var element;
869
+
870
+ {
871
+ // In dev, make `ref` a non-enumerable property with a warning. It's non-
872
+ // enumerable so that test matchers and serializers don't access it and
873
+ // trigger the warning.
874
+ //
875
+ // `ref` will be removed from the element completely in a future release.
876
+ element = {
877
+ // This tag allows us to uniquely identify this as a React Element
878
+ $$typeof: REACT_ELEMENT_TYPE,
879
+ // Built-in properties that belong on the element
880
+ type: type,
881
+ key: key,
882
+ props: props,
883
+ // Record the component responsible for creating this element.
884
+ _owner: owner
885
+ };
886
+
887
+ if (ref !== null) {
888
+ Object.defineProperty(element, 'ref', {
889
+ enumerable: false,
890
+ get: elementRefGetterWithDeprecationWarning
891
+ });
892
+ } else {
893
+ // Don't warn on access if a ref is not given. This reduces false
894
+ // positives in cases where a test serializer uses
895
+ // getOwnPropertyDescriptors to compare objects, like Jest does, which is
896
+ // a problem because it bypasses non-enumerability.
897
+ //
898
+ // So unfortunately this will trigger a false positive warning in Jest
899
+ // when the diff is printed:
900
+ //
901
+ // expect(<div ref={ref} />).toEqual(<span ref={ref} />);
902
+ //
903
+ // A bit sketchy, but this is what we've done for the `props.key` and
904
+ // `props.ref` accessors for years, which implies it will be good enough
905
+ // for `element.ref`, too. Let's see if anyone complains.
906
+ Object.defineProperty(element, 'ref', {
907
+ enumerable: false,
908
+ value: null
909
+ });
910
+ }
911
+ }
912
+
913
+ {
914
+ // The validation flag is currently mutative. We put it on
915
+ // an external backing store so that we can freeze the whole object.
916
+ // This can be replaced with a WeakMap once they are implemented in
917
+ // commonly used development environments.
918
+ element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
919
+ // the validation flag non-enumerable (where possible, which should
920
+ // include every environment we run tests in), so the test framework
921
+ // ignores it.
922
+
923
+ Object.defineProperty(element._store, 'validated', {
924
+ configurable: false,
925
+ enumerable: false,
926
+ writable: true,
927
+ value: false
928
+ }); // debugInfo contains Server Component debug information.
929
+
930
+ Object.defineProperty(element, '_debugInfo', {
931
+ configurable: false,
932
+ enumerable: false,
933
+ writable: true,
934
+ value: null
935
+ });
936
+
937
+ if (Object.freeze) {
938
+ Object.freeze(element.props);
939
+ Object.freeze(element);
940
+ }
941
+ }
942
+
943
+ return element;
944
+ }
945
+ // support `jsx` and `jsxs` when running in development. This supports the case
946
+ // where a third-party dependency ships code that was compiled for production;
947
+ // we want to still provide warnings in development.
948
+ //
949
+ // So these functions are the _dev_ implementations of the _production_
950
+ // API signatures.
951
+ //
952
+ // Since these functions are dev-only, it's ok to add an indirection here. They
953
+ // only exist to provide different versions of `isStaticChildren`. (We shouldn't
954
+ // use this pattern for the prod versions, though, because it will add an call
955
+ // frame.)
956
+
957
+ function jsxProdSignatureRunningInDevWithDynamicChildren(type, config, maybeKey, source, self) {
958
+ {
959
+ var isStaticChildren = false;
960
+ return jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self);
961
+ }
962
+ }
963
+ function jsxProdSignatureRunningInDevWithStaticChildren(type, config, maybeKey, source, self) {
964
+ {
965
+ var isStaticChildren = true;
966
+ return jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self);
967
+ }
968
+ }
969
+ var didWarnAboutKeySpread = {};
970
+ /**
971
+ * https://github.com/reactjs/rfcs/pull/107
972
+ * @param {*} type
973
+ * @param {object} props
974
+ * @param {string} key
975
+ */
976
+
977
+ function jsxDEV$1(type, config, maybeKey, isStaticChildren, source, self) {
978
+ {
979
+ if (!isValidElementType(type)) {
980
+ // This is an invalid element type.
981
+ //
982
+ // We warn in this case but don't throw. We expect the element creation to
983
+ // succeed and there will likely be errors in render.
984
+ var info = '';
985
+
986
+ if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
987
+ info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
988
+ }
989
+
990
+ var typeString;
991
+
992
+ if (type === null) {
993
+ typeString = 'null';
994
+ } else if (isArray(type)) {
995
+ typeString = 'array';
996
+ } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
997
+ typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
998
+ info = ' Did you accidentally export a JSX literal instead of a component?';
999
+ } else {
1000
+ typeString = typeof type;
1001
+ }
1002
+
1003
+ error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
1004
+ } else {
1005
+ // This is a valid element type.
1006
+ // Skip key warning if the type isn't valid since our key validation logic
1007
+ // doesn't expect a non-string/function type and can throw confusing
1008
+ // errors. We don't want exception behavior to differ between dev and
1009
+ // prod. (Rendering will throw with a helpful message and as soon as the
1010
+ // type is fixed, the key warnings will appear.)
1011
+ var children = config.children;
1012
+
1013
+ if (children !== undefined) {
1014
+ if (isStaticChildren) {
1015
+ if (isArray(children)) {
1016
+ for (var i = 0; i < children.length; i++) {
1017
+ validateChildKeys(children[i], type);
1018
+ }
1019
+
1020
+ if (Object.freeze) {
1021
+ Object.freeze(children);
1022
+ }
1023
+ } else {
1024
+ error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
1025
+ }
1026
+ } else {
1027
+ validateChildKeys(children, type);
1028
+ }
1029
+ }
1030
+ } // Warn about key spread regardless of whether the type is valid.
1031
+
1032
+
1033
+ if (hasOwnProperty.call(config, 'key')) {
1034
+ var componentName = getComponentNameFromType(type);
1035
+ var keys = Object.keys(config).filter(function (k) {
1036
+ return k !== 'key';
1037
+ });
1038
+ var beforeExample = keys.length > 0 ? '{key: someKey, ' + keys.join(': ..., ') + ': ...}' : '{key: someKey}';
1039
+
1040
+ if (!didWarnAboutKeySpread[componentName + beforeExample]) {
1041
+ var afterExample = keys.length > 0 ? '{' + keys.join(': ..., ') + ': ...}' : '{}';
1042
+
1043
+ error('A props object containing a "key" prop is being spread into JSX:\n' + ' let props = %s;\n' + ' <%s {...props} />\n' + 'React keys must be passed directly to JSX without using spread:\n' + ' let props = %s;\n' + ' <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
1044
+
1045
+ didWarnAboutKeySpread[componentName + beforeExample] = true;
1046
+ }
1047
+ }
1048
+
1049
+ var key = null;
1050
+ var ref = null; // Currently, key can be spread in as a prop. This causes a potential
1051
+ // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
1052
+ // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
1053
+ // but as an intermediary step, we will use jsxDEV for everything except
1054
+ // <div {...props} key="Hi" />, because we aren't currently able to tell if
1055
+ // key is explicitly declared to be undefined or not.
1056
+
1057
+ if (maybeKey !== undefined) {
1058
+ {
1059
+ checkKeyStringCoercion(maybeKey);
1060
+ }
1061
+
1062
+ key = '' + maybeKey;
1063
+ }
1064
+
1065
+ if (hasValidKey(config)) {
1066
+ {
1067
+ checkKeyStringCoercion(config.key);
1068
+ }
1069
+
1070
+ key = '' + config.key;
1071
+ }
1072
+
1073
+ if (hasValidRef(config)) ;
1074
+
1075
+ var props;
1076
+
1077
+ if (!('key' in config)) {
1078
+ // If key was not spread in, we can reuse the original props object. This
1079
+ // only works for `jsx`, not `createElement`, because `jsx` is a compiler
1080
+ // target and the compiler always passes a new object. For `createElement`,
1081
+ // we can't assume a new object is passed every time because it can be
1082
+ // called manually.
1083
+ //
1084
+ // Spreading key is a warning in dev. In a future release, we will not
1085
+ // remove a spread key from the props object. (But we'll still warn.) We'll
1086
+ // always pass the object straight through.
1087
+ props = config;
1088
+ } else {
1089
+ // We need to remove reserved props (key, prop, ref). Create a fresh props
1090
+ // object and copy over all the non-reserved props. We don't use `delete`
1091
+ // because in V8 it will deopt the object to dictionary mode.
1092
+ props = {};
1093
+
1094
+ for (var propName in config) {
1095
+ // Skip over reserved prop names
1096
+ if (propName !== 'key' && (enableRefAsProp )) {
1097
+ {
1098
+ props[propName] = config[propName];
1099
+ }
1100
+ }
1101
+ }
1102
+ }
1103
+
1104
+ if (key || !enableRefAsProp ) {
1105
+ var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
1106
+
1107
+ if (key) {
1108
+ defineKeyPropWarningGetter(props, displayName);
1109
+ }
1110
+ }
1111
+
1112
+ var element = ReactElement(type, key, ref, self, source, getOwner(), props);
1113
+
1114
+ if (type === REACT_FRAGMENT_TYPE) {
1115
+ validateFragmentProps(element);
1116
+ }
1117
+
1118
+ return element;
1119
+ }
1120
+ }
1121
+
1122
+ function getDeclarationErrorAddendum() {
1123
+ {
1124
+ var owner = getOwner();
1125
+
1126
+ if (owner) {
1127
+ var name = getComponentNameFromType(owner.type);
1128
+
1129
+ if (name) {
1130
+ return '\n\nCheck the render method of `' + name + '`.';
1131
+ }
1132
+ }
1133
+
1134
+ return '';
1135
+ }
1136
+ }
1137
+ /**
1138
+ * Ensure that every element either is passed in a static location, in an
1139
+ * array with an explicit keys property defined, or in an object literal
1140
+ * with valid key property.
1141
+ *
1142
+ * @internal
1143
+ * @param {ReactNode} node Statically passed child of any type.
1144
+ * @param {*} parentType node's parent's type.
1145
+ */
1146
+
1147
+
1148
+ function validateChildKeys(node, parentType) {
1149
+ {
1150
+ if (typeof node !== 'object' || !node) {
1151
+ return;
1152
+ }
1153
+
1154
+ if (node.$$typeof === REACT_CLIENT_REFERENCE) ; else if (isArray(node)) {
1155
+ for (var i = 0; i < node.length; i++) {
1156
+ var child = node[i];
1157
+
1158
+ if (isValidElement(child)) {
1159
+ validateExplicitKey(child, parentType);
1160
+ }
1161
+ }
1162
+ } else if (isValidElement(node)) {
1163
+ // This element was passed in a valid location.
1164
+ if (node._store) {
1165
+ node._store.validated = true;
1166
+ }
1167
+ } else {
1168
+ var iteratorFn = getIteratorFn(node);
1169
+
1170
+ if (typeof iteratorFn === 'function') {
1171
+ // Entry iterators used to provide implicit keys,
1172
+ // but now we print a separate warning for them later.
1173
+ if (iteratorFn !== node.entries) {
1174
+ var iterator = iteratorFn.call(node);
1175
+
1176
+ if (iterator !== node) {
1177
+ var step;
1178
+
1179
+ while (!(step = iterator.next()).done) {
1180
+ if (isValidElement(step.value)) {
1181
+ validateExplicitKey(step.value, parentType);
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+ /**
1191
+ * Verifies the object is a ReactElement.
1192
+ * See https://reactjs.org/docs/react-api.html#isvalidelement
1193
+ * @param {?object} object
1194
+ * @return {boolean} True if `object` is a ReactElement.
1195
+ * @final
1196
+ */
1197
+
1198
+
1199
+ function isValidElement(object) {
1200
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
1201
+ }
1202
+ var ownerHasKeyUseWarning = {};
1203
+ /**
1204
+ * Warn if the element doesn't have an explicit key assigned to it.
1205
+ * This element is in an array. The array could grow and shrink or be
1206
+ * reordered. All children that haven't already been validated are required to
1207
+ * have a "key" property assigned to it. Error statuses are cached so a warning
1208
+ * will only be shown once.
1209
+ *
1210
+ * @internal
1211
+ * @param {ReactElement} element Element that requires a key.
1212
+ * @param {*} parentType element's parent's type.
1213
+ */
1214
+
1215
+ function validateExplicitKey(element, parentType) {
1216
+ {
1217
+ if (!element._store || element._store.validated || element.key != null) {
1218
+ return;
1219
+ }
1220
+
1221
+ element._store.validated = true;
1222
+ var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1223
+
1224
+ if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1225
+ return;
1226
+ }
1227
+
1228
+ ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
1229
+ // property, it may be the creator of the child that's responsible for
1230
+ // assigning it a key.
1231
+
1232
+ var childOwner = '';
1233
+
1234
+ if (element && element._owner != null && element._owner !== getOwner()) {
1235
+ var ownerName = null;
1236
+
1237
+ if (typeof element._owner.tag === 'number') {
1238
+ ownerName = getComponentNameFromType(element._owner.type);
1239
+ } else if (typeof element._owner.name === 'string') {
1240
+ ownerName = element._owner.name;
1241
+ } // Give the component that originally created this child.
1242
+
1243
+
1244
+ childOwner = " It was passed a child from " + ownerName + ".";
1245
+ }
1246
+
1247
+ setCurrentlyValidatingElement(element);
1248
+
1249
+ error('Each child in a list should have a unique "key" prop.' + '%s%s See https://react.dev/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1250
+
1251
+ setCurrentlyValidatingElement(null);
1252
+ }
1253
+ }
1254
+
1255
+ function setCurrentlyValidatingElement(element) {
1256
+ {
1257
+ if (element) {
1258
+ var stack = describeUnknownElementTypeFrameInDEV(element.type);
1259
+ ReactSharedInternalsServer.setExtraStackFrame(stack);
1260
+ } else {
1261
+ ReactSharedInternalsServer.setExtraStackFrame(null);
1262
+ }
1263
+ }
1264
+ }
1265
+
1266
+ function getCurrentComponentErrorInfo(parentType) {
1267
+ {
1268
+ var info = getDeclarationErrorAddendum();
1269
+
1270
+ if (!info) {
1271
+ var parentName = getComponentNameFromType(parentType);
1272
+
1273
+ if (parentName) {
1274
+ info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1275
+ }
1276
+ }
1277
+
1278
+ return info;
1279
+ }
1280
+ }
1281
+ /**
1282
+ * Given a fragment, validate that it can only be provided with fragment props
1283
+ * @param {ReactElement} fragment
1284
+ */
1285
+
1286
+
1287
+ function validateFragmentProps(fragment) {
1288
+ // TODO: Move this to render phase instead of at element creation.
1289
+ {
1290
+ var keys = Object.keys(fragment.props);
1291
+
1292
+ for (var i = 0; i < keys.length; i++) {
1293
+ var key = keys[i];
1294
+
1295
+ if (key !== 'children' && key !== 'key') {
1296
+ setCurrentlyValidatingElement(fragment);
1297
+
1298
+ error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
1299
+
1300
+ setCurrentlyValidatingElement(null);
1301
+ break;
1302
+ }
1303
+ }
1304
+ }
1305
+ }
1306
+
1307
+ var jsx = jsxProdSignatureRunningInDevWithDynamicChildren ; // we may want to special case jsxs internally to take advantage of static children.
1308
+ // for now we can ship identical prod functions
1309
+
1310
+ var jsxs = jsxProdSignatureRunningInDevWithStaticChildren ;
1311
+ var jsxDEV = jsxDEV$1 ;
1312
+
1313
+ exports.Fragment = REACT_FRAGMENT_TYPE;
1314
+ exports.jsx = jsx;
1315
+ exports.jsxDEV = jsxDEV;
1316
+ exports.jsxs = jsxs;
1317
+ })();
1318
+ }