react-dom 16.8.5 → 16.9.0

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 (34) hide show
  1. package/build-info.json +5 -5
  2. package/cjs/react-dom-server.browser.development.js +473 -136
  3. package/cjs/react-dom-server.browser.production.min.js +45 -42
  4. package/cjs/react-dom-server.node.development.js +456 -131
  5. package/cjs/react-dom-server.node.production.min.js +46 -44
  6. package/cjs/react-dom-test-utils.development.js +328 -82
  7. package/cjs/react-dom-test-utils.production.min.js +26 -23
  8. package/cjs/react-dom-unstable-fizz.browser.development.js +9 -1
  9. package/cjs/react-dom-unstable-fizz.browser.production.min.js +1 -1
  10. package/cjs/react-dom-unstable-fizz.node.development.js +9 -1
  11. package/cjs/react-dom-unstable-fizz.node.production.min.js +1 -1
  12. package/cjs/react-dom-unstable-native-dependencies.development.js +67 -44
  13. package/cjs/react-dom-unstable-native-dependencies.production.min.js +20 -21
  14. package/cjs/react-dom.development.js +15465 -11493
  15. package/cjs/react-dom.production.min.js +266 -257
  16. package/cjs/react-dom.profiling.min.js +272 -263
  17. package/package.json +2 -2
  18. package/umd/react-dom-server.browser.development.js +473 -136
  19. package/umd/react-dom-server.browser.production.min.js +38 -37
  20. package/umd/react-dom-test-utils.development.js +349 -82
  21. package/umd/react-dom-test-utils.production.min.js +23 -22
  22. package/umd/react-dom-unstable-fizz.browser.development.js +9 -1
  23. package/umd/react-dom-unstable-fizz.browser.production.min.js +1 -1
  24. package/umd/react-dom-unstable-native-dependencies.development.js +67 -44
  25. package/umd/react-dom-unstable-native-dependencies.production.min.js +21 -22
  26. package/umd/react-dom.development.js +12006 -8031
  27. package/umd/react-dom.production.min.js +220 -209
  28. package/umd/react-dom.profiling.min.js +227 -214
  29. package/cjs/react-dom-unstable-fire.development.js +0 -21252
  30. package/cjs/react-dom-unstable-fire.production.min.js +0 -269
  31. package/cjs/react-dom-unstable-fire.profiling.min.js +0 -278
  32. package/umd/react-dom-unstable-fire.development.js +0 -21387
  33. package/umd/react-dom-unstable-fire.production.min.js +0 -220
  34. package/umd/react-dom-unstable-fire.profiling.min.js +0 -225
@@ -1,4 +1,4 @@
1
- /** @license React v16.8.5
1
+ /** @license React v16.9.0
2
2
  * react-dom-server.browser.development.js
3
3
  *
4
4
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -15,6 +15,23 @@
15
15
  (global.ReactDOMServer = factory(global.React));
16
16
  }(this, (function (React) { 'use strict';
17
17
 
18
+ // Do not require this module directly! Use normal `invariant` calls with
19
+ // template literal strings. The messages will be converted to ReactError during
20
+ // build, and in production they will be minified.
21
+
22
+ // Do not require this module directly! Use normal `invariant` calls with
23
+ // template literal strings. The messages will be converted to ReactError during
24
+ // build, and in production they will be minified.
25
+
26
+ function ReactError(error) {
27
+ error.name = 'Invariant Violation';
28
+ return error;
29
+ }
30
+
31
+ // TODO: this is special because it gets imported during build.
32
+
33
+ var ReactVersion = '16.9.0';
34
+
18
35
  /**
19
36
  * Use invariant() to assert state which your program assumes to be true.
20
37
  *
@@ -26,44 +43,6 @@
26
43
  * will remain to ensure logic does not differ in production.
27
44
  */
28
45
 
29
- var validateFormat = function () {};
30
-
31
- {
32
- validateFormat = function (format) {
33
- if (format === undefined) {
34
- throw new Error('invariant requires an error message argument');
35
- }
36
- };
37
- }
38
-
39
- function invariant(condition, format, a, b, c, d, e, f) {
40
- validateFormat(format);
41
-
42
- if (!condition) {
43
- var error = void 0;
44
- if (format === undefined) {
45
- error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
46
- } else {
47
- var args = [a, b, c, d, e, f];
48
- var argIndex = 0;
49
- error = new Error(format.replace(/%s/g, function () {
50
- return args[argIndex++];
51
- }));
52
- error.name = 'Invariant Violation';
53
- }
54
-
55
- error.framesToPop = 1; // we don't care about invariant's own frame
56
- throw error;
57
- }
58
- }
59
-
60
- // Relying on the `invariant()` implementation lets us
61
- // preserve the format and params in the www builds.
62
-
63
- // TODO: this is special because it gets imported during build.
64
-
65
- var ReactVersion = '16.8.5';
66
-
67
46
  var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
68
47
 
69
48
  var _assign = ReactInternals.assign;
@@ -129,12 +108,16 @@ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeac
129
108
  var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
130
109
  var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
131
110
  var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace;
111
+ // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
112
+ // (unstable) APIs that have been removed. Can we remove the symbols?
132
113
 
133
114
  var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
134
115
  var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
135
116
  var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
117
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
136
118
  var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
137
119
  var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
120
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
138
121
 
139
122
  var Resolved = 1;
140
123
 
@@ -165,8 +148,6 @@ function getComponentName(type) {
165
148
  return type;
166
149
  }
