@codelionapps/unharness 0.0.0-stage → 0.1.1

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 (1288) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +330 -2
  3. package/bin/unharness.js +15 -0
  4. package/dashboard/.next/standalone/dashboard/.next/BUILD_ID +1 -0
  5. package/dashboard/.next/standalone/dashboard/.next/UNHARNESS_BUILD_DONE +0 -0
  6. package/dashboard/.next/standalone/dashboard/.next/app-path-routes-manifest.json +11 -0
  7. package/dashboard/.next/standalone/dashboard/.next/build-manifest.json +94 -0
  8. package/dashboard/.next/standalone/dashboard/.next/package.json +1 -0
  9. package/dashboard/.next/standalone/dashboard/.next/prerender-manifest.json +72 -0
  10. package/dashboard/.next/standalone/dashboard/.next/required-server-files.json +368 -0
  11. package/dashboard/.next/standalone/dashboard/.next/routes-manifest.json +102 -0
  12. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  13. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page/build-manifest.json +21 -0
  14. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  15. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  16. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  17. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page.js +11 -0
  18. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page.js.map +5 -0
  19. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -0
  20. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  21. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.html +1 -0
  22. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.meta +30 -0
  23. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.rsc +18 -0
  24. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
  25. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  26. package/dashboard/.next/standalone/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
  27. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  28. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page/build-manifest.json +21 -0
  29. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
  30. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  31. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  32. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page.js +14 -0
  33. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page.js.map +5 -0
  34. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -0
  35. package/dashboard/.next/standalone/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  36. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route/app-paths-manifest.json +3 -0
  37. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route/build-manifest.json +12 -0
  38. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route/server-reference-manifest.json +4 -0
  39. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route.js +7 -0
  40. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route.js.map +5 -0
  41. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route.js.nft.json +1 -0
  42. package/dashboard/.next/standalone/dashboard/.next/server/app/api/unharness/route_client-reference-manifest.js +3 -0
  43. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page/app-paths-manifest.json +3 -0
  44. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page/build-manifest.json +21 -0
  45. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page/next-font-manifest.json +6 -0
  46. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page/react-loadable-manifest.json +1 -0
  47. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page/server-reference-manifest.json +4 -0
  48. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page.js +18 -0
  49. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page.js.map +5 -0
  50. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page.js.nft.json +1 -0
  51. package/dashboard/.next/standalone/dashboard/.next/server/app/compare/page_client-reference-manifest.js +3 -0
  52. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg/route/app-paths-manifest.json +3 -0
  53. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg/route/build-manifest.json +12 -0
  54. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg/route.js +7 -0
  55. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg/route.js.map +5 -0
  56. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -0
  57. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg.body +1 -0
  58. package/dashboard/.next/standalone/dashboard/.next/server/app/icon.svg.meta +1 -0
  59. package/dashboard/.next/standalone/dashboard/.next/server/app/page/app-paths-manifest.json +3 -0
  60. package/dashboard/.next/standalone/dashboard/.next/server/app/page/build-manifest.json +21 -0
  61. package/dashboard/.next/standalone/dashboard/.next/server/app/page/next-font-manifest.json +6 -0
  62. package/dashboard/.next/standalone/dashboard/.next/server/app/page/react-loadable-manifest.json +1 -0
  63. package/dashboard/.next/standalone/dashboard/.next/server/app/page/server-reference-manifest.json +4 -0
  64. package/dashboard/.next/standalone/dashboard/.next/server/app/page.js +18 -0
  65. package/dashboard/.next/standalone/dashboard/.next/server/app/page.js.map +5 -0
  66. package/dashboard/.next/standalone/dashboard/.next/server/app/page.js.nft.json +1 -0
  67. package/dashboard/.next/standalone/dashboard/.next/server/app/page_client-reference-manifest.js +3 -0
  68. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page/app-paths-manifest.json +3 -0
  69. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page/build-manifest.json +21 -0
  70. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page/next-font-manifest.json +6 -0
  71. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page/react-loadable-manifest.json +1 -0
  72. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page/server-reference-manifest.json +4 -0
  73. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page.js +18 -0
  74. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page.js.map +5 -0
  75. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page.js.nft.json +1 -0
  76. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/[id]/page_client-reference-manifest.js +3 -0
  77. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page/app-paths-manifest.json +3 -0
  78. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page/build-manifest.json +21 -0
  79. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page/next-font-manifest.json +6 -0
  80. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page/react-loadable-manifest.json +1 -0
  81. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page/server-reference-manifest.json +4 -0
  82. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page.js +17 -0
  83. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page.js.map +5 -0
  84. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page.js.nft.json +1 -0
  85. package/dashboard/.next/standalone/dashboard/.next/server/app/runs/page_client-reference-manifest.js +3 -0
  86. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page/app-paths-manifest.json +3 -0
  87. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page/build-manifest.json +21 -0
  88. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page/next-font-manifest.json +6 -0
  89. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page/react-loadable-manifest.json +1 -0
  90. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page/server-reference-manifest.json +4 -0
  91. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page.js +17 -0
  92. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page.js.map +5 -0
  93. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page.js.nft.json +1 -0
  94. package/dashboard/.next/standalone/dashboard/.next/server/app/setup/page_client-reference-manifest.js +3 -0
  95. package/dashboard/.next/standalone/dashboard/.next/server/app-paths-manifest.json +11 -0
  96. package/dashboard/.next/standalone/dashboard/.next/server/chunks/[externals]__01t2nd50u5k0d._.js +3 -0
  97. package/dashboard/.next/standalone/dashboard/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
  98. package/dashboard/.next/standalone/dashboard/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
  99. package/dashboard/.next/standalone/dashboard/.next/server/chunks/[root-of-the-server]__0et0fkanwxxur._.js +68 -0
  100. package/dashboard/.next/standalone/dashboard/.next/server/chunks/[root-of-the-server]__15bjnu5yieigz._.js +5 -0
  101. package/dashboard/.next/standalone/dashboard/.next/server/chunks/[turbopack]_runtime.js +937 -0
  102. package/dashboard/.next/standalone/dashboard/.next/server/chunks/_1-uxi_ka-dy7f._.js +61 -0
  103. package/dashboard/.next/standalone/dashboard/.next/server/chunks/_1cf_ofyvvip7w._.js +3 -0
  104. package/dashboard/.next/standalone/dashboard/.next/server/chunks/dashboard__next-internal_server_app_api_unharness_route_actions_0idahp0hszu62.js +3 -0
  105. package/dashboard/.next/standalone/dashboard/.next/server/chunks/dashboard__next-internal_server_app_icon_svg_route_actions_04_c50qf4s1__.js +3 -0
  106. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0e4r8nifm7acf._.js +3 -0
  107. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0iouqk55sdstw._.js +3 -0
  108. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
  109. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0qcba441g9j7r._.js +3 -0
  110. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0wa-x71951lbx._.js +3 -0
  111. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__19fljo_8kk85l._.js +3 -0
  112. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1u6lhnfk61fw4._.js +3 -0
  113. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1uyyd8v8upnf3._.js +14 -0
  114. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[root-of-the-server]__20ejk3g6jcji-._.js +110 -0
  115. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
  116. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/_01bzqkhgvulml._.js +3 -0
  117. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app__global-error_page_actions_1tjktvdwype04.js +3 -0
  118. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app__not-found_page_actions_1chp6c-vsqob8.js +3 -0
  119. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_compare_page_actions_0yvj-bxnypqy9.js +3 -0
  120. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_page_actions_1wdlm_33hg0oy.js +3 -0
  121. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_runs_[id]_page_actions_1yv7i200qm874.js +3 -0
  122. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_runs_page_actions_0j5zwb1ilucsr.js +3 -0
  123. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard__next-internal_server_app_setup_page_actions_0oowi28yqn1aa.js +3 -0
  124. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_app_charts_tsx_0tszf3h61tpzg._.js +3 -0
  125. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_app_compare_page_tsx_0f6y9yl_umbwg._.js +3 -0
  126. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_app_page_tsx_0ih6_j2n6j4ya._.js +3 -0
  127. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_app_runs_page_tsx_0uftws_qldjqo._.js +3 -0
  128. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/dashboard_app_setup_page_tsx_0k3bphpyf611u._.js +3 -0
  129. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
  130. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  131. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
  132. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0vn8q0im74u1u._.js +3 -0
  133. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
  134. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
  135. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
  136. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
  137. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_compiled_@edge-runtime_cookies_index_1kiz_an963mbg.js +3 -0
  138. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0_ozp0yuu4qg1.js +3 -0
  139. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0j87yuz4ra2av.js +3 -0
  140. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0tu9pkc8da8u2.js +3 -0
  141. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
  142. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1e2gs9uhe-2mi.js +3 -0
  143. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1s_41xd6mnrrx.js +3 -0
  144. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1yvj-i4d766aw.js +3 -0
  145. package/dashboard/.next/standalone/dashboard/.next/server/chunks/ssr/src_queries_ts_1qvec252dciw9._.js +17 -0
  146. package/dashboard/.next/standalone/dashboard/.next/server/functions-config-manifest.json +14 -0
  147. package/dashboard/.next/standalone/dashboard/.next/server/middleware-build-manifest.js +94 -0
  148. package/dashboard/.next/standalone/dashboard/.next/server/middleware-manifest.json +6 -0
  149. package/dashboard/.next/standalone/dashboard/.next/server/middleware.js +5 -0
  150. package/dashboard/.next/standalone/dashboard/.next/server/next-font-manifest.js +1 -0
  151. package/dashboard/.next/standalone/dashboard/.next/server/next-font-manifest.json +6 -0
  152. package/dashboard/.next/standalone/dashboard/.next/server/pages/500.html +1 -0
  153. package/dashboard/.next/standalone/dashboard/.next/server/pages-manifest.json +3 -0
  154. package/dashboard/.next/standalone/dashboard/.next/server/prefetch-hints.json +11 -0
  155. package/dashboard/.next/standalone/dashboard/.next/server/preview-props.json +5 -0
  156. package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.js +1 -0
  157. package/dashboard/.next/standalone/dashboard/.next/server/server-reference-manifest.json +5 -0
  158. package/dashboard/.next/standalone/dashboard/.next/static/aBZEFjL-d2jaSL3uX4Mft/_buildManifest.js +11 -0
  159. package/dashboard/.next/standalone/dashboard/.next/static/aBZEFjL-d2jaSL3uX4Mft/_clientMiddlewareManifest.js +6 -0
  160. package/dashboard/.next/standalone/dashboard/.next/static/aBZEFjL-d2jaSL3uX4Mft/_ssgManifest.js +1 -0
  161. package/dashboard/.next/standalone/dashboard/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  162. package/dashboard/.next/standalone/dashboard/.next/static/chunks/0r-yur70-ku2o.js +22 -0
  163. package/dashboard/.next/standalone/dashboard/.next/static/chunks/0umf92h1sb77c.js +1 -0
  164. package/dashboard/.next/standalone/dashboard/.next/static/chunks/27_tnesx4_7-4.js +1 -0
  165. package/dashboard/.next/standalone/dashboard/.next/static/chunks/2bs2_lhv9t90b.css +1 -0
  166. package/dashboard/.next/standalone/dashboard/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
  167. package/dashboard/.next/standalone/dashboard/.next/static/chunks/3wbm-994r45kr.js +1 -0
  168. package/dashboard/.next/standalone/dashboard/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
  169. package/dashboard/.next/standalone/dashboard/.next/static/media/icon.2s3751p6y-0bd.svg +1 -0
  170. package/dashboard/.next/standalone/dashboard/.next/static/media/pricing-snapshot.2oehiifqte0u8.json +886 -0
  171. package/dashboard/.next/standalone/dashboard/server.js +38 -0
  172. package/dashboard/.next/standalone/dashboard/tsconfig.json +38 -0
  173. package/dashboard/.next/standalone/node_modules/@next/env/dist/index.js +1 -0
  174. package/dashboard/.next/standalone/node_modules/@next/env/package.json +36 -0
  175. package/dashboard/.next/standalone/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
  176. package/dashboard/.next/standalone/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
  177. package/dashboard/.next/standalone/node_modules/@swc/helpers/esm/_interop_require_default.js +4 -0
  178. package/dashboard/.next/standalone/node_modules/@swc/helpers/esm/_interop_require_wildcard.js +36 -0
  179. package/dashboard/.next/standalone/node_modules/@swc/helpers/package.json +705 -0
  180. package/dashboard/.next/standalone/node_modules/client-only/index.js +0 -0
  181. package/dashboard/.next/standalone/node_modules/client-only/package.json +19 -0
  182. package/dashboard/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +313 -0
  183. package/dashboard/.next/standalone/node_modules/detect-libc/lib/elf.js +39 -0
  184. package/dashboard/.next/standalone/node_modules/detect-libc/lib/filesystem.js +51 -0
  185. package/dashboard/.next/standalone/node_modules/detect-libc/lib/process.js +24 -0
  186. package/dashboard/.next/standalone/node_modules/detect-libc/package.json +44 -0
  187. package/dashboard/.next/standalone/node_modules/next/dist/build/adapter/setup-node-env.external.js +15 -0
  188. package/dashboard/.next/standalone/node_modules/next/dist/build/define-env.js +257 -0
  189. package/dashboard/.next/standalone/node_modules/next/dist/build/duration-to-string.js +98 -0
  190. package/dashboard/.next/standalone/node_modules/next/dist/build/get-supported-browsers.js +38 -0
  191. package/dashboard/.next/standalone/node_modules/next/dist/build/next-config-ts/require-hook.js +85 -0
  192. package/dashboard/.next/standalone/node_modules/next/dist/build/next-config-ts/transpile-config.js +136 -0
  193. package/dashboard/.next/standalone/node_modules/next/dist/build/nft.js +119 -0
  194. package/dashboard/.next/standalone/node_modules/next/dist/build/output/format.js +84 -0
  195. package/dashboard/.next/standalone/node_modules/next/dist/build/output/log.js +135 -0
  196. package/dashboard/.next/standalone/node_modules/next/dist/build/segment-config/app/app-segment-config.js +192 -0
  197. package/dashboard/.next/standalone/node_modules/next/dist/build/segment-config/app/app-segments.js +238 -0
  198. package/dashboard/.next/standalone/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +48 -0
  199. package/dashboard/.next/standalone/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +143 -0
  200. package/dashboard/.next/standalone/node_modules/next/dist/build/static-paths/app.js +880 -0
  201. package/dashboard/.next/standalone/node_modules/next/dist/build/static-paths/pages.js +137 -0
  202. package/dashboard/.next/standalone/node_modules/next/dist/build/static-paths/param-matching.js +200 -0
  203. package/dashboard/.next/standalone/node_modules/next/dist/build/static-paths/utils.js +119 -0
  204. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/helpers.js +15 -0
  205. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/index.js +1339 -0
  206. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/install-bindings.js +30 -0
  207. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/jest-transformer.js +77 -0
  208. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/loaderWorkerPool.js +40 -0
  209. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/options.js +411 -0
  210. package/dashboard/.next/standalone/node_modules/next/dist/build/swc/types.js +6 -0
  211. package/dashboard/.next/standalone/node_modules/next/dist/build/utils.js +1348 -0
  212. package/dashboard/.next/standalone/node_modules/next/dist/cli/next-test.js +175 -0
  213. package/dashboard/.next/standalone/node_modules/next/dist/client/add-base-path.js +24 -0
  214. package/dashboard/.next/standalone/node_modules/next/dist/client/app-call-server.js +32 -0
  215. package/dashboard/.next/standalone/node_modules/next/dist/client/app-find-source-map-url.js +39 -0
  216. package/dashboard/.next/standalone/node_modules/next/dist/client/assign-location.js +29 -0
  217. package/dashboard/.next/standalone/node_modules/next/dist/client/components/app-router-announcer.js +78 -0
  218. package/dashboard/.next/standalone/node_modules/next/dist/client/components/app-router-headers.js +128 -0
  219. package/dashboard/.next/standalone/node_modules/next/dist/client/components/app-router-instance.js +263 -0
  220. package/dashboard/.next/standalone/node_modules/next/dist/client/components/app-router-state.js +527 -0
  221. package/dashboard/.next/standalone/node_modules/next/dist/client/components/app-router-utils.js +58 -0
  222. package/dashboard/.next/standalone/node_modules/next/dist/client/components/app-router.js +531 -0
  223. package/dashboard/.next/standalone/node_modules/next/dist/client/components/builtin/default.js +35 -0
  224. package/dashboard/.next/standalone/node_modules/next/dist/client/components/builtin/error-styles.js +165 -0
  225. package/dashboard/.next/standalone/node_modules/next/dist/client/components/builtin/global-error.js +100 -0
  226. package/dashboard/.next/standalone/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +48 -0
  227. package/dashboard/.next/standalone/node_modules/next/dist/client/components/error-boundary.js +148 -0
  228. package/dashboard/.next/standalone/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js +86 -0
  229. package/dashboard/.next/standalone/node_modules/next/dist/client/components/errors/root-error-boundary.js +41 -0
  230. package/dashboard/.next/standalone/node_modules/next/dist/client/components/forbidden.js +40 -0
  231. package/dashboard/.next/standalone/node_modules/next/dist/client/components/handle-isr-error.js +45 -0
  232. package/dashboard/.next/standalone/node_modules/next/dist/client/components/hooks-server-context.js +42 -0
  233. package/dashboard/.next/standalone/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js +125 -0
  234. package/dashboard/.next/standalone/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +72 -0
  235. package/dashboard/.next/standalone/node_modules/next/dist/client/components/instant-samples.js +127 -0
  236. package/dashboard/.next/standalone/node_modules/next/dist/client/components/is-next-router-error.js +23 -0
  237. package/dashboard/.next/standalone/node_modules/next/dist/client/components/links.js +315 -0
  238. package/dashboard/.next/standalone/node_modules/next/dist/client/components/nav-failure-handler.js +61 -0
  239. package/dashboard/.next/standalone/node_modules/next/dist/client/components/navigation-devtools.js +126 -0
  240. package/dashboard/.next/standalone/node_modules/next/dist/client/components/navigation-dynamic-rendering.js +38 -0
  241. package/dashboard/.next/standalone/node_modules/next/dist/client/components/navigation-untracked.js +68 -0
  242. package/dashboard/.next/standalone/node_modules/next/dist/client/components/navigation.js +242 -0
  243. package/dashboard/.next/standalone/node_modules/next/dist/client/components/navigation.react-server.js +71 -0
  244. package/dashboard/.next/standalone/node_modules/next/dist/client/components/navigator.js +73 -0
  245. package/dashboard/.next/standalone/node_modules/next/dist/client/components/not-found.js +38 -0
  246. package/dashboard/.next/standalone/node_modules/next/dist/client/components/offline.js +172 -0
  247. package/dashboard/.next/standalone/node_modules/next/dist/client/components/prefetch.js +83 -0
  248. package/dashboard/.next/standalone/node_modules/next/dist/client/components/readonly-url-search-params.js +41 -0
  249. package/dashboard/.next/standalone/node_modules/next/dist/client/components/redirect-boundary.js +107 -0
  250. package/dashboard/.next/standalone/node_modules/next/dist/client/components/redirect-error.js +43 -0
  251. package/dashboard/.next/standalone/node_modules/next/dist/client/components/redirect-status-code.js +24 -0
  252. package/dashboard/.next/standalone/node_modules/next/dist/client/components/redirect.js +79 -0
  253. package/dashboard/.next/standalone/node_modules/next/dist/client/components/render-tree.js +1439 -0
  254. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +213 -0
  255. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js +21 -0
  256. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +174 -0
  257. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +26 -0
  258. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/create-segment-key.js +42 -0
  259. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +624 -0
  260. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +70 -0
  261. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
  262. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js +38 -0
  263. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +29 -0
  264. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +56 -0
  265. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +93 -0
  266. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +78 -0
  267. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +350 -0
  268. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +67 -0
  269. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +70 -0
  270. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/router-reducer.js +66 -0
  271. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +66 -0
  272. package/dashboard/.next/standalone/node_modules/next/dist/client/components/router-transition.js +135 -0
  273. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/bfcache.js +120 -0
  274. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache-key.js +56 -0
  275. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache-map.js +326 -0
  276. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/cache.js +2671 -0
  277. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/decode-server-response.js +419 -0
  278. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/fetch.js +37 -0
  279. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/lru.js +152 -0
  280. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +415 -0
  281. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +643 -0
  282. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/scheduler.js +1809 -0
  283. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/types.js +93 -0
  284. package/dashboard/.next/standalone/node_modules/next/dist/client/components/segment-cache/vary-path.js +340 -0
  285. package/dashboard/.next/standalone/node_modules/next/dist/client/components/sequential-router-queue.js +163 -0
  286. package/dashboard/.next/standalone/node_modules/next/dist/client/components/server-async-storage.js +43 -0
  287. package/dashboard/.next/standalone/node_modules/next/dist/client/components/static-generation-bailout.js +42 -0
  288. package/dashboard/.next/standalone/node_modules/next/dist/client/components/unauthorized.js +41 -0
  289. package/dashboard/.next/standalone/node_modules/next/dist/client/components/unrecognized-action-error.js +39 -0
  290. package/dashboard/.next/standalone/node_modules/next/dist/client/components/unresolved-thenable.js +23 -0
  291. package/dashboard/.next/standalone/node_modules/next/dist/client/components/unstable-rethrow.js +31 -0
  292. package/dashboard/.next/standalone/node_modules/next/dist/client/components/use-action-queue.js +140 -0
  293. package/dashboard/.next/standalone/node_modules/next/dist/client/components/use-offline.js +68 -0
  294. package/dashboard/.next/standalone/node_modules/next/dist/client/dev/debug-channel.js +111 -0
  295. package/dashboard/.next/standalone/node_modules/next/dist/client/flight-data-helpers.js +182 -0
  296. package/dashboard/.next/standalone/node_modules/next/dist/client/has-base-path.js +23 -0
  297. package/dashboard/.next/standalone/node_modules/next/dist/client/lib/console.js +177 -0
  298. package/dashboard/.next/standalone/node_modules/next/dist/client/lib/javascript-url.js +32 -0
  299. package/dashboard/.next/standalone/node_modules/next/dist/client/navigation-build-id.js +53 -0
  300. package/dashboard/.next/standalone/node_modules/next/dist/client/normalize-trailing-slash.js +37 -0
  301. package/dashboard/.next/standalone/node_modules/next/dist/client/remove-base-path.js +32 -0
  302. package/dashboard/.next/standalone/node_modules/next/dist/client/route-params.js +271 -0
  303. package/dashboard/.next/standalone/node_modules/next/dist/client/sequential-call-server.js +45 -0
  304. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +339 -0
  305. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/cookies/package.json +1 -0
  306. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js +46 -0
  307. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/ponyfill/package.json +1 -0
  308. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js +1 -0
  309. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js +1 -0
  310. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js +1 -0
  311. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js +5 -0
  312. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js +18713 -0
  313. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/package.json +1 -0
  314. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/stream.js +44 -0
  315. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/timers.js.text.js +1 -0
  316. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@edge-runtime/primitives/url.js.text.js +1 -0
  317. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@hapi/accept/index.js +1 -0
  318. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@hapi/accept/package.json +1 -0
  319. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -0
  320. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json +1 -0
  321. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@napi-rs/triples/index.js +1 -0
  322. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@napi-rs/triples/package.json +1 -0
  323. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@opentelemetry/api/index.js +1 -0
  324. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@opentelemetry/api/package.json +1 -0
  325. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@vercel/detect-agent/index.js +1 -0
  326. package/dashboard/.next/standalone/node_modules/next/dist/compiled/@vercel/detect-agent/package.json +1 -0
  327. package/dashboard/.next/standalone/node_modules/next/dist/compiled/async-retry/index.js +1 -0
  328. package/dashboard/.next/standalone/node_modules/next/dist/compiled/async-retry/package.json +1 -0
  329. package/dashboard/.next/standalone/node_modules/next/dist/compiled/async-sema/index.js +1 -0
  330. package/dashboard/.next/standalone/node_modules/next/dist/compiled/async-sema/package.json +1 -0
  331. package/dashboard/.next/standalone/node_modules/next/dist/compiled/busboy/index.js +1 -0
  332. package/dashboard/.next/standalone/node_modules/next/dist/compiled/busboy/package.json +1 -0
  333. package/dashboard/.next/standalone/node_modules/next/dist/compiled/bytes/index.js +8 -0
  334. package/dashboard/.next/standalone/node_modules/next/dist/compiled/bytes/package.json +1 -0
  335. package/dashboard/.next/standalone/node_modules/next/dist/compiled/ci-info/index.js +1 -0
  336. package/dashboard/.next/standalone/node_modules/next/dist/compiled/ci-info/package.json +1 -0
  337. package/dashboard/.next/standalone/node_modules/next/dist/compiled/commander/index.js +1 -0
  338. package/dashboard/.next/standalone/node_modules/next/dist/compiled/commander/package.json +1 -0
  339. package/dashboard/.next/standalone/node_modules/next/dist/compiled/comment-json/index.js +7 -0
  340. package/dashboard/.next/standalone/node_modules/next/dist/compiled/comment-json/package.json +1 -0
  341. package/dashboard/.next/standalone/node_modules/next/dist/compiled/compression/index.js +58 -0
  342. package/dashboard/.next/standalone/node_modules/next/dist/compiled/compression/package.json +1 -0
  343. package/dashboard/.next/standalone/node_modules/next/dist/compiled/conf/index.js +3 -0
  344. package/dashboard/.next/standalone/node_modules/next/dist/compiled/conf/package.json +1 -0
  345. package/dashboard/.next/standalone/node_modules/next/dist/compiled/content-disposition/index.js +6 -0
  346. package/dashboard/.next/standalone/node_modules/next/dist/compiled/content-disposition/package.json +1 -0
  347. package/dashboard/.next/standalone/node_modules/next/dist/compiled/cookie/index.js +7 -0
  348. package/dashboard/.next/standalone/node_modules/next/dist/compiled/cookie/package.json +1 -0
  349. package/dashboard/.next/standalone/node_modules/next/dist/compiled/cross-spawn/index.js +1 -0
  350. package/dashboard/.next/standalone/node_modules/next/dist/compiled/cross-spawn/package.json +1 -0
  351. package/dashboard/.next/standalone/node_modules/next/dist/compiled/debug/index.js +1 -0
  352. package/dashboard/.next/standalone/node_modules/next/dist/compiled/debug/package.json +1 -0
  353. package/dashboard/.next/standalone/node_modules/next/dist/compiled/edge-runtime/index.js +1 -0
  354. package/dashboard/.next/standalone/node_modules/next/dist/compiled/edge-runtime/package.json +1 -0
  355. package/dashboard/.next/standalone/node_modules/next/dist/compiled/find-up/index.js +1 -0
  356. package/dashboard/.next/standalone/node_modules/next/dist/compiled/find-up/package.json +1 -0
  357. package/dashboard/.next/standalone/node_modules/next/dist/compiled/fresh/index.js +8 -0
  358. package/dashboard/.next/standalone/node_modules/next/dist/compiled/fresh/package.json +1 -0
  359. package/dashboard/.next/standalone/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
  360. package/dashboard/.next/standalone/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
  361. package/dashboard/.next/standalone/node_modules/next/dist/compiled/httpxy/index.js +1 -0
  362. package/dashboard/.next/standalone/node_modules/next/dist/compiled/httpxy/package.json +1 -0
  363. package/dashboard/.next/standalone/node_modules/next/dist/compiled/image-detector/detector.js +1 -0
  364. package/dashboard/.next/standalone/node_modules/next/dist/compiled/image-size/index.js +1 -0
  365. package/dashboard/.next/standalone/node_modules/next/dist/compiled/image-size/package.json +1 -0
  366. package/dashboard/.next/standalone/node_modules/next/dist/compiled/ipaddr.js/ipaddr.js +1 -0
  367. package/dashboard/.next/standalone/node_modules/next/dist/compiled/ipaddr.js/package.json +1 -0
  368. package/dashboard/.next/standalone/node_modules/next/dist/compiled/is-animated/index.js +1 -0
  369. package/dashboard/.next/standalone/node_modules/next/dist/compiled/is-animated/package.json +1 -0
  370. package/dashboard/.next/standalone/node_modules/next/dist/compiled/is-docker/index.js +1 -0
  371. package/dashboard/.next/standalone/node_modules/next/dist/compiled/is-docker/package.json +1 -0
  372. package/dashboard/.next/standalone/node_modules/next/dist/compiled/is-wsl/index.js +1 -0
  373. package/dashboard/.next/standalone/node_modules/next/dist/compiled/is-wsl/package.json +1 -0
  374. package/dashboard/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/index.js +11 -0
  375. package/dashboard/.next/standalone/node_modules/next/dist/compiled/jsonwebtoken/package.json +1 -0
  376. package/dashboard/.next/standalone/node_modules/next/dist/compiled/nanoid/index.cjs +1 -0
  377. package/dashboard/.next/standalone/node_modules/next/dist/compiled/nanoid/package.json +1 -0
  378. package/dashboard/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +327 -0
  379. package/dashboard/.next/standalone/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +327 -0
  380. package/dashboard/.next/standalone/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +8 -0
  381. package/dashboard/.next/standalone/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +20 -0
  382. package/dashboard/.next/standalone/node_modules/next/dist/compiled/p-limit/index.js +1 -0
  383. package/dashboard/.next/standalone/node_modules/next/dist/compiled/p-limit/package.json +1 -0
  384. package/dashboard/.next/standalone/node_modules/next/dist/compiled/p-queue/index.js +1 -0
  385. package/dashboard/.next/standalone/node_modules/next/dist/compiled/p-queue/package.json +1 -0
  386. package/dashboard/.next/standalone/node_modules/next/dist/compiled/path-browserify/index.js +1 -0
  387. package/dashboard/.next/standalone/node_modules/next/dist/compiled/path-browserify/package.json +1 -0
  388. package/dashboard/.next/standalone/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -0
  389. package/dashboard/.next/standalone/node_modules/next/dist/compiled/path-to-regexp/package.json +1 -0
  390. package/dashboard/.next/standalone/node_modules/next/dist/compiled/picomatch/index.js +1 -0
  391. package/dashboard/.next/standalone/node_modules/next/dist/compiled/picomatch/package.json +1 -0
  392. package/dashboard/.next/standalone/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +133 -0
  393. package/dashboard/.next/standalone/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +130 -0
  394. package/dashboard/.next/standalone/node_modules/next/dist/compiled/react-is/index.js +7 -0
  395. package/dashboard/.next/standalone/node_modules/next/dist/compiled/react-is/package.json +26 -0
  396. package/dashboard/.next/standalone/node_modules/next/dist/compiled/regenerator-runtime/package.json +19 -0
  397. package/dashboard/.next/standalone/node_modules/next/dist/compiled/regenerator-runtime/runtime.js +729 -0
  398. package/dashboard/.next/standalone/node_modules/next/dist/compiled/semver/index.js +1 -0
  399. package/dashboard/.next/standalone/node_modules/next/dist/compiled/semver/package.json +1 -0
  400. package/dashboard/.next/standalone/node_modules/next/dist/compiled/send/index.js +70 -0
  401. package/dashboard/.next/standalone/node_modules/next/dist/compiled/send/package.json +1 -0
  402. package/dashboard/.next/standalone/node_modules/next/dist/compiled/source-map/package.json +1 -0
  403. package/dashboard/.next/standalone/node_modules/next/dist/compiled/source-map/source-map.js +1 -0
  404. package/dashboard/.next/standalone/node_modules/next/dist/compiled/stacktrace-parser/package.json +1 -0
  405. package/dashboard/.next/standalone/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -0
  406. package/dashboard/.next/standalone/node_modules/next/dist/compiled/string-hash/index.js +1 -0
  407. package/dashboard/.next/standalone/node_modules/next/dist/compiled/string-hash/package.json +1 -0
  408. package/dashboard/.next/standalone/node_modules/next/dist/compiled/strip-ansi/index.js +1 -0
  409. package/dashboard/.next/standalone/node_modules/next/dist/compiled/strip-ansi/package.json +1 -0
  410. package/dashboard/.next/standalone/node_modules/next/dist/compiled/superstruct/index.cjs +1 -0
  411. package/dashboard/.next/standalone/node_modules/next/dist/compiled/superstruct/package.json +1 -0
  412. package/dashboard/.next/standalone/node_modules/next/dist/compiled/tar/index.min.js +1 -0
  413. package/dashboard/.next/standalone/node_modules/next/dist/compiled/tar/package.json +1 -0
  414. package/dashboard/.next/standalone/node_modules/next/dist/compiled/text-table/index.js +1 -0
  415. package/dashboard/.next/standalone/node_modules/next/dist/compiled/text-table/package.json +1 -0
  416. package/dashboard/.next/standalone/node_modules/next/dist/compiled/watchpack/package.json +1 -0
  417. package/dashboard/.next/standalone/node_modules/next/dist/compiled/watchpack/watchpack.js +1 -0
  418. package/dashboard/.next/standalone/node_modules/next/dist/compiled/write-file-atomic/index.js +1 -0
  419. package/dashboard/.next/standalone/node_modules/next/dist/compiled/write-file-atomic/package.json +1 -0
  420. package/dashboard/.next/standalone/node_modules/next/dist/compiled/ws/index.js +1 -0
  421. package/dashboard/.next/standalone/node_modules/next/dist/compiled/ws/package.json +1 -0
  422. package/dashboard/.next/standalone/node_modules/next/dist/compiled/zod/index.cjs +1 -0
  423. package/dashboard/.next/standalone/node_modules/next/dist/compiled/zod/package.json +1 -0
  424. package/dashboard/.next/standalone/node_modules/next/dist/compiled/zod-validation-error/index.js +1 -0
  425. package/dashboard/.next/standalone/node_modules/next/dist/compiled/zod-validation-error/package.json +1 -0
  426. package/dashboard/.next/standalone/node_modules/next/dist/experimental/testmode/context.js +57 -0
  427. package/dashboard/.next/standalone/node_modules/next/dist/experimental/testmode/fetch.js +150 -0
  428. package/dashboard/.next/standalone/node_modules/next/dist/experimental/testmode/httpget.js +33 -0
  429. package/dashboard/.next/standalone/node_modules/next/dist/experimental/testmode/server-edge.js +32 -0
  430. package/dashboard/.next/standalone/node_modules/next/dist/experimental/testmode/server.js +73 -0
  431. package/dashboard/.next/standalone/node_modules/next/dist/export/helpers/create-incremental-cache.js +66 -0
  432. package/dashboard/.next/standalone/node_modules/next/dist/export/utils.js +37 -0
  433. package/dashboard/.next/standalone/node_modules/next/dist/lib/batcher.js +65 -0
  434. package/dashboard/.next/standalone/node_modules/next/dist/lib/build-custom-route.js +46 -0
  435. package/dashboard/.next/standalone/node_modules/next/dist/lib/bundler.js +168 -0
  436. package/dashboard/.next/standalone/node_modules/next/dist/lib/client-and-server-references.js +54 -0
  437. package/dashboard/.next/standalone/node_modules/next/dist/lib/coalesced-function.js +39 -0
  438. package/dashboard/.next/standalone/node_modules/next/dist/lib/compile-error.js +14 -0
  439. package/dashboard/.next/standalone/node_modules/next/dist/lib/constants.js +420 -0
  440. package/dashboard/.next/standalone/node_modules/next/dist/lib/create-client-router-filter.js +83 -0
  441. package/dashboard/.next/standalone/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  442. package/dashboard/.next/standalone/node_modules/next/dist/lib/detect-typo.js +51 -0
  443. package/dashboard/.next/standalone/node_modules/next/dist/lib/dist-dir.js +88 -0
  444. package/dashboard/.next/standalone/node_modules/next/dist/lib/download-swc.js +175 -0
  445. package/dashboard/.next/standalone/node_modules/next/dist/lib/fallback.js +88 -0
  446. package/dashboard/.next/standalone/node_modules/next/dist/lib/file-exists.js +53 -0
  447. package/dashboard/.next/standalone/node_modules/next/dist/lib/find-config.js +102 -0
  448. package/dashboard/.next/standalone/node_modules/next/dist/lib/find-pages-dir.js +57 -0
  449. package/dashboard/.next/standalone/node_modules/next/dist/lib/find-root.js +280 -0
  450. package/dashboard/.next/standalone/node_modules/next/dist/lib/format-cli-help-output.js +84 -0
  451. package/dashboard/.next/standalone/node_modules/next/dist/lib/format-dynamic-import-path.js +43 -0
  452. package/dashboard/.next/standalone/node_modules/next/dist/lib/format-server-error.js +75 -0
  453. package/dashboard/.next/standalone/node_modules/next/dist/lib/framework/boundary-components.js +62 -0
  454. package/dashboard/.next/standalone/node_modules/next/dist/lib/framework/boundary-constants.js +36 -0
  455. package/dashboard/.next/standalone/node_modules/next/dist/lib/fs/rename.js +87 -0
  456. package/dashboard/.next/standalone/node_modules/next/dist/lib/fs/write-atomic.js +28 -0
  457. package/dashboard/.next/standalone/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +52 -0
  458. package/dashboard/.next/standalone/node_modules/next/dist/lib/get-files-in-dir.js +33 -0
  459. package/dashboard/.next/standalone/node_modules/next/dist/lib/get-network-host.js +44 -0
  460. package/dashboard/.next/standalone/node_modules/next/dist/lib/get-package-version.js +118 -0
  461. package/dashboard/.next/standalone/node_modules/next/dist/lib/get-project-dir.js +51 -0
  462. package/dashboard/.next/standalone/node_modules/next/dist/lib/git-worktree.js +74 -0
  463. package/dashboard/.next/standalone/node_modules/next/dist/lib/has-necessary-dependencies.js +49 -0
  464. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/get-cache-directory.js +62 -0
  465. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/get-npx-command.js +29 -0
  466. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/get-online.js +50 -0
  467. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/get-pkg-manager.js +65 -0
  468. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/get-registry.js +41 -0
  469. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/get-reserved-port.js +116 -0
  470. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/git.js +104 -0
  471. package/dashboard/.next/standalone/node_modules/next/dist/lib/helpers/install.js +83 -0
  472. package/dashboard/.next/standalone/node_modules/next/dist/lib/import-next-warning.js +50 -0
  473. package/dashboard/.next/standalone/node_modules/next/dist/lib/inline-static-env.js +108 -0
  474. package/dashboard/.next/standalone/node_modules/next/dist/lib/install-dependencies.js +40 -0
  475. package/dashboard/.next/standalone/node_modules/next/dist/lib/interop-default.js +16 -0
  476. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-api-route.js +15 -0
  477. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-app-page-route.js +15 -0
  478. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-app-route-route.js +15 -0
  479. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-edge-runtime.js +16 -0
  480. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-error.js +66 -0
  481. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-interception-route-rewrite.js +18 -0
  482. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-internal-component.js +36 -0
  483. package/dashboard/.next/standalone/node_modules/next/dist/lib/is-serializable-props.js +82 -0
  484. package/dashboard/.next/standalone/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  485. package/dashboard/.next/standalone/node_modules/next/dist/lib/load-custom-routes.js +594 -0
  486. package/dashboard/.next/standalone/node_modules/next/dist/lib/memory/gc-observer.js +53 -0
  487. package/dashboard/.next/standalone/node_modules/next/dist/lib/memory/shutdown.js +29 -0
  488. package/dashboard/.next/standalone/node_modules/next/dist/lib/memory/startup.js +47 -0
  489. package/dashboard/.next/standalone/node_modules/next/dist/lib/memory/trace.js +109 -0
  490. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/constants.js +40 -0
  491. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/default-metadata.js +82 -0
  492. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/generate/icon-mark.js +22 -0
  493. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/generate/utils.js +52 -0
  494. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/get-metadata-route.js +162 -0
  495. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/index.js +18 -0
  496. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/is-metadata-route.js +221 -0
  497. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/metadata-context.js +18 -0
  498. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/metadata-elements.js +1498 -0
  499. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/metadata-parallel.js +175 -0
  500. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/metadata-resolution-primitives.js +467 -0
  501. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/metadata.js +174 -0
  502. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolve-metadata-parallel.js +632 -0
  503. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolve-metadata.js +485 -0
  504. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-basics.js +232 -0
  505. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-icons.js +56 -0
  506. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-opengraph.js +199 -0
  507. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-title.js +40 -0
  508. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/resolvers/resolve-url.js +135 -0
  509. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/alternative-urls-types.js +7 -0
  510. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/extra-types.js +9 -0
  511. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/icons.js +6 -0
  512. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/manifest-types.js +6 -0
  513. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/metadata-interface.js +18 -0
  514. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/metadata-types.js +10 -0
  515. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/opengraph-types.js +6 -0
  516. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/resolvers.js +6 -0
  517. package/dashboard/.next/standalone/node_modules/next/dist/lib/metadata/types/twitter-types.js +7 -0
  518. package/dashboard/.next/standalone/node_modules/next/dist/lib/mime-type.js +20 -0
  519. package/dashboard/.next/standalone/node_modules/next/dist/lib/mkcert.js +188 -0
  520. package/dashboard/.next/standalone/node_modules/next/dist/lib/multi-file-writer.js +75 -0
  521. package/dashboard/.next/standalone/node_modules/next/dist/lib/needs-experimental-react.js +16 -0
  522. package/dashboard/.next/standalone/node_modules/next/dist/lib/non-nullable.js +15 -0
  523. package/dashboard/.next/standalone/node_modules/next/dist/lib/normalize-path.js +21 -0
  524. package/dashboard/.next/standalone/node_modules/next/dist/lib/oxford-comma-list.js +15 -0
  525. package/dashboard/.next/standalone/node_modules/next/dist/lib/page-types.js +18 -0
  526. package/dashboard/.next/standalone/node_modules/next/dist/lib/patch-incorrect-lockfile.js +181 -0
  527. package/dashboard/.next/standalone/node_modules/next/dist/lib/pick.js +19 -0
  528. package/dashboard/.next/standalone/node_modules/next/dist/lib/picocolors.js +187 -0
  529. package/dashboard/.next/standalone/node_modules/next/dist/lib/pretty-bytes.js +70 -0
  530. package/dashboard/.next/standalone/node_modules/next/dist/lib/profiles-dir.js +45 -0
  531. package/dashboard/.next/standalone/node_modules/next/dist/lib/realpath.js +20 -0
  532. package/dashboard/.next/standalone/node_modules/next/dist/lib/recursive-copy.js +76 -0
  533. package/dashboard/.next/standalone/node_modules/next/dist/lib/recursive-delete.js +176 -0
  534. package/dashboard/.next/standalone/node_modules/next/dist/lib/recursive-readdir.js +124 -0
  535. package/dashboard/.next/standalone/node_modules/next/dist/lib/redirect-status.js +46 -0
  536. package/dashboard/.next/standalone/node_modules/next/dist/lib/require-instrumentation-client.js +32 -0
  537. package/dashboard/.next/standalone/node_modules/next/dist/lib/resolve-build-paths.js +178 -0
  538. package/dashboard/.next/standalone/node_modules/next/dist/lib/resolve-from.js +57 -0
  539. package/dashboard/.next/standalone/node_modules/next/dist/lib/route-pattern-normalizer.js +107 -0
  540. package/dashboard/.next/standalone/node_modules/next/dist/lib/scheduler.js +64 -0
  541. package/dashboard/.next/standalone/node_modules/next/dist/lib/semver-noop.js +18 -0
  542. package/dashboard/.next/standalone/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  543. package/dashboard/.next/standalone/node_modules/next/dist/lib/setup-exception-listeners.js +11 -0
  544. package/dashboard/.next/standalone/node_modules/next/dist/lib/static-env.js +88 -0
  545. package/dashboard/.next/standalone/node_modules/next/dist/lib/try-to-parse-path.js +67 -0
  546. package/dashboard/.next/standalone/node_modules/next/dist/lib/turbopack-cache-seed.js +171 -0
  547. package/dashboard/.next/standalone/node_modules/next/dist/lib/turbopack-warning.js +185 -0
  548. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/diagnosticFormatter.js +243 -0
  549. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +61 -0
  550. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/getTypeScriptIntent.js +52 -0
  551. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
  552. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/missingDependencyError.js +22 -0
  553. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/runTypeCheck.js +141 -0
  554. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +52 -0
  555. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +244 -0
  556. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/type-paths.js +51 -0
  557. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/writeAppTypeDeclarations.js +77 -0
  558. package/dashboard/.next/standalone/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +395 -0
  559. package/dashboard/.next/standalone/node_modules/next/dist/lib/url.js +75 -0
  560. package/dashboard/.next/standalone/node_modules/next/dist/lib/verify-partytown-setup.js +100 -0
  561. package/dashboard/.next/standalone/node_modules/next/dist/lib/verify-root-layout.js +165 -0
  562. package/dashboard/.next/standalone/node_modules/next/dist/lib/verify-typescript-setup.js +271 -0
  563. package/dashboard/.next/standalone/node_modules/next/dist/lib/wait.js +19 -0
  564. package/dashboard/.next/standalone/node_modules/next/dist/lib/warn-missing-react-dependencies.js +33 -0
  565. package/dashboard/.next/standalone/node_modules/next/dist/lib/with-promise-cache.js +24 -0
  566. package/dashboard/.next/standalone/node_modules/next/dist/lib/worker.js +230 -0
  567. package/dashboard/.next/standalone/node_modules/next/dist/server/ReactDOMServerPages.js +16 -0
  568. package/dashboard/.next/standalone/node_modules/next/dist/server/accept-header.js +120 -0
  569. package/dashboard/.next/standalone/node_modules/next/dist/server/after/after-context.js +158 -0
  570. package/dashboard/.next/standalone/node_modules/next/dist/server/after/after.js +24 -0
  571. package/dashboard/.next/standalone/node_modules/next/dist/server/after/awaiter.js +70 -0
  572. package/dashboard/.next/standalone/node_modules/next/dist/server/after/builtin-request-context.js +38 -0
  573. package/dashboard/.next/standalone/node_modules/next/dist/server/after/index.js +21 -0
  574. package/dashboard/.next/standalone/node_modules/next/dist/server/after/run-with-after.js +35 -0
  575. package/dashboard/.next/standalone/node_modules/next/dist/server/api-utils/get-cookie-parser.js +22 -0
  576. package/dashboard/.next/standalone/node_modules/next/dist/server/api-utils/index.js +208 -0
  577. package/dashboard/.next/standalone/node_modules/next/dist/server/api-utils/node/api-resolver.js +355 -0
  578. package/dashboard/.next/standalone/node_modules/next/dist/server/api-utils/node/parse-body.js +67 -0
  579. package/dashboard/.next/standalone/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +89 -0
  580. package/dashboard/.next/standalone/node_modules/next/dist/server/api-utils/web.js +17 -0
  581. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/action-async-storage-instance.js +14 -0
  582. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/action-async-storage.external.js +13 -0
  583. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/action-handler.js +1088 -0
  584. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +14 -0
  585. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/after-task-async-storage.external.js +13 -0
  586. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +308 -0
  587. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/app-render-render-utils.js +72 -0
  588. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/app-render-scheduling.js +176 -0
  589. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/app-render.js +6632 -0
  590. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/async-local-storage.js +81 -0
  591. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/blocking-route-messages.js +230 -0
  592. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/cache-signal.js +207 -0
  593. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/collect-segment-data.js +1003 -0
  594. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/console-async-storage-instance.js +14 -0
  595. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/console-async-storage.external.js +13 -0
  596. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +39 -0
  597. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/create-component-tree.js +782 -0
  598. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/create-error-handler.js +196 -0
  599. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/create-transport-tree-from-loader-tree.js +190 -0
  600. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/csrf-protection.js +86 -0
  601. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/debug-channel-server.js +47 -0
  602. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/debug-channel-server.node.js +60 -0
  603. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/debug-channel-server.web.js +56 -0
  604. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-error-delivery.js +28 -0
  605. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-events.js +26 -0
  606. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-scheduler.js +86 -0
  607. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-worker-globals.js +41 -0
  608. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +81 -0
  609. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +14 -0
  610. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +36 -0
  611. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering-client.js +124 -0
  612. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering-validation.js +814 -0
  613. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/dynamic-rendering.js +334 -0
  614. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/encryption-utils-server.js +114 -0
  615. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/encryption-utils.js +89 -0
  616. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/encryption.js +248 -0
  617. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/entry-base.js +260 -0
  618. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/flight-render-result.js +28 -0
  619. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/get-asset-query-string.js +29 -0
  620. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +45 -0
  621. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/get-layer-assets.js +69 -0
  622. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/get-preloadable-fonts.js +39 -0
  623. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +32 -0
  624. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js +25 -0
  625. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/has-loading-component-in-tree.js +19 -0
  626. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-test-bootstrap.js +20 -0
  627. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +31 -0
  628. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-impl.js +118 -0
  629. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +38 -0
  630. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +233 -0
  631. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +383 -0
  632. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
  633. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/instant-validation.js +873 -0
  634. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +88 -0
  635. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/interop-default.js +17 -0
  636. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/make-get-server-inserted-html.js +91 -0
  637. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/manifests-singleton.js +399 -0
  638. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +29 -0
  639. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/module-loading/instrument-module-getter.js +32 -0
  640. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-dynamic-import.js +49 -0
  641. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js +32 -0
  642. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +62 -0
  643. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +37 -0
  644. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/postponed-state.js +266 -0
  645. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/prospective-render-utils.js +70 -0
  646. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/react-large-shell-error.js +17 -0
  647. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/react-server.node.js +39 -0
  648. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/render-css-resource.js +57 -0
  649. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/render-in-browser.js +27 -0
  650. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/required-scripts.js +72 -0
  651. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/rsc/preloads.js +74 -0
  652. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/rsc/taint.js +75 -0
  653. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/segment-config/ensure-static.js +206 -0
  654. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/segment-explorer-path.js +128 -0
  655. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/server-inserted-html.js +77 -0
  656. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/staged-rendering.js +316 -0
  657. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/stale-time.js +101 -0
  658. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.js +155 -0
  659. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.node.js +848 -0
  660. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/stream-ops.web.js +233 -0
  661. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/strip-flight-headers.js +18 -0
  662. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/sync-io-messages.js +59 -0
  663. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/types.js +66 -0
  664. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/use-flight-response.js +204 -0
  665. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/vary-params.js +262 -0
  666. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/wait-for-response.js +36 -0
  667. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +235 -0
  668. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/work-async-storage-instance.js +14 -0
  669. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/work-async-storage.external.js +13 -0
  670. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +14 -0
  671. package/dashboard/.next/standalone/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +260 -0
  672. package/dashboard/.next/standalone/node_modules/next/dist/server/async-storage/draft-mode-provider.js +58 -0
  673. package/dashboard/.next/standalone/node_modules/next/dist/server/async-storage/request-store.js +202 -0
  674. package/dashboard/.next/standalone/node_modules/next/dist/server/async-storage/with-store.js +6 -0
  675. package/dashboard/.next/standalone/node_modules/next/dist/server/async-storage/work-store.js +96 -0
  676. package/dashboard/.next/standalone/node_modules/next/dist/server/base-http/helpers.js +36 -0
  677. package/dashboard/.next/standalone/node_modules/next/dist/server/base-http/index.js +54 -0
  678. package/dashboard/.next/standalone/node_modules/next/dist/server/base-http/node.js +143 -0
  679. package/dashboard/.next/standalone/node_modules/next/dist/server/base-http/web.js +116 -0
  680. package/dashboard/.next/standalone/node_modules/next/dist/server/base-server.js +2181 -0
  681. package/dashboard/.next/standalone/node_modules/next/dist/server/body-streams.js +122 -0
  682. package/dashboard/.next/standalone/node_modules/next/dist/server/cache-dir.js +26 -0
  683. package/dashboard/.next/standalone/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  684. package/dashboard/.next/standalone/node_modules/next/dist/server/ci-info.js +41 -0
  685. package/dashboard/.next/standalone/node_modules/next/dist/server/client-component-renderer-logger.js +171 -0
  686. package/dashboard/.next/standalone/node_modules/next/dist/server/config-schema.js +852 -0
  687. package/dashboard/.next/standalone/node_modules/next/dist/server/config-shared.js +417 -0
  688. package/dashboard/.next/standalone/node_modules/next/dist/server/config-utils.js +185 -0
  689. package/dashboard/.next/standalone/node_modules/next/dist/server/config.js +1658 -0
  690. package/dashboard/.next/standalone/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js +96 -0
  691. package/dashboard/.next/standalone/node_modules/next/dist/server/crypto-utils.js +70 -0
  692. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/browser-logs/file-logger.js +186 -0
  693. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/browser-logs/receive-logs.js +610 -0
  694. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/browser-logs/source-map.js +222 -0
  695. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/debug-channel.js +108 -0
  696. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/dev-indicator-server-state.js +15 -0
  697. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +233 -0
  698. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/dev-validation-worker.js +308 -0
  699. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/get-source-map-from-file.js +80 -0
  700. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/hot-middleware.js +302 -0
  701. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  702. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-shared-utils.js +56 -0
  703. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1894 -0
  704. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-types.js +63 -0
  705. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1386 -0
  706. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/log-requests.js +152 -0
  707. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/messages.js +66 -0
  708. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/middleware-turbopack.js +406 -0
  709. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/middleware-webpack.js +487 -0
  710. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/node-stack-frames.js +64 -0
  711. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/on-demand-entry-handler.js +773 -0
  712. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/parse-version-info.js +108 -0
  713. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/require-cache.js +109 -0
  714. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/runtime-error-state.js +220 -0
  715. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/serialized-errors.js +63 -0
  716. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/server-action-logger.js +37 -0
  717. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/static-paths-worker.js +107 -0
  718. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/turbopack-utils.js +711 -0
  719. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/use-cache-probe-pool.js +178 -0
  720. package/dashboard/.next/standalone/node_modules/next/dist/server/dev/use-cache-probe-worker.js +181 -0
  721. package/dashboard/.next/standalone/node_modules/next/dist/server/dynamic-rendering-utils.js +528 -0
  722. package/dashboard/.next/standalone/node_modules/next/dist/server/font-utils.js +43 -0
  723. package/dashboard/.next/standalone/node_modules/next/dist/server/get-app-route-from-entrypoint.js +30 -0
  724. package/dashboard/.next/standalone/node_modules/next/dist/server/get-page-files.js +40 -0
  725. package/dashboard/.next/standalone/node_modules/next/dist/server/get-route-from-entrypoint.js +35 -0
  726. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/detect-content-type.js +229 -0
  727. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/extract-etag.js +53 -0
  728. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/get-image-size.js +25 -0
  729. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/get-max-age.js +41 -0
  730. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/get-previously-cached-image-or-null.js +22 -0
  731. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/image-error.js +23 -0
  732. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/image-type.js +86 -0
  733. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer/transform.js +227 -0
  734. package/dashboard/.next/standalone/node_modules/next/dist/server/image-optimizer.js +878 -0
  735. package/dashboard/.next/standalone/node_modules/next/dist/server/instrumentation/types.js +6 -0
  736. package/dashboard/.next/standalone/node_modules/next/dist/server/instrumentation/utils.js +21 -0
  737. package/dashboard/.next/standalone/node_modules/next/dist/server/internal-utils.js +39 -0
  738. package/dashboard/.next/standalone/node_modules/next/dist/server/is-private-ip.js +36 -0
  739. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/app-dir-module.js +59 -0
  740. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/app-info-log.js +145 -0
  741. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/async-callback-set.js +29 -0
  742. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/cache-control.js +22 -0
  743. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/default.external.js +18 -0
  744. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/default.js +192 -0
  745. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/cache-handlers/types.js +8 -0
  746. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +112 -0
  747. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/clone-response.js +77 -0
  748. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/cpu-profile.js +56 -0
  749. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/decode-query-path-parameter.js +26 -0
  750. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/dedupe-fetch.js +120 -0
  751. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/dev-bundler-service.js +110 -0
  752. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/disk-lru-cache.external.js +63 -0
  753. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/encode-header-safe.js +44 -0
  754. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/etag.js +56 -0
  755. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/experimental/create-env-definitions.js +48 -0
  756. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/find-page-file.js +147 -0
  757. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/fix-mojibake.js +25 -0
  758. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/format-hostname.js +16 -0
  759. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/generate-agent-files.js +303 -0
  760. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/i18n-provider.js +125 -0
  761. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/implicit-tags.js +87 -0
  762. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +500 -0
  763. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/index.js +556 -0
  764. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +55 -0
  765. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +81 -0
  766. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js +55 -0
  767. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/install-code-frame.js +22 -0
  768. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/is-ipv6.js +41 -0
  769. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/is-non-html-sec-fetch-dest.js +38 -0
  770. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/is-rsc-request.js +18 -0
  771. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/lazy-module.js +76 -0
  772. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/lazy-result.js +46 -0
  773. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/lru-cache.js +187 -0
  774. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/match-next-data-pathname.js +20 -0
  775. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/mock-request.js +345 -0
  776. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/module-loader/module-loader.js +8 -0
  777. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +21 -0
  778. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/module-loader/route-module-loader.js +22 -0
  779. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/node-fs-methods.js +42 -0
  780. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/params-utils.js +52 -0
  781. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/parse-stack.js +46 -0
  782. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/patch-fetch-symbol.js +13 -0
  783. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/patch-fetch.js +1029 -0
  784. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/patch-set-header.js +45 -0
  785. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/postponed-request-body.js +60 -0
  786. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/release-compression-stream.js +24 -0
  787. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/render-server.js +149 -0
  788. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
  789. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-server.js +826 -0
  790. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +108 -0
  791. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/build-data-route.js +71 -0
  792. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +50 -0
  793. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +181 -0
  794. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +38 -0
  795. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/filesystem.js +793 -0
  796. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +214 -0
  797. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +110 -0
  798. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/normalize-catchall-routes.js +320 -0
  799. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/proxy-request.js +128 -0
  800. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +652 -0
  801. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/root-params-type-utils.js +61 -0
  802. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/route-types-utils.js +326 -0
  803. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/router-server-context.js +26 -0
  804. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/strict-route-matching-config.js +28 -0
  805. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/typegen.js +938 -0
  806. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/router-utils/types.js +6 -0
  807. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/server-action-request-meta.js +53 -0
  808. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/server-ipc/utils.js +83 -0
  809. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/source-maps.js +241 -0
  810. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/start-server.js +550 -0
  811. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/streaming-metadata.js +27 -0
  812. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/to-route.js +37 -0
  813. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/constants.js +260 -0
  814. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/local-span-recorder.js +385 -0
  815. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/request-insights-identity.js +37 -0
  816. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/request-insights.js +308 -0
  817. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/span-store.js +69 -0
  818. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/tracer.js +408 -0
  819. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/trace/utils.js +16 -0
  820. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/types.js +6 -0
  821. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/utils.js +343 -0
  822. package/dashboard/.next/standalone/node_modules/next/dist/server/lib/worker-utils.js +32 -0
  823. package/dashboard/.next/standalone/node_modules/next/dist/server/load-components.js +190 -0
  824. package/dashboard/.next/standalone/node_modules/next/dist/server/load-default-error-components.js +41 -0
  825. package/dashboard/.next/standalone/node_modules/next/dist/server/load-manifest.external.js +116 -0
  826. package/dashboard/.next/standalone/node_modules/next/dist/server/match-bundle.js +25 -0
  827. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/get-mcp-middleware.js +51 -0
  828. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/get-or-create-mcp-server.js +51 -0
  829. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/mcp-telemetry-tracker.js +82 -0
  830. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/compile-route.js +86 -0
  831. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-compilation-issues.js +68 -0
  832. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-errors.js +114 -0
  833. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-logs.js +67 -0
  834. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-page-metadata.js +188 -0
  835. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-project-metadata.js +59 -0
  836. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-request-insights.js +57 -0
  837. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-routes.js +136 -0
  838. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/get-server-action-by-id.js +121 -0
  839. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/next-instance-error-state.js +31 -0
  840. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +82 -0
  841. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/format-compilation-issues.js +72 -0
  842. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +137 -0
  843. package/dashboard/.next/standalone/node_modules/next/dist/server/mcp/tools/utils/resolve-path-to-route.js +49 -0
  844. package/dashboard/.next/standalone/node_modules/next/dist/server/next-server.js +1452 -0
  845. package/dashboard/.next/standalone/node_modules/next/dist/server/next-typescript.js +13 -0
  846. package/dashboard/.next/standalone/node_modules/next/dist/server/next.js +473 -0
  847. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-baseline.js +25 -0
  848. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +300 -0
  849. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-exit.js +49 -0
  850. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/console-file.js +56 -0
  851. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/date.js +52 -0
  852. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/error-inspect.js +8 -0
  853. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +630 -0
  854. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +29 -0
  855. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/io-utils.js +103 -0
  856. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/node-crypto.js +103 -0
  857. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +161 -0
  858. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/random.js +28 -0
  859. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +507 -0
  860. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment-extensions/web-crypto.js +45 -0
  861. package/dashboard/.next/standalone/node_modules/next/dist/server/node-environment.js +19 -0
  862. package/dashboard/.next/standalone/node_modules/next/dist/server/node-polyfill-crypto.js +21 -0
  863. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js +33 -0
  864. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js +54 -0
  865. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js +22 -0
  866. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +40 -0
  867. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js +55 -0
  868. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/app/index.js +42 -0
  869. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/index.js +44 -0
  870. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js +55 -0
  871. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js +22 -0
  872. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js +19 -0
  873. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js +19 -0
  874. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/locale-route-normalizer.js +26 -0
  875. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/normalizer.js +6 -0
  876. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/normalizers.js +23 -0
  877. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/prefixing-normalizer.js +26 -0
  878. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/base-path.js +21 -0
  879. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/next-data.js +34 -0
  880. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/pathname-normalizer.js +6 -0
  881. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/prefix.js +35 -0
  882. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/rsc.js +19 -0
  883. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js +33 -0
  884. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/request/suffix.js +27 -0
  885. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/underscore-normalizer.js +17 -0
  886. package/dashboard/.next/standalone/node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js +17 -0
  887. package/dashboard/.next/standalone/node_modules/next/dist/server/og/cache-image-response.js +336 -0
  888. package/dashboard/.next/standalone/node_modules/next/dist/server/og/image-response.js +72 -0
  889. package/dashboard/.next/standalone/node_modules/next/dist/server/patch-error-inspect.js +515 -0
  890. package/dashboard/.next/standalone/node_modules/next/dist/server/pipe-readable.js +224 -0
  891. package/dashboard/.next/standalone/node_modules/next/dist/server/post-process.js +39 -0
  892. package/dashboard/.next/standalone/node_modules/next/dist/server/render-result.js +234 -0
  893. package/dashboard/.next/standalone/node_modules/next/dist/server/render.js +1004 -0
  894. package/dashboard/.next/standalone/node_modules/next/dist/server/request/cache-stages.js +250 -0
  895. package/dashboard/.next/standalone/node_modules/next/dist/server/request/connection.js +104 -0
  896. package/dashboard/.next/standalone/node_modules/next/dist/server/request/cookies.js +204 -0
  897. package/dashboard/.next/standalone/node_modules/next/dist/server/request/draft-mode.js +192 -0
  898. package/dashboard/.next/standalone/node_modules/next/dist/server/request/fallback-params.js +109 -0
  899. package/dashboard/.next/standalone/node_modules/next/dist/server/request/headers.js +201 -0
  900. package/dashboard/.next/standalone/node_modules/next/dist/server/request/io.js +87 -0
  901. package/dashboard/.next/standalone/node_modules/next/dist/server/request/params.js +500 -0
  902. package/dashboard/.next/standalone/node_modules/next/dist/server/request/pathname.js +89 -0
  903. package/dashboard/.next/standalone/node_modules/next/dist/server/request/root-params.js +146 -0
  904. package/dashboard/.next/standalone/node_modules/next/dist/server/request/search-params.js +505 -0
  905. package/dashboard/.next/standalone/node_modules/next/dist/server/request/utils.js +77 -0
  906. package/dashboard/.next/standalone/node_modules/next/dist/server/request-meta.js +55 -0
  907. package/dashboard/.next/standalone/node_modules/next/dist/server/require-hook.js +82 -0
  908. package/dashboard/.next/standalone/node_modules/next/dist/server/require.js +109 -0
  909. package/dashboard/.next/standalone/node_modules/next/dist/server/response-cache/index.js +361 -0
  910. package/dashboard/.next/standalone/node_modules/next/dist/server/response-cache/types.js +41 -0
  911. package/dashboard/.next/standalone/node_modules/next/dist/server/response-cache/utils.js +100 -0
  912. package/dashboard/.next/standalone/node_modules/next/dist/server/response-cache/web.js +104 -0
  913. package/dashboard/.next/standalone/node_modules/next/dist/server/resume-data-cache/cache-store.js +119 -0
  914. package/dashboard/.next/standalone/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +144 -0
  915. package/dashboard/.next/standalone/node_modules/next/dist/server/revalidation-utils.js +158 -0
  916. package/dashboard/.next/standalone/node_modules/next/dist/server/route-definitions/app-page-route-definition.js +16 -0
  917. package/dashboard/.next/standalone/node_modules/next/dist/server/route-definitions/app-route-route-definition.js +6 -0
  918. package/dashboard/.next/standalone/node_modules/next/dist/server/route-definitions/locale-route-definition.js +6 -0
  919. package/dashboard/.next/standalone/node_modules/next/dist/server/route-definitions/pages-api-route-definition.js +6 -0
  920. package/dashboard/.next/standalone/node_modules/next/dist/server/route-definitions/pages-route-definition.js +6 -0
  921. package/dashboard/.next/standalone/node_modules/next/dist/server/route-definitions/route-definition.js +6 -0
  922. package/dashboard/.next/standalone/node_modules/next/dist/server/route-kind.js +32 -0
  923. package/dashboard/.next/standalone/node_modules/next/dist/server/route-matches/app-page-route-match.js +6 -0
  924. package/dashboard/.next/standalone/node_modules/next/dist/server/route-matches/app-route-route-match.js +6 -0
  925. package/dashboard/.next/standalone/node_modules/next/dist/server/route-matches/locale-route-match.js +6 -0
  926. package/dashboard/.next/standalone/node_modules/next/dist/server/route-matches/pages-api-route-match.js +16 -0
  927. package/dashboard/.next/standalone/node_modules/next/dist/server/route-matches/pages-route-match.js +6 -0
  928. package/dashboard/.next/standalone/node_modules/next/dist/server/route-matches/route-match.js +6 -0
  929. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/dev-render-context.js +23 -0
  930. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +52 -0
  931. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.compiled.js +36 -0
  932. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.js +188 -0
  933. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/module.render.js +39 -0
  934. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/normalize-request-url.js +62 -0
  935. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/parse-request-headers.js +58 -0
  936. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js +4 -0
  937. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js +87 -0
  938. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js +4 -0
  939. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js +4 -0
  940. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js +4 -0
  941. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js +4 -0
  942. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js +4 -0
  943. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +136 -0
  944. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime.js +4 -0
  945. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js +4 -0
  946. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js +4 -0
  947. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js +4 -0
  948. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js +4 -0
  949. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js +4 -0
  950. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js +4 -0
  951. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static.js +4 -0
  952. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react.js +4 -0
  953. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +121 -0
  954. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime.js +4 -0
  955. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom-server.js +4 -0
  956. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js +4 -0
  957. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js +4 -0
  958. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js +4 -0
  959. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js +4 -0
  960. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client.js +4 -0
  961. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js +4 -0
  962. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +81 -0
  963. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/clean-url.js +24 -0
  964. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/get-pathname-from-absolute-path.js +29 -0
  965. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/is-static-gen-enabled.js +15 -0
  966. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/helpers/parsed-url-query-to-params.js +20 -0
  967. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.compiled.js +36 -0
  968. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/module.js +915 -0
  969. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/app-route/shared-modules.js +56 -0
  970. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/checks.js +45 -0
  971. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/builtin/_error.js +100 -0
  972. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.compiled.js +20 -0
  973. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.js +92 -0
  974. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/module.render.js +20 -0
  975. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/pages-handler.js +582 -0
  976. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js +4 -0
  977. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js +102 -0
  978. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js +4 -0
  979. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js +4 -0
  980. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js +4 -0
  981. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js +4 -0
  982. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js +4 -0
  983. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js +4 -0
  984. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js +4 -0
  985. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js +4 -0
  986. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages-api/module.compiled.js +20 -0
  987. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/pages-api/module.js +54 -0
  988. package/dashboard/.next/standalone/node_modules/next/dist/server/route-modules/route-module.js +777 -0
  989. package/dashboard/.next/standalone/node_modules/next/dist/server/runtime-reacts.external.js +46 -0
  990. package/dashboard/.next/standalone/node_modules/next/dist/server/send-payload.js +88 -0
  991. package/dashboard/.next/standalone/node_modules/next/dist/server/send-response.js +70 -0
  992. package/dashboard/.next/standalone/node_modules/next/dist/server/serve-static.js +62 -0
  993. package/dashboard/.next/standalone/node_modules/next/dist/server/server-route-utils.js +30 -0
  994. package/dashboard/.next/standalone/node_modules/next/dist/server/server-utils.js +340 -0
  995. package/dashboard/.next/standalone/node_modules/next/dist/server/setup-http-agent-env.js +27 -0
  996. package/dashboard/.next/standalone/node_modules/next/dist/server/stream-utils/encoded-tags.js +122 -0
  997. package/dashboard/.next/standalone/node_modules/next/dist/server/stream-utils/node-buffered-transform-stream.js +51 -0
  998. package/dashboard/.next/standalone/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +935 -0
  999. package/dashboard/.next/standalone/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +74 -0
  1000. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/constant.js +100 -0
  1001. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/index.js +199 -0
  1002. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/client-boundary.js +100 -0
  1003. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/config.js +561 -0
  1004. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/entry.js +149 -0
  1005. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/error.js +38 -0
  1006. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/metadata.js +234 -0
  1007. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/server-boundary.js +115 -0
  1008. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/rules/server.js +79 -0
  1009. package/dashboard/.next/standalone/node_modules/next/dist/server/typescript/utils.js +212 -0
  1010. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/cache-life-profile.js +60 -0
  1011. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/cache-life.js +79 -0
  1012. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/cache-tag.js +46 -0
  1013. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/clone-cache-entry.js +28 -0
  1014. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/constants.js +40 -0
  1015. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/handlers.js +265 -0
  1016. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/tiered-cache-handler.js +147 -0
  1017. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-errors.js +58 -0
  1018. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-messages.js +190 -0
  1019. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-probe-globals.js +39 -0
  1020. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-probe-scheduler.js +117 -0
  1021. package/dashboard/.next/standalone/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +2689 -0
  1022. package/dashboard/.next/standalone/node_modules/next/dist/server/utils.js +73 -0
  1023. package/dashboard/.next/standalone/node_modules/next/dist/server/web/adapter.js +466 -0
  1024. package/dashboard/.next/standalone/node_modules/next/dist/server/web/edge-route-module-wrapper.js +135 -0
  1025. package/dashboard/.next/standalone/node_modules/next/dist/server/web/error.js +54 -0
  1026. package/dashboard/.next/standalone/node_modules/next/dist/server/web/exports/index.js +56 -0
  1027. package/dashboard/.next/standalone/node_modules/next/dist/server/web/forward-trace-context.js +102 -0
  1028. package/dashboard/.next/standalone/node_modules/next/dist/server/web/get-edge-preview-props.js +23 -0
  1029. package/dashboard/.next/standalone/node_modules/next/dist/server/web/globals.js +116 -0
  1030. package/dashboard/.next/standalone/node_modules/next/dist/server/web/http.js +39 -0
  1031. package/dashboard/.next/standalone/node_modules/next/dist/server/web/internal-edge-wait-until.js +64 -0
  1032. package/dashboard/.next/standalone/node_modules/next/dist/server/web/next-url.js +195 -0
  1033. package/dashboard/.next/standalone/node_modules/next/dist/server/web/sandbox/context.js +444 -0
  1034. package/dashboard/.next/standalone/node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js +35 -0
  1035. package/dashboard/.next/standalone/node_modules/next/dist/server/web/sandbox/index.js +28 -0
  1036. package/dashboard/.next/standalone/node_modules/next/dist/server/web/sandbox/resource-managers.js +123 -0
  1037. package/dashboard/.next/standalone/node_modules/next/dist/server/web/sandbox/sandbox.js +133 -0
  1038. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +288 -0
  1039. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +138 -0
  1040. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js +30 -0
  1041. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +221 -0
  1042. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/cookies.js +29 -0
  1043. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/fetch-event.js +90 -0
  1044. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/image-response.js +18 -0
  1045. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/request.js +99 -0
  1046. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/response.js +128 -0
  1047. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/revalidate.js +188 -0
  1048. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +299 -0
  1049. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +50 -0
  1050. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/url-pattern.js +13 -0
  1051. package/dashboard/.next/standalone/node_modules/next/dist/server/web/spec-extension/user-agent.js +46 -0
  1052. package/dashboard/.next/standalone/node_modules/next/dist/server/web/types.js +6 -0
  1053. package/dashboard/.next/standalone/node_modules/next/dist/server/web/utils.js +147 -0
  1054. package/dashboard/.next/standalone/node_modules/next/dist/server/web/web-on-close.js +79 -0
  1055. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  1056. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +50 -0
  1057. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/app-router-types.js +169 -0
  1058. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/constants.js +458 -0
  1059. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/deep-freeze.js +30 -0
  1060. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/deployment-id.js +63 -0
  1061. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/dset.js +34 -0
  1062. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/encode-uri-path.js +15 -0
  1063. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/entry-constants.js +36 -0
  1064. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/error-source.js +36 -0
  1065. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/errors/code-frame.js +21 -0
  1066. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/errors/constants.js +19 -0
  1067. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +27 -0
  1068. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/errors/ensure-static-gsp-errors.js +30 -0
  1069. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +20 -0
  1070. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/escape-regexp.js +22 -0
  1071. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/get-hostname.js +23 -0
  1072. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/hash.js +42 -0
  1073. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +18 -0
  1074. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/head.js +164 -0
  1075. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +60 -0
  1076. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +36 -0
  1077. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/htmlescape.js +52 -0
  1078. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +25 -0
  1079. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/i18n/get-locale-redirect.js +59 -0
  1080. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +54 -0
  1081. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/image-blur-svg.js +22 -0
  1082. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +19 -0
  1083. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/image-config.js +128 -0
  1084. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/instant-messages.js +35 -0
  1085. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/invariant-error.js +18 -0
  1086. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/is-plain-object.js +42 -0
  1087. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/is-thenable.js +20 -0
  1088. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/isomorphic/path.js +14 -0
  1089. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +37 -0
  1090. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/lazy-dynamic/react-browser-bailout.js +45 -0
  1091. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js +19 -0
  1092. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/loadable.shared-runtime.js +246 -0
  1093. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/magic-identifier.js +198 -0
  1094. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/match-local-pattern.js +46 -0
  1095. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/match-remote-pattern.js +59 -0
  1096. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/modern-browserslist-target.js +15 -0
  1097. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/no-fallback-error.external.js +18 -0
  1098. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/normalized-asset-prefix.js +28 -0
  1099. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js +26 -0
  1100. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +18 -0
  1101. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +18 -0
  1102. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/get-page-paths.js +40 -0
  1103. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/normalize-data-path.js +23 -0
  1104. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/normalize-page-path.js +26 -0
  1105. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +19 -0
  1106. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js +20 -0
  1107. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/promise-with-resolvers.js +26 -0
  1108. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/request-insights.js +30 -0
  1109. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/adapters.js +139 -0
  1110. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/routes/app.js +146 -0
  1111. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/add-locale.js +28 -0
  1112. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +20 -0
  1113. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +20 -0
  1114. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/app-paths.js +84 -0
  1115. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js +17 -0
  1116. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +70 -0
  1117. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +16 -0
  1118. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +27 -0
  1119. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/format-url.js +111 -0
  1120. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +166 -0
  1121. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
  1122. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js +25 -0
  1123. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +90 -0
  1124. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/html-bots.js +17 -0
  1125. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/index.js +30 -0
  1126. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  1127. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +151 -0
  1128. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/is-bot.js +57 -0
  1129. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
  1130. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js +31 -0
  1131. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +30 -0
  1132. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-path.js +33 -0
  1133. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +39 -0
  1134. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/parse-url.js +38 -0
  1135. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +20 -0
  1136. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/path-match.js +49 -0
  1137. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +289 -0
  1138. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/querystring.js +110 -0
  1139. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/relativize-url.js +40 -0
  1140. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +39 -0
  1141. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +22 -0
  1142. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +112 -0
  1143. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +113 -0
  1144. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +41 -0
  1145. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/route-regex.js +256 -0
  1146. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +200 -0
  1147. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +18 -0
  1148. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/rsc-transport.js +108 -0
  1149. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +86 -0
  1150. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +87 -0
  1151. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/segment.js +90 -0
  1152. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +35 -0
  1153. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/server-reference-info.js +68 -0
  1154. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/side-effect.js +63 -0
  1155. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/size-limit.js +40 -0
  1156. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/turbopack/internal-error.js +48 -0
  1157. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/utils/reflect-utils.js +69 -0
  1158. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/utils/warn-once.js +22 -0
  1159. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/utils.js +207 -0
  1160. package/dashboard/.next/standalone/node_modules/next/dist/shared/lib/zod.js +97 -0
  1161. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/agent-name.js +20 -0
  1162. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/anonymous-meta.js +91 -0
  1163. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/detached-flush.js +49 -0
  1164. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/events/build.js +186 -0
  1165. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/events/index.js +41 -0
  1166. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/events/plugins.js +51 -0
  1167. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/events/swc-load-failure.js +55 -0
  1168. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/events/version.js +68 -0
  1169. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/flush-telemetry.js +19 -0
  1170. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/post-telemetry-payload.js +44 -0
  1171. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/project-id.js +48 -0
  1172. package/dashboard/.next/standalone/node_modules/next/dist/telemetry/storage.js +317 -0
  1173. package/dashboard/.next/standalone/node_modules/next/dist/trace/index.js +58 -0
  1174. package/dashboard/.next/standalone/node_modules/next/dist/trace/report/index.js +40 -0
  1175. package/dashboard/.next/standalone/node_modules/next/dist/trace/report/to-json-build.js +42 -0
  1176. package/dashboard/.next/standalone/node_modules/next/dist/trace/report/to-json.js +215 -0
  1177. package/dashboard/.next/standalone/node_modules/next/dist/trace/report/to-telemetry.js +36 -0
  1178. package/dashboard/.next/standalone/node_modules/next/dist/trace/shared.js +39 -0
  1179. package/dashboard/.next/standalone/node_modules/next/dist/trace/trace.js +216 -0
  1180. package/dashboard/.next/standalone/node_modules/next/package.json +140 -0
  1181. package/dashboard/.next/standalone/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  1182. package/dashboard/.next/standalone/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  1183. package/dashboard/.next/standalone/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  1184. package/dashboard/.next/standalone/node_modules/react/cjs/react.production.js +565 -0
  1185. package/dashboard/.next/standalone/node_modules/react/compiler-runtime.js +14 -0
  1186. package/dashboard/.next/standalone/node_modules/react/index.js +7 -0
  1187. package/dashboard/.next/standalone/node_modules/react/jsx-dev-runtime.js +7 -0
  1188. package/dashboard/.next/standalone/node_modules/react/jsx-runtime.js +7 -0
  1189. package/dashboard/.next/standalone/node_modules/react/package.json +51 -0
  1190. package/dashboard/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +6978 -0
  1191. package/dashboard/.next/standalone/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +7072 -0
  1192. package/dashboard/.next/standalone/node_modules/react-dom/cjs/react-dom-server.browser.production.js +7846 -0
  1193. package/dashboard/.next/standalone/node_modules/react-dom/cjs/react-dom-server.edge.production.js +7955 -0
  1194. package/dashboard/.next/standalone/node_modules/react-dom/cjs/react-dom-server.node.production.js +8134 -0
  1195. package/dashboard/.next/standalone/node_modules/react-dom/cjs/react-dom.production.js +229 -0
  1196. package/dashboard/.next/standalone/node_modules/react-dom/index.js +38 -0
  1197. package/dashboard/.next/standalone/node_modules/react-dom/package.json +117 -0
  1198. package/dashboard/.next/standalone/node_modules/react-dom/server.browser.js +16 -0
  1199. package/dashboard/.next/standalone/node_modules/react-dom/server.edge.js +17 -0
  1200. package/dashboard/.next/standalone/node_modules/react-dom/server.node.js +18 -0
  1201. package/dashboard/.next/standalone/node_modules/react-dom/static.node.js +14 -0
  1202. package/dashboard/.next/standalone/node_modules/semver/classes/comparator.js +143 -0
  1203. package/dashboard/.next/standalone/node_modules/semver/classes/range.js +577 -0
  1204. package/dashboard/.next/standalone/node_modules/semver/classes/semver.js +350 -0
  1205. package/dashboard/.next/standalone/node_modules/semver/functions/clean.js +8 -0
  1206. package/dashboard/.next/standalone/node_modules/semver/functions/cmp.js +54 -0
  1207. package/dashboard/.next/standalone/node_modules/semver/functions/coerce.js +62 -0
  1208. package/dashboard/.next/standalone/node_modules/semver/functions/compare-build.js +9 -0
  1209. package/dashboard/.next/standalone/node_modules/semver/functions/compare-loose.js +5 -0
  1210. package/dashboard/.next/standalone/node_modules/semver/functions/compare.js +7 -0
  1211. package/dashboard/.next/standalone/node_modules/semver/functions/diff.js +60 -0
  1212. package/dashboard/.next/standalone/node_modules/semver/functions/eq.js +5 -0
  1213. package/dashboard/.next/standalone/node_modules/semver/functions/gt.js +5 -0
  1214. package/dashboard/.next/standalone/node_modules/semver/functions/gte.js +5 -0
  1215. package/dashboard/.next/standalone/node_modules/semver/functions/inc.js +21 -0
  1216. package/dashboard/.next/standalone/node_modules/semver/functions/lt.js +5 -0
  1217. package/dashboard/.next/standalone/node_modules/semver/functions/lte.js +5 -0
  1218. package/dashboard/.next/standalone/node_modules/semver/functions/major.js +5 -0
  1219. package/dashboard/.next/standalone/node_modules/semver/functions/minor.js +5 -0
  1220. package/dashboard/.next/standalone/node_modules/semver/functions/neq.js +5 -0
  1221. package/dashboard/.next/standalone/node_modules/semver/functions/parse.js +18 -0
  1222. package/dashboard/.next/standalone/node_modules/semver/functions/patch.js +5 -0
  1223. package/dashboard/.next/standalone/node_modules/semver/functions/prerelease.js +8 -0
  1224. package/dashboard/.next/standalone/node_modules/semver/functions/rcompare.js +5 -0
  1225. package/dashboard/.next/standalone/node_modules/semver/functions/rsort.js +5 -0
  1226. package/dashboard/.next/standalone/node_modules/semver/functions/satisfies.js +12 -0
  1227. package/dashboard/.next/standalone/node_modules/semver/functions/sort.js +5 -0
  1228. package/dashboard/.next/standalone/node_modules/semver/functions/truncate.js +48 -0
  1229. package/dashboard/.next/standalone/node_modules/semver/functions/valid.js +8 -0
  1230. package/dashboard/.next/standalone/node_modules/semver/index.js +93 -0
  1231. package/dashboard/.next/standalone/node_modules/semver/internal/constants.js +37 -0
  1232. package/dashboard/.next/standalone/node_modules/semver/internal/debug.js +11 -0
  1233. package/dashboard/.next/standalone/node_modules/semver/internal/identifiers.js +29 -0
  1234. package/dashboard/.next/standalone/node_modules/semver/internal/lrucache.js +42 -0
  1235. package/dashboard/.next/standalone/node_modules/semver/internal/parse-options.js +17 -0
  1236. package/dashboard/.next/standalone/node_modules/semver/internal/re.js +223 -0
  1237. package/dashboard/.next/standalone/node_modules/semver/package.json +78 -0
  1238. package/dashboard/.next/standalone/node_modules/semver/ranges/gtr.js +6 -0
  1239. package/dashboard/.next/standalone/node_modules/semver/ranges/intersects.js +9 -0
  1240. package/dashboard/.next/standalone/node_modules/semver/ranges/ltr.js +6 -0
  1241. package/dashboard/.next/standalone/node_modules/semver/ranges/max-satisfying.js +27 -0
  1242. package/dashboard/.next/standalone/node_modules/semver/ranges/min-satisfying.js +26 -0
  1243. package/dashboard/.next/standalone/node_modules/semver/ranges/min-version.js +63 -0
  1244. package/dashboard/.next/standalone/node_modules/semver/ranges/outside.js +82 -0
  1245. package/dashboard/.next/standalone/node_modules/semver/ranges/simplify.js +49 -0
  1246. package/dashboard/.next/standalone/node_modules/semver/ranges/subset.js +249 -0
  1247. package/dashboard/.next/standalone/node_modules/semver/ranges/to-comparators.js +10 -0
  1248. package/dashboard/.next/standalone/node_modules/semver/ranges/valid.js +13 -0
  1249. package/dashboard/.next/standalone/node_modules/styled-jsx/dist/index/index.js +499 -0
  1250. package/dashboard/.next/standalone/node_modules/styled-jsx/index.js +1 -0
  1251. package/dashboard/.next/standalone/node_modules/styled-jsx/package.json +132 -0
  1252. package/dashboard/.next/standalone/node_modules/styled-jsx/style.js +1 -0
  1253. package/dashboard/.next/standalone/package.json +1 -0
  1254. package/dist/adapters/claude-code.js +351 -0
  1255. package/dist/adapters/codex.js +565 -0
  1256. package/dist/adapters/eve.js +173 -0
  1257. package/dist/checks.js +142 -0
  1258. package/dist/cli.js +471 -0
  1259. package/dist/collector.js +180 -0
  1260. package/dist/db.js +171 -0
  1261. package/dist/fingerprint.js +57 -0
  1262. package/dist/pricing-snapshot.json +886 -0
  1263. package/dist/pricing.js +70 -0
  1264. package/dist/profiles.js +84 -0
  1265. package/dist/queries.js +352 -0
  1266. package/dist/setup.js +264 -0
  1267. package/dist/types.js +3 -0
  1268. package/dist/update.js +50 -0
  1269. package/dist/util.js +107 -0
  1270. package/package.json +53 -4
  1271. package/skills/summarize-run/SKILL.md +22 -0
  1272. package/skills/unharness/SKILL.md +18 -0
  1273. package/src/adapters/claude-code.ts +352 -0
  1274. package/src/adapters/codex.ts +488 -0
  1275. package/src/adapters/eve.ts +180 -0
  1276. package/src/checks.ts +134 -0
  1277. package/src/cli.ts +439 -0
  1278. package/src/collector.ts +178 -0
  1279. package/src/db.ts +182 -0
  1280. package/src/fingerprint.ts +60 -0
  1281. package/src/pricing-snapshot.json +886 -0
  1282. package/src/pricing.ts +83 -0
  1283. package/src/profiles.ts +92 -0
  1284. package/src/queries.ts +422 -0
  1285. package/src/setup.ts +255 -0
  1286. package/src/types.ts +153 -0
  1287. package/src/update.ts +44 -0
  1288. package/src/util.ts +105 -0
