react-router-dom.production.min.js.map 61 KB

1
  1. {"version":3,"file":"react-router-dom.production.min.js","sources":["../../dom.ts","../../index.tsx"],"sourcesContent":["import type { FormEncType, FormMethod } from \"@remix-run/router\";\nimport type { RelativeRoutingType } from \"react-router\";\n\nexport const defaultMethod = \"get\";\nconst defaultEncType = \"application/x-www-form-urlencoded\";\n\nexport function isHtmlElement(object: any): object is HTMLElement {\n return object != null && typeof object.tagName === \"string\";\n}\n\nexport function isButtonElement(object: any): object is HTMLButtonElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\n\nexport function isFormElement(object: any): object is HTMLFormElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\n\nexport function isInputElement(object: any): object is HTMLInputElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\n\ntype LimitedMouseEvent = Pick<\n MouseEvent,\n \"button\" | \"metaKey\" | \"altKey\" | \"ctrlKey\" | \"shiftKey\"\n>;\n\nfunction isModifiedEvent(event: LimitedMouseEvent) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nexport function shouldProcessLinkClick(\n event: LimitedMouseEvent,\n target?: string\n) {\n return (\n event.button === 0 && // Ignore everything but left clicks\n (!target || target === \"_self\") && // Let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // Ignore clicks with modifier keys\n );\n}\n\nexport type ParamKeyValuePair = [string, string];\n\nexport type URLSearchParamsInit =\n | string\n | ParamKeyValuePair[]\n | Record<string, string | string[]>\n | URLSearchParams;\n\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * ['sort', 'name'],\n * ['sort', 'price']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: ['name', 'price']\n * });\n */\nexport function createSearchParams(\n init: URLSearchParamsInit = \"\"\n): URLSearchParams {\n return new URLSearchParams(\n typeof init === \"string\" ||\n Array.isArray(init) ||\n init instanceof URLSearchParams\n ? init\n : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(\n Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n );\n }, [] as ParamKeyValuePair[])\n );\n}\n\nexport function getSearchParamsForLocation(\n locationSearch: string,\n defaultSearchParams: URLSearchParams | null\n) {\n let searchParams = createSearchParams(locationSearch);\n\n if (defaultSearchParams) {\n for (let key of defaultSearchParams.keys()) {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach((value) => {\n searchParams.append(key, value);\n });\n }\n }\n }\n\n return searchParams;\n}\n\nexport interface SubmitOptions {\n /**\n * The HTTP method used to submit the form. Overrides `<form method>`.\n * Defaults to \"GET\".\n */\n method?: FormMethod;\n\n /**\n * The action URL path used to submit the form. Overrides `<form action>`.\n * Defaults to the path of the current route.\n *\n * Note: It is assumed the path is already resolved. If you need to resolve a\n * relative path, use `useFormAction`.\n */\n action?: string;\n\n /**\n * The action URL used to submit the form. Overrides `<form encType>`.\n * Defaults to \"application/x-www-form-urlencoded\".\n */\n encType?: FormEncType;\n\n /**\n * Set `true` to replace the current entry in the browser's history stack\n * instead of creating a new one (i.e. stay on \"the same page\"). Defaults\n * to `false`.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * In browser-based environments, prevent resetting scroll after this\n * navigation when using the <ScrollRestoration> component\n */\n preventScrollReset?: boolean;\n}\n\nexport function getFormSubmissionInfo(\n target:\n | HTMLFormElement\n | HTMLButtonElement\n | HTMLInputElement\n | FormData\n | URLSearchParams\n | { [name: string]: string }\n | null,\n defaultAction: string,\n options: SubmitOptions\n): {\n url: URL;\n method: string;\n encType: string;\n formData: FormData;\n} {\n let method: string;\n let action: string;\n let encType: string;\n let formData: FormData;\n\n if (isFormElement(target)) {\n let submissionTrigger: HTMLButtonElement | HTMLInputElement = (\n options as any\n ).submissionTrigger;\n\n method = options.method || target.getAttribute(\"method\") || defaultMethod;\n action = options.action || target.getAttribute(\"action\") || defaultAction;\n encType =\n options.encType || target.getAttribute(\"enctype\") || defaultEncType;\n\n formData = new FormData(target);\n\n if (submissionTrigger && submissionTrigger.name) {\n formData.append(submissionTrigger.name, submissionTrigger.value);\n }\n } else if (\n isButtonElement(target) ||\n (isInputElement(target) &&\n (target.type === \"submit\" || target.type === \"image\"))\n ) {\n let form = target.form;\n\n if (form == null) {\n throw new Error(\n `Cannot submit a <button> or <input type=\"submit\"> without a <form>`\n );\n }\n\n // <button>/<input type=\"submit\"> may override attributes of <form>\n\n method =\n options.method ||\n target.getAttribute(\"formmethod\") ||\n form.getAttribute(\"method\") ||\n defaultMethod;\n action =\n options.action ||\n target.getAttribute(\"formaction\") ||\n form.getAttribute(\"action\") ||\n defaultAction;\n encType =\n options.encType ||\n target.getAttribute(\"formenctype\") ||\n form.getAttribute(\"enctype\") ||\n defaultEncType;\n\n formData = new FormData(form);\n\n // Include name + value from a <button>, appending in case the button name\n // matches an existing input name\n if (target.name) {\n formData.append(target.name, target.value);\n }\n } else if (isHtmlElement(target)) {\n throw new Error(\n `Cannot submit element that is not <form>, <button>, or ` +\n `<input type=\"submit|image\">`\n );\n } else {\n method = options.method || defaultMethod;\n action = options.action || defaultAction;\n encType = options.encType || defaultEncType;\n\n if (target instanceof FormData) {\n formData = target;\n } else {\n formData = new FormData();\n\n if (target instanceof URLSearchParams) {\n for (let [name, value] of target) {\n formData.append(name, value);\n }\n } else if (target != null) {\n for (let name of Object.keys(target)) {\n formData.append(name, target[name]);\n }\n }\n }\n }\n\n let { protocol, host } = window.location;\n let url = new URL(action, `${protocol}//${host}`);\n\n return { url, method: method.toLowerCase(), encType, formData };\n}\n","/**\n * NOTE: If you refactor this to split up the modules into separate files,\n * you'll need to update the rollup config for react-router-dom-v5-compat.\n */\nimport * as React from \"react\";\nimport type {\n NavigateOptions,\n RelativeRoutingType,\n RouteObject,\n To,\n} from \"react-router\";\nimport {\n Router,\n createPath,\n useHref,\n useLocation,\n useMatches,\n useNavigate,\n useNavigation,\n useResolvedPath,\n unstable_useBlocker as useBlocker,\n UNSAFE_DataRouterContext as DataRouterContext,\n UNSAFE_DataRouterStateContext as DataRouterStateContext,\n UNSAFE_NavigationContext as NavigationContext,\n UNSAFE_RouteContext as RouteContext,\n UNSAFE_enhanceManualRouteObjects as enhanceManualRouteObjects,\n} from \"react-router\";\nimport type {\n BrowserHistory,\n Fetcher,\n FormEncType,\n FormMethod,\n GetScrollRestorationKeyFunction,\n HashHistory,\n History,\n HydrationState,\n Router as RemixRouter,\n} from \"@remix-run/router\";\nimport {\n createRouter,\n createBrowserHistory,\n createHashHistory,\n invariant,\n joinPaths,\n ErrorResponse,\n} from \"@remix-run/router\";\n\nimport type {\n SubmitOptions,\n ParamKeyValuePair,\n URLSearchParamsInit,\n} from \"./dom\";\nimport {\n createSearchParams,\n defaultMethod,\n getFormSubmissionInfo,\n getSearchParamsForLocation,\n shouldProcessLinkClick,\n} from \"./dom\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Re-exports\n////////////////////////////////////////////////////////////////////////////////\n\nexport type {\n FormEncType,\n FormMethod,\n GetScrollRestorationKeyFunction,\n ParamKeyValuePair,\n SubmitOptions,\n URLSearchParamsInit,\n};\nexport { createSearchParams };\n\n// Note: Keep in sync with react-router exports!\nexport type {\n ActionFunction,\n ActionFunctionArgs,\n AwaitProps,\n unstable_Blocker,\n unstable_BlockerFunction,\n DataRouteMatch,\n DataRouteObject,\n Fetcher,\n Hash,\n IndexRouteObject,\n IndexRouteProps,\n JsonFunction,\n LayoutRouteProps,\n LoaderFunction,\n LoaderFunctionArgs,\n Location,\n MemoryRouterProps,\n NavigateFunction,\n NavigateOptions,\n NavigateProps,\n Navigation,\n Navigator,\n NonIndexRouteObject,\n OutletProps,\n Params,\n ParamParseKey,\n Path,\n PathMatch,\n Pathname,\n PathPattern,\n PathRouteProps,\n RedirectFunction,\n RelativeRoutingType,\n RouteMatch,\n RouteObject,\n RouteProps,\n RouterProps,\n RouterProviderProps,\n RoutesProps,\n Search,\n ShouldRevalidateFunction,\n To,\n} from \"react-router\";\nexport {\n AbortedDeferredError,\n Await,\n MemoryRouter,\n Navigate,\n NavigationType,\n Outlet,\n Route,\n Router,\n RouterProvider,\n Routes,\n createMemoryRouter,\n createPath,\n createRoutesFromChildren,\n createRoutesFromElements,\n defer,\n isRouteErrorResponse,\n generatePath,\n json,\n matchPath,\n matchRoutes,\n parsePath,\n redirect,\n renderMatches,\n resolvePath,\n useActionData,\n useAsyncError,\n useAsyncValue,\n unstable_useBlocker,\n useHref,\n useInRouterContext,\n useLoaderData,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useNavigationType,\n useOutlet,\n useOutletContext,\n useParams,\n useResolvedPath,\n useRevalidator,\n useRouteError,\n useRouteLoaderData,\n useRoutes,\n} from \"react-router\";\n\n///////////////////////////////////////////////////////////////////////////////\n// DANGER! PLEASE READ ME!\n// We provide these exports as an escape hatch in the event that you need any\n// routing data that we don't provide an explicit API for. With that said, we\n// want to cover your use case if we can, so if you feel the need to use these\n// we want to hear from you. Let us know what you're building and we'll do our\n// best to make sure we can support you!\n//\n// We consider these exports an implementation detail and do not guarantee\n// against any breaking changes, regardless of the semver release. Use with\n// extreme caution and only if you understand the consequences. Godspeed.\n///////////////////////////////////////////////////////////////////////////////\n\n/** @internal */\nexport {\n UNSAFE_DataRouterContext,\n UNSAFE_DataRouterStateContext,\n UNSAFE_NavigationContext,\n UNSAFE_LocationContext,\n UNSAFE_RouteContext,\n UNSAFE_enhanceManualRouteObjects,\n} from \"react-router\";\n//#endregion\n\ndeclare global {\n var __staticRouterHydrationData: HydrationState | undefined;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Routers\n////////////////////////////////////////////////////////////////////////////////\n\nexport function createBrowserRouter(\n routes: RouteObject[],\n opts?: {\n basename?: string;\n hydrationData?: HydrationState;\n window?: Window;\n }\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n history: createBrowserHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes: enhanceManualRouteObjects(routes),\n }).initialize();\n}\n\nexport function createHashRouter(\n routes: RouteObject[],\n opts?: {\n basename?: string;\n hydrationData?: HydrationState;\n window?: Window;\n }\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n history: createHashHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes: enhanceManualRouteObjects(routes),\n }).initialize();\n}\n\nfunction parseHydrationData(): HydrationState | undefined {\n let state = window?.__staticRouterHydrationData;\n if (state && state.errors) {\n state = {\n ...state,\n errors: deserializeErrors(state.errors),\n };\n }\n return state;\n}\n\nfunction deserializeErrors(\n errors: RemixRouter[\"state\"][\"errors\"]\n): RemixRouter[\"state\"][\"errors\"] {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized: RemixRouter[\"state\"][\"errors\"] = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in react-router-dom/server.tsx :)\n if (val && val.__type === \"RouteErrorResponse\") {\n serialized[key] = new ErrorResponse(\n val.status,\n val.statusText,\n val.data,\n val.internal === true\n );\n } else if (val && val.__type === \"Error\") {\n let error = new Error(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don't serialize SSR stack traces for security reasons\n error.stack = \"\";\n serialized[key] = error;\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n\nexport interface BrowserRouterProps {\n basename?: string;\n children?: React.ReactNode;\n window?: Window;\n}\n\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\nexport function BrowserRouter({\n basename,\n children,\n window,\n}: BrowserRouterProps) {\n let historyRef = React.useRef<BrowserHistory>();\n if (historyRef.current == null) {\n historyRef.current = createBrowserHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location,\n });\n\n React.useLayoutEffect(() => history.listen(setState), [history]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nexport interface HashRouterProps {\n basename?: string;\n children?: React.ReactNode;\n window?: Window;\n}\n\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nexport function HashRouter({ basename, children, window }: HashRouterProps) {\n let historyRef = React.useRef<HashHistory>();\n if (historyRef.current == null) {\n historyRef.current = createHashHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setState] = React.useState({\n action: history.action,\n location: history.location,\n });\n\n React.useLayoutEffect(() => history.listen(setState), [history]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nexport interface HistoryRouterProps {\n basename?: string;\n children?: React.ReactNode;\n history: History;\n}\n\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It's important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter({ basename, children, history }: HistoryRouterProps) {\n const [state, setState] = React.useState({\n action: history.action,\n location: history.location,\n });\n\n React.useLayoutEffect(() => history.listen(setState), [history]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nif (__DEV__) {\n HistoryRouter.displayName = \"unstable_HistoryRouter\";\n}\n\nexport { HistoryRouter as unstable_HistoryRouter };\n\nexport interface LinkProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\"> {\n reloadDocument?: boolean;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n to: To;\n}\n\nconst isBrowser =\n typeof window !== \"undefined\" &&\n typeof window.document !== \"undefined\" &&\n typeof window.document.createElement !== \"undefined\";\n\n/**\n * The public API for rendering a history-aware <a>.\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n function LinkWithRef(\n {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset,\n ...rest\n },\n ref\n ) {\n // Rendered into <a href> for absolute URLs\n let absoluteHref;\n let isExternal = false;\n\n if (\n isBrowser &&\n typeof to === \"string\" &&\n /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i.test(to)\n ) {\n absoluteHref = to;\n let currentUrl = new URL(window.location.href);\n let targetUrl = to.startsWith(\"//\")\n ? new URL(currentUrl.protocol + to)\n : new URL(to);\n if (targetUrl.origin === currentUrl.origin) {\n // Strip the protocol/origin for same-origin absolute URLs\n to = targetUrl.pathname + targetUrl.search + targetUrl.hash;\n } else {\n isExternal = true;\n }\n }\n\n // Rendered into <a href> for relative URLs\n let href = useHref(to, { relative });\n\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative,\n });\n function handleClick(\n event: React.MouseEvent<HTMLAnchorElement, MouseEvent>\n ) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n <a\n {...rest}\n href={absoluteHref || href}\n onClick={isExternal || reloadDocument ? onClick : handleClick}\n ref={ref}\n target={target}\n />\n );\n }\n);\n\nif (__DEV__) {\n Link.displayName = \"Link\";\n}\n\nexport interface NavLinkProps\n extends Omit<LinkProps, \"className\" | \"style\" | \"children\"> {\n children?:\n | React.ReactNode\n | ((props: { isActive: boolean; isPending: boolean }) => React.ReactNode);\n caseSensitive?: boolean;\n className?:\n | string\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => string | undefined);\n end?: boolean;\n style?:\n | React.CSSProperties\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => React.CSSProperties | undefined);\n}\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nexport const NavLink = React.forwardRef<HTMLAnchorElement, NavLinkProps>(\n function NavLinkWithRef(\n {\n \"aria-current\": ariaCurrentProp = \"page\",\n caseSensitive = false,\n className: classNameProp = \"\",\n end = false,\n style: styleProp,\n to,\n children,\n ...rest\n },\n ref\n ) {\n let path = useResolvedPath(to, { relative: rest.relative });\n let location = useLocation();\n let routerState = React.useContext(DataRouterStateContext);\n let { navigator } = React.useContext(NavigationContext);\n\n let toPathname = navigator.encodeLocation\n ? navigator.encodeLocation(path).pathname\n : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname =\n routerState && routerState.navigation && routerState.navigation.location\n ? routerState.navigation.location.pathname\n : null;\n\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname\n ? nextLocationPathname.toLowerCase()\n : null;\n toPathname = toPathname.toLowerCase();\n }\n\n let isActive =\n locationPathname === toPathname ||\n (!end &&\n locationPathname.startsWith(toPathname) &&\n locationPathname.charAt(toPathname.length) === \"/\");\n\n let isPending =\n nextLocationPathname != null &&\n (nextLocationPathname === toPathname ||\n (!end &&\n nextLocationPathname.startsWith(toPathname) &&\n nextLocationPathname.charAt(toPathname.length) === \"/\"));\n\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n\n let className: string | undefined;\n if (typeof classNameProp === \"function\") {\n className = classNameProp({ isActive, isPending });\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for <NavLink />s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [\n classNameProp,\n isActive ? \"active\" : null,\n isPending ? \"pending\" : null,\n ]\n .filter(Boolean)\n .join(\" \");\n }\n\n let style =\n typeof styleProp === \"function\"\n ? styleProp({ isActive, isPending })\n : styleProp;\n\n return (\n <Link\n {...rest}\n aria-current={ariaCurrent}\n className={className}\n ref={ref}\n style={style}\n to={to}\n >\n {typeof children === \"function\"\n ? children({ isActive, isPending })\n : children}\n </Link>\n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n}\n\nexport interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {\n /**\n * The HTTP verb to use when the form is submit. Supports \"get\", \"post\",\n * \"put\", \"delete\", \"patch\".\n */\n method?: FormMethod;\n\n /**\n * Normal `<form action>` but supports React Router's relative paths.\n */\n action?: string;\n\n /**\n * Forces a full document navigation instead of a fetch.\n */\n reloadDocument?: boolean;\n\n /**\n * Replaces the current entry in the browser history stack when the form\n * navigates. Use this if you don't want the user to be able to click \"back\"\n * to the page with the form on it.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * Prevent the scroll position from resetting to the top of the viewport on\n * completion of the navigation when using the <ScrollRestoration> component\n */\n preventScrollReset?: boolean;\n\n /**\n * A function to call when the form is submitted. If you call\n * `event.preventDefault()` then this form will not do anything.\n */\n onSubmit?: React.FormEventHandler<HTMLFormElement>;\n}\n\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nexport const Form = React.forwardRef<HTMLFormElement, FormProps>(\n (props, ref) => {\n return <FormImpl {...props} ref={ref} />;\n }\n);\n\nif (__DEV__) {\n Form.displayName = \"Form\";\n}\n\ntype HTMLSubmitEvent = React.BaseSyntheticEvent<\n SubmitEvent,\n Event,\n HTMLFormElement\n>;\n\ntype HTMLFormSubmitter = HTMLButtonElement | HTMLInputElement;\n\ninterface FormImplProps extends FormProps {\n fetcherKey?: string;\n routeId?: string;\n}\n\nconst FormImpl = React.forwardRef<HTMLFormElement, FormImplProps>(\n (\n {\n reloadDocument,\n replace,\n method = defaultMethod,\n action,\n onSubmit,\n fetcherKey,\n routeId,\n relative,\n preventScrollReset,\n ...props\n },\n forwardedRef\n ) => {\n let submit = useSubmitImpl(fetcherKey, routeId);\n let formMethod: FormMethod =\n method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n let formAction = useFormAction(action, { relative });\n let submitHandler: React.FormEventHandler<HTMLFormElement> = (event) => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n\n let submitter = (event as unknown as HTMLSubmitEvent).nativeEvent\n .submitter as HTMLFormSubmitter | null;\n\n let submitMethod =\n (submitter?.getAttribute(\"formmethod\") as FormMethod | undefined) ||\n method;\n\n submit(submitter || event.currentTarget, {\n method: submitMethod,\n replace,\n relative,\n preventScrollReset,\n });\n };\n\n return (\n <form\n ref={forwardedRef}\n method={formMethod}\n action={formAction}\n onSubmit={reloadDocument ? onSubmit : submitHandler}\n {...props}\n />\n );\n }\n);\n\nif (__DEV__) {\n FormImpl.displayName = \"FormImpl\";\n}\n\nexport interface ScrollRestorationProps {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n}\n\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n */\nexport function ScrollRestoration({\n getKey,\n storageKey,\n}: ScrollRestorationProps) {\n useScrollRestoration({ getKey, storageKey });\n return null;\n}\n\nif (__DEV__) {\n ScrollRestoration.displayName = \"ScrollRestoration\";\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\n\nenum DataRouterHook {\n UseScrollRestoration = \"useScrollRestoration\",\n UseSubmitImpl = \"useSubmitImpl\",\n UseFetcher = \"useFetcher\",\n}\n\nenum DataRouterStateHook {\n UseFetchers = \"useFetchers\",\n UseScrollRestoration = \"useScrollRestoration\",\n}\n\nfunction getDataRouterConsoleError(\n hookName: DataRouterHook | DataRouterStateHook\n) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;\n}\n\nfunction useDataRouterContext(hookName: DataRouterHook) {\n let ctx = React.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError(hookName));\n return ctx;\n}\n\nfunction useDataRouterState(hookName: DataRouterStateHook) {\n let state = React.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError(hookName));\n return state;\n}\n\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\nexport function useLinkClickHandler<E extends Element = HTMLAnchorElement>(\n to: To,\n {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n }: {\n target?: React.HTMLAttributeAnchorTarget;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n } = {}\n): (event: React.MouseEvent<E, MouseEvent>) => void {\n let navigate = useNavigate();\n let location = useLocation();\n let path = useResolvedPath(to, { relative });\n\n return React.useCallback(\n (event: React.MouseEvent<E, MouseEvent>) => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n\n // If the URL hasn't changed, a regular <a> will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n let replace =\n replaceProp !== undefined\n ? replaceProp\n : createPath(location) === createPath(path);\n\n navigate(to, { replace, state, preventScrollReset, relative });\n }\n },\n [\n location,\n navigate,\n path,\n replaceProp,\n state,\n target,\n to,\n preventScrollReset,\n relative,\n ]\n );\n}\n\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nexport function useSearchParams(\n defaultInit?: URLSearchParamsInit\n): [URLSearchParams, SetURLSearchParams] {\n warning(\n typeof URLSearchParams !== \"undefined\",\n `You cannot use the \\`useSearchParams\\` hook in a browser that does not ` +\n `support the URLSearchParams API. If you need to support Internet ` +\n `Explorer 11, we recommend you load a polyfill such as ` +\n `https://github.com/ungap/url-search-params\\n\\n` +\n `If you're unsure how to load polyfills, we recommend you check out ` +\n `https://polyfill.io/v3/ which provides some recommendations about how ` +\n `to load polyfills only for users that need them, instead of for every ` +\n `user.`\n );\n\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = React.useRef(false);\n\n let location = useLocation();\n let searchParams = React.useMemo(\n () =>\n // Only merge in the defaults if we haven't yet called setSearchParams.\n // Once we call that we want those to take precedence, otherwise you can't\n // remove a param with setSearchParams({}) if it has an initial value\n getSearchParamsForLocation(\n location.search,\n hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current\n ),\n [location.search]\n );\n\n let navigate = useNavigate();\n let setSearchParams = React.useCallback<SetURLSearchParams>(\n (nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit\n );\n hasSetSearchParamsRef.current = true;\n navigate(\"?\" + newSearchParams, navigateOptions);\n },\n [navigate, searchParams]\n );\n\n return [searchParams, setSearchParams];\n}\n\ntype SetURLSearchParams = (\n nextInit?:\n | URLSearchParamsInit\n | ((prev: URLSearchParams) => URLSearchParamsInit),\n navigateOpts?: NavigateOptions\n) => void;\n\ntype SubmitTarget =\n | HTMLFormElement\n | HTMLButtonElement\n | HTMLInputElement\n | FormData\n | URLSearchParams\n | { [name: string]: string }\n | null;\n\n/**\n * Submits a HTML `<form>` to the server without reloading the page.\n */\nexport interface SubmitFunction {\n (\n /**\n * Specifies the `<form>` to be submitted to the server, a specific\n * `<button>` or `<input type=\"submit\">` to use to submit the form, or some\n * arbitrary data to submit.\n *\n * Note: When using a `<button>` its `name` and `value` will also be\n * included in the form data that is submitted.\n */\n target: SubmitTarget,\n\n /**\n * Options that override the `<form>`'s own attributes. Required when\n * submitting arbitrary data without a backing `<form>`.\n */\n options?: SubmitOptions\n ): void;\n}\n\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\nexport function useSubmit(): SubmitFunction {\n return useSubmitImpl();\n}\n\nfunction useSubmitImpl(fetcherKey?: string, routeId?: string): SubmitFunction {\n let { router } = useDataRouterContext(DataRouterHook.UseSubmitImpl);\n let defaultAction = useFormAction();\n\n return React.useCallback(\n (target, options = {}) => {\n if (typeof document === \"undefined\") {\n throw new Error(\n \"You are calling submit during the server render. \" +\n \"Try calling submit within a `useEffect` or callback instead.\"\n );\n }\n\n let { method, encType, formData, url } = getFormSubmissionInfo(\n target,\n defaultAction,\n options\n );\n\n let href = url.pathname + url.search;\n let opts = {\n replace: options.replace,\n preventScrollReset: options.preventScrollReset,\n formData,\n formMethod: method as FormMethod,\n formEncType: encType as FormEncType,\n };\n if (fetcherKey) {\n invariant(routeId != null, \"No routeId available for useFetcher()\");\n router.fetch(fetcherKey, routeId, href, opts);\n } else {\n router.navigate(href, opts);\n }\n },\n [defaultAction, router, fetcherKey, routeId]\n );\n}\n\nexport function useFormAction(\n action?: string,\n { relative }: { relative?: RelativeRoutingType } = {}\n): string {\n let { basename } = React.useContext(NavigationContext);\n let routeContext = React.useContext(RouteContext);\n invariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n\n let [match] = routeContext.matches.slice(-1);\n // Shallow clone path so we can modify it below, otherwise we modify the\n // object referenced by useMemo inside useResolvedPath\n let path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n\n // Previously we set the default action to \".\". The problem with this is that\n // `useResolvedPath(\".\")` excludes search params and the hash of the resolved\n // URL. This is the intended behavior of when \".\" is specifically provided as\n // the form action, but inconsistent w/ browsers when the action is omitted.\n // https://github.com/remix-run/remix/issues/927\n let location = useLocation();\n if (action == null) {\n // Safe to write to these directly here since if action was undefined, we\n // would have called useResolvedPath(\".\") which will never include a search\n // or hash\n path.search = location.search;\n path.hash = location.hash;\n\n // When grabbing search params from the URL, remove the automatically\n // inserted ?index param so we match the useResolvedPath search behavior\n // which would not include ?index\n if (match.route.index) {\n let params = new URLSearchParams(path.search);\n params.delete(\"index\");\n path.search = params.toString() ? `?${params.toString()}` : \"\";\n }\n }\n\n if ((!action || action === \".\") && match.route.index) {\n path.search = path.search\n ? path.search.replace(/^\\?/, \"?index&\")\n : \"?index\";\n }\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to creating the form action. If this is a root navigation, then just use\n // the raw basename which allows the basename to have full control over the\n // presence of a trailing slash on root actions\n if (basename !== \"/\") {\n path.pathname =\n path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n return createPath(path);\n}\n\nfunction createFetcherForm(fetcherKey: string, routeId: string) {\n let FetcherForm = React.forwardRef<HTMLFormElement, FormProps>(\n (props, ref) => {\n return (\n <FormImpl\n {...props}\n ref={ref}\n fetcherKey={fetcherKey}\n routeId={routeId}\n />\n );\n }\n );\n if (__DEV__) {\n FetcherForm.displayName = \"fetcher.Form\";\n }\n return FetcherForm;\n}\n\nlet fetcherId = 0;\n\nexport type FetcherWithComponents<TData> = Fetcher<TData> & {\n Form: ReturnType<typeof createFetcherForm>;\n submit: (\n target: SubmitTarget,\n // Fetchers cannot replace/preventScrollReset because they are not\n // navigation events\n options?: Omit<SubmitOptions, \"replace\" | \"preventScrollReset\">\n ) => void;\n load: (href: string) => void;\n};\n\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n */\nexport function useFetcher<TData = any>(): FetcherWithComponents<TData> {\n let { router } = useDataRouterContext(DataRouterHook.UseFetcher);\n\n let route = React.useContext(RouteContext);\n invariant(route, `useFetcher must be used inside a RouteContext`);\n\n let routeId = route.matches[route.matches.length - 1]?.route.id;\n invariant(\n routeId != null,\n `useFetcher can only be used on routes that contain a unique \"id\"`\n );\n\n let [fetcherKey] = React.useState(() => String(++fetcherId));\n let [Form] = React.useState(() => {\n invariant(routeId, `No routeId available for fetcher.Form()`);\n return createFetcherForm(fetcherKey, routeId);\n });\n let [load] = React.useState(() => (href: string) => {\n invariant(router, \"No router available for fetcher.load()\");\n invariant(routeId, \"No routeId available for fetcher.load()\");\n router.fetch(fetcherKey, routeId, href);\n });\n let submit = useSubmitImpl(fetcherKey, routeId);\n\n let fetcher = router.getFetcher<TData>(fetcherKey);\n\n let fetcherWithComponents = React.useMemo(\n () => ({\n Form,\n submit,\n load,\n ...fetcher,\n }),\n [fetcher, Form, submit, load]\n );\n\n React.useEffect(() => {\n // Is this busted when the React team gets real weird and calls effects\n // twice on mount? We really just need to garbage collect here when this\n // fetcher is no longer around.\n return () => {\n if (!router) {\n console.warn(`No fetcher available to clean up from useFetcher()`);\n return;\n }\n router.deleteFetcher(fetcherKey);\n };\n }, [router, fetcherKey]);\n\n return fetcherWithComponents;\n}\n\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n */\nexport function useFetchers(): Fetcher[] {\n let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n return [...state.fetchers.values()];\n}\n\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions: Record<string, number> = {};\n\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\nfunction useScrollRestoration({\n getKey,\n storageKey,\n}: {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n} = {}) {\n let { router } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n let { restoreScrollPosition, preventScrollReset } = useDataRouterState(\n DataRouterStateHook.UseScrollRestoration\n );\n let location = useLocation();\n let matches = useMatches();\n let navigation = useNavigation();\n\n // Trigger manual scroll restoration while we're active\n React.useEffect(() => {\n window.history.scrollRestoration = \"manual\";\n return () => {\n window.history.scrollRestoration = \"auto\";\n };\n }, []);\n\n // Save positions on pagehide\n usePageHide(\n React.useCallback(() => {\n if (navigation.state === \"idle\") {\n let key = (getKey ? getKey(location, matches) : null) || location.key;\n savedScrollPositions[key] = window.scrollY;\n }\n sessionStorage.setItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY,\n JSON.stringify(savedScrollPositions)\n );\n window.history.scrollRestoration = \"auto\";\n }, [storageKey, getKey, navigation.state, location, matches])\n );\n\n // Read in any saved scroll locations\n if (typeof document !== \"undefined\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY\n );\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {\n // no-op, use default empty object\n }\n }, [storageKey]);\n\n // Enable scroll restoration in the router\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n let disableScrollRestoration = router?.enableScrollRestoration(\n savedScrollPositions,\n () => window.scrollY,\n getKey\n );\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, getKey]);\n\n // Restore scrolling when state.restoreScrollPosition changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n // Explicit false means don't do anything (used for submissions)\n if (restoreScrollPosition === false) {\n return;\n }\n\n // been here before, scroll to it\n if (typeof restoreScrollPosition === \"number\") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n }\n\n // try to scroll to the hash\n if (location.hash) {\n let el = document.getElementById(location.hash.slice(1));\n if (el) {\n el.scrollIntoView();\n return;\n }\n }\n\n // Don't reset if this navigation opted out\n if (preventScrollReset === true) {\n return;\n }\n\n // otherwise go to the top on new locations\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\n\n/**\n * Setup a callback to be fired on the window's `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nexport function useBeforeUnload(\n callback: (event: BeforeUnloadEvent) => any,\n options?: { capture?: boolean }\n): void {\n let { capture } = options || {};\n React.useEffect(() => {\n let opts = capture != null ? { capture } : undefined;\n window.addEventListener(\"beforeunload\", callback, opts);\n return () => {\n window.removeEventListener(\"beforeunload\", callback, opts);\n };\n }, [callback, capture]);\n}\n\n/**\n * Setup a callback to be fired on the window's `pagehide` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes. This event is better supported than beforeunload across browsers.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction usePageHide(\n callback: (event: PageTransitionEvent) => any,\n options?: { capture?: boolean }\n): void {\n let { capture } = options || {};\n React.useEffect(() => {\n let opts = capture != null ? { capture } : undefined;\n window.addEventListener(\"pagehide\", callback, opts);\n return () => {\n window.removeEventListener(\"pagehide\", callback, opts);\n };\n }, [callback, capture]);\n}\n\n/**\n * Wrapper around useBlocker to show a window.confirm prompt to users instead\n * of building a custom UI with useBlocker.\n *\n * Warning: This has *a lot of rough edges* and behaves very differently (and\n * very incorrectly in some cases) across browsers if user click addition\n * back/forward navigations while the confirm is open. Use at your own risk.\n */\nfunction usePrompt({ when, message }: { when: boolean; message: string }) {\n let blocker = useBlocker(when);\n\n React.useEffect(() => {\n if (blocker.state === \"blocked\" && !when) {\n blocker.reset();\n }\n }, [blocker, when]);\n\n React.useEffect(() => {\n if (blocker.state === \"blocked\") {\n let proceed = window.confirm(message);\n if (proceed) {\n setTimeout(blocker.proceed, 0);\n } else {\n blocker.reset();\n }\n }\n }, [blocker, message]);\n}\n\nexport { usePrompt as unstable_usePrompt };\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Utils\n////////////////////////////////////////////////////////////////////////////////\n\nfunction warning(cond: boolean, message: string): void {\n if (!cond) {\n // eslint-disable-next-line no-console\n if (typeof console !== \"undefined\") console.warn(message);\n\n try {\n // Welcome to debugging React Router!\n //\n // This error is thrown as a convenience so you can more easily\n // find the source for a warning that appears in the console by\n // enabling \"pause on exceptions\" in your JavaScript debugger.\n throw new Error(message);\n // eslint-disable-next-line no-empty\n } catch (e) {}\n }\n}\n//#endregion\n\nexport { useScrollRestoration as UNSAFE_useScrollRestoration };\n"],"names":["defaultMethod","defaultEncType","isHtmlElement","object","tagName","createSearchParams","init","URLSearchParams","Array","isArray","Object","keys","reduce","memo","key","value","concat","map","v","getFormSubmissionInfo","target","defaultAction","options","method","action","encType","formData","toLowerCase","submissionTrigger","getAttribute","FormData","name","append","isButtonElement","isInputElement","type","form","Error","protocol","host","window","location","url","URL","parseHydrationData","_window","state","__staticRouterHydrationData","errors","deserializeErrors","entries","serialized","val","__type","ErrorResponse","status","statusText","data","internal","error","message","stack","isBrowser","document","createElement","Link","React","forwardRef","ref","absoluteHref","onClick","relative","reloadDocument","replace","to","preventScrollReset","_ref4","rest","_objectWithoutPropertiesLoose","_excluded","isExternal","test","currentUrl","href","targetUrl","startsWith","origin","pathname","search","hash","useHref","internalOnClick","useLinkClickHandler","_extends","event","defaultPrevented","NavLink","ariaCurrentProp","caseSensitive","className","classNameProp","end","style","styleProp","children","_ref5","_excluded2","path","useResolvedPath","useLocation","routerState","useContext","DataRouterStateContext","UNSAFE_DataRouterStateContext","navigator","NavigationContext","toPathname","encodeLocation","locationPathname","nextLocationPathname","navigation","isActive","charAt","length","isPending","ariaCurrent","undefined","filter","Boolean","join","Form","props","FormImpl","_ref6","forwardedRef","onSubmit","fetcherKey","routeId","_excluded3","submit","useSubmitImpl","formMethod","formAction","useFormAction","preventDefault","submitter","nativeEvent","submitMethod","currentTarget","DataRouterHook","DataRouterStateHook","useDataRouterContext","hookName","ctx","DataRouterContext","UNSAFE_DataRouterContext","invariant","useDataRouterState","_temp","replaceProp","navigate","useNavigate","useCallback","button","metaKey","altKey","ctrlKey","shiftKey","isModifiedEvent","shouldProcessLinkClick","createPath","router","UseSubmitImpl","opts","formEncType","fetch","_temp2","basename","routeContext","RouteContext","UNSAFE_RouteContext","match","matches","slice","route","index","params","delete","toString","joinPaths","fetcherId","SCROLL_RESTORATION_STORAGE_KEY","savedScrollPositions","useScrollRestoration","_temp3","getKey","storageKey","UseScrollRestoration","restoreScrollPosition","useMatches","useNavigation","useEffect","history","scrollRestoration","callback","capture","addEventListener","removeEventListener","usePageHide","scrollY","sessionStorage","setItem","JSON","stringify","useLayoutEffect","sessionPositions","getItem","parse","e","disableScrollRestoration","enableScrollRestoration","el","getElementById","scrollIntoView","scrollTo","_ref","historyRef","useRef","current","createBrowserHistory","v5Compat","setState","useState","listen","Router","navigationType","_ref2","createHashHistory","_ref7","routes","createRouter","hydrationData","enhanceManualRouteObjects","UNSAFE_enhanceManualRouteObjects","initialize","_ref3","_ref8","when","blocker","useBlocker","reset","confirm","setTimeout","proceed","_route$matches","UseFetcher","id","String","createFetcherForm","load","fetcher","getFetcher","fetcherWithComponents","useMemo","deleteFetcher","console","warn","UseFetchers","fetchers","values","defaultInit","defaultSearchParamsRef","hasSetSearchParamsRef","searchParams","locationSearch","defaultSearchParams","has","getAll","forEach","getSearchParamsForLocation","setSearchParams","nextInit","navigateOptions","newSearchParams"],"mappings":";;;;;;;;;;qiCAGO,MAAMA,EAAgB,MACvBC,EAAiB,oCAEhB,SAASC,EAAcC,GAC5B,OAAiB,MAAVA,GAA4C,iBAAnBA,EAAOC,OACxC,CA+DM,SAASC,EACdC,GAEA,YADiB,IADjBA,IAAAA,EAA4B,IAErB,IAAIC,gBACO,iBAATD,GACPE,MAAMC,QAAQH,IACdA,aAAgBC,gBACZD,EACAI,OAAOC,KAAKL,GAAMM,QAAO,CAACC,EAAMC,KAC9B,IAAIC,EAAQT,EAAKQ,GACjB,OAAOD,EAAKG,OACVR,MAAMC,QAAQM,GAASA,EAAME,KAAKC,GAAM,CAACJ,EAAKI,KAAM,CAAC,CAACJ,EAAKC,IAD7D,GAGC,IAEV,CAgEM,SAASI,EACdC,EAQAC,EACAC,GAOA,IAAIC,EACAC,EACAC,EACAC,EAEJ,GA7JOxB,EADqBC,EA8JViB,IA7J+C,SAAjCjB,EAAOC,QAAQuB,cA6JpB,CACzB,IAAIC,EACFN,EACAM,kBAEFL,EAASD,EAAQC,QAAUH,EAAOS,aAAa,WAAa7B,EAC5DwB,EAASF,EAAQE,QAAUJ,EAAOS,aAAa,WAAaR,EAC5DI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