167
150
  switch (type) {
168
- case REACT_CONCURRENT_MODE_TYPE:
169
- return 'ConcurrentMode';
170
151
  case REACT_FRAGMENT_TYPE:
171
152
  return 'Fragment';
172
153
  case REACT_PORTAL_TYPE:
@@ -177,6 +158,8 @@ function getComponentName(type) {
177
158
  return 'StrictMode';
178
159
  case REACT_SUSPENSE_TYPE:
179
160
  return 'Suspense';
161
+ case REACT_SUSPENSE_LIST_TYPE:
162
+ return 'SuspenseList';
180
163
  }
181
164
  if (typeof type === 'object') {
182
165
  switch (type.$$typeof) {
@@ -195,6 +178,7 @@ function getComponentName(type) {
195
178
  if (resolvedThenable) {
196
179
  return getComponentName(resolvedThenable);
197
180
  }
181
+ break;
198
182
  }
199
183
  }
200
184
  }
@@ -264,6 +248,11 @@ if (!ReactSharedInternals.hasOwnProperty('ReactCurrentDispatcher')) {
264
248
  current: null
265
249
  };
266
250
  }
251
+ if (!ReactSharedInternals.hasOwnProperty('ReactCurrentBatchConfig')) {
252
+ ReactSharedInternals.ReactCurrentBatchConfig = {
253
+ suspense: null
254
+ };
255
+ }
267
256
 
