/opt/canhelp/node_modules/next/dist/esm/client/components
NameSizeModeActions
builtin/-0755rm
errors/-0755rm
http-access-fallback/-0755rm
metadata/-0755rm
router-reducer/-0755rm
segment-cache-impl/-0755rm
styles/-0755rm
app-router-announcer.js27570644editdlrm
app-router-announcer.js.map46600644editdlrm
app-router-headers.js16750644editdlrm
app-router-headers.js.map30140644editdlrm
app-router-instance.js130370644editdlrm
app-router-instance.js.map211310644editdlrm
app-router.js230670644editdlrm
app-router.js.map350120644editdlrm
bailout-to-client-rendering.js12360644editdlrm
bailout-to-client-rendering.js.map17060644editdlrm
bfcache.js45680644editdlrm
bfcache.js.map63940644editdlrm
client-page.js25190644editdlrm
client-page.js.map39190644editdlrm
client-segment.js21060644editdlrm
client-segment.js.map30990644editdlrm
dev-root-http-access-fallback-boundary.js9010644editdlrm
dev-root-http-access-fallback-boundary.js.map12920644editdlrm
error-boundary.js47300644editdlrm
error-boundary.js.map74540644editdlrm
forbidden.js15430644editdlrm
forbidden.js.map19880644editdlrm
handle-isr-error.js7090644editdlrm
handle-isr-error.js.map13160644editdlrm
hooks-server-context.js5340644editdlrm
hooks-server-context.js.map11330644editdlrm
is-next-router-error.js4810644editdlrm
is-next-router-error.js.map9220644editdlrm
layout-router.js264060644editdlrm
layout-router.js.map378500644editdlrm
links.js125330644editdlrm
links.js.map210600644editdlrm
match-segments.js5240644editdlrm
match-segments.js.map10340644editdlrm
nav-failure-handler.js16140644editdlrm
nav-failure-handler.js.map28270644editdlrm
navigation-untracked.js23970644editdlrm
navigation-untracked.js.map33740644editdlrm
navigation.js91180644editdlrm
navigation.js.map128070644editdlrm
navigation.react-server.js19440644editdlrm
navigation.react-server.js.map27680644editdlrm
noop-head.js940644editdlrm
noop-head.js.map2330644editdlrm
not-found.js13560644editdlrm
not-found.js.map17520644editdlrm
promise-queue.js37120644editdlrm
promise-queue.js.map35910644editdlrm
redirect-boundary.js22220644editdlrm
redirect-boundary.js.map39400644editdlrm
redirect-error.js11230644editdlrm
redirect-error.js.map21030644editdlrm
redirect-status-code.js4250644editdlrm
redirect-status-code.js.map3190644editdlrm
redirect.js38220644editdlrm
redirect.js.map58370644editdlrm
render-from-template-context.js4560644editdlrm
render-from-template-context.js.map6670644editdlrm
segment-cache.js60040644editdlrm
segment-cache.js.map88230644editdlrm
static-generation-bailout.js4660644editdlrm
static-generation-bailout.js.map8770644editdlrm
unauthorized.js15700644editdlrm
unauthorized.js.map20200644editdlrm
unrecognized-action-error.js9230644editdlrm
unrecognized-action-error.js.map14780644editdlrm
unresolved-thenable.js2270644editdlrm
unresolved-thenable.js.map4410644editdlrm
unstable-rethrow.browser.js4330644editdlrm
unstable-rethrow.browser.js.map8410644editdlrm
unstable-rethrow.js7120644editdlrm
unstable-rethrow.js.map11120644editdlrm
unstable-rethrow.server.js8540644editdlrm
unstable-rethrow.server.js.map15660644editdlrm
use-action-queue.js19210644editdlrm
use-action-queue.js.map32730644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/client/components/error-boundary.js.map (7454B)
{"version":3,"sources":["../../../src/client/components/error-boundary.tsx"],"sourcesContent":["'use client'\n\nimport React, { type JSX } from 'react'\nimport { useUntrackedPathname } from './navigation-untracked'\nimport { isNextRouterError } from './is-next-router-error'\nimport { handleHardNavError } from './nav-failure-handler'\nimport { HandleISRError } from './handle-isr-error'\nimport { isBot } from '../../shared/lib/router/utils/is-bot'\n\nconst isBotUserAgent =\n typeof window !== 'undefined' && isBot(window.navigator.userAgent)\n\nexport type ErrorComponent = React.ComponentType<{\n error: Error\n // global-error, there's no `reset` function;\n // regular error boundary, there's a `reset` function.\n reset?: () => void\n}>\n\nexport interface ErrorBoundaryProps {\n children?: React.ReactNode\n errorComponent: ErrorComponent | undefined\n errorStyles?: React.ReactNode | undefined\n errorScripts?: React.ReactNode | undefined\n}\n\ninterface ErrorBoundaryHandlerProps extends ErrorBoundaryProps {\n pathname: string | null\n errorComponent: ErrorComponent\n}\n\ninterface ErrorBoundaryHandlerState {\n error: Error | null\n previousPathname: string | null\n}\n\nexport class ErrorBoundaryHandler extends React.Component<\n ErrorBoundaryHandlerProps,\n ErrorBoundaryHandlerState\n> {\n constructor(props: ErrorBoundaryHandlerProps) {\n super(props)\n this.state = { error: null, previousPathname: this.props.pathname }\n }\n\n static getDerivedStateFromError(error: Error) {\n if (isNextRouterError(error)) {\n // Re-throw if an expected internal Next.js router error occurs\n // this means it should be handled by a different boundary (such as a NotFound boundary in a parent segment)\n throw error\n }\n\n return { error }\n }\n\n static getDerivedStateFromProps(\n props: ErrorBoundaryHandlerProps,\n state: ErrorBoundaryHandlerState\n ): ErrorBoundaryHandlerState | null {\n const { error } = state\n\n // if we encounter an error while\n // a navigation is pending we shouldn't render\n // the error boundary and instead should fallback\n // to a hard navigation to attempt recovering\n if (process.env.__NEXT_APP_NAV_FAIL_HANDLING) {\n if (error && handleHardNavError(error)) {\n // clear error so we don't render anything\n return {\n error: null,\n previousPathname: props.pathname,\n }\n }\n }\n\n /**\n * Handles reset of the error boundary when a navigation happens.\n * Ensures the error boundary does not stay enabled when navigating to a new page.\n * Approach of setState in render is safe as it checks the previous pathname and then overrides\n * it as outlined in https://react.dev/reference/react/useState#storing-information-from-previous-renders\n */\n if (props.pathname !== state.previousPathname && state.error) {\n return {\n error: null,\n previousPathname: props.pathname,\n }\n }\n return {\n error: state.error,\n previousPathname: props.pathname,\n }\n }\n\n reset = () => {\n this.setState({ error: null })\n }\n\n // Explicit type is needed to avoid the generated `.d.ts` having a wide return type that could be specific to the `@types/react` version.\n render(): React.ReactNode {\n //When it's bot request, segment level error boundary will keep rendering the children,\n // the final error will be caught by the root error boundary and determine wether need to apply graceful degrade.\n if (this.state.error && !isBotUserAgent) {\n return (\n <>\n \n {this.props.errorStyles}\n {this.props.errorScripts}\n \n \n )\n }\n\n return this.props.children\n }\n}\n\n/**\n * Handles errors through `getDerivedStateFromError`.\n * Renders the provided error component and provides a way to `reset` the error boundary state.\n */\n\n/**\n * Renders error boundary with the provided \"errorComponent\" property as the fallback.\n * If no \"errorComponent\" property is provided it renders the children without an error boundary.\n */\nexport function ErrorBoundary({\n errorComponent,\n errorStyles,\n errorScripts,\n children,\n}: ErrorBoundaryProps & {\n children: React.ReactNode\n}): JSX.Element {\n // When we're rendering the missing params shell, this will return null. This\n // is because we won't be rendering any not found boundaries or error\n // boundaries for the missing params shell. When this runs on the client\n // (where these errors can occur), we will get the correct pathname.\n const pathname = useUntrackedPathname()\n if (errorComponent) {\n return (\n \n {children}\n \n )\n }\n\n return <>{children}\n}\n"],"names":["React","useUntrackedPathname","isNextRouterError","handleHardNavError","HandleISRError","isBot","isBotUserAgent","window","navigator","userAgent","ErrorBoundaryHandler","Component","getDerivedStateFromError","error","getDerivedStateFromProps","props","state","process","env","__NEXT_APP_NAV_FAIL_HANDLING","previousPathname","pathname","render","errorStyles","errorScripts","this","errorComponent","reset","children","constructor","setState","ErrorBoundary"],"mappings":"AAAA;;AAEA,OAAOA,WAAyB,QAAO;AACvC,SAASC,oBAAoB,QAAQ,yBAAwB;AAC7D,SAASC,iBAAiB,QAAQ,yBAAwB;AAC1D,SAASC,kBAAkB,QAAQ,wBAAuB;AAC1D,SAASC,cAAc,QAAQ,qBAAoB;AACnD,SAASC,KAAK,QAAQ,uCAAsC;AAE5D,MAAMC,iBACJ,OAAOC,WAAW,eAAeF,MAAME,OAAOC,SAAS,CAACC,SAAS;AA0BnE,OAAO,MAAMC,6BAA6BV,MAAMW,SAAS;IASvD,OAAOC,yBAAyBC,KAAY,EAAE;QAC5C,IAAIX,kBAAkBW,QAAQ;YAC5B,+DAA+D;YAC/D,4GAA4G;YAC5G,MAAMA;QACR;QAEA,OAAO;YAAEA;QAAM;IACjB;IAEA,OAAOC,yBACLC,KAAgC,EAChCC,KAAgC,EACE;QAClC,MAAM,EAAEH,KAAK,EAAE,GAAGG;QAElB,iCAAiC;QACjC,8CAA8C;QAC9C,iDAAiD;QACjD,6CAA6C;QAC7C,IAAIC,QAAQC,GAAG,CAACC,4BAA4B,EAAE;YAC5C,IAAIN,S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