react-dom 18.2.0 → 19.2.3

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 (58) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +3 -3
  3. package/cjs/react-dom-client.development.js +28121 -0
  4. package/cjs/react-dom-client.production.js +16049 -0
  5. package/cjs/react-dom-profiling.development.js +28503 -0
  6. package/cjs/react-dom-profiling.profiling.js +18068 -0
  7. package/cjs/react-dom-server-legacy.browser.development.js +9783 -6924
  8. package/cjs/react-dom-server-legacy.browser.production.js +6603 -0
  9. package/cjs/react-dom-server-legacy.node.development.js +9788 -6989
  10. package/cjs/react-dom-server-legacy.node.production.js +6692 -0
  11. package/cjs/react-dom-server.browser.development.js +10526 -6928
  12. package/cjs/react-dom-server.browser.production.js +7410 -0
  13. package/cjs/react-dom-server.bun.development.js +9605 -0
  14. package/cjs/react-dom-server.bun.production.js +6745 -0
  15. package/cjs/react-dom-server.edge.development.js +10620 -0
  16. package/cjs/react-dom-server.edge.production.js +7512 -0
  17. package/cjs/react-dom-server.node.development.js +10731 -6988
  18. package/cjs/react-dom-server.node.production.js +7707 -0
  19. package/cjs/react-dom-test-utils.development.js +13 -1730
  20. package/cjs/react-dom-test-utils.production.js +21 -0
  21. package/cjs/react-dom.development.js +409 -29853
  22. package/cjs/react-dom.production.js +210 -0
  23. package/cjs/react-dom.react-server.development.js +340 -0
  24. package/cjs/react-dom.react-server.production.js +152 -0
  25. package/client.js +33 -20
  26. package/client.react-server.js +5 -0
  27. package/index.js +1 -1
  28. package/package.json +75 -20
  29. package/profiling.js +2 -2
  30. package/profiling.react-server.js +5 -0
  31. package/react-dom.react-server.js +7 -0
  32. package/server.browser.js +3 -4
  33. package/server.bun.js +17 -0
  34. package/server.edge.js +17 -0
  35. package/server.node.js +5 -4
  36. package/server.react-server.js +5 -0
  37. package/static.browser.js +12 -0
  38. package/static.edge.js +12 -0
  39. package/static.js +3 -0
  40. package/static.node.js +14 -0
  41. package/static.react-server.js +5 -0
  42. package/test-utils.js +1 -1
  43. package/cjs/react-dom-server-legacy.browser.production.min.js +0 -93
  44. package/cjs/react-dom-server-legacy.node.production.min.js +0 -101
  45. package/cjs/react-dom-server.browser.production.min.js +0 -96
  46. package/cjs/react-dom-server.node.production.min.js +0 -102
  47. package/cjs/react-dom-test-utils.production.min.js +0 -40
  48. package/cjs/react-dom.production.min.js +0 -323
  49. package/cjs/react-dom.profiling.min.js +0 -367
  50. package/umd/react-dom-server-legacy.browser.development.js +0 -7015
  51. package/umd/react-dom-server-legacy.browser.production.min.js +0 -75
  52. package/umd/react-dom-server.browser.development.js +0 -7000
  53. package/umd/react-dom-server.browser.production.min.js +0 -76
  54. package/umd/react-dom-test-utils.development.js +0 -1737
  55. package/umd/react-dom-test-utils.production.min.js +0 -33
  56. package/umd/react-dom.development.js +0 -29869
  57. package/umd/react-dom.production.min.js +0 -267
  58. package/umd/react-dom.profiling.min.js +0 -285
