@expo/cli 1.0.0-canary-20250404-87e2506 → 1.0.0-canary-20250630-547cd82

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 (182) hide show
  1. package/README.md +33 -24
  2. package/build/bin/cli +1 -1
  3. package/build/metro-require/require.js +6 -4
  4. package/build/src/api/user/actions.js +25 -11
  5. package/build/src/api/user/actions.js.map +1 -1
  6. package/build/src/customize/templates.js +15 -1
  7. package/build/src/customize/templates.js.map +1 -1
  8. package/build/src/export/exportApp.js +26 -14
  9. package/build/src/export/exportApp.js.map +1 -1
  10. package/build/src/export/exportAsync.js +6 -0
  11. package/build/src/export/exportAsync.js.map +1 -1
  12. package/build/src/export/exportHermes.js +2 -2
  13. package/build/src/export/exportHermes.js.map +1 -1
  14. package/build/src/export/persistMetroAssets.js.map +1 -1
  15. package/build/src/install/checkPackages.js +22 -4
  16. package/build/src/install/checkPackages.js.map +1 -1
  17. package/build/src/install/index.js +3 -1
  18. package/build/src/install/index.js.map +1 -1
  19. package/build/src/install/resolveOptions.js +7 -2
  20. package/build/src/install/resolveOptions.js.map +1 -1
  21. package/build/src/install/utils/checkPackagesCompatibility.js +1 -1
  22. package/build/src/install/utils/checkPackagesCompatibility.js.map +1 -1
  23. package/build/src/lint/ESlintPrerequisite.js +32 -48
  24. package/build/src/lint/ESlintPrerequisite.js.map +1 -1
  25. package/build/src/lint/index.js +45 -47
  26. package/build/src/lint/index.js.map +1 -1
  27. package/build/src/lint/lintAsync.js +150 -4
  28. package/build/src/lint/lintAsync.js.map +1 -1
  29. package/build/src/lint/resolveOptions.js +115 -0
  30. package/build/src/lint/resolveOptions.js.map +1 -0
  31. package/build/src/prebuild/renameTemplateAppName.js +4 -1
  32. package/build/src/prebuild/renameTemplateAppName.js.map +1 -1
  33. package/build/src/prebuild/resolveTemplate.js +4 -4
  34. package/build/src/prebuild/resolveTemplate.js.map +1 -1
  35. package/build/src/prebuild/updatePackageJson.js +19 -9
  36. package/build/src/prebuild/updatePackageJson.js.map +1 -1
  37. package/build/src/run/android/resolveOptions.js +13 -1
  38. package/build/src/run/android/resolveOptions.js.map +1 -1
  39. package/build/src/run/android/runAndroidAsync.js +39 -17
  40. package/build/src/run/android/runAndroidAsync.js.map +1 -1
  41. package/build/src/run/ios/XcodeBuild.js +3 -3
  42. package/build/src/run/ios/XcodeBuild.js.map +1 -1
  43. package/build/src/run/ios/options/resolveOptions.js +13 -1
  44. package/build/src/run/ios/options/resolveOptions.js.map +1 -1
  45. package/build/src/run/ios/runIosAsync.js +38 -7
  46. package/build/src/run/ios/runIosAsync.js.map +1 -1
  47. package/build/src/start/doctor/SecurityBinPrerequisite.js +1 -1
  48. package/build/src/start/doctor/SecurityBinPrerequisite.js.map +1 -1
  49. package/build/src/start/doctor/apple/XcodePrerequisite.js +1 -1
  50. package/build/src/start/doctor/apple/XcodePrerequisite.js.map +1 -1
  51. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js +1 -1
  52. package/build/src/start/doctor/dependencies/ensureDependenciesAsync.js.map +1 -1
  53. package/build/src/start/doctor/dependencies/resolvePackages.js +1 -1
  54. package/build/src/start/doctor/dependencies/resolvePackages.js.map +1 -1
  55. package/build/src/start/doctor/ngrok/ExternalModule.js +1 -1
  56. package/build/src/start/doctor/ngrok/ExternalModule.js.map +1 -1
  57. package/build/src/start/index.js +1 -1
  58. package/build/src/start/index.js.map +1 -1
  59. package/build/src/start/platforms/PlatformManager.js +1 -1
  60. package/build/src/start/platforms/PlatformManager.js.map +1 -1
  61. package/build/src/start/platforms/android/AndroidPlatformManager.js +1 -1
  62. package/build/src/start/platforms/android/AndroidPlatformManager.js.map +1 -1
  63. package/build/src/start/platforms/android/getDevices.js +1 -1
  64. package/build/src/start/platforms/android/getDevices.js.map +1 -1
  65. package/build/src/start/platforms/ios/AppleDeviceManager.js +1 -1
  66. package/build/src/start/platforms/ios/AppleDeviceManager.js.map +1 -1
  67. package/build/src/start/platforms/ios/xcrun.js +1 -1
  68. package/build/src/start/platforms/ios/xcrun.js.map +1 -1
  69. package/build/src/start/project/dotExpo.js +5 -0
  70. package/build/src/start/project/dotExpo.js.map +1 -1
  71. package/build/src/start/resolveOptions.js +3 -0
  72. package/build/src/start/resolveOptions.js.map +1 -1
  73. package/build/src/start/server/metro/MetroBundlerDevServer.js +38 -26
  74. package/build/src/start/server/metro/MetroBundlerDevServer.js.map +1 -1
  75. package/build/src/start/server/metro/MetroTerminalReporter.js +29 -2
  76. package/build/src/start/server/metro/MetroTerminalReporter.js.map +1 -1
  77. package/build/src/start/server/metro/createExpoFallbackResolver.js +6 -4
  78. package/build/src/start/server/metro/createExpoFallbackResolver.js.map +1 -1
  79. package/build/src/start/server/metro/createJResolver.js +2 -2
  80. package/build/src/start/server/metro/createJResolver.js.map +1 -1
  81. package/build/src/start/server/metro/createServerComponentsMiddleware.js +16 -5
  82. package/build/src/start/server/metro/createServerComponentsMiddleware.js.map +1 -1
  83. package/build/src/start/server/metro/debugging/createDebugMiddleware.js +19 -19
  84. package/build/src/start/server/metro/debugging/createDebugMiddleware.js.map +1 -1
  85. package/build/src/start/server/metro/externals.js +1 -1
  86. package/build/src/start/server/metro/externals.js.map +1 -1
  87. package/build/src/start/server/metro/instantiateMetro.js +13 -8
  88. package/build/src/start/server/metro/instantiateMetro.js.map +1 -1
  89. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js +21 -2
  90. package/build/src/start/server/metro/log-box/LogBoxSymbolication.js.map +1 -1
  91. package/build/src/start/server/metro/log-box/formatProjectFilePath.js +15 -12
  92. package/build/src/start/server/metro/log-box/formatProjectFilePath.js.map +1 -1
  93. package/build/src/start/server/metro/metroErrorInterface.js +19 -8
  94. package/build/src/start/server/metro/metroErrorInterface.js.map +1 -1
  95. package/build/src/start/server/metro/runServer-fork.js +1 -1
  96. package/build/src/start/server/metro/runServer-fork.js.map +1 -1
  97. package/build/src/start/server/metro/withMetroMultiPlatform.js +8 -2
  98. package/build/src/start/server/metro/withMetroMultiPlatform.js.map +1 -1
  99. package/build/src/start/server/middleware/CorsMiddleware.js +1 -1
  100. package/build/src/start/server/middleware/CorsMiddleware.js.map +1 -1
  101. package/build/src/start/server/middleware/ManifestMiddleware.js +4 -8
  102. package/build/src/start/server/middleware/ManifestMiddleware.js.map +1 -1
  103. package/build/src/start/server/middleware/inspector/JsInspector.js +2 -25
  104. package/build/src/start/server/middleware/inspector/JsInspector.js.map +1 -1
  105. package/build/src/start/server/middleware/metroOptions.js +2 -26
  106. package/build/src/start/server/middleware/metroOptions.js.map +1 -1
  107. package/build/src/utils/build-cache-providers/helpers.js +61 -0
  108. package/build/src/utils/build-cache-providers/helpers.js.map +1 -0
  109. package/build/src/utils/build-cache-providers/index.js +283 -0
  110. package/build/src/utils/build-cache-providers/index.js.map +1 -0
  111. package/build/src/utils/codesigning.js +14 -2
  112. package/build/src/utils/codesigning.js.map +1 -1
  113. package/build/src/utils/exit.js +0 -1
  114. package/build/src/utils/exit.js.map +1 -1
  115. package/build/src/utils/ip.js +7 -104
  116. package/build/src/utils/ip.js.map +1 -1
  117. package/build/src/utils/modifyConfigAsync.js +1 -1
  118. package/build/src/utils/modifyConfigAsync.js.map +1 -1
  119. package/build/src/utils/resolveArgs.js +8 -0
  120. package/build/src/utils/resolveArgs.js.map +1 -1
  121. package/build/src/utils/scheme.js +1 -1
  122. package/build/src/utils/scheme.js.map +1 -1
  123. package/build/src/utils/telemetry/clients/FetchClient.js +2 -2
  124. package/build/src/utils/telemetry/clients/FetchClient.js.map +1 -1
  125. package/build/src/utils/telemetry/utils/context.js +1 -1
  126. package/build/src/utils/tsconfig/evaluateTsConfig.js +7 -2
  127. package/build/src/utils/tsconfig/evaluateTsConfig.js.map +1 -1
  128. package/build/src/utils/variadic.js +63 -6
  129. package/build/src/utils/variadic.js.map +1 -1
  130. package/package.json +20 -20
  131. package/static/canary/react-is/cjs/react-is.development.js +118 -185
  132. package/static/canary/react-is/cjs/react-is.production.js +2 -2
  133. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-dev.js +16582 -26565
  134. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-prod.js +3495 -3357
  135. package/static/canary/react-native/Libraries/Renderer/implementations/ReactFabric-profiling.js +3929 -3801
  136. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16869 -27032
  137. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3535 -3428
  138. package/static/canary/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4198 -4095
  139. package/static/canary/scheduler/cjs/scheduler-unstable_mock.development.js +387 -684
  140. package/static/canary/scheduler/cjs/scheduler-unstable_mock.production.js +0 -9
  141. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.development.js +137 -195
  142. package/static/canary/scheduler/cjs/scheduler-unstable_post_task.production.js +0 -5
  143. package/static/canary/scheduler/cjs/scheduler.development.js +339 -600
  144. package/static/canary/scheduler/cjs/scheduler.native.development.js +324 -512
  145. package/static/canary/scheduler/cjs/scheduler.native.production.js +6 -5
  146. package/static/canary/scheduler/cjs/scheduler.production.js +16 -17
  147. package/static/canary-full/react/cjs/react-compiler-runtime.development.js +13 -68
  148. package/static/canary-full/react/cjs/react-jsx-dev-runtime.development.js +317 -1251
  149. package/static/canary-full/react/cjs/react-jsx-dev-runtime.react-server.development.js +353 -1286
  150. package/static/canary-full/react/cjs/react-jsx-runtime.development.js +326 -1279
  151. package/static/canary-full/react/cjs/react-jsx-runtime.react-server.development.js +353 -1286
  152. package/static/canary-full/react/cjs/react.development.js +1204 -2771
  153. package/static/canary-full/react/cjs/react.production.js +25 -20
  154. package/static/canary-full/react/cjs/react.react-server.development.js +783 -2162
  155. package/static/canary-full/react/cjs/react.react-server.production.js +13 -63
  156. package/static/canary-full/react/package.json +1 -1
  157. package/static/canary-full/react-dom/cjs/react-dom-client.development.js +24847 -37099
  158. package/static/canary-full/react-dom/cjs/react-dom-client.production.js +8261 -7475
  159. package/static/canary-full/react-dom/cjs/react-dom-profiling.development.js +25252 -37571
  160. package/static/canary-full/react-dom/cjs/react-dom-profiling.profiling.js +9442 -8662
  161. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.development.js +8944 -11568
  162. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.browser.production.js +1378 -944
  163. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.development.js +8944 -11568
  164. package/static/canary-full/react-dom/cjs/react-dom-server-legacy.node.production.js +1386 -954
  165. package/static/canary-full/react-dom/cjs/react-dom-server.browser.development.js +9344 -11600
  166. package/static/canary-full/react-dom/cjs/react-dom-server.browser.production.js +1545 -954
  167. package/static/canary-full/react-dom/cjs/react-dom-server.bun.development.js +8286 -11064
  168. package/static/canary-full/react-dom/cjs/react-dom-server.bun.production.js +1437 -976
  169. package/static/canary-full/react-dom/cjs/react-dom-server.edge.development.js +9356 -11609
  170. package/static/canary-full/react-dom/cjs/react-dom-server.edge.production.js +1542 -970
  171. package/static/canary-full/react-dom/cjs/react-dom-server.node.development.js +9227 -11571
  172. package/static/canary-full/react-dom/cjs/react-dom-server.node.production.js +1787 -1183
  173. package/static/canary-full/react-dom/cjs/react-dom-test-utils.development.js +13 -59
  174. package/static/canary-full/react-dom/cjs/react-dom.development.js +402 -604
  175. package/static/canary-full/react-dom/cjs/react-dom.production.js +4 -3
  176. package/static/canary-full/react-dom/cjs/react-dom.react-server.development.js +322 -382
  177. package/static/canary-full/react-dom/cjs/react-dom.react-server.production.js +6 -7
  178. package/static/canary-full/react-dom/package.json +5 -5
  179. package/static/canary-full/react-dom/static.browser.js +1 -0
  180. package/static/canary-full/react-dom/static.edge.js +1 -0
  181. package/static/canary-full/react-dom/static.node.js +1 -0
  182. package/static/template/eslint.config.js +10 -0
