agent-session-inspector 0.0.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1235) hide show
  1. package/README.md +270 -2
  2. package/VERSION +1 -0
  3. package/app/.next/BUILD_ID +1 -0
  4. package/app/.next/app-path-routes-manifest.json +13 -0
  5. package/app/.next/build-manifest.json +24 -0
  6. package/app/.next/package.json +1 -0
  7. package/app/.next/prerender-manifest.json +129 -0
  8. package/app/.next/required-server-files.json +361 -0
  9. package/app/.next/routes-manifest.json +118 -0
  10. package/app/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  11. package/app/.next/server/app/_global-error/page/build-manifest.json +20 -0
  12. package/app/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  13. package/app/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  14. package/app/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  15. package/app/.next/server/app/_global-error/page.js +9 -0
  16. package/app/.next/server/app/_global-error/page.js.map +5 -0
  17. package/app/.next/server/app/_global-error/page.js.nft.json +1 -0
  18. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  19. package/app/.next/server/app/_global-error.html +1 -0
  20. package/app/.next/server/app/_global-error.meta +22 -0
  21. package/app/.next/server/app/_global-error.rsc +15 -0
  22. package/app/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +20 -0
  23. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +15 -0
  24. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  25. package/app/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  26. package/app/.next/server/app/_not-found/page/build-manifest.json +20 -0
  27. package/app/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
  28. package/app/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  29. package/app/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  30. package/app/.next/server/app/_not-found/page.js +12 -0
  31. package/app/.next/server/app/_not-found/page.js.map +5 -0
  32. package/app/.next/server/app/_not-found/page.js.nft.json +1 -0
  33. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  34. package/app/.next/server/app/_not-found.html +1 -0
  35. package/app/.next/server/app/_not-found.meta +27 -0
  36. package/app/.next/server/app/_not-found.rsc +21 -0
  37. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +21 -0
  38. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +27 -0
  39. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
  40. package/app/.next/server/app/api/analytics/route/app-paths-manifest.json +3 -0
  41. package/app/.next/server/app/api/analytics/route/build-manifest.json +12 -0
  42. package/app/.next/server/app/api/analytics/route/server-reference-manifest.json +4 -0
  43. package/app/.next/server/app/api/analytics/route.js +7 -0
  44. package/app/.next/server/app/api/analytics/route.js.map +5 -0
  45. package/app/.next/server/app/api/analytics/route.js.nft.json +1 -0
  46. package/app/.next/server/app/api/analytics/route_client-reference-manifest.js +3 -0
  47. package/app/.next/server/app/api/logs/route/app-paths-manifest.json +3 -0
  48. package/app/.next/server/app/api/logs/route/build-manifest.json +12 -0
  49. package/app/.next/server/app/api/logs/route/server-reference-manifest.json +4 -0
  50. package/app/.next/server/app/api/logs/route.js +7 -0
  51. package/app/.next/server/app/api/logs/route.js.map +5 -0
  52. package/app/.next/server/app/api/logs/route.js.nft.json +1 -0
  53. package/app/.next/server/app/api/logs/route_client-reference-manifest.js +3 -0
  54. package/app/.next/server/app/api/providers/route/app-paths-manifest.json +3 -0
  55. package/app/.next/server/app/api/providers/route/build-manifest.json +12 -0
  56. package/app/.next/server/app/api/providers/route/server-reference-manifest.json +4 -0
  57. package/app/.next/server/app/api/providers/route.js +7 -0
  58. package/app/.next/server/app/api/providers/route.js.map +5 -0
  59. package/app/.next/server/app/api/providers/route.js.nft.json +1 -0
  60. package/app/.next/server/app/api/providers/route_client-reference-manifest.js +3 -0
  61. package/app/.next/server/app/api/search/route/app-paths-manifest.json +3 -0
  62. package/app/.next/server/app/api/search/route/build-manifest.json +12 -0
  63. package/app/.next/server/app/api/search/route/server-reference-manifest.json +4 -0
  64. package/app/.next/server/app/api/search/route.js +8 -0
  65. package/app/.next/server/app/api/search/route.js.map +5 -0
  66. package/app/.next/server/app/api/search/route.js.nft.json +1 -0
  67. package/app/.next/server/app/api/search/route_client-reference-manifest.js +3 -0
  68. package/app/.next/server/app/api/sessions/[provider]/[id]/route/app-paths-manifest.json +3 -0
  69. package/app/.next/server/app/api/sessions/[provider]/[id]/route/build-manifest.json +12 -0
  70. package/app/.next/server/app/api/sessions/[provider]/[id]/route/server-reference-manifest.json +4 -0
  71. package/app/.next/server/app/api/sessions/[provider]/[id]/route.js +7 -0
  72. package/app/.next/server/app/api/sessions/[provider]/[id]/route.js.map +5 -0
  73. package/app/.next/server/app/api/sessions/[provider]/[id]/route.js.nft.json +1 -0
  74. package/app/.next/server/app/api/sessions/[provider]/[id]/route_client-reference-manifest.js +3 -0
  75. package/app/.next/server/app/api/sessions/route/app-paths-manifest.json +3 -0
  76. package/app/.next/server/app/api/sessions/route/build-manifest.json +12 -0
  77. package/app/.next/server/app/api/sessions/route/server-reference-manifest.json +4 -0
  78. package/app/.next/server/app/api/sessions/route.js +7 -0
  79. package/app/.next/server/app/api/sessions/route.js.map +5 -0
  80. package/app/.next/server/app/api/sessions/route.js.nft.json +1 -0
  81. package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +3 -0
  82. package/app/.next/server/app/favicon.ico/route/app-paths-manifest.json +3 -0
  83. package/app/.next/server/app/favicon.ico/route/build-manifest.json +12 -0
  84. package/app/.next/server/app/favicon.ico/route.js +7 -0
  85. package/app/.next/server/app/favicon.ico/route.js.map +5 -0
  86. package/app/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  87. package/app/.next/server/app/favicon.ico.body +0 -0
  88. package/app/.next/server/app/favicon.ico.meta +1 -0
  89. package/app/.next/server/app/index.html +1 -0
  90. package/app/.next/server/app/index.meta +21 -0
  91. package/app/.next/server/app/index.rsc +25 -0
  92. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +28 -0
  93. package/app/.next/server/app/index.segments/_full.segment.rsc +25 -0
  94. package/app/.next/server/app/index.segments/_tree.segment.rsc +5 -0
  95. package/app/.next/server/app/page/app-paths-manifest.json +3 -0
  96. package/app/.next/server/app/page/build-manifest.json +20 -0
  97. package/app/.next/server/app/page/next-font-manifest.json +11 -0
  98. package/app/.next/server/app/page/react-loadable-manifest.json +1 -0
  99. package/app/.next/server/app/page/server-reference-manifest.json +4 -0
  100. package/app/.next/server/app/page.js +13 -0
  101. package/app/.next/server/app/page.js.map +5 -0
  102. package/app/.next/server/app/page.js.nft.json +1 -0
  103. package/app/.next/server/app/page_client-reference-manifest.js +3 -0
  104. package/app/.next/server/app/sessions/[provider]/[id]/page/app-paths-manifest.json +3 -0
  105. package/app/.next/server/app/sessions/[provider]/[id]/page/build-manifest.json +20 -0
  106. package/app/.next/server/app/sessions/[provider]/[id]/page/next-font-manifest.json +11 -0
  107. package/app/.next/server/app/sessions/[provider]/[id]/page/react-loadable-manifest.json +1 -0
  108. package/app/.next/server/app/sessions/[provider]/[id]/page/server-reference-manifest.json +4 -0
  109. package/app/.next/server/app/sessions/[provider]/[id]/page.js +14 -0
  110. package/app/.next/server/app/sessions/[provider]/[id]/page.js.map +5 -0
  111. package/app/.next/server/app/sessions/[provider]/[id]/page.js.nft.json +1 -0
  112. package/app/.next/server/app/sessions/[provider]/[id]/page_client-reference-manifest.js +3 -0
  113. package/app/.next/server/app-paths-manifest.json +13 -0
  114. package/app/.next/server/chunks/[externals]__0l8ei7u._.js +3 -0
  115. package/app/.next/server/chunks/[externals]__0xll52b._.js +3 -0
  116. package/app/.next/server/chunks/[root-of-the-server]__093lyxv._.js +3 -0
  117. package/app/.next/server/chunks/[root-of-the-server]__0ne74op._.js +3 -0
  118. package/app/.next/server/chunks/[root-of-the-server]__0uqb915._.js +6 -0
  119. package/app/.next/server/chunks/[root-of-the-server]__0uv5tnc._.js +3 -0
  120. package/app/.next/server/chunks/[root-of-the-server]__1dnu8m7._.js +160 -0
  121. package/app/.next/server/chunks/[root-of-the-server]__1lfc-ga._.js +3 -0
  122. package/app/.next/server/chunks/[root-of-the-server]__1n_sepq._.js +3 -0
  123. package/app/.next/server/chunks/[turbopack]_runtime.js +807 -0
  124. package/app/.next/server/chunks/_182gqv3._.js +3 -0
  125. package/app/.next/server/chunks/_1i74yrf._.js +3 -0
  126. package/app/.next/server/chunks/_next-internal_server_app_api_analytics_route_actions_1e0ou17.js +3 -0
  127. package/app/.next/server/chunks/_next-internal_server_app_api_logs_route_actions_0eqhwjl.js +3 -0
  128. package/app/.next/server/chunks/_next-internal_server_app_api_providers_route_actions_0p8so7l.js +3 -0
  129. package/app/.next/server/chunks/_next-internal_server_app_api_search_route_actions_0k0mocb.js +3 -0
  130. package/app/.next/server/chunks/_next-internal_server_app_api_sessions_[provider]_[id]_route_actions_14qf6mb.js +3 -0
  131. package/app/.next/server/chunks/_next-internal_server_app_api_sessions_route_actions_1lwcye0.js +3 -0
  132. package/app/.next/server/chunks/_next-internal_server_app_favicon_ico_route_actions_0g2jjls.js +3 -0
  133. package/app/.next/server/chunks/ssr/16o9_next_dist_0eaj21h._.js +3 -0
  134. package/app/.next/server/chunks/ssr/16o9_next_dist_1qgcmj5._.js +6 -0
  135. package/app/.next/server/chunks/ssr/16o9_next_dist_client_components_1k-o91u._.js +33 -0
  136. package/app/.next/server/chunks/ssr/16o9_next_dist_client_components_1t5fwcg._.js +3 -0
  137. package/app/.next/server/chunks/ssr/16o9_next_dist_client_components_builtin_forbidden_0fbugby.js +3 -0
  138. package/app/.next/server/chunks/ssr/16o9_next_dist_client_components_builtin_global-error_10u99_n.js +3 -0
  139. package/app/.next/server/chunks/ssr/16o9_next_dist_client_components_builtin_unauthorized_1kt4mi6.js +3 -0
  140. package/app/.next/server/chunks/ssr/[root-of-the-server]__0o9lim0._.js +3 -0
  141. package/app/.next/server/chunks/ssr/[root-of-the-server]__0ovxc0l._.js +3 -0
  142. package/app/.next/server/chunks/ssr/[root-of-the-server]__0u75sqx._.js +3 -0
  143. package/app/.next/server/chunks/ssr/[root-of-the-server]__0y6hr6i._.js +3 -0
  144. package/app/.next/server/chunks/ssr/[root-of-the-server]__10av_pp._.js +3 -0
  145. package/app/.next/server/chunks/ssr/[root-of-the-server]__136432r._.js +3 -0
  146. package/app/.next/server/chunks/ssr/[root-of-the-server]__14zv8r1._.js +33 -0
  147. package/app/.next/server/chunks/ssr/[root-of-the-server]__1bq9bej._.js +33 -0
  148. package/app/.next/server/chunks/ssr/[root-of-the-server]__1fgdtdr._.js +14 -0
  149. package/app/.next/server/chunks/ssr/[turbopack]_runtime.js +807 -0
  150. package/app/.next/server/chunks/ssr/_0136j91._.js +16 -0
  151. package/app/.next/server/chunks/ssr/_02qe55s._.js +3 -0
  152. package/app/.next/server/chunks/ssr/_0f8nmc3._.js +151 -0
  153. package/app/.next/server/chunks/ssr/_12__495._.js +3 -0
  154. package/app/.next/server/chunks/ssr/_1ck8cbf._.js +3 -0
  155. package/app/.next/server/chunks/ssr/_1f2ffz2._.js +3 -0
  156. package/app/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-.js +3 -0
  157. package/app/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yr.js +3 -0
  158. package/app/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1j.js +3 -0
  159. package/app/.next/server/chunks/ssr/_next-internal_server_app_sessions_[provider]_[id]_page_actions_11pddcs.js +3 -0
  160. package/app/.next/server/chunks/ssr/src_1igwugi._.js +3 -0
  161. package/app/.next/server/chunks/ssr/src_app_page_tsx_1chiuah._.js +3 -0
  162. package/app/.next/server/chunks/ssr/src_app_sessions_[provider]_[id]_page_tsx_0uf635h._.js +8 -0
  163. package/app/.next/server/functions-config-manifest.json +4 -0
  164. package/app/.next/server/middleware-build-manifest.js +24 -0
  165. package/app/.next/server/middleware-manifest.json +6 -0
  166. package/app/.next/server/next-font-manifest.js +1 -0
  167. package/app/.next/server/next-font-manifest.json +19 -0
  168. package/app/.next/server/pages/404.html +1 -0
  169. package/app/.next/server/pages/500.html +1 -0
  170. package/app/.next/server/pages-manifest.json +4 -0
  171. package/app/.next/server/prefetch-hints.json +34 -0
  172. package/app/.next/server/server-reference-manifest.js +1 -0
  173. package/app/.next/server/server-reference-manifest.json +5 -0
  174. package/app/.next/static/66JBn2mmg7nPYv4u88Jb6/_buildManifest.js +11 -0
  175. package/app/.next/static/66JBn2mmg7nPYv4u88Jb6/_clientMiddlewareManifest.js +1 -0
  176. package/app/.next/static/66JBn2mmg7nPYv4u88Jb6/_ssgManifest.js +1 -0
  177. package/app/.next/static/chunks/00nb3qfg98pl1.js +1 -0
  178. package/app/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  179. package/app/.next/static/chunks/0u22wlboqnsjn.js +14 -0
  180. package/app/.next/static/chunks/1a6ohz9e-zu6v.js +6 -0
  181. package/app/.next/static/chunks/1bvlgvy9l9_54.js +1 -0
  182. package/app/.next/static/chunks/1gjrekoh3wbwd.js +1 -0
  183. package/app/.next/static/chunks/1golqn9hvdi85.js +22 -0
  184. package/app/.next/static/chunks/1k33om0ilfcvw.js +1 -0
  185. package/app/.next/static/chunks/25hzl7qw_661s.js +1 -0
  186. package/app/.next/static/chunks/2bron83qy3bb-.js +1 -0
  187. package/app/.next/static/chunks/2rm87uoxc3wi6.js +1 -0
  188. package/app/.next/static/chunks/2wkix9od_vgcp.css +1 -0
  189. package/app/.next/static/chunks/31hdfb4m8lwzz.js +1 -0
  190. package/app/.next/static/chunks/367imffzz5g8x.css +2 -0
  191. package/app/.next/static/chunks/37by6nx5006ki.js +31 -0
  192. package/app/.next/static/chunks/3fjiamhx4adq8.js +1 -0
  193. package/app/.next/static/chunks/turbopack-1whpqxvx8f759.js +1 -0
  194. package/app/.next/static/media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2 +0 -0
  195. package/app/.next/static/media/1bffadaabf893a1e-s.3-6t-g6q0vh0a.woff2 +0 -0
  196. package/app/.next/static/media/2bbe8d2671613f1f-s.0k62hbripvv8p.woff2 +0 -0
  197. package/app/.next/static/media/2c55a0e60120577a-s.0-dom-5bn10r2.woff2 +0 -0
  198. package/app/.next/static/media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2 +0 -0
  199. package/app/.next/static/media/5476f68d60460930-s.2uwcyprjm3xu3.woff2 +0 -0
  200. package/app/.next/static/media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2 +0 -0
  201. package/app/.next/static/media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2 +0 -0
  202. package/app/.next/static/media/83afe278b6a6bb3c-s.p.2bn3s6zvc0dyp.woff2 +0 -0
  203. package/app/.next/static/media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2 +0 -0
  204. package/app/.next/static/media/9c72aa0f40e4eef8-s.1y4-pdgsjb-pw.woff2 +0 -0
  205. package/app/.next/static/media/ad66f9afd8947f86-s.3lvt2whj97whp.woff2 +0 -0
  206. package/app/.next/static/media/cc545e633e20c56d-s.176arc174-8zp.woff2 +0 -0
  207. package/app/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
  208. package/app/node_modules/@next/env/dist/index.js +1 -0
  209. package/app/node_modules/@next/env/package.json +36 -0
  210. package/app/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
  211. package/app/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
  212. package/app/node_modules/@swc/helpers/package.json +471 -0
  213. package/app/node_modules/client-only/index.js +0 -0
  214. package/app/node_modules/client-only/package.json +19 -0
  215. package/app/node_modules/next/dist/build/adapter/setup-node-env.external.js +15 -0
  216. package/app/node_modules/next/dist/build/define-env.js +263 -0
  217. package/app/node_modules/next/dist/build/duration-to-string.js +98 -0
  218. package/app/node_modules/next/dist/build/get-supported-browsers.js +38 -0
  219. package/app/node_modules/next/dist/build/next-config-ts/require-hook.js +85 -0
  220. package/app/node_modules/next/dist/build/next-config-ts/transpile-config.js +140 -0
  221. package/app/node_modules/next/dist/build/output/format.js +84 -0
  222. package/app/node_modules/next/dist/build/output/log.js +135 -0
  223. package/app/node_modules/next/dist/build/segment-config/app/app-segment-config.js +178 -0
  224. package/app/node_modules/next/dist/build/segment-config/app/app-segments.js +147 -0
  225. package/app/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +52 -0
  226. package/app/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +137 -0
  227. package/app/node_modules/next/dist/build/static-paths/app.js +783 -0
  228. package/app/node_modules/next/dist/build/static-paths/pages.js +169 -0
  229. package/app/node_modules/next/dist/build/static-paths/utils.js +119 -0
  230. package/app/node_modules/next/dist/build/swc/helpers.js +15 -0
  231. package/app/node_modules/next/dist/build/swc/index.js +1409 -0
  232. package/app/node_modules/next/dist/build/swc/install-bindings.js +30 -0
  233. package/app/node_modules/next/dist/build/swc/jest-transformer.js +77 -0
  234. package/app/node_modules/next/dist/build/swc/loaderWorkerPool.js +40 -0
  235. package/app/node_modules/next/dist/build/swc/options.js +411 -0
  236. package/app/node_modules/next/dist/build/swc/types.js +6 -0
  237. package/app/node_modules/next/dist/build/utils.js +1258 -0
  238. package/app/node_modules/next/dist/cli/next-test.js +171 -0
  239. package/app/node_modules/next/dist/client/add-base-path.js +24 -0
  240. package/app/node_modules/next/dist/client/app-call-server.js +34 -0
  241. package/app/node_modules/next/dist/client/app-find-source-map-url.js +39 -0
  242. package/app/node_modules/next/dist/client/assign-location.js +29 -0
  243. package/app/node_modules/next/dist/client/components/app-router-announcer.js +78 -0
  244. package/app/node_modules/next/dist/client/components/app-router-headers.js +128 -0
  245. package/app/node_modules/next/dist/client/components/app-router-instance.js +407 -0
  246. package/app/node_modules/next/dist/client/components/app-router-utils.js +62 -0
  247. package/app/node_modules/next/dist/client/components/app-router.js +522 -0
  248. package/app/node_modules/next/dist/client/components/builtin/default.js +35 -0
  249. package/app/node_modules/next/dist/client/components/builtin/error-styles.js +165 -0
  250. package/app/node_modules/next/dist/client/components/builtin/global-error.js +100 -0
  251. package/app/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +52 -0
  252. package/app/node_modules/next/dist/client/components/error-boundary.js +148 -0
  253. package/app/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js +86 -0
  254. package/app/node_modules/next/dist/client/components/errors/root-error-boundary.js +41 -0
  255. package/app/node_modules/next/dist/client/components/forbidden.js +48 -0
  256. package/app/node_modules/next/dist/client/components/handle-isr-error.js +30 -0
  257. package/app/node_modules/next/dist/client/components/hooks-server-context.js +42 -0
  258. package/app/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js +125 -0
  259. package/app/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +72 -0
  260. package/app/node_modules/next/dist/client/components/instant-samples.js +134 -0
  261. package/app/node_modules/next/dist/client/components/is-next-router-error.js +23 -0
  262. package/app/node_modules/next/dist/client/components/links.js +316 -0
  263. package/app/node_modules/next/dist/client/components/match-segments.js +32 -0
  264. package/app/node_modules/next/dist/client/components/nav-failure-handler.js +61 -0
  265. package/app/node_modules/next/dist/client/components/navigation-devtools.js +126 -0
  266. package/app/node_modules/next/dist/client/components/navigation-dynamic-rendering.js +38 -0
  267. package/app/node_modules/next/dist/client/components/navigation-untracked.js +69 -0
  268. package/app/node_modules/next/dist/client/components/navigation.js +246 -0
  269. package/app/node_modules/next/dist/client/components/navigation.react-server.js +75 -0
  270. package/app/node_modules/next/dist/client/components/not-found.js +42 -0
  271. package/app/node_modules/next/dist/client/components/offline.js +172 -0
  272. package/app/node_modules/next/dist/client/components/readonly-url-search-params.js +46 -0
  273. package/app/node_modules/next/dist/client/components/redirect-boundary.js +107 -0
  274. package/app/node_modules/next/dist/client/components/redirect-error.js +43 -0
  275. package/app/node_modules/next/dist/client/components/redirect-status-code.js +24 -0
  276. package/app/node_modules/next/dist/client/components/redirect.js +91 -0
  277. package/app/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +205 -0
  278. package/app/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js +21 -0
  279. package/app/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +159 -0
  280. package/app/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +32 -0
  281. package/app/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +603 -0
  282. package/app/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +70 -0
  283. package/app/node_modules/next/dist/client/components/router-reducer/ppr-navigations.js +1468 -0
  284. package/app/node_modules/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
  285. package/app/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +63 -0
  286. package/app/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js +38 -0
  287. package/app/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +29 -0
  288. package/app/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +56 -0
  289. package/app/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +89 -0
  290. package/app/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +72 -0
  291. package/app/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +348 -0
  292. package/app/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +65 -0
  293. package/app/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +70 -0
  294. package/app/node_modules/next/dist/client/components/router-reducer/router-reducer.js +74 -0
  295. package/app/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +66 -0
  296. package/app/node_modules/next/dist/client/components/router-transition.js +135 -0
  297. package/app/node_modules/next/dist/client/components/segment-cache/bfcache.js +130 -0
  298. package/app/node_modules/next/dist/client/components/segment-cache/cache-key.js +56 -0
  299. package/app/node_modules/next/dist/client/components/segment-cache/cache-map.js +326 -0
  300. package/app/node_modules/next/dist/client/components/segment-cache/cache.js +2714 -0
  301. package/app/node_modules/next/dist/client/components/segment-cache/fetch.js +37 -0
  302. package/app/node_modules/next/dist/client/components/segment-cache/lru.js +152 -0
  303. package/app/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +453 -0
  304. package/app/node_modules/next/dist/client/components/segment-cache/navigation.js +681 -0
  305. package/app/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +593 -0
  306. package/app/node_modules/next/dist/client/components/segment-cache/prefetch.js +32 -0
  307. package/app/node_modules/next/dist/client/components/segment-cache/scheduler.js +1753 -0
  308. package/app/node_modules/next/dist/client/components/segment-cache/types.js +84 -0
  309. package/app/node_modules/next/dist/client/components/segment-cache/vary-path.js +326 -0
  310. package/app/node_modules/next/dist/client/components/server-async-storage.js +43 -0
  311. package/app/node_modules/next/dist/client/components/static-generation-bailout.js +42 -0
  312. package/app/node_modules/next/dist/client/components/unauthorized.js +49 -0
  313. package/app/node_modules/next/dist/client/components/unrecognized-action-error.js +39 -0
  314. package/app/node_modules/next/dist/client/components/unresolved-thenable.js +23 -0
  315. package/app/node_modules/next/dist/client/components/unstable-rethrow.js +32 -0
  316. package/app/node_modules/next/dist/client/components/use-action-queue.js +148 -0
  317. package/app/node_modules/next/dist/client/components/use-offline.js +68 -0
  318. package/app/node_modules/next/dist/client/dev/debug-channel.js +428 -0
  319. package/app/node_modules/next/dist/client/flight-data-helpers.js +235 -0
  320. package/app/node_modules/next/dist/client/has-base-path.js +23 -0
  321. package/app/node_modules/next/dist/client/lib/console.js +177 -0
  322. package/app/node_modules/next/dist/client/lib/javascript-url.js +32 -0
  323. package/app/node_modules/next/dist/client/navigation-build-id.js +53 -0
  324. package/app/node_modules/next/dist/client/normalize-trailing-slash.js +37 -0
  325. package/app/node_modules/next/dist/client/remove-base-path.js +32 -0
  326. package/app/node_modules/next/dist/client/route-params.js +253 -0
  327. package/app/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +339 -0
  328. package/app/node_modules/next/dist/compiled/@edge-runtime/cookies/package.json +1 -0
  329. package/app/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js +46 -0
  330. package/app/node_modules/next/dist/compiled/@edge-runtime/ponyfill/package.json +1 -0
  331. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js +1 -0
  332. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js +1 -0
  333. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js +1 -0
  334. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js +5 -0
  335. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js +18713 -0
  336. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/package.json +1 -0
  337. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/stream.js +44 -0
  338. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/timers.js.text.js +1 -0
  339. package/app/node_modules/next/dist/compiled/@edge-runtime/primitives/url.js.text.js +1 -0
  340. package/app/node_modules/next/dist/compiled/@hapi/accept/index.js +1 -0
  341. package/app/node_modules/next/dist/compiled/@hapi/accept/package.json +1 -0
  342. package/app/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -0
  343. package/app/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json +1 -0
  344. package/app/node_modules/next/dist/compiled/@napi-rs/triples/index.js +1 -0
  345. package/app/node_modules/next/dist/compiled/@napi-rs/triples/package.json +1 -0
  346. package/app/node_modules/next/dist/compiled/@opentelemetry/api/index.js +1 -0
  347. package/app/node_modules/next/dist/compiled/@opentelemetry/api/package.json +1 -0
  348. package/app/node_modules/next/dist/compiled/@vercel/detect-agent/index.js +1 -0
  349. package/app/node_modules/next/dist/compiled/@vercel/detect-agent/package.json +1 -0
  350. package/app/node_modules/next/dist/compiled/async-retry/index.js +1 -0
  351. package/app/node_modules/next/dist/compiled/async-retry/package.json +1 -0
  352. package/app/node_modules/next/dist/compiled/async-sema/index.js +1 -0
  353. package/app/node_modules/next/dist/compiled/async-sema/package.json +1 -0
  354. package/app/node_modules/next/dist/compiled/busboy/index.js +1 -0
  355. package/app/node_modules/next/dist/compiled/busboy/package.json +1 -0
  356. package/app/node_modules/next/dist/compiled/bytes/index.js +8 -0
  357. package/app/node_modules/next/dist/compiled/bytes/package.json +1 -0
  358. package/app/node_modules/next/dist/compiled/ci-info/index.js +1 -0
  359. package/app/node_modules/next/dist/compiled/ci-info/package.json +1 -0
  360. package/app/node_modules/next/dist/compiled/commander/index.js +1 -0
  361. package/app/node_modules/next/dist/compiled/commander/package.json +1 -0
  362. package/app/node_modules/next/dist/compiled/comment-json/index.js +7 -0
  363. package/app/node_modules/next/dist/compiled/comment-json/package.json +1 -0
  364. package/app/node_modules/next/dist/compiled/compression/index.js +58 -0
  365. package/app/node_modules/next/dist/compiled/compression/package.json +1 -0
  366. package/app/node_modules/next/dist/compiled/conf/index.js +3 -0
  367. package/app/node_modules/next/dist/compiled/conf/package.json +1 -0
  368. package/app/node_modules/next/dist/compiled/content-disposition/index.js +6 -0
  369. package/app/node_modules/next/dist/compiled/content-disposition/package.json +1 -0
  370. package/app/node_modules/next/dist/compiled/cookie/index.js +7 -0
  371. package/app/node_modules/next/dist/compiled/cookie/package.json +1 -0
  372. package/app/node_modules/next/dist/compiled/cross-spawn/index.js +1 -0
  373. package/app/node_modules/next/dist/compiled/cross-spawn/package.json +1 -0
  374. package/app/node_modules/next/dist/compiled/debug/index.js +1 -0
  375. package/app/node_modules/next/dist/compiled/debug/package.json +1 -0
  376. package/app/node_modules/next/dist/compiled/edge-runtime/index.js +1 -0
  377. package/app/node_modules/next/dist/compiled/edge-runtime/package.json +1 -0
  378. package/app/node_modules/next/dist/compiled/find-up/index.js +1 -0
  379. package/app/node_modules/next/dist/compiled/find-up/package.json +1 -0
  380. package/app/node_modules/next/dist/compiled/fresh/index.js +8 -0
  381. package/app/node_modules/next/dist/compiled/fresh/package.json +1 -0
  382. package/app/node_modules/next/dist/compiled/httpxy/index.js +1 -0
  383. package/app/node_modules/next/dist/compiled/httpxy/package.json +1 -0
  384. package/app/node_modules/next/dist/compiled/image-detector/detector.js +1 -0
  385. package/app/node_modules/next/dist/compiled/image-size/index.js +1 -0
  386. package/app/node_modules/next/dist/compiled/image-size/package.json +1 -0
  387. package/app/node_modules/next/dist/compiled/ipaddr.js/ipaddr.js +1 -0
  388. package/app/node_modules/next/dist/compiled/ipaddr.js/package.json +1 -0
  389. package/app/node_modules/next/dist/compiled/is-animated/index.js +1 -0
  390. package/app/node_modules/next/dist/compiled/is-animated/package.json +1 -0
  391. package/app/node_modules/next/dist/compiled/is-docker/index.js +1 -0
  392. package/app/node_modules/next/dist/compiled/is-docker/package.json +1 -0
  393. package/app/node_modules/next/dist/compiled/is-wsl/index.js +1 -0
  394. package/app/node_modules/next/dist/compiled/is-wsl/package.json +1 -0
  395. package/app/node_modules/next/dist/compiled/jsonwebtoken/index.js +11 -0
  396. package/app/node_modules/next/dist/compiled/jsonwebtoken/package.json +1 -0
  397. package/app/node_modules/next/dist/compiled/nanoid/index.cjs +1 -0
  398. package/app/node_modules/next/dist/compiled/nanoid/package.json +1 -0
  399. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +183 -0
  400. package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +183 -0
  401. package/app/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +6 -0
  402. package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +20 -0
  403. package/app/node_modules/next/dist/compiled/p-limit/index.js +1 -0
  404. package/app/node_modules/next/dist/compiled/p-limit/package.json +1 -0
  405. package/app/node_modules/next/dist/compiled/p-queue/index.js +1 -0
  406. package/app/node_modules/next/dist/compiled/p-queue/package.json +1 -0
  407. package/app/node_modules/next/dist/compiled/path-browserify/index.js +1 -0
  408. package/app/node_modules/next/dist/compiled/path-browserify/package.json +1 -0
  409. package/app/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -0
  410. package/app/node_modules/next/dist/compiled/path-to-regexp/package.json +1 -0
  411. package/app/node_modules/next/dist/compiled/picomatch/index.js +1 -0
  412. package/app/node_modules/next/dist/compiled/picomatch/package.json +1 -0
  413. package/app/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +133 -0
  414. package/app/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +130 -0
  415. package/app/node_modules/next/dist/compiled/react-is/index.js +7 -0
  416. package/app/node_modules/next/dist/compiled/react-is/package.json +26 -0
  417. package/app/node_modules/next/dist/compiled/regenerator-runtime/package.json +19 -0
  418. package/app/node_modules/next/dist/compiled/regenerator-runtime/runtime.js +729 -0
  419. package/app/node_modules/next/dist/compiled/semver/index.js +1 -0
  420. package/app/node_modules/next/dist/compiled/semver/package.json +1 -0
  421. package/app/node_modules/next/dist/compiled/send/index.js +70 -0
  422. package/app/node_modules/next/dist/compiled/send/package.json +1 -0
  423. package/app/node_modules/next/dist/compiled/source-map/package.json +1 -0
  424. package/app/node_modules/next/dist/compiled/source-map/source-map.js +1 -0
  425. package/app/node_modules/next/dist/compiled/stacktrace-parser/package.json +1 -0
  426. package/app/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -0
  427. package/app/node_modules/next/dist/compiled/string-hash/index.js +1 -0
  428. package/app/node_modules/next/dist/compiled/string-hash/package.json +1 -0
  429. package/app/node_modules/next/dist/compiled/strip-ansi/index.js +1 -0
  430. package/app/node_modules/next/dist/compiled/strip-ansi/package.json +1 -0
  431. package/app/node_modules/next/dist/compiled/superstruct/index.cjs +1 -0
  432. package/app/node_modules/next/dist/compiled/superstruct/package.json +1 -0
  433. package/app/node_modules/next/dist/compiled/tar/index.min.js +1 -0
  434. package/app/node_modules/next/dist/compiled/tar/package.json +1 -0
  435. package/app/node_modules/next/dist/compiled/text-table/index.js +1 -0
  436. package/app/node_modules/next/dist/compiled/text-table/package.json +1 -0
  437. package/app/node_modules/next/dist/compiled/watchpack/package.json +1 -0
  438. package/app/node_modules/next/dist/compiled/watchpack/watchpack.js +1 -0
  439. package/app/node_modules/next/dist/compiled/write-file-atomic/index.js +1 -0
  440. package/app/node_modules/next/dist/compiled/write-file-atomic/package.json +1 -0
  441. package/app/node_modules/next/dist/compiled/ws/index.js +1 -0
  442. package/app/node_modules/next/dist/compiled/ws/package.json +1 -0
  443. package/app/node_modules/next/dist/compiled/zod/index.cjs +1 -0
  444. package/app/node_modules/next/dist/compiled/zod/package.json +1 -0
  445. package/app/node_modules/next/dist/compiled/zod-validation-error/index.js +1 -0
  446. package/app/node_modules/next/dist/compiled/zod-validation-error/package.json +1 -0
  447. package/app/node_modules/next/dist/experimental/testmode/context.js +57 -0
  448. package/app/node_modules/next/dist/experimental/testmode/fetch.js +150 -0
  449. package/app/node_modules/next/dist/experimental/testmode/httpget.js +33 -0
  450. package/app/node_modules/next/dist/experimental/testmode/server-edge.js +32 -0
  451. package/app/node_modules/next/dist/experimental/testmode/server.js +73 -0
  452. package/app/node_modules/next/dist/export/helpers/create-incremental-cache.js +61 -0
  453. package/app/node_modules/next/dist/lib/batcher.js +65 -0
  454. package/app/node_modules/next/dist/lib/build-custom-route.js +46 -0
  455. package/app/node_modules/next/dist/lib/bundler.js +168 -0
  456. package/app/node_modules/next/dist/lib/client-and-server-references.js +54 -0
  457. package/app/node_modules/next/dist/lib/coalesced-function.js +39 -0
  458. package/app/node_modules/next/dist/lib/compile-error.js +14 -0
  459. package/app/node_modules/next/dist/lib/constants.js +420 -0
  460. package/app/node_modules/next/dist/lib/create-client-router-filter.js +83 -0
  461. package/app/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  462. package/app/node_modules/next/dist/lib/detached-promise.js +32 -0
  463. package/app/node_modules/next/dist/lib/detect-typo.js +51 -0
  464. package/app/node_modules/next/dist/lib/download-swc.js +183 -0
  465. package/app/node_modules/next/dist/lib/error-telemetry-utils.js +42 -0
  466. package/app/node_modules/next/dist/lib/fallback.js +100 -0
  467. package/app/node_modules/next/dist/lib/file-exists.js +53 -0
  468. package/app/node_modules/next/dist/lib/find-config.js +102 -0
  469. package/app/node_modules/next/dist/lib/find-pages-dir.js +65 -0
  470. package/app/node_modules/next/dist/lib/find-root.js +280 -0
  471. package/app/node_modules/next/dist/lib/format-cli-help-output.js +84 -0
  472. package/app/node_modules/next/dist/lib/format-dynamic-import-path.js +43 -0
  473. package/app/node_modules/next/dist/lib/format-server-error.js +75 -0
  474. package/app/node_modules/next/dist/lib/framework/boundary-components.js +62 -0
  475. package/app/node_modules/next/dist/lib/framework/boundary-constants.js +36 -0
  476. package/app/node_modules/next/dist/lib/fs/rename.js +87 -0
  477. package/app/node_modules/next/dist/lib/fs/write-atomic.js +28 -0
  478. package/app/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +52 -0
  479. package/app/node_modules/next/dist/lib/get-files-in-dir.js +33 -0
  480. package/app/node_modules/next/dist/lib/get-network-host.js +44 -0
  481. package/app/node_modules/next/dist/lib/get-package-version.js +118 -0
  482. package/app/node_modules/next/dist/lib/get-project-dir.js +51 -0
  483. package/app/node_modules/next/dist/lib/git-worktree.js +74 -0
  484. package/app/node_modules/next/dist/lib/has-necessary-dependencies.js +49 -0
  485. package/app/node_modules/next/dist/lib/helpers/get-cache-directory.js +66 -0
  486. package/app/node_modules/next/dist/lib/helpers/get-npx-command.js +29 -0
  487. package/app/node_modules/next/dist/lib/helpers/get-online.js +50 -0
  488. package/app/node_modules/next/dist/lib/helpers/get-pkg-manager.js +65 -0
  489. package/app/node_modules/next/dist/lib/helpers/get-registry.js +45 -0
  490. package/app/node_modules/next/dist/lib/helpers/get-reserved-port.js +116 -0
  491. package/app/node_modules/next/dist/lib/helpers/git.js +59 -0
  492. package/app/node_modules/next/dist/lib/helpers/install.js +83 -0
  493. package/app/node_modules/next/dist/lib/import-next-warning.js +50 -0
  494. package/app/node_modules/next/dist/lib/inline-static-env.js +112 -0
  495. package/app/node_modules/next/dist/lib/install-dependencies.js +40 -0
  496. package/app/node_modules/next/dist/lib/interop-default.js +16 -0
  497. package/app/node_modules/next/dist/lib/is-api-route.js +15 -0
  498. package/app/node_modules/next/dist/lib/is-app-page-route.js +15 -0
  499. package/app/node_modules/next/dist/lib/is-app-route-route.js +15 -0
  500. package/app/node_modules/next/dist/lib/is-edge-runtime.js +16 -0
  501. package/app/node_modules/next/dist/lib/is-error.js +78 -0
  502. package/app/node_modules/next/dist/lib/is-interception-route-rewrite.js +18 -0
  503. package/app/node_modules/next/dist/lib/is-internal-component.js +36 -0
  504. package/app/node_modules/next/dist/lib/is-serializable-props.js +111 -0
  505. package/app/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  506. package/app/node_modules/next/dist/lib/load-custom-routes.js +594 -0
  507. package/app/node_modules/next/dist/lib/memory/gc-observer.js +53 -0
  508. package/app/node_modules/next/dist/lib/memory/shutdown.js +29 -0
  509. package/app/node_modules/next/dist/lib/memory/startup.js +47 -0
  510. package/app/node_modules/next/dist/lib/memory/trace.js +109 -0
  511. package/app/node_modules/next/dist/lib/metadata/constants.js +40 -0
  512. package/app/node_modules/next/dist/lib/metadata/default-metadata.js +82 -0
  513. package/app/node_modules/next/dist/lib/metadata/generate/icon-mark.js +22 -0
  514. package/app/node_modules/next/dist/lib/metadata/generate/utils.js +52 -0
  515. package/app/node_modules/next/dist/lib/metadata/get-metadata-route.js +162 -0
  516. package/app/node_modules/next/dist/lib/metadata/is-metadata-route.js +221 -0
  517. package/app/node_modules/next/dist/lib/metadata/metadata-context.js +18 -0
  518. package/app/node_modules/next/dist/lib/metadata/metadata.js +1660 -0
  519. package/app/node_modules/next/dist/lib/metadata/resolve-metadata.js +884 -0
  520. package/app/node_modules/next/dist/lib/metadata/resolvers/resolve-basics.js +232 -0
  521. package/app/node_modules/next/dist/lib/metadata/resolvers/resolve-icons.js +56 -0
  522. package/app/node_modules/next/dist/lib/metadata/resolvers/resolve-opengraph.js +199 -0
  523. package/app/node_modules/next/dist/lib/metadata/resolvers/resolve-title.js +40 -0
  524. package/app/node_modules/next/dist/lib/metadata/resolvers/resolve-url.js +135 -0
  525. package/app/node_modules/next/dist/lib/metadata/types/alternative-urls-types.js +7 -0
  526. package/app/node_modules/next/dist/lib/metadata/types/extra-types.js +9 -0
  527. package/app/node_modules/next/dist/lib/metadata/types/icons.js +6 -0
  528. package/app/node_modules/next/dist/lib/metadata/types/manifest-types.js +6 -0
  529. package/app/node_modules/next/dist/lib/metadata/types/metadata-interface.js +18 -0
  530. package/app/node_modules/next/dist/lib/metadata/types/metadata-types.js +10 -0
  531. package/app/node_modules/next/dist/lib/metadata/types/opengraph-types.js +6 -0
  532. package/app/node_modules/next/dist/lib/metadata/types/resolvers.js +6 -0
  533. package/app/node_modules/next/dist/lib/metadata/types/twitter-types.js +7 -0
  534. package/app/node_modules/next/dist/lib/mime-type.js +20 -0
  535. package/app/node_modules/next/dist/lib/mkcert.js +204 -0
  536. package/app/node_modules/next/dist/lib/multi-file-writer.js +75 -0
  537. package/app/node_modules/next/dist/lib/needs-experimental-react.js +16 -0
  538. package/app/node_modules/next/dist/lib/non-nullable.js +15 -0
  539. package/app/node_modules/next/dist/lib/normalize-path.js +21 -0
  540. package/app/node_modules/next/dist/lib/oxford-comma-list.js +15 -0
  541. package/app/node_modules/next/dist/lib/page-types.js +18 -0
  542. package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +185 -0
  543. package/app/node_modules/next/dist/lib/pick.js +19 -0
  544. package/app/node_modules/next/dist/lib/picocolors.js +177 -0
  545. package/app/node_modules/next/dist/lib/pretty-bytes.js +74 -0
  546. package/app/node_modules/next/dist/lib/profiles-dir.js +45 -0
  547. package/app/node_modules/next/dist/lib/realpath.js +20 -0
  548. package/app/node_modules/next/dist/lib/recursive-copy.js +76 -0
  549. package/app/node_modules/next/dist/lib/recursive-delete.js +137 -0
  550. package/app/node_modules/next/dist/lib/recursive-readdir.js +124 -0
  551. package/app/node_modules/next/dist/lib/redirect-status.js +46 -0
  552. package/app/node_modules/next/dist/lib/require-instrumentation-client.js +32 -0
  553. package/app/node_modules/next/dist/lib/resolve-build-paths.js +182 -0
  554. package/app/node_modules/next/dist/lib/resolve-from.js +65 -0
  555. package/app/node_modules/next/dist/lib/route-pattern-normalizer.js +107 -0
  556. package/app/node_modules/next/dist/lib/scheduler.js +64 -0
  557. package/app/node_modules/next/dist/lib/semver-noop.js +18 -0
  558. package/app/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  559. package/app/node_modules/next/dist/lib/setup-exception-listeners.js +11 -0
  560. package/app/node_modules/next/dist/lib/static-env.js +92 -0
  561. package/app/node_modules/next/dist/lib/try-to-parse-path.js +67 -0
  562. package/app/node_modules/next/dist/lib/turbopack-cache-seed.js +163 -0
  563. package/app/node_modules/next/dist/lib/turbopack-warning.js +185 -0
  564. package/app/node_modules/next/dist/lib/typescript/diagnosticFormatter.js +243 -0
  565. package/app/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +73 -0
  566. package/app/node_modules/next/dist/lib/typescript/getTypeScriptIntent.js +52 -0
  567. package/app/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
  568. package/app/node_modules/next/dist/lib/typescript/missingDependencyError.js +26 -0
  569. package/app/node_modules/next/dist/lib/typescript/runTypeCheck.js +149 -0
  570. package/app/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +53 -0
  571. package/app/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +256 -0
  572. package/app/node_modules/next/dist/lib/typescript/type-paths.js +51 -0
  573. package/app/node_modules/next/dist/lib/typescript/writeAppTypeDeclarations.js +77 -0
  574. package/app/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +395 -0
  575. package/app/node_modules/next/dist/lib/url.js +75 -0
  576. package/app/node_modules/next/dist/lib/verify-partytown-setup.js +104 -0
  577. package/app/node_modules/next/dist/lib/verify-root-layout.js +165 -0
  578. package/app/node_modules/next/dist/lib/verify-typescript-setup.js +269 -0
  579. package/app/node_modules/next/dist/lib/wait.js +19 -0
  580. package/app/node_modules/next/dist/lib/with-promise-cache.js +24 -0
  581. package/app/node_modules/next/dist/lib/worker.js +234 -0
  582. package/app/node_modules/next/dist/server/ReactDOMServerPages.js +16 -0
  583. package/app/node_modules/next/dist/server/accept-header.js +132 -0
  584. package/app/node_modules/next/dist/server/after/after-context.js +178 -0
  585. package/app/node_modules/next/dist/server/after/after.js +28 -0
  586. package/app/node_modules/next/dist/server/after/awaiter.js +74 -0
  587. package/app/node_modules/next/dist/server/after/builtin-request-context.js +38 -0
  588. package/app/node_modules/next/dist/server/after/index.js +21 -0
  589. package/app/node_modules/next/dist/server/after/run-with-after.js +35 -0
  590. package/app/node_modules/next/dist/server/api-utils/get-cookie-parser.js +22 -0
  591. package/app/node_modules/next/dist/server/api-utils/index.js +217 -0
  592. package/app/node_modules/next/dist/server/api-utils/node/api-resolver.js +395 -0
  593. package/app/node_modules/next/dist/server/api-utils/node/parse-body.js +79 -0
  594. package/app/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +89 -0
  595. package/app/node_modules/next/dist/server/api-utils/web.js +17 -0
  596. package/app/node_modules/next/dist/server/app-render/action-async-storage-instance.js +14 -0
  597. package/app/node_modules/next/dist/server/app-render/action-async-storage.external.js +13 -0
  598. package/app/node_modules/next/dist/server/app-render/action-handler.js +1125 -0
  599. package/app/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +14 -0
  600. package/app/node_modules/next/dist/server/app-render/after-task-async-storage.external.js +13 -0
  601. package/app/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +332 -0
  602. package/app/node_modules/next/dist/server/app-render/app-render-render-utils.js +76 -0
  603. package/app/node_modules/next/dist/server/app-render/app-render-scheduling.js +188 -0
  604. package/app/node_modules/next/dist/server/app-render/app-render.js +6494 -0
  605. package/app/node_modules/next/dist/server/app-render/async-local-storage.js +76 -0
  606. package/app/node_modules/next/dist/server/app-render/blocking-route-messages.js +181 -0
  607. package/app/node_modules/next/dist/server/app-render/cache-signal.js +181 -0
  608. package/app/node_modules/next/dist/server/app-render/collect-segment-data.js +937 -0
  609. package/app/node_modules/next/dist/server/app-render/console-async-storage-instance.js +14 -0
  610. package/app/node_modules/next/dist/server/app-render/console-async-storage.external.js +13 -0
  611. package/app/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +38 -0
  612. package/app/node_modules/next/dist/server/app-render/create-component-tree.js +806 -0
  613. package/app/node_modules/next/dist/server/app-render/create-error-handler.js +190 -0
  614. package/app/node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +154 -0
  615. package/app/node_modules/next/dist/server/app-render/csrf-protection.js +86 -0
  616. package/app/node_modules/next/dist/server/app-render/debug-channel-server.js +47 -0
  617. package/app/node_modules/next/dist/server/app-render/debug-channel-server.node.js +60 -0
  618. package/app/node_modules/next/dist/server/app-render/debug-channel-server.web.js +60 -0
  619. package/app/node_modules/next/dist/server/app-render/dev-validation-error-delivery.js +37 -0
  620. package/app/node_modules/next/dist/server/app-render/dev-validation-events.js +26 -0
  621. package/app/node_modules/next/dist/server/app-render/dev-validation-scheduler.js +87 -0
  622. package/app/node_modules/next/dist/server/app-render/dev-validation-worker-globals.js +41 -0
  623. package/app/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +78 -0
  624. package/app/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +14 -0
  625. package/app/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +13 -0
  626. package/app/node_modules/next/dist/server/app-render/dynamic-rendering.js +1201 -0
  627. package/app/node_modules/next/dist/server/app-render/encryption-utils-server.js +114 -0
  628. package/app/node_modules/next/dist/server/app-render/encryption-utils.js +93 -0
  629. package/app/node_modules/next/dist/server/app-render/encryption.js +261 -0
  630. package/app/node_modules/next/dist/server/app-render/entry-base.js +265 -0
  631. package/app/node_modules/next/dist/server/app-render/flight-render-result.js +28 -0
  632. package/app/node_modules/next/dist/server/app-render/get-asset-query-string.js +29 -0
  633. package/app/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +45 -0
  634. package/app/node_modules/next/dist/server/app-render/get-layer-assets.js +69 -0
  635. package/app/node_modules/next/dist/server/app-render/get-preloadable-fonts.js +39 -0
  636. package/app/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +32 -0
  637. package/app/node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js +25 -0
  638. package/app/node_modules/next/dist/server/app-render/has-loading-component-in-tree.js +19 -0
  639. package/app/node_modules/next/dist/server/app-render/instant-test-bootstrap.js +20 -0
  640. package/app/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +31 -0
  641. package/app/node_modules/next/dist/server/app-render/instant-validation/boundary-impl.js +127 -0
  642. package/app/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +38 -0
  643. package/app/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +241 -0
  644. package/app/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +432 -0
  645. package/app/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
  646. package/app/node_modules/next/dist/server/app-render/instant-validation/instant-validation.js +934 -0
  647. package/app/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +96 -0
  648. package/app/node_modules/next/dist/server/app-render/interop-default.js +17 -0
  649. package/app/node_modules/next/dist/server/app-render/make-get-server-inserted-html.js +91 -0
  650. package/app/node_modules/next/dist/server/app-render/manifests-singleton.js +327 -0
  651. package/app/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +29 -0
  652. package/app/node_modules/next/dist/server/app-render/module-loading/instrument-module-getter.js +32 -0
  653. package/app/node_modules/next/dist/server/app-render/module-loading/track-dynamic-import.js +57 -0
  654. package/app/node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js +32 -0
  655. package/app/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +62 -0
  656. package/app/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +49 -0
  657. package/app/node_modules/next/dist/server/app-render/postponed-state.js +230 -0
  658. package/app/node_modules/next/dist/server/app-render/prospective-render-utils.js +74 -0
  659. package/app/node_modules/next/dist/server/app-render/react-large-shell-error.js +17 -0
  660. package/app/node_modules/next/dist/server/app-render/react-server.node.js +39 -0
  661. package/app/node_modules/next/dist/server/app-render/render-css-resource.js +57 -0
  662. package/app/node_modules/next/dist/server/app-render/required-scripts.js +76 -0
  663. package/app/node_modules/next/dist/server/app-render/rsc/postpone.js +18 -0
  664. package/app/node_modules/next/dist/server/app-render/rsc/preloads.js +74 -0
  665. package/app/node_modules/next/dist/server/app-render/rsc/taint.js +79 -0
  666. package/app/node_modules/next/dist/server/app-render/segment-explorer-path.js +128 -0
  667. package/app/node_modules/next/dist/server/app-render/server-inserted-html.js +77 -0
  668. package/app/node_modules/next/dist/server/app-render/staged-rendering.js +324 -0
  669. package/app/node_modules/next/dist/server/app-render/stale-time.js +101 -0
  670. package/app/node_modules/next/dist/server/app-render/stream-ops.js +155 -0
  671. package/app/node_modules/next/dist/server/app-render/stream-ops.node.js +842 -0
  672. package/app/node_modules/next/dist/server/app-render/stream-ops.web.js +249 -0
  673. package/app/node_modules/next/dist/server/app-render/strip-flight-headers.js +18 -0
  674. package/app/node_modules/next/dist/server/app-render/sync-io-messages.js +67 -0
  675. package/app/node_modules/next/dist/server/app-render/types.js +65 -0
  676. package/app/node_modules/next/dist/server/app-render/use-flight-response.js +217 -0
  677. package/app/node_modules/next/dist/server/app-render/vary-params.js +261 -0
  678. package/app/node_modules/next/dist/server/app-render/wait-for-response.js +36 -0
  679. package/app/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +237 -0
  680. package/app/node_modules/next/dist/server/app-render/work-async-storage-instance.js +14 -0
  681. package/app/node_modules/next/dist/server/app-render/work-async-storage.external.js +13 -0
  682. package/app/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +14 -0
  683. package/app/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +250 -0
  684. package/app/node_modules/next/dist/server/async-storage/draft-mode-provider.js +62 -0
  685. package/app/node_modules/next/dist/server/async-storage/request-store.js +192 -0
  686. package/app/node_modules/next/dist/server/async-storage/with-store.js +6 -0
  687. package/app/node_modules/next/dist/server/async-storage/work-store.js +97 -0
  688. package/app/node_modules/next/dist/server/base-http/helpers.js +36 -0
  689. package/app/node_modules/next/dist/server/base-http/index.js +54 -0
  690. package/app/node_modules/next/dist/server/base-http/node.js +147 -0
  691. package/app/node_modules/next/dist/server/base-http/web.js +124 -0
  692. package/app/node_modules/next/dist/server/base-server.js +1957 -0
  693. package/app/node_modules/next/dist/server/body-streams.js +122 -0
  694. package/app/node_modules/next/dist/server/cache-dir.js +26 -0
  695. package/app/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  696. package/app/node_modules/next/dist/server/ci-info.js +41 -0
  697. package/app/node_modules/next/dist/server/client-component-renderer-logger.js +70 -0
  698. package/app/node_modules/next/dist/server/config-schema.js +800 -0
  699. package/app/node_modules/next/dist/server/config-shared.js +395 -0
  700. package/app/node_modules/next/dist/server/config-utils.js +185 -0
  701. package/app/node_modules/next/dist/server/config.js +1836 -0
  702. package/app/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js +96 -0
  703. package/app/node_modules/next/dist/server/crypto-utils.js +70 -0
  704. package/app/node_modules/next/dist/server/dev/browser-logs/file-logger.js +186 -0
  705. package/app/node_modules/next/dist/server/dev/browser-logs/receive-logs.js +610 -0
  706. package/app/node_modules/next/dist/server/dev/browser-logs/source-map.js +222 -0
  707. package/app/node_modules/next/dist/server/dev/debug-channel.js +112 -0
  708. package/app/node_modules/next/dist/server/dev/dev-indicator-server-state.js +15 -0
  709. package/app/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +153 -0
  710. package/app/node_modules/next/dist/server/dev/dev-validation-worker.js +266 -0
  711. package/app/node_modules/next/dist/server/dev/get-source-map-from-file.js +100 -0
  712. package/app/node_modules/next/dist/server/dev/hot-middleware.js +276 -0
  713. package/app/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  714. package/app/node_modules/next/dist/server/dev/hot-reloader-shared-utils.js +56 -0
  715. package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1736 -0
  716. package/app/node_modules/next/dist/server/dev/hot-reloader-types.js +60 -0
  717. package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1380 -0
  718. package/app/node_modules/next/dist/server/dev/log-requests.js +152 -0
  719. package/app/node_modules/next/dist/server/dev/messages.js +74 -0
  720. package/app/node_modules/next/dist/server/dev/middleware-turbopack.js +422 -0
  721. package/app/node_modules/next/dist/server/dev/middleware-webpack.js +495 -0
  722. package/app/node_modules/next/dist/server/dev/node-stack-frames.js +81 -0
  723. package/app/node_modules/next/dist/server/dev/on-demand-entry-handler.js +773 -0
  724. package/app/node_modules/next/dist/server/dev/parse-version-info.js +108 -0
  725. package/app/node_modules/next/dist/server/dev/require-cache.js +109 -0
  726. package/app/node_modules/next/dist/server/dev/serialized-errors.js +67 -0
  727. package/app/node_modules/next/dist/server/dev/server-action-logger.js +37 -0
  728. package/app/node_modules/next/dist/server/dev/static-paths-worker.js +106 -0
  729. package/app/node_modules/next/dist/server/dev/turbopack-utils.js +727 -0
  730. package/app/node_modules/next/dist/server/dev/use-cache-probe-pool.js +177 -0
  731. package/app/node_modules/next/dist/server/dev/use-cache-probe-worker.js +179 -0
  732. package/app/node_modules/next/dist/server/dynamic-rendering-utils.js +285 -0
  733. package/app/node_modules/next/dist/server/font-utils.js +43 -0
  734. package/app/node_modules/next/dist/server/get-app-route-from-entrypoint.js +30 -0
  735. package/app/node_modules/next/dist/server/get-page-files.js +40 -0
  736. package/app/node_modules/next/dist/server/get-route-from-entrypoint.js +35 -0
  737. package/app/node_modules/next/dist/server/image-optimizer.js +1247 -0
  738. package/app/node_modules/next/dist/server/instrumentation/types.js +6 -0
  739. package/app/node_modules/next/dist/server/instrumentation/utils.js +21 -0
  740. package/app/node_modules/next/dist/server/internal-utils.js +39 -0
  741. package/app/node_modules/next/dist/server/is-private-ip.js +36 -0
  742. package/app/node_modules/next/dist/server/lib/app-dir-module.js +59 -0
  743. package/app/node_modules/next/dist/server/lib/app-info-log.js +135 -0
  744. package/app/node_modules/next/dist/server/lib/async-callback-set.js +29 -0
  745. package/app/node_modules/next/dist/server/lib/cache-control.js +22 -0
  746. package/app/node_modules/next/dist/server/lib/cache-handlers/default.external.js +18 -0
  747. package/app/node_modules/next/dist/server/lib/cache-handlers/default.js +196 -0
  748. package/app/node_modules/next/dist/server/lib/cache-handlers/types.js +8 -0
  749. package/app/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +116 -0
  750. package/app/node_modules/next/dist/server/lib/clone-response.js +77 -0
  751. package/app/node_modules/next/dist/server/lib/cpu-profile.js +56 -0
  752. package/app/node_modules/next/dist/server/lib/decode-query-path-parameter.js +26 -0
  753. package/app/node_modules/next/dist/server/lib/dedupe-fetch.js +163 -0
  754. package/app/node_modules/next/dist/server/lib/dev-bundler-service.js +110 -0
  755. package/app/node_modules/next/dist/server/lib/disk-lru-cache.external.js +57 -0
  756. package/app/node_modules/next/dist/server/lib/encode-cache-tag.js +45 -0
  757. package/app/node_modules/next/dist/server/lib/etag.js +56 -0
  758. package/app/node_modules/next/dist/server/lib/experimental/create-env-definitions.js +48 -0
  759. package/app/node_modules/next/dist/server/lib/experimental/ppr.js +47 -0
  760. package/app/node_modules/next/dist/server/lib/find-page-file.js +147 -0
  761. package/app/node_modules/next/dist/server/lib/fix-mojibake.js +25 -0
  762. package/app/node_modules/next/dist/server/lib/format-hostname.js +16 -0
  763. package/app/node_modules/next/dist/server/lib/generate-agent-files.js +180 -0
  764. package/app/node_modules/next/dist/server/lib/i18n-provider.js +129 -0
  765. package/app/node_modules/next/dist/server/lib/implicit-tags.js +87 -0
  766. package/app/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +335 -0
  767. package/app/node_modules/next/dist/server/lib/incremental-cache/index.js +547 -0
  768. package/app/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +59 -0
  769. package/app/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +73 -0
  770. package/app/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js +55 -0
  771. package/app/node_modules/next/dist/server/lib/install-code-frame.js +22 -0
  772. package/app/node_modules/next/dist/server/lib/is-ipv6.js +41 -0
  773. package/app/node_modules/next/dist/server/lib/is-non-html-sec-fetch-dest.js +38 -0
  774. package/app/node_modules/next/dist/server/lib/is-rsc-request.js +18 -0
  775. package/app/node_modules/next/dist/server/lib/lazy-module.js +80 -0
  776. package/app/node_modules/next/dist/server/lib/lazy-result.js +46 -0
  777. package/app/node_modules/next/dist/server/lib/lru-cache.js +191 -0
  778. package/app/node_modules/next/dist/server/lib/match-next-data-pathname.js +18 -0
  779. package/app/node_modules/next/dist/server/lib/mock-request.js +441 -0
  780. package/app/node_modules/next/dist/server/lib/module-loader/module-loader.js +8 -0
  781. package/app/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +25 -0
  782. package/app/node_modules/next/dist/server/lib/module-loader/route-module-loader.js +26 -0
  783. package/app/node_modules/next/dist/server/lib/node-fs-methods.js +28 -0
  784. package/app/node_modules/next/dist/server/lib/params-utils.js +70 -0
  785. package/app/node_modules/next/dist/server/lib/parse-stack.js +46 -0
  786. package/app/node_modules/next/dist/server/lib/patch-fetch.js +1027 -0
  787. package/app/node_modules/next/dist/server/lib/patch-set-header.js +45 -0
  788. package/app/node_modules/next/dist/server/lib/postponed-request-body.js +64 -0
  789. package/app/node_modules/next/dist/server/lib/release-compression-stream.js +24 -0
  790. package/app/node_modules/next/dist/server/lib/render-server.js +157 -0
  791. package/app/node_modules/next/dist/server/lib/router-server.js +756 -0
  792. package/app/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +110 -0
  793. package/app/node_modules/next/dist/server/lib/router-utils/build-data-route.js +48 -0
  794. package/app/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +50 -0
  795. package/app/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +212 -0
  796. package/app/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +42 -0
  797. package/app/node_modules/next/dist/server/lib/router-utils/filesystem.js +612 -0
  798. package/app/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +89 -0
  799. package/app/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +114 -0
  800. package/app/node_modules/next/dist/server/lib/router-utils/is-postpone.js +16 -0
  801. package/app/node_modules/next/dist/server/lib/router-utils/proxy-request.js +128 -0
  802. package/app/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +646 -0
  803. package/app/node_modules/next/dist/server/lib/router-utils/root-params-type-utils.js +61 -0
  804. package/app/node_modules/next/dist/server/lib/router-utils/route-types-utils.js +326 -0
  805. package/app/node_modules/next/dist/server/lib/router-utils/router-server-context.js +26 -0
  806. package/app/node_modules/next/dist/server/lib/router-utils/typegen.js +892 -0
  807. package/app/node_modules/next/dist/server/lib/router-utils/types.js +6 -0
  808. package/app/node_modules/next/dist/server/lib/server-action-request-meta.js +53 -0
  809. package/app/node_modules/next/dist/server/lib/server-ipc/utils.js +83 -0
  810. package/app/node_modules/next/dist/server/lib/source-maps.js +241 -0
  811. package/app/node_modules/next/dist/server/lib/start-server.js +540 -0
  812. package/app/node_modules/next/dist/server/lib/streaming-metadata.js +27 -0
  813. package/app/node_modules/next/dist/server/lib/to-route.js +37 -0
  814. package/app/node_modules/next/dist/server/lib/trace/constants.js +208 -0
  815. package/app/node_modules/next/dist/server/lib/trace/local-span-recorder.js +385 -0
  816. package/app/node_modules/next/dist/server/lib/trace/request-insights-identity.js +39 -0
  817. package/app/node_modules/next/dist/server/lib/trace/request-insights.js +308 -0
  818. package/app/node_modules/next/dist/server/lib/trace/span-store.js +69 -0
  819. package/app/node_modules/next/dist/server/lib/trace/tracer.js +392 -0
  820. package/app/node_modules/next/dist/server/lib/trace/utils.js +16 -0
  821. package/app/node_modules/next/dist/server/lib/types.js +6 -0
  822. package/app/node_modules/next/dist/server/lib/utils.js +292 -0
  823. package/app/node_modules/next/dist/server/lib/worker-utils.js +36 -0
  824. package/app/node_modules/next/dist/server/load-components.js +185 -0
  825. package/app/node_modules/next/dist/server/load-default-error-components.js +41 -0
  826. package/app/node_modules/next/dist/server/load-manifest.external.js +117 -0
  827. package/app/node_modules/next/dist/server/match-bundle.js +25 -0
  828. package/app/node_modules/next/dist/server/mcp/get-mcp-middleware.js +49 -0
  829. package/app/node_modules/next/dist/server/mcp/get-or-create-mcp-server.js +51 -0
  830. package/app/node_modules/next/dist/server/mcp/mcp-telemetry-tracker.js +82 -0
  831. package/app/node_modules/next/dist/server/mcp/tools/compile-route.js +86 -0
  832. package/app/node_modules/next/dist/server/mcp/tools/get-compilation-issues.js +68 -0
  833. package/app/node_modules/next/dist/server/mcp/tools/get-errors.js +114 -0
  834. package/app/node_modules/next/dist/server/mcp/tools/get-logs.js +67 -0
  835. package/app/node_modules/next/dist/server/mcp/tools/get-page-metadata.js +188 -0
  836. package/app/node_modules/next/dist/server/mcp/tools/get-project-metadata.js +59 -0
  837. package/app/node_modules/next/dist/server/mcp/tools/get-request-insights.js +57 -0
  838. package/app/node_modules/next/dist/server/mcp/tools/get-routes.js +136 -0
  839. package/app/node_modules/next/dist/server/mcp/tools/get-server-action-by-id.js +121 -0
  840. package/app/node_modules/next/dist/server/mcp/tools/next-instance-error-state.js +31 -0
  841. package/app/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +90 -0
  842. package/app/node_modules/next/dist/server/mcp/tools/utils/format-compilation-issues.js +72 -0
  843. package/app/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +137 -0
  844. package/app/node_modules/next/dist/server/mcp/tools/utils/resolve-path-to-route.js +49 -0
  845. package/app/node_modules/next/dist/server/next-server.js +1443 -0
  846. package/app/node_modules/next/dist/server/next-typescript.js +13 -0
  847. package/app/node_modules/next/dist/server/next.js +485 -0
  848. package/app/node_modules/next/dist/server/node-environment-baseline.js +25 -0
  849. package/app/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +301 -0
  850. package/app/node_modules/next/dist/server/node-environment-extensions/console-exit.js +49 -0
  851. package/app/node_modules/next/dist/server/node-environment-extensions/console-file.js +56 -0
  852. package/app/node_modules/next/dist/server/node-environment-extensions/date.js +52 -0
  853. package/app/node_modules/next/dist/server/node-environment-extensions/error-inspect.js +8 -0
  854. package/app/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +577 -0
  855. package/app/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +33 -0
  856. package/app/node_modules/next/dist/server/node-environment-extensions/io-utils.js +102 -0
  857. package/app/node_modules/next/dist/server/node-environment-extensions/node-crypto.js +103 -0
  858. package/app/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +170 -0
  859. package/app/node_modules/next/dist/server/node-environment-extensions/random.js +28 -0
  860. package/app/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +518 -0
  861. package/app/node_modules/next/dist/server/node-environment-extensions/web-crypto.js +45 -0
  862. package/app/node_modules/next/dist/server/node-environment.js +19 -0
  863. package/app/node_modules/next/dist/server/node-polyfill-crypto.js +21 -0
  864. package/app/node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js +33 -0
  865. package/app/node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js +54 -0
  866. package/app/node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js +22 -0
  867. package/app/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +40 -0
  868. package/app/node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js +55 -0
  869. package/app/node_modules/next/dist/server/normalizers/built/app/index.js +42 -0
  870. package/app/node_modules/next/dist/server/normalizers/built/pages/index.js +44 -0
  871. package/app/node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js +55 -0
  872. package/app/node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js +22 -0
  873. package/app/node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js +19 -0
  874. package/app/node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js +19 -0
  875. package/app/node_modules/next/dist/server/normalizers/locale-route-normalizer.js +26 -0
  876. package/app/node_modules/next/dist/server/normalizers/normalizer.js +6 -0
  877. package/app/node_modules/next/dist/server/normalizers/normalizers.js +23 -0
  878. package/app/node_modules/next/dist/server/normalizers/prefixing-normalizer.js +26 -0
  879. package/app/node_modules/next/dist/server/normalizers/request/base-path.js +25 -0
  880. package/app/node_modules/next/dist/server/normalizers/request/next-data.js +38 -0
  881. package/app/node_modules/next/dist/server/normalizers/request/pathname-normalizer.js +6 -0
  882. package/app/node_modules/next/dist/server/normalizers/request/prefix.js +39 -0
  883. package/app/node_modules/next/dist/server/normalizers/request/rsc.js +19 -0
  884. package/app/node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js +33 -0
  885. package/app/node_modules/next/dist/server/normalizers/request/suffix.js +27 -0
  886. package/app/node_modules/next/dist/server/normalizers/underscore-normalizer.js +17 -0
  887. package/app/node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js +17 -0
  888. package/app/node_modules/next/dist/server/og/cache-image-response.js +341 -0
  889. package/app/node_modules/next/dist/server/og/image-response.js +72 -0
  890. package/app/node_modules/next/dist/server/patch-error-inspect.js +507 -0
  891. package/app/node_modules/next/dist/server/pipe-readable.js +212 -0
  892. package/app/node_modules/next/dist/server/post-process.js +39 -0
  893. package/app/node_modules/next/dist/server/render-result.js +246 -0
  894. package/app/node_modules/next/dist/server/render.js +1150 -0
  895. package/app/node_modules/next/dist/server/request/connection.js +135 -0
  896. package/app/node_modules/next/dist/server/request/cookies.js +239 -0
  897. package/app/node_modules/next/dist/server/request/draft-mode.js +238 -0
  898. package/app/node_modules/next/dist/server/request/fallback-params.js +95 -0
  899. package/app/node_modules/next/dist/server/request/headers.js +235 -0
  900. package/app/node_modules/next/dist/server/request/io.js +96 -0
  901. package/app/node_modules/next/dist/server/request/params.js +634 -0
  902. package/app/node_modules/next/dist/server/request/pathname.js +141 -0
  903. package/app/node_modules/next/dist/server/request/root-params.js +202 -0
  904. package/app/node_modules/next/dist/server/request/search-params.js +582 -0
  905. package/app/node_modules/next/dist/server/request/utils.js +84 -0
  906. package/app/node_modules/next/dist/server/request-meta.js +55 -0
  907. package/app/node_modules/next/dist/server/require-hook.js +82 -0
  908. package/app/node_modules/next/dist/server/require.js +109 -0
  909. package/app/node_modules/next/dist/server/response-cache/index.js +323 -0
  910. package/app/node_modules/next/dist/server/response-cache/types.js +41 -0
  911. package/app/node_modules/next/dist/server/response-cache/utils.js +104 -0
  912. package/app/node_modules/next/dist/server/response-cache/web.js +101 -0
  913. package/app/node_modules/next/dist/server/resume-data-cache/cache-store.js +101 -0
  914. package/app/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +142 -0
  915. package/app/node_modules/next/dist/server/revalidation-utils.js +156 -0
  916. package/app/node_modules/next/dist/server/route-definitions/app-page-route-definition.js +16 -0
  917. package/app/node_modules/next/dist/server/route-definitions/app-route-route-definition.js +6 -0
  918. package/app/node_modules/next/dist/server/route-definitions/locale-route-definition.js +6 -0
  919. package/app/node_modules/next/dist/server/route-definitions/pages-api-route-definition.js +6 -0
  920. package/app/node_modules/next/dist/server/route-definitions/pages-route-definition.js +6 -0
  921. package/app/node_modules/next/dist/server/route-definitions/route-definition.js +6 -0
  922. package/app/node_modules/next/dist/server/route-kind.js +32 -0
  923. package/app/node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js +239 -0
  924. package/app/node_modules/next/dist/server/route-matcher-managers/dev-route-matcher-manager.js +120 -0
  925. package/app/node_modules/next/dist/server/route-matcher-managers/route-matcher-manager.js +6 -0
  926. package/app/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +55 -0
  927. package/app/node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js +43 -0
  928. package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +91 -0
  929. package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.js +112 -0
  930. package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.js +77 -0
  931. package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.js +77 -0
  932. package/app/node_modules/next/dist/server/route-matcher-providers/dev/file-cache-route-matcher-provider.js +28 -0
  933. package/app/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.js +106 -0
  934. package/app/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/default-file-reader.js +42 -0
  935. package/app/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/file-reader.js +6 -0
  936. package/app/node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js +30 -0
  937. package/app/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/manifest-loader.js +6 -0
  938. package/app/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/node-manifest-loader.js +34 -0
  939. package/app/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js +20 -0
  940. package/app/node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js +21 -0
  941. package/app/node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js +55 -0
  942. package/app/node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js +64 -0
  943. package/app/node_modules/next/dist/server/route-matcher-providers/route-matcher-provider.js +6 -0
  944. package/app/node_modules/next/dist/server/route-matchers/app-page-route-matcher.js +18 -0
  945. package/app/node_modules/next/dist/server/route-matchers/app-route-route-matcher.js +15 -0
  946. package/app/node_modules/next/dist/server/route-matchers/locale-route-matcher.js +68 -0
  947. package/app/node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js +30 -0
  948. package/app/node_modules/next/dist/server/route-matchers/pages-route-matcher.js +30 -0
  949. package/app/node_modules/next/dist/server/route-matchers/route-matcher.js +54 -0
  950. package/app/node_modules/next/dist/server/route-matches/app-page-route-match.js +6 -0
  951. package/app/node_modules/next/dist/server/route-matches/app-route-route-match.js +6 -0
  952. package/app/node_modules/next/dist/server/route-matches/locale-route-match.js +6 -0
  953. package/app/node_modules/next/dist/server/route-matches/pages-api-route-match.js +16 -0
  954. package/app/node_modules/next/dist/server/route-matches/pages-route-match.js +6 -0
  955. package/app/node_modules/next/dist/server/route-matches/route-match.js +6 -0
  956. package/app/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +51 -0
  957. package/app/node_modules/next/dist/server/route-modules/app-page/module.compiled.js +36 -0
  958. package/app/node_modules/next/dist/server/route-modules/app-page/module.js +176 -0
  959. package/app/node_modules/next/dist/server/route-modules/app-page/module.render.js +24 -0
  960. package/app/node_modules/next/dist/server/route-modules/app-page/normalize-request-url.js +62 -0
  961. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js +4 -0
  962. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js +87 -0
  963. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js +4 -0
  964. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js +4 -0
  965. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js +4 -0
  966. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js +4 -0
  967. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js +4 -0
  968. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +140 -0
  969. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime.js +4 -0
  970. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js +4 -0
  971. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js +4 -0
  972. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js +4 -0
  973. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js +4 -0
  974. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js +4 -0
  975. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js +4 -0
  976. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static.js +4 -0
  977. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react.js +4 -0
  978. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +125 -0
  979. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime.js +4 -0
  980. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom-server.js +4 -0
  981. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js +4 -0
  982. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js +4 -0
  983. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js +4 -0
  984. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js +4 -0
  985. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client.js +4 -0
  986. package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js +4 -0
  987. package/app/node_modules/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +85 -0
  988. package/app/node_modules/next/dist/server/route-modules/app-route/helpers/clean-url.js +24 -0
  989. package/app/node_modules/next/dist/server/route-modules/app-route/helpers/get-pathname-from-absolute-path.js +29 -0
  990. package/app/node_modules/next/dist/server/route-modules/app-route/helpers/is-static-gen-enabled.js +15 -0
  991. package/app/node_modules/next/dist/server/route-modules/app-route/helpers/parsed-url-query-to-params.js +20 -0
  992. package/app/node_modules/next/dist/server/route-modules/app-route/module.compiled.js +36 -0
  993. package/app/node_modules/next/dist/server/route-modules/app-route/module.js +948 -0
  994. package/app/node_modules/next/dist/server/route-modules/app-route/shared-modules.js +56 -0
  995. package/app/node_modules/next/dist/server/route-modules/checks.js +45 -0
  996. package/app/node_modules/next/dist/server/route-modules/pages/builtin/_error.js +100 -0
  997. package/app/node_modules/next/dist/server/route-modules/pages/module.compiled.js +20 -0
  998. package/app/node_modules/next/dist/server/route-modules/pages/module.js +92 -0
  999. package/app/node_modules/next/dist/server/route-modules/pages/module.render.js +24 -0
  1000. package/app/node_modules/next/dist/server/route-modules/pages/pages-handler.js +567 -0
  1001. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js +4 -0
  1002. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js +102 -0
  1003. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js +4 -0
  1004. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js +4 -0
  1005. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js +4 -0
  1006. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js +4 -0
  1007. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js +4 -0
  1008. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js +4 -0
  1009. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js +4 -0
  1010. package/app/node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js +4 -0
  1011. package/app/node_modules/next/dist/server/route-modules/pages-api/module.compiled.js +20 -0
  1012. package/app/node_modules/next/dist/server/route-modules/pages-api/module.js +58 -0
  1013. package/app/node_modules/next/dist/server/route-modules/route-module.js +697 -0
  1014. package/app/node_modules/next/dist/server/runtime-reacts.external.js +46 -0
  1015. package/app/node_modules/next/dist/server/send-payload.js +88 -0
  1016. package/app/node_modules/next/dist/server/send-response.js +70 -0
  1017. package/app/node_modules/next/dist/server/serve-static.js +66 -0
  1018. package/app/node_modules/next/dist/server/server-route-utils.js +30 -0
  1019. package/app/node_modules/next/dist/server/server-utils.js +340 -0
  1020. package/app/node_modules/next/dist/server/setup-http-agent-env.js +31 -0
  1021. package/app/node_modules/next/dist/server/stream-utils/encoded-tags.js +122 -0
  1022. package/app/node_modules/next/dist/server/stream-utils/node-buffered-transform-stream.js +51 -0
  1023. package/app/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +939 -0
  1024. package/app/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +74 -0
  1025. package/app/node_modules/next/dist/server/typescript/constant.js +98 -0
  1026. package/app/node_modules/next/dist/server/typescript/index.js +199 -0
  1027. package/app/node_modules/next/dist/server/typescript/rules/client-boundary.js +100 -0
  1028. package/app/node_modules/next/dist/server/typescript/rules/config.js +534 -0
  1029. package/app/node_modules/next/dist/server/typescript/rules/entry.js +149 -0
  1030. package/app/node_modules/next/dist/server/typescript/rules/error.js +38 -0
  1031. package/app/node_modules/next/dist/server/typescript/rules/metadata.js +234 -0
  1032. package/app/node_modules/next/dist/server/typescript/rules/server-boundary.js +115 -0
  1033. package/app/node_modules/next/dist/server/typescript/rules/server.js +79 -0
  1034. package/app/node_modules/next/dist/server/typescript/utils.js +212 -0
  1035. package/app/node_modules/next/dist/server/use-cache/cache-life-profile.js +84 -0
  1036. package/app/node_modules/next/dist/server/use-cache/cache-life.js +102 -0
  1037. package/app/node_modules/next/dist/server/use-cache/cache-tag.js +52 -0
  1038. package/app/node_modules/next/dist/server/use-cache/clone-cache-entry.js +28 -0
  1039. package/app/node_modules/next/dist/server/use-cache/constants.js +44 -0
  1040. package/app/node_modules/next/dist/server/use-cache/handlers.js +260 -0
  1041. package/app/node_modules/next/dist/server/use-cache/tiered-cache-handler.js +145 -0
  1042. package/app/node_modules/next/dist/server/use-cache/use-cache-errors.js +59 -0
  1043. package/app/node_modules/next/dist/server/use-cache/use-cache-probe-globals.js +39 -0
  1044. package/app/node_modules/next/dist/server/use-cache/use-cache-probe-scheduler.js +116 -0
  1045. package/app/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +2536 -0
  1046. package/app/node_modules/next/dist/server/utils.js +73 -0
  1047. package/app/node_modules/next/dist/server/web/adapter.js +428 -0
  1048. package/app/node_modules/next/dist/server/web/edge-route-module-wrapper.js +136 -0
  1049. package/app/node_modules/next/dist/server/web/error.js +69 -0
  1050. package/app/node_modules/next/dist/server/web/exports/index.js +56 -0
  1051. package/app/node_modules/next/dist/server/web/get-edge-preview-props.js +23 -0
  1052. package/app/node_modules/next/dist/server/web/globals.js +128 -0
  1053. package/app/node_modules/next/dist/server/web/http.js +39 -0
  1054. package/app/node_modules/next/dist/server/web/internal-edge-wait-until.js +64 -0
  1055. package/app/node_modules/next/dist/server/web/next-url.js +199 -0
  1056. package/app/node_modules/next/dist/server/web/sandbox/context.js +468 -0
  1057. package/app/node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js +35 -0
  1058. package/app/node_modules/next/dist/server/web/sandbox/index.js +28 -0
  1059. package/app/node_modules/next/dist/server/web/sandbox/resource-managers.js +123 -0
  1060. package/app/node_modules/next/dist/server/web/sandbox/sandbox.js +137 -0
  1061. package/app/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +207 -0
  1062. package/app/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +142 -0
  1063. package/app/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js +30 -0
  1064. package/app/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +226 -0
  1065. package/app/node_modules/next/dist/server/web/spec-extension/cookies.js +29 -0
  1066. package/app/node_modules/next/dist/server/web/spec-extension/fetch-event.js +98 -0
  1067. package/app/node_modules/next/dist/server/web/spec-extension/image-response.js +22 -0
  1068. package/app/node_modules/next/dist/server/web/spec-extension/request.js +99 -0
  1069. package/app/node_modules/next/dist/server/web/spec-extension/response.js +136 -0
  1070. package/app/node_modules/next/dist/server/web/spec-extension/revalidate.js +219 -0
  1071. package/app/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +295 -0
  1072. package/app/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +51 -0
  1073. package/app/node_modules/next/dist/server/web/spec-extension/url-pattern.js +13 -0
  1074. package/app/node_modules/next/dist/server/web/spec-extension/user-agent.js +46 -0
  1075. package/app/node_modules/next/dist/server/web/types.js +6 -0
  1076. package/app/node_modules/next/dist/server/web/utils.js +151 -0
  1077. package/app/node_modules/next/dist/server/web/web-on-close.js +87 -0
  1078. package/app/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  1079. package/app/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +50 -0
  1080. package/app/node_modules/next/dist/shared/lib/app-router-types.js +159 -0
  1081. package/app/node_modules/next/dist/shared/lib/constants.js +453 -0
  1082. package/app/node_modules/next/dist/shared/lib/deep-freeze.js +30 -0
  1083. package/app/node_modules/next/dist/shared/lib/deployment-id.js +63 -0
  1084. package/app/node_modules/next/dist/shared/lib/dset.js +34 -0
  1085. package/app/node_modules/next/dist/shared/lib/encode-uri-path.js +15 -0
  1086. package/app/node_modules/next/dist/shared/lib/entry-constants.js +36 -0
  1087. package/app/node_modules/next/dist/shared/lib/error-source.js +36 -0
  1088. package/app/node_modules/next/dist/shared/lib/errors/code-frame.js +20 -0
  1089. package/app/node_modules/next/dist/shared/lib/errors/constants.js +19 -0
  1090. package/app/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +31 -0
  1091. package/app/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +25 -0
  1092. package/app/node_modules/next/dist/shared/lib/escape-regexp.js +22 -0
  1093. package/app/node_modules/next/dist/shared/lib/get-hostname.js +23 -0
  1094. package/app/node_modules/next/dist/shared/lib/hash.js +42 -0
  1095. package/app/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +18 -0
  1096. package/app/node_modules/next/dist/shared/lib/head.js +164 -0
  1097. package/app/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +60 -0
  1098. package/app/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +40 -0
  1099. package/app/node_modules/next/dist/shared/lib/htmlescape.js +52 -0
  1100. package/app/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +25 -0
  1101. package/app/node_modules/next/dist/shared/lib/i18n/get-locale-redirect.js +59 -0
  1102. package/app/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +54 -0
  1103. package/app/node_modules/next/dist/shared/lib/image-blur-svg.js +22 -0
  1104. package/app/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +19 -0
  1105. package/app/node_modules/next/dist/shared/lib/image-config.js +77 -0
  1106. package/app/node_modules/next/dist/shared/lib/instant-messages.js +43 -0
  1107. package/app/node_modules/next/dist/shared/lib/invariant-error.js +23 -0
  1108. package/app/node_modules/next/dist/shared/lib/is-plain-object.js +42 -0
  1109. package/app/node_modules/next/dist/shared/lib/is-thenable.js +20 -0
  1110. package/app/node_modules/next/dist/shared/lib/isomorphic/path.js +14 -0
  1111. package/app/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +37 -0
  1112. package/app/node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js +19 -0
  1113. package/app/node_modules/next/dist/shared/lib/loadable.shared-runtime.js +246 -0
  1114. package/app/node_modules/next/dist/shared/lib/match-local-pattern.js +46 -0
  1115. package/app/node_modules/next/dist/shared/lib/match-remote-pattern.js +63 -0
  1116. package/app/node_modules/next/dist/shared/lib/modern-browserslist-target.js +15 -0
  1117. package/app/node_modules/next/dist/shared/lib/no-fallback-error.external.js +18 -0
  1118. package/app/node_modules/next/dist/shared/lib/normalized-asset-prefix.js +28 -0
  1119. package/app/node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js +26 -0
  1120. package/app/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +18 -0
  1121. package/app/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +18 -0
  1122. package/app/node_modules/next/dist/shared/lib/page-path/get-page-paths.js +40 -0
  1123. package/app/node_modules/next/dist/shared/lib/page-path/normalize-data-path.js +23 -0
  1124. package/app/node_modules/next/dist/shared/lib/page-path/normalize-page-path.js +26 -0
  1125. package/app/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +19 -0
  1126. package/app/node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js +20 -0
  1127. package/app/node_modules/next/dist/shared/lib/promise-with-resolvers.js +26 -0
  1128. package/app/node_modules/next/dist/shared/lib/request-insights.js +30 -0
  1129. package/app/node_modules/next/dist/shared/lib/router/adapters.js +139 -0
  1130. package/app/node_modules/next/dist/shared/lib/router/routes/app.js +158 -0
  1131. package/app/node_modules/next/dist/shared/lib/router/utils/add-locale.js +28 -0
  1132. package/app/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +20 -0
  1133. package/app/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +20 -0
  1134. package/app/node_modules/next/dist/shared/lib/router/utils/app-paths.js +62 -0
  1135. package/app/node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js +17 -0
  1136. package/app/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +70 -0
  1137. package/app/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +16 -0
  1138. package/app/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +27 -0
  1139. package/app/node_modules/next/dist/shared/lib/router/utils/format-url.js +111 -0
  1140. package/app/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +174 -0
  1141. package/app/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
  1142. package/app/node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js +25 -0
  1143. package/app/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +90 -0
  1144. package/app/node_modules/next/dist/shared/lib/router/utils/html-bots.js +17 -0
  1145. package/app/node_modules/next/dist/shared/lib/router/utils/index.js +30 -0
  1146. package/app/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  1147. package/app/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +108 -0
  1148. package/app/node_modules/next/dist/shared/lib/router/utils/is-bot.js +57 -0
  1149. package/app/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
  1150. package/app/node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js +31 -0
  1151. package/app/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +30 -0
  1152. package/app/node_modules/next/dist/shared/lib/router/utils/parse-path.js +33 -0
  1153. package/app/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +43 -0
  1154. package/app/node_modules/next/dist/shared/lib/router/utils/parse-url.js +38 -0
  1155. package/app/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +20 -0
  1156. package/app/node_modules/next/dist/shared/lib/router/utils/path-match.js +49 -0
  1157. package/app/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +293 -0
  1158. package/app/node_modules/next/dist/shared/lib/router/utils/querystring.js +79 -0
  1159. package/app/node_modules/next/dist/shared/lib/router/utils/relativize-url.js +40 -0
  1160. package/app/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +39 -0
  1161. package/app/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +22 -0
  1162. package/app/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +116 -0
  1163. package/app/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +113 -0
  1164. package/app/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +45 -0
  1165. package/app/node_modules/next/dist/shared/lib/router/utils/route-regex.js +256 -0
  1166. package/app/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +244 -0
  1167. package/app/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +18 -0
  1168. package/app/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +99 -0
  1169. package/app/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +66 -0
  1170. package/app/node_modules/next/dist/shared/lib/segment.js +102 -0
  1171. package/app/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +35 -0
  1172. package/app/node_modules/next/dist/shared/lib/server-reference-info.js +68 -0
  1173. package/app/node_modules/next/dist/shared/lib/side-effect.js +63 -0
  1174. package/app/node_modules/next/dist/shared/lib/size-limit.js +40 -0
  1175. package/app/node_modules/next/dist/shared/lib/turbopack/internal-error.js +53 -0
  1176. package/app/node_modules/next/dist/shared/lib/utils/reflect-utils.js +69 -0
  1177. package/app/node_modules/next/dist/shared/lib/utils/warn-once.js +22 -0
  1178. package/app/node_modules/next/dist/shared/lib/utils.js +216 -0
  1179. package/app/node_modules/next/dist/shared/lib/zod.js +101 -0
  1180. package/app/node_modules/next/dist/telemetry/agent-name.js +20 -0
  1181. package/app/node_modules/next/dist/telemetry/anonymous-meta.js +91 -0
  1182. package/app/node_modules/next/dist/telemetry/detached-flush.js +56 -0
  1183. package/app/node_modules/next/dist/telemetry/events/build.js +187 -0
  1184. package/app/node_modules/next/dist/telemetry/events/index.js +41 -0
  1185. package/app/node_modules/next/dist/telemetry/events/plugins.js +51 -0
  1186. package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +55 -0
  1187. package/app/node_modules/next/dist/telemetry/events/version.js +68 -0
  1188. package/app/node_modules/next/dist/telemetry/flush-telemetry.js +19 -0
  1189. package/app/node_modules/next/dist/telemetry/post-telemetry-payload.js +48 -0
  1190. package/app/node_modules/next/dist/telemetry/project-id.js +48 -0
  1191. package/app/node_modules/next/dist/telemetry/storage.js +305 -0
  1192. package/app/node_modules/next/dist/trace/index.js +58 -0
  1193. package/app/node_modules/next/dist/trace/report/index.js +37 -0
  1194. package/app/node_modules/next/dist/trace/report/to-json-build.js +40 -0
  1195. package/app/node_modules/next/dist/trace/report/to-json.js +171 -0
  1196. package/app/node_modules/next/dist/trace/report/to-telemetry.js +36 -0
  1197. package/app/node_modules/next/dist/trace/shared.js +39 -0
  1198. package/app/node_modules/next/dist/trace/trace.js +211 -0
  1199. package/app/node_modules/next/package.json +139 -0
  1200. package/app/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  1201. package/app/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  1202. package/app/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  1203. package/app/node_modules/react/cjs/react.development.js +1284 -0
  1204. package/app/node_modules/react/cjs/react.production.js +542 -0
  1205. package/app/node_modules/react/compiler-runtime.js +14 -0
  1206. package/app/node_modules/react/index.js +7 -0
  1207. package/app/node_modules/react/jsx-dev-runtime.js +7 -0
  1208. package/app/node_modules/react/jsx-runtime.js +7 -0
  1209. package/app/node_modules/react/package.json +51 -0
  1210. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +6603 -0
  1211. package/app/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +6692 -0
  1212. package/app/node_modules/react-dom/cjs/react-dom-server.browser.production.js +7410 -0
  1213. package/app/node_modules/react-dom/cjs/react-dom-server.edge.production.js +7512 -0
  1214. package/app/node_modules/react-dom/cjs/react-dom-server.node.production.js +7707 -0
  1215. package/app/node_modules/react-dom/cjs/react-dom.production.js +210 -0
  1216. package/app/node_modules/react-dom/index.js +38 -0
  1217. package/app/node_modules/react-dom/package.json +117 -0
  1218. package/app/node_modules/react-dom/server.browser.js +16 -0
  1219. package/app/node_modules/react-dom/server.edge.js +17 -0
  1220. package/app/node_modules/react-dom/server.node.js +18 -0
  1221. package/app/node_modules/react-dom/static.node.js +14 -0
  1222. package/app/node_modules/semver/package.json +38 -0
  1223. package/app/node_modules/styled-jsx/dist/index/index.js +499 -0
  1224. package/app/node_modules/styled-jsx/index.js +1 -0
  1225. package/app/node_modules/styled-jsx/package.json +132 -0
  1226. package/app/node_modules/styled-jsx/style.js +1 -0
  1227. package/app/package.json +59 -0
  1228. package/app/public/file.svg +1 -0
  1229. package/app/public/globe.svg +1 -0
  1230. package/app/public/next.svg +1 -0
  1231. package/app/public/vercel.svg +1 -0
  1232. package/app/public/window.svg +1 -0
  1233. package/app/server.js +38 -0
  1234. package/bin/agent-session-inspector.mjs +158 -0
  1235. package/package.json +28 -5
