react-router 0.0.0-experimental-4e44d47 → 0.0.0-experimental-3df673e
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.
- package/dist/{production/chunk-IZVJSKMU.mjs → development/chunk-27W3PGKT.mjs} +3 -3
- package/dist/development/{chunk-XVVWTPHF.mjs → chunk-5FNKA3AJ.mjs} +20 -18
- package/dist/{production/chunk-UNIYMJFU.js → development/chunk-HMTR6AB3.js} +134 -134
- package/dist/development/{chunk-7B7CUJYE.js → chunk-OAO2BCWA.js} +19 -17
- package/dist/development/dom-export.d.mts +1 -1
- package/dist/development/dom-export.d.ts +1 -1
- package/dist/development/dom-export.js +3 -3
- package/dist/development/dom-export.mjs +3 -3
- package/dist/development/{index-react-server-client-83aVZHgI.d.ts → index-react-server-client-CCykjjOv.d.ts} +2 -2
- package/dist/{production/index-react-server-client-BDG19ZQl.d.mts → development/index-react-server-client-vPxdwQO-.d.mts} +2 -2
- package/dist/development/index-react-server-client.d.mts +3 -3
- package/dist/development/index-react-server-client.d.ts +3 -3
- package/dist/development/index-react-server-client.js +4 -4
- package/dist/development/index-react-server-client.mjs +2 -2
- package/dist/development/index-react-server.d.mts +3 -3
- package/dist/development/index-react-server.d.ts +3 -3
- package/dist/development/index-react-server.js +11 -11
- package/dist/development/index-react-server.mjs +11 -11
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +99 -99
- package/dist/development/index.mjs +3 -3
- package/dist/development/{instrumentation-XYmrzhe3.d.ts → instrumentation-BsMyG4uF.d.ts} +2 -2
- package/dist/development/lib/types/internal.d.mts +2 -2
- package/dist/development/lib/types/internal.d.ts +2 -2
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/{production/routeModules-Bu1JamQV.d.ts → development/routeModules-BsBQDHG4.d.ts} +3 -3
- package/dist/development/{routeModules-CtCOLGtG.d.mts → routeModules-DSpLybMz.d.mts} +3 -3
- package/dist/development/{router-2BoB34m1.d.mts → router-B02dMGKy.d.mts} +2 -2
- package/dist/{development/chunk-MTLWRICG.js → production/chunk-BJWGLTLV.js} +134 -134
- package/dist/{development/chunk-PSQFTIPQ.mjs → production/chunk-IFXZKZUN.mjs} +3 -3
- package/dist/production/{chunk-OXRQQZPR.js → chunk-NZTFTCSL.js} +19 -17
- package/dist/production/{chunk-GSSVRQ6M.mjs → chunk-XWLYGPB7.mjs} +20 -18
- package/dist/production/dom-export.d.mts +1 -1
- package/dist/production/dom-export.d.ts +1 -1
- package/dist/production/dom-export.js +3 -3
- package/dist/production/dom-export.mjs +3 -3
- package/dist/production/{index-react-server-client-83aVZHgI.d.ts → index-react-server-client-CCykjjOv.d.ts} +2 -2
- package/dist/{development/index-react-server-client-BDG19ZQl.d.mts → production/index-react-server-client-vPxdwQO-.d.mts} +2 -2
- package/dist/production/index-react-server-client.d.mts +3 -3
- package/dist/production/index-react-server-client.d.ts +3 -3
- package/dist/production/index-react-server-client.js +4 -4
- package/dist/production/index-react-server-client.mjs +2 -2
- package/dist/production/index-react-server.d.mts +3 -3
- package/dist/production/index-react-server.d.ts +3 -3
- package/dist/production/index-react-server.js +11 -11
- package/dist/production/index-react-server.mjs +11 -11
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +99 -99
- package/dist/production/index.mjs +3 -3
- package/dist/production/{instrumentation-XYmrzhe3.d.ts → instrumentation-BsMyG4uF.d.ts} +2 -2
- package/dist/production/lib/types/internal.d.mts +2 -2
- package/dist/production/lib/types/internal.d.ts +2 -2
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- package/dist/{development/routeModules-Bu1JamQV.d.ts → production/routeModules-BsBQDHG4.d.ts} +3 -3
- package/dist/production/{routeModules-CtCOLGtG.d.mts → routeModules-DSpLybMz.d.mts} +3 -3
- package/dist/production/{router-2BoB34m1.d.mts → router-B02dMGKy.d.mts} +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }/**
|
|
2
|
-
* react-router v0.0.0-experimental-
|
|
2
|
+
* react-router v0.0.0-experimental-3df673e
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
|
|
58
|
-
var
|
|
58
|
+
var _chunkHMTR6AB3js = require('./chunk-HMTR6AB3.js');
|
|
59
59
|
|
|
60
60
|
|
|
61
61
|
|
|
@@ -147,7 +147,7 @@ var _chunkMTLWRICGjs = require('./chunk-MTLWRICG.js');
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
var
|
|
150
|
+
var _chunkOAO2BCWAjs = require('./chunk-OAO2BCWA.js');
|
|
151
151
|
|
|
152
152
|
// lib/dom/ssr/server.tsx
|
|
153
153
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react);
|
|
@@ -160,7 +160,7 @@ function ServerRouter({
|
|
|
160
160
|
url = new URL(url);
|
|
161
161
|
}
|
|
162
162
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
163
|
-
let routes =
|
|
163
|
+
let routes = _chunkOAO2BCWAjs.createServerRoutes.call(void 0,
|
|
164
164
|
manifest.routes,
|
|
165
165
|
routeModules,
|
|
166
166
|
context.future,
|
|
@@ -173,7 +173,7 @@ function ServerRouter({
|
|
|
173
173
|
let routeId = match.route.id;
|
|
174
174
|
let route = routeModules[routeId];
|
|
175
175
|
let manifestRoute = context.manifest.routes[routeId];
|
|
176
|
-
if (route && manifestRoute &&
|
|
176
|
+
if (route && manifestRoute && _chunkOAO2BCWAjs.shouldHydrateRouteLoader.call(void 0,
|
|
177
177
|
routeId,
|
|
178
178
|
route.clientLoader,
|
|
179
179
|
manifestRoute.hasLoader,
|
|
@@ -182,9 +182,9 @@ function ServerRouter({
|
|
|
182
182
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
let router =
|
|
185
|
+
let router = _chunkHMTR6AB3js.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
186
186
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
187
|
-
|
|
187
|
+
_chunkOAO2BCWAjs.FrameworkContext.Provider,
|
|
188
188
|
{
|
|
189
189
|
value: {
|
|
190
190
|
manifest,
|
|
@@ -199,8 +199,8 @@ function ServerRouter({
|
|
|
199
199
|
renderMeta: context.renderMeta
|
|
200
200
|
}
|
|
201
201
|
},
|
|
202
|
-
/* @__PURE__ */ React.createElement(
|
|
203
|
-
|
|
202
|
+
/* @__PURE__ */ React.createElement(_chunkOAO2BCWAjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
203
|
+
_chunkHMTR6AB3js.StaticRouterProvider,
|
|
204
204
|
{
|
|
205
205
|
router,
|
|
206
206
|
context: context.staticHandlerContext,
|
|
@@ -208,7 +208,7 @@ function ServerRouter({
|
|
|
208
208
|
}
|
|
209
209
|
))
|
|
210
210
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
211
|
-
|
|
211
|
+
_chunkOAO2BCWAjs.StreamTransfer,
|
|
212
212
|
{
|
|
213
213
|
context,
|
|
214
214
|
identifier: 0,
|
|
@@ -250,18 +250,18 @@ function createRoutesStub(routes, _context) {
|
|
|
250
250
|
let patched = processRoutes(
|
|
251
251
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
252
252
|
// types compared to `AgnosticRouteObject`
|
|
253
|
-
|
|
254
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
253
|
+
_chunkOAO2BCWAjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
254
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunkOAO2BCWAjs.RouterContextProvider)() : {},
|
|
255
255
|
frameworkContextRef.current.manifest,
|
|
256
256
|
frameworkContextRef.current.routeModules
|
|
257
257
|
);
|
|
258
|
-
routerRef.current =
|
|
258
|
+
routerRef.current = _chunkHMTR6AB3js.createMemoryRouter.call(void 0, patched, {
|
|
259
259
|
initialEntries,
|
|
260
260
|
initialIndex,
|
|
261
261
|
hydrationData
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
|
-
return /* @__PURE__ */ React2.createElement(
|
|
264
|
+
return /* @__PURE__ */ React2.createElement(_chunkOAO2BCWAjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkHMTR6AB3js.RouterProvider, { router: routerRef.current }));
|
|
265
265
|
};
|
|
266
266
|
}
|
|
267
267
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -275,9 +275,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
275
275
|
id: route.id,
|
|
276
276
|
path: route.path,
|
|
277
277
|
index: route.index,
|
|
278
|
-
Component: route.Component ?
|
|
279
|
-
HydrateFallback: route.HydrateFallback ?
|
|
280
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
278
|
+
Component: route.Component ? _chunkHMTR6AB3js.withComponentProps.call(void 0, route.Component) : void 0,
|
|
279
|
+
HydrateFallback: route.HydrateFallback ? _chunkHMTR6AB3js.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
280
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkHMTR6AB3js.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
281
281
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
282
282
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
283
283
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -312,7 +312,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
312
312
|
};
|
|
313
313
|
manifest.routes[newRoute.id] = entryRoute;
|
|
314
314
|
routeModules[route.id] = {
|
|
315
|
-
default: newRoute.Component ||
|
|
315
|
+
default: newRoute.Component || _chunkHMTR6AB3js.Outlet,
|
|
316
316
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
317
317
|
handle: route.handle,
|
|
318
318
|
links: route.links,
|
|
@@ -507,7 +507,7 @@ function myUnescape(value) {
|
|
|
507
507
|
return result;
|
|
508
508
|
}
|
|
509
509
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
510
|
-
|
|
510
|
+
_chunkOAO2BCWAjs.warnOnce.call(void 0,
|
|
511
511
|
!expires,
|
|
512
512
|
`The "${name}" cookie has an "expires" property set. This will cause the expires value to not be updated when the session is committed. Instead, you should set the expires value when serializing the cookie. You can use \`commitSession(session, { expires })\` if using a session storage object, or \`cookie.serialize("value", { expires })\` if you're using the cookie directly.`
|
|
513
513
|
);
|
|
@@ -561,7 +561,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
561
561
|
let entries = Object.entries(errors);
|
|
562
562
|
let serialized = {};
|
|
563
563
|
for (let [key, val] of entries) {
|
|
564
|
-
if (
|
|
564
|
+
if (_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, val)) {
|
|
565
565
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
566
566
|
} else if (val instanceof Error) {
|
|
567
567
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -586,7 +586,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
586
586
|
|
|
587
587
|
// lib/server-runtime/routeMatching.ts
|
|
588
588
|
function matchServerRoutes(routes, pathname, basename) {
|
|
589
|
-
let matches =
|
|
589
|
+
let matches = _chunkOAO2BCWAjs.matchRoutes.call(void 0,
|
|
590
590
|
routes,
|
|
591
591
|
pathname,
|
|
592
592
|
basename
|
|
@@ -605,9 +605,9 @@ async function callRouteHandler(handler, args) {
|
|
|
605
605
|
request: stripRoutesParam(stripIndexParam2(args.request)),
|
|
606
606
|
params: args.params,
|
|
607
607
|
context: args.context,
|
|
608
|
-
|
|
608
|
+
unstable_pattern: args.unstable_pattern
|
|
609
609
|
});
|
|
610
|
-
if (
|
|
610
|
+
if (_chunkOAO2BCWAjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkOAO2BCWAjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
611
611
|
throw new Response(null, result.init);
|
|
612
612
|
}
|
|
613
613
|
return result;
|
|
@@ -726,17 +726,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
726
726
|
controller.close();
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
|
-
let decoded = await
|
|
729
|
+
let decoded = await _chunkOAO2BCWAjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
730
730
|
let data2 = decoded.value;
|
|
731
|
-
if (data2 &&
|
|
732
|
-
let result = data2[
|
|
731
|
+
if (data2 && _chunkOAO2BCWAjs.SingleFetchRedirectSymbol in data2) {
|
|
732
|
+
let result = data2[_chunkOAO2BCWAjs.SingleFetchRedirectSymbol];
|
|
733
733
|
let init = { status: result.status };
|
|
734
734
|
if (result.reload) {
|
|
735
|
-
throw
|
|
735
|
+
throw _chunkOAO2BCWAjs.redirectDocument.call(void 0, result.redirect, init);
|
|
736
736
|
} else if (result.replace) {
|
|
737
|
-
throw
|
|
737
|
+
throw _chunkOAO2BCWAjs.replace.call(void 0, result.redirect, init);
|
|
738
738
|
} else {
|
|
739
|
-
throw
|
|
739
|
+
throw _chunkOAO2BCWAjs.redirect.call(void 0, result.redirect, init);
|
|
740
740
|
}
|
|
741
741
|
} else {
|
|
742
742
|
invariant2(
|
|
@@ -775,7 +775,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
775
775
|
|
|
776
776
|
// lib/server-runtime/serverHandoff.ts
|
|
777
777
|
function createServerHandoffString(serverHandoff) {
|
|
778
|
-
return
|
|
778
|
+
return _chunkOAO2BCWAjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
779
779
|
}
|
|
780
780
|
|
|
781
781
|
// lib/server-runtime/headers.ts
|
|
@@ -852,7 +852,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
852
852
|
|
|
853
853
|
// lib/server-runtime/single-fetch.ts
|
|
854
854
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
855
|
-
...
|
|
855
|
+
..._chunkOAO2BCWAjs.NO_BODY_STATUS_CODES,
|
|
856
856
|
304
|
|
857
857
|
]);
|
|
858
858
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -882,7 +882,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
882
882
|
return handleQueryError(error);
|
|
883
883
|
}
|
|
884
884
|
function handleQueryResult(result) {
|
|
885
|
-
return
|
|
885
|
+
return _chunkOAO2BCWAjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
886
886
|
}
|
|
887
887
|
function handleQueryError(error) {
|
|
888
888
|
handleError(error);
|
|
@@ -894,12 +894,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
894
894
|
}
|
|
895
895
|
function staticContextToResponse(context) {
|
|
896
896
|
let headers = getDocumentHeaders(context, build);
|
|
897
|
-
if (
|
|
897
|
+
if (_chunkOAO2BCWAjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
898
898
|
return new Response(null, { status: context.statusCode, headers });
|
|
899
899
|
}
|
|
900
900
|
if (context.errors) {
|
|
901
901
|
Object.values(context.errors).forEach((err) => {
|
|
902
|
-
if (!
|
|
902
|
+
if (!_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
903
903
|
handleError(err);
|
|
904
904
|
}
|
|
905
905
|
});
|
|
@@ -946,7 +946,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
946
946
|
return handleQueryError(error);
|
|
947
947
|
}
|
|
948
948
|
function handleQueryResult(result) {
|
|
949
|
-
return
|
|
949
|
+
return _chunkOAO2BCWAjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
950
950
|
}
|
|
951
951
|
function handleQueryError(error) {
|
|
952
952
|
handleError(error);
|
|
@@ -958,12 +958,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
958
958
|
}
|
|
959
959
|
function staticContextToResponse(context) {
|
|
960
960
|
let headers = getDocumentHeaders(context, build);
|
|
961
|
-
if (
|
|
961
|
+
if (_chunkOAO2BCWAjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
962
962
|
return new Response(null, { status: context.statusCode, headers });
|
|
963
963
|
}
|
|
964
964
|
if (context.errors) {
|
|
965
965
|
Object.values(context.errors).forEach((err) => {
|
|
966
|
-
if (!
|
|
966
|
+
if (!_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
967
967
|
handleError(err);
|
|
968
968
|
}
|
|
969
969
|
});
|
|
@@ -1027,15 +1027,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1027
1027
|
headers.delete("Location");
|
|
1028
1028
|
headers.set("Content-Type", "text/x-script");
|
|
1029
1029
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1030
|
-
result: request.method === "GET" ? { [
|
|
1030
|
+
result: request.method === "GET" ? { [_chunkOAO2BCWAjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1031
1031
|
headers,
|
|
1032
|
-
status:
|
|
1032
|
+
status: _chunkOAO2BCWAjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1033
1033
|
});
|
|
1034
1034
|
}
|
|
1035
1035
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1036
1036
|
let redirect2 = headers.get("Location");
|
|
1037
1037
|
if (basename) {
|
|
1038
|
-
redirect2 =
|
|
1038
|
+
redirect2 = _chunkOAO2BCWAjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1039
1039
|
}
|
|
1040
1040
|
return {
|
|
1041
1041
|
redirect: redirect2,
|
|
@@ -1061,7 +1061,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1061
1061
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1062
1062
|
);
|
|
1063
1063
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1064
|
-
return
|
|
1064
|
+
return _chunkOAO2BCWAjs.encode.call(void 0, data2, {
|
|
1065
1065
|
signal: controller.signal,
|
|
1066
1066
|
plugins: [
|
|
1067
1067
|
(value) => {
|
|
@@ -1069,12 +1069,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1069
1069
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1070
1070
|
return ["SanitizedError", name, message, stack];
|
|
1071
1071
|
}
|
|
1072
|
-
if (value instanceof
|
|
1072
|
+
if (value instanceof _chunkOAO2BCWAjs.ErrorResponseImpl) {
|
|
1073
1073
|
let { data: data3, status, statusText } = value;
|
|
1074
1074
|
return ["ErrorResponse", data3, status, statusText];
|
|
1075
1075
|
}
|
|
1076
|
-
if (value && typeof value === "object" &&
|
|
1077
|
-
return ["SingleFetchRedirect", value[
|
|
1076
|
+
if (value && typeof value === "object" && _chunkOAO2BCWAjs.SingleFetchRedirectSymbol in value) {
|
|
1077
|
+
return ["SingleFetchRedirect", value[_chunkOAO2BCWAjs.SingleFetchRedirectSymbol]];
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
],
|
|
@@ -1097,7 +1097,7 @@ function derive(build, mode) {
|
|
|
1097
1097
|
let routes = createRoutes(build.routes);
|
|
1098
1098
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1099
1099
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1100
|
-
let staticHandler =
|
|
1100
|
+
let staticHandler = _chunkOAO2BCWAjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1101
1101
|
basename: build.basename,
|
|
1102
1102
|
unstable_instrumentations: build.entry.module.unstable_instrumentations
|
|
1103
1103
|
});
|
|
@@ -1105,7 +1105,7 @@ function derive(build, mode) {
|
|
|
1105
1105
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1106
1106
|
console.error(
|
|
1107
1107
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1108
|
-
|
|
1108
|
+
_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1109
1109
|
);
|
|
1110
1110
|
}
|
|
1111
1111
|
});
|
|
@@ -1123,36 +1123,36 @@ function derive(build, mode) {
|
|
|
1123
1123
|
});
|
|
1124
1124
|
};
|
|
1125
1125
|
if (build.future.v8_middleware) {
|
|
1126
|
-
if (initialContext && !(initialContext instanceof
|
|
1126
|
+
if (initialContext && !(initialContext instanceof _chunkOAO2BCWAjs.RouterContextProvider)) {
|
|
1127
1127
|
let error = new Error(
|
|
1128
1128
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1129
1129
|
);
|
|
1130
1130
|
handleError(error);
|
|
1131
1131
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1132
1132
|
}
|
|
1133
|
-
loadContext = initialContext || new (0,
|
|
1133
|
+
loadContext = initialContext || new (0, _chunkOAO2BCWAjs.RouterContextProvider)();
|
|
1134
1134
|
} else {
|
|
1135
1135
|
loadContext = initialContext || {};
|
|
1136
1136
|
}
|
|
1137
1137
|
let url = new URL(request.url);
|
|
1138
1138
|
let normalizedBasename = build.basename || "/";
|
|
1139
1139
|
let normalizedPath = url.pathname;
|
|
1140
|
-
if (
|
|
1140
|
+
if (_chunkOAO2BCWAjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1141
1141
|
normalizedPath = normalizedBasename;
|
|
1142
1142
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1143
1143
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1144
1144
|
}
|
|
1145
|
-
if (
|
|
1145
|
+
if (_chunkOAO2BCWAjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1146
1146
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1147
1147
|
}
|
|
1148
1148
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1149
1149
|
if (!build.ssr) {
|
|
1150
1150
|
let decodedPath = decodeURI(normalizedPath);
|
|
1151
1151
|
if (normalizedBasename !== "/") {
|
|
1152
|
-
let strippedPath =
|
|
1152
|
+
let strippedPath = _chunkOAO2BCWAjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1153
1153
|
if (strippedPath == null) {
|
|
1154
1154
|
errorHandler(
|
|
1155
|
-
new (0,
|
|
1155
|
+
new (0, _chunkOAO2BCWAjs.ErrorResponseImpl)(
|
|
1156
1156
|
404,
|
|
1157
1157
|
"Not Found",
|
|
1158
1158
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1175,7 +1175,7 @@ function derive(build, mode) {
|
|
|
1175
1175
|
} else if (!build.prerender.includes(decodedPath) && !build.prerender.includes(decodedPath + "/")) {
|
|
1176
1176
|
if (url.pathname.endsWith(".data")) {
|
|
1177
1177
|
errorHandler(
|
|
1178
|
-
new (0,
|
|
1178
|
+
new (0, _chunkOAO2BCWAjs.ErrorResponseImpl)(
|
|
1179
1179
|
404,
|
|
1180
1180
|
"Not Found",
|
|
1181
1181
|
`Refusing to SSR the path \`${decodedPath}\` because \`ssr:false\` is set and the path is not included in the \`prerender\` config, so in production the path will be a 404.`
|
|
@@ -1195,7 +1195,7 @@ function derive(build, mode) {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
1197
|
}
|
|
1198
|
-
let manifestUrl =
|
|
1198
|
+
let manifestUrl = _chunkOAO2BCWAjs.getManifestPath.call(void 0,
|
|
1199
1199
|
build.routeDiscovery.manifestPath,
|
|
1200
1200
|
normalizedBasename
|
|
1201
1201
|
);
|
|
@@ -1230,7 +1230,7 @@ function derive(build, mode) {
|
|
|
1230
1230
|
loadContext,
|
|
1231
1231
|
handleError
|
|
1232
1232
|
);
|
|
1233
|
-
if (
|
|
1233
|
+
if (_chunkOAO2BCWAjs.isRedirectResponse.call(void 0, response)) {
|
|
1234
1234
|
response = generateSingleFetchRedirectResponse(
|
|
1235
1235
|
response,
|
|
1236
1236
|
request,
|
|
@@ -1244,7 +1244,7 @@ function derive(build, mode) {
|
|
|
1244
1244
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1245
1245
|
request
|
|
1246
1246
|
});
|
|
1247
|
-
if (
|
|
1247
|
+
if (_chunkOAO2BCWAjs.isRedirectResponse.call(void 0, response)) {
|
|
1248
1248
|
response = generateSingleFetchRedirectResponse(
|
|
1249
1249
|
response,
|
|
1250
1250
|
request,
|
|
@@ -1292,7 +1292,7 @@ function derive(build, mode) {
|
|
|
1292
1292
|
return response;
|
|
1293
1293
|
};
|
|
1294
1294
|
if (build.entry.module.unstable_instrumentations) {
|
|
1295
|
-
requestHandler =
|
|
1295
|
+
requestHandler = _chunkOAO2BCWAjs.instrumentHandler.call(void 0,
|
|
1296
1296
|
requestHandler,
|
|
1297
1297
|
build.entry.module.unstable_instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1298
1298
|
);
|
|
@@ -1404,7 +1404,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1404
1404
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1405
1405
|
try {
|
|
1406
1406
|
let innerResult = await query(request);
|
|
1407
|
-
if (!
|
|
1407
|
+
if (!_chunkOAO2BCWAjs.isResponse.call(void 0, innerResult)) {
|
|
1408
1408
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1409
1409
|
}
|
|
1410
1410
|
return innerResult;
|
|
@@ -1414,7 +1414,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1414
1414
|
}
|
|
1415
1415
|
} : void 0
|
|
1416
1416
|
});
|
|
1417
|
-
if (!
|
|
1417
|
+
if (!_chunkOAO2BCWAjs.isResponse.call(void 0, result)) {
|
|
1418
1418
|
result = await renderHtml(result, isSpaMode);
|
|
1419
1419
|
}
|
|
1420
1420
|
return result;
|
|
@@ -1429,7 +1429,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1429
1429
|
}
|
|
1430
1430
|
if (context.errors) {
|
|
1431
1431
|
Object.values(context.errors).forEach((err) => {
|
|
1432
|
-
if (!
|
|
1432
|
+
if (!_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1433
1433
|
handleError(err);
|
|
1434
1434
|
}
|
|
1435
1435
|
});
|
|
@@ -1481,10 +1481,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1481
1481
|
} catch (error) {
|
|
1482
1482
|
handleError(error);
|
|
1483
1483
|
let errorForSecondRender = error;
|
|
1484
|
-
if (
|
|
1484
|
+
if (_chunkOAO2BCWAjs.isResponse.call(void 0, error)) {
|
|
1485
1485
|
try {
|
|
1486
1486
|
let data2 = await unwrapResponse(error);
|
|
1487
|
-
errorForSecondRender = new (0,
|
|
1487
|
+
errorForSecondRender = new (0, _chunkOAO2BCWAjs.ErrorResponseImpl)(
|
|
1488
1488
|
error.status,
|
|
1489
1489
|
error.statusText,
|
|
1490
1490
|
data2
|
|
@@ -1492,7 +1492,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1492
1492
|
} catch (e) {
|
|
1493
1493
|
}
|
|
1494
1494
|
}
|
|
1495
|
-
context =
|
|
1495
|
+
context = _chunkOAO2BCWAjs.getStaticContextFromError.call(void 0,
|
|
1496
1496
|
staticHandler.dataRoutes,
|
|
1497
1497
|
context,
|
|
1498
1498
|
errorForSecondRender
|
|
@@ -1551,7 +1551,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1551
1551
|
return handleQueryRouteError(error);
|
|
1552
1552
|
}
|
|
1553
1553
|
function handleQueryRouteResult(result) {
|
|
1554
|
-
if (
|
|
1554
|
+
if (_chunkOAO2BCWAjs.isResponse.call(void 0, result)) {
|
|
1555
1555
|
return result;
|
|
1556
1556
|
}
|
|
1557
1557
|
if (typeof result === "string") {
|
|
@@ -1560,10 +1560,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1560
1560
|
return Response.json(result);
|
|
1561
1561
|
}
|
|
1562
1562
|
function handleQueryRouteError(error) {
|
|
1563
|
-
if (
|
|
1563
|
+
if (_chunkOAO2BCWAjs.isResponse.call(void 0, error)) {
|
|
1564
1564
|
return error;
|
|
1565
1565
|
}
|
|
1566
|
-
if (
|
|
1566
|
+
if (_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1567
1567
|
handleError(error);
|
|
1568
1568
|
return errorResponseToJson(error, serverMode);
|
|
1569
1569
|
}
|
|
@@ -1686,7 +1686,7 @@ function createSessionStorage({
|
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
1688
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1689
|
-
|
|
1689
|
+
_chunkOAO2BCWAjs.warnOnce.call(void 0,
|
|
1690
1690
|
cookie.isSigned,
|
|
1691
1691
|
`The "${cookie.name}" cookie is not signed, but session cookies should be signed to prevent tampering on the client before they are sent back to the server. See https://reactrouter.com/explanation/sessions-and-cookies#signing-cookies for more information.`
|
|
1692
1692
|
);
|
|
@@ -1793,12 +1793,12 @@ function getHydrationData({
|
|
|
1793
1793
|
...state,
|
|
1794
1794
|
loaderData: { ...state.loaderData }
|
|
1795
1795
|
};
|
|
1796
|
-
let initialMatches =
|
|
1796
|
+
let initialMatches = _chunkOAO2BCWAjs.matchRoutes.call(void 0, routes, location2, basename);
|
|
1797
1797
|
if (initialMatches) {
|
|
1798
1798
|
for (let match of initialMatches) {
|
|
1799
1799
|
let routeId = match.route.id;
|
|
1800
1800
|
let routeInfo = getRouteInfo(routeId);
|
|
1801
|
-
if (
|
|
1801
|
+
if (_chunkOAO2BCWAjs.shouldHydrateRouteLoader.call(void 0,
|
|
1802
1802
|
routeId,
|
|
1803
1803
|
routeInfo.clientLoader,
|
|
1804
1804
|
routeInfo.hasLoader,
|
|
@@ -1876,7 +1876,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1876
1876
|
}
|
|
1877
1877
|
}
|
|
1878
1878
|
);
|
|
1879
|
-
if (
|
|
1879
|
+
if (_chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1880
1880
|
return /* @__PURE__ */ React.default.createElement(
|
|
1881
1881
|
ErrorWrapper,
|
|
1882
1882
|
{
|
|
@@ -1884,7 +1884,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1884
1884
|
title: "Unhandled Thrown Response!"
|
|
1885
1885
|
},
|
|
1886
1886
|
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1887
|
-
|
|
1887
|
+
_chunkOAO2BCWAjs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1888
1888
|
);
|
|
1889
1889
|
}
|
|
1890
1890
|
let errorInstance;
|
|
@@ -1910,7 +1910,7 @@ function RSCDefaultRootErrorBoundaryImpl({
|
|
|
1910
1910
|
function RSCDefaultRootErrorBoundary({
|
|
1911
1911
|
hasRootLayout
|
|
1912
1912
|
}) {
|
|
1913
|
-
let error =
|
|
1913
|
+
let error = _chunkOAO2BCWAjs.useRouteError.call(void 0, );
|
|
1914
1914
|
if (hasRootLayout === void 0) {
|
|
1915
1915
|
throw new Error("Missing 'hasRootLayout' prop");
|
|
1916
1916
|
}
|
|
@@ -2058,7 +2058,7 @@ function createRouterFromPayload({
|
|
|
2058
2058
|
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2059
2059
|
let patches = /* @__PURE__ */ new Map();
|
|
2060
2060
|
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2061
|
-
|
|
2061
|
+
_chunkOAO2BCWAjs.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2062
2062
|
if (!patches.has(patch.parentId)) {
|
|
2063
2063
|
patches.set(patch.parentId, []);
|
|
2064
2064
|
}
|
|
@@ -2080,11 +2080,11 @@ function createRouterFromPayload({
|
|
|
2080
2080
|
}
|
|
2081
2081
|
return [route];
|
|
2082
2082
|
}, []);
|
|
2083
|
-
globalVar.__reactRouterDataRouter =
|
|
2083
|
+
globalVar.__reactRouterDataRouter = _chunkOAO2BCWAjs.createRouter.call(void 0, {
|
|
2084
2084
|
routes,
|
|
2085
2085
|
getContext,
|
|
2086
2086
|
basename: payload.basename,
|
|
2087
|
-
history:
|
|
2087
|
+
history: _chunkOAO2BCWAjs.createBrowserHistory.call(void 0, ),
|
|
2088
2088
|
hydrationData: getHydrationData({
|
|
2089
2089
|
state: {
|
|
2090
2090
|
loaderData: payload.loaderData,
|
|
@@ -2094,7 +2094,7 @@ function createRouterFromPayload({
|
|
|
2094
2094
|
routes,
|
|
2095
2095
|
getRouteInfo: (routeId) => {
|
|
2096
2096
|
let match = payload.matches.find((m) => m.id === routeId);
|
|
2097
|
-
|
|
2097
|
+
_chunkOAO2BCWAjs.invariant.call(void 0, match, "Route not found in payload");
|
|
2098
2098
|
return {
|
|
2099
2099
|
clientLoader: match.clientLoader,
|
|
2100
2100
|
hasLoader: match.hasLoader,
|
|
@@ -2192,9 +2192,9 @@ function createRouterFromPayload({
|
|
|
2192
2192
|
routeModules: globalVar.__reactRouterRouteModules
|
|
2193
2193
|
};
|
|
2194
2194
|
}
|
|
2195
|
-
var renderedRoutesContext =
|
|
2195
|
+
var renderedRoutesContext = _chunkOAO2BCWAjs.createContext.call(void 0, );
|
|
2196
2196
|
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2197
|
-
let dataStrategy =
|
|
2197
|
+
let dataStrategy = _chunkOAO2BCWAjs.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2198
2198
|
getRouter,
|
|
2199
2199
|
(match) => {
|
|
2200
2200
|
let M = match;
|
|
@@ -2248,20 +2248,20 @@ function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReada
|
|
|
2248
2248
|
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2249
2249
|
return async (args, basename, targetRoutes) => {
|
|
2250
2250
|
let { request, context } = args;
|
|
2251
|
-
let url =
|
|
2251
|
+
let url = _chunkOAO2BCWAjs.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2252
2252
|
if (request.method === "GET") {
|
|
2253
|
-
url =
|
|
2253
|
+
url = _chunkOAO2BCWAjs.stripIndexParam.call(void 0, url);
|
|
2254
2254
|
if (targetRoutes) {
|
|
2255
2255
|
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2256
2256
|
}
|
|
2257
2257
|
}
|
|
2258
2258
|
let res = await fetchImplementation(
|
|
2259
|
-
new Request(url, await
|
|
2259
|
+
new Request(url, await _chunkOAO2BCWAjs.createRequestInit.call(void 0, request))
|
|
2260
2260
|
);
|
|
2261
2261
|
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2262
|
-
throw new (0,
|
|
2262
|
+
throw new (0, _chunkOAO2BCWAjs.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
2263
2263
|
}
|
|
2264
|
-
|
|
2264
|
+
_chunkOAO2BCWAjs.invariant.call(void 0, res.body, "No response body to decode");
|
|
2265
2265
|
try {
|
|
2266
2266
|
const payload = await createFromReadableStream(res.body, {
|
|
2267
2267
|
temporaryReferences: void 0
|
|
@@ -2285,7 +2285,7 @@ function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation)
|
|
|
2285
2285
|
}
|
|
2286
2286
|
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2287
2287
|
let results = { routes: {} };
|
|
2288
|
-
const dataKey =
|
|
2288
|
+
const dataKey = _chunkOAO2BCWAjs.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2289
2289
|
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2290
2290
|
results.routes[routeId] = { data: data2 };
|
|
2291
2291
|
}
|
|
@@ -2318,7 +2318,7 @@ function RSCHydratedRouter({
|
|
|
2318
2318
|
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2319
2319
|
);
|
|
2320
2320
|
React4.useEffect(() => {
|
|
2321
|
-
|
|
2321
|
+
_chunkOAO2BCWAjs.setIsHydrated.call(void 0, );
|
|
2322
2322
|
}, []);
|
|
2323
2323
|
React4.useLayoutEffect(() => {
|
|
2324
2324
|
const globalVar = window;
|
|
@@ -2405,7 +2405,7 @@ function RSCHydratedRouter({
|
|
|
2405
2405
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2406
2406
|
routeModules
|
|
2407
2407
|
};
|
|
2408
|
-
return /* @__PURE__ */ React4.createElement(
|
|
2408
|
+
return /* @__PURE__ */ React4.createElement(_chunkOAO2BCWAjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunkOAO2BCWAjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkHMTR6AB3js.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2409
2409
|
}
|
|
2410
2410
|
function createRouteFromServerManifest(match, payload) {
|
|
2411
2411
|
let hasInitialData = payload && match.id in payload.loaderData;
|
|
@@ -2416,7 +2416,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2416
2416
|
// the server loader flow regardless of whether the client loader calls
|
|
2417
2417
|
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2418
2418
|
match.hasComponent && !match.element;
|
|
2419
|
-
|
|
2419
|
+
_chunkOAO2BCWAjs.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2420
2420
|
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2421
2421
|
let dataRoute = {
|
|
2422
2422
|
id: match.id,
|
|
@@ -2467,7 +2467,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2467
2467
|
return await callSingleFetch(singleFetch);
|
|
2468
2468
|
}
|
|
2469
2469
|
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2470
|
-
throw
|
|
2470
|
+
throw _chunkOAO2BCWAjs.noActionDefinedError.call(void 0, "action", match.id);
|
|
2471
2471
|
},
|
|
2472
2472
|
path: match.path,
|
|
2473
2473
|
shouldRevalidate: match.shouldRevalidate,
|
|
@@ -2480,7 +2480,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2480
2480
|
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2481
2481
|
};
|
|
2482
2482
|
if (typeof dataRoute.loader === "function") {
|
|
2483
|
-
dataRoute.loader.hydrate =
|
|
2483
|
+
dataRoute.loader.hydrate = _chunkOAO2BCWAjs.shouldHydrateRouteLoader.call(void 0,
|
|
2484
2484
|
match.id,
|
|
2485
2485
|
match.clientLoader,
|
|
2486
2486
|
match.hasLoader,
|
|
@@ -2490,7 +2490,7 @@ function createRouteFromServerManifest(match, payload) {
|
|
|
2490
2490
|
return dataRoute;
|
|
2491
2491
|
}
|
|
2492
2492
|
function callSingleFetch(singleFetch) {
|
|
2493
|
-
|
|
2493
|
+
_chunkOAO2BCWAjs.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2494
2494
|
return singleFetch();
|
|
2495
2495
|
}
|
|
2496
2496
|
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
@@ -2498,7 +2498,7 @@ function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
|
2498
2498
|
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2499
2499
|
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2500
2500
|
console.error(msg);
|
|
2501
|
-
throw new (0,
|
|
2501
|
+
throw new (0, _chunkOAO2BCWAjs.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2502
2502
|
}
|
|
2503
2503
|
}
|
|
2504
2504
|
var nextPaths = /* @__PURE__ */ new Set();
|
|
@@ -2746,7 +2746,7 @@ async function routeRSCServerRequest({
|
|
|
2746
2746
|
const payload = await createFromReadableStream(
|
|
2747
2747
|
detectRedirectResponse.body
|
|
2748
2748
|
);
|
|
2749
|
-
if (serverResponse.status ===
|
|
2749
|
+
if (serverResponse.status === _chunkOAO2BCWAjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2750
2750
|
const headers2 = new Headers(serverResponse.headers);
|
|
2751
2751
|
headers2.delete("Content-Encoding");
|
|
2752
2752
|
headers2.delete("Content-Length");
|
|
@@ -2781,7 +2781,7 @@ async function routeRSCServerRequest({
|
|
|
2781
2781
|
return reason;
|
|
2782
2782
|
}
|
|
2783
2783
|
try {
|
|
2784
|
-
const status =
|
|
2784
|
+
const status = _chunkOAO2BCWAjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2785
2785
|
const html = await renderHTML(() => {
|
|
2786
2786
|
const decoded = Promise.resolve(
|
|
2787
2787
|
createFromReadableStream(createStream())
|
|
@@ -2847,7 +2847,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2847
2847
|
if (payload.type !== "render") return null;
|
|
2848
2848
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2849
2849
|
for (const match of payload.matches) {
|
|
2850
|
-
if (
|
|
2850
|
+
if (_chunkOAO2BCWAjs.shouldHydrateRouteLoader.call(void 0,
|
|
2851
2851
|
match.id,
|
|
2852
2852
|
match.clientLoader,
|
|
2853
2853
|
match.hasLoader,
|
|
@@ -2887,7 +2887,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2887
2887
|
}
|
|
2888
2888
|
}))
|
|
2889
2889
|
};
|
|
2890
|
-
const router =
|
|
2890
|
+
const router = _chunkHMTR6AB3js.createStaticRouter.call(void 0,
|
|
2891
2891
|
payload.matches.reduceRight((previous, match) => {
|
|
2892
2892
|
const route = {
|
|
2893
2893
|
id: match.id,
|
|
@@ -2931,8 +2931,8 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2931
2931
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2932
2932
|
routeModules: createRSCRouteModules(payload)
|
|
2933
2933
|
};
|
|
2934
|
-
return /* @__PURE__ */ React5.createElement(
|
|
2935
|
-
|
|
2934
|
+
return /* @__PURE__ */ React5.createElement(_chunkOAO2BCWAjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React5.createElement(RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React5.createElement(_chunkOAO2BCWAjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React5.createElement(
|
|
2935
|
+
_chunkHMTR6AB3js.StaticRouterProvider,
|
|
2936
2936
|
{
|
|
2937
2937
|
context,
|
|
2938
2938
|
router,
|
|
@@ -2990,7 +2990,7 @@ function deserializeErrors(errors) {
|
|
|
2990
2990
|
let serialized = {};
|
|
2991
2991
|
for (let [key, val] of entries) {
|
|
2992
2992
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2993
|
-
serialized[key] = new (0,
|
|
2993
|
+
serialized[key] = new (0, _chunkOAO2BCWAjs.ErrorResponseImpl)(
|
|
2994
2994
|
val.status,
|
|
2995
2995
|
val.statusText,
|
|
2996
2996
|
val.data,
|
|
@@ -3149,4 +3149,4 @@ function deserializeErrors(errors) {
|
|
|
3149
3149
|
|
|
3150
3150
|
|
|
3151
3151
|
|
|
3152
|
-
exports.Await =
|
|
3152
|
+
exports.Await = _chunkHMTR6AB3js.Await; exports.BrowserRouter = _chunkHMTR6AB3js.BrowserRouter; exports.Form = _chunkHMTR6AB3js.Form; exports.HashRouter = _chunkHMTR6AB3js.HashRouter; exports.IDLE_BLOCKER = _chunkOAO2BCWAjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkOAO2BCWAjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkOAO2BCWAjs.IDLE_NAVIGATION; exports.Link = _chunkHMTR6AB3js.Link; exports.Links = _chunkOAO2BCWAjs.Links; exports.MemoryRouter = _chunkHMTR6AB3js.MemoryRouter; exports.Meta = _chunkOAO2BCWAjs.Meta; exports.NavLink = _chunkHMTR6AB3js.NavLink; exports.Navigate = _chunkHMTR6AB3js.Navigate; exports.NavigationType = _chunkOAO2BCWAjs.Action; exports.Outlet = _chunkHMTR6AB3js.Outlet; exports.PrefetchPageLinks = _chunkOAO2BCWAjs.PrefetchPageLinks; exports.Route = _chunkHMTR6AB3js.Route; exports.Router = _chunkHMTR6AB3js.Router; exports.RouterContextProvider = _chunkOAO2BCWAjs.RouterContextProvider; exports.RouterProvider = _chunkHMTR6AB3js.RouterProvider; exports.Routes = _chunkHMTR6AB3js.Routes; exports.Scripts = _chunkOAO2BCWAjs.Scripts; exports.ScrollRestoration = _chunkHMTR6AB3js.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkHMTR6AB3js.StaticRouter; exports.StaticRouterProvider = _chunkHMTR6AB3js.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkOAO2BCWAjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkOAO2BCWAjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkOAO2BCWAjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkOAO2BCWAjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkOAO2BCWAjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkOAO2BCWAjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkOAO2BCWAjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkOAO2BCWAjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkOAO2BCWAjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkOAO2BCWAjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkOAO2BCWAjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkOAO2BCWAjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkHMTR6AB3js.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkHMTR6AB3js.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkHMTR6AB3js.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkOAO2BCWAjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkOAO2BCWAjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkOAO2BCWAjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkOAO2BCWAjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkOAO2BCWAjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkOAO2BCWAjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkOAO2BCWAjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkHMTR6AB3js.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkOAO2BCWAjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkHMTR6AB3js.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkOAO2BCWAjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkOAO2BCWAjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkHMTR6AB3js.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkHMTR6AB3js.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkHMTR6AB3js.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkHMTR6AB3js.withHydrateFallbackProps; exports.createBrowserRouter = _chunkHMTR6AB3js.createBrowserRouter; exports.createContext = _chunkOAO2BCWAjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkHMTR6AB3js.createHashRouter; exports.createMemoryRouter = _chunkHMTR6AB3js.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkOAO2BCWAjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkHMTR6AB3js.createRoutesFromChildren; exports.createRoutesFromElements = _chunkHMTR6AB3js.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkHMTR6AB3js.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkHMTR6AB3js.createStaticHandler; exports.createStaticRouter = _chunkHMTR6AB3js.createStaticRouter; exports.data = _chunkOAO2BCWAjs.data; exports.generatePath = _chunkOAO2BCWAjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkOAO2BCWAjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkOAO2BCWAjs.matchPath; exports.matchRoutes = _chunkOAO2BCWAjs.matchRoutes; exports.parsePath = _chunkOAO2BCWAjs.parsePath; exports.redirect = _chunkOAO2BCWAjs.redirect; exports.redirectDocument = _chunkOAO2BCWAjs.redirectDocument; exports.renderMatches = _chunkHMTR6AB3js.renderMatches; exports.replace = _chunkOAO2BCWAjs.replace; exports.resolvePath = _chunkOAO2BCWAjs.resolvePath; exports.unstable_HistoryRouter = _chunkHMTR6AB3js.HistoryRouter; exports.unstable_RSCHydratedRouter = RSCHydratedRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_createCallServer = createCallServer; exports.unstable_getRSCStream = getRSCStream; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkHMTR6AB3js.usePrompt; exports.useActionData = _chunkOAO2BCWAjs.useActionData; exports.useAsyncError = _chunkOAO2BCWAjs.useAsyncError; exports.useAsyncValue = _chunkOAO2BCWAjs.useAsyncValue; exports.useBeforeUnload = _chunkHMTR6AB3js.useBeforeUnload; exports.useBlocker = _chunkOAO2BCWAjs.useBlocker; exports.useFetcher = _chunkHMTR6AB3js.useFetcher; exports.useFetchers = _chunkHMTR6AB3js.useFetchers; exports.useFormAction = _chunkHMTR6AB3js.useFormAction; exports.useHref = _chunkOAO2BCWAjs.useHref; exports.useInRouterContext = _chunkOAO2BCWAjs.useInRouterContext; exports.useLinkClickHandler = _chunkHMTR6AB3js.useLinkClickHandler; exports.useLoaderData = _chunkOAO2BCWAjs.useLoaderData; exports.useLocation = _chunkOAO2BCWAjs.useLocation; exports.useMatch = _chunkOAO2BCWAjs.useMatch; exports.useMatches = _chunkOAO2BCWAjs.useMatches; exports.useNavigate = _chunkOAO2BCWAjs.useNavigate; exports.useNavigation = _chunkOAO2BCWAjs.useNavigation; exports.useNavigationType = _chunkOAO2BCWAjs.useNavigationType; exports.useOutlet = _chunkOAO2BCWAjs.useOutlet; exports.useOutletContext = _chunkOAO2BCWAjs.useOutletContext; exports.useParams = _chunkOAO2BCWAjs.useParams; exports.useResolvedPath = _chunkOAO2BCWAjs.useResolvedPath; exports.useRevalidator = _chunkOAO2BCWAjs.useRevalidator; exports.useRouteError = _chunkOAO2BCWAjs.useRouteError; exports.useRouteLoaderData = _chunkOAO2BCWAjs.useRouteLoaderData; exports.useRoutes = _chunkOAO2BCWAjs.useRoutes; exports.useSearchParams = _chunkHMTR6AB3js.useSearchParams; exports.useSubmit = _chunkHMTR6AB3js.useSubmit; exports.useViewTransitionState = _chunkHMTR6AB3js.useViewTransitionState;
|