react-router 7.9.5 → 7.9.6-pre.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +37 -10
  2. package/dist/development/{browser-DM83uryY.d.ts → browser-BbBXFHbO.d.ts} +1 -1
  3. package/dist/development/{browser-DfMfSvsC.d.mts → browser-C07r42Tt.d.mts} +1 -1
  4. package/dist/development/{chunk-VNR6V74N.js → chunk-CYHICRRW.js} +124 -52
  5. package/dist/development/{chunk-UIGDSWPH.mjs → chunk-DKSAHU2I.mjs} +95 -23
  6. package/dist/{production/chunk-ERPFE3MR.js → development/chunk-HSVNPM3C.js} +93 -93
  7. package/dist/{production/chunk-CWEARR4H.js → development/chunk-OLIKX45O.js} +7 -7
  8. package/dist/development/{chunk-JG3XND5A.mjs → chunk-RGKEVI2W.mjs} +2 -2
  9. package/dist/development/dom-export.d.mts +2 -2
  10. package/dist/development/dom-export.d.ts +2 -2
  11. package/dist/development/dom-export.js +26 -26
  12. package/dist/development/dom-export.mjs +3 -3
  13. package/dist/{production/index-react-server-client-BSxMvS7Z.d.ts → development/index-react-server-client-Da3kmxNd.d.ts} +1 -1
  14. package/dist/development/{index-react-server-client-B0vnxMMk.d.mts → index-react-server-client-rcoGPJhU.d.mts} +1 -1
  15. package/dist/development/index-react-server-client.d.mts +2 -2
  16. package/dist/development/index-react-server-client.d.ts +2 -2
  17. package/dist/development/index-react-server-client.js +4 -4
  18. package/dist/development/index-react-server-client.mjs +2 -2
  19. package/dist/development/index-react-server.js +25 -4
  20. package/dist/development/index-react-server.mjs +25 -4
  21. package/dist/development/index.d.mts +8 -8
  22. package/dist/development/index.d.ts +8 -8
  23. package/dist/development/index.js +76 -76
  24. package/dist/development/index.mjs +3 -3
  25. package/dist/{production/instrumentation-iAqbU5Q4.d.ts → development/instrumentation-Unc20tLk.d.ts} +5 -1
  26. package/dist/development/lib/types/internal.d.mts +2 -2
  27. package/dist/development/lib/types/internal.d.ts +2 -2
  28. package/dist/development/lib/types/internal.js +1 -1
  29. package/dist/development/lib/types/internal.mjs +1 -1
  30. package/dist/development/{register-c-dooqKE.d.ts → register-BpU9rFBJ.d.ts} +1 -1
  31. package/dist/development/{register-_G476ptB.d.mts → register-QkB3HGjm.d.mts} +1 -1
  32. package/dist/development/{router-DIAPGK5f.d.mts → router-CAvh_Drx.d.mts} +5 -1
  33. package/dist/production/{browser-DM83uryY.d.ts → browser-BbBXFHbO.d.ts} +1 -1
  34. package/dist/production/{browser-DfMfSvsC.d.mts → browser-C07r42Tt.d.mts} +1 -1
  35. package/dist/production/{chunk-EAE7427A.js → chunk-2DNJUQK6.js} +124 -52
  36. package/dist/{development/chunk-IXESJAGJ.js → production/chunk-EDK3MRM6.js} +93 -93
  37. package/dist/{development/chunk-FQEOJFGW.js → production/chunk-JLDESRHY.js} +7 -7
  38. package/dist/production/{chunk-TPBVZP6U.mjs → chunk-LC2OWLJG.mjs} +2 -2
  39. package/dist/production/{chunk-RZ6LZWMW.mjs → chunk-LESYMMDQ.mjs} +95 -23
  40. package/dist/production/dom-export.d.mts +2 -2
  41. package/dist/production/dom-export.d.ts +2 -2
  42. package/dist/production/dom-export.js +26 -26
  43. package/dist/production/dom-export.mjs +3 -3
  44. package/dist/{development/index-react-server-client-BSxMvS7Z.d.ts → production/index-react-server-client-Da3kmxNd.d.ts} +1 -1
  45. package/dist/production/{index-react-server-client-B0vnxMMk.d.mts → index-react-server-client-rcoGPJhU.d.mts} +1 -1
  46. package/dist/production/index-react-server-client.d.mts +2 -2
  47. package/dist/production/index-react-server-client.d.ts +2 -2
  48. package/dist/production/index-react-server-client.js +4 -4
  49. package/dist/production/index-react-server-client.mjs +2 -2
  50. package/dist/production/index-react-server.js +25 -4
  51. package/dist/production/index-react-server.mjs +25 -4
  52. package/dist/production/index.d.mts +8 -8
  53. package/dist/production/index.d.ts +8 -8
  54. package/dist/production/index.js +76 -76
  55. package/dist/production/index.mjs +3 -3
  56. package/dist/{development/instrumentation-iAqbU5Q4.d.ts → production/instrumentation-Unc20tLk.d.ts} +5 -1
  57. package/dist/production/lib/types/internal.d.mts +2 -2
  58. package/dist/production/lib/types/internal.d.ts +2 -2
  59. package/dist/production/lib/types/internal.js +1 -1
  60. package/dist/production/lib/types/internal.mjs +1 -1
  61. package/dist/production/{register-c-dooqKE.d.ts → register-BpU9rFBJ.d.ts} +1 -1
  62. package/dist/production/{register-_G476ptB.d.mts → register-QkB3HGjm.d.mts} +1 -1
  63. package/dist/production/{router-DIAPGK5f.d.mts → router-CAvh_Drx.d.mts} +5 -1
  64. 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 _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.9.5
