@betterinternship/components 2.3.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_commonjsHelpers.js.map +1 -0
  3. package/dist/_virtual/_interop_require_default.js +4 -0
  4. package/dist/_virtual/_interop_require_default.js.map +1 -0
  5. package/dist/_virtual/_interop_require_wildcard.js +4 -0
  6. package/dist/_virtual/_interop_require_wildcard.js.map +1 -0
  7. package/dist/_virtual/action-async-storage-instance.js +4 -0
  8. package/dist/_virtual/action-async-storage-instance.js.map +1 -0
  9. package/dist/_virtual/action-async-storage.external.js +4 -0
  10. package/dist/_virtual/action-async-storage.external.js.map +1 -0
  11. package/dist/_virtual/action-revalidation-kind.js +4 -0
  12. package/dist/_virtual/action-revalidation-kind.js.map +1 -0
  13. package/dist/_virtual/add-base-path.js +4 -0
  14. package/dist/_virtual/add-base-path.js.map +1 -0
  15. package/dist/_virtual/add-locale.js +4 -0
  16. package/dist/_virtual/add-locale.js.map +1 -0
  17. package/dist/_virtual/add-locale2.js +4 -0
  18. package/dist/_virtual/add-locale2.js.map +1 -0
  19. package/dist/_virtual/add-path-prefix.js +4 -0
  20. package/dist/_virtual/add-path-prefix.js.map +1 -0
  21. package/dist/_virtual/app-paths.js +4 -0
  22. package/dist/_virtual/app-paths.js.map +1 -0
  23. package/dist/_virtual/app-router-context.shared-runtime.js +4 -0
  24. package/dist/_virtual/app-router-context.shared-runtime.js.map +1 -0
  25. package/dist/_virtual/app.js +4 -0
  26. package/dist/_virtual/app.js.map +1 -0
  27. package/dist/_virtual/async-local-storage.js +4 -0
  28. package/dist/_virtual/async-local-storage.js.map +1 -0
  29. package/dist/_virtual/bailout-to-csr.js +4 -0
  30. package/dist/_virtual/bailout-to-csr.js.map +1 -0
  31. package/dist/_virtual/blocking-route-messages.js +4 -0
  32. package/dist/_virtual/blocking-route-messages.js.map +1 -0
  33. package/dist/_virtual/boundary-constants.js +4 -0
  34. package/dist/_virtual/boundary-constants.js.map +1 -0
  35. package/dist/_virtual/boundary-constants2.js +4 -0
  36. package/dist/_virtual/boundary-constants2.js.map +1 -0
  37. package/dist/_virtual/boundary-tracking.js +4 -0
  38. package/dist/_virtual/boundary-tracking.js.map +1 -0
  39. package/dist/_virtual/constants.js +4 -0
  40. package/dist/_virtual/constants.js.map +1 -0
  41. package/dist/_virtual/cookies.js +4 -0
  42. package/dist/_virtual/cookies.js.map +1 -0
  43. package/dist/_virtual/deployment-id.js +4 -0
  44. package/dist/_virtual/deployment-id.js.map +1 -0
  45. package/dist/_virtual/detect-domain-locale.js +4 -0
  46. package/dist/_virtual/detect-domain-locale.js.map +1 -0
  47. package/dist/_virtual/detect-domain-locale2.js +4 -0
  48. package/dist/_virtual/detect-domain-locale2.js.map +1 -0
  49. package/dist/_virtual/dynamic-rendering-utils.js +4 -0
  50. package/dist/_virtual/dynamic-rendering-utils.js.map +1 -0
  51. package/dist/_virtual/dynamic-rendering.js +4 -0
  52. package/dist/_virtual/dynamic-rendering.js.map +1 -0
  53. package/dist/_virtual/ensure-leading-slash.js +4 -0
  54. package/dist/_virtual/ensure-leading-slash.js.map +1 -0
  55. package/dist/_virtual/error-once.js +4 -0
  56. package/dist/_virtual/error-once.js.map +1 -0
  57. package/dist/_virtual/escape-regexp.js +4 -0
  58. package/dist/_virtual/escape-regexp.js.map +1 -0
  59. package/dist/_virtual/find-closest-quality.js +4 -0
  60. package/dist/_virtual/find-closest-quality.js.map +1 -0
  61. package/dist/_virtual/forbidden.js +4 -0
  62. package/dist/_virtual/forbidden.js.map +1 -0
  63. package/dist/_virtual/format-url.js +4 -0
  64. package/dist/_virtual/format-url.js.map +1 -0
  65. package/dist/_virtual/get-domain-locale.js +4 -0
  66. package/dist/_virtual/get-domain-locale.js.map +1 -0
  67. package/dist/_virtual/get-dynamic-param.js +4 -0
  68. package/dist/_virtual/get-dynamic-param.js.map +1 -0
  69. package/dist/_virtual/get-img-props.js +4 -0
  70. package/dist/_virtual/get-img-props.js.map +1 -0
  71. package/dist/_virtual/get-segment-param.js +4 -0
  72. package/dist/_virtual/get-segment-param.js.map +1 -0
  73. package/dist/_virtual/has-base-path.js +4 -0
  74. package/dist/_virtual/has-base-path.js.map +1 -0
  75. package/dist/_virtual/head-manager-context.shared-runtime.js +4 -0
  76. package/dist/_virtual/head-manager-context.shared-runtime.js.map +1 -0
  77. package/dist/_virtual/head.js +4 -0
  78. package/dist/_virtual/head.js.map +1 -0
  79. package/dist/_virtual/headers.js +4 -0
  80. package/dist/_virtual/headers.js.map +1 -0
  81. package/dist/_virtual/hooks-client-context.shared-runtime.js +4 -0
  82. package/dist/_virtual/hooks-client-context.shared-runtime.js.map +1 -0
  83. package/dist/_virtual/hooks-server-context.js +4 -0
  84. package/dist/_virtual/hooks-server-context.js.map +1 -0
  85. package/dist/_virtual/http-access-fallback.js +4 -0
  86. package/dist/_virtual/http-access-fallback.js.map +1 -0
  87. package/dist/_virtual/image-blur-svg.js +4 -0
  88. package/dist/_virtual/image-blur-svg.js.map +1 -0
  89. package/dist/_virtual/image-component.js +4 -0
  90. package/dist/_virtual/image-component.js.map +1 -0
  91. package/dist/_virtual/image-config-context.shared-runtime.js +4 -0
  92. package/dist/_virtual/image-config-context.shared-runtime.js.map +1 -0
  93. package/dist/_virtual/image-config.js +4 -0
  94. package/dist/_virtual/image-config.js.map +1 -0
  95. package/dist/_virtual/image-external.js +4 -0
  96. package/dist/_virtual/image-external.js.map +1 -0
  97. package/dist/_virtual/image-loader.js +4 -0
  98. package/dist/_virtual/image-loader.js.map +1 -0
  99. package/dist/_virtual/image.js +8 -0
  100. package/dist/_virtual/image.js.map +1 -0
  101. package/dist/_virtual/index.js +4 -0
  102. package/dist/_virtual/index.js.map +1 -0
  103. package/dist/_virtual/index2.js +4 -0
  104. package/dist/_virtual/index2.js.map +1 -0
  105. package/dist/_virtual/index3.js +4 -0
  106. package/dist/_virtual/index3.js.map +1 -0
  107. package/dist/_virtual/instant-messages.js +4 -0
  108. package/dist/_virtual/instant-messages.js.map +1 -0
  109. package/dist/_virtual/instant-samples.js +4 -0
  110. package/dist/_virtual/instant-samples.js.map +1 -0
  111. package/dist/_virtual/instant-samples2.js +4 -0
  112. package/dist/_virtual/instant-samples2.js.map +1 -0
  113. package/dist/_virtual/instant-validation-error.js +4 -0
  114. package/dist/_virtual/instant-validation-error.js.map +1 -0
  115. package/dist/_virtual/interception-prefix-from-param-type.js +4 -0
  116. package/dist/_virtual/interception-prefix-from-param-type.js.map +1 -0
  117. package/dist/_virtual/interception-routes.js +4 -0
  118. package/dist/_virtual/interception-routes.js.map +1 -0
  119. package/dist/_virtual/interpolate-as.js +4 -0
  120. package/dist/_virtual/interpolate-as.js.map +1 -0
  121. package/dist/_virtual/invariant-error.js +4 -0
  122. package/dist/_virtual/invariant-error.js.map +1 -0
  123. package/dist/_virtual/is-dynamic.js +4 -0
  124. package/dist/_virtual/is-dynamic.js.map +1 -0
  125. package/dist/_virtual/is-local-url.js +4 -0
  126. package/dist/_virtual/is-local-url.js.map +1 -0
  127. package/dist/_virtual/is-next-router-error.js +4 -0
  128. package/dist/_virtual/is-next-router-error.js.map +1 -0
  129. package/dist/_virtual/is-postpone.js +4 -0
  130. package/dist/_virtual/is-postpone.js.map +1 -0
  131. package/dist/_virtual/link.js +8 -0
  132. package/dist/_virtual/link.js.map +1 -0
  133. package/dist/_virtual/link2.js +4 -0
  134. package/dist/_virtual/link2.js.map +1 -0
  135. package/dist/_virtual/match-local-pattern.js +4 -0
  136. package/dist/_virtual/match-local-pattern.js.map +1 -0
  137. package/dist/_virtual/match-remote-pattern.js +4 -0
  138. package/dist/_virtual/match-remote-pattern.js.map +1 -0
  139. package/dist/_virtual/navigation-dynamic-rendering.js +4 -0
  140. package/dist/_virtual/navigation-dynamic-rendering.js.map +1 -0
  141. package/dist/_virtual/navigation.js +6 -0
  142. package/dist/_virtual/navigation.js.map +1 -0
  143. package/dist/_virtual/navigation.react-server.js +4 -0
  144. package/dist/_virtual/navigation.react-server.js.map +1 -0
  145. package/dist/_virtual/navigation2.js +4 -0
  146. package/dist/_virtual/navigation2.js.map +1 -0
  147. package/dist/_virtual/normalize-locale-path.js +4 -0
  148. package/dist/_virtual/normalize-locale-path.js.map +1 -0
  149. package/dist/_virtual/normalize-locale-path2.js +4 -0
  150. package/dist/_virtual/normalize-locale-path2.js.map +1 -0
  151. package/dist/_virtual/normalize-trailing-slash.js +4 -0
  152. package/dist/_virtual/normalize-trailing-slash.js.map +1 -0
  153. package/dist/_virtual/not-found.js +4 -0
  154. package/dist/_virtual/not-found.js.map +1 -0
  155. package/dist/_virtual/omit.js +4 -0
  156. package/dist/_virtual/omit.js.map +1 -0
  157. package/dist/_virtual/parse-loader-tree.js +4 -0
  158. package/dist/_virtual/parse-loader-tree.js.map +1 -0
  159. package/dist/_virtual/parse-path.js +4 -0
  160. package/dist/_virtual/parse-path.js.map +1 -0
  161. package/dist/_virtual/parse-relative-url.js +4 -0
  162. package/dist/_virtual/parse-relative-url.js.map +1 -0
  163. package/dist/_virtual/path-has-prefix.js +4 -0
  164. package/dist/_virtual/path-has-prefix.js.map +1 -0
  165. package/dist/_virtual/promise-with-resolvers.js +4 -0
  166. package/dist/_virtual/promise-with-resolvers.js.map +1 -0
  167. package/dist/_virtual/querystring.js +4 -0
  168. package/dist/_virtual/querystring.js.map +1 -0
  169. package/dist/_virtual/readonly-url-search-params.js +4 -0
  170. package/dist/_virtual/readonly-url-search-params.js.map +1 -0
  171. package/dist/_virtual/redirect-error.js +4 -0
  172. package/dist/_virtual/redirect-error.js.map +1 -0
  173. package/dist/_virtual/redirect-status-code.js +4 -0
  174. package/dist/_virtual/redirect-status-code.js.map +1 -0
  175. package/dist/_virtual/redirect.js +4 -0
  176. package/dist/_virtual/redirect.js.map +1 -0
  177. package/dist/_virtual/reflect-utils.js +4 -0
  178. package/dist/_virtual/reflect-utils.js.map +1 -0
  179. package/dist/_virtual/reflect.js +4 -0
  180. package/dist/_virtual/reflect.js.map +1 -0
  181. package/dist/_virtual/remove-trailing-slash.js +4 -0
  182. package/dist/_virtual/remove-trailing-slash.js.map +1 -0
  183. package/dist/_virtual/request-cookies.js +4 -0
  184. package/dist/_virtual/request-cookies.js.map +1 -0
  185. package/dist/_virtual/request-idle-callback.js +4 -0
  186. package/dist/_virtual/request-idle-callback.js.map +1 -0
  187. package/dist/_virtual/resolve-href.js +4 -0
  188. package/dist/_virtual/resolve-href.js.map +1 -0
  189. package/dist/_virtual/resolve-param-value.js +4 -0
  190. package/dist/_virtual/resolve-param-value.js.map +1 -0
  191. package/dist/_virtual/route-match-utils.js +4 -0
  192. package/dist/_virtual/route-match-utils.js.map +1 -0
  193. package/dist/_virtual/route-matcher.js +4 -0
  194. package/dist/_virtual/route-matcher.js.map +1 -0
  195. package/dist/_virtual/route-pattern-normalizer.js +4 -0
  196. package/dist/_virtual/route-pattern-normalizer.js.map +1 -0
  197. package/dist/_virtual/route-regex.js +4 -0
  198. package/dist/_virtual/route-regex.js.map +1 -0
  199. package/dist/_virtual/router-context.shared-runtime.js +4 -0
  200. package/dist/_virtual/router-context.shared-runtime.js.map +1 -0
  201. package/dist/_virtual/runtime-reacts.external.js +4 -0
  202. package/dist/_virtual/runtime-reacts.external.js.map +1 -0
  203. package/dist/_virtual/scheduler.js +4 -0
  204. package/dist/_virtual/scheduler.js.map +1 -0
  205. package/dist/_virtual/segment.js +4 -0
  206. package/dist/_virtual/segment.js.map +1 -0
  207. package/dist/_virtual/server-async-storage.js +4 -0
  208. package/dist/_virtual/server-async-storage.js.map +1 -0
  209. package/dist/_virtual/server-inserted-html.shared-runtime.js +4 -0
  210. package/dist/_virtual/server-inserted-html.shared-runtime.js.map +1 -0
  211. package/dist/_virtual/side-effect.js +4 -0
  212. package/dist/_virtual/side-effect.js.map +1 -0
  213. package/dist/_virtual/sorted-routes.js +4 -0
  214. package/dist/_virtual/sorted-routes.js.map +1 -0
  215. package/dist/_virtual/staged-rendering.js +4 -0
  216. package/dist/_virtual/staged-rendering.js.map +1 -0
  217. package/dist/_virtual/static-generation-bailout.js +4 -0
  218. package/dist/_virtual/static-generation-bailout.js.map +1 -0
  219. package/dist/_virtual/unauthorized.js +4 -0
  220. package/dist/_virtual/unauthorized.js.map +1 -0
  221. package/dist/_virtual/unrecognized-action-error.js +4 -0
  222. package/dist/_virtual/unrecognized-action-error.js.map +1 -0
  223. package/dist/_virtual/unstable-rethrow.js +4 -0
  224. package/dist/_virtual/unstable-rethrow.js.map +1 -0
  225. package/dist/_virtual/use-intersection.js +4 -0
  226. package/dist/_virtual/use-intersection.js.map +1 -0
  227. package/dist/_virtual/use-merged-ref.js +4 -0
  228. package/dist/_virtual/use-merged-ref.js.map +1 -0
  229. package/dist/_virtual/utils.js +4 -0
  230. package/dist/_virtual/utils.js.map +1 -0
  231. package/dist/_virtual/warn-once.js +4 -0
  232. package/dist/_virtual/warn-once.js.map +1 -0
  233. package/dist/_virtual/work-async-storage-instance.js +4 -0
  234. package/dist/_virtual/work-async-storage-instance.js.map +1 -0
  235. package/dist/_virtual/work-async-storage.external.js +4 -0
  236. package/dist/_virtual/work-async-storage.external.js.map +1 -0
  237. package/dist/_virtual/work-unit-async-storage-instance.js +4 -0
  238. package/dist/_virtual/work-unit-async-storage-instance.js.map +1 -0
  239. package/dist/_virtual/work-unit-async-storage.external.js +4 -0
  240. package/dist/_virtual/work-unit-async-storage.external.js.map +1 -0
  241. package/dist/components/ui/app-header.js +72 -0
  242. package/dist/components/ui/app-header.js.map +1 -0
  243. package/dist/components/ui/dropdown-menu.js +61 -0
  244. package/dist/components/ui/dropdown-menu.js.map +1 -0
  245. package/dist/components/ui/page-header.js +17 -0
  246. package/dist/components/ui/page-header.js.map +1 -0
  247. package/dist/components/ui/status-notice.d.ts +14 -0
  248. package/dist/components/ui/status-notice.js +27 -0
  249. package/dist/components/ui/status-notice.js.map +1 -0
  250. package/dist/index.d.ts +4 -0
  251. package/dist/index.js +4 -0
  252. package/dist/index.js.map +1 -1
  253. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +17 -0
  254. package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js.map +1 -0
  255. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +49 -0
  256. package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js.map +1 -0
  257. package/dist/node_modules/next/dist/client/add-base-path.js +39 -0
  258. package/dist/node_modules/next/dist/client/add-base-path.js.map +1 -0
  259. package/dist/node_modules/next/dist/client/add-locale.js +40 -0
  260. package/dist/node_modules/next/dist/client/add-locale.js.map +1 -0
  261. package/dist/node_modules/next/dist/client/components/forbidden.js +62 -0
  262. package/dist/node_modules/next/dist/client/components/forbidden.js.map +1 -0
  263. package/dist/node_modules/next/dist/client/components/hooks-server-context.js +51 -0
  264. package/dist/node_modules/next/dist/client/components/hooks-server-context.js.map +1 -0
  265. package/dist/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js +78 -0
  266. package/dist/node_modules/next/dist/client/components/http-access-fallback/http-access-fallback.js.map +1 -0
  267. package/dist/node_modules/next/dist/client/components/instant-samples.js +107 -0
  268. package/dist/node_modules/next/dist/client/components/instant-samples.js.map +1 -0
  269. package/dist/node_modules/next/dist/client/components/is-next-router-error.js +38 -0
  270. package/dist/node_modules/next/dist/client/components/is-next-router-error.js.map +1 -0
  271. package/dist/node_modules/next/dist/client/components/navigation-dynamic-rendering.js +41 -0
  272. package/dist/node_modules/next/dist/client/components/navigation-dynamic-rendering.js.map +1 -0
  273. package/dist/node_modules/next/dist/client/components/navigation.js +250 -0
  274. package/dist/node_modules/next/dist/client/components/navigation.js.map +1 -0
  275. package/dist/node_modules/next/dist/client/components/navigation.react-server.js +83 -0
  276. package/dist/node_modules/next/dist/client/components/navigation.react-server.js.map +1 -0
  277. package/dist/node_modules/next/dist/client/components/not-found.js +56 -0
  278. package/dist/node_modules/next/dist/client/components/not-found.js.map +1 -0
  279. package/dist/node_modules/next/dist/client/components/readonly-url-search-params.js +61 -0
  280. package/dist/node_modules/next/dist/client/components/readonly-url-search-params.js.map +1 -0
  281. package/dist/node_modules/next/dist/client/components/redirect-error.js +53 -0
  282. package/dist/node_modules/next/dist/client/components/redirect-error.js.map +1 -0
  283. package/dist/node_modules/next/dist/client/components/redirect-status-code.js +37 -0
  284. package/dist/node_modules/next/dist/client/components/redirect-status-code.js.map +1 -0
  285. package/dist/node_modules/next/dist/client/components/redirect.js +99 -0
  286. package/dist/node_modules/next/dist/client/components/redirect.js.map +1 -0
  287. package/dist/node_modules/next/dist/client/components/server-async-storage.js +48 -0
  288. package/dist/node_modules/next/dist/client/components/server-async-storage.js.map +1 -0
  289. package/dist/node_modules/next/dist/client/components/static-generation-bailout.js +51 -0
  290. package/dist/node_modules/next/dist/client/components/static-generation-bailout.js.map +1 -0
  291. package/dist/node_modules/next/dist/client/components/unauthorized.js +63 -0
  292. package/dist/node_modules/next/dist/client/components/unauthorized.js.map +1 -0
  293. package/dist/node_modules/next/dist/client/components/unrecognized-action-error.js +48 -0
  294. package/dist/node_modules/next/dist/client/components/unrecognized-action-error.js.map +1 -0
  295. package/dist/node_modules/next/dist/client/components/unstable-rethrow.js +51 -0
  296. package/dist/node_modules/next/dist/client/components/unstable-rethrow.js.map +1 -0
  297. package/dist/node_modules/next/dist/client/detect-domain-locale.js +37 -0
  298. package/dist/node_modules/next/dist/client/detect-domain-locale.js.map +1 -0
  299. package/dist/node_modules/next/dist/client/get-domain-locale.js +52 -0
  300. package/dist/node_modules/next/dist/client/get-domain-locale.js.map +1 -0
  301. package/dist/node_modules/next/dist/client/has-base-path.js +37 -0
  302. package/dist/node_modules/next/dist/client/has-base-path.js.map +1 -0
  303. package/dist/node_modules/next/dist/client/image-component.js +351 -0
  304. package/dist/node_modules/next/dist/client/image-component.js.map +1 -0
  305. package/dist/node_modules/next/dist/client/link.js +471 -0
  306. package/dist/node_modules/next/dist/client/link.js.map +1 -0
  307. package/dist/node_modules/next/dist/client/normalize-locale-path.js +41 -0
  308. package/dist/node_modules/next/dist/client/normalize-locale-path.js.map +1 -0
  309. package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +52 -0
  310. package/dist/node_modules/next/dist/client/normalize-trailing-slash.js.map +1 -0
  311. package/dist/node_modules/next/dist/client/request-idle-callback.js +53 -0
  312. package/dist/node_modules/next/dist/client/request-idle-callback.js.map +1 -0
  313. package/dist/node_modules/next/dist/client/resolve-href.js +129 -0
  314. package/dist/node_modules/next/dist/client/resolve-href.js.map +1 -0
  315. package/dist/node_modules/next/dist/client/use-intersection.js +129 -0
  316. package/dist/node_modules/next/dist/client/use-intersection.js.map +1 -0
  317. package/dist/node_modules/next/dist/client/use-merged-ref.js +83 -0
  318. package/dist/node_modules/next/dist/client/use-merged-ref.js.map +1 -0
  319. package/dist/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js +341 -0
  320. package/dist/node_modules/next/dist/compiled/@edge-runtime/cookies/index.js.map +1 -0
  321. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +13 -0
  322. package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js.map +1 -0
  323. package/dist/node_modules/next/dist/compiled/picomatch/index.js +13 -0
  324. package/dist/node_modules/next/dist/compiled/picomatch/index.js.map +1 -0
  325. package/dist/node_modules/next/dist/lib/constants.js +370 -0
  326. package/dist/node_modules/next/dist/lib/constants.js.map +1 -0
  327. package/dist/node_modules/next/dist/lib/framework/boundary-constants.js +43 -0
  328. package/dist/node_modules/next/dist/lib/framework/boundary-constants.js.map +1 -0
  329. package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +112 -0
  330. package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js.map +1 -0
  331. package/dist/node_modules/next/dist/lib/scheduler.js +71 -0
  332. package/dist/node_modules/next/dist/lib/scheduler.js.map +1 -0
  333. package/dist/node_modules/next/dist/server/app-render/action-async-storage-instance.js +28 -0
  334. package/dist/node_modules/next/dist/server/app-render/action-async-storage-instance.js.map +1 -0
  335. package/dist/node_modules/next/dist/server/app-render/action-async-storage.external.js +27 -0
  336. package/dist/node_modules/next/dist/server/app-render/action-async-storage.external.js.map +1 -0
  337. package/dist/node_modules/next/dist/server/app-render/async-local-storage.js +84 -0
  338. package/dist/node_modules/next/dist/server/app-render/async-local-storage.js.map +1 -0
  339. package/dist/node_modules/next/dist/server/app-render/blocking-route-messages.js +177 -0
  340. package/dist/node_modules/next/dist/server/app-render/blocking-route-messages.js.map +1 -0
  341. package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js +1168 -0
  342. package/dist/node_modules/next/dist/server/app-render/dynamic-rendering.js.map +1 -0
  343. package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js +39 -0
  344. package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-constants.js.map +1 -0
  345. package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +47 -0
  346. package/dist/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js.map +1 -0
  347. package/dist/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +427 -0
  348. package/dist/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js.map +1 -0
  349. package/dist/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js +42 -0
  350. package/dist/node_modules/next/dist/server/app-render/instant-validation/instant-validation-error.js.map +1 -0
  351. package/dist/node_modules/next/dist/server/app-render/staged-rendering.js +331 -0
  352. package/dist/node_modules/next/dist/server/app-render/staged-rendering.js.map +1 -0
  353. package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js +28 -0
  354. package/dist/node_modules/next/dist/server/app-render/work-async-storage-instance.js.map +1 -0
  355. package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js +27 -0
  356. package/dist/node_modules/next/dist/server/app-render/work-async-storage.external.js.map +1 -0
  357. package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +28 -0
  358. package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js.map +1 -0
  359. package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +211 -0
  360. package/dist/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js.map +1 -0
  361. package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js +269 -0
  362. package/dist/node_modules/next/dist/server/dynamic-rendering-utils.js.map +1 -0
  363. package/dist/node_modules/next/dist/server/lib/router-utils/is-postpone.js +29 -0
  364. package/dist/node_modules/next/dist/server/lib/router-utils/is-postpone.js.map +1 -0
  365. package/dist/node_modules/next/dist/server/runtime-reacts.external.js +53 -0
  366. package/dist/node_modules/next/dist/server/runtime-reacts.external.js.map +1 -0
  367. package/dist/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +303 -0
  368. package/dist/node_modules/next/dist/server/web/spec-extension/adapters/headers.js.map +1 -0
  369. package/dist/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js +43 -0
  370. package/dist/node_modules/next/dist/server/web/spec-extension/adapters/reflect.js.map +1 -0
  371. package/dist/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +233 -0
  372. package/dist/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js.map +1 -0
  373. package/dist/node_modules/next/dist/server/web/spec-extension/cookies.js +38 -0
  374. package/dist/node_modules/next/dist/server/web/spec-extension/cookies.js.map +1 -0
  375. package/dist/node_modules/next/dist/shared/lib/action-revalidation-kind.js +39 -0
  376. package/dist/node_modules/next/dist/shared/lib/action-revalidation-kind.js.map +1 -0
  377. package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js +58 -0
  378. package/dist/node_modules/next/dist/shared/lib/app-router-context.shared-runtime.js.map +1 -0
  379. package/dist/node_modules/next/dist/shared/lib/deployment-id.js +70 -0
  380. package/dist/node_modules/next/dist/shared/lib/deployment-id.js.map +1 -0
  381. package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +34 -0
  382. package/dist/node_modules/next/dist/shared/lib/escape-regexp.js.map +1 -0
  383. package/dist/node_modules/next/dist/shared/lib/find-closest-quality.js +32 -0
  384. package/dist/node_modules/next/dist/shared/lib/find-closest-quality.js.map +1 -0
  385. package/dist/node_modules/next/dist/shared/lib/get-img-props.js +614 -0
  386. package/dist/node_modules/next/dist/shared/lib/get-img-props.js.map +1 -0
  387. package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js +33 -0
  388. package/dist/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js.map +1 -0
  389. package/dist/node_modules/next/dist/shared/lib/head.js +178 -0
  390. package/dist/node_modules/next/dist/shared/lib/head.js.map +1 -0
  391. package/dist/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js +67 -0
  392. package/dist/node_modules/next/dist/shared/lib/hooks-client-context.shared-runtime.js.map +1 -0
  393. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +38 -0
  394. package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js.map +1 -0
  395. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +67 -0
  396. package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js.map +1 -0
  397. package/dist/node_modules/next/dist/shared/lib/image-blur-svg.js +37 -0
  398. package/dist/node_modules/next/dist/shared/lib/image-blur-svg.js.map +1 -0
  399. package/dist/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js +35 -0
  400. package/dist/node_modules/next/dist/shared/lib/image-config-context.shared-runtime.js.map +1 -0
  401. package/dist/node_modules/next/dist/shared/lib/image-config.js +86 -0
  402. package/dist/node_modules/next/dist/shared/lib/image-config.js.map +1 -0
  403. package/dist/node_modules/next/dist/shared/lib/image-external.js +60 -0
  404. package/dist/node_modules/next/dist/shared/lib/image-external.js.map +1 -0
  405. package/dist/node_modules/next/dist/shared/lib/image-loader.js +135 -0
  406. package/dist/node_modules/next/dist/shared/lib/image-loader.js.map +1 -0
  407. package/dist/node_modules/next/dist/shared/lib/instant-messages.js +52 -0
  408. package/dist/node_modules/next/dist/shared/lib/instant-messages.js.map +1 -0
  409. package/dist/node_modules/next/dist/shared/lib/invariant-error.js +36 -0
  410. package/dist/node_modules/next/dist/shared/lib/invariant-error.js.map +1 -0
  411. package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js +45 -0
  412. package/dist/node_modules/next/dist/shared/lib/lazy-dynamic/bailout-to-csr.js.map +1 -0
  413. package/dist/node_modules/next/dist/shared/lib/match-local-pattern.js +56 -0
  414. package/dist/node_modules/next/dist/shared/lib/match-local-pattern.js.map +1 -0
  415. package/dist/node_modules/next/dist/shared/lib/match-remote-pattern.js +73 -0
  416. package/dist/node_modules/next/dist/shared/lib/match-remote-pattern.js.map +1 -0
  417. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +33 -0
  418. package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js.map +1 -0
  419. package/dist/node_modules/next/dist/shared/lib/promise-with-resolvers.js +39 -0
  420. package/dist/node_modules/next/dist/shared/lib/promise-with-resolvers.js.map +1 -0
  421. package/dist/node_modules/next/dist/shared/lib/router/routes/app.js +167 -0
  422. package/dist/node_modules/next/dist/shared/lib/router/routes/app.js.map +1 -0
  423. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +43 -0
  424. package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js.map +1 -0
  425. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +34 -0
  426. package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js.map +1 -0
  427. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +72 -0
  428. package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js.map +1 -0
  429. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +100 -0
  430. package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js.map +1 -0
  431. package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +184 -0
  432. package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js.map +1 -0
  433. package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +91 -0
  434. package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js.map +1 -0
  435. package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +40 -0
  436. package/dist/node_modules/next/dist/shared/lib/router/utils/index.js.map +1 -0
  437. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js +46 -0
  438. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-prefix-from-param-type.js.map +1 -0
  439. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +116 -0
  440. package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js.map +1 -0
  441. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +68 -0
  442. package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js.map +1 -0
  443. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +40 -0
  444. package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js.map +1 -0
  445. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +41 -0
  446. package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js.map +1 -0
  447. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +34 -0
  448. package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js.map +1 -0
  449. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +44 -0
  450. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js.map +1 -0
  451. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +48 -0
  452. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js.map +1 -0
  453. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +58 -0
  454. package/dist/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js.map +1 -0
  455. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +34 -0
  456. package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js.map +1 -0
  457. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +87 -0
  458. package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js.map +1 -0
  459. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +37 -0
  460. package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js.map +1 -0
  461. package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +129 -0
  462. package/dist/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js.map +1 -0
  463. package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +124 -0
  464. package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js.map +1 -0
  465. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +60 -0
  466. package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js.map +1 -0
  467. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +269 -0
  468. package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js.map +1 -0
  469. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +253 -0
  470. package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js.map +1 -0
  471. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +33 -0
  472. package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js.map +1 -0
  473. package/dist/node_modules/next/dist/shared/lib/segment.js +104 -0
  474. package/dist/node_modules/next/dist/shared/lib/segment.js.map +1 -0
  475. package/dist/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js +46 -0
  476. package/dist/node_modules/next/dist/shared/lib/server-inserted-html.shared-runtime.js.map +1 -0
  477. package/dist/node_modules/next/dist/shared/lib/side-effect.js +77 -0
  478. package/dist/node_modules/next/dist/shared/lib/side-effect.js.map +1 -0
  479. package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +35 -0
  480. package/dist/node_modules/next/dist/shared/lib/utils/error-once.js.map +1 -0
  481. package/dist/node_modules/next/dist/shared/lib/utils/reflect-utils.js +72 -0
  482. package/dist/node_modules/next/dist/shared/lib/utils/reflect-utils.js.map +1 -0
  483. package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js +35 -0
  484. package/dist/node_modules/next/dist/shared/lib/utils/warn-once.js.map +1 -0
  485. package/dist/node_modules/next/dist/shared/lib/utils.js +210 -0
  486. package/dist/node_modules/next/dist/shared/lib/utils.js.map +1 -0
  487. package/dist/node_modules/next/image.js +14 -0
  488. package/dist/node_modules/next/image.js.map +1 -0
  489. package/dist/node_modules/next/link.js +14 -0
  490. package/dist/node_modules/next/link.js.map +1 -0
  491. package/dist/node_modules/next/navigation.js +14 -0
  492. package/dist/node_modules/next/navigation.js.map +1 -0
  493. package/package.json +1 -1
