react-server-dom-webpack 18.3.0-canary-a870b2d54-20240314 → 18.3.0-canary-4b84f1161-20240318

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 (39) hide show
  1. package/cjs/react-server-dom-webpack-client.browser.development.js +176 -272
  2. package/cjs/react-server-dom-webpack-client.browser.production.js +146 -127
  3. package/cjs/react-server-dom-webpack-client.browser.production.min.js +25 -24
  4. package/cjs/react-server-dom-webpack-client.browser.production.min.js.map +1 -1
  5. package/cjs/react-server-dom-webpack-client.edge.development.js +181 -324
  6. package/cjs/react-server-dom-webpack-client.edge.production.js +151 -168
  7. package/cjs/react-server-dom-webpack-client.edge.production.min.js +30 -30
  8. package/cjs/react-server-dom-webpack-client.edge.production.min.js.map +1 -1
  9. package/cjs/react-server-dom-webpack-client.node.development.js +181 -324
  10. package/cjs/react-server-dom-webpack-client.node.production.js +151 -168
  11. package/cjs/react-server-dom-webpack-client.node.production.min.js +29 -28
  12. package/cjs/react-server-dom-webpack-client.node.production.min.js.map +1 -1
  13. package/cjs/react-server-dom-webpack-client.node.unbundled.development.js +181 -324
  14. package/cjs/react-server-dom-webpack-client.node.unbundled.production.js +151 -168
  15. package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js +30 -30
  16. package/cjs/react-server-dom-webpack-client.node.unbundled.production.min.js.map +1 -1
  17. package/cjs/react-server-dom-webpack-node-register.js.map +1 -1
  18. package/cjs/react-server-dom-webpack-plugin.js.map +1 -1
  19. package/cjs/react-server-dom-webpack-server.browser.development.js +424 -587
  20. package/cjs/react-server-dom-webpack-server.browser.production.js +368 -403
  21. package/cjs/react-server-dom-webpack-server.browser.production.min.js +68 -65
  22. package/cjs/react-server-dom-webpack-server.browser.production.min.js.map +1 -1
  23. package/cjs/react-server-dom-webpack-server.edge.development.js +424 -590
  24. package/cjs/react-server-dom-webpack-server.edge.production.js +369 -407
  25. package/cjs/react-server-dom-webpack-server.edge.production.min.js +69 -67
  26. package/cjs/react-server-dom-webpack-server.edge.production.min.js.map +1 -1
  27. package/cjs/react-server-dom-webpack-server.node.development.js +423 -586
  28. package/cjs/react-server-dom-webpack-server.node.production.js +368 -403
  29. package/cjs/react-server-dom-webpack-server.node.production.min.js +72 -70
  30. package/cjs/react-server-dom-webpack-server.node.production.min.js.map +1 -1
  31. package/cjs/react-server-dom-webpack-server.node.unbundled.development.js +423 -586
  32. package/cjs/react-server-dom-webpack-server.node.unbundled.production.js +368 -403
  33. package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js +69 -67
  34. package/cjs/react-server-dom-webpack-server.node.unbundled.production.min.js.map +1 -1
  35. package/package.json +11 -5
  36. package/umd/react-server-dom-webpack-client.browser.development.js +176 -272
  37. package/umd/react-server-dom-webpack-client.browser.production.min.js +23 -22
  38. package/umd/react-server-dom-webpack-server.browser.development.js +424 -587
  39. package/umd/react-server-dom-webpack-server.browser.production.min.js +52 -52
@@ -11,6 +11,7 @@
11
11
  'use strict';
12
12
 
13
13
  var ReactDOM = require('react-dom');
14
+ var React = require('react');
14
15
 
15
16
  // -----------------------------------------------------------------------------
16
17
  const enableBinaryFlight = false;