@@ -0,0 +1,2689 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "cache", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return cache;
9
+ }
10
+ });
11
+ const _server = require("react-server-dom-webpack/server");
12
+ const _client = require("react-server-dom-webpack/client");
13
+ const _static = require("react-server-dom-webpack/static");
14
+ const _workasyncstorageexternal = require("../app-render/work-async-storage.external");
15
+ const _workunitasyncstorageexternal = require("../app-render/work-unit-async-storage.external");
16
+ const _varyparams = require("../app-render/vary-params");
17
+ const _dynamicrenderingutils = require("../dynamic-rendering-utils");
18
+ const _manifestssingleton = require("../app-render/manifests-singleton");
19
+ const _encryption = require("../app-render/encryption");
20
+ const _invarianterror = require("../../shared/lib/invariant-error");
21
+ const _createerrorhandler = require("../app-render/create-error-handler");
22
+ const _stringhash = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/string-hash"));
23
+ const _constants = require("./constants");
24
+ const _constants1 = require("../../lib/constants");
25
+ const _handlers = require("./handlers");
26
+ const _clonecacheentry = require("./clone-cache-entry");
27
+ const _approuterheaders = require("../../client/components/app-router-headers");
28
+ const _requestcookies = require("../web/spec-extension/adapters/request-cookies");
29
+ const _headers = require("../web/spec-extension/adapters/headers");
30
+ const _usecacheerrors = require("./use-cache-errors");
31
+ const _usecachemessages = require("./use-cache-messages");
32
+ const _dynamicrendering = require("../app-render/dynamic-rendering");
33
+ const _searchparams = require("../request/search-params");
34
+ const _cachestore = require("../resume-data-cache/cache-store");
35
+ const _lazyresult = require("../lib/lazy-result");
36
+ const _dynamicaccessasyncstorageexternal = require("../app-render/dynamic-access-async-storage.external");
37
+ const _stagedrendering = require("../app-render/staged-rendering");
38
+ const _log = /*#__PURE__*/ _interop_require_wildcard(require("../../build/output/log"));
39
+ const _runtimereactsexternal = require("../runtime-reacts.external");
40
+ const _promisewithresolvers = require("../../shared/lib/promise-with-resolvers");
41
+ function _interop_require_default(obj) {
42
+ return obj && obj.__esModule ? obj : {
43
+ default: obj
44
+ };
45
+ }
46
+ function _getRequireWildcardCache(nodeInterop) {
47
+ if (typeof WeakMap !== "function") return null;
48
+ var cacheBabelInterop = new WeakMap();
49
+ var cacheNodeInterop = new WeakMap();
50
+ return (_getRequireWildcardCache = function(nodeInterop) {
51
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
52
+ })(nodeInterop);
53
+ }
54
+ function _interop_require_wildcard(obj, nodeInterop) {
55
+ if (!nodeInterop && obj && obj.__esModule) {
56
+ return obj;
57
+ }
58
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
59
+ return {
60
+ default: obj
61
+ };
62
+ }
63
+ var cache = _getRequireWildcardCache(nodeInterop);
64
+ if (cache && cache.has(obj)) {
65
+ return cache.get(obj);
66
+ }
67
+ var newObj = {
68
+ __proto__: null
69
+ };
70
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
71
+ for(var key in obj){
72
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
73
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
74
+ if (desc && (desc.get || desc.set)) {
75
+ Object.defineProperty(newObj, key, desc);
76
+ } else {
77
+ newObj[key] = obj[key];
78
+ }
79
+ }
80
+ }
81
+ newObj.default = obj;
82
+ if (cache) {
83
+ cache.set(obj, newObj);
84
+ }
85
+ return newObj;
86
+ }
87
+ const nextVersion = "16.4.3";
88
+ /**
89
+ * Encapsulates a pending cache invocation for deduping. Manages lazy stream
90
+ * tee-ing (via fork()) and metadata access for both intra-request and
91
+ * cross-request joiners.
92
+ */ class SharedCacheEntry {
93
+ constructor(stream, pendingMetadata, pendingWrite){
94
+ this.stream = stream;
95
+ this.pendingMetadata = pendingMetadata;
96
+ this.pendingCompletion = pendingWrite === undefined ? pendingMetadata : pendingWrite.then(()=>pendingMetadata, ()=>pendingMetadata);
97
+ }
98
+ /**
99
+ * Tee the stream: returns a copy for the caller, replaces the internal stream
100
+ * with the remaining branch for future callers. Both the leader and joiners
101
+ * call this — everyone gets a fork.
102
+ */ fork() {
103
+ const [forked, remaining] = this.stream.tee();
104
+ this.stream = remaining;
105
+ return forked;
106
+ }
107
+ }
108
+ function ignoreReject() {}
109
+ /**
110
+ * Manages the deferred promise for a shared cache result, tracks which maps
111
+ * it's registered in, and drives cleanup from resolve/reject.
112
+ *
113
+ * Cached results stay in the maps until collection finishes and handler writes
114
+ * settle. Later invocations can join while either remains pending. For
115
+ * 'prerender-dynamic' and errors, cleanup is immediate.
116
+ */ class ResolvableSharedCacheResult {
117
+ registerIn(map, key, retentionMap) {
118
+ map.set(key, this.deferred.promise);
119
+ this.registrations.push({
120
+ map,
121
+ key,
122
+ retentionMap
123
+ });
124
+ }
125
+ resolve(result) {
126
+ this.deferred.resolve(result);
127
+ if (result.type === 'cached') {
128
+ // Retain only an entry that collected successfully. A failed collection
129
+ // leaves metadata a later invocation cannot read, so it is dropped like
130
+ // any other failure and the next invocation regenerates.
131
+ result.entry.pendingCompletion.then(()=>this.cleanupAndRetain(), ()=>this.cleanup());
132
+ } else {
133
+ this.cleanup();
134
+ }
135
+ }
136
+ reject(error) {
137
+ // The promise stored in the dedup maps has no consumer unless a concurrent
138
+ // invocation joined it, so we attach a noop catch handler to prevent the
139
+ // rejection from being reported as unhandled. The leader rethrows the
140
+ // error into the render, which is where it's surfaced.
141
+ this.deferred.promise.catch(ignoreReject);
142
+ this.deferred.reject(error);
143
+ this.cleanup();
144
+ }
145
+ /**
146
+ * Drops the pending registrations, leaving nothing for a later invocation to
147
+ * join. Used when the invocation produced no entry that a later one could
148
+ * serve: an error has no value, and a 'prerender-dynamic' result is a hanging
149
+ * promise bound to the leader's render signal.
150
+ */ cleanup() {
151
+ for (const { map, key } of this.registrations){
152
+ map.delete(key);
153
+ }
154
+ }
155
+ /**
156
+ * Drops the pending registrations and moves the entry into the retention map
157
+ * where one was given, so a later invocation in the same request can reuse it
158
+ * instead of repeating the lookup and, on a miss, the work.
159
+ */ cleanupAndRetain() {
160
+ for (const { map, key, retentionMap } of this.registrations){
161
+ map.delete(key);
162
+ retentionMap == null ? void 0 : retentionMap.set(key, this.deferred.promise);
163
+ }
164
+ }
165
+ constructor(){
166
+ this.deferred = (0, _promisewithresolvers.createPromiseWithResolvers)();
167
+ this.registrations = [];
168
+ }
169
+ }
170
+ /**
171
+ * Module-scope map for cross-request deduplication. Keyed by `cacheHandlerKey`
172
+ * (specific key on warm path, coarse key on cold path). Entries live only for
173
+ * the duration of the leader's invocation.
174
+ */ const crossRequestPendingCacheInvocations = new Map();
175
+ // Prevent duplicate background revalidations for the same key until generation
176
+ // and cache writes finish.
177
+ const backgroundRevalidations = new Map();
178
+ // The first argument at each call site is the full directive that produced
179
+ // the invocation, e.g. "'use cache'" or "'use cache: remote'".
180
+ const debug = process.env.NEXT_PRIVATE_DEBUG_CACHE ? console.debug.bind(console) : undefined;
181
+ const filterStackFrame = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').filterStackFrameDEV : undefined;
182
+ const findSourceMapURL = process.env.NODE_ENV !== 'production' ? require('../lib/source-maps').findSourceMapURLDEV : undefined;
183
+ // Tracks which root params each cache function has historically read. Used to
184
+ // compute the specific cache key upfront on subsequent invocations. In-memory
185
+ // only — after server restart, the coarse-key redirect entry in the cache
186
+ // handler provides fallback.
187
+ const knownRootParamsByFunctionId = new Map();
188
+ function addKnownRootParamNames(id, names) {
189
+ const existing = knownRootParamsByFunctionId.get(id);
190
+ if (existing) {
191
+ for (const name of names){
192
+ existing.add(name);
193
+ }
194
+ return existing;
195
+ }
196
+ const created = new Set(names);
197
+ knownRootParamsByFunctionId.set(id, created);
198
+ return created;
199
+ }
200
+ function computeRootParamsCacheKeySuffix(rootParams, paramNames) {
201
+ if (paramNames.size === 0) {
202
+ return '';
203
+ }
204
+ return JSON.stringify([
205
+ ...paramNames
206
+ ].sort().map((paramName)=>[
207
+ paramName,
208
+ rootParams[paramName]
209
+ ]));
210
+ }
211
+ // Next-internal cookies that must not vary the private cache key, since they're
212
+ // not part of the application's own cookie state. The instant-navigation cookie
213
+ // toggles while a navigation lock is held, so including it would force spurious
214
+ // misses.
215
+ const COOKIES_EXCLUDED_FROM_PRIVATE_CACHE_KEY = new Set([
216
+ _approuterheaders.NEXT_INSTANT_TEST_COOKIE
217
+ ]);
218
+ // Request and transport headers that must not vary the private cache key. They
219
+ // either differ between otherwise-equivalent requests, which would cause
220
+ // spurious misses (a browser reload adds `cache-control`/`pragma` that an
221
+ // initial navigation doesn't, and `accept`/`sec-fetch-*` differ between an HTML
222
+ // navigation and an RSC or prefetch request for the same page), or are
223
+ // connection- and proxy-level rather than application data. The `cookie` header
224
+ // is excluded because cookies are keyed separately below (via the dedicated
225
+ // cookie path, which applies `COOKIES_EXCLUDED_FROM_PRIVATE_CACHE_KEY`);
226
+ // including the raw header would duplicate them and reintroduce the cookies
227
+ // that path excludes. Header names are lowercased by `HeadersAdapter`, so every
228
+ // entry here is lowercase.
229
+ const HEADERS_EXCLUDED_FROM_PRIVATE_CACHE_KEY = new Set([
230
+ 'accept',
231
+ 'accept-encoding',
232
+ 'cache-control',
233
+ 'connection',
234
+ 'cookie',
235
+ 'if-match',
236
+ 'if-modified-since',
237
+ 'if-none-match',
238
+ 'if-range',
239
+ 'if-unmodified-since',
240
+ 'keep-alive',
241
+ 'pragma',
242
+ 'priority',
243
+ 'purpose',
244
+ 'range',
245
+ 'sec-fetch-dest',
246
+ 'sec-fetch-mode',
247
+ 'sec-fetch-site',
248
+ 'sec-fetch-user',
249
+ 'sec-purpose',
250
+ 'te',
251
+ 'upgrade',
252
+ 'upgrade-insecure-requests',
253
+ 'x-forwarded-for',
254
+ 'x-forwarded-host',
255
+ 'x-forwarded-port',
256
+ 'x-forwarded-proto'
257
+ ]);
258
+ // TODO: This varies the dev private cache key by the request's cookies and
259
+ // headers (minus the transport and content-negotiation headers excluded above).
260
+ // It's a heuristic: it still over-keys (a cache that reads only one cookie or
261
+ // header varies by all of them) and the header denylist is necessarily
262
+ // incomplete. Follow up by tracking which cookies and headers a cache function
263
+ // actually reads (the same mechanism root params use via `readRootParamNames`)
264
+ // and keying by only those. Note that Next-internal flight headers such as
265
+ // `rsc` and `next-router-state-tree` are already stripped upstream in
266
+ // `getHeaders`, so they never appear here.
267
+ function computePrivateCacheKeyRequestSuffix(cookies, headers) {
268
+ const relevantCookies = cookies.getAll().filter((cookie)=>!COOKIES_EXCLUDED_FROM_PRIVATE_CACHE_KEY.has(cookie.name)).map((cookie)=>[
269
+ cookie.name,
270
+ cookie.value
271
+ ]).sort(([nameA], [nameB])=>nameA < nameB ? -1 : nameA > nameB ? 1 : 0);
272
+ const relevantHeaders = [
273
+ ...headers.entries()
274
+ ].filter(([name])=>!HEADERS_EXCLUDED_FROM_PRIVATE_CACHE_KEY.has(name)).sort(([nameA], [nameB])=>nameA < nameB ? -1 : nameA > nameB ? 1 : 0);
275
+ if (relevantCookies.length === 0 && relevantHeaders.length === 0) {
276
+ return '';
277
+ }
278
+ return JSON.stringify({
279
+ cookies: relevantCookies,
280
+ headers: relevantHeaders
281
+ });
282
+ }
283
+ function saveToResumeDataCache(resumeDataCache, serializedCacheKey, pendingCacheResult, logPrefix) {
284
+ if (!(resumeDataCache == null ? void 0 : resumeDataCache.mutable)) {
285
+ return pendingCacheResult;
286
+ }
287
+ const split = clonePendingCacheResult(pendingCacheResult);
288
+ const savedCacheResult = getNthCacheResult(split, 0);
289
+ const rdcResult = getNthCacheResult(split, 1);
290
+ // The RDC is per-page and root params are fixed within a page, so we always
291
+ // use the coarse key (without root param suffix). Unlike the cache handler,
292
+ // the RDC doesn't need root-param-specific keys for isolation.
293
+ resumeDataCache.cache.set(serializedCacheKey, rdcResult);
294
+ debug == null ? void 0 : debug(logPrefix, 'Resume Data Cache entry saved', serializedCacheKey);
295
+ return savedCacheResult;
296
+ }
297
+ /**
298
+ * A joiner's RDC context may differ from the leader's:
299
+ *
300
+ * - Intra-request: the leader was nested inside another cache (no accessible
301
+ * RDC) while this joiner is top-level and has one.
302
+ * - Cross-request: the leader belongs to a different request entirely — this
303
+ * request's RDC has never seen the entry.
304
+ *
305
+ * In both cases the joiner must save to its own RDC so its final prerender can
306
+ * resume from the entry. Constructs a `CollectedCacheResult` from a forked
307
+ * stream branch of the shared entry and the awaited metadata.
308
+ *
309
+ * An existing entry avoids redundant saves when the intra-request leader
310
+ * already saved to the same RDC. A marker, however, can be replaced by a
311
+ * successful fill.
312
+ */ function saveSharedCacheEntryToResumeDataCache(serializedCacheKey, sharedCacheEntry, resumeDataCache, logPrefix) {
313
+ if (!(resumeDataCache == null ? void 0 : resumeDataCache.mutable)) {
314
+ return;
315
+ }
316
+ const existingEntry = resumeDataCache.cache.get(serializedCacheKey);
317
+ if (existingEntry !== undefined && existingEntry !== _cachestore.FALLBACK_PARAMS && existingEntry !== _cachestore.RUNTIME_DATA && existingEntry !== _cachestore.SESSION_DATA) {
318
+ return;
319
+ }
320
+ const rdcResult = sharedCacheEntry.pendingMetadata.then((metadata)=>({
321
+ entry: {
322
+ value: sharedCacheEntry.fork(),
323
+ tags: metadata.tags,
324
+ revalidate: metadata.revalidate,
325
+ expire: metadata.expire,
326
+ stale: metadata.stale,
327
+ timestamp: metadata.timestamp
328
+ },
329
+ readRootParamNames: metadata.readRootParamNames,
330
+ hasExplicitRevalidate: metadata.hasExplicitRevalidate,
331
+ hasExplicitExpire: metadata.hasExplicitExpire,
332
+ dynamicNestedCacheError: metadata.dynamicNestedCacheError
333
+ }));
334
+ resumeDataCache.cache.set(serializedCacheKey, rdcResult);
335
+ debug == null ? void 0 : debug(logPrefix, 'Resume Data Cache entry saved by joiner', serializedCacheKey);
336
+ }
337
+ /**
338
+ * Completes a join onto another invocation's entry, whether that invocation is
339
+ * still filling or has already finished: forks the stream, saves to this
340
+ * invocation's RDC if the leader had none, and balances the cache signal read
341
+ * once the entry is fully collected.
342
+ */ function serveJoinedCacheEntry(sharedCacheEntry, serializedCacheKey, resumeDataCache, cacheContext, cacheSignal, logPrefix) {
343
+ const stream = sharedCacheEntry.fork();
344
+ // If the leader was nested inside another cache (no accessible RDC), it
345
+ // couldn't save to the RDC. This joiner may be top-level with an RDC, in
346
+ // which case it must save here; otherwise the RDC lookup during the final
347
+ // prerender will miss.
348
+ saveSharedCacheEntryToResumeDataCache(serializedCacheKey, sharedCacheEntry, resumeDataCache, logPrefix);
349
+ // End the cache read after collection and metadata propagation, not when the
350
+ // value stream becomes available. This does not wait for handler persistence.
351
+ // A failed collection or propagation must still end the read so it cannot
352
+ // stall prerendering. The catch prevents an unhandled rejection after the
353
+ // stream has been returned.
354
+ sharedCacheEntry.pendingMetadata.then((metadata)=>{
355
+ maybePropagateCacheEntryMetadata(cacheContext, metadata);
356
+ }).finally(()=>{
357
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
358
+ }).catch(ignoreReject);
359
+ return stream;
360
+ }
361
+ function saveToCacheHandler(cacheHandler, id, cacheHandlerKeyBase, savedCacheResult, rootParams) {
362
+ // Write the entry to the cache handler. With root params, this is a redirect
363
+ // entry at the coarse key plus the actual entry at the specific key;
364
+ // otherwise just the entry at the coarse key. Both set calls are fired
365
+ // together and awaited in parallel.
366
+ return savedCacheResult.then(async (collectedResult)=>{
367
+ const { entry: fullEntry, readRootParamNames } = collectedResult;
368
+ // Use the combined set (union of all historically observed reads) for both
369
+ // the specific key and the redirect entry's tags. The read path computes
370
+ // cacheHandlerKey from this same union (knownRootParamsByFunctionId), so
371
+ // the write path must use the identical set to land on the same specific
372
+ // key. If we used only the current invocation's reads, a function that
373
+ // conditionally reads different root params across invocations would
374
+ // scatter entries across different specific keys, making previous entries
375
+ // unreachable from the read path's union-based lookup.
376
+ const rootParamNames = readRootParamNames ? addKnownRootParamNames(id, readRootParamNames) : knownRootParamsByFunctionId.get(id);
377
+ const setPromises = [];
378
+ let coarseEntry = fullEntry;
379
+ if (rootParamNames && rootParamNames.size > 0 && rootParams) {
380
+ const specificKey = cacheHandlerKeyBase + computeRootParamsCacheKeySuffix(rootParams, rootParamNames);
381
+ setPromises.push(// Capture synchronous `set()` throws as rejected write promises.
382
+ new Promise((resolve)=>{
383
+ resolve(cacheHandler.set(specificKey, Promise.resolve(fullEntry)));
384
+ }));
385
+ // The coarse key gets a redirect entry instead. On a cold server (empty
386
+ // knownRootParamsByFunctionId), its tags tell a reader which root params
387
+ // to include in the specific-key lookup.
388
+ const rootParamTags = [
389
+ ...rootParamNames
390
+ ].map((paramName)=>_constants1.NEXT_CACHE_ROOT_PARAM_TAG_ID + paramName);
391
+ coarseEntry = {
392
+ value: new ReadableStream({
393
+ start (controller) {
394
+ // Single byte so the entry has non-zero size in LRU caches.
395
+ controller.enqueue(new Uint8Array([
396
+ 0
397
+ ]));
398
+ controller.close();
399
+ }
400
+ }),
401
+ tags: [
402
+ ...fullEntry.tags,
403
+ ...rootParamTags
404
+ ],
405
+ stale: fullEntry.stale,
406
+ timestamp: fullEntry.timestamp,
407
+ expire: fullEntry.expire,
408
+ revalidate: fullEntry.revalidate
409
+ };
410
+ }
411
+ setPromises.push(// Capture synchronous `set()` throws as rejected write promises.
412
+ new Promise((resolve)=>{
413
+ resolve(cacheHandler.set(cacheHandlerKeyBase, Promise.resolve(coarseEntry)));
414
+ }));
415
+ // A failed write must not finish the operation while another write is
416
+ // pending.
417
+ for (const result of (await Promise.allSettled(setPromises))){
418
+ if (result.status === 'rejected') {
419
+ throw result.reason;
420
+ }
421
+ }
422
+ });
423
+ }
424
+ function generateCacheEntry(workStore, cacheContext, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError) {
425
+ // We need to run this inside a clean AsyncLocalStorage snapshot so that the cache
426
+ // generation cannot read anything from the context we're currently executing which
427
+ // might include request specific things like cookies() inside a React.cache().
428
+ // Note: It is important that we await at least once before this because it lets us
429
+ // pop out of any stack specific contexts as well - aka "Sync" Local Storage.
430
+ return workStore.runInCleanSnapshot(generateCacheEntryWithRestoredWorkStore, workStore, cacheContext, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError);
431
+ }
432
+ function generateCacheEntryWithRestoredWorkStore(workStore, cacheContext, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError) {
433
+ // Since we cleared the AsyncLocalStorage we need to restore the workStore.
434
+ // Note: We explicitly don't restore the RequestStore nor the PrerenderStore.
435
+ // We don't want any request specific information leaking an we don't want to create a
436
+ // bloated fake request mock for every cache call. So any feature that currently lives
437
+ // in RequestStore but should be available to Caches need to move to WorkStore.
438
+ // PrerenderStore is not needed inside the cache scope because the outer most one will
439
+ // be the one to report its result to the outer Prerender.
440
+ return _workasyncstorageexternal.workAsyncStorage.run(workStore, generateCacheEntryWithCacheContext, workStore, cacheContext, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError);
441
+ }
442
+ function createUseCacheStore(workStore, cacheContext, defaultCacheLife) {
443
+ if (cacheContext.kind === 'private') {
444
+ const outerWorkUnitStore = cacheContext.outerWorkUnitStore;
445
+ return {
446
+ type: 'private-cache',
447
+ phase: 'render',
448
+ consumerWillServerCache: true,
449
+ implicitTags: outerWorkUnitStore == null ? void 0 : outerWorkUnitStore.implicitTags,
450
+ revalidate: defaultCacheLife.revalidate,
451
+ expire: defaultCacheLife.expire,
452
+ stale: defaultCacheLife.stale,
453
+ explicitRevalidate: undefined,
454
+ explicitExpire: undefined,
455
+ explicitStale: undefined,
456
+ tags: null,
457
+ hmrRefreshHash: (0, _workunitasyncstorageexternal.getHmrRefreshHash)(outerWorkUnitStore),
458
+ isHmrRefresh: (0, _workunitasyncstorageexternal.isHmrRefresh)(outerWorkUnitStore),
459
+ serverComponentsHmrCache: (0, _workunitasyncstorageexternal.getServerComponentsHmrCache)(outerWorkUnitStore),
460
+ forceRevalidate: shouldForceRevalidate(workStore, outerWorkUnitStore),
461
+ draftMode: (0, _workunitasyncstorageexternal.getDraftModeProviderForCacheScope)(workStore, outerWorkUnitStore),
462
+ rootParams: outerWorkUnitStore.rootParams,
463
+ readRootParamNames: new Set(),
464
+ // Every private cache scope is its own work unit. Any cache keyed on
465
+ // headers() or cookies() needs to be invalidated. Otherwise some
466
+ // Next.js API semantics leak across render passes.
467
+ headers: _headers.HeadersAdapter.fresh(outerWorkUnitStore.headers),
468
+ cookies: _requestcookies.RequestCookiesAdapter.fresh(outerWorkUnitStore.cookies),
469
+ outerOwnerStack: cacheContext.outerOwnerStack
470
+ };
471
+ } else {
472
+ let useCacheOrRequestStore;
473
+ const outerWorkUnitStore = cacheContext.outerWorkUnitStore;
474
+ switch(outerWorkUnitStore.type){
475
+ case 'cache':
476
+ case 'private-cache':
477
+ case 'request':
478
+ useCacheOrRequestStore = outerWorkUnitStore;
479
+ break;
480
+ case 'prerender-runtime':
481
+ case 'prerender':
482
+ case 'prerender-legacy':
483
+ case 'unstable-cache':
484
+ case 'build-time-generator':
485
+ break;
486
+ default:
487
+ outerWorkUnitStore;
488
+ }
489
+ let fallbackRootParamsPrerender = null;
490
+ if (outerWorkUnitStore.type === 'cache') {
491
+ fallbackRootParamsPrerender = outerWorkUnitStore.fallbackRootParamsPrerender;
492
+ } else if (outerWorkUnitStore.type === 'prerender') {
493
+ const { fallbackRouteParams } = outerWorkUnitStore;
494
+ if (fallbackRouteParams !== null && Object.keys(outerWorkUnitStore.rootParams).some((name)=>fallbackRouteParams.has(name))) {
495
+ fallbackRootParamsPrerender = outerWorkUnitStore;
496
+ }
497
+ }
498
+ return {
499
+ type: 'cache',
500
+ phase: 'render',
501
+ fallbackRootParamsPrerender,
502
+ consumerWillServerCache: true,
503
+ implicitTags: outerWorkUnitStore.implicitTags,
504
+ revalidate: defaultCacheLife.revalidate,
505
+ expire: defaultCacheLife.expire,
506
+ stale: defaultCacheLife.stale,
507
+ explicitRevalidate: undefined,
508
+ explicitExpire: undefined,
509
+ explicitStale: undefined,
510
+ tags: null,
511
+ hmrRefreshHash: (0, _workunitasyncstorageexternal.getHmrRefreshHash)(outerWorkUnitStore),
512
+ isHmrRefresh: (useCacheOrRequestStore == null ? void 0 : useCacheOrRequestStore.isHmrRefresh) ?? false,
513
+ serverComponentsHmrCache: useCacheOrRequestStore == null ? void 0 : useCacheOrRequestStore.serverComponentsHmrCache,
514
+ forceRevalidate: shouldForceRevalidate(workStore, outerWorkUnitStore),
515
+ draftMode: (0, _workunitasyncstorageexternal.getDraftModeProviderForCacheScope)(workStore, outerWorkUnitStore),
516
+ rootParams: outerWorkUnitStore.rootParams,
517
+ readRootParamNames: new Set(),
518
+ outerOwnerStack: cacheContext.outerOwnerStack,
519
+ dynamicNestedCacheError: undefined
520
+ };
521
+ }
522
+ }
523
+ /**
524
+ * Captures the owner stack from the outer component tree before entering a
525
+ * cache boundary. When nested inside another cache scope, the parent's
526
+ * outerOwnerStack is concatenated so that the full component tree is preserved
527
+ * across multiple cache boundaries.
528
+ */ function captureOuterOwnerStack(workUnitStore) {
529
+ var _getClientReact_captureOwnerStack, _getClientReact, _getServerReact_captureOwnerStack, _getServerReact;
530
+ const capturedOwnerStack = (((_getClientReact = (0, _runtimereactsexternal.getClientReact)()) == null ? void 0 : (_getClientReact_captureOwnerStack = _getClientReact.captureOwnerStack) == null ? void 0 : _getClientReact_captureOwnerStack.call(_getClientReact)) ?? ((_getServerReact = (0, _runtimereactsexternal.getServerReact)()) == null ? void 0 : (_getServerReact_captureOwnerStack = _getServerReact.captureOwnerStack) == null ? void 0 : _getServerReact_captureOwnerStack.call(_getServerReact))) || '';
531
+ let parentOuterOwnerStack;
532
+ switch(workUnitStore.type){
533
+ case 'cache':
534
+ case 'private-cache':
535
+ parentOuterOwnerStack = workUnitStore.outerOwnerStack;
536
+ break;
537
+ case 'unstable-cache':
538
+ case 'request':
539
+ case 'prerender':
540
+ case 'prerender-legacy':
541
+ case 'prerender-runtime':
542
+ case 'prerender-client':
543
+ case 'validation-client':
544
+ case 'build-time-generator':
545
+ break;
546
+ default:
547
+ workUnitStore;
548
+ }
549
+ return capturedOwnerStack + (parentOuterOwnerStack || '') || undefined;
550
+ }
551
+ // The maximum time we allow a `'use cache'` entry to fill. After this, we
552
+ // assume the fill is stalled — either on hanging input to the cached function,
553
+ // or on hanging I/O inside of it — and de-opt with an error.
554
+ //
555
+ // For prerender, the effective value is clamped to 90% of the configured
556
+ // `staticPageGenerationTimeout` so the cache-fill error surfaces before the
557
+ // build worker kills the page. In dev (`request`), the configured
558
+ // `experimental.useCacheTimeout` is used straight.
559
+ function getUseCacheFillTimeoutMs(workStore, workUnitStoreType) {
560
+ const { useCacheTimeout, staticPageGenerationTimeout } = workStore;
561
+ const effectiveTimeout = workUnitStoreType === 'request' ? useCacheTimeout : Math.min(useCacheTimeout, staticPageGenerationTimeout * 0.9);
562
+ return effectiveTimeout * 1000;
563
+ }
564
+ function generateCacheEntryWithCacheContext(workStore, cacheContext, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError) {
565
+ const defaultCacheLife = workStore.cacheLifeProfiles.default;
566
+ // Initialize the Store for this Cache entry.
567
+ const cacheStore = createUseCacheStore(workStore, cacheContext, defaultCacheLife);
568
+ return _workunitasyncstorageexternal.workUnitAsyncStorage.run(cacheStore, ()=>_dynamicaccessasyncstorageexternal.dynamicAccessAsyncStorage.run({
569
+ abortController: new AbortController(),
570
+ reason: null
571
+ }, generateCacheEntryImpl, workStore, cacheContext, cacheStore, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError));
572
+ }
573
+ function propagateCacheLifeAndTagsToRevalidateStore(revalidateStore, metadata) {
574
+ const outerTags = revalidateStore.tags ??= [];
575
+ for (const tag of metadata.tags){
576
+ if (!outerTags.includes(tag)) {
577
+ outerTags.push(tag);
578
+ }
579
+ }
580
+ if (revalidateStore.stale > metadata.stale) {
581
+ revalidateStore.stale = metadata.stale;
582
+ }
583
+ if (revalidateStore.revalidate > metadata.revalidate) {
584
+ revalidateStore.revalidate = metadata.revalidate;
585
+ }
586
+ if (revalidateStore.expire > metadata.expire) {
587
+ revalidateStore.expire = metadata.expire;
588
+ }
589
+ }
590
+ function propagateCacheStaleTimeToRequestStore(requestStore, metadata) {
591
+ if (requestStore.stale !== undefined && requestStore.stale > metadata.stale) {
592
+ requestStore.stale = metadata.stale;
593
+ }
594
+ }
595
+ function propagateCacheEntryMetadata(cacheContext, metadata) {
596
+ if (cacheContext.kind === 'private') {
597
+ switch(cacheContext.outerWorkUnitStore.type){
598
+ case 'private-cache':
599
+ if (metadata.readRootParamNames) {
600
+ for (const paramName of metadata.readRootParamNames){
601
+ cacheContext.outerWorkUnitStore.readRootParamNames.add(paramName);
602
+ }
603
+ }
604
+ // fallthrough
605
+ case 'prerender-runtime':
606
+ propagateCacheLifeAndTagsToRevalidateStore(cacheContext.outerWorkUnitStore, metadata);
607
+ break;
608
+ case 'request':
609
+ propagateCacheStaleTimeToRequestStore(cacheContext.outerWorkUnitStore, metadata);
610
+ break;
611
+ case undefined:
612
+ break;
613
+ default:
614
+ cacheContext.outerWorkUnitStore;
615
+ }
616
+ } else {
617
+ switch(cacheContext.outerWorkUnitStore.type){
618
+ case 'cache':
619
+ // If this entry's cache life is dynamic, record this invocation as the
620
+ // origin to use as `cause` when the outer cache surfaces the
621
+ // nested-dynamic cache error. `??=` keeps the first occurrence so the
622
+ // cause points at the immediate dynamic child.
623
+ if (cacheContext.dynamicNestedCacheError !== undefined && (metadata.revalidate === 0 || metadata.expire < _constants.MIN_PRERENDERABLE_EXPIRE)) {
624
+ cacheContext.outerWorkUnitStore.dynamicNestedCacheError ??= cacheContext.dynamicNestedCacheError;
625
+ }
626
+ // fallthrough
627
+ case 'private-cache':
628
+ if (metadata.readRootParamNames) {
629
+ for (const paramName of metadata.readRootParamNames){
630
+ cacheContext.outerWorkUnitStore.readRootParamNames.add(paramName);
631
+ }
632
+ }
633
+ // fallthrough
634
+ case 'prerender':
635
+ case 'prerender-runtime':
636
+ case 'prerender-legacy':
637
+ propagateCacheLifeAndTagsToRevalidateStore(cacheContext.outerWorkUnitStore, metadata);
638
+ break;
639
+ case 'request':
640
+ propagateCacheStaleTimeToRequestStore(cacheContext.outerWorkUnitStore, metadata);
641
+ break;
642
+ case 'unstable-cache':
643
+ case 'build-time-generator':
644
+ break;
645
+ default:
646
+ cacheContext.outerWorkUnitStore;
647
+ }
648
+ }
649
+ if (metadata.readRootParamNames) {
650
+ const varyParamsAccumulator = (0, _workunitasyncstorageexternal.getVaryParamsAccumulator)(cacheContext.outerWorkUnitStore);
651
+ if (varyParamsAccumulator) {
652
+ for (const paramName of metadata.readRootParamNames){
653
+ (0, _varyparams.accumulateVaryParam)(varyParamsAccumulator.rootParams, paramName);
654
+ }
655
+ }
656
+ }
657
+ }
658
+ /**
659
+ * Conditionally propagates cache life, tags, and root param names to the outer
660
+ * context. During prerenders (`prerender` / `prerender-runtime`) and dev
661
+ * cache-filling requests, propagation is deferred because the entry might be
662
+ * omitted from the final prerender due to short expire/stale times. If omitted,
663
+ * it should not affect the prerender. The final decision happens when the entry
664
+ * is read from the resume data cache in the final render phase — at that point
665
+ * `propagateCacheEntryMetadata` is called unconditionally (after the omission
666
+ * checks have already filtered out short-lived entries).
667
+ *
668
+ * Nested caches propagate root param names into the enclosing cache's
669
+ * `readRootParamNames` set. This propagation is never deferred. Prerender
670
+ * contexts also register known root param names when they read the resume
671
+ * data cache. A response accumulator records the consumed entry's root vary
672
+ * params to prevent segment reuse across different values.
673
+ */ function maybePropagateCacheEntryMetadata(cacheContext, metadata) {
674
+ const outerWorkUnitStore = cacheContext.outerWorkUnitStore;
675
+ switch(outerWorkUnitStore.type){
676
+ case 'prerender':
677
+ case 'prerender-runtime':
678
+ {
679
+ break;
680
+ }
681
+ case 'request':
682
+ {
683
+ if (isValidationRender(outerWorkUnitStore) && outerWorkUnitStore.cacheSignal) {
684
+ break;
685
+ }
686
+ // fallthrough
687
+ }
688
+ case 'private-cache':
689
+ case 'cache':
690
+ case 'unstable-cache':
691
+ case 'prerender-legacy':
692
+ {
693
+ propagateCacheEntryMetadata(cacheContext, metadata);
694
+ break;
695
+ }
696
+ case 'build-time-generator':
697
+ break;
698
+ default:
699
+ {
700
+ outerWorkUnitStore;
701
+ }
702
+ }
703
+ }
704
+ async function collectResult(savedStream, workStore, cacheContext, innerCacheStore, startTime, errors) {
705
+ // We create a buffered stream that collects all chunks until the end to
706
+ // ensure that RSC has finished rendering and therefore we have collected
707
+ // all tags. In the future the RSC API might allow for the equivalent of
708
+ // the allReady Promise that exists on SSR streams.
709
+ //
710
+ // If something errored or rejected anywhere in the render, we close
711
+ // the stream as errored. This lets a CacheHandler choose to save the
712
+ // partial result up until that point for future hits for a while to avoid
713
+ // unnecessary retries or not to retry. We use the end of the stream for
714
+ // this to avoid another complicated side-channel. A receiver has to consider
715
+ // that the stream might also error for other reasons anyway such as losing
716
+ // connection.
717
+ const buffer = [];
718
+ const reader = savedStream.getReader();
719
+ try {
720
+ for(let entry; !(entry = await reader.read()).done;){
721
+ buffer.push(entry.value);
722
+ }
723
+ } catch (error) {
724
+ errors.push(error);
725
+ }
726
+ let idx = 0;
727
+ const bufferStream = new ReadableStream({
728
+ pull (controller) {
729
+ if (workStore.invalidDynamicUsageError) {
730
+ controller.error(workStore.invalidDynamicUsageError);
731
+ } else if (idx < buffer.length) {
732
+ controller.enqueue(buffer[idx++]);
733
+ } else if (errors.length > 0) {
734
+ // TODO: Should we use AggregateError here?
735
+ controller.error(errors[0]);
736
+ } else {
737
+ controller.close();
738
+ }
739
+ }
740
+ });
741
+ const collectedTags = innerCacheStore.tags;
742
+ const isPrivateCacheInDev = Boolean(process.env.__NEXT_DEV_SERVER && cacheContext.kind === 'private');
743
+ // In development, force a dynamic cache life (`revalidate: 0`, `expire:
744
+ // MIN_PRERENDERABLE_EXPIRE`) for private caches, which have no real backing
745
+ // handler. The zero revalidate makes every read serve stale-while-revalidate
746
+ // (regenerating a fresh entry in the background), and
747
+ // `MIN_PRERENDERABLE_EXPIRE` (5 minutes) caps how long an entry lingers in
748
+ // the dedicated in-memory private handler. It is the shortest `expire` that
749
+ // isn't treated as dynamic; a smaller `expire` would exclude the entry from
750
+ // prerenders. Two other cases deliberately do NOT force this and keep their
751
+ // resolved cache life, relying instead on the dev handler's minimum retention
752
+ // and a dev revalidation (see the cache-hit path below) to keep reloads fast
753
+ // and fresh. The size-0 case (`cacheMaxMemorySize: 0`) keeps its life so the
754
+ // entry can be considered prerenderable instead of being misread as a dynamic
755
+ // hole. An explicit short-`expire` public cache (e.g. `cacheLife({ expire: 0
756
+ // })`) keeps its life so it stays correctly excluded from static prerenders
757
+ // via its real `expire` while a reload still hits the cache; forcing
758
+ // `revalidate: 0` here would instead corrupt the cache life propagated to an
759
+ // enclosing cache and trigger the nested-dynamic error. A cache backed by a
760
+ // custom handler keeps its real cache life too, since that handler owns it.
761
+ const forceDynamicCacheLifeInDev = isPrivateCacheInDev;
762
+ // If cacheLife() was used to set an explicit revalidate/expire/stale time we
763
+ // use that. Otherwise, we use the lowest of all inner fetch(),
764
+ // unstable_cache() or nested "use cache", if they're lower than our default.
765
+ const collectedRevalidate = forceDynamicCacheLifeInDev ? 0 : innerCacheStore.explicitRevalidate !== undefined ? innerCacheStore.explicitRevalidate : innerCacheStore.revalidate;
766
+ const collectedExpire = forceDynamicCacheLifeInDev ? _constants.MIN_PRERENDERABLE_EXPIRE : innerCacheStore.explicitExpire !== undefined ? innerCacheStore.explicitExpire : innerCacheStore.expire;
767
+ const collectedStale = innerCacheStore.explicitStale !== undefined ? innerCacheStore.explicitStale : innerCacheStore.stale;
768
+ const entry = {
769
+ value: bufferStream,
770
+ timestamp: startTime,
771
+ revalidate: collectedRevalidate,
772
+ expire: collectedExpire,
773
+ stale: collectedStale,
774
+ tags: collectedTags === null ? [] : collectedTags
775
+ };
776
+ const collected = {
777
+ entry,
778
+ hasExplicitRevalidate: innerCacheStore.explicitRevalidate !== undefined,
779
+ hasExplicitExpire: innerCacheStore.explicitExpire !== undefined,
780
+ readRootParamNames: innerCacheStore.readRootParamNames,
781
+ // The store accumulates this from nested public caches that propagated a
782
+ // dynamic life into us.
783
+ dynamicNestedCacheError: innerCacheStore.type === 'cache' ? innerCacheStore.dynamicNestedCacheError : undefined
784
+ };
785
+ if (!cacheContext.skipPropagation) {
786
+ maybePropagateCacheEntryMetadata(cacheContext, {
787
+ tags: collected.entry.tags,
788
+ revalidate: collected.entry.revalidate,
789
+ expire: collected.entry.expire,
790
+ stale: collected.entry.stale,
791
+ timestamp: collected.entry.timestamp,
792
+ hasExplicitRevalidate: collected.hasExplicitRevalidate,
793
+ hasExplicitExpire: collected.hasExplicitExpire,
794
+ readRootParamNames: collected.readRootParamNames,
795
+ dynamicNestedCacheError: collected.dynamicNestedCacheError
796
+ });
797
+ const cacheSignal = (0, _workunitasyncstorageexternal.getCacheSignal)(cacheContext.outerWorkUnitStore);
798
+ if (cacheSignal) {
799
+ cacheSignal.endRead();
800
+ }
801
+ }
802
+ return collected;
803
+ }
804
+ async function generateCacheEntryImpl(workStore, cacheContext, innerCacheStore, clientReferenceManifest, encodedArguments, fn, timeoutError, deadlockError) {
805
+ const temporaryReferences = (0, _server.createTemporaryReferenceSet)();
806
+ const outerWorkUnitStore = cacheContext.outerWorkUnitStore;
807
+ const [, args] = typeof encodedArguments === 'string' ? await (0, _server.decodeReply)(encodedArguments, (0, _manifestssingleton.getServerModuleMap)(), {
808
+ temporaryReferences
809
+ }) : await (0, _server.decodeReplyFromAsyncIterable)({
810
+ async *[Symbol.asyncIterator] () {
811
+ for (const entry of encodedArguments){
812
+ yield entry;
813
+ }
814
+ switch(outerWorkUnitStore.type){
815
+ case 'prerender-runtime':
816
+ case 'prerender':
817
+ // The encoded arguments might contain hanging promises. In
818
+ // this case we don't want to reject with "Error: Connection
819
+ // closed.", so we intentionally keep the iterable alive. This
820
+ // is similar to the halting trick that we do while rendering.
821
+ await new Promise((resolve)=>{
822
+ if (outerWorkUnitStore.renderSignal.aborted) {
823
+ resolve();
824
+ } else {
825
+ outerWorkUnitStore.renderSignal.addEventListener('abort', ()=>resolve(), {
826
+ once: true
827
+ });
828
+ }
829
+ });
830
+ break;
831
+ case 'prerender-legacy':
832
+ case 'request':
833
+ case 'cache':
834
+ case 'private-cache':
835
+ case 'unstable-cache':
836
+ case 'build-time-generator':
837
+ break;
838
+ default:
839
+ outerWorkUnitStore;
840
+ }
841
+ }
842
+ }, (0, _manifestssingleton.getServerModuleMap)(), {
843
+ temporaryReferences
844
+ });
845
+ // Track the timestamp when we started computing the result.
846
+ const startTime = performance.timeOrigin + performance.now();
847
+ // Invoke the inner function to load a new result. We delay the invocation
848
+ // though, until React awaits the promise so that React's request store (ALS)
849
+ // is available when the function is invoked. This allows us, for example, to
850
+ // capture logs so that we can later replay them.
851
+ const resultPromise = (0, _lazyresult.createLazyResult)(fn.bind(null, ...args));
852
+ const errors = [];
853
+ // In the "Cache" environment, we only need to make sure that the error
854
+ // digests are handled correctly. Error formatting and reporting is not
855
+ // necessary here; the errors are encoded in the stream, and will be reported
856
+ // in the "Server" environment.
857
+ const handleError = (0, _createerrorhandler.createReactServerErrorHandler)(process.env.NODE_ENV === 'development', workStore.isBuildTimePrerendering ?? false, workStore.reactServerErrorsByDigest, (error)=>{
858
+ // In production, we log the original error here. It gets a digest that
859
+ // can be used to associate the error with the obfuscated error that might
860
+ // be logged if the error is caught. In development, we prefer logging the
861
+ // transported error in the server environment. It's not obfuscated and
862
+ // also includes the (dev-only) environment name.
863
+ if (process.env.NODE_ENV === 'production') {
864
+ _log.error(error);
865
+ }
866
+ errors.push(error);
867
+ });
868
+ let stream;
869
+ let devTimeoutAbortController;
870
+ switch(outerWorkUnitStore.type){
871
+ case 'cache':
872
+ case 'prerender-runtime':
873
+ case 'prerender':
874
+ {
875
+ const prerenderStore = outerWorkUnitStore.type === 'cache' ? outerWorkUnitStore.fallbackRootParamsPrerender : outerWorkUnitStore;
876
+ if (prerenderStore === null) {
877
+ stream = (0, _server.renderToReadableStream)(resultPromise, clientReferenceManifest.clientModules, {
878
+ environmentName: 'Cache',
879
+ filterStackFrame,
880
+ temporaryReferences,
881
+ onError: handleError
882
+ });
883
+ break;
884
+ }
885
+ const timeoutAbortController = new AbortController();
886
+ const timer = setTimeout(()=>{
887
+ workStore.invalidDynamicUsageError = timeoutError;
888
+ timeoutAbortController.abort(timeoutError);
889
+ }, getUseCacheFillTimeoutMs(workStore, prerenderStore.type));
890
+ const dynamicAccessStore = _dynamicaccessasyncstorageexternal.dynamicAccessAsyncStorage.getStore();
891
+ const dynamicAccessAbortSignal = dynamicAccessStore == null ? void 0 : dynamicAccessStore.abortController.signal;
892
+ const abortSignal = dynamicAccessAbortSignal ? AbortSignal.any([
893
+ dynamicAccessAbortSignal,
894
+ timeoutAbortController.signal
895
+ ]) : timeoutAbortController.signal;
896
+ const { prelude } = await (0, _static.prerender)(resultPromise, clientReferenceManifest.clientModules, {
897
+ environmentName: 'Cache',
898
+ filterStackFrame,
899
+ signal: abortSignal,
900
+ temporaryReferences,
901
+ onError (error) {
902
+ if (abortSignal.aborted && abortSignal.reason === error) {
903
+ return undefined;
904
+ }
905
+ return handleError(error);
906
+ }
907
+ });
908
+ clearTimeout(timer);
909
+ const didTimeout = timeoutAbortController.signal.aborted;
910
+ if (dynamicAccessAbortSignal) {
911
+ // Release React's listener from the composite signal.
912
+ timeoutAbortController.abort();
913
+ }
914
+ if (didTimeout) {
915
+ // When the timeout is reached we always error the stream. Even for
916
+ // fallback shell prerenders we don't want to return a hanging promise,
917
+ // which would allow the function to become a dynamic hole. Because that
918
+ // would mean that a non-empty shell could be generated which would be
919
+ // subject to revalidation, and we don't want to create long
920
+ // revalidation times.
921
+ stream = new ReadableStream({
922
+ start (controller) {
923
+ controller.error(timeoutAbortController.signal.reason);
924
+ }
925
+ });
926
+ } else if (dynamicAccessAbortSignal == null ? void 0 : dynamicAccessAbortSignal.aborted) {
927
+ var _getCacheSignal;
928
+ const reason = (dynamicAccessStore == null ? void 0 : dynamicAccessStore.reason) ?? 'runtime';
929
+ const makeHangingPromise = reason === 'fallback-params' ? _dynamicrenderingutils.makeFallbackParamsHangingPromise : _dynamicrenderingutils.makeURLDataHangingPromise;
930
+ if (innerCacheStore.type === 'cache' && innerCacheStore.fallbackRootParamsPrerender !== null) {
931
+ var _getCacheSignal1;
932
+ // No entry is collected for an aborted fill. Still remember the
933
+ // roots actually read so a concrete request won't join this result
934
+ // under the coarse key. Propagate them through aborted parents too.
935
+ addKnownRootParamNames(cacheContext.functionId, innerCacheStore.readRootParamNames);
936
+ const hangingPromise = (0, _dynamicrenderingutils.trackPromiseUsed)(makeHangingPromise(prerenderStore.renderSignal, workStore.route, 'dynamic "use cache"', // The single wrapper below tracks access when consumed.
937
+ null), ()=>{
938
+ if (reason === 'fallback-params') {
939
+ (0, _dynamicrenderingutils.trackFallbackParamsAccessed)(prerenderStore, 'dynamic "use cache"');
940
+ } else {
941
+ (0, _dynamicrenderingutils.trackURLDataAccessed)(prerenderStore, 'dynamic "use cache"');
942
+ }
943
+ // The result may also be consumed by a deduped invocation, so
944
+ // record dependencies against the cache consuming it now.
945
+ const consumer = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
946
+ if (consumer !== undefined && consumer.type === 'cache') {
947
+ for (const name of innerCacheStore.readRootParamNames){
948
+ consumer.readRootParamNames.add(name);
949
+ }
950
+ }
951
+ // Only a cache consuming this result must suspend. Do not share
952
+ // cancellation with independent sibling cache fills.
953
+ (0, _dynamicaccessasyncstorageexternal.abortOnDynamicAccess)(reason, dynamicAccessAbortSignal.reason);
954
+ });
955
+ (_getCacheSignal1 = (0, _workunitasyncstorageexternal.getCacheSignal)(outerWorkUnitStore)) == null ? void 0 : _getCacheSignal1.endRead();
956
+ return {
957
+ type: 'prerender-dynamic',
958
+ reason: reason === 'fallback-params' ? _cachestore.FALLBACK_PARAMS : _cachestore.RUNTIME_DATA,
959
+ hangingPromise
960
+ };
961
+ }
962
+ // If the prerender is aborted because of dynamic access (e.g. reading
963
+ // fallback params), we return a hanging promise. This essentially makes
964
+ // the "use cache" function dynamic.
965
+ const hangingPromise = makeHangingPromise(prerenderStore.renderSignal, workStore.route, 'dynamic "use cache"', outerWorkUnitStore);
966
+ (_getCacheSignal = (0, _workunitasyncstorageexternal.getCacheSignal)(outerWorkUnitStore)) == null ? void 0 : _getCacheSignal.endRead();
967
+ return {
968
+ type: 'prerender-dynamic',
969
+ reason: reason === 'fallback-params' ? _cachestore.FALLBACK_PARAMS : _cachestore.RUNTIME_DATA,
970
+ hangingPromise
971
+ };
972
+ } else {
973
+ stream = prelude;
974
+ }
975
+ break;
976
+ }
977
+ case 'request':
978
+ // TODO: We should just check if the render is abandonable. This is
979
+ // relevant in restart-on-cache-miss in general, so when we implement that
980
+ // for cached navs, it'll also be needed in prod
981
+ if (process.env.__NEXT_DEV_SERVER && outerWorkUnitStore.cacheSignal) {
982
+ const stagedRendering = outerWorkUnitStore.stagedRendering;
983
+ // Capture the render stage at the start of this cache read, before the
984
+ // yield below. A streamed staged render advances its controller on its
985
+ // own schedule, independently of this read, so by the time the yield
986
+ // resolves the controller may have raced ahead to the Dynamic stage even
987
+ // though the read began in an earlier (prerender) stage.
988
+ const stageAtReadStart = stagedRendering == null ? void 0 : stagedRendering.currentStage;
989
+ // If we're filling caches for a staged render, make sure that it takes
990
+ // at least a task, so we'll always notice a cache miss between stages.
991
+ //
992
+ // TODO(restart-on-cache-miss): This is suboptimal. Ideally microtasky
993
+ // caches wouldn't register as a miss, but short-lived caches are only
994
+ // omitted correctly when read back in a separate render (now the
995
+ // background validation render, not a restart of the streamed
996
+ // response), so forcing the miss is the best we can do until that's
997
+ // refactored.
998
+ await new Promise((resolve)=>setTimeout(resolve));
999
+ // Start a cache-fill timeout so a hanging `'use cache'` entry surfaces
1000
+ // the same error in dev as during prerender. Cleared when
1001
+ // pendingCacheResult settles.
1002
+ //
1003
+ // Skip the timeout only when the read began in the Dynamic stage, which
1004
+ // mirrors prerender: a cache guarded by e.g. `await connection()` is a
1005
+ // legitimate dynamic hole and isn't executed there. We use the stage
1006
+ // captured at read start, not the current one, because the staged render
1007
+ // may have advanced past it during the yield above.
1008
+ if (stageAtReadStart !== _stagedrendering.RenderStage.Dynamic) {
1009
+ const devRenderAbortController = new AbortController();
1010
+ const fillTimeoutMs = getUseCacheFillTimeoutMs(workStore, outerWorkUnitStore.type);
1011
+ const fillDeadlineAt = performance.now() + fillTimeoutMs;
1012
+ const devRenderTimeoutTimer = setTimeout(()=>{
1013
+ workStore.invalidDynamicUsageError = timeoutError;
1014
+ devRenderAbortController.abort(timeoutError);
1015
+ }, fillTimeoutMs);
1016
+ devTimeoutAbortController = new AbortController();
1017
+ devTimeoutAbortController.signal.addEventListener('abort', ()=>{
1018
+ clearTimeout(devRenderTimeoutTimer);
1019
+ }, {
1020
+ once: true
1021
+ });
1022
+ stream = (0, _server.renderToReadableStream)(resultPromise, clientReferenceManifest.clientModules, {
1023
+ environmentName: 'Cache',
1024
+ filterStackFrame,
1025
+ signal: devRenderAbortController.signal,
1026
+ temporaryReferences,
1027
+ onError (error) {
1028
+ if (devRenderAbortController.signal.aborted && devRenderAbortController.signal.reason === error && error instanceof Error) {
1029
+ // The abort reason is the same error stored as
1030
+ // `workStore.invalidDynamicUsageError` (a fill timeout or
1031
+ // deadlock). Register it under a digest and return that
1032
+ // digest, so the error that surfaces on the consumer side of
1033
+ // this Flight boundary carries it and the outer render's
1034
+ // handler can recover *this* object via
1035
+ // `reactServerErrorsByDigest`.
1036
+ //
1037
+ // We deliberately do not set `error.digest` here: whether the
1038
+ // error actually surfaces (vs. being caught in userland) is
1039
+ // the consumer's decision, so the "surfaced" mark is left to
1040
+ // the outer handler.
1041
+ const digest = (0, _stringhash.default)(error.message + (error.stack || '')).toString();
1042
+ workStore.reactServerErrorsByDigest.set(digest, error);
1043
+ return digest;
1044
+ }
1045
+ return handleError(error);
1046
+ }
1047
+ });
1048
+ // `require` (rather than a top-level import) so the bundler can
1049
+ // tree-shake the probe scheduler out of the production runtime, where
1050
+ // this whole dev-server-gated branch is dead code.
1051
+ const { setupProbeScheduler } = require('./use-cache-probe-scheduler');
1052
+ stream = setupProbeScheduler({
1053
+ workStore,
1054
+ outerRequestStore: outerWorkUnitStore,
1055
+ cacheContext,
1056
+ encodedArguments,
1057
+ fillDeadlineAt,
1058
+ stream,
1059
+ abortSignal: AbortSignal.any([
1060
+ devRenderAbortController.signal,
1061
+ devTimeoutAbortController.signal
1062
+ ]),
1063
+ onProbeCompleted () {
1064
+ const error = deadlockError ?? new _invarianterror.InvariantError('`deadlockError` should be constructed inside `cache()` before reaching the probe scheduler.');
1065
+ workStore.invalidDynamicUsageError = error;
1066
+ devRenderAbortController.abort(error);
1067
+ }
1068
+ });
1069
+ break;
1070
+ }
1071
+ }
1072
+ // fallthrough
1073
+ case 'prerender-legacy':
1074
+ case 'private-cache':
1075
+ case 'unstable-cache':
1076
+ case 'build-time-generator':
1077
+ stream = (0, _server.renderToReadableStream)(resultPromise, clientReferenceManifest.clientModules, {
1078
+ environmentName: 'Cache',
1079
+ filterStackFrame,
1080
+ temporaryReferences,
1081
+ onError: handleError
1082
+ });
1083
+ break;
1084
+ default:
1085
+ return outerWorkUnitStore;
1086
+ }
1087
+ const [returnStream, savedStream] = stream.tee();
1088
+ const pendingCacheResult = collectResult(savedStream, workStore, cacheContext, innerCacheStore, startTime, errors).finally(()=>{
1089
+ devTimeoutAbortController == null ? void 0 : devTimeoutAbortController.abort();
1090
+ });
1091
+ if (process.env.NODE_ENV === 'development') {
1092
+ // Name the stream for React DevTools.
1093
+ // @ts-expect-error
1094
+ returnStream.name = 'use cache';
1095
+ }
1096
+ return {
1097
+ type: 'cached',
1098
+ // Return the stream as we're creating it. This means that if it ends up
1099
+ // erroring we cannot return a stale-if-error version but it allows
1100
+ // streaming back the result earlier.
1101
+ stream: returnStream,
1102
+ pendingCacheResult
1103
+ };
1104
+ }
1105
+ function cloneCacheResult(result) {
1106
+ const [entryA, entryB] = (0, _clonecacheentry.cloneCacheEntry)(result.entry);
1107
+ return [
1108
+ {
1109
+ entry: entryA,
1110
+ hasExplicitRevalidate: result.hasExplicitRevalidate,
1111
+ hasExplicitExpire: result.hasExplicitExpire,
1112
+ readRootParamNames: result.readRootParamNames,
1113
+ dynamicNestedCacheError: result.dynamicNestedCacheError
1114
+ },
1115
+ {
1116
+ entry: entryB,
1117
+ hasExplicitRevalidate: result.hasExplicitRevalidate,
1118
+ hasExplicitExpire: result.hasExplicitExpire,
1119
+ readRootParamNames: result.readRootParamNames,
1120
+ dynamicNestedCacheError: result.dynamicNestedCacheError
1121
+ }
1122
+ ];
1123
+ }
1124
+ async function clonePendingCacheResult(pendingCacheResult) {
1125
+ const result = await pendingCacheResult;
1126
+ return cloneCacheResult(result);
1127
+ }
1128
+ async function getNthCacheResult(split, i) {
1129
+ return (await split)[i];
1130
+ }
1131
+ async function encodeFormData(formData) {
1132
+ let result = '';
1133
+ for (let [key, value] of formData){
1134
+ // We don't need this key to be serializable but from a security perspective it should not be
1135
+ // possible to generate a string that looks the same from a different structure. To ensure this
1136
+ // we need a delimeter between fields but just using a delimeter is not enough since a string
1137
+ // might contain that delimeter. We use the length of each field as the delimeter to avoid
1138
+ // escaping the values.
1139
+ result += key.length.toString(16) + ':' + key;
1140
+ let stringValue;
1141
+ if (typeof value === 'string') {
1142
+ stringValue = value;
1143
+ } else {
1144
+ // The FormData might contain binary data that is not valid UTF-8 so this cache
1145
+ // key may generate a UCS-2 string. Passing this to another service needs to be
1146
+ // aware that the key might not be compatible.
1147
+ const arrayBuffer = await value.arrayBuffer();
1148
+ if (arrayBuffer.byteLength % 2 === 0) {
1149
+ stringValue = String.fromCodePoint(...new Uint16Array(arrayBuffer));
1150
+ } else {
1151
+ stringValue = String.fromCodePoint(...new Uint16Array(arrayBuffer, 0, (arrayBuffer.byteLength - 1) / 2)) + String.fromCodePoint(new Uint8Array(arrayBuffer, arrayBuffer.byteLength - 1, 1)[0]);
1152
+ }
1153
+ }
1154
+ result += stringValue.length.toString(16) + ':' + stringValue;
1155
+ }
1156
+ return result;
1157
+ }
1158
+ function createTrackedReadableStream(stream, cacheSignal) {
1159
+ const reader = stream.getReader();
1160
+ return new ReadableStream({
1161
+ async pull (controller) {
1162
+ const { done, value } = await reader.read();
1163
+ if (done) {
1164
+ controller.close();
1165
+ cacheSignal.endRead();
1166
+ } else {
1167
+ controller.enqueue(value);
1168
+ }
1169
+ }
1170
+ });
1171
+ }
1172
+ async function cache(kind, id, boundArgsLength, originalFn, args) {
1173
+ var _workUnitStore_implicitTags;
1174
+ const isPrivate = kind === 'private';
1175
+ // The default handler kind corresponds to the bare 'use cache' directive.
1176
+ const logPrefix = kind === 'default' ? `'use cache'` : `'use cache: ${kind}'`;
1177
+ const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
1178
+ if (workStore === undefined) {
1179
+ throw new Error('"use cache" cannot be used outside of App Router. Expected a WorkStore.');
1180
+ }
1181
+ const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
1182
+ if (workUnitStore === undefined) {
1183
+ throw new _invarianterror.InvariantError('"use cache" cannot be used outside of App Router. Expected a WorkUnitStore.');
1184
+ }
1185
+ // In a prerender, tasky IO may result in cache reads that start
1186
+ // after the prerender has already been aborted:
1187
+ //
1188
+ // await setTimeout(100) // we can't abort this uncached IO...
1189
+ // await cachedData() // ...so we'll still get here even though the prerender aborted
1190
+ //
1191
+ // The prerender is over, so we should just return an erroring promise.
1192
+ // (NOTE: we also shouldn't fill this cache, because it's behind uncached IO,
1193
+ // so semantically it is not part of the prerender)
1194
+ switch(workUnitStore.type){
1195
+ case 'prerender':
1196
+ case 'prerender-runtime':
1197
+ {
1198
+ if (workUnitStore.renderSignal.aborted) {
1199
+ // We don't know if the cache itself is dynamic or runtime data,
1200
+ // but the prerender is over, so it doesn't need to participate
1201
+ // in runtime data tracking at all.
1202
+ return (0, _dynamicrenderingutils.makeUntrackedHangingPromise)(workUnitStore.renderSignal, workStore.route, '"use cache" called after prerender ended');
1203
+ }
1204
+ break;
1205
+ }
1206
+ case 'prerender-legacy':
1207
+ case 'prerender-client':
1208
+ case 'validation-client':
1209
+ case 'request':
1210
+ case 'cache':
1211
+ case 'private-cache':
1212
+ case 'unstable-cache':
1213
+ case 'build-time-generator':
1214
+ break;
1215
+ default:
1216
+ workUnitStore;
1217
+ }
1218
+ // Probe re-executions (the dev-server's hang-detection worker) short-circuit
1219
+ // further down before any handler is consulted, so we skip handler selection
1220
+ // entirely and the worker can boot without registering handlers at all.
1221
+ let cacheHandler;
1222
+ if (workStore.useCacheProbeMode === undefined) {
1223
+ if (isPrivate) {
1224
+ // Private caches normally go to the Resume Data Cache (RDC), not a cache
1225
+ // handler. In development we additionally persist them in a dedicated
1226
+ // built-in in-memory handler so that reloads are fast.
1227
+ if (process.env.__NEXT_DEV_SERVER) {
1228
+ cacheHandler = (0, _handlers.getPrivateCacheHandler)();
1229
+ }
1230
+ } else {
1231
+ const handler = (0, _handlers.getCacheHandler)(kind);
1232
+ if (!handler) {
1233
+ throw new Error('Unknown cache handler: ' + kind);
1234
+ }
1235
+ // In development, a user-configured (custom) handler may be slow or
1236
+ // remote, so we read through a tiered handler that puts a built-in
1237
+ // in-memory front in front of it to keep cache hits microtask-fast.
1238
+ // Built-in handlers (the default handler, and its size-0 replacement) are
1239
+ // already in-memory and used directly.
1240
+ if (process.env.__NEXT_DEV_SERVER && (0, _handlers.isCustomCacheHandler)(kind)) {
1241
+ // A custom kind always has a dev tiered handler: it is created in the
1242
+ // same `setCacheHandler` call that makes `isCustomCacheHandler` true.
1243
+ const tieredCacheHandler = (0, _handlers.getDevTieredCacheHandler)(kind);
1244
+ if (!tieredCacheHandler) {
1245
+ throw new _invarianterror.InvariantError(`Expected a dev tiered cache handler for kind "${kind}".`);
1246
+ }
1247
+ cacheHandler = tieredCacheHandler;
1248
+ } else {
1249
+ cacheHandler = handler;
1250
+ }
1251
+ }
1252
+ }
1253
+ const timeoutError = new _usecacheerrors.UseCacheTimeoutError(workStore.route);
1254
+ Error.captureStackTrace(timeoutError, cache);
1255
+ (0, _dynamicrenderingutils.applyOwnerStack)(timeoutError);
1256
+ // Only ever thrown by the dev-server's hang-detection probe.
1257
+ // `Error.captureStackTrace` has to run while `cache()` is still on the
1258
+ // synchronous stack, otherwise the user's `'use cache'` invocation frames
1259
+ // would already be gone — that's why the construction sits up here rather
1260
+ // than next to the trigger that actually consumes it. The `__NEXT_DEV_SERVER`
1261
+ // gate lets the error class drop out of the production runtime bundle.
1262
+ let deadlockError;
1263
+ if (process.env.__NEXT_DEV_SERVER) {
1264
+ deadlockError = new _usecacheerrors.UseCacheDeadlockError(workStore.route);
1265
+ Error.captureStackTrace(deadlockError, cache);
1266
+ (0, _dynamicrenderingutils.applyOwnerStack)(deadlockError);
1267
+ }
1268
+ const wrapAsInvalidDynamicUsageError = (error)=>{
1269
+ Error.captureStackTrace(error, cache);
1270
+ workStore.invalidDynamicUsageError ??= error;
1271
+ return error;
1272
+ };
1273
+ const outerOwnerStack = process.env.NODE_ENV !== 'production' ? captureOuterOwnerStack(workUnitStore) : undefined;
1274
+ const name = originalFn.name;
1275
+ let fn = originalFn;
1276
+ let cacheContext;
1277
+ if (isPrivate) {
1278
+ const expression = '"use cache: private"';
1279
+ switch(workUnitStore.type){
1280
+ // "use cache: private" is dynamic in prerendering contexts.
1281
+ case 'prerender':
1282
+ // Private caches can read request data. At this point we don't know
1283
+ // Whether it's going to use session data or URL data.
1284
+ // TODO(app-shells): This could be narrowed (and thus optimized) if we checked whether URL data
1285
+ // is included in the cache key, because it can only be passed in as arguments.
1286
+ return (0, _dynamicrenderingutils.makeUnknownRuntimeDataHangingPromise)(workUnitStore.renderSignal, workStore.route, expression, workUnitStore);
1287
+ case 'prerender-legacy':
1288
+ return (0, _dynamicrendering.throwToInterruptStaticGeneration)(expression, workStore, workUnitStore);
1289
+ case 'prerender-client':
1290
+ case 'validation-client':
1291
+ throw new _invarianterror.InvariantError(`${expression} must not be used within a client component. Next.js should be preventing ${expression} from being allowed in client components statically, but did not in this case.`);
1292
+ case 'unstable-cache':
1293
+ {
1294
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createUseCachePrivateInsideUnstableCacheError)(workStore.route));
1295
+ }
1296
+ case 'cache':
1297
+ {
1298
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createUseCachePrivateInsidePublicUseCacheError)(workStore.route));
1299
+ }
1300
+ case 'request':
1301
+ case 'prerender-runtime':
1302
+ case 'private-cache':
1303
+ cacheContext = {
1304
+ kind: 'private',
1305
+ outerWorkUnitStore: workUnitStore,
1306
+ skipPropagation: false,
1307
+ outerOwnerStack,
1308
+ functionId: id,
1309
+ handlerKind: kind
1310
+ };
1311
+ break;
1312
+ case 'build-time-generator':
1313
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createUseCachePrivateOutsideRequestContextError)(workStore.route, workUnitStore.functionName));
1314
+ default:
1315
+ workUnitStore;
1316
+ // This is dead code, but without throwing an error here, TypeScript
1317
+ // will assume that cacheContext is used before being assigned.
1318
+ throw new _invarianterror.InvariantError(`Unexpected work unit store.`);
1319
+ }
1320
+ } else {
1321
+ switch(workUnitStore.type){
1322
+ case 'prerender-client':
1323
+ case 'validation-client':
1324
+ const expression = '"use cache"';
1325
+ throw new _invarianterror.InvariantError(`${expression} must not be used within a client component. Next.js should be preventing ${expression} from being allowed in client components statically, but did not in this case.`);
1326
+ case 'cache':
1327
+ {
1328
+ // Eagerly capture this invocation's call site while still synchronous
1329
+ // in `cache()`. Used as `cause` of the nested-dynamic cache error
1330
+ // when the outer cache (whose body never re-runs during the final
1331
+ // prerender) throws. Only constructed when the parent is itself a
1332
+ // public `'use cache'` — otherwise this entry can never propagate
1333
+ // dynamism into that error and the allocation would be wasted. Private
1334
+ // parents are intentionally excluded: `'use cache: private'` is
1335
+ // dynamic-by-definition in prerendering and deferred to the runtime
1336
+ // stage in dev requests, so a public cache nested inside one never
1337
+ // triggers the throw upstream.
1338
+ const dynamicNestedCacheError = new _usecacheerrors.NestedDynamicUseCacheError();
1339
+ Error.captureStackTrace(dynamicNestedCacheError, cache);
1340
+ (0, _dynamicrenderingutils.applyOwnerStack)(dynamicNestedCacheError);
1341
+ cacheContext = {
1342
+ kind: 'public',
1343
+ outerWorkUnitStore: workUnitStore,
1344
+ skipPropagation: false,
1345
+ outerOwnerStack,
1346
+ functionId: id,
1347
+ handlerKind: kind,
1348
+ dynamicNestedCacheError
1349
+ };
1350
+ break;
1351
+ }
1352
+ case 'prerender':
1353
+ case 'prerender-runtime':
1354
+ case 'prerender-legacy':
1355
+ case 'request':
1356
+ case 'private-cache':
1357
+ // TODO: We should probably forbid nesting "use cache" inside
1358
+ // unstable_cache. (fallthrough)
1359
+ case 'unstable-cache':
1360
+ case 'build-time-generator':
1361
+ cacheContext = {
1362
+ kind: 'public',
1363
+ outerWorkUnitStore: workUnitStore,
1364
+ skipPropagation: false,
1365
+ outerOwnerStack,
1366
+ functionId: id,
1367
+ handlerKind: kind,
1368
+ dynamicNestedCacheError: undefined
1369
+ };
1370
+ break;
1371
+ default:
1372
+ workUnitStore;
1373
+ // This is dead code, but without throwing an error here, TypeScript
1374
+ // will assume that cacheContext is used before being assigned.
1375
+ throw new _invarianterror.InvariantError(`Unexpected work unit store.`);
1376
+ }
1377
+ }
1378
+ // Get the clientReferenceManifest while we're still in the outer Context.
1379
+ // In case getClientReferenceManifestSingleton is implemented using AsyncLocalStorage.
1380
+ const clientReferenceManifest = (0, _manifestssingleton.getClientReferenceManifest)();
1381
+ const hangingInputAbortSignal = (0, _dynamicrendering.createHangingInputAbortSignal)(workUnitStore);
1382
+ if (cacheContext.kind === 'private') {
1383
+ const { outerWorkUnitStore } = cacheContext;
1384
+ switch(outerWorkUnitStore.type){
1385
+ case 'prerender-runtime':
1386
+ {
1387
+ // In a runtime prerender, we have to make sure that APIs that would hang during a static prerender
1388
+ // are resolved with a delay, in the appropriate runtime stage.
1389
+ const stagedRendering = outerWorkUnitStore.stagedRendering;
1390
+ if (stagedRendering) {
1391
+ await stagedRendering.waitForStage(_dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.sessionData);
1392
+ }
1393
+ break;
1394
+ }
1395
+ case 'request':
1396
+ {
1397
+ if (isValidationRender(outerWorkUnitStore)) {
1398
+ // Similar to runtime prerenders, private caches should not resolve in the static stage
1399
+ // of a validation request, so we delay them.
1400
+ await (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(undefined, outerWorkUnitStore, _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.sessionData);
1401
+ }
1402
+ break;
1403
+ }
1404
+ case 'private-cache':
1405
+ break;
1406
+ default:
1407
+ {
1408
+ outerWorkUnitStore;
1409
+ }
1410
+ }
1411
+ }
1412
+ let isPageOrLayoutSegmentFunction = false;
1413
+ // For page and layout segment functions (i.e. the page/layout component,
1414
+ // or generateMetadata/generateViewport), the cache function is
1415
+ // overwritten, which allows us to apply special handling for params and
1416
+ // searchParams. For pages and layouts we're using the outer params prop,
1417
+ // and not the inner one that was serialized/deserialized. While it's not
1418
+ // generally true for "use cache" args, in the case of `params` the inner
1419
+ // and outer object are essentially equivalent, so this is safe to do
1420
+ // (including fallback params that are hanging promises). It allows us to
1421
+ // avoid waiting for the timeout, when prerendering a fallback shell of a
1422
+ // cached page or layout that awaits params.
1423
+ if (isPageSegmentFunction(args)) {
1424
+ isPageOrLayoutSegmentFunction = true;
1425
+ const [{ params: outerParams, searchParams: outerSearchParams }, ...otherOuterArgs] = args;
1426
+ const props = {
1427
+ params: outerParams
1428
+ };
1429
+ if (isPrivate) {
1430
+ // Private caches allow accessing search params. We need to include
1431
+ // them in the serialized args and when generating the cache key.
1432
+ props.searchParams = outerSearchParams;
1433
+ }
1434
+ args = [
1435
+ props,
1436
+ ...otherOuterArgs
1437
+ ];
1438
+ fn = ({
1439
+ [name]: async (_, ...otherInnerArgs)=>originalFn.apply(null, [
1440
+ {
1441
+ params: props.params,
1442
+ searchParams: // Preserve the original search params, if this cache can access them.
1443
+ // Notably, in a runtime shell private caches can resolve, but search params
1444
+ // will be hanging, and we need to preserve the original proxied promise object
1445
+ // to trigger `dynamicAccessAbortSignal` when they're accessed.
1446
+ props.searchParams ?? // For public caches, search params are omitted from the cache
1447
+ // key (and the serialized args) to avoid mismatches between
1448
+ // prerendering and resuming a cached page that does not
1449
+ // access search params. This is also the reason why we're not
1450
+ // using a hanging promise for search params. For cached pages
1451
+ // that do access them, which is an invalid dynamic usage, we
1452
+ // need to ensure that an error is shown.
1453
+ (0, _searchparams.makeErroringSearchParamsForUseCache)()
1454
+ },
1455
+ ...otherInnerArgs
1456
+ ])
1457
+ })[name];
1458
+ } else if (isLayoutSegmentFunction(args)) {
1459
+ isPageOrLayoutSegmentFunction = true;
1460
+ const [{ params: outerParams, $$isLayout, ...outerSlots }, ...otherOuterArgs] = args;
1461
+ // Overwrite the props to omit $$isLayout. Note that slots are only
1462
+ // passed to the layout component (if any are defined), and not to
1463
+ // generateMetadata nor generateViewport. For those functions,
1464
+ // outerSlots/innerSlots is an empty object, which is fine because we're
1465
+ // just spreading it into the props.
1466
+ args = [
1467
+ {
1468
+ params: outerParams,
1469
+ ...outerSlots
1470
+ },
1471
+ ...otherOuterArgs
1472
+ ];
1473
+ fn = ({
1474
+ [name]: async ({ params: _innerParams, ...innerSlots }, ...otherInnerArgs)=>originalFn.apply(null, [
1475
+ {
1476
+ params: outerParams,
1477
+ ...innerSlots
1478
+ },
1479
+ ...otherInnerArgs
1480
+ ])
1481
+ })[name];
1482
+ }
1483
+ if (boundArgsLength > 0) {
1484
+ if (args.length === 0) {
1485
+ throw new _invarianterror.InvariantError(`Expected the "use cache" function ${JSON.stringify(fn.name)} to receive its encrypted bound arguments as the first argument.`);
1486
+ }
1487
+ const encryptedBoundArgs = args.shift();
1488
+ const boundArgs = await (0, _encryption.decryptActionBoundArgs)(id, encryptedBoundArgs);
1489
+ if (!Array.isArray(boundArgs)) {
1490
+ throw new _invarianterror.InvariantError(`Expected the bound arguments of "use cache" function ${JSON.stringify(fn.name)} to deserialize into an array, got ${typeof boundArgs} instead.`);
1491
+ }
1492
+ if (boundArgsLength !== boundArgs.length) {
1493
+ throw new _invarianterror.InvariantError(`Expected the "use cache" function ${JSON.stringify(fn.name)} to receive ${boundArgsLength} bound arguments, got ${boundArgs.length} instead.`);
1494
+ }
1495
+ args.unshift(boundArgs);
1496
+ }
1497
+ const temporaryReferences = (0, _client.createTemporaryReferenceSet)();
1498
+ // The base serialized cache key doesn't include runtime env var state or the
1499
+ // cookies and headers that private caches are allowed to read. Env var state
1500
+ // only scopes the cache handler because the RDC must reuse entries across
1501
+ // rendering phases. In production private cache entries aren't stored in a
1502
+ // cache handler, only in the Resume Data Cache (RDC): private caches are only
1503
+ // used during dynamic requests and runtime prefetches; for dynamic requests
1504
+ // the RDC is immutable and excludes private caches, and for runtime prefetches
1505
+ // it's mutable but lives only as long as the request. In development private
1506
+ // caches are persisted across requests, so `cacheHandlerKeyBase` (below)
1507
+ // additionally scopes the handler key by the request's cookies and headers.
1508
+ const { implementationPart, runtimeEnvVarStateHash } = await computeCacheKeyImplementationPart(workStore, workUnitStore, id);
1509
+ const cacheKeyParts = [
1510
+ id,
1511
+ args,
1512
+ implementationPart
1513
+ ];
1514
+ const encodeCacheKeyParts = ()=>(0, _client.encodeReply)(cacheKeyParts, {
1515
+ temporaryReferences,
1516
+ signal: hangingInputAbortSignal
1517
+ });
1518
+ let encodedCacheKeyParts;
1519
+ switch(workUnitStore.type){
1520
+ case 'prerender-runtime':
1521
+ // A runtime prerender may be a runtime shell, which does not have access to
1522
+ // params/searchParams, so we want to apply the same dynamic access logic
1523
+ // as we do in static prerenders.
1524
+ // fallthrough
1525
+ case 'prerender':
1526
+ if (!isPageOrLayoutSegmentFunction) {
1527
+ // If the "use cache" function is not a page or layout segment
1528
+ // function, we need to track dynamic access already when encoding
1529
+ // the arguments. If params are passed explicitly into a "use cache"
1530
+ // function (as opposed to receiving them automatically in a page or
1531
+ // layout), we assume that the params are also accessed. This allows
1532
+ // us to abort early, and treat the function as dynamic, instead of
1533
+ // waiting for the timeout to be reached.
1534
+ const dynamicAccessStore = {
1535
+ abortController: new AbortController(),
1536
+ reason: null
1537
+ };
1538
+ encodedCacheKeyParts = await _dynamicaccessasyncstorageexternal.dynamicAccessAsyncStorage.run(dynamicAccessStore, encodeCacheKeyParts);
1539
+ if (dynamicAccessStore.abortController.signal.aborted) {
1540
+ const makeHangingPromise = dynamicAccessStore.reason === 'fallback-params' ? _dynamicrenderingutils.makeFallbackParamsHangingPromise : _dynamicrenderingutils.makeURLDataHangingPromise;
1541
+ return makeHangingPromise(workUnitStore.renderSignal, workStore.route, 'dynamic "use cache"', workUnitStore);
1542
+ }
1543
+ break;
1544
+ }
1545
+ // fallthrough
1546
+ case 'prerender-legacy':
1547
+ case 'request':
1548
+ // TODO(restart-on-cache-miss): We need to handle params/searchParams on page components.
1549
+ // the promises will be tasky, so `encodeCacheKeyParts` will not resolve in the static stage.
1550
+ // We have not started a cache read at this point, so we might just miss the cache completely.
1551
+ // fallthrough
1552
+ case 'cache':
1553
+ case 'private-cache':
1554
+ case 'unstable-cache':
1555
+ case 'build-time-generator':
1556
+ case undefined:
1557
+ encodedCacheKeyParts = await encodeCacheKeyParts();
1558
+ break;
1559
+ default:
1560
+ return workUnitStore;
1561
+ }
1562
+ // Probe path: we're running inside a pooled worker spawned by the dev
1563
+ // server to check whether a stalled cache fill would complete in an
1564
+ // isolated module scope. Skip the RDC / cache-handler / leader-election
1565
+ // machinery, call `generateCacheEntry` (same as a real cold fill), drain
1566
+ // the returned stream via `pendingCacheResult`, and apply the probe's own
1567
+ // timeout. The caller only cares whether the fill resolves; the result
1568
+ // value is discarded.
1569
+ //
1570
+ // Gated on `__NEXT_DEV_SERVER` so the entire branch — including its
1571
+ // `generateCacheEntry` call site and the threading of
1572
+ // `deadlockError` — drops out of the production runtime
1573
+ // bundle.
1574
+ if (process.env.__NEXT_DEV_SERVER && workStore.useCacheProbeMode) {
1575
+ // Both public and private caches probe via the same path. The worker
1576
+ // reconstructs real `headers` / `cookies` / `draftMode` from the
1577
+ // forwarded request snapshot, so private caches that legitimately read
1578
+ // those work in the probe just like in the real fill.
1579
+ const probeTimeoutMs = workStore.useCacheProbeMode.timeoutMs;
1580
+ // The deadlock error never gets thrown from inside the worker: the
1581
+ // worker's outer store has `cacheSignal: undefined`, so
1582
+ // `generateCacheEntryImpl` skips the dev-request branch and the idle
1583
+ // probe is never set up.
1584
+ const result = await generateCacheEntry(workStore, cacheContext, clientReferenceManifest, encodedCacheKeyParts, fn, timeoutError, undefined);
1585
+ if (result.type === 'prerender-dynamic') {
1586
+ // Unreachable in the probe: outer store is `'request'`-typed, which
1587
+ // never produces this variant.
1588
+ throw new _invarianterror.InvariantError('Unexpected `prerender-dynamic` result in `use cache` probe mode.');
1589
+ }
1590
+ // We don't consume the returned stream — `pendingCacheResult` is what
1591
+ // completes when `collectResult` has drained `savedStream`. Cancel the
1592
+ // unused copy so it doesn't buffer forever.
1593
+ result.stream.cancel().catch(()=>{});
1594
+ let probeTimeoutTimer;
1595
+ try {
1596
+ await Promise.race([
1597
+ result.pendingCacheResult,
1598
+ new Promise((_, reject)=>{
1599
+ probeTimeoutTimer = setTimeout(()=>reject(timeoutError), probeTimeoutMs);
1600
+ })
1601
+ ]);
1602
+ } finally{
1603
+ if (probeTimeoutTimer !== undefined) {
1604
+ clearTimeout(probeTimeoutTimer);
1605
+ }
1606
+ }
1607
+ return;
1608
+ }
1609
+ const serializedCacheKey = typeof encodedCacheKeyParts === 'string' ? // Convert it to an ArrayBuffer if it wants to.
1610
+ encodedCacheKeyParts : await encodeFormData(encodedCacheKeyParts);
1611
+ const rootParams = workUnitStore.rootParams;
1612
+ const knownRootParamNames = knownRootParamsByFunctionId.get(id);
1613
+ // The coarse cache-handler key. With no root params read, it locates the
1614
+ // entry directly; otherwise it locates a redirect entry from which the
1615
+ // specific key (this key + root params, computed below) is derived. It's
1616
+ // scoped by runtime env var state and, for private caches in development
1617
+ // (persisted in the built-in in-memory handler), the request's cookies and
1618
+ // headers. Keys derived from it inherit that scoping.
1619
+ const cacheHandlerKeyBase = serializedCacheKey + (runtimeEnvVarStateHash ?? '') + (process.env.__NEXT_DEV_SERVER && cacheContext.kind === 'private' ? computePrivateCacheKeyRequestSuffix(cacheContext.outerWorkUnitStore.cookies, cacheContext.outerWorkUnitStore.headers) : '');
1620
+ // If we already know which root params this function reads, include them in
1621
+ // the cache handler key for a direct hit (skipping the redirect entry).
1622
+ // rootParams is undefined when nested inside unstable_cache.
1623
+ let cacheHandlerKey = knownRootParamNames && rootParams ? cacheHandlerKeyBase + computeRootParamsCacheKeySuffix(rootParams, knownRootParamNames) : cacheHandlerKeyBase;
1624
+ let stream = undefined;
1625
+ // Set when a short-lived cache hit ends its cache read up front (dev only) so
1626
+ // the static-shell boundary doesn't count it as a phantom miss. Once set, the
1627
+ // cache signal read is balanced, so serving must use a plain stream and skip
1628
+ // any trailing cacheSignal.endRead() call.
1629
+ let cacheSignalReadEnded = false;
1630
+ const resumeDataCache = (0, _workunitasyncstorageexternal.getResumeDataCache)(workUnitStore);
1631
+ const implicitTags = ((_workUnitStore_implicitTags = workUnitStore.implicitTags) == null ? void 0 : _workUnitStore_implicitTags.tags) ?? [];
1632
+ if (resumeDataCache) {
1633
+ // If this cache key was already determined to be dynamic during the
1634
+ // prospective prerender (e.g. because it accessed fallback params), we
1635
+ // return a hanging promise early to avoid trying to regenerate the entry,
1636
+ // which would be aborted anyway.
1637
+ let rdcEntry = resumeDataCache.cache.get(serializedCacheKey);
1638
+ if (rdcEntry === _cachestore.FALLBACK_PARAMS || rdcEntry === _cachestore.RUNTIME_DATA || rdcEntry === _cachestore.SESSION_DATA) {
1639
+ switch(workUnitStore.type){
1640
+ case 'prerender':
1641
+ case 'prerender-runtime':
1642
+ {
1643
+ let makeHangingPromise;
1644
+ if (rdcEntry === _cachestore.FALLBACK_PARAMS) {
1645
+ makeHangingPromise = _dynamicrenderingutils.makeFallbackParamsHangingPromise;
1646
+ } else if (rdcEntry === _cachestore.SESSION_DATA) {
1647
+ makeHangingPromise = _dynamicrenderingutils.makeSessionDataHangingPromise;
1648
+ } else {
1649
+ makeHangingPromise = _dynamicrenderingutils.makeURLDataHangingPromise;
1650
+ }
1651
+ return makeHangingPromise(workUnitStore.renderSignal, workStore.route, 'dynamic "use cache"', workUnitStore);
1652
+ }
1653
+ case 'prerender-legacy':
1654
+ case 'request':
1655
+ case 'cache':
1656
+ case 'private-cache':
1657
+ case 'unstable-cache':
1658
+ case 'build-time-generator':
1659
+ break;
1660
+ default:
1661
+ workUnitStore;
1662
+ }
1663
+ // Requests may receive the in-memory cache too. Unlike a prerender, they
1664
+ // can resolve these holes, so treat a marker as an ordinary cache miss.
1665
+ rdcEntry = undefined;
1666
+ }
1667
+ const cacheSignal = (0, _workunitasyncstorageexternal.getCacheSignal)(workUnitStore);
1668
+ if (cacheSignal) {
1669
+ cacheSignal.beginRead();
1670
+ }
1671
+ if (rdcEntry !== undefined) {
1672
+ let rdcResult = await rdcEntry;
1673
+ // Check if the RDC entry should be discarded due to recently revalidated
1674
+ // tags. When a server action calls updateTag(), the re-render should see
1675
+ // fresh data instead of stale RDC data.
1676
+ if (rdcResult !== undefined) {
1677
+ const { timestamp } = rdcResult.entry;
1678
+ if (rdcResult.entry.tags.some((tag)=>isRevalidatedAfter(tag, timestamp, workStore, logPrefix)) || implicitTags.some((tag)=>isRevalidatedAfter(tag, timestamp, workStore, logPrefix))) {
1679
+ debug == null ? void 0 : debug(logPrefix, 'discarding RDC entry due to recently revalidated tags', serializedCacheKey);
1680
+ rdcResult = undefined;
1681
+ }
1682
+ }
1683
+ if (rdcResult !== undefined) {
1684
+ if (rdcResult.entry.revalidate === 0 || rdcResult.entry.expire < _constants.MIN_PRERENDERABLE_EXPIRE) {
1685
+ // The nested-cache error only makes sense when a dynamic nested cache
1686
+ // actually shortened an outer cache that has no explicit `cacheLife`
1687
+ // (`dynamicNestedCacheError` is set), and only when the app's default
1688
+ // profile is itself prerenderable. If the default profile is already
1689
+ // dynamic (`revalidate: 0` or an `expire` under the prerenderable
1690
+ // minimum), every cache is omitted from prerenders by default, so
1691
+ // there is no silent degradation to warn about. A short life from the
1692
+ // default profile, or from a dev private cache's self-imposed
1693
+ // `revalidate: 0` (which never carries a nested error), therefore
1694
+ // stays a dynamic hole rather than erroring.
1695
+ const defaultCacheLife = workStore.cacheLifeProfiles.default;
1696
+ const shouldReportNestedCacheError = rdcResult.dynamicNestedCacheError !== undefined && defaultCacheLife.revalidate !== 0 && defaultCacheLife.expire >= _constants.MIN_PRERENDERABLE_EXPIRE;
1697
+ switch(workUnitStore.type){
1698
+ case 'prerender':
1699
+ // In a Dynamic I/O prerender, if the cache entry has
1700
+ // revalidate: 0 or if the expire time is under 5 minutes,
1701
+ // then we consider this cache entry dynamic as it's not worth
1702
+ // generating static pages for such data. It's better to leave
1703
+ // a dynamic hole that can be filled in during the resume with
1704
+ // a potentially cached entry.
1705
+ if (rdcResult.entry.revalidate === 0) {
1706
+ if (rdcResult.hasExplicitRevalidate === false && shouldReportNestedCacheError) {
1707
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createNestedCacheZeroRevalidateError)(workStore.route, rdcResult.dynamicNestedCacheError));
1708
+ }
1709
+ debug == null ? void 0 : debug(logPrefix, 'omitting entry', serializedCacheKey, 'from static shell due to revalidate: 0');
1710
+ } else {
1711
+ if (rdcResult.hasExplicitExpire === false && shouldReportNestedCacheError) {
1712
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createNestedCacheShortExpireError)(workStore.route, rdcResult.dynamicNestedCacheError));
1713
+ }
1714
+ debug == null ? void 0 : debug(logPrefix, 'omitting entry', serializedCacheKey, 'from static shell due to short expire value:', rdcResult.entry.expire);
1715
+ }
1716
+ if (cacheSignal) {
1717
+ cacheSignal.endRead();
1718
+ }
1719
+ // The entry is only excluded from *static* prerenders — the
1720
+ // 'prerender-runtime' case below serves it.
1721
+ // TODO(app-shells): Does this handle the MIN_SHELL_STALE case below correctly?
1722
+ return (0, _dynamicrenderingutils.makeSessionDataHangingPromise)(workUnitStore.renderSignal, workStore.route, 'dynamic "use cache"', workUnitStore);
1723
+ case 'prerender-runtime':
1724
+ {
1725
+ // In the final phase of a runtime prerender, we have to make
1726
+ // sure that APIs that would hang during a static prerender
1727
+ // are resolved with a delay, in the appropriate runtime stage.
1728
+ const stagedRendering = workUnitStore.stagedRendering;
1729
+ if (stagedRendering) {
1730
+ await stagedRendering.waitForStage(_dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.sessionData);
1731
+ }
1732
+ break;
1733
+ }
1734
+ case 'request':
1735
+ {
1736
+ if (isValidationRender(workUnitStore)) {
1737
+ // These throws force an explicit cache life decision on an
1738
+ // outer cache that a nested cache would otherwise silently
1739
+ // shorten (see `shouldReportNestedCacheError` above). Otherwise
1740
+ // the short-lived entry is deferred as a dynamic hole below.
1741
+ if (rdcResult.entry.revalidate === 0 && rdcResult.hasExplicitRevalidate === false && shouldReportNestedCacheError) {
1742
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createNestedCacheZeroRevalidateError)(workStore.route, rdcResult.dynamicNestedCacheError));
1743
+ }
1744
+ if (rdcResult.entry.expire < _constants.MIN_PRERENDERABLE_EXPIRE && rdcResult.hasExplicitExpire === false && shouldReportNestedCacheError) {
1745
+ throw wrapAsInvalidDynamicUsageError((0, _usecachemessages.createNestedCacheShortExpireError)(workStore.route, rdcResult.dynamicNestedCacheError));
1746
+ }
1747
+ // A short-lived entry is a dynamic hole, excluded from the
1748
+ // static shell, so we end the cache signal read here (the
1749
+ // prerender case does the same) to avoid this cache hit being
1750
+ // considered a cache miss when checking for pending cache reads
1751
+ // at staged rendering task boundaries. The value is deferred to
1752
+ // the runtime stage.
1753
+ if (cacheSignal && !cacheSignalReadEnded) {
1754
+ cacheSignal.endRead();
1755
+ cacheSignalReadEnded = true;
1756
+ }
1757
+ await (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(undefined, workUnitStore, _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.sessionData);
1758
+ }
1759
+ break;
1760
+ }
1761
+ case 'prerender-legacy':
1762
+ case 'cache':
1763
+ case 'private-cache':
1764
+ case 'unstable-cache':
1765
+ case 'build-time-generator':
1766
+ break;
1767
+ default:
1768
+ workUnitStore;
1769
+ }
1770
+ }
1771
+ if (rdcResult.entry.stale < _constants.MIN_SHELL_STALE) {
1772
+ // The entry's stale time is short enough that it's excluded from
1773
+ // shells. If it's below `MIN_PREFETCHABLE_STALE`, it's not worth
1774
+ // prefetching at all and is excluded from prerenders entirely,
1775
+ // leaving a dynamic hole that can be filled during the navigation.
1776
+ // Otherwise, it's still included in prerenders and cached
1777
+ // navigations, but it must not be part of an App Shell, which may
1778
+ // be reused on the client for longer than the entry's stale time.
1779
+ // We delay the entry to resolve in the post-shell (link data)
1780
+ // stage, which excludes both its content and its stale time from
1781
+ // the shell.
1782
+ const isPrefetchable = rdcResult.entry.stale >= _constants.MIN_PREFETCHABLE_STALE;
1783
+ switch(workUnitStore.type){
1784
+ case 'prerender':
1785
+ case 'prerender-runtime':
1786
+ {
1787
+ const prerenderStore = workUnitStore;
1788
+ if (!isPrefetchable) {
1789
+ debug == null ? void 0 : debug(logPrefix, 'omitting entry', serializedCacheKey, 'from shell due to short stale value:', rdcResult.entry.stale);
1790
+ if (cacheSignal) {
1791
+ cacheSignal.endRead();
1792
+ }
1793
+ // An unprefetchable entry (stale < MIN_PREFETCHABLE_STALE) is
1794
+ // excluded from all prerenders.
1795
+ return (0, _dynamicrenderingutils.makeDynamicHangingPromise)(prerenderStore.renderSignal, workStore.route, 'dynamic "use cache"');
1796
+ } else {
1797
+ // This entry is prefetchable, but exluded from shells.
1798
+ const stagedRendering = prerenderStore.stagedRendering;
1799
+ if (stagedRendering === null) {
1800
+ // Prospective prerender (no staging): do not delay, because if we didn't
1801
+ // have this entry in the RDC already, we wouldn't delay it either.
1802
+ } else {
1803
+ // Final prerender (with staging).
1804
+ // This entry cannot be part of the shell, so we delay it to the prefetch.
1805
+ let prefetchStage;
1806
+ if (prerenderStore.type === 'prerender') {
1807
+ prefetchStage = _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.staticUrlData.static;
1808
+ } else {
1809
+ prefetchStage = _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.runtimeUrlData;
1810
+ }
1811
+ if (// If the prerender ends before the prefetch stage (because
1812
+ // render that only produces an App Shell), this cache
1813
+ // should be omitted entirely.
1814
+ stagedRendering.finalStage !== null && stagedRendering.finalStage < prefetchStage) {
1815
+ debug == null ? void 0 : debug(logPrefix, 'omitting entry', serializedCacheKey, 'from shell due to short stale value:', rdcResult.entry.stale);
1816
+ if (cacheSignal) {
1817
+ cacheSignal.endRead();
1818
+ }
1819
+ // The entry was omitted only because this prerender ends
1820
+ // before the prefetch stage. Neither static nor runtime
1821
+ // app shells include it, so it does not count as a runtime
1822
+ // data access.
1823
+ return (0, _dynamicrenderingutils.makePrefetchHangingPromise)(prerenderStore.renderSignal, workStore.route, 'dynamic "use cache"');
1824
+ } else {
1825
+ debug == null ? void 0 : debug(logPrefix, 'delaying entry', serializedCacheKey, 'until the prefetch stage due to short stale value:', rdcResult.entry.stale);
1826
+ await stagedRendering.waitForStage(prefetchStage);
1827
+ }
1828
+ }
1829
+ }
1830
+ break;
1831
+ }
1832
+ case 'request':
1833
+ {
1834
+ if (isValidationRender(workUnitStore)) {
1835
+ // End the cache signal read (once, in case an earlier block
1836
+ // already did) so the delayed value isn't counted as a pending
1837
+ // read at a staged rendering boundary.
1838
+ if (cacheSignal && !cacheSignalReadEnded) {
1839
+ cacheSignal.endRead();
1840
+ cacheSignalReadEnded = true;
1841
+ }
1842
+ let stage;
1843
+ if (!isPrefetchable) {
1844
+ // An unprefetchable entry is excluded from prerenders, so it
1845
+ // resolves in the dynamic stage.
1846
+ stage = _stagedrendering.RenderStage.Dynamic;
1847
+ } else {
1848
+ // If the entry would be be excluded from the shell, treat it as
1849
+ // if it were static URL data.
1850
+ // (Note that this is still correct without PPF or in static shell validation,
1851
+ // where we don't use runtime shells and include static URL data)
1852
+ (0, _dynamicrenderingutils.trackIncompatibleShellContent)(workUnitStore, '"use cache" excluded from app shells due to a short staletime');
1853
+ stage = _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.staticUrlData[workUnitStore.needsRuntimeShell ? 'runtime' : 'static'];
1854
+ }
1855
+ debug == null ? void 0 : debug(logPrefix, 'delaying entry', serializedCacheKey, `until after the ${_stagedrendering.RenderStage[stage]} stage due to short stale value:`, rdcResult.entry.stale);
1856
+ await (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(undefined, workUnitStore, stage);
1857
+ }
1858
+ break;
1859
+ }
1860
+ case 'prerender-legacy':
1861
+ case 'cache':
1862
+ case 'private-cache':
1863
+ case 'unstable-cache':
1864
+ case 'build-time-generator':
1865
+ break;
1866
+ default:
1867
+ workUnitStore;
1868
+ }
1869
+ }
1870
+ }
1871
+ if (rdcResult !== undefined) {
1872
+ debug == null ? void 0 : debug(logPrefix, 'Resume Data Cache entry found', serializedCacheKey);
1873
+ if (rdcResult.readRootParamNames && rdcResult.readRootParamNames.size > 0) {
1874
+ addKnownRootParamNames(id, rdcResult.readRootParamNames);
1875
+ }
1876
+ // We want to make sure we only propagate cache life & tags if the
1877
+ // entry was *not* omitted from the prerender. So we only do this
1878
+ // after the above early returns.
1879
+ propagateCacheEntryMetadata(cacheContext, {
1880
+ tags: rdcResult.entry.tags,
1881
+ revalidate: rdcResult.entry.revalidate,
1882
+ expire: rdcResult.entry.expire,
1883
+ stale: rdcResult.entry.stale,
1884
+ timestamp: rdcResult.entry.timestamp,
1885
+ hasExplicitRevalidate: rdcResult.hasExplicitRevalidate,
1886
+ hasExplicitExpire: rdcResult.hasExplicitExpire,
1887
+ readRootParamNames: rdcResult.readRootParamNames,
1888
+ dynamicNestedCacheError: rdcResult.dynamicNestedCacheError
1889
+ });
1890
+ const [streamA, streamB] = rdcResult.entry.value.tee();
1891
+ rdcResult.entry.value = streamB;
1892
+ if (cacheSignal && !cacheSignalReadEnded) {
1893
+ // When we have a cacheSignal we need to block on reading the cache
1894
+ // entry before ending the read.
1895
+ stream = createTrackedReadableStream(streamA, cacheSignal);
1896
+ } else {
1897
+ // The cache signal read was already ended for a short-lived deferral
1898
+ // (or there is no cacheSignal), so serve a plain stream.
1899
+ stream = streamA;
1900
+ }
1901
+ } else {
1902
+ // Entry was discarded (e.g. due to recently revalidated tags)
1903
+ debug == null ? void 0 : debug(logPrefix, 'Resume Data Cache entry discarded', serializedCacheKey);
1904
+ if (cacheSignal) {
1905
+ cacheSignal.endRead();
1906
+ }
1907
+ }
1908
+ } else {
1909
+ debug == null ? void 0 : debug(logPrefix, 'Resume Data Cache entry not found', serializedCacheKey, `(${resumeDataCache.cache.size} entries)`);
1910
+ if (cacheSignal) {
1911
+ cacheSignal.endRead();
1912
+ }
1913
+ switch(workUnitStore.type){
1914
+ case 'prerender':
1915
+ if ((resumeDataCache == null ? void 0 : resumeDataCache.mutable) === false) {
1916
+ // We're prerendering a fallback shell whose Resume Data Cache is
1917
+ // the prefilled, read-only seed from a phase-1 prerender of a more-
1918
+ // specific sibling route. A miss here means the cache key depends
1919
+ // on a fallback param. We short-circuit to a dynamic hole (which
1920
+ // may produce an empty shell if there's no parent Suspense
1921
+ // boundary). Currently this also catches layouts and pages that
1922
+ // don't read params, which will be improved when we implement
1923
+ // NAR-136. Compared to the instrumentation-based params bailout we
1924
+ // also do here, this covers the case where params are transformed
1925
+ // with an async function before being passed into the "use cache"
1926
+ // function, which escapes the instrumentation.
1927
+ // The cache key depends on fallback params, which are URL data.
1928
+ return (0, _dynamicrenderingutils.makeURLDataHangingPromise)(workUnitStore.renderSignal, workStore.route, 'dynamic "use cache"', workUnitStore);
1929
+ }
1930
+ // fallthrough
1931
+ case 'prerender-runtime':
1932
+ if (!cacheSignal) {
1933
+ // This is the final prerender (cacheSignal is null), which means
1934
+ // all caches should have been warmed during the prospective
1935
+ // prerender. A cache miss here indicates that the cache key is
1936
+ // non-deterministic (e.g. due to unstable array order in the
1937
+ // arguments). Known dynamic keys (e.g. from fallback params) are
1938
+ // already handled by the early return above. We return a hanging
1939
+ // promise so this becomes a dynamic hole rather than generating a
1940
+ // broken cache entry that gets aborted.
1941
+ console.warn(new _usecacheerrors.UnexpectedCacheMissError(workStore.route));
1942
+ // This is an anomaly (non-deterministic cache key), so we can't
1943
+ // know whether a runtime prerender would resolve it.
1944
+ return (0, _dynamicrenderingutils.makeUnknownRuntimeDataHangingPromise)(workUnitStore.renderSignal, workStore.route, 'dynamic "use cache"', workUnitStore);
1945
+ }
1946
+ break;
1947
+ case 'prerender-legacy':
1948
+ case 'request':
1949
+ case 'cache':
1950
+ case 'private-cache':
1951
+ case 'unstable-cache':
1952
+ case 'build-time-generator':
1953
+ break;
1954
+ default:
1955
+ workUnitStore;
1956
+ }
1957
+ }
1958
+ }
1959
+ // Intra-request deduplication: Within a single request, root params are
1960
+ // fixed, so the coarse key (serializedCacheKey) is sufficient. If another
1961
+ // invocation in this request is already handling the same cache entry
1962
+ // (including the cache handler lookup and generation), we join it instead of
1963
+ // doing redundant work. This also saves cache handler `get` calls which may
1964
+ // be HTTP round-trips for remote handlers.
1965
+ if (stream === undefined) {
1966
+ var _workStore_pendingCacheInvocations, _workStore_completedCacheInvocations;
1967
+ const pendingInvocation = (_workStore_pendingCacheInvocations = workStore.pendingCacheInvocations) == null ? void 0 : _workStore_pendingCacheInvocations.get(serializedCacheKey);
1968
+ // A pending invocation is joined unconditionally: its fill is shared, so
1969
+ // every joiner receives whatever that fill produces. A completed one is a
1970
+ // stored entry instead, so it is only reused when the caller hasn't asked
1971
+ // to bypass caches, and only if nothing has invalidated it since.
1972
+ const completedInvocation = pendingInvocation === undefined && !shouldForceRevalidate(workStore, workUnitStore) ? (_workStore_completedCacheInvocations = workStore.completedCacheInvocations) == null ? void 0 : _workStore_completedCacheInvocations.get(serializedCacheKey) : undefined;
1973
+ const joinedInvocation = pendingInvocation ?? completedInvocation;
1974
+ if (joinedInvocation) {
1975
+ const cacheSignal = (0, _workunitasyncstorageexternal.getCacheSignal)(workUnitStore);
1976
+ cacheSignal == null ? void 0 : cacheSignal.beginRead();
1977
+ debug == null ? void 0 : debug(logPrefix, 'joining intra-request invocation', serializedCacheKey);
1978
+ const sharedCacheResult = await joinedInvocation;
1979
+ if (sharedCacheResult.type === 'prerender-dynamic') {
1980
+ debug == null ? void 0 : debug(logPrefix, 'joined invocation is prerender-dynamic', serializedCacheKey);
1981
+ if (resumeDataCache == null ? void 0 : resumeDataCache.mutable) {
1982
+ // A nested-cache leader has no RDC. This consumer must carry the
1983
+ // omission reason into the final prerender instead of leaving an
1984
+ // unexplained miss that loses the fallback's prefetch hint.
1985
+ resumeDataCache.cache.set(serializedCacheKey, sharedCacheResult.reason);
1986
+ }
1987
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
1988
+ return sharedCacheResult.hangingPromise;
1989
+ }
1990
+ // A completed entry may have been invalidated since it was produced, by
1991
+ // an `updateTag()` in a server action earlier in this request. The
1992
+ // implicit tags expiration is passed as 0 because it cannot apply to a
1993
+ // retained entry: it is memoized for the request, so re-checking it
1994
+ // against an unchanged entry timestamp only repeats the answer the leader
1995
+ // already got.
1996
+ const metadata = completedInvocation === undefined ? undefined : await sharedCacheResult.entry.pendingMetadata;
1997
+ if (metadata !== undefined && shouldDiscardCacheEntry(metadata, workStore, workUnitStore, implicitTags, 0, logPrefix)) {
1998
+ var _workStore_completedCacheInvocations1;
1999
+ debug == null ? void 0 : debug(logPrefix, 'discarding completed invocation', serializedCacheKey);
2000
+ (_workStore_completedCacheInvocations1 = workStore.completedCacheInvocations) == null ? void 0 : _workStore_completedCacheInvocations1.delete(serializedCacheKey);
2001
+ // This can take the signal's count to zero. The leader path below opens
2002
+ // a read again synchronously, before it awaits anything, which is what
2003
+ // stops a prerender from concluding that every cache read has settled
2004
+ // while a fill is still about to start.
2005
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
2006
+ } else {
2007
+ debug == null ? void 0 : debug(logPrefix, 'joined invocation resolved with cached entry', serializedCacheKey);
2008
+ stream = serveJoinedCacheEntry(sharedCacheResult.entry, serializedCacheKey, resumeDataCache, cacheContext, cacheSignal, logPrefix);
2009
+ }
2010
+ }
2011
+ }
2012
+ // Leader path: no pending intra-request invocation found. Check for a
2013
+ // cross-request pending invocation, or become the leader for both.
2014
+ if (stream === undefined) {
2015
+ const resolvableSharedCacheResult = new ResolvableSharedCacheResult();
2016
+ debug == null ? void 0 : debug(logPrefix, 'registering as intra-request invocation leader', serializedCacheKey);
2017
+ const intraRequestPendingCacheInvocations = workStore.pendingCacheInvocations ??= new Map();
2018
+ // Retain the completed entry for the rest of the request where a later
2019
+ // invocation would otherwise repeat real work: private caches have no cache
2020
+ // handler to fall back on in production, and a platform- or config-supplied
2021
+ // handler may be remote, so a second `get` can be a round trip. A built-in
2022
+ // handler read is a map lookup, so retaining its entries would hold a
2023
+ // forked stream buffer for nothing.
2024
+ const completedCacheInvocations = isPrivate || !(0, _handlers.isBuiltInCacheHandler)(kind) ? workStore.completedCacheInvocations ??= new Map() : undefined;
2025
+ resolvableSharedCacheResult.registerIn(intraRequestPendingCacheInvocations, serializedCacheKey, completedCacheInvocations);
2026
+ // Cross-request deduplication lets concurrent requests for the same key
2027
+ // share a single fill. Private caches are skipped in production, where they
2028
+ // hold request-specific data that must not be shared across requests. In
2029
+ // development they're persisted and keyed by the request's cookies and
2030
+ // headers, so concurrent requests with identical request data should share
2031
+ // a fill too; that request-scoped `cacheHandlerKey` keeps requests with
2032
+ // different cookies or headers in separate entries.
2033
+ //
2034
+ // Draft mode requests are skipped as well, in both directions. A fill that
2035
+ // runs with draft mode enabled can contain unpublished content, so it must
2036
+ // not be registered for other requests to join. And a draft mode request
2037
+ // must not join a pending public fill, because it would be served the
2038
+ // published content instead of the draft.
2039
+ const skipCrossRequestDedupe = isPrivate && !process.env.__NEXT_DEV_SERVER || workStore.isDraftMode;
2040
+ try {
2041
+ // The loop handles cross-request root param mismatches: when a
2042
+ // cross-request joiner discovers that the leader's root params differ
2043
+ // from its own, it retries with a recomputed cacheHandlerKey. The loop
2044
+ // exits when stream is assigned (cross-request joiner match or leader
2045
+ // path) or via early return (prerender-dynamic).
2046
+ while(stream === undefined){
2047
+ const crossRequestPendingCacheInvocation = skipCrossRequestDedupe ? undefined : crossRequestPendingCacheInvocations.get(cacheHandlerKey);
2048
+ if (crossRequestPendingCacheInvocation) {
2049
+ const cacheSignal = (0, _workunitasyncstorageexternal.getCacheSignal)(workUnitStore);
2050
+ cacheSignal == null ? void 0 : cacheSignal.beginRead();
2051
+ debug == null ? void 0 : debug(logPrefix, 'joining pending cross-request invocation', cacheHandlerKey);
2052
+ const sharedCacheResult = await crossRequestPendingCacheInvocation;
2053
+ if (sharedCacheResult.type === 'cached') {
2054
+ // Verify root params before forking the stream. The shared
2055
+ // invocation must complete first, including collection and write
2056
+ // settlement. A changed key retries the handler lookup, which must
2057
+ // not run before the write settles.
2058
+ const metadata = await sharedCacheResult.entry.pendingCompletion;
2059
+ // Ensure known root param names are up-to-date before verifying the
2060
+ // key, since the leader's save path may not have updated them yet
2061
+ // at this point.
2062
+ if (metadata.readRootParamNames) {
2063
+ addKnownRootParamNames(id, metadata.readRootParamNames);
2064
+ }
2065
+ const updatedRootParamNames = knownRootParamsByFunctionId.get(id);
2066
+ if (updatedRootParamNames && rootParams) {
2067
+ const newCacheHandlerKey = cacheHandlerKeyBase + computeRootParamsCacheKeySuffix(rootParams, updatedRootParamNames);
2068
+ if (newCacheHandlerKey !== cacheHandlerKey) {
2069
+ debug == null ? void 0 : debug(logPrefix, 'cross-request root param mismatch, retrying', cacheHandlerKey, '→', newCacheHandlerKey);
2070
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
2071
+ cacheHandlerKey = newCacheHandlerKey;
2072
+ continue; // stream is not used → retry with new key
2073
+ }
2074
+ }
2075
+ // Key matches — safe to fork.
2076
+ debug == null ? void 0 : debug(logPrefix, 'cross-request invocation matched, forking result', cacheHandlerKey);
2077
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
2078
+ stream = sharedCacheResult.entry.fork();
2079
+ maybePropagateCacheEntryMetadata(cacheContext, metadata);
2080
+ // The cross-request leader belongs to a different request with its
2081
+ // own RDC. Save to this request's RDC so its final prerender can
2082
+ // resume from the entry.
2083
+ saveSharedCacheEntryToResumeDataCache(serializedCacheKey, sharedCacheResult.entry, resumeDataCache, logPrefix);
2084
+ // Resolve for intra-request joiners in this request. They get
2085
+ // a fork from the same SharedCacheEntry.
2086
+ resolvableSharedCacheResult.resolve(sharedCacheResult);
2087
+ break;
2088
+ } else {
2089
+ // prerender-dynamic — same root param check before hanging
2090
+ const updatedRootParamNames = knownRootParamsByFunctionId.get(id);
2091
+ if (updatedRootParamNames && rootParams) {
2092
+ const newCacheHandlerKey = cacheHandlerKeyBase + computeRootParamsCacheKeySuffix(rootParams, updatedRootParamNames);
2093
+ if (newCacheHandlerKey !== cacheHandlerKey) {
2094
+ debug == null ? void 0 : debug(logPrefix, 'cross-request root param mismatch, retrying', cacheHandlerKey, '→', newCacheHandlerKey);
2095
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
2096
+ cacheHandlerKey = newCacheHandlerKey;
2097
+ continue;
2098
+ }
2099
+ }
2100
+ debug == null ? void 0 : debug(logPrefix, 'cross-request invocation is prerender-dynamic', cacheHandlerKey);
2101
+ if (resumeDataCache == null ? void 0 : resumeDataCache.mutable) {
2102
+ resumeDataCache.cache.set(serializedCacheKey, sharedCacheResult.reason);
2103
+ }
2104
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
2105
+ resolvableSharedCacheResult.resolve(sharedCacheResult);
2106
+ return sharedCacheResult.hangingPromise;
2107
+ }
2108
+ }
2109
+ // No pending cross-request invocation — become the leader.
2110
+ if (!skipCrossRequestDedupe) {
2111
+ debug == null ? void 0 : debug(logPrefix, 'registering as cross-request invocation leader', cacheHandlerKey);
2112
+ resolvableSharedCacheResult.registerIn(crossRequestPendingCacheInvocations, cacheHandlerKey);
2113
+ }
2114
+ const cacheSignal = (0, _workunitasyncstorageexternal.getCacheSignal)(workUnitStore);
2115
+ if (cacheSignal) {
2116
+ // Either the cache handler or the generation can be using I/O at this
2117
+ // point. We need to track when they start and when they complete.
2118
+ cacheSignal.beginRead();
2119
+ }
2120
+ const lazyRefreshTags = workStore.refreshTagsByCacheKind.get(kind);
2121
+ if (lazyRefreshTags && !(0, _lazyresult.isResolvedLazyResult)(lazyRefreshTags)) {
2122
+ await lazyRefreshTags;
2123
+ }
2124
+ let entry;
2125
+ let observedRevalidation;
2126
+ // We ignore existing cache entries when force revalidating.
2127
+ if (cacheHandler && !shouldForceRevalidate(workStore, workUnitStore)) {
2128
+ // Record an existing revalidation before `get()` so a stale result
2129
+ // does not start another revalidation. The existing revalidation may
2130
+ // finish and remove its map entry before the lookup returns.
2131
+ observedRevalidation = backgroundRevalidations.get(cacheHandlerKey);
2132
+ entry = await cacheHandler.get(cacheHandlerKey, implicitTags);
2133
+ // Check if this is a redirect entry (coarse key → specific key).
2134
+ // Redirect entries have private tags encoding the root param names
2135
+ // (one tag per param name, prefixed with _N_RP_).
2136
+ if (entry && rootParams) {
2137
+ const paramNames = new Set();
2138
+ for (const tag of entry.tags){
2139
+ if (tag.startsWith(_constants1.NEXT_CACHE_ROOT_PARAM_TAG_ID)) {
2140
+ paramNames.add(tag.slice(_constants1.NEXT_CACHE_ROOT_PARAM_TAG_ID.length));
2141
+ }
2142
+ }
2143
+ if (paramNames.size > 0) {
2144
+ addKnownRootParamNames(id, paramNames);
2145
+ cacheHandlerKey = cacheHandlerKeyBase + computeRootParamsCacheKeySuffix(rootParams, paramNames);
2146
+ observedRevalidation = backgroundRevalidations.get(cacheHandlerKey);
2147
+ entry = await cacheHandler.get(cacheHandlerKey, implicitTags);
2148
+ }
2149
+ }
2150
+ }
2151
+ if (entry) {
2152
+ let implicitTagsExpiration = 0;
2153
+ if (workUnitStore.implicitTags) {
2154
+ const lazyExpiration = workUnitStore.implicitTags.expirationsByCacheKind.get(kind);
2155
+ if (lazyExpiration) {
2156
+ const expiration = (0, _lazyresult.isResolvedLazyResult)(lazyExpiration) ? lazyExpiration.value : await lazyExpiration;
2157
+ // If a cache handler returns an expiration time of Infinity, it
2158
+ // signals to Next.js that it handles checking cache entries for
2159
+ // staleness based on the expiration of the implicit tags passed
2160
+ // into the `get` method. In this case, we keep the default of 0,
2161
+ // which means that the implicit tags are not considered expired.
2162
+ if (expiration < Infinity) {
2163
+ implicitTagsExpiration = expiration;
2164
+ }
2165
+ }
2166
+ }
2167
+ if (shouldDiscardCacheEntry(entry, workStore, workUnitStore, implicitTags, implicitTagsExpiration, logPrefix)) {
2168
+ debug == null ? void 0 : debug(logPrefix, 'discarding expired entry', cacheHandlerKey);
2169
+ entry = undefined;
2170
+ }
2171
+ }
2172
+ const currentTime = performance.timeOrigin + performance.now();
2173
+ if (entry !== undefined && (entry.revalidate === 0 || entry.expire < _constants.MIN_PRERENDERABLE_EXPIRE)) {
2174
+ switch(workUnitStore.type){
2175
+ case 'prerender':
2176
+ // In a Dynamic I/O prerender, if the cache entry has revalidate:
2177
+ // 0 or if the expire time is under 5 minutes, then we consider
2178
+ // this cache entry dynamic as it's not worth generating static
2179
+ // pages for such data. It's better to leave a dynamic hole that
2180
+ // can be filled in during the resume with a potentially cached
2181
+ // entry.
2182
+ if (entry.revalidate === 0) {
2183
+ debug == null ? void 0 : debug(logPrefix, 'omitting entry', cacheHandlerKey, 'from static shell due to revalidate: 0');
2184
+ } else {
2185
+ debug == null ? void 0 : debug(logPrefix, 'omitting entry', cacheHandlerKey, 'from static shell due to short expire value:', entry.expire);
2186
+ }
2187
+ if (cacheSignal) {
2188
+ cacheSignal.endRead();
2189
+ }
2190
+ // The entry is only excluded from *static* prerenders. A runtime
2191
+ // shell or prefetch would include this content.
2192
+ // TODO(app-shells): Does this handle the MIN_SHELL_STALE case below correctly?
2193
+ const hangingPromise = (0, _dynamicrenderingutils.makeSessionDataHangingPromise)(workUnitStore.renderSignal, workStore.route, 'dynamic "use cache"', workUnitStore);
2194
+ debug == null ? void 0 : debug(logPrefix, 'leader resolved as prerender-dynamic', cacheHandlerKey);
2195
+ resolvableSharedCacheResult.resolve({
2196
+ type: 'prerender-dynamic',
2197
+ reason: _cachestore.SESSION_DATA,
2198
+ hangingPromise
2199
+ });
2200
+ return hangingPromise;
2201
+ case 'request':
2202
+ {
2203
+ if (isValidationRender(workUnitStore)) {
2204
+ // A short-lived entry is a dynamic hole, excluded from the
2205
+ // static shell, so we end the cache signal read here (the
2206
+ // prerender case does the same) to avoid this cache hit being
2207
+ // considered a cache miss when checking for pending cache reads
2208
+ // at staged rendering task boundaries. The value is deferred to
2209
+ // the runtime stage.
2210
+ if (cacheSignal && !cacheSignalReadEnded) {
2211
+ cacheSignal.endRead();
2212
+ cacheSignalReadEnded = true;
2213
+ }
2214
+ const stage = _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.sessionData;
2215
+ debug == null ? void 0 : debug(logPrefix, 'delaying entry', serializedCacheKey, `until after the ${_stagedrendering.RenderStage[stage]} stage due to short expire value:`, entry.expire);
2216
+ await (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(undefined, workUnitStore, _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.sessionData);
2217
+ }
2218
+ break;
2219
+ }
2220
+ case 'prerender-runtime':
2221
+ case 'prerender-legacy':
2222
+ case 'cache':
2223
+ case 'private-cache':
2224
+ case 'unstable-cache':
2225
+ case 'build-time-generator':
2226
+ break;
2227
+ default:
2228
+ workUnitStore;
2229
+ }
2230
+ }
2231
+ if (entry !== undefined && entry.stale < _constants.MIN_SHELL_STALE) {
2232
+ const isPrefetchable = entry.stale >= _constants.MIN_PREFETCHABLE_STALE;
2233
+ switch(workUnitStore.type){
2234
+ case 'request':
2235
+ {
2236
+ // Same as the resume data cache read path: the entry's stale
2237
+ // time is short enough that it's excluded from shells, or, if
2238
+ // it's below `MIN_PREFETCHABLE_STALE`, from prerenders
2239
+ // entirely.
2240
+ if (isValidationRender(workUnitStore)) {
2241
+ // End the cache signal read (once, in case the expire block
2242
+ // above already did) so the delayed value isn't counted as a
2243
+ // pending read at a staged rendering boundary.
2244
+ if (cacheSignal && !cacheSignalReadEnded) {
2245
+ cacheSignal.endRead();
2246
+ cacheSignalReadEnded = true;
2247
+ }
2248
+ let stage;
2249
+ if (!isPrefetchable) {
2250
+ // An unprefetchable entry is excluded from prerenders, so it
2251
+ // resolves in the dynamic stage.
2252
+ stage = _stagedrendering.RenderStage.Dynamic;
2253
+ } else {
2254
+ // If the entry would be be excluded from the shell, treat it as
2255
+ // if it were static URL data.
2256
+ // (Note that this is still correct without PPF or in static shell validation,
2257
+ // where we don't use runtime shells and include static URL data)
2258
+ (0, _dynamicrenderingutils.trackIncompatibleShellContent)(workUnitStore, '"use cache" excluded from app shells due to a short staletime');
2259
+ stage = _dynamicrenderingutils.RENDER_STAGES_BY_DATA_KIND.staticUrlData[workUnitStore.needsRuntimeShell ? 'runtime' : 'static'];
2260
+ }
2261
+ debug == null ? void 0 : debug(logPrefix, 'delaying entry', serializedCacheKey, `until after the ${_stagedrendering.RenderStage[stage]} stage due to short stale value:`, entry.stale);
2262
+ await (0, _dynamicrenderingutils.makeDevtoolsIOAwarePromise)(undefined, workUnitStore, stage);
2263
+ }
2264
+ break;
2265
+ }
2266
+ case 'prerender':
2267
+ case 'prerender-runtime':
2268
+ case 'prerender-legacy':
2269
+ case 'cache':
2270
+ case 'private-cache':
2271
+ case 'unstable-cache':
2272
+ case 'build-time-generator':
2273
+ break;
2274
+ default:
2275
+ workUnitStore;
2276
+ }
2277
+ }
2278
+ if (entry === undefined || // In dev, the built-in default handler retains a short-`expire` entry
2279
+ // for at least `MIN_PRERENDERABLE_EXPIRE`, both when used directly
2280
+ // and when fronting a custom cache handler. Apply that same minimum
2281
+ // here so the retained entry is served and re-warmed in the
2282
+ // background (below), rather than blocking to regenerate it on every
2283
+ // read. The entry's real `expire` is untouched, so staging still
2284
+ // treats it as dynamic.
2285
+ currentTime > entry.timestamp + (process.env.__NEXT_DEV_SERVER ? Math.max(entry.expire, _constants.MIN_PRERENDERABLE_EXPIRE) : entry.expire) * 1000 || (0, _workunitasyncstorageexternal.willConsumerServerCache)(workUnitStore) && currentTime > entry.timestamp + entry.revalidate * 1000) {
2286
+ // Miss. Generate a new result.
2287
+ // If the cache entry is stale and its consumer will persist the
2288
+ // result in a server cache, don't persist the stale entry into a new
2289
+ // cache. We're not time constrained here, so regenerate it now.
2290
+ // We need to run this inside a clean AsyncLocalStorage snapshot so
2291
+ // that the cache generation cannot read anything from the context
2292
+ // we're currently executing which might include request specific
2293
+ // things like cookies() inside a React.cache().
2294
+ // Note: It is important that we await at least once before this
2295
+ // because it lets us pop out of any stack specific contexts as well -
2296
+ // aka "Sync" Local Storage.
2297
+ if (entry) {
2298
+ if (currentTime > entry.timestamp + entry.expire * 1000) {
2299
+ debug == null ? void 0 : debug(logPrefix, 'entry is expired', cacheHandlerKey);
2300
+ }
2301
+ if ((0, _workunitasyncstorageexternal.willConsumerServerCache)(workUnitStore) && currentTime > entry.timestamp + entry.revalidate * 1000) {
2302
+ debug == null ? void 0 : debug(logPrefix, 'foreground revalidation, entry is stale', cacheHandlerKey);
2303
+ }
2304
+ }
2305
+ if (cacheSignal && cacheSignalReadEnded) {
2306
+ // A short-lived deferral above (a `revalidate` of zero or a short
2307
+ // expire, or a short stale time) already ended this read. We're now
2308
+ // regenerating the entry rather than serving it, and the generation
2309
+ // ends the read again once its entry is collected. Re-begin the
2310
+ // read here so the trailing `endRead` stays balanced instead of
2311
+ // over-decrementing the cache signal.
2312
+ cacheSignal.beginRead();
2313
+ cacheSignalReadEnded = false;
2314
+ }
2315
+ const result = await generateCacheEntry(workStore, cacheContext, clientReferenceManifest, encodedCacheKeyParts, fn, timeoutError, deadlockError);
2316
+ if (result.type === 'prerender-dynamic') {
2317
+ debug == null ? void 0 : debug(logPrefix, 'leader resolved as prerender-dynamic (generation)', cacheHandlerKey);
2318
+ if (resumeDataCache == null ? void 0 : resumeDataCache.mutable) {
2319
+ resumeDataCache.cache.set(serializedCacheKey, result.reason);
2320
+ }
2321
+ resolvableSharedCacheResult.resolve(result);
2322
+ return result.hangingPromise;
2323
+ }
2324
+ const { stream: newStream, pendingCacheResult } = result;
2325
+ let pendingWrite;
2326
+ // When draft mode is enabled, we must not save the cache entry.
2327
+ if (!workStore.isDraftMode) {
2328
+ const savedCacheResult = saveToResumeDataCache(resumeDataCache, serializedCacheKey, pendingCacheResult, logPrefix);
2329
+ if (cacheHandler) {
2330
+ pendingWrite = saveToCacheHandler(cacheHandler, id, cacheHandlerKeyBase, savedCacheResult, rootParams);
2331
+ workStore.pendingRevalidateWrites ??= [];
2332
+ workStore.pendingRevalidateWrites.push(pendingWrite);
2333
+ }
2334
+ }
2335
+ debug == null ? void 0 : debug(logPrefix, 'leader resolved with generated entry', cacheHandlerKey);
2336
+ const pendingMetadata = pendingCacheResult.then((collected)=>({
2337
+ tags: collected.entry.tags,
2338
+ revalidate: collected.entry.revalidate,
2339
+ expire: collected.entry.expire,
2340
+ stale: collected.entry.stale,
2341
+ timestamp: collected.entry.timestamp,
2342
+ hasExplicitRevalidate: collected.hasExplicitRevalidate,
2343
+ hasExplicitExpire: collected.hasExplicitExpire,
2344
+ readRootParamNames: collected.readRootParamNames,
2345
+ dynamicNestedCacheError: collected.dynamicNestedCacheError
2346
+ }));
2347
+ const sharedCacheEntry = new SharedCacheEntry(newStream, pendingMetadata, pendingWrite);
2348
+ stream = sharedCacheEntry.fork();
2349
+ resolvableSharedCacheResult.resolve({
2350
+ type: 'cached',
2351
+ entry: sharedCacheEntry
2352
+ });
2353
+ } else {
2354
+ const entryMetadata = {
2355
+ tags: entry.tags,
2356
+ revalidate: entry.revalidate,
2357
+ expire: entry.expire,
2358
+ stale: entry.stale,
2359
+ timestamp: entry.timestamp,
2360
+ readRootParamNames: knownRootParamsByFunctionId.get(id),
2361
+ // For pre-existing entries from cache handlers we don't know
2362
+ // whether they had explicit cache life values or not. But we only
2363
+ // need this information during prerendering when we produce new
2364
+ // entries, where the cache life of an inner cache may be propagated
2365
+ // to the outer one. In that case we use the RDC. So it's safe to
2366
+ // set this to undefined here.
2367
+ hasExplicitRevalidate: undefined,
2368
+ hasExplicitExpire: undefined,
2369
+ // The same applies to the dynamic nested cache error.
2370
+ dynamicNestedCacheError: undefined
2371
+ };
2372
+ maybePropagateCacheEntryMetadata(cacheContext, entryMetadata);
2373
+ // We want to return this stream, even if it's stale.
2374
+ stream = entry.value;
2375
+ // If we have a mutable resume data cache, we need to clone the entry
2376
+ // and add it to the resume data cache.
2377
+ if (resumeDataCache == null ? void 0 : resumeDataCache.mutable) {
2378
+ const [entryLeft, entryRight] = (0, _clonecacheentry.cloneCacheEntry)(entry);
2379
+ if (cacheSignal && !cacheSignalReadEnded) {
2380
+ stream = createTrackedReadableStream(entryLeft.value, cacheSignal);
2381
+ } else {
2382
+ // The read was already ended for a short-lived deferral (or there
2383
+ // is no cacheSignal), so serve a plain stream.
2384
+ stream = entryLeft.value;
2385
+ }
2386
+ // The RDC is per-page and root params are fixed within a page, so
2387
+ // we always use the coarse key (without root param suffix).
2388
+ resumeDataCache.cache.set(serializedCacheKey, Promise.resolve({
2389
+ entry: entryRight,
2390
+ hasExplicitRevalidate: entryMetadata.hasExplicitRevalidate,
2391
+ hasExplicitExpire: entryMetadata.hasExplicitExpire,
2392
+ readRootParamNames: entryMetadata.readRootParamNames,
2393
+ dynamicNestedCacheError: entryMetadata.dynamicNestedCacheError
2394
+ }));
2395
+ } else if (!cacheSignalReadEnded) {
2396
+ // If we're not regenerating we need to signal that we've finished
2397
+ // putting the entry into the cache scope at this point. Otherwise
2398
+ // we do that inside generateCacheEntry. (Skipped when the read was
2399
+ // already ended for a short-lived deferral.)
2400
+ cacheSignal == null ? void 0 : cacheSignal.endRead();
2401
+ }
2402
+ debug == null ? void 0 : debug(logPrefix, 'leader resolved with cache handler hit', cacheHandlerKey);
2403
+ const sharedCacheEntry = new SharedCacheEntry(stream, Promise.resolve(entryMetadata), undefined);
2404
+ stream = sharedCacheEntry.fork();
2405
+ resolvableSharedCacheResult.resolve({
2406
+ type: 'cached',
2407
+ entry: sharedCacheEntry
2408
+ });
2409
+ // Trigger a background revalidation when the entry is stale (past its
2410
+ // `revalidate`), so the next read gets a fresh value without blocking
2411
+ // this one. Development additionally re-warms on every dynamic
2412
+ // request render in two cases where the dev in-memory entry would
2413
+ // otherwise read back as fresh, so a subsequent reload still shows a
2414
+ // fresh value. The first is with the in-memory cache disabled
2415
+ // (`cacheMaxMemorySize: 0`), where built-in entries keep their
2416
+ // resolved (potentially non-dynamic) cache life. The second is a
2417
+ // short-`expire` entry (an explicit dynamic or client-only cache,
2418
+ // e.g. `cacheLife({ expire: 0 })`), which is retained for at least
2419
+ // `MIN_PRERENDERABLE_EXPIRE` so it is served from the cache; this
2420
+ // also covers custom handlers, re-executing and writing through to
2421
+ // the backing.
2422
+ let shouldTriggerBackgroundRevalidation = currentTime > entry.timestamp + entry.revalidate * 1000;
2423
+ if (!shouldTriggerBackgroundRevalidation && process.env.__NEXT_DEV_SERVER && (entry.expire < _constants.MIN_PRERENDERABLE_EXPIRE || (0, _handlers.isMemoryCacheDisabled)() && !(0, _handlers.isCustomCacheHandler)(kind))) {
2424
+ switch(workUnitStore.type){
2425
+ case 'request':
2426
+ shouldTriggerBackgroundRevalidation = true;
2427
+ break;
2428
+ case 'cache':
2429
+ case 'private-cache':
2430
+ case 'prerender':
2431
+ case 'prerender-runtime':
2432
+ case 'prerender-legacy':
2433
+ case 'unstable-cache':
2434
+ case 'build-time-generator':
2435
+ break;
2436
+ default:
2437
+ workUnitStore;
2438
+ }
2439
+ }
2440
+ if (shouldTriggerBackgroundRevalidation && // The revalidation observed before the lookup may have finished.
2441
+ observedRevalidation === undefined && // A new revalidation may have started since the lookup began.
2442
+ !backgroundRevalidations.has(cacheHandlerKey)) {
2443
+ const revalidateCacheHandlerKey = cacheHandlerKey;
2444
+ // Defer the call so synchronous setup errors reject the background
2445
+ // task instead of failing the stale response. This also lets us
2446
+ // register the task before generation starts.
2447
+ const revalidatePromise = Promise.resolve().then(()=>generateCacheEntry(workStore, // The background revalidation preserves the outer store for
2448
+ // reading (e.g. implicitTags) but skips propagation of cache
2449
+ // life and tags back to the outer scope.
2450
+ {
2451
+ ...cacheContext,
2452
+ skipPropagation: true
2453
+ }, clientReferenceManifest, encodedCacheKeyParts, fn, timeoutError, deadlockError)).then(async (result)=>{
2454
+ if (result.type === 'cached') {
2455
+ const { stream: ignoredStream, pendingCacheResult } = result;
2456
+ const savedCacheResult = saveToResumeDataCache(resumeDataCache, serializedCacheKey, pendingCacheResult, logPrefix);
2457
+ const pendingWrite = cacheHandler ? saveToCacheHandler(cacheHandler, id, cacheHandlerKeyBase, savedCacheResult, rootParams) : savedCacheResult.then(()=>{});
2458
+ for (const completion of (await Promise.allSettled([
2459
+ ignoredStream.cancel(),
2460
+ pendingWrite
2461
+ ]))){
2462
+ if (completion.status === 'rejected') {
2463
+ throw completion.reason;
2464
+ }
2465
+ }
2466
+ }
2467
+ }).finally(()=>{
2468
+ if (backgroundRevalidations.get(revalidateCacheHandlerKey) === revalidatePromise) {
2469
+ backgroundRevalidations.delete(revalidateCacheHandlerKey);
2470
+ }
2471
+ });
2472
+ backgroundRevalidations.set(revalidateCacheHandlerKey, revalidatePromise);
2473
+ revalidatePromise.catch((error)=>{
2474
+ debug == null ? void 0 : debug(logPrefix, 'background cache revalidation failed for', revalidateCacheHandlerKey, error);
2475
+ });
2476
+ workStore.pendingRevalidateWrites ??= [];
2477
+ workStore.pendingRevalidateWrites.push(revalidatePromise);
2478
+ }
2479
+ }
2480
+ }
2481
+ } catch (error) {
2482
+ resolvableSharedCacheResult.reject(error);
2483
+ throw error;
2484
+ }
2485
+ }
2486
+ // Logs are replayed even if it's a hit - to ensure we see them on the client eventually.
2487
+ // If we didn't then the client wouldn't see the logs if it was seeded from a prewarm that
2488
+ // never made it to the client. However, this also means that you see logs even when the
2489
+ // cached function isn't actually re-executed. We should instead ensure prewarms always
2490
+ // make it to the client. Another issue is that this will cause double logging in the
2491
+ // server terminal. Once while generating the cache entry and once when replaying it on
2492
+ // the server, which is required to pick it up for replaying again on the client.
2493
+ const replayConsoleLogs = true;
2494
+ const serverConsumerManifest = {
2495
+ // moduleLoading must be null because we don't want to trigger preloads of ClientReferences
2496
+ // to be added to the consumer. Instead, we'll wait for any ClientReference to be emitted
2497
+ // which themselves will handle the preloading.
2498
+ moduleLoading: null,
2499
+ moduleMap: (0, _manifestssingleton.getRscModuleMappingForUseCache)(),
2500
+ serverModuleMap: (0, _manifestssingleton.getServerModuleMap)()
2501
+ };
2502
+ return (0, _client.createFromReadableStream)(stream, {
2503
+ findSourceMapURL,
2504
+ serverConsumerManifest,
2505
+ temporaryReferences,
2506
+ replayConsoleLogs,
2507
+ environmentName: 'Cache'
2508
+ });
2509
+ }
2510
+ /**
2511
+ * This returns cache key parts that cover everything that can affect the result of the cached
2512
+ * function (apart from the arguments). The implementation part is used by both the RDC and cache
2513
+ * handler, while the runtime env var state hash is only used by the cache handler. The RDC is
2514
+ * per-page and must reuse entries across rendering phases even if an env var changes between them.
2515
+ *
2516
+ * The parts cover:
2517
+ * - codeHash: the code itself that generates the return value
2518
+ * - Notably, this excludes the following modules. Those are included via the Next.js version anyway:
2519
+ * - react, react-dom, private-next-rsc-server-reference, private-next-rsc-cache-wrapper
2520
+ * - runtimeEnvVarsRead: the keys and values of runtime environment variables that the code reads
2521
+ * - runtimeEnvVarExistence: the unset/falsy/truthy state of runtime environment variables used in boolean contexts
2522
+ * - the version of Next.js (to account for RSC wire format changes, or use-cache-wrapper.ts changes)
2523
+ *
2524
+ * In case that granular information isn't available, fall back to
2525
+ * buildId/deploymentId/hmrRefreshHash, which is a correct hash but over-invalidates way too often.
2526
+ */ async function computeCacheKeyImplementationPart(workStore, workUnitStore, id) {
2527
+ var _getServerActionsManifest_node_id_workers_normalizeWorkerPageName, _getServerActionsManifest_node_id_workers;
2528
+ let durability = workStore.durableUseCacheEntries ? (_getServerActionsManifest_node_id_workers = (0, _manifestssingleton.getServerActionsManifest)().node[id].workers) == null ? void 0 : (_getServerActionsManifest_node_id_workers_normalizeWorkerPageName = _getServerActionsManifest_node_id_workers[(0, _manifestssingleton.normalizeWorkerPageName)(workStore.page)]) == null ? void 0 : _getServerActionsManifest_node_id_workers_normalizeWorkerPageName.durability : undefined;
2529
+ if (durability) {
2530
+ // use cache is only supported in Node.js runtime. So we can use the Node.js crypto module here.
2531
+ const crypto = require('crypto');
2532
+ let runtimeEnvVarStateHash = crypto// Hash the env var values, to not leak secrets into the cache key.
2533
+ .createHash('sha256').update([
2534
+ ...durability.runtimeEnvVarsRead.map((k)=>{
2535
+ // Make sure not to stringify `undefined` and `"undefined"` to the same value.
2536
+ return process.env[k] != null ? `${k}==${process.env[k]}` : k;
2537
+ }),
2538
+ ...durability.runtimeEnvVarsExistence.map((k)=>{
2539
+ const value = process.env[k];
2540
+ const state = value == null ? 'unset' : value ? 'truthy' : 'falsy';
2541
+ return `${k}~=${state}`;
2542
+ })
2543
+ ].join('\0') ?? '').digest('hex');
2544
+ // The env var state is added to the cache handler key separately so it
2545
+ // doesn't affect RDC lookups between rendering phases.
2546
+ return {
2547
+ implementationPart: [
2548
+ durability.codeHash,
2549
+ nextVersion
2550
+ ],
2551
+ runtimeEnvVarStateHash
2552
+ };
2553
+ } else {
2554
+ // Because the Action ID is not yet unique per implementation of that Action we can't
2555
+ // safely reuse the results across builds yet. In the meantime we add the buildId to the
2556
+ // arguments as a seed to ensure they're not reused. Remove this once Action IDs hash
2557
+ // the implementation.
2558
+ const buildId = workStore.deploymentId || workStore.buildId;
2559
+ // In dev mode, when the HMR refresh hash is set, we include it in the
2560
+ // cache key. This ensures that cache entries are not reused when server
2561
+ // components have been edited. This is a very coarse approach. But it's
2562
+ // also only a temporary solution until Action IDs are unique per
2563
+ // implementation. Remove this once Action IDs hash the implementation.
2564
+ const hmrRefreshHash = (0, _workunitasyncstorageexternal.getHmrRefreshHash)(workUnitStore);
2565
+ // otherwise fall back to buildId and/or the HMR hash.
2566
+ return {
2567
+ implementationPart: hmrRefreshHash ? [
2568
+ buildId,
2569
+ hmrRefreshHash
2570
+ ] : [
2571
+ buildId
2572
+ ],
2573
+ runtimeEnvVarStateHash: undefined
2574
+ };
2575
+ }
2576
+ }
2577
+ /**
2578
+ * A request store in `next start` never delays caches.
2579
+ * We only apply delays when the render will be used for
2580
+ * validation purposes.
2581
+ */ function isValidationRender(requestStore) {
2582
+ return !!(process.env.__NEXT_CACHE_COMPONENTS && // In dev we're always running validation.
2583
+ (process.env.__NEXT_DEV_SERVER || // Build-time instant validation also uses a 'request' store.
2584
+ requestStore.validationSamples));
2585
+ }
2586
+ /**
2587
+ * Returns `true` if the `'use cache'` function is the page component itself,
2588
+ * or `generateMetadata`/`generateViewport` in a page file.
2589
+ */ function isPageSegmentFunction(args) {
2590
+ const [maybeProps] = args;
2591
+ return maybeProps !== null && typeof maybeProps === 'object' && maybeProps.$$isPage === true;
2592
+ }
2593
+ /**
2594
+ * Returns `true` if the `'use cache'` function is the layout component itself,
2595
+ * or `generateMetadata`/`generateViewport` in a layout file.
2596
+ */ function isLayoutSegmentFunction(args) {
2597
+ const [maybeProps] = args;
2598
+ return maybeProps !== null && typeof maybeProps === 'object' && maybeProps.$$isLayout === true;
2599
+ }
2600
+ function shouldForceRevalidate(workStore, workUnitStore) {
2601
+ if (workStore.isOnDemandRevalidate || workStore.isDraftMode) {
2602
+ return true;
2603
+ }
2604
+ if (process.env.__NEXT_DEV_SERVER) {
2605
+ switch(workUnitStore.type){
2606
+ case 'request':
2607
+ return workUnitStore.headers.get('cache-control') === 'no-cache';
2608
+ case 'cache':
2609
+ case 'private-cache':
2610
+ return workUnitStore.forceRevalidate;
2611
+ case 'prerender-runtime':
2612
+ case 'prerender':
2613
+ case 'prerender-client':
2614
+ case 'validation-client':
2615
+ case 'prerender-legacy':
2616
+ case 'unstable-cache':
2617
+ case 'build-time-generator':
2618
+ break;
2619
+ default:
2620
+ workUnitStore;
2621
+ }
2622
+ }
2623
+ return false;
2624
+ }
2625
+ function shouldDiscardCacheEntry(entry, workStore, workUnitStore, implicitTags, implicitTagsExpiration, logPrefix) {
2626
+ // If the cache entry was created before any of the implicit tags were
2627
+ // revalidated last, we need to discard it.
2628
+ if (entry.timestamp <= implicitTagsExpiration) {
2629
+ debug == null ? void 0 : debug(logPrefix, 'entry was created at', entry.timestamp, 'before implicit tags were revalidated at', implicitTagsExpiration);
2630
+ return true;
2631
+ }
2632
+ // During prerendering, we ignore recently revalidated tags. In dev mode, we
2633
+ // can assume that the dynamic dev rendering will have discarded and recreated
2634
+ // the affected cache entries, and we don't want to discard those again during
2635
+ // the prerender validation. During build-time prerendering, there will never
2636
+ // be any pending revalidated tags.
2637
+ switch(workUnitStore.type){
2638
+ case 'prerender':
2639
+ return false;
2640
+ case 'prerender-runtime':
2641
+ case 'prerender-client':
2642
+ case 'validation-client':
2643
+ case 'prerender-legacy':
2644
+ case 'request':
2645
+ case 'cache':
2646
+ case 'private-cache':
2647
+ case 'unstable-cache':
2648
+ case 'build-time-generator':
2649
+ break;
2650
+ default:
2651
+ workUnitStore;
2652
+ }
2653
+ // If the cache entry contains revalidated tags that the cache handler might
2654
+ // not know about yet, we need to discard it.
2655
+ if (entry.tags.some((tag)=>isRevalidatedAfter(tag, entry.timestamp, workStore, logPrefix))) {
2656
+ return true;
2657
+ }
2658
+ // Finally, if any of the implicit tags have been revalidated recently, we
2659
+ // also need to discard the cache entry.
2660
+ if (implicitTags.some((tag)=>isRevalidatedAfter(tag, entry.timestamp, workStore, logPrefix))) {
2661
+ return true;
2662
+ }
2663
+ return false;
2664
+ }
2665
+ /**
2666
+ * Whether `tag` was revalidated after an entry created at `entryTimestamp`,
2667
+ * which makes that entry stale. An entry produced after the revalidation
2668
+ * already reflects it and is still usable.
2669
+ */ function isRevalidatedAfter(tag, entryTimestamp, workStore, logPrefix) {
2670
+ const { previouslyRevalidatedTags, pendingRevalidatedTags, requestStartTime } = workStore;
2671
+ // Was the tag previously revalidated (e.g. by a redirecting server action)?
2672
+ // That happened in an earlier request and carries no timestamp of its own, so
2673
+ // it counts as having happened when this request started.
2674
+ if (entryTimestamp <= requestStartTime && previouslyRevalidatedTags.includes(tag)) {
2675
+ debug == null ? void 0 : debug(logPrefix, 'tag', tag, 'was previously revalidated');
2676
+ return true;
2677
+ }
2678
+ // It could also have been revalidated by the currently running server action.
2679
+ // In this case the revalidation might not have been fully propagated by a
2680
+ // remote cache handler yet, so we read it from the pending tags in the work
2681
+ // store.
2682
+ if (pendingRevalidatedTags == null ? void 0 : pendingRevalidatedTags.some((item)=>item.tag === tag && item.revalidatedAt > entryTimestamp)) {
2683
+ debug == null ? void 0 : debug(logPrefix, 'tag', tag, 'was just revalidated');
2684
+ return true;
2685
+ }
2686
+ return false;
2687
+ }
2688
+
2689
+ //# sourceMappingURL=use-cache-wrapper.js.map