@@ -8,619 +8,417 @@
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
10
 
11
- 'use strict';
12
-
13
- if (process.env.NODE_ENV !== "production") {
14
- (function() {
15
-
16
- 'use strict';
17
-
18
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
19
- if (
20
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
21
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
22
- 'function'
23
- ) {
24
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
25
- }
26
- var React = require('react');
27
-
28
- var ReactSharedInternals = React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
29
-
30
- function error(format) {
31
- {
32
- {
33
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
34
- args[_key2 - 1] = arguments[_key2];
35
- }
36
-
37
- printWarning('error', format, args);
11
+ "use strict";
12
+ "production" !== process.env.NODE_ENV &&
13
+ (function () {
14
+ function noop() {}
15
+ function testStringCoercion(value) {
16
+ return "" + value;
38
17
  }
39
- }
40
- }
41
-
42
- function printWarning(level, format, args) {
43
- // When changing this logic, you might want to also
44
- // update consoleWithStackDev.www.js as well.
45
- {
46
- var stack = ReactSharedInternals.getStackAddendum();
47
-
48
- if (stack !== '') {
49
- format += '%s';
50
- args = args.concat([stack]);
51
- } // eslint-disable-next-line react-internal/safe-string-coercion
52
-
53
-
54
- var argsWithFormat = args.map(function (item) {
55
- return String(item);
56
- }); // Careful: RN currently depends on this prefix
57
-
58
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
59
- // breaks IE9: https://github.com/facebook/react/issues/13610
60
- // eslint-disable-next-line react-internal/no-production-logging
61
-
62
- Function.prototype.apply.call(console[level], console, argsWithFormat);
63
- }
64
- }
65
-
66
- // -----------------------------------------------------------------------------
67
- // React DOM Chopping Block
68
- //
69
- // Similar to main Chopping Block but only flags related to React DOM. These are
70
- // grouped because we will likely batch all of them into a single major release.
71
- // -----------------------------------------------------------------------------
72
- // Disable support for comment nodes as React DOM containers. Already disabled
73
- // in open source, but www codebase still relies on it. Need to remove.
74
-
75
- var disableCommentsAsDOMContainers = true;
76
-
77
- var NoLane =
78
- /* */
79
- 0;
80
- var SyncLane =
81
- /* */
82
- 2;
83
-
84
- var NoEventPriority = NoLane;
85
- var DiscreteEventPriority = SyncLane;
86
-
87
- function noop() {}
88
-
89
- function requestFormReset$1(element) {
90
- throw new Error('Invalid form element. requestFormReset must be passed a form that was ' + 'rendered by React.');
91
- }
92
-
93
- var DefaultDispatcher = {
94
- f
95
- /* flushSyncWork */
96
- : noop,
97
- r
98
- /* requestFormReset */
99
- : requestFormReset$1,
100
- D
101
- /* prefetchDNS */
102
- : noop,
103
- C
104
- /* preconnect */
105
- : noop,
106
- L
107
- /* preload */
108
- : noop,
109
- m
110
- /* preloadModule */
111
- : noop,
112
- X
113
- /* preinitScript */
114
- : noop,
115
- S
116
- /* preinitStyle */
117
- : noop,
118
- M
119
- /* preinitModuleScript */
120
- : noop
121
- };
122
- var Internals = {
123
- d
124
- /* ReactDOMCurrentDispatcher */
125
- : DefaultDispatcher,
126
- p
127
- /* currentUpdatePriority */
128
- : NoEventPriority,
129
- findDOMNode: null
130
- };
131
-
132
- var ReactVersion = '19.0.0-beta-4508873393-20240430';
133
-
134
- /**
135
- * HTML nodeType values that represent the type of the node
136
- */
137
- var ELEMENT_NODE = 1;
138
- var DOCUMENT_NODE = 9;
139
- var DOCUMENT_FRAGMENT_NODE = 11;
140
-
141
- function isValidContainer(node) {
142
- return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers ));
143
- } // TODO: Remove this function which also includes comment nodes.
144
-
145
- var REACT_PORTAL_TYPE = Symbol.for('react.portal');
146
-
147
- /*
148
- * The `'' + value` pattern (used in perf-sensitive code) throws for Symbol
149
- * and Temporal.* types. See https://github.com/facebook/react/pull/22064.
150
- *
151
- * The functions in this module will throw an easier-to-understand,
152
- * easier-to-debug exception with a clear errors message message explaining the
153
- * problem. (Instead of a confusing exception thrown inside the implementation
154
- * of the `value` object).
155
- */
156
- // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
157
- function typeName(value) {
158
- {
159
- // toStringTag is needed for namespaced types like Temporal.Instant
160
- var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
161
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object'; // $FlowFixMe[incompatible-return]
162
-
163
- return type;
164
- }
165
- } // $FlowFixMe[incompatible-return] only called in DEV, so void return is not possible.
166
-
167
-
168
- function willCoercionThrow(value) {
169
- {
170
- try {
171
- testStringCoercion(value);
172
- return false;
173
- } catch (e) {
174
- return true;
175
- }
176
- }
177
- }
178
-
179
- function testStringCoercion(value) {
180
- // If you ended up here by following an exception call stack, here's what's
181
- // happened: you supplied an object or symbol value to React (as a prop, key,
182
- // DOM attribute, CSS property, string ref, etc.) and when React tried to
183
- // coerce it to a string using `'' + value`, an exception was thrown.
184
- //
185
- // The most common types that will cause this exception are `Symbol` instances
186
- // and Temporal objects like `Temporal.Instant`. But any object that has a
187
- // `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
188
- // exception. (Library authors do this to prevent users from using built-in
189
- // numeric operators like `+` or comparison operators like `>=` because custom
190
- // methods are needed to perform accurate arithmetic or comparison.)
191
- //
192
- // To fix the problem, coerce this object or symbol value to a string before
193
- // passing it to React. The most reliable way is usually `String(value)`.
194
- //
195
- // To find which value is throwing, check the browser or debugger console.
196
- // Before this exception was thrown, there should be `console.error` output
197
- // that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
198
- // problem and how that type was used: key, atrribute, input value prop, etc.
199
- // In most cases, this console output also shows the component and its
200
- // ancestor components where the exception happened.
201
- //
202
- // eslint-disable-next-line react-internal/safe-string-coercion
203
- return '' + value;
204
- }
205
- function checkKeyStringCoercion(value) {
206
- {
207
- if (willCoercionThrow(value)) {
208
- error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before using it here.', typeName(value));
209
-
210
- return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
211
- }
212
- }
213
- }
214
-
215
- function createPortal$1(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
216
- implementation) {
217
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
218
-
219
- {
220
- checkKeyStringCoercion(key);
221
- }
222
-
223
- return {
224
- // This tag allow us to uniquely identify this as a React Portal
225
- $$typeof: REACT_PORTAL_TYPE,
226
- key: key == null ? null : '' + key,
227
- children: children,
228
- containerInfo: containerInfo,
229
- implementation: implementation
230
- };
231
- }
232
-
233
- function flushSyncImpl(fn) {
234
- var previousTransition = ReactSharedInternals.T;
235
- var previousUpdatePriority = Internals.p;
236
- /* ReactDOMCurrentUpdatePriority */
237
-
238
- try {
239
- ReactSharedInternals.T = null;
240
- Internals.p
241
- /* ReactDOMCurrentUpdatePriority */
242
- = DiscreteEventPriority;
243
-
244
- if (fn) {
245
- return fn();
246
- } else {
247
- return undefined;
248
- }
249
- } finally {
250
- ReactSharedInternals.T = previousTransition;
251
- Internals.p
252
- /* ReactDOMCurrentUpdatePriority */
253
- = previousUpdatePriority;
254
- var wasInRender = Internals.d
255
- /* ReactDOMCurrentDispatcher */
256
- .f();
257
- /* flushSyncWork */
258
-
259
- {
260
- if (wasInRender) {
261
- error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
18
+ function createPortal$1(children, containerInfo, implementation) {
19
+ var key =
20
+ 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
21
+ try {
22
+ testStringCoercion(key);
23
+ var JSCompiler_inline_result = !1;
24
+ } catch (e) {
25
+ JSCompiler_inline_result = !0;
262
26
  }
27
+ JSCompiler_inline_result &&
28
+ (console.error(
29
+ "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
30
+ ("function" === typeof Symbol &&
31
+ Symbol.toStringTag &&
32
+ key[Symbol.toStringTag]) ||
33
+ key.constructor.name ||
34
+ "Object"
35
+ ),
36
+ testStringCoercion(key));
37
+ return {
38
+ $$typeof: REACT_PORTAL_TYPE,
39
+ key: null == key ? null : "" + key,
40
+ children: children,
41
+ containerInfo: containerInfo,
42
+ implementation: implementation
43
+ };
263
44
  }
264
- }
265
- }
266
-
267
- var flushSync = flushSyncImpl ;
268
-
269
- function getCrossOriginString(input) {
270
- if (typeof input === 'string') {
271
- return input === 'use-credentials' ? input : '';
272
- }
273
-
274
- return undefined;
275
- }
276
- function getCrossOriginStringAs(as, input) {
277
- if (as === 'font') {
278
- return '';
279
- }
280
-
281
- if (typeof input === 'string') {
282
- return input === 'use-credentials' ? input : '';
283
- }
284
-
285
- return undefined;
286
- }
287
-
288
- function prefetchDNS(href) {
289
- {
290
- if (typeof href !== 'string' || !href) {
291
- error('ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
292
- } else if (arguments.length > 1) {
293
- var options = arguments[1];
294
-
295
- if (typeof options === 'object' && options.hasOwnProperty('crossOrigin')) {
296
- error('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`.', getValueDescriptorExpectingEnumForWarning(options));
297
- } else {
298
- error('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`.', getValueDescriptorExpectingEnumForWarning(options));
299
- }
45
+ function getCrossOriginStringAs(as, input) {
46
+ if ("font" === as) return "";
47
+ if ("string" === typeof input)
48
+ return "use-credentials" === input ? input : "";
300
49
  }
301
- }
302
-
303
- if (typeof href === 'string') {
304
- Internals.d
305
- /* ReactDOMCurrentDispatcher */
306
- .D(
307
- /* prefetchDNS */
308
- href);
309
- } // We don't error because preconnect needs to be resilient to being called in a variety of scopes
310
- // and the runtime may not be capable of responding. The function is optimistic and not critical
311
- // so we favor silent bailout over warning or erroring.
312
-
313
- }
314
- function preconnect(href, options) {
315
- {
316
- if (typeof href !== 'string' || !href) {
317
- error('ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
318
- } else if (options != null && typeof options !== 'object') {
319
- error('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.', getValueDescriptorExpectingEnumForWarning(options));
320
- } else if (options != null && typeof options.crossOrigin !== 'string') {
321
- error('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.', getValueDescriptorExpectingObjectForWarning(options.crossOrigin));
50
+ function getValueDescriptorExpectingObjectForWarning(thing) {
51
+ return null === thing
52
+ ? "`null`"
53
+ : void 0 === thing
54
+ ? "`undefined`"
55
+ : "" === thing
56
+ ? "an empty string"
57
+ : 'something with type "' + typeof thing + '"';
322
58
  }
323
- }
324
-
325
- if (typeof href === 'string') {
326
- var crossOrigin = options ? getCrossOriginString(options.crossOrigin) : null;
327
- Internals.d
328
- /* ReactDOMCurrentDispatcher */
329
- .C(
330
- /* preconnect */
331
- href, crossOrigin);
332
- } // We don't error because preconnect needs to be resilient to being called in a variety of scopes
333
- // and the runtime may not be capable of responding. The function is optimistic and not critical
334
- // so we favor silent bailout over warning or erroring.
335
-
336
- }
337
- function preload(href, options) {
338
- {
339
- var encountered = '';
340
-
341
- if (typeof href !== 'string' || !href) {
342
- encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".";
343
- }
344
-
345
- if (options == null || typeof options !== 'object') {
346
- encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + ".";
347
- } else if (typeof options.as !== 'string' || !options.as) {
348
- encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".";
349
- }
350
-
351
- if (encountered) {
352
- error('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', encountered);
353
- }
354
- }
355
-
356
- if (typeof href === 'string' && // We check existence because we cannot enforce this function is actually called with the stated type
357
- typeof options === 'object' && options !== null && typeof options.as === 'string') {
358
- var as = options.as;
359
- var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
360
- Internals.d
361
- /* ReactDOMCurrentDispatcher */
362
- .L(
363
- /* preload */
364
- href, as, {
365
- crossOrigin: crossOrigin,
366
- integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
367
- nonce: typeof options.nonce === 'string' ? options.nonce : undefined,
368
- type: typeof options.type === 'string' ? options.type : undefined,
369
- fetchPriority: typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined,
370
- referrerPolicy: typeof options.referrerPolicy === 'string' ? options.referrerPolicy : undefined,
371
- imageSrcSet: typeof options.imageSrcSet === 'string' ? options.imageSrcSet : undefined,
372
- imageSizes: typeof options.imageSizes === 'string' ? options.imageSizes : undefined,
373
- media: typeof options.media === 'string' ? options.media : undefined
374
- });
375
- } // We don't error because preload needs to be resilient to being called in a variety of scopes
376
- // and the runtime may not be capable of responding. The function is optimistic and not critical
377
- // so we favor silent bailout over warning or erroring.
378
-
379
- }
380
- function preloadModule(href, options) {
381
- {
382
- var encountered = '';
383
-
384
- if (typeof href !== 'string' || !href) {
385
- encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".";
59
+ function getValueDescriptorExpectingEnumForWarning(thing) {
60
+ return null === thing
61
+ ? "`null`"
62
+ : void 0 === thing
63
+ ? "`undefined`"
64
+ : "" === thing
65
+ ? "an empty string"
66
+ : "string" === typeof thing
67
+ ? JSON.stringify(thing)
68
+ : "number" === typeof thing
69
+ ? "`" + thing + "`"
70
+ : 'something with type "' + typeof thing + '"';
386
71
  }
387
-
388
- if (options !== undefined && typeof options !== 'object') {
389
- encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + ".";
390
- } else if (options && 'as' in options && typeof options.as !== 'string') {
391
- encountered += " The `as` option encountered was " + getValueDescriptorExpectingObjectForWarning(options.as) + ".";
72
+ function resolveDispatcher() {
73
+ var dispatcher = ReactSharedInternals.H;
74
+ null === dispatcher &&
75
+ console.error(
76
+ "Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem."
77
+ );
78
+ return dispatcher;
392
79
  }
393
-
394
- if (encountered) {
395
- error('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', encountered);
396
- }
397
- }
398
-
399
- if (typeof href === 'string') {
400
- if (options) {
401
- var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
402
- Internals.d
403
- /* ReactDOMCurrentDispatcher */
404
- .m(
405
- /* preloadModule */
406
- href, {
407
- as: typeof options.as === 'string' && options.as !== 'script' ? options.as : undefined,
408
- crossOrigin: crossOrigin,
409
- integrity: typeof options.integrity === 'string' ? options.integrity : undefined
410
- });
411
- } else {
412
- Internals.d
413
- /* ReactDOMCurrentDispatcher */
414
- .m(
415
- /* preloadModule */
416
- href);
417
- }
418
- } // We don't error because preload needs to be resilient to being called in a variety of scopes
419
- // and the runtime may not be capable of responding. The function is optimistic and not critical
420
- // so we favor silent bailout over warning or erroring.
421
-
422
- }
423
- function preinit(href, options) {
424
- {
425
- if (typeof href !== 'string' || !href) {
426
- error('ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.', getValueDescriptorExpectingObjectForWarning(href));
427
- } else if (options == null || typeof options !== 'object') {
428
- error('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.', getValueDescriptorExpectingEnumForWarning(options));
429
- } else if (options.as !== 'style' && options.as !== 'script') {
430
- error('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".', getValueDescriptorExpectingEnumForWarning(options.as));
431
- }
432
- }
433
-
434
- if (typeof href === 'string' && options && typeof options.as === 'string') {
435
- var as = options.as;
436
- var crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);
437
- var integrity = typeof options.integrity === 'string' ? options.integrity : undefined;
438
- var fetchPriority = typeof options.fetchPriority === 'string' ? options.fetchPriority : undefined;
439
-
440
- if (as === 'style') {
441
- Internals.d
442
- /* ReactDOMCurrentDispatcher */
443
- .S(
444
- /* preinitStyle */
445
- href, typeof options.precedence === 'string' ? options.precedence : undefined, {
446
- crossOrigin: crossOrigin,
447
- integrity: integrity,
448
- fetchPriority: fetchPriority
449
- });
450
- } else if (as === 'script') {
451
- Internals.d
452
- /* ReactDOMCurrentDispatcher */
453
- .X(
454
- /* preinitScript */
455
- href, {
456
- crossOrigin: crossOrigin,
457
- integrity: integrity,
458
- fetchPriority: fetchPriority,
459
- nonce: typeof options.nonce === 'string' ? options.nonce : undefined
460
- });
461
- }
462
- } // We don't error because preinit needs to be resilient to being called in a variety of scopes
463
- // and the runtime may not be capable of responding. The function is optimistic and not critical
464
- // so we favor silent bailout over warning or erroring.
465
-
466
- }
467
- function preinitModule(href, options) {
468
- {
469
- var encountered = '';
470
-
471
- if (typeof href !== 'string' || !href) {
472
- encountered += " The `href` argument encountered was " + getValueDescriptorExpectingObjectForWarning(href) + ".";
473
- }
474
-
475
- if (options !== undefined && typeof options !== 'object') {
476
- encountered += " The `options` argument encountered was " + getValueDescriptorExpectingObjectForWarning(options) + ".";
477
- } else if (options && 'as' in options && options.as !== 'script') {
478
- encountered += " The `as` option encountered was " + getValueDescriptorExpectingEnumForWarning(options.as) + ".";
479
- }
480
-
481
- if (encountered) {
482
- error('ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s', encountered);
483
- } else {
484
- var as = options && typeof options.as === 'string' ? options.as : 'script';
485
-
486
- switch (as) {
487
- case 'script':
488
- {
489
- break;
490
- }
491
- // We have an invalid as type and need to warn
492
-
493
- default:
494
- {
495
- var typeOfAs = getValueDescriptorExpectingEnumForWarning(as);
496
-
497
- error('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)', typeOfAs, href);
498
- }
80
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
81
+ "function" ===
82
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
83
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
84
+ var React = require("react"),
85
+ Internals = {
86
+ d: {
87
+ f: noop,
88
+ r: function () {
89
+ throw Error(
90
+ "Invalid form element. requestFormReset must be passed a form that was rendered by React."
91
+ );
92
+ },
93
+ D: noop,
94
+ C: noop,
95
+ L: noop,
96
+ m: noop,
97
+ X: noop,
98
+ S: noop,
99
+ M: noop
100
+ },
101
+ p: 0,
102
+ findDOMNode: null
103
+ },
104
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
105
+ ReactSharedInternals =
106
+ React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
107
+ ("function" === typeof Map &&
108
+ null != Map.prototype &&
109
+ "function" === typeof Map.prototype.forEach &&
110
+ "function" === typeof Set &&
111
+ null != Set.prototype &&
112
+ "function" === typeof Set.prototype.clear &&
113
+ "function" === typeof Set.prototype.forEach) ||
114
+ console.error(
115
+ "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"
116
+ );
117
+ exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
118
+ Internals;
119
+ exports.createPortal = function (children, container) {
120
+ var key =
121
+ 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
122
+ if (
123
+ !container ||
124
+ (1 !== container.nodeType &&
125
+ 9 !== container.nodeType &&
126
+ 11 !== container.nodeType)
127
+ )
128
+ throw Error("Target container is not a DOM element.");
129
+ return createPortal$1(children, container, null, key);
130
+ };
131
+ exports.flushSync = function (fn) {
132
+ var previousTransition = ReactSharedInternals.T,
133
+ previousUpdatePriority = Internals.p;
134
+ try {
135
+ if (((ReactSharedInternals.T = null), (Internals.p = 2), fn))
136
+ return fn();
137
+ } finally {
138
+ (ReactSharedInternals.T = previousTransition),
139
+ (Internals.p = previousUpdatePriority),
140
+ Internals.d.f() &&
141
+ console.error(
142
+ "flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."
143
+ );
499
144
  }
500
- }
501
- }
502
-
503
- if (typeof href === 'string') {
504
- if (typeof options === 'object' && options !== null) {
505
- if (options.as == null || options.as === 'script') {
506
- var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);
507
- Internals.d
508
- /* ReactDOMCurrentDispatcher */
509
- .M(
510
- /* preinitModuleScript */
511
- href, {
145
+ };
146
+ exports.preconnect = function (href, options) {
147
+ "string" === typeof href && href
148
+ ? null != options && "object" !== typeof options
149
+ ? console.error(
150
+ "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.",
151
+ getValueDescriptorExpectingEnumForWarning(options)
152
+ )
153
+ : null != options &&
154
+ "string" !== typeof options.crossOrigin &&
155
+ console.error(
156
+ "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.",
157
+ getValueDescriptorExpectingObjectForWarning(options.crossOrigin)
158
+ )
159
+ : console.error(
160
+ "ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
161
+ getValueDescriptorExpectingObjectForWarning(href)
162
+ );
163
+ "string" === typeof href &&
164
+ (options
165
+ ? ((options = options.crossOrigin),
166
+ (options =
167
+ "string" === typeof options
168
+ ? "use-credentials" === options
169
+ ? options
170
+ : ""
171
+ : void 0))
172
+ : (options = null),
173
+ Internals.d.C(href, options));
174
+ };
175
+ exports.prefetchDNS = function (href) {
176
+ if ("string" !== typeof href || !href)
177
+ console.error(
178
+ "ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
179
+ getValueDescriptorExpectingObjectForWarning(href)
180
+ );
181
+ else if (1 < arguments.length) {
182
+ var options = arguments[1];
183
+ "object" === typeof options && options.hasOwnProperty("crossOrigin")
184
+ ? console.error(
185
+ "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`.",
186
+ getValueDescriptorExpectingEnumForWarning(options)
187
+ )
188
+ : console.error(
189
+ "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`.",
190
+ getValueDescriptorExpectingEnumForWarning(options)
191
+ );
192
+ }
193
+ "string" === typeof href && Internals.d.D(href);
194
+ };
195
+ exports.preinit = function (href, options) {
196
+ "string" === typeof href && href
197
+ ? null == options || "object" !== typeof options
198
+ ? console.error(
199
+ "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.",
200
+ getValueDescriptorExpectingEnumForWarning(options)
201
+ )
202
+ : "style" !== options.as &&
203
+ "script" !== options.as &&
204
+ console.error(
205
+ '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".',
206
+ getValueDescriptorExpectingEnumForWarning(options.as)
207
+ )
208
+ : console.error(
209
+ "ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",
210
+ getValueDescriptorExpectingObjectForWarning(href)
211
+ );
212
+ if (
213
+ "string" === typeof href &&
214
+ options &&
215
+ "string" === typeof options.as
216
+ ) {
217
+ var as = options.as,
218
+ crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),
219
+ integrity =
220
+ "string" === typeof options.integrity ? options.integrity : void 0,
221
+ fetchPriority =
222
+ "string" === typeof options.fetchPriority
223
+ ? options.fetchPriority
224
+ : void 0;
225
+ "style" === as
226
+ ? Internals.d.S(
227
+ href,
228
+ "string" === typeof options.precedence
229
+ ? options.precedence
230
+ : void 0,
231
+ {
232
+ crossOrigin: crossOrigin,
233
+ integrity: integrity,
234
+ fetchPriority: fetchPriority
235
+ }
236
+ )
237
+ : "script" === as &&
238
+ Internals.d.X(href, {
239
+ crossOrigin: crossOrigin,
240
+ integrity: integrity,
241
+ fetchPriority: fetchPriority,
242
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0
243
+ });
244
+ }
245
+ };
246
+ exports.preinitModule = function (href, options) {
247
+ var encountered = "";
248
+ ("string" === typeof href && href) ||
249
+ (encountered +=
250
+ " The `href` argument encountered was " +
251
+ getValueDescriptorExpectingObjectForWarning(href) +
252
+ ".");
253
+ void 0 !== options && "object" !== typeof options
254
+ ? (encountered +=
255
+ " The `options` argument encountered was " +
256
+ getValueDescriptorExpectingObjectForWarning(options) +
257
+ ".")
258
+ : options &&
259
+ "as" in options &&
260
+ "script" !== options.as &&
261
+ (encountered +=
262
+ " The `as` option encountered was " +
263
+ getValueDescriptorExpectingEnumForWarning(options.as) +
264
+ ".");
265
+ if (encountered)
266
+ console.error(
267
+ "ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",
268
+ encountered
269
+ );
270
+ else
271
+ switch (
272
+ ((encountered =
273
+ options && "string" === typeof options.as ? options.as : "script"),
274
+ encountered)
275
+ ) {
276
+ case "script":
277
+ break;
278
+ default:
279
+ (encountered =
280
+ getValueDescriptorExpectingEnumForWarning(encountered)),
281
+ console.error(
282
+ '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)',
283
+ encountered,
284
+ href
285
+ );
286
+ }
287
+ if ("string" === typeof href)
288
+ if ("object" === typeof options && null !== options) {
289
+ if (null == options.as || "script" === options.as)
290
+ (encountered = getCrossOriginStringAs(
291
+ options.as,
292
+ options.crossOrigin
293
+ )),
294
+ Internals.d.M(href, {
295
+ crossOrigin: encountered,
296
+ integrity:
297
+ "string" === typeof options.integrity
298
+ ? options.integrity
299
+ : void 0,
300
+ nonce:
301
+ "string" === typeof options.nonce ? options.nonce : void 0
302
+ });
303
+ } else null == options && Internals.d.M(href);
304
+ };
305
+ exports.preload = function (href, options) {
306
+ var encountered = "";
307
+ ("string" === typeof href && href) ||
308
+ (encountered +=
309
+ " The `href` argument encountered was " +
310
+ getValueDescriptorExpectingObjectForWarning(href) +
311
+ ".");
312
+ null == options || "object" !== typeof options
313
+ ? (encountered +=
314
+ " The `options` argument encountered was " +
315
+ getValueDescriptorExpectingObjectForWarning(options) +
316
+ ".")
317
+ : ("string" === typeof options.as && options.as) ||
318
+ (encountered +=
319
+ " The `as` option encountered was " +
320
+ getValueDescriptorExpectingObjectForWarning(options.as) +
321
+ ".");
322
+ encountered &&
323
+ console.error(
324
+ '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',
325
+ encountered
326
+ );
327
+ if (
328
+ "string" === typeof href &&
329
+ "object" === typeof options &&
330
+ null !== options &&
331
+ "string" === typeof options.as
332
+ ) {
333
+ encountered = options.as;
334
+ var crossOrigin = getCrossOriginStringAs(
335
+ encountered,
336
+ options.crossOrigin
337
+ );
338
+ Internals.d.L(href, encountered, {
512
339
  crossOrigin: crossOrigin,
513
- integrity: typeof options.integrity === 'string' ? options.integrity : undefined,
514
- nonce: typeof options.nonce === 'string' ? options.nonce : undefined
340
+ integrity:
341
+ "string" === typeof options.integrity ? options.integrity : void 0,
342
+ nonce: "string" === typeof options.nonce ? options.nonce : void 0,
343
+ type: "string" === typeof options.type ? options.type : void 0,
344
+ fetchPriority:
345
+ "string" === typeof options.fetchPriority
346
+ ? options.fetchPriority
347
+ : void 0,
348
+ referrerPolicy:
349
+ "string" === typeof options.referrerPolicy
350
+ ? options.referrerPolicy
351
+ : void 0,
352
+ imageSrcSet:
353
+ "string" === typeof options.imageSrcSet
354
+ ? options.imageSrcSet
355
+ : void 0,
356
+ imageSizes:
357
+ "string" === typeof options.imageSizes
358
+ ? options.imageSizes
359
+ : void 0,
360
+ media: "string" === typeof options.media ? options.media : void 0
515
361
  });
516
362
  }
517
- } else if (options == null) {
518
- Internals.d
519
- /* ReactDOMCurrentDispatcher */
520
- .M(
521
- /* preinitModuleScript */
522
- href);
523
- }
524
- } // We don't error because preinit needs to be resilient to being called in a variety of scopes
525
- // and the runtime may not be capable of responding. The function is optimistic and not critical
526
- // so we favor silent bailout over warning or erroring.
527
-
528
- }
529
-
530
- function getValueDescriptorExpectingObjectForWarning(thing) {
531
- return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : "something with type \"" + typeof thing + "\"";
532
- }
533
-
534
- function getValueDescriptorExpectingEnumForWarning(thing) {
535
- return thing === null ? '`null`' : thing === undefined ? '`undefined`' : thing === '' ? 'an empty string' : typeof thing === 'string' ? JSON.stringify(thing) : typeof thing === 'number' ? '`' + thing + '`' : "something with type \"" + typeof thing + "\"";
536
- }
537
-
538
- function resolveDispatcher() {
539
- // Copied from react/src/ReactHooks.js. It's the same thing but in a
540
- // different package.
541
- var dispatcher = ReactSharedInternals.H;
542
-
543
- {
544
- if (dispatcher === null) {
545
- 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:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.');
546
- }
547
- } // Will result in a null access error if accessed outside render phase. We
548
- // intentionally don't throw our own error because this is in a hot path.
549
- // Also helps ensure this is inlined.
550
-
551
-
552
- return dispatcher;
553
- }
554
-
555
- function useFormStatus() {
556
- {
557
- var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] We know this exists because of the feature check above.
558
-
559
- return dispatcher.useHostTransitionStatus();
560
- }
561
- }
562
- function useFormState(action, initialState, permalink) {
563
- {
564
- var dispatcher = resolveDispatcher(); // $FlowFixMe[not-a-function] This is unstable, thus optional
565
-
566
- return dispatcher.useFormState(action, initialState, permalink);
567
- }
568
- }
569
- function requestFormReset(form) {
570
- Internals.d
571
- /* ReactDOMCurrentDispatcher */
572
- .r(
573
- /* requestFormReset */
574
- form);
575
- }
576
-
577
- {
578
- if (typeof Map !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Map has no prototype
579
- Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowFixMe[prop-missing] Flow incorrectly thinks Set has no prototype
580
- Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
581
- error('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');
582
- }
583
- }
584
-
585
- function batchedUpdates(fn, a) {
586
- // batchedUpdates is now just a passthrough noop
587
- return fn(a);
588
- }
589
-
590
- function createPortal(children, container) {
591
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
592
-
593
- if (!isValidContainer(container)) {
594
- throw new Error('Target container is not a DOM element.');
595
- } // TODO: pass ReactDOM portal implementation as third argument
596
- // $FlowFixMe[incompatible-return] The Flow type is opaque but there's no way to actually create it.
597
-
598
-
599
- return createPortal$1(children, container, null, key);
600
- }
601
-
602
- exports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = Internals;
603
- exports.createPortal = createPortal;
604
- exports.flushSync = flushSync;
605
- exports.preconnect = preconnect;
606
- exports.prefetchDNS = prefetchDNS;
607
- exports.preinit = preinit;
608
- exports.preinitModule = preinitModule;
609
- exports.preload = preload;
610
- exports.preloadModule = preloadModule;
611
- exports.requestFormReset = requestFormReset;
612
- exports.unstable_batchedUpdates = batchedUpdates;
613
- exports.useFormState = useFormState;
614
- exports.useFormStatus = useFormStatus;
615
- exports.version = ReactVersion;
616
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
617
- if (
618
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
619
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
620
- 'function'
621
- ) {
622
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
623
- }
624
-
363
+ };
364
+ exports.preloadModule = function (href, options) {
365
+ var encountered = "";
366
+ ("string" === typeof href && href) ||
367
+ (encountered +=
368
+ " The `href` argument encountered was " +
369
+ getValueDescriptorExpectingObjectForWarning(href) +
370
+ ".");
371
+ void 0 !== options && "object" !== typeof options
372
+ ? (encountered +=
373
+ " The `options` argument encountered was " +
374
+ getValueDescriptorExpectingObjectForWarning(options) +
375
+ ".")
376
+ : options &&
377
+ "as" in options &&
378
+ "string" !== typeof options.as &&
379
+ (encountered +=
380
+ " The `as` option encountered was " +
381
+ getValueDescriptorExpectingObjectForWarning(options.as) +
382
+ ".");
383
+ encountered &&
384
+ console.error(
385
+ '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',
386
+ encountered
387
+ );
388
+ "string" === typeof href &&
389
+ (options
390
+ ? ((encountered = getCrossOriginStringAs(
391
+ options.as,
392
+ options.crossOrigin
393
+ )),
394
+ Internals.d.m(href, {
395
+ as:
396
+ "string" === typeof options.as && "script" !== options.as
397
+ ? options.as
398
+ : void 0,
399
+ crossOrigin: encountered,
400
+ integrity:
401
+ "string" === typeof options.integrity
402
+ ? options.integrity
403
+ : void 0
404
+ }))
405
+ : Internals.d.m(href));
406
+ };
407
+ exports.requestFormReset = function (form) {
408
+ Internals.d.r(form);
409
+ };
410
+ exports.unstable_batchedUpdates = function (fn, a) {
411
+ return fn(a);
412
+ };
413
+ exports.useFormState = function (action, initialState, permalink) {
414
+ return resolveDispatcher().useFormState(action, initialState, permalink);
415
+ };
416
+ exports.useFormStatus = function () {
417
+ return resolveDispatcher().useHostTransitionStatus();
418
+ };
419
+ exports.version = "19.2.0-canary-5252281c-20250408";
420
+ "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
421
+ "function" ===
422
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
423
+ __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
625
424
  })();
626
- }