@@ -0,0 +1,210 @@
1
+ /**
2
+ * @license React
3
+ * react-dom.production.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
+ var React = require("react");
13
+ function formatProdErrorMessage(code) {
14
+ var url = "https://react.dev/errors/" + code;
15
+ if (1 < arguments.length) {
16
+ url += "?args[]=" + encodeURIComponent(arguments[1]);
17
+ for (var i = 2; i < arguments.length; i++)
18
+ url += "&args[]=" + encodeURIComponent(arguments[i]);
19
+ }
20
+ return (
21
+ "Minified React error #" +
22
+ code +
23
+ "; visit " +
24
+ url +
25
+ " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."
26
+ );
27
+ }
28
+ function noop() {}
29
+ var Internals = {
30
+ d: {
31
+ f: noop,
32
+ r: function () {
33
+ throw Error(formatProdErrorMessage(522));
34
+ },
35
+ D: noop,
36
+ C: noop,
37
+ L: noop,
38
+ m: noop,
39
+ X: noop,
40
+ S: noop,
41
+ M: noop
42
+ },
43
+ p: 0,
44
+ findDOMNode: null
45
+ },
46
+ REACT_PORTAL_TYPE = Symbol.for("react.portal");
47
+ function createPortal$1(children, containerInfo, implementation) {
48
+ var key =
49
+ 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
50
+ return {
51
+ $$typeof: REACT_PORTAL_TYPE,
52
+ key: null == key ? null : "" + key,
53
+ children: children,
54
+ containerInfo: containerInfo,
55
+ implementation: implementation
56
+ };
57
+ }
58
+ var ReactSharedInternals =
59
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
60
+ function getCrossOriginStringAs(as, input) {
61
+ if ("font" === as) return "";
62
+ if ("string" === typeof input)
63
+ return "use-credentials" === input ? input : "";
64
+ }
65
+ exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
66
+ Internals;
67
+ exports.createPortal = function (children, container) {
68
+ var key =
69
+ 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
70
+ if (
71
+ !container ||
72
+ (1 !== container.nodeType &&
73
+ 9 !== container.nodeType &&
74
+ 11 !== container.nodeType)
75
+ )
76
+ throw Error(formatProdErrorMessage(299));
77
+ return createPortal$1(children, container, null, key);
78
+ };
79
+ exports.flushSync = function (fn) {
80
+ var previousTransition = ReactSharedInternals.T,
81
+ previousUpdatePriority = Internals.p;
82
+ try {
83
+ if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();
84
+ } finally {
85
+ (ReactSharedInternals.T = previousTransition),
86
+ (Internals.p = previousUpdatePriority),
87
+ Internals.d.f();
88
+ }
89
+ };
90
+ exports.preconnect = function (href, options) {
91
+ "string" === typeof href &&
92
+ (options
93
+ ? ((options = options.crossOrigin),
94
+ (options =
95
+ "string" === typeof options
96
+ ? "use-credentials" === options
97
+ ? options
98
+ : ""
99
+ : void 0))
100
+ : (options = null),
101
+ Internals.d.C(href, options));
102
+ };
103
+ exports.prefetchDNS = function (href) {
104
+ "string" === typeof href && Internals.d.D(href);
105
+ };
106
+ exports.preinit = function (href, options) {
107
+ if ("string" === typeof href && options && "string" === typeof options.as) {
108
+ var as = options.as,
109
+ crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
110
+ integrity =
111
+ "string" === typeof options.integrity ? options.integrity : void 0,
112
+ fetchPriority =
113
+ "string" === typeof options.fetchPriority
114
+ ? options.fetchPriority
115
+ : void 0;
116
+ "style" === as
117
+ ? Internals.d.S(
118
+ href,
119
+ "string" === typeof options.precedence ? options.precedence : void 0,
120
+ {
121
+ crossOrigin: crossOrigin,
122
+ integrity: integrity,
123
+ fetchPriority: fetchPriority
124
+ }
125
+ )
126
+ : "script" === as &&
127
+ Internals.d.X(href, {
128
+ crossOrigin: crossOrigin,
129
+ integrity: integrity,
130
+ fetchPriority: fetchPriority,
131
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
132
+ });
133
+ }
134
+ };
135
+ exports.preinitModule = function (href, options) {
136
+ if ("string" === typeof href)
137
+ if ("object" === typeof options && null !== options) {
138
+ if (null == options.as || "script" === options.as) {
139
+ var crossOrigin = getCrossOriginStringAs(
140
+ options.as,
141
+ options.crossOrigin
142
+ );
143
+ Internals.d.M(href, {
144
+ crossOrigin: crossOrigin,
145
+ integrity:
146
+ "string" === typeof options.integrity ? options.integrity : void 0,
147
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
148
+ });
149
+ }
150
+ } else null == options && Internals.d.M(href);
151
+ };
152
+ exports.preload = function (href, options) {
153
+ if (
154
+ "string" === typeof href &&
155
+ "object" === typeof options &&
156
+ null !== options &&
157
+ "string" === typeof options.as
158
+ ) {
159
+ var as = options.as,
160
+ crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
161
+ Internals.d.L(href, as, {
162
+ crossOrigin: crossOrigin,
163
+ integrity:
164
+ "string" === typeof options.integrity ? options.integrity : void 0,
165
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0,
166
+ type: "string" === typeof options.type ? options.type : void 0,
167
+ fetchPriority:
168
+ "string" === typeof options.fetchPriority
169
+ ? options.fetchPriority
170
+ : void 0,
171
+ referrerPolicy:
172
+ "string" === typeof options.referrerPolicy
173
+ ? options.referrerPolicy
174
+ : void 0,
175
+ imageSrcSet:
176
+ "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
177
+ imageSizes:
178
+ "string" === typeof options.imageSizes ? options.imageSizes : void 0,
179
+ media: "string" === typeof options.media ? options.media : void 0
180
+ });
181
+ }
182
+ };
183
+ exports.preloadModule = function (href, options) {
184
+ if ("string" === typeof href)
185
+ if (options) {
186
+ var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
187
+ Internals.d.m(href, {
188
+ as:
189
+ "string" === typeof options.as && "script" !== options.as
190
+ ? options.as
191
+ : void 0,
192
+ crossOrigin: crossOrigin,
193
+ integrity:
194
+ "string" === typeof options.integrity ? options.integrity : void 0
195
+ });
196
+ } else Internals.d.m(href);
197
+ };
198
+ exports.requestFormReset = function (form) {
199
+ Internals.d.r(form);
200
+ };
201
+ exports.unstable_batchedUpdates = function (fn, a) {
202
+ return fn(a);
203
+ };
204
+ exports.useFormState = function (action, initialState, permalink) {
205
+ return ReactSharedInternals.H.useFormState(action, initialState, permalink);
206
+ };
207
+ exports.useFormStatus = function () {
208
+ return ReactSharedInternals.H.useHostTransitionStatus();
209
+ };
210
+ exports.version = "19.2.3";
@@ -0,0 +1,340 @@
1
+ /**
2
+ * @license React
3
+ * react-dom.react-server.development.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ "use strict";
12
+ "production" !== process.env.NODE_ENV &&
13
+ (function () {
14
+ function noop() {}
15
+ function getCrossOriginStringAs(as, input) {
16
+ if ("font" === as) return "";
17
+ if ("string" === typeof input)
18
+ return "use-credentials" === input ? input : "";
19
+ }
20
+ function getValueDescriptorExpectingObjectForWarning(thing) {
21
+ return null === thing
22
+ ? "`null`"
23
+ : void 0 === thing
24
+ ? "`undefined`"
25
+ : "" === thing
26
+ ? "an empty string"
27
+ : 'something with type "' + typeof thing + '"';
28
+ }
29
+ function getValueDescriptorExpectingEnumForWarning(thing) {
30
+ return null === thing
31
+ ? "`null`"
32
+ : void 0 === thing
33
+ ? "`undefined`"
34
+ : "" === thing
35
+ ? "an empty string"
36
+ : "string" === typeof thing
37
+ ? JSON.stringify(thing)
38
+ : "number" === typeof thing
39
+ ? "`" + thing + "`"
40
+ : 'something with type "' + typeof thing + '"';
41
+ }
42
+ var React = require("react"),
43
+ Internals = {
44
+ d: {
45
+ f: noop,
46
+ r: function () {
47
+ throw Error(
48
+ "Invalid form element. requestFormReset must be passed a form that was rendered by React."
49
+ );
50
+ },
51
+ D: noop,
52
+ C: noop,
53
+ L: noop,
54
+ m: noop,
55
+ X: noop,
56
+ S: noop,
57
+ M: noop
58
+ },
59
+ p: 0,
60
+ findDOMNode: null
61
+ };
62
+ if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
63
+ throw Error(
64
+ '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.'
65
+ );
66
+ ("function" === typeof Map &&
67
+ null != Map.prototype &&
68
+ "function" === typeof Map.prototype.forEach &&
69
+ "function" === typeof Set &&
70
+ null != Set.prototype &&
71
+ "function" === typeof Set.prototype.clear &&
72
+ "function" === typeof Set.prototype.forEach) ||
73
+ console.error(
74
+ "React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"
75
+ );
76
+ exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
77
+ Internals;
78
+ exports.preconnect = function (href, options) {
79
+ "string" === typeof href && href
80
+ ? null != options && "object" !== typeof options
81
+ ? console.error(
82
+ "ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",
83
+ getValueDescriptorExpectingEnumForWarning(options)
84
+ )
85
+ : null != options &&
86
+ "string" !== typeof options.crossOrigin &&
87
+ console.error(
88
+ "ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",
89
+ getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
90
+ )
91
+ : console.error(
92
+ "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
93
+ getValueDescriptorExpectingObjectForWarning(href)
94
+ );
95
+ "string" === typeof href &&
96
+ (options
97
+ ? ((options = options.crossOrigin),
98
+ (options =
99
+ "string" === typeof options
100
+ ? "use-credentials" === options
101
+ ? options
102
+ : ""
103
+ : void 0))
104
+ : (options = null),
105
+ Internals.d.C(href, options));
106
+ };
107
+ exports.prefetchDNS = function (href) {
108
+ if ("string" !== typeof href || !href)
109
+ console.error(
110
+ "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
111
+ getValueDescriptorExpectingObjectForWarning(href)
112
+ );
113
+ else if (1 < arguments.length) {
114
+ var options = arguments[1];
115
+ "object" === typeof options && options.hasOwnProperty("crossOrigin")
116
+ ? console.error(
117
+ "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
118
+ getValueDescriptorExpectingEnumForWarning(options)
119
+ )
120
+ : console.error(
121
+ "ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",
122
+ getValueDescriptorExpectingEnumForWarning(options)
123
+ );
124
+ }
125
+ "string" === typeof href && Internals.d.D(href);
126
+ };
127
+ exports.preinit = function (href, options) {
128
+ "string" === typeof href && href
129
+ ? null == options || "object" !== typeof options
130
+ ? console.error(
131
+ "ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",
132
+ getValueDescriptorExpectingEnumForWarning(options)
133
+ )
134
+ : "style" !== options.as &&
135
+ "script" !== options.as &&
136
+ console.error(
137
+ 'ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',
138
+ getValueDescriptorExpectingEnumForWarning(options.as)
139
+ )
140
+ : console.error(
141
+ "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
142
+ getValueDescriptorExpectingObjectForWarning(href)
143
+ );
144
+ if (
145
+ "string" === typeof href &&
146
+ options &&
147
+ "string" === typeof options.as
148
+ ) {
149
+ var as = options.as,
150
+ crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
151
+ integrity =
152
+ "string" === typeof options.integrity ? options.integrity : void 0,
153
+ fetchPriority =
154
+ "string" === typeof options.fetchPriority
155
+ ? options.fetchPriority
156
+ : void 0;
157
+ "style" === as
158
+ ? Internals.d.S(
159
+ href,
160
+ "string" === typeof options.precedence
161
+ ? options.precedence
162
+ : void 0,
163
+ {
164
+ crossOrigin: crossOrigin,
165
+ integrity: integrity,
166
+ fetchPriority: fetchPriority
167
+ }
168
+ )
169
+ : "script" === as &&
170
+ Internals.d.X(href, {
171
+ crossOrigin: crossOrigin,
172
+ integrity: integrity,
173
+ fetchPriority: fetchPriority,
174
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
175
+ });
176
+ }
177
+ };
178
+ exports.preinitModule = function (href, options) {
179
+ var encountered = "";
180
+ ("string" === typeof href && href) ||
181
+ (encountered +=
182
+ " The `href` argument encountered was " +
183
+ getValueDescriptorExpectingObjectForWarning(href) +
184
+ ".");
185
+ void 0 !== options && "object" !== typeof options
186
+ ? (encountered +=
187
+ " The `options` argument encountered was " +
188
+ getValueDescriptorExpectingObjectForWarning(options) +
189
+ ".")
190
+ : options &&
191
+ "as" in options &&
192
+ "script" !== options.as &&
193
+ (encountered +=
194
+ " The `as` option encountered was " +
195
+ getValueDescriptorExpectingEnumForWarning(options.as) +
196
+ ".");
197
+ if (encountered)
198
+ console.error(
199
+ "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
200
+ encountered
201
+ );
202
+ else
203
+ switch (
204
+ ((encountered =
205
+ options && "string" === typeof options.as ? options.as : "script"),
206
+ encountered)
207
+ ) {
208
+ case "script":
209
+ break;
210
+ default:
211
+ (encountered =
212
+ getValueDescriptorExpectingEnumForWarning(encountered)),
213
+ console.error(
214
+ 'ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',
215
+ encountered,
216
+ href
217
+ );
218
+ }
219
+ if ("string" === typeof href)
220
+ if ("object" === typeof options && null !== options) {
221
+ if (null == options.as || "script" === options.as)
222
+ (encountered = getCrossOriginStringAs(
223
+ options.as,
224
+ options.crossOrigin
225
+ )),
226
+ Internals.d.M(href, {
227
+ crossOrigin: encountered,
228
+ integrity:
229
+ "string" === typeof options.integrity
230
+ ? options.integrity
231
+ : void 0,
232
+ nonce:
233
+ "string" === typeof options.nonce ? options.nonce : void 0
234
+ });
235
+ } else null == options && Internals.d.M(href);
236
+ };
237
+ exports.preload = function (href, options) {
238
+ var encountered = "";
239
+ ("string" === typeof href && href) ||
240
+ (encountered +=
241
+ " The `href` argument encountered was " +
242
+ getValueDescriptorExpectingObjectForWarning(href) +
243
+ ".");
244
+ null == options || "object" !== typeof options
245
+ ? (encountered +=
246
+ " The `options` argument encountered was " +
247
+ getValueDescriptorExpectingObjectForWarning(options) +
248
+ ".")
249
+ : ("string" === typeof options.as && options.as) ||
250
+ (encountered +=
251
+ " The `as` option encountered was " +
252
+ getValueDescriptorExpectingObjectForWarning(options.as) +
253
+ ".");
254
+ encountered &&
255
+ console.error(
256
+ 'ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',
257
+ encountered
258
+ );
259
+ if (
260
+ "string" === typeof href &&
261
+ "object" === typeof options &&
262
+ null !== options &&
263
+ "string" === typeof options.as
264
+ ) {
265
+ encountered = options.as;
266
+ var crossOrigin = getCrossOriginStringAs(
267
+ encountered,
268
+ options.crossOrigin
269
+ );
270
+ Internals.d.L(href, encountered, {
271
+ crossOrigin: crossOrigin,
272
+ integrity:
273
+ "string" === typeof options.integrity ? options.integrity : void 0,
274
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0,
275
+ type: "string" === typeof options.type ? options.type : void 0,
276
+ fetchPriority:
277
+ "string" === typeof options.fetchPriority
278
+ ? options.fetchPriority
279
+ : void 0,
280
+ referrerPolicy:
281
+ "string" === typeof options.referrerPolicy
282
+ ? options.referrerPolicy
283
+ : void 0,
284
+ imageSrcSet:
285
+ "string" === typeof options.imageSrcSet
286
+ ? options.imageSrcSet
287
+ : void 0,
288
+ imageSizes:
289
+ "string" === typeof options.imageSizes
290
+ ? options.imageSizes
291
+ : void 0,
292
+ media: "string" === typeof options.media ? options.media : void 0
293
+ });
294
+ }
295
+ };
296
+ exports.preloadModule = function (href, options) {
297
+ var encountered = "";
298
+ ("string" === typeof href && href) ||
299
+ (encountered +=
300
+ " The `href` argument encountered was " +
301
+ getValueDescriptorExpectingObjectForWarning(href) +
302
+ ".");
303
+ void 0 !== options && "object" !== typeof options
304
+ ? (encountered +=
305
+ " The `options` argument encountered was " +
306
+ getValueDescriptorExpectingObjectForWarning(options) +
307
+ ".")
308
+ : options &&
309
+ "as" in options &&
310
+ "string" !== typeof options.as &&
311
+ (encountered +=
312
+ " The `as` option encountered was " +
313
+ getValueDescriptorExpectingObjectForWarning(options.as) +
314
+ ".");
315
+ encountered &&
316
+ console.error(
317
+ 'ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',
318
+ encountered
319
+ );
320
+ "string" === typeof href &&
321
+ (options
322
+ ? ((encountered = getCrossOriginStringAs(
323
+ options.as,
324
+ options.crossOrigin
325
+ )),
326
+ Internals.d.m(href, {
327
+ as:
328
+ "string" === typeof options.as && "script" !== options.as
329
+ ? options.as
330
+ : void 0,
331
+ crossOrigin: encountered,
332
+ integrity:
333
+ "string" === typeof options.integrity
334
+ ? options.integrity
335
+ : void 0
336
+ }))
337
+ : Internals.d.m(href));
338
+ };
339
+ exports.version = "19.2.3";
340
+ })();
@@ -0,0 +1,152 @@
1
+ /**
2
+ * @license React
3
+ * react-dom.react-server.production.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
+ var React = require("react");
13
+ function noop() {}
14
+ var Internals = {
15
+ d: {
16
+ f: noop,
17
+ r: function () {
18
+ throw Error(
19
+ "Invalid form element. requestFormReset must be passed a form that was rendered by React."
20
+ );
21
+ },
22
+ D: noop,
23
+ C: noop,
24
+ L: noop,
25
+ m: noop,
26
+ X: noop,
27
+ S: noop,
28
+ M: noop
29
+ },
30
+ p: 0,
31
+ findDOMNode: null
32
+ };
33
+ if (!React.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)
34
+ throw Error(
35
+ '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.'
36
+ );
37
+ function getCrossOriginStringAs(as, input) {
38
+ if ("font" === as) return "";
39
+ if ("string" === typeof input)
40
+ return "use-credentials" === input ? input : "";
41
+ }
42
+ exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
43
+ Internals;
44
+ exports.preconnect = function (href, options) {
45
+ "string" === typeof href &&
46
+ (options
47
+ ? ((options = options.crossOrigin),
48
+ (options =
49
+ "string" === typeof options
50
+ ? "use-credentials" === options
51
+ ? options
52
+ : ""
53
+ : void 0))
54
+ : (options = null),
55
+ Internals.d.C(href, options));
56
+ };
57
+ exports.prefetchDNS = function (href) {
58
+ "string" === typeof href && Internals.d.D(href);
59
+ };
60
+ exports.preinit = function (href, options) {
61
+ if ("string" === typeof href && options && "string" === typeof options.as) {
62
+ var as = options.as,
63
+ crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
64
+ integrity =
65
+ "string" === typeof options.integrity ? options.integrity : void 0,
66
+ fetchPriority =
67
+ "string" === typeof options.fetchPriority
68
+ ? options.fetchPriority
69
+ : void 0;
70
+ "style" === as
71
+ ? Internals.d.S(
72
+ href,
73
+ "string" === typeof options.precedence ? options.precedence : void 0,
74
+ {
75
+ crossOrigin: crossOrigin,
76
+ integrity: integrity,
77
+ fetchPriority: fetchPriority
78
+ }
79
+ )
80
+ : "script" === as &&
81
+ Internals.d.X(href, {
82
+ crossOrigin: crossOrigin,
83
+ integrity: integrity,
84
+ fetchPriority: fetchPriority,
85
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
86
+ });
87
+ }
88
+ };
89
+ exports.preinitModule = function (href, options) {
90
+ if ("string" === typeof href)
91
+ if ("object" === typeof options && null !== options) {
92
+ if (null == options.as || "script" === options.as) {
93
+ var crossOrigin = getCrossOriginStringAs(
94
+ options.as,
95
+ options.crossOrigin
96
+ );
97
+ Internals.d.M(href, {
98
+ crossOrigin: crossOrigin,
99
+ integrity:
100
+ "string" === typeof options.integrity ? options.integrity : void 0,
101
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
102
+ });
103
+ }
104
+ } else null == options && Internals.d.M(href);
105
+ };
106
+ exports.preload = function (href, options) {
107
+ if (
108
+ "string" === typeof href &&
109
+ "object" === typeof options &&
110
+ null !== options &&
111
+ "string" === typeof options.as
112
+ ) {
113
+ var as = options.as,
114
+ crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
115
+ Internals.d.L(href, as, {
116
+ crossOrigin: crossOrigin,
117
+ integrity:
118
+ "string" === typeof options.integrity ? options.integrity : void 0,
119
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0,
120
+ type: "string" === typeof options.type ? options.type : void 0,
121
+ fetchPriority:
122
+ "string" === typeof options.fetchPriority
123
+ ? options.fetchPriority
124
+ : void 0,
125
+ referrerPolicy:
126
+ "string" === typeof options.referrerPolicy
127
+ ? options.referrerPolicy
128
+ : void 0,
129
+ imageSrcSet:
130
+ "string" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,
131
+ imageSizes:
132
+ "string" === typeof options.imageSizes ? options.imageSizes : void 0,
133
+ media: "string" === typeof options.media ? options.media : void 0
134
+ });
135
+ }
136
+ };
137
+ exports.preloadModule = function (href, options) {
138
+ if ("string" === typeof href)
139
+ if (options) {
140
+ var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
141
+ Internals.d.m(href, {
142
+ as:
143
+ "string" === typeof options.as && "script" !== options.as
144
+ ? options.as
145
+ : void 0,
146
+ crossOrigin: crossOrigin,
147
+ integrity:
148
+ "string" === typeof options.integrity ? options.integrity : void 0
149
+ });
150
+ } else Internals.d.m(href);
151
+ };
152
+ exports.version = "19.2.3";