/opt/canhelp/apps/web/.next/cache/webpack/server-production
NameSizeModeActions
0.pack925145390644editdlrm
1.pack12673790644editdlrm
2.pack43735990644editdlrm
3.pack7451990644editdlrm
4.pack65204660644editdlrm
5.pack259717610644editdlrm
6.pack7518430644editdlrm
7.pack46388840644editdlrm
8.pack48452960644editdlrm
9.pack97020644editdlrm
10.pack27038500644editdlrm
11.pack1361530644editdlrm
12.pack24060644editdlrm
13.pack4277340644editdlrm
14.pack6358240644editdlrm
15.pack19769150644editdlrm
16.pack85740644editdlrm
17.pack24591570644editdlrm
18.pack119171890644editdlrm
19.pack768050644editdlrm
20.pack31443360644editdlrm
21.pack60115380644editdlrm
22.pack10241010644editdlrm
index.pack77214480644editdlrm
index.pack.old84399530644editdlrm
Edit: /opt/canhelp/apps/web/.next/cache/webpack/server-production/14.pack (635824B)
wpc webpack/lib/cache/PackFileCacheStrategyPackContentItems  /ResolverCachePlugin|normal|default|alias=|false|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx_ResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation.react-server|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx-Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[4].use[0]!/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx|rscQResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|/opt/canhelp/node_modules/next/head.js=|next/dist/client/components/noop-head|/opt/canhelp/node_modules/next/image.js=|next/dist/api/image|/opt/canhelp/node_modules/next/constants.js=|next/dist/api/constants|/opt/canhelp/node_modules/next/router.js=|next/dist/api/router|/opt/canhelp/node_modules/next/dynamic.js=|next/dist/api/app-dynamic|/opt/canhelp/node_modules/next/script.js=|next/dist/api/script|/opt/canhelp/node_modules/next/link.js=|next/dist/client/app-dir/link|/opt/canhelp/node_modules/next/form.js=|next/dist/client/app-dir/form|/opt/canhelp/node_modules/next/navigation.js=|next/dist/api/navigation|/opt/canhelp/node_modules/next/headers.js=|next/dist/api/headers|/opt/canhelp/node_modules/next/og.js=|next/dist/api/og|/opt/canhelp/node_modules/next/server.js=|next/dist/api/server|/opt/canhelp/node_modules/next/document.js=|next/dist/api/document|/opt/canhelp/node_modules/next/app.js=|next/dist/api/app|next=|/opt/canhelp/node_modules/next|]|dependencyType=|esm|path=|/opt/canhelp/apps/web|request=|/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx5Compilation/modules|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx|ssr=FlagDependencyExportsPlugin|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx|ssrLCompilation/codeGeneration|javascript/auto|/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js!/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx|ssr|webpack-runtimeCompilation/assets|chunk180MinifierWebpackPlugin|../app/(auth)/reset-password/page.jswebpack/lib/cache/ResolverCachePlugin`_ResolverCachePluginCacheMisscontextpathrequestqueryfragmentmoduledirectoryfileinternalfullySpecifieddescriptionFilePathdescriptionFileDatadescriptionFileRootrelativePath  /opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx0/opt/canhelp/apps/web/package.jsonnameversionprivatescriptsdependenciesdevDependenciesweb0.1.0 devbuildstartlinttypechecknext dev --port 3000next buildnext startnext linttsc --noEmit @canhelp/shared@marsidev/react-turnstilebetter-authnanostoresnextreactreact-domsocket.io-clientzod*^1.5.0^1.2.7^1.2.0^15.1.6^19.0.0^4.8.1^3.24.1@types/node@types/react@types/react-domautoprefixerpostcsstailwindcsstypescript^22.10.7^19.0.6^19.0.3^10.4.20^8.5.1^3.4.17^5.7.3/opt/canhelp/apps/web./src/app/(auth)/reset-password/page.tsxwebpack/lib/FileSystemInfoSnapshot@ mZyB mZyB` /opt/canhelp/apps/web/src/app/(auth)/reset-password/opt/canhelp/apps/web/src/app/(auth)/opt/canhelp/apps/web/src/app/opt/canhelp/apps/web/src/opt/canhelp/apps/opt/canhelp/opt/safeTimetimestamphash!eyBeyBd659fc12c42d40f9!pZyB`ZyBa0f297e08c87a264@/opt/canhelp/apps/web/src/app/(auth)/reset-password/package.json/opt/canhelp/apps/web/src/app/(auth)/package.json/opt/canhelp/apps/web/src/app/package.json/opt/canhelp/apps/web/src/package.json issuerissuerLayercompilerrscserver @ zZyB@`/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/package.json/opt/canhelp/apps/web/opt/canhelp/apps/package.json/opt/canhelp/apps/web/opt/canhelp/package.json/opt/canhelp/apps/web/opt/package.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.js/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.mjs/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.tsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.ts/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.jsx/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.json/opt/canhelp/apps/web/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx.wasmwebpack/lib/NormalModulewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceD// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", ); exportsTypenamespace javascript/autoaliasmainFieldsconditionNames`$server-only$client-only$next/dist/compiled/server-only$next/dist/compiled/client-only$/opt/canhelp/node_modules/next/head.js/opt/canhelp/node_modules/next/image.js/opt/canhelp/node_modules/next/constants.js/opt/canhelp/node_modules/next/router.js/opt/canhelp/node_modules/next/dynamic.js/opt/canhelp/node_modules/next/script.js/opt/canhelp/node_modules/next/link.js/opt/canhelp/node_modules/next/form.js/opt/canhelp/node_modules/next/navigation.js/opt/canhelp/node_modules/next/headers.js/opt/canhelp/node_modules/next/og.js/opt/canhelp/node_modules/next/server.js/opt/canhelp/node_modules/next/document.js/opt/canhelp/node_modules/next/app.jsreact$react/compiler-runtime$react/jsx-dev-runtime$react/jsx-runtime$react-dom$react-dom/client$react-dom/server$react-dom/server.browser$react-dom/server.edge$react-dom/static$react-dom/static.browser$react-dom/static.edge$react-server-dom-webpack/client$react-server-dom-webpack/server$react-server-dom-webpack/server.node$react-server-dom-webpack/static$@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.tsmnext/dist/compiled/server-only/emptynext/dist/compiled/client-only/errornext/dist/client/components/noop-headnext/dist/api/imagenext/dist/api/constantsnext/dist/api/routernext/dist/api/app-dynamicnext/dist/api/scriptnext/dist/client/app-dir/linknext/dist/client/app-dir/formnext/dist/api/navigation.react-servernext/dist/api/headersnext/dist/api/ognext/dist/api/servernext/dist/api/documentnext/dist/api/appnext/dist/server/route-modules/app-page/vendored/rsc/reactnext/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtimenext/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtimenext/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtimenext/dist/server/route-modules/app-page/vendored/rsc/react-domnext/dist/compiled/react-dom/clientnext/dist/compiled/react-dom/server.nodenext/dist/compiled/react-dom/server.browsernext/dist/build/webpack/alias/react-dom-server.jsnext/dist/compiled/react-dom/static.nodenext/dist/compiled/react-dom/static.browsernext/dist/compiled/react-dom/static.edgenext/dist/compiled/react-server-dom-webpack/client.nodenext/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-servernext/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-staticnext/dist/client/dev/noop-turbopack-hmr/opt/canhelp/node_modules/next$mainreact-server...`cacheableparsedfileDependenciescontextDependenciesmissingDependenciesbuildDependenciesvalueDependenciesjassetsassetsInfostrictexportsArgumenttopLevelDeclarationssnapshot webpack/lib/util/LazySet/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js/opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js webpack/DefinePlugin_hash4028310f64d58917e2fb8c83typeactionIdsclientRefsclientEntryTypeisClientRefclientdefaultauto  __webpack_exports__*default* 0ZyB Swebpack/lib/dependencies/HarmonyCompatibilityDependency dwebpack/lib/dependencies/ConstDependency`=@ `Jwebpack/lib/dependencies/HarmonyExportHeaderDependency AB AC  webpack/lib/dependencies/HarmonyImportSideEffectDependencyreact-server-dom-webpack/server `Jwebpack/lib/dependencies/HarmonyExportExpressionDependency` webpack/lib/dependencies/HarmonyImportSpecifierDependencya registerClientReference A   b&    VssrW ()* @ @ZyB FjL /* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect, Suspense } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { authClient } from '@/lib/auth'; import { useLocale } from '@/context/locale'; function ResetPasswordForm() { const router = useRouter(); const searchParams = useSearchParams(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await authClient.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ _jsxs("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ _jsxs("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ _jsx("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ _jsxs("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ _jsxs("span", { children: [ ' ', /*#__PURE__*/ _jsx(Link, { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ _jsx("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ _jsx("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ _jsx("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsx("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ _jsx("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ _jsx(Link, { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } export default function ResetPasswordPage() { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }), children: /*#__PURE__*/ _jsx(ResetPasswordForm, {}) }); } `  ksideEffectFreej  k$  lm  `$oprnext/dist/compiled/server-onlyrstuvwxyz{|}~next/dist/compiled/server-only/indexnext/dist/compiled/client-only/indexnext/dist/api/navigationnext/dist/server/route-modules/app-page/vendored/ssr/reactnext/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtimenext/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtimenext/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtimenext/dist/server/route-modules/app-page/vendored/ssr/react-domnext/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-clientnext/dist/compiled/react-server-dom-webpack/server.nodenext/dist/compiled/react-server-dom-webpack/static.node  /opt/canhelp/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.jsafed3eef09a4b80d     ResetPasswordFormƑResetPasswordPage 0ZyB  d a=| b=| `}@ `6 A `= A ` A8 `( A9f `- A A @@ `(react/jsx-runtime b=| `6next/navigation `=next/link `@/lib/auth `(@/context/locale `- useRouter A    b useSearchParams A   b ( useLocale A   b  useState A   c " *  ABJ   c  & useEffect A   c7@ authClientresetPassword A`x  A`j   c''3 jsx_jsx A   c99 jsxs_jsxs A   c; ;%  Agl   c>>#  A   cA&A*  A    cE&E*  A    cKK#  A    cO/O4  Aw |    cS8S=  A     cV6V: SLink A #  4 cV;V?  A    c_;_?  A   cc&c+  Afj   ce.e2  Aim   ci.i2  A   ct&t+  Abf   cv.v2  Adh   cz.z2  A   @`&@`*  A   @`&@`*  A!%  || @`4@`8 A&* 4~~ @`9@`=webpack/lib/dependencies/HarmonyExportSpecifierDependency@b# @@  A   ss @`@` Suspense A 4BB @`@`&  A  jj @` @`$  Aqu  ff @`$@`(  A  bb @` @`$ webpack/lib/ModuleGraphRestoreProvidedDataprovidedcanMangleProvideterminalBindingexportsInfo sourcesruntimeRequirementsdatajavascriptwebpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource &webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect, Suspense } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { authClient } from '@/lib/auth'; import { useLocale } from '@/context/locale'; function ResetPasswordForm() { const router = useRouter(); const searchParams = useSearchParams(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await authClient.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ _jsxs("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ _jsxs("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ _jsx("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ _jsxs("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ _jsxs("span", { children: [ ' ', /*#__PURE__*/ _jsx(Link, { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ _jsx("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ _jsx("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ _jsx("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsx("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ _jsx("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ _jsx(Link, { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } export default function ResetPasswordPage() { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }), children: /*#__PURE__*/ _jsx(ResetPasswordForm, {}) }); } c(={}_79eBI`igk _ w {    " fiilbedg!$&L)qt(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yK(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(next_link__WEBPACK_IMPORTED_MODULE_3___default())react__WEBPACK_IMPORTED_MODULE_1__.SuspensebuffersourcesizemapsM&__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* __next_internal_client_entry_do_not_use__ default auto */ function ResetPasswordForm() { const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await _lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yK.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { children: [ ' ', /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } function ResetPasswordPage() { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ResetPasswordForm, {}) }); } {"finalSource":true}mapbufferedMap ConcatSourceRawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); ReplaceSourceRawSource 61123undefined125178undefined180240undefined242270undefined272311undefined313357undefined409417(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined447461(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined484492(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)undefined531538(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined578585(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined692700(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined13761385_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yKundefined19211924(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined20402044(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined21512155(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined22872290(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined24932496(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined27232727(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined29532957(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined31913195(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined33543357(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined33593362(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined38683871(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40974101(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined41984201(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined44574460(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined51175121(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined52185221(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined54765479(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined61356138(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined65496552(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66896692(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66946697(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined70397053undefined71107113(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined71157122react__WEBPACK_IMPORTED_MODULE_1__.Suspenseundefined71597162(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined72817284(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined73917394(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined __webpack_require____webpack_require__.n__webpack_require__.r__webpack_require__.d  Rwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSource`=webpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceb(() => { var exports = {}; exports.id = 180; exports.ids = [180]; exports.modules = { /***/ 261: webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource 'webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; Hmodule.exports = require("next/dist/shared/lib/router/utils/app-paths");  /***/ }) buffersourcesizemapshashv/***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/app-paths"); /***/ }) {"finalSource":true}mapbufferedMap ConcatSourceRawSource$/***/ ((module) => { "use strict";  RawSourceHmodule.exports = require("next/dist/shared/lib/router/utils/app-paths"); /***/ }), /***/ 3295:  <webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; ]module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");  /***/ }) /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js"); /***/ })  ]module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");, /***/ 10846:  3webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; Tmodule.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");  /***/ }) /***/ ((module) => { "use strict"; module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js"); /***/ })  Tmodule.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");, /***/ 19121:  8webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; Ymodule.exports = require("next/dist/server/app-render/action-async-storage.external.js");  /***/ }) /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/action-async-storage.external.js"); /***/ })  Ymodule.exports = require("next/dist/server/app-render/action-async-storage.external.js");, /***/ 26713:  $webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; Emodule.exports = require("next/dist/shared/lib/router/utils/is-bot");  /***/ }) s/***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/is-bot"); /***/ })  Emodule.exports = require("next/dist/shared/lib/router/utils/is-bot");, /***/ 27537:  ywebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceconst module0 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/layout.tsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/not-found.tsx"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module6 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const page7 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map @bb{_:S0 knnpEG13_')BD 7 9 ) + t v _LNd:6Y^__z1 r} ""<"K"""#1###$($P$h$%_/%%Z&_&m&e/r/0188T8\8889::::;B;n<|<<<===?@BMBF_FGGJJJJKIK OOHVUVWX]]bbccccWdbdffdfofffh_h i.ikknnttttvv5wJwyyXfńhu4DYϔʕ_ٕȖju|IVѠ@UäؤާugrvXG`o*#>AM\7>>L 2Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570))Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506))Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))__webpack_require__next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModulenext_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind".next"0 falsefalse{}(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADERnext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)0(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default())(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestnext_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponsenext_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T) true(__webpack_require__(33873).join)0next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERnext_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADERnext_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEARnext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERnext_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCodenext_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGSnext_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)buffersourcesizemapshash__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const page7 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))).default(props))], apple: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))).default(props))], apple: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? Boolean(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(33873).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map {"finalSource":true}mapbufferedMap ConcatSourceRawSource#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); ReplaceSourceRawSourceconst module0 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/layout.tsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/not-found.tsx"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module6 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const page7 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map (2298Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570))undefined123210Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23))undefined235314Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506))undefined339423Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined448535Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined560644Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined669756Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined779875Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))undefined8781018undefined10201134undefined11361212undefined12141285undefined12871349undefined13511420undefined14221498undefined15001585undefined15871670undefined16721748undefined17501831undefined18331926undefined19282032undefined20342114undefined21162194undefined21962287undefined22892470undefined24722548undefined25502615undefined26172690undefined26922749undefined27512857undefined28592932undefined29342998undefined30003081undefined37713993Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))undefined40514280Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))undefined48405062Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))undefined51205349Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))undefined55485570undefined55725708undefined57105732undefined57635781__webpack_require__undefined58395845undefined59466072undefined60746159undefined61616274undefined63376343undefined63686385next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined64216429next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined67106745".next"undefined675067510undefined67786816 falseundefined68286834undefined71307150falseundefined71537217{}undefined73637402falseundefined74347447(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined75387551(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined83178332(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)undefined87198728(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)undefined87648779(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)undefined89248937(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined89839009next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADERundefined91889201(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined92479256next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADERundefined92969320(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)undefined95009519(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined97119818 falseundefined982398370undefined1213312146(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1253112558(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)undefined1434314360(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1442014428next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__undefined1447914478: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default())undefined1484714876(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)undefined1500815028(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)undefined1516215170(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1547015484next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1552415539next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1576715804falseundefined1580716382{}undefined1696016973next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1806018073(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1835218365(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1908419120 trueundefined1912419143(__webpack_require__(33873).join)undefined19222192730undefined2023420247(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2208822101(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2252522546next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined2398523999next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2524525262(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)undefined2555125562next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2557725581(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)undefined2568725698next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2613226143next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2621226223next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2631226323next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2685626867next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2691226926next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined2757827586next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2833228353(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined2988129895next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2993429945next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3044730460(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3051730538(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined3111331121next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3260032614next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3396633989next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADERundefined3645636469next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEARundefined3676436778next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3766137684next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined3795637977next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3809538116next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3834638361(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3858938600next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3862938651next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined3930739322(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3953039541next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3980439817(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4026540278(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4114841169next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4204842069next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4217942200next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4275342770next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCodeundefined4297442997next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined4389343908(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4493644951(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4515945170next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined4520345225next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined4594246054falseundefined4605746407{}undefined4643246447(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4739147402next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGSundefined4753747552(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4816348190falseundefined4819348263{}undefined4957149585next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined5050950524(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined5139951412next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5151151518next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5177451788next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined5200052018(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefined /***/ }) ;/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const page7 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))).default(props))], apple: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))).default(props))], apple: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? Boolean(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(33873).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map /***/ })   _/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; #__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); ReplaceSourceRawSourceconst module0 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/layout.tsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/not-found.tsx"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module6 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const page7 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map (2298Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570))undefined123210Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23))undefined235314Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506))undefined339423Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined448535Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined560644Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined669756Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined779875Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))undefined8781018undefined10201134undefined11361212undefined12141285undefined12871349undefined13511420undefined14221498undefined15001585undefined15871670undefined16721748undefined17501831undefined18331926undefined19282032undefined20342114undefined21162194undefined21962287undefined22892470undefined24722548undefined25502615undefined26172690undefined26922749undefined27512857undefined28592932undefined29342998undefined30003081undefined37713993Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))undefined40514280Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))undefined48405062Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))undefined51205349Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))undefined55485570undefined55725708undefined57105732undefined57635781__webpack_require__undefined58395845undefined59466072undefined60746159undefined61616274undefined63376343undefined63686385next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined64216429next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined67106745".next"undefined675067510undefined67786816 falseundefined68286834undefined71307150falseundefined71537217{}undefined73637402falseundefined74347447(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined75387551(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined83178332(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)undefined87198728(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)undefined87648779(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)undefined89248937(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined89839009next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADERundefined91889201(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined92479256next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADERundefined92969320(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)undefined95009519(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined97119818 falseundefined982398370undefined1213312146(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1253112558(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)undefined1434314360(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1442014428next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__undefined1447914478: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default())undefined1484714876(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)undefined1500815028(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)undefined1516215170(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1547015484next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1552415539next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1576715804falseundefined1580716382{}undefined1696016973next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1806018073(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1835218365(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1908419120 trueundefined1912419143(__webpack_require__(33873).join)undefined19222192730undefined2023420247(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2208822101(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2252522546next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined2398523999next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2524525262(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)undefined2555125562next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2557725581(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)undefined2568725698next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2613226143next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2621226223next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2631226323next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2685626867next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2691226926next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined2757827586next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2833228353(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined2988129895next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2993429945next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3044730460(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3051730538(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined3111331121next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3260032614next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3396633989next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADERundefined3645636469next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEARundefined3676436778next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3766137684next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined3795637977next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3809538116next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3834638361(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3858938600next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3862938651next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined3930739322(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3953039541next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3980439817(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4026540278(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4114841169next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4204842069next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4217942200next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4275342770next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCodeundefined4297442997next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined4389343908(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4493644951(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4515945170next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined4520345225next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined4594246054falseundefined4605746407{}undefined4643246447(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4739147402next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGSundefined4753747552(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4816348190falseundefined4819348263{}undefined4957149585next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined5050950524(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined5139951412next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5151151518next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5177451788next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined5200052018(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefined, /***/ 27910:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; #module.exports = require("stream");  /***/ }) Q/***/ ((module) => { "use strict"; module.exports = require("stream"); /***/ })  #module.exports = require("stream");, /***/ 28354:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; !module.exports = require("util");  /***/ }) O/***/ ((module) => { "use strict"; module.exports = require("util"); /***/ })  !module.exports = require("util");, /***/ 29021:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; module.exports = require("fs");  /***/ }) M/***/ ((module) => { "use strict"; module.exports = require("fs"); /***/ })  module.exports = require("fs");, /***/ 29294:  6webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; Wmodule.exports = require("next/dist/server/app-render/work-async-storage.external.js");  /***/ }) /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-async-storage.external.js"); /***/ })  Wmodule.exports = require("next/dist/server/app-render/work-async-storage.external.js");, /***/ 33873:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; !module.exports = require("path");  /***/ }) O/***/ ((module) => { "use strict"; module.exports = require("path"); /***/ })  !module.exports = require("path");, /***/ 34631:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict";  module.exports = require("tls");  /***/ }) N/***/ ((module) => { "use strict"; module.exports = require("tls"); /***/ })   module.exports = require("tls");, /***/ 37211:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceD// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", ); `=GB @/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference));buffersourcesizemapshashp__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", )); {"finalSource":true}mapbufferedMap ConcatSourceRawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); ReplaceSourceRawSourceD// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", ); 61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined578578.5);undefined /***/ }) /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", )); /***/ })   __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); D// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", ); 61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined578578.5);undefined, /***/ 41025:  @webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; amodule.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");  /***/ }) |/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js"); /***/ }) } amodule.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");, /***/ 55511:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; #module.exports = require("crypto");  /***/ }) sQ/***/ ((module) => { "use strict"; module.exports = require("crypto"); /***/ }) tw xyz#module.exports = require("crypto");y{, /***/ 55591:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; "module.exports = require("https");  /***/ }) jP/***/ ((module) => { "use strict"; module.exports = require("https"); /***/ }) kn opq"module.exports = require("https");pr, /***/ 63033:  ;webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; \module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");  /***/ }) a/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js"); /***/ }) be fgh\module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");gi, /***/ 70905:  zwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource ewebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcecimport(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); ``Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))buffersourcesizemapshashbPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211)); {"finalSource":true}mapbufferedMap ReplaceSourceRawSourcecimport(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); l096Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))undefined /***/ }) X/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211)); /***/ }) Y\ ]V/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { cimport(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); l096Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))undefined\^, /***/ 74075:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; !module.exports = require("zlib");  /***/ }) MO/***/ ((module) => { "use strict"; module.exports = require("zlib"); /***/ }) NQ RST!module.exports = require("zlib");SU, /***/ 79428:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; #module.exports = require("buffer");  /***/ }) DQ/***/ ((module) => { "use strict"; module.exports = require("buffer"); /***/ }) EH IJK#module.exports = require("buffer");JL, /***/ 79551:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict";  module.exports = require("url");  /***/ }) ;N/***/ ((module) => { "use strict"; module.exports = require("url"); /***/ }) <? @AB module.exports = require("url");AC, /***/ 79646:   webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; *module.exports = require("child_process");  /***/ }) 2X/***/ ((module) => { "use strict"; module.exports = require("child_process"); /***/ }) 36 789*module.exports = require("child_process");8:, /***/ 81630:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; !module.exports = require("http");  /***/ }) )O/***/ ((module) => { "use strict"; module.exports = require("http"); /***/ }) *- ./0!module.exports = require("http");/1, /***/ 83997:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict";  module.exports = require("tty");  /***/ })  N/***/ ((module) => { "use strict"; module.exports = require("tty"); /***/ }) !$ %&' module.exports = require("tty");&(, /***/ 84057:  zwebpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource ewebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSourcecimport(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); ``Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249))buffersourcesizemapshashbPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249)); {"finalSource":true}mapbufferedMap ReplaceSourceRawSourcecimport(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); l096Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249))undefined /***/ }) /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249)); /***/ })  Ol096Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249))undefined, /***/ 86439:  +webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; Lmodule.exports = require("next/dist/shared/lib/no-fallback-error.external");  /***/ }) z/***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/no-fallback-error.external"); /***/ })  Lmodule.exports = require("next/dist/shared/lib/no-fallback-error.external");, /***/ 91249:  {webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; webpack/lib/util/registerExternalSerializerwebpack-sources/CachedSource &webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect, Suspense } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { authClient } from '@/lib/auth'; import { useLocale } from '@/context/locale'; function ResetPasswordForm() { const router = useRouter(); const searchParams = useSearchParams(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await authClient.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ _jsxs("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ _jsxs("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ _jsx("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ _jsxs("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ _jsxs("span", { children: [ ' ', /*#__PURE__*/ _jsx(Link, { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ _jsx("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ _jsx("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ _jsx("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsx("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ _jsx("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ _jsx(Link, { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } export default function ResetPasswordPage() { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }), children: /*#__PURE__*/ _jsx(ResetPasswordForm, {}) }); } c(={}_79eBI`igk _ w {    " fiilbedg!$&L)qt(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yK(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(next_link__WEBPACK_IMPORTED_MODULE_3___default())react__WEBPACK_IMPORTED_MODULE_1__.Suspensebuffersourcesizemapshash&__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* __next_internal_client_entry_do_not_use__ default auto */ function ResetPasswordForm() { const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await _lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yK.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { children: [ ' ', /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } function ResetPasswordPage() { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ResetPasswordForm, {}) }); } {"finalSource":true}mapbufferedMap ConcatSourceRawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); ReplaceSourceRawSource/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect, Suspense } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { authClient } from '@/lib/auth'; import { useLocale } from '@/context/locale'; function ResetPasswordForm() { const router = useRouter(); const searchParams = useSearchParams(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await authClient.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ _jsxs("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ _jsxs("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ _jsx("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ _jsxs("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ _jsxs("span", { children: [ ' ', /*#__PURE__*/ _jsx(Link, { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ _jsx("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ _jsx("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ _jsx("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsx("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ _jsx("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ _jsx(Link, { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } export default function ResetPasswordPage() { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }), children: /*#__PURE__*/ _jsx(ResetPasswordForm, {}) }); }  61123undefined125178undefined180240undefined242270undefined272311undefined313357undefined409417(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined447461(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined484492(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)undefined531538(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined578585(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined692700(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined13761385_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yKundefined19211924(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined20402044(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined21512155(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined22872290(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined24932496(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined27232727(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined29532957(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined31913195(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined33543357(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined33593362(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined38683871(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40974101(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined41984201(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined44574460(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined51175121(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined52185221(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined54765479(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined61356138(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined65496552(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66896692(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66946697(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined70397053undefined71107113(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined71157122react__WEBPACK_IMPORTED_MODULE_1__.Suspenseundefined71597162(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined72817284(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined73917394(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined /***/ }) Y'/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* __next_internal_client_entry_do_not_use__ default auto */ function ResetPasswordForm() { const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await _lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yK.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { children: [ ' ', /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } function ResetPasswordPage() { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ResetPasswordForm, {}) }); } /***/ })     ; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); </* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useState, useEffect, Suspense } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import Link from 'next/link'; import { authClient } from '@/lib/auth'; import { useLocale } from '@/context/locale'; function ResetPasswordForm() { const router = useRouter(); const searchParams = useSearchParams(); const { t } = useLocale(); const [loading, setLoading] = useState(false); const [error, setError] = useState(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await authClient.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ _jsxs("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ _jsxs("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ _jsx("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ _jsx("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ _jsxs("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ _jsxs("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ _jsxs("span", { children: [ ' ', /*#__PURE__*/ _jsx(Link, { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ _jsx("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ _jsx("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ _jsx("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ _jsx("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ _jsx("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ _jsx(Link, { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } export default function ResetPasswordPage() { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }), children: /*#__PURE__*/ _jsx(ResetPasswordForm, {}) }); }  61123undefined125178undefined180240undefined242270undefined272311undefined313357undefined409417(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined447461(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined484492(0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)undefined531538(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined578585(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined692700(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined13761385_lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yKundefined19211924(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined20402044(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined21512155(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined22872290(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined24932496(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined27232727(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined29532957(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined31913195(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined33543357(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined33593362(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined38683871(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40974101(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined41984201(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined44574460(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined51175121(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined52185221(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined54765479(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined61356138(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined65496552(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66896692(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined66946697(next_link__WEBPACK_IMPORTED_MODULE_3___default())undefined70397053undefined71107113(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined71157122react__WEBPACK_IMPORTED_MODULE_1__.Suspenseundefined71597162(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined72817284(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined73917394(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined  , /***/ 91645:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict";  module.exports = require("net");  /***/ }) N/***/ ((module) => { "use strict"; module.exports = require("net"); /***/ })   module.exports = require("net");, /***/ 94735:  webpack/lib/util/registerExternalSerializerwebpack-sources/ConcatSourcewebpack/lib/util/registerExternalSerializerwebpack-sources/RawSource$/***/ ((module) => { "use strict"; #module.exports = require("events");  /***/ }) Q/***/ ((module) => { "use strict"; module.exports = require("events"); /***/ })  #module.exports = require("events");z }; ; // load runtime var __webpack_require__ = require("../../../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [901,652,809], () => (__webpack_exec__(27537))); ,module.exports = __webpack_exports__; })(); .(() => { var exports = {}; exports.id = 180; exports.ids = [180]; exports.modules = { /***/ 261: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/app-paths"); /***/ }), /***/ 3295: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js"); /***/ }), /***/ 10846: /***/ ((module) => { "use strict"; module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js"); /***/ }), /***/ 19121: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/action-async-storage.external.js"); /***/ }), /***/ 26713: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/is-bot"); /***/ }), /***/ 27537: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23)); const module6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23)); const page7 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))).default(props))], apple: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))).default(props))], apple: [(async (props) => (await Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? Boolean(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(33873).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map /***/ }), /***/ 27910: /***/ ((module) => { "use strict"; module.exports = require("stream"); /***/ }), /***/ 28354: /***/ ((module) => { "use strict"; module.exports = require("util"); /***/ }), /***/ 29021: /***/ ((module) => { "use strict"; module.exports = require("fs"); /***/ }), /***/ 29294: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-async-storage.external.js"); /***/ }), /***/ 33873: /***/ ((module) => { "use strict"; module.exports = require("path"); /***/ }), /***/ 34631: /***/ ((module) => { "use strict"; module.exports = require("tls"); /***/ }), /***/ 37211: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx", "default", )); /***/ }), /***/ 41025: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js"); /***/ }), /***/ 55511: /***/ ((module) => { "use strict"; module.exports = require("crypto"); /***/ }), /***/ 55591: /***/ ((module) => { "use strict"; module.exports = require("https"); /***/ }), /***/ 63033: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js"); /***/ }), /***/ 70905: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211)); /***/ }), /***/ 74075: /***/ ((module) => { "use strict"; module.exports = require("zlib"); /***/ }), /***/ 79428: /***/ ((module) => { "use strict"; module.exports = require("buffer"); /***/ }), /***/ 79551: /***/ ((module) => { "use strict"; module.exports = require("url"); /***/ }), /***/ 79646: /***/ ((module) => { "use strict"; module.exports = require("child_process"); /***/ }), /***/ 81630: /***/ ((module) => { "use strict"; module.exports = require("http"); /***/ }), /***/ 83997: /***/ ((module) => { "use strict"; module.exports = require("tty"); /***/ }), /***/ 84057: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249)); /***/ }), /***/ 86439: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/no-fallback-error.external"); /***/ }), /***/ 91249: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ ResetPasswordPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(78157); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31768); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71159); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94496); /* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _lib_auth__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(13260); /* harmony import */ var _context_locale__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(96484); /* __next_internal_client_entry_do_not_use__ default auto */ function ResetPasswordForm() { const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const { t } = (0,_context_locale__WEBPACK_IMPORTED_MODULE_5__/* .useLocale */ .Y)(); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const token = searchParams.get('token'); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ if (!token) { setError(t('reset.error.invalid')); } }, [ token, t ]); async function handleSubmit(e) { e.preventDefault(); setError(''); const form = new FormData(e.currentTarget); const newPassword = form.get('password'); const confirm = form.get('confirm'); if (newPassword !== confirm) { setError(t('reset.error.mismatch')); return; } if (!token) { setError(t('reset.error.invalid')); return; } setLoading(true); let result = null; try { result = await _lib_auth__WEBPACK_IMPORTED_MODULE_4__/* .authClient */ .yK.resetPassword({ newPassword, token }); } catch { setError(t('reset.error.invalid')); setLoading(false); return; } if (result?.error) { setError(result.error.message ?? t('reset.error.invalid')); setLoading(false); } else { // Show success briefly then redirect setError(''); setTimeout(()=>router.push('/login'), 2000); } } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center px-4", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "w-full max-w-md", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "text-center mb-8", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { className: "text-3xl font-bold text-white", children: t('reset.title') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-white/70 mt-2", children: t('reset.subtitle') }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("form", { onSubmit: handleSubmit, className: "bg-white rounded-xl border border-gray-200 p-6 space-y-4", children: [ error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "bg-red-50 text-red-700 p-3 rounded-lg text-sm", children: [ error, !token && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { children: [ ' ', /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/forgot-password", className: "underline font-medium", children: t('reset.back_to_login').replace('sign in', 'request new link') }) ] }) ] }), loading && !error && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bg-green-50 text-green-700 p-3 rounded-lg text-sm", children: t('reset.success') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.password') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "password", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("label", { className: "block text-sm font-medium text-gray-700 mb-1", children: t('reset.confirm') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { name: "confirm", type: "password", required: true, minLength: 8, autoComplete: "new-password", disabled: !token || loading, className: "w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { type: "submit", disabled: !token || loading, className: "w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50", children: loading ? t('reset.submitting') : t('reset.submit') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "text-center text-sm text-gray-500", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)((next_link__WEBPACK_IMPORTED_MODULE_3___default()), { href: "/login", className: "text-blue-600 hover:underline font-medium", children: t('reset.back_to_login') }) }) ] }) ] }) }); } function ResetPasswordPage() { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "min-h-screen flex items-center justify-center", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ResetPasswordForm, {}) }); } /***/ }), /***/ 91645: /***/ ((module) => { "use strict"; module.exports = require("net"); /***/ }), /***/ 94735: /***/ ((module) => { "use strict"; module.exports = require("events"); /***/ }) }; ; // load runtime var __webpack_require__ = require("../../../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [901,652,809], () => (__webpack_exec__(27537))); module.exports = __webpack_exports__; })(); {} @b(() => { var exports = {}; exports.id = 180; exports.ids = [180]; exports.modules = { /***/ 261: $/***/ ((module) => { "use strict";  RawSourceHmodule.exports = require("next/dist/shared/lib/router/utils/app-paths"); /***/ }), /***/ 3295: ]module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");, /***/ 10846: Tmodule.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");, /***/ 19121: Ymodule.exports = require("next/dist/server/app-render/action-async-storage.external.js");, /***/ 26713: Emodule.exports = require("next/dist/shared/lib/router/utils/is-bot");, /***/ 27537: _/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; #__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73653); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97714); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(85250); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(37587); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(22369); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1889); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(96232); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(22841); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46537); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46027); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(78559); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(75928); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(19374); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65971); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(79898); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(32967); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(26713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(40139); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(14248); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(59580); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(57749); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(53123); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(89745); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(86439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(58671); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(18283); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(39818); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/layout.tsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/not-found.tsx"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module6 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const page7 = () => import(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ '(auth)', { children: [ 'reset-password', { children: ['__PAGE__', {}, { page: [page7, "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"], }] }, { } ] }, { 'forbidden': [module5, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module6, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }, { 'layout': [module0, "/opt/canhelp/apps/web/src/app/layout.tsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "/opt/canhelp/apps/web/src/app/not-found.tsx"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], metadata: { icon: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=icon&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/icon.png?__next_metadata__")).default(props))], apple: [(async (props) => (await import(/* webpackMode: "eager" */ "next-metadata-image-loader?type=apple&segment=&basePath=&pageExtensions=tsx&pageExtensions=ts&pageExtensions=jsx&pageExtensions=js!/opt/canhelp/apps/web/src/app/apple-icon.png?__next_metadata__")).default(props))], openGraph: [], twitter: [], manifest: undefined } } ] }.children; const pages = ["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/(auth)/reset-password/page", pathname: "/reset-password", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/(auth)/reset-password/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? Boolean(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map (2298Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 47570))undefined123210Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 58671, 23))undefined235314Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 33506))undefined339423Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined448535Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined560644Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 15034, 23))undefined669756Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 54693, 23))undefined779875Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))undefined8781018undefined10201134undefined11361212undefined12141285undefined12871349undefined13511420undefined14221498undefined15001585undefined15871670undefined16721748undefined17501831undefined18331926undefined19282032undefined20342114undefined21162194undefined21962287undefined22892470undefined24722548undefined25502615undefined26172690undefined26922749undefined27512857undefined28592932undefined29342998undefined30003081undefined37713993Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))undefined40514280Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))undefined48405062Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2645))undefined51205349Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 45639))undefined55485570undefined55725708undefined57105732undefined57635781__webpack_require__undefined58395845undefined59466072undefined60746159undefined61616274undefined63376343undefined63686385next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined64216429next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined67106745".next"undefined675067510undefined67786816 falseundefined68286834undefined71307150falseundefined71537217{}undefined73637402falseundefined74347447(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined75387551(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined83178332(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_14__.normalizeAppPath)undefined87198728(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.getBotType)undefined87648779(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.isHtmlBotRequest)undefined89248937(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined89839009next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_ROUTER_PREFETCH_HEADERundefined91889201(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined92479256next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_HEADERundefined92969320(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_15__.getIsPossibleServerAction)undefined95009519(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined97119818 falseundefined982398370undefined1213312146(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1253112558(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_12__.shouldServeStreamingMetadata)undefined1434314360(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1442014428next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_26__undefined1447914478: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_25___default())undefined1484714876(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_11__.setReferenceManifestsSingleton)undefined1500815028(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_13__.createServerModuleMap)undefined1516215170(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1547015484next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1552415539next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1576715804falseundefined1580716382{}undefined1696016973next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1806018073(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1835218365(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1908419120 trueundefined1912419143(__webpack_require__(33873).join)undefined19222192730undefined2023420247(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2208822101(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2252522546next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined2398523999next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2524525262(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.parseFallbackField)undefined2555125562next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2557725581(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_17__.isBot)undefined2568725698next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2613226143next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2621226223next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2631226323next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2685626867next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_19__.FallbackModeundefined2691226926next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined2757827586next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2833228353(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined2988129895next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined2993429945next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3044730460(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3051730538(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_10__/* .getFallbackRouteParams */ .u)undefined3111331121next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3260032614next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3396633989next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_IS_PRERENDER_HEADERundefined3645636469next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.CACHE_ONE_YEARundefined3676436778next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined3766137684next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined3795637977next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3809538116next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined3834638361(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3858938600next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3862938651next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined3930739322(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined3953039541next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined3980439817(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4026540278(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4114841169next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4204842069next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4217942200next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_21__.NEXT_CACHE_TAGS_HEADERundefined4275342770next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_27__.RedirectStatusCodeundefined4297442997next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.NEXT_DID_POSTPONE_HEADERundefined4389343908(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4493644951(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4515945170next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_20__["default"]undefined4520345225next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_16__.RSC_CONTENT_TYPE_HEADERundefined4594246054falseundefined4605746407{}undefined4643246447(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4739147402next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_22__.ENCODED_TAGSundefined4753747552(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined4816348190falseundefined4819348263{}undefined4957149585next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_18__.CachedRouteKindundefined5050950524(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_23__.sendRenderResult)undefined5139951412next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5151151518next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5177451788next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_24__.NoFallbackErrorundefined5200052018(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefined, /***/ 27910: #module.exports = require("stream");, /***/ 28354: !module.exports = require("util");, /***/ 29021: module.exports = require("fs");, /***/ 29294: Wmodule.exports = require("next/dist/server/app-render/work-async-storage.external.js");, /***/ 33873: !module.exports = require("path");, /***/ 34631:  module.exports = require("tls");, /***/ 37211: __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25459); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); K61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined578578.5);undefined, /***/ 41025: amodule.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");, /***/ 55511: #module.exports = require("crypto");, /***/ 55591: "module.exports = require("https");, /***/ 63033: \module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");, /***/ 70905: V/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { cimport(/* webpackMode: "eager" */ "/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"); l096Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 37211))undefined, /***/ 74075: !module.exports = require("zlib");, /***/ 79428: #module.exports = require("buffer");, /***/ 79551:  module.exports = require("url");, /***/ 79646: *module.exports = require("child_process");, /***/ 81630: !module.exports = require("http");, /***/ 83997:  module.exports = require("tty");, /***/ 84057: l096Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 91249))undefined, /***/ 86439: Lmodule.exports = require("next/dist/shared/lib/no-fallback-error.external");, /***/ 91249: , /***/ 91645:  module.exports = require("net");, /***/ 94735: #module.exports = require("events");z }; ; // load runtime var __webpack_require__ = require("../../../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [901,652,809], () => (__webpack_exec__(27537))); ,module.exports = __webpack_exports__; })(); O(()=>{var a={};a.id=180,a.ids=[180],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},27537:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>J,handler:()=>L,pages:()=>I,routeModule:()=>K,tree:()=>H});var d=c(73653),e=c(97714),f=c(85250),g=c(37587),h=c(22369),i=c(1889),j=c(96232),k=c(22841),l=c(46537),m=c(46027),n=c(78559),o=c(75928),p=c(19374),q=c(65971),r=c(261),s=c(79898),t=c(32967),u=c(26713),v=c(40139),w=c(14248),x=c(59580),y=c(57749),z=c(53123),A=c(89745),B=c(86439),C=c(58671),D=c.n(C),E=c(18283),F=c(39818),G={};for(let a in E)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(G[a]=()=>E[a]);c.d(b,G);let H={children:["",{children:["(auth)",{children:["reset-password",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,37211)),"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"]}]},{}]},{forbidden:[()=>Promise.resolve().then(c.t.bind(c,15034,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,54693,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,2645))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,45639))).default(a)],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,47570)),"/opt/canhelp/apps/web/src/app/layout.tsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,58671,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.bind(c,33506)),"/opt/canhelp/apps/web/src/app/not-found.tsx"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,15034,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,54693,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,2645))).default(a)],apple:[async a=>(await Promise.resolve().then(c.bind(c,45639))).default(a)],openGraph:[],twitter:[],manifest:void 0}}]}.children,I=["/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx"],J={require:c,loadChunk:()=>Promise.resolve()},K=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(auth)/reset-password/page",pathname:"/reset-password",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:H},distDir:".next",relativeProjectDir:""});async function L(a,b,d){var C;let G="/(auth)/reset-password/page";"/index"===G&&(G="/");let M=(0,h.getRequestMeta)(a,"postponed"),N=(0,h.getRequestMeta)(a,"minimalMode"),O=await K.prepare(a,b,{srcPage:G,multiZoneDraftMode:!1});if(!O)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:P,query:Q,params:R,parsedUrl:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,interceptionRoutePatterns:ae}=O,af=S.pathname||"/",ag=(0,r.normalizeAppPath)(G),{isOnDemandRevalidate:ah}=O,ai=K.match(af,$),aj=!!$.routes[aa],ak=!!(ai||aj||$.routes[ag]),al=a.headers["user-agent"]||"",am=(0,u.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[t.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[t.RSC_HEADER],aq=(0,s.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr)&&(null==(C=$.routes[ag]??$.dynamicRoutes[ag])?void 0:C.renderingMode)==="PARTIALLY_STATIC",as=!1,at=!1,au=ar?M:void 0,av=ar&&ap&&!ao,aw=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ax=!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots);an&&ar&&(ak=!1,ax=!1);let ay=!0===K.isDev||!ak||"string"==typeof M||av,az=an&&ar,aA=null;_||!ak||ay||aq||au||av||(aA=aa);let aB=aA;!aB&&K.isDev&&(aB=aa),K.isDev||_||!ak||!ap||av||(0,k.d)(a.headers);let aC={...E,tree:H,pages:I,GlobalError:D(),handler:L,routeModule:K,__next_app__:J};X&&Y&&(0,o.setReferenceManifestsSingleton)({page:G,clientReferenceManifest:Y,serverActionsManifest:X,serverModuleMap:(0,q.createServerModuleMap)({serverActionsManifest:X})});let aD=a.method||"GET",aE=(0,g.getTracer)(),aF=aE.getActiveScopeSpan();try{let f=K.getVaryHeader(aa,ae);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return K.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aE.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aD} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aD} ${a.url}`)})},m=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:Q,params:R,page:ag,sharedContext:{buildId:P},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aC,Component:(0,j.T)(aC),params:R,routeModule:K,page:G,postponed:f,shouldWaitOnAllReady:az,serveStreamingMetadata:ax,supportsDynamicResponse:"string"==typeof f||ay,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,serverActionsManifest:X,clientReferenceManifest:Y,setIsrStatus:null==ac?void 0:ac.setIsrStatus,dir:c(33873).join(process.cwd(),K.relativeProjectDir),isDraftMode:_,isRevalidate:ak&&!f&&!av,botType:am,isOnDemandRevalidate:ah,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,previewProps:$.preview,deploymentId:ad.deploymentId,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,devtoolSegmentExplorer:ad.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ad.experimental.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...as?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:as}:{},experimental:{isRoutePPREnabled:ar,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,cacheComponents:!!ad.experimental.cacheComponents,clientSegmentCache:!!ad.experimental.clientSegmentCache,clientParamParsing:!!ad.experimental.clientParamParsing,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[]},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>K.onRequestError(a,b,d,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:K.isDev}},l=await k(e,i),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[y.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,ak&&(null==n?void 0:n.revalidate)===0&&!K.isDev&&!ar){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""} see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:v.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},o=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===K.isDev,l=c||b.writableEnded;if(ah&&ab&&!f&&!N)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(ai&&(j=(0,w.parseFallbackField)(ai.fallback)),j===w.FallbackMode.PRERENDER&&(0,u.isBot)(al)&&(!ar||an)&&(j=w.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ah=!0),ah&&(j!==w.FallbackMode.NOT_FOUND||f)&&(j=w.FallbackMode.BLOCKING_STATIC_RENDER),!N&&j!==w.FallbackMode.BLOCKING_STATIC_RENDER&&aB&&!l&&!_&&T&&(k||!aj)){let b;if((k||ai)&&j===w.FallbackMode.NOT_FOUND)throw new B.NoFallbackError;if(ar&&!ap){let c="string"==typeof(null==ai?void 0:ai.fallback)?ai.fallback:k?ag:null;if(b=await K.handleResponse({cacheKey:c,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:ar,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||at?(0,n.u)(ag):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let o=ah||g||!au?void 0:au;if(as&&void 0!==o)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:v.CachedRouteKind.PAGES,html:x.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=T&&ar&&((0,h.getRequestMeta)(a,"renderFallbackShell")||at)?(0,n.u)(af):null;return m({span:i,postponed:o,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,n=await K.handleResponse({cacheKey:aA,responseGenerator:a=>o({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ah,isRoutePPREnabled:ar,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),K.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!n){if(aA)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=n.value)?void 0:f.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=n.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof n.value.postponed;ak&&!av&&(!p||ao)&&(N||b.setHeader("x-nextjs-cache",ah?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),b.setHeader(t.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=n;if(au)l={revalidate:0,expire:void 0};else if(N&&ap&&!ao&&ar)l={revalidate:0,expire:void 0};else if(!K.isDev)if(_)l={revalidate:0,expire:void 0};else if(ak){if(n.cacheControl)if("number"==typeof n.cacheControl.revalidate){if(n.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${n.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:n.cacheControl.revalidate,expire:(null==(j=n.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:y.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(n.cacheControl=l,"string"==typeof aw&&(null==q?void 0:q.kind)===v.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[y.NEXT_CACHE_TAGS_HEADER];N&&ak&&c&&"string"==typeof c&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(aw);return void 0!==d?(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.fromStatic(d,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl}):(b.statusCode=204,(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.EMPTY,cacheControl:n.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...n,value:{...n.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&au)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(N&&ak||delete a[y.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[y.NEXT_CACHE_TAGS_HEADER];if(N&&ak&&s&&"string"==typeof s&&b.setHeader(y.NEXT_CACHE_TAGS_HEADER,s),!q.status||ap&&ar||(b.statusCode=q.status),!N&&q.status&&F.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),p&&b.setHeader(t.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:av?{revalidate:0,expire:void 0}:n.cacheControl})}return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:x.default.fromStatic(q.rscData,t.RSC_CONTENT_TYPE_HEADER),cacheControl:n.cacheControl})}let u=q.html;if(!p||N||ap)return(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:n.cacheControl});if(as)return u.push(new ReadableStream({start(a){a.enqueue(z.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:{revalidate:0,expire:void 0}});let w=new TransformStream;return u.push(w.readable),m({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==v.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(w.writable)}).catch(a=>{w.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,A.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:u,cacheControl:{revalidate:0,expire:void 0}})};if(!aF)return await aE.withPropagatedContext(a.headers,()=>aE.trace(i.BaseServerSpan.handleRequest,{spanName:`${aD} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aD,"http.target":a.url}},p));await p(aF)}catch(b){throw b instanceof B.NoFallbackError||await K.onRequestError(a,b,{routerKind:"App Router",routePath:G,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:ak,isOnDemandRevalidate:ah})},ac),b}}},27910:a=>{"use strict";a.exports=require("stream")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},34631:a=>{"use strict";a.exports=require("tls")},37211:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(25459).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/opt/canhelp/apps/web/src/app/(auth)/reset-password/page.tsx","default")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70905:(a,b,c)=>{Promise.resolve().then(c.bind(c,37211))},74075:a=>{"use strict";a.exports=require("zlib")},79428:a=>{"use strict";a.exports=require("buffer")},79551:a=>{"use strict";a.exports=require("url")},79646:a=>{"use strict";a.exports=require("child_process")},81630:a=>{"use strict";a.exports=require("http")},83997:a=>{"use strict";a.exports=require("tty")},84057:(a,b,c)=>{Promise.resolve().then(c.bind(c,91249))},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},91249:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>l});var d=c(78157),e=c(31768),f=c(71159),g=c(94496),h=c.n(g),i=c(13260),j=c(96484);function k(){let a=(0,f.useRouter)(),b=(0,f.useSearchParams)(),{t:c}=(0,j.Y)(),[g,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)(""),n=b.get("token");async function o(b){b.preventDefault(),m("");let d=new FormData(b.currentTarget),e=d.get("password");if(e!==d.get("confirm"))return void m(c("reset.error.mismatch"));if(!n)return void m(c("reset.error.invalid"));k(!0);let f=null;try{f=await i.yK.resetPassword({newPassword:e,token:n})}catch{m(c("reset.error.invalid")),k(!1);return}f?.error?(m(f.error.message??c("reset.error.invalid")),k(!1)):(m(""),setTimeout(()=>a.push("/login"),2e3))}return(0,d.jsx)("div",{className:"min-h-screen flex items-center justify-center px-4",children:(0,d.jsxs)("div",{className:"w-full max-w-md",children:[(0,d.jsxs)("div",{className:"text-center mb-8",children:[(0,d.jsx)("h1",{className:"text-3xl font-bold text-white",children:c("reset.title")}),(0,d.jsx)("p",{className:"text-white/70 mt-2",children:c("reset.subtitle")})]}),(0,d.jsxs)("form",{onSubmit:o,className:"bg-white rounded-xl border border-gray-200 p-6 space-y-4",children:[l&&(0,d.jsxs)("div",{className:"bg-red-50 text-red-700 p-3 rounded-lg text-sm",children:[l,!n&&(0,d.jsxs)("span",{children:[" ",(0,d.jsx)(h(),{href:"/forgot-password",className:"underline font-medium",children:c("reset.back_to_login").replace("sign in","request new link")})]})]}),g&&!l&&(0,d.jsx)("div",{className:"bg-green-50 text-green-700 p-3 rounded-lg text-sm",children:c("reset.success")}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:c("reset.password")}),(0,d.jsx)("input",{name:"password",type:"password",required:!0,minLength:8,autoComplete:"new-password",disabled:!n||g,className:"w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50"})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:c("reset.confirm")}),(0,d.jsx)("input",{name:"confirm",type:"password",required:!0,minLength:8,autoComplete:"new-password",disabled:!n||g,className:"w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-blue-400 disabled:opacity-50"})]}),(0,d.jsx)("button",{type:"submit",disabled:!n||g,className:"w-full bg-blue-600 text-white py-3 rounded-xl font-semibold hover:bg-blue-700 disabled:opacity-50",children:g?c("reset.submitting"):c("reset.submit")}),(0,d.jsx)("p",{className:"text-center text-sm text-gray-500",children:(0,d.jsx)(h(),{href:"/login",className:"text-blue-600 hover:underline font-medium",children:c("reset.back_to_login")})})]})]})})}function l(){return(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)("div",{className:"min-h-screen flex items-center justify-center",children:(0,d.jsx)("p",{children:"Loading..."})}),children:(0,d.jsx)(k,{})})}},91645:a=>{"use strict";a.exports=require("net")},94735:a=>{"use strict";a.exports=require("events")}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[901,652,809],()=>b(b.s=27537));module.exports=c})();