@@ -0,0 +1,1468 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ FreshnessPolicy: null,
7
+ beginLockedNavigation: null,
8
+ createInitialCacheNodeForHydration: null,
9
+ getCurrentNavigationLock: null,
10
+ isDeferredRsc: null,
11
+ resetNavigationLockToPending: null,
12
+ spawnDynamicRequests: null,
13
+ startPPRNavigation: null
14
+ });
15
+ function _export(target, all) {
16
+ for(var name in all)Object.defineProperty(target, name, {
17
+ enumerable: true,
18
+ get: all[name]
19
+ });
20
+ }
21
+ _export(exports, {
22
+ FreshnessPolicy: function() {
23
+ return FreshnessPolicy;
24
+ },
25
+ beginLockedNavigation: function() {
26
+ return beginLockedNavigation;
27
+ },
28
+ createInitialCacheNodeForHydration: function() {
29
+ return createInitialCacheNodeForHydration;
30
+ },
31
+ getCurrentNavigationLock: function() {
32
+ return getCurrentNavigationLock;
33
+ },
34
+ isDeferredRsc: function() {
35
+ return isDeferredRsc;
36
+ },
37
+ resetNavigationLockToPending: function() {
38
+ return resetNavigationLockToPending;
39
+ },
40
+ spawnDynamicRequests: function() {
41
+ return spawnDynamicRequests;
42
+ },
43
+ startPPRNavigation: function() {
44
+ return startPPRNavigation;
45
+ }
46
+ });
47
+ const _approutertypes = require("../../../shared/lib/app-router-types");
48
+ const _segment = require("../../../shared/lib/segment");
49
+ const _matchsegments = require("../match-segments");
50
+ const _createhreffromurl = require("./create-href-from-url");
51
+ const _fetchserverresponse = require("./fetch-server-response");
52
+ const _useactionqueue = require("../use-action-queue");
53
+ const _routerreducertypes = require("./router-reducer-types");
54
+ const _isnavigatingtonewrootlayout = require("./is-navigating-to-new-root-layout");
55
+ const _committedstate = require("./reducers/committed-state");
56
+ const _navigation = require("../segment-cache/navigation");
57
+ const _cache = require("../segment-cache/cache");
58
+ const _types = require("../segment-cache/types");
59
+ const _optimisticroutes = require("../segment-cache/optimistic-routes");
60
+ const _constants = require("../../../lib/constants");
61
+ const _routeparams = require("../../route-params");
62
+ const _varypath = require("../segment-cache/vary-path");
63
+ const _bfcache = require("../segment-cache/bfcache");
64
+ var FreshnessPolicy = /*#__PURE__*/ function(FreshnessPolicy) {
65
+ FreshnessPolicy[FreshnessPolicy["Default"] = 0] = "Default";
66
+ FreshnessPolicy[FreshnessPolicy["Hydration"] = 1] = "Hydration";
67
+ FreshnessPolicy[FreshnessPolicy["HistoryTraversal"] = 2] = "HistoryTraversal";
68
+ FreshnessPolicy[FreshnessPolicy["RefreshAll"] = 3] = "RefreshAll";
69
+ FreshnessPolicy[FreshnessPolicy["HMRRefresh"] = 4] = "HMRRefresh";
70
+ FreshnessPolicy[FreshnessPolicy["Gesture"] = 5] = "Gesture";
71
+ return FreshnessPolicy;
72
+ }({});
73
+ const noop = ()=>{};
74
+ function createInitialCacheNodeForHydration(navigatedAt, initialTree, seedData, seedHead, seedDynamicStaleAt) {
75
+ // Create the initial cache node tree, using the data embedded into the
76
+ // HTML document.
77
+ const accumulation = {
78
+ separateRefreshUrls: null,
79
+ scrollRef: null
80
+ };
81
+ const restrictToShell = false;
82
+ const task = createCacheNodeOnNavigation(navigatedAt, initialTree, null, 1, seedData, seedHead, seedDynamicStaleAt, false, accumulation, restrictToShell);
83
+ return task;
84
+ }
85
+ function startPPRNavigation(navigatedAt, oldUrl, oldRenderedSearch, oldCacheNode, oldRouterState, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, isSamePageNavigation, accumulation, // Instant Navigation Testing API only — restricts segment reads to shell
86
+ // entries. Always false outside the testing API. See navigation-testing-lock.
87
+ restrictToShell) {
88
+ const parentNeedsDynamicRequest = false;
89
+ const parentRefreshState = null;
90
+ const oldRootRefreshState = {
91
+ canonicalUrl: (0, _createhreffromurl.createHrefFromUrl)(oldUrl),
92
+ renderedSearch: oldRenderedSearch
93
+ };
94
+ return updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNode !== null ? oldCacheNode : undefined, oldRouterState, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, restrictToShell);
95
+ }
96
+ function updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNode, oldRouterState, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest, oldRootRefreshState, parentRefreshState, accumulation, // Instant Navigation Testing API only — restricts segment reads to shell
97
+ // entries. Always false outside the testing API. See navigation-testing-lock.
98
+ restrictToShell) {
99
+ // Check if this segment matches the one in the previous route. A
100
+ // search-param-only difference at a page segment falls through to the
101
+ // matched branch — the CacheNode is rebuilt (so data refetches), but the
102
+ // bfcacheId carries forward as if the segment had matched.
103
+ const oldSegment = oldRouterState[0];
104
+ const newSegment = createSegmentFromRouteTree(newRouteTree);
105
+ const segmentMatchKind = compareSegments(newSegment, oldSegment);
106
+ if (segmentMatchKind === 1) {
107
+ // This segment does not match the previous route. We're now entering the
108
+ // new part of the target route. Switch to the "create" path.
109
+ if ((newRouteTree.prefetchHints & _approutertypes.PrefetchHint.IsRootLayoutOrAbove) !== 0 && (0, _isnavigatingtonewrootlayout.isNavigatingToNewRootLayout)(oldRouterState, newRouteTree) || // The global Not Found route (app/global-not-found.tsx) is a special
110
+ // case, because it acts like a root layout, but in the router tree, it
111
+ // is rendered in the same position as app/layout.tsx.
112
+ //
113
+ // Any navigation to the global Not Found route should trigger a
114
+ // full-page navigation.
115
+ //
116
+ // TODO: We should probably model this by changing the key of the root
117
+ // segment when this happens. Then the root layout check would work
118
+ // as expected, without a special case.
119
+ newSegment === _segment.NOT_FOUND_SEGMENT_KEY) {
120
+ return null;
121
+ }
122
+ return createCacheNodeOnNavigation(navigatedAt, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, restrictToShell);
123
+ }
124
+ const newSlots = newRouteTree.slots;
125
+ const oldRouterStateChildren = oldRouterState[1];
126
+ const seedDataChildren = seedData !== null ? seedData[1] : null;
127
+ let shouldRefreshDynamicData = false;
128
+ switch(freshness){
129
+ case 0:
130
+ case 2:
131
+ case 1:
132
+ case 5:
133
+ shouldRefreshDynamicData = false;
134
+ break;
135
+ case 3:
136
+ case 4:
137
+ shouldRefreshDynamicData = true;
138
+ break;
139
+ default:
140
+ freshness;
141
+ break;
142
+ }
143
+ // TODO: We're not consistent about how we do this check. Some places
144
+ // check if the segment starts with PAGE_SEGMENT_KEY, but most seem to
145
+ // check if there any any children, which is why I'm doing it here. We
146
+ // should probably encode an empty children set as `null` though. Either
147
+ // way, we should update all the checks to be consistent.
148
+ const isLeafSegment = newSlots === null;
149
+ // Get the data for this segment. Since it was part of the previous route,
150
+ // usually we just clone the data from the old CacheNode. However, during a
151
+ // refresh or a revalidation, there won't be any existing CacheNode. So we
152
+ // may need to consult the prefetch cache, like we would for a new segment.
153
+ let newCacheNode;
154
+ let needsDynamicRequest;
155
+ if (oldCacheNode !== undefined && !shouldRefreshDynamicData && // During a same-page navigation, we always refetch the page segments
156
+ !(isLeafSegment && isSamePageNavigation) && // A search-param-only change is treated as a refresh of the page segment.
157
+ // The internal cache key of the data is different, but the identity of
158
+ // the node in the route tree is the same.
159
+ segmentMatchKind !== 2) {
160
+ // Reuse the existing CacheNode
161
+ const dropPrefetchRsc = false;
162
+ newCacheNode = reuseSharedCacheNode(dropPrefetchRsc, oldCacheNode);
163
+ needsDynamicRequest = false;
164
+ } else {
165
+ // If this is part of a refresh, ignore the existing CacheNode and create a
166
+ // new one.
167
+ const seedRsc = seedData !== null ? seedData[0] : null;
168
+ const result = createCacheNodeForSegment(navigatedAt, newRouteTree, seedRsc, newMetadataVaryPath, seedHead, freshness, seedDynamicStaleAt, // Carry forward the existing bfcacheId when there's a prior CacheNode:
169
+ // even though the data is being refreshed, the state identity of the
170
+ // route hasn't changed. Otherwise (no prior node) mint a fresh one.
171
+ oldCacheNode !== undefined ? oldCacheNode.bfcacheId : generateBFCacheId(freshness), restrictToShell);
172
+ newCacheNode = result.cacheNode;
173
+ needsDynamicRequest = result.needsDynamicRequest;
174
+ // Scroll handling
175
+ if (isLeafSegment && segmentMatchKind === 2) {
176
+ // Special case: A search param change mostly acts the same as a
177
+ // refresh, except it does trigger a scroll.
178
+ accumulateScrollRef(freshness, newCacheNode, accumulation);
179
+ } else {
180
+ // Normal case: This is a refresh of an existing segment. Carry forward
181
+ // the old node's scrollRef. This preserves scroll intent when a prior
182
+ // navigation's CacheNode is replaced by a refresh before the scroll
183
+ // handler has had a chance to fire — e.g. when router.push() and
184
+ // router.refresh() are called in the same startTransition batch.
185
+ if (oldCacheNode !== undefined) {
186
+ newCacheNode.scrollRef = oldCacheNode.scrollRef;
187
+ }
188
+ }
189
+ }
190
+ // During a refresh navigation, there's a special case that happens when
191
+ // entering a "default" slot. The default slot may not be part of the
192
+ // current route; it may have been reused from an older route. If so,
193
+ // we need to fetch its data from the old route's URL rather than current
194
+ // route's URL. Keep track of this as we traverse the tree.
195
+ const maybeRefreshState = newRouteTree.refreshState;
196
+ const refreshState = maybeRefreshState !== undefined && maybeRefreshState !== null ? // refresh URL as we continue traversing the tree.
197
+ maybeRefreshState : parentRefreshState;
198
+ // If this segment itself needs to fetch new data from the server, then by
199
+ // definition it is being refreshed. Track its refresh URL so we know which
200
+ // URL to request the data from.
201
+ if (needsDynamicRequest && refreshState !== null) {
202
+ accumulateRefreshUrl(accumulation, refreshState);
203
+ }
204
+ // As we diff the trees, we may sometimes modify (copy-on-write, not mutate)
205
+ // the Route Tree that was returned by the server — for example, in the case
206
+ // of default parallel routes, we preserve the currently active segment. To
207
+ // avoid mutating the original tree, we clone the router state children along
208
+ // the return path.
209
+ let patchedRouterStateChildren = {};
210
+ let taskChildren = null;
211
+ // Most navigations require a request to fetch additional data from the
212
+ // server, either because the data was not already prefetched, or because the
213
+ // target route contains dynamic data that cannot be prefetched.
214
+ //
215
+ // However, if the target route is fully static, and it's already completely
216
+ // loaded into the segment cache, then we can skip the server request.
217
+ //
218
+ // This starts off as `false`, and is set to `true` if any of the child
219
+ // routes requires a dynamic request.
220
+ let childNeedsDynamicRequest = false;
221
+ // As we traverse the children, we'll construct a FlightRouterState that can
222
+ // be sent to the server to request the dynamic data. If it turns out that
223
+ // nothing in the subtree is dynamic (i.e. childNeedsDynamicRequest is false
224
+ // at the end), then this will be discarded.
225
+ // TODO: We can probably optimize the format of this data structure to only
226
+ // include paths that are dynamic. Instead of reusing the
227
+ // FlightRouterState type.
228
+ let dynamicRequestTreeChildren = {};
229
+ let newCacheNodeSlots = null;
230
+ if (newSlots !== null) {
231
+ const oldCacheNodeSlots = oldCacheNode !== undefined ? oldCacheNode.slots : null;
232
+ newCacheNode.slots = newCacheNodeSlots = {};
233
+ taskChildren = new Map();
234
+ for (let [parallelRouteKey, newRouteTreeChild] of newSlots){
235
+ const oldRouterStateChild = oldRouterStateChildren[parallelRouteKey];
236
+ if (oldRouterStateChild === undefined) {
237
+ // This should never happen, but if it does, it suggests a malformed
238
+ // server response. Trigger a full-page navigation.
239
+ return null;
240
+ }
241
+ let seedDataChild = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null;
242
+ const oldSegmentChild = oldRouterStateChild[0];
243
+ let newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild);
244
+ let seedHeadChild = seedHead;
245
+ if (// Skip this branch during a history traversal. We restore the tree that
246
+ // was stashed in the history entry as-is.
247
+ freshness !== 2 && newSegmentChild === _segment.DEFAULT_SEGMENT_KEY && oldSegmentChild !== _segment.DEFAULT_SEGMENT_KEY) {
248
+ // This is a "default" segment. These are never sent by the server during
249
+ // a soft navigation; instead, the client reuses whatever segment was
250
+ // already active in that slot on the previous route.
251
+ newRouteTreeChild = reuseActiveSegmentInDefaultSlot(newRouteTree, parallelRouteKey, oldRootRefreshState, oldRouterStateChild);
252
+ newSegmentChild = createSegmentFromRouteTree(newRouteTreeChild);
253
+ // Since we're switching to a different route tree, these are no
254
+ // longer valid, because they correspond to the outer tree.
255
+ seedDataChild = null;
256
+ seedHeadChild = null;
257
+ }
258
+ const oldCacheNodeChild = oldCacheNodeSlots !== null ? oldCacheNodeSlots[parallelRouteKey] : undefined;
259
+ const taskChild = updateCacheNodeOnNavigation(navigatedAt, oldUrl, oldCacheNodeChild, oldRouterStateChild, newRouteTreeChild, newMetadataVaryPath, freshness, seedDataChild ?? null, seedHeadChild, seedDynamicStaleAt, isSamePageNavigation, parentNeedsDynamicRequest || needsDynamicRequest, oldRootRefreshState, refreshState, accumulation, restrictToShell);
260
+ if (taskChild === null) {
261
+ // One of the child tasks discovered a change to the root layout.
262
+ // Immediately unwind from this recursive traversal. This will trigger a
263
+ // full-page navigation.
264
+ return null;
265
+ }
266
+ // Recursively propagate up the child tasks.
267
+ taskChildren.set(parallelRouteKey, taskChild);
268
+ newCacheNodeSlots[parallelRouteKey] = taskChild.node;
269
+ // The child tree's route state may be different from the prefetched
270
+ // route sent by the server. We need to clone it as we traverse back up
271
+ // the tree.
272
+ const taskChildRoute = taskChild.route;
273
+ patchedRouterStateChildren[parallelRouteKey] = taskChildRoute;
274
+ const dynamicRequestTreeChild = taskChild.dynamicRequestTree;
275
+ if (dynamicRequestTreeChild !== null) {
276
+ // Something in the child tree is dynamic.
277
+ childNeedsDynamicRequest = true;
278
+ dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild;
279
+ } else {
280
+ dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute;
281
+ }
282
+ }
283
+ }
284
+ const newFlightRouterState = [
285
+ createSegmentFromRouteTree(newRouteTree),
286
+ patchedRouterStateChildren,
287
+ refreshState !== null ? [
288
+ refreshState.canonicalUrl,
289
+ refreshState.renderedSearch
290
+ ] : null,
291
+ null,
292
+ newRouteTree.prefetchHints
293
+ ];
294
+ return {
295
+ status: needsDynamicRequest ? 0 : 1,
296
+ route: newFlightRouterState,
297
+ node: newCacheNode,
298
+ dynamicRequestTree: createDynamicRequestTree(newFlightRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest),
299
+ refreshState,
300
+ children: taskChildren
301
+ };
302
+ }
303
+ /**
304
+ * Assigns a ScrollRef to a new leaf CacheNode so the scroll handler
305
+ * knows to scroll to it after navigation. All leaves in the same
306
+ * navigation share the same ScrollRef — the first segment to scroll
307
+ * consumes it, preventing others from also scrolling.
308
+ *
309
+ * This is only called inside `createCacheNodeOnNavigation`, which only
310
+ * runs when segments diverge from the previous route. So for a refresh
311
+ * where the route structure stays the same, segments match, the update
312
+ * path is taken, and this function is never called — no scroll ref is
313
+ * assigned. A scroll ref is only assigned when the route actually
314
+ * changed (e.g. a redirect, or a dynamic condition on the server that
315
+ * produces a different route).
316
+ *
317
+ * Skipped during hydration (initial render should not scroll) and
318
+ * history traversal (scroll restoration is handled separately).
319
+ */ function accumulateScrollRef(freshness, cacheNode, accumulation) {
320
+ switch(freshness){
321
+ case 0:
322
+ case 5:
323
+ case 3:
324
+ case 4:
325
+ if (accumulation.scrollRef === null) {
326
+ accumulation.scrollRef = {
327
+ current: true
328
+ };
329
+ }
330
+ cacheNode.scrollRef = accumulation.scrollRef;
331
+ break;
332
+ case 1:
333
+ break;
334
+ case 2:
335
+ break;
336
+ default:
337
+ freshness;
338
+ break;
339
+ }
340
+ }
341
+ function createCacheNodeOnNavigation(navigatedAt, newRouteTree, newMetadataVaryPath, freshness, seedData, seedHead, seedDynamicStaleAt, parentNeedsDynamicRequest, accumulation, // Instant Navigation Testing API only — restricts segment reads to shell
342
+ // entries. Always false outside the testing API. See navigation-testing-lock.
343
+ restrictToShell) {
344
+ // Same traversal as updateCacheNodeNavigation, but simpler. We switch to this
345
+ // path once we reach the part of the tree that was not in the previous route.
346
+ // We don't need to diff against the old tree, we just need to create a new
347
+ // one. We also don't need to worry about any refresh-related logic.
348
+ //
349
+ // For the most part, this is a subset of updateCacheNodeOnNavigation, so any
350
+ // change that happens in this function likely needs to be applied to that
351
+ // one, too. However there are some places where the behavior intentionally
352
+ // diverges, which is why we keep them separate.
353
+ const newSegment = createSegmentFromRouteTree(newRouteTree);
354
+ const newSlots = newRouteTree.slots;
355
+ const seedDataChildren = seedData !== null ? seedData[1] : null;
356
+ const seedRsc = seedData !== null ? seedData[0] : null;
357
+ const result = createCacheNodeForSegment(navigatedAt, newRouteTree, seedRsc, newMetadataVaryPath, seedHead, freshness, seedDynamicStaleAt, // This segment was not part of the previous route, so mint a fresh
358
+ // bfcacheId.
359
+ generateBFCacheId(freshness), restrictToShell);
360
+ const newCacheNode = result.cacheNode;
361
+ const needsDynamicRequest = result.needsDynamicRequest;
362
+ const isLeafSegment = newSlots === null;
363
+ if (isLeafSegment) {
364
+ accumulateScrollRef(freshness, newCacheNode, accumulation);
365
+ }
366
+ let patchedRouterStateChildren = {};
367
+ let taskChildren = null;
368
+ let childNeedsDynamicRequest = false;
369
+ let dynamicRequestTreeChildren = {};
370
+ let newCacheNodeSlots = null;
371
+ if (newSlots !== null) {
372
+ newCacheNode.slots = newCacheNodeSlots = {};
373
+ taskChildren = new Map();
374
+ for (const [parallelRouteKey, newRouteTreeChild] of newSlots){
375
+ const seedDataChild = seedDataChildren !== null ? seedDataChildren[parallelRouteKey] : null;
376
+ const taskChild = createCacheNodeOnNavigation(navigatedAt, newRouteTreeChild, newMetadataVaryPath, freshness, seedDataChild ?? null, seedHead, seedDynamicStaleAt, parentNeedsDynamicRequest || needsDynamicRequest, accumulation, restrictToShell);
377
+ taskChildren.set(parallelRouteKey, taskChild);
378
+ newCacheNodeSlots[parallelRouteKey] = taskChild.node;
379
+ const taskChildRoute = taskChild.route;
380
+ patchedRouterStateChildren[parallelRouteKey] = taskChildRoute;
381
+ const dynamicRequestTreeChild = taskChild.dynamicRequestTree;
382
+ if (dynamicRequestTreeChild !== null) {
383
+ childNeedsDynamicRequest = true;
384
+ dynamicRequestTreeChildren[parallelRouteKey] = dynamicRequestTreeChild;
385
+ } else {
386
+ dynamicRequestTreeChildren[parallelRouteKey] = taskChildRoute;
387
+ }
388
+ }
389
+ }
390
+ const newFlightRouterState = [
391
+ newSegment,
392
+ patchedRouterStateChildren,
393
+ null,
394
+ null,
395
+ newRouteTree.prefetchHints
396
+ ];
397
+ return {
398
+ status: needsDynamicRequest ? 0 : 1,
399
+ route: newFlightRouterState,
400
+ node: newCacheNode,
401
+ dynamicRequestTree: createDynamicRequestTree(newFlightRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest),
402
+ // This route is not part of the current tree, so there's no reason to
403
+ // track the refresh URL.
404
+ refreshState: null,
405
+ children: taskChildren
406
+ };
407
+ }
408
+ function createSegmentFromRouteTree(newRouteTree) {
409
+ if (newRouteTree.isPage) {
410
+ // In a dynamic server response, the server embeds the search params into
411
+ // the segment key, but in a static one it's omitted. The client handles
412
+ // this inconsistency by adding the search params back right at the end.
413
+ //
414
+ // TODO: The only thing this is used for is to create a cache key for
415
+ // ChildSegmentMap. But we already track the `renderedSearch` everywhere as
416
+ // part of the varyPath. The plan is get rid of ChildSegmentMap and
417
+ // store the page data in a CacheMap using the varyPath, like we do
418
+ // for prefetches. Then we can remove it from the segment key.
419
+ //
420
+ // As an incremental step, we can grab the search params from the varyPath.
421
+ const renderedSearch = (0, _varypath.getRenderedSearchFromVaryPath)(newRouteTree.varyPath);
422
+ if (renderedSearch === null) {
423
+ return _segment.PAGE_SEGMENT_KEY;
424
+ }
425
+ // This is based on equivalent logic in addSearchParamsIfPageSegment, used
426
+ // on the server.
427
+ const stringifiedQuery = JSON.stringify((0, _routeparams.urlSearchParamsToParsedUrlQuery)(new URLSearchParams(renderedSearch)));
428
+ return stringifiedQuery !== '{}' ? _segment.PAGE_SEGMENT_KEY + '?' + stringifiedQuery : _segment.PAGE_SEGMENT_KEY;
429
+ }
430
+ return newRouteTree.segment;
431
+ }
432
+ function patchRouterStateWithNewChildren(baseRouterState, newChildren) {
433
+ const clone = [
434
+ baseRouterState[0],
435
+ newChildren
436
+ ];
437
+ // Based on equivalent logic in apply-router-state-patch-to-tree, but should
438
+ // confirm whether we need to copy all of these fields. Not sure the server
439
+ // ever sends, e.g. the refetch marker.
440
+ if (2 in baseRouterState) {
441
+ clone[2] = baseRouterState[2];
442
+ }
443
+ if (3 in baseRouterState) {
444
+ clone[3] = baseRouterState[3];
445
+ }
446
+ if (4 in baseRouterState) {
447
+ clone[4] = baseRouterState[4];
448
+ }
449
+ return clone;
450
+ }
451
+ function createDynamicRequestTree(newRouterState, dynamicRequestTreeChildren, needsDynamicRequest, childNeedsDynamicRequest, parentNeedsDynamicRequest) {
452
+ // Create a FlightRouterState that instructs the server how to render the
453
+ // requested segment.
454
+ //
455
+ // Or, if neither this segment nor any of the children require a new data,
456
+ // then we return `null` to skip the request.
457
+ let dynamicRequestTree = null;
458
+ if (needsDynamicRequest) {
459
+ dynamicRequestTree = patchRouterStateWithNewChildren(newRouterState, dynamicRequestTreeChildren);
460
+ // The "refetch" marker is set on the top-most segment that requires new
461
+ // data. We can omit it if a parent was already marked.
462
+ if (!parentNeedsDynamicRequest) {
463
+ dynamicRequestTree[3] = 'refetch';
464
+ }
465
+ } else if (childNeedsDynamicRequest) {
466
+ // This segment does not request new data, but at least one of its
467
+ // children does.
468
+ dynamicRequestTree = patchRouterStateWithNewChildren(newRouterState, dynamicRequestTreeChildren);
469
+ } else {
470
+ dynamicRequestTree = null;
471
+ }
472
+ return dynamicRequestTree;
473
+ }
474
+ function accumulateRefreshUrl(accumulation, refreshState) {
475
+ // This is a refresh navigation, and we're inside a "default" slot that's
476
+ // not part of the current route; it was reused from an older route. In
477
+ // order to get fresh data for this reused route, we need to issue a
478
+ // separate request using the old route's URL.
479
+ //
480
+ // Track these extra URLs in the accumulated result. Later, we'll construct
481
+ // an appropriate request for each unique URL in the final set. The reason
482
+ // we don't do it immediately here is so we can deduplicate multiple
483
+ // instances of the same URL into a single request. See
484
+ // listenForDynamicRequest for more details.
485
+ const refreshUrl = refreshState.canonicalUrl;
486
+ const separateRefreshUrls = accumulation.separateRefreshUrls;
487
+ if (separateRefreshUrls === null) {
488
+ accumulation.separateRefreshUrls = new Set([
489
+ refreshUrl
490
+ ]);
491
+ } else {
492
+ separateRefreshUrls.add(refreshUrl);
493
+ }
494
+ }
495
+ function reuseActiveSegmentInDefaultSlot(parentRouteTree, parallelRouteKey, oldRootRefreshState, oldRouterState) {
496
+ // This is a "default" segment. These are never sent by the server during a
497
+ // soft navigation; instead, the client reuses whatever segment was already
498
+ // active in that slot on the previous route. This means if we later need to
499
+ // refresh the segment, it will have to be refetched from the previous route's
500
+ // URL. We store it in the Flight Router State.
501
+ let reusedUrl;
502
+ let reusedRenderedSearch;
503
+ const oldRefreshState = oldRouterState[2];
504
+ if (oldRefreshState !== undefined && oldRefreshState !== null) {
505
+ // This segment was already reused from an even older route. Keep its
506
+ // existing URL and refresh state.
507
+ reusedUrl = oldRefreshState[0];
508
+ reusedRenderedSearch = oldRefreshState[1];
509
+ } else {
510
+ // Since this route didn't already have a refresh state, it must have been
511
+ // reachable from the root of the old route. So we use the refresh state
512
+ // that represents the old route.
513
+ reusedUrl = oldRootRefreshState.canonicalUrl;
514
+ reusedRenderedSearch = oldRootRefreshState.renderedSearch;
515
+ }
516
+ const acc = {
517
+ metadataVaryPath: null
518
+ };
519
+ const reusedRouteTree = (0, _cache.convertReusedFlightRouterStateToRouteTree)(parentRouteTree, parallelRouteKey, oldRouterState, reusedRenderedSearch, acc);
520
+ reusedRouteTree.refreshState = {
521
+ canonicalUrl: reusedUrl,
522
+ renderedSearch: reusedRenderedSearch
523
+ };
524
+ return reusedRouteTree;
525
+ }
526
+ function reuseSharedCacheNode(dropPrefetchRsc, existingCacheNode) {
527
+ // Clone the CacheNode that was already present in the previous tree.
528
+ // Carry forward the scrollRef so scroll intent from a prior navigation
529
+ // survives tree rebuilds (e.g. push + refresh in the same batch).
530
+ // Carry forward the bfcacheId so shared-layout segments retain stable
531
+ // identity across navigations.
532
+ return createCacheNode(existingCacheNode.rsc, dropPrefetchRsc ? null : existingCacheNode.prefetchRsc, existingCacheNode.head, dropPrefetchRsc ? null : existingCacheNode.prefetchHead, existingCacheNode.bfcacheId, existingCacheNode.scrollRef);
533
+ }
534
+ function createCacheNodeForSegment(now, tree, seedRsc, metadataVaryPath, seedHead, freshness, dynamicStaleAt, bfcacheId, // Instant Navigation Testing API only — restricts segment reads to shell
535
+ // entries. Always false outside the testing API. See navigation-testing-lock.
536
+ restrictToShell) {
537
+ // Construct a new CacheNode using data from the BFCache, the client's
538
+ // Segment Cache, or seeded from a server response.
539
+ //
540
+ // If there's a cache miss, or if we only have a partial hit, we'll render
541
+ // the partial state immediately, and spawn a request to the server to fill
542
+ // in the missing data.
543
+ //
544
+ // If the segment is fully cached on the client already, we can omit this
545
+ // segment from the server request.
546
+ //
547
+ // If we already have a dynamic data response associated with this navigation,
548
+ // as in the case of a Server Action-initiated redirect or refresh, we may
549
+ // also be able to use that data without spawning a new request. (This is
550
+ // referred to as the "seed" data.)
551
+ const isPage = tree.isPage;
552
+ // During certain kinds of navigations, we may be able to render from
553
+ // the BFCache.
554
+ switch(freshness){
555
+ case 0:
556
+ {
557
+ // Check BFCache during regular navigations. The entry's staleAt
558
+ // determines whether it's still fresh. This is used when
559
+ // staleTimes.dynamic is configured globally or when a page exports
560
+ // unstable_dynamicStaleTime for per-page control.
561
+ const bfcacheEntry = (0, _bfcache.readFromBFCacheDuringRegularNavigation)(now, tree.varyPath);
562
+ if (bfcacheEntry !== null) {
563
+ // A regular navigation that happens to read cached data is still a
564
+ // fresh navigation, so we use the caller-supplied bfcacheId — the
565
+ // BFCacheEntry's id is only restored on history-traversal
566
+ // navigations.
567
+ return {
568
+ cacheNode: createCacheNode(bfcacheEntry.rsc, bfcacheEntry.prefetchRsc, bfcacheEntry.head, bfcacheEntry.prefetchHead, bfcacheId),
569
+ needsDynamicRequest: false
570
+ };
571
+ }
572
+ break;
573
+ }
574
+ case 1:
575
+ {
576
+ // This is not related to the BFCache but it is a special case.
577
+ //
578
+ // We should never spawn network requests during hydration. We must treat
579
+ // the initial payload as authoritative, because the initial page load is
580
+ // used as a last-ditch mechanism for recovering the app.
581
+ //
582
+ // This is also an important safety check because if this leaks into the
583
+ // server rendering path (which theoretically it never should because the
584
+ // server payload should be consistent), the server would hang because these
585
+ // promises would never resolve.
586
+ //
587
+ // TODO: There is an existing case where the global "not found" boundary
588
+ // triggers this path. But it does render correctly despite that. That's an
589
+ // unusual render path so it's not surprising, but we should look into
590
+ // modeling it in a more consistent way. See also the /_notFound special
591
+ // case in updateCacheNodeOnNavigation.
592
+ const rsc = seedRsc;
593
+ const prefetchRsc = null;
594
+ const head = isPage ? seedHead : null;
595
+ const prefetchHead = null;
596
+ (0, _bfcache.writeToBFCache)(now, tree.varyPath, rsc, prefetchRsc, head, prefetchHead, dynamicStaleAt, bfcacheId);
597
+ if (isPage && metadataVaryPath !== null) {
598
+ (0, _bfcache.writeHeadToBFCache)(now, metadataVaryPath, head, prefetchHead, dynamicStaleAt, bfcacheId);
599
+ }
600
+ return {
601
+ cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId),
602
+ needsDynamicRequest: false
603
+ };
604
+ }
605
+ case 2:
606
+ const bfcacheEntry = (0, _bfcache.readFromBFCache)(tree.varyPath);
607
+ if (bfcacheEntry !== null) {
608
+ // Only show prefetched data if the dynamic data is still pending. This
609
+ // avoids a flash back to the prefetch state in a case where it's highly
610
+ // likely to have already streamed in.
611
+ //
612
+ // Tehnically, what we're actually checking is whether the dynamic
613
+ // network response was received. But since it's a streaming response,
614
+ // this does not mean that all the dynamic data has fully streamed in.
615
+ // It just means that _some_ of the dynamic data was received. But as a
616
+ // heuristic, we assume that the rest dynamic data will stream in
617
+ // quickly, so it's still better to skip the prefetch state.
618
+ const oldRsc = bfcacheEntry.rsc;
619
+ const oldRscDidResolve = !isDeferredRsc(oldRsc) || oldRsc.status !== 'pending';
620
+ const dropPrefetchRsc = oldRscDidResolve;
621
+ // Restore the bfcacheId from the cached entry so that back/forward
622
+ // navigations preserve the original id, regardless of whether
623
+ // `cacheComponents` Activity preservation is enabled.
624
+ return {
625
+ cacheNode: createCacheNode(bfcacheEntry.rsc, dropPrefetchRsc ? null : bfcacheEntry.prefetchRsc, bfcacheEntry.head, dropPrefetchRsc ? null : bfcacheEntry.prefetchHead, bfcacheEntry.bfcacheId),
626
+ needsDynamicRequest: false
627
+ };
628
+ }
629
+ break;
630
+ case 3:
631
+ case 4:
632
+ case 5:
633
+ break;
634
+ default:
635
+ freshness;
636
+ break;
637
+ }
638
+ let cachedRsc = null;
639
+ let isCachedRscPartial = true;
640
+ const segmentEntry = (0, _cache.readSegmentCacheEntryForNavigation)(now, tree.varyPath, restrictToShell);
641
+ if (segmentEntry !== null) {
642
+ switch(segmentEntry.status){
643
+ case _cache.EntryStatus.Fulfilled:
644
+ {
645
+ // Happy path: a cache hit
646
+ cachedRsc = segmentEntry.rsc;
647
+ isCachedRscPartial = segmentEntry.isPartial;
648
+ break;
649
+ }
650
+ case _cache.EntryStatus.Pending:
651
+ {
652
+ // We haven't received data for this segment yet, but there's already
653
+ // an in-progress request. Since it's extremely likely to arrive
654
+ // before the dynamic data response, we might as well use it.
655
+ const promiseForFulfilledEntry = (0, _cache.waitForSegmentCacheEntry)(segmentEntry);
656
+ cachedRsc = promiseForFulfilledEntry.then((entry)=>entry !== null ? entry.rsc : null);
657
+ // Because the request is still pending, we typically don't know yet
658
+ // whether the response will be partial. We shouldn't skip this segment
659
+ // during the dynamic navigation request. Otherwise, we might need to
660
+ // do yet another request to fill in the remaining data, creating
661
+ // a waterfall.
662
+ //
663
+ // The one exception is if this segment is being fetched with via
664
+ // prefetch={true} (i.e. the "force stale" or "full" strategy). If so,
665
+ // we can assume the response will be full. This field is set to `false`
666
+ // for such segments.
667
+ isCachedRscPartial = segmentEntry.isPartial;
668
+ break;
669
+ }
670
+ case _cache.EntryStatus.Empty:
671
+ case _cache.EntryStatus.Rejected:
672
+ {
673
+ break;
674
+ }
675
+ default:
676
+ {
677
+ segmentEntry;
678
+ break;
679
+ }
680
+ }
681
+ }
682
+ // Now combine the cached data with the seed data to determine what we can
683
+ // render immediately, versus what needs to stream in later.
684
+ // A partial state to show immediately while we wait for the final data to
685
+ // arrive. If `rsc` is already a complete value (not partial), or if we
686
+ // don't have any useful partial state, this will be `null`.
687
+ let prefetchRsc;
688
+ // The final, resolved segment data. If the data is missing, this will be a
689
+ // promise that resolves to the eventual data. A resolved value of `null`
690
+ // means the data failed to load; the LayoutRouter will suspend indefinitely
691
+ // until the router updates again (refer to finishNavigationTask).
692
+ let rsc;
693
+ let doesSegmentNeedDynamicRequest;
694
+ if (seedRsc !== null) {
695
+ // We already have a dynamic server response for this segment.
696
+ if (isCachedRscPartial) {
697
+ // The seed data may still be streaming in, so it's worth showing the
698
+ // partial cached state in the meantime.
699
+ prefetchRsc = cachedRsc;
700
+ rsc = seedRsc;
701
+ } else {
702
+ // We already have a completely cached segment. Ignore the seed data,
703
+ // which may still be streaming in. This shouldn't happen in the normal
704
+ // case because the client will inform the server which segments are
705
+ // already fully cached, and the server will skip rendering them.
706
+ prefetchRsc = null;
707
+ rsc = cachedRsc;
708
+ }
709
+ doesSegmentNeedDynamicRequest = false;
710
+ } else {
711
+ if (isCachedRscPartial) {
712
+ // The cached data contains dynamic holes, or it's missing entirely. We'll
713
+ // show the partial state immediately (if available), and stream in the
714
+ // final data.
715
+ //
716
+ // Create a pending promise that we can later write to when the
717
+ // data arrives from the server.
718
+ prefetchRsc = cachedRsc;
719
+ rsc = createDeferredRsc();
720
+ } else {
721
+ // The data is fully cached.
722
+ prefetchRsc = null;
723
+ rsc = cachedRsc;
724
+ }
725
+ doesSegmentNeedDynamicRequest = isCachedRscPartial;
726
+ }
727
+ // If this is a page segment, we need to do the same for the head. This
728
+ // follows analogous logic to the segment data above.
729
+ // TODO: We don't need to store the head on the page segment's CacheNode; we
730
+ // can lift it to the main state object. Then we can also delete
731
+ // findHeadCache.
732
+ let prefetchHead = null;
733
+ let head = null;
734
+ let doesHeadNeedDynamicRequest = isPage;
735
+ if (isPage) {
736
+ let cachedHead = null;
737
+ let isCachedHeadPartial = true;
738
+ if (metadataVaryPath !== null) {
739
+ const metadataEntry = (0, _cache.readSegmentCacheEntryForNavigation)(now, metadataVaryPath, restrictToShell);
740
+ if (metadataEntry !== null) {
741
+ switch(metadataEntry.status){
742
+ case _cache.EntryStatus.Fulfilled:
743
+ {
744
+ cachedHead = metadataEntry.rsc;
745
+ isCachedHeadPartial = metadataEntry.isPartial;
746
+ break;
747
+ }
748
+ case _cache.EntryStatus.Pending:
749
+ {
750
+ cachedHead = (0, _cache.waitForSegmentCacheEntry)(metadataEntry).then((entry)=>entry !== null ? entry.rsc : null);
751
+ isCachedHeadPartial = metadataEntry.isPartial;
752
+ break;
753
+ }
754
+ case _cache.EntryStatus.Empty:
755
+ case _cache.EntryStatus.Rejected:
756
+ {
757
+ break;
758
+ }
759
+ default:
760
+ {
761
+ metadataEntry;
762
+ break;
763
+ }
764
+ }
765
+ }
766
+ }
767
+ if (process.env.__NEXT_OPTIMISTIC_ROUTING && isCachedHeadPartial) {
768
+ // TODO: When optimistic routing is enabled, don't block on waiting for
769
+ // the viewport to resolve. This is a temporary workaround until Vary
770
+ // Params are tracked when rendering the metadata. We'll fix it before
771
+ // this feature is stable. However, it's not a critical issue because 1)
772
+ // it will stream in eventually anyway 2) metadata is wrapped in an
773
+ // internal Suspense boundary, so is always non-blocking; this only
774
+ // affects the viewport node, which is meant to blocking, however... 3)
775
+ // before Segment Cache landed this wasn't always the case, anyway, so
776
+ // it's unlikely that many people are relying on this behavior. Still,
777
+ // will be fixed before stable. It's the very next step in the sequence of
778
+ // work on this project.
779
+ //
780
+ // This line of code works because the App Router treats `null` as
781
+ // "no renderable head available", rather than an empty head. React treats
782
+ // an empty string as empty.
783
+ cachedHead = '';
784
+ }
785
+ if (seedHead !== null) {
786
+ if (isCachedHeadPartial) {
787
+ prefetchHead = cachedHead;
788
+ head = seedHead;
789
+ } else {
790
+ prefetchHead = null;
791
+ head = cachedHead;
792
+ }
793
+ doesHeadNeedDynamicRequest = false;
794
+ } else {
795
+ if (isCachedHeadPartial) {
796
+ prefetchHead = cachedHead;
797
+ head = createDeferredRsc();
798
+ } else {
799
+ prefetchHead = null;
800
+ head = cachedHead;
801
+ }
802
+ doesHeadNeedDynamicRequest = isCachedHeadPartial;
803
+ }
804
+ }
805
+ // Now that we're creating a new segment, write its data to the BFCache. A
806
+ // subsequent back/forward navigation will reuse this same data, until or
807
+ // unless it's cleared by a refresh/revalidation.
808
+ //
809
+ // Skip BFCache writes for optimistic navigations since they are transient
810
+ // and will be replaced by the canonical navigation.
811
+ if (freshness !== 5) {
812
+ (0, _bfcache.writeToBFCache)(now, tree.varyPath, rsc, prefetchRsc, head, prefetchHead, dynamicStaleAt, bfcacheId);
813
+ if (isPage && metadataVaryPath !== null) {
814
+ (0, _bfcache.writeHeadToBFCache)(now, metadataVaryPath, head, prefetchHead, dynamicStaleAt, bfcacheId);
815
+ }
816
+ }
817
+ return {
818
+ cacheNode: createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId),
819
+ // TODO: We should store this field on the CacheNode itself. I think we can
820
+ // probably unify NavigationTask, CacheNode, and DeferredRsc into a
821
+ // single type. Or at least CacheNode and DeferredRsc.
822
+ needsDynamicRequest: doesSegmentNeedDynamicRequest || doesHeadNeedDynamicRequest
823
+ };
824
+ }
825
+ function createCacheNode(rsc, prefetchRsc, head, prefetchHead, bfcacheId, scrollRef = null) {
826
+ return {
827
+ rsc,
828
+ prefetchRsc,
829
+ head,
830
+ prefetchHead,
831
+ slots: null,
832
+ scrollRef,
833
+ bfcacheId
834
+ };
835
+ }
836
+ // Globally-unique counter for fresh bfcacheIds. Incremented every time a new
837
+ // CacheNode is created on the client. The id surfaces to user code as a
838
+ // string via `useRouter().bfcacheId`.
839
+ let nextBFCacheId = 0;
840
+ function generateBFCacheId(freshness) {
841
+ // Server-side rendering and the initial client-side hydration tree both
842
+ // use a fixed sentinel so they reconcile cleanly across hydration. The
843
+ // counter only advances on real client-side navigations after hydration.
844
+ if (typeof window === 'undefined') return 0;
845
+ if (freshness === 1) return 0;
846
+ return ++nextBFCacheId;
847
+ }
848
+ function compareSegments(newSegment, oldSegment) {
849
+ if ((0, _matchsegments.matchSegment)(newSegment, oldSegment)) {
850
+ return 0;
851
+ }
852
+ if (typeof newSegment === 'string' && typeof oldSegment === 'string' && newSegment.startsWith(_segment.PAGE_SEGMENT_KEY) && oldSegment.startsWith(_segment.PAGE_SEGMENT_KEY)) {
853
+ return 2;
854
+ }
855
+ return 1;
856
+ }
857
+ // Represents whether the previuos navigation resulted in a route tree mismatch.
858
+ // A mismatch results in a refresh of the page. If there are two successive
859
+ // mismatches, we will fall back to an MPA navigation, to prevent a retry loop.
860
+ let previousNavigationDidMismatch = false;
861
+ function spawnDynamicRequests(task, primaryUrl, nextUrl, freshnessPolicy, accumulation, // The route cache entry used for this navigation, if it came from route
862
+ // prediction. Passed through so it can be marked as having a dynamic rewrite
863
+ // if the server returns a different pathname than expected (indicating
864
+ // dynamic rewrite behavior that varies by param value).
865
+ routeCacheEntry, // The original navigation's push/replace intent. Threaded through to the
866
+ // server-patch retry logic so it can inherit the intent if the original
867
+ // transition hasn't committed yet.
868
+ navigateType, navigationLock, signal) {
869
+ const dynamicRequestTree = task.dynamicRequestTree;
870
+ if (dynamicRequestTree === null) {
871
+ // This navigation was fully cached. There are no dynamic requests to spawn.
872
+ previousNavigationDidMismatch = false;
873
+ return;
874
+ }
875
+ // This is intentionally not an async function to discourage the caller from
876
+ // awaiting the result. Any subsequent async operations spawned by this
877
+ // function should result in a separate navigation task, rather than
878
+ // block the original one.
879
+ //
880
+ // In this function we spawn (but do not await) all the network requests that
881
+ // block the navigation, and collect the promises. The next function,
882
+ // `finishNavigationTask`, can await the promises in any order without
883
+ // accidentally introducing a network waterfall.
884
+ const primaryRequestPromise = fetchMissingDynamicData(task, dynamicRequestTree, primaryUrl, nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, signal);
885
+ const separateRefreshUrls = accumulation.separateRefreshUrls;
886
+ let refreshRequestPromises = null;
887
+ if (separateRefreshUrls !== null) {
888
+ // There are multiple URLs that we need to request the data from. This
889
+ // happens when a "default" parallel route slot is present in the tree, and
890
+ // its data cannot be fetched from the current route. We need to split the
891
+ // combined dynamic request tree into separate requests per URL.
892
+ // TODO: Create a scoped dynamic request tree that omits anything that
893
+ // is not relevant to the given URL. Without doing this, the server may
894
+ // sometimes render more data than necessary; this is not a regression
895
+ // compared to the pre-Segment Cache implementation, though, just an
896
+ // optimization we can make in the future.
897
+ // Construct a request tree for each additional refresh URL. This will
898
+ // prune away everything except the parts of the tree that match the
899
+ // given refresh URL.
900
+ refreshRequestPromises = [];
901
+ const canonicalUrl = (0, _createhreffromurl.createHrefFromUrl)(primaryUrl);
902
+ for (const refreshUrl of separateRefreshUrls){
903
+ if (refreshUrl === canonicalUrl) {
904
+ continue;
905
+ }
906
+ // TODO: Create a scoped dynamic request tree that omits anything that
907
+ // is not relevant to the given URL. Without doing this, the server may
908
+ // sometimes render more data than necessary; this is not a regression
909
+ // compared to the pre-Segment Cache implementation, though, just an
910
+ // optimization we can make in the future.
911
+ // const scopedDynamicRequestTree = splitTaskByURL(task, refreshUrl)
912
+ const scopedDynamicRequestTree = dynamicRequestTree;
913
+ if (scopedDynamicRequestTree !== null) {
914
+ refreshRequestPromises.push(fetchMissingDynamicData(task, scopedDynamicRequestTree, new URL(refreshUrl, location.origin), // TODO: Just noticed that this should actually the Next-Url at the
915
+ // time the refresh URL was set, not the current Next-Url. Need to
916
+ // start tracking this alongside the refresh URL. In the meantime,
917
+ // if a refresh fails due to a mismatch, it will trigger a
918
+ // hard refresh.
919
+ nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, signal));
920
+ }
921
+ }
922
+ }
923
+ // Further async operations are moved into this separate function to
924
+ // discourage sequential network requests.
925
+ const voidPromise = finishNavigationTask(task, nextUrl, primaryRequestPromise, refreshRequestPromises, routeCacheEntry, navigateType);
926
+ // `finishNavigationTask` is responsible for error handling, so we can attach
927
+ // noop callbacks to this promise.
928
+ voidPromise.then(noop, noop);
929
+ }
930
+ async function finishNavigationTask(task, nextUrl, primaryRequestPromise, refreshRequestPromises, routeCacheEntry, navigateType) {
931
+ // Wait for all the requests to finish, or for the first one to fail.
932
+ let exitStatus = await waitForRequestsToFinish(primaryRequestPromise, refreshRequestPromises);
933
+ // Once the all the requests have finished, check the tree for any remaining
934
+ // pending tasks. If anything is still pending, it means the server response
935
+ // does not match the client, and we must refresh to get back to a consistent
936
+ // state. We can skip this step if we already detected a mismatch during the
937
+ // first phase; it doesn't matter in that case because we're going to refresh
938
+ // the whole tree regardless.
939
+ if (exitStatus === 0) {
940
+ exitStatus = abortRemainingPendingTasks(task, null, null);
941
+ }
942
+ switch(exitStatus){
943
+ case -1:
944
+ {
945
+ // This navigation was superseded and its request aborted. Its cache nodes
946
+ // may already be reused by the newer navigation, so leave them untouched
947
+ // for the newer request to fulfill. If the tree was abandoned entirely,
948
+ // it can be garbage collected along with its unresolved promises. We do
949
+ // not retry or hard-navigate.
950
+ return;
951
+ }
952
+ case 0:
953
+ {
954
+ // The task has completely finished. There's no missing data. Exit.
955
+ previousNavigationDidMismatch = false;
956
+ return;
957
+ }
958
+ case 1:
959
+ {
960
+ // Some data failed to finish loading. Trigger a soft retry that re-fetches
961
+ // the tree's dynamic data.
962
+ // TODO: As an extra precaution against soft retry loops, consider
963
+ // tracking whether a navigation was itself triggered by a retry. If two
964
+ // happen in a row, fall back to a hard retry.
965
+ const isHardRetry = false;
966
+ const primaryRequestResult = await primaryRequestPromise;
967
+ dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, task.route, routeCacheEntry, navigateType, 3);
968
+ return;
969
+ }
970
+ case 3:
971
+ {
972
+ // The route matched, but the request was redirected, so we committed the
973
+ // wrong canonical URL. Re-resolve the route to invalidate the now-stale
974
+ // route cache and correct the URL — but reuse the data we already received
975
+ // (HistoryTraversal) instead of re-fetching it. See issue #95195.
976
+ const isHardRetry = false;
977
+ const primaryRequestResult = await primaryRequestPromise;
978
+ dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, task.route, routeCacheEntry, navigateType, 2);
979
+ return;
980
+ }
981
+ case 2:
982
+ {
983
+ // Some data failed to finish loading in a non-recoverable way, such as a
984
+ // network error. Trigger an MPA navigation.
985
+ //
986
+ // Hard navigating/refreshing is how we prevent an infinite retry loop
987
+ // caused by a network error — when the network fails, we fall back to the
988
+ // browser behavior for offline navigations. In the future, Next.js may
989
+ // introduce its own custom handling of offline navigations, but that
990
+ // doesn't exist yet.
991
+ const isHardRetry = true;
992
+ const primaryRequestResult = await primaryRequestPromise;
993
+ dispatchRetryDueToTreeMismatch(isHardRetry, primaryRequestResult.url, nextUrl, primaryRequestResult.seed, task.route, routeCacheEntry, navigateType, 3);
994
+ return;
995
+ }
996
+ default:
997
+ {
998
+ return exitStatus;
999
+ }
1000
+ }
1001
+ }
1002
+ function waitForRequestsToFinish(primaryRequestPromise, refreshRequestPromises) {
1003
+ // Custom async combinator logic. This could be replaced by Promise.any but
1004
+ // we don't assume that's available.
1005
+ //
1006
+ // Each promise resolves once the server responsds and the data is written
1007
+ // into the CacheNode tree. Resolve the combined promise once all the
1008
+ // requests finish.
1009
+ //
1010
+ // Or, resolve as soon as one of the requests fails, without waiting for the
1011
+ // others to finish.
1012
+ return new Promise((resolve)=>{
1013
+ const onFulfill = (result)=>{
1014
+ if (result.exitStatus === 0) {
1015
+ remainingCount--;
1016
+ if (remainingCount === 0) {
1017
+ // All the requests finished successfully.
1018
+ resolve(0);
1019
+ }
1020
+ } else {
1021
+ // One of the requests failed. Exit with a failing status.
1022
+ // NOTE: It's possible for one of the requests to fail with SoftRetry
1023
+ // and a later one to fail with HardRetry. In this case, we choose to
1024
+ // retry immediately, rather than delay the retry until all the requests
1025
+ // finish. If it fails again, we will hard retry on the next
1026
+ // attempt, anyway.
1027
+ resolve(result.exitStatus);
1028
+ }
1029
+ };
1030
+ // onReject shouldn't ever be called because fetchMissingDynamicData's
1031
+ // entire body is wrapped in a try/catch. This is just defensive.
1032
+ const onReject = ()=>resolve(2);
1033
+ // Attach the listeners to the promises.
1034
+ let remainingCount = 1;
1035
+ primaryRequestPromise.then(onFulfill, onReject);
1036
+ if (refreshRequestPromises !== null) {
1037
+ remainingCount += refreshRequestPromises.length;
1038
+ refreshRequestPromises.forEach((refreshRequestPromise)=>refreshRequestPromise.then(onFulfill, onReject));
1039
+ }
1040
+ });
1041
+ }
1042
+ function dispatchRetryDueToTreeMismatch(isHardRetry, retryUrl, retryNextUrl, seed, baseTree, // The route cache entry used for this navigation, if it came from route
1043
+ // prediction. If the navigation results in a mismatch, we mark it as having
1044
+ // a dynamic rewrite so future predictions bail out.
1045
+ routeCacheEntry, // The original navigation's push/replace intent.
1046
+ originalNavigateType, // Freshness policy for the retry navigation. `RefreshAll` re-fetches the
1047
+ // tree's dynamic data (used for genuine tree mismatches). `HistoryTraversal`
1048
+ // reuses the data already in the tree (used when only the URL needs
1049
+ // correcting after a redirect).
1050
+ retryFreshnessPolicy) {
1051
+ // If the navigation used a route prediction, mark it as having a dynamic
1052
+ // rewrite since it resulted in a mismatch.
1053
+ if (routeCacheEntry !== null) {
1054
+ (0, _cache.markRouteEntryAsDynamicRewrite)(routeCacheEntry);
1055
+ } else if (seed !== null) {
1056
+ // Even without a direct reference to the route cache entry, we can still
1057
+ // mark the route as having a dynamic rewrite by traversing the known route
1058
+ // tree. This handles cases where the navigation didn't originate from a
1059
+ // route prediction, but still needs to mark the pattern.
1060
+ const metadataVaryPath = seed.metadataVaryPath;
1061
+ if (metadataVaryPath !== null) {
1062
+ const now = Date.now();
1063
+ (0, _optimisticroutes.discoverKnownRoute)(now, retryUrl.pathname, retryUrl.search, retryNextUrl, null, seed.routeTree, metadataVaryPath, false, (0, _createhreffromurl.createHrefFromUrl)(retryUrl), false, true // hasDynamicRewrite
1064
+ );
1065
+ }
1066
+ }
1067
+ // Invalidate all route cache entries. Other entries may have been derived
1068
+ // from the template before we knew it had a dynamic rewrite. This also
1069
+ // triggers re-prefetching of visible links.
1070
+ (0, _cache.invalidateRouteCacheEntries)(retryNextUrl, baseTree);
1071
+ // If this is the second time in a row that a navigation resulted in a
1072
+ // mismatch, fall back to a hard (MPA) refresh.
1073
+ isHardRetry = isHardRetry || previousNavigationDidMismatch;
1074
+ previousNavigationDidMismatch = true;
1075
+ // If the original navigation hasn't committed to the browser history yet
1076
+ // (the transition suspended before React committed), inherit its push/replace
1077
+ // intent. Otherwise, the pushState already ran, so use 'replace' to avoid
1078
+ // creating a duplicate history entry.
1079
+ //
1080
+ // This works because React entangles the retry's state update with the
1081
+ // original pending transition — they commit together as a single batch,
1082
+ // so the navigate type from the retry is what HistoryUpdater ultimately sees.
1083
+ //
1084
+ // TODO: Ideally this check would happen right before we schedule the React
1085
+ // update (i.e., closer to where the action is dispatched into the queue),
1086
+ // not here where the action is constructed. But the current action queue
1087
+ // doesn't provide a natural place for that. Revisit when we refactor the
1088
+ // action queue into a more reactive navigation model.
1089
+ const lastCommitted = (0, _committedstate.getLastCommittedTree)();
1090
+ const retryNavigateType = lastCommitted !== null && baseTree !== lastCommitted ? originalNavigateType : 'replace';
1091
+ const retryAction = {
1092
+ type: _routerreducertypes.ACTION_SERVER_PATCH,
1093
+ previousTree: baseTree,
1094
+ url: retryUrl,
1095
+ nextUrl: retryNextUrl,
1096
+ seed,
1097
+ mpa: isHardRetry,
1098
+ navigateType: retryNavigateType,
1099
+ freshnessPolicy: retryFreshnessPolicy
1100
+ };
1101
+ (0, _useactionqueue.dispatchAppRouterAction)(retryAction);
1102
+ }
1103
+ async function fetchMissingDynamicData(task, dynamicRequestTree, url, nextUrl, freshnessPolicy, routeCacheEntry, navigationLock, signal) {
1104
+ try {
1105
+ const result = await (0, _fetchserverresponse.fetchServerResponse)(url, {
1106
+ flightRouterState: dynamicRequestTree,
1107
+ nextUrl,
1108
+ isHmrRefresh: freshnessPolicy === 4,
1109
+ signal
1110
+ });
1111
+ if (typeof result === 'string') {
1112
+ // fetchServerResponse will return an href to indicate that the SPA
1113
+ // navigation failed. For example, if the server triggered a hard
1114
+ // redirect, or the fetch request errored. Initiate an MPA navigation
1115
+ // to the given href.
1116
+ return {
1117
+ exitStatus: 2,
1118
+ url: new URL(result, location.origin),
1119
+ seed: null
1120
+ };
1121
+ }
1122
+ const now = Date.now();
1123
+ const seed = (0, _navigation.convertServerPatchToFullTree)(now, task.route, result.flightData, result.renderedSearch, result.dynamicStaleTime);
1124
+ // If the navigation lock is active, wait for it to be released before
1125
+ // writing the dynamic data. This allows tests to assert on the prefetched
1126
+ // UI state.
1127
+ if (process.env.__NEXT_EXPOSE_TESTING_API && navigationLock !== null) {
1128
+ await navigationLock;
1129
+ }
1130
+ // TODO: Implement Shell extraction as part of Cached Navigations.
1131
+ // Intentionally holding off on doing this until we decide how the Cached
1132
+ // Navigations behavior should work in combination with App Shells.
1133
+ if (routeCacheEntry !== null && result.staticStageData !== null) {
1134
+ const { response: staticStageResponse, isResponsePartial } = result.staticStageData;
1135
+ (0, _cache.resolveStaleAt)(now, staticStageResponse.s).then((staleAt)=>{
1136
+ const buildId = result.responseHeaders.get(_constants.NEXT_NAV_DEPLOYMENT_ID_HEADER) ?? staticStageResponse.b;
1137
+ (0, _cache.writePrerenderResponseIntoCache)(now, _types.FetchStrategy.PPR, staticStageResponse.f, buildId, staticStageResponse.h, staticStageResponse.r ?? null, staleAt, dynamicRequestTree, result.renderedSearch, isResponsePartial);
1138
+ }).catch(()=>{
1139
+ // The static stage processing failed. Not fatal — the navigation
1140
+ // completed normally, we just won't write into the cache.
1141
+ });
1142
+ }
1143
+ if (routeCacheEntry !== null && result.runtimePrefetchStream !== null) {
1144
+ (0, _cache.processRuntimePrefetchStream)(now, result.runtimePrefetchStream, dynamicRequestTree, result.renderedSearch).then((processed)=>{
1145
+ if (processed !== null) {
1146
+ (0, _cache.writeDynamicRenderResponseIntoCache)(now, _types.FetchStrategy.PPRRuntime, processed.flightDatas, processed.buildId, processed.isResponsePartial, processed.headVaryParams, processed.rootVaryParamsIterable, processed.staleAt, processed.navigationSeed, null);
1147
+ }
1148
+ }).catch(()=>{
1149
+ // The runtime prefetch cache write failed. Not fatal — the
1150
+ // navigation completed normally, we just won't cache runtime data.
1151
+ });
1152
+ }
1153
+ // result.dynamicStaleTime is in seconds (from the server's `d` field).
1154
+ // Convert to an absolute timestamp using the centralized helper.
1155
+ const dynamicStaleAt = (0, _bfcache.computeDynamicStaleAt)(now, result.dynamicStaleTime);
1156
+ const didReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(task, seed.routeTree, seed.data, seed.head, dynamicStaleAt, result.debugInfo, result.revealAfter);
1157
+ const resolvedUrl = new URL(result.canonicalUrl, location.origin);
1158
+ // Decide whether the navigation needs to be retried.
1159
+ //
1160
+ // - A tree mismatch (unknown parallel route) means the data is incomplete,
1161
+ // so we soft-retry and re-fetch the whole tree.
1162
+ // - Otherwise, the navigation committed the canonical URL from the route
1163
+ // cache entry it used (a prediction or prefetch). If the request resolved
1164
+ // to a *different* canonical URL — e.g. a middleware/proxy redirect the
1165
+ // prediction didn't account for — then the committed URL is wrong and the
1166
+ // route cache it came from is no longer reliable (the redirect implies a
1167
+ // server change the prediction couldn't know about, like logging in or
1168
+ // out). We re-resolve the route to invalidate the stale cache and correct
1169
+ // the browser URL, reusing the data we just received rather than
1170
+ // re-fetching it. When the entry already reflects the redirect (e.g. a
1171
+ // prefetch that followed it), the committed URL matches and no retry is
1172
+ // needed. See issue #95195.
1173
+ let didCommitWrongUrl = false;
1174
+ if (routeCacheEntry !== null) {
1175
+ const committedUrl = new URL(routeCacheEntry.canonicalUrl, location.origin);
1176
+ didCommitWrongUrl = committedUrl.pathname !== resolvedUrl.pathname || committedUrl.search !== resolvedUrl.search;
1177
+ }
1178
+ const exitStatus = didReceiveUnknownParallelRoute ? 1 : didCommitWrongUrl ? 3 : 0;
1179
+ return {
1180
+ exitStatus,
1181
+ url: resolvedUrl,
1182
+ seed
1183
+ };
1184
+ } catch {
1185
+ if (signal?.aborted) {
1186
+ // A newer HMR refresh superseded this one and aborted its request. Treat
1187
+ // it as canceled rather than a failure, so we don't retry or
1188
+ // hard-navigate.
1189
+ return {
1190
+ exitStatus: -1,
1191
+ url,
1192
+ seed: null
1193
+ };
1194
+ }
1195
+ // This shouldn't happen because fetchServerResponse's entire body is
1196
+ // wrapped in a try/catch. If it does, though, it implies the server failed
1197
+ // to respond with any tree at all. So we must fall back to a hard retry.
1198
+ return {
1199
+ exitStatus: 2,
1200
+ url: url,
1201
+ seed: null
1202
+ };
1203
+ }
1204
+ }
1205
+ function writeDynamicDataIntoNavigationTask(task, serverRouteTree, dynamicData, dynamicHead, dynamicStaleAt, debugInfo, revealAfter) {
1206
+ if (task.status === 0 && dynamicData !== null) {
1207
+ task.status = 1;
1208
+ finishPendingCacheNode(task.node, dynamicData, dynamicHead, debugInfo, revealAfter);
1209
+ // Update the BFCache entry's staleAt for this segment with the value
1210
+ // from the dynamic response. This applies the per-page
1211
+ // unstable_dynamicStaleTime if set, or the default DYNAMIC_STALETIME_MS.
1212
+ // We only update segments that received dynamic data — static segments
1213
+ // are unaffected.
1214
+ (0, _bfcache.updateBFCacheEntryStaleAt)(serverRouteTree.varyPath, dynamicStaleAt);
1215
+ }
1216
+ const taskChildren = task.children;
1217
+ const serverChildren = serverRouteTree.slots;
1218
+ const dynamicDataChildren = dynamicData !== null ? dynamicData[1] : null;
1219
+ // Detect whether the server sends a parallel route slot that the client
1220
+ // doesn't know about.
1221
+ let didReceiveUnknownParallelRoute = false;
1222
+ if (taskChildren !== null) {
1223
+ if (serverChildren !== null) {
1224
+ for (const [parallelRouteKey, serverRouteTreeChild] of serverChildren){
1225
+ const dynamicDataChild = dynamicDataChildren !== null ? dynamicDataChildren[parallelRouteKey] : null;
1226
+ const taskChild = taskChildren.get(parallelRouteKey);
1227
+ if (taskChild === undefined) {
1228
+ // The server sent a child segment that the client doesn't know about.
1229
+ //
1230
+ // When we receive an unknown parallel route, we must consider it a
1231
+ // mismatch. This is unlike the case where the segment itself
1232
+ // mismatches, because multiple routes can be active simultaneously.
1233
+ // But a given layout should never have a mismatching set of
1234
+ // child slots.
1235
+ //
1236
+ // Theoretically, this should only happen in development during an HMR
1237
+ // refresh, because the set of parallel routes for a layout does not
1238
+ // change over the lifetime of a build/deployment. In production, we
1239
+ // should have already mismatched on either the build id or the segment
1240
+ // path. But as an extra precaution, we validate in prod, too.
1241
+ didReceiveUnknownParallelRoute = true;
1242
+ } else {
1243
+ const taskSegment = taskChild.route[0];
1244
+ const serverSegment = createSegmentFromRouteTree(serverRouteTreeChild);
1245
+ if ((0, _matchsegments.matchSegment)(serverSegment, taskSegment) && dynamicDataChild !== null && dynamicDataChild !== undefined) {
1246
+ // Found a match for this task. Keep traversing down the task tree.
1247
+ const childDidReceiveUnknownParallelRoute = writeDynamicDataIntoNavigationTask(taskChild, serverRouteTreeChild, dynamicDataChild, dynamicHead, dynamicStaleAt, debugInfo, revealAfter);
1248
+ if (childDidReceiveUnknownParallelRoute) {
1249
+ didReceiveUnknownParallelRoute = true;
1250
+ }
1251
+ }
1252
+ }
1253
+ }
1254
+ } else {
1255
+ if (serverChildren !== null) {
1256
+ // The server sent a child segment that the client doesn't know about.
1257
+ didReceiveUnknownParallelRoute = true;
1258
+ }
1259
+ }
1260
+ }
1261
+ return didReceiveUnknownParallelRoute;
1262
+ }
1263
+ function finishPendingCacheNode(cacheNode, dynamicData, dynamicHead, debugInfo, revealAfter) {
1264
+ // Writes a dynamic response into an existing Cache Node tree. This does _not_
1265
+ // create a new tree, it updates the existing tree in-place. So it must follow
1266
+ // the Suspense rules of cache safety — it can resolve pending promises, but
1267
+ // it cannot overwrite existing data. It can add segments to the tree (because
1268
+ // a missing segment will cause the layout router to suspend).
1269
+ // but it cannot delete them.
1270
+ //
1271
+ // We must resolve every promise in the tree, or else it will suspend
1272
+ // indefinitely. If we did not receive data for a segment, we will resolve its
1273
+ // data promise to `null` to trigger a lazy fetch during render.
1274
+ // Use the dynamic data from the server to fulfill the deferred RSC promise
1275
+ // on the Cache Node.
1276
+ const rsc = cacheNode.rsc;
1277
+ const dynamicSegmentData = dynamicData[0];
1278
+ if (dynamicSegmentData === null) {
1279
+ // This is an empty CacheNode; this particular server request did not
1280
+ // render this segment. There may be a separate pending request that will,
1281
+ // though, so we won't abort the task until all pending requests finish.
1282
+ return;
1283
+ }
1284
+ if (rsc === null) {
1285
+ // This is a lazy cache node. We can overwrite it. This is only safe
1286
+ // because we know that the LayoutRouter suspends if `rsc` is `null`.
1287
+ cacheNode.rsc = dynamicSegmentData;
1288
+ } else if (isDeferredRsc(rsc)) {
1289
+ // This is a deferred RSC promise. We can fulfill it with the data we just
1290
+ // received from the server. If it was already resolved by a different
1291
+ // navigation, then this does nothing because we can't overwrite data.
1292
+ //
1293
+ // In the streaming dev render, defer the fill until `revealAfter` settles,
1294
+ // so React doesn't render the boundary's children before their row has been
1295
+ // decoded (otherwise it suspends on the still-pending children and commits
1296
+ // a premature fallback). Outside that render `revealAfter` is null and we
1297
+ // resolve immediately.
1298
+ if (revealAfter !== null) {
1299
+ const resolveRsc = ()=>rsc.resolve(dynamicSegmentData, debugInfo);
1300
+ // Use the same callback for both outcomes: we don't expect `revealAfter`
1301
+ // to reject, but if it ever did (e.g. a connection drop mid-stream) we'd
1302
+ // still want to resolve the RSC.
1303
+ revealAfter.then(resolveRsc, resolveRsc);
1304
+ } else {
1305
+ rsc.resolve(dynamicSegmentData, debugInfo);
1306
+ }
1307
+ } else {
1308
+ // This is not a deferred RSC promise, nor is it empty, so it must have
1309
+ // been populated by a different navigation. We must not overwrite it.
1310
+ }
1311
+ // Check if this is a leaf segment. If so, it will have a `head` property with
1312
+ // a pending promise that needs to be resolved with the dynamic head from
1313
+ // the server.
1314
+ const head = cacheNode.head;
1315
+ if (isDeferredRsc(head)) {
1316
+ head.resolve(dynamicHead, debugInfo);
1317
+ }
1318
+ }
1319
+ function abortRemainingPendingTasks(task, error, debugInfo) {
1320
+ let exitStatus;
1321
+ if (task.status === 0) {
1322
+ // The data for this segment is still missing.
1323
+ task.status = 2;
1324
+ abortPendingCacheNode(task.node, error, debugInfo);
1325
+ // If the server failed to fulfill the data for this segment, it implies
1326
+ // that the route tree received from the server mismatched the tree that
1327
+ // was previously prefetched.
1328
+ //
1329
+ // In an app with fully static routes and no proxy-driven redirects or
1330
+ // rewrites, this should never happen, because the route for a URL would
1331
+ // always be the same across multiple requests. So, this implies that some
1332
+ // runtime routing condition changed, likely in a proxy, without being
1333
+ // pushed to the client.
1334
+ //
1335
+ // When this happens, we treat this the same as a refresh(). The entire
1336
+ // tree will be re-rendered from the root.
1337
+ if (task.refreshState === null) {
1338
+ // Trigger a "soft" refresh. Essentially the same as calling `refresh()`
1339
+ // in a Server Action.
1340
+ exitStatus = 1;
1341
+ } else {
1342
+ // The mismatch was discovered inside an inactive parallel route. This
1343
+ // implies the inactive parallel route is no longer reachable at the URL
1344
+ // that originally rendered it. Fall back to an MPA refresh.
1345
+ // TODO: An alternative could be to trigger a soft refresh but to _not_
1346
+ // re-use the inactive parallel routes this time. Similar to what would
1347
+ // happen if were to do a hard refrehs, but without the HTML page.
1348
+ exitStatus = 2;
1349
+ }
1350
+ } else {
1351
+ // This segment finished. (An error here is treated as Done because they are
1352
+ // surfaced to the application during render.)
1353
+ exitStatus = 0;
1354
+ }
1355
+ const taskChildren = task.children;
1356
+ if (taskChildren !== null) {
1357
+ for (const [, taskChild] of taskChildren){
1358
+ const childExitStatus = abortRemainingPendingTasks(taskChild, error, debugInfo);
1359
+ // Propagate the exit status up the tree. The statuses are ordered by
1360
+ // their precedence.
1361
+ if (childExitStatus > exitStatus) {
1362
+ exitStatus = childExitStatus;
1363
+ }
1364
+ }
1365
+ }
1366
+ return exitStatus;
1367
+ }
1368
+ function abortPendingCacheNode(cacheNode, error, debugInfo) {
1369
+ const rsc = cacheNode.rsc;
1370
+ if (isDeferredRsc(rsc)) {
1371
+ if (error === null) {
1372
+ // This will trigger a lazy fetch during render.
1373
+ rsc.resolve(null, debugInfo);
1374
+ } else {
1375
+ // This will trigger an error during rendering.
1376
+ rsc.reject(error, debugInfo);
1377
+ }
1378
+ }
1379
+ // Check if this is a leaf segment. If so, it will have a `head` property with
1380
+ // a pending promise that needs to be resolved. If an error was provided, we
1381
+ // will not resolve it with an error, since this is rendered at the root of
1382
+ // the app. We want the segment to error, not the entire app.
1383
+ const head = cacheNode.head;
1384
+ if (isDeferredRsc(head)) {
1385
+ head.resolve(null, debugInfo);
1386
+ }
1387
+ }
1388
+ const DEFERRED = Symbol();
1389
+ function isDeferredRsc(value) {
1390
+ return value && typeof value === 'object' && value.tag === DEFERRED;
1391
+ }
1392
+ function createDeferredRsc() {
1393
+ // Create an unresolved promise that represents data derived from a Flight
1394
+ // response. The promise will be resolved later as soon as we start receiving
1395
+ // data from the server, i.e. as soon as the Flight client decodes and returns
1396
+ // the top-level response object.
1397
+ // The `_debugInfo` field contains profiling information. Promises that are
1398
+ // created by Flight already have this info added by React; for any derived
1399
+ // promise created by the router, we need to transfer the Flight debug info
1400
+ // onto the derived promise.
1401
+ //
1402
+ // The debug info represents the latency between the start of the navigation
1403
+ // and the start of rendering. (It does not represent the time it takes for
1404
+ // whole stream to finish.)
1405
+ const debugInfo = [];
1406
+ let resolve;
1407
+ let reject;
1408
+ const pendingRsc = new Promise((res, rej)=>{
1409
+ resolve = res;
1410
+ reject = rej;
1411
+ });
1412
+ pendingRsc.status = 'pending';
1413
+ pendingRsc.resolve = (value, responseDebugInfo)=>{
1414
+ if (pendingRsc.status === 'pending') {
1415
+ const fulfilledRsc = pendingRsc;
1416
+ fulfilledRsc.status = 'fulfilled';
1417
+ fulfilledRsc.value = value;
1418
+ if (responseDebugInfo !== null) {
1419
+ // Transfer the debug info to the derived promise.
1420
+ debugInfo.push.apply(debugInfo, responseDebugInfo);
1421
+ }
1422
+ resolve(value);
1423
+ }
1424
+ };
1425
+ pendingRsc.reject = (error, responseDebugInfo)=>{
1426
+ if (pendingRsc.status === 'pending') {
1427
+ const rejectedRsc = pendingRsc;
1428
+ rejectedRsc.status = 'rejected';
1429
+ rejectedRsc.reason = error;
1430
+ if (responseDebugInfo !== null) {
1431
+ // Transfer the debug info to the derived promise.
1432
+ debugInfo.push.apply(debugInfo, responseDebugInfo);
1433
+ }
1434
+ reject(error);
1435
+ }
1436
+ };
1437
+ pendingRsc.tag = DEFERRED;
1438
+ pendingRsc._debugInfo = debugInfo;
1439
+ return pendingRsc;
1440
+ }
1441
+ function getCurrentNavigationLock() {
1442
+ if (process.env.__NEXT_EXPOSE_TESTING_API) {
1443
+ const { getCurrentNavigationGate } = require('../segment-cache/navigation-testing-lock');
1444
+ return getCurrentNavigationGate();
1445
+ }
1446
+ return null;
1447
+ }
1448
+ function beginLockedNavigation() {
1449
+ if (process.env.__NEXT_EXPOSE_TESTING_API) {
1450
+ const { beginLockedNavigation: begin } = require('../segment-cache/navigation-testing-lock');
1451
+ return begin();
1452
+ }
1453
+ return null;
1454
+ }
1455
+ function resetNavigationLockToPending() {
1456
+ if (process.env.__NEXT_EXPOSE_TESTING_API) {
1457
+ const { resetNavigationLockToPending: reset } = require('../segment-cache/navigation-testing-lock');
1458
+ reset();
1459
+ }
1460
+ }
1461
+
1462
+ if ((typeof exports.default === 'function' || (typeof exports.default === 'object' && exports.default !== null)) && typeof exports.default.__esModule === 'undefined') {
1463
+ Object.defineProperty(exports.default, '__esModule', { value: true });
1464
+ Object.assign(exports.default, exports);
1465
+ module.exports = exports.default;
1466
+ }
1467
+
1468
+ //# sourceMappingURL=ppr-navigations.js.map