@oqura/wisdom 0.0.0-stage → 0.3.1-beta.0

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 (1444) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +4 -0
  3. package/README.md +150 -3
  4. package/dist/src/bin.js +13 -0
  5. package/dist/src/captures.js +866 -0
  6. package/dist/src/cli.js +577 -0
  7. package/dist/src/client.js +116 -0
  8. package/dist/src/clone.js +72 -0
  9. package/dist/src/connect.js +87 -0
  10. package/dist/src/content.js +27 -0
  11. package/dist/src/conversation.js +254 -0
  12. package/dist/src/daemon.js +178 -0
  13. package/dist/src/dashboard.js +32 -0
  14. package/dist/src/database.js +101 -0
  15. package/dist/src/discovery.js +525 -0
  16. package/dist/src/doctor.js +145 -0
  17. package/dist/src/evidence.js +37 -0
  18. package/dist/src/handoff.js +60 -0
  19. package/dist/src/harnesses/claude-code/adapter.js +79 -0
  20. package/dist/src/harnesses/claude-code/hook.js +63 -0
  21. package/dist/src/harnesses/claude-code/launch.js +58 -0
  22. package/dist/src/harnesses/codex/adapter.js +144 -0
  23. package/dist/src/harnesses/codex/hook.js +102 -0
  24. package/dist/src/harnesses/codex/launch.js +194 -0
  25. package/dist/src/harnesses/index.js +53 -0
  26. package/dist/src/harnesses/launch.js +217 -0
  27. package/dist/src/harnesses/pi/adapter.js +44 -0
  28. package/dist/src/harnesses/pi/extension.js +119 -0
  29. package/dist/src/harnesses/pi/launch.js +82 -0
  30. package/dist/src/harnesses/types.js +42 -0
  31. package/dist/src/ledger.js +277 -0
  32. package/dist/src/markdown.js +173 -0
  33. package/dist/src/mcp.js +32 -0
  34. package/dist/src/paths.js +109 -0
  35. package/dist/src/prices.js +40 -0
  36. package/dist/src/schema.js +64 -0
  37. package/dist/src/secrets.js +62 -0
  38. package/dist/src/share.js +243 -0
  39. package/dist/src/shared.js +179 -0
  40. package/dist/src/stats.js +171 -0
  41. package/dist/src/store.js +2 -0
  42. package/dist/src/views.js +98 -0
  43. package/dist/src/workspace.js +294 -0
  44. package/dist-dashboard/.next/BUILD_ID +1 -0
  45. package/dist-dashboard/.next/app-path-routes-manifest.json +7 -0
  46. package/dist-dashboard/.next/build-manifest.json +54 -0
  47. package/dist-dashboard/.next/package.json +1 -0
  48. package/dist-dashboard/.next/prerender-manifest.json +69 -0
  49. package/dist-dashboard/.next/required-server-files.json +374 -0
  50. package/dist-dashboard/.next/routes-manifest.json +75 -0
  51. package/dist-dashboard/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  52. package/dist-dashboard/.next/server/app/_global-error/page/build-manifest.json +21 -0
  53. package/dist-dashboard/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  54. package/dist-dashboard/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  55. package/dist-dashboard/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  56. package/dist-dashboard/.next/server/app/_global-error/page.js +10 -0
  57. package/dist-dashboard/.next/server/app/_global-error/page.js.map +5 -0
  58. package/dist-dashboard/.next/server/app/_global-error/page.js.nft.json +1 -0
  59. package/dist-dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  60. package/dist-dashboard/.next/server/app/_global-error.html +1 -0
  61. package/dist-dashboard/.next/server/app/_global-error.meta +30 -0
  62. package/dist-dashboard/.next/server/app/_global-error.rsc +18 -0
  63. package/dist-dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
  64. package/dist-dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  65. package/dist-dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
  66. package/dist-dashboard/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  67. package/dist-dashboard/.next/server/app/_not-found/page/build-manifest.json +21 -0
  68. package/dist-dashboard/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
  69. package/dist-dashboard/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  70. package/dist-dashboard/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  71. package/dist-dashboard/.next/server/app/_not-found/page.js +12 -0
  72. package/dist-dashboard/.next/server/app/_not-found/page.js.map +5 -0
  73. package/dist-dashboard/.next/server/app/_not-found/page.js.nft.json +1 -0
  74. package/dist-dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  75. package/dist-dashboard/.next/server/app/_not-found.html +4 -0
  76. package/dist-dashboard/.next/server/app/_not-found.meta +35 -0
  77. package/dist-dashboard/.next/server/app/_not-found.rsc +20 -0
  78. package/dist-dashboard/.next/server/app/_not-found.segments/_full.segment.rsc +20 -0
  79. package/dist-dashboard/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +26 -0
  80. package/dist-dashboard/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  81. package/dist-dashboard/.next/server/app/api/live/route/app-paths-manifest.json +3 -0
  82. package/dist-dashboard/.next/server/app/api/live/route/build-manifest.json +12 -0
  83. package/dist-dashboard/.next/server/app/api/live/route/server-reference-manifest.json +4 -0
  84. package/dist-dashboard/.next/server/app/api/live/route.js +7 -0
  85. package/dist-dashboard/.next/server/app/api/live/route.js.map +5 -0
  86. package/dist-dashboard/.next/server/app/api/live/route.js.nft.json +1 -0
  87. package/dist-dashboard/.next/server/app/api/live/route_client-reference-manifest.js +3 -0
  88. package/dist-dashboard/.next/server/app/api/view/route/app-paths-manifest.json +3 -0
  89. package/dist-dashboard/.next/server/app/api/view/route/build-manifest.json +12 -0
  90. package/dist-dashboard/.next/server/app/api/view/route/server-reference-manifest.json +4 -0
  91. package/dist-dashboard/.next/server/app/api/view/route.js +7 -0
  92. package/dist-dashboard/.next/server/app/api/view/route.js.map +5 -0
  93. package/dist-dashboard/.next/server/app/api/view/route.js.nft.json +1 -0
  94. package/dist-dashboard/.next/server/app/api/view/route_client-reference-manifest.js +3 -0
  95. package/dist-dashboard/.next/server/app/page/app-paths-manifest.json +3 -0
  96. package/dist-dashboard/.next/server/app/page/build-manifest.json +21 -0
  97. package/dist-dashboard/.next/server/app/page/next-font-manifest.json +6 -0
  98. package/dist-dashboard/.next/server/app/page/react-loadable-manifest.json +1 -0
  99. package/dist-dashboard/.next/server/app/page/server-reference-manifest.json +4 -0
  100. package/dist-dashboard/.next/server/app/page.js +13 -0
  101. package/dist-dashboard/.next/server/app/page.js.map +5 -0
  102. package/dist-dashboard/.next/server/app/page.js.nft.json +1 -0
  103. package/dist-dashboard/.next/server/app/page_client-reference-manifest.js +3 -0
  104. package/dist-dashboard/.next/server/app-paths-manifest.json +7 -0
  105. package/dist-dashboard/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
  106. package/dist-dashboard/.next/server/chunks/[root-of-the-server]__17sjqi0dthgwf._.js +5 -0
  107. package/dist-dashboard/.next/server/chunks/[turbopack]_runtime.js +937 -0
  108. package/dist-dashboard/.next/server/chunks/_0ak64smt0plep._.js +3 -0
  109. package/dist-dashboard/.next/server/chunks/_17wd0do43vgms._.js +3 -0
  110. package/dist-dashboard/.next/server/chunks/_1cstru0a1pgds._.js +6 -0
  111. package/dist-dashboard/.next/server/chunks/_next-internal_server_app_api_live_route_actions_0dk5m02naz6qd.js +3 -0
  112. package/dist-dashboard/.next/server/chunks/_next-internal_server_app_api_view_route_actions_1xagbxi05m8ul.js +3 -0
  113. package/dist-dashboard/.next/server/chunks/lib_watchdog_ts_0ica6d9fc6bpo._.js +3 -0
  114. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__0m5uvupnpkk3r._.js +3 -0
  115. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
  116. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__1_44ly6o596ao._.js +3 -0
  117. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
  118. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__1ireqd10pl8it._.js +6 -0
  119. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__1jhlq20oy3-ee._.js +3 -0
  120. package/dist-dashboard/.next/server/chunks/ssr/[root-of-the-server]__1ru_-wpbt025r._.js +3 -0
  121. package/dist-dashboard/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
  122. package/dist-dashboard/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
  123. package/dist-dashboard/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
  124. package/dist-dashboard/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
  125. package/dist-dashboard/.next/server/chunks/ssr/components_Dashboard_tsx_1o2cg2bz5flxn._.js +3 -0
  126. package/dist-dashboard/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
  127. package/dist-dashboard/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  128. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
  129. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_1c5t_vsn6u8fr._.js +3 -0
  130. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js +3 -0
  131. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
  132. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
  133. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
  134. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12cvwrhav8wvb.js +3 -0
  135. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
  136. package/dist-dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1nazowj1bdbgt.js +3 -0
  137. package/dist-dashboard/.next/server/functions-config-manifest.json +4 -0
  138. package/dist-dashboard/.next/server/instrumentation.js +4 -0
  139. package/dist-dashboard/.next/server/middleware-build-manifest.js +54 -0
  140. package/dist-dashboard/.next/server/middleware-manifest.json +6 -0
  141. package/dist-dashboard/.next/server/next-font-manifest.js +1 -0
  142. package/dist-dashboard/.next/server/next-font-manifest.json +6 -0
  143. package/dist-dashboard/.next/server/pages/404.html +4 -0
  144. package/dist-dashboard/.next/server/pages/500.html +1 -0
  145. package/dist-dashboard/.next/server/pages-manifest.json +4 -0
  146. package/dist-dashboard/.next/server/prefetch-hints.json +25 -0
  147. package/dist-dashboard/.next/server/preview-props.json +5 -0
  148. package/dist-dashboard/.next/server/server-reference-manifest.js +1 -0
  149. package/dist-dashboard/.next/server/server-reference-manifest.json +5 -0
  150. package/dist-dashboard/.next/static/V_Lu58_YNtYKUueKtqIh7/_buildManifest.js +11 -0
  151. package/dist-dashboard/.next/static/V_Lu58_YNtYKUueKtqIh7/_clientMiddlewareManifest.js +1 -0
  152. package/dist-dashboard/.next/static/V_Lu58_YNtYKUueKtqIh7/_ssgManifest.js +1 -0
  153. package/dist-dashboard/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  154. package/dist-dashboard/.next/static/chunks/0nwv0w1bwzuep.css +1 -0
  155. package/dist-dashboard/.next/static/chunks/0r-yur70-ku2o.js +22 -0
  156. package/dist-dashboard/.next/static/chunks/0umf92h1sb77c.js +1 -0
  157. package/dist-dashboard/.next/static/chunks/2bmsncssm91b5.js +1 -0
  158. package/dist-dashboard/.next/static/chunks/2khxl0v1q4i6n.js +1 -0
  159. package/dist-dashboard/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
  160. package/dist-dashboard/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
  161. package/dist-dashboard/node_modules/@next/env/dist/index.js +1 -0
  162. package/dist-dashboard/node_modules/@next/env/package.json +36 -0
  163. package/dist-dashboard/node_modules/@swc/helpers/LICENSE +201 -0
  164. package/dist-dashboard/node_modules/@swc/helpers/cjs/_interop_require_default.cjs +6 -0
  165. package/dist-dashboard/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs +38 -0
  166. package/dist-dashboard/node_modules/@swc/helpers/esm/_interop_require_default.js +4 -0
  167. package/dist-dashboard/node_modules/@swc/helpers/esm/_interop_require_wildcard.js +36 -0
  168. package/dist-dashboard/node_modules/@swc/helpers/package.json +705 -0
  169. package/dist-dashboard/node_modules/client-only/index.js +0 -0
  170. package/dist-dashboard/node_modules/client-only/package.json +19 -0
  171. package/dist-dashboard/node_modules/next/dist/build/adapter/build-complete.js +1648 -0
  172. package/dist-dashboard/node_modules/next/dist/build/adapter/fallback-shell-runs.js +140 -0
  173. package/dist-dashboard/node_modules/next/dist/build/adapter/setup-node-env.external.js +15 -0
  174. package/dist-dashboard/node_modules/next/dist/build/adapter/synthetic-symlinks.js +85 -0
  175. package/dist-dashboard/node_modules/next/dist/build/after-production-compile.js +96 -0
  176. package/dist-dashboard/node_modules/next/dist/build/analysis/extract-const-value.js +229 -0
  177. package/dist-dashboard/node_modules/next/dist/build/analysis/get-page-static-info.js +646 -0
  178. package/dist-dashboard/node_modules/next/dist/build/analysis/parse-module.js +20 -0
  179. package/dist-dashboard/node_modules/next/dist/build/analyze/graph-dump.js +291 -0
  180. package/dist-dashboard/node_modules/next/dist/build/analyze/index.js +259 -0
  181. package/dist-dashboard/node_modules/next/dist/build/analyze/snapshot.js +199 -0
  182. package/dist-dashboard/node_modules/next/dist/build/babel/loader/get-config.js +420 -0
  183. package/dist-dashboard/node_modules/next/dist/build/babel/loader/index.js +56 -0
  184. package/dist-dashboard/node_modules/next/dist/build/babel/loader/transform.js +103 -0
  185. package/dist-dashboard/node_modules/next/dist/build/babel/loader/util.js +20 -0
  186. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/commonjs.js +42 -0
  187. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/jsx-pragma.js +74 -0
  188. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/next-font-unsupported.js +32 -0
  189. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/next-page-config.js +84 -0
  190. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/next-page-disallow-re-export-all-exports.js +25 -0
  191. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/next-ssg-transform.js +329 -0
  192. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/optimize-hook-destructuring.js +60 -0
  193. package/dist-dashboard/node_modules/next/dist/build/babel/plugins/react-loadable-plugin.js +145 -0
  194. package/dist-dashboard/node_modules/next/dist/build/babel/preset.js +250 -0
  195. package/dist-dashboard/node_modules/next/dist/build/browser-variant-modules.js +28 -0
  196. package/dist-dashboard/node_modules/next/dist/build/build-context.js +58 -0
  197. package/dist-dashboard/node_modules/next/dist/build/collect-build-traces.js +552 -0
  198. package/dist-dashboard/node_modules/next/dist/build/compiler.js +84 -0
  199. package/dist-dashboard/node_modules/next/dist/build/create-compiler-aliases.js +479 -0
  200. package/dist-dashboard/node_modules/next/dist/build/define-env.js +257 -0
  201. package/dist-dashboard/node_modules/next/dist/build/duration-to-string.js +98 -0
  202. package/dist-dashboard/node_modules/next/dist/build/entries.js +682 -0
  203. package/dist-dashboard/node_modules/next/dist/build/file-classifier.js +76 -0
  204. package/dist-dashboard/node_modules/next/dist/build/generate-build-id.js +27 -0
  205. package/dist-dashboard/node_modules/next/dist/build/generate-routes-manifest.js +93 -0
  206. package/dist-dashboard/node_modules/next/dist/build/get-babel-config-file.js +35 -0
  207. package/dist-dashboard/node_modules/next/dist/build/get-babel-loader-config.js +129 -0
  208. package/dist-dashboard/node_modules/next/dist/build/get-convention-file-base-name.js +29 -0
  209. package/dist-dashboard/node_modules/next/dist/build/get-static-info-including-layouts.js +80 -0
  210. package/dist-dashboard/node_modules/next/dist/build/get-supported-browsers.js +38 -0
  211. package/dist-dashboard/node_modules/next/dist/build/handle-entrypoints.js +170 -0
  212. package/dist-dashboard/node_modules/next/dist/build/handle-externals.js +286 -0
  213. package/dist-dashboard/node_modules/next/dist/build/index.js +3027 -0
  214. package/dist-dashboard/node_modules/next/dist/build/is-writeable.js +26 -0
  215. package/dist-dashboard/node_modules/next/dist/build/jest/__mocks__/empty.js +10 -0
  216. package/dist-dashboard/node_modules/next/dist/build/jest/__mocks__/fileMock.js +15 -0
  217. package/dist-dashboard/node_modules/next/dist/build/jest/__mocks__/nextFontMock.js +20 -0
  218. package/dist-dashboard/node_modules/next/dist/build/jest/__mocks__/styleMock.js +10 -0
  219. package/dist-dashboard/node_modules/next/dist/build/jest/jest.js +245 -0
  220. package/dist-dashboard/node_modules/next/dist/build/jest/object-proxy.js +50 -0
  221. package/dist-dashboard/node_modules/next/dist/build/load-entrypoint.js +30 -0
  222. package/dist-dashboard/node_modules/next/dist/build/load-jsconfig.js +178 -0
  223. package/dist-dashboard/node_modules/next/dist/build/lockfile.js +238 -0
  224. package/dist-dashboard/node_modules/next/dist/build/manifests/formatter/format-manifest.js +19 -0
  225. package/dist-dashboard/node_modules/next/dist/build/next-config-ts/require-hook.js +85 -0
  226. package/dist-dashboard/node_modules/next/dist/build/next-config-ts/transpile-config.js +136 -0
  227. package/dist-dashboard/node_modules/next/dist/build/next-dir-paths.js +37 -0
  228. package/dist-dashboard/node_modules/next/dist/build/nft.js +119 -0
  229. package/dist-dashboard/node_modules/next/dist/build/normalize-catchall-routes.js +28 -0
  230. package/dist-dashboard/node_modules/next/dist/build/output/format.js +84 -0
  231. package/dist-dashboard/node_modules/next/dist/build/output/index.js +186 -0
  232. package/dist-dashboard/node_modules/next/dist/build/output/log.js +135 -0
  233. package/dist-dashboard/node_modules/next/dist/build/output/store.js +204 -0
  234. package/dist-dashboard/node_modules/next/dist/build/page-extensions-type.js +6 -0
  235. package/dist-dashboard/node_modules/next/dist/build/polyfills/fetch/index.js +6 -0
  236. package/dist-dashboard/node_modules/next/dist/build/polyfills/fetch/whatwg-fetch.js +7 -0
  237. package/dist-dashboard/node_modules/next/dist/build/polyfills/object-assign.js +6 -0
  238. package/dist-dashboard/node_modules/next/dist/build/polyfills/object.assign/auto.js +4 -0
  239. package/dist-dashboard/node_modules/next/dist/build/polyfills/object.assign/implementation.js +4 -0
  240. package/dist-dashboard/node_modules/next/dist/build/polyfills/object.assign/index.js +19 -0
  241. package/dist-dashboard/node_modules/next/dist/build/polyfills/object.assign/polyfill.js +6 -0
  242. package/dist-dashboard/node_modules/next/dist/build/polyfills/object.assign/shim.js +6 -0
  243. package/dist-dashboard/node_modules/next/dist/build/polyfills/polyfill-module.js +1 -0
  244. package/dist-dashboard/node_modules/next/dist/build/polyfills/polyfill-nomodule.js +1 -0
  245. package/dist-dashboard/node_modules/next/dist/build/polyfills/process.js +5 -0
  246. package/dist-dashboard/node_modules/next/dist/build/preview-key-utils.js +91 -0
  247. package/dist-dashboard/node_modules/next/dist/build/print-build-errors.js +141 -0
  248. package/dist-dashboard/node_modules/next/dist/build/progress.js +147 -0
  249. package/dist-dashboard/node_modules/next/dist/build/rendering-mode.js +26 -0
  250. package/dist-dashboard/node_modules/next/dist/build/route-bundle-stats.js +155 -0
  251. package/dist-dashboard/node_modules/next/dist/build/route-discovery.js +381 -0
  252. package/dist-dashboard/node_modules/next/dist/build/segment-config/app/app-segment-config.js +192 -0
  253. package/dist-dashboard/node_modules/next/dist/build/segment-config/app/app-segments.js +238 -0
  254. package/dist-dashboard/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +48 -0
  255. package/dist-dashboard/node_modules/next/dist/build/segment-config/middleware/middleware-config.js +121 -0
  256. package/dist-dashboard/node_modules/next/dist/build/segment-config/pages/pages-segment-config.js +62 -0
  257. package/dist-dashboard/node_modules/next/dist/build/sort-by-page-exts.js +30 -0
  258. package/dist-dashboard/node_modules/next/dist/build/spinner.js +158 -0
  259. package/dist-dashboard/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +143 -0
  260. package/dist-dashboard/node_modules/next/dist/build/static-paths/app.js +880 -0
  261. package/dist-dashboard/node_modules/next/dist/build/static-paths/pages.js +137 -0
  262. package/dist-dashboard/node_modules/next/dist/build/static-paths/param-matching.js +200 -0
  263. package/dist-dashboard/node_modules/next/dist/build/static-paths/types.js +6 -0
  264. package/dist-dashboard/node_modules/next/dist/build/static-paths/utils.js +119 -0
  265. package/dist-dashboard/node_modules/next/dist/build/swc/helpers.js +15 -0
  266. package/dist-dashboard/node_modules/next/dist/build/swc/index.js +1339 -0
  267. package/dist-dashboard/node_modules/next/dist/build/swc/install-bindings.js +30 -0
  268. package/dist-dashboard/node_modules/next/dist/build/swc/jest-transformer.js +77 -0
  269. package/dist-dashboard/node_modules/next/dist/build/swc/loaderWorkerPool.js +40 -0
  270. package/dist-dashboard/node_modules/next/dist/build/swc/options.js +411 -0
  271. package/dist-dashboard/node_modules/next/dist/build/swc/types.js +6 -0
  272. package/dist-dashboard/node_modules/next/dist/build/templates/app-page-runtime.js +1636 -0
  273. package/dist-dashboard/node_modules/next/dist/build/templates/app-page.js +59 -0
  274. package/dist-dashboard/node_modules/next/dist/build/templates/app-route.js +437 -0
  275. package/dist-dashboard/node_modules/next/dist/build/templates/edge-app-route.js +124 -0
  276. package/dist-dashboard/node_modules/next/dist/build/templates/edge-ssr-app.js +388 -0
  277. package/dist-dashboard/node_modules/next/dist/build/templates/edge-ssr.js +380 -0
  278. package/dist-dashboard/node_modules/next/dist/build/templates/edge-wrapper.js +24 -0
  279. package/dist-dashboard/node_modules/next/dist/build/templates/helpers.js +36 -0
  280. package/dist-dashboard/node_modules/next/dist/build/templates/middleware.js +172 -0
  281. package/dist-dashboard/node_modules/next/dist/build/templates/pages-api.js +211 -0
  282. package/dist-dashboard/node_modules/next/dist/build/templates/pages-edge-api.js +78 -0
  283. package/dist-dashboard/node_modules/next/dist/build/templates/pages.js +155 -0
  284. package/dist-dashboard/node_modules/next/dist/build/turbopack-analyze/index.js +130 -0
  285. package/dist-dashboard/node_modules/next/dist/build/turbopack-build/impl.js +255 -0
  286. package/dist-dashboard/node_modules/next/dist/build/turbopack-build/index.js +18 -0
  287. package/dist-dashboard/node_modules/next/dist/build/turborepo-access-trace/env.js +29 -0
  288. package/dist-dashboard/node_modules/next/dist/build/turborepo-access-trace/helpers.js +100 -0
  289. package/dist-dashboard/node_modules/next/dist/build/turborepo-access-trace/index.js +30 -0
  290. package/dist-dashboard/node_modules/next/dist/build/turborepo-access-trace/result.js +51 -0
  291. package/dist-dashboard/node_modules/next/dist/build/turborepo-access-trace/tcp.js +41 -0
  292. package/dist-dashboard/node_modules/next/dist/build/turborepo-access-trace/types.js +8 -0
  293. package/dist-dashboard/node_modules/next/dist/build/type-check.js +169 -0
  294. package/dist-dashboard/node_modules/next/dist/build/utils.js +1348 -0
  295. package/dist-dashboard/node_modules/next/dist/build/validate-app-paths.js +190 -0
  296. package/dist-dashboard/node_modules/next/dist/build/warn-about-edge-runtime.js +78 -0
  297. package/dist-dashboard/node_modules/next/dist/build/webpack/alias/react-dom-server-experimental.js +34 -0
  298. package/dist-dashboard/node_modules/next/dist/build/webpack/alias/react-dom-server.js +34 -0
  299. package/dist-dashboard/node_modules/next/dist/build/webpack/cache-invalidation.js +87 -0
  300. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/base.js +82 -0
  301. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/index.js +573 -0
  302. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/client.js +49 -0
  303. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/file-resolve.js +21 -0
  304. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js +37 -0
  305. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/global.js +67 -0
  306. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/index.js +22 -0
  307. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/modules.js +88 -0
  308. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/loaders/next-font.js +63 -0
  309. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/messages.js +45 -0
  310. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js +162 -0
  311. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/images/index.js +42 -0
  312. package/dist-dashboard/node_modules/next/dist/build/webpack/config/blocks/images/messages.js +16 -0
  313. package/dist-dashboard/node_modules/next/dist/build/webpack/config/helpers.js +78 -0
  314. package/dist-dashboard/node_modules/next/dist/build/webpack/config/index.js +47 -0
  315. package/dist-dashboard/node_modules/next/dist/build/webpack/config/utils.js +13 -0
  316. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/CssSyntaxError.js +32 -0
  317. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/camelcase.js +89 -0
  318. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js +268 -0
  319. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/plugins/index.js +36 -0
  320. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/plugins/postcss-icss-parser.js +105 -0
  321. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/plugins/postcss-import-parser.js +204 -0
  322. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/plugins/postcss-url-parser.js +314 -0
  323. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/runtime/api.js +83 -0
  324. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/runtime/getUrl.js +23 -0
  325. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/css-loader/src/utils.js +459 -0
  326. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/devtool/devtool-style-inject.js +129 -0
  327. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/empty-loader.js +14 -0
  328. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/error-loader.js +32 -0
  329. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/get-module-build-info.js +15 -0
  330. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/instrumentation-client-stub.js +8 -0
  331. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/codegen.js +156 -0
  332. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/index.js +14 -0
  333. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/interface.js +16 -0
  334. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/loader.js +441 -0
  335. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/utils.js +58 -0
  336. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/metadata/discover.js +120 -0
  337. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/metadata/resolve-route-data.js +183 -0
  338. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/metadata/types.js +7 -0
  339. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/modularize-import-loader.js +39 -0
  340. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-app-loader/create-app-route-code.js +61 -0
  341. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-app-loader/index.js +943 -0
  342. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-barrel-loader.js +268 -0
  343. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-client-pages-loader.js +37 -0
  344. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js +63 -0
  345. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-edge-function-loader.js +55 -0
  346. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-edge-ssr-loader/index.js +108 -0
  347. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-error-browser-binary-loader.js +17 -0
  348. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-action-entry-loader.js +32 -0
  349. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-client-entry-loader.js +45 -0
  350. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-client-module-loader.js +47 -0
  351. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-css-loader.js +52 -0
  352. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-client-wrapper.js +33 -0
  353. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/action-validate.js +23 -0
  354. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/cache-wrapper.js +13 -0
  355. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js +199 -0
  356. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/module-proxy.js +14 -0
  357. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/server-reference.js +13 -0
  358. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-loader/track-dynamic-import.js +13 -0
  359. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-flight-server-reference-proxy-loader.js +29 -0
  360. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js +125 -0
  361. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-font-loader/postcss-next-font.js +165 -0
  362. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-image-loader/blur.js +73 -0
  363. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-image-loader/index.js +87 -0
  364. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-instrumentation-client-loader.js +31 -0
  365. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-invalid-import-error-loader.js +24 -0
  366. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-metadata-image-loader.js +153 -0
  367. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-metadata-route-loader.js +342 -0
  368. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-middleware-asset-loader.js +46 -0
  369. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-middleware-loader.js +61 -0
  370. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-middleware-wasm-loader.js +46 -0
  371. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-root-params-loader.js +164 -0
  372. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-route-loader/index.js +129 -0
  373. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-style-loader/index.js +220 -0
  374. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoLinkTag.js +57 -0
  375. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoStyleTag.js +217 -0
  376. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-style-loader/runtime/isEqualLocals.js +27 -0
  377. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/next-swc-loader.js +241 -0
  378. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/Error.js +40 -0
  379. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/Warning.js +35 -0
  380. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js +119 -0
  381. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/utils.js +86 -0
  382. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/index.js +97 -0
  383. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/file-protocol.js +70 -0
  384. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/join-function.js +186 -0
  385. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/postcss.js +88 -0
  386. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/value-processor.js +97 -0
  387. package/dist-dashboard/node_modules/next/dist/build/webpack/loaders/utils.js +100 -0
  388. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/build-manifest-plugin-utils.js +65 -0
  389. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/build-manifest-plugin.js +179 -0
  390. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/copy-file-plugin.js +67 -0
  391. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/css-chunking-plugin.js +277 -0
  392. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js +92 -0
  393. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/deferred-entries-plugin.js +115 -0
  394. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/devtools-ignore-list-plugin.js +78 -0
  395. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/eval-source-map-dev-tool-plugin.js +218 -0
  396. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/flight-client-entry-plugin.js +801 -0
  397. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +429 -0
  398. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/force-complete-runtime.js +42 -0
  399. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/jsconfig-paths-plugin.js +219 -0
  400. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/memory-with-gc-cache-plugin.js +114 -0
  401. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +629 -0
  402. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/mini-css-extract-plugin.js +24 -0
  403. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/minify-webpack-plugin/src/index.js +188 -0
  404. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/next-font-manifest-plugin.js +120 -0
  405. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js +547 -0
  406. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/next-types-plugin/index.js +433 -0
  407. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/next-types-plugin/shared.js +14 -0
  408. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/nextjs-require-cache-hot-reloader.js +53 -0
  409. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/optional-peer-dependency-resolve-plugin.js +45 -0
  410. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/pages-manifest-plugin.js +146 -0
  411. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/profiling-plugin.js +282 -0
  412. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/react-loadable-plugin.js +169 -0
  413. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/rspack-flight-client-entry-plugin.js +97 -0
  414. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/rspack-profiling-plugin.js +62 -0
  415. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/slow-module-detection-plugin.js +178 -0
  416. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/subresource-integrity-plugin.js +58 -0
  417. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/telemetry-plugin/telemetry-plugin.js +188 -0
  418. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/telemetry-plugin/update-telemetry-loader-context-from-swc.js +28 -0
  419. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/telemetry-plugin/use-cache-tracker-utils.js +43 -0
  420. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/getModuleTrace.js +89 -0
  421. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/index.js +43 -0
  422. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parse-dynamic-code-evaluation-error.js +19 -0
  423. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseBabel.js +29 -0
  424. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseCss.js +29 -0
  425. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseNextAppLoaderError.js +26 -0
  426. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseNextFontError.js +33 -0
  427. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseNextInvalidImportError.js +26 -0
  428. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.js +180 -0
  429. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/parseScss.js +43 -0
  430. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/simpleWebpackError.js +18 -0
  431. package/dist-dashboard/node_modules/next/dist/build/webpack/plugins/wellknown-errors-plugin/webpackModuleError.js +138 -0
  432. package/dist-dashboard/node_modules/next/dist/build/webpack/stringify-request.js +15 -0
  433. package/dist-dashboard/node_modules/next/dist/build/webpack/utils.js +109 -0
  434. package/dist-dashboard/node_modules/next/dist/build/webpack-build/impl.js +402 -0
  435. package/dist-dashboard/node_modules/next/dist/build/webpack-build/index.js +184 -0
  436. package/dist-dashboard/node_modules/next/dist/build/webpack-config-rules/resolve.js +55 -0
  437. package/dist-dashboard/node_modules/next/dist/build/webpack-config.js +2375 -0
  438. package/dist-dashboard/node_modules/next/dist/build/worker.js +44 -0
  439. package/dist-dashboard/node_modules/next/dist/build/write-build-id.js +19 -0
  440. package/dist-dashboard/node_modules/next/dist/cli/next-test.js +175 -0
  441. package/dist-dashboard/node_modules/next/dist/client/add-base-path.js +24 -0
  442. package/dist-dashboard/node_modules/next/dist/client/app-call-server.js +32 -0
  443. package/dist-dashboard/node_modules/next/dist/client/app-find-source-map-url.js +39 -0
  444. package/dist-dashboard/node_modules/next/dist/client/assign-location.js +29 -0
  445. package/dist-dashboard/node_modules/next/dist/client/components/app-router-announcer.js +78 -0
  446. package/dist-dashboard/node_modules/next/dist/client/components/app-router-headers.js +128 -0
  447. package/dist-dashboard/node_modules/next/dist/client/components/app-router-instance.js +263 -0
  448. package/dist-dashboard/node_modules/next/dist/client/components/app-router-state.js +527 -0
  449. package/dist-dashboard/node_modules/next/dist/client/components/app-router-utils.js +58 -0
  450. package/dist-dashboard/node_modules/next/dist/client/components/app-router.js +531 -0
  451. package/dist-dashboard/node_modules/next/dist/client/components/builtin/default.js +35 -0
  452. package/dist-dashboard/node_modules/next/dist/client/components/builtin/error-styles.js +165 -0
  453. package/dist-dashboard/node_modules/next/dist/client/components/builtin/global-error.js +100 -0
  454. package/dist-dashboard/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +48 -0
  455. package/dist-dashboard/node_modules/next/dist/client/components/error-boundary.js +148 -0
  456. package/dist-dashboard/node_modules/next/dist/client/components/errors/graceful-degrade-boundary.js +86 -0
  457. package/dist-dashboard/node_modules/next/dist/client/components/errors/root-error-boundary.js +41 -0
  458. package/dist-dashboard/node_modules/next/dist/client/components/forbidden.js +40 -0
  459. package/dist-dashboard/node_modules/next/dist/client/components/handle-isr-error.js +45 -0
  460. package/dist-dashboard/node_modules/next/dist/client/components/hooks-server-context.js +42 -0
  461. package/dist-dashboard/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js +125 -0
  462. package/dist-dashboard/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +72 -0
  463. package/dist-dashboard/node_modules/next/dist/client/components/instant-samples.js +127 -0
  464. package/dist-dashboard/node_modules/next/dist/client/components/is-next-router-error.js +23 -0
  465. package/dist-dashboard/node_modules/next/dist/client/components/links.js +315 -0
  466. package/dist-dashboard/node_modules/next/dist/client/components/nav-failure-handler.js +61 -0
  467. package/dist-dashboard/node_modules/next/dist/client/components/navigation-devtools.js +126 -0
  468. package/dist-dashboard/node_modules/next/dist/client/components/navigation-dynamic-rendering.js +38 -0
  469. package/dist-dashboard/node_modules/next/dist/client/components/navigation-untracked.js +68 -0
  470. package/dist-dashboard/node_modules/next/dist/client/components/navigation.js +242 -0
  471. package/dist-dashboard/node_modules/next/dist/client/components/navigation.react-server.js +71 -0
  472. package/dist-dashboard/node_modules/next/dist/client/components/navigator.js +73 -0
  473. package/dist-dashboard/node_modules/next/dist/client/components/not-found.js +38 -0
  474. package/dist-dashboard/node_modules/next/dist/client/components/offline.js +172 -0
  475. package/dist-dashboard/node_modules/next/dist/client/components/prefetch.js +83 -0
  476. package/dist-dashboard/node_modules/next/dist/client/components/readonly-url-search-params.js +41 -0
  477. package/dist-dashboard/node_modules/next/dist/client/components/redirect-boundary.js +107 -0
  478. package/dist-dashboard/node_modules/next/dist/client/components/redirect-error.js +43 -0
  479. package/dist-dashboard/node_modules/next/dist/client/components/redirect-status-code.js +24 -0
  480. package/dist-dashboard/node_modules/next/dist/client/components/redirect.js +79 -0
  481. package/dist-dashboard/node_modules/next/dist/client/components/render-tree.js +1439 -0
  482. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +213 -0
  483. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/create-href-from-url.js +21 -0
  484. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +174 -0
  485. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +26 -0
  486. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/create-segment-key.js +42 -0
  487. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +624 -0
  488. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +70 -0
  489. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/committed-state.js +49 -0
  490. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/has-interception-route-in-current-tree.js +38 -0
  491. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +29 -0
  492. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +56 -0
  493. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +93 -0
  494. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +78 -0
  495. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +350 -0
  496. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +67 -0
  497. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/router-reducer-types.js +70 -0
  498. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/router-reducer.js +66 -0
  499. package/dist-dashboard/node_modules/next/dist/client/components/router-reducer/set-cache-busting-search-param.js +66 -0
  500. package/dist-dashboard/node_modules/next/dist/client/components/router-transition.js +135 -0
  501. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/bfcache.js +120 -0
  502. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/cache-key.js +56 -0
  503. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/cache-map.js +326 -0
  504. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/cache.js +2671 -0
  505. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/decode-server-response.js +419 -0
  506. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/fetch.js +37 -0
  507. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/lru.js +152 -0
  508. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +415 -0
  509. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +643 -0
  510. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/scheduler.js +1809 -0
  511. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/types.js +93 -0
  512. package/dist-dashboard/node_modules/next/dist/client/components/segment-cache/vary-path.js +340 -0
  513. package/dist-dashboard/node_modules/next/dist/client/components/sequential-router-queue.js +163 -0
  514. package/dist-dashboard/node_modules/next/dist/client/components/server-async-storage.js +43 -0
  515. package/dist-dashboard/node_modules/next/dist/client/components/static-generation-bailout.js +42 -0
  516. package/dist-dashboard/node_modules/next/dist/client/components/unauthorized.js +41 -0
  517. package/dist-dashboard/node_modules/next/dist/client/components/unrecognized-action-error.js +39 -0
  518. package/dist-dashboard/node_modules/next/dist/client/components/unresolved-thenable.js +23 -0
  519. package/dist-dashboard/node_modules/next/dist/client/components/unstable-rethrow.js +31 -0
  520. package/dist-dashboard/node_modules/next/dist/client/components/use-action-queue.js +140 -0
  521. package/dist-dashboard/node_modules/next/dist/client/components/use-offline.js +68 -0
  522. package/dist-dashboard/node_modules/next/dist/client/dev/debug-channel.js +111 -0
  523. package/dist-dashboard/node_modules/next/dist/client/flight-data-helpers.js +182 -0
  524. package/dist-dashboard/node_modules/next/dist/client/has-base-path.js +23 -0
  525. package/dist-dashboard/node_modules/next/dist/client/lib/console.js +177 -0
  526. package/dist-dashboard/node_modules/next/dist/client/lib/javascript-url.js +32 -0
  527. package/dist-dashboard/node_modules/next/dist/client/navigation-build-id.js +53 -0
  528. package/dist-dashboard/node_modules/next/dist/client/normalize-trailing-slash.js +37 -0
  529. package/dist-dashboard/node_modules/next/dist/client/remove-base-path.js +32 -0
  530. package/dist-dashboard/node_modules/next/dist/client/route-params.js +271 -0
  531. package/dist-dashboard/node_modules/next/dist/client/sequential-call-server.js +45 -0
  532. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +339 -0
  533. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/cookies/package.json +1 -0
  534. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/ponyfill/index.js +46 -0
  535. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/ponyfill/package.json +1 -0
  536. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/abort-controller.js.text.js +1 -0
  537. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/console.js.text.js +1 -0
  538. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/events.js.text.js +1 -0
  539. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/index.js +5 -0
  540. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/load.js +18713 -0
  541. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/package.json +1 -0
  542. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/stream.js +44 -0
  543. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/timers.js.text.js +1 -0
  544. package/dist-dashboard/node_modules/next/dist/compiled/@edge-runtime/primitives/url.js.text.js +1 -0
  545. package/dist-dashboard/node_modules/next/dist/compiled/@hapi/accept/index.js +1 -0
  546. package/dist-dashboard/node_modules/next/dist/compiled/@hapi/accept/package.json +1 -0
  547. package/dist-dashboard/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -0
  548. package/dist-dashboard/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/package.json +1 -0
  549. package/dist-dashboard/node_modules/next/dist/compiled/@napi-rs/triples/index.js +1 -0
  550. package/dist-dashboard/node_modules/next/dist/compiled/@napi-rs/triples/package.json +1 -0
  551. package/dist-dashboard/node_modules/next/dist/compiled/@opentelemetry/api/index.js +1 -0
  552. package/dist-dashboard/node_modules/next/dist/compiled/@opentelemetry/api/package.json +1 -0
  553. package/dist-dashboard/node_modules/next/dist/compiled/@vercel/detect-agent/index.js +1 -0
  554. package/dist-dashboard/node_modules/next/dist/compiled/@vercel/detect-agent/package.json +1 -0
  555. package/dist-dashboard/node_modules/next/dist/compiled/async-retry/index.js +1 -0
  556. package/dist-dashboard/node_modules/next/dist/compiled/async-retry/package.json +1 -0
  557. package/dist-dashboard/node_modules/next/dist/compiled/async-sema/index.js +1 -0
  558. package/dist-dashboard/node_modules/next/dist/compiled/async-sema/package.json +1 -0
  559. package/dist-dashboard/node_modules/next/dist/compiled/busboy/index.js +1 -0
  560. package/dist-dashboard/node_modules/next/dist/compiled/busboy/package.json +1 -0
  561. package/dist-dashboard/node_modules/next/dist/compiled/bytes/index.js +8 -0
  562. package/dist-dashboard/node_modules/next/dist/compiled/bytes/package.json +1 -0
  563. package/dist-dashboard/node_modules/next/dist/compiled/ci-info/index.js +1 -0
  564. package/dist-dashboard/node_modules/next/dist/compiled/ci-info/package.json +1 -0
  565. package/dist-dashboard/node_modules/next/dist/compiled/commander/index.js +1 -0
  566. package/dist-dashboard/node_modules/next/dist/compiled/commander/package.json +1 -0
  567. package/dist-dashboard/node_modules/next/dist/compiled/comment-json/index.js +7 -0
  568. package/dist-dashboard/node_modules/next/dist/compiled/comment-json/package.json +1 -0
  569. package/dist-dashboard/node_modules/next/dist/compiled/compression/index.js +58 -0
  570. package/dist-dashboard/node_modules/next/dist/compiled/compression/package.json +1 -0
  571. package/dist-dashboard/node_modules/next/dist/compiled/conf/index.js +3 -0
  572. package/dist-dashboard/node_modules/next/dist/compiled/conf/package.json +1 -0
  573. package/dist-dashboard/node_modules/next/dist/compiled/content-disposition/index.js +6 -0
  574. package/dist-dashboard/node_modules/next/dist/compiled/content-disposition/package.json +1 -0
  575. package/dist-dashboard/node_modules/next/dist/compiled/cookie/index.js +7 -0
  576. package/dist-dashboard/node_modules/next/dist/compiled/cookie/package.json +1 -0
  577. package/dist-dashboard/node_modules/next/dist/compiled/cross-spawn/index.js +1 -0
  578. package/dist-dashboard/node_modules/next/dist/compiled/cross-spawn/package.json +1 -0
  579. package/dist-dashboard/node_modules/next/dist/compiled/debug/index.js +1 -0
  580. package/dist-dashboard/node_modules/next/dist/compiled/debug/package.json +1 -0
  581. package/dist-dashboard/node_modules/next/dist/compiled/edge-runtime/index.js +1 -0
  582. package/dist-dashboard/node_modules/next/dist/compiled/edge-runtime/package.json +1 -0
  583. package/dist-dashboard/node_modules/next/dist/compiled/find-up/index.js +1 -0
  584. package/dist-dashboard/node_modules/next/dist/compiled/find-up/package.json +1 -0
  585. package/dist-dashboard/node_modules/next/dist/compiled/fresh/index.js +8 -0
  586. package/dist-dashboard/node_modules/next/dist/compiled/fresh/package.json +1 -0
  587. package/dist-dashboard/node_modules/next/dist/compiled/hash.js/sha256/256.js +1 -0
  588. package/dist-dashboard/node_modules/next/dist/compiled/hash.js/sha256/package.json +1 -0
  589. package/dist-dashboard/node_modules/next/dist/compiled/httpxy/index.js +1 -0
  590. package/dist-dashboard/node_modules/next/dist/compiled/httpxy/package.json +1 -0
  591. package/dist-dashboard/node_modules/next/dist/compiled/image-detector/detector.js +1 -0
  592. package/dist-dashboard/node_modules/next/dist/compiled/image-size/index.js +1 -0
  593. package/dist-dashboard/node_modules/next/dist/compiled/image-size/package.json +1 -0
  594. package/dist-dashboard/node_modules/next/dist/compiled/ipaddr.js/ipaddr.js +1 -0
  595. package/dist-dashboard/node_modules/next/dist/compiled/ipaddr.js/package.json +1 -0
  596. package/dist-dashboard/node_modules/next/dist/compiled/is-animated/index.js +1 -0
  597. package/dist-dashboard/node_modules/next/dist/compiled/is-animated/package.json +1 -0
  598. package/dist-dashboard/node_modules/next/dist/compiled/is-docker/index.js +1 -0
  599. package/dist-dashboard/node_modules/next/dist/compiled/is-docker/package.json +1 -0
  600. package/dist-dashboard/node_modules/next/dist/compiled/is-wsl/index.js +1 -0
  601. package/dist-dashboard/node_modules/next/dist/compiled/is-wsl/package.json +1 -0
  602. package/dist-dashboard/node_modules/next/dist/compiled/jsonwebtoken/index.js +11 -0
  603. package/dist-dashboard/node_modules/next/dist/compiled/jsonwebtoken/package.json +1 -0
  604. package/dist-dashboard/node_modules/next/dist/compiled/nanoid/index.cjs +1 -0
  605. package/dist-dashboard/node_modules/next/dist/compiled/nanoid/package.json +1 -0
  606. package/dist-dashboard/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +327 -0
  607. package/dist-dashboard/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +327 -0
  608. package/dist-dashboard/node_modules/next/dist/compiled/next-server/app-route-turbo.runtime.prod.js +8 -0
  609. package/dist-dashboard/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +20 -0
  610. package/dist-dashboard/node_modules/next/dist/compiled/p-limit/index.js +1 -0
  611. package/dist-dashboard/node_modules/next/dist/compiled/p-limit/package.json +1 -0
  612. package/dist-dashboard/node_modules/next/dist/compiled/p-queue/index.js +1 -0
  613. package/dist-dashboard/node_modules/next/dist/compiled/p-queue/package.json +1 -0
  614. package/dist-dashboard/node_modules/next/dist/compiled/path-browserify/index.js +1 -0
  615. package/dist-dashboard/node_modules/next/dist/compiled/path-browserify/package.json +1 -0
  616. package/dist-dashboard/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -0
  617. package/dist-dashboard/node_modules/next/dist/compiled/path-to-regexp/package.json +1 -0
  618. package/dist-dashboard/node_modules/next/dist/compiled/picomatch/index.js +1 -0
  619. package/dist-dashboard/node_modules/next/dist/compiled/picomatch/package.json +1 -0
  620. package/dist-dashboard/node_modules/next/dist/compiled/react-is/cjs/react-is.development.js +133 -0
  621. package/dist-dashboard/node_modules/next/dist/compiled/react-is/cjs/react-is.production.js +130 -0
  622. package/dist-dashboard/node_modules/next/dist/compiled/react-is/index.js +7 -0
  623. package/dist-dashboard/node_modules/next/dist/compiled/react-is/package.json +26 -0
  624. package/dist-dashboard/node_modules/next/dist/compiled/regenerator-runtime/package.json +19 -0
  625. package/dist-dashboard/node_modules/next/dist/compiled/regenerator-runtime/runtime.js +729 -0
  626. package/dist-dashboard/node_modules/next/dist/compiled/semver/index.js +1 -0
  627. package/dist-dashboard/node_modules/next/dist/compiled/semver/package.json +1 -0
  628. package/dist-dashboard/node_modules/next/dist/compiled/send/index.js +70 -0
  629. package/dist-dashboard/node_modules/next/dist/compiled/send/package.json +1 -0
  630. package/dist-dashboard/node_modules/next/dist/compiled/source-map/package.json +1 -0
  631. package/dist-dashboard/node_modules/next/dist/compiled/source-map/source-map.js +1 -0
  632. package/dist-dashboard/node_modules/next/dist/compiled/stacktrace-parser/package.json +1 -0
  633. package/dist-dashboard/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -0
  634. package/dist-dashboard/node_modules/next/dist/compiled/string-hash/index.js +1 -0
  635. package/dist-dashboard/node_modules/next/dist/compiled/string-hash/package.json +1 -0
  636. package/dist-dashboard/node_modules/next/dist/compiled/strip-ansi/index.js +1 -0
  637. package/dist-dashboard/node_modules/next/dist/compiled/strip-ansi/package.json +1 -0
  638. package/dist-dashboard/node_modules/next/dist/compiled/superstruct/index.cjs +1 -0
  639. package/dist-dashboard/node_modules/next/dist/compiled/superstruct/package.json +1 -0
  640. package/dist-dashboard/node_modules/next/dist/compiled/tar/index.min.js +1 -0
  641. package/dist-dashboard/node_modules/next/dist/compiled/tar/package.json +1 -0
  642. package/dist-dashboard/node_modules/next/dist/compiled/text-table/index.js +1 -0
  643. package/dist-dashboard/node_modules/next/dist/compiled/text-table/package.json +1 -0
  644. package/dist-dashboard/node_modules/next/dist/compiled/watchpack/package.json +1 -0
  645. package/dist-dashboard/node_modules/next/dist/compiled/watchpack/watchpack.js +1 -0
  646. package/dist-dashboard/node_modules/next/dist/compiled/write-file-atomic/index.js +1 -0
  647. package/dist-dashboard/node_modules/next/dist/compiled/write-file-atomic/package.json +1 -0
  648. package/dist-dashboard/node_modules/next/dist/compiled/ws/index.js +1 -0
  649. package/dist-dashboard/node_modules/next/dist/compiled/ws/package.json +1 -0
  650. package/dist-dashboard/node_modules/next/dist/compiled/zod/index.cjs +1 -0
  651. package/dist-dashboard/node_modules/next/dist/compiled/zod/package.json +1 -0
  652. package/dist-dashboard/node_modules/next/dist/compiled/zod-validation-error/index.js +1 -0
  653. package/dist-dashboard/node_modules/next/dist/compiled/zod-validation-error/package.json +1 -0
  654. package/dist-dashboard/node_modules/next/dist/experimental/testmode/context.js +57 -0
  655. package/dist-dashboard/node_modules/next/dist/experimental/testmode/fetch.js +150 -0
  656. package/dist-dashboard/node_modules/next/dist/experimental/testmode/httpget.js +33 -0
  657. package/dist-dashboard/node_modules/next/dist/experimental/testmode/server-edge.js +32 -0
  658. package/dist-dashboard/node_modules/next/dist/experimental/testmode/server.js +73 -0
  659. package/dist-dashboard/node_modules/next/dist/export/helpers/create-incremental-cache.js +66 -0
  660. package/dist-dashboard/node_modules/next/dist/export/utils.js +37 -0
  661. package/dist-dashboard/node_modules/next/dist/lib/batcher.js +65 -0
  662. package/dist-dashboard/node_modules/next/dist/lib/build-custom-route.js +46 -0
  663. package/dist-dashboard/node_modules/next/dist/lib/bundler.js +168 -0
  664. package/dist-dashboard/node_modules/next/dist/lib/client-and-server-references.js +54 -0
  665. package/dist-dashboard/node_modules/next/dist/lib/coalesced-function.js +39 -0
  666. package/dist-dashboard/node_modules/next/dist/lib/compile-error.js +14 -0
  667. package/dist-dashboard/node_modules/next/dist/lib/constants.js +420 -0
  668. package/dist-dashboard/node_modules/next/dist/lib/create-client-router-filter.js +83 -0
  669. package/dist-dashboard/node_modules/next/dist/lib/default-transpiled-packages.json +1 -0
  670. package/dist-dashboard/node_modules/next/dist/lib/detect-typo.js +51 -0
  671. package/dist-dashboard/node_modules/next/dist/lib/dist-dir.js +88 -0
  672. package/dist-dashboard/node_modules/next/dist/lib/download-swc.js +175 -0
  673. package/dist-dashboard/node_modules/next/dist/lib/fallback.js +88 -0
  674. package/dist-dashboard/node_modules/next/dist/lib/file-exists.js +53 -0
  675. package/dist-dashboard/node_modules/next/dist/lib/find-config.js +102 -0
  676. package/dist-dashboard/node_modules/next/dist/lib/find-pages-dir.js +57 -0
  677. package/dist-dashboard/node_modules/next/dist/lib/find-root.js +280 -0
  678. package/dist-dashboard/node_modules/next/dist/lib/format-cli-help-output.js +84 -0
  679. package/dist-dashboard/node_modules/next/dist/lib/format-dynamic-import-path.js +43 -0
  680. package/dist-dashboard/node_modules/next/dist/lib/format-server-error.js +75 -0
  681. package/dist-dashboard/node_modules/next/dist/lib/framework/boundary-components.js +62 -0
  682. package/dist-dashboard/node_modules/next/dist/lib/framework/boundary-constants.js +36 -0
  683. package/dist-dashboard/node_modules/next/dist/lib/fs/rename.js +87 -0
  684. package/dist-dashboard/node_modules/next/dist/lib/fs/write-atomic.js +28 -0
  685. package/dist-dashboard/node_modules/next/dist/lib/generate-interception-routes-rewrites.js +52 -0
  686. package/dist-dashboard/node_modules/next/dist/lib/get-files-in-dir.js +33 -0
  687. package/dist-dashboard/node_modules/next/dist/lib/get-network-host.js +44 -0
  688. package/dist-dashboard/node_modules/next/dist/lib/get-package-version.js +118 -0
  689. package/dist-dashboard/node_modules/next/dist/lib/get-project-dir.js +51 -0
  690. package/dist-dashboard/node_modules/next/dist/lib/git-worktree.js +74 -0
  691. package/dist-dashboard/node_modules/next/dist/lib/has-necessary-dependencies.js +49 -0
  692. package/dist-dashboard/node_modules/next/dist/lib/helpers/get-cache-directory.js +62 -0
  693. package/dist-dashboard/node_modules/next/dist/lib/helpers/get-npx-command.js +29 -0
  694. package/dist-dashboard/node_modules/next/dist/lib/helpers/get-online.js +50 -0
  695. package/dist-dashboard/node_modules/next/dist/lib/helpers/get-pkg-manager.js +65 -0
  696. package/dist-dashboard/node_modules/next/dist/lib/helpers/get-registry.js +41 -0
  697. package/dist-dashboard/node_modules/next/dist/lib/helpers/get-reserved-port.js +116 -0
  698. package/dist-dashboard/node_modules/next/dist/lib/helpers/git.js +104 -0
  699. package/dist-dashboard/node_modules/next/dist/lib/helpers/install.js +83 -0
  700. package/dist-dashboard/node_modules/next/dist/lib/import-next-warning.js +50 -0
  701. package/dist-dashboard/node_modules/next/dist/lib/inline-static-env.js +108 -0
  702. package/dist-dashboard/node_modules/next/dist/lib/install-dependencies.js +40 -0
  703. package/dist-dashboard/node_modules/next/dist/lib/interop-default.js +16 -0
  704. package/dist-dashboard/node_modules/next/dist/lib/is-api-route.js +15 -0
  705. package/dist-dashboard/node_modules/next/dist/lib/is-app-page-route.js +15 -0
  706. package/dist-dashboard/node_modules/next/dist/lib/is-app-route-route.js +15 -0
  707. package/dist-dashboard/node_modules/next/dist/lib/is-edge-runtime.js +16 -0
  708. package/dist-dashboard/node_modules/next/dist/lib/is-error.js +66 -0
  709. package/dist-dashboard/node_modules/next/dist/lib/is-interception-route-rewrite.js +18 -0
  710. package/dist-dashboard/node_modules/next/dist/lib/is-internal-component.js +36 -0
  711. package/dist-dashboard/node_modules/next/dist/lib/is-serializable-props.js +82 -0
  712. package/dist-dashboard/node_modules/next/dist/lib/known-edge-safe-packages.json +1 -0
  713. package/dist-dashboard/node_modules/next/dist/lib/load-custom-routes.js +594 -0
  714. package/dist-dashboard/node_modules/next/dist/lib/memory/gc-observer.js +53 -0
  715. package/dist-dashboard/node_modules/next/dist/lib/memory/shutdown.js +29 -0
  716. package/dist-dashboard/node_modules/next/dist/lib/memory/startup.js +47 -0
  717. package/dist-dashboard/node_modules/next/dist/lib/memory/trace.js +109 -0
  718. package/dist-dashboard/node_modules/next/dist/lib/metadata/constants.js +40 -0
  719. package/dist-dashboard/node_modules/next/dist/lib/metadata/default-metadata.js +82 -0
  720. package/dist-dashboard/node_modules/next/dist/lib/metadata/generate/icon-mark.js +22 -0
  721. package/dist-dashboard/node_modules/next/dist/lib/metadata/generate/utils.js +52 -0
  722. package/dist-dashboard/node_modules/next/dist/lib/metadata/get-metadata-route.js +162 -0
  723. package/dist-dashboard/node_modules/next/dist/lib/metadata/index.js +18 -0
  724. package/dist-dashboard/node_modules/next/dist/lib/metadata/is-metadata-route.js +221 -0
  725. package/dist-dashboard/node_modules/next/dist/lib/metadata/metadata-context.js +18 -0
  726. package/dist-dashboard/node_modules/next/dist/lib/metadata/metadata-elements.js +1498 -0
  727. package/dist-dashboard/node_modules/next/dist/lib/metadata/metadata-parallel.js +175 -0
  728. package/dist-dashboard/node_modules/next/dist/lib/metadata/metadata-resolution-primitives.js +467 -0
  729. package/dist-dashboard/node_modules/next/dist/lib/metadata/metadata.js +174 -0
  730. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolve-metadata-parallel.js +632 -0
  731. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolve-metadata.js +485 -0
  732. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolvers/resolve-basics.js +232 -0
  733. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolvers/resolve-icons.js +56 -0
  734. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolvers/resolve-opengraph.js +199 -0
  735. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolvers/resolve-title.js +40 -0
  736. package/dist-dashboard/node_modules/next/dist/lib/metadata/resolvers/resolve-url.js +135 -0
  737. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/alternative-urls-types.js +7 -0
  738. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/extra-types.js +9 -0
  739. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/icons.js +6 -0
  740. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/manifest-types.js +6 -0
  741. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/metadata-interface.js +18 -0
  742. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/metadata-types.js +10 -0
  743. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/opengraph-types.js +6 -0
  744. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/resolvers.js +6 -0
  745. package/dist-dashboard/node_modules/next/dist/lib/metadata/types/twitter-types.js +7 -0
  746. package/dist-dashboard/node_modules/next/dist/lib/mime-type.js +20 -0
  747. package/dist-dashboard/node_modules/next/dist/lib/mkcert.js +188 -0
  748. package/dist-dashboard/node_modules/next/dist/lib/multi-file-writer.js +75 -0
  749. package/dist-dashboard/node_modules/next/dist/lib/needs-experimental-react.js +16 -0
  750. package/dist-dashboard/node_modules/next/dist/lib/non-nullable.js +15 -0
  751. package/dist-dashboard/node_modules/next/dist/lib/normalize-path.js +21 -0
  752. package/dist-dashboard/node_modules/next/dist/lib/oxford-comma-list.js +15 -0
  753. package/dist-dashboard/node_modules/next/dist/lib/page-types.js +18 -0
  754. package/dist-dashboard/node_modules/next/dist/lib/patch-incorrect-lockfile.js +181 -0
  755. package/dist-dashboard/node_modules/next/dist/lib/pick.js +19 -0
  756. package/dist-dashboard/node_modules/next/dist/lib/picocolors.js +187 -0
  757. package/dist-dashboard/node_modules/next/dist/lib/pretty-bytes.js +70 -0
  758. package/dist-dashboard/node_modules/next/dist/lib/profiles-dir.js +45 -0
  759. package/dist-dashboard/node_modules/next/dist/lib/realpath.js +20 -0
  760. package/dist-dashboard/node_modules/next/dist/lib/recursive-copy.js +76 -0
  761. package/dist-dashboard/node_modules/next/dist/lib/recursive-delete.js +176 -0
  762. package/dist-dashboard/node_modules/next/dist/lib/recursive-readdir.js +124 -0
  763. package/dist-dashboard/node_modules/next/dist/lib/redirect-status.js +46 -0
  764. package/dist-dashboard/node_modules/next/dist/lib/require-instrumentation-client.js +32 -0
  765. package/dist-dashboard/node_modules/next/dist/lib/resolve-build-paths.js +178 -0
  766. package/dist-dashboard/node_modules/next/dist/lib/resolve-from.js +57 -0
  767. package/dist-dashboard/node_modules/next/dist/lib/route-pattern-normalizer.js +107 -0
  768. package/dist-dashboard/node_modules/next/dist/lib/scheduler.js +64 -0
  769. package/dist-dashboard/node_modules/next/dist/lib/semver-noop.js +18 -0
  770. package/dist-dashboard/node_modules/next/dist/lib/server-external-packages.jsonc +103 -0
  771. package/dist-dashboard/node_modules/next/dist/lib/setup-exception-listeners.js +11 -0
  772. package/dist-dashboard/node_modules/next/dist/lib/static-env.js +88 -0
  773. package/dist-dashboard/node_modules/next/dist/lib/try-to-parse-path.js +67 -0
  774. package/dist-dashboard/node_modules/next/dist/lib/turbopack-cache-seed.js +171 -0
  775. package/dist-dashboard/node_modules/next/dist/lib/turbopack-warning.js +185 -0
  776. package/dist-dashboard/node_modules/next/dist/lib/typescript/diagnosticFormatter.js +243 -0
  777. package/dist-dashboard/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +61 -0
  778. package/dist-dashboard/node_modules/next/dist/lib/typescript/getTypeScriptIntent.js +52 -0
  779. package/dist-dashboard/node_modules/next/dist/lib/typescript/loadTsConfig.js +181 -0
  780. package/dist-dashboard/node_modules/next/dist/lib/typescript/missingDependencyError.js +22 -0
  781. package/dist-dashboard/node_modules/next/dist/lib/typescript/runTypeCheck.js +141 -0
  782. package/dist-dashboard/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +52 -0
  783. package/dist-dashboard/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +244 -0
  784. package/dist-dashboard/node_modules/next/dist/lib/typescript/type-paths.js +51 -0
  785. package/dist-dashboard/node_modules/next/dist/lib/typescript/writeAppTypeDeclarations.js +77 -0
  786. package/dist-dashboard/node_modules/next/dist/lib/typescript/writeConfigurationDefaults.js +395 -0
  787. package/dist-dashboard/node_modules/next/dist/lib/url.js +75 -0
  788. package/dist-dashboard/node_modules/next/dist/lib/verify-partytown-setup.js +100 -0
  789. package/dist-dashboard/node_modules/next/dist/lib/verify-root-layout.js +165 -0
  790. package/dist-dashboard/node_modules/next/dist/lib/verify-typescript-setup.js +271 -0
  791. package/dist-dashboard/node_modules/next/dist/lib/wait.js +19 -0
  792. package/dist-dashboard/node_modules/next/dist/lib/warn-missing-react-dependencies.js +33 -0
  793. package/dist-dashboard/node_modules/next/dist/lib/with-promise-cache.js +24 -0
  794. package/dist-dashboard/node_modules/next/dist/lib/worker.js +230 -0
  795. package/dist-dashboard/node_modules/next/dist/server/ReactDOMServerPages.js +16 -0
  796. package/dist-dashboard/node_modules/next/dist/server/accept-header.js +120 -0
  797. package/dist-dashboard/node_modules/next/dist/server/after/after-context.js +158 -0
  798. package/dist-dashboard/node_modules/next/dist/server/after/after.js +24 -0
  799. package/dist-dashboard/node_modules/next/dist/server/after/awaiter.js +70 -0
  800. package/dist-dashboard/node_modules/next/dist/server/after/builtin-request-context.js +38 -0
  801. package/dist-dashboard/node_modules/next/dist/server/after/index.js +21 -0
  802. package/dist-dashboard/node_modules/next/dist/server/after/run-with-after.js +35 -0
  803. package/dist-dashboard/node_modules/next/dist/server/api-utils/get-cookie-parser.js +22 -0
  804. package/dist-dashboard/node_modules/next/dist/server/api-utils/index.js +208 -0
  805. package/dist-dashboard/node_modules/next/dist/server/api-utils/node/api-resolver.js +355 -0
  806. package/dist-dashboard/node_modules/next/dist/server/api-utils/node/parse-body.js +67 -0
  807. package/dist-dashboard/node_modules/next/dist/server/api-utils/node/try-get-preview-data.js +89 -0
  808. package/dist-dashboard/node_modules/next/dist/server/api-utils/web.js +17 -0
  809. package/dist-dashboard/node_modules/next/dist/server/app-render/action-async-storage-instance.js +14 -0
  810. package/dist-dashboard/node_modules/next/dist/server/app-render/action-async-storage.external.js +13 -0
  811. package/dist-dashboard/node_modules/next/dist/server/app-render/action-handler.js +1088 -0
  812. package/dist-dashboard/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +14 -0
  813. package/dist-dashboard/node_modules/next/dist/server/app-render/after-task-async-storage.external.js +13 -0
  814. package/dist-dashboard/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +308 -0
  815. package/dist-dashboard/node_modules/next/dist/server/app-render/app-render-render-utils.js +72 -0
  816. package/dist-dashboard/node_modules/next/dist/server/app-render/app-render-scheduling.js +176 -0
  817. package/dist-dashboard/node_modules/next/dist/server/app-render/app-render.js +6631 -0
  818. package/dist-dashboard/node_modules/next/dist/server/app-render/async-local-storage.js +81 -0
  819. package/dist-dashboard/node_modules/next/dist/server/app-render/blocking-route-messages.js +230 -0
  820. package/dist-dashboard/node_modules/next/dist/server/app-render/cache-signal.js +207 -0
  821. package/dist-dashboard/node_modules/next/dist/server/app-render/collect-segment-data.js +1003 -0
  822. package/dist-dashboard/node_modules/next/dist/server/app-render/console-async-storage-instance.js +14 -0
  823. package/dist-dashboard/node_modules/next/dist/server/app-render/console-async-storage.external.js +13 -0
  824. package/dist-dashboard/node_modules/next/dist/server/app-render/create-component-styles-and-scripts.js +39 -0
  825. package/dist-dashboard/node_modules/next/dist/server/app-render/create-component-tree.js +782 -0
  826. package/dist-dashboard/node_modules/next/dist/server/app-render/create-error-handler.js +196 -0
  827. package/dist-dashboard/node_modules/next/dist/server/app-render/create-transport-tree-from-loader-tree.js +190 -0
  828. package/dist-dashboard/node_modules/next/dist/server/app-render/csrf-protection.js +86 -0
  829. package/dist-dashboard/node_modules/next/dist/server/app-render/debug-channel-server.js +47 -0
  830. package/dist-dashboard/node_modules/next/dist/server/app-render/debug-channel-server.node.js +60 -0
  831. package/dist-dashboard/node_modules/next/dist/server/app-render/debug-channel-server.web.js +56 -0
  832. package/dist-dashboard/node_modules/next/dist/server/app-render/dev-validation-error-delivery.js +28 -0
  833. package/dist-dashboard/node_modules/next/dist/server/app-render/dev-validation-events.js +26 -0
  834. package/dist-dashboard/node_modules/next/dist/server/app-render/dev-validation-scheduler.js +86 -0
  835. package/dist-dashboard/node_modules/next/dist/server/app-render/dev-validation-worker-globals.js +41 -0
  836. package/dist-dashboard/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +81 -0
  837. package/dist-dashboard/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +14 -0
  838. package/dist-dashboard/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +36 -0
  839. package/dist-dashboard/node_modules/next/dist/server/app-render/dynamic-rendering-client.js +124 -0
  840. package/dist-dashboard/node_modules/next/dist/server/app-render/dynamic-rendering.js +1132 -0
  841. package/dist-dashboard/node_modules/next/dist/server/app-render/encryption-utils-server.js +114 -0
  842. package/dist-dashboard/node_modules/next/dist/server/app-render/encryption-utils.js +89 -0
  843. package/dist-dashboard/node_modules/next/dist/server/app-render/encryption.js +248 -0
  844. package/dist-dashboard/node_modules/next/dist/server/app-render/entry-base.js +260 -0
  845. package/dist-dashboard/node_modules/next/dist/server/app-render/flight-render-result.js +28 -0
  846. package/dist-dashboard/node_modules/next/dist/server/app-render/get-asset-query-string.js +29 -0
  847. package/dist-dashboard/node_modules/next/dist/server/app-render/get-css-inlined-link-tags.js +45 -0
  848. package/dist-dashboard/node_modules/next/dist/server/app-render/get-layer-assets.js +69 -0
  849. package/dist-dashboard/node_modules/next/dist/server/app-render/get-preloadable-fonts.js +39 -0
  850. package/dist-dashboard/node_modules/next/dist/server/app-render/get-script-nonce-from-header.js +32 -0
  851. package/dist-dashboard/node_modules/next/dist/server/app-render/get-short-dynamic-param-type.js +25 -0
  852. package/dist-dashboard/node_modules/next/dist/server/app-render/has-loading-component-in-tree.js +19 -0
  853. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-test-bootstrap.js +20 -0
  854. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +31 -0
  855. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/boundary-impl.js +118 -0
  856. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +38 -0
  857. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +233 -0
  858. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +383 -0
  859. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +33 -0
  860. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/instant-validation.js +873 -0
  861. package/dist-dashboard/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +88 -0
  862. package/dist-dashboard/node_modules/next/dist/server/app-render/interop-default.js +17 -0
  863. package/dist-dashboard/node_modules/next/dist/server/app-render/make-get-server-inserted-html.js +91 -0
  864. package/dist-dashboard/node_modules/next/dist/server/app-render/manifests-singleton.js +399 -0
  865. package/dist-dashboard/node_modules/next/dist/server/app-render/metadata-insertion/create-server-inserted-metadata.js +29 -0
  866. package/dist-dashboard/node_modules/next/dist/server/app-render/module-loading/instrument-module-getter.js +32 -0
  867. package/dist-dashboard/node_modules/next/dist/server/app-render/module-loading/track-dynamic-import.js +49 -0
  868. package/dist-dashboard/node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js +32 -0
  869. package/dist-dashboard/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +62 -0
  870. package/dist-dashboard/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +37 -0
  871. package/dist-dashboard/node_modules/next/dist/server/app-render/postponed-state.js +266 -0
  872. package/dist-dashboard/node_modules/next/dist/server/app-render/prospective-render-utils.js +70 -0
  873. package/dist-dashboard/node_modules/next/dist/server/app-render/react-large-shell-error.js +17 -0
  874. package/dist-dashboard/node_modules/next/dist/server/app-render/react-server.node.js +39 -0
  875. package/dist-dashboard/node_modules/next/dist/server/app-render/render-css-resource.js +57 -0
  876. package/dist-dashboard/node_modules/next/dist/server/app-render/render-in-browser.js +27 -0
  877. package/dist-dashboard/node_modules/next/dist/server/app-render/required-scripts.js +72 -0
  878. package/dist-dashboard/node_modules/next/dist/server/app-render/rsc/preloads.js +74 -0
  879. package/dist-dashboard/node_modules/next/dist/server/app-render/rsc/taint.js +75 -0
  880. package/dist-dashboard/node_modules/next/dist/server/app-render/segment-config/ensure-static.js +206 -0
  881. package/dist-dashboard/node_modules/next/dist/server/app-render/segment-explorer-path.js +128 -0
  882. package/dist-dashboard/node_modules/next/dist/server/app-render/server-inserted-html.js +77 -0
  883. package/dist-dashboard/node_modules/next/dist/server/app-render/staged-rendering.js +316 -0
  884. package/dist-dashboard/node_modules/next/dist/server/app-render/stale-time.js +101 -0
  885. package/dist-dashboard/node_modules/next/dist/server/app-render/stream-ops.js +155 -0
  886. package/dist-dashboard/node_modules/next/dist/server/app-render/stream-ops.node.js +848 -0
  887. package/dist-dashboard/node_modules/next/dist/server/app-render/stream-ops.web.js +233 -0
  888. package/dist-dashboard/node_modules/next/dist/server/app-render/strip-flight-headers.js +18 -0
  889. package/dist-dashboard/node_modules/next/dist/server/app-render/sync-io-messages.js +59 -0
  890. package/dist-dashboard/node_modules/next/dist/server/app-render/types.js +66 -0
  891. package/dist-dashboard/node_modules/next/dist/server/app-render/use-flight-response.js +204 -0
  892. package/dist-dashboard/node_modules/next/dist/server/app-render/vary-params.js +262 -0
  893. package/dist-dashboard/node_modules/next/dist/server/app-render/wait-for-response.js +36 -0
  894. package/dist-dashboard/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +235 -0
  895. package/dist-dashboard/node_modules/next/dist/server/app-render/work-async-storage-instance.js +14 -0
  896. package/dist-dashboard/node_modules/next/dist/server/app-render/work-async-storage.external.js +13 -0
  897. package/dist-dashboard/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +14 -0
  898. package/dist-dashboard/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +260 -0
  899. package/dist-dashboard/node_modules/next/dist/server/async-storage/draft-mode-provider.js +58 -0
  900. package/dist-dashboard/node_modules/next/dist/server/async-storage/request-store.js +202 -0
  901. package/dist-dashboard/node_modules/next/dist/server/async-storage/with-store.js +6 -0
  902. package/dist-dashboard/node_modules/next/dist/server/async-storage/work-store.js +96 -0
  903. package/dist-dashboard/node_modules/next/dist/server/base-http/helpers.js +36 -0
  904. package/dist-dashboard/node_modules/next/dist/server/base-http/index.js +54 -0
  905. package/dist-dashboard/node_modules/next/dist/server/base-http/node.js +143 -0
  906. package/dist-dashboard/node_modules/next/dist/server/base-http/web.js +116 -0
  907. package/dist-dashboard/node_modules/next/dist/server/base-server.js +2147 -0
  908. package/dist-dashboard/node_modules/next/dist/server/body-streams.js +122 -0
  909. package/dist-dashboard/node_modules/next/dist/server/cache-dir.js +26 -0
  910. package/dist-dashboard/node_modules/next/dist/server/capsize-font-metrics.json +181516 -0
  911. package/dist-dashboard/node_modules/next/dist/server/ci-info.js +41 -0
  912. package/dist-dashboard/node_modules/next/dist/server/client-component-renderer-logger.js +171 -0
  913. package/dist-dashboard/node_modules/next/dist/server/config-schema.js +852 -0
  914. package/dist-dashboard/node_modules/next/dist/server/config-shared.js +417 -0
  915. package/dist-dashboard/node_modules/next/dist/server/config-utils.js +185 -0
  916. package/dist-dashboard/node_modules/next/dist/server/config.js +1658 -0
  917. package/dist-dashboard/node_modules/next/dist/server/create-deduped-by-callsite-server-error-logger.js +96 -0
  918. package/dist-dashboard/node_modules/next/dist/server/crypto-utils.js +70 -0
  919. package/dist-dashboard/node_modules/next/dist/server/dev/browser-logs/file-logger.js +186 -0
  920. package/dist-dashboard/node_modules/next/dist/server/dev/browser-logs/receive-logs.js +610 -0
  921. package/dist-dashboard/node_modules/next/dist/server/dev/browser-logs/source-map.js +222 -0
  922. package/dist-dashboard/node_modules/next/dist/server/dev/debug-channel.js +108 -0
  923. package/dist-dashboard/node_modules/next/dist/server/dev/dev-indicator-server-state.js +15 -0
  924. package/dist-dashboard/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +233 -0
  925. package/dist-dashboard/node_modules/next/dist/server/dev/dev-validation-worker.js +308 -0
  926. package/dist-dashboard/node_modules/next/dist/server/dev/get-source-map-from-file.js +80 -0
  927. package/dist-dashboard/node_modules/next/dist/server/dev/hot-middleware.js +302 -0
  928. package/dist-dashboard/node_modules/next/dist/server/dev/hot-reloader-rspack.js +171 -0
  929. package/dist-dashboard/node_modules/next/dist/server/dev/hot-reloader-shared-utils.js +56 -0
  930. package/dist-dashboard/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +1894 -0
  931. package/dist-dashboard/node_modules/next/dist/server/dev/hot-reloader-types.js +63 -0
  932. package/dist-dashboard/node_modules/next/dist/server/dev/hot-reloader-webpack.js +1386 -0
  933. package/dist-dashboard/node_modules/next/dist/server/dev/log-requests.js +152 -0
  934. package/dist-dashboard/node_modules/next/dist/server/dev/messages.js +66 -0
  935. package/dist-dashboard/node_modules/next/dist/server/dev/middleware-turbopack.js +406 -0
  936. package/dist-dashboard/node_modules/next/dist/server/dev/middleware-webpack.js +487 -0
  937. package/dist-dashboard/node_modules/next/dist/server/dev/node-stack-frames.js +64 -0
  938. package/dist-dashboard/node_modules/next/dist/server/dev/on-demand-entry-handler.js +773 -0
  939. package/dist-dashboard/node_modules/next/dist/server/dev/parse-version-info.js +108 -0
  940. package/dist-dashboard/node_modules/next/dist/server/dev/require-cache.js +109 -0
  941. package/dist-dashboard/node_modules/next/dist/server/dev/runtime-error-state.js +220 -0
  942. package/dist-dashboard/node_modules/next/dist/server/dev/serialized-errors.js +63 -0
  943. package/dist-dashboard/node_modules/next/dist/server/dev/server-action-logger.js +37 -0
  944. package/dist-dashboard/node_modules/next/dist/server/dev/static-paths-worker.js +107 -0
  945. package/dist-dashboard/node_modules/next/dist/server/dev/turbopack-utils.js +711 -0
  946. package/dist-dashboard/node_modules/next/dist/server/dev/use-cache-probe-pool.js +178 -0
  947. package/dist-dashboard/node_modules/next/dist/server/dev/use-cache-probe-worker.js +181 -0
  948. package/dist-dashboard/node_modules/next/dist/server/dynamic-rendering-utils.js +528 -0
  949. package/dist-dashboard/node_modules/next/dist/server/font-utils.js +43 -0
  950. package/dist-dashboard/node_modules/next/dist/server/get-app-route-from-entrypoint.js +30 -0
  951. package/dist-dashboard/node_modules/next/dist/server/get-page-files.js +40 -0
  952. package/dist-dashboard/node_modules/next/dist/server/get-route-from-entrypoint.js +35 -0
  953. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/detect-content-type.js +229 -0
  954. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/extract-etag.js +53 -0
  955. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/get-image-size.js +25 -0
  956. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/get-max-age.js +41 -0
  957. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/get-previously-cached-image-or-null.js +22 -0
  958. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/image-error.js +23 -0
  959. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/image-type.js +86 -0
  960. package/dist-dashboard/node_modules/next/dist/server/image-optimizer/transform.js +227 -0
  961. package/dist-dashboard/node_modules/next/dist/server/image-optimizer.js +878 -0
  962. package/dist-dashboard/node_modules/next/dist/server/instrumentation/types.js +6 -0
  963. package/dist-dashboard/node_modules/next/dist/server/instrumentation/utils.js +21 -0
  964. package/dist-dashboard/node_modules/next/dist/server/internal-utils.js +39 -0
  965. package/dist-dashboard/node_modules/next/dist/server/is-private-ip.js +36 -0
  966. package/dist-dashboard/node_modules/next/dist/server/lib/app-dir-module.js +59 -0
  967. package/dist-dashboard/node_modules/next/dist/server/lib/app-info-log.js +145 -0
  968. package/dist-dashboard/node_modules/next/dist/server/lib/async-callback-set.js +29 -0
  969. package/dist-dashboard/node_modules/next/dist/server/lib/cache-control.js +22 -0
  970. package/dist-dashboard/node_modules/next/dist/server/lib/cache-handlers/default.external.js +18 -0
  971. package/dist-dashboard/node_modules/next/dist/server/lib/cache-handlers/default.js +192 -0
  972. package/dist-dashboard/node_modules/next/dist/server/lib/cache-handlers/types.js +8 -0
  973. package/dist-dashboard/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +112 -0
  974. package/dist-dashboard/node_modules/next/dist/server/lib/clone-response.js +77 -0
  975. package/dist-dashboard/node_modules/next/dist/server/lib/cpu-profile.js +56 -0
  976. package/dist-dashboard/node_modules/next/dist/server/lib/decode-query-path-parameter.js +26 -0
  977. package/dist-dashboard/node_modules/next/dist/server/lib/dedupe-fetch.js +159 -0
  978. package/dist-dashboard/node_modules/next/dist/server/lib/dev-bundler-service.js +110 -0
  979. package/dist-dashboard/node_modules/next/dist/server/lib/disk-lru-cache.external.js +63 -0
  980. package/dist-dashboard/node_modules/next/dist/server/lib/encode-header-safe.js +44 -0
  981. package/dist-dashboard/node_modules/next/dist/server/lib/etag.js +56 -0
  982. package/dist-dashboard/node_modules/next/dist/server/lib/experimental/create-env-definitions.js +48 -0
  983. package/dist-dashboard/node_modules/next/dist/server/lib/find-page-file.js +147 -0
  984. package/dist-dashboard/node_modules/next/dist/server/lib/fix-mojibake.js +25 -0
  985. package/dist-dashboard/node_modules/next/dist/server/lib/format-hostname.js +16 -0
  986. package/dist-dashboard/node_modules/next/dist/server/lib/generate-agent-files.js +303 -0
  987. package/dist-dashboard/node_modules/next/dist/server/lib/i18n-provider.js +125 -0
  988. package/dist-dashboard/node_modules/next/dist/server/lib/implicit-tags.js +87 -0
  989. package/dist-dashboard/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +500 -0
  990. package/dist-dashboard/node_modules/next/dist/server/lib/incremental-cache/index.js +556 -0
  991. package/dist-dashboard/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +55 -0
  992. package/dist-dashboard/node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js +81 -0
  993. package/dist-dashboard/node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js +55 -0
  994. package/dist-dashboard/node_modules/next/dist/server/lib/install-code-frame.js +22 -0
  995. package/dist-dashboard/node_modules/next/dist/server/lib/is-ipv6.js +41 -0
  996. package/dist-dashboard/node_modules/next/dist/server/lib/is-non-html-sec-fetch-dest.js +38 -0
  997. package/dist-dashboard/node_modules/next/dist/server/lib/is-rsc-request.js +18 -0
  998. package/dist-dashboard/node_modules/next/dist/server/lib/lazy-module.js +76 -0
  999. package/dist-dashboard/node_modules/next/dist/server/lib/lazy-result.js +46 -0
  1000. package/dist-dashboard/node_modules/next/dist/server/lib/lru-cache.js +187 -0
  1001. package/dist-dashboard/node_modules/next/dist/server/lib/match-next-data-pathname.js +20 -0
  1002. package/dist-dashboard/node_modules/next/dist/server/lib/mock-request.js +345 -0
  1003. package/dist-dashboard/node_modules/next/dist/server/lib/module-loader/module-loader.js +8 -0
  1004. package/dist-dashboard/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +21 -0
  1005. package/dist-dashboard/node_modules/next/dist/server/lib/module-loader/route-module-loader.js +22 -0
  1006. package/dist-dashboard/node_modules/next/dist/server/lib/node-fs-methods.js +42 -0
  1007. package/dist-dashboard/node_modules/next/dist/server/lib/params-utils.js +52 -0
  1008. package/dist-dashboard/node_modules/next/dist/server/lib/parse-stack.js +46 -0
  1009. package/dist-dashboard/node_modules/next/dist/server/lib/patch-fetch.js +1033 -0
  1010. package/dist-dashboard/node_modules/next/dist/server/lib/patch-set-header.js +45 -0
  1011. package/dist-dashboard/node_modules/next/dist/server/lib/postponed-request-body.js +60 -0
  1012. package/dist-dashboard/node_modules/next/dist/server/lib/release-compression-stream.js +24 -0
  1013. package/dist-dashboard/node_modules/next/dist/server/lib/render-server.js +149 -0
  1014. package/dist-dashboard/node_modules/next/dist/server/lib/route-cache-key.js +77 -0
  1015. package/dist-dashboard/node_modules/next/dist/server/lib/router-server.js +826 -0
  1016. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/block-cross-site-dev.js +108 -0
  1017. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/build-data-route.js +71 -0
  1018. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/build-prefetch-segment-data-route.js +50 -0
  1019. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +181 -0
  1020. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +38 -0
  1021. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/filesystem.js +793 -0
  1022. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +149 -0
  1023. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +110 -0
  1024. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/normalize-catchall-routes.js +320 -0
  1025. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/proxy-request.js +128 -0
  1026. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +652 -0
  1027. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/root-params-type-utils.js +61 -0
  1028. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/route-types-utils.js +326 -0
  1029. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/router-server-context.js +26 -0
  1030. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/strict-route-matching-config.js +28 -0
  1031. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/typegen.js +938 -0
  1032. package/dist-dashboard/node_modules/next/dist/server/lib/router-utils/types.js +6 -0
  1033. package/dist-dashboard/node_modules/next/dist/server/lib/server-action-request-meta.js +53 -0
  1034. package/dist-dashboard/node_modules/next/dist/server/lib/server-ipc/utils.js +83 -0
  1035. package/dist-dashboard/node_modules/next/dist/server/lib/source-maps.js +241 -0
  1036. package/dist-dashboard/node_modules/next/dist/server/lib/start-server.js +550 -0
  1037. package/dist-dashboard/node_modules/next/dist/server/lib/streaming-metadata.js +27 -0
  1038. package/dist-dashboard/node_modules/next/dist/server/lib/to-route.js +37 -0
  1039. package/dist-dashboard/node_modules/next/dist/server/lib/trace/constants.js +248 -0
  1040. package/dist-dashboard/node_modules/next/dist/server/lib/trace/local-span-recorder.js +385 -0
  1041. package/dist-dashboard/node_modules/next/dist/server/lib/trace/request-insights-identity.js +37 -0
  1042. package/dist-dashboard/node_modules/next/dist/server/lib/trace/request-insights.js +308 -0
  1043. package/dist-dashboard/node_modules/next/dist/server/lib/trace/span-store.js +69 -0
  1044. package/dist-dashboard/node_modules/next/dist/server/lib/trace/tracer.js +392 -0
  1045. package/dist-dashboard/node_modules/next/dist/server/lib/trace/utils.js +16 -0
  1046. package/dist-dashboard/node_modules/next/dist/server/lib/types.js +6 -0
  1047. package/dist-dashboard/node_modules/next/dist/server/lib/utils.js +343 -0
  1048. package/dist-dashboard/node_modules/next/dist/server/lib/worker-utils.js +32 -0
  1049. package/dist-dashboard/node_modules/next/dist/server/load-components.js +190 -0
  1050. package/dist-dashboard/node_modules/next/dist/server/load-default-error-components.js +41 -0
  1051. package/dist-dashboard/node_modules/next/dist/server/load-manifest.external.js +116 -0
  1052. package/dist-dashboard/node_modules/next/dist/server/match-bundle.js +25 -0
  1053. package/dist-dashboard/node_modules/next/dist/server/mcp/get-mcp-middleware.js +51 -0
  1054. package/dist-dashboard/node_modules/next/dist/server/mcp/get-or-create-mcp-server.js +51 -0
  1055. package/dist-dashboard/node_modules/next/dist/server/mcp/mcp-telemetry-tracker.js +82 -0
  1056. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/compile-route.js +86 -0
  1057. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-compilation-issues.js +68 -0
  1058. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-errors.js +114 -0
  1059. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-logs.js +67 -0
  1060. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-page-metadata.js +188 -0
  1061. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-project-metadata.js +59 -0
  1062. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-request-insights.js +57 -0
  1063. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-routes.js +136 -0
  1064. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/get-server-action-by-id.js +121 -0
  1065. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/next-instance-error-state.js +31 -0
  1066. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +82 -0
  1067. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/utils/format-compilation-issues.js +72 -0
  1068. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +137 -0
  1069. package/dist-dashboard/node_modules/next/dist/server/mcp/tools/utils/resolve-path-to-route.js +49 -0
  1070. package/dist-dashboard/node_modules/next/dist/server/next-server.js +1453 -0
  1071. package/dist-dashboard/node_modules/next/dist/server/next-typescript.js +13 -0
  1072. package/dist-dashboard/node_modules/next/dist/server/next.js +473 -0
  1073. package/dist-dashboard/node_modules/next/dist/server/node-environment-baseline.js +25 -0
  1074. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +300 -0
  1075. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/console-exit.js +49 -0
  1076. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/console-file.js +56 -0
  1077. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/date.js +52 -0
  1078. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/error-inspect.js +8 -0
  1079. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +630 -0
  1080. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +29 -0
  1081. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/io-utils.js +103 -0
  1082. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/node-crypto.js +103 -0
  1083. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +161 -0
  1084. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/random.js +28 -0
  1085. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +507 -0
  1086. package/dist-dashboard/node_modules/next/dist/server/node-environment-extensions/web-crypto.js +45 -0
  1087. package/dist-dashboard/node_modules/next/dist/server/node-environment.js +19 -0
  1088. package/dist-dashboard/node_modules/next/dist/server/node-polyfill-crypto.js +21 -0
  1089. package/dist-dashboard/node_modules/next/dist/server/normalizers/absolute-filename-normalizer.js +33 -0
  1090. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/app/app-bundle-path-normalizer.js +54 -0
  1091. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/app/app-filename-normalizer.js +22 -0
  1092. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +40 -0
  1093. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/app/app-pathname-normalizer.js +55 -0
  1094. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/app/index.js +42 -0
  1095. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/pages/index.js +44 -0
  1096. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/pages/pages-bundle-path-normalizer.js +55 -0
  1097. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/pages/pages-filename-normalizer.js +22 -0
  1098. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/pages/pages-page-normalizer.js +19 -0
  1099. package/dist-dashboard/node_modules/next/dist/server/normalizers/built/pages/pages-pathname-normalizer.js +19 -0
  1100. package/dist-dashboard/node_modules/next/dist/server/normalizers/locale-route-normalizer.js +26 -0
  1101. package/dist-dashboard/node_modules/next/dist/server/normalizers/normalizer.js +6 -0
  1102. package/dist-dashboard/node_modules/next/dist/server/normalizers/normalizers.js +23 -0
  1103. package/dist-dashboard/node_modules/next/dist/server/normalizers/prefixing-normalizer.js +26 -0
  1104. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/base-path.js +21 -0
  1105. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/next-data.js +34 -0
  1106. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/pathname-normalizer.js +6 -0
  1107. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/prefix.js +35 -0
  1108. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/rsc.js +19 -0
  1109. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/segment-prefix-rsc.js +33 -0
  1110. package/dist-dashboard/node_modules/next/dist/server/normalizers/request/suffix.js +27 -0
  1111. package/dist-dashboard/node_modules/next/dist/server/normalizers/underscore-normalizer.js +17 -0
  1112. package/dist-dashboard/node_modules/next/dist/server/normalizers/wrap-normalizer-fn.js +17 -0
  1113. package/dist-dashboard/node_modules/next/dist/server/og/cache-image-response.js +336 -0
  1114. package/dist-dashboard/node_modules/next/dist/server/og/image-response.js +72 -0
  1115. package/dist-dashboard/node_modules/next/dist/server/patch-error-inspect.js +515 -0
  1116. package/dist-dashboard/node_modules/next/dist/server/pipe-readable.js +224 -0
  1117. package/dist-dashboard/node_modules/next/dist/server/post-process.js +39 -0
  1118. package/dist-dashboard/node_modules/next/dist/server/render-result.js +234 -0
  1119. package/dist-dashboard/node_modules/next/dist/server/render.js +1004 -0
  1120. package/dist-dashboard/node_modules/next/dist/server/request/cache-stages.js +250 -0
  1121. package/dist-dashboard/node_modules/next/dist/server/request/connection.js +104 -0
  1122. package/dist-dashboard/node_modules/next/dist/server/request/cookies.js +204 -0
  1123. package/dist-dashboard/node_modules/next/dist/server/request/draft-mode.js +192 -0
  1124. package/dist-dashboard/node_modules/next/dist/server/request/fallback-params.js +109 -0
  1125. package/dist-dashboard/node_modules/next/dist/server/request/headers.js +201 -0
  1126. package/dist-dashboard/node_modules/next/dist/server/request/io.js +87 -0
  1127. package/dist-dashboard/node_modules/next/dist/server/request/params.js +500 -0
  1128. package/dist-dashboard/node_modules/next/dist/server/request/pathname.js +89 -0
  1129. package/dist-dashboard/node_modules/next/dist/server/request/root-params.js +146 -0
  1130. package/dist-dashboard/node_modules/next/dist/server/request/search-params.js +505 -0
  1131. package/dist-dashboard/node_modules/next/dist/server/request/utils.js +77 -0
  1132. package/dist-dashboard/node_modules/next/dist/server/request-meta.js +55 -0
  1133. package/dist-dashboard/node_modules/next/dist/server/require-hook.js +82 -0
  1134. package/dist-dashboard/node_modules/next/dist/server/require.js +109 -0
  1135. package/dist-dashboard/node_modules/next/dist/server/response-cache/index.js +361 -0
  1136. package/dist-dashboard/node_modules/next/dist/server/response-cache/types.js +41 -0
  1137. package/dist-dashboard/node_modules/next/dist/server/response-cache/utils.js +100 -0
  1138. package/dist-dashboard/node_modules/next/dist/server/response-cache/web.js +104 -0
  1139. package/dist-dashboard/node_modules/next/dist/server/resume-data-cache/cache-store.js +119 -0
  1140. package/dist-dashboard/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +144 -0
  1141. package/dist-dashboard/node_modules/next/dist/server/revalidation-utils.js +158 -0
  1142. package/dist-dashboard/node_modules/next/dist/server/route-definitions/app-page-route-definition.js +16 -0
  1143. package/dist-dashboard/node_modules/next/dist/server/route-definitions/app-route-route-definition.js +6 -0
  1144. package/dist-dashboard/node_modules/next/dist/server/route-definitions/locale-route-definition.js +6 -0
  1145. package/dist-dashboard/node_modules/next/dist/server/route-definitions/pages-api-route-definition.js +6 -0
  1146. package/dist-dashboard/node_modules/next/dist/server/route-definitions/pages-route-definition.js +6 -0
  1147. package/dist-dashboard/node_modules/next/dist/server/route-definitions/route-definition.js +6 -0
  1148. package/dist-dashboard/node_modules/next/dist/server/route-kind.js +32 -0
  1149. package/dist-dashboard/node_modules/next/dist/server/route-matches/app-page-route-match.js +6 -0
  1150. package/dist-dashboard/node_modules/next/dist/server/route-matches/app-route-route-match.js +6 -0
  1151. package/dist-dashboard/node_modules/next/dist/server/route-matches/locale-route-match.js +6 -0
  1152. package/dist-dashboard/node_modules/next/dist/server/route-matches/pages-api-route-match.js +16 -0
  1153. package/dist-dashboard/node_modules/next/dist/server/route-matches/pages-route-match.js +6 -0
  1154. package/dist-dashboard/node_modules/next/dist/server/route-matches/route-match.js +6 -0
  1155. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/dev-render-context.js +23 -0
  1156. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +52 -0
  1157. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/module.compiled.js +36 -0
  1158. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/module.js +188 -0
  1159. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/module.render.js +39 -0
  1160. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/normalize-request-url.js +62 -0
  1161. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/parse-request-headers.js +58 -0
  1162. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/app-router-context.js +4 -0
  1163. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/entrypoints.js +87 -0
  1164. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/head-manager-context.js +4 -0
  1165. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/hooks-client-context.js +4 -0
  1166. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/image-config-context.js +4 -0
  1167. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/router-context.js +4 -0
  1168. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/contexts/server-inserted-html.js +4 -0
  1169. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +136 -0
  1170. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtime.js +4 -0
  1171. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-dom.js +4 -0
  1172. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtime.js +4 -0
  1173. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtime.js +4 -0
  1174. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-server.js +4 -0
  1175. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-turbopack-static.js +4 -0
  1176. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server.js +4 -0
  1177. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static.js +4 -0
  1178. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/react.js +4 -0
  1179. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +121 -0
  1180. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtime.js +4 -0
  1181. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom-server.js +4 -0
  1182. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-dom.js +4 -0
  1183. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtime.js +4 -0
  1184. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js +4 -0
  1185. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.js +4 -0
  1186. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-client.js +4 -0
  1187. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js +4 -0
  1188. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/helpers/auto-implement-methods.js +81 -0
  1189. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/helpers/clean-url.js +24 -0
  1190. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/helpers/get-pathname-from-absolute-path.js +29 -0
  1191. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/helpers/is-static-gen-enabled.js +15 -0
  1192. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/helpers/parsed-url-query-to-params.js +20 -0
  1193. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/module.compiled.js +36 -0
  1194. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/module.js +915 -0
  1195. package/dist-dashboard/node_modules/next/dist/server/route-modules/app-route/shared-modules.js +56 -0
  1196. package/dist-dashboard/node_modules/next/dist/server/route-modules/checks.js +45 -0
  1197. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/builtin/_error.js +100 -0
  1198. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/module.compiled.js +20 -0
  1199. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/module.js +92 -0
  1200. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/module.render.js +20 -0
  1201. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/pages-handler.js +576 -0
  1202. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/app-router-context.js +4 -0
  1203. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/entrypoints.js +102 -0
  1204. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/head-manager-context.js +4 -0
  1205. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/hooks-client-context.js +4 -0
  1206. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/html-context.js +4 -0
  1207. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/image-config-context.js +4 -0
  1208. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable-context.js +4 -0
  1209. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/loadable.js +4 -0
  1210. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/router-context.js +4 -0
  1211. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages/vendored/contexts/server-inserted-html.js +4 -0
  1212. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages-api/module.compiled.js +20 -0
  1213. package/dist-dashboard/node_modules/next/dist/server/route-modules/pages-api/module.js +54 -0
  1214. package/dist-dashboard/node_modules/next/dist/server/route-modules/route-module.js +700 -0
  1215. package/dist-dashboard/node_modules/next/dist/server/runtime-reacts.external.js +46 -0
  1216. package/dist-dashboard/node_modules/next/dist/server/send-payload.js +88 -0
  1217. package/dist-dashboard/node_modules/next/dist/server/send-response.js +70 -0
  1218. package/dist-dashboard/node_modules/next/dist/server/serve-static.js +62 -0
  1219. package/dist-dashboard/node_modules/next/dist/server/server-route-utils.js +30 -0
  1220. package/dist-dashboard/node_modules/next/dist/server/server-utils.js +340 -0
  1221. package/dist-dashboard/node_modules/next/dist/server/setup-http-agent-env.js +27 -0
  1222. package/dist-dashboard/node_modules/next/dist/server/stream-utils/encoded-tags.js +122 -0
  1223. package/dist-dashboard/node_modules/next/dist/server/stream-utils/node-buffered-transform-stream.js +51 -0
  1224. package/dist-dashboard/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +935 -0
  1225. package/dist-dashboard/node_modules/next/dist/server/stream-utils/uint8array-helpers.js +74 -0
  1226. package/dist-dashboard/node_modules/next/dist/server/typescript/constant.js +100 -0
  1227. package/dist-dashboard/node_modules/next/dist/server/typescript/index.js +199 -0
  1228. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/client-boundary.js +100 -0
  1229. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/config.js +561 -0
  1230. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/entry.js +149 -0
  1231. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/error.js +38 -0
  1232. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/metadata.js +234 -0
  1233. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/server-boundary.js +115 -0
  1234. package/dist-dashboard/node_modules/next/dist/server/typescript/rules/server.js +79 -0
  1235. package/dist-dashboard/node_modules/next/dist/server/typescript/utils.js +212 -0
  1236. package/dist-dashboard/node_modules/next/dist/server/use-cache/cache-life-profile.js +60 -0
  1237. package/dist-dashboard/node_modules/next/dist/server/use-cache/cache-life.js +79 -0
  1238. package/dist-dashboard/node_modules/next/dist/server/use-cache/cache-tag.js +46 -0
  1239. package/dist-dashboard/node_modules/next/dist/server/use-cache/clone-cache-entry.js +28 -0
  1240. package/dist-dashboard/node_modules/next/dist/server/use-cache/constants.js +40 -0
  1241. package/dist-dashboard/node_modules/next/dist/server/use-cache/handlers.js +265 -0
  1242. package/dist-dashboard/node_modules/next/dist/server/use-cache/tiered-cache-handler.js +147 -0
  1243. package/dist-dashboard/node_modules/next/dist/server/use-cache/use-cache-errors.js +58 -0
  1244. package/dist-dashboard/node_modules/next/dist/server/use-cache/use-cache-messages.js +190 -0
  1245. package/dist-dashboard/node_modules/next/dist/server/use-cache/use-cache-probe-globals.js +39 -0
  1246. package/dist-dashboard/node_modules/next/dist/server/use-cache/use-cache-probe-scheduler.js +117 -0
  1247. package/dist-dashboard/node_modules/next/dist/server/use-cache/use-cache-wrapper.js +2689 -0
  1248. package/dist-dashboard/node_modules/next/dist/server/utils.js +73 -0
  1249. package/dist-dashboard/node_modules/next/dist/server/web/adapter.js +407 -0
  1250. package/dist-dashboard/node_modules/next/dist/server/web/edge-route-module-wrapper.js +135 -0
  1251. package/dist-dashboard/node_modules/next/dist/server/web/error.js +54 -0
  1252. package/dist-dashboard/node_modules/next/dist/server/web/exports/index.js +56 -0
  1253. package/dist-dashboard/node_modules/next/dist/server/web/get-edge-preview-props.js +23 -0
  1254. package/dist-dashboard/node_modules/next/dist/server/web/globals.js +116 -0
  1255. package/dist-dashboard/node_modules/next/dist/server/web/http.js +39 -0
  1256. package/dist-dashboard/node_modules/next/dist/server/web/internal-edge-wait-until.js +64 -0
  1257. package/dist-dashboard/node_modules/next/dist/server/web/next-url.js +195 -0
  1258. package/dist-dashboard/node_modules/next/dist/server/web/sandbox/context.js +444 -0
  1259. package/dist-dashboard/node_modules/next/dist/server/web/sandbox/fetch-inline-assets.js +35 -0
  1260. package/dist-dashboard/node_modules/next/dist/server/web/sandbox/index.js +28 -0
  1261. package/dist-dashboard/node_modules/next/dist/server/web/sandbox/resource-managers.js +123 -0
  1262. package/dist-dashboard/node_modules/next/dist/server/web/sandbox/sandbox.js +133 -0
  1263. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +288 -0
  1264. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +138 -0
  1265. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js +30 -0
  1266. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +221 -0
  1267. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/cookies.js +29 -0
  1268. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/fetch-event.js +90 -0
  1269. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/image-response.js +18 -0
  1270. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/request.js +99 -0
  1271. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/response.js +128 -0
  1272. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/revalidate.js +188 -0
  1273. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/unstable-cache.js +299 -0
  1274. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/unstable-no-store.js +50 -0
  1275. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/url-pattern.js +13 -0
  1276. package/dist-dashboard/node_modules/next/dist/server/web/spec-extension/user-agent.js +46 -0
  1277. package/dist-dashboard/node_modules/next/dist/server/web/types.js +6 -0
  1278. package/dist-dashboard/node_modules/next/dist/server/web/utils.js +147 -0
  1279. package/dist-dashboard/node_modules/next/dist/server/web/web-on-close.js +79 -0
  1280. package/dist-dashboard/node_modules/next/dist/shared/lib/action-revalidation-kind.js +31 -0
  1281. package/dist-dashboard/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +50 -0
  1282. package/dist-dashboard/node_modules/next/dist/shared/lib/app-router-types.js +169 -0
  1283. package/dist-dashboard/node_modules/next/dist/shared/lib/constants.js +458 -0
  1284. package/dist-dashboard/node_modules/next/dist/shared/lib/deep-freeze.js +30 -0
  1285. package/dist-dashboard/node_modules/next/dist/shared/lib/deployment-id.js +63 -0
  1286. package/dist-dashboard/node_modules/next/dist/shared/lib/dset.js +34 -0
  1287. package/dist-dashboard/node_modules/next/dist/shared/lib/encode-uri-path.js +15 -0
  1288. package/dist-dashboard/node_modules/next/dist/shared/lib/entry-constants.js +36 -0
  1289. package/dist-dashboard/node_modules/next/dist/shared/lib/error-source.js +36 -0
  1290. package/dist-dashboard/node_modules/next/dist/shared/lib/errors/code-frame.js +21 -0
  1291. package/dist-dashboard/node_modules/next/dist/shared/lib/errors/constants.js +19 -0
  1292. package/dist-dashboard/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +27 -0
  1293. package/dist-dashboard/node_modules/next/dist/shared/lib/errors/ensure-static-gsp-errors.js +30 -0
  1294. package/dist-dashboard/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +20 -0
  1295. package/dist-dashboard/node_modules/next/dist/shared/lib/escape-regexp.js +22 -0
  1296. package/dist-dashboard/node_modules/next/dist/shared/lib/get-hostname.js +23 -0
  1297. package/dist-dashboard/node_modules/next/dist/shared/lib/hash.js +42 -0
  1298. package/dist-dashboard/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +18 -0
  1299. package/dist-dashboard/node_modules/next/dist/shared/lib/head.js +164 -0
  1300. package/dist-dashboard/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +60 -0
  1301. package/dist-dashboard/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +36 -0
  1302. package/dist-dashboard/node_modules/next/dist/shared/lib/htmlescape.js +52 -0
  1303. package/dist-dashboard/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +25 -0
  1304. package/dist-dashboard/node_modules/next/dist/shared/lib/i18n/get-locale-redirect.js +59 -0
  1305. package/dist-dashboard/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +54 -0
  1306. package/dist-dashboard/node_modules/next/dist/shared/lib/image-blur-svg.js +22 -0
  1307. package/dist-dashboard/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +19 -0
  1308. package/dist-dashboard/node_modules/next/dist/shared/lib/image-config.js +128 -0
  1309. package/dist-dashboard/node_modules/next/dist/shared/lib/instant-messages.js +35 -0
  1310. package/dist-dashboard/node_modules/next/dist/shared/lib/invariant-error.js +18 -0
  1311. package/dist-dashboard/node_modules/next/dist/shared/lib/is-plain-object.js +42 -0
  1312. package/dist-dashboard/node_modules/next/dist/shared/lib/is-thenable.js +20 -0
  1313. package/dist-dashboard/node_modules/next/dist/shared/lib/isomorphic/path.js +14 -0
  1314. package/dist-dashboard/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +37 -0
  1315. package/dist-dashboard/node_modules/next/dist/shared/lib/lazy-dynamic/react-browser-bailout.js +45 -0
  1316. package/dist-dashboard/node_modules/next/dist/shared/lib/loadable-context.shared-runtime.js +19 -0
  1317. package/dist-dashboard/node_modules/next/dist/shared/lib/loadable.shared-runtime.js +246 -0
  1318. package/dist-dashboard/node_modules/next/dist/shared/lib/magic-identifier.js +198 -0
  1319. package/dist-dashboard/node_modules/next/dist/shared/lib/match-local-pattern.js +46 -0
  1320. package/dist-dashboard/node_modules/next/dist/shared/lib/match-remote-pattern.js +59 -0
  1321. package/dist-dashboard/node_modules/next/dist/shared/lib/modern-browserslist-target.js +15 -0
  1322. package/dist-dashboard/node_modules/next/dist/shared/lib/no-fallback-error.external.js +18 -0
  1323. package/dist-dashboard/node_modules/next/dist/shared/lib/normalized-asset-prefix.js +28 -0
  1324. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/absolute-path-to-page.js +26 -0
  1325. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/denormalize-page-path.js +18 -0
  1326. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +18 -0
  1327. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/get-page-paths.js +40 -0
  1328. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/normalize-data-path.js +23 -0
  1329. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/normalize-page-path.js +26 -0
  1330. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/normalize-path-sep.js +19 -0
  1331. package/dist-dashboard/node_modules/next/dist/shared/lib/page-path/remove-page-path-tail.js +20 -0
  1332. package/dist-dashboard/node_modules/next/dist/shared/lib/promise-with-resolvers.js +26 -0
  1333. package/dist-dashboard/node_modules/next/dist/shared/lib/request-insights.js +30 -0
  1334. package/dist-dashboard/node_modules/next/dist/shared/lib/router/adapters.js +139 -0
  1335. package/dist-dashboard/node_modules/next/dist/shared/lib/router/routes/app.js +146 -0
  1336. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/add-locale.js +28 -0
  1337. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +20 -0
  1338. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/add-path-suffix.js +20 -0
  1339. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/app-paths.js +84 -0
  1340. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/as-path-to-search-params.js +17 -0
  1341. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/cache-busting-search-param.js +70 -0
  1342. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/escape-path-delimiters.js +16 -0
  1343. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/format-next-pathname-info.js +27 -0
  1344. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/format-url.js +111 -0
  1345. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +166 -0
  1346. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/get-next-pathname-info.js +52 -0
  1347. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/get-route-from-asset-path.js +25 -0
  1348. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +90 -0
  1349. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/html-bots.js +17 -0
  1350. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/index.js +30 -0
  1351. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +33 -0
  1352. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +151 -0
  1353. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/is-bot.js +57 -0
  1354. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +26 -0
  1355. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/middleware-route-matcher.js +31 -0
  1356. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +30 -0
  1357. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/parse-path.js +33 -0
  1358. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +39 -0
  1359. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/parse-url.js +38 -0
  1360. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +20 -0
  1361. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/path-match.js +49 -0
  1362. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +289 -0
  1363. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/querystring.js +110 -0
  1364. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/relativize-url.js +40 -0
  1365. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/remove-path-prefix.js +39 -0
  1366. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +22 -0
  1367. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +112 -0
  1368. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +113 -0
  1369. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +41 -0
  1370. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/route-regex.js +256 -0
  1371. package/dist-dashboard/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +200 -0
  1372. package/dist-dashboard/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +18 -0
  1373. package/dist-dashboard/node_modules/next/dist/shared/lib/rsc-transport.js +108 -0
  1374. package/dist-dashboard/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +86 -0
  1375. package/dist-dashboard/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +87 -0
  1376. package/dist-dashboard/node_modules/next/dist/shared/lib/segment.js +90 -0
  1377. package/dist-dashboard/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +35 -0
  1378. package/dist-dashboard/node_modules/next/dist/shared/lib/server-reference-info.js +68 -0
  1379. package/dist-dashboard/node_modules/next/dist/shared/lib/side-effect.js +63 -0
  1380. package/dist-dashboard/node_modules/next/dist/shared/lib/size-limit.js +40 -0
  1381. package/dist-dashboard/node_modules/next/dist/shared/lib/turbopack/internal-error.js +48 -0
  1382. package/dist-dashboard/node_modules/next/dist/shared/lib/utils/reflect-utils.js +69 -0
  1383. package/dist-dashboard/node_modules/next/dist/shared/lib/utils/warn-once.js +22 -0
  1384. package/dist-dashboard/node_modules/next/dist/shared/lib/utils.js +207 -0
  1385. package/dist-dashboard/node_modules/next/dist/shared/lib/zod.js +97 -0
  1386. package/dist-dashboard/node_modules/next/dist/telemetry/agent-name.js +20 -0
  1387. package/dist-dashboard/node_modules/next/dist/telemetry/anonymous-meta.js +91 -0
  1388. package/dist-dashboard/node_modules/next/dist/telemetry/detached-flush.js +49 -0
  1389. package/dist-dashboard/node_modules/next/dist/telemetry/events/build.js +186 -0
  1390. package/dist-dashboard/node_modules/next/dist/telemetry/events/index.js +41 -0
  1391. package/dist-dashboard/node_modules/next/dist/telemetry/events/plugins.js +51 -0
  1392. package/dist-dashboard/node_modules/next/dist/telemetry/events/swc-load-failure.js +55 -0
  1393. package/dist-dashboard/node_modules/next/dist/telemetry/events/version.js +68 -0
  1394. package/dist-dashboard/node_modules/next/dist/telemetry/flush-telemetry.js +19 -0
  1395. package/dist-dashboard/node_modules/next/dist/telemetry/post-telemetry-payload.js +44 -0
  1396. package/dist-dashboard/node_modules/next/dist/telemetry/project-id.js +48 -0
  1397. package/dist-dashboard/node_modules/next/dist/telemetry/storage.js +317 -0
  1398. package/dist-dashboard/node_modules/next/dist/trace/index.js +58 -0
  1399. package/dist-dashboard/node_modules/next/dist/trace/report/index.js +40 -0
  1400. package/dist-dashboard/node_modules/next/dist/trace/report/to-json-build.js +42 -0
  1401. package/dist-dashboard/node_modules/next/dist/trace/report/to-json.js +215 -0
  1402. package/dist-dashboard/node_modules/next/dist/trace/report/to-telemetry.js +36 -0
  1403. package/dist-dashboard/node_modules/next/dist/trace/shared.js +39 -0
  1404. package/dist-dashboard/node_modules/next/dist/trace/trace.js +216 -0
  1405. package/dist-dashboard/node_modules/next/license.md +21 -0
  1406. package/dist-dashboard/node_modules/next/package.json +140 -0
  1407. package/dist-dashboard/node_modules/react/LICENSE +21 -0
  1408. package/dist-dashboard/node_modules/react/cjs/react-compiler-runtime.production.js +16 -0
  1409. package/dist-dashboard/node_modules/react/cjs/react-jsx-dev-runtime.production.js +14 -0
  1410. package/dist-dashboard/node_modules/react/cjs/react-jsx-runtime.production.js +34 -0
  1411. package/dist-dashboard/node_modules/react/cjs/react.development.js +1284 -0
  1412. package/dist-dashboard/node_modules/react/cjs/react.production.js +542 -0
  1413. package/dist-dashboard/node_modules/react/compiler-runtime.js +14 -0
  1414. package/dist-dashboard/node_modules/react/index.js +7 -0
  1415. package/dist-dashboard/node_modules/react/jsx-dev-runtime.js +7 -0
  1416. package/dist-dashboard/node_modules/react/jsx-runtime.js +7 -0
  1417. package/dist-dashboard/node_modules/react/package.json +51 -0
  1418. package/dist-dashboard/node_modules/react-dom/LICENSE +21 -0
  1419. package/dist-dashboard/node_modules/react-dom/cjs/react-dom-server-legacy.browser.production.js +6603 -0
  1420. package/dist-dashboard/node_modules/react-dom/cjs/react-dom-server-legacy.node.production.js +6692 -0
  1421. package/dist-dashboard/node_modules/react-dom/cjs/react-dom-server.browser.production.js +7414 -0
  1422. package/dist-dashboard/node_modules/react-dom/cjs/react-dom-server.edge.production.js +7518 -0
  1423. package/dist-dashboard/node_modules/react-dom/cjs/react-dom-server.node.production.js +7715 -0
  1424. package/dist-dashboard/node_modules/react-dom/cjs/react-dom.production.js +210 -0
  1425. package/dist-dashboard/node_modules/react-dom/index.js +38 -0
  1426. package/dist-dashboard/node_modules/react-dom/package.json +117 -0
  1427. package/dist-dashboard/node_modules/react-dom/server.browser.js +16 -0
  1428. package/dist-dashboard/node_modules/react-dom/server.edge.js +17 -0
  1429. package/dist-dashboard/node_modules/react-dom/server.node.js +18 -0
  1430. package/dist-dashboard/node_modules/react-dom/static.node.js +14 -0
  1431. package/dist-dashboard/node_modules/styled-jsx/dist/index/index.js +499 -0
  1432. package/dist-dashboard/node_modules/styled-jsx/index.js +1 -0
  1433. package/dist-dashboard/node_modules/styled-jsx/license.md +21 -0
  1434. package/dist-dashboard/node_modules/styled-jsx/package.json +132 -0
  1435. package/dist-dashboard/node_modules/styled-jsx/style.js +1 -0
  1436. package/dist-dashboard/package.json +22 -0
  1437. package/dist-dashboard/public/icons/back-button-96.png +0 -0
  1438. package/dist-dashboard/public/icons/codex.png +0 -0
  1439. package/dist-dashboard/server.js +38 -0
  1440. package/integrations/claude-code/.claude-plugin/plugin.json +5 -0
  1441. package/integrations/claude-code/hook.mjs +5 -0
  1442. package/integrations/codex/hook.mjs +12 -0
  1443. package/package.json +61 -6
  1444. package/skills/wisdom-ledger/SKILL.md +88 -0