@@ -0,0 +1,1168 @@
1
+ import { __exports as dynamicRendering } from '../../../../../_virtual/dynamic-rendering.js';
2
+ import React__default from 'react';
3
+ import { __require as requireHooksServerContext } from '../../client/components/hooks-server-context.js';
4
+ import { __require as requireStaticGenerationBailout } from '../../client/components/static-generation-bailout.js';
5
+ import { __require as requireWorkUnitAsyncStorage_external } from './work-unit-async-storage.external.js';
6
+ import { __require as requireWorkAsyncStorage_external } from './work-async-storage.external.js';
7
+ import { __require as requireDynamicRenderingUtils } from '../dynamic-rendering-utils.js';
8
+ import { __require as requireBoundaryConstants } from '../../lib/framework/boundary-constants.js';
9
+ import { __require as requireScheduler } from '../../lib/scheduler.js';
10
+ import { __require as requireBailoutToCsr } from '../../shared/lib/lazy-dynamic/bailout-to-csr.js';
11
+ import { __require as requireBlockingRouteMessages } from './blocking-route-messages.js';
12
+ import { __require as requireInvariantError } from '../../shared/lib/invariant-error.js';
13
+ import { __require as requireBoundaryConstants$1 } from './instant-validation/boundary-constants.js';
14
+ import { __require as requireBoundaryTracking } from './instant-validation/boundary-tracking.js';
15
+ import { __require as requireInstantMessages } from '../../shared/lib/instant-messages.js';
16
+
17
+ /**
18
+ * The functions provided by this module are used to communicate certain properties
19
+ * about the currently running code so that Next.js can make decisions on how to handle
20
+ * the current execution in different rendering modes such as pre-rendering, resuming, and SSR.
21
+ *
22
+ * Today Next.js treats all code as potentially static. Certain APIs may only make sense when dynamically rendering.
23
+ * Traditionally this meant deopting the entire render to dynamic however with PPR we can now deopt parts
24
+ * of a React tree as dynamic while still keeping other parts static. There are really two different kinds of
25
+ * Dynamic indications.
26
+ *
27
+ * The first is simply an intention to be dynamic. unstable_noStore is an example of this where
28
+ * the currently executing code simply declares that the current scope is dynamic but if you use it
29
+ * inside unstable_cache it can still be cached. This type of indication can be removed if we ever
30
+ * make the default dynamic to begin with because the only way you would ever be static is inside
31
+ * a cache scope which this indication does not affect.
32
+ *
33
+ * The second is an indication that a dynamic data source was read. This is a stronger form of dynamic
34
+ * because it means that it is inappropriate to cache this at all. using a dynamic data source inside
35
+ * unstable_cache should error. If you want to use some dynamic data inside unstable_cache you should
36
+ * read that data outside the cache and pass it in as an argument to the cached function.
37
+ */
38
+
39
+ var hasRequiredDynamicRendering;
40
+
41
+ function requireDynamicRendering () {
42
+ if (hasRequiredDynamicRendering) return dynamicRendering;
43
+ hasRequiredDynamicRendering = 1;
44
+ (function (exports$1) {
45
+ Object.defineProperty(exports$1, "__esModule", {
46
+ value: true
47
+ });
48
+ function _export(target, all) {
49
+ for(var name in all)Object.defineProperty(target, name, {
50
+ enumerable: true,
51
+ get: all[name]
52
+ });
53
+ }
54
+ _export(exports$1, {
55
+ DynamicHoleKind: function() {
56
+ return DynamicHoleKind;
57
+ },
58
+ Postpone: function() {
59
+ return Postpone;
60
+ },
61
+ PreludeState: function() {
62
+ return PreludeState;
63
+ },
64
+ abortAndThrowOnSynchronousRequestDataAccess: function() {
65
+ return abortAndThrowOnSynchronousRequestDataAccess;
66
+ },
67
+ abortOnSynchronousPlatformIOAccess: function() {
68
+ return abortOnSynchronousPlatformIOAccess;
69
+ },
70
+ accessedDynamicData: function() {
71
+ return accessedDynamicData;
72
+ },
73
+ annotateDynamicAccess: function() {
74
+ return annotateDynamicAccess;
75
+ },
76
+ consumeDynamicAccess: function() {
77
+ return consumeDynamicAccess;
78
+ },
79
+ createDynamicTrackingState: function() {
80
+ return createDynamicTrackingState;
81
+ },
82
+ createDynamicValidationState: function() {
83
+ return createDynamicValidationState;
84
+ },
85
+ createHangingInputAbortSignal: function() {
86
+ return createHangingInputAbortSignal;
87
+ },
88
+ createInstantValidationState: function() {
89
+ return createInstantValidationState;
90
+ },
91
+ createRenderInBrowserAbortSignal: function() {
92
+ return createRenderInBrowserAbortSignal;
93
+ },
94
+ formatDynamicAPIAccesses: function() {
95
+ return formatDynamicAPIAccesses;
96
+ },
97
+ getFirstDynamicReason: function() {
98
+ return getFirstDynamicReason;
99
+ },
100
+ getNavigationDisallowedDynamicReasons: function() {
101
+ return getNavigationDisallowedDynamicReasons;
102
+ },
103
+ getStaticShellDisallowedDynamicReasons: function() {
104
+ return getStaticShellDisallowedDynamicReasons;
105
+ },
106
+ isDynamicPostpone: function() {
107
+ return isDynamicPostpone;
108
+ },
109
+ isPrerenderInterruptedError: function() {
110
+ return isPrerenderInterruptedError;
111
+ },
112
+ logDisallowedDynamicError: function() {
113
+ return logDisallowedDynamicError;
114
+ },
115
+ markCurrentScopeAsDynamic: function() {
116
+ return markCurrentScopeAsDynamic;
117
+ },
118
+ postponeWithTracking: function() {
119
+ return postponeWithTracking;
120
+ },
121
+ throwIfDisallowedDynamic: function() {
122
+ return throwIfDisallowedDynamic;
123
+ },
124
+ throwIfSyncIOUsed: function() {
125
+ return throwIfSyncIOUsed;
126
+ },
127
+ throwToInterruptStaticGeneration: function() {
128
+ return throwToInterruptStaticGeneration;
129
+ },
130
+ trackAllowedDynamicAccess: function() {
131
+ return trackAllowedDynamicAccess;
132
+ },
133
+ trackDynamicDataInDynamicRender: function() {
134
+ return trackDynamicDataInDynamicRender;
135
+ },
136
+ trackDynamicHoleInNavigation: function() {
137
+ return trackDynamicHoleInNavigation;
138
+ },
139
+ trackDynamicHoleInRuntimeShell: function() {
140
+ return trackDynamicHoleInRuntimeShell;
141
+ },
142
+ trackDynamicHoleInStaticShell: function() {
143
+ return trackDynamicHoleInStaticShell;
144
+ },
145
+ trackThrownErrorInNavigation: function() {
146
+ return trackThrownErrorInNavigation;
147
+ },
148
+ useDynamicRouteParams: function() {
149
+ return useDynamicRouteParams;
150
+ },
151
+ useDynamicSearchParams: function() {
152
+ return useDynamicSearchParams;
153
+ }
154
+ });
155
+ const _react = /*#__PURE__*/ _interop_require_default(React__default);
156
+ const _hooksservercontext = requireHooksServerContext();
157
+ const _staticgenerationbailout = requireStaticGenerationBailout();
158
+ const _workunitasyncstorageexternal = requireWorkUnitAsyncStorage_external();
159
+ const _workasyncstorageexternal = requireWorkAsyncStorage_external();
160
+ const _dynamicrenderingutils = requireDynamicRenderingUtils();
161
+ const _boundaryconstants = requireBoundaryConstants();
162
+ const _scheduler = requireScheduler();
163
+ const _bailouttocsr = requireBailoutToCsr();
164
+ const _blockingroutemessages = requireBlockingRouteMessages();
165
+ const _invarianterror = requireInvariantError();
166
+ const _boundaryconstants1 = requireBoundaryConstants$1();
167
+ const _boundarytracking = requireBoundaryTracking();
168
+ const _instantmessages = requireInstantMessages();
169
+ function _interop_require_default(obj) {
170
+ return obj && obj.__esModule ? obj : {
171
+ default: obj
172
+ };
173
+ }
174
+ const hasPostpone = typeof _react.default.unstable_postpone === 'function';
175
+ function createDynamicTrackingState(isDebugDynamicAccesses) {
176
+ return {
177
+ isDebugDynamicAccesses,
178
+ dynamicAccesses: [],
179
+ syncDynamicErrorWithStack: null,
180
+ syncDynamicErrorWithStackPostMicrotask: false
181
+ };
182
+ }
183
+ function createDynamicValidationState() {
184
+ return {
185
+ hasSuspenseAboveBody: false,
186
+ hasDynamicMetadata: false,
187
+ dynamicMetadata: null,
188
+ hasDynamicViewport: false,
189
+ hasAllowedDynamic: false,
190
+ dynamicErrors: []
191
+ };
192
+ }
193
+ function getPendingClientSyncDynamicError(clientDynamic) {
194
+ return clientDynamic.syncDynamicErrorWithStackPostMicrotask ? null : clientDynamic.syncDynamicErrorWithStack;
195
+ }
196
+ function getFirstDynamicReason(trackingState) {
197
+ var _trackingState_dynamicAccesses_;
198
+ return (_trackingState_dynamicAccesses_ = trackingState.dynamicAccesses[0]) == null ? void 0 : _trackingState_dynamicAccesses_.expression;
199
+ }
200
+ function markCurrentScopeAsDynamic(store, workUnitStore, expression) {
201
+ if (workUnitStore) {
202
+ switch(workUnitStore.type){
203
+ case 'cache':
204
+ case 'unstable-cache':
205
+ // Inside cache scopes, marking a scope as dynamic has no effect,
206
+ // because the outer cache scope creates a cache boundary. This is
207
+ // subtly different from reading a dynamic data source, which is
208
+ // forbidden inside a cache scope.
209
+ return;
210
+ case 'private-cache':
211
+ // A private cache scope is already dynamic by definition.
212
+ return;
213
+ }
214
+ }
215
+ // If we're forcing dynamic rendering or we're forcing static rendering, we
216
+ // don't need to do anything here because the entire page is already dynamic
217
+ // or it's static and it should not throw or postpone here.
218
+ if (store.forceDynamic || store.forceStatic) return;
219
+ if (store.dynamicShouldError) {
220
+ throw Object.defineProperty(new _staticgenerationbailout.StaticGenBailoutError(`Route ${store.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`), "__NEXT_ERROR_CODE", {
221
+ value: "E553",
222
+ enumerable: false,
223
+ configurable: true
224
+ });
225
+ }
226
+ if (workUnitStore) {
227
+ switch(workUnitStore.type){
228
+ case 'prerender-ppr':
229
+ return postponeWithTracking(store.route, expression, workUnitStore.dynamicTracking);
230
+ case 'prerender-legacy':
231
+ workUnitStore.revalidate = 0;
232
+ // We aren't prerendering, but we are generating a static page. We need
233
+ // to bail out of static generation.
234
+ const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used ${expression}. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
235
+ value: "E550",
236
+ enumerable: false,
237
+ configurable: true
238
+ });
239
+ store.dynamicUsageDescription = expression;
240
+ store.dynamicUsageStack = err.stack;
241
+ throw err;
242
+ case 'request':
243
+ if (process.env.NODE_ENV !== 'production') {
244
+ workUnitStore.usedDynamic = true;
245
+ }
246
+ break;
247
+ }
248
+ }
249
+ }
250
+ function throwToInterruptStaticGeneration(expression, store, prerenderStore) {
251
+ // We aren't prerendering but we are generating a static page. We need to bail out of static generation
252
+ const err = Object.defineProperty(new _hooksservercontext.DynamicServerError(`Route ${store.route} couldn't be rendered statically because it used \`${expression}\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`), "__NEXT_ERROR_CODE", {
253
+ value: "E558",
254
+ enumerable: false,
255
+ configurable: true
256
+ });
257
+ prerenderStore.revalidate = 0;
258
+ store.dynamicUsageDescription = expression;
259
+ store.dynamicUsageStack = err.stack;
260
+ throw err;
261
+ }
262
+ function trackDynamicDataInDynamicRender(workUnitStore) {
263
+ switch(workUnitStore.type){
264
+ case 'cache':
265
+ case 'unstable-cache':
266
+ // Inside cache scopes, marking a scope as dynamic has no effect,
267
+ // because the outer cache scope creates a cache boundary. This is
268
+ // subtly different from reading a dynamic data source, which is
269
+ // forbidden inside a cache scope.
270
+ return;
271
+ case 'private-cache':
272
+ // A private cache scope is already dynamic by definition.
273
+ return;
274
+ case 'prerender':
275
+ case 'prerender-runtime':
276
+ case 'prerender-legacy':
277
+ case 'prerender-ppr':
278
+ case 'prerender-client':
279
+ case 'validation-client':
280
+ case 'generate-static-params':
281
+ break;
282
+ case 'request':
283
+ if (process.env.NODE_ENV !== 'production') {
284
+ workUnitStore.usedDynamic = true;
285
+ }
286
+ break;
287
+ }
288
+ }
289
+ function abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore) {
290
+ const reason = `Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`;
291
+ const error = createPrerenderInterruptedError(reason);
292
+ prerenderStore.controller.abort(error);
293
+ const dynamicTracking = prerenderStore.dynamicTracking;
294
+ if (dynamicTracking) {
295
+ dynamicTracking.dynamicAccesses.push({
296
+ // When we aren't debugging, we don't need to create another error for the
297
+ // stack trace.
298
+ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined,
299
+ expression
300
+ });
301
+ }
302
+ }
303
+ function abortOnSynchronousPlatformIOAccess(route, expression, errorWithStack, prerenderStore) {
304
+ const dynamicTracking = prerenderStore.dynamicTracking;
305
+ if (dynamicTracking && dynamicTracking.syncDynamicErrorWithStack === null) {
306
+ dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
307
+ // React completes the task that is currently rendering before scheduled
308
+ // abort cleanup. Client tracking can attribute the sync IO only during
309
+ // that current task; server tracking keeps the error regardless.
310
+ queueMicrotask(()=>{
311
+ dynamicTracking.syncDynamicErrorWithStackPostMicrotask = true;
312
+ });
313
+ }
314
+ abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
315
+ }
316
+ function abortAndThrowOnSynchronousRequestDataAccess(route, expression, errorWithStack, prerenderStore) {
317
+ // The synchronously accessed request data would have been available during
318
+ // a runtime prerender, which would have rendered past this point instead of
319
+ // aborting — so a runtime prefetch would produce more content than this
320
+ // render. Record that, same as when request data access creates a hanging
321
+ // promise (see makeRuntimeHangingPromise). Unlike
322
+ // `abortOnSynchronousPlatformIOAccess`, which aborts a runtime prerender
323
+ // all the same and therefore must not record anything.
324
+ (0, _dynamicrenderingutils.trackRuntimeDataAccessed)(prerenderStore);
325
+ const prerenderSignal = prerenderStore.controller.signal;
326
+ if (prerenderSignal.aborted === false) {
327
+ // TODO it would be better to move this aborted check into the callsite so we can avoid making
328
+ // the error object when it isn't relevant to the aborting of the prerender however
329
+ // since we need the throw semantics regardless of whether we abort it is easier to land
330
+ // this way. See how this was handled with `abortOnSynchronousPlatformIOAccess` for a closer
331
+ // to ideal implementation
332
+ abortOnSynchronousDynamicDataAccess(route, expression, prerenderStore);
333
+ // Preserve the exact server-side dynamic access for final validation after
334
+ // interrupting this render.
335
+ const dynamicTracking = prerenderStore.dynamicTracking;
336
+ if (dynamicTracking) {
337
+ if (dynamicTracking.syncDynamicErrorWithStack === null) {
338
+ dynamicTracking.syncDynamicErrorWithStack = errorWithStack;
339
+ }
340
+ }
341
+ }
342
+ throw createPrerenderInterruptedError(`Route ${route} needs to bail out of prerendering at this point because it used ${expression}.`);
343
+ }
344
+ function Postpone({ reason, route }) {
345
+ const prerenderStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
346
+ const dynamicTracking = prerenderStore && prerenderStore.type === 'prerender-ppr' ? prerenderStore.dynamicTracking : null;
347
+ postponeWithTracking(route, reason, dynamicTracking);
348
+ }
349
+ function postponeWithTracking(route, expression, dynamicTracking) {
350
+ assertPostpone();
351
+ if (dynamicTracking) {
352
+ dynamicTracking.dynamicAccesses.push({
353
+ // When we aren't debugging, we don't need to create another error for the
354
+ // stack trace.
355
+ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined,
356
+ expression
357
+ });
358
+ }
359
+ _react.default.unstable_postpone(createPostponeReason(route, expression));
360
+ }
361
+ function createPostponeReason(route, expression) {
362
+ return `Route ${route} needs to bail out of prerendering at this point because it used ${expression}. ` + `React throws this special object to indicate where. It should not be caught by ` + `your own try/catch. Learn more: https://nextjs.org/docs/messages/ppr-caught-error`;
363
+ }
364
+ function isDynamicPostpone(err) {
365
+ if (typeof err === 'object' && err !== null && typeof err.message === 'string') {
366
+ return isDynamicPostponeReason(err.message);
367
+ }
368
+ return false;
369
+ }
370
+ function isDynamicPostponeReason(reason) {
371
+ return reason.includes('needs to bail out of prerendering at this point because it used') && reason.includes('Learn more: https://nextjs.org/docs/messages/ppr-caught-error');
372
+ }
373
+ if (isDynamicPostponeReason(createPostponeReason('%%%', '^^^')) === false) {
374
+ throw Object.defineProperty(new Error('Invariant: isDynamicPostpone misidentified a postpone reason. This is a bug in Next.js'), "__NEXT_ERROR_CODE", {
375
+ value: "E296",
376
+ enumerable: false,
377
+ configurable: true
378
+ });
379
+ }
380
+ const NEXT_PRERENDER_INTERRUPTED = 'NEXT_PRERENDER_INTERRUPTED';
381
+ function createPrerenderInterruptedError(message) {
382
+ const error = Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
383
+ value: "E394",
384
+ enumerable: false,
385
+ configurable: true
386
+ });
387
+ error.digest = NEXT_PRERENDER_INTERRUPTED;
388
+ return error;
389
+ }
390
+ function isPrerenderInterruptedError(error) {
391
+ return typeof error === 'object' && error !== null && error.digest === NEXT_PRERENDER_INTERRUPTED && 'name' in error && 'message' in error && error instanceof Error;
392
+ }
393
+ function accessedDynamicData(dynamicAccesses) {
394
+ return dynamicAccesses.length > 0;
395
+ }
396
+ function consumeDynamicAccess(serverDynamic, clientDynamic) {
397
+ // We mutate because we only call this once we are no longer writing
398
+ // to the dynamicTrackingState and it's more efficient than creating a new
399
+ // array.
400
+ serverDynamic.dynamicAccesses.push(...clientDynamic.dynamicAccesses);
401
+ return serverDynamic.dynamicAccesses;
402
+ }
403
+ function formatDynamicAPIAccesses(dynamicAccesses) {
404
+ return dynamicAccesses.filter((access)=>typeof access.stack === 'string' && access.stack.length > 0).map(({ expression, stack })=>{
405
+ stack = stack.split('\n')// Remove the "Error: " prefix from the first line of the stack trace as
406
+ // well as the first 4 lines of the stack trace which is the distance
407
+ // from the user code and the `new Error().stack` call.
408
+ .slice(4).filter((line)=>{
409
+ // Exclude Next.js internals from the stack trace.
410
+ if (line.includes('node_modules/next/')) {
411
+ return false;
412
+ }
413
+ // Exclude anonymous functions from the stack trace.
414
+ if (line.includes(' (<anonymous>)')) {
415
+ return false;
416
+ }
417
+ // Exclude Node.js internals from the stack trace.
418
+ if (line.includes(' (node:')) {
419
+ return false;
420
+ }
421
+ return true;
422
+ }).join('\n');
423
+ return `Dynamic API Usage Debug - ${expression}:\n${stack}`;
424
+ });
425
+ }
426
+ function assertPostpone() {
427
+ if (!hasPostpone) {
428
+ throw Object.defineProperty(new Error(`Invariant: React.unstable_postpone is not defined. This suggests the wrong version of React was loaded. This is a bug in Next.js`), "__NEXT_ERROR_CODE", {
429
+ value: "E224",
430
+ enumerable: false,
431
+ configurable: true
432
+ });
433
+ }
434
+ }
435
+ function createRenderInBrowserAbortSignal() {
436
+ const controller = new AbortController();
437
+ controller.abort(Object.defineProperty(new _bailouttocsr.BailoutToCSRError('Render in Browser'), "__NEXT_ERROR_CODE", {
438
+ value: "E721",
439
+ enumerable: false,
440
+ configurable: true
441
+ }));
442
+ return controller.signal;
443
+ }
444
+ function createHangingInputAbortSignal(workUnitStore) {
445
+ switch(workUnitStore.type){
446
+ case 'prerender':
447
+ case 'prerender-runtime':
448
+ const controller = new AbortController();
449
+ if (workUnitStore.cacheSignal) {
450
+ // If we have a cacheSignal it means we're in a prospective render. If
451
+ // the input we're waiting on is coming from another cache, we do want
452
+ // to wait for it so that we can resolve this cache entry too.
453
+ workUnitStore.cacheSignal.inputReady().then(()=>{
454
+ controller.abort();
455
+ });
456
+ } else {
457
+ // Otherwise we're in the final render and we should already have all
458
+ // our caches filled.
459
+ // If the prerender uses stages, we have wait until the final stage.
460
+ // if an input didn't resolve at that point, then we can assume it never will.
461
+ //
462
+ // We might still be waiting on some microtasks so we
463
+ // wait one tick before giving up. When we give up, we still want to
464
+ // render the content of this cache as deeply as we can so that we can
465
+ // suspend as deeply as possible in the tree or not at all if we don't
466
+ // end up waiting for the input.
467
+ const stagedRendering = (0, _workunitasyncstorageexternal.getStagedRenderingController)(workUnitStore);
468
+ if (stagedRendering && stagedRendering.finalStage !== null) {
469
+ stagedRendering.waitForStage(stagedRendering.finalStage).then(()=>(0, _scheduler.scheduleOnNextTick)(()=>controller.abort()), noop);
470
+ } else {
471
+ (0, _scheduler.scheduleOnNextTick)(()=>controller.abort());
472
+ }
473
+ }
474
+ return controller.signal;
475
+ case 'prerender-client':
476
+ case 'validation-client':
477
+ case 'prerender-ppr':
478
+ case 'prerender-legacy':
479
+ case 'request':
480
+ case 'cache':
481
+ case 'private-cache':
482
+ case 'unstable-cache':
483
+ case 'generate-static-params':
484
+ return undefined;
485
+ }
486
+ }
487
+ function noop() {}
488
+ function annotateDynamicAccess(expression, prerenderStore) {
489
+ const dynamicTracking = prerenderStore.dynamicTracking;
490
+ if (dynamicTracking) {
491
+ dynamicTracking.dynamicAccesses.push({
492
+ stack: dynamicTracking.isDebugDynamicAccesses ? new Error().stack : undefined,
493
+ expression
494
+ });
495
+ }
496
+ }
497
+ function useDynamicRouteParams(expression) {
498
+ const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
499
+ const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
500
+ if (workStore && workUnitStore) {
501
+ switch(workUnitStore.type){
502
+ case 'prerender-client':
503
+ {
504
+ const fallbackParams = workUnitStore.fallbackRouteParams;
505
+ if (fallbackParams && fallbackParams.size > 0) {
506
+ // We are in a prerender with cacheComponents semantics. We are going to
507
+ // hang here and never resolve. This will cause the currently
508
+ // rendering component to effectively be a dynamic hole.
509
+ _react.default.use((0, _dynamicrenderingutils.makeClientHookHangingPromise)(workUnitStore.renderSignal, new _dynamicrenderingutils.ClientHookDynamicError(workStore.route, expression)));
510
+ }
511
+ break;
512
+ }
513
+ case 'prerender':
514
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
515
+ value: "E795",
516
+ enumerable: false,
517
+ configurable: true
518
+ });
519
+ case 'prerender-ppr':
520
+ {
521
+ const fallbackParams = workUnitStore.fallbackRouteParams;
522
+ if (fallbackParams && fallbackParams.size > 0) {
523
+ return postponeWithTracking(workStore.route, expression, workUnitStore.dynamicTracking);
524
+ }
525
+ break;
526
+ }
527
+ case 'validation-client':
528
+ {
529
+ break;
530
+ }
531
+ case 'prerender-runtime':
532
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called during a runtime prerender. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
533
+ value: "E771",
534
+ enumerable: false,
535
+ configurable: true
536
+ });
537
+ case 'cache':
538
+ case 'private-cache':
539
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
540
+ value: "E745",
541
+ enumerable: false,
542
+ configurable: true
543
+ });
544
+ case 'generate-static-params':
545
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called in \`generateStaticParams\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
546
+ value: "E1130",
547
+ enumerable: false,
548
+ configurable: true
549
+ });
550
+ }
551
+ }
552
+ }
553
+ function useDynamicSearchParams(expression) {
554
+ const workStore = _workasyncstorageexternal.workAsyncStorage.getStore();
555
+ const workUnitStore = _workunitasyncstorageexternal.workUnitAsyncStorage.getStore();
556
+ if (!workStore) {
557
+ // We assume pages router context and just return
558
+ return;
559
+ }
560
+ if (!workUnitStore) {
561
+ (0, _workunitasyncstorageexternal.throwForMissingRequestStore)(expression);
562
+ }
563
+ switch(workUnitStore.type){
564
+ case 'validation-client':
565
+ // During instant validation we try to behave as close to client as possible,
566
+ // so this shouldn't hang during SSR.
567
+ return;
568
+ case 'prerender-client':
569
+ {
570
+ _react.default.use((0, _dynamicrenderingutils.makeClientHookHangingPromise)(workUnitStore.renderSignal, new _dynamicrenderingutils.ClientHookDynamicError(workStore.route, expression)));
571
+ break;
572
+ }
573
+ case 'prerender-legacy':
574
+ case 'prerender-ppr':
575
+ {
576
+ if (workStore.forceStatic) {
577
+ return;
578
+ }
579
+ throw Object.defineProperty(new _bailouttocsr.BailoutToCSRError(expression), "__NEXT_ERROR_CODE", {
580
+ value: "E394",
581
+ enumerable: false,
582
+ configurable: true
583
+ });
584
+ }
585
+ case 'prerender':
586
+ case 'prerender-runtime':
587
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called from a Server Component. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
588
+ value: "E795",
589
+ enumerable: false,
590
+ configurable: true
591
+ });
592
+ case 'cache':
593
+ case 'unstable-cache':
594
+ case 'private-cache':
595
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called inside a cache scope. Next.js should be preventing ${expression} from being included in server components statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
596
+ value: "E745",
597
+ enumerable: false,
598
+ configurable: true
599
+ });
600
+ case 'generate-static-params':
601
+ throw Object.defineProperty(new _invarianterror.InvariantError(`\`${expression}\` was called in \`generateStaticParams\`. Next.js should be preventing ${expression} from being included in server component files statically, but did not in this case.`), "__NEXT_ERROR_CODE", {
602
+ value: "E1130",
603
+ enumerable: false,
604
+ configurable: true
605
+ });
606
+ case 'request':
607
+ return;
608
+ }
609
+ }
610
+ const hasSuspenseRegex = /\n\s+at Suspense \(<anonymous>\)/;
611
+ // Common implicit body tags that React will treat as body when placed directly in html
612
+ const bodyAndImplicitTags = 'body|div|main|section|article|aside|header|footer|nav|form|p|span|h1|h2|h3|h4|h5|h6';
613
+ // Detects when RootLayoutBoundary (our framework marker component) appears
614
+ // after Suspense in the component stack, indicating the root layout is wrapped
615
+ // within a Suspense boundary. Ensures no body/html/implicit-body components are in between.
616
+ //
617
+ // Example matches:
618
+ // at Suspense (<anonymous>)
619
+ // at __next_root_layout_boundary__ (<anonymous>)
620
+ //
621
+ // Or with other components in between (but not body/html/implicit-body):
622
+ // at Suspense (<anonymous>)
623
+ // at SomeComponent (<anonymous>)
624
+ // at __next_root_layout_boundary__ (<anonymous>)
625
+ const hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex = new RegExp(`\\n\\s+at Suspense \\(<anonymous>\\)(?:(?!\\n\\s+at (?:${bodyAndImplicitTags}) \\(<anonymous>\\))[\\s\\S])*?\\n\\s+at ${_boundaryconstants.ROOT_LAYOUT_BOUNDARY_NAME} \\([^\\n]*\\)`);
626
+ const hasMetadataRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.METADATA_BOUNDARY_NAME}[\\n\\s]`);
627
+ const hasViewportRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.VIEWPORT_BOUNDARY_NAME}[\\n\\s]`);
628
+ const hasOutletRegex = new RegExp(`\\n\\s+at ${_boundaryconstants.OUTLET_BOUNDARY_NAME}[\\n\\s]`);
629
+ const hasInstantValidationBoundaryRegex = new RegExp(`\\n\\s+at ${_boundaryconstants1.INSTANT_VALIDATION_BOUNDARY_NAME}[\\n\\s]`);
630
+ const slotMarkerRegex = new RegExp(`\\n\\s+at ${_boundaryconstants1.INSTANT_SLOT_MARKER_PREFIX}(\\d+)${_boundaryconstants1.INSTANT_SLOT_MARKER_SUFFIX}[\\n\\s]`);
631
+ /** Look up the config factory for the slot this error belongs to.
632
+ * Checks the component stack for a slot marker (__next_instant_slot_N__)
633
+ * and returns the config at that index. Falls back to index 0 (root
634
+ * config) when no slot marker is found or the slot has no config. */ function resolveInstantStack(componentStack, dynamicValidation) {
635
+ const { slotStacks } = dynamicValidation;
636
+ if (slotStacks.length > 1) {
637
+ const match = slotMarkerRegex.exec(componentStack);
638
+ if (match) {
639
+ // Slot markers are 0-indexed in the component name but
640
+ // slotStacks is 1-indexed (index 0 is the root config).
641
+ const slotIndex = parseInt(match[1], 10) + 1;
642
+ const slotStack = slotStacks[slotIndex];
643
+ if (slotStack != null) {
644
+ return slotStack;
645
+ }
646
+ }
647
+ }
648
+ // Fall back to root config (index 0)
649
+ return slotStacks[0] ?? null;
650
+ }
651
+ /**
652
+ * Inspects the component stack of an outlet boundary to discover whether the
653
+ * user placed a Suspense boundary above the document body, and records the
654
+ * opt-in on `dynamicValidation.hasSuspenseAboveBody` if so.
655
+ *
656
+ * The outlet itself isn't a meaningful source of dynamic — it only resolves
657
+ * when metadata/viewport are dynamic, which we track via their own boundaries.
658
+ * However, the outlet renders alongside the page content, so its stack passes
659
+ * through the user's layout chain (typically reaching into `<body>` via the
660
+ * root layout). That makes the outlet stack our best opportunity to spot a
661
+ * Suspense boundary above the body, even when no real body content is dynamic.
662
+ * Without this, a route whose only dynamic source is `generateViewport()` would
663
+ * miss the Suspense-above-body opt-in, because the viewport's stack lives in
664
+ * the head and never sees the user's root layout.
665
+ *
666
+ * We deliberately only set `hasSuspenseAboveBody`, not `hasAllowedDynamic`. The
667
+ * latter tracks whether the body has dynamic content that's been wrapped in
668
+ * Suspense (i.e., the page is partially dynamic). The outlet rendering tells us
669
+ * about the structural opt-in for an empty shell, not about the body being
670
+ * partially dynamic. The distinction matters because dynamic metadata is only
671
+ * acceptable when the page is partially dynamic (via real body holes), and we
672
+ * don't want this outlet-based detection to mask that case.
673
+ */ function trackOutletSuspenseAboveBody(componentStack, dynamicValidation) {
674
+ if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
675
+ dynamicValidation.hasSuspenseAboveBody = true;
676
+ }
677
+ }
678
+ function trackAllowedDynamicAccess(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic) {
679
+ const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);
680
+ if (hasOutletRegex.test(componentStack)) {
681
+ trackOutletSuspenseAboveBody(componentStack, dynamicValidation);
682
+ return;
683
+ } else if (hasMetadataRegex.test(componentStack)) {
684
+ dynamicValidation.hasDynamicMetadata = true;
685
+ return;
686
+ } else if (hasViewportRegex.test(componentStack)) {
687
+ dynamicValidation.hasDynamicViewport = true;
688
+ return;
689
+ } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
690
+ // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
691
+ // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
692
+ // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
693
+ dynamicValidation.hasAllowedDynamic = true;
694
+ dynamicValidation.hasSuspenseAboveBody = true;
695
+ return;
696
+ } else if (hasSuspenseRegex.test(componentStack)) {
697
+ // this error had a Suspense boundary above it so we don't need to report it as a source
698
+ // of disallowed
699
+ dynamicValidation.hasAllowedDynamic = true;
700
+ return;
701
+ } else if (syncDynamicError) {
702
+ dynamicValidation.dynamicErrors.push(syncDynamicError);
703
+ return;
704
+ }
705
+ if ((0, _dynamicrenderingutils.isClientHookDynamicError)(dynamicReason)) {
706
+ dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, null));
707
+ return;
708
+ }
709
+ const error = addErrorContext((0, _blockingroutemessages.createDynamicOrRuntimeBodyError)(workStore.route), componentStack, null);
710
+ dynamicValidation.dynamicErrors.push(error);
711
+ return;
712
+ }
713
+ var DynamicHoleKind = /*#__PURE__*/ function(DynamicHoleKind) {
714
+ /** We know that this hole is caused by link data. */ DynamicHoleKind[DynamicHoleKind["Link"] = 1] = "Link";
715
+ /** We know that this hole is caused by runtime data. */ DynamicHoleKind[DynamicHoleKind["Runtime"] = 2] = "Runtime";
716
+ /** We know that this hole is caused by dynamic data. */ DynamicHoleKind[DynamicHoleKind["Dynamic"] = 3] = "Dynamic";
717
+ return DynamicHoleKind;
718
+ }({});
719
+ function createInstantValidationState(slotStacks) {
720
+ return {
721
+ hasDynamicMetadata: false,
722
+ hasAllowedClientDynamicAboveBoundary: false,
723
+ dynamicMetadata: null,
724
+ hasDynamicViewport: false,
725
+ hasAllowedDynamic: false,
726
+ dynamicErrors: [],
727
+ validationPreventingErrors: [],
728
+ thrownErrorsOutsideBoundary: [],
729
+ slotStacks
730
+ };
731
+ }
732
+ function trackDynamicHoleInNavigation(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic, kind, boundaryState) {
733
+ const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);
734
+ if (hasOutletRegex.test(componentStack)) {
735
+ // We don't need to track that this is dynamic. It is only so when something else is also dynamic.
736
+ return;
737
+ }
738
+ // Resolve the config stack for this specific error. If the error
739
+ // is inside a slot marker, use that slot's config. Otherwise fall
740
+ // back to the default.
741
+ const effectiveCreateInstantStack = resolveInstantStack(componentStack, dynamicValidation);
742
+ if (hasMetadataRegex.test(componentStack)) {
743
+ const error = addErrorContext(kind === 1 ? (0, _blockingroutemessages.createLinkMetadataError)(workStore.route) : kind === 2 ? (0, _blockingroutemessages.createRuntimeMetadataError)(workStore.route) : (0, _blockingroutemessages.createDynamicMetadataError)(workStore.route), componentStack, effectiveCreateInstantStack);
744
+ dynamicValidation.dynamicMetadata = error;
745
+ return;
746
+ }
747
+ if (hasViewportRegex.test(componentStack)) {
748
+ const error = addErrorContext(kind === 1 ? (0, _blockingroutemessages.createLinkViewportError)(workStore.route) : kind === 2 ? (0, _blockingroutemessages.createRuntimeViewportError)(workStore.route) : (0, _blockingroutemessages.createDynamicViewportError)(workStore.route), componentStack, effectiveCreateInstantStack);
749
+ dynamicValidation.dynamicErrors.push(error);
750
+ return;
751
+ }
752
+ const boundaryLocation = hasInstantValidationBoundaryRegex.exec(componentStack);
753
+ if (!boundaryLocation) {
754
+ // We don't see the validation boundary in the component stack,
755
+ // so this hole must be coming from a shared parent.
756
+ // Shared parents are fully resolved and don't have RSC holes,
757
+ // but they can still suspend in a client component during SSR.
758
+ // If we managed to render all the validation boundaries, that means
759
+ // that the client holes aren't blocking validation and we can disregard them.
760
+ // Note that we don't even care whether they have suspense or not.
761
+ if ((0, _boundarytracking.allRequiredBoundariesRendered)(boundaryState)) {
762
+ dynamicValidation.hasAllowedClientDynamicAboveBoundary = true;
763
+ dynamicValidation.hasAllowedDynamic = true // Holes outside the boundary contribute to allowing dynamic metadata
764
+ ;
765
+ return;
766
+ } else {
767
+ // TODO(instant-validation) TODO(NAR-787)
768
+ // If shared parents blocked us from validating, we should only log
769
+ // the errors from the innermost (segments), i.e. omit layouts whose
770
+ // slots managed to render (because clearly they didn't block validation)
771
+ const message = `Route "${workStore.route}": Could not validate \`instant\` because a Client Component in a parent segment prevented the page from rendering.`;
772
+ const error = addErrorContext(Object.defineProperty(new Error(message), "__NEXT_ERROR_CODE", {
773
+ value: "E1331",
774
+ enumerable: false,
775
+ configurable: true
776
+ }), componentStack, effectiveCreateInstantStack);
777
+ dynamicValidation.validationPreventingErrors.push(error);
778
+ return;
779
+ }
780
+ } else {
781
+ // The hole originates inside the validation boundary.
782
+ //
783
+ // Check if we have a Suspense above the hole, but below the validation boundary.
784
+ // If we do, then this dynamic usage wouldn't block a navigation to this subtree.
785
+ // Conversely, if the nearest suspense is above the validation boundary, then this subtree would block.
786
+ //
787
+ // Note that in the component stack, children come before parents.
788
+ //
789
+ // Valid:
790
+ // ...
791
+ // at Suspense
792
+ // ...
793
+ // at __next_prefetch_validation_boundary__
794
+ //
795
+ // Invalid:
796
+ // ...
797
+ // at __next_prefetch_validation_boundary__
798
+ // ...
799
+ // at Suspense
800
+ //
801
+ const suspenseLocation = hasSuspenseRegex.exec(componentStack);
802
+ if (suspenseLocation) {
803
+ if (suspenseLocation.index < boundaryLocation.index) {
804
+ dynamicValidation.hasAllowedDynamic = true;
805
+ return;
806
+ }
807
+ }
808
+ }
809
+ if (syncDynamicError) {
810
+ if (effectiveCreateInstantStack !== null && syncDynamicError.cause === undefined) {
811
+ syncDynamicError.cause = effectiveCreateInstantStack();
812
+ }
813
+ dynamicValidation.dynamicErrors.push(syncDynamicError);
814
+ return;
815
+ }
816
+ if ((0, _dynamicrenderingutils.isClientHookDynamicError)(dynamicReason)) {
817
+ dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, effectiveCreateInstantStack));
818
+ return;
819
+ }
820
+ const error = addErrorContext(kind === 1 ? (0, _blockingroutemessages.createLinkBodyErrorInNavigation)(workStore.route) : kind === 2 ? (0, _blockingroutemessages.createRuntimeBodyErrorInNavigation)(workStore.route) : (0, _blockingroutemessages.createDynamicBodyErrorInNavigation)(workStore.route), componentStack, effectiveCreateInstantStack);
821
+ dynamicValidation.dynamicErrors.push(error);
822
+ return;
823
+ }
824
+ function trackThrownErrorInNavigation(workStore, dynamicValidation, thrownValue, componentStack) {
825
+ const boundaryLocation = hasInstantValidationBoundaryRegex.exec(componentStack);
826
+ if (!boundaryLocation) {
827
+ // There's no validation boundary on the component stack.
828
+ // This error may have blocked a boundary from rendering.
829
+ // Wrap the error to provide component context.
830
+ // This helps for errors from node_modules which would otherwise
831
+ // have no useful stack information due to ignore-listing,
832
+ // e.g. next/dynamic with `ssr: false`.
833
+ const error = addErrorContext(Object.defineProperty(new Error('An error occurred while attempting to validate instant UI. This error may be preventing the validation from completing.', {
834
+ cause: thrownValue
835
+ }), "__NEXT_ERROR_CODE", {
836
+ value: "E1118",
837
+ enumerable: false,
838
+ configurable: true
839
+ }), componentStack, null);
840
+ dynamicValidation.thrownErrorsOutsideBoundary.push(error);
841
+ } else {
842
+ // There's validation boundary on the component stack,
843
+ // so we know this error didn't block a validation boundary from rendering.
844
+ // However, this error might be hiding be hiding dynamic content that would
845
+ // cause validation to fail.
846
+ const suspenseLocation = hasSuspenseRegex.exec(componentStack);
847
+ if (suspenseLocation) {
848
+ if (suspenseLocation.index < boundaryLocation.index) {
849
+ // There's a Suspense below the validation boundary but above this error's location.
850
+ // This subtree can't fail instant validation because any potential
851
+ // dynamic holes would be guarded by the Suspense anyway,
852
+ // so we can allow this.
853
+ return;
854
+ }
855
+ }
856
+ const message = `Route "${workStore.route}": Could not validate \`instant\` because an error prevented the target segment from rendering.`;
857
+ const error = addErrorContext(Object.defineProperty(new Error(message, {
858
+ cause: thrownValue
859
+ }), "__NEXT_ERROR_CODE", {
860
+ value: "E1338",
861
+ enumerable: false,
862
+ configurable: true
863
+ }), componentStack, null // TODO(instant-validation-build): conflicting use of cause
864
+ );
865
+ dynamicValidation.validationPreventingErrors.push(error);
866
+ }
867
+ }
868
+ function trackDynamicHoleInRuntimeShell(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic) {
869
+ const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);
870
+ if (hasOutletRegex.test(componentStack)) {
871
+ trackOutletSuspenseAboveBody(componentStack, dynamicValidation);
872
+ return;
873
+ } else if (hasMetadataRegex.test(componentStack)) {
874
+ const error = addErrorContext((0, _blockingroutemessages.createDynamicMetadataError)(workStore.route), componentStack, null);
875
+ dynamicValidation.dynamicMetadata = error;
876
+ return;
877
+ } else if (hasViewportRegex.test(componentStack)) {
878
+ const error = addErrorContext((0, _blockingroutemessages.createDynamicViewportError)(workStore.route), componentStack, null);
879
+ dynamicValidation.dynamicErrors.push(error);
880
+ return;
881
+ } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
882
+ // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
883
+ // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
884
+ // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
885
+ dynamicValidation.hasAllowedDynamic = true;
886
+ dynamicValidation.hasSuspenseAboveBody = true;
887
+ return;
888
+ } else if (hasSuspenseRegex.test(componentStack)) {
889
+ // this error had a Suspense boundary above it so we don't need to report it as a source
890
+ // of disallowed
891
+ dynamicValidation.hasAllowedDynamic = true;
892
+ return;
893
+ } else if (syncDynamicError) {
894
+ dynamicValidation.dynamicErrors.push(syncDynamicError);
895
+ return;
896
+ }
897
+ if ((0, _dynamicrenderingutils.isClientHookDynamicError)(dynamicReason)) {
898
+ dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, null));
899
+ return;
900
+ }
901
+ const error = addErrorContext((0, _blockingroutemessages.createDynamicBodyError)(workStore.route), componentStack, null);
902
+ dynamicValidation.dynamicErrors.push(error);
903
+ return;
904
+ }
905
+ function trackDynamicHoleInStaticShell(dynamicReason, workStore, componentStack, dynamicValidation, clientDynamic) {
906
+ const syncDynamicError = getPendingClientSyncDynamicError(clientDynamic);
907
+ if (hasOutletRegex.test(componentStack)) {
908
+ trackOutletSuspenseAboveBody(componentStack, dynamicValidation);
909
+ return;
910
+ } else if (hasMetadataRegex.test(componentStack)) {
911
+ const error = addErrorContext((0, _blockingroutemessages.createRuntimeMetadataError)(workStore.route), componentStack, null);
912
+ dynamicValidation.dynamicMetadata = error;
913
+ return;
914
+ } else if (hasViewportRegex.test(componentStack)) {
915
+ const error = addErrorContext((0, _blockingroutemessages.createRuntimeViewportError)(workStore.route), componentStack, null);
916
+ dynamicValidation.dynamicErrors.push(error);
917
+ return;
918
+ } else if (hasSuspenseBeforeRootLayoutWithoutBodyOrImplicitBodyRegex.test(componentStack)) {
919
+ // For Suspense within body, the prelude wouldn't be empty so it wouldn't violate the empty static shells rule.
920
+ // But if you have Suspense above body, the prelude is empty but we allow that because having Suspense
921
+ // is an explicit signal from the user that they acknowledge the empty shell and want dynamic rendering.
922
+ dynamicValidation.hasAllowedDynamic = true;
923
+ dynamicValidation.hasSuspenseAboveBody = true;
924
+ return;
925
+ } else if (hasSuspenseRegex.test(componentStack)) {
926
+ // this error had a Suspense boundary above it so we don't need to report it as a source
927
+ // of disallowed
928
+ dynamicValidation.hasAllowedDynamic = true;
929
+ return;
930
+ } else if (syncDynamicError) {
931
+ dynamicValidation.dynamicErrors.push(syncDynamicError);
932
+ return;
933
+ }
934
+ if ((0, _dynamicrenderingutils.isClientHookDynamicError)(dynamicReason)) {
935
+ dynamicValidation.dynamicErrors.push(addErrorContext(dynamicReason, componentStack, null));
936
+ return;
937
+ }
938
+ const error = addErrorContext((0, _blockingroutemessages.createRuntimeBodyError)(workStore.route), componentStack, null);
939
+ dynamicValidation.dynamicErrors.push(error);
940
+ return;
941
+ }
942
+ /**
943
+ * In dev mode, we prefer using the owner stack, otherwise the provided
944
+ * component stack is used.
945
+ *
946
+ * Accepts an already-created Error so the SWC error-code plugin can see the
947
+ * `new Error(...)` call at each call site and auto-assign error codes.
948
+ */ function addErrorContext(error, componentStack, createInstantStack) {
949
+ const ownerStack = process.env.NODE_ENV !== 'production' && _react.default.captureOwnerStack ? _react.default.captureOwnerStack() : null;
950
+ if (createInstantStack !== null) {
951
+ error.cause = createInstantStack();
952
+ }
953
+ // TODO go back to owner stack here if available. This is temporarily using componentStack to get the right
954
+ //
955
+ error.stack = error.name + ': ' + error.message + (ownerStack || componentStack);
956
+ return error;
957
+ }
958
+ var PreludeState = /*#__PURE__*/ function(PreludeState) {
959
+ PreludeState[PreludeState["Full"] = 0] = "Full";
960
+ PreludeState[PreludeState["Empty"] = 1] = "Empty";
961
+ PreludeState[PreludeState["Errored"] = 2] = "Errored";
962
+ return PreludeState;
963
+ }({});
964
+ function logDisallowedDynamicError(workStore, error) {
965
+ console.error(error);
966
+ (0, _blockingroutemessages.logBuildDebugHint)(workStore.route);
967
+ }
968
+ function throwIfSyncIOUsed(workStore, serverDynamic) {
969
+ if (serverDynamic.syncDynamicErrorWithStack) {
970
+ logDisallowedDynamicError(workStore, serverDynamic.syncDynamicErrorWithStack);
971
+ throw new _staticgenerationbailout.StaticGenBailoutError();
972
+ }
973
+ }
974
+ function throwIfDisallowedDynamic(workStore, prelude, dynamicValidation, serverDynamic, allowEmptyStaticShell) {
975
+ throwIfSyncIOUsed(workStore, serverDynamic);
976
+ // The dynamic metadata error is a mistake-detection signal. It fires when the
977
+ // rest of the shell is otherwise fully static apart from metadata, suggesting
978
+ // the dynamic data access in `generateMetadata` was probably unintentional.
979
+ // That condition is independent of whether the user or build phase accepted
980
+ // an empty shell, so we surface it before any opt-in bypass.
981
+ if (prelude === 0 && dynamicValidation.hasAllowedDynamic === false && dynamicValidation.hasDynamicMetadata) {
982
+ console.error((0, _blockingroutemessages.createDynamicOrRuntimeMetadataError)(workStore.route).message);
983
+ throw new _staticgenerationbailout.StaticGenBailoutError();
984
+ }
985
+ // Either flag expresses "this shell is allowed to be empty/blocking":
986
+ // - `allowEmptyStaticShell` covers `instant = false` (user opt-in)
987
+ // and the build-phase fallback-shell case.
988
+ // - `hasSuspenseAboveBody` is the structural opt-in inside the user's root
989
+ // layout.
990
+ // Treat them as synonyms for the purpose of bypassing shell-failure errors.
991
+ if (allowEmptyStaticShell || dynamicValidation.hasSuspenseAboveBody) {
992
+ return;
993
+ }
994
+ if (prelude !== 0) {
995
+ // We didn't have any sync bailouts but there may be user code which
996
+ // blocked the root. We would have captured these during the prerender
997
+ // and can log them here and then terminate the build/validating render
998
+ const dynamicErrors = dynamicValidation.dynamicErrors;
999
+ if (dynamicErrors.length > 0) {
1000
+ for(let i = 0; i < dynamicErrors.length; i++){
1001
+ logDisallowedDynamicError(workStore, dynamicErrors[i]);
1002
+ }
1003
+ throw new _staticgenerationbailout.StaticGenBailoutError();
1004
+ }
1005
+ // If we got this far then the only other thing that could be blocking
1006
+ // the root is dynamic Viewport. If this is dynamic then
1007
+ // you need to opt into that by adding a Suspense boundary above the body
1008
+ // to indicate your are ok with fully dynamic rendering.
1009
+ if (dynamicValidation.hasDynamicViewport) {
1010
+ console.error((0, _blockingroutemessages.createDynamicOrRuntimeViewportError)(workStore.route).message);
1011
+ throw new _staticgenerationbailout.StaticGenBailoutError();
1012
+ }
1013
+ if (prelude === 1) {
1014
+ // If we ever get this far then we messed up the tracking of invalid dynamic.
1015
+ // We still adhere to the constraint that you must produce a shell but invite the
1016
+ // user to report this as a bug in Next.js.
1017
+ console.error(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason. This is a bug in Next.js.`);
1018
+ throw new _staticgenerationbailout.StaticGenBailoutError();
1019
+ }
1020
+ }
1021
+ }
1022
+ function getStaticShellDisallowedDynamicReasons(workStore, prelude, dynamicValidation, allowEmptyStaticShell) {
1023
+ // The dynamic metadata error is a mistake-detection signal. It fires when the
1024
+ // rest of the shell is otherwise fully static apart from metadata, suggesting
1025
+ // the dynamic data access in `generateMetadata` was probably unintentional.
1026
+ // That condition is independent of whether the user or build phase accepted
1027
+ // an empty shell, so we surface it before any opt-in bypass.
1028
+ if (prelude === 0 && dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicErrors.length === 0 && dynamicValidation.dynamicMetadata) {
1029
+ return [
1030
+ dynamicValidation.dynamicMetadata
1031
+ ];
1032
+ }
1033
+ // Either flag expresses "this shell is allowed to be empty/blocking":
1034
+ // - `allowEmptyStaticShell` covers `instant = false` (user opt-in)
1035
+ // and the build-phase fallback-shell case.
1036
+ // - `hasSuspenseAboveBody` is the structural opt-in inside the user's root
1037
+ // layout.
1038
+ // Treat them as synonyms for the purpose of bypassing shell-failure errors.
1039
+ if (allowEmptyStaticShell || dynamicValidation.hasSuspenseAboveBody) {
1040
+ return [];
1041
+ }
1042
+ if (prelude !== 0) {
1043
+ // We didn't have any sync bailouts but there may be user code which
1044
+ // blocked the root. We would have captured these during the prerender
1045
+ // and can log them here and then terminate the build/validating render
1046
+ const dynamicErrors = dynamicValidation.dynamicErrors;
1047
+ if (dynamicErrors.length > 0) {
1048
+ return dynamicErrors;
1049
+ }
1050
+ if (prelude === 1) {
1051
+ // If we ever get this far then we messed up the tracking of invalid dynamic.
1052
+ // We still adhere to the constraint that you must produce a shell but invite the
1053
+ // user to report this as a bug in Next.js.
1054
+ return [
1055
+ Object.defineProperty(new _invarianterror.InvariantError(`Route "${workStore.route}" did not produce a static shell and Next.js was unable to determine a reason.`), "__NEXT_ERROR_CODE", {
1056
+ value: "E936",
1057
+ enumerable: false,
1058
+ configurable: true
1059
+ })
1060
+ ];
1061
+ }
1062
+ }
1063
+ // We had a non-empty prelude and there are no dynamic holes
1064
+ return [];
1065
+ }
1066
+ function getNavigationDisallowedDynamicReasons(workStore, prelude, dynamicValidation, validationSampleTracking, boundaryState, devRenderDidError) {
1067
+ // If we have errors related to missing samples, those should take precedence over everything else.
1068
+ if (validationSampleTracking) {
1069
+ const { missingSampleErrors } = validationSampleTracking;
1070
+ if (missingSampleErrors.length > 0) {
1071
+ return missingSampleErrors;
1072
+ }
1073
+ }
1074
+ const { validationPreventingErrors } = dynamicValidation;
1075
+ if (validationPreventingErrors.length > 0) {
1076
+ if (process.env.__NEXT_DEV_SERVER && devRenderDidError) {
1077
+ // The dev render already surfaced server errors to the user.
1078
+ // The same errors likely caused validation to be inconclusive,
1079
+ // so reporting them again as validation failures would be noisy.
1080
+ return [];
1081
+ }
1082
+ return validationPreventingErrors;
1083
+ }
1084
+ // NOTE: We don't care about Suspense above body here,
1085
+ // we're only concerned with the validation boundary
1086
+ if (prelude !== 0) {
1087
+ const dynamicErrors = dynamicValidation.dynamicErrors;
1088
+ if (dynamicErrors.length > 0) {
1089
+ return dynamicErrors;
1090
+ }
1091
+ if (prelude === 1 && !dynamicValidation.hasAllowedClientDynamicAboveBoundary && (0, _boundarytracking.allRequiredBoundariesRendered)(boundaryState)) {
1092
+ // If we ever get this far then we messed up the tracking of invalid
1093
+ // dynamic. (When boundaries are missing the deferred fallback below
1094
+ // will surface a more useful error.)
1095
+ return Object.defineProperty(new _invarianterror.InvariantError(`Route "${workStore.route}" failed to render during instant validation and Next.js was unable to determine a reason.`), "__NEXT_ERROR_CODE", {
1096
+ value: "E1055",
1097
+ enumerable: false,
1098
+ configurable: true
1099
+ });
1100
+ }
1101
+ } else {
1102
+ const dynamicErrors = dynamicValidation.dynamicErrors;
1103
+ if (dynamicErrors.length > 0) {
1104
+ return dynamicErrors;
1105
+ }
1106
+ if (dynamicValidation.hasAllowedDynamic === false && dynamicValidation.dynamicMetadata) {
1107
+ return [
1108
+ dynamicValidation.dynamicMetadata
1109
+ ];
1110
+ }
1111
+ }
1112
+ // Missing boundaries on their own aren't a strong signal — a parent
1113
+ // layout may legitimately omit a slot. Defer this so the caller can
1114
+ // try shallower validation depths first; if every depth comes up
1115
+ // empty we still want to surface this so the user is made aware that
1116
+ // validation didn't complete. When we add a markers API, the
1117
+ // marker-based variant of this check can become strict again.
1118
+ if (!(0, _boundarytracking.allRequiredBoundariesRendered)(boundaryState)) {
1119
+ const { thrownErrorsOutsideBoundary } = dynamicValidation;
1120
+ const rootInstantStack = dynamicValidation.slotStacks[0];
1121
+ if (thrownErrorsOutsideBoundary.length === 0) {
1122
+ const missingFiles = [];
1123
+ for (const [id, filePaths] of boundaryState.requiredIds){
1124
+ if (!boundaryState.renderedIds.has(id)) {
1125
+ for (const filePath of filePaths){
1126
+ let normalized = filePath.replace(/^\[project\][\\/]?/, '').replace(process.cwd() + '/', '').replace(process.cwd() + '\\', '');
1127
+ missingFiles.push(normalized);
1128
+ }
1129
+ }
1130
+ }
1131
+ missingFiles.sort();
1132
+ return (0, _instantmessages.createUnrenderedSegmentError)(workStore.route, missingFiles);
1133
+ } else if (process.env.__NEXT_DEV_SERVER && devRenderDidError) {
1134
+ // Errors outside the boundary likely blocked it from rendering,
1135
+ // but they're already being reported to the user via the dev
1136
+ // render. Suppress the validation failure to avoid noise.
1137
+ return [];
1138
+ } else if (thrownErrorsOutsideBoundary.length === 1) {
1139
+ const message = `Route "${workStore.route}": Could not validate \`instant\` because the target segment was prevented from rendering, likely due to the following error.`;
1140
+ const error = rootInstantStack !== null ? rootInstantStack() : new Error();
1141
+ error.name = 'Error';
1142
+ error.message = message;
1143
+ return new AggregateError([
1144
+ error,
1145
+ thrownErrorsOutsideBoundary[0]
1146
+ ]);
1147
+ } else {
1148
+ const message = `Route "${workStore.route}": Could not validate \`instant\` because the target segment was prevented from rendering, likely due to one of the following errors.`;
1149
+ const error = rootInstantStack !== null ? rootInstantStack() : new Error();
1150
+ error.name = 'Error';
1151
+ error.message = message;
1152
+ return new AggregateError([
1153
+ error,
1154
+ ...thrownErrorsOutsideBoundary
1155
+ ]);
1156
+ }
1157
+ }
1158
+ // We had a non-empty prelude and there are no dynamic holes
1159
+ return [];
1160
+ }
1161
+
1162
+
1163
+ } (dynamicRendering));
1164
+ return dynamicRendering;
1165
+ }
1166
+
1167
+ export { requireDynamicRendering as __require };
1168
+ //# sourceMappingURL=dynamic-rendering.js.map