react-router 0.0.0-experimental-c19b79d → 0.0.0-experimental-31a822c5f
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 +105 -0
- package/dist/development/browser-B4aBBnx8.d.ts +310 -0
- package/dist/development/browser-CN2w9Cbu.d.mts +310 -0
- package/dist/development/{chunk-LUB73E44.js → chunk-CZ7KRWQZ.js} +827 -64
- package/dist/development/{chunk-AGOH44BE.mjs → chunk-FXUONXY4.mjs} +132 -808
- package/dist/development/chunk-SE36CWVW.js +1308 -0
- package/dist/development/chunk-T5RKBXBV.js +188 -0
- package/dist/development/{chunk-IMKEG5CI.mjs → chunk-WTUOISGV.mjs} +2 -2
- package/dist/development/dom-export.d.mts +48 -3
- package/dist/development/dom-export.d.ts +48 -1
- package/dist/development/dom-export.js +703 -18
- package/dist/development/dom-export.mjs +687 -9
- package/dist/development/{index-react-server-client-DKvU8YRr.d.ts → index-react-server-client-BOJoTiaG.d.ts} +134 -134
- package/dist/{production/index-react-server-client-2EDmGlsZ.d.mts → development/index-react-server-client-CuQLmpku.d.mts} +1 -2
- package/dist/development/index-react-server-client.d.mts +2 -3
- 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.js +1 -1
- package/dist/development/index-react-server.mjs +1 -1
- package/dist/development/index.d.mts +9 -316
- package/dist/development/index.d.ts +9 -358
- package/dist/development/index.js +82 -914
- package/dist/development/index.mjs +3 -9
- package/dist/development/lib/types/internal.d.mts +2 -3
- 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/register-BrVEYTED.d.mts → development/register-BblEgJPm.d.mts} +1 -1
- package/dist/development/{register-D8NQoPsO.d.ts → register-D18raRVf.d.ts} +1 -1
- package/dist/development/{context-BqL5Eckq.d.mts → route-data-nQS6GSUI.d.mts} +472 -2
- package/dist/development/{routeModules-BmVo7q9e.d.ts → routeModules-9wlxglVk.d.ts} +12 -12
- package/dist/production/browser-B4aBBnx8.d.ts +310 -0
- package/dist/production/browser-CN2w9Cbu.d.mts +310 -0
- package/dist/production/{chunk-2L5AG5Y5.js → chunk-DRKUM6HW.js} +827 -64
- package/dist/production/{chunk-AODJW4D3.mjs → chunk-IGF74WUC.mjs} +132 -808
- package/dist/production/{chunk-UOQCOPF6.mjs → chunk-RUSRTUHT.mjs} +2 -2
- package/dist/production/chunk-UU3LJMU6.js +188 -0
- package/dist/production/chunk-YVVCGSEG.js +1308 -0
- package/dist/production/dom-export.d.mts +48 -3
- package/dist/production/dom-export.d.ts +48 -1
- package/dist/production/dom-export.js +703 -18
- package/dist/production/dom-export.mjs +687 -9
- package/dist/production/{index-react-server-client-DKvU8YRr.d.ts → index-react-server-client-BOJoTiaG.d.ts} +134 -134
- package/dist/{development/index-react-server-client-2EDmGlsZ.d.mts → production/index-react-server-client-CuQLmpku.d.mts} +1 -2
- package/dist/production/index-react-server-client.d.mts +2 -3
- 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.js +1 -1
- package/dist/production/index-react-server.mjs +1 -1
- package/dist/production/index.d.mts +9 -316
- package/dist/production/index.d.ts +9 -358
- package/dist/production/index.js +82 -914
- package/dist/production/index.mjs +3 -9
- package/dist/production/lib/types/internal.d.mts +2 -3
- 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/register-BrVEYTED.d.mts → production/register-BblEgJPm.d.mts} +1 -1
- package/dist/production/{register-D8NQoPsO.d.ts → register-D18raRVf.d.ts} +1 -1
- package/dist/production/{context-BqL5Eckq.d.mts → route-data-nQS6GSUI.d.mts} +472 -2
- package/dist/production/{routeModules-BmVo7q9e.d.ts → routeModules-9wlxglVk.d.ts} +12 -12
- package/package.json +1 -1
- package/dist/development/browser-z32v5KVN.d.mts +0 -46
- package/dist/development/chunk-2G2U5HGB.js +0 -2089
- package/dist/development/route-data-CDwqkzPE.d.mts +0 -473
- package/dist/production/browser-z32v5KVN.d.mts +0 -46
- package/dist/production/chunk-FGRCWJDI.js +0 -2089
- package/dist/production/route-data-CDwqkzPE.d.mts +0 -473
package/dist/production/index.js
CHANGED
|
@@ -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-31a822c5f
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
+
var _chunkUU3LJMU6js = require('./chunk-UU3LJMU6.js');
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
|
|
40
41
|
|
|
41
42
|
|
|
43
|
+
var _chunkYVVCGSEGjs = require('./chunk-YVVCGSEG.js');
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
|
|
@@ -55,7 +57,6 @@
|
|
|
55
57
|
|
|
56
58
|
|
|
57
59
|
|
|
58
|
-
var _chunkFGRCWJDIjs = require('./chunk-FGRCWJDI.js');
|
|
59
60
|
|
|
60
61
|
|
|
61
62
|
|
|
@@ -143,14 +144,10 @@ var _chunkFGRCWJDIjs = require('./chunk-FGRCWJDI.js');
|
|
|
143
144
|
|
|
144
145
|
|
|
145
146
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
var _chunk2L5AG5Y5js = require('./chunk-2L5AG5Y5.js');
|
|
147
|
+
var _chunkDRKUM6HWjs = require('./chunk-DRKUM6HW.js');
|
|
151
148
|
|
|
152
149
|
// lib/dom/ssr/server.tsx
|
|
153
|
-
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var
|
|
150
|
+
var _react = require('react'); var React = _interopRequireWildcard(_react); var React2 = _interopRequireWildcard(_react); var React3 = _interopRequireWildcard(_react);
|
|
154
151
|
function ServerRouter({
|
|
155
152
|
context,
|
|
156
153
|
url,
|
|
@@ -160,7 +157,7 @@ function ServerRouter({
|
|
|
160
157
|
url = new URL(url);
|
|
161
158
|
}
|
|
162
159
|
let { manifest, routeModules, criticalCss, serverHandoffString } = context;
|
|
163
|
-
let routes =
|
|
160
|
+
let routes = _chunkDRKUM6HWjs.createServerRoutes.call(void 0,
|
|
164
161
|
manifest.routes,
|
|
165
162
|
routeModules,
|
|
166
163
|
context.future,
|
|
@@ -173,7 +170,7 @@ function ServerRouter({
|
|
|
173
170
|
let routeId = match.route.id;
|
|
174
171
|
let route = routeModules[routeId];
|
|
175
172
|
let manifestRoute = context.manifest.routes[routeId];
|
|
176
|
-
if (route && manifestRoute &&
|
|
173
|
+
if (route && manifestRoute && _chunkDRKUM6HWjs.shouldHydrateRouteLoader.call(void 0,
|
|
177
174
|
routeId,
|
|
178
175
|
route.clientLoader,
|
|
179
176
|
manifestRoute.hasLoader,
|
|
@@ -182,9 +179,9 @@ function ServerRouter({
|
|
|
182
179
|
delete context.staticHandlerContext.loaderData[routeId];
|
|
183
180
|
}
|
|
184
181
|
}
|
|
185
|
-
let router =
|
|
182
|
+
let router = _chunkYVVCGSEGjs.createStaticRouter.call(void 0, routes, context.staticHandlerContext);
|
|
186
183
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
|
|
187
|
-
|
|
184
|
+
_chunkDRKUM6HWjs.FrameworkContext.Provider,
|
|
188
185
|
{
|
|
189
186
|
value: {
|
|
190
187
|
manifest,
|
|
@@ -199,8 +196,8 @@ function ServerRouter({
|
|
|
199
196
|
renderMeta: context.renderMeta
|
|
200
197
|
}
|
|
201
198
|
},
|
|
202
|
-
/* @__PURE__ */ React.createElement(
|
|
203
|
-
|
|
199
|
+
/* @__PURE__ */ React.createElement(_chunkDRKUM6HWjs.RemixErrorBoundary, { location: router.state.location }, /* @__PURE__ */ React.createElement(
|
|
200
|
+
_chunkYVVCGSEGjs.StaticRouterProvider,
|
|
204
201
|
{
|
|
205
202
|
router,
|
|
206
203
|
context: context.staticHandlerContext,
|
|
@@ -208,7 +205,7 @@ function ServerRouter({
|
|
|
208
205
|
}
|
|
209
206
|
))
|
|
210
207
|
), context.serverHandoffStream ? /* @__PURE__ */ React.createElement(React.Suspense, null, /* @__PURE__ */ React.createElement(
|
|
211
|
-
|
|
208
|
+
_chunkDRKUM6HWjs.StreamTransfer,
|
|
212
209
|
{
|
|
213
210
|
context,
|
|
214
211
|
identifier: 0,
|
|
@@ -250,18 +247,18 @@ function createRoutesStub(routes, _context) {
|
|
|
250
247
|
let patched = processRoutes(
|
|
251
248
|
// @ts-expect-error `StubRouteObject` is stricter about `loader`/`action`
|
|
252
249
|
// types compared to `AgnosticRouteObject`
|
|
253
|
-
|
|
254
|
-
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0,
|
|
250
|
+
_chunkDRKUM6HWjs.convertRoutesToDataRoutes.call(void 0, routes, (r) => r),
|
|
251
|
+
_context !== void 0 ? _context : _optionalChain([future, 'optionalAccess', _4 => _4.v8_middleware]) ? new (0, _chunkDRKUM6HWjs.RouterContextProvider)() : {},
|
|
255
252
|
frameworkContextRef.current.manifest,
|
|
256
253
|
frameworkContextRef.current.routeModules
|
|
257
254
|
);
|
|
258
|
-
routerRef.current =
|
|
255
|
+
routerRef.current = _chunkDRKUM6HWjs.createMemoryRouter.call(void 0, patched, {
|
|
259
256
|
initialEntries,
|
|
260
257
|
initialIndex,
|
|
261
258
|
hydrationData
|
|
262
259
|
});
|
|
263
260
|
}
|
|
264
|
-
return /* @__PURE__ */ React2.createElement(
|
|
261
|
+
return /* @__PURE__ */ React2.createElement(_chunkDRKUM6HWjs.FrameworkContext.Provider, { value: frameworkContextRef.current }, /* @__PURE__ */ React2.createElement(_chunkDRKUM6HWjs.RouterProvider, { router: routerRef.current }));
|
|
265
262
|
};
|
|
266
263
|
}
|
|
267
264
|
function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
@@ -275,9 +272,9 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
275
272
|
id: route.id,
|
|
276
273
|
path: route.path,
|
|
277
274
|
index: route.index,
|
|
278
|
-
Component: route.Component ?
|
|
279
|
-
HydrateFallback: route.HydrateFallback ?
|
|
280
|
-
ErrorBoundary: route.ErrorBoundary ?
|
|
275
|
+
Component: route.Component ? _chunkDRKUM6HWjs.withComponentProps.call(void 0, route.Component) : void 0,
|
|
276
|
+
HydrateFallback: route.HydrateFallback ? _chunkDRKUM6HWjs.withHydrateFallbackProps.call(void 0, route.HydrateFallback) : void 0,
|
|
277
|
+
ErrorBoundary: route.ErrorBoundary ? _chunkDRKUM6HWjs.withErrorBoundaryProps.call(void 0, route.ErrorBoundary) : void 0,
|
|
281
278
|
action: route.action ? (args) => route.action({ ...args, context }) : void 0,
|
|
282
279
|
loader: route.loader ? (args) => route.loader({ ...args, context }) : void 0,
|
|
283
280
|
middleware: route.middleware ? route.middleware.map(
|
|
@@ -312,7 +309,7 @@ function processRoutes(routes, context, manifest, routeModules, parentId) {
|
|
|
312
309
|
};
|
|
313
310
|
manifest.routes[newRoute.id] = entryRoute;
|
|
314
311
|
routeModules[route.id] = {
|
|
315
|
-
default: newRoute.Component ||
|
|
312
|
+
default: newRoute.Component || _chunkDRKUM6HWjs.Outlet,
|
|
316
313
|
ErrorBoundary: newRoute.ErrorBoundary || void 0,
|
|
317
314
|
handle: route.handle,
|
|
318
315
|
links: route.links,
|
|
@@ -507,7 +504,7 @@ function myUnescape(value) {
|
|
|
507
504
|
return result;
|
|
508
505
|
}
|
|
509
506
|
function warnOnceAboutExpiresCookie(name, expires) {
|
|
510
|
-
|
|
507
|
+
_chunkDRKUM6HWjs.warnOnce.call(void 0,
|
|
511
508
|
!expires,
|
|
512
509
|
`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
510
|
);
|
|
@@ -561,7 +558,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
561
558
|
let entries = Object.entries(errors);
|
|
562
559
|
let serialized = {};
|
|
563
560
|
for (let [key, val] of entries) {
|
|
564
|
-
if (
|
|
561
|
+
if (_chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, val)) {
|
|
565
562
|
serialized[key] = { ...val, __type: "RouteErrorResponse" };
|
|
566
563
|
} else if (val instanceof Error) {
|
|
567
564
|
let sanitized = sanitizeError(val, serverMode);
|
|
@@ -586,7 +583,7 @@ function serializeErrors(errors, serverMode) {
|
|
|
586
583
|
|
|
587
584
|
// lib/server-runtime/routeMatching.ts
|
|
588
585
|
function matchServerRoutes(routes, pathname, basename) {
|
|
589
|
-
let matches =
|
|
586
|
+
let matches = _chunkDRKUM6HWjs.matchRoutes.call(void 0,
|
|
590
587
|
routes,
|
|
591
588
|
pathname,
|
|
592
589
|
basename
|
|
@@ -602,16 +599,16 @@ function matchServerRoutes(routes, pathname, basename) {
|
|
|
602
599
|
// lib/server-runtime/data.ts
|
|
603
600
|
async function callRouteHandler(handler, args) {
|
|
604
601
|
let result = await handler({
|
|
605
|
-
request: stripRoutesParam(
|
|
602
|
+
request: stripRoutesParam(stripIndexParam(args.request)),
|
|
606
603
|
params: args.params,
|
|
607
604
|
context: args.context
|
|
608
605
|
});
|
|
609
|
-
if (
|
|
606
|
+
if (_chunkDRKUM6HWjs.isDataWithResponseInit.call(void 0, result) && result.init && result.init.status && _chunkDRKUM6HWjs.isRedirectStatusCode.call(void 0, result.init.status)) {
|
|
610
607
|
throw new Response(null, result.init);
|
|
611
608
|
}
|
|
612
609
|
return result;
|
|
613
610
|
}
|
|
614
|
-
function
|
|
611
|
+
function stripIndexParam(request) {
|
|
615
612
|
let url = new URL(request.url);
|
|
616
613
|
let indexValues = url.searchParams.getAll("index");
|
|
617
614
|
url.searchParams.delete("index");
|
|
@@ -725,17 +722,17 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
725
722
|
controller.close();
|
|
726
723
|
}
|
|
727
724
|
});
|
|
728
|
-
let decoded = await
|
|
725
|
+
let decoded = await _chunkDRKUM6HWjs.decodeViaTurboStream.call(void 0, stream, global);
|
|
729
726
|
let data2 = decoded.value;
|
|
730
|
-
if (data2 &&
|
|
731
|
-
let result = data2[
|
|
727
|
+
if (data2 && _chunkDRKUM6HWjs.SingleFetchRedirectSymbol in data2) {
|
|
728
|
+
let result = data2[_chunkDRKUM6HWjs.SingleFetchRedirectSymbol];
|
|
732
729
|
let init = { status: result.status };
|
|
733
730
|
if (result.reload) {
|
|
734
|
-
throw
|
|
731
|
+
throw _chunkDRKUM6HWjs.redirectDocument.call(void 0, result.redirect, init);
|
|
735
732
|
} else if (result.replace) {
|
|
736
|
-
throw
|
|
733
|
+
throw _chunkDRKUM6HWjs.replace.call(void 0, result.redirect, init);
|
|
737
734
|
} else {
|
|
738
|
-
throw
|
|
735
|
+
throw _chunkDRKUM6HWjs.redirect.call(void 0, result.redirect, init);
|
|
739
736
|
}
|
|
740
737
|
} else {
|
|
741
738
|
invariant2(
|
|
@@ -774,7 +771,7 @@ function createStaticHandlerDataRoutes(manifest, future, parentId = "", routesBy
|
|
|
774
771
|
|
|
775
772
|
// lib/server-runtime/serverHandoff.ts
|
|
776
773
|
function createServerHandoffString(serverHandoff) {
|
|
777
|
-
return
|
|
774
|
+
return _chunkDRKUM6HWjs.escapeHtml.call(void 0, JSON.stringify(serverHandoff));
|
|
778
775
|
}
|
|
779
776
|
|
|
780
777
|
// lib/server-runtime/headers.ts
|
|
@@ -851,7 +848,7 @@ function prependCookies(parentHeaders, childHeaders) {
|
|
|
851
848
|
|
|
852
849
|
// lib/server-runtime/single-fetch.ts
|
|
853
850
|
var SERVER_NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([
|
|
854
|
-
...
|
|
851
|
+
..._chunkDRKUM6HWjs.NO_BODY_STATUS_CODES,
|
|
855
852
|
304
|
|
856
853
|
]);
|
|
857
854
|
async function singleFetchAction(build, serverMode, staticHandler, request, handlerUrl, loadContext, handleError) {
|
|
@@ -881,7 +878,7 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
881
878
|
return handleQueryError(error);
|
|
882
879
|
}
|
|
883
880
|
function handleQueryResult(result) {
|
|
884
|
-
return
|
|
881
|
+
return _chunkDRKUM6HWjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
885
882
|
}
|
|
886
883
|
function handleQueryError(error) {
|
|
887
884
|
handleError(error);
|
|
@@ -893,12 +890,12 @@ async function singleFetchAction(build, serverMode, staticHandler, request, hand
|
|
|
893
890
|
}
|
|
894
891
|
function staticContextToResponse(context) {
|
|
895
892
|
let headers = getDocumentHeaders(context, build);
|
|
896
|
-
if (
|
|
893
|
+
if (_chunkDRKUM6HWjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
897
894
|
return new Response(null, { status: context.statusCode, headers });
|
|
898
895
|
}
|
|
899
896
|
if (context.errors) {
|
|
900
897
|
Object.values(context.errors).forEach((err) => {
|
|
901
|
-
if (!
|
|
898
|
+
if (!_chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
902
899
|
handleError(err);
|
|
903
900
|
}
|
|
904
901
|
});
|
|
@@ -945,7 +942,7 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
945
942
|
return handleQueryError(error);
|
|
946
943
|
}
|
|
947
944
|
function handleQueryResult(result) {
|
|
948
|
-
return
|
|
945
|
+
return _chunkDRKUM6HWjs.isResponse.call(void 0, result) ? result : staticContextToResponse(result);
|
|
949
946
|
}
|
|
950
947
|
function handleQueryError(error) {
|
|
951
948
|
handleError(error);
|
|
@@ -957,12 +954,12 @@ async function singleFetchLoaders(build, serverMode, staticHandler, request, han
|
|
|
957
954
|
}
|
|
958
955
|
function staticContextToResponse(context) {
|
|
959
956
|
let headers = getDocumentHeaders(context, build);
|
|
960
|
-
if (
|
|
957
|
+
if (_chunkDRKUM6HWjs.isRedirectStatusCode.call(void 0, context.statusCode) && headers.has("Location")) {
|
|
961
958
|
return new Response(null, { status: context.statusCode, headers });
|
|
962
959
|
}
|
|
963
960
|
if (context.errors) {
|
|
964
961
|
Object.values(context.errors).forEach((err) => {
|
|
965
|
-
if (!
|
|
962
|
+
if (!_chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
966
963
|
handleError(err);
|
|
967
964
|
}
|
|
968
965
|
});
|
|
@@ -1026,15 +1023,15 @@ function generateSingleFetchRedirectResponse(redirectResponse, request, build, s
|
|
|
1026
1023
|
headers.delete("Location");
|
|
1027
1024
|
headers.set("Content-Type", "text/x-script");
|
|
1028
1025
|
return generateSingleFetchResponse(request, build, serverMode, {
|
|
1029
|
-
result: request.method === "GET" ? { [
|
|
1026
|
+
result: request.method === "GET" ? { [_chunkDRKUM6HWjs.SingleFetchRedirectSymbol]: redirect2 } : redirect2,
|
|
1030
1027
|
headers,
|
|
1031
|
-
status:
|
|
1028
|
+
status: _chunkDRKUM6HWjs.SINGLE_FETCH_REDIRECT_STATUS
|
|
1032
1029
|
});
|
|
1033
1030
|
}
|
|
1034
1031
|
function getSingleFetchRedirect(status, headers, basename) {
|
|
1035
1032
|
let redirect2 = headers.get("Location");
|
|
1036
1033
|
if (basename) {
|
|
1037
|
-
redirect2 =
|
|
1034
|
+
redirect2 = _chunkDRKUM6HWjs.stripBasename.call(void 0, redirect2, basename) || redirect2;
|
|
1038
1035
|
}
|
|
1039
1036
|
return {
|
|
1040
1037
|
redirect: redirect2,
|
|
@@ -1060,7 +1057,7 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1060
1057
|
typeof streamTimeout === "number" ? streamTimeout : 4950
|
|
1061
1058
|
);
|
|
1062
1059
|
requestSignal.addEventListener("abort", () => clearTimeout(timeoutId));
|
|
1063
|
-
return
|
|
1060
|
+
return _chunkDRKUM6HWjs.encode.call(void 0, data2, {
|
|
1064
1061
|
signal: controller.signal,
|
|
1065
1062
|
plugins: [
|
|
1066
1063
|
(value) => {
|
|
@@ -1068,12 +1065,12 @@ function encodeViaTurboStream(data2, requestSignal, streamTimeout, serverMode) {
|
|
|
1068
1065
|
let { name, message, stack } = serverMode === "production" /* Production */ ? sanitizeError(value, serverMode) : value;
|
|
1069
1066
|
return ["SanitizedError", name, message, stack];
|
|
1070
1067
|
}
|
|
1071
|
-
if (value instanceof
|
|
1068
|
+
if (value instanceof _chunkDRKUM6HWjs.ErrorResponseImpl) {
|
|
1072
1069
|
let { data: data3, status, statusText } = value;
|
|
1073
1070
|
return ["ErrorResponse", data3, status, statusText];
|
|
1074
1071
|
}
|
|
1075
|
-
if (value && typeof value === "object" &&
|
|
1076
|
-
return ["SingleFetchRedirect", value[
|
|
1072
|
+
if (value && typeof value === "object" && _chunkDRKUM6HWjs.SingleFetchRedirectSymbol in value) {
|
|
1073
|
+
return ["SingleFetchRedirect", value[_chunkDRKUM6HWjs.SingleFetchRedirectSymbol]];
|
|
1077
1074
|
}
|
|
1078
1075
|
}
|
|
1079
1076
|
],
|
|
@@ -1096,14 +1093,14 @@ function derive(build, mode) {
|
|
|
1096
1093
|
let routes = createRoutes(build.routes);
|
|
1097
1094
|
let dataRoutes = createStaticHandlerDataRoutes(build.routes, build.future);
|
|
1098
1095
|
let serverMode = isServerMode(mode) ? mode : "production" /* Production */;
|
|
1099
|
-
let staticHandler =
|
|
1096
|
+
let staticHandler = _chunkDRKUM6HWjs.createStaticHandler.call(void 0, dataRoutes, {
|
|
1100
1097
|
basename: build.basename
|
|
1101
1098
|
});
|
|
1102
1099
|
let errorHandler = build.entry.module.handleError || ((error, { request }) => {
|
|
1103
1100
|
if (serverMode !== "test" /* Test */ && !request.signal.aborted) {
|
|
1104
1101
|
console.error(
|
|
1105
1102
|
// @ts-expect-error This is "private" from users but intended for internal use
|
|
1106
|
-
|
|
1103
|
+
_chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, error) && error.error ? error.error : error
|
|
1107
1104
|
);
|
|
1108
1105
|
}
|
|
1109
1106
|
});
|
|
@@ -1149,36 +1146,36 @@ var createRequestHandler = (build, mode) => {
|
|
|
1149
1146
|
});
|
|
1150
1147
|
};
|
|
1151
1148
|
if (_build.future.v8_middleware) {
|
|
1152
|
-
if (initialContext && !(initialContext instanceof
|
|
1149
|
+
if (initialContext && !(initialContext instanceof _chunkDRKUM6HWjs.RouterContextProvider)) {
|
|
1153
1150
|
let error = new Error(
|
|
1154
1151
|
"Invalid `context` value provided to `handleRequest`. When middleware is enabled you must return an instance of `RouterContextProvider` from your `getLoadContext` function."
|
|
1155
1152
|
);
|
|
1156
1153
|
handleError(error);
|
|
1157
1154
|
return returnLastResortErrorResponse(error, serverMode);
|
|
1158
1155
|
}
|
|
1159
|
-
loadContext = initialContext || new (0,
|
|
1156
|
+
loadContext = initialContext || new (0, _chunkDRKUM6HWjs.RouterContextProvider)();
|
|
1160
1157
|
} else {
|
|
1161
1158
|
loadContext = initialContext || {};
|
|
1162
1159
|
}
|
|
1163
1160
|
let url = new URL(request.url);
|
|
1164
1161
|
let normalizedBasename = _build.basename || "/";
|
|
1165
1162
|
let normalizedPath = url.pathname;
|
|
1166
|
-
if (
|
|
1163
|
+
if (_chunkDRKUM6HWjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) === "/_root.data") {
|
|
1167
1164
|
normalizedPath = normalizedBasename;
|
|
1168
1165
|
} else if (normalizedPath.endsWith(".data")) {
|
|
1169
1166
|
normalizedPath = normalizedPath.replace(/\.data$/, "");
|
|
1170
1167
|
}
|
|
1171
|
-
if (
|
|
1168
|
+
if (_chunkDRKUM6HWjs.stripBasename.call(void 0, normalizedPath, normalizedBasename) !== "/" && normalizedPath.endsWith("/")) {
|
|
1172
1169
|
normalizedPath = normalizedPath.slice(0, -1);
|
|
1173
1170
|
}
|
|
1174
1171
|
let isSpaMode = getBuildTimeHeader(request, "X-React-Router-SPA-Mode") === "yes";
|
|
1175
1172
|
if (!_build.ssr) {
|
|
1176
1173
|
let decodedPath = decodeURI(normalizedPath);
|
|
1177
1174
|
if (normalizedBasename !== "/") {
|
|
1178
|
-
let strippedPath =
|
|
1175
|
+
let strippedPath = _chunkDRKUM6HWjs.stripBasename.call(void 0, decodedPath, normalizedBasename);
|
|
1179
1176
|
if (strippedPath == null) {
|
|
1180
1177
|
errorHandler(
|
|
1181
|
-
new (0,
|
|
1178
|
+
new (0, _chunkDRKUM6HWjs.ErrorResponseImpl)(
|
|
1182
1179
|
404,
|
|
1183
1180
|
"Not Found",
|
|
1184
1181
|
`Refusing to prerender the \`${decodedPath}\` path because it does not start with the basename \`${normalizedBasename}\``
|
|
@@ -1201,7 +1198,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1201
1198
|
} else if (!_build.prerender.includes(decodedPath) && !_build.prerender.includes(decodedPath + "/")) {
|
|
1202
1199
|
if (url.pathname.endsWith(".data")) {
|
|
1203
1200
|
errorHandler(
|
|
1204
|
-
new (0,
|
|
1201
|
+
new (0, _chunkDRKUM6HWjs.ErrorResponseImpl)(
|
|
1205
1202
|
404,
|
|
1206
1203
|
"Not Found",
|
|
1207
1204
|
`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.`
|
|
@@ -1221,7 +1218,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1221
1218
|
}
|
|
1222
1219
|
}
|
|
1223
1220
|
}
|
|
1224
|
-
let manifestUrl =
|
|
1221
|
+
let manifestUrl = _chunkDRKUM6HWjs.getManifestPath.call(void 0,
|
|
1225
1222
|
_build.routeDiscovery.manifestPath,
|
|
1226
1223
|
normalizedBasename
|
|
1227
1224
|
);
|
|
@@ -1256,7 +1253,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1256
1253
|
loadContext,
|
|
1257
1254
|
handleError
|
|
1258
1255
|
);
|
|
1259
|
-
if (
|
|
1256
|
+
if (_chunkDRKUM6HWjs.isRedirectResponse.call(void 0, response)) {
|
|
1260
1257
|
response = generateSingleFetchRedirectResponse(
|
|
1261
1258
|
response,
|
|
1262
1259
|
request,
|
|
@@ -1270,7 +1267,7 @@ var createRequestHandler = (build, mode) => {
|
|
|
1270
1267
|
params: singleFetchMatches ? singleFetchMatches[0].params : {},
|
|
1271
1268
|
request
|
|
1272
1269
|
});
|
|
1273
|
-
if (
|
|
1270
|
+
if (_chunkDRKUM6HWjs.isRedirectResponse.call(void 0, response)) {
|
|
1274
1271
|
response = generateSingleFetchRedirectResponse(
|
|
1275
1272
|
response,
|
|
1276
1273
|
request,
|
|
@@ -1389,7 +1386,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1389
1386
|
generateMiddlewareResponse: build.future.v8_middleware ? async (query) => {
|
|
1390
1387
|
try {
|
|
1391
1388
|
let innerResult = await query(request);
|
|
1392
|
-
if (!
|
|
1389
|
+
if (!_chunkDRKUM6HWjs.isResponse.call(void 0, innerResult)) {
|
|
1393
1390
|
innerResult = await renderHtml(innerResult, isSpaMode);
|
|
1394
1391
|
}
|
|
1395
1392
|
return innerResult;
|
|
@@ -1399,7 +1396,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1399
1396
|
}
|
|
1400
1397
|
} : void 0
|
|
1401
1398
|
});
|
|
1402
|
-
if (!
|
|
1399
|
+
if (!_chunkDRKUM6HWjs.isResponse.call(void 0, result)) {
|
|
1403
1400
|
result = await renderHtml(result, isSpaMode);
|
|
1404
1401
|
}
|
|
1405
1402
|
return result;
|
|
@@ -1414,7 +1411,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1414
1411
|
}
|
|
1415
1412
|
if (context.errors) {
|
|
1416
1413
|
Object.values(context.errors).forEach((err) => {
|
|
1417
|
-
if (!
|
|
1414
|
+
if (!_chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, err) || err.error) {
|
|
1418
1415
|
handleError(err);
|
|
1419
1416
|
}
|
|
1420
1417
|
});
|
|
@@ -1466,10 +1463,10 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1466
1463
|
} catch (error) {
|
|
1467
1464
|
handleError(error);
|
|
1468
1465
|
let errorForSecondRender = error;
|
|
1469
|
-
if (
|
|
1466
|
+
if (_chunkDRKUM6HWjs.isResponse.call(void 0, error)) {
|
|
1470
1467
|
try {
|
|
1471
1468
|
let data2 = await unwrapResponse(error);
|
|
1472
|
-
errorForSecondRender = new (0,
|
|
1469
|
+
errorForSecondRender = new (0, _chunkDRKUM6HWjs.ErrorResponseImpl)(
|
|
1473
1470
|
error.status,
|
|
1474
1471
|
error.statusText,
|
|
1475
1472
|
data2
|
|
@@ -1477,7 +1474,7 @@ async function handleDocumentRequest(serverMode, build, staticHandler, request,
|
|
|
1477
1474
|
} catch (e) {
|
|
1478
1475
|
}
|
|
1479
1476
|
}
|
|
1480
|
-
context =
|
|
1477
|
+
context = _chunkDRKUM6HWjs.getStaticContextFromError.call(void 0,
|
|
1481
1478
|
staticHandler.dataRoutes,
|
|
1482
1479
|
context,
|
|
1483
1480
|
errorForSecondRender
|
|
@@ -1536,7 +1533,7 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1536
1533
|
return handleQueryRouteError(error);
|
|
1537
1534
|
}
|
|
1538
1535
|
function handleQueryRouteResult(result) {
|
|
1539
|
-
if (
|
|
1536
|
+
if (_chunkDRKUM6HWjs.isResponse.call(void 0, result)) {
|
|
1540
1537
|
return result;
|
|
1541
1538
|
}
|
|
1542
1539
|
if (typeof result === "string") {
|
|
@@ -1545,10 +1542,10 @@ async function handleResourceRequest(serverMode, build, staticHandler, routeId,
|
|
|
1545
1542
|
return Response.json(result);
|
|
1546
1543
|
}
|
|
1547
1544
|
function handleQueryRouteError(error) {
|
|
1548
|
-
if (
|
|
1545
|
+
if (_chunkDRKUM6HWjs.isResponse.call(void 0, error)) {
|
|
1549
1546
|
return error;
|
|
1550
1547
|
}
|
|
1551
|
-
if (
|
|
1548
|
+
if (_chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, error)) {
|
|
1552
1549
|
handleError(error);
|
|
1553
1550
|
return errorResponseToJson(error, serverMode);
|
|
1554
1551
|
}
|
|
@@ -1671,7 +1668,7 @@ function createSessionStorage({
|
|
|
1671
1668
|
};
|
|
1672
1669
|
}
|
|
1673
1670
|
function warnOnceAboutSigningSessionCookie(cookie) {
|
|
1674
|
-
|
|
1671
|
+
_chunkDRKUM6HWjs.warnOnce.call(void 0,
|
|
1675
1672
|
cookie.isSigned,
|
|
1676
1673
|
`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.`
|
|
1677
1674
|
);
|
|
@@ -1761,797 +1758,6 @@ function href(path, ...args) {
|
|
|
1761
1758
|
return result || "/";
|
|
1762
1759
|
}
|
|
1763
1760
|
|
|
1764
|
-
// lib/rsc/browser.tsx
|
|
1765
|
-
|
|
1766
|
-
var _reactdom = require('react-dom'); var ReactDOM = _interopRequireWildcard(_reactdom);
|
|
1767
|
-
|
|
1768
|
-
// lib/dom/ssr/hydration.tsx
|
|
1769
|
-
function getHydrationData({
|
|
1770
|
-
state,
|
|
1771
|
-
routes,
|
|
1772
|
-
getRouteInfo,
|
|
1773
|
-
location: location2,
|
|
1774
|
-
basename,
|
|
1775
|
-
isSpaMode
|
|
1776
|
-
}) {
|
|
1777
|
-
let hydrationData = {
|
|
1778
|
-
...state,
|
|
1779
|
-
loaderData: { ...state.loaderData }
|
|
1780
|
-
};
|
|
1781
|
-
let initialMatches = _chunk2L5AG5Y5js.matchRoutes.call(void 0, routes, location2, basename);
|
|
1782
|
-
if (initialMatches) {
|
|
1783
|
-
for (let match of initialMatches) {
|
|
1784
|
-
let routeId = match.route.id;
|
|
1785
|
-
let routeInfo = getRouteInfo(routeId);
|
|
1786
|
-
if (_chunk2L5AG5Y5js.shouldHydrateRouteLoader.call(void 0,
|
|
1787
|
-
routeId,
|
|
1788
|
-
routeInfo.clientLoader,
|
|
1789
|
-
routeInfo.hasLoader,
|
|
1790
|
-
isSpaMode
|
|
1791
|
-
) && (routeInfo.hasHydrateFallback || !routeInfo.hasLoader)) {
|
|
1792
|
-
delete hydrationData.loaderData[routeId];
|
|
1793
|
-
} else if (!routeInfo.hasLoader) {
|
|
1794
|
-
hydrationData.loaderData[routeId] = null;
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
return hydrationData;
|
|
1799
|
-
}
|
|
1800
|
-
|
|
1801
|
-
// lib/rsc/errorBoundaries.tsx
|
|
1802
|
-
|
|
1803
|
-
var RSCRouterGlobalErrorBoundary = class extends React.default.Component {
|
|
1804
|
-
constructor(props) {
|
|
1805
|
-
super(props);
|
|
1806
|
-
this.state = { error: null, location: props.location };
|
|
1807
|
-
}
|
|
1808
|
-
static getDerivedStateFromError(error) {
|
|
1809
|
-
return { error };
|
|
1810
|
-
}
|
|
1811
|
-
static getDerivedStateFromProps(props, state) {
|
|
1812
|
-
if (state.location !== props.location) {
|
|
1813
|
-
return { error: null, location: props.location };
|
|
1814
|
-
}
|
|
1815
|
-
return { error: state.error, location: state.location };
|
|
1816
|
-
}
|
|
1817
|
-
render() {
|
|
1818
|
-
if (this.state.error) {
|
|
1819
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1820
|
-
RSCDefaultRootErrorBoundaryImpl,
|
|
1821
|
-
{
|
|
1822
|
-
error: this.state.error,
|
|
1823
|
-
renderAppShell: true
|
|
1824
|
-
}
|
|
1825
|
-
);
|
|
1826
|
-
} else {
|
|
1827
|
-
return this.props.children;
|
|
1828
|
-
}
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
|
-
function ErrorWrapper({
|
|
1832
|
-
renderAppShell,
|
|
1833
|
-
title,
|
|
1834
|
-
children
|
|
1835
|
-
}) {
|
|
1836
|
-
if (!renderAppShell) {
|
|
1837
|
-
return children;
|
|
1838
|
-
}
|
|
1839
|
-
return /* @__PURE__ */ React.default.createElement("html", { lang: "en" }, /* @__PURE__ */ React.default.createElement("head", null, /* @__PURE__ */ React.default.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ React.default.createElement(
|
|
1840
|
-
"meta",
|
|
1841
|
-
{
|
|
1842
|
-
name: "viewport",
|
|
1843
|
-
content: "width=device-width,initial-scale=1,viewport-fit=cover"
|
|
1844
|
-
}
|
|
1845
|
-
), /* @__PURE__ */ React.default.createElement("title", null, title)), /* @__PURE__ */ React.default.createElement("body", null, /* @__PURE__ */ React.default.createElement("main", { style: { fontFamily: "system-ui, sans-serif", padding: "2rem" } }, children)));
|
|
1846
|
-
}
|
|
1847
|
-
function RSCDefaultRootErrorBoundaryImpl({
|
|
1848
|
-
error,
|
|
1849
|
-
renderAppShell
|
|
1850
|
-
}) {
|
|
1851
|
-
console.error(error);
|
|
1852
|
-
let heyDeveloper = /* @__PURE__ */ React.default.createElement(
|
|
1853
|
-
"script",
|
|
1854
|
-
{
|
|
1855
|
-
dangerouslySetInnerHTML: {
|
|
1856
|
-
__html: `
|
|
1857
|
-
console.log(
|
|
1858
|
-
"\u{1F4BF} Hey developer \u{1F44B}. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
|
|
1859
|
-
);
|
|
1860
|
-
`
|
|
1861
|
-
}
|
|
1862
|
-
}
|
|
1863
|
-
);
|
|
1864
|
-
if (_chunk2L5AG5Y5js.isRouteErrorResponse.call(void 0, error)) {
|
|
1865
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1866
|
-
ErrorWrapper,
|
|
1867
|
-
{
|
|
1868
|
-
renderAppShell,
|
|
1869
|
-
title: "Unhandled Thrown Response!"
|
|
1870
|
-
},
|
|
1871
|
-
/* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
|
|
1872
|
-
_chunk2L5AG5Y5js.ENABLE_DEV_WARNINGS ? heyDeveloper : null
|
|
1873
|
-
);
|
|
1874
|
-
}
|
|
1875
|
-
let errorInstance;
|
|
1876
|
-
if (error instanceof Error) {
|
|
1877
|
-
errorInstance = error;
|
|
1878
|
-
} else {
|
|
1879
|
-
let errorString = error == null ? "Unknown Error" : typeof error === "object" && "toString" in error ? error.toString() : JSON.stringify(error);
|
|
1880
|
-
errorInstance = new Error(errorString);
|
|
1881
|
-
}
|
|
1882
|
-
return /* @__PURE__ */ React.default.createElement(ErrorWrapper, { renderAppShell, title: "Application Error!" }, /* @__PURE__ */ React.default.createElement("h1", { style: { fontSize: "24px" } }, "Application Error"), /* @__PURE__ */ React.default.createElement(
|
|
1883
|
-
"pre",
|
|
1884
|
-
{
|
|
1885
|
-
style: {
|
|
1886
|
-
padding: "2rem",
|
|
1887
|
-
background: "hsla(10, 50%, 50%, 0.1)",
|
|
1888
|
-
color: "red",
|
|
1889
|
-
overflow: "auto"
|
|
1890
|
-
}
|
|
1891
|
-
},
|
|
1892
|
-
errorInstance.stack
|
|
1893
|
-
), heyDeveloper);
|
|
1894
|
-
}
|
|
1895
|
-
function RSCDefaultRootErrorBoundary({
|
|
1896
|
-
hasRootLayout
|
|
1897
|
-
}) {
|
|
1898
|
-
let error = _chunk2L5AG5Y5js.useRouteError.call(void 0, );
|
|
1899
|
-
if (hasRootLayout === void 0) {
|
|
1900
|
-
throw new Error("Missing 'hasRootLayout' prop");
|
|
1901
|
-
}
|
|
1902
|
-
return /* @__PURE__ */ React.default.createElement(
|
|
1903
|
-
RSCDefaultRootErrorBoundaryImpl,
|
|
1904
|
-
{
|
|
1905
|
-
renderAppShell: !hasRootLayout,
|
|
1906
|
-
error
|
|
1907
|
-
}
|
|
1908
|
-
);
|
|
1909
|
-
}
|
|
1910
|
-
|
|
1911
|
-
// lib/rsc/route-modules.ts
|
|
1912
|
-
function createRSCRouteModules(payload) {
|
|
1913
|
-
const routeModules = {};
|
|
1914
|
-
for (const match of payload.matches) {
|
|
1915
|
-
populateRSCRouteModules(routeModules, match);
|
|
1916
|
-
}
|
|
1917
|
-
return routeModules;
|
|
1918
|
-
}
|
|
1919
|
-
function populateRSCRouteModules(routeModules, matches) {
|
|
1920
|
-
matches = Array.isArray(matches) ? matches : [matches];
|
|
1921
|
-
for (const match of matches) {
|
|
1922
|
-
routeModules[match.id] = {
|
|
1923
|
-
links: match.links,
|
|
1924
|
-
meta: match.meta,
|
|
1925
|
-
default: noopComponent
|
|
1926
|
-
};
|
|
1927
|
-
}
|
|
1928
|
-
}
|
|
1929
|
-
var noopComponent = () => null;
|
|
1930
|
-
|
|
1931
|
-
// lib/rsc/browser.tsx
|
|
1932
|
-
function createCallServer({
|
|
1933
|
-
createFromReadableStream,
|
|
1934
|
-
createTemporaryReferenceSet,
|
|
1935
|
-
encodeReply,
|
|
1936
|
-
fetch: fetchImplementation = fetch
|
|
1937
|
-
}) {
|
|
1938
|
-
const globalVar = window;
|
|
1939
|
-
let landedActionId = 0;
|
|
1940
|
-
return async (id, args) => {
|
|
1941
|
-
let actionId = globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
1942
|
-
const temporaryReferences = createTemporaryReferenceSet();
|
|
1943
|
-
const payloadPromise = fetchImplementation(
|
|
1944
|
-
new Request(location.href, {
|
|
1945
|
-
body: await encodeReply(args, { temporaryReferences }),
|
|
1946
|
-
method: "POST",
|
|
1947
|
-
headers: {
|
|
1948
|
-
Accept: "text/x-component",
|
|
1949
|
-
"rsc-action-id": id
|
|
1950
|
-
}
|
|
1951
|
-
})
|
|
1952
|
-
).then((response) => {
|
|
1953
|
-
if (!response.body) {
|
|
1954
|
-
throw new Error("No response body");
|
|
1955
|
-
}
|
|
1956
|
-
return createFromReadableStream(response.body, {
|
|
1957
|
-
temporaryReferences
|
|
1958
|
-
});
|
|
1959
|
-
});
|
|
1960
|
-
globalVar.__reactRouterDataRouter.__setPendingRerender(
|
|
1961
|
-
Promise.resolve(payloadPromise).then(async (payload) => {
|
|
1962
|
-
if (payload.type === "redirect") {
|
|
1963
|
-
if (payload.reload || isExternalLocation(payload.location)) {
|
|
1964
|
-
window.location.href = payload.location;
|
|
1965
|
-
return () => {
|
|
1966
|
-
};
|
|
1967
|
-
}
|
|
1968
|
-
return () => {
|
|
1969
|
-
globalVar.__reactRouterDataRouter.navigate(payload.location, {
|
|
1970
|
-
replace: payload.replace
|
|
1971
|
-
});
|
|
1972
|
-
};
|
|
1973
|
-
}
|
|
1974
|
-
if (payload.type !== "action") {
|
|
1975
|
-
throw new Error("Unexpected payload type");
|
|
1976
|
-
}
|
|
1977
|
-
const rerender = await payload.rerender;
|
|
1978
|
-
if (rerender && landedActionId < actionId && globalVar.__routerActionID <= actionId) {
|
|
1979
|
-
if (rerender.type === "redirect") {
|
|
1980
|
-
if (rerender.reload || isExternalLocation(rerender.location)) {
|
|
1981
|
-
window.location.href = rerender.location;
|
|
1982
|
-
return;
|
|
1983
|
-
}
|
|
1984
|
-
return () => {
|
|
1985
|
-
globalVar.__reactRouterDataRouter.navigate(rerender.location, {
|
|
1986
|
-
replace: rerender.replace
|
|
1987
|
-
});
|
|
1988
|
-
};
|
|
1989
|
-
}
|
|
1990
|
-
return () => {
|
|
1991
|
-
let lastMatch;
|
|
1992
|
-
for (const match of rerender.matches) {
|
|
1993
|
-
globalVar.__reactRouterDataRouter.patchRoutes(
|
|
1994
|
-
_nullishCoalesce(_optionalChain([lastMatch, 'optionalAccess', _19 => _19.id]), () => ( null)),
|
|
1995
|
-
[createRouteFromServerManifest(match)],
|
|
1996
|
-
true
|
|
1997
|
-
);
|
|
1998
|
-
lastMatch = match;
|
|
1999
|
-
}
|
|
2000
|
-
window.__reactRouterDataRouter._internalSetStateDoNotUseOrYouWillBreakYourApp(
|
|
2001
|
-
{
|
|
2002
|
-
loaderData: Object.assign(
|
|
2003
|
-
{},
|
|
2004
|
-
globalVar.__reactRouterDataRouter.state.loaderData,
|
|
2005
|
-
rerender.loaderData
|
|
2006
|
-
),
|
|
2007
|
-
errors: rerender.errors ? Object.assign(
|
|
2008
|
-
{},
|
|
2009
|
-
globalVar.__reactRouterDataRouter.state.errors,
|
|
2010
|
-
rerender.errors
|
|
2011
|
-
) : null
|
|
2012
|
-
}
|
|
2013
|
-
);
|
|
2014
|
-
};
|
|
2015
|
-
}
|
|
2016
|
-
return () => {
|
|
2017
|
-
};
|
|
2018
|
-
}).catch(() => {
|
|
2019
|
-
})
|
|
2020
|
-
);
|
|
2021
|
-
return payloadPromise.then((payload) => {
|
|
2022
|
-
if (payload.type !== "action" && payload.type !== "redirect") {
|
|
2023
|
-
throw new Error("Unexpected payload type");
|
|
2024
|
-
}
|
|
2025
|
-
return payload.actionResult;
|
|
2026
|
-
});
|
|
2027
|
-
};
|
|
2028
|
-
}
|
|
2029
|
-
function createRouterFromPayload({
|
|
2030
|
-
fetchImplementation,
|
|
2031
|
-
createFromReadableStream,
|
|
2032
|
-
getContext,
|
|
2033
|
-
payload
|
|
2034
|
-
}) {
|
|
2035
|
-
const globalVar = window;
|
|
2036
|
-
if (globalVar.__reactRouterDataRouter && globalVar.__reactRouterRouteModules)
|
|
2037
|
-
return {
|
|
2038
|
-
router: globalVar.__reactRouterDataRouter,
|
|
2039
|
-
routeModules: globalVar.__reactRouterRouteModules
|
|
2040
|
-
};
|
|
2041
|
-
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2042
|
-
globalVar.__reactRouterRouteModules = _nullishCoalesce(globalVar.__reactRouterRouteModules, () => ( {}));
|
|
2043
|
-
populateRSCRouteModules(globalVar.__reactRouterRouteModules, payload.matches);
|
|
2044
|
-
let patches = /* @__PURE__ */ new Map();
|
|
2045
|
-
_optionalChain([payload, 'access', _20 => _20.patches, 'optionalAccess', _21 => _21.forEach, 'call', _22 => _22((patch) => {
|
|
2046
|
-
_chunk2L5AG5Y5js.invariant.call(void 0, patch.parentId, "Invalid patch parentId");
|
|
2047
|
-
if (!patches.has(patch.parentId)) {
|
|
2048
|
-
patches.set(patch.parentId, []);
|
|
2049
|
-
}
|
|
2050
|
-
_optionalChain([patches, 'access', _23 => _23.get, 'call', _24 => _24(patch.parentId), 'optionalAccess', _25 => _25.push, 'call', _26 => _26(patch)]);
|
|
2051
|
-
})]);
|
|
2052
|
-
let routes = payload.matches.reduceRight((previous, match) => {
|
|
2053
|
-
const route = createRouteFromServerManifest(
|
|
2054
|
-
match,
|
|
2055
|
-
payload
|
|
2056
|
-
);
|
|
2057
|
-
if (previous.length > 0) {
|
|
2058
|
-
route.children = previous;
|
|
2059
|
-
let childrenToPatch = patches.get(match.id);
|
|
2060
|
-
if (childrenToPatch) {
|
|
2061
|
-
route.children.push(
|
|
2062
|
-
...childrenToPatch.map((r) => createRouteFromServerManifest(r))
|
|
2063
|
-
);
|
|
2064
|
-
}
|
|
2065
|
-
}
|
|
2066
|
-
return [route];
|
|
2067
|
-
}, []);
|
|
2068
|
-
globalVar.__reactRouterDataRouter = _chunk2L5AG5Y5js.createRouter.call(void 0, {
|
|
2069
|
-
routes,
|
|
2070
|
-
getContext,
|
|
2071
|
-
basename: payload.basename,
|
|
2072
|
-
history: _chunk2L5AG5Y5js.createBrowserHistory.call(void 0, ),
|
|
2073
|
-
hydrationData: getHydrationData({
|
|
2074
|
-
state: {
|
|
2075
|
-
loaderData: payload.loaderData,
|
|
2076
|
-
actionData: payload.actionData,
|
|
2077
|
-
errors: payload.errors
|
|
2078
|
-
},
|
|
2079
|
-
routes,
|
|
2080
|
-
getRouteInfo: (routeId) => {
|
|
2081
|
-
let match = payload.matches.find((m) => m.id === routeId);
|
|
2082
|
-
_chunk2L5AG5Y5js.invariant.call(void 0, match, "Route not found in payload");
|
|
2083
|
-
return {
|
|
2084
|
-
clientLoader: match.clientLoader,
|
|
2085
|
-
hasLoader: match.hasLoader,
|
|
2086
|
-
hasHydrateFallback: match.hydrateFallbackElement != null
|
|
2087
|
-
};
|
|
2088
|
-
},
|
|
2089
|
-
location: payload.location,
|
|
2090
|
-
basename: payload.basename,
|
|
2091
|
-
isSpaMode: false
|
|
2092
|
-
}),
|
|
2093
|
-
async patchRoutesOnNavigation({ path, signal }) {
|
|
2094
|
-
if (discoveredPaths.has(path)) {
|
|
2095
|
-
return;
|
|
2096
|
-
}
|
|
2097
|
-
await fetchAndApplyManifestPatches(
|
|
2098
|
-
[path],
|
|
2099
|
-
createFromReadableStream,
|
|
2100
|
-
fetchImplementation,
|
|
2101
|
-
signal
|
|
2102
|
-
);
|
|
2103
|
-
},
|
|
2104
|
-
// FIXME: Pass `build.ssr` into this function
|
|
2105
|
-
dataStrategy: getRSCSingleFetchDataStrategy(
|
|
2106
|
-
() => globalVar.__reactRouterDataRouter,
|
|
2107
|
-
true,
|
|
2108
|
-
payload.basename,
|
|
2109
|
-
createFromReadableStream,
|
|
2110
|
-
fetchImplementation
|
|
2111
|
-
)
|
|
2112
|
-
});
|
|
2113
|
-
if (globalVar.__reactRouterDataRouter.state.initialized) {
|
|
2114
|
-
globalVar.__routerInitialized = true;
|
|
2115
|
-
globalVar.__reactRouterDataRouter.initialize();
|
|
2116
|
-
} else {
|
|
2117
|
-
globalVar.__routerInitialized = false;
|
|
2118
|
-
}
|
|
2119
|
-
let lastLoaderData = void 0;
|
|
2120
|
-
globalVar.__reactRouterDataRouter.subscribe(({ loaderData, actionData }) => {
|
|
2121
|
-
if (lastLoaderData !== loaderData) {
|
|
2122
|
-
globalVar.__routerActionID = (_nullishCoalesce(globalVar.__routerActionID, () => ( (globalVar.__routerActionID = 0)))) + 1;
|
|
2123
|
-
}
|
|
2124
|
-
});
|
|
2125
|
-
globalVar.__reactRouterDataRouter._updateRoutesForHMR = (routeUpdateByRouteId) => {
|
|
2126
|
-
const oldRoutes = window.__reactRouterDataRouter.routes;
|
|
2127
|
-
const newRoutes = [];
|
|
2128
|
-
function walkRoutes(routes2, parentId) {
|
|
2129
|
-
return routes2.map((route) => {
|
|
2130
|
-
const routeUpdate = routeUpdateByRouteId.get(route.id);
|
|
2131
|
-
if (routeUpdate) {
|
|
2132
|
-
const {
|
|
2133
|
-
routeModule,
|
|
2134
|
-
hasAction,
|
|
2135
|
-
hasComponent,
|
|
2136
|
-
hasErrorBoundary,
|
|
2137
|
-
hasLoader
|
|
2138
|
-
} = routeUpdate;
|
|
2139
|
-
const newRoute = createRouteFromServerManifest({
|
|
2140
|
-
clientAction: routeModule.clientAction,
|
|
2141
|
-
clientLoader: routeModule.clientLoader,
|
|
2142
|
-
element: route.element,
|
|
2143
|
-
errorElement: route.errorElement,
|
|
2144
|
-
handle: route.handle,
|
|
2145
|
-
hasAction,
|
|
2146
|
-
hasComponent,
|
|
2147
|
-
hasErrorBoundary,
|
|
2148
|
-
hasLoader,
|
|
2149
|
-
hydrateFallbackElement: route.hydrateFallbackElement,
|
|
2150
|
-
id: route.id,
|
|
2151
|
-
index: route.index,
|
|
2152
|
-
links: routeModule.links,
|
|
2153
|
-
meta: routeModule.meta,
|
|
2154
|
-
parentId,
|
|
2155
|
-
path: route.path,
|
|
2156
|
-
shouldRevalidate: routeModule.shouldRevalidate
|
|
2157
|
-
});
|
|
2158
|
-
if (route.children) {
|
|
2159
|
-
newRoute.children = walkRoutes(route.children, route.id);
|
|
2160
|
-
}
|
|
2161
|
-
return newRoute;
|
|
2162
|
-
}
|
|
2163
|
-
const updatedRoute = { ...route };
|
|
2164
|
-
if (route.children) {
|
|
2165
|
-
updatedRoute.children = walkRoutes(route.children, route.id);
|
|
2166
|
-
}
|
|
2167
|
-
return updatedRoute;
|
|
2168
|
-
});
|
|
2169
|
-
}
|
|
2170
|
-
newRoutes.push(
|
|
2171
|
-
...walkRoutes(oldRoutes, void 0)
|
|
2172
|
-
);
|
|
2173
|
-
window.__reactRouterDataRouter._internalSetRoutes(newRoutes);
|
|
2174
|
-
};
|
|
2175
|
-
return {
|
|
2176
|
-
router: globalVar.__reactRouterDataRouter,
|
|
2177
|
-
routeModules: globalVar.__reactRouterRouteModules
|
|
2178
|
-
};
|
|
2179
|
-
}
|
|
2180
|
-
var renderedRoutesContext = _chunk2L5AG5Y5js.createContext.call(void 0, );
|
|
2181
|
-
function getRSCSingleFetchDataStrategy(getRouter, ssr, basename, createFromReadableStream, fetchImplementation) {
|
|
2182
|
-
let dataStrategy = _chunk2L5AG5Y5js.getSingleFetchDataStrategyImpl.call(void 0,
|
|
2183
|
-
getRouter,
|
|
2184
|
-
(match) => {
|
|
2185
|
-
let M = match;
|
|
2186
|
-
return {
|
|
2187
|
-
hasLoader: M.route.hasLoader,
|
|
2188
|
-
hasClientLoader: M.route.hasClientLoader,
|
|
2189
|
-
hasComponent: M.route.hasComponent,
|
|
2190
|
-
hasAction: M.route.hasAction,
|
|
2191
|
-
hasClientAction: M.route.hasClientAction,
|
|
2192
|
-
hasShouldRevalidate: M.route.hasShouldRevalidate
|
|
2193
|
-
};
|
|
2194
|
-
},
|
|
2195
|
-
// pass map into fetchAndDecode so it can add payloads
|
|
2196
|
-
getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation),
|
|
2197
|
-
ssr,
|
|
2198
|
-
basename,
|
|
2199
|
-
// If the route has a component but we don't have an element, we need to hit
|
|
2200
|
-
// the server loader flow regardless of whether the client loader calls
|
|
2201
|
-
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2202
|
-
(match) => {
|
|
2203
|
-
let M = match;
|
|
2204
|
-
return M.route.hasComponent && !M.route.element;
|
|
2205
|
-
}
|
|
2206
|
-
);
|
|
2207
|
-
return async (args) => args.runClientMiddleware(async () => {
|
|
2208
|
-
let context = args.context;
|
|
2209
|
-
context.set(renderedRoutesContext, []);
|
|
2210
|
-
let results = await dataStrategy(args);
|
|
2211
|
-
const renderedRoutesById = /* @__PURE__ */ new Map();
|
|
2212
|
-
for (const route of context.get(renderedRoutesContext)) {
|
|
2213
|
-
if (!renderedRoutesById.has(route.id)) {
|
|
2214
|
-
renderedRoutesById.set(route.id, []);
|
|
2215
|
-
}
|
|
2216
|
-
renderedRoutesById.get(route.id).push(route);
|
|
2217
|
-
}
|
|
2218
|
-
for (const match of args.matches) {
|
|
2219
|
-
const renderedRoutes = renderedRoutesById.get(match.route.id);
|
|
2220
|
-
if (renderedRoutes) {
|
|
2221
|
-
for (const rendered of renderedRoutes) {
|
|
2222
|
-
window.__reactRouterDataRouter.patchRoutes(
|
|
2223
|
-
_nullishCoalesce(rendered.parentId, () => ( null)),
|
|
2224
|
-
[createRouteFromServerManifest(rendered)],
|
|
2225
|
-
true
|
|
2226
|
-
);
|
|
2227
|
-
}
|
|
2228
|
-
}
|
|
2229
|
-
}
|
|
2230
|
-
return results;
|
|
2231
|
-
});
|
|
2232
|
-
}
|
|
2233
|
-
function getFetchAndDecodeViaRSC(createFromReadableStream, fetchImplementation) {
|
|
2234
|
-
return async (args, basename, targetRoutes) => {
|
|
2235
|
-
let { request, context } = args;
|
|
2236
|
-
let url = _chunk2L5AG5Y5js.singleFetchUrl.call(void 0, request.url, basename, "rsc");
|
|
2237
|
-
if (request.method === "GET") {
|
|
2238
|
-
url = _chunk2L5AG5Y5js.stripIndexParam.call(void 0, url);
|
|
2239
|
-
if (targetRoutes) {
|
|
2240
|
-
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
2241
|
-
}
|
|
2242
|
-
}
|
|
2243
|
-
let res = await fetchImplementation(
|
|
2244
|
-
new Request(url, await _chunk2L5AG5Y5js.createRequestInit.call(void 0, request))
|
|
2245
|
-
);
|
|
2246
|
-
if (res.status >= 400 && !res.headers.has("X-Remix-Response")) {
|
|
2247
|
-
throw new (0, _chunk2L5AG5Y5js.ErrorResponseImpl)(res.status, res.statusText, await res.text());
|
|
2248
|
-
}
|
|
2249
|
-
_chunk2L5AG5Y5js.invariant.call(void 0, res.body, "No response body to decode");
|
|
2250
|
-
try {
|
|
2251
|
-
const payload = await createFromReadableStream(res.body, {
|
|
2252
|
-
temporaryReferences: void 0
|
|
2253
|
-
});
|
|
2254
|
-
if (payload.type === "redirect") {
|
|
2255
|
-
return {
|
|
2256
|
-
status: res.status,
|
|
2257
|
-
data: {
|
|
2258
|
-
redirect: {
|
|
2259
|
-
redirect: payload.location,
|
|
2260
|
-
reload: payload.reload,
|
|
2261
|
-
replace: payload.replace,
|
|
2262
|
-
revalidate: false,
|
|
2263
|
-
status: payload.status
|
|
2264
|
-
}
|
|
2265
|
-
}
|
|
2266
|
-
};
|
|
2267
|
-
}
|
|
2268
|
-
if (payload.type !== "render") {
|
|
2269
|
-
throw new Error("Unexpected payload type");
|
|
2270
|
-
}
|
|
2271
|
-
context.get(renderedRoutesContext).push(...payload.matches);
|
|
2272
|
-
let results = { routes: {} };
|
|
2273
|
-
const dataKey = _chunk2L5AG5Y5js.isMutationMethod.call(void 0, request.method) ? "actionData" : "loaderData";
|
|
2274
|
-
for (let [routeId, data2] of Object.entries(payload[dataKey] || {})) {
|
|
2275
|
-
results.routes[routeId] = { data: data2 };
|
|
2276
|
-
}
|
|
2277
|
-
if (payload.errors) {
|
|
2278
|
-
for (let [routeId, error] of Object.entries(payload.errors)) {
|
|
2279
|
-
results.routes[routeId] = { error };
|
|
2280
|
-
}
|
|
2281
|
-
}
|
|
2282
|
-
return { status: res.status, data: results };
|
|
2283
|
-
} catch (e) {
|
|
2284
|
-
throw new Error("Unable to decode RSC response");
|
|
2285
|
-
}
|
|
2286
|
-
};
|
|
2287
|
-
}
|
|
2288
|
-
function RSCHydratedRouter({
|
|
2289
|
-
createFromReadableStream,
|
|
2290
|
-
fetch: fetchImplementation = fetch,
|
|
2291
|
-
payload,
|
|
2292
|
-
routeDiscovery = "eager",
|
|
2293
|
-
getContext
|
|
2294
|
-
}) {
|
|
2295
|
-
if (payload.type !== "render") throw new Error("Invalid payload type");
|
|
2296
|
-
let { router, routeModules } = React4.useMemo(
|
|
2297
|
-
() => createRouterFromPayload({
|
|
2298
|
-
payload,
|
|
2299
|
-
fetchImplementation,
|
|
2300
|
-
getContext,
|
|
2301
|
-
createFromReadableStream
|
|
2302
|
-
}),
|
|
2303
|
-
[createFromReadableStream, payload, fetchImplementation, getContext]
|
|
2304
|
-
);
|
|
2305
|
-
React4.useEffect(() => {
|
|
2306
|
-
_chunk2L5AG5Y5js.setIsHydrated.call(void 0, );
|
|
2307
|
-
}, []);
|
|
2308
|
-
React4.useLayoutEffect(() => {
|
|
2309
|
-
const globalVar = window;
|
|
2310
|
-
if (!globalVar.__routerInitialized) {
|
|
2311
|
-
globalVar.__routerInitialized = true;
|
|
2312
|
-
globalVar.__reactRouterDataRouter.initialize();
|
|
2313
|
-
}
|
|
2314
|
-
}, []);
|
|
2315
|
-
let [location2, setLocation] = React4.useState(router.state.location);
|
|
2316
|
-
React4.useLayoutEffect(
|
|
2317
|
-
() => router.subscribe((newState) => {
|
|
2318
|
-
if (newState.location !== location2) {
|
|
2319
|
-
setLocation(newState.location);
|
|
2320
|
-
}
|
|
2321
|
-
}),
|
|
2322
|
-
[router, location2]
|
|
2323
|
-
);
|
|
2324
|
-
React4.useEffect(() => {
|
|
2325
|
-
if (routeDiscovery === "lazy" || // @ts-expect-error - TS doesn't know about this yet
|
|
2326
|
-
_optionalChain([window, 'access', _27 => _27.navigator, 'optionalAccess', _28 => _28.connection, 'optionalAccess', _29 => _29.saveData]) === true) {
|
|
2327
|
-
return;
|
|
2328
|
-
}
|
|
2329
|
-
function registerElement(el) {
|
|
2330
|
-
let path = el.tagName === "FORM" ? el.getAttribute("action") : el.getAttribute("href");
|
|
2331
|
-
if (!path) {
|
|
2332
|
-
return;
|
|
2333
|
-
}
|
|
2334
|
-
let pathname = el.tagName === "A" ? el.pathname : new URL(path, window.location.origin).pathname;
|
|
2335
|
-
if (!discoveredPaths.has(pathname)) {
|
|
2336
|
-
nextPaths.add(pathname);
|
|
2337
|
-
}
|
|
2338
|
-
}
|
|
2339
|
-
async function fetchPatches() {
|
|
2340
|
-
document.querySelectorAll("a[data-discover], form[data-discover]").forEach(registerElement);
|
|
2341
|
-
let paths = Array.from(nextPaths.keys()).filter((path) => {
|
|
2342
|
-
if (discoveredPaths.has(path)) {
|
|
2343
|
-
nextPaths.delete(path);
|
|
2344
|
-
return false;
|
|
2345
|
-
}
|
|
2346
|
-
return true;
|
|
2347
|
-
});
|
|
2348
|
-
if (paths.length === 0) {
|
|
2349
|
-
return;
|
|
2350
|
-
}
|
|
2351
|
-
try {
|
|
2352
|
-
await fetchAndApplyManifestPatches(
|
|
2353
|
-
paths,
|
|
2354
|
-
createFromReadableStream,
|
|
2355
|
-
fetchImplementation
|
|
2356
|
-
);
|
|
2357
|
-
} catch (e) {
|
|
2358
|
-
console.error("Failed to fetch manifest patches", e);
|
|
2359
|
-
}
|
|
2360
|
-
}
|
|
2361
|
-
let debouncedFetchPatches = debounce(fetchPatches, 100);
|
|
2362
|
-
fetchPatches();
|
|
2363
|
-
let observer = new MutationObserver(() => debouncedFetchPatches());
|
|
2364
|
-
observer.observe(document.documentElement, {
|
|
2365
|
-
subtree: true,
|
|
2366
|
-
childList: true,
|
|
2367
|
-
attributes: true,
|
|
2368
|
-
attributeFilter: ["data-discover", "href", "action"]
|
|
2369
|
-
});
|
|
2370
|
-
}, [routeDiscovery, createFromReadableStream, fetchImplementation]);
|
|
2371
|
-
const frameworkContext = {
|
|
2372
|
-
future: {
|
|
2373
|
-
// These flags have no runtime impact so can always be false. If we add
|
|
2374
|
-
// flags that drive runtime behavior they'll need to be proxied through.
|
|
2375
|
-
v8_middleware: false,
|
|
2376
|
-
unstable_subResourceIntegrity: false
|
|
2377
|
-
},
|
|
2378
|
-
isSpaMode: false,
|
|
2379
|
-
ssr: true,
|
|
2380
|
-
criticalCss: "",
|
|
2381
|
-
manifest: {
|
|
2382
|
-
routes: {},
|
|
2383
|
-
version: "1",
|
|
2384
|
-
url: "",
|
|
2385
|
-
entry: {
|
|
2386
|
-
module: "",
|
|
2387
|
-
imports: []
|
|
2388
|
-
}
|
|
2389
|
-
},
|
|
2390
|
-
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2391
|
-
routeModules
|
|
2392
|
-
};
|
|
2393
|
-
return /* @__PURE__ */ React4.createElement(_chunk2L5AG5Y5js.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React4.createElement(RSCRouterGlobalErrorBoundary, { location: location2 }, /* @__PURE__ */ React4.createElement(_chunk2L5AG5Y5js.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React4.createElement(_chunkFGRCWJDIjs.UNSTABLE_TransitionEnabledRouterProvider, { router, flushSync: ReactDOM.flushSync }))));
|
|
2394
|
-
}
|
|
2395
|
-
function createRouteFromServerManifest(match, payload) {
|
|
2396
|
-
let hasInitialData = payload && match.id in payload.loaderData;
|
|
2397
|
-
let initialData = _optionalChain([payload, 'optionalAccess', _30 => _30.loaderData, 'access', _31 => _31[match.id]]);
|
|
2398
|
-
let hasInitialError = _optionalChain([payload, 'optionalAccess', _32 => _32.errors]) && match.id in payload.errors;
|
|
2399
|
-
let initialError = _optionalChain([payload, 'optionalAccess', _33 => _33.errors, 'optionalAccess', _34 => _34[match.id]]);
|
|
2400
|
-
let isHydrationRequest = _optionalChain([match, 'access', _35 => _35.clientLoader, 'optionalAccess', _36 => _36.hydrate]) === true || !match.hasLoader || // If the route has a component but we don't have an element, we need to hit
|
|
2401
|
-
// the server loader flow regardless of whether the client loader calls
|
|
2402
|
-
// `serverLoader` or not, otherwise we'll have nothing to render.
|
|
2403
|
-
match.hasComponent && !match.element;
|
|
2404
|
-
_chunk2L5AG5Y5js.invariant.call(void 0, window.__reactRouterRouteModules);
|
|
2405
|
-
populateRSCRouteModules(window.__reactRouterRouteModules, match);
|
|
2406
|
-
let dataRoute = {
|
|
2407
|
-
id: match.id,
|
|
2408
|
-
element: match.element,
|
|
2409
|
-
errorElement: match.errorElement,
|
|
2410
|
-
handle: match.handle,
|
|
2411
|
-
hasErrorBoundary: match.hasErrorBoundary,
|
|
2412
|
-
hydrateFallbackElement: match.hydrateFallbackElement,
|
|
2413
|
-
index: match.index,
|
|
2414
|
-
loader: match.clientLoader ? async (args, singleFetch) => {
|
|
2415
|
-
try {
|
|
2416
|
-
let result = await match.clientLoader({
|
|
2417
|
-
...args,
|
|
2418
|
-
serverLoader: () => {
|
|
2419
|
-
preventInvalidServerHandlerCall(
|
|
2420
|
-
"loader",
|
|
2421
|
-
match.id,
|
|
2422
|
-
match.hasLoader
|
|
2423
|
-
);
|
|
2424
|
-
if (isHydrationRequest) {
|
|
2425
|
-
if (hasInitialData) {
|
|
2426
|
-
return initialData;
|
|
2427
|
-
}
|
|
2428
|
-
if (hasInitialError) {
|
|
2429
|
-
throw initialError;
|
|
2430
|
-
}
|
|
2431
|
-
}
|
|
2432
|
-
return callSingleFetch(singleFetch);
|
|
2433
|
-
}
|
|
2434
|
-
});
|
|
2435
|
-
return result;
|
|
2436
|
-
} finally {
|
|
2437
|
-
isHydrationRequest = false;
|
|
2438
|
-
}
|
|
2439
|
-
} : (
|
|
2440
|
-
// We always make the call in this RSC world since even if we don't
|
|
2441
|
-
// have a `loader` we may need to get the `element` implementation
|
|
2442
|
-
(_, singleFetch) => callSingleFetch(singleFetch)
|
|
2443
|
-
),
|
|
2444
|
-
action: match.clientAction ? (args, singleFetch) => match.clientAction({
|
|
2445
|
-
...args,
|
|
2446
|
-
serverAction: async () => {
|
|
2447
|
-
preventInvalidServerHandlerCall(
|
|
2448
|
-
"action",
|
|
2449
|
-
match.id,
|
|
2450
|
-
match.hasLoader
|
|
2451
|
-
);
|
|
2452
|
-
return await callSingleFetch(singleFetch);
|
|
2453
|
-
}
|
|
2454
|
-
}) : match.hasAction ? (_, singleFetch) => callSingleFetch(singleFetch) : () => {
|
|
2455
|
-
throw _chunk2L5AG5Y5js.noActionDefinedError.call(void 0, "action", match.id);
|
|
2456
|
-
},
|
|
2457
|
-
path: match.path,
|
|
2458
|
-
shouldRevalidate: match.shouldRevalidate,
|
|
2459
|
-
// We always have a "loader" in this RSC world since even if we don't
|
|
2460
|
-
// have a `loader` we may need to get the `element` implementation
|
|
2461
|
-
hasLoader: true,
|
|
2462
|
-
hasClientLoader: match.clientLoader != null,
|
|
2463
|
-
hasAction: match.hasAction,
|
|
2464
|
-
hasClientAction: match.clientAction != null,
|
|
2465
|
-
hasShouldRevalidate: match.shouldRevalidate != null
|
|
2466
|
-
};
|
|
2467
|
-
if (typeof dataRoute.loader === "function") {
|
|
2468
|
-
dataRoute.loader.hydrate = _chunk2L5AG5Y5js.shouldHydrateRouteLoader.call(void 0,
|
|
2469
|
-
match.id,
|
|
2470
|
-
match.clientLoader,
|
|
2471
|
-
match.hasLoader,
|
|
2472
|
-
false
|
|
2473
|
-
);
|
|
2474
|
-
}
|
|
2475
|
-
return dataRoute;
|
|
2476
|
-
}
|
|
2477
|
-
function callSingleFetch(singleFetch) {
|
|
2478
|
-
_chunk2L5AG5Y5js.invariant.call(void 0, typeof singleFetch === "function", "Invalid singleFetch parameter");
|
|
2479
|
-
return singleFetch();
|
|
2480
|
-
}
|
|
2481
|
-
function preventInvalidServerHandlerCall(type, routeId, hasHandler) {
|
|
2482
|
-
if (!hasHandler) {
|
|
2483
|
-
let fn = type === "action" ? "serverAction()" : "serverLoader()";
|
|
2484
|
-
let msg = `You are trying to call ${fn} on a route that does not have a server ${type} (routeId: "${routeId}")`;
|
|
2485
|
-
console.error(msg);
|
|
2486
|
-
throw new (0, _chunk2L5AG5Y5js.ErrorResponseImpl)(400, "Bad Request", new Error(msg), true);
|
|
2487
|
-
}
|
|
2488
|
-
}
|
|
2489
|
-
var nextPaths = /* @__PURE__ */ new Set();
|
|
2490
|
-
var discoveredPathsMaxSize = 1e3;
|
|
2491
|
-
var discoveredPaths = /* @__PURE__ */ new Set();
|
|
2492
|
-
var URL_LIMIT = 7680;
|
|
2493
|
-
function getManifestUrl(paths) {
|
|
2494
|
-
if (paths.length === 0) {
|
|
2495
|
-
return null;
|
|
2496
|
-
}
|
|
2497
|
-
if (paths.length === 1) {
|
|
2498
|
-
return new URL(`${paths[0]}.manifest`, window.location.origin);
|
|
2499
|
-
}
|
|
2500
|
-
const globalVar = window;
|
|
2501
|
-
let basename = (_nullishCoalesce(globalVar.__reactRouterDataRouter.basename, () => ( ""))).replace(
|
|
2502
|
-
/^\/|\/$/g,
|
|
2503
|
-
""
|
|
2504
|
-
);
|
|
2505
|
-
let url = new URL(`${basename}/.manifest`, window.location.origin);
|
|
2506
|
-
url.searchParams.set("paths", paths.sort().join(","));
|
|
2507
|
-
return url;
|
|
2508
|
-
}
|
|
2509
|
-
async function fetchAndApplyManifestPatches(paths, createFromReadableStream, fetchImplementation, signal) {
|
|
2510
|
-
let url = getManifestUrl(paths);
|
|
2511
|
-
if (url == null) {
|
|
2512
|
-
return;
|
|
2513
|
-
}
|
|
2514
|
-
if (url.toString().length > URL_LIMIT) {
|
|
2515
|
-
nextPaths.clear();
|
|
2516
|
-
return;
|
|
2517
|
-
}
|
|
2518
|
-
let response = await fetchImplementation(new Request(url, { signal }));
|
|
2519
|
-
if (!response.body || response.status < 200 || response.status >= 300) {
|
|
2520
|
-
throw new Error("Unable to fetch new route matches from the server");
|
|
2521
|
-
}
|
|
2522
|
-
let payload = await createFromReadableStream(response.body, {
|
|
2523
|
-
temporaryReferences: void 0
|
|
2524
|
-
});
|
|
2525
|
-
if (payload.type !== "manifest") {
|
|
2526
|
-
throw new Error("Failed to patch routes");
|
|
2527
|
-
}
|
|
2528
|
-
paths.forEach((p) => addToFifoQueue(p, discoveredPaths));
|
|
2529
|
-
payload.patches.forEach((p) => {
|
|
2530
|
-
window.__reactRouterDataRouter.patchRoutes(
|
|
2531
|
-
_nullishCoalesce(p.parentId, () => ( null)),
|
|
2532
|
-
[createRouteFromServerManifest(p)]
|
|
2533
|
-
);
|
|
2534
|
-
});
|
|
2535
|
-
}
|
|
2536
|
-
function addToFifoQueue(path, queue) {
|
|
2537
|
-
if (queue.size >= discoveredPathsMaxSize) {
|
|
2538
|
-
let first = queue.values().next().value;
|
|
2539
|
-
queue.delete(first);
|
|
2540
|
-
}
|
|
2541
|
-
queue.add(path);
|
|
2542
|
-
}
|
|
2543
|
-
function debounce(callback, wait) {
|
|
2544
|
-
let timeoutId;
|
|
2545
|
-
return (...args) => {
|
|
2546
|
-
window.clearTimeout(timeoutId);
|
|
2547
|
-
timeoutId = window.setTimeout(() => callback(...args), wait);
|
|
2548
|
-
};
|
|
2549
|
-
}
|
|
2550
|
-
function isExternalLocation(location2) {
|
|
2551
|
-
const newLocation = new URL(location2, window.location.href);
|
|
2552
|
-
return newLocation.origin !== window.location.origin;
|
|
2553
|
-
}
|
|
2554
|
-
|
|
2555
1761
|
// lib/rsc/server.ssr.tsx
|
|
2556
1762
|
|
|
2557
1763
|
|
|
@@ -2645,7 +1851,7 @@ function escapeScript(script) {
|
|
|
2645
1851
|
|
|
2646
1852
|
// lib/rsc/server.ssr.tsx
|
|
2647
1853
|
var REACT_USE = "use";
|
|
2648
|
-
var useImpl =
|
|
1854
|
+
var useImpl = React3[REACT_USE];
|
|
2649
1855
|
function useSafe(promise) {
|
|
2650
1856
|
if (useImpl) {
|
|
2651
1857
|
return useImpl(promise);
|
|
@@ -2731,14 +1937,14 @@ async function routeRSCServerRequest({
|
|
|
2731
1937
|
const payload = await createFromReadableStream(
|
|
2732
1938
|
detectRedirectResponse.body
|
|
2733
1939
|
);
|
|
2734
|
-
if (serverResponse.status ===
|
|
1940
|
+
if (serverResponse.status === _chunkDRKUM6HWjs.SINGLE_FETCH_REDIRECT_STATUS && payload.type === "redirect") {
|
|
2735
1941
|
const headers2 = new Headers(serverResponse.headers);
|
|
2736
1942
|
headers2.delete("Content-Encoding");
|
|
2737
1943
|
headers2.delete("Content-Length");
|
|
2738
1944
|
headers2.delete("Content-Type");
|
|
2739
1945
|
headers2.delete("X-Remix-Response");
|
|
2740
1946
|
headers2.set("Location", payload.location);
|
|
2741
|
-
return new Response(_optionalChain([serverResponseB, 'optionalAccess',
|
|
1947
|
+
return new Response(_optionalChain([serverResponseB, 'optionalAccess', _19 => _19.body]) || "", {
|
|
2742
1948
|
headers: headers2,
|
|
2743
1949
|
status: payload.status,
|
|
2744
1950
|
statusText: serverResponse.statusText
|
|
@@ -2753,7 +1959,7 @@ async function routeRSCServerRequest({
|
|
|
2753
1959
|
headers
|
|
2754
1960
|
});
|
|
2755
1961
|
}
|
|
2756
|
-
if (!_optionalChain([serverResponseB, 'optionalAccess',
|
|
1962
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _20 => _20.body])) {
|
|
2757
1963
|
throw new Error("Failed to clone server response");
|
|
2758
1964
|
}
|
|
2759
1965
|
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
@@ -2766,7 +1972,7 @@ async function routeRSCServerRequest({
|
|
|
2766
1972
|
return reason;
|
|
2767
1973
|
}
|
|
2768
1974
|
try {
|
|
2769
|
-
const status =
|
|
1975
|
+
const status = _chunkDRKUM6HWjs.isRouteErrorResponse.call(void 0, reason) ? reason.status : 500;
|
|
2770
1976
|
const html = await renderHTML(() => {
|
|
2771
1977
|
const decoded = Promise.resolve(
|
|
2772
1978
|
createFromReadableStream(createStream())
|
|
@@ -2805,7 +2011,7 @@ async function routeRSCServerRequest({
|
|
|
2805
2011
|
headers
|
|
2806
2012
|
});
|
|
2807
2013
|
}
|
|
2808
|
-
if (!_optionalChain([serverResponseB, 'optionalAccess',
|
|
2014
|
+
if (!_optionalChain([serverResponseB, 'optionalAccess', _21 => _21.body])) {
|
|
2809
2015
|
throw new Error("Failed to clone server response");
|
|
2810
2016
|
}
|
|
2811
2017
|
const body2 = html.pipeThrough(injectRSCPayload(serverResponseB.body));
|
|
@@ -2832,7 +2038,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2832
2038
|
if (payload.type !== "render") return null;
|
|
2833
2039
|
let patchedLoaderData = { ...payload.loaderData };
|
|
2834
2040
|
for (const match of payload.matches) {
|
|
2835
|
-
if (
|
|
2041
|
+
if (_chunkDRKUM6HWjs.shouldHydrateRouteLoader.call(void 0,
|
|
2836
2042
|
match.id,
|
|
2837
2043
|
match.clientLoader,
|
|
2838
2044
|
match.hasLoader,
|
|
@@ -2872,7 +2078,7 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2872
2078
|
}
|
|
2873
2079
|
}))
|
|
2874
2080
|
};
|
|
2875
|
-
const router =
|
|
2081
|
+
const router = _chunkYVVCGSEGjs.createStaticRouter.call(void 0,
|
|
2876
2082
|
payload.matches.reduceRight((previous, match) => {
|
|
2877
2083
|
const route = {
|
|
2878
2084
|
id: match.id,
|
|
@@ -2914,10 +2120,10 @@ function RSCStaticRouter({ getPayload }) {
|
|
|
2914
2120
|
}
|
|
2915
2121
|
},
|
|
2916
2122
|
routeDiscovery: { mode: "lazy", manifestPath: "/__manifest" },
|
|
2917
|
-
routeModules: createRSCRouteModules(payload)
|
|
2123
|
+
routeModules: _chunkUU3LJMU6js.createRSCRouteModules.call(void 0, payload)
|
|
2918
2124
|
};
|
|
2919
|
-
return /* @__PURE__ */
|
|
2920
|
-
|
|
2125
|
+
return /* @__PURE__ */ React3.createElement(_chunkDRKUM6HWjs.RSCRouterContext.Provider, { value: true }, /* @__PURE__ */ React3.createElement(_chunkUU3LJMU6js.RSCRouterGlobalErrorBoundary, { location: payload.location }, /* @__PURE__ */ React3.createElement(_chunkDRKUM6HWjs.FrameworkContext.Provider, { value: frameworkContext }, /* @__PURE__ */ React3.createElement(
|
|
2126
|
+
_chunkYVVCGSEGjs.StaticRouterProvider,
|
|
2921
2127
|
{
|
|
2922
2128
|
context,
|
|
2923
2129
|
router,
|
|
@@ -2933,41 +2139,6 @@ function isManifestRequest(url) {
|
|
|
2933
2139
|
return url.pathname.endsWith(".manifest");
|
|
2934
2140
|
}
|
|
2935
2141
|
|
|
2936
|
-
// lib/rsc/html-stream/browser.ts
|
|
2937
|
-
function getRSCStream() {
|
|
2938
|
-
let encoder3 = new TextEncoder();
|
|
2939
|
-
let streamController = null;
|
|
2940
|
-
let rscStream = new ReadableStream({
|
|
2941
|
-
start(controller) {
|
|
2942
|
-
if (typeof window === "undefined") {
|
|
2943
|
-
return;
|
|
2944
|
-
}
|
|
2945
|
-
let handleChunk = (chunk) => {
|
|
2946
|
-
if (typeof chunk === "string") {
|
|
2947
|
-
controller.enqueue(encoder3.encode(chunk));
|
|
2948
|
-
} else {
|
|
2949
|
-
controller.enqueue(chunk);
|
|
2950
|
-
}
|
|
2951
|
-
};
|
|
2952
|
-
window.__FLIGHT_DATA || (window.__FLIGHT_DATA = []);
|
|
2953
|
-
window.__FLIGHT_DATA.forEach(handleChunk);
|
|
2954
|
-
window.__FLIGHT_DATA.push = (chunk) => {
|
|
2955
|
-
handleChunk(chunk);
|
|
2956
|
-
return 0;
|
|
2957
|
-
};
|
|
2958
|
-
streamController = controller;
|
|
2959
|
-
}
|
|
2960
|
-
});
|
|
2961
|
-
if (typeof document !== "undefined" && document.readyState === "loading") {
|
|
2962
|
-
document.addEventListener("DOMContentLoaded", () => {
|
|
2963
|
-
_optionalChain([streamController, 'optionalAccess', _40 => _40.close, 'call', _41 => _41()]);
|
|
2964
|
-
});
|
|
2965
|
-
} else {
|
|
2966
|
-
_optionalChain([streamController, 'optionalAccess', _42 => _42.close, 'call', _43 => _43()]);
|
|
2967
|
-
}
|
|
2968
|
-
return rscStream;
|
|
2969
|
-
}
|
|
2970
|
-
|
|
2971
2142
|
// lib/dom/ssr/errors.ts
|
|
2972
2143
|
function deserializeErrors(errors) {
|
|
2973
2144
|
if (!errors) return null;
|
|
@@ -2975,7 +2146,7 @@ function deserializeErrors(errors) {
|
|
|
2975
2146
|
let serialized = {};
|
|
2976
2147
|
for (let [key, val] of entries) {
|
|
2977
2148
|
if (val && val.__type === "RouteErrorResponse") {
|
|
2978
|
-
serialized[key] = new (0,
|
|
2149
|
+
serialized[key] = new (0, _chunkDRKUM6HWjs.ErrorResponseImpl)(
|
|
2979
2150
|
val.status,
|
|
2980
2151
|
val.statusText,
|
|
2981
2152
|
val.data,
|
|
@@ -3132,7 +2303,4 @@ function deserializeErrors(errors) {
|
|
|
3132
2303
|
|
|
3133
2304
|
|
|
3134
2305
|
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
exports.Await = _chunkFGRCWJDIjs.Await; exports.BrowserRouter = _chunkFGRCWJDIjs.BrowserRouter; exports.Form = _chunkFGRCWJDIjs.Form; exports.HashRouter = _chunkFGRCWJDIjs.HashRouter; exports.IDLE_BLOCKER = _chunk2L5AG5Y5js.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunk2L5AG5Y5js.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunk2L5AG5Y5js.IDLE_NAVIGATION; exports.Link = _chunkFGRCWJDIjs.Link; exports.Links = _chunk2L5AG5Y5js.Links; exports.MemoryRouter = _chunkFGRCWJDIjs.MemoryRouter; exports.Meta = _chunk2L5AG5Y5js.Meta; exports.NavLink = _chunkFGRCWJDIjs.NavLink; exports.Navigate = _chunkFGRCWJDIjs.Navigate; exports.NavigationType = _chunk2L5AG5Y5js.Action; exports.Outlet = _chunkFGRCWJDIjs.Outlet; exports.PrefetchPageLinks = _chunk2L5AG5Y5js.PrefetchPageLinks; exports.Route = _chunkFGRCWJDIjs.Route; exports.Router = _chunkFGRCWJDIjs.Router; exports.RouterContextProvider = _chunk2L5AG5Y5js.RouterContextProvider; exports.RouterProvider = _chunkFGRCWJDIjs.RouterProvider; exports.Routes = _chunkFGRCWJDIjs.Routes; exports.Scripts = _chunk2L5AG5Y5js.Scripts; exports.ScrollRestoration = _chunkFGRCWJDIjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkFGRCWJDIjs.StaticRouter; exports.StaticRouterProvider = _chunkFGRCWJDIjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunk2L5AG5Y5js.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunk2L5AG5Y5js.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunk2L5AG5Y5js.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunk2L5AG5Y5js.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunk2L5AG5Y5js.FetchersContext; exports.UNSAFE_FrameworkContext = _chunk2L5AG5Y5js.FrameworkContext; exports.UNSAFE_LocationContext = _chunk2L5AG5Y5js.LocationContext; exports.UNSAFE_NavigationContext = _chunk2L5AG5Y5js.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunk2L5AG5Y5js.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunk2L5AG5Y5js.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunk2L5AG5Y5js.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunk2L5AG5Y5js.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkFGRCWJDIjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkFGRCWJDIjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkFGRCWJDIjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunk2L5AG5Y5js.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunk2L5AG5Y5js.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunk2L5AG5Y5js.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunk2L5AG5Y5js.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunk2L5AG5Y5js.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunk2L5AG5Y5js.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunk2L5AG5Y5js.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkFGRCWJDIjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunk2L5AG5Y5js.invariant; exports.UNSAFE_mapRouteProperties = _chunkFGRCWJDIjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunk2L5AG5Y5js.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunk2L5AG5Y5js.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkFGRCWJDIjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkFGRCWJDIjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkFGRCWJDIjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkFGRCWJDIjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkFGRCWJDIjs.createBrowserRouter; exports.createContext = _chunk2L5AG5Y5js.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkFGRCWJDIjs.createHashRouter; exports.createMemoryRouter = _chunkFGRCWJDIjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunk2L5AG5Y5js.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkFGRCWJDIjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkFGRCWJDIjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkFGRCWJDIjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkFGRCWJDIjs.createStaticHandler; exports.createStaticRouter = _chunkFGRCWJDIjs.createStaticRouter; exports.data = _chunk2L5AG5Y5js.data; exports.generatePath = _chunk2L5AG5Y5js.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunk2L5AG5Y5js.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunk2L5AG5Y5js.matchPath; exports.matchRoutes = _chunk2L5AG5Y5js.matchRoutes; exports.parsePath = _chunk2L5AG5Y5js.parsePath; exports.redirect = _chunk2L5AG5Y5js.redirect; exports.redirectDocument = _chunk2L5AG5Y5js.redirectDocument; exports.renderMatches = _chunkFGRCWJDIjs.renderMatches; exports.replace = _chunk2L5AG5Y5js.replace; exports.resolvePath = _chunk2L5AG5Y5js.resolvePath; exports.unstable_HistoryRouter = _chunkFGRCWJDIjs.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 = _chunkFGRCWJDIjs.usePrompt; exports.unstable_useRoute = _chunk2L5AG5Y5js.useRoute; exports.useActionData = _chunk2L5AG5Y5js.useActionData; exports.useAsyncError = _chunk2L5AG5Y5js.useAsyncError; exports.useAsyncValue = _chunk2L5AG5Y5js.useAsyncValue; exports.useBeforeUnload = _chunkFGRCWJDIjs.useBeforeUnload; exports.useBlocker = _chunk2L5AG5Y5js.useBlocker; exports.useFetcher = _chunkFGRCWJDIjs.useFetcher; exports.useFetchers = _chunkFGRCWJDIjs.useFetchers; exports.useFormAction = _chunkFGRCWJDIjs.useFormAction; exports.useHref = _chunk2L5AG5Y5js.useHref; exports.useInRouterContext = _chunk2L5AG5Y5js.useInRouterContext; exports.useLinkClickHandler = _chunkFGRCWJDIjs.useLinkClickHandler; exports.useLoaderData = _chunk2L5AG5Y5js.useLoaderData; exports.useLocation = _chunk2L5AG5Y5js.useLocation; exports.useMatch = _chunk2L5AG5Y5js.useMatch; exports.useMatches = _chunk2L5AG5Y5js.useMatches; exports.useNavigate = _chunk2L5AG5Y5js.useNavigate; exports.useNavigation = _chunk2L5AG5Y5js.useNavigation; exports.useNavigationType = _chunk2L5AG5Y5js.useNavigationType; exports.useOutlet = _chunk2L5AG5Y5js.useOutlet; exports.useOutletContext = _chunk2L5AG5Y5js.useOutletContext; exports.useParams = _chunk2L5AG5Y5js.useParams; exports.useResolvedPath = _chunk2L5AG5Y5js.useResolvedPath; exports.useRevalidator = _chunk2L5AG5Y5js.useRevalidator; exports.useRouteError = _chunk2L5AG5Y5js.useRouteError; exports.useRouteLoaderData = _chunk2L5AG5Y5js.useRouteLoaderData; exports.useRoutes = _chunk2L5AG5Y5js.useRoutes; exports.useSearchParams = _chunkFGRCWJDIjs.useSearchParams; exports.useSubmit = _chunkFGRCWJDIjs.useSubmit; exports.useViewTransitionState = _chunkFGRCWJDIjs.useViewTransitionState;
|
|
2306
|
+
exports.Await = _chunkDRKUM6HWjs.Await; exports.BrowserRouter = _chunkYVVCGSEGjs.BrowserRouter; exports.Form = _chunkYVVCGSEGjs.Form; exports.HashRouter = _chunkYVVCGSEGjs.HashRouter; exports.IDLE_BLOCKER = _chunkDRKUM6HWjs.IDLE_BLOCKER; exports.IDLE_FETCHER = _chunkDRKUM6HWjs.IDLE_FETCHER; exports.IDLE_NAVIGATION = _chunkDRKUM6HWjs.IDLE_NAVIGATION; exports.Link = _chunkYVVCGSEGjs.Link; exports.Links = _chunkDRKUM6HWjs.Links; exports.MemoryRouter = _chunkDRKUM6HWjs.MemoryRouter; exports.Meta = _chunkDRKUM6HWjs.Meta; exports.NavLink = _chunkYVVCGSEGjs.NavLink; exports.Navigate = _chunkDRKUM6HWjs.Navigate; exports.NavigationType = _chunkDRKUM6HWjs.Action; exports.Outlet = _chunkDRKUM6HWjs.Outlet; exports.PrefetchPageLinks = _chunkDRKUM6HWjs.PrefetchPageLinks; exports.Route = _chunkDRKUM6HWjs.Route; exports.Router = _chunkDRKUM6HWjs.Router; exports.RouterContextProvider = _chunkDRKUM6HWjs.RouterContextProvider; exports.RouterProvider = _chunkDRKUM6HWjs.RouterProvider; exports.Routes = _chunkDRKUM6HWjs.Routes; exports.Scripts = _chunkDRKUM6HWjs.Scripts; exports.ScrollRestoration = _chunkYVVCGSEGjs.ScrollRestoration; exports.ServerRouter = ServerRouter; exports.StaticRouter = _chunkYVVCGSEGjs.StaticRouter; exports.StaticRouterProvider = _chunkYVVCGSEGjs.StaticRouterProvider; exports.UNSAFE_AwaitContextProvider = _chunkDRKUM6HWjs.AwaitContextProvider; exports.UNSAFE_DataRouterContext = _chunkDRKUM6HWjs.DataRouterContext; exports.UNSAFE_DataRouterStateContext = _chunkDRKUM6HWjs.DataRouterStateContext; exports.UNSAFE_ErrorResponseImpl = _chunkDRKUM6HWjs.ErrorResponseImpl; exports.UNSAFE_FetchersContext = _chunkDRKUM6HWjs.FetchersContext; exports.UNSAFE_FrameworkContext = _chunkDRKUM6HWjs.FrameworkContext; exports.UNSAFE_LocationContext = _chunkDRKUM6HWjs.LocationContext; exports.UNSAFE_NavigationContext = _chunkDRKUM6HWjs.NavigationContext; exports.UNSAFE_RSCDefaultRootErrorBoundary = _chunkUU3LJMU6js.RSCDefaultRootErrorBoundary; exports.UNSAFE_RemixErrorBoundary = _chunkDRKUM6HWjs.RemixErrorBoundary; exports.UNSAFE_RouteContext = _chunkDRKUM6HWjs.RouteContext; exports.UNSAFE_ServerMode = ServerMode; exports.UNSAFE_SingleFetchRedirectSymbol = _chunkDRKUM6HWjs.SingleFetchRedirectSymbol; exports.UNSAFE_ViewTransitionContext = _chunkDRKUM6HWjs.ViewTransitionContext; exports.UNSAFE_WithComponentProps = _chunkDRKUM6HWjs.WithComponentProps; exports.UNSAFE_WithErrorBoundaryProps = _chunkDRKUM6HWjs.WithErrorBoundaryProps; exports.UNSAFE_WithHydrateFallbackProps = _chunkDRKUM6HWjs.WithHydrateFallbackProps; exports.UNSAFE_createBrowserHistory = _chunkDRKUM6HWjs.createBrowserHistory; exports.UNSAFE_createClientRoutes = _chunkDRKUM6HWjs.createClientRoutes; exports.UNSAFE_createClientRoutesWithHMRRevalidationOptOut = _chunkDRKUM6HWjs.createClientRoutesWithHMRRevalidationOptOut; exports.UNSAFE_createRouter = _chunkDRKUM6HWjs.createRouter; exports.UNSAFE_decodeViaTurboStream = _chunkDRKUM6HWjs.decodeViaTurboStream; exports.UNSAFE_deserializeErrors = deserializeErrors; exports.UNSAFE_getHydrationData = _chunkUU3LJMU6js.getHydrationData; exports.UNSAFE_getPatchRoutesOnNavigationFunction = _chunkDRKUM6HWjs.getPatchRoutesOnNavigationFunction; exports.UNSAFE_getTurboStreamSingleFetchDataStrategy = _chunkDRKUM6HWjs.getTurboStreamSingleFetchDataStrategy; exports.UNSAFE_hydrationRouteProperties = _chunkDRKUM6HWjs.hydrationRouteProperties; exports.UNSAFE_invariant = _chunkDRKUM6HWjs.invariant; exports.UNSAFE_mapRouteProperties = _chunkDRKUM6HWjs.mapRouteProperties; exports.UNSAFE_shouldHydrateRouteLoader = _chunkDRKUM6HWjs.shouldHydrateRouteLoader; exports.UNSAFE_useFogOFWarDiscovery = _chunkDRKUM6HWjs.useFogOFWarDiscovery; exports.UNSAFE_useScrollRestoration = _chunkYVVCGSEGjs.useScrollRestoration; exports.UNSAFE_withComponentProps = _chunkDRKUM6HWjs.withComponentProps; exports.UNSAFE_withErrorBoundaryProps = _chunkDRKUM6HWjs.withErrorBoundaryProps; exports.UNSAFE_withHydrateFallbackProps = _chunkDRKUM6HWjs.withHydrateFallbackProps; exports.createBrowserRouter = _chunkYVVCGSEGjs.createBrowserRouter; exports.createContext = _chunkDRKUM6HWjs.createContext; exports.createCookie = createCookie; exports.createCookieSessionStorage = createCookieSessionStorage; exports.createHashRouter = _chunkYVVCGSEGjs.createHashRouter; exports.createMemoryRouter = _chunkDRKUM6HWjs.createMemoryRouter; exports.createMemorySessionStorage = createMemorySessionStorage; exports.createPath = _chunkDRKUM6HWjs.createPath; exports.createRequestHandler = createRequestHandler; exports.createRoutesFromChildren = _chunkDRKUM6HWjs.createRoutesFromChildren; exports.createRoutesFromElements = _chunkDRKUM6HWjs.createRoutesFromElements; exports.createRoutesStub = createRoutesStub; exports.createSearchParams = _chunkYVVCGSEGjs.createSearchParams; exports.createSession = createSession; exports.createSessionStorage = createSessionStorage; exports.createStaticHandler = _chunkYVVCGSEGjs.createStaticHandler; exports.createStaticRouter = _chunkYVVCGSEGjs.createStaticRouter; exports.data = _chunkDRKUM6HWjs.data; exports.generatePath = _chunkDRKUM6HWjs.generatePath; exports.href = href; exports.isCookie = isCookie; exports.isRouteErrorResponse = _chunkDRKUM6HWjs.isRouteErrorResponse; exports.isSession = isSession; exports.matchPath = _chunkDRKUM6HWjs.matchPath; exports.matchRoutes = _chunkDRKUM6HWjs.matchRoutes; exports.parsePath = _chunkDRKUM6HWjs.parsePath; exports.redirect = _chunkDRKUM6HWjs.redirect; exports.redirectDocument = _chunkDRKUM6HWjs.redirectDocument; exports.renderMatches = _chunkDRKUM6HWjs.renderMatches; exports.replace = _chunkDRKUM6HWjs.replace; exports.resolvePath = _chunkDRKUM6HWjs.resolvePath; exports.unstable_HistoryRouter = _chunkYVVCGSEGjs.HistoryRouter; exports.unstable_RSCStaticRouter = RSCStaticRouter; exports.unstable_routeRSCServerRequest = routeRSCServerRequest; exports.unstable_setDevServerHooks = setDevServerHooks; exports.unstable_usePrompt = _chunkYVVCGSEGjs.usePrompt; exports.unstable_useRoute = _chunkDRKUM6HWjs.useRoute; exports.useActionData = _chunkDRKUM6HWjs.useActionData; exports.useAsyncError = _chunkDRKUM6HWjs.useAsyncError; exports.useAsyncValue = _chunkDRKUM6HWjs.useAsyncValue; exports.useBeforeUnload = _chunkYVVCGSEGjs.useBeforeUnload; exports.useBlocker = _chunkDRKUM6HWjs.useBlocker; exports.useFetcher = _chunkYVVCGSEGjs.useFetcher; exports.useFetchers = _chunkYVVCGSEGjs.useFetchers; exports.useFormAction = _chunkYVVCGSEGjs.useFormAction; exports.useHref = _chunkDRKUM6HWjs.useHref; exports.useInRouterContext = _chunkDRKUM6HWjs.useInRouterContext; exports.useLinkClickHandler = _chunkYVVCGSEGjs.useLinkClickHandler; exports.useLoaderData = _chunkDRKUM6HWjs.useLoaderData; exports.useLocation = _chunkDRKUM6HWjs.useLocation; exports.useMatch = _chunkDRKUM6HWjs.useMatch; exports.useMatches = _chunkDRKUM6HWjs.useMatches; exports.useNavigate = _chunkDRKUM6HWjs.useNavigate; exports.useNavigation = _chunkDRKUM6HWjs.useNavigation; exports.useNavigationType = _chunkDRKUM6HWjs.useNavigationType; exports.useOutlet = _chunkDRKUM6HWjs.useOutlet; exports.useOutletContext = _chunkDRKUM6HWjs.useOutletContext; exports.useParams = _chunkDRKUM6HWjs.useParams; exports.useResolvedPath = _chunkDRKUM6HWjs.useResolvedPath; exports.useRevalidator = _chunkDRKUM6HWjs.useRevalidator; exports.useRouteError = _chunkDRKUM6HWjs.useRouteError; exports.useRouteLoaderData = _chunkDRKUM6HWjs.useRouteLoaderData; exports.useRoutes = _chunkDRKUM6HWjs.useRoutes; exports.useSearchParams = _chunkYVVCGSEGjs.useSearchParams; exports.useSubmit = _chunkYVVCGSEGjs.useSubmit; exports.useViewTransitionState = _chunkYVVCGSEGjs.useViewTransitionState;
|