@@ -0,0 +1,3027 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ 0 && (module.exports = {
6
+ createStaticWorker: null,
7
+ default: null
8
+ });
9
+ function _export(target, all) {
10
+ for(var name in all)Object.defineProperty(target, name, {
11
+ enumerable: true,
12
+ get: all[name]
13
+ });
14
+ }
15
+ _export(exports, {
16
+ createStaticWorker: function() {
17
+ return createStaticWorker;
18
+ },
19
+ default: function() {
20
+ return build;
21
+ }
22
+ });
23
+ const _routecachekey = require("../server/lib/route-cache-key");
24
+ const _routekind = require("../server/route-kind");
25
+ require("../lib/setup-exception-listeners");
26
+ const _resolvebuildpaths = require("../lib/resolve-build-paths");
27
+ const _env = require("@next/env");
28
+ const _picocolors = require("../lib/picocolors");
29
+ const _picomatch = require("next/dist/compiled/picomatch");
30
+ const _fs = require("fs");
31
+ const _os = /*#__PURE__*/ _interop_require_default(require("os"));
32
+ const _worker = require("../lib/worker");
33
+ const _configshared = require("../server/config-shared");
34
+ const _devalue = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/devalue"));
35
+ const _findup = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/find-up"));
36
+ const _indexcjs = require("next/dist/compiled/nanoid/index.cjs");
37
+ const _path = /*#__PURE__*/ _interop_require_default(require("path"));
38
+ const _formatdynamicimportpath = require("../lib/format-dynamic-import-path");
39
+ const _constants = require("../lib/constants");
40
+ const _fileexists = require("../lib/file-exists");
41
+ const _findpagesdir = require("../lib/find-pages-dir");
42
+ const _loadcustomroutes = /*#__PURE__*/ _interop_require_wildcard(require("../lib/load-custom-routes"));
43
+ const _nonnullable = require("../lib/non-nullable");
44
+ const _recursivedelete = require("../lib/recursive-delete");
45
+ const _verifypartytownsetup = require("../lib/verify-partytown-setup");
46
+ const _constants1 = require("../shared/lib/constants");
47
+ const _entryconstants = require("../shared/lib/entry-constants");
48
+ const _utils = require("../shared/lib/router/utils");
49
+ const _bundler = require("../lib/bundler");
50
+ const _config = /*#__PURE__*/ _interop_require_default(require("../server/config"));
51
+ const _normalizepagepath = require("../shared/lib/page-path/normalize-page-path");
52
+ const _require = require("../server/require");
53
+ const _ciinfo = /*#__PURE__*/ _interop_require_wildcard(require("../server/ci-info"));
54
+ const _turborepoaccesstrace = require("./turborepo-access-trace");
55
+ const _events = require("../telemetry/events");
56
+ const _storage = require("../telemetry/storage");
57
+ const _routediscovery = require("./route-discovery");
58
+ const _sortbypageexts = require("./sort-by-page-exts");
59
+ const _getconventionfilebasename = require("./get-convention-file-base-name");
60
+ const _getstaticinfoincludinglayouts = require("./get-static-info-including-layouts");
61
+ const _pagetypes = require("../lib/page-types");
62
+ const _generatebuildid = require("./generate-build-id");
63
+ const _iswriteable = require("./is-writeable");
64
+ const _log = /*#__PURE__*/ _interop_require_wildcard(require("./output/log"));
65
+ const _spinner = /*#__PURE__*/ _interop_require_wildcard(require("./spinner"));
66
+ const _trace = require("../trace");
67
+ const _snapshot = require("./analyze/snapshot");
68
+ const _routebundlestats = require("./route-bundle-stats");
69
+ const _utils1 = require("./utils");
70
+ const _parammatching = require("./static-paths/param-matching");
71
+ const _writebuildid = require("./write-build-id");
72
+ const _normalizelocalepath = require("../shared/lib/i18n/normalize-locale-path");
73
+ const _iserror = /*#__PURE__*/ _interop_require_default(require("../lib/is-error"));
74
+ const _isedgeruntime = require("../lib/is-edge-runtime");
75
+ const _recursivecopy = require("../lib/recursive-copy");
76
+ const _swc = require("./swc");
77
+ const _installbindings = require("./swc/install-bindings");
78
+ const _routeregex = require("../shared/lib/router/utils/route-regex");
79
+ const _getfilesindir = require("../lib/get-files-in-dir");
80
+ const _swcplugins = require("../telemetry/events/swc-plugins");
81
+ const _apppaths = require("../shared/lib/router/utils/app-paths");
82
+ const _approuterheaders = require("../client/components/app-router-headers");
83
+ const _webpackbuild = require("./webpack-build");
84
+ const _buildcontext = require("./build-context");
85
+ const _normalizepathsep = require("../shared/lib/page-path/normalize-path-sep");
86
+ const _isapprouteroute = require("../lib/is-app-route-route");
87
+ const _getmetadataroute = require("../lib/metadata/get-metadata-route");
88
+ const _ismetadataroute = require("../lib/metadata/is-metadata-route");
89
+ const _createclientrouterfilter = require("../lib/create-client-router-filter");
90
+ const _typecheck = require("./type-check");
91
+ const _generateinterceptionroutesrewrites = require("../lib/generate-interception-routes-rewrites");
92
+ const _builddataroute = require("../server/lib/router-utils/build-data-route");
93
+ const _formatmanifest = require("./manifests/formatter/format-manifest");
94
+ const _builddiagnostics = require("../diagnostics/build-diagnostics");
95
+ const _appinfolog = require("../server/lib/app-info-log");
96
+ const _utils2 = require("../export/utils");
97
+ const _trace1 = require("../lib/memory/trace");
98
+ const _encryptionutilsserver = require("../server/app-render/encryption-utils-server");
99
+ const _uploadtrace = /*#__PURE__*/ _interop_require_default(require("../trace/upload-trace"));
100
+ const _fallback = require("../lib/fallback");
101
+ const _renderingmode = require("./rendering-mode");
102
+ const _invarianterror = require("../shared/lib/invariant-error");
103
+ const _isbot = require("../shared/lib/router/utils/is-bot");
104
+ const _turbopackbuild = require("./turbopack-build");
105
+ const _printbuilderrors = require("./print-build-errors");
106
+ const _inlinestaticenv = require("../lib/inline-static-env");
107
+ const _staticenv = require("../lib/static-env");
108
+ const _durationtostring = require("./duration-to-string");
109
+ const _shared = require("../trace/shared");
110
+ const _afterproductioncompile = require("./after-production-compile");
111
+ const _previewkeyutils = require("./preview-key-utils");
112
+ const _buildcomplete = require("./adapter/build-complete");
113
+ const _sortableroutes = require("../shared/lib/router/utils/sortable-routes");
114
+ const _promises = require("fs/promises");
115
+ const _routetypesutils = require("../server/lib/router-utils/route-types-utils");
116
+ const _cachelifetypeutils = require("../server/lib/router-utils/cache-life-type-utils");
117
+ const _rootparamstypeutils = require("../server/lib/router-utils/root-params-type-utils");
118
+ const _lockfile = require("./lockfile");
119
+ const _buildprefetchsegmentdataroute = require("../server/lib/router-utils/build-prefetch-segment-data-route");
120
+ const _generateroutesmanifest = require("./generate-routes-manifest");
121
+ const _buildcustomroute = require("../lib/build-custom-route");
122
+ const _validateapppaths = require("./validate-app-paths");
123
+ const _ensurestaticgsperrors = require("../shared/lib/errors/ensure-static-gsp-errors");
124
+ const _paramsutils = require("../server/lib/params-utils");
125
+ function _interop_require_default(obj) {
126
+ return obj && obj.__esModule ? obj : {
127
+ default: obj
128
+ };
129
+ }
130
+ function _getRequireWildcardCache(nodeInterop) {
131
+ if (typeof WeakMap !== "function") return null;
132
+ var cacheBabelInterop = new WeakMap();
133
+ var cacheNodeInterop = new WeakMap();
134
+ return (_getRequireWildcardCache = function(nodeInterop) {
135
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
136
+ })(nodeInterop);
137
+ }
138
+ function _interop_require_wildcard(obj, nodeInterop) {
139
+ if (!nodeInterop && obj && obj.__esModule) {
140
+ return obj;
141
+ }
142
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
143
+ return {
144
+ default: obj
145
+ };
146
+ }
147
+ var cache = _getRequireWildcardCache(nodeInterop);
148
+ if (cache && cache.has(obj)) {
149
+ return cache.get(obj);
150
+ }
151
+ var newObj = {
152
+ __proto__: null
153
+ };
154
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
155
+ for(var key in obj){
156
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
157
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
158
+ if (desc && (desc.get || desc.set)) {
159
+ Object.defineProperty(newObj, key, desc);
160
+ } else {
161
+ newObj[key] = obj[key];
162
+ }
163
+ }
164
+ }
165
+ newObj.default = obj;
166
+ if (cache) {
167
+ cache.set(obj, newObj);
168
+ }
169
+ return newObj;
170
+ }
171
+ /**
172
+ * The headers that are allowed to be used when revalidating routes. Currently
173
+ * this includes both headers used by the pages and app routers.
174
+ */ const ALLOWED_HEADERS = [
175
+ 'host',
176
+ _constants.MATCHED_PATH_HEADER,
177
+ _constants.PRERENDER_REVALIDATE_HEADER,
178
+ _constants.PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER,
179
+ _constants.NEXT_CACHE_REVALIDATED_TAGS_HEADER,
180
+ _constants.NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER
181
+ ];
182
+ function getPprAppPageClassification(route, result) {
183
+ if (typeof (result == null ? void 0 : result.htmlSize) !== 'number') {
184
+ throw new _invarianterror.InvariantError(`Expected an HTML size for prerendered app route "${route}"`);
185
+ }
186
+ if (typeof result.hasEmptyStaticShell !== 'boolean' || typeof result.hasPostponed !== 'boolean' || typeof result.hasPendingUi !== 'boolean') {
187
+ throw new _invarianterror.InvariantError(`Expected prerender classification data for PPR route "${route}"`);
188
+ }
189
+ return {
190
+ response: result.hasEmptyStaticShell ? 'empty' : result.hasPendingUi || result.hasPostponed ? 'initial' : 'complete',
191
+ compute: result.hasPostponed ? result.hasEmptyStaticShell ? 'blocking' : 'resuming' : 'static',
192
+ htmlSize: result.htmlSize
193
+ };
194
+ }
195
+ function getStaticAppPageClassification(route, result) {
196
+ if (typeof (result == null ? void 0 : result.htmlSize) !== 'number') {
197
+ throw new _invarianterror.InvariantError(`Expected an HTML size for prerendered app route "${route}"`);
198
+ }
199
+ return {
200
+ routeType: 'page',
201
+ response: 'complete',
202
+ compute: 'static',
203
+ htmlSize: result.htmlSize
204
+ };
205
+ }
206
+ function getPagesFallbackClassification(fallback) {
207
+ if (fallback === null) {
208
+ return {
209
+ routeType: 'page',
210
+ response: 'empty',
211
+ compute: 'blocking'
212
+ };
213
+ }
214
+ if (typeof fallback === 'string' || fallback === true) {
215
+ return {
216
+ routeType: 'fallback',
217
+ response: 'initial',
218
+ compute: 'static'
219
+ };
220
+ }
221
+ return {};
222
+ }
223
+ function getCacheDir(distDir) {
224
+ const cacheDir = _path.default.join(distDir, 'cache');
225
+ if (_ciinfo.isCI && !_ciinfo.hasNextSupport) {
226
+ const hasCache = (0, _fs.existsSync)(cacheDir);
227
+ if (!hasCache) {
228
+ // Intentionally not piping to stderr which is what `Log.warn` does in case people fail in CI when
229
+ // stderr is detected.
230
+ console.log(`${_log.prefixes.warn} No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache`);
231
+ }
232
+ }
233
+ return cacheDir;
234
+ }
235
+ async function writeFileUtf8(filePath, content) {
236
+ await _fs.promises.writeFile(filePath, content, 'utf-8');
237
+ }
238
+ function readFileUtf8(filePath) {
239
+ return _fs.promises.readFile(filePath, 'utf8');
240
+ }
241
+ async function writeManifest(filePath, manifest) {
242
+ await writeFileUtf8(filePath, (0, _formatmanifest.formatManifest)(manifest));
243
+ }
244
+ async function readManifest(filePath) {
245
+ return JSON.parse(await readFileUtf8(filePath));
246
+ }
247
+ async function writePrerenderManifest(distDir, manifest) {
248
+ // Sort for deterministic outputs
249
+ manifest.routes = (0, _sortableroutes.sortPagesObject)(manifest.routes);
250
+ manifest.dynamicRoutes = (0, _sortableroutes.sortPagesObject)(manifest.dynamicRoutes);
251
+ await writeManifest(_path.default.join(distDir, _constants1.PRERENDER_MANIFEST), manifest);
252
+ }
253
+ async function writeClientSsgManifest(prerenderManifest, { buildId, distDir, locales }) {
254
+ const ssgPages = new Set([
255
+ ...Object.entries(prerenderManifest.routes)// Filter out dynamic routes
256
+ .filter(([, { srcRoute }])=>srcRoute == null).map(([route])=>(0, _normalizelocalepath.normalizeLocalePath)(route, locales).pathname),
257
+ ...Object.keys(prerenderManifest.dynamicRoutes)
258
+ ].sort());
259
+ const clientSsgManifestContent = `self.__SSG_MANIFEST=${(0, _devalue.default)(ssgPages)};self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB()`;
260
+ let ssgManifestPath = _path.default.join(_constants1.CLIENT_STATIC_FILES_PATH, buildId, '_ssgManifest.js');
261
+ await writeFileUtf8(_path.default.join(distDir, ssgManifestPath), clientSsgManifestContent);
262
+ }
263
+ async function writeFunctionsConfigManifest(distDir, manifest) {
264
+ let sortedManifest = {
265
+ version: manifest.version,
266
+ functions: Object.fromEntries(Object.entries(manifest.functions).sort(([a], [b])=>a.localeCompare(b)))
267
+ };
268
+ await writeManifest(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.FUNCTIONS_CONFIG_MANIFEST), sortedManifest);
269
+ }
270
+ async function writeRequiredServerFilesManifest(distDir, requiredServerFiles) {
271
+ await writeManifest(_path.default.join(distDir, _constants1.SERVER_FILES_MANIFEST + '.json'), requiredServerFiles);
272
+ await writeFileUtf8(_path.default.join(distDir, _constants1.SERVER_FILES_MANIFEST + '.js'), `self.__SERVER_FILES_MANIFEST=${(0, _formatmanifest.formatManifest)(requiredServerFiles)}`);
273
+ }
274
+ async function writeImagesManifest(distDir, config) {
275
+ var _config_images, _config_images1;
276
+ const images = {
277
+ ...config.images
278
+ };
279
+ const { deviceSizes, imageSizes } = images;
280
+ images.sizes = [
281
+ ...deviceSizes,
282
+ ...imageSizes
283
+ ];
284
+ // By default, remotePatterns will allow no remote images ([])
285
+ images.remotePatterns = ((config == null ? void 0 : (_config_images = config.images) == null ? void 0 : _config_images.remotePatterns) || []).map((p)=>{
286
+ var _p_protocol;
287
+ return {
288
+ // Modifying the manifest should also modify matchRemotePattern()
289
+ protocol: (_p_protocol = p.protocol) == null ? void 0 : _p_protocol.replace(/:$/, ''),
290
+ hostname: (0, _picomatch.makeRe)(p.hostname).source,
291
+ port: p.port,
292
+ pathname: (0, _picomatch.makeRe)(p.pathname ?? '**', {
293
+ dot: true
294
+ }).source,
295
+ search: p.search
296
+ };
297
+ });
298
+ // By default, localPatterns will allow all local images (undefined)
299
+ if (config == null ? void 0 : (_config_images1 = config.images) == null ? void 0 : _config_images1.localPatterns) {
300
+ images.localPatterns = config.images.localPatterns.map((p)=>({
301
+ // Modifying the manifest should also modify matchLocalPattern()
302
+ pathname: (0, _picomatch.makeRe)(p.pathname ?? '**', {
303
+ dot: true
304
+ }).source,
305
+ search: p.search
306
+ }));
307
+ }
308
+ await writeManifest(_path.default.join(distDir, _constants1.IMAGES_MANIFEST), {
309
+ version: 1,
310
+ images
311
+ });
312
+ }
313
+ const STANDALONE_DIRECTORY = 'standalone';
314
+ async function writeStandaloneDirectory(nextBuildSpan, distDir, pageKeys, appPageKeys, outputFileTracingRoot, requiredServerFiles, middlewareManifest, hasNodeMiddleware, hasInstrumentationHook, staticPages, loadedEnvFiles, appDir) {
315
+ await nextBuildSpan.traceChild('write-standalone-directory').traceAsyncFn(async ()=>{
316
+ await (0, _utils1.copyTracedFiles)(// requiredServerFiles.appDir Refers to the application directory, not App Router.
317
+ requiredServerFiles.appDir, distDir, pageKeys.pages, appPageKeys, outputFileTracingRoot, requiredServerFiles.config, middlewareManifest, hasNodeMiddleware, hasInstrumentationHook, staticPages);
318
+ for (const file of [
319
+ ...requiredServerFiles.files,
320
+ _path.default.join(requiredServerFiles.config.distDir, _constants1.SERVER_FILES_MANIFEST + '.json'),
321
+ ...loadedEnvFiles.reduce((acc, envFile)=>{
322
+ if ([
323
+ '.env',
324
+ '.env.production'
325
+ ].includes(envFile.path)) {
326
+ acc.push(envFile.path);
327
+ }
328
+ return acc;
329
+ }, [])
330
+ ]){
331
+ // requiredServerFiles.appDir Refers to the application directory, not App Router.
332
+ const filePath = _path.default.join(requiredServerFiles.appDir, file);
333
+ const outputPath = _path.default.join(distDir, STANDALONE_DIRECTORY, _path.default.relative(outputFileTracingRoot, filePath));
334
+ await _fs.promises.mkdir(_path.default.dirname(outputPath), {
335
+ recursive: true
336
+ });
337
+ await _fs.promises.copyFile(filePath, outputPath);
338
+ }
339
+ if (hasNodeMiddleware) {
340
+ const middlewareOutput = _path.default.join(distDir, STANDALONE_DIRECTORY, _path.default.relative(outputFileTracingRoot, distDir), _constants1.SERVER_DIRECTORY, 'middleware.js');
341
+ await _fs.promises.mkdir(_path.default.dirname(middlewareOutput), {
342
+ recursive: true
343
+ });
344
+ await _fs.promises.copyFile(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'middleware.js'), middlewareOutput);
345
+ }
346
+ const originalPagesDir = _path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'pages');
347
+ if ((0, _fs.existsSync)(originalPagesDir)) {
348
+ await (0, _recursivecopy.recursiveCopy)(originalPagesDir, _path.default.join(distDir, STANDALONE_DIRECTORY, _path.default.relative(outputFileTracingRoot, distDir), _constants1.SERVER_DIRECTORY, 'pages'), {
349
+ overwrite: true
350
+ });
351
+ }
352
+ const responseCacheDir = _path.default.join(distDir, _constants1.SERVER_DIRECTORY, _routecachekey.ROUTE_CACHE_DIRECTORY);
353
+ if ((0, _fs.existsSync)(responseCacheDir)) {
354
+ await (0, _recursivecopy.recursiveCopy)(responseCacheDir, _path.default.join(distDir, STANDALONE_DIRECTORY, _path.default.relative(outputFileTracingRoot, distDir), _constants1.SERVER_DIRECTORY, _routecachekey.ROUTE_CACHE_DIRECTORY), {
355
+ overwrite: true
356
+ });
357
+ }
358
+ if (appDir) {
359
+ const originalServerApp = _path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'app');
360
+ if ((0, _fs.existsSync)(originalServerApp)) {
361
+ await (0, _recursivecopy.recursiveCopy)(originalServerApp, _path.default.join(distDir, STANDALONE_DIRECTORY, _path.default.relative(outputFileTracingRoot, distDir), _constants1.SERVER_DIRECTORY, 'app'), {
362
+ overwrite: true
363
+ });
364
+ }
365
+ }
366
+ });
367
+ }
368
+ function getNumberOfWorkers(config, maxTasks) {
369
+ let workers;
370
+ if (config.experimental.cpus && config.experimental.cpus !== _configshared.defaultConfig.experimental.cpus) {
371
+ // If it's not set to the default, it's a user override
372
+ workers = config.experimental.cpus;
373
+ } else if (config.experimental.memoryBasedWorkersCount) {
374
+ workers = Math.max(Math.min(config.experimental.cpus || 1, Math.floor(_os.default.freemem() / 1e9)), // enforce a minimum of 4 workers
375
+ 4);
376
+ } else if (config.experimental.cpus) {
377
+ workers = config.experimental.cpus;
378
+ } else {
379
+ // Fall back to 4 workers if a count is not specified
380
+ workers = 4;
381
+ }
382
+ // Cap workers to one more than the number of tasks.
383
+ // Tasks can be passed to avoid over-allocating workers.
384
+ if (maxTasks !== undefined && maxTasks > 0) {
385
+ workers = Math.min(workers, maxTasks + 1);
386
+ }
387
+ return Math.max(workers, 1);
388
+ }
389
+ const staticWorkerPath = require.resolve('./worker');
390
+ const staticWorkerExposedMethods = [
391
+ 'hasCustomGetInitialProps',
392
+ 'isPageStatic',
393
+ 'getDefinedNamedExports',
394
+ 'exportPages'
395
+ ];
396
+ function createStaticWorker(config, options) {
397
+ const { numberOfWorkers, debuggerPortOffset, progress } = options;
398
+ return new _worker.Worker(staticWorkerPath, {
399
+ logger: _log,
400
+ numWorkers: numberOfWorkers,
401
+ onActivity: ()=>{
402
+ progress == null ? void 0 : progress.run();
403
+ },
404
+ onActivityAbort: ()=>{
405
+ progress == null ? void 0 : progress.clear();
406
+ },
407
+ debuggerPortOffset,
408
+ enableSourceMaps: config.enablePrerenderSourceMaps,
409
+ // remove --max-old-space-size flag as it can cause memory issues.
410
+ isolatedMemory: true,
411
+ enableWorkerThreads: config.experimental.workerThreads,
412
+ exposedMethods: staticWorkerExposedMethods,
413
+ forkOptions: {
414
+ env: {
415
+ ...process.env.NEXT_CPU_PROF ? {
416
+ NEXT_CPU_PROF: '1',
417
+ NEXT_CPU_PROF_DIR: process.env.NEXT_CPU_PROF_DIR,
418
+ __NEXT_PRIVATE_CPU_PROFILE: 'build-static-worker'
419
+ } : undefined,
420
+ // worker.ts copies this value into globalThis.NEXT_CLIENT_ASSET_SUFFIX
421
+ __NEXT_PRERENDER_CLIENT_ASSET_SUFFIX: config.supportsImmutableAssets || !config.deploymentId ? '' : `?dpl=${config.deploymentId}`
422
+ }
423
+ }
424
+ });
425
+ }
426
+ async function writeFullyStaticExport(config, dir, enabledDirectories, configOutDir, nextBuildSpan, appDirOnly, bundler) {
427
+ const exportApp = require('../export').default;
428
+ await exportApp(dir, {
429
+ buildExport: false,
430
+ nextConfig: config,
431
+ enabledDirectories,
432
+ silent: true,
433
+ outdir: _path.default.join(dir, configOutDir),
434
+ numWorkers: getNumberOfWorkers(config),
435
+ appDirOnly,
436
+ bundler
437
+ }, nextBuildSpan);
438
+ }
439
+ async function getBuildId(isGenerateMode, distDir, nextBuildSpan, config) {
440
+ if (isGenerateMode) {
441
+ return await _fs.promises.readFile(_path.default.join(distDir, _constants1.BUILD_ID_FILE), 'utf8');
442
+ }
443
+ if (config.deploymentId && !config.generateBuildId) {
444
+ // Skew protection is enabled and NEXT_NAV_DEPLOYMENT_ID_HEADER will be used instead. Set a
445
+ // constant but "random" string because various tools perform `.replace(escapedBuildId, ....)`
446
+ // which would fail if this were something like "build-id" instead.
447
+ return 'build-TfctsWXpff2fKS';
448
+ }
449
+ return await nextBuildSpan.traceChild('generate-buildid').traceAsyncFn(()=>(0, _generatebuildid.generateBuildId)(config.generateBuildId, _indexcjs.nanoid));
450
+ }
451
+ async function build(dir, analyze = false, reactProductionProfiling = false, debugOutput = false, debugPrerender = false, noMangling = false, appDirOnly = false, bundler = _bundler.Bundler.Turbopack, experimentalBuildMode, traceUploadUrl, debugBuildPathsPatterns, enabledFeatures = {}) {
452
+ const isCompileMode = experimentalBuildMode === 'compile';
453
+ const isGenerateMode = experimentalBuildMode === 'generate';
454
+ _buildcontext.NextBuildContext.isCompileMode = isCompileMode;
455
+ _buildcontext.NextBuildContext.analyze = analyze;
456
+ const buildStartTime = Date.now();
457
+ let appType;
458
+ let loadedConfig;
459
+ let pendingUpgradeNudge;
460
+ let staticWorker;
461
+ // Turbopack compile warnings are deferred until after static generation.
462
+ let deferredTurbopackWarnings;
463
+ const flushTurbopackWarnings = ()=>{
464
+ if (deferredTurbopackWarnings && deferredTurbopackWarnings.length > 0) {
465
+ console.warn(`${(0, _printbuilderrors.formatWarningsHeader)(deferredTurbopackWarnings.length)}\n${deferredTurbopackWarnings.join('\n')}`);
466
+ }
467
+ deferredTurbopackWarnings = undefined;
468
+ };
469
+ // A failing static generation worker exits the process directly (`prerenderEarlyExit`), skipping the flush points below.
470
+ process.once('exit', ()=>flushTurbopackWarnings());
471
+ try {
472
+ const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
473
+ buildMode: experimentalBuildMode,
474
+ version: "16.4.2",
475
+ ...enabledFeatures
476
+ });
477
+ _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
478
+ _buildcontext.NextBuildContext.dir = dir;
479
+ _buildcontext.NextBuildContext.appDirOnly = appDirOnly;
480
+ _buildcontext.NextBuildContext.reactProductionProfiling = reactProductionProfiling;
481
+ _buildcontext.NextBuildContext.noMangling = noMangling;
482
+ _buildcontext.NextBuildContext.debugPrerender = debugPrerender;
483
+ return await nextBuildSpan.traceAsyncFn(async ()=>{
484
+ var _config_experimental, _mappedPages_404, _mappedPages__error, _pageKeys_app, _config_experimental1;
485
+ // attempt to load global env values so they are available in next.config.js
486
+ const { loadedEnvFiles } = nextBuildSpan.traceChild('load-dotenv').traceFn(()=>(0, _env.loadEnvConfig)(dir, false, _log));
487
+ _buildcontext.NextBuildContext.loadedEnvFiles = loadedEnvFiles;
488
+ // Log the version banner before loading the config just like `dev`
489
+ (0, _appinfolog.logStartInfo)({
490
+ networkUrl: null,
491
+ appUrl: null,
492
+ envInfo: (0, _appinfolog.getEnvInfo)(dir),
493
+ logBundler: true
494
+ });
495
+ const turborepoAccessTraceResult = new _turborepoaccesstrace.TurborepoAccessTraceResult();
496
+ let experimentalFeatures = [];
497
+ const config = await nextBuildSpan.traceChild('load-next-config').traceAsyncFn(()=>(0, _turborepoaccesstrace.turborepoTraceAccess)(()=>(0, _config.default)(_constants1.PHASE_PRODUCTION_BUILD, dir, {
498
+ // Log for next.config loading process
499
+ silent: false,
500
+ reactProductionProfiling,
501
+ debugPrerender,
502
+ reportExperimentalFeatures (features) {
503
+ experimentalFeatures = features.toSorted(({ key: a }, { key: b })=>a.localeCompare(b));
504
+ },
505
+ bundler
506
+ }), turborepoAccessTraceResult));
507
+ loadedConfig = config;
508
+ // Resolve selective build paths now that the page extensions are known.
509
+ const debugBuildPaths = debugBuildPathsPatterns ? await (async ()=>{
510
+ const resolved = await (0, _resolvebuildpaths.resolveBuildPaths)(debugBuildPathsPatterns, dir, config.pageExtensions);
511
+ return {
512
+ app: resolved.appPaths,
513
+ pages: resolved.pagePaths
514
+ };
515
+ })() : undefined;
516
+ _buildcontext.NextBuildContext.debugBuildPaths = debugBuildPaths;
517
+ // Validate deploymentId if provided
518
+ if (config.deploymentId !== undefined) {
519
+ if (typeof config.deploymentId !== 'string') {
520
+ throw new Error(`Invalid \`deploymentId\` configuration: must be a string. See https://nextjs.org/docs/messages/deploymentid-not-a-string`);
521
+ }
522
+ if (!/^[a-zA-Z0-9_-]*$/.test(config.deploymentId)) {
523
+ throw new Error(`Invalid \`deploymentId\` configuration: contains invalid characters. Only alphanumeric characters, hyphens, and underscores are allowed. See https://nextjs.org/docs/messages/deploymentid-invalid-characters`);
524
+ }
525
+ }
526
+ // Reading the config can modify environment variables that influence the bundler selection.
527
+ bundler = (0, _bundler.finalizeBundlerFromConfig)(bundler);
528
+ nextBuildSpan.setAttribute('bundler', getBundlerForTelemetry(bundler));
529
+ const configOutDir = (0, _utils2.hasCustomExportOutput)(config) ? config.distDir : 'out';
530
+ const buildDistDir = (0, _utils2.getBuildDistDir)(config);
531
+ const distDir = _path.default.join(dir, buildDistDir);
532
+ _buildcontext.NextBuildContext.distDir = distDir;
533
+ (0, _trace.setGlobal)('phase', _constants1.PHASE_PRODUCTION_BUILD);
534
+ (0, _trace.setGlobal)('distDir', distDir);
535
+ // Check for build cache before initializing telemetry, because the
536
+ // Telemetry constructor creates the cache directory in CI environments.
537
+ const cacheDir = getCacheDir(distDir);
538
+ // Initialize telemetry before installBindings so that SWC load failure
539
+ // events are captured if native bindings fail to load.
540
+ const telemetry = new _storage.Telemetry({
541
+ distDir
542
+ });
543
+ (0, _trace.setGlobal)('telemetry', telemetry);
544
+ // Reuse the loaded config; ordinary builds do not load upgrade tooling.
545
+ if (config.experimental.agentUpgrade === 'security' || config.experimental.agentUpgrade === 'latest' || config.experimental.agentUpgrade === 'experimental-future' || process.env.__NEXT_AGENT_UPGRADE) {
546
+ const { nudgeUpgrade, getUpgradeContext } = require('../lib/upgrade/nudge');
547
+ const upgradeContext = getUpgradeContext(config);
548
+ if (process.env.NEXT_PRIVATE_UPGRADE_BUILD_CHILD === '1' && process.connected) {
549
+ // The CLI shows the menu; keep building instead of waiting for it.
550
+ process.send({
551
+ nextUpgradeContext: upgradeContext,
552
+ dir,
553
+ telemetryDisabled: process.env.NEXT_TELEMETRY_DISABLED
554
+ });
555
+ } else {
556
+ // No menu (e.g. an agent): nudge in the background.
557
+ pendingUpgradeNudge = nudgeUpgrade(dir, upgradeContext, 'build', null, null, {
558
+ telemetry,
559
+ onNudgeId: null
560
+ }).then(()=>{});
561
+ void pendingUpgradeNudge.catch(()=>{});
562
+ }
563
+ }
564
+ // Install the native bindings early so we can have synchronous access later.
565
+ await (0, _installbindings.installBindings)((_config_experimental = config.experimental) == null ? void 0 : _config_experimental.useWasmBinary);
566
+ // Set up code frame renderer for error formatting
567
+ const { installCodeFrameSupport } = require('../server/lib/install-code-frame');
568
+ installCodeFrameSupport();
569
+ process.env.NEXT_DEPLOYMENT_ID = config.deploymentId || '';
570
+ _buildcontext.NextBuildContext.config = config;
571
+ const buildId = await getBuildId(isGenerateMode, distDir, nextBuildSpan, config);
572
+ _buildcontext.NextBuildContext.buildId = buildId;
573
+ if (experimentalBuildMode === 'generate-env') {
574
+ if (bundler === _bundler.Bundler.Turbopack) {
575
+ _log.warn('generate-env is not needed with turbopack');
576
+ return;
577
+ }
578
+ _log.info('Inlining static env ...');
579
+ await nextBuildSpan.traceChild('inline-static-env').traceAsyncFn(async ()=>{
580
+ await (0, _inlinestaticenv.inlineStaticEnv)({
581
+ distDir,
582
+ config
583
+ });
584
+ });
585
+ _log.info('Complete');
586
+ return;
587
+ }
588
+ // when using compile mode static env isn't inlined so we
589
+ // need to populate in normal runtime env
590
+ if (isCompileMode || isGenerateMode) {
591
+ (0, _staticenv.populateStaticEnv)(config, config.deploymentId);
592
+ }
593
+ const customRoutes = await nextBuildSpan.traceChild('load-custom-routes').traceAsyncFn(()=>(0, _loadcustomroutes.default)(config));
594
+ const { headers, onMatchHeaders, rewrites, redirects } = customRoutes;
595
+ const combinedRewrites = [
596
+ ...rewrites.beforeFiles,
597
+ ...rewrites.afterFiles,
598
+ ...rewrites.fallback
599
+ ];
600
+ const hasRewrites = combinedRewrites.length > 0;
601
+ _buildcontext.NextBuildContext.hasRewrites = hasRewrites;
602
+ _buildcontext.NextBuildContext.originalRewrites = config._originalRewrites;
603
+ _buildcontext.NextBuildContext.originalRedirects = config._originalRedirects;
604
+ const distDirCreated = await nextBuildSpan.traceChild('create-dist-dir').traceAsyncFn(async ()=>{
605
+ try {
606
+ await _fs.promises.mkdir(distDir, {
607
+ recursive: true
608
+ });
609
+ return true;
610
+ } catch (err) {
611
+ if ((0, _iserror.default)(err) && err.code === 'EPERM') {
612
+ return false;
613
+ }
614
+ throw err;
615
+ }
616
+ });
617
+ if (!distDirCreated || !await (0, _iswriteable.isWriteable)(distDir)) {
618
+ throw new Error('> Build directory is not writeable. https://nextjs.org/docs/messages/build-dir-not-writeable');
619
+ }
620
+ if (config.experimental.lockDistDir) {
621
+ // This leaks the lock file descriptor. That's okay, it'll be cleaned up by the OS upon
622
+ // process exit.
623
+ await _lockfile.Lockfile.acquireWithRetriesOrExit(_path.default.join(distDir, 'lock'), 'next build');
624
+ }
625
+ if (config.cleanDistDir && !isGenerateMode) {
626
+ await nextBuildSpan.traceChild('clean').traceAsyncFn(()=>(0, _recursivedelete.recursiveDeleteSyncWithAsyncRetries)(distDir, new Set([
627
+ 'cache',
628
+ 'dev',
629
+ 'diagnostics',
630
+ 'lock',
631
+ 'trace'
632
+ ])));
633
+ }
634
+ const publicDir = _path.default.join(dir, 'public');
635
+ const { pagesDir, appDir } = (0, _findpagesdir.findPagesDir)(dir);
636
+ if (pagesDir && appDir) {
637
+ appType = 'hybrid';
638
+ } else if (pagesDir) {
639
+ appType = 'pages';
640
+ } else if (appDir) {
641
+ appType = 'app';
642
+ }
643
+ if (!appDirOnly && !pagesDir) {
644
+ appDirOnly = true;
645
+ }
646
+ _buildcontext.NextBuildContext.pagesDir = pagesDir;
647
+ _buildcontext.NextBuildContext.appDir = appDir;
648
+ const enabledDirectories = {
649
+ app: typeof appDir === 'string',
650
+ pages: typeof pagesDir === 'string'
651
+ };
652
+ // Generate a random encryption key for this build.
653
+ // This key is used to encrypt cross boundary values and can be used to generate hashes.
654
+ const encryptionKey = await (0, _encryptionutilsserver.generateEncryptionKeyBase64)({
655
+ isBuild: true,
656
+ distDir
657
+ });
658
+ _buildcontext.NextBuildContext.encryptionKey = encryptionKey;
659
+ const isSrcDir = _path.default.relative(dir, pagesDir || appDir || '').startsWith('src');
660
+ const hasPublicDir = (0, _fs.existsSync)(publicDir);
661
+ telemetry.record((0, _events.eventCliSession)(config, {
662
+ webpackVersion: 5,
663
+ cliCommand: 'build',
664
+ isSrcDir,
665
+ hasNowJson: !!await (0, _findup.default)('now.json', {
666
+ cwd: dir
667
+ }),
668
+ isCustomServer: null,
669
+ turboFlag: bundler === _bundler.Bundler.Turbopack,
670
+ pagesDir: !!pagesDir,
671
+ appDir: !!appDir
672
+ }));
673
+ (0, _events.eventNextPlugins)(_path.default.resolve(dir)).then((events)=>telemetry.record(events));
674
+ (0, _swcplugins.eventSwcPlugins)(_path.default.resolve(dir), config).then((events)=>telemetry.record(events));
675
+ (0, _appinfolog.logExperimentalInfo)({
676
+ experimentalFeatures,
677
+ cacheComponents: !!config.cacheComponents,
678
+ partialPrefetching: config.partialPrefetching
679
+ });
680
+ const typeCheckingOptions = {
681
+ dir,
682
+ appDir,
683
+ pagesDir,
684
+ telemetry,
685
+ nextBuildSpan,
686
+ config,
687
+ cacheDir,
688
+ debugBuildPaths
689
+ };
690
+ if (appDir && 'exportPathMap' in config) {
691
+ const errorMessage = 'The "exportPathMap" configuration cannot be used with the "app" directory. Please use generateStaticParams() instead.';
692
+ _log.error(errorMessage);
693
+ await telemetry.flush();
694
+ throw new Error(errorMessage);
695
+ }
696
+ const middlewareDetectionRegExp = new RegExp(`^${_constants.MIDDLEWARE_FILENAME}\\.(?:${config.pageExtensions.join('|')})$`);
697
+ const proxyDetectionRegExp = new RegExp(`^${_constants.PROXY_FILENAME}\\.(?:${config.pageExtensions.join('|')})$`);
698
+ const instrumentationHookDetectionRegExp = new RegExp(`^${_constants.INSTRUMENTATION_HOOK_FILENAME}\\.(?:${config.pageExtensions.join('|')})$`);
699
+ const rootDir = _path.default.join(pagesDir || appDir, '..');
700
+ const includes = [
701
+ middlewareDetectionRegExp,
702
+ proxyDetectionRegExp,
703
+ instrumentationHookDetectionRegExp
704
+ ];
705
+ const rootPaths = Array.from(await (0, _getfilesindir.getFilesInDir)(rootDir)).filter((file)=>includes.some((include)=>include.test(file))).sort((0, _sortbypageexts.sortByPageExts)(config.pageExtensions)).map((file)=>_path.default.join(rootDir, file).replace(dir, ''));
706
+ let instrumentationHookFilePath;
707
+ let proxyFilePath;
708
+ let middlewareFilePath;
709
+ for (const rootPath of rootPaths){
710
+ const { base: fileBase, dir: fileDir } = _path.default.parse(rootPath);
711
+ const fileBaseName = (0, _getconventionfilebasename.getConventionFileBaseName)(fileBase);
712
+ const normalizedFileDir = (0, _normalizepathsep.normalizePathSep)(fileDir);
713
+ const isAtConventionLevel = normalizedFileDir === '/' || normalizedFileDir === '/src';
714
+ if (isAtConventionLevel && fileBaseName === _constants.MIDDLEWARE_FILENAME) {
715
+ middlewareFilePath = rootPath;
716
+ }
717
+ if (isAtConventionLevel && fileBaseName === _constants.PROXY_FILENAME) {
718
+ proxyFilePath = rootPath;
719
+ }
720
+ if (isAtConventionLevel && fileBaseName === _constants.INSTRUMENTATION_HOOK_FILENAME) {
721
+ instrumentationHookFilePath = rootPath;
722
+ }
723
+ }
724
+ if (middlewareFilePath) {
725
+ if (proxyFilePath) {
726
+ const cwd = process.cwd();
727
+ const absoluteProxyPath = _path.default.join(rootDir, proxyFilePath);
728
+ const absoluteMiddlewarePath = _path.default.join(rootDir, middlewareFilePath);
729
+ throw new Error(`Both ${_constants.MIDDLEWARE_FILENAME} file "./${_path.default.relative(cwd, absoluteMiddlewarePath)}" and ${_constants.PROXY_FILENAME} file "./${_path.default.relative(cwd, absoluteProxyPath)}" are detected. Please use "./${_path.default.relative(cwd, absoluteProxyPath)}" only. Learn more: https://nextjs.org/docs/messages/middleware-to-proxy`);
730
+ }
731
+ _log.warnOnce(`The "${_constants.MIDDLEWARE_FILENAME}" file convention is deprecated. Please use "${_constants.PROXY_FILENAME}" instead.\n\n` + ` To migrate automatically, run:\n` + ` npx @next/codemod@canary middleware-to-proxy .\n\n` + ` Learn more: https://nextjs.org/docs/messages/middleware-to-proxy`);
732
+ }
733
+ const hasInstrumentationHook = Boolean(instrumentationHookFilePath);
734
+ const hasMiddlewareFile = Boolean(middlewareFilePath);
735
+ const hasProxyFile = Boolean(proxyFilePath);
736
+ _buildcontext.NextBuildContext.hasInstrumentationHook = hasInstrumentationHook;
737
+ const previewProps = await (0, _previewkeyutils.generatePreviewKeys)({
738
+ isBuild: true,
739
+ distDir
740
+ });
741
+ _buildcontext.NextBuildContext.previewProps = previewProps;
742
+ const discovery = await nextBuildSpan.traceChild('discover-routes').traceAsyncFn(()=>(0, _routediscovery.discoverRoutes)({
743
+ appDir,
744
+ pagesDir,
745
+ pageExtensions: config.pageExtensions,
746
+ isDev: false,
747
+ baseDir: dir,
748
+ isSrcDir,
749
+ appDirOnly,
750
+ debugBuildPaths
751
+ }));
752
+ // Update appDirOnly from discovery (may have changed if no pages found)
753
+ appDirOnly = discovery.appDirOnly;
754
+ _buildcontext.NextBuildContext.appDirOnly = appDirOnly;
755
+ const pagesPaths = discovery.pagesPaths;
756
+ _buildcontext.NextBuildContext.mappedPages = discovery.mappedPages || {};
757
+ _buildcontext.NextBuildContext.mappedAppPages = discovery.mappedAppPages;
758
+ _buildcontext.NextBuildContext.mappedAppDefaults = discovery.mappedAppDefaults;
759
+ _buildcontext.NextBuildContext.mappedRootPaths = await nextBuildSpan.traceChild('create-root-mapping').traceAsyncFn(()=>(0, _routediscovery.createPagesMapping)({
760
+ isDev: false,
761
+ pageExtensions: config.pageExtensions,
762
+ pagePaths: rootPaths,
763
+ pagesType: _pagetypes.PAGE_TYPES.ROOT,
764
+ pagesDir,
765
+ appDir,
766
+ appDirOnly
767
+ }));
768
+ const { pageRoutes, pageApiRoutes, appRoutes, appRouteHandlers, layoutRoutes, slots } = discovery;
769
+ const pagesPageKeys = Object.keys(_buildcontext.NextBuildContext.mappedPages);
770
+ const conflictingAppPagePaths = [];
771
+ const appPageKeys = new Set();
772
+ // Discovery produces the entries we ask the compiler to build. Keep this
773
+ // input separate from the entries the compiler actually emits.
774
+ let discoveredAppPageKeys;
775
+ let emittedAppPageKeys;
776
+ if (discovery.mappedAppPages) {
777
+ discoveredAppPageKeys = Object.keys(discovery.mappedAppPages);
778
+ for (const appKey of discoveredAppPageKeys){
779
+ const normalizedAppPageKey = (0, _apppaths.normalizeAppPath)(appKey);
780
+ const pagePath = _buildcontext.NextBuildContext.mappedPages[normalizedAppPageKey];
781
+ if (pagePath) {
782
+ const appPath = discovery.mappedAppPages[appKey];
783
+ conflictingAppPagePaths.push([
784
+ pagePath.replace(/^private-next-pages/, 'pages'),
785
+ appPath.replace(/^private-next-app-dir/, 'app')
786
+ ]);
787
+ }
788
+ appPageKeys.add(normalizedAppPageKey);
789
+ }
790
+ }
791
+ const appPaths = Array.from(appPageKeys);
792
+ const totalAppPagesCount = appPaths.length;
793
+ const mappedPages = _buildcontext.NextBuildContext.mappedPages;
794
+ const mappedAppPages = _buildcontext.NextBuildContext.mappedAppPages;
795
+ // Validate that the app paths are valid. This is currently duplicating
796
+ // the logic from packages/next/src/shared/lib/router/utils/sorted-routes.ts
797
+ // but is instead specifically focused on code that can be shared
798
+ // eventually with the development code.
799
+ (0, _validateapppaths.validateAppPaths)(appPaths);
800
+ // Interception routes are modelled as beforeFiles rewrites
801
+ rewrites.beforeFiles.push(...(0, _generateinterceptionroutesrewrites.generateInterceptionRoutesRewrites)(appPaths, config.basePath));
802
+ _buildcontext.NextBuildContext.rewrites = rewrites;
803
+ const pageKeys = {
804
+ pages: pagesPageKeys,
805
+ app: appPaths.length > 0 ? appPaths : undefined
806
+ };
807
+ await nextBuildSpan.traceChild('generate-route-types').traceAsyncFn(async ()=>{
808
+ const routeTypesFilePath = _path.default.join(distDir, 'types', 'routes.d.ts');
809
+ const validatorFilePath = _path.default.join(distDir, 'types', 'validator.ts');
810
+ const cacheLifeFilePath = _path.default.join(distDir, 'types', 'cache-life.d.ts');
811
+ await (0, _promises.mkdir)(_path.default.dirname(routeTypesFilePath), {
812
+ recursive: true
813
+ });
814
+ const routeTypesManifest = await (0, _routetypesutils.createRouteTypesManifest)({
815
+ dir,
816
+ pageRoutes,
817
+ appRoutes,
818
+ appRouteHandlers,
819
+ pageApiRoutes,
820
+ layoutRoutes,
821
+ slots,
822
+ redirects: config.redirects,
823
+ rewrites: config.rewrites,
824
+ validatorFilePath
825
+ });
826
+ await (0, _routetypesutils.writeRouteTypesManifest)(routeTypesManifest, routeTypesFilePath, config);
827
+ await (0, _routetypesutils.writeValidatorFile)(routeTypesManifest, validatorFilePath, Boolean(config.experimental.strictRouteTypes));
828
+ (0, _cachelifetypeutils.writeCacheLifeTypes)(config.cacheLife, cacheLifeFilePath);
829
+ await (0, _rootparamstypeutils.writeRootParamsTypes)(routeTypesManifest, _path.default.join(distDir, 'types', 'root-params.d.ts'));
830
+ });
831
+ // Turbopack already handles conflicting app and page routes.
832
+ if (bundler !== _bundler.Bundler.Turbopack) {
833
+ const numConflictingAppPaths = conflictingAppPagePaths.length;
834
+ if (mappedAppPages && numConflictingAppPaths > 0) {
835
+ const errorMessage = `Conflicting app and page file${numConflictingAppPaths === 1 ? ' was' : 's were'} found, please remove the conflicting files to continue:`;
836
+ _log.error(errorMessage);
837
+ for (const [pagePath, appPath] of conflictingAppPagePaths){
838
+ _log.error(` "${pagePath}" - "${appPath}"`);
839
+ }
840
+ await telemetry.flush();
841
+ throw new Error(errorMessage);
842
+ }
843
+ }
844
+ const conflictingPublicFiles = [];
845
+ const hasPages404 = (_mappedPages_404 = mappedPages['/404']) == null ? void 0 : _mappedPages_404.startsWith(_constants.PAGES_DIR_ALIAS);
846
+ const hasApp404 = !!(mappedAppPages == null ? void 0 : mappedAppPages[_entryconstants.UNDERSCORE_NOT_FOUND_ROUTE_ENTRY]);
847
+ const hasAppGlobalError = !!(mappedAppPages == null ? void 0 : mappedAppPages[_entryconstants.UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY]);
848
+ const hasCustomErrorPage = (_mappedPages__error = mappedPages['/_error']) == null ? void 0 : _mappedPages__error.startsWith(_constants.PAGES_DIR_ALIAS);
849
+ // Check if there are any user pages (non-reserved pages) in the pages router
850
+ const hasUserPagesRoutes = Object.keys(mappedPages).some((route)=>!(0, _utils1.isReservedPage)(route));
851
+ if (hasPublicDir) {
852
+ const hasPublicUnderScoreNextDir = (0, _fs.existsSync)(_path.default.join(publicDir, '_next'));
853
+ if (hasPublicUnderScoreNextDir) {
854
+ throw new Error(_constants.PUBLIC_DIR_MIDDLEWARE_CONFLICT);
855
+ }
856
+ }
857
+ await nextBuildSpan.traceChild('public-dir-conflict-check').traceAsyncFn(async ()=>{
858
+ // Check if pages conflict with files in `public`
859
+ // Only a page of public file can be served, not both.
860
+ for(const page in mappedPages){
861
+ const hasPublicPageFile = await (0, _fileexists.fileExists)(_path.default.join(publicDir, page === '/' ? '/index' : page), _fileexists.FileType.File);
862
+ if (hasPublicPageFile) {
863
+ conflictingPublicFiles.push(page);
864
+ }
865
+ }
866
+ const numConflicting = conflictingPublicFiles.length;
867
+ if (numConflicting) {
868
+ throw new Error(`Conflicting public and page file${numConflicting === 1 ? ' was' : 's were'} found. https://nextjs.org/docs/messages/conflicting-public-file-page\n${conflictingPublicFiles.join('\n')}`);
869
+ }
870
+ });
871
+ const nestedReservedPages = pageKeys.pages.filter((page)=>{
872
+ return page.match(/\/(_app|_document|_error)$/) && _path.default.dirname(page) !== '/';
873
+ });
874
+ if (nestedReservedPages.length) {
875
+ _log.warn(`The following reserved Next.js pages were detected not directly under the pages directory:\n` + nestedReservedPages.join('\n') + `\nSee more info here: https://nextjs.org/docs/messages/nested-reserved-page\n`);
876
+ }
877
+ const restrictedRedirectPaths = [
878
+ '/_next'
879
+ ].map((p)=>config.basePath ? `${config.basePath}${p}` : p);
880
+ const isAppCacheComponentsEnabled = Boolean(config.cacheComponents);
881
+ const isAuthInterruptsEnabled = Boolean(config.experimental.authInterrupts);
882
+ const isAppPPREnabled = isAppCacheComponentsEnabled;
883
+ const routesManifestPath = _path.default.join(distDir, _constants1.ROUTES_MANIFEST);
884
+ // Generate the routes manifest using the extracted helper
885
+ const { routesManifest, dynamicRoutes, sourcePages } = nextBuildSpan.traceChild('generate-routes-manifest').traceFn(()=>(0, _generateroutesmanifest.generateRoutesManifest)({
886
+ appType,
887
+ pageKeys,
888
+ config,
889
+ redirects,
890
+ headers,
891
+ onMatchHeaders,
892
+ rewrites,
893
+ restrictedRedirectPaths,
894
+ isAppPPREnabled,
895
+ deploymentId: config.deploymentId
896
+ }));
897
+ // For pages directory, we run type checking after route collection but before build.
898
+ if (!appDir && !isCompileMode) {
899
+ await (0, _typecheck.startTypeChecking)(typeCheckingOptions);
900
+ }
901
+ let clientRouterFilters;
902
+ if (config.experimental.clientRouterFilter) {
903
+ const nonInternalRedirects = (config._originalRedirects || []).filter((r)=>!r.internal);
904
+ clientRouterFilters = (0, _createclientrouterfilter.createClientRouterFilter)([
905
+ ...appPaths
906
+ ], config.experimental.clientRouterFilterRedirects ? nonInternalRedirects : [], config.experimental.clientRouterFilterAllowedRate);
907
+ _buildcontext.NextBuildContext.clientRouterFilters = clientRouterFilters;
908
+ }
909
+ // Ensure commonjs handling is used for files in the distDir (generally .next)
910
+ // Files outside of the distDir can be "type": "module"
911
+ await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
912
+ // These are written to distDir, so they need to come after creating and cleaning distDr.
913
+ await (0, _builddiagnostics.recordFrameworkVersion)("16.4.2");
914
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
915
+ buildStage: 'start'
916
+ });
917
+ const outputFileTracingRoot = config.outputFileTracingRoot || dir;
918
+ const pagesManifestPath = _path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.PAGES_MANIFEST);
919
+ let buildTraceContext;
920
+ let buildTracesPromise = undefined;
921
+ // If there's has a custom webpack config and disable the build worker.
922
+ // Otherwise respect the option if it's set.
923
+ const useBuildWorker = config.experimental.webpackBuildWorker || config.experimental.webpackBuildWorker === undefined && !config.webpack;
924
+ const runServerAndEdgeInParallel = config.experimental.parallelServerCompiles;
925
+ const collectServerBuildTracesInParallel = config.experimental.parallelServerBuildTraces || config.experimental.parallelServerBuildTraces === undefined && isCompileMode;
926
+ nextBuildSpan.setAttribute('has-custom-webpack-config', String(!!config.webpack));
927
+ nextBuildSpan.setAttribute('use-build-worker', String(useBuildWorker));
928
+ if (!useBuildWorker && (runServerAndEdgeInParallel || collectServerBuildTracesInParallel)) {
929
+ throw new Error('The "parallelServerBuildTraces" and "parallelServerCompiles" options may only be used when build workers can be used. Read more: https://nextjs.org/docs/messages/parallel-build-without-worker');
930
+ }
931
+ // #region Compile
932
+ _log.info('Creating an optimized production build ...');
933
+ (0, _trace1.traceMemoryUsage)('Starting build', nextBuildSpan);
934
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
935
+ buildStage: 'compile',
936
+ buildOptions: {
937
+ useBuildWorker: String(useBuildWorker)
938
+ }
939
+ });
940
+ let shutdownPromise = Promise.resolve();
941
+ if (!isGenerateMode) {
942
+ if (bundler === _bundler.Bundler.Turbopack) {
943
+ const { duration: compilerDuration, shutdownPromise: p, warnings, ...rest } = await (0, _turbopackbuild.turbopackBuild)(telemetry);
944
+ shutdownPromise = p;
945
+ deferredTurbopackWarnings = warnings;
946
+ (0, _trace1.traceMemoryUsage)('Finished build', nextBuildSpan);
947
+ buildTraceContext = rest.buildTraceContext;
948
+ const durationString = (0, _durationtostring.durationToString)(compilerDuration);
949
+ _log.event(`Compiled successfully in ${durationString}`);
950
+ telemetry.record((0, _events.eventBuildCompleted)(pagesPaths, {
951
+ bundler: 'turbopack',
952
+ durationInSeconds: Math.round(compilerDuration),
953
+ totalAppPagesCount
954
+ }));
955
+ } else {
956
+ if (runServerAndEdgeInParallel || collectServerBuildTracesInParallel) {
957
+ let durationInSeconds = 0;
958
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
959
+ buildStage: 'compile-server'
960
+ });
961
+ const serverBuildPromise = (0, _webpackbuild.webpackBuild)(useBuildWorker, [
962
+ 'server'
963
+ ]).then((res)=>{
964
+ (0, _trace1.traceMemoryUsage)('Finished server compilation', nextBuildSpan);
965
+ buildTraceContext = res.buildTraceContext;
966
+ durationInSeconds += res.duration;
967
+ if (collectServerBuildTracesInParallel) {
968
+ const buildTraceWorker = new _worker.Worker(require.resolve('./collect-build-traces'), {
969
+ debuggerPortOffset: -1,
970
+ isolatedMemory: false,
971
+ numWorkers: 1,
972
+ exposedMethods: [
973
+ 'collectBuildTraces'
974
+ ],
975
+ forkOptions: process.env.NEXT_CPU_PROF ? {
976
+ env: {
977
+ NEXT_CPU_PROF: '1',
978
+ NEXT_CPU_PROF_DIR: process.env.NEXT_CPU_PROF_DIR,
979
+ __NEXT_PRIVATE_CPU_PROFILE: 'build-trace-worker'
980
+ }
981
+ } : undefined
982
+ });
983
+ buildTracesPromise = nextBuildSpan.traceChild('collect-build-traces').traceAsyncFn(()=>{
984
+ return buildTraceWorker.collectBuildTraces({
985
+ dir,
986
+ config,
987
+ distDir,
988
+ // Serialize Map as this is sent to the worker.
989
+ edgeRuntimeRoutes: (0, _utils1.collectRoutesUsingEdgeRuntime)(new Map()),
990
+ staticPages: [],
991
+ buildTraceContext,
992
+ outputFileTracingRoot
993
+ }).catch((err)=>{
994
+ console.error(err);
995
+ throw err;
996
+ });
997
+ });
998
+ }
999
+ });
1000
+ if (!runServerAndEdgeInParallel) {
1001
+ await serverBuildPromise;
1002
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
1003
+ buildStage: 'webpack-compile-edge-server'
1004
+ });
1005
+ }
1006
+ const edgeBuildPromise = (0, _webpackbuild.webpackBuild)(useBuildWorker, [
1007
+ 'edge-server'
1008
+ ]).then((res)=>{
1009
+ durationInSeconds += res.duration;
1010
+ (0, _trace1.traceMemoryUsage)('Finished edge-server compilation', nextBuildSpan);
1011
+ });
1012
+ if (runServerAndEdgeInParallel) {
1013
+ await serverBuildPromise;
1014
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
1015
+ buildStage: 'webpack-compile-edge-server'
1016
+ });
1017
+ }
1018
+ await edgeBuildPromise;
1019
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
1020
+ buildStage: 'webpack-compile-client'
1021
+ });
1022
+ await (0, _webpackbuild.webpackBuild)(useBuildWorker, [
1023
+ 'client'
1024
+ ]).then((res)=>{
1025
+ durationInSeconds += res.duration;
1026
+ (0, _trace1.traceMemoryUsage)('Finished client compilation', nextBuildSpan);
1027
+ });
1028
+ const durationString = (0, _durationtostring.durationToString)(durationInSeconds);
1029
+ _log.event(`Compiled successfully in ${durationString}`);
1030
+ telemetry.record((0, _events.eventBuildCompleted)(pagesPaths, {
1031
+ bundler: getBundlerForTelemetry(bundler),
1032
+ durationInSeconds,
1033
+ totalAppPagesCount
1034
+ }));
1035
+ } else {
1036
+ const { duration: compilerDuration, ...rest } = await (0, _webpackbuild.webpackBuild)(useBuildWorker, null);
1037
+ (0, _trace1.traceMemoryUsage)('Finished build', nextBuildSpan);
1038
+ buildTraceContext = rest.buildTraceContext;
1039
+ telemetry.record((0, _events.eventBuildCompleted)(pagesPaths, {
1040
+ bundler: getBundlerForTelemetry(bundler),
1041
+ durationInSeconds: compilerDuration,
1042
+ totalAppPagesCount
1043
+ }));
1044
+ }
1045
+ }
1046
+ await (0, _afterproductioncompile.runAfterProductionCompile)({
1047
+ config,
1048
+ buildSpan: nextBuildSpan,
1049
+ telemetry,
1050
+ metadata: {
1051
+ projectDir: dir,
1052
+ distDir
1053
+ }
1054
+ });
1055
+ }
1056
+ // #endregion
1057
+ // For app directory, we run type checking after build.
1058
+ if (appDir && !isCompileMode && !isGenerateMode) {
1059
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
1060
+ buildStage: 'type-checking'
1061
+ });
1062
+ await (0, _typecheck.startTypeChecking)(typeCheckingOptions);
1063
+ (0, _trace1.traceMemoryUsage)('Finished type checking', nextBuildSpan);
1064
+ }
1065
+ // #region required-server-files
1066
+ const requiredServerFilesManifest = await nextBuildSpan.traceChild('generate-required-server-files').traceAsyncFn(async ()=>{
1067
+ let runtimeConfig = (0, _configshared.getNextConfigRuntime)(config);
1068
+ const normalizedCacheHandlers = {};
1069
+ for (const [key, value] of Object.entries(runtimeConfig.cacheHandlers || {})){
1070
+ if (key && value) {
1071
+ normalizedCacheHandlers[key] = _path.default.relative(distDir, (0, _formatdynamicimportpath.resolveCacheHandlerPathToFilesystem)(value));
1072
+ }
1073
+ }
1074
+ // getNextConfigRuntime only filters if experimental.runtimeServerDeploymentId is true,
1075
+ // but we unconditionally want to remove configFile for this manifest
1076
+ let runtimeConfigWithoutFilePath = {
1077
+ ...runtimeConfig
1078
+ };
1079
+ delete runtimeConfigWithoutFilePath.configFile;
1080
+ const serverFilesManifest = {
1081
+ version: 1,
1082
+ config: {
1083
+ ...runtimeConfigWithoutFilePath,
1084
+ distDir: buildDistDir,
1085
+ ..._ciinfo.hasNextSupport ? {
1086
+ compress: false
1087
+ } : {},
1088
+ cacheHandler: runtimeConfig.cacheHandler ? _path.default.relative(distDir, (0, _formatdynamicimportpath.resolveCacheHandlerPathToFilesystem)(runtimeConfig.cacheHandler)) : runtimeConfig.cacheHandler,
1089
+ cacheHandlers: normalizedCacheHandlers,
1090
+ experimental: {
1091
+ ...runtimeConfig.experimental,
1092
+ trustHostHeader: _ciinfo.hasNextSupport,
1093
+ isExperimentalCompile: isCompileMode
1094
+ }
1095
+ },
1096
+ appDir: dir,
1097
+ relativeAppDir: _path.default.relative(outputFileTracingRoot, dir),
1098
+ files: [
1099
+ // distDir `{"type":"commonjs"}` boundary so `.next/server/**/*.js`
1100
+ // is loaded as CJS when the user's project is "type": "module".
1101
+ 'package.json',
1102
+ _constants1.ROUTES_MANIFEST,
1103
+ _path.default.relative(distDir, pagesManifestPath),
1104
+ _constants1.BUILD_MANIFEST,
1105
+ _constants1.PRERENDER_MANIFEST,
1106
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.PREVIEW_PROPS_MANIFEST),
1107
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.FUNCTIONS_CONFIG_MANIFEST),
1108
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.MIDDLEWARE_MANIFEST),
1109
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.MIDDLEWARE_BUILD_MANIFEST + '.js'),
1110
+ ...bundler !== _bundler.Bundler.Turbopack ? [
1111
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.MIDDLEWARE_REACT_LOADABLE_MANIFEST + '.js'),
1112
+ _constants1.REACT_LOADABLE_MANIFEST
1113
+ ] : [],
1114
+ ...appDir ? [
1115
+ ...config.experimental.sri ? [
1116
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.SUBRESOURCE_INTEGRITY_MANIFEST + '.js'),
1117
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.SUBRESOURCE_INTEGRITY_MANIFEST + '.json')
1118
+ ] : [],
1119
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.APP_PATHS_MANIFEST),
1120
+ _path.default.join(_constants1.APP_PATH_ROUTES_MANIFEST),
1121
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.SERVER_REFERENCE_MANIFEST + '.js'),
1122
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.SERVER_REFERENCE_MANIFEST + '.json'),
1123
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.PREFETCH_HINTS)
1124
+ ] : [],
1125
+ ...pagesDir && bundler !== _bundler.Bundler.Turbopack ? [
1126
+ _constants1.DYNAMIC_CSS_MANIFEST + '.json',
1127
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.DYNAMIC_CSS_MANIFEST + '.js')
1128
+ ] : [],
1129
+ _constants1.BUILD_ID_FILE,
1130
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.NEXT_FONT_MANIFEST + '.js'),
1131
+ _path.default.join(_constants1.SERVER_DIRECTORY, _constants1.NEXT_FONT_MANIFEST + '.json'),
1132
+ _constants1.SERVER_FILES_MANIFEST + '.json'
1133
+ ].filter(_nonnullable.nonNullable).map((file)=>_path.default.join(buildDistDir, file)),
1134
+ ignore: []
1135
+ };
1136
+ if (hasInstrumentationHook) {
1137
+ serverFilesManifest.files.push(_path.default.join(buildDistDir, _constants1.SERVER_DIRECTORY, `${_constants.INSTRUMENTATION_HOOK_FILENAME}.js`));
1138
+ // If there are edge routes, append the edge instrumentation hook
1139
+ // Turbopack generates this chunk with a hashed name and references it in middleware-manifest.
1140
+ let edgeInstrumentationHook = _path.default.join(buildDistDir, _constants1.SERVER_DIRECTORY, `edge-${_constants.INSTRUMENTATION_HOOK_FILENAME}.js`);
1141
+ if (bundler !== _bundler.Bundler.Turbopack && (0, _fs.existsSync)(_path.default.join(dir, edgeInstrumentationHook))) {
1142
+ serverFilesManifest.files.push(edgeInstrumentationHook);
1143
+ }
1144
+ }
1145
+ if (config.experimental.optimizeCss) {
1146
+ const globOrig = require('next/dist/compiled/glob');
1147
+ const cssFilePaths = await new Promise((resolve, reject)=>{
1148
+ globOrig('**/*.css', {
1149
+ cwd: _path.default.join(distDir, 'static')
1150
+ }, (err, files)=>{
1151
+ if (err) {
1152
+ return reject(err);
1153
+ }
1154
+ resolve(files);
1155
+ });
1156
+ });
1157
+ serverFilesManifest.files.push(...cssFilePaths.map((filePath)=>_path.default.join(buildDistDir, 'static', filePath)));
1158
+ }
1159
+ // Under standalone mode, we need to ensure that the cache entry debug
1160
+ // handler is copied so that it can be used in the test. This is required
1161
+ // for the turbopack test to run as it's more strict about the build
1162
+ // directories. This is only used for testing and is not used in
1163
+ // production.
1164
+ if (process.env.__NEXT_TEST_MODE && process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS) {
1165
+ serverFilesManifest.files.push(_path.default.relative(dir, _path.default.isAbsolute(process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS) ? process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS : _path.default.join(dir, process.env.NEXT_PRIVATE_DEBUG_CACHE_ENTRY_HANDLERS)));
1166
+ }
1167
+ return serverFilesManifest;
1168
+ });
1169
+ await writeRequiredServerFilesManifest(distDir, requiredServerFilesManifest);
1170
+ // #endregion
1171
+ // #region Collect data
1172
+ const totalPageCount = pageKeys.pages.length + (((_pageKeys_app = pageKeys.app) == null ? void 0 : _pageKeys_app.length) || 0);
1173
+ const numberOfWorkers = getNumberOfWorkers(config, totalPageCount);
1174
+ const collectingPageDataStart = process.hrtime();
1175
+ const postCompileSpinner = (0, _spinner.default)(`Collecting page data using ${numberOfWorkers} worker${numberOfWorkers > 1 ? 's' : ''}`);
1176
+ const buildManifestPath = _path.default.join(distDir, _constants1.BUILD_MANIFEST);
1177
+ let staticAppPagesCount = 0;
1178
+ let serverAppPagesCount = 0;
1179
+ let edgeRuntimeAppCount = 0;
1180
+ let edgeRuntimePagesCount = 0;
1181
+ const ssgPages = new Set();
1182
+ const ssgStaticFallbackPages = new Set();
1183
+ const ssgBlockingFallbackPages = new Set();
1184
+ const staticPages = new Set();
1185
+ const invalidPages = new Set();
1186
+ const serverPropsPages = new Set();
1187
+ const additionalPaths = new Map();
1188
+ const staticPaths = new Map();
1189
+ const prerenderRouteMatchers = new Map();
1190
+ const paramMatchingByRoute = new Map();
1191
+ const appNormalizedPaths = new Map();
1192
+ const fallbackModes = new Map();
1193
+ const appDefaultConfigs = new Map();
1194
+ const pageInfos = new Map();
1195
+ let pagesManifest = await readManifest(pagesManifestPath);
1196
+ const buildManifest = await readManifest(buildManifestPath);
1197
+ const appPathRoutes = {};
1198
+ if (appDir) {
1199
+ const appPathsManifest = await readManifest(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.APP_PATHS_MANIFEST));
1200
+ // The app paths manifest contains only entries the compiler emitted.
1201
+ // Post-build consumers use this filtered list so they do not look for
1202
+ // output files belonging to candidates that were not emitted.
1203
+ const emittedAppPageKeySet = new Set(Object.keys(appPathsManifest));
1204
+ emittedAppPageKeys = discoveredAppPageKeys == null ? void 0 : discoveredAppPageKeys.filter((appPageKey)=>emittedAppPageKeySet.has(appPageKey));
1205
+ const appPathsByPathname = new Map();
1206
+ for(const key in appPathsManifest){
1207
+ const pathname = (0, _apppaths.normalizeAppPath)(key);
1208
+ const routeAppPaths = appPathsByPathname.get(pathname);
1209
+ if (routeAppPaths) {
1210
+ routeAppPaths.push(key);
1211
+ } else {
1212
+ appPathsByPathname.set(pathname, [
1213
+ key
1214
+ ]);
1215
+ }
1216
+ }
1217
+ // Legacy deployment builders collapse this manifest by pathname using
1218
+ // the final entry. Keep that entry aligned with selectAppPageEntry so
1219
+ // the traced module and the module loaded at runtime cannot diverge.
1220
+ for (const [pathname, routeAppPaths] of appPathsByPathname){
1221
+ for (const key of routeAppPaths.sort(_apppaths.compareAppPaths)){
1222
+ appPathRoutes[key] = pathname;
1223
+ }
1224
+ }
1225
+ if (config.experimental.strictRouteMatching && pageKeys.app) {
1226
+ const emittedAppPaths = new Set(emittedAppPageKeys == null ? void 0 : emittedAppPageKeys.map((appPageKey)=>(0, _apppaths.normalizeAppPath)(appPageKey)));
1227
+ const retainedAppPaths = pageKeys.app.filter((appPath)=>emittedAppPaths.has(appPath));
1228
+ pageKeys.app = retainedAppPaths.length ? retainedAppPaths : undefined;
1229
+ }
1230
+ await writeManifest(_path.default.join(distDir, _constants1.APP_PATH_ROUTES_MANIFEST), appPathRoutes);
1231
+ }
1232
+ process.env.NEXT_PHASE = _constants1.PHASE_PRODUCTION_BUILD;
1233
+ staticWorker = createStaticWorker(config, {
1234
+ numberOfWorkers,
1235
+ debuggerPortOffset: (0, _worker.getNextBuildDebuggerPortOffset)({
1236
+ kind: 'export-page'
1237
+ })
1238
+ });
1239
+ const analysisBegin = process.hrtime();
1240
+ const staticCheckSpan = nextBuildSpan.traceChild('static-check');
1241
+ const functionsConfigManifest = {
1242
+ version: 1,
1243
+ functions: {}
1244
+ };
1245
+ const { customAppGetInitialProps, namedExports, isNextImageImported, hasNonStaticErrorPage } = await staticCheckSpan.traceAsyncFn(async ()=>{
1246
+ var _config_experimental_sri;
1247
+ if (isCompileMode) {
1248
+ return {
1249
+ customAppGetInitialProps: false,
1250
+ namedExports: [],
1251
+ isNextImageImported: true,
1252
+ hasNonStaticErrorPage: hasUserPagesRoutes
1253
+ };
1254
+ }
1255
+ const { configFileName } = config;
1256
+ const sriEnabled = Boolean((_config_experimental_sri = config.experimental.sri) == null ? void 0 : _config_experimental_sri.algorithm);
1257
+ const nonStaticErrorPageSpan = staticCheckSpan.traceChild('check-static-error-page');
1258
+ const errorPageHasCustomGetInitialProps = nonStaticErrorPageSpan.traceAsyncFn(async ()=>hasCustomErrorPage && await staticWorker.hasCustomGetInitialProps({
1259
+ page: '/_error',
1260
+ distDir,
1261
+ checkingApp: false,
1262
+ sriEnabled
1263
+ }));
1264
+ const errorPageStaticResult = nonStaticErrorPageSpan.traceAsyncFn(async ()=>{
1265
+ var _config_i18n, _config_i18n1;
1266
+ return hasCustomErrorPage && staticWorker.isPageStatic({
1267
+ dir,
1268
+ page: '/_error',
1269
+ distDir,
1270
+ configFileName,
1271
+ cacheComponents: isAppCacheComponentsEnabled,
1272
+ partialPrefetching: config.partialPrefetching,
1273
+ authInterrupts: isAuthInterruptsEnabled,
1274
+ useCacheTimeout: config.experimental.useCacheTimeout,
1275
+ durableUseCacheEntries: Boolean(config.experimental.durableUseCacheEntries),
1276
+ staticPageGenerationTimeout: config.staticPageGenerationTimeout,
1277
+ httpAgentOptions: config.httpAgentOptions,
1278
+ locales: (_config_i18n = config.i18n) == null ? void 0 : _config_i18n.locales,
1279
+ defaultLocale: (_config_i18n1 = config.i18n) == null ? void 0 : _config_i18n1.defaultLocale,
1280
+ nextConfigOutput: config.output,
1281
+ cacheLifeProfiles: config.cacheLife,
1282
+ buildId,
1283
+ deploymentId: config.deploymentId,
1284
+ clientAssetToken: config.supportsImmutableAssets ? '' : config.deploymentId,
1285
+ sriEnabled,
1286
+ cacheMaxMemorySize: config.cacheMaxMemorySize
1287
+ });
1288
+ });
1289
+ const appPageToCheck = '/_app';
1290
+ const customAppGetInitialPropsPromise = hasUserPagesRoutes ? staticWorker.hasCustomGetInitialProps({
1291
+ page: appPageToCheck,
1292
+ distDir,
1293
+ checkingApp: true,
1294
+ sriEnabled
1295
+ }) : Promise.resolve(false);
1296
+ const namedExportsPromise = hasUserPagesRoutes ? staticWorker.getDefinedNamedExports({
1297
+ page: appPageToCheck,
1298
+ distDir,
1299
+ sriEnabled
1300
+ }) : Promise.resolve([]);
1301
+ // eslint-disable-next-line @typescript-eslint/no-shadow
1302
+ let isNextImageImported;
1303
+ const middlewareManifest = require(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.MIDDLEWARE_MANIFEST));
1304
+ const actionManifest = appDir ? require(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.SERVER_REFERENCE_MANIFEST + '.json')) : null;
1305
+ const entriesWithAction = actionManifest ? new Set() : null;
1306
+ if (actionManifest && entriesWithAction) {
1307
+ for(const id in actionManifest.node){
1308
+ for(const entry in actionManifest.node[id].workers){
1309
+ entriesWithAction.add(entry);
1310
+ }
1311
+ }
1312
+ for(const id in actionManifest.edge){
1313
+ for(const entry in actionManifest.edge[id].workers){
1314
+ entriesWithAction.add(entry);
1315
+ }
1316
+ }
1317
+ }
1318
+ for (const key of Object.keys(middlewareManifest == null ? void 0 : middlewareManifest.functions)){
1319
+ if (key.startsWith('/api')) {
1320
+ edgeRuntimePagesCount++;
1321
+ }
1322
+ }
1323
+ await Promise.all(Object.entries(pageKeys).reduce((acc, [key, files])=>{
1324
+ if (!files) {
1325
+ return acc;
1326
+ }
1327
+ const pageType = key;
1328
+ for (const page of files){
1329
+ acc.push({
1330
+ pageType,
1331
+ page
1332
+ });
1333
+ }
1334
+ return acc;
1335
+ }, []).map(({ pageType, page })=>{
1336
+ const checkPageSpan = staticCheckSpan.traceChild('check-page', {
1337
+ page
1338
+ });
1339
+ return checkPageSpan.traceAsyncFn(async ()=>{
1340
+ const actualPage = (0, _normalizepagepath.normalizePagePath)(page);
1341
+ let isRoutePPREnabled = false;
1342
+ let isEnsureStaticPage = false;
1343
+ let isSSG = false;
1344
+ let isStatic = false;
1345
+ let isServerComponent = false;
1346
+ let ssgPageRoutes = null;
1347
+ let pagePath = '';
1348
+ if (pageType === 'pages') {
1349
+ pagePath = pagesPaths.find((p)=>{
1350
+ p = (0, _normalizepathsep.normalizePathSep)(p);
1351
+ return p.startsWith(actualPage + '.') || p.startsWith(actualPage + '/index.');
1352
+ }) || '';
1353
+ }
1354
+ let originalAppPath;
1355
+ if (pageType === 'app' && mappedAppPages) {
1356
+ const originalAppPaths = [];
1357
+ for (const [originalPath, normalizedPath] of Object.entries(appPathRoutes)){
1358
+ if (normalizedPath === page && mappedAppPages[originalPath]) {
1359
+ originalAppPaths.push(originalPath);
1360
+ }
1361
+ }
1362
+ if (originalAppPaths.length > 0) {
1363
+ originalAppPath = (0, _apppaths.selectAppPageEntry)(page, originalAppPaths);
1364
+ pagePath = mappedAppPages[originalAppPath].replace(/^private-next-app-dir/, '');
1365
+ }
1366
+ }
1367
+ const pageFilePath = (0, _utils1.isAppBuiltinPage)(pagePath) ? pagePath : _path.default.join((pageType === 'pages' ? pagesDir : appDir) || '', pagePath);
1368
+ const isInsideAppDir = pageType === 'app';
1369
+ const staticInfo = pagePath ? await (0, _getstaticinfoincludinglayouts.getStaticInfoIncludingLayouts)({
1370
+ isInsideAppDir,
1371
+ pageFilePath,
1372
+ pageExtensions: config.pageExtensions,
1373
+ appDir,
1374
+ config,
1375
+ isDev: false,
1376
+ // If this route is an App Router page route, inherit the
1377
+ // route segment configs (e.g. `runtime`) from the layout by
1378
+ // passing the `originalAppPath`, which should end with `/page`.
1379
+ page: isInsideAppDir ? originalAppPath : page
1380
+ }) : undefined;
1381
+ if (staticInfo == null ? void 0 : staticInfo.hadUnsupportedValue) {
1382
+ errorFromUnsupportedSegmentConfig();
1383
+ }
1384
+ // If there's any thing that would contribute to the functions
1385
+ // configuration, we need to add it to the manifest.
1386
+ if (typeof (staticInfo == null ? void 0 : staticInfo.runtime) !== 'undefined' || typeof (staticInfo == null ? void 0 : staticInfo.maxDuration) !== 'undefined' || typeof (staticInfo == null ? void 0 : staticInfo.preferredRegion) !== 'undefined') {
1387
+ const regions = (staticInfo == null ? void 0 : staticInfo.preferredRegion) ? typeof staticInfo.preferredRegion === 'string' ? [
1388
+ staticInfo.preferredRegion
1389
+ ] : staticInfo.preferredRegion : undefined;
1390
+ functionsConfigManifest.functions[page] = {
1391
+ maxDuration: staticInfo == null ? void 0 : staticInfo.maxDuration,
1392
+ ...regions && {
1393
+ regions
1394
+ }
1395
+ };
1396
+ }
1397
+ const pageRuntime = middlewareManifest.functions[originalAppPath || page] ? 'edge' : staticInfo == null ? void 0 : staticInfo.runtime;
1398
+ if (!isCompileMode) {
1399
+ isServerComponent = pageType === 'app' && (staticInfo == null ? void 0 : staticInfo.rsc) !== _constants1.RSC_MODULE_TYPES.client;
1400
+ if (pageType === 'app' || !(0, _utils1.isReservedPage)(page)) {
1401
+ try {
1402
+ let edgeInfo;
1403
+ if ((0, _isedgeruntime.isEdgeRuntime)(pageRuntime)) {
1404
+ if (pageType === 'app') {
1405
+ edgeRuntimeAppCount++;
1406
+ } else {
1407
+ edgeRuntimePagesCount++;
1408
+ }
1409
+ const manifestKey = pageType === 'pages' ? page : originalAppPath || '';
1410
+ edgeInfo = middlewareManifest.functions[manifestKey];
1411
+ }
1412
+ let isPageStaticSpan = checkPageSpan.traceChild('is-page-static');
1413
+ let workerResult = await isPageStaticSpan.traceAsyncFn(()=>{
1414
+ var _config_i18n, _config_i18n1;
1415
+ return staticWorker.isPageStatic({
1416
+ dir,
1417
+ page,
1418
+ originalAppPath,
1419
+ distDir,
1420
+ configFileName,
1421
+ httpAgentOptions: config.httpAgentOptions,
1422
+ locales: (_config_i18n = config.i18n) == null ? void 0 : _config_i18n.locales,
1423
+ defaultLocale: (_config_i18n1 = config.i18n) == null ? void 0 : _config_i18n1.defaultLocale,
1424
+ parentId: isPageStaticSpan.getId(),
1425
+ pageRuntime,
1426
+ edgeInfo,
1427
+ pageType,
1428
+ cacheComponents: isAppCacheComponentsEnabled,
1429
+ partialPrefetching: config.partialPrefetching,
1430
+ authInterrupts: isAuthInterruptsEnabled,
1431
+ useCacheTimeout: config.experimental.useCacheTimeout,
1432
+ durableUseCacheEntries: Boolean(config.experimental.durableUseCacheEntries),
1433
+ staticPageGenerationTimeout: config.staticPageGenerationTimeout,
1434
+ cacheHandler: config.cacheHandler,
1435
+ cacheHandlers: config.cacheHandlers,
1436
+ isrFlushToDisk: _ciinfo.hasNextSupport ? false : config.experimental.isrFlushToDisk,
1437
+ cacheMaxMemorySize: config.cacheMaxMemorySize,
1438
+ nextConfigOutput: config.output,
1439
+ cacheLifeProfiles: config.cacheLife,
1440
+ buildId,
1441
+ deploymentId: config.deploymentId,
1442
+ clientAssetToken: config.supportsImmutableAssets ? '' : config.deploymentId,
1443
+ sriEnabled
1444
+ });
1445
+ });
1446
+ if (pageType === 'app' && originalAppPath) {
1447
+ if (isAppCacheComponentsEnabled && !(0, _isapprouteroute.isAppRouteRoute)(originalAppPath)) {
1448
+ // Include pages without exports: an omitted policy
1449
+ // cannot silently inherit another route's closure.
1450
+ paramMatchingByRoute.set(originalAppPath, workerResult.paramMatching);
1451
+ }
1452
+ appNormalizedPaths.set(originalAppPath, page);
1453
+ // TODO-APP: handle prerendering with edge
1454
+ if ((0, _isedgeruntime.isEdgeRuntime)(pageRuntime)) {
1455
+ isStatic = false;
1456
+ isSSG = false;
1457
+ _log.warnOnce(`Using edge runtime on a page currently disables static generation for that page`);
1458
+ } else {
1459
+ const isDynamic = (0, _utils.isDynamicRoute)(page);
1460
+ if (typeof workerResult.isRoutePPREnabled === 'boolean') {
1461
+ isRoutePPREnabled = workerResult.isRoutePPREnabled;
1462
+ if (config.cacheComponents && isRoutePPREnabled && workerResult.appConfig) {
1463
+ isEnsureStaticPage = workerResult.appConfig.ensureStatic === 'navigation';
1464
+ }
1465
+ }
1466
+ // If this route can be partially pre-rendered, then
1467
+ // mark it as such and mark that it can be
1468
+ // generated server-side.
1469
+ if (workerResult.isRoutePPREnabled) {
1470
+ isSSG = true;
1471
+ isStatic = true;
1472
+ staticPaths.set(originalAppPath, []);
1473
+ }
1474
+ if (workerResult.prerenderedRoutes) {
1475
+ staticPaths.set(originalAppPath, workerResult.prerenderedRoutes);
1476
+ ssgPageRoutes = workerResult.prerenderedRoutes.filter((route)=>route.isPrerenderOutput !== false).map((route)=>route.pathname);
1477
+ isSSG = true;
1478
+ }
1479
+ if (workerResult.prerenderRouteMatchers) {
1480
+ prerenderRouteMatchers.set(originalAppPath, workerResult.prerenderRouteMatchers);
1481
+ }
1482
+ const appConfig = workerResult.appConfig || {};
1483
+ if (appConfig.revalidate !== 0) {
1484
+ const hasGenerateStaticParams = workerResult.prerenderedRoutes && workerResult.prerenderedRoutes.length > 0 && // in PPR, we create fallback routes with empty params.
1485
+ // If at least one non-empty param exists, it must've been
1486
+ // generated by `generateStaticParams`. Static metadata files
1487
+ // use a placeholder path with empty params instead.
1488
+ workerResult.prerenderedRoutes.some((route)=>(0, _ismetadataroute.isStaticMetadataFile)(route.pathname) || !(0, _paramsutils.isEmptyParams)(route.params));
1489
+ if (isDynamic && !hasGenerateStaticParams) {
1490
+ if (config.output === 'export') {
1491
+ throw new Error(`Page "${page}" is missing "generateStaticParams()" so it cannot be used with "output: export" config. See more info here: https://nextjs.org/docs/messages/generate-static-params`);
1492
+ }
1493
+ if (isEnsureStaticPage) {
1494
+ (0, _ensurestaticgsperrors.throwMissingGspErrorInStaticRoute)(page);
1495
+ }
1496
+ }
1497
+ // Mark the app as static if:
1498
+ // - It has no dynamic param
1499
+ // - It doesn't have generateStaticParams but `dynamic` is set to
1500
+ // `error` or `force-static`
1501
+ if (!isDynamic) {
1502
+ staticPaths.set(originalAppPath, [
1503
+ {
1504
+ params: {},
1505
+ pathname: page,
1506
+ encodedPathname: page,
1507
+ fallbackRouteParams: [],
1508
+ fallbackMode: workerResult.prerenderFallbackMode,
1509
+ fallbackRootParams: [],
1510
+ throwOnEmptyStaticShell: true
1511
+ }
1512
+ ]);
1513
+ isStatic = true;
1514
+ } else if (!hasGenerateStaticParams && (appConfig.dynamic === 'error' || appConfig.dynamic === 'force-static')) {
1515
+ staticPaths.set(originalAppPath, []);
1516
+ isStatic = true;
1517
+ isRoutePPREnabled = false;
1518
+ }
1519
+ }
1520
+ if (workerResult.prerenderFallbackMode) {
1521
+ fallbackModes.set(originalAppPath, workerResult.prerenderFallbackMode);
1522
+ }
1523
+ appDefaultConfigs.set(originalAppPath, appConfig);
1524
+ }
1525
+ } else {
1526
+ if ((0, _isedgeruntime.isEdgeRuntime)(pageRuntime)) {
1527
+ if (workerResult.hasStaticProps) {
1528
+ console.warn(`"getStaticProps" is not yet supported fully with "experimental-edge", detected on ${page}`);
1529
+ }
1530
+ workerResult.isStatic = false;
1531
+ workerResult.hasStaticProps = false;
1532
+ }
1533
+ if (workerResult.isNextImageImported) {
1534
+ isNextImageImported = true;
1535
+ }
1536
+ if (workerResult.hasStaticProps) {
1537
+ ssgPages.add(page);
1538
+ isSSG = true;
1539
+ if (workerResult.prerenderedRoutes && workerResult.prerenderedRoutes.length > 0) {
1540
+ additionalPaths.set(page, workerResult.prerenderedRoutes);
1541
+ ssgPageRoutes = workerResult.prerenderedRoutes.map((route)=>route.pathname);
1542
+ }
1543
+ if (workerResult.prerenderFallbackMode === _fallback.FallbackMode.BLOCKING_STATIC_RENDER) {
1544
+ ssgBlockingFallbackPages.add(page);
1545
+ } else if (workerResult.prerenderFallbackMode === _fallback.FallbackMode.PRERENDER) {
1546
+ ssgStaticFallbackPages.add(page);
1547
+ }
1548
+ } else if (workerResult.hasServerProps) {
1549
+ serverPropsPages.add(page);
1550
+ } else if (workerResult.isStatic && !isServerComponent && await customAppGetInitialPropsPromise === false) {
1551
+ staticPages.add(page);
1552
+ isStatic = true;
1553
+ } else if (isServerComponent) {
1554
+ // This is a static server component page that doesn't have
1555
+ // gSP or gSSP. We still treat it as a SSG page.
1556
+ ssgPages.add(page);
1557
+ isSSG = true;
1558
+ }
1559
+ if (hasPages404 && page === '/404') {
1560
+ if (!workerResult.isStatic && !workerResult.hasStaticProps) {
1561
+ throw new Error(`\`pages/404\` ${_constants.STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR}`);
1562
+ }
1563
+ // we need to ensure the 404 lambda is present since we use
1564
+ // it when _app has getInitialProps
1565
+ if (await customAppGetInitialPropsPromise && !workerResult.hasStaticProps) {
1566
+ staticPages.delete(page);
1567
+ }
1568
+ }
1569
+ if (_constants1.STATIC_STATUS_PAGES.includes(page) && !workerResult.isStatic && !workerResult.hasStaticProps) {
1570
+ throw new Error(`\`pages${page}\` ${_constants.STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR}`);
1571
+ }
1572
+ }
1573
+ } catch (err) {
1574
+ if (!(0, _iserror.default)(err) || err.message !== 'INVALID_DEFAULT_EXPORT') throw err;
1575
+ invalidPages.add(page);
1576
+ }
1577
+ }
1578
+ if (pageType === 'app') {
1579
+ if (isSSG || isStatic) {
1580
+ staticAppPagesCount++;
1581
+ } else {
1582
+ serverAppPagesCount++;
1583
+ }
1584
+ }
1585
+ }
1586
+ pageInfos.set(page, {
1587
+ originalAppPath,
1588
+ isStatic,
1589
+ isSSG,
1590
+ isRoutePPREnabled,
1591
+ isEnsureStaticPage,
1592
+ ssgPageRoutes,
1593
+ initialCacheControl: undefined,
1594
+ runtime: pageRuntime,
1595
+ pageDuration: undefined,
1596
+ ssgPageDurations: undefined,
1597
+ hasEmptyStaticShell: undefined
1598
+ });
1599
+ });
1600
+ }));
1601
+ if (isAppCacheComponentsEnabled) {
1602
+ (0, _parammatching.validateParamMatchingCoherence)(paramMatchingByRoute);
1603
+ }
1604
+ const errorPageResult = await errorPageStaticResult;
1605
+ const nonStaticErrorPage = await errorPageHasCustomGetInitialProps || errorPageResult && errorPageResult.hasServerProps;
1606
+ const returnValue = {
1607
+ customAppGetInitialProps: await customAppGetInitialPropsPromise,
1608
+ namedExports: await namedExportsPromise,
1609
+ isNextImageImported,
1610
+ hasNonStaticErrorPage: nonStaticErrorPage
1611
+ };
1612
+ return returnValue;
1613
+ });
1614
+ (0, _spinner.finishSpinner)(postCompileSpinner, `Collecting page data using ${numberOfWorkers} worker${numberOfWorkers > 1 ? 's' : ''} in ${(0, _durationtostring.hrtimeDurationToString)(process.hrtime(collectingPageDataStart))}`);
1615
+ (0, _trace1.traceMemoryUsage)('Finished collecting page data', nextBuildSpan);
1616
+ if (customAppGetInitialProps) {
1617
+ console.warn((0, _picocolors.bold)((0, _picocolors.yellow)(`Warning: `)) + (0, _picocolors.yellow)(`You have opted-out of Automatic Static Optimization due to \`getInitialProps\` in \`pages/_app\`. This does not opt-out pages with \`getStaticProps\``));
1618
+ console.warn('Read more: https://nextjs.org/docs/messages/opt-out-auto-static-optimization\n');
1619
+ }
1620
+ const middlewareFile = (0, _normalizepathsep.normalizePathSep)(proxyFilePath || middlewareFilePath || '');
1621
+ let hasNodeMiddleware = false;
1622
+ if (middlewareFile) {
1623
+ // Is format of `(/src)/(proxy|middleware).<ext>`, so split by
1624
+ // "." and get the first part, regard rest of the extensions
1625
+ // to match the `page` value format.
1626
+ const page = middlewareFile.split('.')[0];
1627
+ const staticInfo = await (0, _getstaticinfoincludinglayouts.getStaticInfoIncludingLayouts)({
1628
+ isInsideAppDir: false,
1629
+ pageFilePath: _path.default.join(dir, middlewareFile),
1630
+ config,
1631
+ appDir,
1632
+ pageExtensions: config.pageExtensions,
1633
+ isDev: false,
1634
+ page
1635
+ });
1636
+ if (staticInfo.hadUnsupportedValue) {
1637
+ errorFromUnsupportedSegmentConfig();
1638
+ }
1639
+ if (staticInfo.runtime === 'nodejs' || (0, _utils1.isProxyFile)(page)) {
1640
+ var _staticInfo_middleware;
1641
+ hasNodeMiddleware = true;
1642
+ functionsConfigManifest.functions['/_middleware'] = {
1643
+ runtime: 'nodejs',
1644
+ matchers: ((_staticInfo_middleware = staticInfo.middleware) == null ? void 0 : _staticInfo_middleware.matchers) ?? [
1645
+ {
1646
+ regexp: '^.*$',
1647
+ originalSource: '/:path*'
1648
+ }
1649
+ ]
1650
+ };
1651
+ if (bundler === _bundler.Bundler.Turbopack) {
1652
+ const clientMiddlewareManifestJs = `self.__MIDDLEWARE_MATCHERS = ${JSON.stringify(functionsConfigManifest.functions['/_middleware'].matchers || [], null, 2)};self.__MIDDLEWARE_MATCHERS_CB && self.__MIDDLEWARE_MATCHERS_CB()`;
1653
+ let clientMiddlewareManifestPath = _path.default.join(_constants1.CLIENT_STATIC_FILES_PATH, buildId, _constants1.TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST);
1654
+ await writeFileUtf8(_path.default.join(distDir, clientMiddlewareManifestPath), clientMiddlewareManifestJs);
1655
+ }
1656
+ }
1657
+ }
1658
+ await writeFunctionsConfigManifest(distDir, functionsConfigManifest);
1659
+ // #endregion
1660
+ // #region NFT
1661
+ if (bundler !== _bundler.Bundler.Turbopack && !isGenerateMode && !buildTracesPromise) {
1662
+ buildTracesPromise = nextBuildSpan.traceChild('collect-build-traces').traceAsyncFn(()=>{
1663
+ const { collectBuildTraces } = require('./collect-build-traces');
1664
+ return collectBuildTraces({
1665
+ dir,
1666
+ config,
1667
+ distDir,
1668
+ edgeRuntimeRoutes: (0, _utils1.collectRoutesUsingEdgeRuntime)(pageInfos),
1669
+ staticPages: [
1670
+ ...staticPages
1671
+ ],
1672
+ nextBuildSpan,
1673
+ buildTraceContext,
1674
+ outputFileTracingRoot
1675
+ }).catch((err)=>{
1676
+ console.error(err);
1677
+ throw err;
1678
+ });
1679
+ });
1680
+ }
1681
+ if (serverPropsPages.size > 0 || ssgPages.size > 0) {
1682
+ // We update the routes manifest after the build with the
1683
+ // data routes since we can't determine these until after build
1684
+ routesManifest.dataRoutes = (0, _sortableroutes.sortPages)([
1685
+ ...serverPropsPages,
1686
+ ...ssgPages
1687
+ ]).map((page)=>{
1688
+ return (0, _builddataroute.buildDataRoute)(page, buildId);
1689
+ });
1690
+ }
1691
+ // Service workers are compiled into `distDir/static/service-worker/` and register at a broader
1692
+ // scope than their own directory (e.g. `/`), so their script response needs a
1693
+ // `Service-Worker-Allowed` header.
1694
+ const serviceWorkerDir = _path.default.join(distDir, 'static', 'service-worker');
1695
+ if ((0, _fs.existsSync)(serviceWorkerDir) && (await _fs.promises.readdir(serviceWorkerDir)).length > 0) {
1696
+ routesManifest.headers.push((0, _buildcustomroute.buildCustomRoute)('header', {
1697
+ source: `${config.basePath || ''}/_next/static/service-worker/:path*`,
1698
+ headers: [
1699
+ {
1700
+ key: 'Service-Worker-Allowed',
1701
+ value: config.basePath || '/'
1702
+ }
1703
+ ],
1704
+ locale: false,
1705
+ internal: true
1706
+ }));
1707
+ }
1708
+ // We need to write the manifest with rewrites before build
1709
+ await nextBuildSpan.traceChild('write-routes-manifest').traceAsyncFn(()=>writeManifest(routesManifestPath, routesManifest));
1710
+ // Since custom _app.js can wrap the 404 page we have to opt-out of static optimization if it has getInitialProps
1711
+ // Only export the static 404 when there is no /_error present
1712
+ const useStaticPages404 = !customAppGetInitialProps && (!hasNonStaticErrorPage || hasPages404);
1713
+ if (invalidPages.size > 0) {
1714
+ const err = new Error(`Build optimization failed: found page${invalidPages.size === 1 ? '' : 's'} without a React Component as default export in \n${[
1715
+ ...invalidPages
1716
+ ].map((pg)=>`pages${pg}`).join('\n')}\n\nSee https://nextjs.org/docs/messages/page-without-valid-component for more info.\n`);
1717
+ err.code = 'BUILD_OPTIMIZATION_FAILED';
1718
+ throw err;
1719
+ }
1720
+ await (0, _writebuildid.writeBuildId)(distDir, buildId);
1721
+ const features = [
1722
+ {
1723
+ featureName: 'experimental/cacheComponents',
1724
+ invocationCount: config.cacheComponents ? 1 : 0
1725
+ },
1726
+ {
1727
+ featureName: 'experimental/optimizeCss',
1728
+ invocationCount: config.experimental.optimizeCss ? 1 : 0
1729
+ },
1730
+ {
1731
+ featureName: 'experimental/nextScriptWorkers',
1732
+ invocationCount: config.experimental.nextScriptWorkers ? 1 : 0
1733
+ },
1734
+ {
1735
+ featureName: 'turbopackFileSystemCache',
1736
+ invocationCount: ((_config_experimental1 = config.experimental) == null ? void 0 : _config_experimental1.turbopackFileSystemCacheForBuild) ? 1 : 0
1737
+ }
1738
+ ];
1739
+ telemetry.record(features.map((feature)=>{
1740
+ return {
1741
+ eventName: _events.EVENT_BUILD_FEATURE_USAGE,
1742
+ payload: feature
1743
+ };
1744
+ }));
1745
+ // we don't need to inline for turbopack build as
1746
+ // it will handle it's own caching separate of compile
1747
+ if (isGenerateMode && bundler !== _bundler.Bundler.Turbopack) {
1748
+ _log.info('Inlining static env ...');
1749
+ await nextBuildSpan.traceChild('inline-static-env').traceAsyncFn(async ()=>{
1750
+ await (0, _inlinestaticenv.inlineStaticEnv)({
1751
+ distDir,
1752
+ config
1753
+ });
1754
+ });
1755
+ }
1756
+ const middlewareManifest = await readManifest(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.MIDDLEWARE_MANIFEST));
1757
+ const prerenderManifest = {
1758
+ version: 4,
1759
+ // Record evaluated exports, including empty fragments, rather than
1760
+ // inferring API usage from the resulting fallback modes.
1761
+ __private_unstable_hasParamMatching: [
1762
+ ...paramMatchingByRoute.values()
1763
+ ].some((paramMatching)=>paramMatching !== undefined) || undefined,
1764
+ routes: {},
1765
+ dynamicRoutes: {},
1766
+ notFoundRoutes: [],
1767
+ preview: previewProps
1768
+ };
1769
+ // Accumulate per-route segment inlining decisions for
1770
+ // prefetch-hints.json. First-writer-wins: if multiple param
1771
+ // combinations exist for the same route pattern, use the first one.
1772
+ const prefetchHints = {};
1773
+ const tbdPrerenderRoutes = [];
1774
+ const { i18n } = config;
1775
+ const usedStaticStatusPages = _constants1.STATIC_STATUS_PAGES.filter((page)=>mappedPages[page] && mappedPages[page].startsWith('private-next-pages'));
1776
+ usedStaticStatusPages.forEach((page)=>{
1777
+ if (!ssgPages.has(page) && !customAppGetInitialProps) {
1778
+ staticPages.add(page);
1779
+ }
1780
+ });
1781
+ const hasPages500 = !appDirOnly && usedStaticStatusPages.includes('/500');
1782
+ const useDefaultStatic500 = !hasPages500 && !hasNonStaticErrorPage && !customAppGetInitialProps;
1783
+ const combinedPages = [
1784
+ ...staticPages,
1785
+ ...ssgPages
1786
+ ];
1787
+ const isAppGlobalErrorStatic = staticPaths.has(_entryconstants.UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY);
1788
+ const hasStaticAppGlobalError = hasAppGlobalError && isAppGlobalErrorStatic;
1789
+ await (0, _builddiagnostics.updateBuildDiagnostics)({
1790
+ buildStage: 'static-generation'
1791
+ });
1792
+ const hasGSPAndRevalidateZero = new Set();
1793
+ // #endregion
1794
+ // #region SSG
1795
+ // we need to trigger automatic exporting when we have
1796
+ // - static 404/500
1797
+ // - getStaticProps paths
1798
+ // - experimental app is enabled
1799
+ if (!isCompileMode && (combinedPages.length > 0 || useStaticPages404 || useDefaultStatic500 || appDir)) {
1800
+ const staticGenerationSpan = nextBuildSpan.traceChild('static-generation');
1801
+ await staticGenerationSpan.traceAsyncFn(async ()=>{
1802
+ var _pageInfos_get;
1803
+ (0, _utils1.detectConflictingPaths)([
1804
+ ...combinedPages,
1805
+ ...pageKeys.pages.filter((page)=>!combinedPages.includes(page))
1806
+ ], ssgPages, new Map(Array.from(additionalPaths.entries()).map(([page, routes])=>{
1807
+ return [
1808
+ page,
1809
+ routes.map((route)=>route.pathname)
1810
+ ];
1811
+ })));
1812
+ const sortedStaticPaths = Array.from(staticPaths.entries()).sort(([a], [b])=>a.localeCompare(b));
1813
+ const exportApp = require('../export').default;
1814
+ const exportConfig = {
1815
+ ...config,
1816
+ // Default map will be the collection of automatic statically exported
1817
+ // pages and incremental pages.
1818
+ // n.b. we cannot handle this above in combinedPages because the dynamic
1819
+ // page must be in the `pages` array, but not in the mapping.
1820
+ exportPathMap: (defaultMap)=>{
1821
+ // Dynamically routed pages should be prerendered to be used as
1822
+ // a client-side skeleton (fallback) while data is being fetched.
1823
+ // This ensures the end-user never sees a 500 or slow response from the
1824
+ // server.
1825
+ //
1826
+ // Note: prerendering disables automatic static optimization.
1827
+ ssgPages.forEach((page)=>{
1828
+ if ((0, _utils.isDynamicRoute)(page)) {
1829
+ tbdPrerenderRoutes.push(page);
1830
+ if (ssgStaticFallbackPages.has(page)) {
1831
+ // Override the rendering for the dynamic page to be treated as a
1832
+ // fallback render.
1833
+ if (i18n) {
1834
+ defaultMap[`/${i18n.defaultLocale}${page}`] = {
1835
+ page,
1836
+ _pagesFallback: true
1837
+ };
1838
+ } else {
1839
+ defaultMap[page] = {
1840
+ page,
1841
+ _pagesFallback: true
1842
+ };
1843
+ }
1844
+ } else {
1845
+ // Remove dynamically routed pages from the default path map when
1846
+ // fallback behavior is disabled.
1847
+ delete defaultMap[page];
1848
+ }
1849
+ }
1850
+ });
1851
+ // Append the "well-known" routes we should prerender for, e.g. blog
1852
+ // post slugs.
1853
+ additionalPaths.forEach((routes, page)=>{
1854
+ routes.forEach((route)=>{
1855
+ defaultMap[route.pathname] = {
1856
+ page,
1857
+ _ssgPath: route.encodedPathname
1858
+ };
1859
+ });
1860
+ });
1861
+ if (useStaticPages404 && !appDirOnly) {
1862
+ defaultMap['/404'] = {
1863
+ page: hasPages404 ? '/404' : '/_error'
1864
+ };
1865
+ }
1866
+ if (useDefaultStatic500 && !appDirOnly) {
1867
+ defaultMap['/500'] = {
1868
+ page: '/_error'
1869
+ };
1870
+ }
1871
+ // TODO: output manifest specific to app paths and their
1872
+ // revalidate periods and dynamicParams settings
1873
+ sortedStaticPaths.forEach(([originalAppPath, routes])=>{
1874
+ const appConfig = appDefaultConfigs.get(originalAppPath);
1875
+ const isDynamicError = (appConfig == null ? void 0 : appConfig.dynamic) === 'error';
1876
+ // Legacy dynamicParams=false closes the entire route tuple.
1877
+ // Explicit matching instead identifies the affected parameters.
1878
+ const paramMatching = paramMatchingByRoute.get(originalAppPath);
1879
+ let notFoundParams;
1880
+ if (paramMatching) {
1881
+ notFoundParams = Object.keys(paramMatching).filter((name)=>paramMatching[name] === 'not-found');
1882
+ } else if (fallbackModes.get(originalAppPath) === _fallback.FallbackMode.NOT_FOUND) {
1883
+ notFoundParams = Object.keys((0, _routeregex.getRouteRegex)((0, _apppaths.normalizeAppPath)(originalAppPath)).groups);
1884
+ }
1885
+ const isRoutePPREnabled = appConfig ? isAppCacheComponentsEnabled : false;
1886
+ routes.forEach((route)=>{
1887
+ var _route_remainingPrerenderableParams;
1888
+ // If the route has any dynamic root segments, we need to skip
1889
+ // rendering the route. This is because we don't support
1890
+ // revalidating the shells without the parameters present.
1891
+ // Note that we only have fallback root params if we also have
1892
+ // PPR enabled for this route/app already.
1893
+ if (route.fallbackRootParams && route.fallbackRootParams.length > 0 && // We don't skip rendering the route if we have the
1894
+ // following enabled. This is because the flight data now
1895
+ // does not contain any of the route params and is instead
1896
+ // completely static.
1897
+ !config.cacheComponents) {
1898
+ return;
1899
+ }
1900
+ defaultMap[route.pathname] = {
1901
+ page: originalAppPath,
1902
+ _ssgPath: route.encodedPathname,
1903
+ _fallbackRouteParams: route.fallbackRouteParams,
1904
+ _notFoundParams: notFoundParams,
1905
+ _isDynamicError: isDynamicError,
1906
+ _isAppDir: true,
1907
+ _isRoutePPREnabled: isRoutePPREnabled,
1908
+ _allowEmptyStaticShell: !route.throwOnEmptyStaticShell,
1909
+ // A fallback shell can only be upgraded if at least one of
1910
+ // its fallback params is a `generateStaticParams` candidate,
1911
+ // and only when Partial Prefetching is enabled. Otherwise
1912
+ // nothing ever performs the upgrade, so flagging the shell
1913
+ // would only cause the client to retry the prefetch.
1914
+ _isFallbackUpgradeable: Boolean(config.partialPrefetching) && (((_route_remainingPrerenderableParams = route.remainingPrerenderableParams) == null ? void 0 : _route_remainingPrerenderableParams.length) ?? 0) > 0
1915
+ };
1916
+ });
1917
+ });
1918
+ if (i18n) {
1919
+ for (const page of [
1920
+ ...staticPages,
1921
+ ...ssgPages,
1922
+ ...useStaticPages404 ? [
1923
+ '/404'
1924
+ ] : [],
1925
+ ...useDefaultStatic500 ? [
1926
+ '/500'
1927
+ ] : []
1928
+ ]){
1929
+ const isSsg = ssgPages.has(page);
1930
+ const isDynamic = (0, _utils.isDynamicRoute)(page);
1931
+ const isFallback = isSsg && ssgStaticFallbackPages.has(page);
1932
+ for (const locale of i18n.locales){
1933
+ var _defaultMap_page;
1934
+ // skip fallback generation for SSG pages without fallback mode
1935
+ if (isSsg && isDynamic && !isFallback) continue;
1936
+ const outputPath = `/${locale}${page === '/' ? '' : page}`;
1937
+ defaultMap[outputPath] = {
1938
+ page: ((_defaultMap_page = defaultMap[page]) == null ? void 0 : _defaultMap_page.page) || page,
1939
+ _locale: locale,
1940
+ _pagesFallback: isFallback
1941
+ };
1942
+ }
1943
+ // remove non-locale prefixed variant from defaultMap
1944
+ delete defaultMap[page];
1945
+ }
1946
+ }
1947
+ return defaultMap;
1948
+ }
1949
+ };
1950
+ const outdir = _path.default.join(distDir, 'export');
1951
+ const exportResult = await exportApp(dir, {
1952
+ nextConfig: exportConfig,
1953
+ enabledDirectories,
1954
+ silent: true,
1955
+ buildExport: true,
1956
+ debugOutput,
1957
+ debugPrerender,
1958
+ pages: combinedPages,
1959
+ outdir,
1960
+ statusMessage: `Generating static pages using ${numberOfWorkers} worker${numberOfWorkers > 1 ? 's' : ''}`,
1961
+ numWorkers: numberOfWorkers,
1962
+ appDirOnly,
1963
+ bundler
1964
+ }, nextBuildSpan, staticWorker);
1965
+ // If there was no result, there's nothing more to do.
1966
+ if (!exportResult) return;
1967
+ const resolveFallbackMode = (matcher, prerenderCandidate, hasEmptyStaticShell)=>{
1968
+ // An unconfigured parameter uses its shell to infer the miss mode.
1969
+ // This is separate from validation: even a required validation
1970
+ // render can be empty when the user opts out with instant=false.
1971
+ // Without matching configuration, preserve the existing heuristic
1972
+ // for optional, more generic shells.
1973
+ if (prerenderCandidate && hasEmptyStaticShell && (matcher.isFallbackModeInferred || !prerenderCandidate.throwOnEmptyStaticShell) && matcher.fallbackMode === _fallback.FallbackMode.PRERENDER) {
1974
+ return _fallback.FallbackMode.BLOCKING_STATIC_RENDER;
1975
+ }
1976
+ // If the route has no fallback mode, then we should use the
1977
+ // `NOT_FOUND` fallback mode.
1978
+ if (!matcher.fallbackMode) {
1979
+ return _fallback.FallbackMode.NOT_FOUND;
1980
+ }
1981
+ return matcher.fallbackMode;
1982
+ };
1983
+ const getCacheControl = (exportPath, defaultRevalidate = false)=>{
1984
+ var _exportResult_byPath_get;
1985
+ const cacheControl = (_exportResult_byPath_get = exportResult.byPath.get(exportPath)) == null ? void 0 : _exportResult_byPath_get.cacheControl;
1986
+ if (!cacheControl) {
1987
+ return {
1988
+ revalidate: defaultRevalidate,
1989
+ expire: undefined
1990
+ };
1991
+ }
1992
+ if (cacheControl.revalidate !== false && cacheControl.revalidate > 0 && cacheControl.expire === undefined) {
1993
+ return {
1994
+ revalidate: cacheControl.revalidate,
1995
+ expire: config.expireTime
1996
+ };
1997
+ }
1998
+ return cacheControl;
1999
+ };
2000
+ if (debugOutput || process.env.NEXT_SSG_FETCH_METRICS === '1') {
2001
+ (0, _builddiagnostics.recordFetchMetrics)(exportResult);
2002
+ }
2003
+ (0, _turborepoaccesstrace.writeTurborepoAccessTraceResult)({
2004
+ distDir: buildDistDir,
2005
+ traces: [
2006
+ turborepoAccessTraceResult,
2007
+ ...exportResult.turborepoAccessTraceResults.values()
2008
+ ]
2009
+ });
2010
+ prerenderManifest.notFoundRoutes = Array.from(exportResult.ssgNotFoundPaths);
2011
+ // remove server bundles that were exported
2012
+ for (const page of staticPages){
2013
+ if (page === '/404') {
2014
+ continue;
2015
+ }
2016
+ const serverBundle = (0, _require.getPagePath)(page, distDir, undefined, false);
2017
+ await _fs.promises.unlink(serverBundle);
2018
+ }
2019
+ sortedStaticPaths.forEach(([originalAppPath, prerenderedRoutes])=>{
2020
+ var _pageInfos_get, _pageInfos_get1, _pageInfos_get2;
2021
+ const page = appNormalizedPaths.get(originalAppPath);
2022
+ if (!page) throw new _invarianterror.InvariantError('Page not found');
2023
+ const appConfig = appDefaultConfigs.get(originalAppPath);
2024
+ if (!appConfig) throw new _invarianterror.InvariantError('App config not found');
2025
+ const ssgPageRoutesSet = new Set((_pageInfos_get = pageInfos.get(page)) == null ? void 0 : _pageInfos_get.ssgPageRoutes);
2026
+ // Preserve the specificity order that unknown prerender routes had
2027
+ // before matchers were modeled separately. Some metadata, such as
2028
+ // prefetch hints, is collected using first-writer-wins semantics.
2029
+ const dynamicRouteMatchers = [
2030
+ ...(0, _sortableroutes.sortPageObjects)(prerenderRouteMatchers.get(originalAppPath) ?? [], (route)=>route.pathname)
2031
+ ];
2032
+ let hasRevalidateZero = appConfig.revalidate === 0 || getCacheControl(page).revalidate === 0;
2033
+ if (hasRevalidateZero && ((_pageInfos_get1 = pageInfos.get(page)) == null ? void 0 : _pageInfos_get1.isStatic)) {
2034
+ // if the page was marked as being static, but it contains dynamic data
2035
+ // (ie, in the case of a static generation bailout), then it should be marked dynamic
2036
+ pageInfos.set(page, {
2037
+ ...pageInfos.get(page),
2038
+ isStatic: false,
2039
+ isSSG: false
2040
+ });
2041
+ }
2042
+ const isAppRouteHandler = (0, _isapprouteroute.isAppRouteRoute)(originalAppPath);
2043
+ // When this is an app page and PPR is enabled, the route supports
2044
+ // partial pre-rendering.
2045
+ const isRoutePPREnabled = !isAppRouteHandler && isAppCacheComponentsEnabled ? true : undefined;
2046
+ // htmlLimitedBots has been converted to a string during loadConfig.
2047
+ // The configured pattern replaces the default HTML-limited bot
2048
+ // pattern.
2049
+ const htmlLimitedBotsRegexString = config.htmlLimitedBots || _isbot.HTML_LIMITED_BOT_UA_RE_STRING;
2050
+ // Route `has` matchers anchor header values. Add surrounding
2051
+ // wildcards to preserve RegExp.test() substring semantics for
2052
+ // complete user-agent strings.
2053
+ const htmlLimitedBotsBypassRegexString = `.*(?:${htmlLimitedBotsRegexString}).*`;
2054
+ // this flag is used to selectively bypass the static cache and invoke the lambda directly
2055
+ // to enable server actions on static routes
2056
+ const bypassFor = [
2057
+ {
2058
+ type: 'header',
2059
+ key: _approuterheaders.ACTION_HEADER
2060
+ },
2061
+ {
2062
+ type: 'header',
2063
+ key: 'content-type',
2064
+ value: 'multipart/form-data;.*'
2065
+ },
2066
+ // For PPR routes, bypass the shell for user agents configured
2067
+ // to receive blocking metadata and produce a dynamic render.
2068
+ ...isRoutePPREnabled ? [
2069
+ {
2070
+ type: 'header',
2071
+ key: 'user-agent',
2072
+ value: htmlLimitedBotsBypassRegexString
2073
+ }
2074
+ ] : []
2075
+ ];
2076
+ // Candidates without unknown params can become concrete static
2077
+ // outputs. Candidates with unknown params are finalized alongside
2078
+ // the logical matcher directives collected above.
2079
+ const concretePrerenderCandidates = [];
2080
+ // Sort the outputted routes to ensure consistent output. Any route
2081
+ // though that has unknown route params will be pulled and sorted
2082
+ // independently. This is because the routes with unknown route
2083
+ // params will contain the dynamic path parameters, some of which
2084
+ // may conflict with the actual prerendered routes.
2085
+ const unsortedUnknownPrerenderRoutes = [];
2086
+ const unsortedKnownPrerenderRoutes = [];
2087
+ for (const prerenderedRoute of prerenderedRoutes){
2088
+ let route = prerenderedRoute;
2089
+ // Static metadata files under dynamic segments (e.g.
2090
+ // `/[id]/apple-icon.png`) produce the same bytes regardless of
2091
+ // params, so they prerender once to a canonical pathname with
2092
+ // dynamic segments replaced by `-` (e.g. `/-/apple-icon.png`).
2093
+ // Rewriting here ensures they land in `prerenderManifest.routes`
2094
+ // as known static entries rather than in `dynamicRoutes` with
2095
+ // fallback params, which they don't actually need.
2096
+ const staticMetadataPrerenderPathname = (0, _getmetadataroute.getStaticMetadataPrerenderPathname)(prerenderedRoute.pathname);
2097
+ if (staticMetadataPrerenderPathname && staticMetadataPrerenderPathname !== prerenderedRoute.pathname) {
2098
+ route = {
2099
+ params: prerenderedRoute.params,
2100
+ pathname: staticMetadataPrerenderPathname,
2101
+ encodedPathname: staticMetadataPrerenderPathname,
2102
+ fallbackRouteParams: undefined,
2103
+ fallbackMode: prerenderedRoute.fallbackMode,
2104
+ fallbackRootParams: undefined,
2105
+ throwOnEmptyStaticShell: undefined
2106
+ };
2107
+ }
2108
+ if (route.fallbackRouteParams && route.fallbackRouteParams.length > 0) {
2109
+ unsortedUnknownPrerenderRoutes.push(route);
2110
+ } else {
2111
+ unsortedKnownPrerenderRoutes.push(route);
2112
+ }
2113
+ }
2114
+ const sortedUnknownPrerenderRoutes = (0, _sortableroutes.sortPageObjects)(unsortedUnknownPrerenderRoutes, (prerenderedRoute)=>prerenderedRoute.pathname);
2115
+ const sortedKnownPrerenderRoutes = (0, _sortableroutes.sortPageObjects)(unsortedKnownPrerenderRoutes, (prerenderedRoute)=>prerenderedRoute.pathname);
2116
+ prerenderedRoutes = [
2117
+ ...sortedKnownPrerenderRoutes,
2118
+ ...sortedUnknownPrerenderRoutes
2119
+ ];
2120
+ for (const prerenderedRoute of prerenderedRoutes){
2121
+ if (isRoutePPREnabled && prerenderedRoute.fallbackRouteParams && prerenderedRoute.fallbackRouteParams.length > 0) {
2122
+ // Partial candidates have a corresponding matcher directive
2123
+ // and are finalized below after inspecting their render.
2124
+ } else {
2125
+ // If the route doesn't have unknown params, then we need to
2126
+ // add it to the list of static routes.
2127
+ concretePrerenderCandidates.push(prerenderedRoute);
2128
+ }
2129
+ }
2130
+ const isEnsureStaticPage = ((_pageInfos_get2 = pageInfos.get(page)) == null ? void 0 : _pageInfos_get2.isEnsureStaticPage) === true;
2131
+ // Handle all the static routes.
2132
+ for (const route of concretePrerenderCandidates){
2133
+ if ((0, _utils.isDynamicRoute)(page) && route.pathname === page) continue;
2134
+ const pageInfo = pageInfos.get(page);
2135
+ const routeResult = exportResult.byPath.get(route.pathname);
2136
+ const { metadata = {}, hasEmptyStaticShell, hasPostponed, hasStaticRsc } = routeResult ?? {};
2137
+ const cacheControl = getCacheControl(route.pathname, appConfig.revalidate);
2138
+ // Generated concrete paths (for example `/blog/post-1`) inherit
2139
+ // the route-level classification from the dynamic page
2140
+ // (`/blog/[slug]`), but they also need their own export-time
2141
+ // metadata so the tree view can show whether that specific path
2142
+ // ended up fully static or partially prerendered.
2143
+ pageInfos.set(route.pathname, {
2144
+ ...pageInfo,
2145
+ ...pageInfos.get(route.pathname),
2146
+ ssgPageRoutes: null,
2147
+ ssgPageDurations: undefined,
2148
+ pageDuration: undefined,
2149
+ isDynamicAppRoute: false,
2150
+ hasPostponed,
2151
+ hasEmptyStaticShell,
2152
+ initialCacheControl: cacheControl
2153
+ });
2154
+ // update the page (eg /blog/[slug]) to also have the postpone metadata
2155
+ pageInfos.set(page, {
2156
+ ...pageInfos.get(page),
2157
+ hasPostponed,
2158
+ hasEmptyStaticShell,
2159
+ initialCacheControl: cacheControl
2160
+ });
2161
+ // Collect prefetch hints (first-writer-wins per page)
2162
+ if (metadata.prefetchHints && !(page in prefetchHints)) {
2163
+ prefetchHints[page] = metadata.prefetchHints;
2164
+ }
2165
+ if (cacheControl.revalidate !== 0) {
2166
+ const normalizedRoute = (0, _normalizepagepath.normalizePagePath)(route.pathname);
2167
+ let dataRoute;
2168
+ if (isAppRouteHandler) {
2169
+ dataRoute = null;
2170
+ } else {
2171
+ dataRoute = _path.default.posix.join(`${normalizedRoute}${_constants.RSC_SUFFIX}`);
2172
+ }
2173
+ const prefetchDataRoute = isRoutePPREnabled && dataRoute && hasStaticRsc ? dataRoute : undefined;
2174
+ const meta = (0, _utils1.collectMeta)(metadata);
2175
+ const status = route.pathname === _entryconstants.UNDERSCORE_NOT_FOUND_ROUTE ? 404 : meta.status;
2176
+ const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route.pathname);
2177
+ let classification = {};
2178
+ if (!isNotFoundTrue) {
2179
+ if (isAppRouteHandler) {
2180
+ classification = {
2181
+ routeType: 'route',
2182
+ response: 'complete',
2183
+ compute: 'static'
2184
+ };
2185
+ } else if (isRoutePPREnabled) {
2186
+ classification = {
2187
+ routeType: 'page',
2188
+ ...getPprAppPageClassification(route.pathname, routeResult)
2189
+ };
2190
+ } else {
2191
+ classification = getStaticAppPageClassification(route.pathname, routeResult);
2192
+ }
2193
+ }
2194
+ prerenderManifest.routes[route.pathname] = {
2195
+ initialStatus: status,
2196
+ initialHeaders: meta.headers,
2197
+ renderingMode: isAppPPREnabled ? isRoutePPREnabled ? _renderingmode.RenderingMode.PARTIALLY_STATIC : _renderingmode.RenderingMode.STATIC : undefined,
2198
+ ...classification,
2199
+ _isEnsureStaticPage: isEnsureStaticPage || undefined,
2200
+ experimentalPPR: isRoutePPREnabled,
2201
+ experimentalBypassFor: bypassFor,
2202
+ initialRevalidateSeconds: cacheControl.revalidate,
2203
+ initialExpireSeconds: cacheControl.expire,
2204
+ srcRoute: page,
2205
+ dataRoute,
2206
+ prefetchDataRoute,
2207
+ allowHeader: ALLOWED_HEADERS
2208
+ };
2209
+ } else {
2210
+ hasRevalidateZero = true;
2211
+ if (ssgPageRoutesSet.has(route.pathname)) {
2212
+ const currentPageInfo = pageInfos.get(page);
2213
+ // Remove the route from the SSG page routes if it bailed out
2214
+ // during prerendering.
2215
+ ssgPageRoutesSet.delete(route.pathname);
2216
+ // Mark the route as having a GSP and revalidate zero.
2217
+ if (ssgPageRoutesSet.size === 0) {
2218
+ hasGSPAndRevalidateZero.delete(page);
2219
+ } else {
2220
+ hasGSPAndRevalidateZero.add(page);
2221
+ }
2222
+ pageInfos.set(page, {
2223
+ ...currentPageInfo,
2224
+ ssgPageRoutes: Array.from(ssgPageRoutesSet),
2225
+ // If there are no SSG page routes left, then the page is not SSG.
2226
+ isSSG: ssgPageRoutesSet.size === 0 ? false : currentPageInfo.isSSG
2227
+ });
2228
+ } else {
2229
+ // we might have determined during prerendering that this page
2230
+ // used dynamic data
2231
+ pageInfos.set(route.pathname, {
2232
+ ...pageInfos.get(route.pathname),
2233
+ isSSG: false,
2234
+ isStatic: false
2235
+ });
2236
+ }
2237
+ }
2238
+ }
2239
+ if (!hasRevalidateZero && (0, _utils.isDynamicRoute)(page)) {
2240
+ const paramMatching = paramMatchingByRoute.get(originalAppPath);
2241
+ const notFoundParams = paramMatching ? Object.keys(paramMatching).filter((name)=>paramMatching[name] === 'not-found') : undefined;
2242
+ // When PPR fallbacks aren't used, we need to include it here. If
2243
+ // they are enabled, then it'll already be included in the
2244
+ // prerendered routes.
2245
+ if (!isRoutePPREnabled) {
2246
+ dynamicRouteMatchers.push({
2247
+ pathname: page,
2248
+ fallbackRouteParams: [],
2249
+ fallbackMode: fallbackModes.get(originalAppPath) ?? _fallback.FallbackMode.NOT_FOUND,
2250
+ fallbackRootParams: []
2251
+ });
2252
+ }
2253
+ // A logical matcher can have zero or more render candidates.
2254
+ // Today generateStaticParams produces at most one candidate per
2255
+ // pathname. Variants can multiply that into several artifacts
2256
+ // without changing the logical matcher, so retain every
2257
+ // candidate instead of letting pathname select whichever one was
2258
+ // inserted last.
2259
+ const prerenderCandidatesByPathname = new Map();
2260
+ for (const candidate of prerenderedRoutes){
2261
+ const candidates = prerenderCandidatesByPathname.get(candidate.pathname);
2262
+ if (candidates) {
2263
+ candidates.push(candidate);
2264
+ } else {
2265
+ prerenderCandidatesByPathname.set(candidate.pathname, [
2266
+ candidate
2267
+ ]);
2268
+ }
2269
+ }
2270
+ const dynamicRouteEntries = [];
2271
+ for (const matcher of dynamicRouteMatchers){
2272
+ const candidates = prerenderCandidatesByPathname.get(matcher.pathname) ?? [
2273
+ undefined
2274
+ ];
2275
+ for (const prerenderCandidate of candidates){
2276
+ dynamicRouteEntries.push({
2277
+ matcher,
2278
+ prerenderCandidate
2279
+ });
2280
+ }
2281
+ }
2282
+ for (const { matcher: route, prerenderCandidate } of dynamicRouteEntries){
2283
+ // Static metadata files are rewritten above into the known
2284
+ // static bucket under their `-`-placeholder pathname, so any
2285
+ // entry that slips through here (e.g. an unexpected fallback
2286
+ // shape) must not generate a dynamic PRERENDER manifest entry
2287
+ // — the route handler shipped with the dynamic route still
2288
+ // serves these at runtime.
2289
+ if ((0, _ismetadataroute.isStaticMetadataFile)(route.pathname)) {
2290
+ continue;
2291
+ }
2292
+ // This is the artifact associated with this matcher entry. It
2293
+ // currently has the same pathname as the logical matcher, but
2294
+ // that is not an invariant: variants can write several
2295
+ // artifacts for one matcher under distinct output paths.
2296
+ const prerenderOutputPathname = (prerenderCandidate == null ? void 0 : prerenderCandidate.pathname) ?? route.pathname;
2297
+ const normalizedRoute = (0, _normalizepagepath.normalizePagePath)(prerenderOutputPathname);
2298
+ const parentPageInfo = pageInfos.get(page);
2299
+ const routeResult = exportResult.byPath.get(prerenderOutputPathname);
2300
+ const metadata = routeResult == null ? void 0 : routeResult.metadata;
2301
+ const cacheControl = getCacheControl(prerenderOutputPathname);
2302
+ let dataRoute = null;
2303
+ if (!isAppRouteHandler) {
2304
+ dataRoute = _path.default.posix.join(`${normalizedRoute}${_constants.RSC_SUFFIX}`);
2305
+ }
2306
+ let prefetchDataRoute = null;
2307
+ let dynamicRoute = routesManifest.dynamicRoutes.find((r)=>r.page === route.pathname);
2308
+ if (!isAppRouteHandler && isAppPPREnabled) {
2309
+ // If the dynamic route wasn't found, then we need to create
2310
+ // it. This ensures that for each fallback shell there's an
2311
+ // entry in the app routes manifest which enables routing for
2312
+ // this fallback shell.
2313
+ if (!dynamicRoute) {
2314
+ dynamicRoute = (0, _utils1.pageToRoute)(route.pathname, page);
2315
+ sourcePages.set(route.pathname, page);
2316
+ // This route is not for the internal router, but instead
2317
+ // for external routers.
2318
+ dynamicRoute.skipInternalRouting = true;
2319
+ // Push this to the end of the array. The dynamic routes are
2320
+ // sorted by page later.
2321
+ dynamicRoutes.push(dynamicRoute);
2322
+ }
2323
+ }
2324
+ if (!isAppRouteHandler && ((metadata == null ? void 0 : metadata.segmentPaths) || route.fallbackRootParams && route.fallbackRootParams.length > 0)) {
2325
+ // If PPR isn't enabled, then we might not find the dynamic
2326
+ // route by pathname. If that's the case, we need to find the
2327
+ // route by page.
2328
+ if (!dynamicRoute) {
2329
+ dynamicRoute = dynamicRoutes.find((r)=>r.page === page);
2330
+ // If it can't be found by page, we must throw an error.
2331
+ if (!dynamicRoute) {
2332
+ throw new _invarianterror.InvariantError('Dynamic route not found');
2333
+ }
2334
+ }
2335
+ if (metadata == null ? void 0 : metadata.segmentPaths) {
2336
+ const pageSegmentPath = metadata.segmentPaths.find((item)=>item.endsWith('__PAGE__'));
2337
+ if (!pageSegmentPath) {
2338
+ throw new Error(`Invariant: missing __PAGE__ segmentPath`);
2339
+ }
2340
+ // We build a combined segment data route from the
2341
+ // page segment as we need to limit the number of
2342
+ // routes we output and they can be shared
2343
+ const builtSegmentDataRoute = (0, _buildprefetchsegmentdataroute.buildPrefetchSegmentDataRoute)(route.pathname, pageSegmentPath);
2344
+ builtSegmentDataRoute.source = builtSegmentDataRoute.source.replace('/__PAGE__\\.segment\\.rsc$', `(?<segment>/__PAGE__\\.segment\\.rsc|\\.segment\\.rsc)(?:/)?$`);
2345
+ builtSegmentDataRoute.destination = builtSegmentDataRoute.destination.replace('/__PAGE__.segment.rsc', '$segment');
2346
+ dynamicRoute.prefetchSegmentDataRoutes ??= [];
2347
+ dynamicRoute.prefetchSegmentDataRoutes.push(builtSegmentDataRoute);
2348
+ }
2349
+ // Collect prefetch hints (first-writer-wins per page)
2350
+ if ((metadata == null ? void 0 : metadata.prefetchHints) && !(page in prefetchHints)) {
2351
+ prefetchHints[page] = metadata.prefetchHints;
2352
+ }
2353
+ }
2354
+ if (route.pathname === page) {
2355
+ // The route pattern entry (for example `/blog/[slug]`) is
2356
+ // also present in `dynamicRouteMatchers`. Keep updating the
2357
+ // parent entry in place so it retains its `ssgPageRoutes`
2358
+ // subtree; rewriting it like a concrete child route would
2359
+ // lose the generated child paths from the build output.
2360
+ pageInfos.set(page, {
2361
+ ...pageInfos.get(page),
2362
+ initialCacheControl: cacheControl,
2363
+ isDynamicAppRoute: true,
2364
+ // if PPR is turned on and the route contains a dynamic segment,
2365
+ // we assume it'll be partially prerendered
2366
+ hasPostponed: isRoutePPREnabled
2367
+ });
2368
+ } else {
2369
+ // Concrete generated paths inherit the parent route's base
2370
+ // metadata, but they should not themselves print a nested
2371
+ // subtree. Clearing `ssgPageRoutes` here lets the tree view
2372
+ // classify the child path with its own symbol only once.
2373
+ pageInfos.set(route.pathname, {
2374
+ ...parentPageInfo,
2375
+ ...pageInfos.get(route.pathname),
2376
+ ssgPageRoutes: null,
2377
+ ssgPageDurations: undefined,
2378
+ pageDuration: undefined,
2379
+ initialCacheControl: cacheControl,
2380
+ isDynamicAppRoute: true,
2381
+ // if PPR is turned on and the route contains a dynamic segment,
2382
+ // we assume it'll be partially prerendered
2383
+ hasPostponed: isRoutePPREnabled
2384
+ });
2385
+ }
2386
+ const fallbackMode = resolveFallbackMode(route, prerenderCandidate, routeResult == null ? void 0 : routeResult.hasEmptyStaticShell);
2387
+ // When the route is configured to serve a prerender, we should
2388
+ // use the cache control from the export result. If it can't be
2389
+ // found, mark that we should keep the shell forever
2390
+ // (revalidate: `false` via `getCacheControl()`).
2391
+ const fallbackCacheControl = isRoutePPREnabled && fallbackMode === _fallback.FallbackMode.PRERENDER ? cacheControl : undefined;
2392
+ const fallback = (0, _fallback.fallbackModeToFallbackField)(fallbackMode, route.pathname);
2393
+ const meta = metadata && isRoutePPREnabled && fallbackMode === _fallback.FallbackMode.PRERENDER ? (0, _utils1.collectMeta)(metadata) : {};
2394
+ let classification = {};
2395
+ if (!isAppRouteHandler) {
2396
+ if (typeof fallback === 'string' && isRoutePPREnabled) {
2397
+ var _route_remainingPrerenderableParams;
2398
+ classification = {
2399
+ routeType: (((_route_remainingPrerenderableParams = route.remainingPrerenderableParams) == null ? void 0 : _route_remainingPrerenderableParams.length) ?? 0) > 0 ? 'fallback' : 'shell',
2400
+ ...getPprAppPageClassification(route.pathname, routeResult)
2401
+ };
2402
+ } else if (fallback === null) {
2403
+ classification = {
2404
+ routeType: 'page',
2405
+ response: 'empty',
2406
+ compute: 'blocking'
2407
+ };
2408
+ }
2409
+ }
2410
+ prerenderManifest.dynamicRoutes[prerenderOutputPathname] = {
2411
+ notFoundParams,
2412
+ experimentalPPR: isRoutePPREnabled,
2413
+ remainingPrerenderableParams: route.remainingPrerenderableParams,
2414
+ _isEnsureStaticPage: isEnsureStaticPage || undefined,
2415
+ // Only PPR routes use static-shell validation. Without a
2416
+ // build-time prerender, false lets runtime rendering resolve
2417
+ // the remaining prerenderable params during the static phase.
2418
+ throwOnEmptyStaticShell: isRoutePPREnabled ? prerenderCandidate ? prerenderCandidate.throwOnEmptyStaticShell : false : undefined,
2419
+ renderingMode: isAppPPREnabled ? isRoutePPREnabled ? _renderingmode.RenderingMode.PARTIALLY_STATIC : _renderingmode.RenderingMode.STATIC : undefined,
2420
+ ...classification,
2421
+ experimentalBypassFor: bypassFor,
2422
+ routeRegex: (0, _loadcustomroutes.normalizeRouteRegex)((0, _routeregex.getNamedRouteRegex)(prerenderOutputPathname, {
2423
+ prefixRouteKeys: false
2424
+ }).re.source),
2425
+ dataRoute,
2426
+ fallback,
2427
+ isExplicitlyBlocking: fallbackMode === _fallback.FallbackMode.BLOCKING_STATIC_RENDER && route.fallbackRouteParams.some(({ paramName })=>{
2428
+ var _paramMatchingByRoute_get;
2429
+ return ((_paramMatchingByRoute_get = paramMatchingByRoute.get(originalAppPath)) == null ? void 0 : _paramMatchingByRoute_get[paramName]) === 'blocking';
2430
+ }) ? true : undefined,
2431
+ fallbackRevalidate: fallbackCacheControl == null ? void 0 : fallbackCacheControl.revalidate,
2432
+ fallbackExpire: fallbackCacheControl == null ? void 0 : fallbackCacheControl.expire,
2433
+ fallbackStatus: meta.status,
2434
+ fallbackHeaders: meta.headers,
2435
+ fallbackRootParams: route.fallbackRouteParams ? route.fallbackRootParams : undefined,
2436
+ fallbackSourceRoute: route.fallbackRouteParams && route.fallbackRouteParams.length > 0 ? page : undefined,
2437
+ fallbackRouteParams: route.fallbackRouteParams,
2438
+ dataRouteRegex: !dataRoute ? null : (0, _loadcustomroutes.normalizeRouteRegex)((0, _routeregex.getNamedRouteRegex)(dataRoute, {
2439
+ prefixRouteKeys: false,
2440
+ includeSuffix: true,
2441
+ excludeOptionalTrailingSlash: true
2442
+ }).re.source),
2443
+ prefetchDataRoute,
2444
+ prefetchDataRouteRegex: !prefetchDataRoute ? undefined : (0, _loadcustomroutes.normalizeRouteRegex)((0, _routeregex.getNamedRouteRegex)(prefetchDataRoute, {
2445
+ prefixRouteKeys: false,
2446
+ includeSuffix: true,
2447
+ excludeOptionalTrailingSlash: true
2448
+ }).re.source),
2449
+ allowHeader: ALLOWED_HEADERS
2450
+ };
2451
+ }
2452
+ }
2453
+ });
2454
+ // Update pages manifest entries for exported pages.
2455
+ // The export worker writes pages directly to .next/server/pages/,
2456
+ // so no file moving is needed — only the manifest must be updated.
2457
+ const updatePagesManifestForExportedPage = (page, isSsg)=>{
2458
+ const isUnusedStaticStatusPage = _constants1.STATIC_STATUS_PAGES.includes(page) && !usedStaticStatusPages.includes(page);
2459
+ // SSG pages don't get manifest entries
2460
+ if (isSsg) return;
2461
+ if (i18n) {
2462
+ // Replace non-locale entry with per-locale entries
2463
+ delete pagesManifest[page];
2464
+ for (const locale of i18n.locales){
2465
+ const curPath = `/${locale}${page === '/' ? '' : page}`;
2466
+ if (prerenderManifest.notFoundRoutes.includes(curPath)) continue;
2467
+ const relativeDest = page === '/' ? `pages/${locale}.html` : `pages${(0, _normalizepagepath.normalizePagePath)(curPath)}.html`;
2468
+ pagesManifest[curPath] = relativeDest;
2469
+ }
2470
+ } else if (!isUnusedStaticStatusPage) {
2471
+ const file = (0, _normalizepagepath.normalizePagePath)(page);
2472
+ pagesManifest[page] = `pages${file}.html`;
2473
+ }
2474
+ };
2475
+ // Remove files for Pages Router paths that returned notFound during export.
2476
+ const deleteNotFoundPagesRouterFiles = (pathname, page)=>{
2477
+ const filename = config.adapterPath && config.output !== 'export' ? (0, _routecachekey.getRouteCacheKey)(pathname, {
2478
+ kind: _routekind.RouteKind.PAGES,
2479
+ sourceRoute: page
2480
+ }) : `pages${(0, _normalizepagepath.normalizePagePath)(pathname)}`;
2481
+ return Promise.all([
2482
+ '.html',
2483
+ '.json',
2484
+ '.meta'
2485
+ ].map((extension)=>_fs.promises.rm(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, `${filename}${extension}`), {
2486
+ force: true
2487
+ })));
2488
+ };
2489
+ async function moveExportedAppNotFoundTo404() {
2490
+ return staticGenerationSpan.traceChild('move-exported-app-not-found-').traceAsyncFn(async ()=>{
2491
+ const orig = _path.default.join(distDir, 'server', config.adapterPath && config.output !== 'export' ? `${(0, _routecachekey.getRouteCacheKey)(_entryconstants.UNDERSCORE_NOT_FOUND_ROUTE, {
2492
+ kind: _routekind.RouteKind.APP_PAGE,
2493
+ sourceRoute: _entryconstants.UNDERSCORE_NOT_FOUND_ROUTE_ENTRY
2494
+ })}.html` : 'app/_not-found.html');
2495
+ const updatedRelativeDest = _path.default.join('pages', '404.html').replace(/\\/g, '/');
2496
+ if ((0, _fs.existsSync)(orig)) {
2497
+ // if 404.html folder doesn't exist, create it
2498
+ await _fs.promises.mkdir(_path.default.dirname(_path.default.join(distDir, 'server', updatedRelativeDest)), {
2499
+ recursive: true
2500
+ });
2501
+ await _fs.promises.copyFile(orig, _path.default.join(distDir, 'server', updatedRelativeDest));
2502
+ // since the app router not found is prioritized over pages router,
2503
+ // we have to ensure the app router entries are available for all locales
2504
+ if (i18n) {
2505
+ for (const locale of i18n.locales){
2506
+ const curPath = `/${locale}/404`;
2507
+ pagesManifest[curPath] = updatedRelativeDest;
2508
+ }
2509
+ }
2510
+ pagesManifest['/404'] = updatedRelativeDest;
2511
+ }
2512
+ });
2513
+ }
2514
+ async function moveExportedAppGlobalErrorTo500() {
2515
+ return staticGenerationSpan.traceChild('move-exported-app-global-error-').traceAsyncFn(async ()=>{
2516
+ // If static 500.html exists in pages router, don't move it
2517
+ if ((0, _fs.existsSync)(_path.default.join(distDir, 'server', 'pages', '500.html'))) {
2518
+ return;
2519
+ }
2520
+ // Only handle 500.html generation for static export
2521
+ const orig = _path.default.join(distDir, 'server', config.adapterPath && config.output !== 'export' ? `${(0, _routecachekey.getRouteCacheKey)(_entryconstants.UNDERSCORE_GLOBAL_ERROR_ROUTE, {
2522
+ kind: _routekind.RouteKind.APP_PAGE,
2523
+ sourceRoute: _entryconstants.UNDERSCORE_GLOBAL_ERROR_ROUTE_ENTRY
2524
+ })}.html` : 'app/_global-error.html');
2525
+ if ((0, _fs.existsSync)(orig)) {
2526
+ const error500Html = _path.default.join(distDir, 'server', 'pages', '500.html');
2527
+ // if 500.html folder doesn't exist, create it
2528
+ await _fs.promises.mkdir(_path.default.dirname(error500Html), {
2529
+ recursive: true
2530
+ });
2531
+ await _fs.promises.copyFile(orig, error500Html);
2532
+ pagesManifest['/500'] = _path.default.join('pages', '500.html').replace(/\\/g, '/');
2533
+ }
2534
+ });
2535
+ }
2536
+ // If there's a fully static /not-found inside app, we prefer it over
2537
+ // the pages 404. A partially prerendered not-found is only a shell,
2538
+ // so it must remain associated with its resumable prerender output.
2539
+ const hasStaticApp404 = hasApp404 && staticPaths.has(_entryconstants.UNDERSCORE_NOT_FOUND_ROUTE_ENTRY) && !((_pageInfos_get = pageInfos.get(_entryconstants.UNDERSCORE_NOT_FOUND_ROUTE)) == null ? void 0 : _pageInfos_get.hasPostponed);
2540
+ if (hasStaticApp404) {
2541
+ await moveExportedAppNotFoundTo404();
2542
+ } else {
2543
+ // Update manifest for default 404 page
2544
+ if (!hasPages404 && !hasApp404 && useStaticPages404 && !appDirOnly) {
2545
+ updatePagesManifestForExportedPage('/404', false);
2546
+ }
2547
+ }
2548
+ if (useDefaultStatic500 && !appDirOnly) {
2549
+ updatePagesManifestForExportedPage('/500', false);
2550
+ }
2551
+ // If there's app router and no pages router, use app router built-in 500.html
2552
+ if (hasStaticAppGlobalError && mappedAppPages && Object.keys(mappedAppPages).length > 0) {
2553
+ await moveExportedAppGlobalErrorTo500();
2554
+ }
2555
+ for (const page of combinedPages){
2556
+ const isSsg = ssgPages.has(page);
2557
+ const isStaticSsgFallback = ssgStaticFallbackPages.has(page);
2558
+ const isDynamic = (0, _utils.isDynamicRoute)(page);
2559
+ const file = (0, _normalizepagepath.normalizePagePath)(page);
2560
+ const pageInfo = pageInfos.get(page);
2561
+ const durationInfo = exportResult.byPage.get(page);
2562
+ if (pageInfo && durationInfo) {
2563
+ // Set Build Duration
2564
+ if (pageInfo.ssgPageRoutes) {
2565
+ pageInfo.ssgPageDurations = pageInfo.ssgPageRoutes.map((pagePath)=>{
2566
+ const duration = durationInfo.durationsByPath.get(pagePath);
2567
+ if (typeof duration === 'undefined') {
2568
+ throw new Error("Invariant: page wasn't built");
2569
+ }
2570
+ return duration;
2571
+ });
2572
+ }
2573
+ pageInfo.pageDuration = durationInfo.durationsByPath.get(page);
2574
+ }
2575
+ // The dynamic version of SSG pages are only prerendered if the
2576
+ // fallback is enabled. Below, we handle the specific prerenders
2577
+ // of these.
2578
+ const hasHtmlOutput = !(isSsg && isDynamic && !isStaticSsgFallback);
2579
+ if (hasHtmlOutput) {
2580
+ updatePagesManifestForExportedPage(page, isSsg);
2581
+ }
2582
+ if (isSsg) {
2583
+ if (!isDynamic) {
2584
+ if (i18n) {
2585
+ // TODO: do we want to show all locale variants in build output
2586
+ for (const locale of i18n.locales){
2587
+ const localePage = `/${locale}${page === '/' ? '' : page}`;
2588
+ const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(localePage);
2589
+ if (isNotFoundTrue) {
2590
+ await deleteNotFoundPagesRouterFiles(localePage, page);
2591
+ }
2592
+ const cacheControl = getCacheControl(localePage);
2593
+ prerenderManifest.routes[localePage] = {
2594
+ ...!isNotFoundTrue && {
2595
+ routeType: 'page',
2596
+ response: 'complete',
2597
+ compute: 'static'
2598
+ },
2599
+ initialRevalidateSeconds: cacheControl.revalidate,
2600
+ initialExpireSeconds: cacheControl.expire,
2601
+ experimentalPPR: undefined,
2602
+ renderingMode: undefined,
2603
+ srcRoute: null,
2604
+ dataRoute: _path.default.posix.join('/_next/data', buildId, `${localePage}.json`),
2605
+ prefetchDataRoute: undefined,
2606
+ allowHeader: ALLOWED_HEADERS
2607
+ };
2608
+ }
2609
+ } else {
2610
+ const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(page);
2611
+ if (isNotFoundTrue) {
2612
+ await deleteNotFoundPagesRouterFiles(page, page);
2613
+ }
2614
+ const cacheControl = getCacheControl(page);
2615
+ prerenderManifest.routes[page] = {
2616
+ ...!isNotFoundTrue && {
2617
+ routeType: 'page',
2618
+ response: 'complete',
2619
+ compute: 'static'
2620
+ },
2621
+ initialRevalidateSeconds: cacheControl.revalidate,
2622
+ initialExpireSeconds: cacheControl.expire,
2623
+ experimentalPPR: undefined,
2624
+ renderingMode: undefined,
2625
+ srcRoute: null,
2626
+ dataRoute: _path.default.posix.join('/_next/data', buildId, `${file}.json`),
2627
+ // Pages does not have a prefetch data route.
2628
+ prefetchDataRoute: undefined,
2629
+ allowHeader: ALLOWED_HEADERS
2630
+ };
2631
+ }
2632
+ if (pageInfo) {
2633
+ pageInfo.initialCacheControl = getCacheControl(page);
2634
+ }
2635
+ } else {
2636
+ // For a dynamic SSG page, the export worker already wrote
2637
+ // the HTML/JSON files directly to their final location.
2638
+ // We only need to update the prerender manifest.
2639
+ for (const route of additionalPaths.get(page) ?? []){
2640
+ const isNotFoundTrue = prerenderManifest.notFoundRoutes.includes(route.pathname);
2641
+ if (isNotFoundTrue) {
2642
+ await deleteNotFoundPagesRouterFiles(route.pathname, page);
2643
+ }
2644
+ const cacheControl = getCacheControl(route.pathname);
2645
+ prerenderManifest.routes[route.pathname] = {
2646
+ ...!isNotFoundTrue && {
2647
+ routeType: 'page',
2648
+ response: 'complete',
2649
+ compute: 'static'
2650
+ },
2651
+ initialRevalidateSeconds: cacheControl.revalidate,
2652
+ initialExpireSeconds: cacheControl.expire,
2653
+ experimentalPPR: undefined,
2654
+ renderingMode: undefined,
2655
+ srcRoute: page,
2656
+ dataRoute: _path.default.posix.join('/_next/data', buildId, `${(0, _normalizepagepath.normalizePagePath)(route.pathname)}.json`),
2657
+ // Pages does not have a prefetch data route.
2658
+ prefetchDataRoute: undefined,
2659
+ allowHeader: ALLOWED_HEADERS
2660
+ };
2661
+ if (pageInfo) {
2662
+ pageInfo.initialCacheControl = cacheControl;
2663
+ }
2664
+ }
2665
+ }
2666
+ }
2667
+ }
2668
+ await writeManifest(pagesManifestPath, pagesManifest);
2669
+ });
2670
+ // As we may have modified the dynamicRoutes, we need to sort the
2671
+ // dynamic routes by page.
2672
+ routesManifest.dynamicRoutes = (0, _sortableroutes.sortSortableRouteObjects)(dynamicRoutes, (route)=>({
2673
+ // If the route is PPR enabled, and has an associated source page,
2674
+ // use it. Otherwise fallback to the page which should be the same.
2675
+ sourcePage: sourcePages.get(route.page) ?? route.page,
2676
+ page: route.page
2677
+ }));
2678
+ // Now write the routes manifest out.
2679
+ await nextBuildSpan.traceChild('write-routes-manifest').traceAsyncFn(()=>writeManifest(routesManifestPath, routesManifest));
2680
+ }
2681
+ flushTurbopackWarnings();
2682
+ const finalizingPageOptimizationStart = process.hrtime();
2683
+ const postBuildSpinner = (0, _spinner.default)('Finalizing page optimization');
2684
+ let buildTracesSpinner;
2685
+ let buildTracesStart;
2686
+ if (buildTracesPromise) {
2687
+ buildTracesStart = process.hrtime();
2688
+ buildTracesSpinner = (0, _spinner.default)('Collecting build traces');
2689
+ }
2690
+ // When output: export we want to end the worker later as it's still used for writeFullyStaticExport
2691
+ if (config.output !== 'export') {
2692
+ // ensure the worker is not left hanging
2693
+ staticWorker == null ? void 0 : staticWorker.end();
2694
+ staticWorker = undefined // Reset staticWorker to make sure it does not end in `finally`
2695
+ ;
2696
+ }
2697
+ const analysisEnd = process.hrtime(analysisBegin);
2698
+ telemetry.record((0, _events.eventBuildOptimize)(pagesPaths, {
2699
+ durationInSeconds: analysisEnd[0],
2700
+ staticPageCount: staticPages.size,
2701
+ staticPropsPageCount: ssgPages.size,
2702
+ serverPropsPageCount: serverPropsPages.size,
2703
+ ssrPageCount: pagesPaths.length - (staticPages.size + ssgPages.size + serverPropsPages.size),
2704
+ hasStatic404: useStaticPages404,
2705
+ hasReportWebVitals: (namedExports == null ? void 0 : namedExports.includes('reportWebVitals')) ?? false,
2706
+ rewritesCount: combinedRewrites.length,
2707
+ headersCount: headers.length,
2708
+ redirectsCount: redirects.length - 1,
2709
+ headersWithHasCount: headers.filter((r)=>!!r.has).length,
2710
+ rewritesWithHasCount: combinedRewrites.filter((r)=>!!r.has).length,
2711
+ redirectsWithHasCount: redirects.filter((r)=>!!r.has).length,
2712
+ middlewareCount: hasMiddlewareFile || hasProxyFile ? 1 : 0,
2713
+ totalAppPagesCount,
2714
+ staticAppPagesCount,
2715
+ serverAppPagesCount,
2716
+ edgeRuntimeAppCount,
2717
+ edgeRuntimePagesCount
2718
+ }));
2719
+ if (_buildcontext.NextBuildContext.telemetryState) {
2720
+ const events = (0, _events.eventBuildFeatureUsage)(_buildcontext.NextBuildContext.telemetryState.usages);
2721
+ telemetry.record(events);
2722
+ telemetry.record((0, _events.eventPackageUsedInGetServerSideProps)(_buildcontext.NextBuildContext.telemetryState.packagesUsedInServerSideProps));
2723
+ const useCacheTracker = _buildcontext.NextBuildContext.telemetryState.useCacheTracker;
2724
+ for (const [key, value] of Object.entries(useCacheTracker)){
2725
+ telemetry.record((0, _events.eventBuildFeatureUsage)([
2726
+ {
2727
+ featureName: key,
2728
+ invocationCount: value
2729
+ }
2730
+ ]));
2731
+ }
2732
+ }
2733
+ if (ssgPages.size > 0 || appDir) {
2734
+ var _config_i18n;
2735
+ tbdPrerenderRoutes.forEach((tbdRoute)=>{
2736
+ const normalizedRoute = (0, _normalizepagepath.normalizePagePath)(tbdRoute);
2737
+ const dataRoute = _path.default.posix.join('/_next/data', buildId, `${normalizedRoute}.json`);
2738
+ let fallback = false;
2739
+ if (ssgBlockingFallbackPages.has(tbdRoute)) {
2740
+ fallback = null;
2741
+ } else if (ssgStaticFallbackPages.has(tbdRoute)) {
2742
+ fallback = `${normalizedRoute}.html`;
2743
+ }
2744
+ prerenderManifest.dynamicRoutes[tbdRoute] = {
2745
+ routeRegex: (0, _loadcustomroutes.normalizeRouteRegex)((0, _routeregex.getNamedRouteRegex)(tbdRoute, {
2746
+ prefixRouteKeys: false
2747
+ }).re.source),
2748
+ experimentalPPR: undefined,
2749
+ renderingMode: undefined,
2750
+ dataRoute,
2751
+ fallback,
2752
+ ...getPagesFallbackClassification(fallback),
2753
+ fallbackRevalidate: undefined,
2754
+ fallbackExpire: undefined,
2755
+ fallbackSourceRoute: undefined,
2756
+ fallbackRootParams: undefined,
2757
+ fallbackRouteParams: undefined,
2758
+ dataRouteRegex: (0, _loadcustomroutes.normalizeRouteRegex)((0, _routeregex.getNamedRouteRegex)(dataRoute, {
2759
+ prefixRouteKeys: true,
2760
+ includeSuffix: true,
2761
+ excludeOptionalTrailingSlash: true
2762
+ }).re.source),
2763
+ // Pages does not have a prefetch data route.
2764
+ prefetchDataRoute: undefined,
2765
+ prefetchDataRouteRegex: undefined,
2766
+ allowHeader: ALLOWED_HEADERS
2767
+ };
2768
+ });
2769
+ _buildcontext.NextBuildContext.previewModeId = previewProps.previewModeId;
2770
+ _buildcontext.NextBuildContext.fetchCacheKeyPrefix = config.experimental.fetchCacheKeyPrefix;
2771
+ _buildcontext.NextBuildContext.allowedRevalidateHeaderKeys = config.experimental.allowedRevalidateHeaderKeys;
2772
+ // Defensive sweep: static metadata files should never end up in
2773
+ // `dynamicRoutes` because they are rewritten to the `-`-placeholder
2774
+ // pathname and added to `routes` above. If anything upstream
2775
+ // (e.g. a code path that calls `addDynamicRoute` directly) still
2776
+ // registers a bracketed entry like `/[id]/apple-icon.png` here, the
2777
+ // adapter would later look for a parent app output that doesn't
2778
+ // exist and throw an invariant error. Strip those entries before the
2779
+ // manifest is written.
2780
+ for (const route of Object.keys(prerenderManifest.dynamicRoutes)){
2781
+ if ((0, _ismetadataroute.isStaticMetadataFile)(route)) {
2782
+ delete prerenderManifest.dynamicRoutes[route];
2783
+ }
2784
+ }
2785
+ await writePrerenderManifest(distDir, prerenderManifest);
2786
+ await writeManifest(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, _constants1.PREFETCH_HINTS), prefetchHints);
2787
+ await writeClientSsgManifest(prerenderManifest, {
2788
+ distDir,
2789
+ buildId,
2790
+ locales: (_config_i18n = config.i18n) == null ? void 0 : _config_i18n.locales
2791
+ });
2792
+ } else {
2793
+ await writePrerenderManifest(distDir, {
2794
+ version: 4,
2795
+ routes: {},
2796
+ dynamicRoutes: {},
2797
+ notFoundRoutes: [],
2798
+ preview: previewProps
2799
+ });
2800
+ }
2801
+ await writeManifest(_path.default.join(distDir, 'server', _constants1.PREVIEW_PROPS_MANIFEST), previewProps);
2802
+ // #endregion
2803
+ await writeImagesManifest(distDir, config);
2804
+ await writeManifest(_path.default.join(distDir, _constants1.EXPORT_MARKER), {
2805
+ version: 1,
2806
+ hasExportPathMap: typeof config.exportPathMap === 'function',
2807
+ exportTrailingSlash: config.trailingSlash === true,
2808
+ isNextImageImported: isNextImageImported === true
2809
+ });
2810
+ await _fs.promises.unlink(_path.default.join(distDir, _constants1.EXPORT_DETAIL)).catch((err)=>{
2811
+ if (err.code === 'ENOENT') {
2812
+ return Promise.resolve();
2813
+ }
2814
+ return Promise.reject(err);
2815
+ });
2816
+ if (Boolean(config.experimental.nextScriptWorkers)) {
2817
+ await nextBuildSpan.traceChild('verify-partytown-setup').traceAsyncFn(async ()=>{
2818
+ await (0, _verifypartytownsetup.verifyPartytownSetup)(dir, _path.default.join(distDir, _constants1.CLIENT_STATIC_FILES_PATH));
2819
+ });
2820
+ }
2821
+ await buildTracesPromise;
2822
+ if (buildTracesStart) {
2823
+ (0, _spinner.finishSpinner)(buildTracesSpinner, `Collecting build traces in ${(0, _durationtostring.hrtimeDurationToString)(process.hrtime(buildTracesStart))}`);
2824
+ buildTracesSpinner = undefined;
2825
+ }
2826
+ if (proxyFilePath && bundler !== _bundler.Bundler.Turbopack) {
2827
+ await _fs.promises.rename(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'proxy.js'), _path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'middleware.js'));
2828
+ await _fs.promises.rename(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'proxy.js.nft.json'), _path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'middleware.js.nft.json'));
2829
+ const middlewareNft = JSON.parse(await _fs.promises.readFile(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'middleware.js.nft.json'), 'utf8'));
2830
+ // When Proxy self-reference itself e.g. __filename, it is traced to
2831
+ // the NFT file. However, since we rename 'proxy.js' to 'middleware.js',
2832
+ // the files in NFT will differ from the actual outputs, which will fail
2833
+ // for the providers like Vercel that uses NFT. Therefore also rename
2834
+ // the 'proxy.js' to 'middleware.js' in the NFT file.
2835
+ let hasProxyJsInNft = false;
2836
+ middlewareNft.files = middlewareNft.files.map((file)=>{
2837
+ if (file === 'proxy.js') {
2838
+ hasProxyJsInNft = true;
2839
+ return 'middleware.js';
2840
+ }
2841
+ return file;
2842
+ });
2843
+ if (hasProxyJsInNft) {
2844
+ await _fs.promises.writeFile(_path.default.join(distDir, _constants1.SERVER_DIRECTORY, 'middleware.js.nft.json'), JSON.stringify(middlewareNft));
2845
+ }
2846
+ }
2847
+ if (isCompileMode) {
2848
+ _log.info(`Build ran with "compile" mode, to finalize the build run either "generate" or "generate-env" mode as well`);
2849
+ }
2850
+ if (config.output === 'export') {
2851
+ // TODO: When writeFullyStaticExport doesn't fail when staticWorker is passed moved this after writeFullyStaticExport.
2852
+ // End the worker here when it's output: export.
2853
+ staticWorker.end();
2854
+ staticWorker = undefined // Reset staticWorker to make sure it does not end in `finally`
2855
+ ;
2856
+ await nextBuildSpan.traceChild('output-export-full-static-export').traceAsyncFn(async ()=>{
2857
+ await writeFullyStaticExport(config, dir, enabledDirectories, configOutDir, nextBuildSpan, appDirOnly, bundler);
2858
+ });
2859
+ }
2860
+ // This should come after output: export handling but before
2861
+ // output: standalone, in the future output: standalone might
2862
+ // not be allowed if an adapter with onBuildComplete is configured
2863
+ const adapterPath = config.adapterPath;
2864
+ if (adapterPath) {
2865
+ await nextBuildSpan.traceChild('adapter-handle-build-complete').traceAsyncFn(async ()=>{
2866
+ await (0, _buildcomplete.handleBuildComplete)({
2867
+ dir,
2868
+ distDir,
2869
+ config,
2870
+ appType,
2871
+ buildId,
2872
+ bundler,
2873
+ configOutDir: _path.default.join(dir, configOutDir),
2874
+ staticPages,
2875
+ serverPropsPages,
2876
+ nextVersion: "16.4.2",
2877
+ repoRoot: config.repoRoot,
2878
+ outputFileTracingRoot,
2879
+ hasNodeMiddleware,
2880
+ hasInstrumentationHook,
2881
+ previewProps,
2882
+ adapterPath,
2883
+ pageKeys: pageKeys.pages,
2884
+ appPageKeys: emittedAppPageKeys,
2885
+ routesManifest,
2886
+ prerenderManifest,
2887
+ middlewareManifest,
2888
+ functionsConfigManifest,
2889
+ hasStatic404: useStaticPages404,
2890
+ hasStatic500: useDefaultStatic500,
2891
+ requiredServerFiles: requiredServerFilesManifest.files
2892
+ });
2893
+ });
2894
+ }
2895
+ if (config.output === 'standalone') {
2896
+ await nextBuildSpan.traceChild('output-standalone').traceAsyncFn(async ()=>{
2897
+ await writeStandaloneDirectory(nextBuildSpan, distDir, pageKeys, emittedAppPageKeys, outputFileTracingRoot, requiredServerFilesManifest, middlewareManifest, hasNodeMiddleware, hasInstrumentationHook, staticPages, loadedEnvFiles, appDir);
2898
+ });
2899
+ }
2900
+ (0, _spinner.finishSpinner)(postBuildSpinner, `Finalizing page optimization in ${(0, _durationtostring.hrtimeDurationToString)(process.hrtime(finalizingPageOptimizationStart))}`);
2901
+ console.log();
2902
+ if (debugOutput) {
2903
+ nextBuildSpan.traceChild('print-custom-routes').traceFn(()=>(0, _utils1.printCustomRoutes)({
2904
+ redirects,
2905
+ onMatchHeaders,
2906
+ rewrites,
2907
+ headers
2908
+ }));
2909
+ }
2910
+ await nextBuildSpan.traceChild('print-tree-view').traceAsyncFn(()=>(0, _utils1.printTreeView)(pageKeys, pageInfos, {
2911
+ pagesDir,
2912
+ useStaticPages404,
2913
+ pageExtensions: config.pageExtensions,
2914
+ buildManifest,
2915
+ middlewareManifest,
2916
+ functionsConfigManifest,
2917
+ hasGSPAndRevalidateZero
2918
+ }));
2919
+ if (process.env.NEXT_PRIVATE_DEBUG_PARAM_MATCHING) {
2920
+ (0, _utils1.printPrerenderMatchers)(prerenderManifest, routesManifest.dynamicRoutes);
2921
+ }
2922
+ if (bundler === _bundler.Bundler.Turbopack) {
2923
+ await nextBuildSpan.traceChild('write-route-bundle-stats').traceAsyncFn(()=>(0, _routebundlestats.writeRouteBundleStats)(pageKeys, buildManifest, distDir, dir));
2924
+ }
2925
+ await nextBuildSpan.traceChild('telemetry-flush').traceAsyncFn(()=>telemetry.flush());
2926
+ await shutdownPromise;
2927
+ if (_buildcontext.NextBuildContext.analyze) {
2928
+ const analyzeDir = _path.default.join(distDir, 'diagnostics/analyze');
2929
+ await (0, _promises.cp)(_path.default.join(__dirname, '../bundle-analyzer'), analyzeDir, {
2930
+ recursive: true
2931
+ });
2932
+ await (0, _promises.mkdir)(_path.default.join(analyzeDir, 'data'), {
2933
+ recursive: true
2934
+ });
2935
+ // Write an index of routes for the route picker
2936
+ const routes = Array.from(new Set(routesManifest.dynamicRoutes.map((r)=>r.page).concat(routesManifest.staticRoutes.map((r)=>r.page))));
2937
+ await (0, _promises.writeFile)(_path.default.join(analyzeDir, 'data/routes.json'), JSON.stringify(routes, null, 2));
2938
+ // Capture this build alongside any prior builds so the analyzer UI
2939
+ // can offer it as a comparison baseline in the future.
2940
+ (0, _snapshot.writeAnalyzeSnapshot)({
2941
+ projectDir: dir,
2942
+ analyzeDir,
2943
+ routes,
2944
+ appDirOnly,
2945
+ noMangling: _buildcontext.NextBuildContext.noMangling ?? false
2946
+ });
2947
+ }
2948
+ await pendingUpgradeNudge;
2949
+ });
2950
+ } catch (e) {
2951
+ // A build can fail before the success path awaits this check. Surface an
2952
+ // independent nudge failure so its retry receipt never hides the full
2953
+ // reminder on the next build.
2954
+ if (pendingUpgradeNudge) {
2955
+ try {
2956
+ await pendingUpgradeNudge;
2957
+ } catch (nudgeError) {
2958
+ if (nudgeError !== e) {
2959
+ _log.error(nudgeError instanceof Error ? nudgeError.message : String(nudgeError));
2960
+ }
2961
+ }
2962
+ }
2963
+ const telemetry = _shared.traceGlobals.get('telemetry');
2964
+ if (telemetry) {
2965
+ telemetry.record((0, _events.eventBuildFailed)({
2966
+ bundler: getBundlerForTelemetry(bundler),
2967
+ errorCode: getErrorCodeForTelemetry(e),
2968
+ durationInSeconds: Math.floor((Date.now() - buildStartTime) / 1000)
2969
+ }));
2970
+ }
2971
+ throw e;
2972
+ } finally{
2973
+ // @ts-expect-error Existence of staticWorker is checked here intentionally.
2974
+ if (staticWorker) {
2975
+ staticWorker.end();
2976
+ }
2977
+ // Ensure we wait for lockfile patching if present
2978
+ await _swc.lockfilePatchPromise.cur;
2979
+ // Backstop for builds that never reach the post-static-generation flush.
2980
+ flushTurbopackWarnings();
2981
+ // Flush telemetry before finishing (waits for async operations like setTimeout in debug mode)
2982
+ const telemetry = _shared.traceGlobals.get('telemetry');
2983
+ if (telemetry) {
2984
+ await telemetry.flush();
2985
+ }
2986
+ // Ensure all buffered spans are on disk before `uploadTrace` reads the file.
2987
+ (0, _trace.flushAllTraces)();
2988
+ (0, _swc.teardownTraceSubscriber)();
2989
+ if (traceUploadUrl && loadedConfig) {
2990
+ (0, _uploadtrace.default)({
2991
+ traceUploadUrl,
2992
+ mode: 'build',
2993
+ projectDir: dir,
2994
+ distDir: (0, _utils2.getBuildDistDir)(loadedConfig),
2995
+ isTurboSession: bundler === _bundler.Bundler.Turbopack,
2996
+ sync: true
2997
+ });
2998
+ }
2999
+ }
3000
+ }
3001
+ function errorFromUnsupportedSegmentConfig() {
3002
+ _log.error(`Invalid segment configuration export detected. This can cause unexpected behavior from the configs not being applied. You should see the relevant failures in the logs above. Please fix them to continue.`);
3003
+ process.exit(1);
3004
+ }
3005
+ function getBundlerForTelemetry(bundler) {
3006
+ switch(bundler){
3007
+ case _bundler.Bundler.Turbopack:
3008
+ return 'turbopack';
3009
+ case _bundler.Bundler.Rspack:
3010
+ return 'rspack';
3011
+ case _bundler.Bundler.Webpack:
3012
+ return 'webpack';
3013
+ default:
3014
+ throw new Error(`unknown bundler: ${bundler}`);
3015
+ }
3016
+ }
3017
+ function getErrorCodeForTelemetry(err) {
3018
+ if (err instanceof Error && 'code' in err && typeof err.code === 'string') {
3019
+ return err.code;
3020
+ }
3021
+ if (err instanceof Error) {
3022
+ return err.name;
3023
+ }
3024
+ return 'Unknown';
3025
+ }
3026
+
3027
+ //# sourceMappingURL=index.js.map