268
257
  /**
269
258
  * Similar to invariant but only logs a warning if the condition is not met.
@@ -335,7 +324,7 @@ var describeComponentFrame = function (name, source, ownerName) {
335
324
 
336
325
 
337
326
  // Warn about deprecated, async-unsafe lifecycles; relates to RFC #6:
338
- var warnAboutDeprecatedLifecycles = false;
327
+ var warnAboutDeprecatedLifecycles = true;
339
328
 
340
329
  // Gather advanced timing metrics for Profiler subtrees.
341
330
 
@@ -352,6 +341,9 @@ var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be f
352
341
  // Only used in www builds.
353
342
 
354
343
 
344
+ // Disable javascript: URL strings in href for XSS protection.
345
+ var disableJavaScriptURLs = false;
346
+
355
347
  // React Fire: prevent the value and checked attributes from syncing
356
348
  // with their related DOM properties
357
349
 
@@ -359,6 +351,49 @@ var enableSuspenseServerRenderer = false; // TODO: true? Here it might just be f
359
351
  // These APIs will no longer be "unstable" in the upcoming 16.7 release,
360
352
  // Control this behavior with a flag to support 16.6 minor releases in the meanwhile.
361
353
 
354
+
355
+
356
+
357
+ // See https://github.com/react-native-community/discussions-and-proposals/issues/72 for more information
358
+ // This is a flag so we can fix warnings in RN core before turning it on
359
+
360
+
361
+ // Experimental React Flare event system and event components support.
362
+ var enableFlareAPI = false;
363
+
364
+ // Experimental Host Component support.
365
+ var enableFundamentalAPI = false;
366
+
367
+ // New API for JSX transforms to target - https://github.com/reactjs/rfcs/pull/107
368
+
369
+
370
+ // We will enforce mocking scheduler with scheduler/unstable_mock at some point. (v17?)
371
+ // Till then, we warn about the missing mock, but still fallback to a sync mode compatible version
372
+
373
+ // Temporary flag to revert the fix in #15650
374
+
375
+
376
+ // For tests, we flush suspense fallbacks in an act scope;
377
+ // *except* in some of our own tests, where we test incremental loading states.
378
+
379
+
380
+ // Changes priority of some events like mousemove to user-blocking priority,
381
+ // but without making them discrete. The flag exists in case it causes
382
+ // starvation problems.
383
+
384
+
385
+ // Add a callback property to suspense to notify which promises are currently
386
+ // in the update queue. This allows reporting and tracing of what is causing
387
+ // the user to see a loading state.
388
+
389
+
390
+ // Part of the simplification of React.createElement so we can eventually move
391
+ // from React.createElement to React.jsx
392
+ // https://github.com/reactjs/rfcs/blob/createlement-rfc/text/0000-create-element-changes.md
393
+
394
+
395
+ var disableLegacyContext = false;
396
+
362
397
  /**
363
398
  * Copyright (c) 2013-present, Facebook, Inc.
364
399
  *
@@ -465,12 +500,12 @@ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
465
500
  var checkPropTypes_1 = checkPropTypes;
466
501
 
467
502
  var ReactDebugCurrentFrame$1 = void 0;
503
+ var didWarnAboutInvalidateContextType = void 0;
468
504
  {
469
505
  ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
506
+ didWarnAboutInvalidateContextType = new Set();
470
507
  }
471
508
 
472
- var didWarnAboutInvalidateContextType = {};
473
-
474
509
  var emptyObject = {};
475
510
  {
476
511
  Object.freeze(emptyObject);
@@ -508,28 +543,72 @@ function validateContextBounds(context, threadID) {
508
543
  }
509
544
  }
510
545
 
511
- function processContext(type, context, threadID) {
512
- var contextType = type.contextType;
513
- if (typeof contextType === 'object' && contextType !== null) {
546
+ function processContext(type, context, threadID, isClass) {
547
+ if (isClass) {
548
+ var contextType = type.contextType;
514
549
  {
515
- if (contextType.$$typeof !== REACT_CONTEXT_TYPE) {
516
- var name = getComponentName(type) || 'Component';
517
- if (!didWarnAboutInvalidateContextType[name]) {
518
- didWarnAboutInvalidateContextType[name] = true;
519
- warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext(). ' + 'Did you accidentally pass the Context.Provider instead?', name);
550
+ if ('contextType' in type) {
551
+ var isValid =
552
+ // Allow null for conditional declaration
553
+ contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
554
+
555
+ if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
556
+ didWarnAboutInvalidateContextType.add(type);
557
+
558
+ var addendum = '';
559
+ if (contextType === undefined) {
560
+ addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
561
+ } else if (typeof contextType !== 'object') {
562
+ addendum = ' However, it is set to a ' + typeof contextType + '.';
563
+ } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
564
+ addendum = ' Did you accidentally pass the Context.Provider instead?';
565
+ } else if (contextType._context !== undefined) {
566
+ // <Context.Consumer>
567
+ addendum = ' Did you accidentally pass the Context.Consumer instead?';
568
+ } else {
569
+ addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
570
+ }
571
+ warningWithoutStack$1(false, '%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
572
+ }
573
+ }
574
+ }
575
+ if (typeof contextType === 'object' && contextType !== null) {
576
+ validateContextBounds(contextType, threadID);
577
+ return contextType[threadID];
578
+ }
579
+ if (disableLegacyContext) {
580
+ {
581
+ if (type.contextTypes) {
582
+ warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with static contextType instead.', getComponentName(type) || 'Unknown');
583
+ }
584
+ }
585
+ return emptyObject;
586
+ } else {
587
+ var maskedContext = maskContext(type, context);
588
+ {
589
+ if (type.contextTypes) {
590
+ checkContextTypes(type.contextTypes, maskedContext, 'context');
520
591
  }
521
592
  }
593
+ return maskedContext;
522
594
  }
523
- validateContextBounds(contextType, threadID);
524
- return contextType[threadID];
525
595
  } else {
526
- var maskedContext = maskContext(type, context);
527
- {
528
- if (type.contextTypes) {
529
- checkContextTypes(type.contextTypes, maskedContext, 'context');
596
+ if (disableLegacyContext) {
597
+ {
598
+ if (type.contextTypes) {
599
+ warningWithoutStack$1(false, '%s uses the legacy contextTypes API which is no longer supported. ' + 'Use React.createContext() with React.useContext() instead.', getComponentName(type) || 'Unknown');
600
+ }
601
+ }
602
+ return undefined;
603
+ } else {
604
+ var _maskedContext = maskContext(type, context);
605
+ {
606
+ if (type.contextTypes) {
607
+ checkContextTypes(type.contextTypes, _maskedContext, 'context');
608
+ }
530
609
  }
610
+ return _maskedContext;
531
611
  }
532
- return maskedContext;
533
612
  }
534
613
  }
535
614
 
@@ -547,7 +626,13 @@ function growThreadCountAndReturnNextAvailable() {
547
626
  var oldArray = nextAvailableThreadIDs;
548
627
  var oldSize = oldArray.length;
549
628
  var newSize = oldSize * 2;
550
- !(newSize <= 0x10000) ? invariant(false, 'Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.') : void 0;
629
+ (function () {
630
+ if (!(newSize <= 0x10000)) {
631
+ {
632
+ throw ReactError(Error('Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic.'));
633
+ }
634
+ }
635
+ })();
551
636
  var newArray = new Uint16Array(newSize);
552
637
  newArray.set(oldArray);
553
638
  nextAvailableThreadIDs = newArray;
@@ -706,13 +791,14 @@ function getPropertyInfo(name) {
706
791
  return properties.hasOwnProperty(name) ? properties[name] : null;
707
792
  }
708
793
 
709
- function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace) {
794
+ function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL) {
710
795
  this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
711
796
  this.attributeName = attributeName;
712
797
  this.attributeNamespace = attributeNamespace;
713
798
  this.mustUseProperty = mustUseProperty;
714
799
  this.propertyName = name;
715
800
  this.type = type;
801
+ this.sanitizeURL = sanitizeURL;
716
802
  }
717
803
 
718
804
  // When adding attributes to this list, be sure to also add them to
@@ -728,8 +814,9 @@ var properties = {};
728
814
  'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'].forEach(function (name) {
729
815
  properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
730
816
  name, // attributeName
731
- null);
732
- } // attributeNamespace
817
+ null, // attributeNamespace
818
+ false);
819
+ } // sanitizeURL
733
820
  );
734
821
 
735
822
  // A few React string attributes have a different name.
@@ -740,8 +827,9 @@ var properties = {};
740
827
 
741
828
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
742
829
  attributeName, // attributeName
743
- null);
744
- } // attributeNamespace
830
+ null, // attributeNamespace
831
+ false);
832
+ } // sanitizeURL
745
833
  );
746
834
 
747
835
  // These are "enumerated" HTML attributes that accept "true" and "false".
@@ -750,8 +838,9 @@ var properties = {};
750
838
  ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
751
839
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
752
840
  name.toLowerCase(), // attributeName
753
- null);
754
- } // attributeNamespace
841
+ null, // attributeNamespace
842
+ false);
843
+ } // sanitizeURL
755
844
  );
756
845
 
757
846
  // These are "enumerated" SVG attributes that accept "true" and "false".
@@ -761,21 +850,23 @@ var properties = {};
761
850
  ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
762
851
  properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
763
852
  name, // attributeName
764
- null);
765
- } // attributeNamespace
853
+ null, // attributeNamespace
854
+ false);
855
+ } // sanitizeURL
766
856
  );
767
857
 
768
858
  // These are HTML boolean attributes.
769
859
  ['allowFullScreen', 'async',
770
860
  // Note: there is a special case that prevents it from being written to the DOM
771
861
  // on the client side because the browsers are inconsistent. Instead we call focus().
772
- 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',
862
+ 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless',
773
863
  // Microdata
774
864
  'itemScope'].forEach(function (name) {
775
865
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
776
866
  name.toLowerCase(), // attributeName
777
- null);
778
- } // attributeNamespace
867
+ null, // attributeNamespace
868
+ false);
869
+ } // sanitizeURL
779
870
  );
780
871
 
781
872
  // These are the few React props that we set as DOM properties
@@ -786,8 +877,9 @@ var properties = {};
786
877
  'multiple', 'muted', 'selected'].forEach(function (name) {
787
878
  properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
788
879
  name, // attributeName
789
- null);
790
- } // attributeNamespace
880
+ null, // attributeNamespace
881
+ false);
882
+ } // sanitizeURL
791
883
  );
792
884
 
793
885
  // These are HTML attributes that are "overloaded booleans": they behave like
@@ -795,24 +887,27 @@ var properties = {};
795
887
  ['capture', 'download'].forEach(function (name) {
796
888
  properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
797
889
  name, // attributeName
798
- null);
799
- } // attributeNamespace
890
+ null, // attributeNamespace
891
+ false);
892
+ } // sanitizeURL
800
893
  );
801
894
 
802
895
  // These are HTML attributes that must be positive numbers.
803
896
  ['cols', 'rows', 'size', 'span'].forEach(function (name) {
804
897
  properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
805
898
  name, // attributeName
806
- null);
807
- } // attributeNamespace
899
+ null, // attributeNamespace
900
+ false);
901
+ } // sanitizeURL
808
902
  );
809
903
 
810
904
  // These are HTML attributes that must be numbers.
811
905
  ['rowSpan', 'start'].forEach(function (name) {
812
906
  properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
813
907
  name.toLowerCase(), // attributeName
814
- null);
815
- } // attributeNamespace
908
+ null, // attributeNamespace
909
+ false);
910
+ } // sanitizeURL
816
911
  );
817
912
 
818
913
  var CAMELIZE = /[\-\:]([a-z])/g;
@@ -828,23 +923,26 @@ var capitalize = function (token) {
828
923
  ['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height'].forEach(function (attributeName) {
829
924
  var name = attributeName.replace(CAMELIZE, capitalize);
830
925
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
831
- attributeName, null);
832
- } // attributeNamespace
926
+ attributeName, null, // attributeNamespace
927
+ false);
928
+ } // sanitizeURL
833
929
  );
834
930
 
835
931
  // String SVG attributes with the xlink namespace.
836
- ['xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) {
932
+ ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function (attributeName) {
837
933
  var name = attributeName.replace(CAMELIZE, capitalize);
838
934
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
839
- attributeName, 'http://www.w3.org/1999/xlink');
840
- });
935
+ attributeName, 'http://www.w3.org/1999/xlink', false);
936
+ } // sanitizeURL
937
+ );
841
938
 
842
939
  // String SVG attributes with the xml namespace.
843
940
  ['xml:base', 'xml:lang', 'xml:space'].forEach(function (attributeName) {
844
941
  var name = attributeName.replace(CAMELIZE, capitalize);
845
942
  properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
846
- attributeName, 'http://www.w3.org/XML/1998/namespace');
847
- });
943
+ attributeName, 'http://www.w3.org/XML/1998/namespace', false);
944
+ } // sanitizeURL
945
+ );
848
946
 
849
947
  // These attribute exists both in HTML and SVG.
850
948
  // The attribute name is case-sensitive in SVG so we can't just use
@@ -852,10 +950,59 @@ var capitalize = function (token) {
852
950
  ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
853
951
  properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
854
952
  attributeName.toLowerCase(), // attributeName
855
- null);
856
- } // attributeNamespace
953
+ null, // attributeNamespace
954
+ false);
955
+ } // sanitizeURL
857
956
  );
858
957
 
958
+ // These attributes accept URLs. These must not allow javascript: URLS.
959
+ // These will also need to accept Trusted Types object in the future.
960
+ var xlinkHref = 'xlinkHref';
961
+ properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
962
+ 'xlink:href', 'http://www.w3.org/1999/xlink', true);
963
+
964
+ ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
965
+ properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
966
+ attributeName.toLowerCase(), // attributeName
967
+ null, // attributeNamespace
968
+ true);
969
+ } // sanitizeURL
970
+ );
971
+
972
+ var ReactDebugCurrentFrame$2 = null;
973
+ {
974
+ ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
975
+ }
976
+
977
+ // A javascript: URL can contain leading C0 control or \u0020 SPACE,
978
+ // and any newline or tab are filtered out as if they're not part of the URL.
979
+ // https://url.spec.whatwg.org/#url-parsing
980
+ // Tab or newline are defined as \r\n\t:
981
+ // https://infra.spec.whatwg.org/#ascii-tab-or-newline
982
+ // A C0 control is a code point in the range \u0000 NULL to \u001F
983
+ // INFORMATION SEPARATOR ONE, inclusive:
984
+ // https://infra.spec.whatwg.org/#c0-control-or-space
985
+
986
+ /* eslint-disable max-len */
987
+ var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
988
+
989
+ var didWarn = false;
990
+
991
+ function sanitizeURL(url) {
992
+ if (disableJavaScriptURLs) {
993
+ (function () {
994
+ if (!!isJavaScriptProtocol.test(url)) {
995
+ {
996
+ throw ReactError(Error('React has blocked a javascript: URL as a security precaution.' + (ReactDebugCurrentFrame$2.getStackAddendum())));
997
+ }
998
+ }
999
+ })();
1000
+ } else if (true && !didWarn && isJavaScriptProtocol.test(url)) {
1001
+ didWarn = true;
1002
+ warning$1(false, 'A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
1003
+ }
1004
+ }
1005
+
859
1006
  // code copied and modified from escape-html
860
1007
  /**
861
1008
  * Module variables.
@@ -987,6 +1134,10 @@ function createMarkupForProperty(name, value) {
987
1134
  if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
988
1135
  return attributeName + '=""';
989
1136
  } else {
1137
+ if (propertyInfo.sanitizeURL) {
1138
+ value = '' + value;
1139
+ sanitizeURL(value);
1140
+ }
990
1141
  return attributeName + '=' + quoteAttributeValueForBrowser(value);
991
1142
  }
992
1143
  } else if (isAttributeNameSafe(name)) {
@@ -1037,7 +1188,13 @@ var isInHookUserCodeInDev = false;
1037
1188
  var currentHookNameInDev = void 0;
1038
1189
 
1039
1190
  function resolveCurrentlyRenderingComponent() {
1040
- !(currentlyRenderingComponent !== null) ? invariant(false, '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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.') : void 0;
1191
+ (function () {
1192
+ if (!(currentlyRenderingComponent !== null)) {
1193
+ {
1194
+ throw ReactError(Error('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://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.'));
1195
+ }
1196
+ }
1197
+ })();
1041
1198
  {
1042
1199
  !!isInHookUserCodeInDev ? warning$1(false, 'Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://fb.me/rules-of-hooks') : void 0;
1043
1200
  }
@@ -1070,7 +1227,13 @@ function areHookInputsEqual(nextDeps, prevDeps) {
1070
1227
 
1071
1228
  function createHook() {
1072
1229
  if (numberOfReRenders > 0) {
1073
- invariant(false, 'Rendered more hooks than during the previous render');
1230
+ (function () {
1231
+ {
1232
+ {
1233
+ throw ReactError(Error('Rendered more hooks than during the previous render'));
1234
+ }
1235
+ }
1236
+ })();
1074
1237
  }
1075
1238
  return {
1076
1239
  memoizedState: null,
@@ -1304,7 +1467,13 @@ function useLayoutEffect(create, inputs) {
1304
1467
  }
1305
1468
 
1306
1469
  function dispatchAction(componentIdentity, queue, action) {
1307
- !(numberOfReRenders < RE_RENDER_LIMIT) ? invariant(false, 'Too many re-renders. React limits the number of renders to prevent an infinite loop.') : void 0;
1470
+ (function () {
1471
+ if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
1472
+ {
1473
+ throw ReactError(Error('Too many re-renders. React limits the number of renders to prevent an infinite loop.'));
1474
+ }
1475
+ }
1476
+ })();
1308
1477
 
1309
1478
  if (componentIdentity === currentlyRenderingComponent) {
1310
1479
  // This is a render phase update. Stash it in a lazily-created map of
@@ -1341,6 +1510,13 @@ function useCallback(callback, deps) {
1341
1510
  return callback;
1342
1511
  }
1343
1512
 
1513
+ function useResponder(responder, props) {
1514
+ return {
1515
+ props: props,
1516
+ responder: responder
1517
+ };
1518
+ }
1519
+
1344
1520
  function noop() {}
1345
1521
 
1346
1522
  var currentThreadID = 0;
@@ -1363,7 +1539,8 @@ var Dispatcher = {
1363
1539
  // Effects are not run in the server environment.
1364
1540
  useEffect: noop,
1365
1541
  // Debugging effect
1366
- useDebugValue: noop
1542
+ useDebugValue: noop,
1543
+ useResponder: useResponder
1367
1544
  };
1368
1545
 
1369
1546
  var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
@@ -1401,14 +1578,14 @@ function getChildNamespace(parentNamespace, type) {
1401
1578
  return parentNamespace;
1402
1579
  }
1403
1580
 
1404
- var ReactDebugCurrentFrame$2 = null;
1581
+ var ReactDebugCurrentFrame$3 = null;
1405
1582
 
1406
1583
  var ReactControlledValuePropTypes = {
1407
1584
  checkPropTypes: null
1408
1585
  };
1409
1586
 
1410
1587
  {
1411
- ReactDebugCurrentFrame$2 = ReactSharedInternals.ReactDebugCurrentFrame;
1588
+ ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
1412
1589
 
1413
1590
  var hasReadOnlyValue = {
1414
1591
  button: true,
@@ -1422,13 +1599,13 @@ var ReactControlledValuePropTypes = {
1422
1599
 
1423
1600
  var propTypes = {
1424
1601
  value: function (props, propName, componentName) {
1425
- if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null) {
1602
+ if (hasReadOnlyValue[props.type] || props.onChange || props.readOnly || props.disabled || props[propName] == null || enableFlareAPI && props.listeners) {
1426
1603
  return null;
1427
1604
  }
1428
1605
  return new Error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
1429
1606
  },
1430
1607
  checked: function (props, propName, componentName) {
1431
- if (props.onChange || props.readOnly || props.disabled || props[propName] == null) {
1608
+ if (props.onChange || props.readOnly || props.disabled || props[propName] == null || enableFlareAPI && props.listeners) {
1432
1609
  return null;
1433
1610
  }
1434
1611
  return new Error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
@@ -1440,7 +1617,7 @@ var ReactControlledValuePropTypes = {
1440
1617
  * this outside of the ReactDOM controlled form components.
1441
1618
  */
1442
1619
  ReactControlledValuePropTypes.checkPropTypes = function (tagName, props) {
1443
- checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$2.getStackAddendum);
1620
+ checkPropTypes_1(propTypes, props, 'prop', tagName, ReactDebugCurrentFrame$3.getStackAddendum);
1444
1621
  };
