@tanstack/react-router
Advanced tools
Comparing version 0.0.1-beta.174 to 0.0.1-beta.175
@@ -10,15 +10,28 @@ { | ||
{ | ||
"name": "packages", | ||
"name": "node_modules/.pnpm", | ||
"children": [ | ||
{ | ||
"name": "store/build/esm/index.js", | ||
"uid": "e1d4-181" | ||
"name": "@tanstack+store@0.0.1/node_modules/@tanstack/store/build/esm/index.js", | ||
"uid": "5c7c-159" | ||
}, | ||
{ | ||
"name": "react-store/build/esm/index.js", | ||
"uid": "e1d4-183" | ||
"name": "@tanstack+react-store@0.0.1/node_modules/@tanstack/react-store/build/esm/index.js", | ||
"uid": "5c7c-161" | ||
}, | ||
{ | ||
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"uid": "5c7c-163" | ||
}, | ||
{ | ||
"name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"uid": "5c7c-165" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "packages", | ||
"children": [ | ||
{ | ||
"name": "router-core/build/esm/index.js", | ||
"uid": "e1d4-189" | ||
"uid": "5c7c-167" | ||
}, | ||
@@ -29,15 +42,15 @@ { | ||
{ | ||
"uid": "e1d4-193", | ||
"uid": "5c7c-171", | ||
"name": "react.tsx" | ||
}, | ||
{ | ||
"uid": "e1d4-195", | ||
"uid": "5c7c-173", | ||
"name": "scroll-restoration.tsx" | ||
}, | ||
{ | ||
"uid": "e1d4-197", | ||
"uid": "5c7c-175", | ||
"name": "awaited.tsx" | ||
}, | ||
{ | ||
"uid": "e1d4-199", | ||
"uid": "5c7c-177", | ||
"name": "index.tsx" | ||
@@ -50,16 +63,3 @@ } | ||
{ | ||
"name": "node_modules/.pnpm", | ||
"children": [ | ||
{ | ||
"name": "tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"uid": "e1d4-185" | ||
}, | ||
{ | ||
"name": "tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"uid": "e1d4-187" | ||
} | ||
] | ||
}, | ||
{ | ||
"uid": "e1d4-191", | ||
"uid": "5c7c-169", | ||
"name": "\u0000rollupPluginBabelHelpers.js" | ||
@@ -73,68 +73,68 @@ } | ||
"nodeParts": { | ||
"e1d4-181": { | ||
"5c7c-159": { | ||
"renderedLength": 1843, | ||
"gzipLength": 644, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-180" | ||
"mainUid": "5c7c-158" | ||
}, | ||
"e1d4-183": { | ||
"5c7c-161": { | ||
"renderedLength": 1006, | ||
"gzipLength": 479, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-182" | ||
"mainUid": "5c7c-160" | ||
}, | ||
"e1d4-185": { | ||
"5c7c-163": { | ||
"renderedLength": 181, | ||
"gzipLength": 129, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-184" | ||
"mainUid": "5c7c-162" | ||
}, | ||
"e1d4-187": { | ||
"5c7c-165": { | ||
"renderedLength": 44, | ||
"gzipLength": 62, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-186" | ||
"mainUid": "5c7c-164" | ||
}, | ||
"e1d4-189": { | ||
"renderedLength": 63089, | ||
"gzipLength": 14904, | ||
"5c7c-167": { | ||
"renderedLength": 64480, | ||
"gzipLength": 15231, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-188" | ||
"mainUid": "5c7c-166" | ||
}, | ||
"e1d4-191": { | ||
"5c7c-169": { | ||
"renderedLength": 429, | ||
"gzipLength": 238, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-190" | ||
"mainUid": "5c7c-168" | ||
}, | ||
"e1d4-193": { | ||
"5c7c-171": { | ||
"renderedLength": 17226, | ||
"gzipLength": 3829, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-192" | ||
"mainUid": "5c7c-170" | ||
}, | ||
"e1d4-195": { | ||
"5c7c-173": { | ||
"renderedLength": 466, | ||
"gzipLength": 228, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-194" | ||
"mainUid": "5c7c-172" | ||
}, | ||
"e1d4-197": { | ||
"5c7c-175": { | ||
"renderedLength": 641, | ||
"gzipLength": 305, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-196" | ||
"mainUid": "5c7c-174" | ||
}, | ||
"e1d4-199": { | ||
"5c7c-177": { | ||
"renderedLength": 0, | ||
"gzipLength": 0, | ||
"brotliLength": 0, | ||
"mainUid": "e1d4-198" | ||
"mainUid": "5c7c-176" | ||
} | ||
}, | ||
"nodeMetas": { | ||
"e1d4-180": { | ||
"id": "/packages/store/build/esm/index.js", | ||
"5c7c-158": { | ||
"id": "/node_modules/.pnpm/@tanstack+store@0.0.1/node_modules/@tanstack/store/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-181" | ||
"index.production.js": "5c7c-159" | ||
}, | ||
@@ -144,17 +144,20 @@ "imported": [], | ||
{ | ||
"uid": "e1d4-182" | ||
"uid": "5c7c-160" | ||
}, | ||
{ | ||
"uid": "5c7c-166" | ||
} | ||
] | ||
}, | ||
"e1d4-182": { | ||
"id": "/packages/react-store/build/esm/index.js", | ||
"5c7c-160": { | ||
"id": "/node_modules/.pnpm/@tanstack+react-store@0.0.1/node_modules/@tanstack/react-store/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-183" | ||
"index.production.js": "5c7c-161" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e1d4-200" | ||
"uid": "5c7c-178" | ||
}, | ||
{ | ||
"uid": "e1d4-180" | ||
"uid": "5c7c-158" | ||
} | ||
@@ -164,16 +167,13 @@ ], | ||
{ | ||
"uid": "e1d4-198" | ||
"uid": "5c7c-176" | ||
}, | ||
{ | ||
"uid": "e1d4-188" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
} | ||
] | ||
}, | ||
"e1d4-184": { | ||
"5c7c-162": { | ||
"id": "/node_modules/.pnpm/tiny-invariant@1.3.1/node_modules/tiny-invariant/dist/esm/tiny-invariant.js", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-185" | ||
"index.production.js": "5c7c-163" | ||
}, | ||
@@ -183,13 +183,13 @@ "imported": [], | ||
{ | ||
"uid": "e1d4-188" | ||
"uid": "5c7c-166" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
} | ||
] | ||
}, | ||
"e1d4-186": { | ||
"5c7c-164": { | ||
"id": "/node_modules/.pnpm/tiny-warning@1.0.3/node_modules/tiny-warning/dist/tiny-warning.esm.js", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-187" | ||
"index.production.js": "5c7c-165" | ||
}, | ||
@@ -199,23 +199,23 @@ "imported": [], | ||
{ | ||
"uid": "e1d4-188" | ||
"uid": "5c7c-166" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
} | ||
] | ||
}, | ||
"e1d4-188": { | ||
"5c7c-166": { | ||
"id": "/packages/router-core/build/esm/index.js", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-189" | ||
"index.production.js": "5c7c-167" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e1d4-184" | ||
"uid": "5c7c-162" | ||
}, | ||
{ | ||
"uid": "e1d4-186" | ||
"uid": "5c7c-164" | ||
}, | ||
{ | ||
"uid": "e1d4-182" | ||
"uid": "5c7c-158" | ||
} | ||
@@ -225,19 +225,19 @@ ], | ||
{ | ||
"uid": "e1d4-198" | ||
"uid": "5c7c-176" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
}, | ||
{ | ||
"uid": "e1d4-194" | ||
"uid": "5c7c-172" | ||
}, | ||
{ | ||
"uid": "e1d4-196" | ||
"uid": "5c7c-174" | ||
} | ||
] | ||
}, | ||
"e1d4-190": { | ||
"5c7c-168": { | ||
"id": "\u0000rollupPluginBabelHelpers.js", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-191" | ||
"index.production.js": "5c7c-169" | ||
}, | ||
@@ -247,29 +247,29 @@ "imported": [], | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
} | ||
] | ||
}, | ||
"e1d4-192": { | ||
"5c7c-170": { | ||
"id": "/packages/react-router/src/react.tsx", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-193" | ||
"index.production.js": "5c7c-171" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e1d4-190" | ||
"uid": "5c7c-168" | ||
}, | ||
{ | ||
"uid": "e1d4-201" | ||
"uid": "5c7c-179" | ||
}, | ||
{ | ||
"uid": "e1d4-182" | ||
"uid": "5c7c-160" | ||
}, | ||
{ | ||
"uid": "e1d4-184" | ||
"uid": "5c7c-162" | ||
}, | ||
{ | ||
"uid": "e1d4-186" | ||
"uid": "5c7c-164" | ||
}, | ||
{ | ||
"uid": "e1d4-188" | ||
"uid": "5c7c-166" | ||
} | ||
@@ -279,26 +279,26 @@ ], | ||
{ | ||
"uid": "e1d4-198" | ||
"uid": "5c7c-176" | ||
}, | ||
{ | ||
"uid": "e1d4-194" | ||
"uid": "5c7c-172" | ||
}, | ||
{ | ||
"uid": "e1d4-196" | ||
"uid": "5c7c-174" | ||
} | ||
] | ||
}, | ||
"e1d4-194": { | ||
"5c7c-172": { | ||
"id": "/packages/react-router/src/scroll-restoration.tsx", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-195" | ||
"index.production.js": "5c7c-173" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e1d4-201" | ||
"uid": "5c7c-179" | ||
}, | ||
{ | ||
"uid": "e1d4-188" | ||
"uid": "5c7c-166" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
} | ||
@@ -308,17 +308,17 @@ ], | ||
{ | ||
"uid": "e1d4-198" | ||
"uid": "5c7c-176" | ||
} | ||
] | ||
}, | ||
"e1d4-196": { | ||
"5c7c-174": { | ||
"id": "/packages/react-router/src/awaited.tsx", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-197" | ||
"index.production.js": "5c7c-175" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e1d4-188" | ||
"uid": "5c7c-166" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
} | ||
@@ -328,26 +328,26 @@ ], | ||
{ | ||
"uid": "e1d4-198" | ||
"uid": "5c7c-176" | ||
} | ||
] | ||
}, | ||
"e1d4-198": { | ||
"5c7c-176": { | ||
"id": "/packages/react-router/src/index.tsx", | ||
"moduleParts": { | ||
"index.production.js": "e1d4-199" | ||
"index.production.js": "5c7c-177" | ||
}, | ||
"imported": [ | ||
{ | ||
"uid": "e1d4-182" | ||
"uid": "5c7c-160" | ||
}, | ||
{ | ||
"uid": "e1d4-188" | ||
"uid": "5c7c-166" | ||
}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
}, | ||
{ | ||
"uid": "e1d4-194" | ||
"uid": "5c7c-172" | ||
}, | ||
{ | ||
"uid": "e1d4-196" | ||
"uid": "5c7c-174" | ||
} | ||
@@ -358,3 +358,3 @@ ], | ||
}, | ||
"e1d4-200": { | ||
"5c7c-178": { | ||
"id": "use-sync-external-store/shim/with-selector", | ||
@@ -365,3 +365,3 @@ "moduleParts": {}, | ||
{ | ||
"uid": "e1d4-182" | ||
"uid": "5c7c-160" | ||
} | ||
@@ -371,3 +371,3 @@ ], | ||
}, | ||
"e1d4-201": { | ||
"5c7c-179": { | ||
"id": "react", | ||
@@ -378,6 +378,6 @@ "moduleParts": {}, | ||
{ | ||
"uid": "e1d4-192" | ||
"uid": "5c7c-170" | ||
}, | ||
{ | ||
"uid": "e1d4-194" | ||
"uid": "5c7c-172" | ||
} | ||
@@ -384,0 +384,0 @@ ], |
@@ -1,199 +0,5 @@ | ||
/** | ||
* @tanstack/react-router/src/index.tsx | ||
* | ||
* Copyright (c) TanStack | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE.md file in the root directory of this source tree. | ||
* | ||
* @license MIT | ||
*/ | ||
import { NoInfer } from '@tanstack/react-store'; | ||
export { useStore } from '@tanstack/react-store'; | ||
import * as _tanstack_router_core from '@tanstack/router-core'; | ||
import { AnySearchSchema, AnyPathParams, AnyContext, RouteConstraints, AnyRoute, ResolveFullPath, ResolveId, ResolveFullSearchSchema, ParsePathParams, MergeParamsFromParent, RouteContext, UseLoaderResult, AnyRouteProps, RoutePaths, RegisteredRouter, LinkOptions, ToOptions, MatchRouteOptions, RouteByPath, ResolveRelativePath, NavigateOptions, RouterOptions, Router, RouteMatch, RouteIds, RouteById, ParseRoute, RoutesById, AllParams, ScrollRestorationOptions, DeferredPromise } from '@tanstack/router-core'; | ||
export * from '@tanstack/router-core'; | ||
import * as React from 'react'; | ||
declare module '@tanstack/router-core' { | ||
interface RegisterRouteComponent<TLoader = unknown, TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> { | ||
RouteComponent: RouteComponent<RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>>; | ||
} | ||
interface RegisterErrorRouteComponent<TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> { | ||
ErrorRouteComponent: RouteComponent<ErrorRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>>; | ||
} | ||
interface RegisterPendingRouteComponent<TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> { | ||
PendingRouteComponent: RouteComponent<PendingRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>>; | ||
} | ||
interface Route<TParentRoute extends RouteConstraints['TParentRoute'] = AnyRoute, TPath extends RouteConstraints['TPath'] = '/', TFullPath extends RouteConstraints['TFullPath'] = ResolveFullPath<TParentRoute, TPath>, TCustomId extends RouteConstraints['TCustomId'] = string, TId extends RouteConstraints['TId'] = ResolveId<TParentRoute, TCustomId, TPath>, TLoader = unknown, TSearchSchema extends RouteConstraints['TSearchSchema'] = {}, TFullSearchSchema extends RouteConstraints['TFullSearchSchema'] = ResolveFullSearchSchema<TParentRoute, TSearchSchema>, TParams extends RouteConstraints['TParams'] = Record<ParsePathParams<TPath>, string>, TAllParams extends RouteConstraints['TAllParams'] = MergeParamsFromParent<TParentRoute['types']['allParams'], TParams>, TParentContext extends RouteConstraints['TParentContext'] = TParentRoute['types']['routeContext'], TAllParentContext extends RouteConstraints['TAllParentContext'] = TParentRoute['types']['context'], TRouteContext extends RouteConstraints['TRouteContext'] = RouteContext, TAllContext extends RouteConstraints['TAllContext'] = MergeParamsFromParent<TParentRoute['types']['context'], TRouteContext>, TRouterContext extends RouteConstraints['TRouterContext'] = AnyContext, TChildren extends RouteConstraints['TChildren'] = unknown, TRouteTree extends RouteConstraints['TRouteTree'] = AnyRoute> { | ||
useMatch: <TSelected = TAllContext>(opts?: { | ||
select?: (search: TAllContext) => TSelected; | ||
}) => TSelected; | ||
useLoader: <TSelected = TLoader>(opts?: { | ||
select?: (search: TLoader) => TSelected; | ||
}) => UseLoaderResult<TSelected>; | ||
useContext: <TSelected = TAllContext>(opts?: { | ||
select?: (search: TAllContext) => TSelected; | ||
}) => TSelected; | ||
useRouteContext: <TSelected = TRouteContext>(opts?: { | ||
select?: (search: TRouteContext) => TSelected; | ||
}) => TSelected; | ||
useSearch: <TSelected = TFullSearchSchema>(opts?: { | ||
select?: (search: TFullSearchSchema) => TSelected; | ||
}) => TSelected; | ||
useParams: <TSelected = TAllParams>(opts?: { | ||
select?: (search: TAllParams) => TSelected; | ||
}) => TSelected; | ||
} | ||
interface RegisterRouteProps<TLoader = unknown, TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> { | ||
RouteProps: RouteProps<TLoader, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>; | ||
} | ||
interface RegisterPendingRouteProps<TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> { | ||
PendingRouteProps: PendingRouteProps<TFullSearchSchema, TAllParams, TRouteContext, TAllContext>; | ||
} | ||
interface RegisterErrorRouteProps<TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> { | ||
ErrorRouteProps: ErrorRouteProps; | ||
} | ||
} | ||
type RouteProps<TLoader = unknown, TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> = { | ||
useLoader: <TStrict extends boolean = true, TSelected = TLoader>(opts?: { | ||
strict?: TStrict; | ||
select?: (search: TLoader) => TSelected; | ||
}) => TStrict extends true ? UseLoaderResult<TSelected> : UseLoaderResult<TSelected> | undefined; | ||
useMatch: <TStrict extends boolean = true, TSelected = TAllContext>(opts?: { | ||
strict?: TStrict; | ||
select?: (search: TAllContext) => TSelected; | ||
}) => TStrict extends true ? TSelected : TSelected | undefined; | ||
useContext: <TStrict extends boolean = true, TSelected = TAllContext>(opts?: { | ||
strict?: TStrict; | ||
select?: (search: TAllContext) => TSelected; | ||
}) => TStrict extends true ? TSelected : TSelected | undefined; | ||
useRouteContext: <TStrict extends boolean = true, TSelected = TRouteContext>(opts?: { | ||
strict?: TStrict; | ||
select?: (search: TRouteContext) => TSelected; | ||
}) => TStrict extends true ? TSelected : TSelected | undefined; | ||
useSearch: <TStrict extends boolean = true, TSelected = TFullSearchSchema>(opts?: { | ||
strict?: TStrict; | ||
select?: (search: TFullSearchSchema) => TSelected; | ||
}) => TStrict extends true ? TSelected : TSelected | undefined; | ||
useParams: <TStrict extends boolean = true, TSelected = TAllParams>(opts?: { | ||
strict?: TStrict; | ||
select?: (search: TAllParams) => TSelected; | ||
}) => TStrict extends true ? TSelected : TSelected | undefined; | ||
}; | ||
type ErrorRouteProps<TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> = { | ||
error: unknown; | ||
info: { | ||
componentStack: string; | ||
}; | ||
} & Omit<RouteProps<unknown, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>, 'useLoader'>; | ||
type PendingRouteProps<TFullSearchSchema extends AnySearchSchema = AnySearchSchema, TAllParams extends AnyPathParams = AnyPathParams, TRouteContext extends AnyContext = AnyContext, TAllContext extends AnyContext = AnyContext> = Omit<RouteProps<unknown, TFullSearchSchema, TAllParams, TRouteContext, TAllContext>, 'useLoader'>; | ||
type ReactNode = any; | ||
type SyncRouteComponent<TProps> = ((props: TProps) => ReactNode) | React.LazyExoticComponent<(props: TProps) => ReactNode>; | ||
type AsyncRouteComponent<TProps> = SyncRouteComponent<TProps> & { | ||
preload?: () => Promise<void>; | ||
}; | ||
type ErrorRouteComponent = AsyncRouteComponent<ErrorRouteComponentProps>; | ||
type ErrorRouteComponentProps = { | ||
error: Error; | ||
info: { | ||
componentStack: string; | ||
}; | ||
}; | ||
type AnyRouteComponent = RouteComponent<AnyRouteProps>; | ||
type RouteComponent<TProps> = AsyncRouteComponent<TProps>; | ||
declare function lazyRouteComponent<T extends Record<string, any>, TKey extends keyof T = 'default'>(importer: () => Promise<T>, exportName?: TKey): T[TKey] extends (props: infer TProps) => any ? AsyncRouteComponent<TProps> : never; | ||
type LinkPropsOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = LinkOptions<RegisteredRouter['routeTree'], TFrom, TTo> & { | ||
activeProps?: React.AnchorHTMLAttributes<HTMLAnchorElement> | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>); | ||
inactiveProps?: React.AnchorHTMLAttributes<HTMLAnchorElement> | (() => React.AnchorHTMLAttributes<HTMLAnchorElement>); | ||
startTransition?: boolean; | ||
}; | ||
type MakeUseMatchRouteOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = ToOptions<RegisteredRouter['routeTree'], TFrom, TTo> & MatchRouteOptions; | ||
type MakeMatchRouteOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = ToOptions<RegisteredRouter['routeTree'], TFrom, TTo> & MatchRouteOptions & { | ||
children?: ((params?: RouteByPath<RegisteredRouter['routeTree'], ResolveRelativePath<TFrom, NoInfer<TTo>>>['types']['allParams']) => ReactNode) | React.ReactNode; | ||
}; | ||
type MakeLinkPropsOptions<TFrom extends string = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & React.AnchorHTMLAttributes<HTMLAnchorElement>; | ||
type MakeLinkOptions<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''> = LinkPropsOptions<TFrom, TTo> & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'children'> & { | ||
children?: React.ReactNode | ((state: { | ||
isActive: boolean; | ||
}) => React.ReactNode); | ||
}; | ||
type PromptProps = { | ||
message: string; | ||
condition?: boolean | any; | ||
children?: ReactNode; | ||
}; | ||
declare function useLinkProps<TFrom extends string = '/', TTo extends string = ''>(options: MakeLinkPropsOptions<TFrom, TTo>): React.AnchorHTMLAttributes<HTMLAnchorElement>; | ||
interface LinkComponent<TProps extends Record<string, any> = {}> { | ||
<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''>(props: MakeLinkOptions<TFrom, TTo> & TProps & React.RefAttributes<HTMLAnchorElement>): ReactNode; | ||
} | ||
declare const Link: LinkComponent; | ||
declare function Navigate<TFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/', TTo extends string = ''>(props: NavigateOptions<RegisteredRouter['routeTree'], TFrom, TTo>): null; | ||
declare const matchIdsContext: React.Context<string[]>; | ||
declare const routerContext: React.Context<_tanstack_router_core.AnyRouter>; | ||
type RouterProps<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TDehydrated extends Record<string, any> = Record<string, any>> = Omit<RouterOptions<TRouteTree, TDehydrated>, 'context'> & { | ||
router: Router<TRouteTree>; | ||
context?: Partial<RouterOptions<TRouteTree, TDehydrated>['context']>; | ||
}; | ||
declare function useRouterState<TSelected = RegisteredRouter['state']>(opts?: { | ||
select: (state: RegisteredRouter['state']) => TSelected; | ||
}): TSelected; | ||
declare function RouterProvider<TRouteTree extends AnyRoute = RegisteredRouter['routeTree'], TDehydrated extends Record<string, any> = Record<string, any>>({ router, ...rest }: RouterProps<TRouteTree, TDehydrated>): JSX.Element; | ||
declare function useRouter(): RegisteredRouter; | ||
declare function useMatches<T = RouteMatch[]>(opts?: { | ||
select?: (matches: RouteMatch[]) => T; | ||
}): T; | ||
type StrictOrFrom<TFrom> = { | ||
from: TFrom; | ||
strict?: true; | ||
} | { | ||
from?: never; | ||
strict: false; | ||
}; | ||
declare function useMatch<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TRouteMatchState = RouteMatch<RegisteredRouter['routeTree'], RouteById<RegisteredRouter['routeTree'], TFrom>>, TSelected = TRouteMatchState>(opts: StrictOrFrom<TFrom> & { | ||
select?: (match: TRouteMatchState) => TSelected; | ||
}): TStrict extends true ? TRouteMatchState : TRouteMatchState | undefined; | ||
type RouteFromIdOrRoute<T> = T extends ParseRoute<RegisteredRouter['routeTree']> ? T : T extends RouteIds<RegisteredRouter['routeTree']> ? RoutesById<RegisteredRouter['routeTree']>[T] : T extends string ? RouteIds<RegisteredRouter['routeTree']> : never; | ||
declare function useLoader<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TLoader = RouteById<RegisteredRouter['routeTree'], TFrom>['types']['loader'], TSelected = TLoader>(opts: StrictOrFrom<TFrom> & { | ||
select?: (search: TLoader) => TSelected; | ||
}): TStrict extends true ? TSelected : TSelected | undefined; | ||
declare function useRouterContext<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TContext = RouteById<RegisteredRouter['routeTree'], TFrom>['types']['context'], TSelected = TContext>(opts: StrictOrFrom<TFrom> & { | ||
select?: (search: TContext) => TSelected; | ||
}): TStrict extends true ? TSelected : TSelected | undefined; | ||
declare function useRouteContext<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TRouteContext = RouteById<RegisteredRouter['routeTree'], TFrom>['types']['routeContext'], TSelected = TRouteContext>(opts: StrictOrFrom<TFrom> & { | ||
select?: (search: TRouteContext) => TSelected; | ||
}): TStrict extends true ? TSelected : TSelected | undefined; | ||
declare function useSearch<TFrom extends RouteIds<RegisteredRouter['routeTree']>, TStrict extends boolean = true, TSearch = RouteById<RegisteredRouter['routeTree'], TFrom>['types']['fullSearchSchema'], TSelected = TSearch>(opts: StrictOrFrom<TFrom> & { | ||
select?: (search: TSearch) => TSelected; | ||
}): TStrict extends true ? TSelected : TSelected | undefined; | ||
declare function useParams<TFrom extends RouteIds<RegisteredRouter['routeTree']> = '/', TDefaultSelected = AllParams<RegisteredRouter['routeTree']> & RouteById<RegisteredRouter['routeTree'], TFrom>['types']['allParams'], TSelected = TDefaultSelected>(opts: StrictOrFrom<TFrom> & { | ||
select?: (search: TDefaultSelected) => TSelected; | ||
}): TSelected; | ||
declare function useNavigate<TDefaultFrom extends RoutePaths<RegisteredRouter['routeTree']> = '/'>(defaultOpts?: { | ||
from?: TDefaultFrom; | ||
}): <TFrom extends unknown = TDefaultFrom, TTo extends string = "">(opts?: NavigateOptions<any, TFrom, TTo> | undefined) => Promise<void>; | ||
declare function useMatchRoute(): <TFrom extends string = "/", TTo extends string = "">(opts: MakeUseMatchRouteOptions<TFrom, TTo>) => any; | ||
declare function MatchRoute<TFrom extends string = '/', TTo extends string = ''>(props: MakeMatchRouteOptions<TFrom, TTo>): any; | ||
declare function Outlet(): JSX.Element | null; | ||
declare function useInjectHtml(): (html: string | (() => Promise<string> | string)) => void; | ||
declare function useDehydrate(): <T>(key: any, data: T | (() => T | Promise<T>)) => () => T | undefined; | ||
declare function useHydrate(): <T = unknown>(key: any) => T; | ||
declare function ErrorComponent({ error }: { | ||
error: any; | ||
}): JSX.Element; | ||
declare function useBlocker(message: string, condition?: boolean | any): void; | ||
declare function Block({ message, condition, children }: PromptProps): any; | ||
declare function shallow<T>(objA: T, objB: T): boolean; | ||
declare function useScrollRestoration(options?: ScrollRestorationOptions): void; | ||
declare function ScrollRestoration(props: ScrollRestorationOptions): null; | ||
type AwaitOptions<T> = { | ||
promise: DeferredPromise<T>; | ||
}; | ||
declare function useAwaited<T>({ promise }: AwaitOptions<T>): [T]; | ||
declare function Await<T>(props: AwaitOptions<T> & { | ||
children: (result: T) => JSX.Element; | ||
}): JSX.Element; | ||
export { AnyRouteComponent, AsyncRouteComponent, Await, AwaitOptions, Block, ErrorComponent, ErrorRouteComponent, ErrorRouteComponentProps, ErrorRouteProps, Link, LinkComponent, LinkPropsOptions, MakeLinkOptions, MakeLinkPropsOptions, MakeMatchRouteOptions, MakeUseMatchRouteOptions, MatchRoute, Navigate, Outlet, PendingRouteProps, PromptProps, RouteComponent, RouteFromIdOrRoute, RouteProps, RouterProps, RouterProvider, ScrollRestoration, SyncRouteComponent, lazyRouteComponent, matchIdsContext, routerContext, shallow, useAwaited, useBlocker, useDehydrate, useHydrate, useInjectHtml, useLinkProps, useLoader, useMatch, useMatchRoute, useMatches, useNavigate, useParams, useRouteContext, useRouter, useRouterContext, useRouterState, useScrollRestoration, useSearch }; | ||
export * from './react'; | ||
export * from './scroll-restoration'; | ||
export * from './awaited'; |
@@ -42,3 +42,3 @@ /** | ||
*/ | ||
const h="pushstate",u="popstate",l="beforeunload",d=t=>(t.preventDefault(),t.returnValue=""),p=()=>{removeEventListener(l,d,{capture:!0})};function f(t){let e=t.getLocation(),r=()=>{},o=new Set,s=[],n=[];const a=()=>{if(s.length)s[0]?.(a,(()=>{s=[],p()}));else{for(;n.length;)n.shift()?.();t.subscriber||c()}},i=t=>{n.push(t),a()},c=()=>{e=t.getLocation(),o.forEach((t=>t()))};return{get location(){return e},subscribe:e=>(0===o.size&&(r="function"==typeof t.subscriber?t.subscriber(c):()=>{}),o.add(e),()=>{o.delete(e),0===o.size&&r()}),push:(e,r)=>{i((()=>{t.pushState(e,r)}))},replace:(e,r)=>{i((()=>{t.replaceState(e,r)}))},go:e=>{i((()=>{t.go(e)}))},back:()=>{i((()=>{t.back()}))},forward:()=>{i((()=>{t.forward()}))},createHref:e=>t.createHref(e),block:t=>(s.push(t),1===s.length&&addEventListener(l,d,{capture:!0}),()=>{s=s.filter((e=>e!==t)),s.length||p()})}}function m(t){const e=t?.getHref??(()=>`${window.location.pathname}${window.location.search}${window.location.hash}`),r=t?.createHref??(t=>t);return f({getLocation:()=>g(e(),history.state),subscriber:t=>{window.addEventListener(h,t),window.addEventListener(u,t);var e=window.history.pushState;window.history.pushState=function(){let r=e.apply(history,arguments);return t(),r};var r=window.history.replaceState;return window.history.replaceState=function(){let e=r.apply(history,arguments);return t(),e},()=>{window.history.pushState=e,window.history.replaceState=r,window.removeEventListener(h,t),window.removeEventListener(u,t)}},pushState:(t,e)=>{window.history.pushState({...e,key:v()},"",r(t))},replaceState:(t,e)=>{window.history.replaceState({...e,key:v()},"",r(t))},back:()=>window.history.back(),forward:()=>window.history.forward(),go:t=>window.history.go(t),createHref:t=>r(t)})}function y(t={initialEntries:["/"]}){const e=t.initialEntries;let r=t.initialIndex??e.length-1,o={};return f({getLocation:()=>g(e[r],o),subscriber:!1,pushState:(t,s)=>{o={...s,key:v()},e.push(t),r++},replaceState:(t,s)=>{o={...s,key:v()},e[r]=t},back:()=>{r--},forward:()=>{r=Math.min(r+1,e.length-1)},go:t=>window.history.go(t),createHref:t=>t})}function g(t,e){let r=t.indexOf("#"),o=t.indexOf("?");return{href:t,pathname:t.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:t.length),hash:r>-1?t.substring(r):"",search:o>-1?t.slice(o,-1===r?void 0:r):"",state:e}}function v(){return(Math.random()+1).toString(36).substring(7)}function w(t){return t[t.length-1]}function b(t,e){return"function"==typeof t?t(e):t}function S(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function R(t,e){if(t===e)return t;const r=e,o=Array.isArray(t)&&Array.isArray(r);if(o||_(t)&&_(r)){const e=o?t.length:Object.keys(t).length,s=o?r:Object.keys(r),n=s.length,a=o?[]:{};let i=0;for(let e=0;e<n;e++){const n=o?e:s[e];a[n]=R(t[n],r[n]),a[n]===t[n]&&i++}return e===n&&i===e?t:a}return r}function _(t){if(!x(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!x(r)&&!!r.hasOwnProperty("isPrototypeOf")}function x(t){return"[object Object]"===Object.prototype.toString.call(t)}function E(t,e){return t===e||typeof t==typeof e&&(_(t)&&_(e)?!Object.keys(e).some((r=>!E(t[r],e[r]))):!(!Array.isArray(t)||!Array.isArray(e))&&(t.length===e.length&&t.every(((t,r)=>E(t,e[r])))))}function I(t){return P(t.filter(Boolean).join("/"))}function P(t){return t.replace(/\/{2,}/g,"/")}function C(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function M(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function L(t){return M(C(t))}function O(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let o=A(e);const s=A(r);s.forEach(((t,e)=>{if("/"===t.value)e?e===s.length-1&&o.push(t):o=[t];else if(".."===t.value)o.length>1&&"/"===w(o)?.value&&o.pop(),o.pop();else{if("."===t.value)return;o.push(t)}}));return P(I([t,...o.map((t=>t.value))]))}function A(t){if(!t)return[];const e=[];if("/"===(t=P(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const r=t.split("/").filter(Boolean);return e.push(...r.map((t=>"$"===t||"*"===t?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function j(t,e,r=!1){return I(A(t).map((t=>{if("wildcard"===t.type){const o=e[t.value];return r?`${t.value}${o??""}`:o}return"param"===t.type?e[t.value.substring(1)]??"":t.value})))}function D(t,e,r){const o=k(t,e,r);if(!r.to||o)return o??{}}function k(t,e,r){e="/"!=t?e.substring(t.length):e;const o=`${r.to??"$"}`,s=A(e),n=A(o);e.startsWith("/")||s.unshift({type:"pathname",value:"/"}),o.startsWith("/")||n.unshift({type:"pathname",value:"/"});const a={};return(()=>{for(let t=0;t<Math.max(s.length,n.length);t++){const e=s[t],o=n[t],i=t>=s.length-1,c=t>=n.length-1;if(o){if("wildcard"===o.type)return!!e?.value&&(a["*"]=I(s.slice(t).map((t=>t.value))),!0);if("pathname"===o.type){if("/"===o.value&&!e?.value)return!0;if(e)if(r.caseSensitive){if(o.value!==e.value)return!1}else if(o.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===o.type){if("/"===e?.value)return!1;"$"!==e.value.charAt(0)&&(a[o.value.substring(1)]=e.value)}}if(!i&&c)return!!r.fuzzy}return!0})()?a:void 0}function B(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n}function $(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0&&+e+""===e?+e:e))}function T(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],$(e.shift())):o[r]=$(e.shift());return o}const N="__root__";class H{constructor(t){this.options=t||{},this.isRoot=!t?.getParentRoute,H.__onInit(this)}init=t=>{this.originalIndex=t.originalIndex,this.router=t.router;const e=this.options,r=!e?.path&&!e?.id;this.parentRoute=this.options?.getParentRoute?.(),r?this.path=N:c(this.parentRoute);let o=r?N:e.path;o&&"/"!==o&&(o=L(o));const s=e?.id||o;let n=r?N:I([this.parentRoute.id===N?"":this.parentRoute.id,s]);o===N&&(o="/"),n!==N&&(n=I(["/",n]));const a=n===N?"/":I([this.parentRoute.fullPath,o]);this.path=o,this.id=n,this.fullPath=a,this.to=a};addChildren=t=>(this.children=t,this);update=t=>(Object.assign(this.options,t),this);static __onInit=t=>{}}class F extends H{constructor(t){super(t)}}const z=W(JSON.parse),U=Y(JSON.stringify,JSON.parse);function W(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=T(e);for(let e in r){const o=r[e];if("string"==typeof o)try{r[e]=t(o)}catch(t){}}return r}}function Y(t,e){function r(r){if("object"==typeof r&&null!==r)try{return t(r)}catch(t){}else if("string"==typeof r&&"function"==typeof e)try{return e(r),t(r)}catch(t){}return r}return t=>{(t={...t})&&Object.keys(t).forEach((e=>{const o=t[e];void 0===o||void 0===o?delete t[e]:Array.isArray(o)?t[e]=o.map(r):t[e]=r(o)}));const e=B(t).toString();return e?`?${e}`:""}}const J=["component","errorComponent","pendingComponent"];const q="undefined"==typeof window||!window.document.createElement;function K(){return{status:"idle",isFetching:!1,resolvedLocation:null,location:null,matchesById:{},matchIds:[],pendingMatchIds:[],matches:[],pendingMatches:[],lastUpdated:Date.now()}}function X(t){return!!t?.isRedirect}class V extends Error{}class G extends Error{}const Q="window",Z="___";let tt,et={},rt=!1;const ot="undefined"!=typeof window&&window.sessionStorage,st=t=>t.key;function nt(t,e){const r=e?.getKey||st;ot&&(tt||(tt=(()=>{const t="tsr-scroll-restoration-v1",e=JSON.parse(window.sessionStorage.getItem(t)||"{}");return{current:e,set:(r,o)=>{e[r]=o,window.sessionStorage.setItem(t,JSON.stringify(tt))}}})()));const{history:o}=window;o.scrollRestoration&&(o.scrollRestoration="manual");const s=e=>{const o=r(t.state.resolvedLocation);et[o]||(et[o]=new WeakSet);const s=et[o];if(s.has(e.target))return;s.add(e.target);const a=[o,e.target===document||e.target===window?Q:n(e.target)].join(Z);tt.current[a]||tt.set(a,{scrollX:NaN,scrollY:NaN})},n=t=>{let e,r=[];for(;e=t.parentNode;)r.unshift(`${t.tagName}:nth-child(${[].indexOf.call(e.children,t)+1})`),t=e;return`${r.join(" > ")}`.toLowerCase()};"undefined"!=typeof document&&document.addEventListener("scroll",s,!0);const a=t.subscribe("onBeforeLoad",(t=>{t.pathChanged&&(t=>{const e=r(t);for(const t in tt.current){const r=tt.current[t],[o,s]=t.split(Z);if(e===o){if(s===Q)r.scrollX=window.scrollX||0,r.scrollY=window.scrollY||0;else if(s){const t=document.querySelector(s);r.scrollX=t?.scrollLeft||0,r.scrollY=t?.scrollTop||0}tt.set(t,r)}}})(t.from)})),i=t.subscribe("onLoad",(t=>{t.pathChanged&&(rt=!0)}));return()=>{document.removeEventListener("scroll",s),a(),i()}}function at(t,e){if(rt){if(!t.resetNextScroll)return;rt=!1;const r=(e?.getKey||st)(t.state.location);let o=!1;for(const t in tt.current){const e=tt.current[t],[s,n]=t.split(Z);if(s===r)if(n===Q)o=!0,window.scrollTo(e.scrollX,e.scrollY);else if(n){const t=document.querySelector(n);t&&(t.scrollLeft=e.scrollX,t.scrollTop=e.scrollY)}}o||window.scrollTo(0,0)}}function it(t){return"object"==typeof t&&null!==t&&!(t instanceof Promise)&&!t.then&&"__deferredState"in t}function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},ct.apply(this,arguments)}function ht(t){const e=mt(),{type:r,children:o,target:n,activeProps:a=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:h,hash:u,search:l,params:d,to:p=".",preload:f,preloadDelay:m,replace:y,style:g,className:v,onClick:w,onFocus:S,onMouseEnter:R,onMouseLeave:_,onTouchStart:x,...E}=t,I=e.buildLink(t);if("external"===I.type){const{href:t}=I;return{href:t}}const{handleClick:P,handleFocus:C,handleEnter:M,handleLeave:L,handleTouchStart:O,isActive:A,next:j}=I,D=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},k=A?b(a,{})??{}:{},B=A?{}:b(i,{})??{};return{...k,...B,...E,href:h?void 0:j.href,onClick:D([w,e=>{(t.startTransition??1)&&(s.startTransition||(t=>t))((()=>{P(e)}))}]),onFocus:D([S,C]),onMouseEnter:D([R,M]),onMouseLeave:D([_,L]),onTouchStart:D([x,O]),target:n,style:{...g,...k.style,...B.style},className:[v,k.className,B.className].filter(Boolean).join(" ")||void 0,...h?{role:"link","aria-disabled":!0}:void 0,"data-status":A?"active":void 0}}H.__onInit=t=>{Object.assign(t,{useMatch:(e={})=>yt({...e,from:t.id}),useLoader:(e={})=>gt({...e,from:t.id}),useContext:(e={})=>yt({...e,from:t.id,select:t=>e?.select?.(t.context)??t.context}),useRouteContext:(e={})=>yt({...e,from:t.id,select:t=>e?.select?.(t.routeContext)??t.routeContext}),useSearch:(e={})=>vt({...e,from:t.id}),useParams:(e={})=>wt({...e,from:t.id})})};const ut=s.forwardRef(((t,e)=>{const r=ht(t);return s.createElement("a",ct({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))}));const lt=s.createContext(null),dt=s.createContext(null);function pt(t){return a(mt().__store,t?.select)}function ft(){const t=mt(),e=pt({select:e=>e.pendingMatches.some((e=>!!t.getRoute(e.routeId)?.options.pendingComponent))?e.pendingMatchIds:e.matchIds});return s.createElement(lt.Provider,{value:[void 0,...e]},s.createElement(It,{errorComponent:Ct,route:t.getRoute(N),onCatch:()=>{}},s.createElement(St,null)))}function mt(){return s.useContext(dt)}function yt(t){const e=mt(),r=s.useContext(lt)[0],o=e.getRouteMatch(r)?.routeId,n=pt({select:e=>{const o=e.matches;return(t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r))).routeId}});(t?.strict??1)&&c(o==n);return pt({select:e=>{const o=e.matches,s=t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r));return c(s,t?.from&&t.from),t?.select?.(s)??s}})}function gt(t){return yt({...t,select:e=>t?.select?.(e.loaderData)??e.loaderData})}function vt(t){return yt({...t,select:e=>t?.select?.(e.search)??e.search})}function wt(t){return pt({select:e=>{const r=w(e.matches)?.params;return t?.select?.(r)??r}})}function bt(){const t=mt();return s.useCallback((e=>{const{pending:r,caseSensitive:o,...s}=e;return t.matchRoute(s,{pending:r,caseSensitive:o})}),[])}function St(){const t=s.useContext(lt).slice(1);return t[0]?s.createElement(_t,{matchIds:t}):null}const Rt=()=>null;function _t({matchIds:t}){const e=mt(),r=t[0],o=e.getRouteMatch(r).routeId,n=e.getRoute(o),a=n.options.pendingComponent??e.options.defaultPendingComponent??Rt,i=n.options.errorComponent??e.options.defaultErrorComponent??Ct,c=n.options.wrapInSuspense??!n.isRoot?s.Suspense:Et,h=i?It:Et;return s.createElement(lt.Provider,{value:t},s.createElement(c,{fallback:s.createElement(a,{useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams})},s.createElement(h,{key:n.id,errorComponent:i,route:n,onCatch:()=>{}},s.createElement(xt,{matchId:r,PendingComponent:a}))))}function xt({matchId:t,PendingComponent:e}){const r=mt(),o=pt({select:e=>S(e.matchesById[t],["status","loadPromise","routeId","error"])}),n=r.getRoute(o.routeId);if("error"===o.status)throw o.error;if("pending"===o.status)return s.createElement(e,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams});if("success"===o.status){let t=n.options.component??r.options.defaultComponent;return t?s.createElement(t,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams}):s.createElement(St,null)}c(!1)}function Et(t){return s.createElement(s.Fragment,null,t.children)}class It extends s.Component{state={error:!1,info:void 0};componentDidCatch(t,e){this.props.onCatch(t,e),this.setState({error:t,info:e})}render(){return s.createElement(Pt,ct({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function Pt(t){const e=pt({select:t=>t.resolvedLocation.key}),[r,o]=s.useState(t.errorState),n=t.errorComponent??Ct,a=s.useRef("");return s.useEffect((()=>{r&&e!==a.current&&o({}),a.current=e}),[r,e]),s.useEffect((()=>{t.errorState.error&&o(t.errorState)}),[t.errorState.error]),t.errorState.error&&r.error?s.createElement(n,{...r,useMatch:t.route.useMatch,useContext:t.route.useContext,useRouteContext:t.route.useRouteContext,useSearch:t.route.useSearch,useParams:t.route.useParams}):t.children}function Ct({error:t}){const[e,r]=s.useState(!1);return s.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},s.createElement("div",{style:{display:"flex",alignItems:"center",gap:".5rem"}},s.createElement("strong",{style:{fontSize:"1rem"}},"Something went wrong!"),s.createElement("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r((t=>!t))},e?"Hide Error":"Show Error")),s.createElement("div",{style:{height:".25rem"}}),e?s.createElement("div",null,s.createElement("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"}},t.message?s.createElement("code",null,t.message):null)):null)}function Mt(t,e=!0){const r=mt();s.useEffect((()=>{if(!e)return;let o=r.history.block(((e,r)=>{window.confirm(t)&&(o(),e())}));return o}))}const Lt="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function Ot(t){const e=mt();Lt((()=>nt(e,t)),[]),Lt((()=>{at(e,t)}))}function At({promise:t}){const e=mt();let r=t.__deferredState;const o=`__TSR__DEFERRED__${r.uid}`;if(it(t)&&(r=e.hydrateData(o),(t=Promise.resolve(r.data)).__deferredState=r),"pending"===r.status)throw t;if("error"===r.status)throw r.error;return e.dehydrateData(o,r),[r.data]}t.Await=function(t){const e=At(t);return t.children(...e)},t.Block=function({message:t,condition:e,children:r}){return Mt(t,e),r??null},t.ErrorComponent=Ct,t.FileRoute=class{constructor(t){this.path=t}createRoute=t=>{const e=new H(t);return e.isRoot=!1,e}},t.Link=ut,t.MatchRoute=function(t){const e=bt()(t);return"function"==typeof t.children?t.children(e):e?t.children:null},t.Navigate=function(t){const e=mt();return s.useLayoutEffect((()=>{e.navigate(t)}),[]),null},t.Outlet=St,t.PathParamError=G,t.RootRoute=F,t.Route=H,t.Router=class{#t;resetNextScroll=!1;constructor(t){this.options={defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??U,parseSearch:t?.parseSearch??z},this.__store=new n(K(),{onUpdate:()=>{const t=this.state,e=this.__store.state,r=t.matchesById!==e.matchesById;let o,s;r||(o=t.matchIds.length!==e.matchIds.length||t.matchIds.some(((t,r)=>t!==e.matchIds[r])),s=t.pendingMatchIds.length!==e.pendingMatchIds.length||t.pendingMatchIds.some(((t,r)=>t!==e.pendingMatchIds[r]))),(r||o)&&(e.matches=e.matchIds.map((t=>e.matchesById[t]))),(r||s)&&(e.pendingMatches=e.pendingMatchIds.map((t=>e.matchesById[t]))),e.isFetching=[...e.matches,...e.pendingMatches].some((t=>t.isFetching)),this.state=e},defaultPriority:"low"}),this.state=this.__store.state,this.update(t);const e=this.buildNext({hash:!0,fromCurrent:!0,search:!0,state:!0});this.state.location.href!==e.href&&this.#e({...e,replace:!0})}subscribers=new Set;subscribe=(t,e)=>{const r={eventType:t,fn:e};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}};#r=t=>{this.subscribers.forEach((e=>{e.eventType===t.type&&e.fn(t)}))};reset=()=>{this.__store.setState((t=>Object.assign(t,K())))};mount=()=>{this.safeLoad()};update=t=>{if(this.options={...this.options,...t,context:{...this.options.context,...t?.context}},!this.history||this.options.history&&this.options.history!==this.history){this.#t&&this.#t(),this.history=this.options.history??(q?y():m());const t=this.#o();this.__store.setState((e=>({...e,resolvedLocation:t,location:t}))),this.#t=this.history.subscribe((()=>{this.safeLoad({next:this.#o(this.state.location)})}))}const{basepath:e,routeTree:r}=this.options;return this.basepath=`/${L(e??"")??""}`,r&&r!==this.routeTree&&this.#s(r),this};buildNext=t=>{const e=this.#n(t),r=this.matchRoutes(e.pathname,e.search);return this.#n({...t,__matches:r})};cancelMatches=()=>{this.state.matches.forEach((t=>{this.cancelMatch(t.id)}))};cancelMatch=t=>{this.getRouteMatch(t)?.abortController?.abort()};safeLoad=async t=>{try{return this.load(t)}catch(t){}};latestLoadPromise=Promise.resolve();load=async t=>{const e=new Promise((async(r,o)=>{const s=this.state.resolvedLocation,n=!(!t?.next||s.href===t.next.href);let a;const i=()=>this.latestLoadPromise!==e?this.latestLoadPromise:void 0;let c;this.#r({type:"onBeforeLoad",from:s,to:t?.next??this.state.location,pathChanged:n}),this.__store.batch((()=>{t?.next&&this.__store.setState((e=>({...e,location:t.next}))),c=this.matchRoutes(this.state.location.pathname,this.state.location.search,{throwOnError:t?.throwOnError,debug:!0}),this.__store.setState((t=>({...t,status:"pending",pendingMatchIds:c.map((t=>t.id)),matchesById:this.#a(t.matchesById,c)})))}));try{try{await this.loadMatches(c)}catch(t){}if(a=i())return a;this.__store.setState((t=>({...t,status:"idle",resolvedLocation:t.location,matchIds:t.pendingMatchIds,pendingMatchIds:[]}))),this.#r({type:"onLoad",from:s,to:this.state.location,pathChanged:n}),r()}catch(t){if(a=i())return a;o(t)}}));return this.latestLoadPromise=e,this.latestLoadPromise};#a=(t,e)=>{const r={...t};let o=!1;return e.forEach((t=>{r[t.id]||(o=!0,r[t.id]=t)})),o?r:t};getRoute=t=>{const e=this.routesById[t];return c(e),e};preloadRoute=async(t=this.state.location)=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname,e.search,{throwOnError:!0});return this.__store.setState((t=>({...t,matchesById:this.#a(t.matchesById,r)}))),await this.loadMatches(r,{preload:!0,maxAge:t.maxAge}),r};cleanMatches=()=>{const t=Date.now(),e=Object.values(this.state.matchesById).filter((e=>{const r=this.getRoute(e.routeId);return!this.state.matchIds.includes(e.id)&&!this.state.pendingMatchIds.includes(e.id)&&e.preloadInvalidAt<t&&(!r.options.gcMaxAge||e.updatedAt+r.options.gcMaxAge<t)})).map((t=>t.id));e.length&&this.__store.setState((t=>{const r={...t.matchesById};return e.forEach((t=>{delete r[t]})),{...t,matchesById:r}}))};matchRoutes=(t,e,r)=>{let o={},s=this.flatRoutes.find((e=>{const r=D(this.basepath,M(t),{to:e.fullPath,caseSensitive:e.options.caseSensitive??this.options.caseSensitive});return!!r&&(o=r,!0)}))||this.routesById.__root__,n=[s];for(;s?.parentRoute;)s=s.parentRoute,s&&n.unshift(s);const a=n.map((t=>{let e;if(t.options.parseParams)try{const e=t.options.parseParams(o);Object.assign(o,e)}catch(t){if(e=new G(t.message,{cause:t}),r?.throwOnError)throw e;return e}})),i=n.map(((t,r)=>{const s=j(t.path,o),n=t.options.key?t.options.key({params:o,search:e})??"":"",i=n?JSON.stringify(n):"",c=j(t.id,o,!0)+i,h=this.getRouteMatch(c);if(h)return{...h};const u=!(!t.options.loader&&!J.some((e=>t.options[e]?.preload)));return{id:c,key:i,routeId:t.id,params:o,pathname:I([this.basepath,s]),updatedAt:Date.now(),invalidAt:1/0,preloadInvalidAt:1/0,routeSearch:{},search:{},status:u?"pending":"success",isFetching:!1,invalid:!1,error:void 0,paramsError:a[r],searchError:void 0,loaderData:void 0,loadPromise:Promise.resolve(),routeContext:void 0,context:void 0,abortController:new AbortController,fetchedAt:0}}));return i.forEach(((t,o)=>{const s=i[o-1],n=this.getRoute(t.routeId),a=(()=>{const o={search:s?.search??e,routeSearch:s?.routeSearch??e};try{const e=("object"==typeof n.options.validateSearch?n.options.validateSearch.parse:n.options.validateSearch)?.(o.search)??{},r={...o.search,...e};return{routeSearch:R(t.routeSearch,e),search:R(t.search,r)}}catch(e){if(t.searchError=new V(e.message,{cause:e}),r?.throwOnError)throw t.searchError;return o}})();Object.assign(t,{...a});const c=(()=>{try{const e=n.options.getContext?.({parentContext:s?.routeContext??{},context:s?.context??this?.options.context??{},params:t.params,search:t.search})||{};return{context:{...s?.context??this?.options.context,...e},routeContext:e}}catch(t){throw n.options.onError?.(t),t}})();Object.assign(t,{...c})})),i};loadMatches=async(t,e)=>{let r;e?.preload||t.forEach((t=>{this.setRouteMatch(t.id,(e=>({...e,routeSearch:t.routeSearch,search:t.search,routeContext:t.routeContext,context:t.context,error:t.error,paramsError:t.paramsError,searchError:t.searchError,params:t.params,preloadInvalidAt:0})))})),this.cleanMatches();try{for(const[o,s]of t.entries()){const t=this.getRoute(s.routeId),n=(e,n)=>{if(e.routerCode=n,r=r??o,X(e))throw e;try{t.options.onError?.(e)}catch(t){if(e=t,X(t))throw t}this.setRouteMatch(s.id,(t=>({...t,error:e,status:"error",updatedAt:Date.now()})))};s.paramsError&&n(s.paramsError,"PARSE_PARAMS"),s.searchError&&n(s.searchError,"VALIDATE_SEARCH");let a=!1;try{await(t.options.beforeLoad?.({...s,preload:!!e?.preload}))}catch(t){n(t,"BEFORE_LOAD"),a=!0}if(a)break}}catch(t){throw e?.preload||this.navigate(t),t}const o=t.slice(0,r),s=[];o.forEach(((t,r)=>{s.push((async()=>{const o=s[r-1],n=this.getRoute(t.routeId);if(t.isFetching||"success"===t.status&&!this.getIsInvalid({matchId:t.id,preload:e?.preload}))return this.getRouteMatch(t.id)?.loadPromise;const a=Date.now(),i=()=>{const e=this.getRouteMatch(t.id);return e&&e.fetchedAt!==a?e.loadPromise:void 0},c=t=>!!X(t)&&(e?.preload||this.navigate(t),!0),h=async()=>{let r;try{const s=Promise.all(J.map((async t=>{const e=n.options[t];e?.preload&&await e.preload()}))),a=n.options.loader?.({...t,preload:!!e?.preload,parentMatchPromise:o}),[c,h]=await Promise.all([s,a]);if(r=i())return await r;this.setRouteMatchData(t.id,(()=>h),e)}catch(e){if(r=i())return await r;if(c(e))return;try{n.options.onError?.(e)}catch(t){if(e=t,c(t))return}this.setRouteMatch(t.id,(t=>({...t,error:e,status:"error",isFetching:!1,updatedAt:Date.now()})))}};let u;this.__store.batch((()=>{this.setRouteMatch(t.id,(t=>({...t,isFetching:!0,fetchedAt:a,invalid:!1}))),u=h(),this.setRouteMatch(t.id,(t=>({...t,loadPromise:u})))})),await u})())})),await Promise.all(s),this.cleanMatches()};reload=()=>this.navigate({fromCurrent:!0,replace:!0,search:!0});resolvePath=(t,e)=>O(this.basepath,t,P(e));navigate=async({from:t,to:e="",search:r,hash:o,replace:s,params:n,resetScroll:a})=>{const i=String(e),h=void 0===t?t:String(t);let u;try{new URL(`${i}`),u=!0}catch(t){}return c(!u),this.#e({from:h,to:i,search:r,hash:o,replace:s,params:n,resetScroll:a})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const r=this.buildNext(t);if(e?.pending&&"pending"!==this.state.status)return!1;const o=e?.pending?this.state.location:this.state.resolvedLocation;if(!o)return!1;const s=D(this.basepath,o.pathname,{...e,to:r.pathname});return!!s&&(e?.includeSearch??1?!!E(o.search,r.search)&&s:s)};buildLink=({from:t,to:e=".",search:r,params:o,hash:s,target:n,replace:a,activeOptions:i,preload:c,preloadDelay:h,disabled:u,state:l,resetScroll:d})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const p={from:t,to:e,search:r,params:o,hash:s,replace:a,state:l,resetScroll:d},f=this.buildNext(p);c=c??this.options.defaultPreload;const m=h??this.options.defaultPreloadDelay??0,y=this.state.location.pathname.split("/"),g=f.pathname.split("/").every(((t,e)=>t===y[e])),v=i?.exact?this.state.location.pathname===f.pathname:g,w=!i?.includeHash||this.state.location.hash===f.hash,b=!(i?.includeSearch??1)||E(this.state.location.search,f.search);return{type:"internal",next:f,handleFocus:t=>{c&&this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||n&&"_self"!==n||0!==t.button||(t.preventDefault(),this.#e(p))},handleEnter:t=>{const e=t.target||{};if(c){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},handleTouchStart:t=>{this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},isActive:v&&w&&b,disabled:u}};dehydrate=()=>({state:{dehydratedMatches:this.state.matches.map((t=>S(t,["fetchedAt","invalid","invalidAt","id","loaderData","status","updatedAt"])))}});hydrate=async t=>{let e=t;"undefined"!=typeof document&&(e=window.__TSR_DEHYDRATED__),c(e);const r=e;this.dehydratedData=r.payload,this.options.hydrate?.(r.payload);const{dehydratedMatches:o}=r.router.state;let s=this.matchRoutes(this.state.location.pathname,this.state.location.search).map((t=>{const e=o.find((e=>e.id===t.id));return c(e,t.id),e?{...t,...e}:t}));this.__store.setState((t=>({...t,matches:s,matchesById:this.#a(t.matchesById,s)})))};injectedHtml=[];injectHtml=async t=>{this.injectedHtml.push(t)};dehydrateData=(t,e)=>{if("undefined"==typeof document){const r="string"==typeof t?t:JSON.stringify(t);return this.injectHtml((async()=>{const t=`__TSR_DEHYDRATED__${r}`,o="function"==typeof e?await e():e;return`<script id='${t}' suppressHydrationWarning>window["__TSR_DEHYDRATED__${s=r,s.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}"] = ${JSON.stringify(o)}\n // ;(() => {\n // var el = document.getElementById('${t}')\n // el.parentElement.removeChild(el)\n // })()\n <\/script>`;var s})),()=>this.hydrateData(t)}return()=>{}};hydrateData=t=>{if("undefined"!=typeof document){const e="string"==typeof t?t:JSON.stringify(t);return window[`__TSR_DEHYDRATED__${e}`]}};#s=t=>{this.routeTree=t,this.routesById={},this.routesByPath={},this.flatRoutes=[];const e=t=>{t.forEach(((t,r)=>{t.init({originalIndex:r,router:this});if(c(!this.routesById[t.id],String(t.id)),this.routesById[t.id]=t,!t.isRoot&&t.path){const e=M(t.fullPath);this.routesByPath[e]&&!t.fullPath.endsWith("/")||(this.routesByPath[e]=t)}const o=t.children;o?.length&&e(o)}))};e([t]),this.flatRoutes=Object.values(this.routesByPath).map(((t,e)=>{const r=L(t.fullPath),o=A(r);for(;o.length>1&&"/"===o[0]?.value;)o.shift();const s=o.map((t=>"param"===t.type?.5:"wildcard"===t.type?.25:1));return{child:t,trimmed:r,parsed:o,index:e,score:s}})).sort(((t,e)=>{let r="/"===t.trimmed?1:"/"===e.trimmed?-1:0;if(0!==r)return r;const o=Math.min(t.score.length,e.score.length);if(t.score.length!==e.score.length)return e.score.length-t.score.length;for(let r=0;r<o;r++)if(t.score[r]!==e.score[r])return e.score[r]-t.score[r];for(let r=0;r<o;r++)if(t.parsed[r].value!==e.parsed[r].value)return t.parsed[r].value>e.parsed[r].value?1:-1;return t.trimmed!==e.trimmed?t.trimmed>e.trimmed?1:-1:t.index-e.index})).map(((t,e)=>(t.child.rank=e,t.child)))};#o=t=>{let{pathname:e,search:r,hash:o,state:s}=this.history.location;const n=this.options.parseSearch(r);return{pathname:e,searchStr:r,search:R(t?.search,n),hash:o.split("#").reverse()[0]??"",href:`${e}${r}${o}`,state:s,key:s?.key||"__init__"}};#n=(t={})=>{t.fromCurrent=t.fromCurrent??""===t.to;const e=t.fromCurrent?this.state.location.pathname:t.from??this.state.location.pathname;let r=O(this.basepath??"/",e,`${t.to??""}`);const o={...w(this.matchRoutes(this.state.location.pathname,this.state.location.search))?.params};let s=!0===(t.params??!0)?o:b(t.params,o);s&&t.__matches?.map((t=>this.getRoute(t.routeId).options.stringifyParams)).filter(Boolean).forEach((t=>{s={...s,...t(s)}})),r=j(r,s??{});const n=t.__matches?.map((t=>this.getRoute(t.routeId).options.preSearchFilters??[])).flat().filter(Boolean)??[],a=t.__matches?.map((t=>this.getRoute(t.routeId).options.postSearchFilters??[])).flat().filter(Boolean)??[],i=n?.length?n?.reduce(((t,e)=>e(t)),this.state.location.search):this.state.location.search,c=!0===t.search?i:t.search?b(t.search,i)??{}:n?.length?i:{},h=a?.length?a.reduce(((t,e)=>e(t)),c):c,u=R(this.state.location.search,h),l=this.options.stringifySearch(u),d=!0===t.hash?this.state.location.hash:b(t.hash,this.state.location.hash),p=d?`#${d}`:"";return{pathname:r,search:u,searchStr:l,state:!0===t.state?this.state.location.state:b(t.state,this.state.location.state),hash:d,href:this.history.createHref(`${r}${l}${p}`),key:t.key}};#e=async t=>{const e=this.buildNext(t),r=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let o="replace";t.replace||(o="push");this.state.location.href===e.href&&!e.key&&(o="replace");const s=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===o?"push":"replace"](s,{id:r,...e.state}),this.resetNextScroll=t.resetScroll??!0,console.log("resetScroll",this.resetNextScroll),this.latestLoadPromise};getRouteMatch=t=>this.state.matchesById[t];setRouteMatch=(t,e)=>{this.__store.setState((r=>(r.matchesById[t]||console.warn(`No match found with id: ${t}`),{...r,matchesById:{...r.matchesById,[t]:e(r.matchesById[t])}})))};setRouteMatchData=(t,e,r)=>{const o=this.getRouteMatch(t);if(!o)return;const s=this.getRoute(o.routeId),n=r?.updatedAt??Date.now(),a=n+(r?.maxAge??s.options.preloadMaxAge??this.options.defaultPreloadMaxAge??5e3),i=n+(r?.maxAge??s.options.maxAge??this.options.defaultMaxAge??1/0);this.setRouteMatch(t,(t=>({...t,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:b(e,t.loaderData),preloadInvalidAt:a,invalidAt:i})))};invalidate=async t=>{if(t?.matchId){this.setRouteMatch(t.matchId,(t=>({...t,invalid:!0})));const e=this.state.matches.findIndex((e=>e.id===t.matchId)),r=this.state.matches[e+1];if(r)return this.invalidate({matchId:r.id,reload:!1})}else this.__store.batch((()=>{Object.values(this.state.matchesById).forEach((t=>{this.setRouteMatch(t.id,(t=>({...t,invalid:!0})))}))}));if(t?.reload??1)return this.reload()};getIsInvalid=t=>{if(!t?.matchId)return!!this.state.matches.find((e=>this.getIsInvalid({matchId:e.id,preload:t?.preload})));const e=this.getRouteMatch(t?.matchId);if(!e)return!1;const r=Date.now();return e.invalid||(t?.preload?e.preloadInvalidAt:e.invalidAt)<r}},t.RouterContext=class{constructor(){}createRootRoute=t=>new F(t)},t.RouterProvider=function({router:t,...e}){t.update(e),s.useEffect((()=>{let e;return s.startTransition((()=>{e=t.mount()})),e}),[t]);const r=t.options.Wrap||s.Fragment;return s.createElement(r,null,s.createElement(dt.Provider,{value:t},s.createElement(ft,null)))},t.ScrollRestoration=function(t){return Ot(t),null},t.SearchParamError=V,t.cleanPath=P,t.componentTypes=J,t.createBrowserHistory=m,t.createHashHistory=function(){return m({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=y,t.decode=T,t.defaultParseSearch=z,t.defaultStringifySearch=U,t.defer=function(t){const e=t;if(!e.__deferredState){e.__deferredState={uid:Math.random().toString(36).slice(2),status:"pending"};const t=e.__deferredState;e.then((e=>{t.status="success",t.data=e})).catch((e=>{t.status="error",t.error=e}))}return e},t.encode=B,t.functionalUpdate=b,t.interpolatePath=j,t.invariant=c,t.isDehydratedDeferred=it,t.isPlainObject=_,t.isRedirect=X,t.joinPaths=I,t.last=w,t.lazyFn=function(t,e){return async(...r)=>(await t())[e||"default"](...r)},t.lazyRouteComponent=function(t,e){let r;const o=()=>(r||(r=t()),r),n=s.lazy((async()=>({default:(await o())[e??"default"]})));return n.preload=o,n},t.matchByPath=k,t.matchIdsContext=lt,t.matchPathname=D,t.parsePathname=A,t.parseSearchWith=W,t.partialDeepEqual=E,t.pick=S,t.redirect=function(t){return t.isRedirect=!0,t},t.replaceEqualDeep=R,t.resolvePath=O,t.restoreScrollPositions=at,t.rootRouteId=N,t.routerContext=dt,t.shallow=function(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(e,r[o])||!Object.is(t[r[o]],e[r[o]]))return!1;return!0},t.stringifySearchWith=Y,t.trimPath=L,t.trimPathLeft=C,t.trimPathRight=M,t.useAwaited=At,t.useBlocker=Mt,t.useDehydrate=function(){const t=mt();return s.useCallback((function(e,r){return t.dehydrateData(e,r)}),[])},t.useHydrate=function(){const t=mt();return function(e){return t.hydrateData(e)}},t.useInjectHtml=function(){const t=mt();return s.useCallback((e=>{t.injectHtml(e)}),[])},t.useLinkProps=ht,t.useLoader=gt,t.useMatch=yt,t.useMatchRoute=bt,t.useMatches=function(t){const e=s.useContext(lt);return pt({select:r=>{const o=r.matches.slice(r.matches.findIndex((t=>t.id===e[0])));return t?.select?.(o)??o}})},t.useNavigate=function(t){const e=mt();return s.useCallback((r=>e.navigate({...t,...r})),[])},t.useParams=wt,t.useRouteContext=function(t){return yt({...t,select:e=>t?.select?.(e.routeContext)??e.routeContext})},t.useRouter=mt,t.useRouterContext=function(t){return yt({...t,select:e=>t?.select?.(e.context)??e.context})},t.useRouterState=pt,t.useScrollRestoration=Ot,t.useSearch=vt,t.useStore=a,t.warning=function(t,e){},t.watchScrollPositions=nt,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
const h="pushstate",u="popstate",l="beforeunload",d=t=>(t.preventDefault(),t.returnValue=""),p=()=>{removeEventListener(l,d,{capture:!0})};function f(t){let e=t.getLocation(),r=()=>{},o=new Set,s=[],n=[];const a=()=>{if(s.length)s[0]?.(a,(()=>{s=[],p()}));else{for(;n.length;)n.shift()?.();t.subscriber||c()}},i=t=>{n.push(t),a()},c=()=>{e=t.getLocation(),o.forEach((t=>t()))};return{get location(){return e},subscribe:e=>(0===o.size&&(r="function"==typeof t.subscriber?t.subscriber(c):()=>{}),o.add(e),()=>{o.delete(e),0===o.size&&r()}),push:(e,r)=>{i((()=>{t.pushState(e,r)}))},replace:(e,r)=>{i((()=>{t.replaceState(e,r)}))},go:e=>{i((()=>{t.go(e)}))},back:()=>{i((()=>{t.back()}))},forward:()=>{i((()=>{t.forward()}))},createHref:e=>t.createHref(e),block:t=>(s.push(t),1===s.length&&addEventListener(l,d,{capture:!0}),()=>{s=s.filter((e=>e!==t)),s.length||p()})}}function m(t){const e=t?.getHref??(()=>`${window.location.pathname}${window.location.search}${window.location.hash}`),r=t?.createHref??(t=>t);return f({getLocation:()=>g(e(),history.state),subscriber:t=>{window.addEventListener(h,t),window.addEventListener(u,t);var e=window.history.pushState;window.history.pushState=function(){let r=e.apply(history,arguments);return t(),r};var r=window.history.replaceState;return window.history.replaceState=function(){let e=r.apply(history,arguments);return t(),e},()=>{window.history.pushState=e,window.history.replaceState=r,window.removeEventListener(h,t),window.removeEventListener(u,t)}},pushState:(t,e)=>{window.history.pushState({...e,key:w()},"",r(t))},replaceState:(t,e)=>{window.history.replaceState({...e,key:w()},"",r(t))},back:()=>window.history.back(),forward:()=>window.history.forward(),go:t=>window.history.go(t),createHref:t=>r(t)})}function y(t={initialEntries:["/"]}){const e=t.initialEntries;let r=t.initialIndex??e.length-1,o={};return f({getLocation:()=>g(e[r],o),subscriber:!1,pushState:(t,s)=>{o={...s,key:w()},e.push(t),r++},replaceState:(t,s)=>{o={...s,key:w()},e[r]=t},back:()=>{r--},forward:()=>{r=Math.min(r+1,e.length-1)},go:t=>window.history.go(t),createHref:t=>t})}function g(t,e){let r=t.indexOf("#"),o=t.indexOf("?");return{href:t,pathname:t.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:t.length),hash:r>-1?t.substring(r):"",search:o>-1?t.slice(o,-1===r?void 0:r):"",state:e}}function w(){return(Math.random()+1).toString(36).substring(7)}function v(t){return t[t.length-1]}function b(t,e){return"function"==typeof t?t(e):t}function S(t,e){return e.reduce(((e,r)=>(e[r]=t[r],e)),{})}function x(t,e){if(t===e)return t;const r=e,o=Array.isArray(t)&&Array.isArray(r);if(o||R(t)&&R(r)){const e=o?t.length:Object.keys(t).length,s=o?r:Object.keys(r),n=s.length,a=o?[]:{};let i=0;for(let e=0;e<n;e++){const n=o?e:s[e];a[n]=x(t[n],r[n]),a[n]===t[n]&&i++}return e===n&&i===e?t:a}return r}function R(t){if(!E(t))return!1;const e=t.constructor;if(void 0===e)return!0;const r=e.prototype;return!!E(r)&&!!r.hasOwnProperty("isPrototypeOf")}function E(t){return"[object Object]"===Object.prototype.toString.call(t)}function _(t,e){return t===e||typeof t==typeof e&&(R(t)&&R(e)?!Object.keys(e).some((r=>!_(t[r],e[r]))):!(!Array.isArray(t)||!Array.isArray(e))&&(t.length===e.length&&t.every(((t,r)=>_(t,e[r])))))}function I(t){return P(t.filter(Boolean).join("/"))}function P(t){return t.replace(/\/{2,}/g,"/")}function M(t){return"/"===t?t:t.replace(/^\/{1,}/,"")}function C(t){return"/"===t?t:t.replace(/\/{1,}$/,"")}function L(t){return C(M(t))}function A(t,e,r){e=e.replace(new RegExp(`^${t}`),"/"),r=r.replace(new RegExp(`^${t}`),"/");let o=O(e);const s=O(r);s.forEach(((t,e)=>{if("/"===t.value)e?e===s.length-1&&o.push(t):o=[t];else if(".."===t.value)o.length>1&&"/"===v(o)?.value&&o.pop(),o.pop();else{if("."===t.value)return;o.push(t)}}));return P(I([t,...o.map((t=>t.value))]))}function O(t){if(!t)return[];const e=[];if("/"===(t=P(t)).slice(0,1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),!t)return e;const r=t.split("/").filter(Boolean);return e.push(...r.map((t=>"$"===t||"*"===t?{type:"wildcard",value:t}:"$"===t.charAt(0)?{type:"param",value:t}:{type:"pathname",value:t}))),"/"===t.slice(-1)&&(t=t.substring(1),e.push({type:"pathname",value:"/"})),e}function j(t,e,r=!1){return I(O(t).map((t=>{if("wildcard"===t.type){const o=e[t.value];return r?`${t.value}${o??""}`:o}return"param"===t.type?e[t.value.substring(1)]??"":t.value})))}function D(t,e,r){const o=k(t,e,r);if(!r.to||o)return o??{}}function k(t,e,r){e="/"!=t?e.substring(t.length):e;const o=`${r.to??"$"}`,s=O(e),n=O(o);e.startsWith("/")||s.unshift({type:"pathname",value:"/"}),o.startsWith("/")||n.unshift({type:"pathname",value:"/"});const a={};return(()=>{for(let t=0;t<Math.max(s.length,n.length);t++){const e=s[t],o=n[t],i=t>=s.length-1,c=t>=n.length-1;if(o){if("wildcard"===o.type)return!!e?.value&&(a["*"]=I(s.slice(t).map((t=>t.value))),!0);if("pathname"===o.type){if("/"===o.value&&!e?.value)return!0;if(e)if(r.caseSensitive){if(o.value!==e.value)return!1}else if(o.value.toLowerCase()!==e.value.toLowerCase())return!1}if(!e)return!1;if("param"===o.type){if("/"===e?.value)return!1;"$"!==e.value.charAt(0)&&(a[o.value.substring(1)]=e.value)}}if(!i&&c)return!!r.fuzzy}return!0})()?a:void 0}function B(t,e){var r,o,s,n="";for(r in t)if(void 0!==(s=t[r]))if(Array.isArray(s))for(o=0;o<s.length;o++)n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s[o]);else n&&(n+="&"),n+=encodeURIComponent(r)+"="+encodeURIComponent(s);return(e||"")+n}function T(t){if(!t)return"";var e=decodeURIComponent(t);return"false"!==e&&("true"===e||(0*+e==0&&+e+""===e?+e:e))}function $(t){for(var e,r,o={},s=t.split("&");e=s.shift();)void 0!==o[r=(e=e.split("=")).shift()]?o[r]=[].concat(o[r],T(e.shift())):o[r]=T(e.shift());return o}const H="__root__";class N{constructor(t){this.options=t||{},this.isRoot=!t?.getParentRoute,N.__onInit(this)}init=t=>{this.originalIndex=t.originalIndex,this.router=t.router;const e=this.options,r=!e?.path&&!e?.id;this.parentRoute=this.options?.getParentRoute?.(),r?this.path=H:c(this.parentRoute);let o=r?H:e.path;o&&"/"!==o&&(o=L(o));const s=e?.id||o;let n=r?H:I([this.parentRoute.id===H?"":this.parentRoute.id,s]);o===H&&(o="/"),n!==H&&(n=I(["/",n]));const a=n===H?"/":I([this.parentRoute.fullPath,o]);this.path=o,this.id=n,this.fullPath=a,this.to=a};addChildren=t=>(this.children=t,this);update=t=>(Object.assign(this.options,t),this);static __onInit=t=>{}}class F extends N{constructor(t){super(t)}}const W=U(JSON.parse),z=Y(JSON.stringify,JSON.parse);function U(t){return e=>{"?"===e.substring(0,1)&&(e=e.substring(1));let r=$(e);for(let e in r){const o=r[e];if("string"==typeof o)try{r[e]=t(o)}catch(t){}}return r}}function Y(t,e){function r(r){if("object"==typeof r&&null!==r)try{return t(r)}catch(t){}else if("string"==typeof r&&"function"==typeof e)try{return e(r),t(r)}catch(t){}return r}return t=>{(t={...t})&&Object.keys(t).forEach((e=>{const o=t[e];void 0===o||void 0===o?delete t[e]:Array.isArray(o)?t[e]=o.map(r):t[e]=r(o)}));const e=B(t).toString();return e?`?${e}`:""}}const J=["component","errorComponent","pendingComponent"],q="visibilitychange",K="focus";const X="undefined"==typeof window||!window.document.createElement;function V(){return{status:"idle",isFetching:!1,resolvedLocation:null,location:null,matchesById:{},matchIds:[],pendingMatchIds:[],matches:[],pendingMatches:[],lastUpdated:Date.now()}}function G(t){return!!t?.isRedirect}class Q extends Error{}class Z extends Error{}function tt(t,e){const r=Date.now();return!!t.invalid||(e?.preload?!(t.preloadMaxAge<0)&&t.updatedAt+t.preloadMaxAge<r:!(t.maxAge<0)&&t.updatedAt+t.maxAge<r)}const et="window",rt="___";let ot,st={},nt=!1;const at="undefined"!=typeof window&&window.sessionStorage,it=t=>t.key;function ct(t,e){const r=e?.getKey||it;at&&(ot||(ot=(()=>{const t="tsr-scroll-restoration-v1",e=JSON.parse(window.sessionStorage.getItem(t)||"{}");return{current:e,set:(r,o)=>{e[r]=o,window.sessionStorage.setItem(t,JSON.stringify(ot))}}})()));const{history:o}=window;o.scrollRestoration&&(o.scrollRestoration="manual");const s=e=>{const o=r(t.state.resolvedLocation);st[o]||(st[o]=new WeakSet);const s=st[o];if(s.has(e.target))return;s.add(e.target);const a=[o,e.target===document||e.target===window?et:n(e.target)].join(rt);ot.current[a]||ot.set(a,{scrollX:NaN,scrollY:NaN})},n=t=>{let e,r=[];for(;e=t.parentNode;)r.unshift(`${t.tagName}:nth-child(${[].indexOf.call(e.children,t)+1})`),t=e;return`${r.join(" > ")}`.toLowerCase()};"undefined"!=typeof document&&document.addEventListener("scroll",s,!0);const a=t.subscribe("onBeforeLoad",(t=>{t.pathChanged&&(t=>{const e=r(t);for(const t in ot.current){const r=ot.current[t],[o,s]=t.split(rt);if(e===o){if(s===et)r.scrollX=window.scrollX||0,r.scrollY=window.scrollY||0;else if(s){const t=document.querySelector(s);r.scrollX=t?.scrollLeft||0,r.scrollY=t?.scrollTop||0}ot.set(t,r)}}})(t.from)})),i=t.subscribe("onLoad",(t=>{t.pathChanged&&(nt=!0)}));return()=>{document.removeEventListener("scroll",s),a(),i()}}function ht(t,e){if(nt){if(!t.resetNextScroll)return;nt=!1;const r=(e?.getKey||it)(t.state.location);let o=!1;for(const t in ot.current){const e=ot.current[t],[s,n]=t.split(rt);if(s===r)if(n===et)o=!0,window.scrollTo(e.scrollX,e.scrollY);else if(n){const t=document.querySelector(n);t&&(t.scrollLeft=e.scrollX,t.scrollTop=e.scrollY)}}o||window.scrollTo(0,0)}}function ut(t){return"object"==typeof t&&null!==t&&!(t instanceof Promise)&&!t.then&&"__deferredState"in t}function lt(){return lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},lt.apply(this,arguments)}function dt(t){const e=wt(),{type:r,children:o,target:n,activeProps:a=(()=>({className:"active"})),inactiveProps:i=(()=>({})),activeOptions:c,disabled:h,hash:u,search:l,params:d,to:p=".",preload:f,preloadDelay:m,replace:y,style:g,className:w,onClick:v,onFocus:S,onMouseEnter:x,onMouseLeave:R,onTouchStart:E,..._}=t,I=e.buildLink(t);if("external"===I.type){const{href:t}=I;return{href:t}}const{handleClick:P,handleFocus:M,handleEnter:C,handleLeave:L,handleTouchStart:A,isActive:O,next:j}=I,D=t=>e=>{e.persist&&e.persist(),t.filter(Boolean).forEach((t=>{e.defaultPrevented||t(e)}))},k=O?b(a,{})??{}:{},B=O?{}:b(i,{})??{};return{...k,...B,..._,href:h?void 0:j.href,onClick:D([v,e=>{(t.startTransition??1)&&(s.startTransition||(t=>t))((()=>{P(e)}))}]),onFocus:D([S,M]),onMouseEnter:D([x,C]),onMouseLeave:D([R,L]),onTouchStart:D([E,A]),target:n,style:{...g,...k.style,...B.style},className:[w,k.className,B.className].filter(Boolean).join(" ")||void 0,...h?{role:"link","aria-disabled":!0}:void 0,"data-status":O?"active":void 0}}N.__onInit=t=>{Object.assign(t,{useMatch:(e={})=>vt({...e,from:t.id}),useLoader:(e={})=>bt({...e,from:t.id}),useContext:(e={})=>vt({...e,from:t.id,select:t=>e?.select?.(t.context)??t.context}),useRouteContext:(e={})=>vt({...e,from:t.id,select:t=>e?.select?.(t.routeContext)??t.routeContext}),useSearch:(e={})=>St({...e,from:t.id}),useParams:(e={})=>xt({...e,from:t.id})})};const pt=s.forwardRef(((t,e)=>{const r=dt(t);return s.createElement("a",lt({ref:e},r,{children:"function"==typeof t.children?t.children({isActive:"active"===r["data-status"]}):t.children}))}));const ft=s.createContext(null),mt=s.createContext(null);function yt(t){return a(wt().__store,t?.select)}function gt(){const t=wt(),e=yt({select:e=>e.pendingMatches.some((e=>!!t.getRoute(e.routeId)?.options.pendingComponent))?e.pendingMatchIds:e.matchIds});return s.createElement(ft.Provider,{value:[void 0,...e]},s.createElement(Ct,{errorComponent:At,route:t.getRoute(H),onCatch:()=>{}},s.createElement(Et,null)))}function wt(){return s.useContext(mt)}function vt(t){const e=wt(),r=s.useContext(ft)[0],o=e.getRouteMatch(r)?.routeId,n=yt({select:e=>{const o=e.matches;return(t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r))).routeId}});(t?.strict??1)&&c(o==n);return yt({select:e=>{const o=e.matches,s=t?.from?o.find((e=>e.routeId===t?.from)):o.find((t=>t.id===r));return c(s,t?.from&&t.from),t?.select?.(s)??s}})}function bt(t){return vt({...t,select:e=>t?.select?.(e.loaderData)??e.loaderData})}function St(t){return vt({...t,select:e=>t?.select?.(e.search)??e.search})}function xt(t){return yt({select:e=>{const r=v(e.matches)?.params;return t?.select?.(r)??r}})}function Rt(){const t=wt();return s.useCallback((e=>{const{pending:r,caseSensitive:o,...s}=e;return t.matchRoute(s,{pending:r,caseSensitive:o})}),[])}function Et(){const t=s.useContext(ft).slice(1);return t[0]?s.createElement(It,{matchIds:t}):null}const _t=()=>null;function It({matchIds:t}){const e=wt(),r=t[0],o=e.getRouteMatch(r).routeId,n=e.getRoute(o),a=n.options.pendingComponent??e.options.defaultPendingComponent??_t,i=n.options.errorComponent??e.options.defaultErrorComponent??At,c=n.options.wrapInSuspense??!n.isRoot?s.Suspense:Mt,h=i?Ct:Mt;return s.createElement(ft.Provider,{value:t},s.createElement(c,{fallback:s.createElement(a,{useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams})},s.createElement(h,{key:n.id,errorComponent:i,route:n,onCatch:()=>{}},s.createElement(Pt,{matchId:r,PendingComponent:a}))))}function Pt({matchId:t,PendingComponent:e}){const r=wt(),o=yt({select:e=>S(e.matchesById[t],["status","loadPromise","routeId","error"])}),n=r.getRoute(o.routeId);if("error"===o.status)throw o.error;if("pending"===o.status)return s.createElement(e,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams});if("success"===o.status){let t=n.options.component??r.options.defaultComponent;return t?s.createElement(t,{useLoader:n.useLoader,useMatch:n.useMatch,useContext:n.useContext,useRouteContext:n.useRouteContext,useSearch:n.useSearch,useParams:n.useParams}):s.createElement(Et,null)}c(!1)}function Mt(t){return s.createElement(s.Fragment,null,t.children)}class Ct extends s.Component{state={error:!1,info:void 0};componentDidCatch(t,e){this.props.onCatch(t,e),this.setState({error:t,info:e})}render(){return s.createElement(Lt,lt({},this.props,{errorState:this.state,reset:()=>this.setState({})}))}}function Lt(t){const e=yt({select:t=>t.resolvedLocation.key}),[r,o]=s.useState(t.errorState),n=t.errorComponent??At,a=s.useRef("");return s.useEffect((()=>{r&&e!==a.current&&o({}),a.current=e}),[r,e]),s.useEffect((()=>{t.errorState.error&&o(t.errorState)}),[t.errorState.error]),t.errorState.error&&r.error?s.createElement(n,{...r,useMatch:t.route.useMatch,useContext:t.route.useContext,useRouteContext:t.route.useRouteContext,useSearch:t.route.useSearch,useParams:t.route.useParams}):t.children}function At({error:t}){const[e,r]=s.useState(!1);return s.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},s.createElement("div",{style:{display:"flex",alignItems:"center",gap:".5rem"}},s.createElement("strong",{style:{fontSize:"1rem"}},"Something went wrong!"),s.createElement("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>r((t=>!t))},e?"Hide Error":"Show Error")),s.createElement("div",{style:{height:".25rem"}}),e?s.createElement("div",null,s.createElement("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"}},t.message?s.createElement("code",null,t.message):null)):null)}function Ot(t,e=!0){const r=wt();s.useEffect((()=>{if(!e)return;let o=r.history.block(((e,r)=>{window.confirm(t)&&(o(),e())}));return o}))}const jt="undefined"!=typeof window?s.useLayoutEffect:s.useEffect;function Dt(t){const e=wt();jt((()=>ct(e,t)),[]),jt((()=>{ht(e,t)}))}function kt({promise:t}){const e=wt();let r=t.__deferredState;const o=`__TSR__DEFERRED__${r.uid}`;if(ut(t)&&(r=e.hydrateData(o),(t=Promise.resolve(r.data)).__deferredState=r),"pending"===r.status)throw t;if("error"===r.status)throw r.error;return e.dehydrateData(o,r),[r.data]}t.Await=function(t){const e=kt(t);return t.children(...e)},t.Block=function({message:t,condition:e,children:r}){return Ot(t,e),r??null},t.ErrorComponent=At,t.FileRoute=class{constructor(t){this.path=t}createRoute=t=>{const e=new N(t);return e.isRoot=!1,e}},t.Link=pt,t.MatchRoute=function(t){const e=Rt()(t);return"function"==typeof t.children?t.children(e):e?t.children:null},t.Navigate=function(t){const e=wt();return s.useLayoutEffect((()=>{e.navigate(t)}),[]),null},t.Outlet=Et,t.PathParamError=Z,t.RootRoute=F,t.Route=N,t.Router=class{#t;resetNextScroll=!1;constructor(t){this.options={defaultPreloadDelay:50,context:void 0,...t,stringifySearch:t?.stringifySearch??z,parseSearch:t?.parseSearch??W},this.__store=new n(V(),{onUpdate:()=>{const t=this.state,e=this.__store.state,r=t.matchesById!==e.matchesById;let o,s;r||(o=t.matchIds.length!==e.matchIds.length||t.matchIds.some(((t,r)=>t!==e.matchIds[r])),s=t.pendingMatchIds.length!==e.pendingMatchIds.length||t.pendingMatchIds.some(((t,r)=>t!==e.pendingMatchIds[r]))),(r||o)&&(e.matches=e.matchIds.map((t=>e.matchesById[t]))),(r||s)&&(e.pendingMatches=e.pendingMatchIds.map((t=>e.matchesById[t]))),e.isFetching=[...e.matches,...e.pendingMatches].some((t=>t.isFetching)),this.state=e},defaultPriority:"low"}),this.state=this.__store.state,this.update(t);const e=this.buildNext({hash:!0,fromCurrent:!0,search:!0,state:!0});this.state.location.href!==e.href&&this.#e({...e,replace:!0})}subscribers=new Set;subscribe=(t,e)=>{const r={eventType:t,fn:e};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}};#r=t=>{this.subscribers.forEach((e=>{e.eventType===t.type&&e.fn(t)}))};reset=()=>{this.__store.setState((t=>Object.assign(t,V())))};mount=()=>("undefined"!=typeof window&&window.addEventListener&&(window.addEventListener(q,this.#o,!1),window.addEventListener(K,this.#o,!1)),this.safeLoad(),()=>{"undefined"!=typeof window&&window.removeEventListener&&(window.removeEventListener(q,this.#o),window.removeEventListener(K,this.#o))});#o=()=>{(this.options.refetchOnWindowFocus??1)&&this.reload()};update=t=>{if(this.options={...this.options,...t,context:{...this.options.context,...t?.context}},!this.history||this.options.history&&this.options.history!==this.history){this.#t&&this.#t(),this.history=this.options.history??(X?y():m());const t=this.#s();this.__store.setState((e=>({...e,resolvedLocation:t,location:t}))),this.#t=this.history.subscribe((()=>{this.safeLoad({next:this.#s(this.state.location)})}))}const{basepath:e,routeTree:r}=this.options;return this.basepath=`/${L(e??"")??""}`,r&&r!==this.routeTree&&this.#n(r),this};buildNext=t=>{const e=this.#a(t),r=this.matchRoutes(e.pathname,e.search);return this.#a({...t,__matches:r})};cancelMatches=()=>{this.state.matches.forEach((t=>{this.cancelMatch(t.id)}))};cancelMatch=t=>{this.getRouteMatch(t)?.abortController?.abort()};safeLoad=async t=>{try{return this.load(t)}catch(t){}};latestLoadPromise=Promise.resolve();load=async t=>{const e=new Promise((async(r,o)=>{const s=this.state.resolvedLocation,n=!(!t?.next||s.href===t.next.href);let a;const i=()=>this.latestLoadPromise!==e?this.latestLoadPromise:void 0;let c;this.#r({type:"onBeforeLoad",from:s,to:t?.next??this.state.location,pathChanged:n}),this.__store.batch((()=>{t?.next&&this.__store.setState((e=>({...e,location:t.next}))),c=this.matchRoutes(this.state.location.pathname,this.state.location.search,{throwOnError:t?.throwOnError,debug:!0}),this.__store.setState((t=>({...t,status:"pending",pendingMatchIds:c.map((t=>t.id)),matchesById:this.#i(t.matchesById,c)})))}));try{try{await this.loadMatches(c)}catch(t){}if(a=i())return a;const t=this.state.matchIds.filter((t=>!this.state.pendingMatchIds.includes(t))),e=this.state.pendingMatchIds.filter((t=>!this.state.matchIds.includes(t))),o=this.state.matchIds.filter((t=>this.state.pendingMatchIds.includes(t)));this.__store.setState((t=>({...t,status:"idle",resolvedLocation:t.location,matchIds:t.pendingMatchIds,pendingMatchIds:[]}))),[[t,"onLeave"],[e,"onEnter"],[o,"onTransition"]].forEach((([t,e])=>{t.forEach((t=>{const r=this.getRouteMatch(t);this.getRoute(r.routeId).options[e]?.(r)}))})),this.#r({type:"onLoad",from:s,to:this.state.location,pathChanged:n}),r()}catch(t){if(a=i())return a;o(t)}}));return this.latestLoadPromise=e,this.latestLoadPromise.then((()=>{this.cleanMatches()})),this.latestLoadPromise};#i=(t,e)=>{const r={...t};let o=!1;return e.forEach((t=>{r[t.id]||(o=!0,r[t.id]=t)})),o?r:t};getRoute=t=>{const e=this.routesById[t];return c(e),e};preloadRoute=async(t=this.state.location)=>{const e=this.buildNext(t),r=this.matchRoutes(e.pathname,e.search,{throwOnError:!0});return this.__store.setState((t=>({...t,matchesById:this.#i(t.matchesById,r)}))),await this.loadMatches(r,{preload:!0,maxAge:t.maxAge}),r};cleanMatches=()=>{const t=Date.now(),e=Object.values(this.state.matchesById).filter((e=>{const r=this.getRoute(e.routeId);return!(this.state.matchIds.includes(e.id)||this.state.pendingMatchIds.includes(e.id)||e.preloadMaxAge>-1&&!(e.updatedAt+e.preloadMaxAge<t)||r.options.gcMaxAge&&!(e.updatedAt+r.options.gcMaxAge<t))})).map((t=>t.id));e.length&&this.__store.setState((t=>{const r={...t.matchesById};return e.forEach((t=>{delete r[t]})),{...t,matchesById:r}}))};matchRoutes=(t,e,r)=>{let o={},s=this.flatRoutes.find((e=>{const r=D(this.basepath,C(t),{to:e.fullPath,caseSensitive:e.options.caseSensitive??this.options.caseSensitive});return!!r&&(o=r,!0)}))||this.routesById.__root__,n=[s];for(;s?.parentRoute;)s=s.parentRoute,s&&n.unshift(s);const a=n.map((t=>{let e;if(t.options.parseParams)try{const e=t.options.parseParams(o);Object.assign(o,e)}catch(t){if(e=new Z(t.message,{cause:t}),r?.throwOnError)throw e;return e}})),i=n.map(((t,r)=>{const s=j(t.path,o),n=t.options.key?t.options.key({params:o,search:e})??"":"",i=n?JSON.stringify(n):"",c=j(t.id,o,!0)+i,h=this.getRouteMatch(c);if(h)return{...h};const u=!(!t.options.loader&&!J.some((e=>t.options[e]?.preload)));return{id:c,key:i,routeId:t.id,params:o,pathname:I([this.basepath,s]),updatedAt:Date.now(),maxAge:-1,preloadMaxAge:-1,routeSearch:{},search:{},status:u?"pending":"success",isFetching:!1,invalid:!1,error:void 0,paramsError:a[r],searchError:void 0,loaderData:void 0,loadPromise:Promise.resolve(),routeContext:void 0,context:void 0,abortController:new AbortController,fetchedAt:0}}));return i.forEach(((t,o)=>{const s=i[o-1],n=this.getRoute(t.routeId),a=(()=>{const o={search:s?.search??e,routeSearch:s?.routeSearch??e};try{const e=("object"==typeof n.options.validateSearch?n.options.validateSearch.parse:n.options.validateSearch)?.(o.search)??{},r={...o.search,...e};return{routeSearch:x(t.routeSearch,e),search:x(t.search,r)}}catch(e){if(t.searchError=new Q(e.message,{cause:e}),r?.throwOnError)throw t.searchError;return o}})();Object.assign(t,{...a});const c=(()=>{try{const e=n.options.getContext?.({parentContext:s?.routeContext??{},context:s?.context??this?.options.context??{},params:t.params,search:t.search})||{};return{context:{...s?.context??this?.options.context,...e},routeContext:e}}catch(t){throw n.options.onError?.(t),t}})();Object.assign(t,{...c})})),i};loadMatches=async(t,e)=>{let r;e?.preload?this.cleanMatches():t.forEach((t=>{this.setRouteMatch(t.id,(e=>({...e,routeSearch:t.routeSearch,search:t.search,routeContext:t.routeContext,context:t.context,error:t.error,paramsError:t.paramsError,searchError:t.searchError,params:t.params,preloadMaxAge:0})))}));try{for(const[o,s]of t.entries()){const t=this.getRoute(s.routeId),n=(e,n)=>{if(e.routerCode=n,r=r??o,G(e))throw e;try{t.options.onError?.(e)}catch(t){if(e=t,G(t))throw t}this.setRouteMatch(s.id,(t=>({...t,error:e,status:"error",updatedAt:Date.now()})))};s.paramsError&&n(s.paramsError,"PARSE_PARAMS"),s.searchError&&n(s.searchError,"VALIDATE_SEARCH");let a=!1;try{await(t.options.beforeLoad?.({...s,preload:!!e?.preload}))}catch(t){n(t,"BEFORE_LOAD"),a=!0}if(a)break}}catch(t){throw e?.preload||this.navigate(t),t}const o=t.slice(0,r),s=[];o.forEach(((t,r)=>{s.push((async()=>{const o=s[r-1],n=this.getRoute(t.routeId);if(t.isFetching||"success"===t.status&&!tt(t,{preload:e?.preload}))return this.getRouteMatch(t.id)?.loadPromise;const a=Date.now(),i=()=>{const e=this.getRouteMatch(t.id);return e&&e.fetchedAt!==a?e.loadPromise:void 0},c=t=>!!G(t)&&(e?.preload||this.navigate(t),!0),h=async()=>{let r;try{const s=Promise.all(J.map((async t=>{const e=n.options[t];e?.preload&&await e.preload()}))),a=n.options.loader?.({...t,preload:!!e?.preload,parentMatchPromise:o}),[c,h]=await Promise.all([s,a]);if(r=i())return await r;this.setRouteMatchData(t.id,(()=>h),e)}catch(e){if(r=i())return await r;if(c(e))return;try{n.options.onError?.(e)}catch(t){if(e=t,c(t))return}this.setRouteMatch(t.id,(t=>({...t,error:e,status:"error",isFetching:!1,updatedAt:Date.now()})))}};let u;this.__store.batch((()=>{this.setRouteMatch(t.id,(t=>({...t,isFetching:!0,fetchedAt:a,invalid:!1}))),u=h(),this.setRouteMatch(t.id,(t=>({...t,loadPromise:u})))})),await u})())})),await Promise.all(s)};reload=()=>this.navigate({fromCurrent:!0,replace:!0,search:!0});resolvePath=(t,e)=>A(this.basepath,t,P(e));navigate=async({from:t,to:e="",search:r,hash:o,replace:s,params:n,resetScroll:a})=>{const i=String(e),h=void 0===t?t:String(t);let u;try{new URL(`${i}`),u=!0}catch(t){}return c(!u),this.#e({from:h,to:i,search:r,hash:o,replace:s,params:n,resetScroll:a})};matchRoute=(t,e)=>{t={...t,to:t.to?this.resolvePath(t.from??"",t.to):void 0};const r=this.buildNext(t);if(e?.pending&&"pending"!==this.state.status)return!1;const o=e?.pending?this.state.location:this.state.resolvedLocation;if(!o)return!1;const s=D(this.basepath,o.pathname,{...e,to:r.pathname});return!!s&&(e?.includeSearch??1?!!_(o.search,r.search)&&s:s)};buildLink=({from:t,to:e=".",search:r,params:o,hash:s,target:n,replace:a,activeOptions:i,preload:c,preloadDelay:h,disabled:u,state:l,resetScroll:d})=>{try{return new URL(`${e}`),{type:"external",href:e}}catch(t){}const p={from:t,to:e,search:r,params:o,hash:s,replace:a,state:l,resetScroll:d},f=this.buildNext(p);c=c??this.options.defaultPreload;const m=h??this.options.defaultPreloadDelay??0,y=this.state.location.pathname.split("/"),g=f.pathname.split("/").every(((t,e)=>t===y[e])),w=i?.exact?this.state.location.pathname===f.pathname:g,v=!i?.includeHash||this.state.location.hash===f.hash,b=!(i?.includeSearch??1)||_(this.state.location.search,f.search);return{type:"internal",next:f,handleFocus:t=>{c&&this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},handleClick:t=>{u||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||t.defaultPrevented||n&&"_self"!==n||0!==t.button||(t.preventDefault(),this.#e(p))},handleEnter:t=>{const e=t.target||{};if(c){if(e.preloadTimeout)return;e.preloadTimeout=setTimeout((()=>{e.preloadTimeout=null,this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))}),m)}},handleLeave:t=>{const e=t.target||{};e.preloadTimeout&&(clearTimeout(e.preloadTimeout),e.preloadTimeout=null)},handleTouchStart:t=>{this.preloadRoute(p).catch((t=>{console.warn(t),console.warn("Error preloading route! ☝️")}))},isActive:w&&v&&b,disabled:u}};dehydrate=()=>({state:{dehydratedMatches:this.state.matches.map((t=>S(t,["fetchedAt","invalid","preloadMaxAge","maxAge","id","loaderData","status","updatedAt"])))}});hydrate=async t=>{let e=t;"undefined"!=typeof document&&(e=window.__TSR_DEHYDRATED__),c(e);const r=e;this.dehydratedData=r.payload,this.options.hydrate?.(r.payload);const{dehydratedMatches:o}=r.router.state;let s=this.matchRoutes(this.state.location.pathname,this.state.location.search).map((t=>{const e=o.find((e=>e.id===t.id));return c(e,t.id),e?{...t,...e}:t}));this.__store.setState((t=>({...t,matches:s,matchesById:this.#i(t.matchesById,s)})))};injectedHtml=[];injectHtml=async t=>{this.injectedHtml.push(t)};dehydrateData=(t,e)=>{if("undefined"==typeof document){const r="string"==typeof t?t:JSON.stringify(t);return this.injectHtml((async()=>{const t=`__TSR_DEHYDRATED__${r}`,o="function"==typeof e?await e():e;return`<script id='${t}' suppressHydrationWarning>window["__TSR_DEHYDRATED__${s=r,s.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}"] = ${JSON.stringify(o)}\n // ;(() => {\n // var el = document.getElementById('${t}')\n // el.parentElement.removeChild(el)\n // })()\n <\/script>`;var s})),()=>this.hydrateData(t)}return()=>{}};hydrateData=t=>{if("undefined"!=typeof document){const e="string"==typeof t?t:JSON.stringify(t);return window[`__TSR_DEHYDRATED__${e}`]}};#n=t=>{this.routeTree=t,this.routesById={},this.routesByPath={},this.flatRoutes=[];const e=t=>{t.forEach(((t,r)=>{t.init({originalIndex:r,router:this});if(c(!this.routesById[t.id],String(t.id)),this.routesById[t.id]=t,!t.isRoot&&t.path){const e=C(t.fullPath);this.routesByPath[e]&&!t.fullPath.endsWith("/")||(this.routesByPath[e]=t)}const o=t.children;o?.length&&e(o)}))};e([t]),this.flatRoutes=Object.values(this.routesByPath).map(((t,e)=>{const r=L(t.fullPath),o=O(r);for(;o.length>1&&"/"===o[0]?.value;)o.shift();const s=o.map((t=>"param"===t.type?.5:"wildcard"===t.type?.25:1));return{child:t,trimmed:r,parsed:o,index:e,score:s}})).sort(((t,e)=>{let r="/"===t.trimmed?1:"/"===e.trimmed?-1:0;if(0!==r)return r;const o=Math.min(t.score.length,e.score.length);if(t.score.length!==e.score.length)return e.score.length-t.score.length;for(let r=0;r<o;r++)if(t.score[r]!==e.score[r])return e.score[r]-t.score[r];for(let r=0;r<o;r++)if(t.parsed[r].value!==e.parsed[r].value)return t.parsed[r].value>e.parsed[r].value?1:-1;return t.trimmed!==e.trimmed?t.trimmed>e.trimmed?1:-1:t.index-e.index})).map(((t,e)=>(t.child.rank=e,t.child)))};#s=t=>{let{pathname:e,search:r,hash:o,state:s}=this.history.location;const n=this.options.parseSearch(r);return{pathname:e,searchStr:r,search:x(t?.search,n),hash:o.split("#").reverse()[0]??"",href:`${e}${r}${o}`,state:s,key:s?.key||"__init__"}};#a=(t={})=>{t.fromCurrent=t.fromCurrent??""===t.to;const e=t.fromCurrent?this.state.location.pathname:t.from??this.state.location.pathname;let r=A(this.basepath??"/",e,`${t.to??""}`);const o={...v(this.matchRoutes(this.state.location.pathname,this.state.location.search))?.params};let s=!0===(t.params??!0)?o:b(t.params,o);s&&t.__matches?.map((t=>this.getRoute(t.routeId).options.stringifyParams)).filter(Boolean).forEach((t=>{s={...s,...t(s)}})),r=j(r,s??{});const n=t.__matches?.map((t=>this.getRoute(t.routeId).options.preSearchFilters??[])).flat().filter(Boolean)??[],a=t.__matches?.map((t=>this.getRoute(t.routeId).options.postSearchFilters??[])).flat().filter(Boolean)??[],i=n?.length?n?.reduce(((t,e)=>e(t)),this.state.location.search):this.state.location.search,c=!0===t.search?i:t.search?b(t.search,i)??{}:n?.length?i:{},h=a?.length?a.reduce(((t,e)=>e(t)),c):c,u=x(this.state.location.search,h),l=this.options.stringifySearch(u),d=!0===t.hash?this.state.location.hash:b(t.hash,this.state.location.hash),p=d?`#${d}`:"";return{pathname:r,search:u,searchStr:l,state:!0===t.state?this.state.location.state:b(t.state,this.state.location.state),hash:d,href:this.history.createHref(`${r}${l}${p}`),key:t.key}};#e=async t=>{const e=this.buildNext(t),r=""+Date.now()+Math.random();this.navigateTimeout&&clearTimeout(this.navigateTimeout);let o="replace";t.replace||(o="push");this.state.location.href===e.href&&!e.key&&(o="replace");const s=`${e.pathname}${e.searchStr}${e.hash?`#${e.hash}`:""}`;return this.history["push"===o?"push":"replace"](s,{id:r,...e.state}),this.resetNextScroll=t.resetScroll??!0,this.latestLoadPromise};getRouteMatch=t=>this.state.matchesById[t];setRouteMatch=(t,e)=>{this.__store.setState((r=>(r.matchesById[t]||console.warn(`No match found with id: ${t}`),{...r,matchesById:{...r.matchesById,[t]:e(r.matchesById[t])}})))};setRouteMatchData=(t,e,r)=>{const o=this.getRouteMatch(t);if(!o)return;const s=this.getRoute(o.routeId),n=r?.updatedAt??Date.now(),a=r?.maxAge??s.options.preloadMaxAge??this.options.defaultPreloadMaxAge??5e3,i=r?.maxAge??s.options.maxAge??this.options.defaultMaxAge??-1;this.setRouteMatch(t,(t=>({...t,error:void 0,status:"success",isFetching:!1,updatedAt:n,loaderData:b(e,t.loaderData),preloadMaxAge:a,maxAge:i})))};invalidate=async t=>{if(t?.matchId){this.setRouteMatch(t.matchId,(t=>({...t,invalid:!0})));const e=this.state.matches.findIndex((e=>e.id===t.matchId)),r=this.state.matches[e+1];if(r)return this.invalidate({matchId:r.id,reload:!1})}else this.__store.batch((()=>{Object.values(this.state.matchesById).forEach((t=>{this.setRouteMatch(t.id,(t=>({...t,invalid:!0})))}))}));if(t?.reload??1)return this.reload()}},t.RouterContext=class{constructor(){}createRootRoute=t=>new F(t)},t.RouterProvider=function({router:t,...e}){t.update(e),s.useEffect((()=>{let e;return s.startTransition((()=>{e=t.mount()})),e}),[t]);const r=t.options.Wrap||s.Fragment;return s.createElement(r,null,s.createElement(mt.Provider,{value:t},s.createElement(gt,null)))},t.ScrollRestoration=function(t){return Dt(t),null},t.SearchParamError=Q,t.cleanPath=P,t.componentTypes=J,t.createBrowserHistory=m,t.createHashHistory=function(){return m({getHref:()=>window.location.hash.substring(1),createHref:t=>`#${t}`})},t.createMemoryHistory=y,t.decode=$,t.defaultParseSearch=W,t.defaultStringifySearch=z,t.defer=function(t){const e=t;if(!e.__deferredState){e.__deferredState={uid:Math.random().toString(36).slice(2),status:"pending"};const t=e.__deferredState;e.then((e=>{t.status="success",t.data=e})).catch((e=>{t.status="error",t.error=e}))}return e},t.encode=B,t.functionalUpdate=b,t.interpolatePath=j,t.invariant=c,t.isDehydratedDeferred=ut,t.isMatchInvalid=tt,t.isPlainObject=R,t.isRedirect=G,t.joinPaths=I,t.last=v,t.lazyFn=function(t,e){return async(...r)=>(await t())[e||"default"](...r)},t.lazyRouteComponent=function(t,e){let r;const o=()=>(r||(r=t()),r),n=s.lazy((async()=>({default:(await o())[e??"default"]})));return n.preload=o,n},t.matchByPath=k,t.matchIdsContext=ft,t.matchPathname=D,t.parsePathname=O,t.parseSearchWith=U,t.partialDeepEqual=_,t.pick=S,t.redirect=function(t){return t.isRedirect=!0,t},t.replaceEqualDeep=x,t.resolvePath=A,t.restoreScrollPositions=ht,t.rootRouteId=H,t.routerContext=mt,t.shallow=function(t,e){if(Object.is(t,e))return!0;if("object"!=typeof t||null===t||"object"!=typeof e||null===e)return!1;const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!1;for(let o=0;o<r.length;o++)if(!Object.prototype.hasOwnProperty.call(e,r[o])||!Object.is(t[r[o]],e[r[o]]))return!1;return!0},t.stringifySearchWith=Y,t.trimPath=L,t.trimPathLeft=M,t.trimPathRight=C,t.useAwaited=kt,t.useBlocker=Ot,t.useDehydrate=function(){const t=wt();return s.useCallback((function(e,r){return t.dehydrateData(e,r)}),[])},t.useHydrate=function(){const t=wt();return function(e){return t.hydrateData(e)}},t.useInjectHtml=function(){const t=wt();return s.useCallback((e=>{t.injectHtml(e)}),[])},t.useLinkProps=dt,t.useLoader=bt,t.useMatch=vt,t.useMatchRoute=Rt,t.useMatches=function(t){const e=s.useContext(ft);return yt({select:r=>{const o=r.matches.slice(r.matches.findIndex((t=>t.id===e[0])));return t?.select?.(o)??o}})},t.useNavigate=function(t){const e=wt();return s.useCallback((r=>e.navigate({...t,...r})),[])},t.useParams=xt,t.useRouteContext=function(t){return vt({...t,select:e=>t?.select?.(e.routeContext)??e.routeContext})},t.useRouter=wt,t.useRouterContext=function(t){return vt({...t,select:e=>t?.select?.(e.context)??e.context})},t.useRouterState=yt,t.useScrollRestoration=Dt,t.useSearch=St,t.useStore=a,t.warning=function(t,e){},t.watchScrollPositions=ct,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.production.js.map |
{ | ||
"name": "@tanstack/react-router", | ||
"author": "Tanner Linsley", | ||
"version": "0.0.1-beta.174", | ||
"version": "0.0.1-beta.175", | ||
"license": "MIT", | ||
@@ -45,5 +45,5 @@ "repository": "tanstack/router", | ||
"tiny-warning": "^1.0.3", | ||
"@tanstack/react-store": "^0.0.1", | ||
"@gisatcz/cross-package-react-context": "^0.2.0", | ||
"@tanstack/router-core": "0.0.1-beta.174", | ||
"@tanstack/react-store": "0.0.1-beta.174" | ||
"@tanstack/router-core": "0.0.1-beta.175" | ||
}, | ||
@@ -50,0 +50,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
857603
28
6147
+ Added@tanstack/react-store@0.0.1(transitive)
+ Added@tanstack/router-core@0.0.1-beta.175(transitive)
+ Added@tanstack/store@0.0.1(transitive)
- Removed@tanstack/react-store@0.0.1-beta.174(transitive)
- Removed@tanstack/router-core@0.0.1-beta.174(transitive)
- Removed@tanstack/store@0.0.1-beta.174(transitive)
Updated@tanstack/react-store@^0.0.1