@@ -200,115 +201,117 @@ function loadChunk(chunkId, filename) {
200
201
  const ReactDOMSharedInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
201
202
 
202
203
  // This client file is in the shared folder because it applies to both SSR and browser contexts.
203
- const ReactDOMCurrentDispatcher = ReactDOMSharedInternals.ReactDOMCurrentDispatcher;
204
+ const ReactDOMCurrentDispatcher = ReactDOMSharedInternals.Dispatcher;
204
205
  function dispatchHint(code, model) {
205
206
  const dispatcher = ReactDOMCurrentDispatcher.current;
206
207
 
207
- switch (code) {
208
- case 'D':
209
- {
210
- const refined = refineModel(code, model);
211
- const href = refined;
212
- dispatcher.prefetchDNS(href);
213
- return;
214
- }
215
-
216
- case 'C':
217
- {
218
- const refined = refineModel(code, model);
219
-
220
- if (typeof refined === 'string') {
208
+ if (dispatcher) {
209
+ switch (code) {
210
+ case 'D':
211
+ {
212
+ const refined = refineModel(code, model);
221
213
  const href = refined;
222
- dispatcher.preconnect(href);
223
- } else {
224
- const href = refined[0];
225
- const crossOrigin = refined[1];
226
- dispatcher.preconnect(href, crossOrigin);
214
+ dispatcher.prefetchDNS(href);
215
+ return;
227
216
  }
228
217
 
229
- return;
230
- }
218
+ case 'C':
219
+ {
220
+ const refined = refineModel(code, model);
231
221
 
232
- case 'L':
233
- {
234
- const refined = refineModel(code, model);
235
- const href = refined[0];
236
- const as = refined[1];
237
-
238
- if (refined.length === 3) {
239
- const options = refined[2];
240
- dispatcher.preload(href, as, options);
241
- } else {
242
- dispatcher.preload(href, as);
222
+ if (typeof refined === 'string') {
223
+ const href = refined;
224
+ dispatcher.preconnect(href);
225
+ } else {
226
+ const href = refined[0];
227
+ const crossOrigin = refined[1];
228
+ dispatcher.preconnect(href, crossOrigin);
229
+ }
230
+
231
+ return;
243
232
  }
244
233
 
245
- return;
246
- }
234
+ case 'L':
235
+ {
236
+ const refined = refineModel(code, model);
237
+ const href = refined[0];
238
+ const as = refined[1];
247
239
 
248
- case 'm':
249
- {
250
- const refined = refineModel(code, model);
240
+ if (refined.length === 3) {
241
+ const options = refined[2];
242
+ dispatcher.preload(href, as, options);
243
+ } else {
244
+ dispatcher.preload(href, as);
245
+ }
251
246
 
252
- if (typeof refined === 'string') {
253
- const href = refined;
254
- dispatcher.preloadModule(href);
255
- } else {
256
- const href = refined[0];
257
- const options = refined[1];
258
- dispatcher.preloadModule(href, options);
247
+ return;
259
248
  }
260
249
 
261
- return;
262
- }
250
+ case 'm':
251
+ {
252
+ const refined = refineModel(code, model);
263
253
 
264
- case 'S':
265
- {
266
- const refined = refineModel(code, model);
254
+ if (typeof refined === 'string') {
255
+ const href = refined;
256
+ dispatcher.preloadModule(href);
257
+ } else {
258
+ const href = refined[0];
259
+ const options = refined[1];
260
+ dispatcher.preloadModule(href, options);
261
+ }
267
262
 
268
- if (typeof refined === 'string') {
269
- const href = refined;
270
- dispatcher.preinitStyle(href);
271
- } else {
272
- const href = refined[0];
273
- const precedence = refined[1] === 0 ? undefined : refined[1];
274
- const options = refined.length === 3 ? refined[2] : undefined;
275
- dispatcher.preinitStyle(href, precedence, options);
263
+ return;
276
264
  }
277
265
 
278
- return;
279
- }
266
+ case 'S':
267
+ {
268
+ const refined = refineModel(code, model);
280
269
 
281
- case 'X':
282
- {
283
- const refined = refineModel(code, model);
270
+ if (typeof refined === 'string') {
271
+ const href = refined;
272
+ dispatcher.preinitStyle(href);
273
+ } else {
274
+ const href = refined[0];
275
+ const precedence = refined[1] === 0 ? undefined : refined[1];
276
+ const options = refined.length === 3 ? refined[2] : undefined;
277
+ dispatcher.preinitStyle(href, precedence, options);
278
+ }
284
279
 
285
- if (typeof refined === 'string') {
286
- const href = refined;
287
- dispatcher.preinitScript(href);
288
- } else {
289
- const href = refined[0];
290
- const options = refined[1];
291
- dispatcher.preinitScript(href, options);
280
+ return;
292
281
  }
293
282
 
294
- return;
295
- }
283
+ case 'X':
284
+ {
285
+ const refined = refineModel(code, model);
296
286
 
297
- case 'M':
298
- {
299
- const refined = refineModel(code, model);
287
+ if (typeof refined === 'string') {
288
+ const href = refined;
289
+ dispatcher.preinitScript(href);
290
+ } else {
291
+ const href = refined[0];
292
+ const options = refined[1];
293
+ dispatcher.preinitScript(href, options);
294
+ }
300
295
 
301
- if (typeof refined === 'string') {
302
- const href = refined;
303
- dispatcher.preinitModuleScript(href);
304
- } else {
305
- const href = refined[0];
306
- const options = refined[1];
307
- dispatcher.preinitModuleScript(href, options);
296
+ return;
308
297
  }
309
298
 
310
- return;
311
- }
299
+ case 'M':
300
+ {
301
+ const refined = refineModel(code, model);
302
+
303
+ if (typeof refined === 'string') {
304
+ const href = refined;
305
+ dispatcher.preinitModuleScript(href);
306
+ } else {
307
+ const href = refined[0];
308
+ const options = refined[1];
309
+ dispatcher.preinitModuleScript(href, options);
310
+ }
311
+
312
+ return;
313
+ }
314
+ }
312
315
  }
313
316
  } // Flow is having trouble refining the HintModels so we help it a bit.
314
317
  // This should be compiled out in the production build.
@@ -322,7 +325,10 @@ function refineModel(code, model) {
322
325
  // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
323
326
  // The Symbol used to tag the ReactElement-like types.
324
327
  const REACT_ELEMENT_TYPE = Symbol.for('react.element');
328
+ const REACT_PROVIDER_TYPE = Symbol.for('react.provider');
329
+ const REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');
325
330
  const REACT_LAZY_TYPE = Symbol.for('react.lazy');
331
+ const REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');
326
332
  const MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
327
333
  const FAUX_ITERATOR_SYMBOL = '@@iterator';
328
334
  function getIteratorFn(maybeIterable) {
@@ -615,12 +621,12 @@ function processReply(root, formFieldPrefix, resolve, reject) {
615
621
  }
616
622
  }
617
623
 
618
- function registerServerReference(proxy, reference, encodeFormAction) {
624
+ function registerServerReference(proxy, reference) {
619
625
 
620
626
  knownServerReferences.set(proxy, reference);
621
627
  } // $FlowFixMe[method-unbinding]
622
628
 
623
- function createServerReference(id, callServer, encodeFormAction) {
629
+ function createServerReference(id, callServer) {
624
630
  const proxy = function () {
625
631
  // $FlowFixMe[method-unbinding]
626
632
  const args = Array.prototype.slice.call(arguments);
@@ -634,6 +640,40 @@ function createServerReference(id, callServer, encodeFormAction) {
634
640
  return proxy;
635
641
  }
636
642
 
643
+ const ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
644
+
645
+ const ContextRegistry = ReactSharedInternals.ContextRegistry;
646
+ function getOrCreateServerContext(globalName) {
647
+ if (!ContextRegistry[globalName]) {
648
+ const context = {
649
+ $$typeof: REACT_SERVER_CONTEXT_TYPE,
650
+ // As a workaround to support multiple concurrent renderers, we categorize
651
+ // some renderers as primary and others as secondary. We only expect
652
+ // there to be two concurrent renderers at most: React Native (primary) and
653
+ // Fabric (secondary); React DOM (primary) and React ART (secondary).
654
+ // Secondary renderers store their context values on separate fields.
655
+ _currentValue: REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED,
656
+ _currentValue2: REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED,
657
+ _defaultValue: REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED,
658
+ // Used to track how many concurrent renderers this context currently
659
+ // supports within in a single renderer. Such as parallel server rendering.
660
+ _threadCount: 0,
661
+ // These are circular
662
+ Provider: null,
663
+ Consumer: null,
664
+ _globalName: globalName
665
+ };
666
+ context.Provider = {
667
+ $$typeof: REACT_PROVIDER_TYPE,
668
+ _context: context
669
+ };
670
+
671
+ ContextRegistry[globalName] = context;
672
+ }
673
+
674
+ return ContextRegistry[globalName];
675
+ }
676
+
637
677
  const ROW_ID = 0;
638
678
  const ROW_TAG = 1;
639
679
  const ROW_LENGTH = 2;
@@ -928,20 +968,17 @@ function reportGlobalError(response, error) {
928
968
  }
929
969
 
930
970
  function createElement(type, key, props) {
931
- let element;
932
-
933
- {
934
- element = {
935
- // This tag allows us to uniquely identify this as a React Element
936
- $$typeof: REACT_ELEMENT_TYPE,
937
- type,
938
- key,
939
- ref: null,
940
- props,
941
- // Record the component responsible for creating this element.
942
- _owner: null
943
- };
944
- }
971
+ const element = {
972
+ // This tag allows us to uniquely identify this as a React Element
973
+ $$typeof: REACT_ELEMENT_TYPE,
974
+ // Built-in properties that belong on the element
975
+ type: type,
976
+ key: key,
977
+ ref: null,
978
+ props: props,
979
+ // Record the component responsible for creating this element.
980
+ _owner: null
981
+ };
945
982
 
946
983
  return element;
947
984
  }
@@ -952,7 +989,6 @@ function createLazyChunkWrapper(chunk) {
952
989
  _payload: chunk,
953
990
  _init: readChunk
954
991
  };
955
-
956
992
  return lazyType;
957
993
  }
958
994
 
@@ -1086,11 +1122,6 @@ function parseModelString(response, parentObject, key, value) {
1086
1122
  case '@':
1087
1123
  {
1088
1124
  // Promise
1089
- if (value.length === 2) {
1090
- // Infinite promise that never resolves.
1091
- return new Promise(() => {});
1092
- }
1093
-
1094
1125
  const id = parseInt(value.slice(2), 16);
1095
1126
  const chunk = getChunk(response, id);
1096
1127
  return chunk;
@@ -1102,6 +1133,12 @@ function parseModelString(response, parentObject, key, value) {
1102
1133
  return Symbol.for(value.slice(2));
1103
1134
  }
1104
1135
 
1136
+ case 'P':
1137
+ {
1138
+ // Server Context Provider
1139
+ return getOrCreateServerContext(value.slice(2)).Provider;
1140
+ }
1141
+
1105
1142
  case 'F':
1106
1143
  {
1107
1144
  // Server Reference
@@ -1167,8 +1204,6 @@ function parseModelString(response, parentObject, key, value) {
1167
1204
  return BigInt(value.slice(2));
1168
1205
  }
1169
1206
 
1170
- case 'E':
1171
-
1172
1207
  default:
1173
1208
  {
1174
1209
  // We assume that anything else is a reference ID.
@@ -1188,9 +1223,7 @@ function parseModelString(response, parentObject, key, value) {
1188
1223
 
1189
1224
  switch (chunk.status) {
1190
1225
  case INITIALIZED:
1191
- const chunkValue = chunk.value;
1192
-
1193
- return chunkValue;
1226
+ return chunk.value;
1194
1227
 
1195
1228
  case PENDING:
1196
1229
  case BLOCKED:
@@ -1225,13 +1258,12 @@ function missingCall() {
1225
1258
  throw new Error('Trying to call a function from "use server" but the callServer option ' + 'was not implemented in your router runtime.');
1226
1259
  }
1227
1260
 
1228
- function createResponse(bundlerConfig, moduleLoading, callServer, encodeFormAction, nonce) {
1261
+ function createResponse(bundlerConfig, moduleLoading, callServer, nonce) {
1229
1262
  const chunks = new Map();
1230
1263
  const response = {
1231
1264
  _bundlerConfig: bundlerConfig,
1232
1265
  _moduleLoading: moduleLoading,
1233
1266
  _callServer: callServer !== undefined ? callServer : missingCall,
1234
- _encodeFormAction: encodeFormAction,
1235
1267
  _nonce: nonce,
1236
1268
  _chunks: chunks,
1237
1269
  _stringDecoder: createStringDecoder(),
@@ -1373,18 +1405,6 @@ function processFullRow(response, id, tag, buffer, chunk) {
1373
1405
  return;
1374
1406
  }
1375
1407
 
1376
- case 68
1377
- /* "D" */
1378
- :
1379
-
1380
- case 87
1381
- /* "W" */
1382
- :
1383
- {
1384
-
1385
- throw new Error('Failed to read a RSC payload created by a development version of React ' + 'on the server while using a production version on the client. Always use ' + 'matching versions on the server and the client.');
1386
- }
1387
-
1388
1408
  case 80
1389
1409
  /* "P" */
1390
1410
  :
@@ -1561,8 +1581,7 @@ function close(response) {
1561
1581
  }
1562
1582
 
1563
1583
  function createResponseFromOptions(options) {
1564
- return createResponse(null, null, options && options.callServer ? options.callServer : undefined, undefined, // encodeFormAction
1565
- undefined // nonce
1584
+ return createResponse(null, null, options && options.callServer ? options.callServer : undefined, undefined // nonce
1566
1585
  );
1567
1586
  }
1568
1587
 
@@ -7,32 +7,33 @@
7
7
  This source code is licensed under the MIT license found in the
8
8
  LICENSE file in the root directory of this source tree.
9
9
  */
10
- 'use strict';var r=require("react-dom"),t={stream:!0};function u(a,b){if(a){var c=a[b[0]];if(a=c[b[2]])c=a.name;else{a=c["*"];if(!a)throw Error('Could not find the module "'+b[0]+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=b[2]}return 4===b.length?[a.id,a.chunks,c,1]:[a.id,a.chunks,c]}return b}var v=new Map;
11
- function w(a){var b=__webpack_require__(a);if("function"!==typeof b.then||"fulfilled"===b.status)return null;b.then(function(c){b.status="fulfilled";b.value=c},function(c){b.status="rejected";b.reason=c});return b}function x(){}
12
- function y(a){for(var b=a[1],c=[],e=0;e<b.length;){var l=b[e++],k=b[e++],n=v.get(l);void 0===n?(z.set(l,k),k=__webpack_chunk_load__(l),c.push(k),n=v.set.bind(v,l,null),k.then(n,x),v.set(l,k)):null!==n&&c.push(n)}return 4===a.length?0===c.length?w(a[0]):Promise.all(c).then(function(){return w(a[0])}):0<c.length?Promise.all(c):null}var z=new Map,A=__webpack_require__.u;__webpack_require__.u=function(a){var b=z.get(a);return void 0!==b?b:A(a)};
13
- var B=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactDOMCurrentDispatcher,C=Symbol.for("react.element"),E=Symbol.for("react.lazy"),F=Symbol.iterator;function H(a){if(null===a||"object"!==typeof a)return null;a=F&&a[F]||a["@@iterator"];return"function"===typeof a?a:null}var I=Array.isArray,J=Object.getPrototypeOf,aa=Object.prototype,K=new WeakMap;function ba(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
14
- function ca(a,b,c,e){function l(m,d){if(null===d)return null;if("object"===typeof d){if("function"===typeof d.then){null===g&&(g=new FormData);n++;var h=k++;d.then(function(p){p=JSON.stringify(p,l);var q=g;q.append(b+h,p);n--;0===n&&c(q)},function(p){e(p)});return"$@"+h.toString(16)}if(I(d))return d;if(d instanceof FormData){null===g&&(g=new FormData);var f=g;m=k++;var D=b+m+"_";d.forEach(function(p,q){f.append(D+q,p)});return"$K"+m.toString(16)}if(d instanceof Map)return d=JSON.stringify(Array.from(d),
15
- l),null===g&&(g=new FormData),m=k++,g.append(b+m,d),"$Q"+m.toString(16);if(d instanceof Set)return d=JSON.stringify(Array.from(d),l),null===g&&(g=new FormData),m=k++,g.append(b+m,d),"$W"+m.toString(16);if(H(d))return Array.from(d);m=J(d);if(m!==aa&&(null===m||null!==J(m)))throw Error("Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.");return d}if("string"===typeof d){if("Z"===d[d.length-1]&&this[m]instanceof Date)return"$D"+d;
16
- d="$"===d[0]?"$"+d:d;return d}if("boolean"===typeof d)return d;if("number"===typeof d)return ba(d);if("undefined"===typeof d)return"$undefined";if("function"===typeof d){d=K.get(d);if(void 0!==d)return d=JSON.stringify(d,l),null===g&&(g=new FormData),m=k++,g.set(b+m,d),"$F"+m.toString(16);throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.");}if("symbol"===typeof d){m=d.description;if(Symbol.for(m)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+
17
- (d.description+") cannot be found among global symbols."));return"$S"+m}if("bigint"===typeof d)return"$n"+d.toString(10);throw Error("Type "+typeof d+" is not supported as an argument to a Server Function.");}var k=1,n=0,g=null;a=JSON.stringify(a,l);null===g?c(a):(g.set(b+"0",a),0===n&&c(g))}function da(a,b){K.set(a,b)}function L(a,b,c,e){this.status=a;this.value=b;this.reason=c;this._response=e}L.prototype=Object.create(Promise.prototype);
10
+ 'use strict';var r=require("react-dom"),t=require("react"),u={stream:!0};function v(a,b){if(a){var c=a[b[0]];if(a=c[b[2]])c=a.name;else{a=c["*"];if(!a)throw Error('Could not find the module "'+b[0]+'" in the React SSR Manifest. This is probably a bug in the React Server Components bundler.');c=b[2]}return 4===b.length?[a.id,a.chunks,c,1]:[a.id,a.chunks,c]}return b}var w=new Map;
11
+ function x(a){var b=__webpack_require__(a);if("function"!==typeof b.then||"fulfilled"===b.status)return null;b.then(function(c){b.status="fulfilled";b.value=c},function(c){b.status="rejected";b.reason=c});return b}function y(){}
12
+ function z(a){for(var b=a[1],c=[],e=0;e<b.length;){var l=b[e++],k=b[e++],n=w.get(l);void 0===n?(A.set(l,k),k=__webpack_chunk_load__(l),c.push(k),n=w.set.bind(w,l,null),k.then(n,y),w.set(l,k)):null!==n&&c.push(n)}return 4===a.length?0===c.length?x(a[0]):Promise.all(c).then(function(){return x(a[0])}):0<c.length?Promise.all(c):null}var A=new Map,B=__webpack_require__.u;__webpack_require__.u=function(a){var b=A.get(a);return void 0!==b?b:B(a)};
13
+ var aa=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,C=Symbol.for("react.element"),ba=Symbol.for("react.provider"),ca=Symbol.for("react.server_context"),da=Symbol.for("react.lazy"),E=Symbol.for("react.default_value"),F=Symbol.iterator;function ea(a){if(null===a||"object"!==typeof a)return null;a=F&&a[F]||a["@@iterator"];return"function"===typeof a?a:null}var fa=Array.isArray,G=Object.getPrototypeOf,ha=Object.prototype,I=new WeakMap;
14
+ function ia(a){return Number.isFinite(a)?0===a&&-Infinity===1/a?"$-0":a:Infinity===a?"$Infinity":-Infinity===a?"$-Infinity":"$NaN"}
15
+ function ja(a,b,c,e){function l(m,d){if(null===d)return null;if("object"===typeof d){if("function"===typeof d.then){null===g&&(g=new FormData);n++;var h=k++;d.then(function(p){p=JSON.stringify(p,l);var q=g;q.append(b+h,p);n--;0===n&&c(q)},function(p){e(p)});return"$@"+h.toString(16)}if(fa(d))return d;if(d instanceof FormData){null===g&&(g=new FormData);var f=g;m=k++;var D=b+m+"_";d.forEach(function(p,q){f.append(D+q,p)});return"$K"+m.toString(16)}if(d instanceof Map)return d=JSON.stringify(Array.from(d),
16
+ l),null===g&&(g=new FormData),m=k++,g.append(b+m,d),"$Q"+m.toString(16);if(d instanceof Set)return d=JSON.stringify(Array.from(d),l),null===g&&(g=new FormData),m=k++,g.append(b+m,d),"$W"+m.toString(16);if(ea(d))return Array.from(d);m=G(d);if(m!==ha&&(null===m||null!==G(m)))throw Error("Only plain objects, and a few built-ins, can be passed to Server Actions. Classes or null prototypes are not supported.");return d}if("string"===typeof d){if("Z"===d[d.length-1]&&this[m]instanceof Date)return"$D"+d;
17
+ d="$"===d[0]?"$"+d:d;return d}if("boolean"===typeof d)return d;if("number"===typeof d)return ia(d);if("undefined"===typeof d)return"$undefined";if("function"===typeof d){d=I.get(d);if(void 0!==d)return d=JSON.stringify(d,l),null===g&&(g=new FormData),m=k++,g.set(b+m,d),"$F"+m.toString(16);throw Error("Client Functions cannot be passed directly to Server Functions. Only Functions passed from the Server can be passed back again.");}if("symbol"===typeof d){m=d.description;if(Symbol.for(m)!==d)throw Error("Only global symbols received from Symbol.for(...) can be passed to Server Functions. The symbol Symbol.for("+
18
+ (d.description+") cannot be found among global symbols."));return"$S"+m}if("bigint"===typeof d)return"$n"+d.toString(10);throw Error("Type "+typeof d+" is not supported as an argument to a Server Function.");}var k=1,n=0,g=null;a=JSON.stringify(a,l);null===g?c(a):(g.set(b+"0",a),0===n&&c(g))}function J(a,b){I.set(a,b)}var K=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function L(a,b,c,e){this.status=a;this.value=b;this.reason=c;this._response=e}L.prototype=Object.create(Promise.prototype);
18
19
  L.prototype.then=function(a,b){switch(this.status){case "resolved_model":M(this);break;case "resolved_module":N(this)}switch(this.status){case "fulfilled":a(this.value);break;case "pending":case "blocked":case "cyclic":a&&(null===this.value&&(this.value=[]),this.value.push(a));b&&(null===this.reason&&(this.reason=[]),this.reason.push(b));break;default:b(this.reason)}};
19
- function ea(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":case "cyclic":throw a;default:throw a.reason;}}function O(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function Q(a,b,c){switch(a.status){case "fulfilled":O(b,a.value);break;case "pending":case "blocked":case "cyclic":a.value=b;a.reason=c;break;case "rejected":c&&O(c,a.reason)}}
20
- function R(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&O(c,b)}}function S(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,e=a.reason;a.status="resolved_module";a.value=b;null!==c&&(N(a),Q(a,c,e))}}var T=null,U=null;
20
+ function ka(a){switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":case "cyclic":throw a;default:throw a.reason;}}function O(a,b){for(var c=0;c<a.length;c++)(0,a[c])(b)}function P(a,b,c){switch(a.status){case "fulfilled":O(b,a.value);break;case "pending":case "blocked":case "cyclic":a.value=b;a.reason=c;break;case "rejected":c&&O(c,a.reason)}}
21
+ function Q(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.reason;a.status="rejected";a.reason=b;null!==c&&O(c,b)}}function R(a,b){if("pending"===a.status||"blocked"===a.status){var c=a.value,e=a.reason;a.status="resolved_module";a.value=b;null!==c&&(N(a),P(a,c,e))}}var T=null,U=null;
21
22
  function M(a){var b=T,c=U;T=a;U=null;var e=a.value;a.status="cyclic";a.value=null;a.reason=null;try{var l=JSON.parse(e,a._response._fromJSON);if(null!==U&&0<U.deps)U.value=l,a.status="blocked",a.value=null,a.reason=null;else{var k=a.value;a.status="fulfilled";a.value=l;null!==k&&O(k,l)}}catch(n){a.status="rejected",a.reason=n}finally{T=b,U=c}}
22
- function N(a){try{var b=a.value,c=__webpack_require__(b[0]);if(4===b.length&&"function"===typeof c.then)if("fulfilled"===c.status)c=c.value;else throw c.reason;var e="*"===b[2]?c:""===b[2]?c.__esModule?c.default:c:c[b[2]];a.status="fulfilled";a.value=e}catch(l){a.status="rejected",a.reason=l}}function V(a,b){a._chunks.forEach(function(c){"pending"===c.status&&R(c,b)})}function W(a,b){var c=a._chunks,e=c.get(b);e||(e=new L("pending",null,null,a),c.set(b,e));return e}
23
- function fa(a,b,c,e){if(U){var l=U;e||l.deps++}else l=U={deps:e?0:1,value:null};return function(k){b[c]=k;l.deps--;0===l.deps&&"blocked"===a.status&&(k=a.value,a.status="fulfilled",a.value=l.value,null!==k&&O(k,l.value))}}function ha(a){return function(b){return R(a,b)}}
24
- function ia(a,b){function c(){var l=Array.prototype.slice.call(arguments),k=b.bound;return k?"fulfilled"===k.status?e(b.id,k.value.concat(l)):Promise.resolve(k).then(function(n){return e(b.id,n.concat(l))}):e(b.id,l)}var e=a._callServer;K.set(c,b);return c}function X(a,b){a=W(a,b);switch(a.status){case "resolved_model":M(a)}switch(a.status){case "fulfilled":return a.value;default:throw a.reason;}}
25
- function ja(a,b,c,e){if("$"===e[0]){if("$"===e)return C;switch(e[1]){case "$":return e.slice(1);case "L":return b=parseInt(e.slice(2),16),a=W(a,b),{$$typeof:E,_payload:a,_init:ea};case "@":if(2===e.length)return new Promise(function(){});b=parseInt(e.slice(2),16);return W(a,b);case "S":return Symbol.for(e.slice(2));case "F":return b=parseInt(e.slice(2),16),b=X(a,b),ia(a,b);case "Q":return b=parseInt(e.slice(2),16),a=X(a,b),new Map(a);case "W":return b=parseInt(e.slice(2),16),a=X(a,b),new Set(a);case "I":return Infinity;
26
- case "-":return"$-0"===e?-0:-Infinity;case "N":return NaN;case "u":return;case "D":return new Date(Date.parse(e.slice(2)));case "n":return BigInt(e.slice(2));default:e=parseInt(e.slice(1),16);a=W(a,e);switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;case "pending":case "blocked":case "cyclic":return e=T,a.then(fa(e,b,c,"cyclic"===a.status),ha(e)),null;default:throw a.reason;}}}return e}
27
- function ka(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}function Y(a,b,c,e,l){var k=new Map;a={_bundlerConfig:a,_moduleLoading:b,_callServer:void 0!==c?c:ka,_encodeFormAction:e,_nonce:l,_chunks:k,_stringDecoder:new TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[]};a._fromJSON=la(a);return a}
28
- function ma(a,b,c){var e=a._chunks,l=e.get(b);c=JSON.parse(c,a._fromJSON);var k=u(a._bundlerConfig,c);if(c=y(k)){if(l){var n=l;n.status="blocked"}else n=new L("blocked",null,null,a),e.set(b,n);c.then(function(){return S(n,k)},function(g){return R(n,g)})}else l?S(l,k):e.set(b,new L("resolved_module",k,null,a))}
29
- function la(a){return function(b,c){return"string"===typeof c?ja(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===C?{$$typeof:C,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}
23
+ function N(a){try{var b=a.value,c=__webpack_require__(b[0]);if(4===b.length&&"function"===typeof c.then)if("fulfilled"===c.status)c=c.value;else throw c.reason;var e="*"===b[2]?c:""===b[2]?c.__esModule?c.default:c:c[b[2]];a.status="fulfilled";a.value=e}catch(l){a.status="rejected",a.reason=l}}function V(a,b){a._chunks.forEach(function(c){"pending"===c.status&&Q(c,b)})}function W(a,b){var c=a._chunks,e=c.get(b);e||(e=new L("pending",null,null,a),c.set(b,e));return e}
24
+ function la(a,b,c,e){if(U){var l=U;e||l.deps++}else l=U={deps:e?0:1,value:null};return function(k){b[c]=k;l.deps--;0===l.deps&&"blocked"===a.status&&(k=a.value,a.status="fulfilled",a.value=l.value,null!==k&&O(k,l.value))}}function ma(a){return function(b){return Q(a,b)}}
25
+ function na(a,b){function c(){var l=Array.prototype.slice.call(arguments),k=b.bound;return k?"fulfilled"===k.status?e(b.id,k.value.concat(l)):Promise.resolve(k).then(function(n){return e(b.id,n.concat(l))}):e(b.id,l)}var e=a._callServer;J(c,b);return c}function X(a,b){a=W(a,b);switch(a.status){case "resolved_model":M(a)}switch(a.status){case "fulfilled":return a.value;default:throw a.reason;}}
26
+ function oa(a,b,c,e){if("$"===e[0]){if("$"===e)return C;switch(e[1]){case "$":return e.slice(1);case "L":return b=parseInt(e.slice(2),16),a=W(a,b),{$$typeof:da,_payload:a,_init:ka};case "@":return b=parseInt(e.slice(2),16),W(a,b);case "S":return Symbol.for(e.slice(2));case "P":return a=e.slice(2),K[a]||(b={$$typeof:ca,_currentValue:E,_currentValue2:E,_defaultValue:E,_threadCount:0,Provider:null,Consumer:null,_globalName:a},b.Provider={$$typeof:ba,_context:b},K[a]=b),K[a].Provider;case "F":return b=
27
+ parseInt(e.slice(2),16),b=X(a,b),na(a,b);case "Q":return b=parseInt(e.slice(2),16),a=X(a,b),new Map(a);case "W":return b=parseInt(e.slice(2),16),a=X(a,b),new Set(a);case "I":return Infinity;case "-":return"$-0"===e?-0:-Infinity;case "N":return NaN;case "u":return;case "D":return new Date(Date.parse(e.slice(2)));case "n":return BigInt(e.slice(2));default:e=parseInt(e.slice(1),16);a=W(a,e);switch(a.status){case "resolved_model":M(a);break;case "resolved_module":N(a)}switch(a.status){case "fulfilled":return a.value;
28
+ case "pending":case "blocked":case "cyclic":return e=T,a.then(la(e,b,c,"cyclic"===a.status),ma(e)),null;default:throw a.reason;}}}return e}function pa(){throw Error('Trying to call a function from "use server" but the callServer option was not implemented in your router runtime.');}
29
+ function Y(a,b,c,e){var l=new Map;a={_bundlerConfig:a,_moduleLoading:b,_callServer:void 0!==c?c:pa,_nonce:e,_chunks:l,_stringDecoder:new TextDecoder,_fromJSON:null,_rowState:0,_rowID:0,_rowTag:0,_rowLength:0,_buffer:[]};a._fromJSON=qa(a);return a}
30
+ function ra(a,b,c){var e=a._chunks,l=e.get(b);c=JSON.parse(c,a._fromJSON);var k=v(a._bundlerConfig,c);if(c=z(k)){if(l){var n=l;n.status="blocked"}else n=new L("blocked",null,null,a),e.set(b,n);c.then(function(){return R(n,k)},function(g){return Q(n,g)})}else l?R(l,k):e.set(b,new L("resolved_module",k,null,a))}
31
+ function qa(a){return function(b,c){return"string"===typeof c?oa(a,this,b,c):"object"===typeof c&&null!==c?(b=c[0]===C?{$$typeof:C,type:c[1],key:c[2],ref:null,props:c[3],_owner:null}:c,b):c}}
30
32
  function Z(a,b){function c(k){var n=k.value;if(k.done)V(a,Error("Connection closed."));else{var g=0,m=a._rowState,d=a._rowID,h=a._rowTag,f=a._rowLength;k=a._buffer;for(var D=n.length;g<D;){var p=-1;switch(m){case 0:p=n[g++];58===p?m=1:d=d<<4|(96<p?p-87:p-48);continue;case 1:m=n[g];84===m?(h=m,m=2,g++):64<m&&91>m?(h=m,m=3,g++):(h=0,m=3);continue;case 2:p=n[g++];44===p?m=4:f=f<<4|(96<p?p-87:p-48);continue;case 3:p=n.indexOf(10,g);break;case 4:p=g+f,p>n.length&&(p=-1)}var q=n.byteOffset+g;if(-1<p){g=
31
- new Uint8Array(n.buffer,q,p-g);f=a;q=h;var P=f._stringDecoder;h="";for(var G=0;G<k.length;G++)h+=P.decode(k[G],t);h+=P.decode(g);switch(q){case 73:ma(f,d,h);break;case 72:d=h[0];h=h.slice(1);f=JSON.parse(h,f._fromJSON);h=B.current;switch(d){case "D":h.prefetchDNS(f);break;case "C":"string"===typeof f?h.preconnect(f):h.preconnect(f[0],f[1]);break;case "L":d=f[0];g=f[1];3===f.length?h.preload(d,g,f[2]):h.preload(d,g);break;case "m":"string"===typeof f?h.preloadModule(f):h.preloadModule(f[0],f[1]);break;
32
- case "S":"string"===typeof f?h.preinitStyle(f):h.preinitStyle(f[0],0===f[1]?void 0:f[1],3===f.length?f[2]:void 0);break;case "X":"string"===typeof f?h.preinitScript(f):h.preinitScript(f[0],f[1]);break;case "M":"string"===typeof f?h.preinitModuleScript(f):h.preinitModuleScript(f[0],f[1])}break;case 69:h=JSON.parse(h);g=h.digest;h=Error("An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.");
33
- h.stack="Error: "+h.message;h.digest=g;g=f._chunks;(q=g.get(d))?R(q,h):g.set(d,new L("rejected",null,h,f));break;case 84:f._chunks.set(d,new L("fulfilled",h,null,f));break;case 68:case 87:throw Error("Failed to read a RSC payload created by a development version of React on the server while using a production version on the client. Always use matching versions on the server and the client.");default:g=f._chunks,(q=g.get(d))?(f=q,d=h,"pending"===f.status&&(h=f.value,g=f.reason,f.status="resolved_model",
34
- f.value=d,null!==h&&(M(f),Q(f,h,g)))):g.set(d,new L("resolved_model",h,null,f))}g=p;3===m&&g++;f=d=h=m=0;k.length=0}else{n=new Uint8Array(n.buffer,q,n.byteLength-g);k.push(n);f-=n.byteLength;break}}a._rowState=m;a._rowID=d;a._rowTag=h;a._rowLength=f;return l.read().then(c).catch(e)}}function e(k){V(a,k)}var l=b.getReader();l.read().then(c).catch(e)}
35
- exports.createFromFetch=function(a,b){var c=Y(null,null,b&&b.callServer?b.callServer:void 0,void 0,void 0);a.then(function(e){Z(c,e.body)},function(e){V(c,e)});return W(c,0)};exports.createFromReadableStream=function(a,b){b=Y(null,null,b&&b.callServer?b.callServer:void 0,void 0,void 0);Z(b,a);return W(b,0)};exports.createServerReference=function(a,b){function c(){var e=Array.prototype.slice.call(arguments);return b(a,e)}da(c,{id:a,bound:null});return c};
36
- exports.encodeReply=function(a){return new Promise(function(b,c){ca(a,"",b,c)})};
33
+ new Uint8Array(n.buffer,q,p-g);f=a;q=h;var S=f._stringDecoder;h="";for(var H=0;H<k.length;H++)h+=S.decode(k[H],u);h+=S.decode(g);switch(q){case 73:ra(f,d,h);break;case 72:d=h[0];h=h.slice(1);f=JSON.parse(h,f._fromJSON);if(h=aa.current)switch(d){case "D":h.prefetchDNS(f);break;case "C":"string"===typeof f?h.preconnect(f):h.preconnect(f[0],f[1]);break;case "L":d=f[0];g=f[1];3===f.length?h.preload(d,g,f[2]):h.preload(d,g);break;case "m":"string"===typeof f?h.preloadModule(f):h.preloadModule(f[0],f[1]);
34
+ break;case "S":"string"===typeof f?h.preinitStyle(f):h.preinitStyle(f[0],0===f[1]?void 0:f[1],3===f.length?f[2]:void 0);break;case "X":"string"===typeof f?h.preinitScript(f):h.preinitScript(f[0],f[1]);break;case "M":"string"===typeof f?h.preinitModuleScript(f):h.preinitModuleScript(f[0],f[1])}break;case 69:h=JSON.parse(h);g=h.digest;h=Error("An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance which may provide additional details about the nature of the error.");
35
+ h.stack="Error: "+h.message;h.digest=g;g=f._chunks;(q=g.get(d))?Q(q,h):g.set(d,new L("rejected",null,h,f));break;case 84:f._chunks.set(d,new L("fulfilled",h,null,f));break;default:g=f._chunks,(q=g.get(d))?(f=q,d=h,"pending"===f.status&&(h=f.value,g=f.reason,f.status="resolved_model",f.value=d,null!==h&&(M(f),P(f,h,g)))):g.set(d,new L("resolved_model",h,null,f))}g=p;3===m&&g++;f=d=h=m=0;k.length=0}else{n=new Uint8Array(n.buffer,q,n.byteLength-g);k.push(n);f-=n.byteLength;break}}a._rowState=m;a._rowID=
36
+ d;a._rowTag=h;a._rowLength=f;return l.read().then(c).catch(e)}}function e(k){V(a,k)}var l=b.getReader();l.read().then(c).catch(e)}exports.createFromFetch=function(a,b){var c=Y(null,null,b&&b.callServer?b.callServer:void 0,void 0);a.then(function(e){Z(c,e.body)},function(e){V(c,e)});return W(c,0)};exports.createFromReadableStream=function(a,b){b=Y(null,null,b&&b.callServer?b.callServer:void 0,void 0);Z(b,a);return W(b,0)};
37
+ exports.createServerReference=function(a,b){function c(){var e=Array.prototype.slice.call(arguments);return b(a,e)}J(c,{id:a,bound:null});return c};exports.encodeReply=function(a){return new Promise(function(b,c){ja(a,"",b,c)})};
37
38
 
38
39
  //# sourceMappingURL=react-server-dom-webpack-client.browser.production.min.js.map