react-router 7.18.2 → 7.18.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/development/{browser-DBmQ1yAR.d.mts → browser-BR5QG7ZC.d.mts} +1 -1
- package/dist/development/{browser-B2PdsXXH.d.ts → browser-eq4RgLsD.d.ts} +1 -1
- package/dist/development/{chunk-HHGH3NKS.js → chunk-7SIULPXI.js} +117 -18
- package/dist/development/{chunk-62JRHF6Z.mjs → chunk-BV7QT456.mjs} +112 -13
- package/dist/development/{chunk-ZA36QIGN.mjs → chunk-HT4INDD5.mjs} +13 -6
- package/dist/{production/chunk-VJZ67BZE.js → development/chunk-QPXIKN46.js} +7 -7
- package/dist/development/{chunk-7XGYIT3M.js → chunk-YRTY65LJ.js} +103 -103
- package/dist/{production/context-CeD5LmaF.d.mts → development/context-nqAapj74.d.mts} +9 -0
- package/dist/development/dom-export.d.mts +2 -2
- package/dist/development/dom-export.d.ts +2 -2
- package/dist/development/dom-export.js +45 -32
- package/dist/development/dom-export.mjs +17 -4
- package/dist/{production/index-react-server-client-3ykjivgQ.d.ts → development/index-react-server-client-BjY-eKuf.d.ts} +2 -1
- package/dist/{production/index-react-server-client-CACgcj2J.d.mts → development/index-react-server-client-K63fpMH4.d.mts} +1 -1
- package/dist/development/index-react-server-client.d.mts +2 -2
- package/dist/development/index-react-server-client.d.ts +2 -2
- 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 +8 -0
- package/dist/development/index-react-server.d.ts +8 -0
- package/dist/development/index-react-server.js +25 -9
- package/dist/development/index-react-server.mjs +25 -9
- package/dist/development/index.d.mts +6 -6
- package/dist/development/index.d.ts +6 -6
- package/dist/development/index.js +101 -94
- package/dist/development/index.mjs +3 -3
- package/dist/{production/instrumentation-Dkmpzd13.d.ts → development/instrumentation-B7w3_Eo9.d.ts} +8 -0
- package/dist/development/lib/types/internal.js +1 -1
- package/dist/development/lib/types/internal.mjs +1 -1
- package/dist/production/{browser-DBmQ1yAR.d.mts → browser-BR5QG7ZC.d.mts} +1 -1
- package/dist/production/{browser-B2PdsXXH.d.ts → browser-eq4RgLsD.d.ts} +1 -1
- package/dist/production/{chunk-TP6EHSSF.js → chunk-6XRGXNVQ.js} +117 -18
- package/dist/production/{chunk-YBLPXYCV.mjs → chunk-EFMJ2SG4.mjs} +112 -13
- package/dist/production/{chunk-FDTIF24W.js → chunk-LNBCQR6O.js} +103 -103
- package/dist/{development/chunk-3UVS743K.js → production/chunk-SJHDA7OG.js} +7 -7
- package/dist/production/{chunk-SJTG3J2Q.mjs → chunk-UODOIDHR.mjs} +13 -6
- package/dist/{development/context-CeD5LmaF.d.mts → production/context-nqAapj74.d.mts} +9 -0
- package/dist/production/dom-export.d.mts +2 -2
- package/dist/production/dom-export.d.ts +2 -2
- package/dist/production/dom-export.js +45 -32
- package/dist/production/dom-export.mjs +17 -4
- package/dist/{development/index-react-server-client-3ykjivgQ.d.ts → production/index-react-server-client-BjY-eKuf.d.ts} +2 -1
- package/dist/{development/index-react-server-client-CACgcj2J.d.mts → production/index-react-server-client-K63fpMH4.d.mts} +1 -1
- package/dist/production/index-react-server-client.d.mts +2 -2
- package/dist/production/index-react-server-client.d.ts +2 -2
- 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 +8 -0
- package/dist/production/index-react-server.d.ts +8 -0
- package/dist/production/index-react-server.js +25 -9
- package/dist/production/index-react-server.mjs +25 -9
- package/dist/production/index.d.mts +6 -6
- package/dist/production/index.d.ts +6 -6
- package/dist/production/index.js +101 -94
- package/dist/production/index.mjs +3 -3
- package/dist/{development/instrumentation-Dkmpzd13.d.ts → production/instrumentation-B7w3_Eo9.d.ts} +8 -0
- package/dist/production/lib/types/internal.js +1 -1
- package/dist/production/lib/types/internal.mjs +1 -1
- 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 v7.18.
|
|
2
|
+
* react-router v7.18.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkQPXIKN46js = require('./chunk-QPXIKN46.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -40,7 +40,7 @@ var _chunk3UVS743Kjs = require('./chunk-3UVS743K.js');
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkYRTY65LJjs = require('./chunk-YRTY65LJ.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
|
|
@@ -154,7 +154,7 @@ var _chunk7XGYIT3Mjs = require('./chunk-7XGYIT3M.js');
|
|
|
154
154
|
|
|
155
155
|
|
|
156
156
|
|
|
157
|
-
var
|
|
157
|
+
var _chunk7SIULPXIjs = require('./chunk-7SIULPXI.js');
|
|
158
158
|
|
|
159
159
|
// lib/dom/ssr/server.tsx
|
|
160
160
|
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
@@ -167,7 +167,7 @@ function ServerRouter({
|
|
|
167
167
|
url = new URL(url);
|
|
168
168
|
}
|
|
169
169
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
170
|
-
let routes =
|
|
170
|
+
let routes = _chunk7SIULPXIjs.createServerRoutes.call(void 0,
|
|
171
171
|
manifest.routes,
|
|
172
172
|
routeModules,
|
|
173
173
|
context.future,
|
|
@@ -180,7 +180,7 @@ function ServerRouter({
|
|
|
180
180
|
let routeId = match.route.id;
|
|
181
181
|
let route = routeModules[routeId];
|
|
182
182
|
let manifestRoute = context.manifest.routes[routeId];
|
|
183
|
-
if (route && manifestRoute &&
|
|
183
|
+
if (route && manifestRoute && _chunk7SIULPXIjs.shouldHydrateRouteLoader.call(void 0,
|
|
184
184
|
routeId,
|
|
185
185
|
route.clientLoader,
|
|
186
186
|
manifestRoute.hasLoader,
|
|
@@ -189,11 +189,11 @@ function ServerRouter({
|
|
|
189
189
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
let router =
|
|
192
|
+
let router = _chunkYRTY65LJjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext, {
|
|
193
193
|
branches: context.branches
|
|
194
194
|
});
|
|
195
195
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
196
|
-
|
|
196
|
+
_chunk7SIULPXIjs.FrameworkContext.Provider,
|
|
197
197
|
{
|
|
198
198
|
value: {
|
|
199
199
|
manifest,
|
|
@@ -209,8 +209,8 @@ function ServerRouter({
|
|
|
209
209
|
renderMeta: context.renderMeta
|
|
210
210
|
}
|
|
211
211
|
},
|
|
212
|
-
/* @__PURE__ */ React.createElement(
|
|
213
|
-
|
|
212
|
+
/* @__PURE__ */ React.createElement(_chunk7SIULPXIjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
213
|
+
_chunkYRTY65LJjs.StaticRouterProvider,
|
|
214
214
|
{
|
|
215
215
|
router,
|
|
216
216
|
context: context.staticHandlerContext,
|
|
@@ -218,7 +218,7 @@ function ServerRouter({
|
|
|
218
218
|
}
|
|
219
219
|
))
|
|
220
220
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
221
|
-
|
|
221
|
+
_chunk7SIULPXIjs.StreamTransfer,
|
|
222
222
|
{
|
|
223
223
|
context,
|
|
224
224
|
identifier: 0,
|
|
@@ -261,18 +261,18 @@ function createRoutesStub(routes, _context) {
|
|
|
261
261
|
let patched = processRoutes(
|
|
262
262
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
263
263
|
// types compared to `RouteObject`
|
|
264
|
-
|
|
265
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _5 => _5.v8_middleware]) ? new (0,
|
|
264
|
+
_chunk7SIULPXIjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
265
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _5 => _5.v8_middleware]) ? new (0, _chunk7SIULPXIjs.RouterContextProvider)() : {},
|
|
266
266
|
frameworkContextRef.current.manifest,
|
|
267
267
|
frameworkContextRef.current.routeModules
|
|
268
268
|
);
|
|
269
|
-
routerRef.current =
|
|
269
|
+
routerRef.current = _chunk7SIULPXIjs.createMemoryRouter.call(void 0, patched, {
|
|
270
270
|
initialEntries,
|
|
271
271
|
initialIndex,
|
|
272
272
|
hydrationData
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
return /* @__PURE__ */ React2.createElement(
|
|
275
|
+
return /* @__PURE__ */ React2.createElement(_chunk7SIULPXIjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunk7SIULPXIjs.RouterProvider, { router: routerRef.current }));
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
278
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -286,9 +286,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
286
286
|
id: route.id,
|
|
287
287
|
path: route.path,
|
|
288
288
|
index: route.index,
|
|
289
|
-
Component: route.Component ?
|
|
290
|
-
HydrateFallback: route.HydrateFallback ?
|
|
291
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
289
|
+
Component: route.Component ? _chunk7SIULPXIjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
290
|
+
HydrateFallback: route.HydrateFallback ? _chunk7SIULPXIjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
291
|
+
ErrorBoundary: route.ErrorBoundary ? _chunk7SIULPXIjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
292
292
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
293
293
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
294
294
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -323,7 +323,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
323
323
|
};
|
|
324
324
|
manifest.routes[newRoute.id] = entryRoute;
|
|
325
325
|
routeModules[route.id] = {
|
|
326
|
-
default: newRoute.Component ||
|
|
326
|
+
default: newRoute.Component || _chunk7SIULPXIjs.Outlet,
|
|
327
327
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
328
328
|
handle: route.handle,
|
|
329
329
|
links: route.links,
|
|
@@ -518,7 +518,7 @@ function myUnescape(value) {
|
|
|
518
518
|
return result;
|
|
519
519
|
}
|
|
520
520
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
521
|
-
|
|
521
|
+
_chunk7SIULPXIjs.warnOnce.call(void 0,
|
|
522
522
|
!expires,
|
|
523
523
|
`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.`
|
|
524
524
|
);
|
|
@@ -580,7 +580,7 @@ function invariant2(value, message) {
|
|
|
580
580
|
|
|
581
581
|
// lib/server-runtime/routeMatching.ts
|
|
582
582
|
function matchServerRoutes(manifest, dataRoutes, branches, pathname, basename) {
|
|
583
|
-
let matches =
|
|
583
|
+
let matches = _chunk7SIULPXIjs.matchRoutesImpl.call(void 0,
|
|
584
584
|
dataRoutes,
|
|
585
585
|
pathname,
|
|
586
586
|
_nullishCoalesce(basename, () => ( "/")),
|
|
@@ -611,7 +611,7 @@ async function callRouteHandler(handler, args, future) {
|
|
|
611
611
|
context: args.context,
|
|
612
612
|
pattern: args.pattern
|
|
613
613
|
});
|
|
614
|
-
if (
|
|
614
|
+
if (_chunk7SIULPXIjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunk7SIULPXIjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
615
615
|
throw new Response(null, result.init);
|
|
616
616
|
}
|
|
617
617
|
return result;
|
|
@@ -714,17 +714,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
714
714
|
controller.close();
|
|
715
715
|
}
|
|
716
716
|
});
|
|
717
|
-
let decoded = await
|
|
717
|
+
let decoded = await _chunk7SIULPXIjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
718
718
|
let data2 = decoded.value;
|
|
719
|
-
if (data2 &&
|
|
720
|
-
let result = data2[
|
|
719
|
+
if (data2 && _chunk7SIULPXIjs.SingleFetchRedirectSymbol in data2) {
|
|
720
|
+
let result = data2[_chunk7SIULPXIjs.SingleFetchRedirectSymbol];
|
|
721
721
|
let init = { status: result.status };
|
|
722
722
|
if (result.reload) {
|
|
723
|
-
throw
|
|
723
|
+
throw _chunk7SIULPXIjs.redirectDocument.call(void 0, result.redirect, init);
|
|
724
724
|
} else if (result.replace) {
|
|
725
|
-
throw
|
|
725
|
+
throw _chunk7SIULPXIjs.replace.call(void 0, result.redirect, init);
|
|
726
726
|
} else {
|
|
727
|
-
throw
|
|
727
|
+
throw _chunk7SIULPXIjs.redirect.call(void 0, result.redirect, init);
|
|
728
728
|
}
|
|
729
729
|
} else {
|
|
730
730
|
invariant2(
|
|
@@ -767,7 +767,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
767
767
|
|
|
768
768
|
// lib/server-runtime/serverHandoff.ts
|
|
769
769
|
function createServerHandoffString(serverHandoff) {
|
|
770
|
-
return
|
|
770
|
+
return _chunk7SIULPXIjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
771
771
|
}
|
|
772
772
|
|
|
773
773
|
// lib/server-runtime/headers.ts
|
|
@@ -846,18 +846,25 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
846
846
|
function throwIfPotentialCSRFAttack(request, allowedActionOrigins) {
|
|
847
847
|
let originHeader = request.headers.get("origin");
|
|
848
848
|
let originDomain = null;
|
|
849
|
+
let originUrl = null;
|
|
849
850
|
try {
|
|
850
|
-
|
|
851
|
+
if (typeof originHeader === "string" && originHeader !== "null") {
|
|
852
|
+
originUrl = new URL(originHeader);
|
|
853
|
+
originDomain = originUrl.host;
|
|
854
|
+
} else {
|
|
855
|
+
originDomain = originHeader;
|
|
856
|
+
}
|
|
851
857
|
} catch (e2) {
|
|
852
858
|
throw new Error(
|
|
853
859
|
`\`origin\` header is not a valid URL. Aborting the action.`
|
|
854
860
|
);
|
|
855
861
|
}
|
|
856
|
-
let
|
|
857
|
-
|
|
862
|
+
let requestUrl = new URL(request.url);
|
|
863
|
+
let originMatchesRequest = originUrl ? originUrl.origin === requestUrl.origin : originDomain === requestUrl.host;
|
|
864
|
+
if (originDomain && !originMatchesRequest) {
|
|
858
865
|
if (!isAllowedOrigin(originDomain, allowedActionOrigins)) {
|
|
859
866
|
throw new Error(
|
|
860
|
-
"The `request.url`
|
|
867
|
+
"The `request.url` origin does not match `origin` header from a forwarded action request. Aborting the action."
|
|
861
868
|
);
|
|
862
869
|
}
|
|
863
870
|
}
|
|
@@ -919,12 +926,12 @@ function getNormalizedPath(request, basename, future) {
|
|
|
919
926
|
pathname = pathname.replace(/\.data$/, "");
|
|
920
927
|
}
|
|
921
928
|
} else {
|
|
922
|
-
if (
|
|
929
|
+
if (_chunk7SIULPXIjs.stripBasename.call(void 0, pathname, basename) === "/_root.data") {
|
|
923
930
|
pathname = basename;
|
|
924
931
|
} else if (pathname.endsWith(".data")) {
|
|
925
932
|
pathname = pathname.replace(/\.data$/, "");
|
|
926
933
|
}
|
|
927
|
-
if (
|
|
934
|
+
if (_chunk7SIULPXIjs.stripBasename.call(void 0, pathname, basename) !== "/" && pathname.endsWith("/")) {
|
|
928
935
|
pathname = pathname.slice(0, -1);
|
|
929
936
|
}
|
|
930
937
|
}
|
|
@@ -944,7 +951,7 @@ function getNormalizedPath(request, basename, future) {
|
|
|
944
951
|
|
|
945
952
|
// lib/server-runtime/single-fetch.ts
|
|
946
953
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
947
|
-
...
|
|
954
|
+
..._chunk7SIULPXIjs.NO_BODY_STATUS_CODES,
|
|
948
955
|
304
|
|
949
956
|
]);
|
|
950
957
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -983,7 +990,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
983
990
|
return handleQueryError(error);
|
|
984
991
|
}
|
|
985
992
|
function handleQueryResult(result) {
|
|
986
|
-
return
|
|
993
|
+
return _chunk7SIULPXIjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
987
994
|
}
|
|
988
995
|
function handleQueryError(error, status = 500) {
|
|
989
996
|
handleError(error);
|
|
@@ -995,12 +1002,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
995
1002
|
}
|
|
996
1003
|
function staticContextToResponse(context) {
|
|
997
1004
|
let headers = getDocumentHeaders(context, build);
|
|
998
|
-
if (
|
|
1005
|
+
if (_chunk7SIULPXIjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
999
1006
|
return new Response(null, { status: context.statusCode, headers });
|
|
1000
1007
|
}
|
|
1001
1008
|
if (context.errors) {
|
|
1002
1009
|
Object.values(context.errors).forEach((err) => {
|
|
1003
|
-
if (!
|
|
1010
|
+
if (!_chunk7SIULPXIjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1004
1011
|
handleError(err);
|
|
1005
1012
|
}
|
|
1006
1013
|
});
|
|
@@ -1048,7 +1055,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1048
1055
|
return handleQueryError(error);
|
|
1049
1056
|
}
|
|
1050
1057
|
function handleQueryResult(result) {
|
|
1051
|
-
return
|
|
1058
|
+
return _chunk7SIULPXIjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
1052
1059
|
}
|
|
1053
1060
|
function handleQueryError(error) {
|
|
1054
1061
|
handleError(error);
|
|
@@ -1060,12 +1067,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
1060
1067
|
}
|
|
1061
1068
|
function staticContextToResponse(context) {
|
|
1062
1069
|
let headers = getDocumentHeaders(context, build);
|
|
1063
|
-
if (
|
|
1070
|
+
if (_chunk7SIULPXIjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
1064
1071
|
return new Response(null, { status: context.statusCode, headers });
|
|
1065
1072
|
}
|
|
1066
1073
|
if (context.errors) {
|
|
1067
1074
|
Object.values(context.errors).forEach((err) => {
|
|
1068
|
-
if (!
|
|
1075
|
+
if (!_chunk7SIULPXIjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1069
1076
|
handleError(err);
|
|
1070
1077
|
}
|
|
1071
1078
|
});
|
|
@@ -1129,15 +1136,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1129
1136
|
headers.delete("Location");
|
|
1130
1137
|
headers.set("Content-Type", "text/x-script");
|
|
1131
1138
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1132
|
-
result: request.method === "GET" ? { [
|
|
1139
|
+
result: request.method === "GET" ? { [_chunk7SIULPXIjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1133
1140
|
headers,
|
|
1134
|
-
status:
|
|
1141
|
+
status: _chunk7SIULPXIjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1135
1142
|
});
|
|
1136
1143
|
}
|
|
1137
1144
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1138
1145
|
let redirect2 = headers.get("Location");
|
|
1139
1146
|
if (basename) {
|
|
1140
|
-
redirect2 =
|
|
1147
|
+
redirect2 = _chunk7SIULPXIjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1141
1148
|
}
|
|
1142
1149
|
return {
|
|
1143
1150
|
redirect: redirect2,
|
|
@@ -1174,7 +1181,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1174
1181
|
clearTimeout(timeoutId);
|
|
1175
1182
|
requestSignal.removeEventListener("abort", abortControllerOnRequestAbort);
|
|
1176
1183
|
};
|
|
1177
|
-
return
|
|
1184
|
+
return _chunk7SIULPXIjs.encode.call(void 0, data2, {
|
|
1178
1185
|
signal: controller.signal,
|
|
1179
1186
|
onComplete: cleanupCallbacks,
|
|
1180
1187
|
plugins: [
|
|
@@ -1183,12 +1190,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1183
1190
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1184
1191
|
return ["SanitizedError", name, message, stack];
|
|
1185
1192
|
}
|
|
1186
|
-
if (value instanceof
|
|
1193
|
+
if (value instanceof _chunk7SIULPXIjs.ErrorResponseImpl) {
|
|
1187
1194
|
let { data: data3, status, statusText } = value;
|
|
1188
1195
|
return ["ErrorResponse", data3, status, statusText];
|
|
1189
1196
|
}
|
|
1190
|
-
if (value && typeof value === "object" &&
|
|
1191
|
-
return ["SingleFetchRedirect", value[
|
|
1197
|
+
if (value && typeof value === "object" && _chunk7SIULPXIjs.SingleFetchRedirectSymbol in value) {
|
|
1198
|
+
return ["SingleFetchRedirect", value[_chunk7SIULPXIjs.SingleFetchRedirectSymbol]];
|
|
1192
1199
|
}
|
|
1193
1200
|
}
|
|
1194
1201
|
],
|
|
@@ -1210,7 +1217,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1210
1217
|
function derive(build, mode) {
|
|
1211
1218
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1212
1219
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1213
|
-
let staticHandler =
|
|
1220
|
+
let staticHandler = _chunk7SIULPXIjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1214
1221
|
basename: build.basename,
|
|
1215
1222
|
instrumentations: build.entry.module.instrumentations,
|
|
1216
1223
|
future: build.future
|
|
@@ -1219,7 +1226,7 @@ function derive(build, mode) {
|
|
|
1219
1226
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1220
1227
|
console.error(
|
|
1221
1228
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1222
|
-
|
|
1229
|
+
_chunk7SIULPXIjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1223
1230
|
);
|
|
1224
1231
|
}
|
|
1225
1232
|
});
|
|
@@ -1237,14 +1244,14 @@ function derive(build, mode) {
|
|
|
1237
1244
|
});
|
|
1238
1245
|
};
|
|
1239
1246
|
if (build.future.v8_middleware) {
|
|
1240
|
-
if (initialContext && !(initialContext instanceof
|
|
1247
|
+
if (initialContext && !(initialContext instanceof _chunk7SIULPXIjs.RouterContextProvider)) {
|
|
1241
1248
|
let error = new Error(
|
|
1242
1249
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1243
1250
|
);
|
|
1244
1251
|
handleError(error);
|
|
1245
1252
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1246
1253
|
}
|
|
1247
|
-
loadContext = initialContext || new (0,
|
|
1254
|
+
loadContext = initialContext || new (0, _chunk7SIULPXIjs.RouterContextProvider)();
|
|
1248
1255
|
} else {
|
|
1249
1256
|
loadContext = initialContext || {};
|
|
1250
1257
|
}
|
|
@@ -1258,10 +1265,10 @@ function derive(build, mode) {
|
|
|
1258
1265
|
if (!build.ssr) {
|
|
1259
1266
|
let decodedPath = decodeURI(normalizedPathname);
|
|
1260
1267
|
if (build.basename && build.basename !== "/") {
|
|
1261
|
-
let strippedPath =
|
|
1268
|
+
let strippedPath = _chunk7SIULPXIjs.stripBasename.call(void 0, decodedPath, build.basename);
|
|
1262
1269
|
if (strippedPath == null) {
|
|
1263
1270
|
errorHandler(
|
|
1264
|
-
new (0,
|
|
1271
|
+
new (0, _chunk7SIULPXIjs.ErrorResponseImpl)(
|
|
1265
1272
|
404,
|
|
1266
1273
|
"Not Found",
|
|
1267
1274
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${build.basename}\``
|
|
@@ -1284,7 +1291,7 @@ function derive(build, mode) {
|
|
|
1284
1291
|
} else if (!build.prerender.includes(decodedPath.replace(/\/$/, "")) && !build.prerender.includes(decodedPath.replace(/[^/]$/, "/"))) {
|
|
1285
1292
|
if (requestUrl.pathname.endsWith(".data")) {
|
|
1286
1293
|
errorHandler(
|
|
1287
|
-
new (0,
|
|
1294
|
+
new (0, _chunk7SIULPXIjs.ErrorResponseImpl)(
|
|
1288
1295
|
404,
|
|
1289
1296
|
"Not Found",
|
|
1290
1297
|
`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.`
|
|
@@ -1304,7 +1311,7 @@ function derive(build, mode) {
|
|
|
1304
1311
|
}
|
|
1305
1312
|
}
|
|
1306
1313
|
}
|
|
1307
|
-
let manifestUrl =
|
|
1314
|
+
let manifestUrl = _chunk7SIULPXIjs.getManifestPath.call(void 0,
|
|
1308
1315
|
build.routeDiscovery.manifestPath,
|
|
1309
1316
|
build.basename
|
|
1310
1317
|
);
|
|
@@ -1343,7 +1350,7 @@ function derive(build, mode) {
|
|
|
1343
1350
|
loadContext,
|
|
1344
1351
|
handleError
|
|
1345
1352
|
);
|
|
1346
|
-
if (
|
|
1353
|
+
if (_chunk7SIULPXIjs.isRedirectResponse.call(void 0, response)) {
|
|
1347
1354
|
response = generateSingleFetchRedirectResponse(
|
|
1348
1355
|
response,
|
|
1349
1356
|
request,
|
|
@@ -1357,7 +1364,7 @@ function derive(build, mode) {
|
|
|
1357
1364
|
params: matches ? matches[0].params : {},
|
|
1358
1365
|
request
|
|
1359
1366
|
});
|
|
1360
|
-
if (
|
|
1367
|
+
if (_chunk7SIULPXIjs.isRedirectResponse.call(void 0, response)) {
|
|
1361
1368
|
response = generateSingleFetchRedirectResponse(
|
|
1362
1369
|
response,
|
|
1363
1370
|
request,
|
|
@@ -1405,7 +1412,7 @@ function derive(build, mode) {
|
|
|
1405
1412
|
return response;
|
|
1406
1413
|
};
|
|
1407
1414
|
if (build.entry.module.instrumentations) {
|
|
1408
|
-
requestHandler =
|
|
1415
|
+
requestHandler = _chunk7SIULPXIjs.instrumentHandler.call(void 0,
|
|
1409
1416
|
requestHandler,
|
|
1410
1417
|
build.entry.module.instrumentations.map((i) => i.handler).filter(Boolean)
|
|
1411
1418
|
);
|
|
@@ -1442,7 +1449,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1442
1449
|
};
|
|
1443
1450
|
};
|
|
1444
1451
|
async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
1445
|
-
if (url.toString().length >
|
|
1452
|
+
if (url.toString().length > _chunk7SIULPXIjs.URL_LIMIT) {
|
|
1446
1453
|
return new Response(null, {
|
|
1447
1454
|
statusText: "Bad Request",
|
|
1448
1455
|
status: 400
|
|
@@ -1492,7 +1499,7 @@ async function handleManifestRequest(build, dataRoutes, branches, url) {
|
|
|
1492
1499
|
async function handleSingleFetchRequest(serverMode, build, staticHandler, request, normalizedPath, loadContext, handleError) {
|
|
1493
1500
|
let handlerUrl = new URL(request.url);
|
|
1494
1501
|
handlerUrl.pathname = normalizedPath;
|
|
1495
|
-
let response =
|
|
1502
|
+
let response = _chunk7SIULPXIjs.isMutationMethod.call(void 0, request.method) ? await singleFetchAction(
|
|
1496
1503
|
build,
|
|
1497
1504
|
serverMode,
|
|
1498
1505
|
staticHandler,
|
|
@@ -1513,7 +1520,7 @@ async function handleSingleFetchRequest(serverMode, build, staticHandler, reques
|
|
|
1513
1520
|
}
|
|
1514
1521
|
async function handleDocumentRequest(serverMode, build, staticHandler, request, loadContext, handleError, isSpaMode, criticalCss) {
|
|
1515
1522
|
try {
|
|
1516
|
-
if (
|
|
1523
|
+
if (_chunk7SIULPXIjs.isMutationMethod.call(void 0, request.method)) {
|
|
1517
1524
|
try {
|
|
1518
1525
|
throwIfPotentialCSRFAttack(
|
|
1519
1526
|
request,
|
|
@@ -1529,7 +1536,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1529
1536
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1530
1537
|
try {
|
|
1531
1538
|
let innerResult = await query(request);
|
|
1532
|
-
if (!
|
|
1539
|
+
if (!_chunk7SIULPXIjs.isResponse.call(void 0, innerResult)) {
|
|
1533
1540
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1534
1541
|
}
|
|
1535
1542
|
return innerResult;
|
|
@@ -1540,7 +1547,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1540
1547
|
} : void 0,
|
|
1541
1548
|
normalizePath: (r) => getNormalizedPath(r, build.basename, build.future)
|
|
1542
1549
|
});
|
|
1543
|
-
if (!
|
|
1550
|
+
if (!_chunk7SIULPXIjs.isResponse.call(void 0, result)) {
|
|
1544
1551
|
result = await renderHtml(result, isSpaMode);
|
|
1545
1552
|
}
|
|
1546
1553
|
return result;
|
|
@@ -1555,7 +1562,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1555
1562
|
}
|
|
1556
1563
|
if (context.errors) {
|
|
1557
1564
|
Object.values(context.errors).forEach((err) => {
|
|
1558
|
-
if (!
|
|
1565
|
+
if (!_chunk7SIULPXIjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1559
1566
|
handleError(err);
|
|
1560
1567
|
}
|
|
1561
1568
|
});
|
|
@@ -1608,10 +1615,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1608
1615
|
} catch (error) {
|
|
1609
1616
|
handleError(error);
|
|
1610
1617
|
let errorForSecondRender = error;
|
|
1611
|
-
if (
|
|
1618
|
+
if (_chunk7SIULPXIjs.isResponse.call(void 0, error)) {
|
|
1612
1619
|
try {
|
|
1613
1620
|
let data2 = await unwrapResponse(error);
|
|
1614
|
-
errorForSecondRender = new (0,
|
|
1621
|
+
errorForSecondRender = new (0, _chunk7SIULPXIjs.ErrorResponseImpl)(
|
|
1615
1622
|
error.status,
|
|
1616
1623
|
error.statusText,
|
|
1617
1624
|
data2
|
|
@@ -1619,7 +1626,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1619
1626
|
} catch (e) {
|
|
1620
1627
|
}
|
|
1621
1628
|
}
|
|
1622
|
-
context =
|
|
1629
|
+
context = _chunk7SIULPXIjs.getStaticContextFromError.call(void 0,
|
|
1623
1630
|
staticHandler.dataRoutes,
|
|
1624
1631
|
context,
|
|
1625
1632
|
errorForSecondRender
|
|
@@ -1679,7 +1686,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1679
1686
|
return handleQueryRouteError(error);
|
|
1680
1687
|
}
|
|
1681
1688
|
function handleQueryRouteResult(result) {
|
|
1682
|
-
if (
|
|
1689
|
+
if (_chunk7SIULPXIjs.isResponse.call(void 0, result)) {
|
|
1683
1690
|
return result;
|
|
1684
1691
|
}
|
|
1685
1692
|
if (typeof result === "string") {
|
|
@@ -1688,10 +1695,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1688
1695
|
return Response.json(result);
|
|
1689
1696
|
}
|
|
1690
1697
|
function handleQueryRouteError(error) {
|
|
1691
|
-
if (
|
|
1698
|
+
if (_chunk7SIULPXIjs.isResponse.call(void 0, error)) {
|
|
1692
1699
|
return error;
|
|
1693
1700
|
}
|
|
1694
|
-
if (
|
|
1701
|
+
if (_chunk7SIULPXIjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1695
1702
|
handleError(error);
|
|
1696
1703
|
return errorResponseToJson(error, serverMode);
|
|
1697
1704
|
}
|
|
@@ -1814,7 +1821,7 @@ function createSessionStorage({
|
|
|
1814
1821
|
};
|
|
1815
1822
|
}
|
|
1816
1823
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1817
|
-
|
|
1824
|
+
_chunk7SIULPXIjs.warnOnce.call(void 0,
|
|
1818
1825
|
cookie.isSigned,
|
|
1819
1826
|
`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.`
|
|
1820
1827
|
);
|
|
@@ -2095,8 +2102,8 @@ async function routeRSCServerRequest({
|
|
|
2095
2102
|
const payload = await createFromReadableStream(
|
|
2096
2103
|
detectRedirectResponse.body
|
|
2097
2104
|
);
|
|
2098
|
-
if (serverResponse.status ===
|
|
2099
|
-
if (
|
|
2105
|
+
if (serverResponse.status === _chunk7SIULPXIjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2106
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2100
2107
|
throw new Error("Invalid redirect location");
|
|
2101
2108
|
}
|
|
2102
2109
|
const headers2 = new Headers(serverResponse.headers);
|
|
@@ -2117,11 +2124,11 @@ async function routeRSCServerRequest({
|
|
|
2117
2124
|
let html = await renderHTML(getPayload, {
|
|
2118
2125
|
onError(error) {
|
|
2119
2126
|
if (typeof error === "object" && error && "digest" in error && typeof error.digest === "string") {
|
|
2120
|
-
renderRedirect =
|
|
2127
|
+
renderRedirect = _chunk7SIULPXIjs.decodeRedirectErrorDigest.call(void 0, error.digest);
|
|
2121
2128
|
if (renderRedirect) {
|
|
2122
2129
|
return error.digest;
|
|
2123
2130
|
}
|
|
2124
|
-
let routeErrorResponse =
|
|
2131
|
+
let routeErrorResponse = _chunk7SIULPXIjs.decodeRouteErrorResponseDigest.call(void 0, error.digest);
|
|
2125
2132
|
if (routeErrorResponse) {
|
|
2126
2133
|
renderError = routeErrorResponse;
|
|
2127
2134
|
status = routeErrorResponse.status;
|
|
@@ -2142,7 +2149,7 @@ async function routeRSCServerRequest({
|
|
|
2142
2149
|
}
|
|
2143
2150
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2144
2151
|
if (renderRedirect) {
|
|
2145
|
-
if (
|
|
2152
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2146
2153
|
throw new Error("Invalid redirect location");
|
|
2147
2154
|
}
|
|
2148
2155
|
headers.set("Location", renderRedirect.location);
|
|
@@ -2154,12 +2161,12 @@ async function routeRSCServerRequest({
|
|
|
2154
2161
|
const redirectTransform = new TransformStream({
|
|
2155
2162
|
flush(controller) {
|
|
2156
2163
|
if (renderRedirect) {
|
|
2157
|
-
if (
|
|
2164
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2158
2165
|
return;
|
|
2159
2166
|
}
|
|
2160
2167
|
controller.enqueue(
|
|
2161
2168
|
new TextEncoder().encode(
|
|
2162
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2169
|
+
`<meta http-equiv="refresh" content="0;url=${_chunk7SIULPXIjs.escapeHtml.call(void 0, renderRedirect.location)}"/>`
|
|
2163
2170
|
)
|
|
2164
2171
|
);
|
|
2165
2172
|
}
|
|
@@ -2186,7 +2193,7 @@ async function routeRSCServerRequest({
|
|
|
2186
2193
|
return error;
|
|
2187
2194
|
}
|
|
2188
2195
|
if (renderRedirect) {
|
|
2189
|
-
if (
|
|
2196
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, renderRedirect.location)) {
|
|
2190
2197
|
throw new Error("Invalid redirect location");
|
|
2191
2198
|
}
|
|
2192
2199
|
return new Response(`Redirect: ${renderRedirect.location}`, {
|
|
@@ -2198,7 +2205,7 @@ async function routeRSCServerRequest({
|
|
|
2198
2205
|
}
|
|
2199
2206
|
try {
|
|
2200
2207
|
let normalizedError = _nullishCoalesce(renderError, () => ( error));
|
|
2201
|
-
let [status, statusText] =
|
|
2208
|
+
let [status, statusText] = _chunk7SIULPXIjs.isRouteErrorResponse.call(void 0, normalizedError) ? [normalizedError.status, normalizedError.statusText] : [500, ""];
|
|
2202
2209
|
let retryRedirect;
|
|
2203
2210
|
let reactHeaders = new Headers();
|
|
2204
2211
|
const html = await renderHTML(
|
|
@@ -2235,11 +2242,11 @@ async function routeRSCServerRequest({
|
|
|
2235
2242
|
{
|
|
2236
2243
|
onError(error2) {
|
|
2237
2244
|
if (typeof error2 === "object" && error2 && "digest" in error2 && typeof error2.digest === "string") {
|
|
2238
|
-
retryRedirect =
|
|
2245
|
+
retryRedirect = _chunk7SIULPXIjs.decodeRedirectErrorDigest.call(void 0, error2.digest);
|
|
2239
2246
|
if (retryRedirect) {
|
|
2240
2247
|
return error2.digest;
|
|
2241
2248
|
}
|
|
2242
|
-
let routeErrorResponse =
|
|
2249
|
+
let routeErrorResponse = _chunk7SIULPXIjs.decodeRouteErrorResponseDigest.call(void 0,
|
|
2243
2250
|
error2.digest
|
|
2244
2251
|
);
|
|
2245
2252
|
if (routeErrorResponse) {
|
|
@@ -2262,7 +2269,7 @@ async function routeRSCServerRequest({
|
|
|
2262
2269
|
}
|
|
2263
2270
|
headers.set("Content-Type", "text/html; charset=utf-8");
|
|
2264
2271
|
if (retryRedirect) {
|
|
2265
|
-
if (
|
|
2272
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2266
2273
|
throw new Error("Invalid redirect location");
|
|
2267
2274
|
}
|
|
2268
2275
|
headers.set("Location", retryRedirect.location);
|
|
@@ -2274,12 +2281,12 @@ async function routeRSCServerRequest({
|
|
|
2274
2281
|
const retryRedirectTransform = new TransformStream({
|
|
2275
2282
|
flush(controller) {
|
|
2276
2283
|
if (retryRedirect) {
|
|
2277
|
-
if (
|
|
2284
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, retryRedirect.location)) {
|
|
2278
2285
|
return;
|
|
2279
2286
|
}
|
|
2280
2287
|
controller.enqueue(
|
|
2281
2288
|
new TextEncoder().encode(
|
|
2282
|
-
`<meta http-equiv="refresh" content="0;url=${
|
|
2289
|
+
`<meta http-equiv="refresh" content="0;url=${_chunk7SIULPXIjs.escapeHtml.call(void 0, retryRedirect.location)}"/>`
|
|
2283
2290
|
)
|
|
2284
2291
|
);
|
|
2285
2292
|
}
|
|
@@ -2310,7 +2317,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2310
2317
|
const decoded = getPayload();
|
|
2311
2318
|
const payload = useSafe(decoded);
|
|
2312
2319
|
if (payload.type === "redirect") {
|
|
2313
|
-
if (
|
|
2320
|
+
if (_chunk7SIULPXIjs.hasInvalidProtocol.call(void 0, payload.location)) {
|
|
2314
2321
|
throw new Error("Invalid redirect location");
|
|
2315
2322
|
}
|
|
2316
2323
|
throw new Response(null, {
|
|
@@ -2323,7 +2330,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2323
2330
|
if (payload.type !== "render") return null;
|
|
2324
2331
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2325
2332
|
for (const match of payload.matches) {
|
|
2326
|
-
if (
|
|
2333
|
+
if (_chunk7SIULPXIjs.shouldHydrateRouteLoader.call(void 0,
|
|
2327
2334
|
match.id,
|
|
2328
2335
|
match.clientLoader,
|
|
2329
2336
|
match.hasLoader,
|
|
@@ -2363,7 +2370,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2363
2370
|
}
|
|
2364
2371
|
}))
|
|
2365
2372
|
};
|
|
2366
|
-
const router =
|
|
2373
|
+
const router = _chunkYRTY65LJjs.createStaticRouter.call(void 0,
|
|
2367
2374
|
payload.matches.reduceRight((previous, match) => {
|
|
2368
2375
|
const route = {
|
|
2369
2376
|
id: match.id,
|
|
@@ -2411,10 +2418,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2411
2418
|
mode: "lazy",
|
|
2412
2419
|
manifestPath: payload.routeDiscovery.manifestPath || defaultManifestPath
|
|
2413
2420
|
},
|
|
2414
|
-
routeModules:
|
|
2421
|
+
routeModules: _chunkQPXIKN46js.createRSCRouteModules.call(void 0, payload)
|
|
2415
2422
|
};
|
|
2416
|
-
return /* @__PURE__ */ React3.createElement(
|
|
2417
|
-
|
|
2423
|
+
return /* @__PURE__ */ React3.createElement(_chunk7SIULPXIjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkQPXIKN46js.RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React3.createElement(_chunk7SIULPXIjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
2424
|
+
_chunkYRTY65LJjs.StaticRouterProvider,
|
|
2418
2425
|
{
|
|
2419
2426
|
context,
|
|
2420
2427
|
router,
|
|
@@ -2559,4 +2566,4 @@ function isManifestRequest(url) {
|
|
|
2559
2566
|
|
|
2560
2567
|
|
|
2561
2568
|
|
|
2562
|
-
exports.Await =
|
|
2569
|
+
exports.Await = _chunk7SIULPXIjs.Await; exports.BrowserRouter = _chunkYRTY65LJjs.BrowserRouter; exports.Form = _chunkYRTY65LJjs.Form; exports.HashRouter = _chunkYRTY65LJjs.HashRouter; exports.IDLE_BLOCKER = _chunk7SIULPXIjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunk7SIULPXIjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunk7SIULPXIjs.IDLE_NAVIGATION; exports.Link = _chunkYRTY65LJjs.Link; exports.Links = _chunk7SIULPXIjs.Links; exports.MemoryRouter = _chunk7SIULPXIjs.MemoryRouter; exports.Meta = _chunk7SIULPXIjs.Meta; exports.NavLink = _chunkYRTY65LJjs.NavLink; exports.Navigate = _chunk7SIULPXIjs.Navigate; exports.NavigationType = _chunk7SIULPXIjs.Action; exports.Outlet = _chunk7SIULPXIjs.Outlet; exports.PrefetchPageLinks = _chunk7SIULPXIjs.PrefetchPageLinks; exports.Route = _chunk7SIULPXIjs.Route; exports.Router = _chunk7SIULPXIjs.Router; exports.RouterContextProvider = _chunk7SIULPXIjs.RouterContextProvider; exports.RouterProvider = _chunk7SIULPXIjs.RouterProvider; exports.Routes = _chunk7SIULPXIjs.Routes; exports.Scripts = _chunk7SIULPXIjs.Scripts; exports.ScrollRestoration = _chunkYRTY65LJjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkYRTY65LJjs.StaticRouter; exports.StaticRouterProvider = _chunkYRTY65LJjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk7SIULPXIjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunk7SIULPXIjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunk7SIULPXIjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunk7SIULPXIjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunk7SIULPXIjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunk7SIULPXIjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunk7SIULPXIjs.LocationContext; exports.UNSAFE_NavigationContext = _chunk7SIULPXIjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = _chunkQPXIKN46js.RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunk7SIULPXIjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunk7SIULPXIjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunk7SIULPXIjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunk7SIULPXIjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunk7SIULPXIjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunk7SIULPXIjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunk7SIULPXIjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunk7SIULPXIjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunk7SIULPXIjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunk7SIULPXIjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createHashHistory = _chunk7SIULPXIjs.createHashHistory; exports.UNSAFE_createMemoryHistory = _chunk7SIULPXIjs.createMemoryHistory; exports.UNSAFE_createRouter = _chunk7SIULPXIjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunk7SIULPXIjs.decodeViaTurboStream; exports.UNSAFE_getHydrationData = _chunkQPXIKN46js.getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunk7SIULPXIjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunk7SIULPXIjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunk7SIULPXIjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunk7SIULPXIjs.invariant; exports.UNSAFE_mapRouteProperties = _chunk7SIULPXIjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunk7SIULPXIjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunk7SIULPXIjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkYRTY65LJjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunk7SIULPXIjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunk7SIULPXIjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunk7SIULPXIjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkYRTY65LJjs.createBrowserRouter; exports.createContext = _chunk7SIULPXIjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkYRTY65LJjs.createHashRouter; exports.createMemoryRouter = _chunk7SIULPXIjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunk7SIULPXIjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunk7SIULPXIjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunk7SIULPXIjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkYRTY65LJjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkYRTY65LJjs.createStaticHandler; exports.createStaticRouter = _chunkYRTY65LJjs.createStaticRouter; exports.data = _chunk7SIULPXIjs.data; exports.generatePath = _chunk7SIULPXIjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunk7SIULPXIjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunk7SIULPXIjs.matchPath; exports.matchRoutes = _chunk7SIULPXIjs.matchRoutes; exports.parsePath = _chunk7SIULPXIjs.parsePath; exports.redirect = _chunk7SIULPXIjs.redirect; exports.redirectDocument = _chunk7SIULPXIjs.redirectDocument; exports.renderMatches = _chunk7SIULPXIjs.renderMatches; exports.replace = _chunk7SIULPXIjs.replace; exports.resolvePath = _chunk7SIULPXIjs.resolvePath; exports.unstable_HistoryRouter = _chunkYRTY65LJjs.HistoryRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkYRTY65LJjs.usePrompt; exports.unstable_useRoute = _chunk7SIULPXIjs.useRoute; exports.unstable_useRouterState = _chunk7SIULPXIjs.useRouterState; exports.useActionData = _chunk7SIULPXIjs.useActionData; exports.useAsyncError = _chunk7SIULPXIjs.useAsyncError; exports.useAsyncValue = _chunk7SIULPXIjs.useAsyncValue; exports.useBeforeUnload = _chunkYRTY65LJjs.useBeforeUnload; exports.useBlocker = _chunk7SIULPXIjs.useBlocker; exports.useFetcher = _chunkYRTY65LJjs.useFetcher; exports.useFetchers = _chunkYRTY65LJjs.useFetchers; exports.useFormAction = _chunkYRTY65LJjs.useFormAction; exports.useHref = _chunk7SIULPXIjs.useHref; exports.useInRouterContext = _chunk7SIULPXIjs.useInRouterContext; exports.useLinkClickHandler = _chunkYRTY65LJjs.useLinkClickHandler; exports.useLoaderData = _chunk7SIULPXIjs.useLoaderData; exports.useLocation = _chunk7SIULPXIjs.useLocation; exports.useMatch = _chunk7SIULPXIjs.useMatch; exports.useMatches = _chunk7SIULPXIjs.useMatches; exports.useNavigate = _chunk7SIULPXIjs.useNavigate; exports.useNavigation = _chunk7SIULPXIjs.useNavigation; exports.useNavigationType = _chunk7SIULPXIjs.useNavigationType; exports.useOutlet = _chunk7SIULPXIjs.useOutlet; exports.useOutletContext = _chunk7SIULPXIjs.useOutletContext; exports.useParams = _chunk7SIULPXIjs.useParams; exports.useResolvedPath = _chunk7SIULPXIjs.useResolvedPath; exports.useRevalidator = _chunk7SIULPXIjs.useRevalidator; exports.useRouteError = _chunk7SIULPXIjs.useRouteError; exports.useRouteLoaderData = _chunk7SIULPXIjs.useRouteLoaderData; exports.useRoutes = _chunk7SIULPXIjs.useRoutes; exports.useSearchParams = _chunkYRTY65LJjs.useSearchParams; exports.useSubmit = _chunkYRTY65LJjs.useSubmit; exports.useViewTransitionState = _chunkYRTY65LJjs.useViewTransitionState;
|