2
+ * react-router v7.9.6-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -48,7 +48,7 @@
48
48
 
49
49
 
50
50
 
51
- var _chunkVNR6V74Njs = require('./chunk-VNR6V74N.js');
51
+ var _chunk2DNJUQK6js = require('./chunk-2DNJUQK6.js');
52
52
 
53
53
  // lib/dom/dom.ts
54
54
  var defaultMethod = "get";
@@ -119,7 +119,7 @@ var supportedFormEncTypes = /* @__PURE__ */ new Set([
119
119
  ]);
120
120
  function getFormEncType(encType) {
121
121
  if (encType != null && !supportedFormEncTypes.has(encType)) {
122
- _chunkVNR6V74Njs.warning.call(void 0,
122
+ _chunk2DNJUQK6js.warning.call(void 0,
123
123
  false,
124
124
  `"${encType}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${defaultEncType}"`
125
125
  );
@@ -135,7 +135,7 @@ function getFormSubmissionInfo(target, basename) {
135
135
  let body;
136
136
  if (isFormElement(target)) {
137
137
  let attr = target.getAttribute("action");
138
- action = attr ? _chunkVNR6V74Njs.stripBasename.call(void 0, attr, basename) : null;
138
+ action = attr ? _chunk2DNJUQK6js.stripBasename.call(void 0, attr, basename) : null;
139
139
  method = target.getAttribute("method") || defaultMethod;
140
140
  encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
141
141
  formData = new FormData(target);
@@ -147,7 +147,7 @@ function getFormSubmissionInfo(target, basename) {
147
147
  );
148
148
  }
149
149
  let attr = target.getAttribute("formaction") || form.getAttribute("action");
150
- action = attr ? _chunkVNR6V74Njs.stripBasename.call(void 0, attr, basename) : null;
150
+ action = attr ? _chunk2DNJUQK6js.stripBasename.call(void 0, attr, basename) : null;
151
151
  method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
152
152
  encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
153
153
  formData = new FormData(form, target);
@@ -184,20 +184,20 @@ var isBrowser = typeof window !== "undefined" && typeof window.document !== "und
184
184
  try {
185
185
  if (isBrowser) {
186
186
  window.__reactRouterVersion = // @ts-expect-error
187
- "7.9.5";
187
+ "7.9.6-pre.1";
188
188
  }
189
189
  } catch (e) {
190
190
  }
191
191
  function createBrowserRouter(routes, opts) {
192
- return _chunkVNR6V74Njs.createRouter.call(void 0, {
192
+ return _chunk2DNJUQK6js.createRouter.call(void 0, {
193
193
  basename: _optionalChain([opts, 'optionalAccess', _2 => _2.basename]),
194
194
  getContext: _optionalChain([opts, 'optionalAccess', _3 => _3.getContext]),
195
195
  future: _optionalChain([opts, 'optionalAccess', _4 => _4.future]),
196
- history: _chunkVNR6V74Njs.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
196
+ history: _chunk2DNJUQK6js.createBrowserHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _5 => _5.window]) }),
197
197
  hydrationData: _optionalChain([opts, 'optionalAccess', _6 => _6.hydrationData]) || parseHydrationData(),
198
198
  routes,
199
- mapRouteProperties: _chunkVNR6V74Njs.mapRouteProperties,
200
- hydrationRouteProperties: _chunkVNR6V74Njs.hydrationRouteProperties,
199
+ mapRouteProperties: _chunk2DNJUQK6js.mapRouteProperties,
200
+ hydrationRouteProperties: _chunk2DNJUQK6js.hydrationRouteProperties,
201
201
  dataStrategy: _optionalChain([opts, 'optionalAccess', _7 => _7.dataStrategy]),
202
202
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _8 => _8.patchRoutesOnNavigation]),
203
203
  window: _optionalChain([opts, 'optionalAccess', _9 => _9.window]),
@@ -205,15 +205,15 @@ function createBrowserRouter(routes, opts) {
205
205
  }).initialize();
206
206
  }
207
207
  function createHashRouter(routes, opts) {
208
- return _chunkVNR6V74Njs.createRouter.call(void 0, {
208
+ return _chunk2DNJUQK6js.createRouter.call(void 0, {
209
209
  basename: _optionalChain([opts, 'optionalAccess', _11 => _11.basename]),
210
210
  getContext: _optionalChain([opts, 'optionalAccess', _12 => _12.getContext]),
211
211
  future: _optionalChain([opts, 'optionalAccess', _13 => _13.future]),
212
- history: _chunkVNR6V74Njs.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
212
+ history: _chunk2DNJUQK6js.createHashHistory.call(void 0, { window: _optionalChain([opts, 'optionalAccess', _14 => _14.window]) }),
213
213
  hydrationData: _optionalChain([opts, 'optionalAccess', _15 => _15.hydrationData]) || parseHydrationData(),
214
214
  routes,
215
- mapRouteProperties: _chunkVNR6V74Njs.mapRouteProperties,
216
- hydrationRouteProperties: _chunkVNR6V74Njs.hydrationRouteProperties,
215
+ mapRouteProperties: _chunk2DNJUQK6js.mapRouteProperties,
216
+ hydrationRouteProperties: _chunk2DNJUQK6js.hydrationRouteProperties,
217
217
  dataStrategy: _optionalChain([opts, 'optionalAccess', _16 => _16.dataStrategy]),
218
218
  patchRoutesOnNavigation: _optionalChain([opts, 'optionalAccess', _17 => _17.patchRoutesOnNavigation]),
219
219
  window: _optionalChain([opts, 'optionalAccess', _18 => _18.window]),
@@ -236,7 +236,7 @@ function deserializeErrors(errors) {
236
236
  let serialized = {};
237
237
  for (let [key, val] of entries) {
238
238
  if (val && val.__type === "RouteErrorResponse") {
239
- serialized[key] = new (0, _chunkVNR6V74Njs.ErrorResponseImpl)(
239
+ serialized[key] = new (0, _chunk2DNJUQK6js.ErrorResponseImpl)(
240
240
  val.status,
241
241
  val.statusText,
242
242
  val.data,
@@ -272,7 +272,7 @@ function BrowserRouter({
272
272
  }) {
273
273
  let historyRef = React.useRef();
274
274
  if (historyRef.current == null) {
275
- historyRef.current = _chunkVNR6V74Njs.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
275
+ historyRef.current = _chunk2DNJUQK6js.createBrowserHistory.call(void 0, { window: window2, v5Compat: true });
276
276
  }
277
277
  let history = historyRef.current;
278
278
  let [state, setStateImpl] = React.useState({
@@ -287,7 +287,7 @@ function BrowserRouter({
287
287
  );
288
288
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
289
289
  return /* @__PURE__ */ React.createElement(
290
- _chunkVNR6V74Njs.Router,
290
+ _chunk2DNJUQK6js.Router,
291
291
  {
292
292
  basename,
293
293
  children,
@@ -300,7 +300,7 @@ function BrowserRouter({
300
300
  function HashRouter({ basename, children, window: window2 }) {
301
301
  let historyRef = React.useRef();
302
302
  if (historyRef.current == null) {
303
- historyRef.current = _chunkVNR6V74Njs.createHashHistory.call(void 0, { window: window2, v5Compat: true });
303
+ historyRef.current = _chunk2DNJUQK6js.createHashHistory.call(void 0, { window: window2, v5Compat: true });
304
304
  }
305
305
  let history = historyRef.current;
306
306
  let [state, setStateImpl] = React.useState({
@@ -315,7 +315,7 @@ function HashRouter({ basename, children, window: window2 }) {
315
315
  );
316
316
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
317
317
  return /* @__PURE__ */ React.createElement(
318
- _chunkVNR6V74Njs.Router,
318
+ _chunk2DNJUQK6js.Router,
319
319
  {
320
320
  basename,
321
321
  children,
@@ -342,7 +342,7 @@ function HistoryRouter({
342
342
  );
343
343
  React.useLayoutEffect(() => history.listen(setState), [history, setState]);
344
344
  return /* @__PURE__ */ React.createElement(
345
- _chunkVNR6V74Njs.Router,
345
+ _chunk2DNJUQK6js.Router,
346
346
  {
347
347
  basename,
348
348
  children,
@@ -369,7 +369,7 @@ var Link = React.forwardRef(
369
369
  viewTransition,
370
370
  ...rest
371
371
  }, forwardedRef) {
372
- let { basename } = React.useContext(_chunkVNR6V74Njs.NavigationContext);
372
+ let { basename } = React.useContext(_chunk2DNJUQK6js.NavigationContext);
373
373
  let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX.test(to);
374
374
  let absoluteHref;
375
375
  let isExternal = false;
@@ -379,22 +379,22 @@ var Link = React.forwardRef(
379
379
  try {
380
380
  let currentUrl = new URL(window.location.href);
381
381
  let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
382
- let path = _chunkVNR6V74Njs.stripBasename.call(void 0, targetUrl.pathname, basename);
382
+ let path = _chunk2DNJUQK6js.stripBasename.call(void 0, targetUrl.pathname, basename);
383
383
  if (targetUrl.origin === currentUrl.origin && path != null) {
384
384
  to = path + targetUrl.search + targetUrl.hash;
385
385
  } else {
386
386
  isExternal = true;
387
387
  }
388
388
  } catch (e) {
389
- _chunkVNR6V74Njs.warning.call(void 0,
389
+ _chunk2DNJUQK6js.warning.call(void 0,
390
390
  false,
391
391
  `<Link to="${to}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
392
392
  );
393
393
  }
394
394
  }
395
395
  }
396
- let href = _chunkVNR6V74Njs.useHref.call(void 0, to, { relative });
397
- let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunkVNR6V74Njs.usePrefetchBehavior.call(void 0,
396
+ let href = _chunk2DNJUQK6js.useHref.call(void 0, to, { relative });
397
+ let [shouldPrefetch, prefetchRef, prefetchHandlers] = _chunk2DNJUQK6js.usePrefetchBehavior.call(void 0,
398
398
  prefetch,
399
399
  rest
400
400
  );
@@ -421,13 +421,13 @@ var Link = React.forwardRef(
421
421
  ...prefetchHandlers,
422
422
  href: absoluteHref || href,
423
423
  onClick: isExternal || reloadDocument ? onClick : handleClick,
424
- ref: _chunkVNR6V74Njs.mergeRefs.call(void 0, forwardedRef, prefetchRef),
424
+ ref: _chunk2DNJUQK6js.mergeRefs.call(void 0, forwardedRef, prefetchRef),
425
425
  target,
426
426
  "data-discover": !isAbsolute && discover === "render" ? "true" : void 0
427
427
  }
428
428
  )
429
429
  );
430
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunkVNR6V74Njs.PrefetchPageLinks, { page: href })) : link;
430
+ return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React.createElement(React.Fragment, null, link, /* @__PURE__ */ React.createElement(_chunk2DNJUQK6js.PrefetchPageLinks, { page: href })) : link;
431
431
  }
432
432
  );
433
433
  Link.displayName = "Link";
@@ -443,10 +443,10 @@ var NavLink = React.forwardRef(
443
443
  children,
444
444
  ...rest
445
445
  }, ref) {
446
- let path = _chunkVNR6V74Njs.useResolvedPath.call(void 0, to, { relative: rest.relative });
447
- let location = _chunkVNR6V74Njs.useLocation.call(void 0, );
448
- let routerState = React.useContext(_chunkVNR6V74Njs.DataRouterStateContext);
449
- let { navigator, basename } = React.useContext(_chunkVNR6V74Njs.NavigationContext);
446
+ let path = _chunk2DNJUQK6js.useResolvedPath.call(void 0, to, { relative: rest.relative });
447
+ let location = _chunk2DNJUQK6js.useLocation.call(void 0, );
448
+ let routerState = React.useContext(_chunk2DNJUQK6js.DataRouterStateContext);
449
+ let { navigator, basename } = React.useContext(_chunk2DNJUQK6js.NavigationContext);
450
450
  let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
451
451
  // eslint-disable-next-line react-hooks/rules-of-hooks
452
452
  useViewTransitionState(path) && viewTransition === true;
@@ -459,7 +459,7 @@ var NavLink = React.forwardRef(
459
459
  toPathname = toPathname.toLowerCase();
460
460
  }
461
461
  if (nextLocationPathname && basename) {
462
- nextLocationPathname = _chunkVNR6V74Njs.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
462
+ nextLocationPathname = _chunk2DNJUQK6js.stripBasename.call(void 0, nextLocationPathname, basename) || nextLocationPathname;
463
463
  }
464
464
  const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
465
465
  let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
@@ -554,10 +554,10 @@ function ScrollRestoration({
554
554
  storageKey,
555
555
  ...props
556
556
  }) {
557
- let remixContext = React.useContext(_chunkVNR6V74Njs.FrameworkContext);
558
- let { basename } = React.useContext(_chunkVNR6V74Njs.NavigationContext);
559
- let location = _chunkVNR6V74Njs.useLocation.call(void 0, );
560
- let matches = _chunkVNR6V74Njs.useMatches.call(void 0, );
557
+ let remixContext = React.useContext(_chunk2DNJUQK6js.FrameworkContext);
558
+ let { basename } = React.useContext(_chunk2DNJUQK6js.NavigationContext);
559
+ let location = _chunk2DNJUQK6js.useLocation.call(void 0, );
560
+ let matches = _chunk2DNJUQK6js.useMatches.call(void 0, );
561
561
  useScrollRestoration({ getKey, storageKey });
562
562
  let ssrKey = React.useMemo(
563
563
  () => {
@@ -611,13 +611,13 @@ function getDataRouterConsoleError(hookName) {
611
611
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
612
612
  }
613
613
  function useDataRouterContext(hookName) {
614
- let ctx = React.useContext(_chunkVNR6V74Njs.DataRouterContext);
615
- _chunkVNR6V74Njs.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
614
+ let ctx = React.useContext(_chunk2DNJUQK6js.DataRouterContext);
615
+ _chunk2DNJUQK6js.invariant.call(void 0, ctx, getDataRouterConsoleError(hookName));
616
616
  return ctx;
617
617
  }
618
618
  function useDataRouterState(hookName) {
619
- let state = React.useContext(_chunkVNR6V74Njs.DataRouterStateContext);
620
- _chunkVNR6V74Njs.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
619
+ let state = React.useContext(_chunk2DNJUQK6js.DataRouterStateContext);
620
+ _chunk2DNJUQK6js.invariant.call(void 0, state, getDataRouterConsoleError(hookName));
621
621
  return state;
622
622
  }
623
623
  function useLinkClickHandler(to, {
@@ -628,14 +628,14 @@ function useLinkClickHandler(to, {
628
628
  relative,
629
629
  viewTransition
630
630
  } = {}) {
631
- let navigate = _chunkVNR6V74Njs.useNavigate.call(void 0, );
632
- let location = _chunkVNR6V74Njs.useLocation.call(void 0, );
633
- let path = _chunkVNR6V74Njs.useResolvedPath.call(void 0, to, { relative });
631
+ let navigate = _chunk2DNJUQK6js.useNavigate.call(void 0, );
632
+ let location = _chunk2DNJUQK6js.useLocation.call(void 0, );
633
+ let path = _chunk2DNJUQK6js.useResolvedPath.call(void 0, to, { relative });
634
634
  return React.useCallback(
635
635
  (event) => {
636
636
  if (shouldProcessLinkClick(event, target)) {
637
637
  event.preventDefault();
638
- let replace = replaceProp !== void 0 ? replaceProp : _chunkVNR6V74Njs.createPath.call(void 0, location) === _chunkVNR6V74Njs.createPath.call(void 0, path);
638
+ let replace = replaceProp !== void 0 ? replaceProp : _chunk2DNJUQK6js.createPath.call(void 0, location) === _chunk2DNJUQK6js.createPath.call(void 0, path);
639
639
  navigate(to, {
640
640
  replace,
641
641
  state,
@@ -660,13 +660,13 @@ function useLinkClickHandler(to, {
660
660
  );
661
661
  }
662
662
  function useSearchParams(defaultInit) {
663
- _chunkVNR6V74Njs.warning.call(void 0,
663
+ _chunk2DNJUQK6js.warning.call(void 0,
664
664
  typeof URLSearchParams !== "undefined",
665
665
  `You cannot use the \`useSearchParams\` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.`
666
666
  );
667
667
  let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
668
668
  let hasSetSearchParamsRef = React.useRef(false);
669
- let location = _chunkVNR6V74Njs.useLocation.call(void 0, );
669
+ let location = _chunk2DNJUQK6js.useLocation.call(void 0, );
670
670
  let searchParams = React.useMemo(
671
671
  () => (
672
672
  // Only merge in the defaults if we haven't yet called setSearchParams.
@@ -679,7 +679,7 @@ function useSearchParams(defaultInit) {
679
679
  ),
680
680
  [location.search]
681
681
  );
682
- let navigate = _chunkVNR6V74Njs.useNavigate.call(void 0, );
682
+ let navigate = _chunk2DNJUQK6js.useNavigate.call(void 0, );
683
683
  let setSearchParams = React.useCallback(
684
684
  (nextInit, navigateOptions) => {
685
685
  const newSearchParams = createSearchParams(
@@ -696,8 +696,8 @@ var fetcherId = 0;
696
696
  var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
697
697
  function useSubmit() {
698
698
  let { router } = useDataRouterContext("useSubmit" /* UseSubmit */);
699
- let { basename } = React.useContext(_chunkVNR6V74Njs.NavigationContext);
700
- let currentRouteId = _chunkVNR6V74Njs.useRouteId.call(void 0, );
699
+ let { basename } = React.useContext(_chunk2DNJUQK6js.NavigationContext);
700
+ let currentRouteId = _chunk2DNJUQK6js.useRouteId.call(void 0, );
701
701
  return React.useCallback(
702
702
  async (target, options = {}) => {
703
703
  let { action, method, encType, formData, body } = getFormSubmissionInfo(
@@ -733,12 +733,12 @@ function useSubmit() {
733
733
  );
734
734
  }
735
735
  function useFormAction(action, { relative } = {}) {
736
- let { basename } = React.useContext(_chunkVNR6V74Njs.NavigationContext);
737
- let routeContext = React.useContext(_chunkVNR6V74Njs.RouteContext);
738
- _chunkVNR6V74Njs.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
736
+ let { basename } = React.useContext(_chunk2DNJUQK6js.NavigationContext);
737
+ let routeContext = React.useContext(_chunk2DNJUQK6js.RouteContext);
738
+ _chunk2DNJUQK6js.invariant.call(void 0, routeContext, "useFormAction must be used inside a RouteContext");
739
739
  let [match] = routeContext.matches.slice(-1);
740
- let path = { ..._chunkVNR6V74Njs.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
741
- let location = _chunkVNR6V74Njs.useLocation.call(void 0, );
740
+ let path = { ..._chunk2DNJUQK6js.useResolvedPath.call(void 0, action ? action : ".", { relative }) };
741
+ let location = _chunk2DNJUQK6js.useLocation.call(void 0, );
742
742
  if (action == null) {
743
743
  path.search = location.search;
744
744
  let params = new URLSearchParams(path.search);
@@ -755,21 +755,21 @@ function useFormAction(action, { relative } = {}) {
755
755
  path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
756
756
  }
757
757
  if (basename !== "/") {
758
- path.pathname = path.pathname === "/" ? basename : _chunkVNR6V74Njs.joinPaths.call(void 0, [basename, path.pathname]);
758
+ path.pathname = path.pathname === "/" ? basename : _chunk2DNJUQK6js.joinPaths.call(void 0, [basename, path.pathname]);
759
759
  }
760
- return _chunkVNR6V74Njs.createPath.call(void 0, path);
760
+ return _chunk2DNJUQK6js.createPath.call(void 0, path);
761
761
  }
762
762
  function useFetcher({
763
763
  key
764
764
  } = {}) {
765
765
  let { router } = useDataRouterContext("useFetcher" /* UseFetcher */);
766
766
  let state = useDataRouterState("useFetcher" /* UseFetcher */);
767
- let fetcherData = React.useContext(_chunkVNR6V74Njs.FetchersContext);
768
- let route = React.useContext(_chunkVNR6V74Njs.RouteContext);
767
+ let fetcherData = React.useContext(_chunk2DNJUQK6js.FetchersContext);
768
+ let route = React.useContext(_chunk2DNJUQK6js.RouteContext);
769
769
  let routeId = _optionalChain([route, 'access', _23 => _23.matches, 'access', _24 => _24[route.matches.length - 1], 'optionalAccess', _25 => _25.route, 'access', _26 => _26.id]);
770
- _chunkVNR6V74Njs.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
771
- _chunkVNR6V74Njs.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
772
- _chunkVNR6V74Njs.invariant.call(void 0,
770
+ _chunk2DNJUQK6js.invariant.call(void 0, fetcherData, `useFetcher must be used inside a FetchersContext`);
771
+ _chunk2DNJUQK6js.invariant.call(void 0, route, `useFetcher must be used inside a RouteContext`);
772
+ _chunk2DNJUQK6js.invariant.call(void 0,
773
773
  routeId != null,
774
774
  `useFetcher can only be used on routes that contain a unique "id"`
775
775
  );
@@ -784,7 +784,7 @@ function useFetcher({
784
784
  }, [router, fetcherKey]);
785
785
  let load = React.useCallback(
786
786
  async (href, opts) => {
787
- _chunkVNR6V74Njs.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
787
+ _chunk2DNJUQK6js.invariant.call(void 0, routeId, "No routeId available for fetcher.load()");
788
788
  await router.fetch(fetcherKey, routeId, href, opts);
789
789
  },
790
790
  [fetcherKey, routeId, router]
@@ -810,7 +810,7 @@ function useFetcher({
810
810
  FetcherForm2.displayName = "fetcher.Form";
811
811
  return FetcherForm2;
812
812
  }, [fetcherKey]);
813
- let fetcher = state.fetchers.get(fetcherKey) || _chunkVNR6V74Njs.IDLE_FETCHER;
813
+ let fetcher = state.fetchers.get(fetcherKey) || _chunk2DNJUQK6js.IDLE_FETCHER;
814
814
  let data = fetcherData.get(fetcherKey);
815
815
  let fetcherWithComponents = React.useMemo(
816
816
  () => ({
@@ -841,7 +841,7 @@ function getScrollRestorationKey(location, matches, basename, getKey) {
841
841
  key = getKey(
842
842
  {
843
843
  ...location,
844
- pathname: _chunkVNR6V74Njs.stripBasename.call(void 0, location.pathname, basename) || location.pathname
844
+ pathname: _chunk2DNJUQK6js.stripBasename.call(void 0, location.pathname, basename) || location.pathname
845
845
  },
846
846
  matches
847
847
  );
@@ -862,10 +862,10 @@ function useScrollRestoration({
862
862
  let { restoreScrollPosition, preventScrollReset } = useDataRouterState(
863
863
  "useScrollRestoration" /* UseScrollRestoration */
864
864
  );
865
- let { basename } = React.useContext(_chunkVNR6V74Njs.NavigationContext);
866
- let location = _chunkVNR6V74Njs.useLocation.call(void 0, );
867
- let matches = _chunkVNR6V74Njs.useMatches.call(void 0, );
868
- let navigation = _chunkVNR6V74Njs.useNavigation.call(void 0, );
865
+ let { basename } = React.useContext(_chunk2DNJUQK6js.NavigationContext);
866
+ let location = _chunk2DNJUQK6js.useLocation.call(void 0, );
867
+ let matches = _chunk2DNJUQK6js.useMatches.call(void 0, );
868
+ let navigation = _chunk2DNJUQK6js.useNavigation.call(void 0, );
869
869
  React.useEffect(() => {
870
870
  window.history.scrollRestoration = "manual";
871
871
  return () => {
@@ -884,7 +884,7 @@ function useScrollRestoration({
884
884
  JSON.stringify(savedScrollPositions)
885
885
  );
886
886
  } catch (error) {
887
- _chunkVNR6V74Njs.warning.call(void 0,
887
+ _chunk2DNJUQK6js.warning.call(void 0,
888
888
  false,
889
889
  `Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${error}).`
890
890
  );
@@ -931,7 +931,7 @@ function useScrollRestoration({
931
931
  }
932
932
  }
933
933
  } catch (e2) {
934
- _chunkVNR6V74Njs.warning.call(void 0,
934
+ _chunk2DNJUQK6js.warning.call(void 0,
935
935
  false,
936
936
  `"${location.hash.slice(
937
937
  1
@@ -969,7 +969,7 @@ function usePrompt({
969
969
  when,
970
970
  message
971
971
  }) {
972
- let blocker = _chunkVNR6V74Njs.useBlocker.call(void 0, when);
972
+ let blocker = _chunk2DNJUQK6js.useBlocker.call(void 0, when);
973
973
  React.useEffect(() => {
974
974
  if (blocker.state === "blocked") {
975
975
  let proceed = window.confirm(message);
@@ -987,21 +987,21 @@ function usePrompt({
987
987
  }, [blocker, when]);
988
988
  }
989
989
  function useViewTransitionState(to, { relative } = {}) {
990
- let vtContext = React.useContext(_chunkVNR6V74Njs.ViewTransitionContext);
991
- _chunkVNR6V74Njs.invariant.call(void 0,
990
+ let vtContext = React.useContext(_chunk2DNJUQK6js.ViewTransitionContext);
991
+ _chunk2DNJUQK6js.invariant.call(void 0,
992
992
  vtContext != null,
993
993
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
994
994
  );
995
995
  let { basename } = useDataRouterContext(
996
996
  "useViewTransitionState" /* useViewTransitionState */
997
997
  );
998
- let path = _chunkVNR6V74Njs.useResolvedPath.call(void 0, to, { relative });
998
+ let path = _chunk2DNJUQK6js.useResolvedPath.call(void 0, to, { relative });
999
999
  if (!vtContext.isTransitioning) {
1000
1000
  return false;
1001
1001
  }
1002
- let currentPath = _chunkVNR6V74Njs.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1003
- let nextPath = _chunkVNR6V74Njs.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1004
- return _chunkVNR6V74Njs.matchPath.call(void 0, path.pathname, nextPath) != null || _chunkVNR6V74Njs.matchPath.call(void 0, path.pathname, currentPath) != null;
1002
+ let currentPath = _chunk2DNJUQK6js.stripBasename.call(void 0, vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
1003
+ let nextPath = _chunk2DNJUQK6js.stripBasename.call(void 0, vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
1004
+ return _chunk2DNJUQK6js.matchPath.call(void 0, path.pathname, nextPath) != null || _chunk2DNJUQK6js.matchPath.call(void 0, path.pathname, currentPath) != null;
1005
1005
  }
1006
1006
 
1007
1007
  // lib/dom/server.tsx
@@ -1012,7 +1012,7 @@ function StaticRouter({
1012
1012
  location: locationProp = "/"
1013
1013
  }) {
1014
1014
  if (typeof locationProp === "string") {
1015
- locationProp = _chunkVNR6V74Njs.parsePath.call(void 0, locationProp);
1015
+ locationProp = _chunk2DNJUQK6js.parsePath.call(void 0, locationProp);
1016
1016
  }
1017
1017
  let action = "POP" /* Pop */;
1018
1018
  let location = {
@@ -1024,7 +1024,7 @@ function StaticRouter({
1024
1024
  };
1025
1025
  let staticNavigator = getStatelessNavigator();
1026
1026
  return /* @__PURE__ */ React2.createElement(
1027
- _chunkVNR6V74Njs.Router,
1027
+ _chunk2DNJUQK6js.Router,
1028
1028
  {
1029
1029
  basename,
1030
1030
  children,
@@ -1041,7 +1041,7 @@ function StaticRouterProvider({
1041
1041
  hydrate = true,
1042
1042
  nonce
1043
1043
  }) {
1044
- _chunkVNR6V74Njs.invariant.call(void 0,
1044
+ _chunk2DNJUQK6js.invariant.call(void 0,
1045
1045
  router && context,
1046
1046
  "You must provide `router` and `context` to <StaticRouterProvider>"
1047
1047
  );
@@ -1064,8 +1064,8 @@ function StaticRouterProvider({
1064
1064
  hydrateScript = `window.__staticRouterHydrationData = JSON.parse(${json});`;
1065
1065
  }
1066
1066
  let { state } = dataRouterContext.router;
1067
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunkVNR6V74Njs.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunkVNR6V74Njs.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunkVNR6V74Njs.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunkVNR6V74Njs.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1068
- _chunkVNR6V74Njs.Router,
1067
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(_chunk2DNJUQK6js.DataRouterContext.Provider, { value: dataRouterContext }, /* @__PURE__ */ React2.createElement(_chunk2DNJUQK6js.DataRouterStateContext.Provider, { value: state }, /* @__PURE__ */ React2.createElement(_chunk2DNJUQK6js.FetchersContext.Provider, { value: fetchersContext }, /* @__PURE__ */ React2.createElement(_chunk2DNJUQK6js.ViewTransitionContext.Provider, { value: { isTransitioning: false } }, /* @__PURE__ */ React2.createElement(
1068
+ _chunk2DNJUQK6js.Router,
1069
1069
  {
1070
1070
  basename: dataRouterContext.basename,
1071
1071
  location: state.location,
@@ -1095,14 +1095,14 @@ function DataRoutes({
1095
1095
  future,
1096
1096
  state
1097
1097
  }) {
1098
- return _chunkVNR6V74Njs.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1098
+ return _chunk2DNJUQK6js.useRoutesImpl.call(void 0, routes, void 0, state, void 0, future);
1099
1099
  }
1100
1100
  function serializeErrors(errors) {
1101
1101
  if (!errors) return null;
1102
1102
  let entries = Object.entries(errors);
1103
1103
  let serialized = {};
1104
1104
  for (let [key, val] of entries) {
1105
- if (_chunkVNR6V74Njs.isRouteErrorResponse.call(void 0, val)) {
1105
+ if (_chunk2DNJUQK6js.isRouteErrorResponse.call(void 0, val)) {
1106
1106
  serialized[key] = { ...val, __type: "RouteErrorResponse" };
1107
1107
  } else if (val instanceof Error) {
1108
1108
  serialized[key] = {
@@ -1152,16 +1152,16 @@ function getStatelessNavigator() {
1152
1152
  };
1153
1153
  }
1154
1154
  function createStaticHandler2(routes, opts) {
1155
- return _chunkVNR6V74Njs.createStaticHandler.call(void 0, routes, {
1155
+ return _chunk2DNJUQK6js.createStaticHandler.call(void 0, routes, {
1156
1156
  ...opts,
1157
- mapRouteProperties: _chunkVNR6V74Njs.mapRouteProperties
1157
+ mapRouteProperties: _chunk2DNJUQK6js.mapRouteProperties
1158
1158
  });
1159
1159
  }
1160
1160
  function createStaticRouter(routes, context, opts = {}) {
1161
1161
  let manifest = {};
1162
- let dataRoutes = _chunkVNR6V74Njs.convertRoutesToDataRoutes.call(void 0,
1162
+ let dataRoutes = _chunk2DNJUQK6js.convertRoutesToDataRoutes.call(void 0,
1163
1163
  routes,
1164
- _chunkVNR6V74Njs.mapRouteProperties,
1164
+ _chunk2DNJUQK6js.mapRouteProperties,
1165
1165
  void 0,
1166
1166
  manifest
1167
1167
  );
@@ -1192,7 +1192,7 @@ function createStaticRouter(routes, context, opts = {}) {
1192
1192
  actionData: context.actionData,
1193
1193
  errors: context.errors,
1194
1194
  initialized: true,
1195
- navigation: _chunkVNR6V74Njs.IDLE_NAVIGATION,
1195
+ navigation: _chunk2DNJUQK6js.IDLE_NAVIGATION,
1196
1196
  restoreScrollPosition: null,
1197
1197
  preventScrollReset: false,
1198
1198
  revalidation: "idle",
@@ -1227,7 +1227,7 @@ function createStaticRouter(routes, context, opts = {}) {
1227
1227
  createHref,
1228
1228
  encodeLocation,
1229
1229
  getFetcher() {
1230
- return _chunkVNR6V74Njs.IDLE_FETCHER;
1230
+ return _chunk2DNJUQK6js.IDLE_FETCHER;
1231
1231
  },
1232
1232
  deleteFetcher() {
1233
1233
  throw msg("deleteFetcher");
@@ -1239,7 +1239,7 @@ function createStaticRouter(routes, context, opts = {}) {
1239
1239
  throw msg("dispose");
1240
1240
  },
1241
1241
  getBlocker() {
1242
- return _chunkVNR6V74Njs.IDLE_BLOCKER;
1242
+ return _chunk2DNJUQK6js.IDLE_BLOCKER;
1243
1243
  },
1244
1244
  deleteBlocker() {
1245
1245
  throw msg("deleteBlocker");
@@ -1257,10 +1257,10 @@ function createStaticRouter(routes, context, opts = {}) {
1257
1257
  };
1258
1258
  }
1259
1259
  function createHref(to) {
1260
- return typeof to === "string" ? to : _chunkVNR6V74Njs.createPath.call(void 0, to);
1260
+ return typeof to === "string" ? to : _chunk2DNJUQK6js.createPath.call(void 0, to);
1261
1261
  }
1262
1262
  function encodeLocation(to) {
1263
- let href = typeof to === "string" ? to : _chunkVNR6V74Njs.createPath.call(void 0, to);
1263
+ let href = typeof to === "string" ? to : _chunk2DNJUQK6js.createPath.call(void 0, to);
1264
1264
  href = href.replace(/ $/, "%20");
1265
1265
  let encoded = ABSOLUTE_URL_REGEX2.test(href) ? new URL(href) : new URL(href, "http://localhost");
1266
1266
  return {
@@ -1,5 +1,5 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }/**
2
- * react-router v7.9.5
2
+ * react-router v7.9.6-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -14,7 +14,7 @@
14
14
 
15
15
 
16
16
 
17
- var _chunkVNR6V74Njs = require('./chunk-VNR6V74N.js');
17
+ var _chunk2DNJUQK6js = require('./chunk-2DNJUQK6.js');
18
18
 
19
19
  // lib/dom/ssr/hydration.tsx
20
20
  function getHydrationData({
@@ -29,12 +29,12 @@ function getHydrationData({
29
29
  ...state,
30
30
  loaderData: { ...state.loaderData }
31
31
  };
32
- let initialMatches = _chunkVNR6V74Njs.matchRoutes.call(void 0, routes, location, basename);
32
+ let initialMatches = _chunk2DNJUQK6js.matchRoutes.call(void 0, routes, location, basename);
33
33
  if (initialMatches) {
34
34
  for (let match of initialMatches) {
35
35
  let routeId = match.route.id;
36
36
  let routeInfo = getRouteInfo(routeId);
37
- if (_chunkVNR6V74Njs.shouldHydrateRouteLoader.call(void 0,
37
+ if (_chunk2DNJUQK6js.shouldHydrateRouteLoader.call(void 0,
38
38
  routeId,
39
39
  routeInfo.clientLoader,
40
40
  routeInfo.hasLoader,
@@ -112,7 +112,7 @@ function RSCDefaultRootErrorBoundaryImpl({
112
112
  }
113
113
  }
114
114
  );
115
- if (_chunkVNR6V74Njs.isRouteErrorResponse.call(void 0, error)) {
115
+ if (_chunk2DNJUQK6js.isRouteErrorResponse.call(void 0, error)) {
116
116
  return /* @__PURE__ */ _react2.default.createElement(
117
117
  ErrorWrapper,
118
118
  {
@@ -120,7 +120,7 @@ function RSCDefaultRootErrorBoundaryImpl({
120
120
  title: "Unhandled Thrown Response!"
121
121
  },
122
122
  /* @__PURE__ */ _react2.default.createElement("h1", { style: { fontSize: "24px" } }, error.status, " ", error.statusText),
123
- _chunkVNR6V74Njs.ENABLE_DEV_WARNINGS ? heyDeveloper : null
123
+ _chunk2DNJUQK6js.ENABLE_DEV_WARNINGS ? heyDeveloper : null
124
124
  );
125
125
  }
126
126
  let errorInstance;
@@ -146,7 +146,7 @@ function RSCDefaultRootErrorBoundaryImpl({
146
146
  function RSCDefaultRootErrorBoundary({
147
147
  hasRootLayout
148
148
  }) {
149
- let error = _chunkVNR6V74Njs.useRouteError.call(void 0, );
149
+ let error = _chunk2DNJUQK6js.useRouteError.call(void 0, );
150
150
  if (hasRootLayout === void 0) {
151
151
  throw new Error("Missing 'hasRootLayout' prop");
152
152
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * react-router v7.9.5
2
+ * react-router v7.9.6-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -49,7 +49,7 @@ import {
49
49
  withComponentProps,
50
50
  withErrorBoundaryProps,
51
51
  withHydrateFallbackProps
52
- } from "./chunk-RZ6LZWMW.mjs";
52
+ } from "./chunk-LESYMMDQ.mjs";
53
53
 
54
54
  // lib/dom/ssr/server.tsx
55
55
  import * as React from "react";