Socket
Book a DemoSign in
Socket

next

Package Overview
Dependencies
Maintainers
2
Versions
3706
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next - npm Package Compare versions

Comparing version
16.2.1-canary.8
to
16.2.1-canary.9
+11
dist/bundle-analyz...9iXANSJ4s0NYzsXfcx21S/_buildManifest.js
self.__BUILD_MANIFEST = {
"__rewrites": {
"afterFiles": [],
"beforeFiles": [],
"fallback": []
},
"sortedPages": [
"/_app",
"/_error"
]
};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()
+1
-1

@@ -137,3 +137,3 @@ "use strict";

}({});
const nextVersion = "16.2.1-canary.8";
const nextVersion = "16.2.1-canary.9";
const ArchName = (0, _os.arch)();

@@ -140,0 +140,0 @@ const PlatformName = (0, _os.platform)();

@@ -96,3 +96,3 @@ "use strict";

isPersistentCachingEnabled: persistentCaching,
nextVersion: "16.2.1-canary.8"
nextVersion: "16.2.1-canary.9"
}, {

@@ -99,0 +99,0 @@ memoryLimit: (_config_experimental2 = config.experimental) == null ? void 0 : _config_experimental2.turbopackMemoryLimit,

@@ -117,3 +117,3 @@ // Import cpu-profile first to start profiling early if enabled

deferredEntries: config.experimental.deferredEntries,
nextVersion: "16.2.1-canary.8"
nextVersion: "16.2.1-canary.9"
};

@@ -120,0 +120,0 @@ const sharedTurboOptions = {

@@ -6,5 +6,5 @@ 1:"$Sreact.fragment"

7:"$Sreact.suspense"
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/b7594d85eae4770f.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/b7594d85eae4770f.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"loading":null,"isPartial":false}
4:{}
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
8:null

@@ -12,3 +12,3 @@ 1:"$Sreact.fragment"

:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"P":null,"b":"mH2FAjvT7SZqSrutsbz85","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/b7594d85eae4770f.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$@c"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$@e"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[]],"S":true}
0:{"P":null,"b":"9iXANSJ4s0NYzsXfcx21S","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/b7594d85eae4770f.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$@c"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$@e"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[]],"S":true}
6:{}

@@ -15,0 +15,0 @@ 7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"

@@ -5,4 +5,4 @@ 1:"$Sreact.fragment"

5:"$Sreact.suspense"
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":"$@3"}],["$","div",null,{"hidden":true,"children":["$","$L4",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@6"}]}]}],null]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":"$@3"}],["$","div",null,{"hidden":true,"children":["$","$L4",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@6"}]}]}],null]}],"loading":null,"isPartial":false}
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
6:[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]

@@ -5,2 +5,2 @@ 1:"$Sreact.fragment"

:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"loading":null,"isPartial":false}
:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":true},"staleTime":300}

@@ -1,2 +0,2 @@

<!DOCTYPE html><!--mH2FAjvT7SZqSrutsbz85--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/adecd0ef71a11c8f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/f436bf7db7961c34.js"/><script src="/_next/static/chunks/51c747e07e17acc2.js" async=""></script><script src="/_next/static/chunks/f5db05163fdb2338.js" async=""></script><script src="/_next/static/chunks/turbopack-818f4c8d5ed453ff.js" async=""></script><script src="/_next/static/chunks/447f439a4f2d6ef8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script>
<!DOCTYPE html><!--9iXANSJ4s0NYzsXfcx21S--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/adecd0ef71a11c8f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/f436bf7db7961c34.js"/><script src="/_next/static/chunks/51c747e07e17acc2.js" async=""></script><script src="/_next/static/chunks/f5db05163fdb2338.js" async=""></script><script src="/_next/static/chunks/turbopack-818f4c8d5ed453ff.js" async=""></script><script src="/_next/static/chunks/447f439a4f2d6ef8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script>
(function() {

@@ -10,2 +10,2 @@ const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';

})();
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/f436bf7db7961c34.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[93201,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n3:I[75127,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n4:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ViewportBoundary\"]\n9:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"MetadataBoundary\"]\nb:I[13656,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"mH2FAjvT7SZqSrutsbz85\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/447f439a4f2d6ef8.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L7\",null,{\"children\":\"$@8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@a\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n6:null\n"])</script></body></html>
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/f436bf7db7961c34.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[93201,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n3:I[75127,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n4:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ViewportBoundary\"]\n9:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"MetadataBoundary\"]\nb:I[13656,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"9iXANSJ4s0NYzsXfcx21S\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/447f439a4f2d6ef8.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L7\",null,{\"children\":\"$@8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@a\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n6:null\n"])</script></body></html>

@@ -10,5 +10,5 @@ 1:"$Sreact.fragment"

:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"P":null,"b":"mH2FAjvT7SZqSrutsbz85","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/447f439a4f2d6ef8.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":"$@8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@a"}]}]}],null]}],false]],"m":"$undefined","G":["$b","$undefined"],"S":true}
0:{"P":null,"b":"9iXANSJ4s0NYzsXfcx21S","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/447f439a4f2d6ef8.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":"$@8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@a"}]}]}],null]}],false]],"m":"$undefined","G":["$b","$undefined"],"S":true}
8:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
a:[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]
6:null

@@ -10,5 +10,5 @@ 1:"$Sreact.fragment"

:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"P":null,"b":"mH2FAjvT7SZqSrutsbz85","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/447f439a4f2d6ef8.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":"$@8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@a"}]}]}],null]}],false]],"m":"$undefined","G":["$b","$undefined"],"S":true}
0:{"P":null,"b":"9iXANSJ4s0NYzsXfcx21S","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/447f439a4f2d6ef8.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":"$@8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@a"}]}]}],null]}],false]],"m":"$undefined","G":["$b","$undefined"],"S":true}
8:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
a:[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]
6:null

@@ -5,4 +5,4 @@ 1:"$Sreact.fragment"

5:"$Sreact.suspense"
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":"$@3"}],["$","div",null,{"hidden":true,"children":["$","$L4",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@6"}]}]}],null]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":"$@3"}],["$","div",null,{"hidden":true,"children":["$","$L4",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$@6"}]}]}],null]}],"loading":null,"isPartial":false}
3:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
6:[["$","title","0",{"children":"Next.js Bundle Analyzer"}],["$","meta","1",{"name":"description","content":"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"}]]

@@ -5,2 +5,2 @@ 1:"$Sreact.fragment"

:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/447f439a4f2d6ef8.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/447f439a4f2d6ef8.js","async":true}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"loading":null,"isPartial":false}
1:"$Sreact.fragment"
2:I[45226,["/_next/static/chunks/447f439a4f2d6ef8.js"],"OutletBoundary"]
3:"$Sreact.suspense"
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false}
4:null
1:"$Sreact.fragment"
2:I[93201,["/_next/static/chunks/447f439a4f2d6ef8.js"],"default"]
3:I[75127,["/_next/static/chunks/447f439a4f2d6ef8.js"],"default"]
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false}
:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"buildId":"mH2FAjvT7SZqSrutsbz85","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}
0:{"buildId":"9iXANSJ4s0NYzsXfcx21S","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300}

@@ -1,2 +0,2 @@

<!DOCTYPE html><!--mH2FAjvT7SZqSrutsbz85--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/adecd0ef71a11c8f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/f436bf7db7961c34.js"/><script src="/_next/static/chunks/51c747e07e17acc2.js" async=""></script><script src="/_next/static/chunks/f5db05163fdb2338.js" async=""></script><script src="/_next/static/chunks/turbopack-818f4c8d5ed453ff.js" async=""></script><script src="/_next/static/chunks/447f439a4f2d6ef8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script>
<!DOCTYPE html><!--9iXANSJ4s0NYzsXfcx21S--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/adecd0ef71a11c8f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/f436bf7db7961c34.js"/><script src="/_next/static/chunks/51c747e07e17acc2.js" async=""></script><script src="/_next/static/chunks/f5db05163fdb2338.js" async=""></script><script src="/_next/static/chunks/turbopack-818f4c8d5ed453ff.js" async=""></script><script src="/_next/static/chunks/447f439a4f2d6ef8.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script>
(function() {

@@ -10,2 +10,2 @@ const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';

})();
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/f436bf7db7961c34.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[93201,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n3:I[75127,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n4:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ViewportBoundary\"]\n9:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"MetadataBoundary\"]\nb:I[13656,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"mH2FAjvT7SZqSrutsbz85\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/447f439a4f2d6ef8.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L7\",null,{\"children\":\"$@8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@a\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n6:null\n"])</script></body></html>
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/f436bf7db7961c34.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[93201,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n3:I[75127,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n4:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ViewportBoundary\"]\n9:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"MetadataBoundary\"]\nb:I[13656,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"9iXANSJ4s0NYzsXfcx21S\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/447f439a4f2d6ef8.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L7\",null,{\"children\":\"$@8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@a\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"a:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\n6:null\n"])</script></body></html>

@@ -1,2 +0,2 @@

<!DOCTYPE html><!--mH2FAjvT7SZqSrutsbz85--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/adecd0ef71a11c8f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/f436bf7db7961c34.js"/><script src="/_next/static/chunks/51c747e07e17acc2.js" async=""></script><script src="/_next/static/chunks/f5db05163fdb2338.js" async=""></script><script src="/_next/static/chunks/turbopack-818f4c8d5ed453ff.js" async=""></script><script src="/_next/static/chunks/447f439a4f2d6ef8.js" async=""></script><script src="/_next/static/chunks/b7594d85eae4770f.js" async=""></script><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script>
<!DOCTYPE html><!--9iXANSJ4s0NYzsXfcx21S--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/adecd0ef71a11c8f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/f436bf7db7961c34.js"/><script src="/_next/static/chunks/51c747e07e17acc2.js" async=""></script><script src="/_next/static/chunks/f5db05163fdb2338.js" async=""></script><script src="/_next/static/chunks/turbopack-818f4c8d5ed453ff.js" async=""></script><script src="/_next/static/chunks/447f439a4f2d6ef8.js" async=""></script><script src="/_next/static/chunks/b7594d85eae4770f.js" async=""></script><title>Next.js Bundle Analyzer</title><meta name="description" content="Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis"/><script>
(function() {

@@ -10,2 +10,2 @@ const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';

})();
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><main class="h-screen flex flex-col bg-background"><div class="flex-none px-4 py-2 border-b border-border flex items-center gap-3"><div class="flex-1 flex"><div class="flex items-center gap-2 min-w-64 max-w-full"><button class="inline-flex items-center gap-2 whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 flex-grow-1 w-full justify-between font-mono text-sm" role="combobox" aria-expanded="false" disabled="" type="button" aria-haspopup="dialog" aria-controls="radix-_R_lbtb_" data-state="closed"><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader mr-2 inline animate-spin" aria-hidden="true"><path d="M12 2v4"></path><path d="m16.2 7.8 2.9-2.9"></path><path d="M18 12h4"></path><path d="m16.2 16.2 2.9 2.9"></path><path d="M12 18v4"></path><path d="m4.9 19.1 2.9-2.9"></path><path d="M2 12h4"></path><path d="m4.9 4.9 2.9 2.9"></path></svg>Loading routes...</div><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-up-down h-4 w-4 shrink-0 opacity-50" aria-hidden="true"><path d="m7 15 5 5 5-5"></path><path d="m7 9 5-5 5 5"></path></svg></div></button></div></div><div class="flex items-center gap-2"></div></div><div class="flex-1 flex min-h-0"><div class="flex-1 min-w-0 p-4 bg-background"><div class="h-full w-full grid grid-cols-12 grid-rows-8 gap-2"><div class="animate-pulse rounded-md bg-muted col-span-5 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-1"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div></div></div><button type="button" class="flex-none w-1 bg-border cursor-col-resize transition-colors" disabled="" aria-label="Resize sidebar"></button><div class="flex-none bg-muted border-l border-border overflow-y-auto" style="width:20%"><div class="flex-1 p-3 space-y-4 overflow-y-auto"><div class="animate-pulse rounded-md bg-muted h-4 w-3/4"></div><div class="animate-pulse rounded-md bg-muted h-4 w-full"></div><div class="animate-pulse rounded-md bg-muted h-4 w-5/6"></div><div class="mt-4 space-y-2"><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-4/5"></div></div></div></div></div></main><!--$--><!--/$--><script src="/_next/static/chunks/f436bf7db7961c34.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[93201,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n3:I[75127,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n4:I[90110,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ClientPageRoot\"]\n5:I[79331,[\"/_next/static/chunks/b7594d85eae4770f.js\"],\"default\"]\n8:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ViewportBoundary\"]\nd:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"MetadataBoundary\"]\nf:I[13656,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"mH2FAjvT7SZqSrutsbz85\",\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L4\",null,{\"Component\":\"$5\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@6\",\"$@7\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/b7594d85eae4770f.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$@c\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@e\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"6:{}\n7:\"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\na:null\n"])</script></body></html>
</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><main class="h-screen flex flex-col bg-background"><div class="flex-none px-4 py-2 border-b border-border flex items-center gap-3"><div class="flex-1 flex"><div class="flex items-center gap-2 min-w-64 max-w-full"><button class="inline-flex items-center gap-2 whitespace-nowrap rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 flex-grow-1 w-full justify-between font-mono text-sm" role="combobox" aria-expanded="false" disabled="" type="button" aria-haspopup="dialog" aria-controls="radix-_R_lbtb_" data-state="closed"><div class="flex items-center"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-loader mr-2 inline animate-spin" aria-hidden="true"><path d="M12 2v4"></path><path d="m16.2 7.8 2.9-2.9"></path><path d="M18 12h4"></path><path d="m16.2 16.2 2.9 2.9"></path><path d="M12 18v4"></path><path d="m4.9 19.1 2.9-2.9"></path><path d="M2 12h4"></path><path d="m4.9 4.9 2.9 2.9"></path></svg>Loading routes...</div><div class="flex items-center gap-2"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-chevrons-up-down h-4 w-4 shrink-0 opacity-50" aria-hidden="true"><path d="m7 15 5 5 5-5"></path><path d="m7 9 5-5 5 5"></path></svg></div></button></div></div><div class="flex items-center gap-2"></div></div><div class="flex-1 flex min-h-0"><div class="flex-1 min-w-0 p-4 bg-background"><div class="h-full w-full grid grid-cols-12 grid-rows-8 gap-2"><div class="animate-pulse rounded-md bg-muted col-span-5 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-3"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-1"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-4"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-4 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-2 row-span-2"></div><div class="animate-pulse rounded-md bg-muted col-span-3 row-span-2"></div></div></div><button type="button" class="flex-none w-1 bg-border cursor-col-resize transition-colors" disabled="" aria-label="Resize sidebar"></button><div class="flex-none bg-muted border-l border-border overflow-y-auto" style="width:20%"><div class="flex-1 p-3 space-y-4 overflow-y-auto"><div class="animate-pulse rounded-md bg-muted h-4 w-3/4"></div><div class="animate-pulse rounded-md bg-muted h-4 w-full"></div><div class="animate-pulse rounded-md bg-muted h-4 w-5/6"></div><div class="mt-4 space-y-2"><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-full"></div><div class="animate-pulse rounded-md bg-muted h-3 w-4/5"></div></div></div></div></div></main><!--$--><!--/$--><script src="/_next/static/chunks/f436bf7db7961c34.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[93201,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n3:I[75127,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n4:I[90110,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ClientPageRoot\"]\n5:I[79331,[\"/_next/static/chunks/b7594d85eae4770f.js\"],\"default\"]\n8:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nb:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"ViewportBoundary\"]\nd:I[45226,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"MetadataBoundary\"]\nf:I[13656,[\"/_next/static/chunks/447f439a4f2d6ef8.js\"],\"default\"]\n:HL[\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"9iXANSJ4s0NYzsXfcx21S\",\"c\":[\"\",\"\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/adecd0ef71a11c8f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"\\n (function() {\\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\\n document.documentElement.classList.toggle('dark', theme === 'dark');\\n\\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) =\u003e {\\n document.documentElement.classList.toggle('dark', e.matches);\\n });\\n })();\\n \"}}]}],[\"$\",\"body\",null,{\"className\":\"font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"$L4\",null,{\"Component\":\"$5\",\"serverProvidedParams\":{\"searchParams\":{},\"params\":{},\"promises\":[\"$@6\",\"$@7\"]}}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/b7594d85eae4770f.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$Lb\",null,{\"children\":\"$@c\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Ld\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$@e\"}]}]}],null]}],false]],\"m\":\"$undefined\",\"G\":[\"$f\",[]],\"S\":true}\n"])</script><script>self.__next_f.push([1,"6:{}\n7:\"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params\"\n"])</script><script>self.__next_f.push([1,"c:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"e:[[\"$\",\"title\",\"0\",{\"children\":\"Next.js Bundle Analyzer\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Visualize and analyze your Next.js bundle sizes with interactive treemap and dependency analysis\"}]]\na:null\n"])</script></body></html>

@@ -12,3 +12,3 @@ 1:"$Sreact.fragment"

:HL["/_next/static/chunks/adecd0ef71a11c8f.css","style"]
0:{"P":null,"b":"mH2FAjvT7SZqSrutsbz85","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/b7594d85eae4770f.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$@c"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$@e"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[]],"S":true}
0:{"P":null,"b":"9iXANSJ4s0NYzsXfcx21S","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/adecd0ef71a11c8f.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","suppressHydrationWarning":true,"children":[["$","head",null,{"children":["$","script",null,{"dangerouslySetInnerHTML":{"__html":"\n (function() {\n const theme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n document.documentElement.classList.toggle('dark', theme === 'dark');\n\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {\n document.documentElement.classList.toggle('dark', e.matches);\n });\n })();\n "}}]}],["$","body",null,{"className":"font-sans antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/_next/static/chunks/b7594d85eae4770f.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,false]},null,false,false],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$@c"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$@e"}]}]}],null]}],false]],"m":"$undefined","G":["$f",[]],"S":true}
6:{}

@@ -15,0 +15,0 @@ 7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"

@@ -18,3 +18,3 @@ /**

const _setattributesfromprops = require("./set-attributes-from-props");
const version = "16.2.1-canary.8";
const version = "16.2.1-canary.9";
window.next = {

@@ -21,0 +21,0 @@ version,

@@ -120,2 +120,16 @@ import type { FlightData, Segment as FlightRouterStateSegment } from '../../../shared/lib/app-router-types';

export type NonEmptySegmentCacheEntry = Exclude<SegmentCacheEntry, EmptySegmentCacheEntry>;
/**
* A linked list of segment cache entries to fulfill from a single prefetch
* response. The head is the requested segment; subsequent nodes are parent
* segments whose data is bundled into the same response by the server.
*
* When segments are not bundled, the list has a single node. The list
* maps 1:1 to the data array in the SegmentPrefetchResponse the server returns.
*/
export type SegmentBundle = {
tree: RouteTree | null;
entry: SegmentCacheEntry | null;
parent: SegmentBundle | null;
};
export declare const MetadataOnlyRequestTree: FlightRouterState;
export declare function getCurrentRouteCacheVersion(): number;

@@ -194,4 +208,3 @@ export declare function getCurrentSegmentCacheVersion(): number;

export declare function fetchRouteOnCacheMiss(entry: PendingRouteCacheEntry, key: RouteCacheKey): Promise<PrefetchSubtaskResult<null> | null>;
export declare function fetchSegmentOnCacheMiss(route: FulfilledRouteCacheEntry, segmentCacheEntry: PendingSegmentCacheEntry, routeKey: RouteCacheKey, tree: RouteTree): Promise<PrefetchSubtaskResult<FulfilledSegmentCacheEntry> | null>;
export declare function fetchInlinedSegmentsOnCacheMiss(route: FulfilledRouteCacheEntry, routeKey: RouteCacheKey, tree: RouteTree, spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>): Promise<PrefetchSubtaskResult<null> | null>;
export declare function fetchSegmentsOnCacheMiss(route: FulfilledRouteCacheEntry, routeKey: RouteCacheKey, tree: RouteTree, segments: SegmentBundle, segmentCount: number): Promise<PrefetchSubtaskResult<null> | null>;
export declare function fetchSegmentPrefetchesUsingDynamicRequest(task: PrefetchTask, route: FulfilledRouteCacheEntry, fetchStrategy: FetchStrategy.LoadingBoundary | FetchStrategy.PPRRuntime | FetchStrategy.Full, dynamicRequestTree: FlightRouterState, spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry>): Promise<PrefetchSubtaskResult<null> | null>;

@@ -198,0 +211,0 @@ export declare function writeDynamicRenderResponseIntoCache(now: number, fetchStrategy: FetchStrategy.LoadingBoundary | FetchStrategy.PPR | FetchStrategy.PPRRuntime | FetchStrategy.Full, flightDatas: NormalizedFlightData[], buildId: string | undefined, isResponsePartial: boolean, headVaryParams: VaryParams | null, staleAt: number, navigationSeed: NavigationSeed, spawnedEntries: Map<SegmentRequestKey, PendingSegmentCacheEntry> | null): Array<FulfilledSegmentCacheEntry> | null;

@@ -481,3 +481,3 @@ "use strict";

pingStaticHead(now, task, route);
const exitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, task.treeAtTimeOfPrefetch, tree);
const exitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, task.treeAtTimeOfPrefetch, tree, null);
if (exitStatus === 0) {

@@ -487,14 +487,27 @@ // Child yielded without finishing.

}
const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches;
if (spawnedRuntimePrefetches !== null) {
// During the first pass, we discovered segments that require a
// runtime prefetch. Do a second pass to construct a request tree.
if (tree.prefetchHints & _approutertypes.PrefetchHint.SubtreeHasRuntimePrefetch) {
// The route has segments that require a runtime prefetch.
// Always ping the runtime head — it may need to be fetched
// independently even if all runtime segments are already
// cached (e.g. navigating between siblings under a shared
// runtime layout).
const spawnedEntries = new Map();
pingRuntimeHead(now, task, route, spawnedEntries, _types.FetchStrategy.PPRRuntime);
const requestTree = pingRuntimePrefetches(now, task, route, tree, spawnedRuntimePrefetches, spawnedEntries);
let needsDynamicRequest = spawnedEntries.size > 0;
if (needsDynamicRequest) {
// Perform a dynamic prefetch request and populate the cache with
// the result.
spawnPrefetchSubtask((0, _cache.fetchSegmentPrefetchesUsingDynamicRequest)(task, route, _types.FetchStrategy.PPRRuntime, requestTree, spawnedEntries));
const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches;
if (spawnedRuntimePrefetches !== null) {
const requestTree = pingRuntimePrefetches(now, task, route, tree, spawnedRuntimePrefetches, spawnedEntries);
if (spawnedEntries.size > 0) {
spawnPrefetchSubtask((0, _cache.fetchSegmentPrefetchesUsingDynamicRequest)(task, route, _types.FetchStrategy.PPRRuntime, requestTree, spawnedEntries));
}
} else {
// No segments spawned a runtime prefetch; however, the head might
// have. If there are any spawned entries, it must have come from
// the head. Request the metadata only.
// TODO: Refactor the "request tree" format so that the metadata
// is less of a special case. Right now the logic for this is
// spread across both here
// and fetchSegmentPrefetchesUsingDynamicRequest.
if (spawnedEntries.size > 0) {
spawnPrefetchSubtask((0, _cache.fetchSegmentPrefetchesUsingDynamicRequest)(task, route, _types.FetchStrategy.PPRRuntime, _cache.MetadataOnlyRequestTree, spawnedEntries));
}
}

@@ -540,3 +553,15 @@ }

// store it in the cache as if it were, using a special key.
pingStaticSegmentData(now, task, route, (0, _cache.readOrCreateSegmentCacheEntry)(now, _types.FetchStrategy.PPR, route.metadata), task.key, route.metadata);
//
// If the head was inlined into a page's bundle (HeadOutlined is NOT set
// on the root), skip the standalone fetch — the head data will arrive
// as part of that page's response.
if (process.env.__NEXT_PREFETCH_INLINING && !(route.tree.prefetchHints & _approutertypes.PrefetchHint.HeadOutlined)) {
return;
}
const segments = {
tree: route.metadata,
entry: (0, _cache.readOrCreateSegmentCacheEntry)(now, _types.FetchStrategy.PPR, route.metadata),
parent: null
};
pingSegmentBundle(now, task, route, task.key, route.metadata, segments);
}

@@ -549,3 +574,3 @@ function pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy) {

// TODO: Rename dynamic -> runtime throughout this module
function pingSharedPartOfCacheComponentsTree(now, task, route, oldTree, newTree) {
function pingSharedPartOfCacheComponentsTree(now, task, route, oldTree, newTree, parentBundle) {
// When Cache Components is enabled (or PPR, or a fully static route when PPR

@@ -561,5 +586,3 @@ // is disabled; those cases are treated equivalently to Cache Components), we

// pingNewPartOfCacheComponentsTree.
// Prefetch this segment's static data.
const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, task.fetchStrategy, newTree);
pingStaticSegmentData(now, task, route, segment, task.key, newTree);
const bundleInProgress = accumulateSegmentBundle(now, task, route, newTree, parentBundle);
// Recursively ping the children.

@@ -578,10 +601,13 @@ const oldTreeChildren = oldTree[1];

const oldTreeChildSegment = oldTreeChild?.[0];
// Only pass the bundle to the child that accepts it. A parent is
// only ever bundled into one child.
const bundleForChild = process.env.__NEXT_PREFETCH_INLINING && bundleInProgress !== null && newTreeChild.prefetchHints & _approutertypes.PrefetchHint.ParentInlinedIntoSelf ? bundleInProgress : null;
let childExitStatus;
if (oldTreeChildSegment !== undefined && doesCurrentSegmentMatchCachedSegment(route, newTreeChildSegment, oldTreeChildSegment)) {
// We're still in the "shared" part of the tree.
childExitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, oldTreeChild, newTreeChild);
childExitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, oldTreeChild, newTreeChild, bundleForChild);
} else {
// We've entered the "new" part of the tree. Switch
// traversal functions.
childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, newTreeChild);
childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, newTreeChild, bundleForChild);
}

@@ -596,3 +622,3 @@ if (childExitStatus === 0) {

}
function pingNewPartOfCacheComponentsTree(now, task, route, tree) {
function pingNewPartOfCacheComponentsTree(now, task, route, tree, parentBundle) {
// We're now prefetching in the "new" part of the tree, the part that doesn't

@@ -604,21 +630,2 @@ // exist on the current page. (In other words, we're deeper than the

if (tree.prefetchHints & _approutertypes.PrefetchHint.HasRuntimePrefetch) {
// This route has a runtime prefetch response. Since we're below the shared
// layout, everything from this point should be prefetched using a single,
// combined runtime request, rather than using per-segment static requests.
// This is true even if some of the child segments are known to be fully
// static — once we've decided to perform a runtime prefetch, we might as
// well respond with the static segments in the same roundtrip. (That's how
// regular navigations work, too.) We'll still skip over segments that are
// already cached, though.
//
// It's the server's responsibility to set a reasonable value of
// `hasRuntimePrefetch`. Currently it's user-defined, but eventually, the
// server may send a value of `false` even if the user opts in, if it
// determines during build that the route is always fully static. There are
// more optimizations we can do once we implement fallback param
// tracking, too.
//
// Use the task object to collect the segments that need a runtime prefetch.
// This will signal to the outer task queue that a second traversal is
// required to construct a request tree.
if (task.spawnedRuntimePrefetches === null) {

@@ -631,8 +638,10 @@ task.spawnedRuntimePrefetches = new Set([

}
// Then exit the traversal without prefetching anything further.
// If there's a pending static bundle from a parent, we need to finish
// prefetching it before bailing out to runtime prefetching.
if (parentBundle !== null) {
finishStaticBundleOnRuntimeBailout(now, task, route, tree, parentBundle);
}
return 2;
}
// This segment should not be runtime prefetched. Prefetch its static data.
const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, task.fetchStrategy, tree);
pingStaticSegmentData(now, task, route, segment, task.key, tree);
const bundleInProgress = accumulateSegmentBundle(now, task, route, tree, parentBundle);
if (tree.slots !== null) {

@@ -646,3 +655,6 @@ if (!hasNetworkBandwidth(task)) {

const childTree = tree.slots[parallelRouteKey];
const childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, childTree);
// Only pass the bundle to the child that accepts it. A parent is
// only ever bundled into one child.
const bundleForChild = process.env.__NEXT_PREFETCH_INLINING && bundleInProgress !== null && childTree.prefetchHints & _approutertypes.PrefetchHint.ParentInlinedIntoSelf ? bundleInProgress : null;
const childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, childTree, bundleForChild);
if (childExitStatus === 0) {

@@ -941,123 +953,144 @@ // Child yielded without finishing.

}
function pingStaticSegmentData(now, task, route, segment, routeKey, tree) {
switch(segment.status){
case _cache.EntryStatus.Empty:
if (process.env.__NEXT_PREFETCH_INLINING) {
// All segment data for this route is bundled into a single
// /_inlined response. Walk the full route tree to collect all
// Empty segments, upgrade them to Pending, and spawn one
// bundled request. Subsequent calls for other segments in the
// same tree will see them as Pending and skip.
const inlinedEntries = collectInlinedEntries(now, route);
if (inlinedEntries.size > 0) {
spawnPrefetchSubtask((0, _cache.fetchInlinedSegmentsOnCacheMiss)(route, routeKey, route.tree, inlinedEntries));
}
/**
* Walk a SegmentBundle, apply status-based logic to each entry, and if any
* entries need data, spawn a single fetch request for the whole bundle.
*/ function pingSegmentBundle(now, task, route, routeKey, tree, segments) {
let segmentCount = 0;
let needsFetch = false;
let node = segments;
while(node !== null){
segmentCount++;
const nodeEntry = node.entry;
const nodeTree = node.tree;
if (nodeEntry === null || nodeTree === null) {
node = node.parent;
continue;
}
switch(nodeEntry.status){
case _cache.EntryStatus.Empty:
(0, _cache.upgradeToPendingSegment)(nodeEntry, _types.FetchStrategy.PPR);
needsFetch = true;
break;
}
// Upgrade to Pending so we know there's already a request in progress
spawnPrefetchSubtask((0, _cache.fetchSegmentOnCacheMiss)(route, (0, _cache.upgradeToPendingSegment)(segment, _types.FetchStrategy.PPR), routeKey, tree));
break;
case _cache.EntryStatus.Pending:
{
// There's already a request in progress. Depending on what kind of
// request it is, we may want to revalidate it.
switch(segment.fetchStrategy){
case _cache.EntryStatus.Pending:
switch(nodeEntry.fetchStrategy){
case _types.FetchStrategy.PPR:
case _types.FetchStrategy.PPRRuntime:
case _types.FetchStrategy.Full:
node.entry = null;
break;
case _types.FetchStrategy.LoadingBoundary:
// There's a pending request, but because it's using the old
// prefetching strategy, we can't be sure if it will be fulfilled by
// the response — it might be inside the loading boundary. Perform
// a revalidation, but because it's speculative, wait to do it at
// background priority.
if (background(task)) {
// TODO: Instead of speculatively revalidating, consider including
// `hasLoading` in the route tree prefetch response.
pingPPRSegmentRevalidation(now, route, routeKey, tree);
const revalidatingEntry = (0, _cache.readOrCreateRevalidatingSegmentEntry)(now, _types.FetchStrategy.PPR, nodeTree);
if (revalidatingEntry.status === _cache.EntryStatus.Empty) {
(0, _cache.upgradeToPendingSegment)(revalidatingEntry, _types.FetchStrategy.PPR);
node.entry = revalidatingEntry;
needsFetch = true;
} else {
node.entry = null;
}
} else {
node.entry = null;
}
break;
default:
segment.fetchStrategy;
nodeEntry.fetchStrategy;
}
break;
}
case _cache.EntryStatus.Rejected:
{
// The existing entry in the cache was rejected. Depending on how it
// was originally fetched, we may or may not want to revalidate it.
switch(segment.fetchStrategy){
case _cache.EntryStatus.Rejected:
switch(nodeEntry.fetchStrategy){
case _types.FetchStrategy.PPR:
case _types.FetchStrategy.PPRRuntime:
case _types.FetchStrategy.Full:
node.entry = null;
break;
case _types.FetchStrategy.LoadingBoundary:
// There's a rejected entry, but it was fetched using the loading
// boundary strategy. So the reason it wasn't returned by the server
// might just be because it was inside a loading boundary. Or because
// there was a dynamic rewrite. Revalidate it using the per-
// segment strategy.
//
// Because a rejected segment will definitely prevent the segment (and
// all of its children) from rendering, we perform this revalidation
// immediately instead of deferring it to a background task.
pingPPRSegmentRevalidation(now, route, routeKey, tree);
break;
{
const revalidatingEntry = (0, _cache.readOrCreateRevalidatingSegmentEntry)(now, _types.FetchStrategy.PPR, nodeTree);
if (revalidatingEntry.status === _cache.EntryStatus.Empty) {
(0, _cache.upgradeToPendingSegment)(revalidatingEntry, _types.FetchStrategy.PPR);
node.entry = revalidatingEntry;
needsFetch = true;
} else {
node.entry = null;
}
break;
}
default:
segment.fetchStrategy;
nodeEntry.fetchStrategy;
}
break;
}
case _cache.EntryStatus.Fulfilled:
break;
default:
segment;
case _cache.EntryStatus.Fulfilled:
node.entry = null;
break;
default:
nodeEntry;
}
node = node.parent;
}
// Segments do not have dependent tasks, so once the prefetch is initiated,
// there's nothing else for us to do (except write the server data into the
// entry, which is handled by `fetchSegmentOnCacheMiss`).
if (!needsFetch) {
return;
}
spawnPrefetchSubtask((0, _cache.fetchSegmentsOnCacheMiss)(route, routeKey, tree, segments, segmentCount));
}
/**
* Walks the RouteTree (including the head metadata) and collects any segments
* that are still Empty into a Map, upgrading them to Pending. These entries
* will be fulfilled by the inlined prefetch response.
*/ function collectInlinedEntries(now, route) {
const entries = new Map();
collectInlinedEntriesImpl(now, route.tree, entries);
// Also collect the head/metadata entry.
const headEntry = (0, _cache.readOrCreateSegmentCacheEntry)(now, _types.FetchStrategy.PPR, route.metadata);
if (headEntry.status === _cache.EntryStatus.Empty) {
entries.set(route.metadata.requestKey, (0, _cache.upgradeToPendingSegment)(headEntry, _types.FetchStrategy.PPR));
* During the tree walk, decide whether this segment should be added to the
* in-progress bundle (if it has InlinedIntoChild) or finalize the bundle
* and trigger a fetch (if it doesn't). Returns the updated bundle to pass
* to children, or null if a fetch was triggered.
*/ function accumulateSegmentBundle(now, task, route, tree, parentBundle) {
// Static prefetching is disabled for this segment (runtime prefetch or
// instant = false). It participates in the bundle chain with null
// tree/entry — no cache entry is created, and the server emits null for
// this slot. This check is intentionally NOT gated by the prefetch
// inlining feature flag: we never statically prefetch segments that are
// runtime-prefetched or unprefetchable, regardless of bundling.
if (tree.prefetchHints & _approutertypes.StaticPrefetchDisabled) {
return {
tree: null,
entry: null,
parent: parentBundle
};
}
return entries;
const segment = (0, _cache.readOrCreateSegmentCacheEntry)(now, task.fetchStrategy, tree);
if (process.env.__NEXT_PREFETCH_INLINING && tree.prefetchHints & _approutertypes.PrefetchHint.InlinedIntoChild) {
return {
tree,
entry: segment,
parent: parentBundle
};
}
// Not bundled. Build a single-node bundle and ping it. If this page
// accepts the head (HeadInlinedIntoSelf), prepend the head's cache entry
// to the bundle.
let effectiveParent = parentBundle;
if (process.env.__NEXT_PREFETCH_INLINING && tree.prefetchHints & _approutertypes.PrefetchHint.HeadInlinedIntoSelf) {
effectiveParent = {
tree: route.metadata,
entry: (0, _cache.readOrCreateSegmentCacheEntry)(now, _types.FetchStrategy.PPR, route.metadata),
parent: parentBundle
};
}
const segments = {
tree,
entry: segment,
parent: effectiveParent
};
pingSegmentBundle(now, task, route, task.key, tree, segments);
return null;
}
function collectInlinedEntriesImpl(now, tree, entries) {
const entry = (0, _cache.readOrCreateSegmentCacheEntry)(now, _types.FetchStrategy.PPR, tree);
if (entry.status === _cache.EntryStatus.Empty) {
entries.set(tree.requestKey, (0, _cache.upgradeToPendingSegment)(entry, _types.FetchStrategy.PPR));
function finishStaticBundleOnRuntimeBailout(now, task, route, tree, parentBundle) {
const bundle = accumulateSegmentBundle(now, task, route, tree, parentBundle);
if (bundle === null) {
return;
}
if (tree.slots !== null) {
for(const parallelRouteKey in tree.slots){
collectInlinedEntriesImpl(now, tree.slots[parallelRouteKey], entries);
const childTree = tree.slots[parallelRouteKey];
if (childTree.prefetchHints & _approutertypes.PrefetchHint.ParentInlinedIntoSelf) {
finishStaticBundleOnRuntimeBailout(now, task, route, childTree, bundle);
return;
}
}
}
}
function pingPPRSegmentRevalidation(now, route, routeKey, tree) {
const revalidatingSegment = (0, _cache.readOrCreateRevalidatingSegmentEntry)(now, _types.FetchStrategy.PPR, tree);
switch(revalidatingSegment.status){
case _cache.EntryStatus.Empty:
// Spawn a prefetch request. The fetch function handles upserting
// the entry at the correct fulfilled vary path upon completion.
spawnPrefetchSubtask((0, _cache.fetchSegmentOnCacheMiss)(route, (0, _cache.upgradeToPendingSegment)(revalidatingSegment, _types.FetchStrategy.PPR), routeKey, tree));
break;
case _cache.EntryStatus.Pending:
break;
case _cache.EntryStatus.Fulfilled:
case _cache.EntryStatus.Rejected:
break;
default:
revalidatingSegment;
}
}
function pingFullSegmentRevalidation(now, tree, fetchStrategy) {

@@ -1064,0 +1097,0 @@ const revalidatingSegment = (0, _cache.readOrCreateRevalidatingSegmentEntry)(now, fetchStrategy, tree);

@@ -63,3 +63,3 @@ /* global location */ // imports polyfill from `@next/polyfill-module` after build.

const _isnextroutererror = require("./components/is-next-router-error");
const version = "16.2.1-canary.8";
const version = "16.2.1-canary.9";
let router;

@@ -66,0 +66,0 @@ const emitter = (0, _mitt.default)();

@@ -13,3 +13,3 @@ import path from 'path';

}({});
const nextVersion = "16.2.1-canary.8";
const nextVersion = "16.2.1-canary.9";
const ArchName = arch();

@@ -16,0 +16,0 @@ const PlatformName = platform();

@@ -69,3 +69,3 @@ import path from 'path';

isPersistentCachingEnabled: persistentCaching,
nextVersion: "16.2.1-canary.8"
nextVersion: "16.2.1-canary.9"
}, {

@@ -72,0 +72,0 @@ memoryLimit: (_config_experimental2 = config.experimental) == null ? void 0 : _config_experimental2.turbopackMemoryLimit,

@@ -86,3 +86,3 @@ // Import cpu-profile first to start profiling early if enabled

deferredEntries: config.experimental.deferredEntries,
nextVersion: "16.2.1-canary.8"
nextVersion: "16.2.1-canary.9"
};

@@ -89,0 +89,0 @@ const sharedTurboOptions = {

@@ -8,3 +8,3 @@ /**

import { setAttributesFromProps } from './set-attributes-from-props';
const version = "16.2.1-canary.8";
const version = "16.2.1-canary.9";
window.next = {

@@ -11,0 +11,0 @@ version,

@@ -1,4 +0,4 @@

import { PrefetchHint } from '../../../shared/lib/app-router-types';
import { PrefetchHint, StaticPrefetchDisabled } from '../../../shared/lib/app-router-types';
import { matchSegment } from '../match-segments';
import { readOrCreateRouteCacheEntry, readOrCreateSegmentCacheEntry, fetchRouteOnCacheMiss, fetchSegmentOnCacheMiss, fetchInlinedSegmentsOnCacheMiss, EntryStatus, fetchSegmentPrefetchesUsingDynamicRequest, convertRouteTreeToFlightRouterState, readOrCreateRevalidatingSegmentEntry, upgradeToPendingSegment, overwriteRevalidatingSegmentCacheEntry, canNewFetchStrategyProvideMoreContent, attemptToFulfillDynamicSegmentFromBFCache, attemptToUpgradeSegmentFromBFCache } from './cache';
import { readOrCreateRouteCacheEntry, readOrCreateSegmentCacheEntry, fetchRouteOnCacheMiss, fetchSegmentsOnCacheMiss, EntryStatus, fetchSegmentPrefetchesUsingDynamicRequest, convertRouteTreeToFlightRouterState, readOrCreateRevalidatingSegmentEntry, upgradeToPendingSegment, overwriteRevalidatingSegmentCacheEntry, canNewFetchStrategyProvideMoreContent, attemptToFulfillDynamicSegmentFromBFCache, attemptToUpgradeSegmentFromBFCache, MetadataOnlyRequestTree } from './cache';
import { createCacheKey } from './cache-key';

@@ -459,3 +459,3 @@ import { FetchStrategy, PrefetchPriority } from './types';

pingStaticHead(now, task, route);
const exitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, task.treeAtTimeOfPrefetch, tree);
const exitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, task.treeAtTimeOfPrefetch, tree, null);
if (exitStatus === 0) {

@@ -465,14 +465,27 @@ // Child yielded without finishing.

}
const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches;
if (spawnedRuntimePrefetches !== null) {
// During the first pass, we discovered segments that require a
// runtime prefetch. Do a second pass to construct a request tree.
if (tree.prefetchHints & PrefetchHint.SubtreeHasRuntimePrefetch) {
// The route has segments that require a runtime prefetch.
// Always ping the runtime head — it may need to be fetched
// independently even if all runtime segments are already
// cached (e.g. navigating between siblings under a shared
// runtime layout).
const spawnedEntries = new Map();
pingRuntimeHead(now, task, route, spawnedEntries, FetchStrategy.PPRRuntime);
const requestTree = pingRuntimePrefetches(now, task, route, tree, spawnedRuntimePrefetches, spawnedEntries);
let needsDynamicRequest = spawnedEntries.size > 0;
if (needsDynamicRequest) {
// Perform a dynamic prefetch request and populate the cache with
// the result.
spawnPrefetchSubtask(fetchSegmentPrefetchesUsingDynamicRequest(task, route, FetchStrategy.PPRRuntime, requestTree, spawnedEntries));
const spawnedRuntimePrefetches = task.spawnedRuntimePrefetches;
if (spawnedRuntimePrefetches !== null) {
const requestTree = pingRuntimePrefetches(now, task, route, tree, spawnedRuntimePrefetches, spawnedEntries);
if (spawnedEntries.size > 0) {
spawnPrefetchSubtask(fetchSegmentPrefetchesUsingDynamicRequest(task, route, FetchStrategy.PPRRuntime, requestTree, spawnedEntries));
}
} else {
// No segments spawned a runtime prefetch; however, the head might
// have. If there are any spawned entries, it must have come from
// the head. Request the metadata only.
// TODO: Refactor the "request tree" format so that the metadata
// is less of a special case. Right now the logic for this is
// spread across both here
// and fetchSegmentPrefetchesUsingDynamicRequest.
if (spawnedEntries.size > 0) {
spawnPrefetchSubtask(fetchSegmentPrefetchesUsingDynamicRequest(task, route, FetchStrategy.PPRRuntime, MetadataOnlyRequestTree, spawnedEntries));
}
}

@@ -518,3 +531,15 @@ }

// store it in the cache as if it were, using a special key.
pingStaticSegmentData(now, task, route, readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, route.metadata), task.key, route.metadata);
//
// If the head was inlined into a page's bundle (HeadOutlined is NOT set
// on the root), skip the standalone fetch — the head data will arrive
// as part of that page's response.
if (process.env.__NEXT_PREFETCH_INLINING && !(route.tree.prefetchHints & PrefetchHint.HeadOutlined)) {
return;
}
const segments = {
tree: route.metadata,
entry: readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, route.metadata),
parent: null
};
pingSegmentBundle(now, task, route, task.key, route.metadata, segments);
}

@@ -527,3 +552,3 @@ function pingRuntimeHead(now, task, route, spawnedEntries, fetchStrategy) {

// TODO: Rename dynamic -> runtime throughout this module
function pingSharedPartOfCacheComponentsTree(now, task, route, oldTree, newTree) {
function pingSharedPartOfCacheComponentsTree(now, task, route, oldTree, newTree, parentBundle) {
// When Cache Components is enabled (or PPR, or a fully static route when PPR

@@ -539,5 +564,3 @@ // is disabled; those cases are treated equivalently to Cache Components), we

// pingNewPartOfCacheComponentsTree.
// Prefetch this segment's static data.
const segment = readOrCreateSegmentCacheEntry(now, task.fetchStrategy, newTree);
pingStaticSegmentData(now, task, route, segment, task.key, newTree);
const bundleInProgress = accumulateSegmentBundle(now, task, route, newTree, parentBundle);
// Recursively ping the children.

@@ -556,10 +579,13 @@ const oldTreeChildren = oldTree[1];

const oldTreeChildSegment = oldTreeChild?.[0];
// Only pass the bundle to the child that accepts it. A parent is
// only ever bundled into one child.
const bundleForChild = process.env.__NEXT_PREFETCH_INLINING && bundleInProgress !== null && newTreeChild.prefetchHints & PrefetchHint.ParentInlinedIntoSelf ? bundleInProgress : null;
let childExitStatus;
if (oldTreeChildSegment !== undefined && doesCurrentSegmentMatchCachedSegment(route, newTreeChildSegment, oldTreeChildSegment)) {
// We're still in the "shared" part of the tree.
childExitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, oldTreeChild, newTreeChild);
childExitStatus = pingSharedPartOfCacheComponentsTree(now, task, route, oldTreeChild, newTreeChild, bundleForChild);
} else {
// We've entered the "new" part of the tree. Switch
// traversal functions.
childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, newTreeChild);
childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, newTreeChild, bundleForChild);
}

@@ -574,3 +600,3 @@ if (childExitStatus === 0) {

}
function pingNewPartOfCacheComponentsTree(now, task, route, tree) {
function pingNewPartOfCacheComponentsTree(now, task, route, tree, parentBundle) {
// We're now prefetching in the "new" part of the tree, the part that doesn't

@@ -582,21 +608,2 @@ // exist on the current page. (In other words, we're deeper than the

if (tree.prefetchHints & PrefetchHint.HasRuntimePrefetch) {
// This route has a runtime prefetch response. Since we're below the shared
// layout, everything from this point should be prefetched using a single,
// combined runtime request, rather than using per-segment static requests.
// This is true even if some of the child segments are known to be fully
// static — once we've decided to perform a runtime prefetch, we might as
// well respond with the static segments in the same roundtrip. (That's how
// regular navigations work, too.) We'll still skip over segments that are
// already cached, though.
//
// It's the server's responsibility to set a reasonable value of
// `hasRuntimePrefetch`. Currently it's user-defined, but eventually, the
// server may send a value of `false` even if the user opts in, if it
// determines during build that the route is always fully static. There are
// more optimizations we can do once we implement fallback param
// tracking, too.
//
// Use the task object to collect the segments that need a runtime prefetch.
// This will signal to the outer task queue that a second traversal is
// required to construct a request tree.
if (task.spawnedRuntimePrefetches === null) {

@@ -609,8 +616,10 @@ task.spawnedRuntimePrefetches = new Set([

}
// Then exit the traversal without prefetching anything further.
// If there's a pending static bundle from a parent, we need to finish
// prefetching it before bailing out to runtime prefetching.
if (parentBundle !== null) {
finishStaticBundleOnRuntimeBailout(now, task, route, tree, parentBundle);
}
return 2;
}
// This segment should not be runtime prefetched. Prefetch its static data.
const segment = readOrCreateSegmentCacheEntry(now, task.fetchStrategy, tree);
pingStaticSegmentData(now, task, route, segment, task.key, tree);
const bundleInProgress = accumulateSegmentBundle(now, task, route, tree, parentBundle);
if (tree.slots !== null) {

@@ -624,3 +633,6 @@ if (!hasNetworkBandwidth(task)) {

const childTree = tree.slots[parallelRouteKey];
const childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, childTree);
// Only pass the bundle to the child that accepts it. A parent is
// only ever bundled into one child.
const bundleForChild = process.env.__NEXT_PREFETCH_INLINING && bundleInProgress !== null && childTree.prefetchHints & PrefetchHint.ParentInlinedIntoSelf ? bundleInProgress : null;
const childExitStatus = pingNewPartOfCacheComponentsTree(now, task, route, childTree, bundleForChild);
if (childExitStatus === 0) {

@@ -919,123 +931,144 @@ // Child yielded without finishing.

}
function pingStaticSegmentData(now, task, route, segment, routeKey, tree) {
switch(segment.status){
case EntryStatus.Empty:
if (process.env.__NEXT_PREFETCH_INLINING) {
// All segment data for this route is bundled into a single
// /_inlined response. Walk the full route tree to collect all
// Empty segments, upgrade them to Pending, and spawn one
// bundled request. Subsequent calls for other segments in the
// same tree will see them as Pending and skip.
const inlinedEntries = collectInlinedEntries(now, route);
if (inlinedEntries.size > 0) {
spawnPrefetchSubtask(fetchInlinedSegmentsOnCacheMiss(route, routeKey, route.tree, inlinedEntries));
}
/**
* Walk a SegmentBundle, apply status-based logic to each entry, and if any
* entries need data, spawn a single fetch request for the whole bundle.
*/ function pingSegmentBundle(now, task, route, routeKey, tree, segments) {
let segmentCount = 0;
let needsFetch = false;
let node = segments;
while(node !== null){
segmentCount++;
const nodeEntry = node.entry;
const nodeTree = node.tree;
if (nodeEntry === null || nodeTree === null) {
node = node.parent;
continue;
}
switch(nodeEntry.status){
case EntryStatus.Empty:
upgradeToPendingSegment(nodeEntry, FetchStrategy.PPR);
needsFetch = true;
break;
}
// Upgrade to Pending so we know there's already a request in progress
spawnPrefetchSubtask(fetchSegmentOnCacheMiss(route, upgradeToPendingSegment(segment, FetchStrategy.PPR), routeKey, tree));
break;
case EntryStatus.Pending:
{
// There's already a request in progress. Depending on what kind of
// request it is, we may want to revalidate it.
switch(segment.fetchStrategy){
case EntryStatus.Pending:
switch(nodeEntry.fetchStrategy){
case FetchStrategy.PPR:
case FetchStrategy.PPRRuntime:
case FetchStrategy.Full:
node.entry = null;
break;
case FetchStrategy.LoadingBoundary:
// There's a pending request, but because it's using the old
// prefetching strategy, we can't be sure if it will be fulfilled by
// the response — it might be inside the loading boundary. Perform
// a revalidation, but because it's speculative, wait to do it at
// background priority.
if (background(task)) {
// TODO: Instead of speculatively revalidating, consider including
// `hasLoading` in the route tree prefetch response.
pingPPRSegmentRevalidation(now, route, routeKey, tree);
const revalidatingEntry = readOrCreateRevalidatingSegmentEntry(now, FetchStrategy.PPR, nodeTree);
if (revalidatingEntry.status === EntryStatus.Empty) {
upgradeToPendingSegment(revalidatingEntry, FetchStrategy.PPR);
node.entry = revalidatingEntry;
needsFetch = true;
} else {
node.entry = null;
}
} else {
node.entry = null;
}
break;
default:
segment.fetchStrategy;
nodeEntry.fetchStrategy;
}
break;
}
case EntryStatus.Rejected:
{
// The existing entry in the cache was rejected. Depending on how it
// was originally fetched, we may or may not want to revalidate it.
switch(segment.fetchStrategy){
case EntryStatus.Rejected:
switch(nodeEntry.fetchStrategy){
case FetchStrategy.PPR:
case FetchStrategy.PPRRuntime:
case FetchStrategy.Full:
node.entry = null;
break;
case FetchStrategy.LoadingBoundary:
// There's a rejected entry, but it was fetched using the loading
// boundary strategy. So the reason it wasn't returned by the server
// might just be because it was inside a loading boundary. Or because
// there was a dynamic rewrite. Revalidate it using the per-
// segment strategy.
//
// Because a rejected segment will definitely prevent the segment (and
// all of its children) from rendering, we perform this revalidation
// immediately instead of deferring it to a background task.
pingPPRSegmentRevalidation(now, route, routeKey, tree);
break;
{
const revalidatingEntry = readOrCreateRevalidatingSegmentEntry(now, FetchStrategy.PPR, nodeTree);
if (revalidatingEntry.status === EntryStatus.Empty) {
upgradeToPendingSegment(revalidatingEntry, FetchStrategy.PPR);
node.entry = revalidatingEntry;
needsFetch = true;
} else {
node.entry = null;
}
break;
}
default:
segment.fetchStrategy;
nodeEntry.fetchStrategy;
}
break;
}
case EntryStatus.Fulfilled:
break;
default:
segment;
case EntryStatus.Fulfilled:
node.entry = null;
break;
default:
nodeEntry;
}
node = node.parent;
}
// Segments do not have dependent tasks, so once the prefetch is initiated,
// there's nothing else for us to do (except write the server data into the
// entry, which is handled by `fetchSegmentOnCacheMiss`).
if (!needsFetch) {
return;
}
spawnPrefetchSubtask(fetchSegmentsOnCacheMiss(route, routeKey, tree, segments, segmentCount));
}
/**
* Walks the RouteTree (including the head metadata) and collects any segments
* that are still Empty into a Map, upgrading them to Pending. These entries
* will be fulfilled by the inlined prefetch response.
*/ function collectInlinedEntries(now, route) {
const entries = new Map();
collectInlinedEntriesImpl(now, route.tree, entries);
// Also collect the head/metadata entry.
const headEntry = readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, route.metadata);
if (headEntry.status === EntryStatus.Empty) {
entries.set(route.metadata.requestKey, upgradeToPendingSegment(headEntry, FetchStrategy.PPR));
* During the tree walk, decide whether this segment should be added to the
* in-progress bundle (if it has InlinedIntoChild) or finalize the bundle
* and trigger a fetch (if it doesn't). Returns the updated bundle to pass
* to children, or null if a fetch was triggered.
*/ function accumulateSegmentBundle(now, task, route, tree, parentBundle) {
// Static prefetching is disabled for this segment (runtime prefetch or
// instant = false). It participates in the bundle chain with null
// tree/entry — no cache entry is created, and the server emits null for
// this slot. This check is intentionally NOT gated by the prefetch
// inlining feature flag: we never statically prefetch segments that are
// runtime-prefetched or unprefetchable, regardless of bundling.
if (tree.prefetchHints & StaticPrefetchDisabled) {
return {
tree: null,
entry: null,
parent: parentBundle
};
}
return entries;
const segment = readOrCreateSegmentCacheEntry(now, task.fetchStrategy, tree);
if (process.env.__NEXT_PREFETCH_INLINING && tree.prefetchHints & PrefetchHint.InlinedIntoChild) {
return {
tree,
entry: segment,
parent: parentBundle
};
}
// Not bundled. Build a single-node bundle and ping it. If this page
// accepts the head (HeadInlinedIntoSelf), prepend the head's cache entry
// to the bundle.
let effectiveParent = parentBundle;
if (process.env.__NEXT_PREFETCH_INLINING && tree.prefetchHints & PrefetchHint.HeadInlinedIntoSelf) {
effectiveParent = {
tree: route.metadata,
entry: readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, route.metadata),
parent: parentBundle
};
}
const segments = {
tree,
entry: segment,
parent: effectiveParent
};
pingSegmentBundle(now, task, route, task.key, tree, segments);
return null;
}
function collectInlinedEntriesImpl(now, tree, entries) {
const entry = readOrCreateSegmentCacheEntry(now, FetchStrategy.PPR, tree);
if (entry.status === EntryStatus.Empty) {
entries.set(tree.requestKey, upgradeToPendingSegment(entry, FetchStrategy.PPR));
function finishStaticBundleOnRuntimeBailout(now, task, route, tree, parentBundle) {
const bundle = accumulateSegmentBundle(now, task, route, tree, parentBundle);
if (bundle === null) {
return;
}
if (tree.slots !== null) {
for(const parallelRouteKey in tree.slots){
collectInlinedEntriesImpl(now, tree.slots[parallelRouteKey], entries);
const childTree = tree.slots[parallelRouteKey];
if (childTree.prefetchHints & PrefetchHint.ParentInlinedIntoSelf) {
finishStaticBundleOnRuntimeBailout(now, task, route, childTree, bundle);
return;
}
}
}
}
function pingPPRSegmentRevalidation(now, route, routeKey, tree) {
const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(now, FetchStrategy.PPR, tree);
switch(revalidatingSegment.status){
case EntryStatus.Empty:
// Spawn a prefetch request. The fetch function handles upserting
// the entry at the correct fulfilled vary path upon completion.
spawnPrefetchSubtask(fetchSegmentOnCacheMiss(route, upgradeToPendingSegment(revalidatingSegment, FetchStrategy.PPR), routeKey, tree));
break;
case EntryStatus.Pending:
break;
case EntryStatus.Fulfilled:
case EntryStatus.Rejected:
break;
default:
revalidatingSegment;
}
}
function pingFullSegmentRevalidation(now, tree, fetchStrategy) {

@@ -1042,0 +1075,0 @@ const revalidatingSegment = readOrCreateRevalidatingSegmentEntry(now, fetchStrategy, tree);

@@ -28,3 +28,3 @@ /* global location */ // imports polyfill from `@next/polyfill-module` after build.

import { isNextRouterError } from './components/is-next-router-error';
export const version = "16.2.1-canary.8";
export const version = "16.2.1-canary.9";
export let router;

@@ -31,0 +31,0 @@ export const emitter = mitt();

@@ -20,3 +20,3 @@ import { readFileSync, writeFileSync } from 'fs';

const data = await res.json();
const versionData = data.versions["16.2.1-canary.8"];
const versionData = data.versions["16.2.1-canary.9"];
return {

@@ -54,3 +54,3 @@ os: versionData.os,

lockfileParsed.dependencies[pkg] = {
version: "16.2.1-canary.8",
version: "16.2.1-canary.9",
resolved: pkgData.tarball,

@@ -63,3 +63,3 @@ integrity: pkgData.integrity,

lockfileParsed.packages[pkg] = {
version: "16.2.1-canary.8",
version: "16.2.1-canary.9",
resolved: pkgData.tarball,

@@ -66,0 +66,0 @@ integrity: pkgData.integrity,

/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */ import { jsx as _jsx } from "react/jsx-runtime";
import { PrefetchHint, StaticPrefetchDisabled } from '../../shared/lib/app-router-types';
import { readVaryParams } from '../../shared/lib/segment-cache/vary-params-decoding';
import { PAGE_SEGMENT_KEY } from '../../shared/lib/segment';
// eslint-disable-next-line import/no-extraneous-dependencies

@@ -10,2 +9,3 @@ import { createFromReadableStream } from 'react-server-dom-webpack/client';

import { streamFromBuffer, streamToBuffer } from '../stream-utils/node-web-streams-helper';
import { PAGE_SEGMENT_KEY } from '../../shared/lib/segment';
import { waitAtLeastOneReactRenderTask } from '../../lib/scheduler';

@@ -105,5 +105,21 @@ import { createSegmentRequestKeyPart, appendSegmentRequestKeyPart, ROOT_SEGMENT_REQUEST_KEY, HEAD_REQUEST_KEY } from '../../shared/lib/segment-cache/segment-value-encoding';

// prefetches to the result map.
let hasPageSegment = false;
for (const [segmentPath, buffer] of (await Promise.all(segmentTasks))){
resultMap.set(segmentPath, buffer);
if (segmentPath.endsWith('__PAGE__')) {
hasPageSegment = true;
}
}
if (!hasPageSegment) {
// The build requires at least one segment path ending with __PAGE__ to
// register the catch-all segment data route. When all page segments are
// disabled (e.g. every leaf has runtime prefetching), no __PAGE__ entry
// is emitted. Write a dummy entry with a path that doesn't match any
// real route segment so the client will never request it.
//
// TODO: Remove the __PAGE__ requirement from the build instead of
// working around it here. The invariant is outdated now that segments
// can be disabled.
resultMap.set('/todo-remove-fake-segment/__PAGE__', Buffer.alloc(0));
}
return resultMap;

@@ -145,3 +161,3 @@ }

const headVaryParams = headVaryParamsThenable !== null ? readVaryParams(headVaryParamsThenable) : null;
const [, headBuffer] = await renderSegmentPrefetch(buildId, staleTime, head, HEAD_REQUEST_KEY, headVaryParams, clientModules);
const [, headBuffer] = await renderSegmentPrefetch(buildId, staleTime, head, HEAD_REQUEST_KEY, headVaryParams, clientModules, null);
const headGzipSize = await getGzipSize(headBuffer);

@@ -212,3 +228,3 @@ // Mutable accumulator: the first segment that accepts the head sets this

const varyParams = varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null;
const [, buffer] = await renderSegmentPrefetch(buildId, staleTime, seedData[0], requestKey, varyParams, clientModules);
const [, buffer] = await renderSegmentPrefetch(buildId, staleTime, seedData[0], requestKey, varyParams, clientModules, null);
currentGzipSize = await getGzipSize(buffer);

@@ -393,18 +409,19 @@ }

const headVaryParams = headVaryParamsThenable !== null ? readVaryParams(headVaryParamsThenable) : null;
// Only applies when prefetch inlining is enabled — the client doesn't
// know to look for the head inside a page's response otherwise.
const headIsInlined = prefetchInlining && hints !== null && !(hints.hints & PrefetchHint.HeadOutlined);
// Compute the route metadata tree by traversing the FlightRouterState. As we
// walk the tree, we will also spawn a task to produce a prefetch response for
// each segment (unless prefetch inlining is enabled, in which case all
// segments are bundled into a single /_inlined response).
const tree = collectSegmentDataImpl(isClientParamParsingEnabled, flightRouterState, buildId, staleTime, seedData, clientModules, ROOT_SEGMENT_REQUEST_KEY, segmentTasks, prefetchInlining, hints);
if (prefetchInlining) {
// When prefetch inlining is enabled, bundle all segment data into a single
// /_inlined response instead of individual per-segment responses. The head
// is also included in the inlined response.
segmentTasks.push(waitAtLeastOneReactRenderTask().then(()=>renderInlinedPrefetchResponse(flightRouterState, buildId, staleTime, seedData, head, headVaryParams, clientModules)));
} else {
// Also spawn a task to produce a prefetch response for the "head" segment.
// The head contains metadata, like the title; it's not really a route
// segment, but it contains RSC data, so it's treated like a segment by
// the client cache.
segmentTasks.push(waitAtLeastOneReactRenderTask().then(()=>renderSegmentPrefetch(buildId, staleTime, head, HEAD_REQUEST_KEY, headVaryParams, clientModules)));
// each segment. When prefetch inlining is enabled, small segments are bundled
// into their children's responses based on the hint bits.
const headBundle = headIsInlined ? {
rsc: head,
varyParams: headVaryParams,
next: null
} : null;
const tree = collectSegmentDataImpl(isClientParamParsingEnabled, flightRouterState, buildId, staleTime, seedData, clientModules, ROOT_SEGMENT_REQUEST_KEY, segmentTasks, prefetchInlining, hints, null, headBundle);
// Spawn a task to produce a prefetch response for the "head" segment,
// unless it was inlined into a page's bundle.
if (!headIsInlined) {
segmentTasks.push(waitAtLeastOneReactRenderTask().then(()=>renderSegmentPrefetch(buildId, staleTime, head, HEAD_REQUEST_KEY, headVaryParams, clientModules, null)));
}

@@ -425,3 +442,61 @@ // Notify the abort controller that we're done processing the route tree.

}
function collectSegmentDataImpl(isClientParamParsingEnabled, route, buildId, staleTime, seedData, clientModules, requestKey, segmentTasks, prefetchInlining, hintTree) {
function collectSegmentDataImpl(isClientParamParsingEnabled, route, buildId, staleTime, seedData, clientModules, requestKey, segmentTasks, prefetchInlining, hintTree, parentBundle, headBundle) {
// Union the hints already embedded in the FlightRouterState with the
// separately-computed build-time hints. During the initial build, the
// FlightRouterState was produced before collectPrefetchHints ran, so
// inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in
// route[4] yet. On subsequent renders the hints are already in the
// FlightRouterState, so the union is idempotent.
//
// Always strip InliningHintsStale from the result. That bit is only
// relevant for the initial RSC payload baked into HTML — the /_tree
// response produced here always has correct hints, so the client should
// never see InliningHintsStale in a /_tree response.
const prefetchHints = ((route[4] ?? 0) | (hintTree !== null ? hintTree.hints : 0)) & ~PrefetchHint.InliningHintsStale;
// Determine which params this segment varies on.
const varyParamsThenable = seedData !== null ? seedData[4] : null;
const varyParams = varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null;
// If static prefetching is disabled for this segment (runtime prefetch or
// instant = false), it still participates in the bundle chain but with
// null data. The client will skip creating a cache entry for it.
const staticPrefetchDisabled = (prefetchHints & StaticPrefetchDisabled) !== 0;
const rsc = seedData !== null && !staticPrefetchDisabled ? seedData[0] : null;
// Determine whether this segment's data should be accumulated into a
// child's response (inlining) or spawned as its own task. When inlining
// is disabled, the hint bits may still be set (they're computed at build
// time regardless) but we ignore them — every segment is rendered
// standalone because the client doesn't know how to parse bundled
// responses.
let childBundle = null;
if (prefetchInlining && prefetchHints & PrefetchHint.InlinedIntoChild) {
// This segment is small enough that its data will be included in one
// of its children's responses. Don't spawn a separate task — prepend
// this segment's data onto the linked list so the accepting child can
// bundle it into its response.
if (seedData !== null) {
childBundle = {
rsc,
varyParams,
next: parentBundle
};
}
} else {
// This segment is not inlined into a child. Spawn a task to render it.
// If it has ParentInlinedIntoSelf, the accumulated parents are included
// in its response. Otherwise parentBundle is null and it renders as a
// standalone single-segment response.
//
// Skip spawning a task if rsc is null (disabled segment) — there's no
// data to serve and the client won't request it.
if (seedData !== null && rsc !== null) {
let bundle = prefetchHints & PrefetchHint.ParentInlinedIntoSelf ? parentBundle : null;
// If this page accepts the head, append it at the tail of the chain.
if (headBundle !== null && prefetchHints & PrefetchHint.HeadInlinedIntoSelf) {
headBundle.next = bundle;
bundle = headBundle;
}
segmentTasks.push(waitAtLeastOneReactRenderTask().then(()=>renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, clientModules, bundle)));
}
// childBundle stays null — reset the accumulator for children.
}
// Metadata about the segment. Sent as part of the tree prefetch. Null if

@@ -438,3 +513,3 @@ // there are no children.

const childHintTree = hintTree !== null && hintTree.slots !== null ? hintTree.slots[parallelRouteKey] ?? null : null;
const childTree = collectSegmentDataImpl(isClientParamParsingEnabled, childRoute, buildId, staleTime, childSeedData, clientModules, childRequestKey, segmentTasks, prefetchInlining, childHintTree);
const childTree = collectSegmentDataImpl(isClientParamParsingEnabled, childRoute, buildId, staleTime, childSeedData, clientModules, childRequestKey, segmentTasks, prefetchInlining, childHintTree, childBundle, headBundle);
if (slotMetadata === null) {

@@ -445,38 +520,2 @@ slotMetadata = {};

}
// Union the hints already embedded in the FlightRouterState with the
// separately-computed build-time hints. During the initial build, the
// FlightRouterState was produced before collectPrefetchHints ran, so
// inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in
// route[4] yet. On subsequent renders the hints are already in the
// FlightRouterState, so the union is idempotent.
//
// Strip InliningHintsStale — it's a transient flag set on the initial
// build-time FlightRouterState and must never appear in /_tree responses.
// If it leaked through, the client would re-fetch the tree in an infinite
// loop.
const prefetchHints = (route[4] ?? 0) & ~PrefetchHint.InliningHintsStale | (hintTree !== null ? hintTree.hints : 0);
// Determine which params this segment varies on.
// Read the vary params thenable directly from the seed data. By the time
// collectSegmentData runs, the thenable should be fulfilled. If it's not
// fulfilled or null, treat as unknown (null means we can't share cache
// entries across param values).
const varyParamsThenable = seedData !== null ? seedData[4] : null;
const varyParams = varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null;
if (!prefetchInlining) {
// When prefetch inlining is disabled, spawn individual segment tasks.
// When enabled, segment data is bundled into the /_inlined response
// instead, so we skip per-segment tasks here.
if (seedData !== null) {
// Spawn a task to write the segment data to a new Flight stream.
segmentTasks.push(// Since we're already in the middle of a render, wait until after the
// current task to escape the current rendering context.
waitAtLeastOneReactRenderTask().then(()=>renderSegmentPrefetch(buildId, staleTime, seedData[0], requestKey, varyParams, clientModules)));
} else {
// This segment does not have any seed data. Skip generating a prefetch
// response for it. We'll still include it in the route tree, though.
// TODO: We should encode in the route tree whether a segment is missing
// so we don't attempt to fetch it for no reason. As of now this shouldn't
// ever happen in practice, though.
}
}
const segment = route[0];

@@ -507,5 +546,7 @@ let name;

}
async function renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, clientModules) {
// Render the segment data to a stream.
const segmentPrefetch = {
async function renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, clientModules, bundle) {
// Build the SegmentPrefetch for the terminal (requested) segment.
// The terminal always has non-null rsc data — disabled segments are
// skipped by the caller and don't reach this function.
const selfPrefetch = {
rsc,

@@ -516,9 +557,31 @@ isPartial: await isPartialRSCData(rsc, clientModules),

};
// Wrap in a SegmentPrefetchResponse with a top-level buildId.
// For non-bundled responses, the data array has a single element.
const response = {
// Build the data array. Always an array, even for a single segment.
const data = [
selfPrefetch
];
if (bundle !== null) {
// Walk the bundle linked list and append each entry to the array.
let node = bundle;
while(node !== null){
if (node.rsc !== null) {
data.push({
rsc: node.rsc,
isPartial: await isPartialRSCData(node.rsc, clientModules),
staleTime,
varyParams: node.varyParams
});
} else {
// This segment has static prefetching disabled (runtime prefetch
// or instant = false). Emit null as a placeholder so the array
// indices stay aligned with the client's SegmentBundle linked
// list. The client will skip creating a cache entry for this slot.
data.push(null);
}
node = node.next;
}
}
// Wrap in the response envelope with the build ID at the top level.
const payload = {
buildId: buildId ?? '',
data: [
segmentPrefetch
]
data
};

@@ -530,3 +593,3 @@ // Since all we're doing is decoding and re-encoding a cached prerender, if

waitAtLeastOneReactRenderTask().then(()=>abortController.abort());
const { prelude: segmentStream } = await prerender(response, clientModules, {
const { prelude: segmentStream } = await prerender(payload, clientModules, {
filterStackFrame,

@@ -549,58 +612,2 @@ signal: abortController.signal,

}
async function renderInlinedPrefetchResponse(route, buildId, staleTime, seedData, head, headVaryParams, clientModules) {
// Build the inlined tree by walking the route and collecting all segments.
const inlinedTree = await buildInlinedSegmentPrefetch(route, buildId, staleTime, seedData, clientModules);
// Build the head segment.
const headPrefetch = {
rsc: head,
isPartial: await isPartialRSCData(head, clientModules),
staleTime,
varyParams: headVaryParams
};
const response = {
buildId: buildId ?? '',
tree: inlinedTree,
head: headPrefetch
};
// Render as a single Flight response.
const abortController = new AbortController();
waitAtLeastOneReactRenderTask().then(()=>abortController.abort());
const { prelude } = await prerender(response, clientModules, {
filterStackFrame,
signal: abortController.signal,
onError: onSegmentPrerenderError
});
const buffer = await streamToBuffer(prelude);
return [
'/' + PAGE_SEGMENT_KEY,
buffer
];
}
async function buildInlinedSegmentPrefetch(route, buildId, staleTime, seedData, clientModules) {
let slots = null;
const children = route[1];
const seedDataChildren = seedData !== null ? seedData[1] : null;
for(const parallelRouteKey in children){
const childRoute = children[parallelRouteKey];
const childSeedData = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null;
const childPrefetch = await buildInlinedSegmentPrefetch(childRoute, buildId, staleTime, childSeedData, clientModules);
if (slots === null) {
slots = {};
}
slots[parallelRouteKey] = childPrefetch;
}
const rsc = seedData !== null ? seedData[0] : null;
const varyParamsThenable = seedData !== null ? seedData[4] : null;
const varyParams = varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null;
const segment = {
rsc,
isPartial: rsc !== null ? await isPartialRSCData(rsc, clientModules) : true,
staleTime,
varyParams
};
return {
segment,
slots
};
}
async function isPartialRSCData(rsc, clientModules) {

@@ -607,0 +614,0 @@ // We can determine if a segment contains only partial data if it takes longer

@@ -1,1 +0,1 @@

{"version":3,"sources":["../../../../src/server/app-render/collect-segment-data.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */\nimport type {\n CacheNodeSeedData,\n FlightRouterState,\n InitialRSCPayload,\n DynamicParamTypesShort,\n HeadData,\n PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n StaticPrefetchDisabled,\n} from '../../shared/lib/app-router-types'\nimport { readVaryParams } from '../../shared/lib/segment-cache/vary-params-decoding'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport type { ManifestNode } from '../../build/webpack/plugins/flight-manifest-plugin'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream } from 'react-server-dom-webpack/client'\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { prerender } from 'react-server-dom-webpack/static'\n\nimport {\n streamFromBuffer,\n streamToBuffer,\n} from '../stream-utils/node-web-streams-helper'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport {\n type SegmentRequestKey,\n createSegmentRequestKeyPart,\n appendSegmentRequestKeyPart,\n ROOT_SEGMENT_REQUEST_KEY,\n HEAD_REQUEST_KEY,\n} from '../../shared/lib/segment-cache/segment-value-encoding'\nimport { getDigestForWellKnownError } from './create-error-handler'\nimport {\n Phase,\n printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\n// Contains metadata about the route tree. The client must fetch this before\n// it can fetch any actual segment data.\nexport type RootTreePrefetch = {\n buildId?: string\n tree: TreePrefetch\n staleTime: number\n}\n\nexport type TreePrefetchParam = {\n type: DynamicParamTypesShort\n // When cacheComponents is enabled, this field is always null.\n // Instead we parse the param on the client, allowing us to omit it from\n // the prefetch response and increase its cacheability.\n key: string | null\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then siblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n siblings: readonly string[] | null\n}\n\nexport type TreePrefetch = {\n name: string\n // Only present for parameterized (dynamic) segments.\n param: TreePrefetchParam | null\n\n // Child segments.\n slots: null | {\n [parallelRouteKey: string]: TreePrefetch\n }\n\n /** Bitmask of PrefetchHint flags for this segment and its subtree */\n prefetchHints: number\n}\n\n/**\n * Top-level response for a segment prefetch request. Contains the build ID\n * and an array of segment data (one per segment in the bundle).\n */\nexport type SegmentPrefetchResponse = {\n buildId: string\n data: Array<SegmentPrefetch | null>\n}\n\nexport type SegmentPrefetch = {\n rsc: React.ReactNode | null\n isPartial: boolean\n staleTime: number\n /**\n * The set of params that this segment's output depends on. Used by the client\n * cache to determine which entries can be reused across different param\n * values.\n * - `null` means vary params were not tracked (conservative: assume all\n * params matter)\n * - Empty set means no params were accessed (segment is reusable for any\n * param values)\n */\n varyParams: Set<string> | null\n}\n\n/**\n * A node in the inlined prefetch tree. Wraps a SegmentPrefetch with child\n * slots so all segments for a route can be bundled into a single response.\n *\n * This is a separate type from SegmentPrefetch because the inlined flow is\n * still gated behind a feature flag. Eventually inlining will always be\n * enabled, and the per-segment and inlined paths will merge.\n */\nexport type InlinedSegmentPrefetch = {\n segment: SegmentPrefetch\n slots: null | {\n [parallelRouteKey: string]: InlinedSegmentPrefetch\n }\n}\n\n/**\n * The response shape for the /_inlined prefetch endpoint. Contains all segment\n * data for a route bundled into a single tree structure, plus the head segment.\n */\nexport type InlinedPrefetchResponse = {\n buildId: string\n tree: InlinedSegmentPrefetch\n head: SegmentPrefetch\n}\n\nconst filterStackFrame =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .filterStackFrameDEV\n : undefined\nconst findSourceMapURL =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .findSourceMapURLDEV\n : undefined\n\nfunction onSegmentPrerenderError(error: unknown) {\n const digest = getDigestForWellKnownError(error)\n if (digest) {\n return digest\n }\n // We don't need to log the errors because we would have already done that\n // when generating the original Flight stream for the whole page.\n if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n const workStore = workAsyncStorage.getStore()\n printDebugThrownValueForProspectiveRender(\n error,\n workStore?.route ?? 'unknown route',\n Phase.SegmentCollection\n )\n }\n}\n\n/**\n * Extract the FlightRouterState, seed data, and head from a prerendered\n * InitialRSCPayload. Returns null if the payload doesn't match the expected\n * shape (single path with 3 elements).\n */\nfunction extractFlightData(initialRSCPayload: InitialRSCPayload): {\n buildId: string | undefined\n flightRouterState: FlightRouterState\n seedData: CacheNodeSeedData\n head: HeadData\n} | null {\n const flightDataPaths = initialRSCPayload.f\n // FlightDataPath is an unsound type, hence the additional checks.\n if (flightDataPaths.length !== 1 && flightDataPaths[0].length !== 3) {\n console.error(\n 'Internal Next.js error: InitialRSCPayload does not match the expected ' +\n 'shape for a prerendered page during segment prefetch generation.'\n )\n return null\n }\n return {\n buildId: initialRSCPayload.b,\n flightRouterState: flightDataPaths[0][0],\n seedData: flightDataPaths[0][1],\n head: flightDataPaths[0][2],\n }\n}\n\nexport async function collectSegmentData(\n isCacheComponentsEnabled: boolean,\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n prefetchInlining: boolean,\n hints: PrefetchHints | null\n): Promise<Map<SegmentRequestKey, Buffer>> {\n // Traverse the router tree and generate a prefetch response for each segment.\n\n // A mutable map to collect the results as we traverse the route tree.\n const resultMap = new Map<SegmentRequestKey, Buffer>()\n\n // Before we start, warm up the module cache by decoding the page data once.\n // Then we can assume that any remaining async tasks that occur the next time\n // are due to hanging promises caused by dynamic data access. Note we only\n // have to do this once per page, not per individual segment.\n //\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Create an abort controller that we'll use to stop the stream.\n const abortController = new AbortController()\n const onCompletedProcessingRouteTree = async () => {\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // serializing the stream takes longer than a microtask, it must because of\n // hanging promises caused by dynamic data.\n await waitAtLeastOneReactRenderTask()\n abortController.abort()\n }\n\n // Generate a stream for the route tree prefetch. While we're walking the\n // tree, we'll also spawn additional tasks to generate the segment prefetches.\n // The promises for these tasks are pushed to a mutable array that we will\n // await once the route tree is fully rendered.\n const segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>> = []\n const { prelude: treeStream } = await prerender(\n // RootTreePrefetch is not a valid return type for a React component, but\n // we need to use a component so that when we decode the original stream\n // inside of it, the side effects are transferred to the new stream.\n // @ts-expect-error\n <PrefetchTreeData\n isClientParamParsingEnabled={isCacheComponentsEnabled}\n fullPageDataBuffer={fullPageDataBuffer}\n serverConsumerManifest={serverConsumerManifest}\n clientModules={clientModules}\n staleTime={staleTime}\n segmentTasks={segmentTasks}\n onCompletedProcessingRouteTree={onCompletedProcessingRouteTree}\n prefetchInlining={prefetchInlining}\n hints={hints}\n />,\n clientModules,\n {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n }\n )\n\n // Write the route tree to a special `/_tree` segment.\n const treeBuffer = await streamToBuffer(treeStream)\n resultMap.set('/_tree' as SegmentRequestKey, treeBuffer)\n\n // Also output the entire full page data response\n resultMap.set('/_full' as SegmentRequestKey, fullPageDataBuffer)\n\n // Now that we've finished rendering the route tree, all the segment tasks\n // should have been spawned. Await them in parallel and write the segment\n // prefetches to the result map.\n for (const [segmentPath, buffer] of await Promise.all(segmentTasks)) {\n resultMap.set(segmentPath, buffer)\n }\n\n return resultMap\n}\n\n/**\n * Compute prefetch hints for a route by measuring segment sizes and deciding\n * which segments should be inlined. Only runs at build time. The results are\n * written to prefetch-hints.json and loaded at server startup.\n *\n * This is a separate pass from collectSegmentData so that the inlining\n * decisions can be fed back into collectSegmentData to control which segments\n * are output as separate entries vs. inlined into their parent.\n */\nexport async function collectPrefetchHints(\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n maxSize: number,\n maxBundleSize: number\n): Promise<PrefetchHints> {\n // Warm up the module cache, same as collectSegmentData.\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Decode the Flight data to walk the route tree.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return { hints: 0, slots: null }\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Measure the head (metadata/viewport) gzip size so the main traversal\n // can decide whether to inline it into a page's bundle.\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n const [, headBuffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules\n )\n const headGzipSize = await getGzipSize(headBuffer)\n\n // Mutable accumulator: the first segment that accepts the head sets this\n // to true. Once set, subsequent segments skip the check.\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment (since the runtime response already\n // includes it). Static pages are skipped to avoid duplication.\n const rootHints = flightRouterState[4] ?? 0\n const subtreeHasRuntimePrefetch =\n (rootHints & PrefetchHint.SubtreeHasRuntimePrefetch) !== 0\n const headInlineState = { inlined: false }\n\n // Walk the tree with the parent-first, child-decides algorithm.\n const { node } = await collectPrefetchHintsImpl(\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n null, // root has no parent to inline\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n subtreeHasRuntimePrefetch\n )\n\n if (!headInlineState.inlined) {\n // No page could accept the head. Set HeadOutlined on the root so the\n // client knows to fetch the head separately.\n node.hints |= PrefetchHint.HeadOutlined\n }\n\n return node\n}\n\n// Measure a segment's gzip size and decide whether it should be inlined.\n//\n// These hints are computed once during build and never change for the\n// lifetime of that deployment. The client can assume that hints delivered as\n// part of one request will be the same during a subsequent request, given\n// the same build ID. There's no skew to worry about as long as the build\n// itself is consistent.\n//\n// In the Segment Cache, we split page prefetches into multiple requests so\n// that each one can be cached and deduped independently. However, some\n// segments are small enough that the potential caching benefits are not worth\n// the additional network overhead. For these, we inline a parent's data into\n// one of its children's responses, avoiding a separate request. The parent\n// is inlined into the child (not the other way around) because the parent's\n// response is more likely to be shared across multiple pages. The child's\n// response is already page-specific, so adding the parent's data there\n// doesn't meaningfully reduce deduplication. It's similar to how JS bundlers\n// decide whether to inline a module into a chunk.\n//\n// The algorithm is parent-first, child-decides: the parent measures itself\n// and passes its gzip size down. Each child decides whether to accept. A\n// child rejects if the parent exceeds maxSize or if accepting would push\n// the cumulative inlined bytes past maxBundleSize. This produces\n// both ParentInlinedIntoSelf (on the child) and InlinedIntoChild (on the\n// parent) in a single pass.\nasync function collectPrefetchHintsImpl(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n // TODO: Consider persisting the computed requestKey into the hints output\n // so it doesn't need to be recomputed during the build. This might also\n // suggest renaming prefetch-hints.json to something like\n // segment-manifest.json, since it would contain more than just hints.\n requestKey: SegmentRequestKey,\n parentGzipSize: number | null,\n maxSize: number,\n maxBundleSize: number,\n headGzipSize: number,\n headInlineState: { inlined: boolean },\n routeHasRuntimePrefetch: boolean\n): Promise<{\n node: PrefetchHints\n // Total inlined bytes accumulated along the deepest accepting path in this\n // subtree. Used by ancestors for budget checks.\n inlinedBytes: number\n}> {\n // Check if static prefetching is disabled for this segment (runtime\n // prefetch or unstable_instant = false). Such segments act as transparent\n // pass-throughs in the bundle chain: they contribute zero bytes of their\n // own and pass parent data through to children. However, they cannot be\n // the terminal of a chain — if no child accepts the parent data, the\n // parent cannot be inlined into this segment because there's no static\n // response to carry it. See the ParentInlinedIntoSelf check below.\n const isStaticPrefetchDisabled =\n ((route[4] ?? 0) & StaticPrefetchDisabled) !== 0\n\n // Render current segment and measure its gzip size. Skip measurement for\n // segments with static prefetching disabled since they contribute nothing.\n let currentGzipSize: number | null = null\n if (!isStaticPrefetchDisabled && seedData !== null) {\n const varyParamsThenable = seedData[4]\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n const [, buffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n seedData[0],\n requestKey,\n varyParams,\n clientModules\n )\n currentGzipSize = await getGzipSize(buffer)\n }\n\n // Only offer this segment to its children for inlining if its gzip size\n // is below maxSize. Segments with static prefetching disabled have\n // nothing to offer (their slot in the bundle is null).\n const sizeToInline =\n currentGzipSize !== null && currentGzipSize < maxSize\n ? currentGzipSize\n : null\n\n // Process children serially (not in parallel) to ensure deterministic\n // results. Since this only runs at build time and the rendering is just\n // re-encoding cached prerenders, this won't impact build times. Each child\n // receives our gzip size and decides whether to inline us. Once a child\n // accepts, we stop offering to remaining siblings — the parent is only\n // inlined into one child. In parallel routes, this avoids duplicating the\n // parent's data across multiple sibling responses.\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n\n let slots: Record<string, PrefetchHints> | null = null\n let didInlineIntoChild = false\n let acceptingChildInlinedBytes = 0\n // Track the smallest inlinedBytes across all children so we know how much\n // budget remains along the best path. When our own parent asks whether we\n // can accept its data, the parent's bytes would flow through to the child\n // with the most remaining headroom.\n let smallestChildInlinedBytes = Infinity\n let hasChildren = false\n\n for (const parallelRouteKey in children) {\n hasChildren = true\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n\n // Determine what size to offer children for inlining. Normally we offer\n // our own size. But if static prefetching is disabled for this segment,\n // it has no data of its own — instead it passes the parent's offer\n // through to children. This allows a static grandparent to inline\n // through a disabled intermediate segment into a static grandchild.\n const sizeToOfferChild = isStaticPrefetchDisabled\n ? parentGzipSize\n : sizeToInline\n\n const childResult = await collectPrefetchHintsImpl(\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n // Once a child has accepted us, stop offering to remaining siblings.\n didInlineIntoChild ? null : sizeToOfferChild,\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n routeHasRuntimePrefetch\n )\n\n if (slots === null) {\n slots = {}\n }\n slots[parallelRouteKey] = childResult.node\n\n if (childResult.node.hints & PrefetchHint.ParentInlinedIntoSelf) {\n // This child accepted our data — it will include our segment's\n // response in its own. No need to track headroom anymore since\n // we already know which child we're inlined into.\n didInlineIntoChild = true\n acceptingChildInlinedBytes = childResult.inlinedBytes\n } else if (!didInlineIntoChild) {\n // Track the child with the most remaining headroom. Used below\n // when deciding whether to accept our own parent's data.\n if (childResult.inlinedBytes < smallestChildInlinedBytes) {\n smallestChildInlinedBytes = childResult.inlinedBytes\n }\n }\n }\n\n // Leaf segment: no children have consumed any budget yet.\n if (!hasChildren) {\n smallestChildInlinedBytes = 0\n }\n\n // Mark this segment as InlinedIntoChild if one of its children accepted.\n // This means this segment doesn't need its own prefetch response — its\n // data is included in the accepting child's response instead.\n let hints = 0\n if (didInlineIntoChild) {\n hints |= PrefetchHint.InlinedIntoChild\n }\n\n // inlinedBytes represents the total gzipped bytes of parent data inlined\n // into the deepest \"inlining target\" along this branch. It starts at 0 at\n // the leaves and grows as parents are inlined going back up the tree. If a\n // child accepted us, our size is already counted in that child's value.\n let inlinedBytes = didInlineIntoChild\n ? acceptingChildInlinedBytes\n : smallestChildInlinedBytes\n\n // Determine which segment is responsible for the head (metadata/viewport).\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment — the runtime response already includes\n // the head, so assigning it to a static page would duplicate it.\n //\n // When the route has no runtime prefetch segments, the head is assigned\n // to the first static page terminal that has budget room. Head can only\n // be inlined into a page, not a layout, because pages may access\n // additional params (e.g. searchParams) that layouts cannot.\n //\n // A disabled segment with PrefetchDisabled (instant = false) is never a\n // valid target — it has no response at all.\n const hasRuntimePrefetch =\n ((route[4] ?? 0) & PrefetchHint.HasRuntimePrefetch) !== 0\n const isBundleTerminal = !didInlineIntoChild && !isStaticPrefetchDisabled\n const segment = route[0]\n const isPageSegment =\n typeof segment === 'string'\n ? segment === PAGE_SEGMENT_KEY\n : segment[0] === PAGE_SEGMENT_KEY\n if (!headInlineState.inlined) {\n if (hasRuntimePrefetch) {\n // Runtime prefetch segment — the runtime response includes the head.\n // No budget cost since it's already part of that response.\n hints |= PrefetchHint.HeadInlinedIntoSelf\n headInlineState.inlined = true\n } else if (isBundleTerminal && isPageSegment && !routeHasRuntimePrefetch) {\n // Static page terminal — only used when no runtime segments exist.\n // The head counts against the bundle budget.\n if (inlinedBytes + headGzipSize < maxBundleSize) {\n hints |= PrefetchHint.HeadInlinedIntoSelf\n inlinedBytes += headGzipSize\n headInlineState.inlined = true\n }\n }\n }\n\n // Decide whether to accept our own parent's data. Conditions:\n //\n // 1. The parent offered us a size (parentGzipSize is not null). It's null\n // when the parent is too large to inline or when this is the root.\n //\n // 2. The total inlined bytes along this branch wouldn't exceed the budget.\n // Even if each segment is individually small, at some point it no\n // longer makes sense to keep adding bytes because the combined response\n // is unique per URL and can't be deduped.\n //\n // 3. If this segment has static prefetching disabled, it can only accept\n // the parent if it has successfully inlined into a child. A disabled\n // segment is a transparent pass-through — it passes parent data through\n // to descendants. But if no descendant accepted, there's no static\n // response to carry the parent's data, so the parent must remain\n // outlined.\n //\n // A node can be both InlinedIntoChild and ParentInlinedIntoSelf. This\n // happens in multi-level chains: GP → P → C where all are small. C\n // accepts P (P is InlinedIntoChild), then P also accepts GP (P is\n // ParentInlinedIntoSelf). The result: C's response includes both P's\n // and GP's data. The parent's data flows through to the deepest\n // accepting descendant.\n if (parentGzipSize !== null) {\n // A disabled segment can only pass through — it needs a child to\n // ultimately accept the parent's data.\n const canAcceptParent = !isStaticPrefetchDisabled || didInlineIntoChild\n if (canAcceptParent && inlinedBytes + parentGzipSize < maxBundleSize) {\n hints |= PrefetchHint.ParentInlinedIntoSelf\n inlinedBytes += parentGzipSize\n }\n }\n\n return {\n node: { hints, slots },\n inlinedBytes,\n }\n}\n\n// We use gzip size rather than raw size because it better reflects the actual\n// transfer cost. The inlining trade-off is about whether the overhead of an\n// additional HTTP request (connection setup, headers, round trip) is worth\n// the deduplication benefit of keeping a segment separate. Below some\n// compressed size, the request overhead dominates and inlining is better.\n// Above it, the deduplication benefit of a cacheable standalone response\n// wins out.\nasync function getGzipSize(buffer: Buffer): Promise<number> {\n const stream = new Blob([new Uint8Array(buffer)])\n .stream()\n .pipeThrough(new CompressionStream('gzip'))\n const compressedBlob = await new Response(stream).blob()\n return compressedBlob.size\n}\n\nasync function PrefetchTreeData({\n isClientParamParsingEnabled,\n fullPageDataBuffer,\n serverConsumerManifest,\n clientModules,\n staleTime,\n segmentTasks,\n onCompletedProcessingRouteTree,\n prefetchInlining,\n hints,\n}: {\n isClientParamParsingEnabled: boolean\n fullPageDataBuffer: Buffer\n serverConsumerManifest: any\n clientModules: ManifestNode\n staleTime: number\n segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>>\n onCompletedProcessingRouteTree: () => void\n prefetchInlining: boolean\n hints: PrefetchHints | null\n}): Promise<RootTreePrefetch | null> {\n // We're currently rendering a Flight response for the route tree prefetch.\n // Inside this component, decode the Flight stream for the whole page. This is\n // a hack to transfer the side effects from the original Flight stream (e.g.\n // Float preloads) onto the Flight stream for the tree prefetch.\n // TODO: React needs a better way to do this. Needed for Server Actions, too.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return null\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Extract the head vary params from the decoded response.\n // The head vary params thenable should be fulfilled by now; if not, treat\n // as unknown (null).\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n // Compute the route metadata tree by traversing the FlightRouterState. As we\n // walk the tree, we will also spawn a task to produce a prefetch response for\n // each segment (unless prefetch inlining is enabled, in which case all\n // segments are bundled into a single /_inlined response).\n const tree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n segmentTasks,\n prefetchInlining,\n hints\n )\n\n if (prefetchInlining) {\n // When prefetch inlining is enabled, bundle all segment data into a single\n // /_inlined response instead of individual per-segment responses. The head\n // is also included in the inlined response.\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderInlinedPrefetchResponse(\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n head,\n headVaryParams,\n clientModules\n )\n )\n )\n } else {\n // Also spawn a task to produce a prefetch response for the \"head\" segment.\n // The head contains metadata, like the title; it's not really a route\n // segment, but it contains RSC data, so it's treated like a segment by\n // the client cache.\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules\n )\n )\n )\n }\n\n // Notify the abort controller that we're done processing the route tree.\n // Anything async that happens after this point must be due to hanging\n // promises in the original stream.\n onCompletedProcessingRouteTree()\n\n // Render the route tree to a special `/_tree` segment.\n const treePrefetch: RootTreePrefetch = {\n tree,\n staleTime,\n }\n if (buildId) {\n treePrefetch.buildId = buildId\n }\n return treePrefetch\n}\n\nfunction collectSegmentDataImpl(\n isClientParamParsingEnabled: boolean,\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n requestKey: SegmentRequestKey,\n segmentTasks: Array<Promise<[string, Buffer]>>,\n prefetchInlining: boolean,\n hintTree: PrefetchHints | null\n): TreePrefetch {\n // Metadata about the segment. Sent as part of the tree prefetch. Null if\n // there are no children.\n let slotMetadata: { [parallelRouteKey: string]: TreePrefetch } | null = null\n\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n for (const parallelRouteKey in children) {\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n const childHintTree =\n hintTree !== null && hintTree.slots !== null\n ? (hintTree.slots[parallelRouteKey] ?? null)\n : null\n const childTree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n segmentTasks,\n prefetchInlining,\n childHintTree\n )\n if (slotMetadata === null) {\n slotMetadata = {}\n }\n slotMetadata[parallelRouteKey] = childTree\n }\n\n // Union the hints already embedded in the FlightRouterState with the\n // separately-computed build-time hints. During the initial build, the\n // FlightRouterState was produced before collectPrefetchHints ran, so\n // inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in\n // route[4] yet. On subsequent renders the hints are already in the\n // FlightRouterState, so the union is idempotent.\n //\n // Strip InliningHintsStale — it's a transient flag set on the initial\n // build-time FlightRouterState and must never appear in /_tree responses.\n // If it leaked through, the client would re-fetch the tree in an infinite\n // loop.\n const prefetchHints =\n ((route[4] ?? 0) & ~PrefetchHint.InliningHintsStale) |\n (hintTree !== null ? hintTree.hints : 0)\n\n // Determine which params this segment varies on.\n // Read the vary params thenable directly from the seed data. By the time\n // collectSegmentData runs, the thenable should be fulfilled. If it's not\n // fulfilled or null, treat as unknown (null means we can't share cache\n // entries across param values).\n const varyParamsThenable = seedData !== null ? seedData[4] : null\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n if (!prefetchInlining) {\n // When prefetch inlining is disabled, spawn individual segment tasks.\n // When enabled, segment data is bundled into the /_inlined response\n // instead, so we skip per-segment tasks here.\n if (seedData !== null) {\n // Spawn a task to write the segment data to a new Flight stream.\n segmentTasks.push(\n // Since we're already in the middle of a render, wait until after the\n // current task to escape the current rendering context.\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n seedData[0],\n requestKey,\n varyParams,\n clientModules\n )\n )\n )\n } else {\n // This segment does not have any seed data. Skip generating a prefetch\n // response for it. We'll still include it in the route tree, though.\n // TODO: We should encode in the route tree whether a segment is missing\n // so we don't attempt to fetch it for no reason. As of now this shouldn't\n // ever happen in practice, though.\n }\n }\n\n const segment = route[0]\n let name: string\n let param: TreePrefetchParam | null\n if (typeof segment === 'string') {\n name = segment\n param = null\n } else {\n name = segment[0]\n param = {\n type: segment[2],\n // This value is omitted from the prefetch response when cacheComponents\n // is enabled.\n key: isClientParamParsingEnabled ? null : segment[1],\n siblings: segment[3],\n }\n }\n\n // Metadata about the segment. Sent to the client as part of the\n // tree prefetch.\n return {\n name,\n param,\n prefetchHints,\n slots: slotMetadata,\n }\n}\n\nasync function renderSegmentPrefetch(\n buildId: string | undefined,\n staleTime: number,\n rsc: React.ReactNode,\n requestKey: SegmentRequestKey,\n varyParams: Set<string> | null,\n clientModules: ManifestNode\n): Promise<[SegmentRequestKey, Buffer]> {\n // Render the segment data to a stream.\n const segmentPrefetch: SegmentPrefetch = {\n rsc,\n isPartial: await isPartialRSCData(rsc, clientModules),\n staleTime,\n varyParams,\n }\n // Wrap in a SegmentPrefetchResponse with a top-level buildId.\n // For non-bundled responses, the data array has a single element.\n const response: SegmentPrefetchResponse = {\n buildId: buildId ?? '',\n data: [segmentPrefetch],\n }\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // it takes longer than a microtask, it must because of hanging promises\n // caused by dynamic data. Abort the stream at the end of the current task.\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => abortController.abort())\n const { prelude: segmentStream } = await prerender(response, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n })\n const segmentBuffer = await streamToBuffer(segmentStream)\n if (requestKey === ROOT_SEGMENT_REQUEST_KEY) {\n return ['/_index' as SegmentRequestKey, segmentBuffer]\n } else {\n return [requestKey, segmentBuffer]\n }\n}\n\nasync function renderInlinedPrefetchResponse(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n head: HeadData,\n headVaryParams: Set<string> | null,\n clientModules: ManifestNode\n): Promise<[SegmentRequestKey, Buffer]> {\n // Build the inlined tree by walking the route and collecting all segments.\n const inlinedTree = await buildInlinedSegmentPrefetch(\n route,\n buildId,\n staleTime,\n seedData,\n clientModules\n )\n\n // Build the head segment.\n const headPrefetch: SegmentPrefetch = {\n rsc: head,\n isPartial: await isPartialRSCData(head, clientModules),\n staleTime,\n varyParams: headVaryParams,\n }\n\n const response: InlinedPrefetchResponse = {\n buildId: buildId ?? '',\n tree: inlinedTree,\n head: headPrefetch,\n }\n\n // Render as a single Flight response.\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => abortController.abort())\n const { prelude } = await prerender(response, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n })\n const buffer = await streamToBuffer(prelude)\n return [('/' + PAGE_SEGMENT_KEY) as SegmentRequestKey, buffer]\n}\n\nasync function buildInlinedSegmentPrefetch(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode\n): Promise<InlinedSegmentPrefetch> {\n let slots: {\n [parallelRouteKey: string]: InlinedSegmentPrefetch\n } | null = null\n\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n for (const parallelRouteKey in children) {\n const childRoute = children[parallelRouteKey]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n const childPrefetch = await buildInlinedSegmentPrefetch(\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules\n )\n if (slots === null) {\n slots = {}\n }\n slots[parallelRouteKey] = childPrefetch\n }\n\n const rsc = seedData !== null ? seedData[0] : null\n const varyParamsThenable = seedData !== null ? seedData[4] : null\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n const segment: SegmentPrefetch = {\n rsc,\n isPartial: rsc !== null ? await isPartialRSCData(rsc, clientModules) : true,\n staleTime,\n varyParams,\n }\n return { segment, slots }\n}\n\nasync function isPartialRSCData(\n rsc: React.ReactNode,\n clientModules: ManifestNode\n): Promise<boolean> {\n // We can determine if a segment contains only partial data if it takes longer\n // than a task to encode, because dynamic data is encoded as an infinite\n // promise. We must do this in a separate Flight prerender from the one that\n // actually generates the prefetch stream because we need to include\n // `isPartial` in the stream itself.\n let isPartial = false\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => {\n // If we haven't yet finished the outer task, then it must be because we\n // accessed dynamic data.\n isPartial = true\n abortController.abort()\n })\n await prerender(rsc, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError() {},\n })\n return isPartial\n}\n\nfunction createUnclosingPrefetchStream(\n originalFlightStream: ReadableStream<Uint8Array>\n): ReadableStream<Uint8Array> {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\n const reader = originalFlightStream.getReader()\n return new ReadableStream({\n async pull(controller) {\n while (true) {\n const { done, value } = await reader.read()\n if (!done) {\n // Pass to the target stream and keep consuming the Flight response\n // from the server.\n controller.enqueue(value)\n continue\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream.\n return\n }\n },\n })\n}\n"],"names":["PrefetchHint","StaticPrefetchDisabled","readVaryParams","PAGE_SEGMENT_KEY","createFromReadableStream","prerender","streamFromBuffer","streamToBuffer","waitAtLeastOneReactRenderTask","createSegmentRequestKeyPart","appendSegmentRequestKeyPart","ROOT_SEGMENT_REQUEST_KEY","HEAD_REQUEST_KEY","getDigestForWellKnownError","Phase","printDebugThrownValueForProspectiveRender","workAsyncStorage","filterStackFrame","process","env","NODE_ENV","require","filterStackFrameDEV","undefined","findSourceMapURL","findSourceMapURLDEV","onSegmentPrerenderError","error","digest","NEXT_DEBUG_BUILD","__NEXT_VERBOSE_LOGGING","workStore","getStore","route","SegmentCollection","extractFlightData","initialRSCPayload","flightDataPaths","f","length","console","buildId","b","flightRouterState","seedData","head","collectSegmentData","isCacheComponentsEnabled","fullPageDataBuffer","staleTime","clientModules","serverConsumerManifest","prefetchInlining","hints","resultMap","Map","abortController","AbortController","onCompletedProcessingRouteTree","abort","segmentTasks","prelude","treeStream","PrefetchTreeData","isClientParamParsingEnabled","signal","onError","treeBuffer","set","segmentPath","buffer","Promise","all","collectPrefetchHints","maxSize","maxBundleSize","createUnclosingPrefetchStream","flightData","slots","headVaryParamsThenable","h","headVaryParams","headBuffer","renderSegmentPrefetch","headGzipSize","getGzipSize","rootHints","subtreeHasRuntimePrefetch","SubtreeHasRuntimePrefetch","headInlineState","inlined","node","collectPrefetchHintsImpl","HeadOutlined","requestKey","parentGzipSize","routeHasRuntimePrefetch","isStaticPrefetchDisabled","currentGzipSize","varyParamsThenable","varyParams","sizeToInline","children","seedDataChildren","didInlineIntoChild","acceptingChildInlinedBytes","smallestChildInlinedBytes","Infinity","hasChildren","parallelRouteKey","childRoute","childSegment","childSeedData","childRequestKey","sizeToOfferChild","childResult","ParentInlinedIntoSelf","inlinedBytes","InlinedIntoChild","hasRuntimePrefetch","HasRuntimePrefetch","isBundleTerminal","segment","isPageSegment","HeadInlinedIntoSelf","canAcceptParent","stream","Blob","Uint8Array","pipeThrough","CompressionStream","compressedBlob","Response","blob","size","tree","collectSegmentDataImpl","push","then","renderInlinedPrefetchResponse","treePrefetch","hintTree","slotMetadata","childHintTree","childTree","prefetchHints","InliningHintsStale","name","param","type","key","siblings","rsc","segmentPrefetch","isPartial","isPartialRSCData","response","data","segmentStream","segmentBuffer","inlinedTree","buildInlinedSegmentPrefetch","headPrefetch","childPrefetch","originalFlightStream","reader","getReader","ReadableStream","pull","controller","done","value","read","enqueue"],"mappings":"AAAA,6GAA6G;AAS7G,SACEA,YAAY,EACZC,sBAAsB,QACjB,oCAAmC;AAC1C,SAASC,cAAc,QAAQ,sDAAqD;AACpF,SAASC,gBAAgB,QAAQ,2BAA0B;AAG3D,6DAA6D;AAC7D,SAASC,wBAAwB,QAAQ,kCAAiC;AAC1E,6DAA6D;AAC7D,SAASC,SAAS,QAAQ,kCAAiC;AAE3D,SACEC,gBAAgB,EAChBC,cAAc,QACT,0CAAyC;AAChD,SAASC,6BAA6B,QAAQ,sBAAqB;AACnE,SAEEC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,wBAAwB,EACxBC,gBAAgB,QACX,wDAAuD;AAC9D,SAASC,0BAA0B,QAAQ,yBAAwB;AACnE,SACEC,KAAK,EACLC,yCAAyC,QACpC,6BAA4B;AACnC,SAASC,gBAAgB,QAAQ,gCAA+B;AAyFhE,MAAMC,mBACJC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eACrB,AAACC,QAAQ,sBACNC,mBAAmB,GACtBC;AACN,MAAMC,mBACJN,QAAQC,GAAG,CAACC,QAAQ,KAAK,eACrB,AAACC,QAAQ,sBACNI,mBAAmB,GACtBF;AAEN,SAASG,wBAAwBC,KAAc;IAC7C,MAAMC,SAASf,2BAA2Bc;IAC1C,IAAIC,QAAQ;QACV,OAAOA;IACT;IACA,0EAA0E;IAC1E,iEAAiE;IACjE,IAAIV,QAAQC,GAAG,CAACU,gBAAgB,IAAIX,QAAQC,GAAG,CAACW,sBAAsB,EAAE;QACtE,MAAMC,YAAYf,iBAAiBgB,QAAQ;QAC3CjB,0CACEY,OACAI,CAAAA,6BAAAA,UAAWE,KAAK,KAAI,iBACpBnB,MAAMoB,iBAAiB;IAE3B;AACF;AAEA;;;;CAIC,GACD,SAASC,kBAAkBC,i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ChB,MAAMlG,kBAAkB,IAAIC;IAC5BjD,gCAAgCkI,IAAI,CAAC;QACnC,wEAAwE;QACxE,yBAAyB;QACzBgB,YAAY;QACZlG,gBAAgBG,KAAK;IACvB;IACA,MAAMtD,UAAUmJ,KAAKtG,eAAe;QAClCjC;QACAgD,QAAQT,gBAAgBS,MAAM;QAC9BC,YAAW;IACb;IACA,OAAOwF;AACT;AAEA,SAAS9E,8BACPwF,oBAAgD;IAEhD,0EAA0E;IAC1E,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,2CAA2C;IAC3C,EAAE;IACF,2EAA2E;IAC3E,0EAA0E;IAC1E,8EAA8E;IAC9E,+BAA+B;IAC/B,MAAMC,SAASD,qBAAqBE,SAAS;IAC7C,OAAO,IAAIC,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,MAAO,KAAM;gBACX,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAG,MAAMN,OAAOO,IAAI;gBACzC,IAAI,CAACF,MAAM;oBACT,mEAAmE;oBACnE,mBAAmB;oBACnBD,WAAWI,OAAO,CAACF;oBACnB;gBACF;gBACA,qEAAqE;gBACrE,qBAAqB;gBACrB;YACF;QACF;IACF;AACF","ignoreList":[0]}
{"version":3,"sources":["../../../../src/server/app-render/collect-segment-data.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */\nimport type {\n CacheNodeSeedData,\n FlightRouterState,\n InitialRSCPayload,\n DynamicParamTypesShort,\n HeadData,\n PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n StaticPrefetchDisabled,\n} from '../../shared/lib/app-router-types'\nimport { readVaryParams } from '../../shared/lib/segment-cache/vary-params-decoding'\nimport type { ManifestNode } from '../../build/webpack/plugins/flight-manifest-plugin'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream } from 'react-server-dom-webpack/client'\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { prerender } from 'react-server-dom-webpack/static'\n\nimport {\n streamFromBuffer,\n streamToBuffer,\n} from '../stream-utils/node-web-streams-helper'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport {\n type SegmentRequestKey,\n createSegmentRequestKeyPart,\n appendSegmentRequestKeyPart,\n ROOT_SEGMENT_REQUEST_KEY,\n HEAD_REQUEST_KEY,\n} from '../../shared/lib/segment-cache/segment-value-encoding'\nimport { getDigestForWellKnownError } from './create-error-handler'\nimport {\n Phase,\n printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\n// Contains metadata about the route tree. The client must fetch this before\n// it can fetch any actual segment data.\nexport type RootTreePrefetch = {\n buildId?: string\n tree: TreePrefetch\n staleTime: number\n}\n\nexport type TreePrefetchParam = {\n type: DynamicParamTypesShort\n // When cacheComponents is enabled, this field is always null.\n // Instead we parse the param on the client, allowing us to omit it from\n // the prefetch response and increase its cacheability.\n key: string | null\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then siblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n siblings: readonly string[] | null\n}\n\nexport type TreePrefetch = {\n name: string\n // Only present for parameterized (dynamic) segments.\n param: TreePrefetchParam | null\n\n // Child segments.\n slots: null | {\n [parallelRouteKey: string]: TreePrefetch\n }\n\n /** Bitmask of PrefetchHint flags for this segment and its subtree */\n prefetchHints: number\n}\n\n/**\n * Top-level response for a segment prefetch request. Contains the build ID\n * and an array of segment data (one per segment in the bundle).\n *\n * Ordering contract: data[0] is the requested (terminal) segment. Subsequent\n * elements are ancestors that were inlined into this response, built by\n * walking the SegmentBundleNode linked list. The client's SegmentBundle\n * linked list is constructed in the same order during scheduling, so the\n * two are walked in parallel when the response arrives. A null element\n * indicates a disabled segment (runtime prefetch or instant=false) that\n * occupies a slot but carries no data.\n */\nexport type SegmentPrefetchResponse = {\n buildId: string\n data: Array<SegmentPrefetch | null>\n}\n\nexport type SegmentPrefetch = {\n rsc: React.ReactNode | null\n isPartial: boolean\n staleTime: number\n /**\n * The set of params that this segment's output depends on. Used by the client\n * cache to determine which entries can be reused across different param\n * values.\n * - `null` means vary params were not tracked (conservative: assume all\n * params matter)\n * - Empty set means no params were accessed (segment is reusable for any\n * param values)\n */\n varyParams: Set<string> | null\n}\n\n/**\n * Server-side equivalent of the client's SegmentBundle linked list. Each\n * node holds the RSC data and vary params for a segment whose data will\n * be bundled into a descendant's response. Flattened to an array only at\n * serialization time in renderSegmentPrefetch.\n */\ntype SegmentBundleNode = {\n rsc: React.ReactNode\n varyParams: Set<string> | null\n next: SegmentBundleNode | null\n}\n\nconst filterStackFrame =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .filterStackFrameDEV\n : undefined\nconst findSourceMapURL =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .findSourceMapURLDEV\n : undefined\n\nfunction onSegmentPrerenderError(error: unknown) {\n const digest = getDigestForWellKnownError(error)\n if (digest) {\n return digest\n }\n // We don't need to log the errors because we would have already done that\n // when generating the original Flight stream for the whole page.\n if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n const workStore = workAsyncStorage.getStore()\n printDebugThrownValueForProspectiveRender(\n error,\n workStore?.route ?? 'unknown route',\n Phase.SegmentCollection\n )\n }\n}\n\n/**\n * Extract the FlightRouterState, seed data, and head from a prerendered\n * InitialRSCPayload. Returns null if the payload doesn't match the expected\n * shape (single path with 3 elements).\n */\nfunction extractFlightData(initialRSCPayload: InitialRSCPayload): {\n buildId: string | undefined\n flightRouterState: FlightRouterState\n seedData: CacheNodeSeedData\n head: HeadData\n} | null {\n const flightDataPaths = initialRSCPayload.f\n // FlightDataPath is an unsound type, hence the additional checks.\n if (flightDataPaths.length !== 1 && flightDataPaths[0].length !== 3) {\n console.error(\n 'Internal Next.js error: InitialRSCPayload does not match the expected ' +\n 'shape for a prerendered page during segment prefetch generation.'\n )\n return null\n }\n return {\n buildId: initialRSCPayload.b,\n flightRouterState: flightDataPaths[0][0],\n seedData: flightDataPaths[0][1],\n head: flightDataPaths[0][2],\n }\n}\n\nexport async function collectSegmentData(\n isCacheComponentsEnabled: boolean,\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n prefetchInlining: boolean,\n hints: PrefetchHints | null\n): Promise<Map<SegmentRequestKey, Buffer>> {\n // Traverse the router tree and generate a prefetch response for each segment.\n\n // A mutable map to collect the results as we traverse the route tree.\n const resultMap = new Map<SegmentRequestKey, Buffer>()\n\n // Before we start, warm up the module cache by decoding the page data once.\n // Then we can assume that any remaining async tasks that occur the next time\n // are due to hanging promises caused by dynamic data access. Note we only\n // have to do this once per page, not per individual segment.\n //\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Create an abort controller that we'll use to stop the stream.\n const abortController = new AbortController()\n const onCompletedProcessingRouteTree = async () => {\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // serializing the stream takes longer than a microtask, it must because of\n // hanging promises caused by dynamic data.\n await waitAtLeastOneReactRenderTask()\n abortController.abort()\n }\n\n // Generate a stream for the route tree prefetch. While we're walking the\n // tree, we'll also spawn additional tasks to generate the segment prefetches.\n // The promises for these tasks are pushed to a mutable array that we will\n // await once the route tree is fully rendered.\n const segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>> = []\n const { prelude: treeStream } = await prerender(\n // RootTreePrefetch is not a valid return type for a React component, but\n // we need to use a component so that when we decode the original stream\n // inside of it, the side effects are transferred to the new stream.\n // @ts-expect-error\n <PrefetchTreeData\n isClientParamParsingEnabled={isCacheComponentsEnabled}\n fullPageDataBuffer={fullPageDataBuffer}\n serverConsumerManifest={serverConsumerManifest}\n clientModules={clientModules}\n staleTime={staleTime}\n segmentTasks={segmentTasks}\n onCompletedProcessingRouteTree={onCompletedProcessingRouteTree}\n prefetchInlining={prefetchInlining}\n hints={hints}\n />,\n clientModules,\n {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n }\n )\n\n // Write the route tree to a special `/_tree` segment.\n const treeBuffer = await streamToBuffer(treeStream)\n resultMap.set('/_tree' as SegmentRequestKey, treeBuffer)\n\n // Also output the entire full page data response\n resultMap.set('/_full' as SegmentRequestKey, fullPageDataBuffer)\n\n // Now that we've finished rendering the route tree, all the segment tasks\n // should have been spawned. Await them in parallel and write the segment\n // prefetches to the result map.\n let hasPageSegment = false\n for (const [segmentPath, buffer] of await Promise.all(segmentTasks)) {\n resultMap.set(segmentPath, buffer)\n if (segmentPath.endsWith('__PAGE__')) {\n hasPageSegment = true\n }\n }\n\n if (!hasPageSegment) {\n // The build requires at least one segment path ending with __PAGE__ to\n // register the catch-all segment data route. When all page segments are\n // disabled (e.g. every leaf has runtime prefetching), no __PAGE__ entry\n // is emitted. Write a dummy entry with a path that doesn't match any\n // real route segment so the client will never request it.\n //\n // TODO: Remove the __PAGE__ requirement from the build instead of\n // working around it here. The invariant is outdated now that segments\n // can be disabled.\n resultMap.set(\n '/todo-remove-fake-segment/__PAGE__' as SegmentRequestKey,\n Buffer.alloc(0)\n )\n }\n\n return resultMap\n}\n\n/**\n * Compute prefetch hints for a route by measuring segment sizes and deciding\n * which segments should be inlined. Only runs at build time. The results are\n * written to prefetch-hints.json and loaded at server startup.\n *\n * This is a separate pass from collectSegmentData so that the inlining\n * decisions can be fed back into collectSegmentData to control which segments\n * are output as separate entries vs. inlined into their parent.\n */\nexport async function collectPrefetchHints(\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n maxSize: number,\n maxBundleSize: number\n): Promise<PrefetchHints> {\n // Warm up the module cache, same as collectSegmentData.\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Decode the Flight data to walk the route tree.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return { hints: 0, slots: null }\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Measure the head (metadata/viewport) gzip size so the main traversal\n // can decide whether to inline it into a page's bundle.\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n const [, headBuffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules,\n null\n )\n const headGzipSize = await getGzipSize(headBuffer)\n\n // Mutable accumulator: the first segment that accepts the head sets this\n // to true. Once set, subsequent segments skip the check.\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment (since the runtime response already\n // includes it). Static pages are skipped to avoid duplication.\n const rootHints = flightRouterState[4] ?? 0\n const subtreeHasRuntimePrefetch =\n (rootHints & PrefetchHint.SubtreeHasRuntimePrefetch) !== 0\n const headInlineState = { inlined: false }\n\n // Walk the tree with the parent-first, child-decides algorithm.\n const { node } = await collectPrefetchHintsImpl(\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n null, // root has no parent to inline\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n subtreeHasRuntimePrefetch\n )\n\n if (!headInlineState.inlined) {\n // No page could accept the head. Set HeadOutlined on the root so the\n // client knows to fetch the head separately.\n node.hints |= PrefetchHint.HeadOutlined\n }\n\n return node\n}\n\n// Measure a segment's gzip size and decide whether it should be inlined.\n//\n// These hints are computed once during build and never change for the\n// lifetime of that deployment. The client can assume that hints delivered as\n// part of one request will be the same during a subsequent request, given\n// the same build ID. There's no skew to worry about as long as the build\n// itself is consistent.\n//\n// In the Segment Cache, we split page prefetches into multiple requests so\n// that each one can be cached and deduped independently. However, some\n// segments are small enough that the potential caching benefits are not worth\n// the additional network overhead. For these, we inline a parent's data into\n// one of its children's responses, avoiding a separate request. The parent\n// is inlined into the child (not the other way around) because the parent's\n// response is more likely to be shared across multiple pages. The child's\n// response is already page-specific, so adding the parent's data there\n// doesn't meaningfully reduce deduplication. It's similar to how JS bundlers\n// decide whether to inline a module into a chunk.\n//\n// The algorithm is parent-first, child-decides: the parent measures itself\n// and passes its gzip size down. Each child decides whether to accept. A\n// child rejects if the parent exceeds maxSize or if accepting would push\n// the cumulative inlined bytes past maxBundleSize. This produces\n// both ParentInlinedIntoSelf (on the child) and InlinedIntoChild (on the\n// parent) in a single pass.\nasync function collectPrefetchHintsImpl(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n // TODO: Consider persisting the computed requestKey into the hints output\n // so it doesn't need to be recomputed during the build. This might also\n // suggest renaming prefetch-hints.json to something like\n // segment-manifest.json, since it would contain more than just hints.\n requestKey: SegmentRequestKey,\n parentGzipSize: number | null,\n maxSize: number,\n maxBundleSize: number,\n headGzipSize: number,\n headInlineState: { inlined: boolean },\n routeHasRuntimePrefetch: boolean\n): Promise<{\n node: PrefetchHints\n // Total inlined bytes accumulated along the deepest accepting path in this\n // subtree. Used by ancestors for budget checks.\n inlinedBytes: number\n}> {\n // Check if static prefetching is disabled for this segment (runtime\n // prefetch or unstable_instant = false). Such segments act as transparent\n // pass-throughs in the bundle chain: they contribute zero bytes of their\n // own and pass parent data through to children. However, they cannot be\n // the terminal of a chain — if no child accepts the parent data, the\n // parent cannot be inlined into this segment because there's no static\n // response to carry it. See the ParentInlinedIntoSelf check below.\n const isStaticPrefetchDisabled =\n ((route[4] ?? 0) & StaticPrefetchDisabled) !== 0\n\n // Render current segment and measure its gzip size. Skip measurement for\n // segments with static prefetching disabled since they contribute nothing.\n let currentGzipSize: number | null = null\n if (!isStaticPrefetchDisabled && seedData !== null) {\n const varyParamsThenable = seedData[4]\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n const [, buffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n seedData[0],\n requestKey,\n varyParams,\n clientModules,\n null\n )\n currentGzipSize = await getGzipSize(buffer)\n }\n\n // Only offer this segment to its children for inlining if its gzip size\n // is below maxSize. Segments with static prefetching disabled have\n // nothing to offer (their slot in the bundle is null).\n const sizeToInline =\n currentGzipSize !== null && currentGzipSize < maxSize\n ? currentGzipSize\n : null\n\n // Process children serially (not in parallel) to ensure deterministic\n // results. Since this only runs at build time and the rendering is just\n // re-encoding cached prerenders, this won't impact build times. Each child\n // receives our gzip size and decides whether to inline us. Once a child\n // accepts, we stop offering to remaining siblings — the parent is only\n // inlined into one child. In parallel routes, this avoids duplicating the\n // parent's data across multiple sibling responses.\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n\n let slots: Record<string, PrefetchHints> | null = null\n let didInlineIntoChild = false\n let acceptingChildInlinedBytes = 0\n // Track the smallest inlinedBytes across all children so we know how much\n // budget remains along the best path. When our own parent asks whether we\n // can accept its data, the parent's bytes would flow through to the child\n // with the most remaining headroom.\n let smallestChildInlinedBytes = Infinity\n let hasChildren = false\n\n for (const parallelRouteKey in children) {\n hasChildren = true\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n\n // Determine what size to offer children for inlining. Normally we offer\n // our own size. But if static prefetching is disabled for this segment,\n // it has no data of its own — instead it passes the parent's offer\n // through to children. This allows a static grandparent to inline\n // through a disabled intermediate segment into a static grandchild.\n const sizeToOfferChild = isStaticPrefetchDisabled\n ? parentGzipSize\n : sizeToInline\n\n const childResult = await collectPrefetchHintsImpl(\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n // Once a child has accepted us, stop offering to remaining siblings.\n didInlineIntoChild ? null : sizeToOfferChild,\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n routeHasRuntimePrefetch\n )\n\n if (slots === null) {\n slots = {}\n }\n slots[parallelRouteKey] = childResult.node\n\n if (childResult.node.hints & PrefetchHint.ParentInlinedIntoSelf) {\n // This child accepted our data — it will include our segment's\n // response in its own. No need to track headroom anymore since\n // we already know which child we're inlined into.\n didInlineIntoChild = true\n acceptingChildInlinedBytes = childResult.inlinedBytes\n } else if (!didInlineIntoChild) {\n // Track the child with the most remaining headroom. Used below\n // when deciding whether to accept our own parent's data.\n if (childResult.inlinedBytes < smallestChildInlinedBytes) {\n smallestChildInlinedBytes = childResult.inlinedBytes\n }\n }\n }\n\n // Leaf segment: no children have consumed any budget yet.\n if (!hasChildren) {\n smallestChildInlinedBytes = 0\n }\n\n // Mark this segment as InlinedIntoChild if one of its children accepted.\n // This means this segment doesn't need its own prefetch response — its\n // data is included in the accepting child's response instead.\n let hints = 0\n if (didInlineIntoChild) {\n hints |= PrefetchHint.InlinedIntoChild\n }\n\n // inlinedBytes represents the total gzipped bytes of parent data inlined\n // into the deepest \"inlining target\" along this branch. It starts at 0 at\n // the leaves and grows as parents are inlined going back up the tree. If a\n // child accepted us, our size is already counted in that child's value.\n let inlinedBytes = didInlineIntoChild\n ? acceptingChildInlinedBytes\n : smallestChildInlinedBytes\n\n // Determine which segment is responsible for the head (metadata/viewport).\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment — the runtime response already includes\n // the head, so assigning it to a static page would duplicate it.\n //\n // When the route has no runtime prefetch segments, the head is assigned\n // to the first static page terminal that has budget room. Head can only\n // be inlined into a page, not a layout, because pages may access\n // additional params (e.g. searchParams) that layouts cannot.\n //\n // A disabled segment with PrefetchDisabled (instant = false) is never a\n // valid target — it has no response at all.\n const hasRuntimePrefetch =\n ((route[4] ?? 0) & PrefetchHint.HasRuntimePrefetch) !== 0\n const isBundleTerminal = !didInlineIntoChild && !isStaticPrefetchDisabled\n const segment = route[0]\n const isPageSegment =\n typeof segment === 'string'\n ? segment === PAGE_SEGMENT_KEY\n : segment[0] === PAGE_SEGMENT_KEY\n if (!headInlineState.inlined) {\n if (hasRuntimePrefetch) {\n // Runtime prefetch segment — the runtime response includes the head.\n // No budget cost since it's already part of that response.\n hints |= PrefetchHint.HeadInlinedIntoSelf\n headInlineState.inlined = true\n } else if (isBundleTerminal && isPageSegment && !routeHasRuntimePrefetch) {\n // Static page terminal — only used when no runtime segments exist.\n // The head counts against the bundle budget.\n if (inlinedBytes + headGzipSize < maxBundleSize) {\n hints |= PrefetchHint.HeadInlinedIntoSelf\n inlinedBytes += headGzipSize\n headInlineState.inlined = true\n }\n }\n }\n\n // Decide whether to accept our own parent's data. Conditions:\n //\n // 1. The parent offered us a size (parentGzipSize is not null). It's null\n // when the parent is too large to inline or when this is the root.\n //\n // 2. The total inlined bytes along this branch wouldn't exceed the budget.\n // Even if each segment is individually small, at some point it no\n // longer makes sense to keep adding bytes because the combined response\n // is unique per URL and can't be deduped.\n //\n // 3. If this segment has static prefetching disabled, it can only accept\n // the parent if it has successfully inlined into a child. A disabled\n // segment is a transparent pass-through — it passes parent data through\n // to descendants. But if no descendant accepted, there's no static\n // response to carry the parent's data, so the parent must remain\n // outlined.\n //\n // A node can be both InlinedIntoChild and ParentInlinedIntoSelf. This\n // happens in multi-level chains: GP → P → C where all are small. C\n // accepts P (P is InlinedIntoChild), then P also accepts GP (P is\n // ParentInlinedIntoSelf). The result: C's response includes both P's\n // and GP's data. The parent's data flows through to the deepest\n // accepting descendant.\n if (parentGzipSize !== null) {\n // A disabled segment can only pass through — it needs a child to\n // ultimately accept the parent's data.\n const canAcceptParent = !isStaticPrefetchDisabled || didInlineIntoChild\n if (canAcceptParent && inlinedBytes + parentGzipSize < maxBundleSize) {\n hints |= PrefetchHint.ParentInlinedIntoSelf\n inlinedBytes += parentGzipSize\n }\n }\n\n return {\n node: { hints, slots },\n inlinedBytes,\n }\n}\n\n// We use gzip size rather than raw size because it better reflects the actual\n// transfer cost. The inlining trade-off is about whether the overhead of an\n// additional HTTP request (connection setup, headers, round trip) is worth\n// the deduplication benefit of keeping a segment separate. Below some\n// compressed size, the request overhead dominates and inlining is better.\n// Above it, the deduplication benefit of a cacheable standalone response\n// wins out.\nasync function getGzipSize(buffer: Buffer): Promise<number> {\n const stream = new Blob([new Uint8Array(buffer)])\n .stream()\n .pipeThrough(new CompressionStream('gzip'))\n const compressedBlob = await new Response(stream).blob()\n return compressedBlob.size\n}\n\nasync function PrefetchTreeData({\n isClientParamParsingEnabled,\n fullPageDataBuffer,\n serverConsumerManifest,\n clientModules,\n staleTime,\n segmentTasks,\n onCompletedProcessingRouteTree,\n prefetchInlining,\n hints,\n}: {\n isClientParamParsingEnabled: boolean\n fullPageDataBuffer: Buffer\n serverConsumerManifest: any\n clientModules: ManifestNode\n staleTime: number\n segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>>\n onCompletedProcessingRouteTree: () => void\n prefetchInlining: boolean\n hints: PrefetchHints | null\n}): Promise<RootTreePrefetch | null> {\n // We're currently rendering a Flight response for the route tree prefetch.\n // Inside this component, decode the Flight stream for the whole page. This is\n // a hack to transfer the side effects from the original Flight stream (e.g.\n // Float preloads) onto the Flight stream for the tree prefetch.\n // TODO: React needs a better way to do this. Needed for Server Actions, too.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return null\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Extract the head vary params from the decoded response.\n // The head vary params thenable should be fulfilled by now; if not, treat\n // as unknown (null).\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n // Only applies when prefetch inlining is enabled — the client doesn't\n // know to look for the head inside a page's response otherwise.\n const headIsInlined =\n prefetchInlining &&\n hints !== null &&\n !(hints.hints & PrefetchHint.HeadOutlined)\n\n // Compute the route metadata tree by traversing the FlightRouterState. As we\n // walk the tree, we will also spawn a task to produce a prefetch response for\n // each segment. When prefetch inlining is enabled, small segments are bundled\n // into their children's responses based on the hint bits.\n const headBundle: SegmentBundleNode | null = headIsInlined\n ? { rsc: head, varyParams: headVaryParams, next: null }\n : null\n const tree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n segmentTasks,\n prefetchInlining,\n hints,\n null,\n headBundle\n )\n\n // Spawn a task to produce a prefetch response for the \"head\" segment,\n // unless it was inlined into a page's bundle.\n if (!headIsInlined) {\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules,\n null\n )\n )\n )\n }\n\n // Notify the abort controller that we're done processing the route tree.\n // Anything async that happens after this point must be due to hanging\n // promises in the original stream.\n onCompletedProcessingRouteTree()\n\n // Render the route tree to a special `/_tree` segment.\n const treePrefetch: RootTreePrefetch = {\n tree,\n staleTime,\n }\n if (buildId) {\n treePrefetch.buildId = buildId\n }\n return treePrefetch\n}\n\nfunction collectSegmentDataImpl(\n isClientParamParsingEnabled: boolean,\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n requestKey: SegmentRequestKey,\n segmentTasks: Array<Promise<[string, Buffer]>>,\n prefetchInlining: boolean,\n hintTree: PrefetchHints | null,\n parentBundle: SegmentBundleNode | null,\n headBundle: SegmentBundleNode | null\n): TreePrefetch {\n // Union the hints already embedded in the FlightRouterState with the\n // separately-computed build-time hints. During the initial build, the\n // FlightRouterState was produced before collectPrefetchHints ran, so\n // inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in\n // route[4] yet. On subsequent renders the hints are already in the\n // FlightRouterState, so the union is idempotent.\n //\n // Always strip InliningHintsStale from the result. That bit is only\n // relevant for the initial RSC payload baked into HTML — the /_tree\n // response produced here always has correct hints, so the client should\n // never see InliningHintsStale in a /_tree response.\n const prefetchHints =\n ((route[4] ?? 0) | (hintTree !== null ? hintTree.hints : 0)) &\n ~PrefetchHint.InliningHintsStale\n\n // Determine which params this segment varies on.\n const varyParamsThenable = seedData !== null ? seedData[4] : null\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n // If static prefetching is disabled for this segment (runtime prefetch or\n // instant = false), it still participates in the bundle chain but with\n // null data. The client will skip creating a cache entry for it.\n const staticPrefetchDisabled = (prefetchHints & StaticPrefetchDisabled) !== 0\n const rsc = seedData !== null && !staticPrefetchDisabled ? seedData[0] : null\n\n // Determine whether this segment's data should be accumulated into a\n // child's response (inlining) or spawned as its own task. When inlining\n // is disabled, the hint bits may still be set (they're computed at build\n // time regardless) but we ignore them — every segment is rendered\n // standalone because the client doesn't know how to parse bundled\n // responses.\n let childBundle: SegmentBundleNode | null = null\n if (prefetchInlining && prefetchHints & PrefetchHint.InlinedIntoChild) {\n // This segment is small enough that its data will be included in one\n // of its children's responses. Don't spawn a separate task — prepend\n // this segment's data onto the linked list so the accepting child can\n // bundle it into its response.\n if (seedData !== null) {\n childBundle = {\n rsc,\n varyParams,\n next: parentBundle,\n }\n }\n } else {\n // This segment is not inlined into a child. Spawn a task to render it.\n // If it has ParentInlinedIntoSelf, the accumulated parents are included\n // in its response. Otherwise parentBundle is null and it renders as a\n // standalone single-segment response.\n //\n // Skip spawning a task if rsc is null (disabled segment) — there's no\n // data to serve and the client won't request it.\n if (seedData !== null && rsc !== null) {\n let bundle =\n prefetchHints & PrefetchHint.ParentInlinedIntoSelf ? parentBundle : null\n // If this page accepts the head, append it at the tail of the chain.\n if (\n headBundle !== null &&\n prefetchHints & PrefetchHint.HeadInlinedIntoSelf\n ) {\n headBundle.next = bundle\n bundle = headBundle\n }\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n rsc,\n requestKey,\n varyParams,\n clientModules,\n bundle\n )\n )\n )\n }\n // childBundle stays null — reset the accumulator for children.\n }\n\n // Metadata about the segment. Sent as part of the tree prefetch. Null if\n // there are no children.\n let slotMetadata: { [parallelRouteKey: string]: TreePrefetch } | null = null\n\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n for (const parallelRouteKey in children) {\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n const childHintTree =\n hintTree !== null && hintTree.slots !== null\n ? (hintTree.slots[parallelRouteKey] ?? null)\n : null\n const childTree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n segmentTasks,\n prefetchInlining,\n childHintTree,\n childBundle,\n headBundle\n )\n if (slotMetadata === null) {\n slotMetadata = {}\n }\n slotMetadata[parallelRouteKey] = childTree\n }\n\n const segment = route[0]\n let name: string\n let param: TreePrefetchParam | null\n if (typeof segment === 'string') {\n name = segment\n param = null\n } else {\n name = segment[0]\n param = {\n type: segment[2],\n // This value is omitted from the prefetch response when cacheComponents\n // is enabled.\n key: isClientParamParsingEnabled ? null : segment[1],\n siblings: segment[3],\n }\n }\n\n // Metadata about the segment. Sent to the client as part of the\n // tree prefetch.\n return {\n name,\n param,\n prefetchHints,\n slots: slotMetadata,\n }\n}\n\nasync function renderSegmentPrefetch(\n buildId: string | undefined,\n staleTime: number,\n rsc: React.ReactNode,\n requestKey: SegmentRequestKey,\n varyParams: Set<string> | null,\n clientModules: ManifestNode,\n bundle: SegmentBundleNode | null\n): Promise<[SegmentRequestKey, Buffer]> {\n // Build the SegmentPrefetch for the terminal (requested) segment.\n // The terminal always has non-null rsc data — disabled segments are\n // skipped by the caller and don't reach this function.\n const selfPrefetch: SegmentPrefetch = {\n rsc,\n isPartial: await isPartialRSCData(rsc, clientModules),\n staleTime,\n varyParams,\n }\n\n // Build the data array. Always an array, even for a single segment.\n const data: Array<SegmentPrefetch | null> = [selfPrefetch]\n if (bundle !== null) {\n // Walk the bundle linked list and append each entry to the array.\n let node: SegmentBundleNode | null = bundle\n while (node !== null) {\n if (node.rsc !== null) {\n data.push({\n rsc: node.rsc,\n isPartial: await isPartialRSCData(node.rsc, clientModules),\n staleTime,\n varyParams: node.varyParams,\n })\n } else {\n // This segment has static prefetching disabled (runtime prefetch\n // or instant = false). Emit null as a placeholder so the array\n // indices stay aligned with the client's SegmentBundle linked\n // list. The client will skip creating a cache entry for this slot.\n data.push(null)\n }\n node = node.next\n }\n }\n\n // Wrap in the response envelope with the build ID at the top level.\n const payload: SegmentPrefetchResponse = {\n buildId: buildId ?? '',\n data,\n }\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // it takes longer than a microtask, it must because of hanging promises\n // caused by dynamic data. Abort the stream at the end of the current task.\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => abortController.abort())\n const { prelude: segmentStream } = await prerender(payload, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n })\n const segmentBuffer = await streamToBuffer(segmentStream)\n if (requestKey === ROOT_SEGMENT_REQUEST_KEY) {\n return ['/_index' as SegmentRequestKey, segmentBuffer]\n } else {\n return [requestKey, segmentBuffer]\n }\n}\n\nasync function isPartialRSCData(\n rsc: React.ReactNode,\n clientModules: ManifestNode\n): Promise<boolean> {\n // We can determine if a segment contains only partial data if it takes longer\n // than a task to encode, because dynamic data is encoded as an infinite\n // promise. We must do this in a separate Flight prerender from the one that\n // actually generates the prefetch stream because we need to include\n // `isPartial` in the stream itself.\n let isPartial = false\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => {\n // If we haven't yet finished the outer task, then it must be because we\n // accessed dynamic data.\n isPartial = true\n abortController.abort()\n })\n await prerender(rsc, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError() {},\n })\n return isPartial\n}\n\nfunction createUnclosingPrefetchStream(\n originalFlightStream: ReadableStream<Uint8Array>\n): ReadableStream<Uint8Array> {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\n const reader = originalFlightStream.getReader()\n return new ReadableStream({\n async pull(controller) {\n while (true) {\n const { done, value } = await reader.read()\n if (!done) {\n // Pass to the target stream and keep consuming the Flight response\n // from the server.\n controller.enqueue(value)\n continue\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream.\n return\n }\n },\n })\n}\n"],"names":["PrefetchHint","StaticPrefetchDisabled","readVaryParams","createFromReadableStream","prerender","streamFromBuffer","streamToBuffer","PAGE_SEGMENT_KEY","waitAtLeastOneReactRenderTask","createSegmentRequestKeyPart","appendSegmentRequestKeyPart","ROOT_SEGMENT_REQUEST_KEY","HEAD_REQUEST_KEY","getDigestForWellKnownError","Phase","printDebugThrownValueForProspectiveRender","workAsyncStorage","filterStackFrame","process","env","NODE_ENV","require","filterStackFrameDEV","undefined","findSourceMapURL","findSourceMapURLDEV","onSegmentPrerenderError","error","digest","NEXT_DEBUG_BUILD","__NEXT_VERBOSE_LOGGING","workStore","getStore","route","SegmentCollection","extractFlightData","initialRSCPayload","flightDataPaths","f","length","console","buildId","b","flightRouterState","seedData","head","collectSegmentData","isCacheComponentsEnabled","fullPageDataBuffer","staleTime","clientModules","serverConsumerManifest","prefetchInlining","hints","resultMap","Map","abortController","AbortController","onCompletedProcessingRouteTree","abort","segmentTasks","prelude","treeStream","PrefetchTreeData","isClientParamParsingEnabled","signal","onError","treeBuffer","set","hasPageSegment","segmentPath","buffer","Promise","all","endsWith","Buffer","alloc","collectPrefetchHints","maxSize","maxBundleSize","createUnclosingPrefetchStream","flightData","slots","headVaryParamsThenable","h","headVaryParams","headBuffer","renderSegmentPrefetch","headGzipSize","getGzipSize","rootHints","subtreeHasRuntimePrefetch","SubtreeHasRuntimePrefetch","headInlineState","inlined","node","collectPrefetchHintsImpl","HeadOutlined","requestKey","parentGzipSize","routeHasRuntimePrefetch","isStaticPrefetchDisabled","currentGzipSize","varyParamsThenable","varyParams","sizeToInline","children","seedDataChildren","didInlineIntoChild","acceptingChildInlinedBytes","smallestChildInlinedBytes","Infinity","hasChildren","parallelRouteKey","childRoute","childSegment","childSeedData","childRequestKey","sizeToOfferChild","childResult","ParentInlinedIntoSelf","inlinedBytes","InlinedIntoChild","hasRuntimePrefetch","HasRuntimePrefetch","isBundleTerminal","segment","isPageSegment","HeadInlinedIntoSelf","canAcceptParent","stream","Blob","Uint8Array","pipeThrough","CompressionStream","compressedBlob","Response","blob","size","headIsInlined","headBundle","rsc","next","tree","collectSegmentDataImpl","push","then","treePrefetch","hintTree","parentBundle","prefetchHints","InliningHintsStale","staticPrefetchDisabled","childBundle","bundle","slotMetadata","childHintTree","childTree","name","param","type","key","siblings","selfPrefetch","isPartial","isPartialRSCData","data","payload","segmentStream","segmentBuffer","originalFlightStream","reader","getReader","ReadableStream","pull","controller","done","value","read","enqueue"],"mappings":"AAAA,6GAA6G;AAS7G,SACEA,YAAY,EACZC,sBAAsB,QACjB,oCAAmC;AAC1C,SAASC,cAAc,QAAQ,sDAAqD;AAGpF,6DAA6D;AAC7D,SAASC,wBAAwB,QAAQ,kCAAiC;AAC1E,6DAA6D;AAC7D,SAASC,SAAS,QAAQ,kCAAiC;AAE3D,SACEC,gBAAgB,EAChBC,cAAc,QACT,0CAAyC;AAChD,SAASC,gBAAgB,QAAQ,2BAA0B;AAC3D,SAASC,6BAA6B,QAAQ,sBAAqB;AACnE,SAEEC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,wBAAwB,EACxBC,gBAAgB,QACX,wDAAuD;AAC9D,SAASC,0BAA0B,QAAQ,yBAAwB;AACnE,SACEC,KAAK,EACLC,yCAAyC,QACpC,6BAA4B;AACnC,SAASC,gBAAgB,QAAQ,gCAA+B;AAoFhE,MAAMC,mBACJC,QAAQC,GAAG,CAACC,QAAQ,KAAK,eACrB,AAACC,QAAQ,sBACNC,mBAAmB,GACtBC;AACN,MAAMC,mBACJN,QAAQC,GAAG,CAACC,QAAQ,KAAK,eACrB,AAACC,QAAQ,sBACNI,mBAAmB,GACtBF;AAEN,SAASG,wBAAwBC,KAAc;IAC7C,MAAMC,SAASf,2BAA2Bc;IAC1C,IAAIC,QAAQ;QACV,OAAOA;IACT;IACA,0EAA0E;IAC1E,iEAAiE;IACjE,IAAIV,QAAQC,GAAG,CAACU,gBAAgB,IAAIX,QAAQC,GAAG,CAACW,sBAAsB,EAAE;QACtE,MAAMC,YAAYf,iBAAiBgB,QAAQ;QAC3CjB,0CACEY,OACAI,CAAAA,6BAAAA,UAAWE,KAAK,KAAI,iBACpBnB,MAAMoB,iBAAiB;IAE3B;AACF;AAEA;;;;CAIC,GACD,SAASC,kBAAkBC,iBAAoC;IAM7D,MAAMC,kBAAkBD,kBAAkBE,CAAC;IAC3C,kEAAkE;IACl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ACAgD,QAAQT,gBAAgBS,MAAM;QAC9BC,YAAW;IACb;IACA,OAAOkG;AACT;AAEA,SAASpF,8BACP0F,oBAAgD;IAEhD,0EAA0E;IAC1E,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,2CAA2C;IAC3C,EAAE;IACF,2EAA2E;IAC3E,0EAA0E;IAC1E,8EAA8E;IAC9E,+BAA+B;IAC/B,MAAMC,SAASD,qBAAqBE,SAAS;IAC7C,OAAO,IAAIC,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,MAAO,KAAM;gBACX,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAG,MAAMN,OAAOO,IAAI;gBACzC,IAAI,CAACF,MAAM;oBACT,mEAAmE;oBACnE,mBAAmB;oBACnBD,WAAWI,OAAO,CAACF;oBACnB;gBACF;gBACA,qEAAqE;gBACrE,qBAAqB;gBACrB;YACF;QACF;IACF;AACF","ignoreList":[0]}

@@ -24,3 +24,3 @@ import { loadEnvConfig } from '@next/env';

}
Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.2.1-canary.8"}`))}${versionSuffix}`);
Log.bootstrap(`${bold(purple(`${Log.prefixes.ready} Next.js ${"16.2.1-canary.9"}`))}${versionSuffix}`);
if (appUrl) {

@@ -27,0 +27,0 @@ Log.bootstrap(`- Local: ${appUrl}`);

@@ -113,3 +113,3 @@ // Start CPU profile if it wasn't already started.

let { port } = serverOptions;
process.title = `next-server (v${"16.2.1-canary.8"})`;
process.title = `next-server (v${"16.2.1-canary.9"})`;
let handlersReady = ()=>{};

@@ -116,0 +116,0 @@ let handlersError = ()=>{};

export function isStableBuild() {
return !"16.2.1-canary.8"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
return !"16.2.1-canary.9"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
}

@@ -4,0 +4,0 @@ export class CanaryOnlyConfigError extends Error {

@@ -75,3 +75,3 @@ "use strict";

const data = await res.json();
const versionData = data.versions["16.2.1-canary.8"];
const versionData = data.versions["16.2.1-canary.9"];
return {

@@ -104,3 +104,3 @@ os: versionData.os,

lockfileParsed.dependencies[pkg] = {
version: "16.2.1-canary.8",
version: "16.2.1-canary.9",
resolved: pkgData.tarball,

@@ -113,3 +113,3 @@ integrity: pkgData.integrity,

lockfileParsed.packages[pkg] = {
version: "16.2.1-canary.8",
version: "16.2.1-canary.9",
resolved: pkgData.tarball,

@@ -116,0 +116,0 @@ integrity: pkgData.integrity,

@@ -26,2 +26,10 @@ import type { DynamicParamTypesShort, PrefetchHints } from '../../shared/lib/app-router-types';

* and an array of segment data (one per segment in the bundle).
*
* Ordering contract: data[0] is the requested (terminal) segment. Subsequent
* elements are ancestors that were inlined into this response, built by
* walking the SegmentBundleNode linked list. The client's SegmentBundle
* linked list is constructed in the same order during scheduling, so the
* two are walked in parallel when the response arrives. A null element
* indicates a disabled segment (runtime prefetch or instant=false) that
* occupies a slot but carries no data.
*/

@@ -47,25 +55,2 @@ export type SegmentPrefetchResponse = {

};
/**
* A node in the inlined prefetch tree. Wraps a SegmentPrefetch with child
* slots so all segments for a route can be bundled into a single response.
*
* This is a separate type from SegmentPrefetch because the inlined flow is
* still gated behind a feature flag. Eventually inlining will always be
* enabled, and the per-segment and inlined paths will merge.
*/
export type InlinedSegmentPrefetch = {
segment: SegmentPrefetch;
slots: null | {
[parallelRouteKey: string]: InlinedSegmentPrefetch;
};
};
/**
* The response shape for the /_inlined prefetch endpoint. Contains all segment
* data for a route bundled into a single tree structure, plus the head segment.
*/
export type InlinedPrefetchResponse = {
buildId: string;
tree: InlinedSegmentPrefetch;
head: SegmentPrefetch;
};
export declare function collectSegmentData(isCacheComponentsEnabled: boolean, fullPageDataBuffer: Buffer, staleTime: number, clientModules: ManifestNode, serverConsumerManifest: any, prefetchInlining: boolean, hints: PrefetchHints | null): Promise<Map<SegmentRequestKey, Buffer>>;

@@ -72,0 +57,0 @@ /**

@@ -26,6 +26,6 @@ /* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */ "use strict";

const _varyparamsdecoding = require("../../shared/lib/segment-cache/vary-params-decoding");
const _segment = require("../../shared/lib/segment");
const _client = require("react-server-dom-webpack/client");
const _static = require("react-server-dom-webpack/static");
const _nodewebstreamshelper = require("../stream-utils/node-web-streams-helper");
const _segment = require("../../shared/lib/segment");
const _scheduler = require("../../lib/scheduler");

@@ -125,5 +125,21 @@ const _segmentvalueencoding = require("../../shared/lib/segment-cache/segment-value-encoding");

// prefetches to the result map.
let hasPageSegment = false;
for (const [segmentPath, buffer] of (await Promise.all(segmentTasks))){
resultMap.set(segmentPath, buffer);
if (segmentPath.endsWith('__PAGE__')) {
hasPageSegment = true;
}
}
if (!hasPageSegment) {
// The build requires at least one segment path ending with __PAGE__ to
// register the catch-all segment data route. When all page segments are
// disabled (e.g. every leaf has runtime prefetching), no __PAGE__ entry
// is emitted. Write a dummy entry with a path that doesn't match any
// real route segment so the client will never request it.
//
// TODO: Remove the __PAGE__ requirement from the build instead of
// working around it here. The invariant is outdated now that segments
// can be disabled.
resultMap.set('/todo-remove-fake-segment/__PAGE__', Buffer.alloc(0));
}
return resultMap;

@@ -157,3 +173,3 @@ }

const headVaryParams = headVaryParamsThenable !== null ? (0, _varyparamsdecoding.readVaryParams)(headVaryParamsThenable) : null;
const [, headBuffer] = await renderSegmentPrefetch(buildId, staleTime, head, _segmentvalueencoding.HEAD_REQUEST_KEY, headVaryParams, clientModules);
const [, headBuffer] = await renderSegmentPrefetch(buildId, staleTime, head, _segmentvalueencoding.HEAD_REQUEST_KEY, headVaryParams, clientModules, null);
const headGzipSize = await getGzipSize(headBuffer);

@@ -224,3 +240,3 @@ // Mutable accumulator: the first segment that accepts the head sets this

const varyParams = varyParamsThenable !== null ? (0, _varyparamsdecoding.readVaryParams)(varyParamsThenable) : null;
const [, buffer] = await renderSegmentPrefetch(buildId, staleTime, seedData[0], requestKey, varyParams, clientModules);
const [, buffer] = await renderSegmentPrefetch(buildId, staleTime, seedData[0], requestKey, varyParams, clientModules, null);
currentGzipSize = await getGzipSize(buffer);

@@ -405,18 +421,19 @@ }

const headVaryParams = headVaryParamsThenable !== null ? (0, _varyparamsdecoding.readVaryParams)(headVaryParamsThenable) : null;
// Only applies when prefetch inlining is enabled — the client doesn't
// know to look for the head inside a page's response otherwise.
const headIsInlined = prefetchInlining && hints !== null && !(hints.hints & _approutertypes.PrefetchHint.HeadOutlined);
// Compute the route metadata tree by traversing the FlightRouterState. As we
// walk the tree, we will also spawn a task to produce a prefetch response for
// each segment (unless prefetch inlining is enabled, in which case all
// segments are bundled into a single /_inlined response).
const tree = collectSegmentDataImpl(isClientParamParsingEnabled, flightRouterState, buildId, staleTime, seedData, clientModules, _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY, segmentTasks, prefetchInlining, hints);
if (prefetchInlining) {
// When prefetch inlining is enabled, bundle all segment data into a single
// /_inlined response instead of individual per-segment responses. The head
// is also included in the inlined response.
segmentTasks.push((0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>renderInlinedPrefetchResponse(flightRouterState, buildId, staleTime, seedData, head, headVaryParams, clientModules)));
} else {
// Also spawn a task to produce a prefetch response for the "head" segment.
// The head contains metadata, like the title; it's not really a route
// segment, but it contains RSC data, so it's treated like a segment by
// the client cache.
segmentTasks.push((0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>renderSegmentPrefetch(buildId, staleTime, head, _segmentvalueencoding.HEAD_REQUEST_KEY, headVaryParams, clientModules)));
// each segment. When prefetch inlining is enabled, small segments are bundled
// into their children's responses based on the hint bits.
const headBundle = headIsInlined ? {
rsc: head,
varyParams: headVaryParams,
next: null
} : null;
const tree = collectSegmentDataImpl(isClientParamParsingEnabled, flightRouterState, buildId, staleTime, seedData, clientModules, _segmentvalueencoding.ROOT_SEGMENT_REQUEST_KEY, segmentTasks, prefetchInlining, hints, null, headBundle);
// Spawn a task to produce a prefetch response for the "head" segment,
// unless it was inlined into a page's bundle.
if (!headIsInlined) {
segmentTasks.push((0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>renderSegmentPrefetch(buildId, staleTime, head, _segmentvalueencoding.HEAD_REQUEST_KEY, headVaryParams, clientModules, null)));
}

@@ -437,3 +454,61 @@ // Notify the abort controller that we're done processing the route tree.

}
function collectSegmentDataImpl(isClientParamParsingEnabled, route, buildId, staleTime, seedData, clientModules, requestKey, segmentTasks, prefetchInlining, hintTree) {
function collectSegmentDataImpl(isClientParamParsingEnabled, route, buildId, staleTime, seedData, clientModules, requestKey, segmentTasks, prefetchInlining, hintTree, parentBundle, headBundle) {
// Union the hints already embedded in the FlightRouterState with the
// separately-computed build-time hints. During the initial build, the
// FlightRouterState was produced before collectPrefetchHints ran, so
// inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in
// route[4] yet. On subsequent renders the hints are already in the
// FlightRouterState, so the union is idempotent.
//
// Always strip InliningHintsStale from the result. That bit is only
// relevant for the initial RSC payload baked into HTML — the /_tree
// response produced here always has correct hints, so the client should
// never see InliningHintsStale in a /_tree response.
const prefetchHints = ((route[4] ?? 0) | (hintTree !== null ? hintTree.hints : 0)) & ~_approutertypes.PrefetchHint.InliningHintsStale;
// Determine which params this segment varies on.
const varyParamsThenable = seedData !== null ? seedData[4] : null;
const varyParams = varyParamsThenable !== null ? (0, _varyparamsdecoding.readVaryParams)(varyParamsThenable) : null;
// If static prefetching is disabled for this segment (runtime prefetch or
// instant = false), it still participates in the bundle chain but with
// null data. The client will skip creating a cache entry for it.
const staticPrefetchDisabled = (prefetchHints & _approutertypes.StaticPrefetchDisabled) !== 0;
const rsc = seedData !== null && !staticPrefetchDisabled ? seedData[0] : null;
// Determine whether this segment's data should be accumulated into a
// child's response (inlining) or spawned as its own task. When inlining
// is disabled, the hint bits may still be set (they're computed at build
// time regardless) but we ignore them — every segment is rendered
// standalone because the client doesn't know how to parse bundled
// responses.
let childBundle = null;
if (prefetchInlining && prefetchHints & _approutertypes.PrefetchHint.InlinedIntoChild) {
// This segment is small enough that its data will be included in one
// of its children's responses. Don't spawn a separate task — prepend
// this segment's data onto the linked list so the accepting child can
// bundle it into its response.
if (seedData !== null) {
childBundle = {
rsc,
varyParams,
next: parentBundle
};
}
} else {
// This segment is not inlined into a child. Spawn a task to render it.
// If it has ParentInlinedIntoSelf, the accumulated parents are included
// in its response. Otherwise parentBundle is null and it renders as a
// standalone single-segment response.
//
// Skip spawning a task if rsc is null (disabled segment) — there's no
// data to serve and the client won't request it.
if (seedData !== null && rsc !== null) {
let bundle = prefetchHints & _approutertypes.PrefetchHint.ParentInlinedIntoSelf ? parentBundle : null;
// If this page accepts the head, append it at the tail of the chain.
if (headBundle !== null && prefetchHints & _approutertypes.PrefetchHint.HeadInlinedIntoSelf) {
headBundle.next = bundle;
bundle = headBundle;
}
segmentTasks.push((0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, clientModules, bundle)));
}
// childBundle stays null — reset the accumulator for children.
}
// Metadata about the segment. Sent as part of the tree prefetch. Null if

@@ -450,3 +525,3 @@ // there are no children.

const childHintTree = hintTree !== null && hintTree.slots !== null ? hintTree.slots[parallelRouteKey] ?? null : null;
const childTree = collectSegmentDataImpl(isClientParamParsingEnabled, childRoute, buildId, staleTime, childSeedData, clientModules, childRequestKey, segmentTasks, prefetchInlining, childHintTree);
const childTree = collectSegmentDataImpl(isClientParamParsingEnabled, childRoute, buildId, staleTime, childSeedData, clientModules, childRequestKey, segmentTasks, prefetchInlining, childHintTree, childBundle, headBundle);
if (slotMetadata === null) {

@@ -457,38 +532,2 @@ slotMetadata = {};

}
// Union the hints already embedded in the FlightRouterState with the
// separately-computed build-time hints. During the initial build, the
// FlightRouterState was produced before collectPrefetchHints ran, so
// inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in
// route[4] yet. On subsequent renders the hints are already in the
// FlightRouterState, so the union is idempotent.
//
// Strip InliningHintsStale — it's a transient flag set on the initial
// build-time FlightRouterState and must never appear in /_tree responses.
// If it leaked through, the client would re-fetch the tree in an infinite
// loop.
const prefetchHints = (route[4] ?? 0) & ~_approutertypes.PrefetchHint.InliningHintsStale | (hintTree !== null ? hintTree.hints : 0);
// Determine which params this segment varies on.
// Read the vary params thenable directly from the seed data. By the time
// collectSegmentData runs, the thenable should be fulfilled. If it's not
// fulfilled or null, treat as unknown (null means we can't share cache
// entries across param values).
const varyParamsThenable = seedData !== null ? seedData[4] : null;
const varyParams = varyParamsThenable !== null ? (0, _varyparamsdecoding.readVaryParams)(varyParamsThenable) : null;
if (!prefetchInlining) {
// When prefetch inlining is disabled, spawn individual segment tasks.
// When enabled, segment data is bundled into the /_inlined response
// instead, so we skip per-segment tasks here.
if (seedData !== null) {
// Spawn a task to write the segment data to a new Flight stream.
segmentTasks.push(// Since we're already in the middle of a render, wait until after the
// current task to escape the current rendering context.
(0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>renderSegmentPrefetch(buildId, staleTime, seedData[0], requestKey, varyParams, clientModules)));
} else {
// This segment does not have any seed data. Skip generating a prefetch
// response for it. We'll still include it in the route tree, though.
// TODO: We should encode in the route tree whether a segment is missing
// so we don't attempt to fetch it for no reason. As of now this shouldn't
// ever happen in practice, though.
}
}
const segment = route[0];

@@ -519,5 +558,7 @@ let name;

}
async function renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, clientModules) {
// Render the segment data to a stream.
const segmentPrefetch = {
async function renderSegmentPrefetch(buildId, staleTime, rsc, requestKey, varyParams, clientModules, bundle) {
// Build the SegmentPrefetch for the terminal (requested) segment.
// The terminal always has non-null rsc data — disabled segments are
// skipped by the caller and don't reach this function.
const selfPrefetch = {
rsc,

@@ -528,9 +569,31 @@ isPartial: await isPartialRSCData(rsc, clientModules),

};
// Wrap in a SegmentPrefetchResponse with a top-level buildId.
// For non-bundled responses, the data array has a single element.
const response = {
// Build the data array. Always an array, even for a single segment.
const data = [
selfPrefetch
];
if (bundle !== null) {
// Walk the bundle linked list and append each entry to the array.
let node = bundle;
while(node !== null){
if (node.rsc !== null) {
data.push({
rsc: node.rsc,
isPartial: await isPartialRSCData(node.rsc, clientModules),
staleTime,
varyParams: node.varyParams
});
} else {
// This segment has static prefetching disabled (runtime prefetch
// or instant = false). Emit null as a placeholder so the array
// indices stay aligned with the client's SegmentBundle linked
// list. The client will skip creating a cache entry for this slot.
data.push(null);
}
node = node.next;
}
}
// Wrap in the response envelope with the build ID at the top level.
const payload = {
buildId: buildId ?? '',
data: [
segmentPrefetch
]
data
};

@@ -542,3 +605,3 @@ // Since all we're doing is decoding and re-encoding a cached prerender, if

(0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>abortController.abort());
const { prelude: segmentStream } = await (0, _static.prerender)(response, clientModules, {
const { prelude: segmentStream } = await (0, _static.prerender)(payload, clientModules, {
filterStackFrame,

@@ -561,58 +624,2 @@ signal: abortController.signal,

}
async function renderInlinedPrefetchResponse(route, buildId, staleTime, seedData, head, headVaryParams, clientModules) {
// Build the inlined tree by walking the route and collecting all segments.
const inlinedTree = await buildInlinedSegmentPrefetch(route, buildId, staleTime, seedData, clientModules);
// Build the head segment.
const headPrefetch = {
rsc: head,
isPartial: await isPartialRSCData(head, clientModules),
staleTime,
varyParams: headVaryParams
};
const response = {
buildId: buildId ?? '',
tree: inlinedTree,
head: headPrefetch
};
// Render as a single Flight response.
const abortController = new AbortController();
(0, _scheduler.waitAtLeastOneReactRenderTask)().then(()=>abortController.abort());
const { prelude } = await (0, _static.prerender)(response, clientModules, {
filterStackFrame,
signal: abortController.signal,
onError: onSegmentPrerenderError
});
const buffer = await (0, _nodewebstreamshelper.streamToBuffer)(prelude);
return [
'/' + _segment.PAGE_SEGMENT_KEY,
buffer
];
}
async function buildInlinedSegmentPrefetch(route, buildId, staleTime, seedData, clientModules) {
let slots = null;
const children = route[1];
const seedDataChildren = seedData !== null ? seedData[1] : null;
for(const parallelRouteKey in children){
const childRoute = children[parallelRouteKey];
const childSeedData = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null;
const childPrefetch = await buildInlinedSegmentPrefetch(childRoute, buildId, staleTime, childSeedData, clientModules);
if (slots === null) {
slots = {};
}
slots[parallelRouteKey] = childPrefetch;
}
const rsc = seedData !== null ? seedData[0] : null;
const varyParamsThenable = seedData !== null ? seedData[4] : null;
const varyParams = varyParamsThenable !== null ? (0, _varyparamsdecoding.readVaryParams)(varyParamsThenable) : null;
const segment = {
rsc,
isPartial: rsc !== null ? await isPartialRSCData(rsc, clientModules) : true,
staleTime,
varyParams
};
return {
segment,
slots
};
}
async function isPartialRSCData(rsc, clientModules) {

@@ -619,0 +626,0 @@ // We can determine if a segment contains only partial data if it takes longer

@@ -1,1 +0,1 @@

{"version":3,"sources":["../../../src/server/app-render/collect-segment-data.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */\nimport type {\n CacheNodeSeedData,\n FlightRouterState,\n InitialRSCPayload,\n DynamicParamTypesShort,\n HeadData,\n PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n StaticPrefetchDisabled,\n} from '../../shared/lib/app-router-types'\nimport { readVaryParams } from '../../shared/lib/segment-cache/vary-params-decoding'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport type { ManifestNode } from '../../build/webpack/plugins/flight-manifest-plugin'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream } from 'react-server-dom-webpack/client'\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { prerender } from 'react-server-dom-webpack/static'\n\nimport {\n streamFromBuffer,\n streamToBuffer,\n} from '../stream-utils/node-web-streams-helper'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport {\n type SegmentRequestKey,\n createSegmentRequestKeyPart,\n appendSegmentRequestKeyPart,\n ROOT_SEGMENT_REQUEST_KEY,\n HEAD_REQUEST_KEY,\n} from '../../shared/lib/segment-cache/segment-value-encoding'\nimport { getDigestForWellKnownError } from './create-error-handler'\nimport {\n Phase,\n printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\n// Contains metadata about the route tree. The client must fetch this before\n// it can fetch any actual segment data.\nexport type RootTreePrefetch = {\n buildId?: string\n tree: TreePrefetch\n staleTime: number\n}\n\nexport type TreePrefetchParam = {\n type: DynamicParamTypesShort\n // When cacheComponents is enabled, this field is always null.\n // Instead we parse the param on the client, allowing us to omit it from\n // the prefetch response and increase its cacheability.\n key: string | null\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then siblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n siblings: readonly string[] | null\n}\n\nexport type TreePrefetch = {\n name: string\n // Only present for parameterized (dynamic) segments.\n param: TreePrefetchParam | null\n\n // Child segments.\n slots: null | {\n [parallelRouteKey: string]: TreePrefetch\n }\n\n /** Bitmask of PrefetchHint flags for this segment and its subtree */\n prefetchHints: number\n}\n\n/**\n * Top-level response for a segment prefetch request. Contains the build ID\n * and an array of segment data (one per segment in the bundle).\n */\nexport type SegmentPrefetchResponse = {\n buildId: string\n data: Array<SegmentPrefetch | null>\n}\n\nexport type SegmentPrefetch = {\n rsc: React.ReactNode | null\n isPartial: boolean\n staleTime: number\n /**\n * The set of params that this segment's output depends on. Used by the client\n * cache to determine which entries can be reused across different param\n * values.\n * - `null` means vary params were not tracked (conservative: assume all\n * params matter)\n * - Empty set means no params were accessed (segment is reusable for any\n * param values)\n */\n varyParams: Set<string> | null\n}\n\n/**\n * A node in the inlined prefetch tree. Wraps a SegmentPrefetch with child\n * slots so all segments for a route can be bundled into a single response.\n *\n * This is a separate type from SegmentPrefetch because the inlined flow is\n * still gated behind a feature flag. Eventually inlining will always be\n * enabled, and the per-segment and inlined paths will merge.\n */\nexport type InlinedSegmentPrefetch = {\n segment: SegmentPrefetch\n slots: null | {\n [parallelRouteKey: string]: InlinedSegmentPrefetch\n }\n}\n\n/**\n * The response shape for the /_inlined prefetch endpoint. Contains all segment\n * data for a route bundled into a single tree structure, plus the head segment.\n */\nexport type InlinedPrefetchResponse = {\n buildId: string\n tree: InlinedSegmentPrefetch\n head: SegmentPrefetch\n}\n\nconst filterStackFrame =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .filterStackFrameDEV\n : undefined\nconst findSourceMapURL =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .findSourceMapURLDEV\n : undefined\n\nfunction onSegmentPrerenderError(error: unknown) {\n const digest = getDigestForWellKnownError(error)\n if (digest) {\n return digest\n }\n // We don't need to log the errors because we would have already done that\n // when generating the original Flight stream for the whole page.\n if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n const workStore = workAsyncStorage.getStore()\n printDebugThrownValueForProspectiveRender(\n error,\n workStore?.route ?? 'unknown route',\n Phase.SegmentCollection\n )\n }\n}\n\n/**\n * Extract the FlightRouterState, seed data, and head from a prerendered\n * InitialRSCPayload. Returns null if the payload doesn't match the expected\n * shape (single path with 3 elements).\n */\nfunction extractFlightData(initialRSCPayload: InitialRSCPayload): {\n buildId: string | undefined\n flightRouterState: FlightRouterState\n seedData: CacheNodeSeedData\n head: HeadData\n} | null {\n const flightDataPaths = initialRSCPayload.f\n // FlightDataPath is an unsound type, hence the additional checks.\n if (flightDataPaths.length !== 1 && flightDataPaths[0].length !== 3) {\n console.error(\n 'Internal Next.js error: InitialRSCPayload does not match the expected ' +\n 'shape for a prerendered page during segment prefetch generation.'\n )\n return null\n }\n return {\n buildId: initialRSCPayload.b,\n flightRouterState: flightDataPaths[0][0],\n seedData: flightDataPaths[0][1],\n head: flightDataPaths[0][2],\n }\n}\n\nexport async function collectSegmentData(\n isCacheComponentsEnabled: boolean,\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n prefetchInlining: boolean,\n hints: PrefetchHints | null\n): Promise<Map<SegmentRequestKey, Buffer>> {\n // Traverse the router tree and generate a prefetch response for each segment.\n\n // A mutable map to collect the results as we traverse the route tree.\n const resultMap = new Map<SegmentRequestKey, Buffer>()\n\n // Before we start, warm up the module cache by decoding the page data once.\n // Then we can assume that any remaining async tasks that occur the next time\n // are due to hanging promises caused by dynamic data access. Note we only\n // have to do this once per page, not per individual segment.\n //\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Create an abort controller that we'll use to stop the stream.\n const abortController = new AbortController()\n const onCompletedProcessingRouteTree = async () => {\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // serializing the stream takes longer than a microtask, it must because of\n // hanging promises caused by dynamic data.\n await waitAtLeastOneReactRenderTask()\n abortController.abort()\n }\n\n // Generate a stream for the route tree prefetch. While we're walking the\n // tree, we'll also spawn additional tasks to generate the segment prefetches.\n // The promises for these tasks are pushed to a mutable array that we will\n // await once the route tree is fully rendered.\n const segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>> = []\n const { prelude: treeStream } = await prerender(\n // RootTreePrefetch is not a valid return type for a React component, but\n // we need to use a component so that when we decode the original stream\n // inside of it, the side effects are transferred to the new stream.\n // @ts-expect-error\n <PrefetchTreeData\n isClientParamParsingEnabled={isCacheComponentsEnabled}\n fullPageDataBuffer={fullPageDataBuffer}\n serverConsumerManifest={serverConsumerManifest}\n clientModules={clientModules}\n staleTime={staleTime}\n segmentTasks={segmentTasks}\n onCompletedProcessingRouteTree={onCompletedProcessingRouteTree}\n prefetchInlining={prefetchInlining}\n hints={hints}\n />,\n clientModules,\n {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n }\n )\n\n // Write the route tree to a special `/_tree` segment.\n const treeBuffer = await streamToBuffer(treeStream)\n resultMap.set('/_tree' as SegmentRequestKey, treeBuffer)\n\n // Also output the entire full page data response\n resultMap.set('/_full' as SegmentRequestKey, fullPageDataBuffer)\n\n // Now that we've finished rendering the route tree, all the segment tasks\n // should have been spawned. Await them in parallel and write the segment\n // prefetches to the result map.\n for (const [segmentPath, buffer] of await Promise.all(segmentTasks)) {\n resultMap.set(segmentPath, buffer)\n }\n\n return resultMap\n}\n\n/**\n * Compute prefetch hints for a route by measuring segment sizes and deciding\n * which segments should be inlined. Only runs at build time. The results are\n * written to prefetch-hints.json and loaded at server startup.\n *\n * This is a separate pass from collectSegmentData so that the inlining\n * decisions can be fed back into collectSegmentData to control which segments\n * are output as separate entries vs. inlined into their parent.\n */\nexport async function collectPrefetchHints(\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n maxSize: number,\n maxBundleSize: number\n): Promise<PrefetchHints> {\n // Warm up the module cache, same as collectSegmentData.\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Decode the Flight data to walk the route tree.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return { hints: 0, slots: null }\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Measure the head (metadata/viewport) gzip size so the main traversal\n // can decide whether to inline it into a page's bundle.\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n const [, headBuffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules\n )\n const headGzipSize = await getGzipSize(headBuffer)\n\n // Mutable accumulator: the first segment that accepts the head sets this\n // to true. Once set, subsequent segments skip the check.\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment (since the runtime response already\n // includes it). Static pages are skipped to avoid duplication.\n const rootHints = flightRouterState[4] ?? 0\n const subtreeHasRuntimePrefetch =\n (rootHints & PrefetchHint.SubtreeHasRuntimePrefetch) !== 0\n const headInlineState = { inlined: false }\n\n // Walk the tree with the parent-first, child-decides algorithm.\n const { node } = await collectPrefetchHintsImpl(\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n null, // root has no parent to inline\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n subtreeHasRuntimePrefetch\n )\n\n if (!headInlineState.inlined) {\n // No page could accept the head. Set HeadOutlined on the root so the\n // client knows to fetch the head separately.\n node.hints |= PrefetchHint.HeadOutlined\n }\n\n return node\n}\n\n// Measure a segment's gzip size and decide whether it should be inlined.\n//\n// These hints are computed once during build and never change for the\n// lifetime of that deployment. The client can assume that hints delivered as\n// part of one request will be the same during a subsequent request, given\n// the same build ID. There's no skew to worry about as long as the build\n// itself is consistent.\n//\n// In the Segment Cache, we split page prefetches into multiple requests so\n// that each one can be cached and deduped independently. However, some\n// segments are small enough that the potential caching benefits are not worth\n// the additional network overhead. For these, we inline a parent's data into\n// one of its children's responses, avoiding a separate request. The parent\n// is inlined into the child (not the other way around) because the parent's\n// response is more likely to be shared across multiple pages. The child's\n// response is already page-specific, so adding the parent's data there\n// doesn't meaningfully reduce deduplication. It's similar to how JS bundlers\n// decide whether to inline a module into a chunk.\n//\n// The algorithm is parent-first, child-decides: the parent measures itself\n// and passes its gzip size down. Each child decides whether to accept. A\n// child rejects if the parent exceeds maxSize or if accepting would push\n// the cumulative inlined bytes past maxBundleSize. This produces\n// both ParentInlinedIntoSelf (on the child) and InlinedIntoChild (on the\n// parent) in a single pass.\nasync function collectPrefetchHintsImpl(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n // TODO: Consider persisting the computed requestKey into the hints output\n // so it doesn't need to be recomputed during the build. This might also\n // suggest renaming prefetch-hints.json to something like\n // segment-manifest.json, since it would contain more than just hints.\n requestKey: SegmentRequestKey,\n parentGzipSize: number | null,\n maxSize: number,\n maxBundleSize: number,\n headGzipSize: number,\n headInlineState: { inlined: boolean },\n routeHasRuntimePrefetch: boolean\n): Promise<{\n node: PrefetchHints\n // Total inlined bytes accumulated along the deepest accepting path in this\n // subtree. Used by ancestors for budget checks.\n inlinedBytes: number\n}> {\n // Check if static prefetching is disabled for this segment (runtime\n // prefetch or unstable_instant = false). Such segments act as transparent\n // pass-throughs in the bundle chain: they contribute zero bytes of their\n // own and pass parent data through to children. However, they cannot be\n // the terminal of a chain — if no child accepts the parent data, the\n // parent cannot be inlined into this segment because there's no static\n // response to carry it. See the ParentInlinedIntoSelf check below.\n const isStaticPrefetchDisabled =\n ((route[4] ?? 0) & StaticPrefetchDisabled) !== 0\n\n // Render current segment and measure its gzip size. Skip measurement for\n // segments with static prefetching disabled since they contribute nothing.\n let currentGzipSize: number | null = null\n if (!isStaticPrefetchDisabled && seedData !== null) {\n const varyParamsThenable = seedData[4]\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n const [, buffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n seedData[0],\n requestKey,\n varyParams,\n clientModules\n )\n currentGzipSize = await getGzipSize(buffer)\n }\n\n // Only offer this segment to its children for inlining if its gzip size\n // is below maxSize. Segments with static prefetching disabled have\n // nothing to offer (their slot in the bundle is null).\n const sizeToInline =\n currentGzipSize !== null && currentGzipSize < maxSize\n ? currentGzipSize\n : null\n\n // Process children serially (not in parallel) to ensure deterministic\n // results. Since this only runs at build time and the rendering is just\n // re-encoding cached prerenders, this won't impact build times. Each child\n // receives our gzip size and decides whether to inline us. Once a child\n // accepts, we stop offering to remaining siblings — the parent is only\n // inlined into one child. In parallel routes, this avoids duplicating the\n // parent's data across multiple sibling responses.\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n\n let slots: Record<string, PrefetchHints> | null = null\n let didInlineIntoChild = false\n let acceptingChildInlinedBytes = 0\n // Track the smallest inlinedBytes across all children so we know how much\n // budget remains along the best path. When our own parent asks whether we\n // can accept its data, the parent's bytes would flow through to the child\n // with the most remaining headroom.\n let smallestChildInlinedBytes = Infinity\n let hasChildren = false\n\n for (const parallelRouteKey in children) {\n hasChildren = true\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n\n // Determine what size to offer children for inlining. Normally we offer\n // our own size. But if static prefetching is disabled for this segment,\n // it has no data of its own — instead it passes the parent's offer\n // through to children. This allows a static grandparent to inline\n // through a disabled intermediate segment into a static grandchild.\n const sizeToOfferChild = isStaticPrefetchDisabled\n ? parentGzipSize\n : sizeToInline\n\n const childResult = await collectPrefetchHintsImpl(\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n // Once a child has accepted us, stop offering to remaining siblings.\n didInlineIntoChild ? null : sizeToOfferChild,\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n routeHasRuntimePrefetch\n )\n\n if (slots === null) {\n slots = {}\n }\n slots[parallelRouteKey] = childResult.node\n\n if (childResult.node.hints & PrefetchHint.ParentInlinedIntoSelf) {\n // This child accepted our data — it will include our segment's\n // response in its own. No need to track headroom anymore since\n // we already know which child we're inlined into.\n didInlineIntoChild = true\n acceptingChildInlinedBytes = childResult.inlinedBytes\n } else if (!didInlineIntoChild) {\n // Track the child with the most remaining headroom. Used below\n // when deciding whether to accept our own parent's data.\n if (childResult.inlinedBytes < smallestChildInlinedBytes) {\n smallestChildInlinedBytes = childResult.inlinedBytes\n }\n }\n }\n\n // Leaf segment: no children have consumed any budget yet.\n if (!hasChildren) {\n smallestChildInlinedBytes = 0\n }\n\n // Mark this segment as InlinedIntoChild if one of its children accepted.\n // This means this segment doesn't need its own prefetch response — its\n // data is included in the accepting child's response instead.\n let hints = 0\n if (didInlineIntoChild) {\n hints |= PrefetchHint.InlinedIntoChild\n }\n\n // inlinedBytes represents the total gzipped bytes of parent data inlined\n // into the deepest \"inlining target\" along this branch. It starts at 0 at\n // the leaves and grows as parents are inlined going back up the tree. If a\n // child accepted us, our size is already counted in that child's value.\n let inlinedBytes = didInlineIntoChild\n ? acceptingChildInlinedBytes\n : smallestChildInlinedBytes\n\n // Determine which segment is responsible for the head (metadata/viewport).\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment — the runtime response already includes\n // the head, so assigning it to a static page would duplicate it.\n //\n // When the route has no runtime prefetch segments, the head is assigned\n // to the first static page terminal that has budget room. Head can only\n // be inlined into a page, not a layout, because pages may access\n // additional params (e.g. searchParams) that layouts cannot.\n //\n // A disabled segment with PrefetchDisabled (instant = false) is never a\n // valid target — it has no response at all.\n const hasRuntimePrefetch =\n ((route[4] ?? 0) & PrefetchHint.HasRuntimePrefetch) !== 0\n const isBundleTerminal = !didInlineIntoChild && !isStaticPrefetchDisabled\n const segment = route[0]\n const isPageSegment =\n typeof segment === 'string'\n ? segment === PAGE_SEGMENT_KEY\n : segment[0] === PAGE_SEGMENT_KEY\n if (!headInlineState.inlined) {\n if (hasRuntimePrefetch) {\n // Runtime prefetch segment — the runtime response includes the head.\n // No budget cost since it's already part of that response.\n hints |= PrefetchHint.HeadInlinedIntoSelf\n headInlineState.inlined = true\n } else if (isBundleTerminal && isPageSegment && !routeHasRuntimePrefetch) {\n // Static page terminal — only used when no runtime segments exist.\n // The head counts against the bundle budget.\n if (inlinedBytes + headGzipSize < maxBundleSize) {\n hints |= PrefetchHint.HeadInlinedIntoSelf\n inlinedBytes += headGzipSize\n headInlineState.inlined = true\n }\n }\n }\n\n // Decide whether to accept our own parent's data. Conditions:\n //\n // 1. The parent offered us a size (parentGzipSize is not null). It's null\n // when the parent is too large to inline or when this is the root.\n //\n // 2. The total inlined bytes along this branch wouldn't exceed the budget.\n // Even if each segment is individually small, at some point it no\n // longer makes sense to keep adding bytes because the combined response\n // is unique per URL and can't be deduped.\n //\n // 3. If this segment has static prefetching disabled, it can only accept\n // the parent if it has successfully inlined into a child. A disabled\n // segment is a transparent pass-through — it passes parent data through\n // to descendants. But if no descendant accepted, there's no static\n // response to carry the parent's data, so the parent must remain\n // outlined.\n //\n // A node can be both InlinedIntoChild and ParentInlinedIntoSelf. This\n // happens in multi-level chains: GP → P → C where all are small. C\n // accepts P (P is InlinedIntoChild), then P also accepts GP (P is\n // ParentInlinedIntoSelf). The result: C's response includes both P's\n // and GP's data. The parent's data flows through to the deepest\n // accepting descendant.\n if (parentGzipSize !== null) {\n // A disabled segment can only pass through — it needs a child to\n // ultimately accept the parent's data.\n const canAcceptParent = !isStaticPrefetchDisabled || didInlineIntoChild\n if (canAcceptParent && inlinedBytes + parentGzipSize < maxBundleSize) {\n hints |= PrefetchHint.ParentInlinedIntoSelf\n inlinedBytes += parentGzipSize\n }\n }\n\n return {\n node: { hints, slots },\n inlinedBytes,\n }\n}\n\n// We use gzip size rather than raw size because it better reflects the actual\n// transfer cost. The inlining trade-off is about whether the overhead of an\n// additional HTTP request (connection setup, headers, round trip) is worth\n// the deduplication benefit of keeping a segment separate. Below some\n// compressed size, the request overhead dominates and inlining is better.\n// Above it, the deduplication benefit of a cacheable standalone response\n// wins out.\nasync function getGzipSize(buffer: Buffer): Promise<number> {\n const stream = new Blob([new Uint8Array(buffer)])\n .stream()\n .pipeThrough(new CompressionStream('gzip'))\n const compressedBlob = await new Response(stream).blob()\n return compressedBlob.size\n}\n\nasync function PrefetchTreeData({\n isClientParamParsingEnabled,\n fullPageDataBuffer,\n serverConsumerManifest,\n clientModules,\n staleTime,\n segmentTasks,\n onCompletedProcessingRouteTree,\n prefetchInlining,\n hints,\n}: {\n isClientParamParsingEnabled: boolean\n fullPageDataBuffer: Buffer\n serverConsumerManifest: any\n clientModules: ManifestNode\n staleTime: number\n segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>>\n onCompletedProcessingRouteTree: () => void\n prefetchInlining: boolean\n hints: PrefetchHints | null\n}): Promise<RootTreePrefetch | null> {\n // We're currently rendering a Flight response for the route tree prefetch.\n // Inside this component, decode the Flight stream for the whole page. This is\n // a hack to transfer the side effects from the original Flight stream (e.g.\n // Float preloads) onto the Flight stream for the tree prefetch.\n // TODO: React needs a better way to do this. Needed for Server Actions, too.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return null\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Extract the head vary params from the decoded response.\n // The head vary params thenable should be fulfilled by now; if not, treat\n // as unknown (null).\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n // Compute the route metadata tree by traversing the FlightRouterState. As we\n // walk the tree, we will also spawn a task to produce a prefetch response for\n // each segment (unless prefetch inlining is enabled, in which case all\n // segments are bundled into a single /_inlined response).\n const tree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n segmentTasks,\n prefetchInlining,\n hints\n )\n\n if (prefetchInlining) {\n // When prefetch inlining is enabled, bundle all segment data into a single\n // /_inlined response instead of individual per-segment responses. The head\n // is also included in the inlined response.\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderInlinedPrefetchResponse(\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n head,\n headVaryParams,\n clientModules\n )\n )\n )\n } else {\n // Also spawn a task to produce a prefetch response for the \"head\" segment.\n // The head contains metadata, like the title; it's not really a route\n // segment, but it contains RSC data, so it's treated like a segment by\n // the client cache.\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules\n )\n )\n )\n }\n\n // Notify the abort controller that we're done processing the route tree.\n // Anything async that happens after this point must be due to hanging\n // promises in the original stream.\n onCompletedProcessingRouteTree()\n\n // Render the route tree to a special `/_tree` segment.\n const treePrefetch: RootTreePrefetch = {\n tree,\n staleTime,\n }\n if (buildId) {\n treePrefetch.buildId = buildId\n }\n return treePrefetch\n}\n\nfunction collectSegmentDataImpl(\n isClientParamParsingEnabled: boolean,\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n requestKey: SegmentRequestKey,\n segmentTasks: Array<Promise<[string, Buffer]>>,\n prefetchInlining: boolean,\n hintTree: PrefetchHints | null\n): TreePrefetch {\n // Metadata about the segment. Sent as part of the tree prefetch. Null if\n // there are no children.\n let slotMetadata: { [parallelRouteKey: string]: TreePrefetch } | null = null\n\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n for (const parallelRouteKey in children) {\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n const childHintTree =\n hintTree !== null && hintTree.slots !== null\n ? (hintTree.slots[parallelRouteKey] ?? null)\n : null\n const childTree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n segmentTasks,\n prefetchInlining,\n childHintTree\n )\n if (slotMetadata === null) {\n slotMetadata = {}\n }\n slotMetadata[parallelRouteKey] = childTree\n }\n\n // Union the hints already embedded in the FlightRouterState with the\n // separately-computed build-time hints. During the initial build, the\n // FlightRouterState was produced before collectPrefetchHints ran, so\n // inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in\n // route[4] yet. On subsequent renders the hints are already in the\n // FlightRouterState, so the union is idempotent.\n //\n // Strip InliningHintsStale — it's a transient flag set on the initial\n // build-time FlightRouterState and must never appear in /_tree responses.\n // If it leaked through, the client would re-fetch the tree in an infinite\n // loop.\n const prefetchHints =\n ((route[4] ?? 0) & ~PrefetchHint.InliningHintsStale) |\n (hintTree !== null ? hintTree.hints : 0)\n\n // Determine which params this segment varies on.\n // Read the vary params thenable directly from the seed data. By the time\n // collectSegmentData runs, the thenable should be fulfilled. If it's not\n // fulfilled or null, treat as unknown (null means we can't share cache\n // entries across param values).\n const varyParamsThenable = seedData !== null ? seedData[4] : null\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n if (!prefetchInlining) {\n // When prefetch inlining is disabled, spawn individual segment tasks.\n // When enabled, segment data is bundled into the /_inlined response\n // instead, so we skip per-segment tasks here.\n if (seedData !== null) {\n // Spawn a task to write the segment data to a new Flight stream.\n segmentTasks.push(\n // Since we're already in the middle of a render, wait until after the\n // current task to escape the current rendering context.\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n seedData[0],\n requestKey,\n varyParams,\n clientModules\n )\n )\n )\n } else {\n // This segment does not have any seed data. Skip generating a prefetch\n // response for it. We'll still include it in the route tree, though.\n // TODO: We should encode in the route tree whether a segment is missing\n // so we don't attempt to fetch it for no reason. As of now this shouldn't\n // ever happen in practice, though.\n }\n }\n\n const segment = route[0]\n let name: string\n let param: TreePrefetchParam | null\n if (typeof segment === 'string') {\n name = segment\n param = null\n } else {\n name = segment[0]\n param = {\n type: segment[2],\n // This value is omitted from the prefetch response when cacheComponents\n // is enabled.\n key: isClientParamParsingEnabled ? null : segment[1],\n siblings: segment[3],\n }\n }\n\n // Metadata about the segment. Sent to the client as part of the\n // tree prefetch.\n return {\n name,\n param,\n prefetchHints,\n slots: slotMetadata,\n }\n}\n\nasync function renderSegmentPrefetch(\n buildId: string | undefined,\n staleTime: number,\n rsc: React.ReactNode,\n requestKey: SegmentRequestKey,\n varyParams: Set<string> | null,\n clientModules: ManifestNode\n): Promise<[SegmentRequestKey, Buffer]> {\n // Render the segment data to a stream.\n const segmentPrefetch: SegmentPrefetch = {\n rsc,\n isPartial: await isPartialRSCData(rsc, clientModules),\n staleTime,\n varyParams,\n }\n // Wrap in a SegmentPrefetchResponse with a top-level buildId.\n // For non-bundled responses, the data array has a single element.\n const response: SegmentPrefetchResponse = {\n buildId: buildId ?? '',\n data: [segmentPrefetch],\n }\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // it takes longer than a microtask, it must because of hanging promises\n // caused by dynamic data. Abort the stream at the end of the current task.\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => abortController.abort())\n const { prelude: segmentStream } = await prerender(response, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n })\n const segmentBuffer = await streamToBuffer(segmentStream)\n if (requestKey === ROOT_SEGMENT_REQUEST_KEY) {\n return ['/_index' as SegmentRequestKey, segmentBuffer]\n } else {\n return [requestKey, segmentBuffer]\n }\n}\n\nasync function renderInlinedPrefetchResponse(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n head: HeadData,\n headVaryParams: Set<string> | null,\n clientModules: ManifestNode\n): Promise<[SegmentRequestKey, Buffer]> {\n // Build the inlined tree by walking the route and collecting all segments.\n const inlinedTree = await buildInlinedSegmentPrefetch(\n route,\n buildId,\n staleTime,\n seedData,\n clientModules\n )\n\n // Build the head segment.\n const headPrefetch: SegmentPrefetch = {\n rsc: head,\n isPartial: await isPartialRSCData(head, clientModules),\n staleTime,\n varyParams: headVaryParams,\n }\n\n const response: InlinedPrefetchResponse = {\n buildId: buildId ?? '',\n tree: inlinedTree,\n head: headPrefetch,\n }\n\n // Render as a single Flight response.\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => abortController.abort())\n const { prelude } = await prerender(response, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n })\n const buffer = await streamToBuffer(prelude)\n return [('/' + PAGE_SEGMENT_KEY) as SegmentRequestKey, buffer]\n}\n\nasync function buildInlinedSegmentPrefetch(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode\n): Promise<InlinedSegmentPrefetch> {\n let slots: {\n [parallelRouteKey: string]: InlinedSegmentPrefetch\n } | null = null\n\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n for (const parallelRouteKey in children) {\n const childRoute = children[parallelRouteKey]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n const childPrefetch = await buildInlinedSegmentPrefetch(\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules\n )\n if (slots === null) {\n slots = {}\n }\n slots[parallelRouteKey] = childPrefetch\n }\n\n const rsc = seedData !== null ? seedData[0] : null\n const varyParamsThenable = seedData !== null ? seedData[4] : null\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n const segment: SegmentPrefetch = {\n rsc,\n isPartial: rsc !== null ? await isPartialRSCData(rsc, clientModules) : true,\n staleTime,\n varyParams,\n }\n return { segment, slots }\n}\n\nasync function isPartialRSCData(\n rsc: React.ReactNode,\n clientModules: ManifestNode\n): Promise<boolean> {\n // We can determine if a segment contains only partial data if it takes longer\n // than a task to encode, because dynamic data is encoded as an infinite\n // promise. We must do this in a separate Flight prerender from the one that\n // actually generates the prefetch stream because we need to include\n // `isPartial` in the stream itself.\n let isPartial = false\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => {\n // If we haven't yet finished the outer task, then it must be because we\n // accessed dynamic data.\n isPartial = true\n abortController.abort()\n })\n await prerender(rsc, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError() {},\n })\n return isPartial\n}\n\nfunction createUnclosingPrefetchStream(\n originalFlightStream: ReadableStream<Uint8Array>\n): ReadableStream<Uint8Array> {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\n const reader = originalFlightStream.getReader()\n return new ReadableStream({\n async pull(controller) {\n while (true) {\n const { done, value } = await reader.read()\n if (!done) {\n // Pass to the target stream and keep consuming the Flight response\n // from the server.\n controller.enqueue(value)\n continue\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream.\n return\n }\n },\n })\n}\n"],"names":["collectPrefetchHints","collectSegmentData","filterStackFrame","process","env","NODE_ENV","require","filterStackFrameDEV","undefined","findSourceMapURL","findSourceMapURLDEV","onSegmentPrerenderError","error","digest","getDigestForWellKnownError","NEXT_DEBUG_BUILD","__NEXT_VERBOSE_LOGGING","workStore","workAsyncStorage","getStore","printDebugThrownValueForProspectiveRender","route","Phase","SegmentCollection","extractFlightData","initialRSCPayload","flightDataPaths","f","length","console","buildId","b","flightRouterState","seedData","head","isCacheComponentsEnabled","fullPageDataBuffer","staleTime","clientModules","serverConsumerManifest","prefetchInlining","hints","resultMap","Map","createFromReadableStream","streamFromBuffer","waitAtLeastOneReactRenderTask","abortController","AbortController","onCompletedProcessingRouteTree","abort","segmentTasks","prelude","treeStream","prerender","PrefetchTreeData","isClientParamParsingEnabled","signal","onError","treeBuffer","streamToBuffer","set","segmentPath","buffer","Promise","all","maxSize","maxBundleSize","createUnclosingPrefetchStream","flightData","slots","headVaryParamsThenable","h","headVaryParams","readVaryParams","headBuffer","renderSegmentPrefetch","HEAD_REQUEST_KEY","headGzipSize","getGzipSize","rootHints","subtreeHasRuntimePrefetch","PrefetchHint","SubtreeHasRuntimePrefetch","headInlineState","inlined","node","collectPrefetchHintsImpl","ROOT_SEGMENT_REQUEST_KEY","HeadOutlined","requestKey","parentGzipSize","routeHasRuntimePrefetch","isStaticPrefetchDisabled","StaticPrefetchDisabled","currentGzipSize","varyParamsThenable","varyParams","sizeToInline","children","seedDataChildren","didInlineIntoChild","acceptingChildInlinedBytes","smallestChildInlinedBytes","Infinity","hasChildren","parallelRouteKey","childRoute","childSegment","childSeedData","childRequestKey","appendSegmentRequestKeyPart","createSegmentRequestKeyPart","sizeToOfferChild","childResult","ParentInlinedIntoSelf","inlinedBytes","InlinedIntoChild","hasRuntimePrefetch","HasRuntimePrefetch","isBundleTerminal","segment","isPageSegment","PAGE_SEGMENT_KEY","HeadInlinedIntoSelf","canAcceptParent","stream","Blob","Uint8Array","pipeThrough","CompressionStream","compressedBlob","Response","blob","size","tree","collectSegmentDataImpl","push","then","renderInlinedPrefetchResponse","treePrefetch","hintTree","slotMetadata","childHintTree","childTree","prefetchHints","InliningHintsStale","name","param","type","key","siblings","rsc","segmentPrefetch","isPartial","isPartialRSCData","response","data","segmentStream","segmentBuffer","inlinedTree","buildInlinedSegmentPrefetch","headPrefetch","childPrefetch","originalFlightStream","reader","getReader","ReadableStream","pull","controller","done","value","read","enqueue"],"mappings":"AAAA,6GAA6G;;;;;;;;;;;;;;;IAoRvFA,oBAAoB;eAApBA;;IA5FAC,kBAAkB;eAAlBA;;;;gCA5Kf;oCACwB;yBACE;wBAIQ;wBAEf;sCAKnB;2BACuC;sCAOvC;oCACoC;wCAIpC;0CAC0B;AAyFjC,MAAMC,mBACJC,QAAQC,GAAG,CAACC,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e;QAClCpC;QACAuD,QAAQV,gBAAgBU,MAAM;QAC9BC,YAAW;IACb;IACA,OAAOgG;AACT;AAEA,SAAStF,8BACPgG,oBAAgD;IAEhD,0EAA0E;IAC1E,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,2CAA2C;IAC3C,EAAE;IACF,2EAA2E;IAC3E,0EAA0E;IAC1E,8EAA8E;IAC9E,+BAA+B;IAC/B,MAAMC,SAASD,qBAAqBE,SAAS;IAC7C,OAAO,IAAIC,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,MAAO,KAAM;gBACX,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAG,MAAMN,OAAOO,IAAI;gBACzC,IAAI,CAACF,MAAM;oBACT,mEAAmE;oBACnE,mBAAmB;oBACnBD,WAAWI,OAAO,CAACF;oBACnB;gBACF;gBACA,qEAAqE;gBACrE,qBAAqB;gBACrB;YACF;QACF;IACF;AACF","ignoreList":[0]}
{"version":3,"sources":["../../../src/server/app-render/collect-segment-data.tsx"],"sourcesContent":["/* eslint-disable @next/internal/no-ambiguous-jsx -- Bundled in entry-base so it gets the right JSX runtime. */\nimport type {\n CacheNodeSeedData,\n FlightRouterState,\n InitialRSCPayload,\n DynamicParamTypesShort,\n HeadData,\n PrefetchHints,\n} from '../../shared/lib/app-router-types'\nimport {\n PrefetchHint,\n StaticPrefetchDisabled,\n} from '../../shared/lib/app-router-types'\nimport { readVaryParams } from '../../shared/lib/segment-cache/vary-params-decoding'\nimport type { ManifestNode } from '../../build/webpack/plugins/flight-manifest-plugin'\n\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { createFromReadableStream } from 'react-server-dom-webpack/client'\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport { prerender } from 'react-server-dom-webpack/static'\n\nimport {\n streamFromBuffer,\n streamToBuffer,\n} from '../stream-utils/node-web-streams-helper'\nimport { PAGE_SEGMENT_KEY } from '../../shared/lib/segment'\nimport { waitAtLeastOneReactRenderTask } from '../../lib/scheduler'\nimport {\n type SegmentRequestKey,\n createSegmentRequestKeyPart,\n appendSegmentRequestKeyPart,\n ROOT_SEGMENT_REQUEST_KEY,\n HEAD_REQUEST_KEY,\n} from '../../shared/lib/segment-cache/segment-value-encoding'\nimport { getDigestForWellKnownError } from './create-error-handler'\nimport {\n Phase,\n printDebugThrownValueForProspectiveRender,\n} from './prospective-render-utils'\nimport { workAsyncStorage } from './work-async-storage.external'\n\n// Contains metadata about the route tree. The client must fetch this before\n// it can fetch any actual segment data.\nexport type RootTreePrefetch = {\n buildId?: string\n tree: TreePrefetch\n staleTime: number\n}\n\nexport type TreePrefetchParam = {\n type: DynamicParamTypesShort\n // When cacheComponents is enabled, this field is always null.\n // Instead we parse the param on the client, allowing us to omit it from\n // the prefetch response and increase its cacheability.\n key: string | null\n // Static sibling segments at the same URL level. Used by the client\n // router to determine if a prefetch can be reused when navigating to\n // a static sibling of a dynamic route. For example, if the route is\n // /products/[id] and there's also /products/sale, then siblings\n // would be ['sale']. null means the siblings are unknown (e.g. in\n // webpack dev mode).\n siblings: readonly string[] | null\n}\n\nexport type TreePrefetch = {\n name: string\n // Only present for parameterized (dynamic) segments.\n param: TreePrefetchParam | null\n\n // Child segments.\n slots: null | {\n [parallelRouteKey: string]: TreePrefetch\n }\n\n /** Bitmask of PrefetchHint flags for this segment and its subtree */\n prefetchHints: number\n}\n\n/**\n * Top-level response for a segment prefetch request. Contains the build ID\n * and an array of segment data (one per segment in the bundle).\n *\n * Ordering contract: data[0] is the requested (terminal) segment. Subsequent\n * elements are ancestors that were inlined into this response, built by\n * walking the SegmentBundleNode linked list. The client's SegmentBundle\n * linked list is constructed in the same order during scheduling, so the\n * two are walked in parallel when the response arrives. A null element\n * indicates a disabled segment (runtime prefetch or instant=false) that\n * occupies a slot but carries no data.\n */\nexport type SegmentPrefetchResponse = {\n buildId: string\n data: Array<SegmentPrefetch | null>\n}\n\nexport type SegmentPrefetch = {\n rsc: React.ReactNode | null\n isPartial: boolean\n staleTime: number\n /**\n * The set of params that this segment's output depends on. Used by the client\n * cache to determine which entries can be reused across different param\n * values.\n * - `null` means vary params were not tracked (conservative: assume all\n * params matter)\n * - Empty set means no params were accessed (segment is reusable for any\n * param values)\n */\n varyParams: Set<string> | null\n}\n\n/**\n * Server-side equivalent of the client's SegmentBundle linked list. Each\n * node holds the RSC data and vary params for a segment whose data will\n * be bundled into a descendant's response. Flattened to an array only at\n * serialization time in renderSegmentPrefetch.\n */\ntype SegmentBundleNode = {\n rsc: React.ReactNode\n varyParams: Set<string> | null\n next: SegmentBundleNode | null\n}\n\nconst filterStackFrame =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .filterStackFrameDEV\n : undefined\nconst findSourceMapURL =\n process.env.NODE_ENV !== 'production'\n ? (require('../lib/source-maps') as typeof import('../lib/source-maps'))\n .findSourceMapURLDEV\n : undefined\n\nfunction onSegmentPrerenderError(error: unknown) {\n const digest = getDigestForWellKnownError(error)\n if (digest) {\n return digest\n }\n // We don't need to log the errors because we would have already done that\n // when generating the original Flight stream for the whole page.\n if (process.env.NEXT_DEBUG_BUILD || process.env.__NEXT_VERBOSE_LOGGING) {\n const workStore = workAsyncStorage.getStore()\n printDebugThrownValueForProspectiveRender(\n error,\n workStore?.route ?? 'unknown route',\n Phase.SegmentCollection\n )\n }\n}\n\n/**\n * Extract the FlightRouterState, seed data, and head from a prerendered\n * InitialRSCPayload. Returns null if the payload doesn't match the expected\n * shape (single path with 3 elements).\n */\nfunction extractFlightData(initialRSCPayload: InitialRSCPayload): {\n buildId: string | undefined\n flightRouterState: FlightRouterState\n seedData: CacheNodeSeedData\n head: HeadData\n} | null {\n const flightDataPaths = initialRSCPayload.f\n // FlightDataPath is an unsound type, hence the additional checks.\n if (flightDataPaths.length !== 1 && flightDataPaths[0].length !== 3) {\n console.error(\n 'Internal Next.js error: InitialRSCPayload does not match the expected ' +\n 'shape for a prerendered page during segment prefetch generation.'\n )\n return null\n }\n return {\n buildId: initialRSCPayload.b,\n flightRouterState: flightDataPaths[0][0],\n seedData: flightDataPaths[0][1],\n head: flightDataPaths[0][2],\n }\n}\n\nexport async function collectSegmentData(\n isCacheComponentsEnabled: boolean,\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n prefetchInlining: boolean,\n hints: PrefetchHints | null\n): Promise<Map<SegmentRequestKey, Buffer>> {\n // Traverse the router tree and generate a prefetch response for each segment.\n\n // A mutable map to collect the results as we traverse the route tree.\n const resultMap = new Map<SegmentRequestKey, Buffer>()\n\n // Before we start, warm up the module cache by decoding the page data once.\n // Then we can assume that any remaining async tasks that occur the next time\n // are due to hanging promises caused by dynamic data access. Note we only\n // have to do this once per page, not per individual segment.\n //\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Create an abort controller that we'll use to stop the stream.\n const abortController = new AbortController()\n const onCompletedProcessingRouteTree = async () => {\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // serializing the stream takes longer than a microtask, it must because of\n // hanging promises caused by dynamic data.\n await waitAtLeastOneReactRenderTask()\n abortController.abort()\n }\n\n // Generate a stream for the route tree prefetch. While we're walking the\n // tree, we'll also spawn additional tasks to generate the segment prefetches.\n // The promises for these tasks are pushed to a mutable array that we will\n // await once the route tree is fully rendered.\n const segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>> = []\n const { prelude: treeStream } = await prerender(\n // RootTreePrefetch is not a valid return type for a React component, but\n // we need to use a component so that when we decode the original stream\n // inside of it, the side effects are transferred to the new stream.\n // @ts-expect-error\n <PrefetchTreeData\n isClientParamParsingEnabled={isCacheComponentsEnabled}\n fullPageDataBuffer={fullPageDataBuffer}\n serverConsumerManifest={serverConsumerManifest}\n clientModules={clientModules}\n staleTime={staleTime}\n segmentTasks={segmentTasks}\n onCompletedProcessingRouteTree={onCompletedProcessingRouteTree}\n prefetchInlining={prefetchInlining}\n hints={hints}\n />,\n clientModules,\n {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n }\n )\n\n // Write the route tree to a special `/_tree` segment.\n const treeBuffer = await streamToBuffer(treeStream)\n resultMap.set('/_tree' as SegmentRequestKey, treeBuffer)\n\n // Also output the entire full page data response\n resultMap.set('/_full' as SegmentRequestKey, fullPageDataBuffer)\n\n // Now that we've finished rendering the route tree, all the segment tasks\n // should have been spawned. Await them in parallel and write the segment\n // prefetches to the result map.\n let hasPageSegment = false\n for (const [segmentPath, buffer] of await Promise.all(segmentTasks)) {\n resultMap.set(segmentPath, buffer)\n if (segmentPath.endsWith('__PAGE__')) {\n hasPageSegment = true\n }\n }\n\n if (!hasPageSegment) {\n // The build requires at least one segment path ending with __PAGE__ to\n // register the catch-all segment data route. When all page segments are\n // disabled (e.g. every leaf has runtime prefetching), no __PAGE__ entry\n // is emitted. Write a dummy entry with a path that doesn't match any\n // real route segment so the client will never request it.\n //\n // TODO: Remove the __PAGE__ requirement from the build instead of\n // working around it here. The invariant is outdated now that segments\n // can be disabled.\n resultMap.set(\n '/todo-remove-fake-segment/__PAGE__' as SegmentRequestKey,\n Buffer.alloc(0)\n )\n }\n\n return resultMap\n}\n\n/**\n * Compute prefetch hints for a route by measuring segment sizes and deciding\n * which segments should be inlined. Only runs at build time. The results are\n * written to prefetch-hints.json and loaded at server startup.\n *\n * This is a separate pass from collectSegmentData so that the inlining\n * decisions can be fed back into collectSegmentData to control which segments\n * are output as separate entries vs. inlined into their parent.\n */\nexport async function collectPrefetchHints(\n fullPageDataBuffer: Buffer,\n staleTime: number,\n clientModules: ManifestNode,\n serverConsumerManifest: any,\n maxSize: number,\n maxBundleSize: number\n): Promise<PrefetchHints> {\n // Warm up the module cache, same as collectSegmentData.\n try {\n await createFromReadableStream(streamFromBuffer(fullPageDataBuffer), {\n findSourceMapURL,\n serverConsumerManifest,\n })\n await waitAtLeastOneReactRenderTask()\n } catch {}\n\n // Decode the Flight data to walk the route tree.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return { hints: 0, slots: null }\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Measure the head (metadata/viewport) gzip size so the main traversal\n // can decide whether to inline it into a page's bundle.\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n const [, headBuffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules,\n null\n )\n const headGzipSize = await getGzipSize(headBuffer)\n\n // Mutable accumulator: the first segment that accepts the head sets this\n // to true. Once set, subsequent segments skip the check.\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment (since the runtime response already\n // includes it). Static pages are skipped to avoid duplication.\n const rootHints = flightRouterState[4] ?? 0\n const subtreeHasRuntimePrefetch =\n (rootHints & PrefetchHint.SubtreeHasRuntimePrefetch) !== 0\n const headInlineState = { inlined: false }\n\n // Walk the tree with the parent-first, child-decides algorithm.\n const { node } = await collectPrefetchHintsImpl(\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n null, // root has no parent to inline\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n subtreeHasRuntimePrefetch\n )\n\n if (!headInlineState.inlined) {\n // No page could accept the head. Set HeadOutlined on the root so the\n // client knows to fetch the head separately.\n node.hints |= PrefetchHint.HeadOutlined\n }\n\n return node\n}\n\n// Measure a segment's gzip size and decide whether it should be inlined.\n//\n// These hints are computed once during build and never change for the\n// lifetime of that deployment. The client can assume that hints delivered as\n// part of one request will be the same during a subsequent request, given\n// the same build ID. There's no skew to worry about as long as the build\n// itself is consistent.\n//\n// In the Segment Cache, we split page prefetches into multiple requests so\n// that each one can be cached and deduped independently. However, some\n// segments are small enough that the potential caching benefits are not worth\n// the additional network overhead. For these, we inline a parent's data into\n// one of its children's responses, avoiding a separate request. The parent\n// is inlined into the child (not the other way around) because the parent's\n// response is more likely to be shared across multiple pages. The child's\n// response is already page-specific, so adding the parent's data there\n// doesn't meaningfully reduce deduplication. It's similar to how JS bundlers\n// decide whether to inline a module into a chunk.\n//\n// The algorithm is parent-first, child-decides: the parent measures itself\n// and passes its gzip size down. Each child decides whether to accept. A\n// child rejects if the parent exceeds maxSize or if accepting would push\n// the cumulative inlined bytes past maxBundleSize. This produces\n// both ParentInlinedIntoSelf (on the child) and InlinedIntoChild (on the\n// parent) in a single pass.\nasync function collectPrefetchHintsImpl(\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n // TODO: Consider persisting the computed requestKey into the hints output\n // so it doesn't need to be recomputed during the build. This might also\n // suggest renaming prefetch-hints.json to something like\n // segment-manifest.json, since it would contain more than just hints.\n requestKey: SegmentRequestKey,\n parentGzipSize: number | null,\n maxSize: number,\n maxBundleSize: number,\n headGzipSize: number,\n headInlineState: { inlined: boolean },\n routeHasRuntimePrefetch: boolean\n): Promise<{\n node: PrefetchHints\n // Total inlined bytes accumulated along the deepest accepting path in this\n // subtree. Used by ancestors for budget checks.\n inlinedBytes: number\n}> {\n // Check if static prefetching is disabled for this segment (runtime\n // prefetch or unstable_instant = false). Such segments act as transparent\n // pass-throughs in the bundle chain: they contribute zero bytes of their\n // own and pass parent data through to children. However, they cannot be\n // the terminal of a chain — if no child accepts the parent data, the\n // parent cannot be inlined into this segment because there's no static\n // response to carry it. See the ParentInlinedIntoSelf check below.\n const isStaticPrefetchDisabled =\n ((route[4] ?? 0) & StaticPrefetchDisabled) !== 0\n\n // Render current segment and measure its gzip size. Skip measurement for\n // segments with static prefetching disabled since they contribute nothing.\n let currentGzipSize: number | null = null\n if (!isStaticPrefetchDisabled && seedData !== null) {\n const varyParamsThenable = seedData[4]\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n const [, buffer] = await renderSegmentPrefetch(\n buildId,\n staleTime,\n seedData[0],\n requestKey,\n varyParams,\n clientModules,\n null\n )\n currentGzipSize = await getGzipSize(buffer)\n }\n\n // Only offer this segment to its children for inlining if its gzip size\n // is below maxSize. Segments with static prefetching disabled have\n // nothing to offer (their slot in the bundle is null).\n const sizeToInline =\n currentGzipSize !== null && currentGzipSize < maxSize\n ? currentGzipSize\n : null\n\n // Process children serially (not in parallel) to ensure deterministic\n // results. Since this only runs at build time and the rendering is just\n // re-encoding cached prerenders, this won't impact build times. Each child\n // receives our gzip size and decides whether to inline us. Once a child\n // accepts, we stop offering to remaining siblings — the parent is only\n // inlined into one child. In parallel routes, this avoids duplicating the\n // parent's data across multiple sibling responses.\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n\n let slots: Record<string, PrefetchHints> | null = null\n let didInlineIntoChild = false\n let acceptingChildInlinedBytes = 0\n // Track the smallest inlinedBytes across all children so we know how much\n // budget remains along the best path. When our own parent asks whether we\n // can accept its data, the parent's bytes would flow through to the child\n // with the most remaining headroom.\n let smallestChildInlinedBytes = Infinity\n let hasChildren = false\n\n for (const parallelRouteKey in children) {\n hasChildren = true\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n\n // Determine what size to offer children for inlining. Normally we offer\n // our own size. But if static prefetching is disabled for this segment,\n // it has no data of its own — instead it passes the parent's offer\n // through to children. This allows a static grandparent to inline\n // through a disabled intermediate segment into a static grandchild.\n const sizeToOfferChild = isStaticPrefetchDisabled\n ? parentGzipSize\n : sizeToInline\n\n const childResult = await collectPrefetchHintsImpl(\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n // Once a child has accepted us, stop offering to remaining siblings.\n didInlineIntoChild ? null : sizeToOfferChild,\n maxSize,\n maxBundleSize,\n headGzipSize,\n headInlineState,\n routeHasRuntimePrefetch\n )\n\n if (slots === null) {\n slots = {}\n }\n slots[parallelRouteKey] = childResult.node\n\n if (childResult.node.hints & PrefetchHint.ParentInlinedIntoSelf) {\n // This child accepted our data — it will include our segment's\n // response in its own. No need to track headroom anymore since\n // we already know which child we're inlined into.\n didInlineIntoChild = true\n acceptingChildInlinedBytes = childResult.inlinedBytes\n } else if (!didInlineIntoChild) {\n // Track the child with the most remaining headroom. Used below\n // when deciding whether to accept our own parent's data.\n if (childResult.inlinedBytes < smallestChildInlinedBytes) {\n smallestChildInlinedBytes = childResult.inlinedBytes\n }\n }\n }\n\n // Leaf segment: no children have consumed any budget yet.\n if (!hasChildren) {\n smallestChildInlinedBytes = 0\n }\n\n // Mark this segment as InlinedIntoChild if one of its children accepted.\n // This means this segment doesn't need its own prefetch response — its\n // data is included in the accepting child's response instead.\n let hints = 0\n if (didInlineIntoChild) {\n hints |= PrefetchHint.InlinedIntoChild\n }\n\n // inlinedBytes represents the total gzipped bytes of parent data inlined\n // into the deepest \"inlining target\" along this branch. It starts at 0 at\n // the leaves and grows as parents are inlined going back up the tree. If a\n // child accepted us, our size is already counted in that child's value.\n let inlinedBytes = didInlineIntoChild\n ? acceptingChildInlinedBytes\n : smallestChildInlinedBytes\n\n // Determine which segment is responsible for the head (metadata/viewport).\n //\n // When the route has any runtime prefetch segment, the head is only\n // assigned to a runtime segment — the runtime response already includes\n // the head, so assigning it to a static page would duplicate it.\n //\n // When the route has no runtime prefetch segments, the head is assigned\n // to the first static page terminal that has budget room. Head can only\n // be inlined into a page, not a layout, because pages may access\n // additional params (e.g. searchParams) that layouts cannot.\n //\n // A disabled segment with PrefetchDisabled (instant = false) is never a\n // valid target — it has no response at all.\n const hasRuntimePrefetch =\n ((route[4] ?? 0) & PrefetchHint.HasRuntimePrefetch) !== 0\n const isBundleTerminal = !didInlineIntoChild && !isStaticPrefetchDisabled\n const segment = route[0]\n const isPageSegment =\n typeof segment === 'string'\n ? segment === PAGE_SEGMENT_KEY\n : segment[0] === PAGE_SEGMENT_KEY\n if (!headInlineState.inlined) {\n if (hasRuntimePrefetch) {\n // Runtime prefetch segment — the runtime response includes the head.\n // No budget cost since it's already part of that response.\n hints |= PrefetchHint.HeadInlinedIntoSelf\n headInlineState.inlined = true\n } else if (isBundleTerminal && isPageSegment && !routeHasRuntimePrefetch) {\n // Static page terminal — only used when no runtime segments exist.\n // The head counts against the bundle budget.\n if (inlinedBytes + headGzipSize < maxBundleSize) {\n hints |= PrefetchHint.HeadInlinedIntoSelf\n inlinedBytes += headGzipSize\n headInlineState.inlined = true\n }\n }\n }\n\n // Decide whether to accept our own parent's data. Conditions:\n //\n // 1. The parent offered us a size (parentGzipSize is not null). It's null\n // when the parent is too large to inline or when this is the root.\n //\n // 2. The total inlined bytes along this branch wouldn't exceed the budget.\n // Even if each segment is individually small, at some point it no\n // longer makes sense to keep adding bytes because the combined response\n // is unique per URL and can't be deduped.\n //\n // 3. If this segment has static prefetching disabled, it can only accept\n // the parent if it has successfully inlined into a child. A disabled\n // segment is a transparent pass-through — it passes parent data through\n // to descendants. But if no descendant accepted, there's no static\n // response to carry the parent's data, so the parent must remain\n // outlined.\n //\n // A node can be both InlinedIntoChild and ParentInlinedIntoSelf. This\n // happens in multi-level chains: GP → P → C where all are small. C\n // accepts P (P is InlinedIntoChild), then P also accepts GP (P is\n // ParentInlinedIntoSelf). The result: C's response includes both P's\n // and GP's data. The parent's data flows through to the deepest\n // accepting descendant.\n if (parentGzipSize !== null) {\n // A disabled segment can only pass through — it needs a child to\n // ultimately accept the parent's data.\n const canAcceptParent = !isStaticPrefetchDisabled || didInlineIntoChild\n if (canAcceptParent && inlinedBytes + parentGzipSize < maxBundleSize) {\n hints |= PrefetchHint.ParentInlinedIntoSelf\n inlinedBytes += parentGzipSize\n }\n }\n\n return {\n node: { hints, slots },\n inlinedBytes,\n }\n}\n\n// We use gzip size rather than raw size because it better reflects the actual\n// transfer cost. The inlining trade-off is about whether the overhead of an\n// additional HTTP request (connection setup, headers, round trip) is worth\n// the deduplication benefit of keeping a segment separate. Below some\n// compressed size, the request overhead dominates and inlining is better.\n// Above it, the deduplication benefit of a cacheable standalone response\n// wins out.\nasync function getGzipSize(buffer: Buffer): Promise<number> {\n const stream = new Blob([new Uint8Array(buffer)])\n .stream()\n .pipeThrough(new CompressionStream('gzip'))\n const compressedBlob = await new Response(stream).blob()\n return compressedBlob.size\n}\n\nasync function PrefetchTreeData({\n isClientParamParsingEnabled,\n fullPageDataBuffer,\n serverConsumerManifest,\n clientModules,\n staleTime,\n segmentTasks,\n onCompletedProcessingRouteTree,\n prefetchInlining,\n hints,\n}: {\n isClientParamParsingEnabled: boolean\n fullPageDataBuffer: Buffer\n serverConsumerManifest: any\n clientModules: ManifestNode\n staleTime: number\n segmentTasks: Array<Promise<[SegmentRequestKey, Buffer]>>\n onCompletedProcessingRouteTree: () => void\n prefetchInlining: boolean\n hints: PrefetchHints | null\n}): Promise<RootTreePrefetch | null> {\n // We're currently rendering a Flight response for the route tree prefetch.\n // Inside this component, decode the Flight stream for the whole page. This is\n // a hack to transfer the side effects from the original Flight stream (e.g.\n // Float preloads) onto the Flight stream for the tree prefetch.\n // TODO: React needs a better way to do this. Needed for Server Actions, too.\n const initialRSCPayload: InitialRSCPayload = await createFromReadableStream(\n createUnclosingPrefetchStream(streamFromBuffer(fullPageDataBuffer)),\n {\n findSourceMapURL,\n serverConsumerManifest,\n }\n )\n\n const flightData = extractFlightData(initialRSCPayload)\n if (flightData === null) {\n return null\n }\n const { buildId, flightRouterState, seedData, head } = flightData\n\n // Extract the head vary params from the decoded response.\n // The head vary params thenable should be fulfilled by now; if not, treat\n // as unknown (null).\n const headVaryParamsThenable = initialRSCPayload.h\n const headVaryParams =\n headVaryParamsThenable !== null\n ? readVaryParams(headVaryParamsThenable)\n : null\n\n // Only applies when prefetch inlining is enabled — the client doesn't\n // know to look for the head inside a page's response otherwise.\n const headIsInlined =\n prefetchInlining &&\n hints !== null &&\n !(hints.hints & PrefetchHint.HeadOutlined)\n\n // Compute the route metadata tree by traversing the FlightRouterState. As we\n // walk the tree, we will also spawn a task to produce a prefetch response for\n // each segment. When prefetch inlining is enabled, small segments are bundled\n // into their children's responses based on the hint bits.\n const headBundle: SegmentBundleNode | null = headIsInlined\n ? { rsc: head, varyParams: headVaryParams, next: null }\n : null\n const tree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n flightRouterState,\n buildId,\n staleTime,\n seedData,\n clientModules,\n ROOT_SEGMENT_REQUEST_KEY,\n segmentTasks,\n prefetchInlining,\n hints,\n null,\n headBundle\n )\n\n // Spawn a task to produce a prefetch response for the \"head\" segment,\n // unless it was inlined into a page's bundle.\n if (!headIsInlined) {\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n head,\n HEAD_REQUEST_KEY,\n headVaryParams,\n clientModules,\n null\n )\n )\n )\n }\n\n // Notify the abort controller that we're done processing the route tree.\n // Anything async that happens after this point must be due to hanging\n // promises in the original stream.\n onCompletedProcessingRouteTree()\n\n // Render the route tree to a special `/_tree` segment.\n const treePrefetch: RootTreePrefetch = {\n tree,\n staleTime,\n }\n if (buildId) {\n treePrefetch.buildId = buildId\n }\n return treePrefetch\n}\n\nfunction collectSegmentDataImpl(\n isClientParamParsingEnabled: boolean,\n route: FlightRouterState,\n buildId: string | undefined,\n staleTime: number,\n seedData: CacheNodeSeedData | null,\n clientModules: ManifestNode,\n requestKey: SegmentRequestKey,\n segmentTasks: Array<Promise<[string, Buffer]>>,\n prefetchInlining: boolean,\n hintTree: PrefetchHints | null,\n parentBundle: SegmentBundleNode | null,\n headBundle: SegmentBundleNode | null\n): TreePrefetch {\n // Union the hints already embedded in the FlightRouterState with the\n // separately-computed build-time hints. During the initial build, the\n // FlightRouterState was produced before collectPrefetchHints ran, so\n // inlining hints (ParentInlinedIntoSelf, InlinedIntoChild) won't be in\n // route[4] yet. On subsequent renders the hints are already in the\n // FlightRouterState, so the union is idempotent.\n //\n // Always strip InliningHintsStale from the result. That bit is only\n // relevant for the initial RSC payload baked into HTML — the /_tree\n // response produced here always has correct hints, so the client should\n // never see InliningHintsStale in a /_tree response.\n const prefetchHints =\n ((route[4] ?? 0) | (hintTree !== null ? hintTree.hints : 0)) &\n ~PrefetchHint.InliningHintsStale\n\n // Determine which params this segment varies on.\n const varyParamsThenable = seedData !== null ? seedData[4] : null\n const varyParams =\n varyParamsThenable !== null ? readVaryParams(varyParamsThenable) : null\n\n // If static prefetching is disabled for this segment (runtime prefetch or\n // instant = false), it still participates in the bundle chain but with\n // null data. The client will skip creating a cache entry for it.\n const staticPrefetchDisabled = (prefetchHints & StaticPrefetchDisabled) !== 0\n const rsc = seedData !== null && !staticPrefetchDisabled ? seedData[0] : null\n\n // Determine whether this segment's data should be accumulated into a\n // child's response (inlining) or spawned as its own task. When inlining\n // is disabled, the hint bits may still be set (they're computed at build\n // time regardless) but we ignore them — every segment is rendered\n // standalone because the client doesn't know how to parse bundled\n // responses.\n let childBundle: SegmentBundleNode | null = null\n if (prefetchInlining && prefetchHints & PrefetchHint.InlinedIntoChild) {\n // This segment is small enough that its data will be included in one\n // of its children's responses. Don't spawn a separate task — prepend\n // this segment's data onto the linked list so the accepting child can\n // bundle it into its response.\n if (seedData !== null) {\n childBundle = {\n rsc,\n varyParams,\n next: parentBundle,\n }\n }\n } else {\n // This segment is not inlined into a child. Spawn a task to render it.\n // If it has ParentInlinedIntoSelf, the accumulated parents are included\n // in its response. Otherwise parentBundle is null and it renders as a\n // standalone single-segment response.\n //\n // Skip spawning a task if rsc is null (disabled segment) — there's no\n // data to serve and the client won't request it.\n if (seedData !== null && rsc !== null) {\n let bundle =\n prefetchHints & PrefetchHint.ParentInlinedIntoSelf ? parentBundle : null\n // If this page accepts the head, append it at the tail of the chain.\n if (\n headBundle !== null &&\n prefetchHints & PrefetchHint.HeadInlinedIntoSelf\n ) {\n headBundle.next = bundle\n bundle = headBundle\n }\n segmentTasks.push(\n waitAtLeastOneReactRenderTask().then(() =>\n renderSegmentPrefetch(\n buildId,\n staleTime,\n rsc,\n requestKey,\n varyParams,\n clientModules,\n bundle\n )\n )\n )\n }\n // childBundle stays null — reset the accumulator for children.\n }\n\n // Metadata about the segment. Sent as part of the tree prefetch. Null if\n // there are no children.\n let slotMetadata: { [parallelRouteKey: string]: TreePrefetch } | null = null\n\n const children = route[1]\n const seedDataChildren = seedData !== null ? seedData[1] : null\n for (const parallelRouteKey in children) {\n const childRoute = children[parallelRouteKey]\n const childSegment = childRoute[0]\n const childSeedData =\n seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null\n\n const childRequestKey = appendSegmentRequestKeyPart(\n requestKey,\n parallelRouteKey,\n createSegmentRequestKeyPart(childSegment)\n )\n const childHintTree =\n hintTree !== null && hintTree.slots !== null\n ? (hintTree.slots[parallelRouteKey] ?? null)\n : null\n const childTree = collectSegmentDataImpl(\n isClientParamParsingEnabled,\n childRoute,\n buildId,\n staleTime,\n childSeedData,\n clientModules,\n childRequestKey,\n segmentTasks,\n prefetchInlining,\n childHintTree,\n childBundle,\n headBundle\n )\n if (slotMetadata === null) {\n slotMetadata = {}\n }\n slotMetadata[parallelRouteKey] = childTree\n }\n\n const segment = route[0]\n let name: string\n let param: TreePrefetchParam | null\n if (typeof segment === 'string') {\n name = segment\n param = null\n } else {\n name = segment[0]\n param = {\n type: segment[2],\n // This value is omitted from the prefetch response when cacheComponents\n // is enabled.\n key: isClientParamParsingEnabled ? null : segment[1],\n siblings: segment[3],\n }\n }\n\n // Metadata about the segment. Sent to the client as part of the\n // tree prefetch.\n return {\n name,\n param,\n prefetchHints,\n slots: slotMetadata,\n }\n}\n\nasync function renderSegmentPrefetch(\n buildId: string | undefined,\n staleTime: number,\n rsc: React.ReactNode,\n requestKey: SegmentRequestKey,\n varyParams: Set<string> | null,\n clientModules: ManifestNode,\n bundle: SegmentBundleNode | null\n): Promise<[SegmentRequestKey, Buffer]> {\n // Build the SegmentPrefetch for the terminal (requested) segment.\n // The terminal always has non-null rsc data — disabled segments are\n // skipped by the caller and don't reach this function.\n const selfPrefetch: SegmentPrefetch = {\n rsc,\n isPartial: await isPartialRSCData(rsc, clientModules),\n staleTime,\n varyParams,\n }\n\n // Build the data array. Always an array, even for a single segment.\n const data: Array<SegmentPrefetch | null> = [selfPrefetch]\n if (bundle !== null) {\n // Walk the bundle linked list and append each entry to the array.\n let node: SegmentBundleNode | null = bundle\n while (node !== null) {\n if (node.rsc !== null) {\n data.push({\n rsc: node.rsc,\n isPartial: await isPartialRSCData(node.rsc, clientModules),\n staleTime,\n varyParams: node.varyParams,\n })\n } else {\n // This segment has static prefetching disabled (runtime prefetch\n // or instant = false). Emit null as a placeholder so the array\n // indices stay aligned with the client's SegmentBundle linked\n // list. The client will skip creating a cache entry for this slot.\n data.push(null)\n }\n node = node.next\n }\n }\n\n // Wrap in the response envelope with the build ID at the top level.\n const payload: SegmentPrefetchResponse = {\n buildId: buildId ?? '',\n data,\n }\n // Since all we're doing is decoding and re-encoding a cached prerender, if\n // it takes longer than a microtask, it must because of hanging promises\n // caused by dynamic data. Abort the stream at the end of the current task.\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => abortController.abort())\n const { prelude: segmentStream } = await prerender(payload, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError: onSegmentPrerenderError,\n })\n const segmentBuffer = await streamToBuffer(segmentStream)\n if (requestKey === ROOT_SEGMENT_REQUEST_KEY) {\n return ['/_index' as SegmentRequestKey, segmentBuffer]\n } else {\n return [requestKey, segmentBuffer]\n }\n}\n\nasync function isPartialRSCData(\n rsc: React.ReactNode,\n clientModules: ManifestNode\n): Promise<boolean> {\n // We can determine if a segment contains only partial data if it takes longer\n // than a task to encode, because dynamic data is encoded as an infinite\n // promise. We must do this in a separate Flight prerender from the one that\n // actually generates the prefetch stream because we need to include\n // `isPartial` in the stream itself.\n let isPartial = false\n const abortController = new AbortController()\n waitAtLeastOneReactRenderTask().then(() => {\n // If we haven't yet finished the outer task, then it must be because we\n // accessed dynamic data.\n isPartial = true\n abortController.abort()\n })\n await prerender(rsc, clientModules, {\n filterStackFrame,\n signal: abortController.signal,\n onError() {},\n })\n return isPartial\n}\n\nfunction createUnclosingPrefetchStream(\n originalFlightStream: ReadableStream<Uint8Array>\n): ReadableStream<Uint8Array> {\n // When PPR is enabled, prefetch streams may contain references that never\n // resolve, because that's how we encode dynamic data access. In the decoded\n // object returned by the Flight client, these are reified into hanging\n // promises that suspend during render, which is effectively what we want.\n // The UI resolves when it switches to the dynamic data stream\n // (via useDeferredValue(dynamic, static)).\n //\n // However, the Flight implementation currently errors if the server closes\n // the response before all the references are resolved. As a cheat to work\n // around this, we wrap the original stream in a new stream that never closes,\n // and therefore doesn't error.\n const reader = originalFlightStream.getReader()\n return new ReadableStream({\n async pull(controller) {\n while (true) {\n const { done, value } = await reader.read()\n if (!done) {\n // Pass to the target stream and keep consuming the Flight response\n // from the server.\n controller.enqueue(value)\n continue\n }\n // The server stream has closed. Exit, but intentionally do not close\n // the target stream.\n return\n }\n },\n })\n}\n"],"names":["collectPrefetchHints","collectSegmentData","filterStackFrame","process","env","NODE_ENV","require","filterStackFrameDEV","undefined","findSourceMapURL","findSourceMapURLDEV","onSegmentPrerenderError","error","digest","getDigestForWellKnownError","NEXT_DEBUG_BUILD","__NEXT_VERBOSE_LOGGING","workStore","workAsyncStorage","getStore","printDebugThrownValueForProspectiveRender","route","Phase","SegmentCollection","extractFlightData","initialRSCPayload","flightDataPaths","f","length","console","buildId","b","flightRouterState","seedData","head","isCacheComponentsEnabled","fullPageDataBuffer","staleTime","clientModules","serverConsumerManifest","prefetchInlining","hints","resultMap","Map","createFromReadableStream","streamFromBuffer","waitAtLeastOneReactRenderTask","abortController","AbortController","onCompletedProcessingRouteTree","abort","segmentTasks","prelude","treeStream","prerender","PrefetchTreeData","isClientParamParsingEnabled","signal","onError","treeBuffer","streamToBuffer","set","hasPageSegment","segmentPath","buffer","Promise","all","endsWith","Buffer","alloc","maxSize","maxBundleSize","createUnclosingPrefetchStream","flightData","slots","headVaryParamsThenable","h","headVaryParams","readVaryParams","headBuffer","renderSegmentPrefetch","HEAD_REQUEST_KEY","headGzipSize","getGzipSize","rootHints","subtreeHasRuntimePrefetch","PrefetchHint","SubtreeHasRuntimePrefetch","headInlineState","inlined","node","collectPrefetchHintsImpl","ROOT_SEGMENT_REQUEST_KEY","HeadOutlined","requestKey","parentGzipSize","routeHasRuntimePrefetch","isStaticPrefetchDisabled","StaticPrefetchDisabled","currentGzipSize","varyParamsThenable","varyParams","sizeToInline","children","seedDataChildren","didInlineIntoChild","acceptingChildInlinedBytes","smallestChildInlinedBytes","Infinity","hasChildren","parallelRouteKey","childRoute","childSegment","childSeedData","childRequestKey","appendSegmentRequestKeyPart","createSegmentRequestKeyPart","sizeToOfferChild","childResult","ParentInlinedIntoSelf","inlinedBytes","InlinedIntoChild","hasRuntimePrefetch","HasRuntimePrefetch","isBundleTerminal","segment","isPageSegment","PAGE_SEGMENT_KEY","HeadInlinedIntoSelf","canAcceptParent","stream","Blob","Uint8Array","pipeThrough","CompressionStream","compressedBlob","Response","blob","size","headIsInlined","headBundle","rsc","next","tree","collectSegmentDataImpl","push","then","treePrefetch","hintTree","parentBundle","prefetchHints","InliningHintsStale","staticPrefetchDisabled","childBundle","bundle","slotMetadata","childHintTree","childTree","name","param","type","key","siblings","selfPrefetch","isPartial","isPartialRSCData","data","payload","segmentStream","segmentBuffer","originalFlightStream","reader","getReader","ReadableStream","pull","controller","done","value","read","enqueue"],"mappings":"AAAA,6GAA6G;;;;;;;;;;;;;;;IAmSvFA,oBAAoB;eAApBA;;IAhHAC,kBAAkB;eAAlBA;;;;gCAvKf;oCACwB;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AgBU,MAAM;QAC9BC,YAAW;IACb;IACA,OAAO0G;AACT;AAEA,SAAS5F,8BACPkG,oBAAgD;IAEhD,0EAA0E;IAC1E,4EAA4E;IAC5E,uEAAuE;IACvE,0EAA0E;IAC1E,8DAA8D;IAC9D,2CAA2C;IAC3C,EAAE;IACF,2EAA2E;IAC3E,0EAA0E;IAC1E,8EAA8E;IAC9E,+BAA+B;IAC/B,MAAMC,SAASD,qBAAqBE,SAAS;IAC7C,OAAO,IAAIC,eAAe;QACxB,MAAMC,MAAKC,UAAU;YACnB,MAAO,KAAM;gBACX,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAG,MAAMN,OAAOO,IAAI;gBACzC,IAAI,CAACF,MAAM;oBACT,mEAAmE;oBACnE,mBAAmB;oBACnBD,WAAWI,OAAO,CAACF;oBACnB;gBACF;gBACA,qEAAqE;gBACrE,qBAAqB;gBACrB;YACF;QACF;IACF;AACF","ignoreList":[0]}

@@ -88,3 +88,3 @@ "use strict";

}
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.2.1-canary.8"}`))}${versionSuffix}`);
_log.bootstrap(`${(0, _picocolors.bold)((0, _picocolors.purple)(`${_log.prefixes.ready} Next.js ${"16.2.1-canary.9"}`))}${versionSuffix}`);
if (appUrl) {

@@ -91,0 +91,0 @@ _log.bootstrap(`- Local: ${appUrl}`);

@@ -181,3 +181,3 @@ // Start CPU profile if it wasn't already started.

let { port } = serverOptions;
process.title = `next-server (v${"16.2.1-canary.8"})`;
process.title = `next-server (v${"16.2.1-canary.9"})`;
let handlersReady = ()=>{};

@@ -184,0 +184,0 @@ let handlersError = ()=>{};

@@ -24,3 +24,3 @@ "use strict";

function isStableBuild() {
return !"16.2.1-canary.8"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
return !"16.2.1-canary.9"?.includes('canary') && !process.env.__NEXT_TEST_MODE && !process.env.NEXT_PRIVATE_LOCAL_DEV;
}

@@ -27,0 +27,0 @@ class CanaryOnlyConfigError extends Error {

@@ -84,3 +84,3 @@ "use strict";

ciName: _ciinfo.isCI && _ciinfo.name || null,
nextVersion: "16.2.1-canary.8"
nextVersion: "16.2.1-canary.9"
};

@@ -87,0 +87,0 @@ return traits;

@@ -14,7 +14,7 @@ "use strict";

// This should be an invariant, if it fails our build tooling is broken.
if (typeof "16.2.1-canary.8" !== 'string') {
if (typeof "16.2.1-canary.9" !== 'string') {
return [];
}
const payload = {
nextVersion: "16.2.1-canary.8",
nextVersion: "16.2.1-canary.9",
nodeVersion: process.version,

@@ -21,0 +21,0 @@ cliCommand: event.cliCommand,

@@ -41,3 +41,3 @@ "use strict";

payload: {
nextVersion: "16.2.1-canary.8",
nextVersion: "16.2.1-canary.9",
glibcVersion,

@@ -44,0 +44,0 @@ installedSwcPackages,

@@ -15,3 +15,3 @@ "use strict";

// This should be an invariant, if it fails our build tooling is broken.
if (typeof "16.2.1-canary.8" !== 'string') {
if (typeof "16.2.1-canary.9" !== 'string') {
return [];

@@ -21,3 +21,3 @@ }

const payload = {
nextVersion: "16.2.1-canary.8",
nextVersion: "16.2.1-canary.9",
nodeVersion: process.version,

@@ -24,0 +24,0 @@ cliCommand: event.cliCommand,

{
"name": "next",
"version": "16.2.1-canary.8",
"version": "16.2.1-canary.9",
"description": "The React Framework",

@@ -100,3 +100,3 @@ "main": "./dist/server/next.js",

"dependencies": {
"@next/env": "16.2.1-canary.8",
"@next/env": "16.2.1-canary.9",
"@swc/helpers": "0.5.15",

@@ -132,10 +132,10 @@ "baseline-browser-mapping": "^2.9.19",

"sharp": "^0.34.5",
"@next/swc-darwin-arm64": "16.2.1-canary.8",
"@next/swc-darwin-x64": "16.2.1-canary.8",
"@next/swc-linux-arm64-gnu": "16.2.1-canary.8",
"@next/swc-linux-arm64-musl": "16.2.1-canary.8",
"@next/swc-linux-x64-gnu": "16.2.1-canary.8",
"@next/swc-linux-x64-musl": "16.2.1-canary.8",
"@next/swc-win32-arm64-msvc": "16.2.1-canary.8",
"@next/swc-win32-x64-msvc": "16.2.1-canary.8"
"@next/swc-darwin-arm64": "16.2.1-canary.9",
"@next/swc-darwin-x64": "16.2.1-canary.9",
"@next/swc-linux-arm64-gnu": "16.2.1-canary.9",
"@next/swc-linux-arm64-musl": "16.2.1-canary.9",
"@next/swc-linux-x64-gnu": "16.2.1-canary.9",
"@next/swc-linux-x64-musl": "16.2.1-canary.9",
"@next/swc-win32-arm64-msvc": "16.2.1-canary.9",
"@next/swc-win32-x64-msvc": "16.2.1-canary.9"
},

@@ -174,7 +174,7 @@ "devDependencies": {

"@napi-rs/triples": "1.2.0",
"@next/font": "16.2.1-canary.8",
"@next/polyfill-module": "16.2.1-canary.8",
"@next/polyfill-nomodule": "16.2.1-canary.8",
"@next/react-refresh-utils": "16.2.1-canary.8",
"@next/swc": "16.2.1-canary.8",
"@next/font": "16.2.1-canary.9",
"@next/polyfill-module": "16.2.1-canary.9",
"@next/polyfill-nomodule": "16.2.1-canary.9",
"@next/react-refresh-utils": "16.2.1-canary.9",
"@next/swc": "16.2.1-canary.9",
"@opentelemetry/api": "1.6.0",

@@ -181,0 +181,0 @@ "@playwright/test": "1.58.2",

self.__BUILD_MANIFEST = {
"__rewrites": {
"afterFiles": [],
"beforeFiles": [],
"fallback": []
},
"sortedPages": [
"/_app",
"/_error"
]
};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()
self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display