1445
1622
  }
1446
1623
 
@@ -1477,9 +1654,9 @@ var voidElementTags = _assign({
1477
1654
  // or add stack by default to invariants where possible.
1478
1655
  var HTML = '__html';
1479
1656
 
1480
- var ReactDebugCurrentFrame$3 = null;
1657
+ var ReactDebugCurrentFrame$4 = null;
1481
1658
  {
1482
- ReactDebugCurrentFrame$3 = ReactSharedInternals.ReactDebugCurrentFrame;
1659
+ ReactDebugCurrentFrame$4 = ReactSharedInternals.ReactDebugCurrentFrame;
1483
1660
  }
1484
1661
 
1485
1662
  function assertValidProps(tag, props) {
@@ -1488,16 +1665,40 @@ function assertValidProps(tag, props) {
1488
1665
  }
1489
1666
  // Note the use of `==` which checks for null or undefined.
1490
1667
  if (voidElementTags[tag]) {
1491
- !(props.children == null && props.dangerouslySetInnerHTML == null) ? invariant(false, '%s is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.%s', tag, ReactDebugCurrentFrame$3.getStackAddendum()) : void 0;
1668
+ (function () {
1669
+ if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
1670
+ {
1671
+ throw ReactError(Error(tag + ' is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.' + (ReactDebugCurrentFrame$4.getStackAddendum())));
1672
+ }
1673
+ }
1674
+ })();
1492
1675
  }
1493
1676
  if (props.dangerouslySetInnerHTML != null) {
1494
- !(props.children == null) ? invariant(false, 'Can only set one of `children` or `props.dangerouslySetInnerHTML`.') : void 0;
1495
- !(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML) ? invariant(false, '`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.') : void 0;
1677
+ (function () {
1678
+ if (!(props.children == null)) {
1679
+ {
1680
+ throw ReactError(Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.'));
1681
+ }
1682
+ }
1683
+ })();
1684
+ (function () {
1685
+ if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
1686
+ {
1687
+ throw ReactError(Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://fb.me/react-invariant-dangerously-set-inner-html for more information.'));
1688
+ }
1689
+ }
1690
+ })();
1496
1691
  }
1497
1692
  {
1498
1693
  !(props.suppressContentEditableWarning || !props.contentEditable || props.children == null) ? warning$1(false, 'A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.') : void 0;
1499
1694
  }
1500
- !(props.style == null || typeof props.style === 'object') ? invariant(false, 'The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.%s', ReactDebugCurrentFrame$3.getStackAddendum()) : void 0;
1695
+ (function () {
1696
+ if (!(props.style == null || typeof props.style === 'object')) {
1697
+ {
1698
+ throw ReactError(Error('The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + \'em\'}} when using JSX.' + (ReactDebugCurrentFrame$4.getStackAddendum())));
1699
+ }
1700
+ }
1701
+ })();
1501
1702
  }
1502
1703
 
1503
1704
  /**
@@ -1998,6 +2199,7 @@ var possibleStandardNames = {
1998
2199
  defer: 'defer',
1999
2200
  dir: 'dir',
2000
2201
  disabled: 'disabled',
2202
+ disablepictureinpicture: 'disablePictureInPicture',
2001
2203
  download: 'download',
2002
2204
  draggable: 'draggable',
2003
2205
  enctype: 'encType',
@@ -2704,6 +2906,7 @@ var didWarnDefaultTextareaValue = false;
2704
2906
  var didWarnInvalidOptionChildren = false;
2705
2907
  var didWarnAboutNoopUpdateForComponent = {};
2706
2908
  var didWarnAboutBadClass = {};
2909
+ var didWarnAboutModulePatternComponent = {};
2707
2910
  var didWarnAboutDeprecatedWillMount = {};
2708
2911
  var didWarnAboutUndefinedDerivedState = {};
2709
2912
  var didWarnAboutUninitializedState = {};
@@ -2721,7 +2924,13 @@ var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
2721
2924
  var validatedTagCache = {};
2722
2925
  function validateDangerousTag(tag) {
2723
2926
  if (!validatedTagCache.hasOwnProperty(tag)) {
2724
- !VALID_TAG_REGEX.test(tag) ? invariant(false, 'Invalid tag: %s', tag) : void 0;
2927
+ (function () {
2928
+ if (!VALID_TAG_REGEX.test(tag)) {
2929
+ {
2930
+ throw ReactError(Error('Invalid tag: ' + tag));
2931
+ }
2932
+ }
2933
+ })();
2725
2934
  validatedTagCache[tag] = true;
2726
2935
  }
2727
2936
  }
@@ -2751,7 +2960,7 @@ function createMarkupForStyles(styles) {
2751
2960
  }
2752
2961
  }
2753
2962
  if (styleValue != null) {
2754
- serialized += delimiter + processStyleName(styleName) + ':';
2963
+ serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
2755
2964
  serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
2756
2965
 
2757
2966
  delimiter = ';';
@@ -2847,6 +3056,9 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
2847
3056
  if (!hasOwnProperty.call(props, propKey)) {
2848
3057
  continue;
2849
3058
  }
3059
+ if (enableFlareAPI && propKey === 'listeners') {
3060
+ continue;
3061
+ }
2850
3062
  var propValue = props[propKey];
2851
3063
  if (propValue == null) {
2852
3064
  continue;
@@ -2881,7 +3093,13 @@ function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeSt
2881
3093
 
2882
3094
  function validateRenderResult(child, type) {
2883
3095
  if (child === undefined) {
2884
- invariant(false, '%s(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.', getComponentName(type) || 'Component');
3096
+ (function () {
3097
+ {
3098
+ {
3099
+ throw ReactError(Error((getComponentName(type) || 'Component') + '(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.'));
3100
+ }
3101
+ }
3102
+ })();
2885
3103
  }
2886
3104
  }
2887
3105
 
@@ -2901,7 +3119,8 @@ function resolve(child, context, threadID) {
2901
3119
 
2902
3120
  // Extra closure so queue and replace can be captured properly
2903
3121
  function processChild(element, Component) {
2904
- var publicContext = processContext(Component, context, threadID);
3122
+ var isClass = shouldConstruct(Component);
3123
+ var publicContext = processContext(Component, context, threadID, isClass);
2905
3124
 
2906
3125
  var queue = [];
2907
3126
  var replace = false;
@@ -2929,7 +3148,7 @@ function resolve(child, context, threadID) {
2929
3148
  };
2930
3149
 
2931
3150
  var inst = void 0;
2932
- if (shouldConstruct(Component)) {
3151
+ if (isClass) {
2933
3152
  inst = new Component(element.props, publicContext, updater);
2934
3153
 
2935
3154
  if (typeof Component.getDerivedStateFromProps === 'function') {
@@ -2980,6 +3199,14 @@ function resolve(child, context, threadID) {
2980
3199
  validateRenderResult(child, Component);
2981
3200
  return;
2982
3201
  }
3202
+
3203
+ {
3204
+ var _componentName3 = getComponentName(Component) || 'Unknown';
3205
+ if (!didWarnAboutModulePatternComponent[_componentName3]) {
3206
+ warningWithoutStack$1(false, 'The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName3, _componentName3, _componentName3);
3207
+ didWarnAboutModulePatternComponent[_componentName3] = true;
3208
+ }
3209
+ }
2983
3210
  }
2984
3211
 
2985
3212
  inst.props = element.props;
@@ -2994,11 +3221,13 @@ function resolve(child, context, threadID) {
2994
3221
  if (typeof inst.componentWillMount === 'function') {
2995
3222
  {
2996
3223
  if (warnAboutDeprecatedLifecycles && inst.componentWillMount.__suppressDeprecationWarning !== true) {
2997
- var _componentName3 = getComponentName(Component) || 'Unknown';
3224
+ var _componentName4 = getComponentName(Component) || 'Unknown';
2998
3225
 
2999
- if (!didWarnAboutDeprecatedWillMount[_componentName3]) {
3000
- lowPriorityWarning$1(false, '%s: componentWillMount() is deprecated and will be ' + 'removed in the next major version. Read about the motivations ' + 'behind this change: ' + 'https://fb.me/react-async-component-lifecycle-hooks' + '\n\n' + 'As a temporary workaround, you can rename to ' + 'UNSAFE_componentWillMount instead.', _componentName3);
3001
- didWarnAboutDeprecatedWillMount[_componentName3] = true;
3226
+ if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
3227
+ lowPriorityWarning$1(false,
3228
+ // keep this warning in sync with ReactStrictModeWarning.js
3229
+ 'componentWillMount has been renamed, and is not recommended for use. ' + 'See https://fb.me/react-async-component-lifecycle-hooks for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', _componentName4);
3230
+ didWarnAboutDeprecatedWillMount[_componentName4] = true;
3002
3231
  }
3003
3232
  }
3004
3233
  }
@@ -3055,19 +3284,34 @@ function resolve(child, context, threadID) {
3055
3284
  validateRenderResult(child, Component);
3056
3285
 
3057
3286
  var childContext = void 0;
3058
- if (typeof inst.getChildContext === 'function') {
3059
- var childContextTypes = Component.childContextTypes;
3060
- if (typeof childContextTypes === 'object') {
3061
- childContext = inst.getChildContext();
3062
- for (var contextKey in childContext) {
3063
- !(contextKey in childContextTypes) ? invariant(false, '%s.getChildContext(): key "%s" is not defined in childContextTypes.', getComponentName(Component) || 'Unknown', contextKey) : void 0;
3287
+ if (disableLegacyContext) {
3288
+ {
3289
+ var childContextTypes = Component.childContextTypes;
3290
+ if (childContextTypes !== undefined) {
3291
+ warningWithoutStack$1(false, '%s uses the legacy childContextTypes API which is no longer supported. ' + 'Use React.createContext() instead.', getComponentName(Component) || 'Unknown');
3064
3292
  }
3065
- } else {
3066
- warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
3067
3293
  }
3068
- }
3069
- if (childContext) {
3070
- context = _assign({}, context, childContext);
3294
+ } else {
3295
+ if (typeof inst.getChildContext === 'function') {
3296
+ var _childContextTypes = Component.childContextTypes;
3297
+ if (typeof _childContextTypes === 'object') {
3298
+ childContext = inst.getChildContext();
3299
+ for (var contextKey in childContext) {
3300
+ (function () {
3301
+ if (!(contextKey in _childContextTypes)) {
3302
+ {
3303
+ throw ReactError(Error((getComponentName(Component) || 'Unknown') + '.getChildContext(): key "' + contextKey + '" is not defined in childContextTypes.'));
3304
+ }
3305
+ }
3306
+ })();
3307
+ }
3308
+ } else {
3309
+ warningWithoutStack$1(false, '%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
3310
+ }
3311
+ }
3312
+ if (childContext) {
3313
+ context = _assign({}, context, childContext);
3314
+ }
3071
3315
  }
3072
3316
  }
3073
3317
  return { child: child, context: context };
@@ -3223,8 +3467,15 @@ var ReactDOMServerRenderer = function () {
3223
3467
  suspended = false;
3224
3468
  // If rendering was suspended at this boundary, render the fallbackFrame
3225
3469
  var _fallbackFrame = frame.fallbackFrame;
3226
- !_fallbackFrame ? invariant(false, 'suspense fallback not found, something is broken') : void 0;
3470
+ (function () {
3471
+ if (!_fallbackFrame) {
3472
+ {
3473
+ throw ReactError(Error('suspense fallback not found, something is broken'));
3474
+ }
3475
+ }
3476
+ })();
3227
3477
  this.stack.push(_fallbackFrame);
3478
+ out[this.suspenseDepth] += '<!--$!-->';
3228
3479
  // Skip flushing output since we're switching to the fallback
3229
3480
  continue;
3230
3481
  } else {
@@ -3297,9 +3548,21 @@ var ReactDOMServerRenderer = function () {
3297
3548
  if (nextChild != null && nextChild.$$typeof != null) {
3298
3549
  // Catch unexpected special types early.
3299
3550
  var $$typeof = nextChild.$$typeof;
3300
- !($$typeof !== REACT_PORTAL_TYPE) ? invariant(false, 'Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.') : void 0;
3551
+ (function () {
3552
+ if (!($$typeof !== REACT_PORTAL_TYPE)) {
3553
+ {
3554
+ throw ReactError(Error('Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render.'));
3555
+ }
3556
+ }
3557
+ })();
3301
3558
  // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
3302
- invariant(false, 'Unknown element-like object type: %s. This is likely a bug in React. Please file an issue.', $$typeof.toString());
3559
+ (function () {
3560
+ {
3561
+ {
3562
+ throw ReactError(Error('Unknown element-like object type: ' + $$typeof.toString() + '. This is likely a bug in React. Please file an issue.'));
3563
+ }
3564
+ }
3565
+ })();
3303
3566
  }
3304
3567
  var nextChildren = toArray(nextChild);
3305
3568
  var frame = {
@@ -3328,6 +3591,7 @@ var ReactDOMServerRenderer = function () {
3328
3591
  case REACT_STRICT_MODE_TYPE:
3329
3592
  case REACT_CONCURRENT_MODE_TYPE:
3330
3593
  case REACT_PROFILER_TYPE:
3594
+ case REACT_SUSPENSE_LIST_TYPE:
3331
3595
  case REACT_FRAGMENT_TYPE:
3332
3596
  {
3333
3597
  var _nextChildren = toArray(nextChild.props.children);
@@ -3374,8 +3638,7 @@ var ReactDOMServerRenderer = function () {
3374
3638
  children: fallbackChildren,
3375
3639
  childIndex: 0,
3376
3640
  context: context,
3377
- footer: '',
3378
- out: ''
3641
+ footer: '<!--/$-->'
3379
3642
  };
3380
3643
  var _frame2 = {
3381
3644
  fallbackFrame: _fallbackFrame2,
@@ -3394,7 +3657,13 @@ var ReactDOMServerRenderer = function () {
3394
3657
  this.suspenseDepth++;
3395
3658
  return '<!--$-->';
3396
3659
  } else {
3397
- invariant(false, 'ReactDOMServer does not yet support Suspense.');
3660
+ (function () {
3661
+ {
3662
+ {
3663
+ throw ReactError(Error('ReactDOMServer does not yet support Suspense.'));
3664
+ }
3665
+ }
3666
+ })();
3398
3667
  }
3399
3668
  }
3400
3669
  // eslint-disable-next-line-no-fallthrough
@@ -3511,8 +3780,46 @@ var ReactDOMServerRenderer = function () {
3511
3780
  this.stack.push(_frame7);
3512
3781
  return '';
3513
3782
  }
3783
+ // eslint-disable-next-line-no-fallthrough
3784
+ case REACT_FUNDAMENTAL_TYPE:
3785
+ {
3786
+ if (enableFundamentalAPI) {
3787
+ var fundamentalImpl = elementType.impl;
3788
+ var open = fundamentalImpl.getServerSideString(null, nextElement.props);
3789
+ var getServerSideStringClose = fundamentalImpl.getServerSideStringClose;
3790
+ var close = getServerSideStringClose !== undefined ? getServerSideStringClose(null, nextElement.props) : '';
3791
+ var _nextChildren8 = fundamentalImpl.reconcileChildren !== false ? toArray(nextChild.props.children) : [];
3792
+ var _frame8 = {
3793
+ type: null,
3794
+ domNamespace: parentNamespace,
3795
+ children: _nextChildren8,
3796
+ childIndex: 0,
3797
+ context: context,
3798
+ footer: close
3799
+ };
3800
+ {
3801
+ _frame8.debugElementStack = [];
3802
+ }
3803
+ this.stack.push(_frame8);
3804
+ return open;
3805
+ }
3806
+ (function () {
3807
+ {
3808
+ {
3809
+ throw ReactError(Error('ReactDOMServer does not yet support the fundamental API.'));
3810
+ }
3811
+ }
3812
+ })();
3813
+ }
3814
+ // eslint-disable-next-line-no-fallthrough
3514
3815
  case REACT_LAZY_TYPE:
3515
- invariant(false, 'ReactDOMServer does not yet support lazy-loaded components.');
3816
+ (function () {
3817
+ {
3818
+ {
3819
+ throw ReactError(Error('ReactDOMServer does not yet support lazy-loaded components.'));
3820
+ }
3821
+ }
3822
+ })();
3516
3823
  }
3517
3824
  }
3518
3825
 
@@ -3527,7 +3834,13 @@ var ReactDOMServerRenderer = function () {
3527
3834
  info += '\n\nCheck the render method of `' + ownerName + '`.';
3528
3835
  }
3529
3836
  }
3530
- invariant(false, 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s', elementType == null ? elementType : typeof elementType, info);
3837
+ (function () {
3838
+ {
3839
+ {
3840
+ throw ReactError(Error('Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: ' + (elementType == null ? elementType : typeof elementType) + '.' + info));
3841
+ }
3842
+ }
3843
+ })();
3531
3844
  }
3532
3845
  };
3533
3846
 
@@ -3590,9 +3903,21 @@ var ReactDOMServerRenderer = function () {
3590
3903
  {
3591
3904
  warning$1(false, 'Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
3592
3905
  }
3593
- !(defaultValue == null) ? invariant(false, 'If you supply `defaultValue` on a <textarea>, do not pass children.') : void 0;
3906
+ (function () {
3907
+ if (!(defaultValue == null)) {
3908
+ {
3909
+ throw ReactError(Error('If you supply `defaultValue` on a <textarea>, do not pass children.'));
3910
+ }
3911
+ }
3912
+ })();
3594
3913
  if (Array.isArray(textareaChildren)) {
3595
- !(textareaChildren.length <= 1) ? invariant(false, '<textarea> can only have at most one child.') : void 0;
3914
+ (function () {
3915
+ if (!(textareaChildren.length <= 1)) {
3916
+ {
3917
+ throw ReactError(Error('<textarea> can only have at most one child.'));
3918
+ }
3919
+ }
3920
+ })();
3596
3921
  textareaChildren = textareaChildren[0];
3597
3922
  }
3598
3923
 
@@ -3753,11 +4078,23 @@ function renderToStaticMarkup(element) {
3753
4078
  }
3754
4079
 
3755
4080
  function renderToNodeStream() {
3756
- invariant(false, 'ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.');
4081
+ (function () {
4082
+ {
4083
+ {
4084
+ throw ReactError(Error('ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead.'));
4085
+ }
4086
+ }
4087
+ })();
3757
4088
  }
3758
4089
 
3759
4090
  function renderToStaticNodeStream() {
3760
- invariant(false, 'ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.');
4091
+ (function () {
4092
+ {
4093
+ {
4094
+ throw ReactError(Error('ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.'));
4095
+ }
4096
+ }
4097
+ })();
3761
4098
  }
3762
4099
 
3763
4100
  // Note: when changing this, also consider https://github.com/facebook/react/issues/11526