agmon 0.1.1 → 0.1.3

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 (233) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-path-routes-manifest.json +7 -0
  3. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js +502 -0
  4. package/.next/build/chunks/[root-of-the-server]__05i36w1t4lzaf._.js.map +11 -0
  5. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js +190 -0
  6. package/.next/build/chunks/[root-of-the-server]__1kki86fknkq7y._.js.map +8 -0
  7. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js +13 -0
  8. package/.next/build/chunks/[turbopack-node]_transforms_postcss_ts_1gfkiq9iz8yb8._.js.map +5 -0
  9. package/.next/build/chunks/[turbopack]_runtime.js +1056 -0
  10. package/.next/build/chunks/[turbopack]_runtime.js.map +11 -0
  11. package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js +7314 -0
  12. package/.next/build/chunks/node_modules_20v-8wlfss9m1._.js.map +47 -0
  13. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js +6 -0
  14. package/.next/build/chunks/pool_entry-[turbopack-node]_transforms_postcss_ts_0tp-k2vy8nj6i._.js.map +5 -0
  15. package/.next/build/package.json +1 -0
  16. package/.next/build-manifest.json +54 -0
  17. package/.next/export-marker.json +6 -0
  18. package/.next/fallback-build-manifest.json +15 -0
  19. package/.next/images-manifest.json +68 -0
  20. package/.next/next-minimal-server.js.nft.json +1 -0
  21. package/.next/next-server.js.nft.json +1 -0
  22. package/.next/package.json +1 -0
  23. package/.next/prerender-manifest.json +97 -0
  24. package/.next/required-server-files.js +366 -0
  25. package/.next/required-server-files.json +366 -0
  26. package/.next/routes-manifest.json +75 -0
  27. package/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
  28. package/.next/server/app/_global-error/page/build-manifest.json +21 -0
  29. package/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
  30. package/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
  31. package/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
  32. package/.next/server/app/_global-error/page.js +10 -0
  33. package/.next/server/app/_global-error/page.js.map +5 -0
  34. package/.next/server/app/_global-error/page.js.nft.json +1 -0
  35. package/.next/server/app/_global-error/page_client-reference-manifest.js +3 -0
  36. package/.next/server/app/_global-error.html +1 -0
  37. package/.next/server/app/_global-error.meta +30 -0
  38. package/.next/server/app/_global-error.rsc +18 -0
  39. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +23 -0
  40. package/.next/server/app/_global-error.segments/_full.segment.rsc +18 -0
  41. package/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -0
  42. package/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
  43. package/.next/server/app/_not-found/page/build-manifest.json +21 -0
  44. package/.next/server/app/_not-found/page/next-font-manifest.json +6 -0
  45. package/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
  46. package/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
  47. package/.next/server/app/_not-found/page.js +12 -0
  48. package/.next/server/app/_not-found/page.js.map +5 -0
  49. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  50. package/.next/server/app/_not-found/page_client-reference-manifest.js +3 -0
  51. package/.next/server/app/_not-found.html +1 -0
  52. package/.next/server/app/_not-found.meta +35 -0
  53. package/.next/server/app/_not-found.rsc +22 -0
  54. package/.next/server/app/_not-found.segments/_full.segment.rsc +22 -0
  55. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +28 -0
  56. package/.next/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  57. package/.next/server/app/api/traces/stream/route/app-paths-manifest.json +3 -0
  58. package/.next/server/app/api/traces/stream/route/build-manifest.json +12 -0
  59. package/.next/server/app/api/traces/stream/route/server-reference-manifest.json +4 -0
  60. package/.next/server/app/api/traces/stream/route.js +7 -0
  61. package/.next/server/app/api/traces/stream/route.js.map +5 -0
  62. package/.next/server/app/api/traces/stream/route.js.nft.json +1 -0
  63. package/.next/server/app/api/traces/stream/route_client-reference-manifest.js +3 -0
  64. package/.next/server/app/api/version/route/app-paths-manifest.json +3 -0
  65. package/.next/server/app/api/version/route/build-manifest.json +12 -0
  66. package/.next/server/app/api/version/route/server-reference-manifest.json +4 -0
  67. package/.next/server/app/api/version/route.js +7 -0
  68. package/.next/server/app/api/version/route.js.map +5 -0
  69. package/.next/server/app/api/version/route.js.nft.json +1 -0
  70. package/.next/server/app/api/version/route_client-reference-manifest.js +3 -0
  71. package/.next/server/app/index.html +1 -0
  72. package/.next/server/app/index.meta +29 -0
  73. package/.next/server/app/index.rsc +29 -0
  74. package/.next/server/app/index.segments/__PAGE__.segment.rsc +34 -0
  75. package/.next/server/app/index.segments/_full.segment.rsc +29 -0
  76. package/.next/server/app/index.segments/_tree.segment.rsc +3 -0
  77. package/.next/server/app/page/app-paths-manifest.json +3 -0
  78. package/.next/server/app/page/build-manifest.json +21 -0
  79. package/.next/server/app/page/next-font-manifest.json +6 -0
  80. package/.next/server/app/page/react-loadable-manifest.json +1 -0
  81. package/.next/server/app/page/server-reference-manifest.json +4 -0
  82. package/.next/server/app/page.js +13 -0
  83. package/.next/server/app/page.js.map +5 -0
  84. package/.next/server/app/page.js.nft.json +1 -0
  85. package/.next/server/app/page_client-reference-manifest.js +3 -0
  86. package/.next/server/app-paths-manifest.json +7 -0
  87. package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js +3 -0
  88. package/.next/server/chunks/[externals]__0bwf06g0pqv3h._.js.map +1 -0
  89. package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js +3 -0
  90. package/.next/server/chunks/[externals]__1p2j9_5g429uh._.js.map +1 -0
  91. package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js +5 -0
  92. package/.next/server/chunks/[root-of-the-server]__04an4kw4xcc5l._.js.map +1 -0
  93. package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js +5 -0
  94. package/.next/server/chunks/[root-of-the-server]__1s6v8mz-nanm-._.js.map +1 -0
  95. package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js +320 -0
  96. package/.next/server/chunks/[root-of-the-server]__20xfs4y2ipcvv._.js.map +1 -0
  97. package/.next/server/chunks/[turbopack]_runtime.js +937 -0
  98. package/.next/server/chunks/[turbopack]_runtime.js.map +10 -0
  99. package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js +3 -0
  100. package/.next/server/chunks/_next-internal_server_app_api_traces_stream_route_actions_07rmicxgds803.js.map +1 -0
  101. package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js +3 -0
  102. package/.next/server/chunks/_next-internal_server_app_api_version_route_actions_0kbx30hro8e93.js.map +1 -0
  103. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js +3 -0
  104. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_canvas_CanvasRenderer_mjs_1xntzghggpb51._.js.map +1 -0
  105. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js +76 -0
  106. package/.next/server/chunks/ssr/1q96_modules_pixi_js_lib_rendering_renderers_gpu_WebGPURenderer_mjs_00tc9jrf-ft1_._.js.map +1 -0
  107. package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js +3 -0
  108. package/.next/server/chunks/ssr/[root-of-the-server]__08zgqq_38tv57._.js.map +1 -0
  109. package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js +3 -0
  110. package/.next/server/chunks/ssr/[root-of-the-server]__0aa2929udndo-._.js.map +1 -0
  111. package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js +3 -0
  112. package/.next/server/chunks/ssr/[root-of-the-server]__0ayw3c9e93kvf._.js.map +1 -0
  113. package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js +3 -0
  114. package/.next/server/chunks/ssr/[root-of-the-server]__0ojpb-dtuk3-q._.js.map +1 -0
  115. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js +3 -0
  116. package/.next/server/chunks/ssr/[root-of-the-server]__0py1t7q9ntzgc._.js.map +1 -0
  117. package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js +14 -0
  118. package/.next/server/chunks/ssr/[root-of-the-server]__1cf6qt9agg_9-._.js.map +1 -0
  119. package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js +3 -0
  120. package/.next/server/chunks/ssr/[root-of-the-server]__1e1_fmeab1ca7._.js.map +1 -0
  121. package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js +3 -0
  122. package/.next/server/chunks/ssr/[root-of-the-server]__1w2vu9hh0h02y._.js.map +1 -0
  123. package/.next/server/chunks/ssr/[turbopack]_runtime.js +937 -0
  124. package/.next/server/chunks/ssr/[turbopack]_runtime.js.map +10 -0
  125. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js +3 -0
  126. package/.next/server/chunks/ssr/_next-internal_server_app__global-error_page_actions_0zi5s8-psc_d2.js.map +1 -0
  127. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js +3 -0
  128. package/.next/server/chunks/ssr/_next-internal_server_app__not-found_page_actions_0pt47yrisjoev.js.map +1 -0
  129. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js +3 -0
  130. package/.next/server/chunks/ssr/_next-internal_server_app_page_actions_0hhsz1jew5ls7.js.map +1 -0
  131. package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js +33 -0
  132. package/.next/server/chunks/ssr/node_modules_01xbj_9zg44kw._.js.map +1 -0
  133. package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js +23 -0
  134. package/.next/server/chunks/ssr/node_modules_0a548_llmwce7._.js.map +1 -0
  135. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js +33 -0
  136. package/.next/server/chunks/ssr/node_modules_0gxlxpuufujz9._.js.map +1 -0
  137. package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +6 -0
  138. package/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js.map +1 -0
  139. package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js +3 -0
  140. package/.next/server/chunks/ssr/node_modules_next_dist_1hgv5i-pr1hza._.js.map +1 -0
  141. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +3 -0
  142. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js.map +1 -0
  143. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +3 -0
  144. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js.map +1 -0
  145. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js +3 -0
  146. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_global-error_0q-w892nagajq.js.map +1 -0
  147. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js +3 -0
  148. package/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_unauthorized_0l_sp0xky89qu.js.map +1 -0
  149. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js +3 -0
  150. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0aymk_x8-bu4q.js.map +1 -0
  151. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js +3 -0
  152. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_19--w_z4y02i7.js.map +1 -0
  153. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js +3 -0
  154. package/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qjycfedgh109.js.map +1 -0
  155. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js +3 -0
  156. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0hcyh9uzlz7ci._.js.map +1 -0
  157. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js +3 -0
  158. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0k3f3soanqdoq._.js.map +1 -0
  159. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js +3 -0
  160. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0ovgsftn-uvbz._.js.map +1 -0
  161. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js +5 -0
  162. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0xa24fqr5c5qi._.js.map +1 -0
  163. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js +5 -0
  164. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_0zrftay3kjup7._.js.map +1 -0
  165. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js +208 -0
  166. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1z4lgkg_w-7fr._.js.map +1 -0
  167. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js +3 -0
  168. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_1zjkoj2kc4hm-._.js.map +1 -0
  169. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js +16 -0
  170. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_environment-browser_browserAll_mjs_0xb_t3dj4ad1f._.js.map +1 -0
  171. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js +3 -0
  172. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_Filter_mjs_0luksfw8ekifi._.js.map +1 -0
  173. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js +3 -0
  174. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_filters_init_mjs_1o5fmm_m60v_s._.js.map +1 -0
  175. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js +196 -0
  176. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1fkio2phhfvow._.js.map +1 -0
  177. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js +196 -0
  178. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_1n1q7aum4i7zo._.js.map +1 -0
  179. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js +3 -0
  180. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_10vpvx1o7svnk._.js.map +1 -0
  181. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js +153 -0
  182. package/.next/server/chunks/ssr/node_modules_pixi_js_lib_rendering_renderers_gl_WebGLRenderer_mjs_1hlux44jh7dk-._.js.map +1 -0
  183. package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js +3 -0
  184. package/.next/server/chunks/ssr/src_app_page_1vqfk0-j72fp6.js.map +1 -0
  185. package/.next/server/functions-config-manifest.json +4 -0
  186. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  187. package/.next/server/middleware-build-manifest.js +54 -0
  188. package/.next/server/middleware-manifest.json +6 -0
  189. package/.next/server/next-font-manifest.js +1 -0
  190. package/.next/server/next-font-manifest.json +6 -0
  191. package/.next/server/pages/404.html +1 -0
  192. package/.next/server/pages/500.html +1 -0
  193. package/.next/server/pages-manifest.json +4 -0
  194. package/.next/server/prefetch-hints.json +34 -0
  195. package/.next/server/preview-props.json +5 -0
  196. package/.next/server/server-reference-manifest.js +1 -0
  197. package/.next/server/server-reference-manifest.json +5 -0
  198. package/.next/static/chunks/0_9x2udu0iodw.js +1 -0
  199. package/.next/static/chunks/0cz1d0mv5g_q7.js +1 -0
  200. package/.next/static/chunks/0umf92h1sb77c.js +1 -0
  201. package/.next/static/chunks/10om7oix6wjze.js +1 -0
  202. package/.next/static/chunks/1780fh11o7pze.js +1 -0
  203. package/.next/static/chunks/1cldmiyw3ya18.js +21 -0
  204. package/.next/static/chunks/1unuqfq-vfqtp.js +1 -0
  205. package/.next/static/chunks/2-vsu_pt58kse.js +3 -0
  206. package/.next/static/chunks/2drjv1ti9t4pg.js +1 -0
  207. package/.next/static/chunks/2hgsvrrwu57--.css +1 -0
  208. package/.next/static/chunks/2ogvir8krwwhf.js +1 -0
  209. package/.next/static/chunks/2tc54fmsk8v8q.js +1 -0
  210. package/.next/static/chunks/304ue7hvto0o0.js +206 -0
  211. package/.next/static/chunks/31gve42sn75--.js +1 -0
  212. package/.next/static/chunks/32kizm_7q94vd.js +194 -0
  213. package/.next/static/chunks/33bap0u4zwgab.js +74 -0
  214. package/.next/static/chunks/3c4xol65z2da2.js +22 -0
  215. package/.next/static/chunks/3cfn99dbrcvvp.js +31 -0
  216. package/.next/static/chunks/3d6xc1eemxy82.js +1 -0
  217. package/.next/static/chunks/3ycr8gfnsg-xv.js +151 -0
  218. package/.next/static/chunks/3ytt3vrdhke9u.js +14 -0
  219. package/.next/static/chunks/turbopack-3-ry682tkyiqk.js +1 -0
  220. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_buildManifest.js +11 -0
  221. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_clientMiddlewareManifest.js +1 -0
  222. package/.next/static/cy2F4S28h_-YWqCOuE_ul/_ssgManifest.js +1 -0
  223. package/.next/trace +1 -0
  224. package/.next/trace-build +1 -0
  225. package/.next/types/cache-life.d.ts +114 -0
  226. package/.next/types/root-params.d.ts +3 -0
  227. package/.next/types/routes.d.ts +74 -0
  228. package/.next/types/validator.ts +17 -0
  229. package/bin/cli.js +24 -6
  230. package/package.json +6 -6
  231. package/src/app/api/traces/stream/route.js +2 -2
  232. package/src/app/layout.js +1 -1
  233. package/src/app/page.js +6 -19
@@ -0,0 +1,1056 @@
1
+ var RUNTIME_PUBLIC_PATH = "chunks/[turbopack]_runtime.js";
2
+ var RELATIVE_ROOT_PATH = "..";
3
+ var ASSET_PREFIX = "/";
4
+ /**
5
+ * This file contains runtime types and functions that are shared between all
6
+ * TurboPack ECMAScript runtimes.
7
+ *
8
+ * It will be prepended to the runtime code of each runtime.
9
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-types.d.ts" />
10
+ /// <reference path="./async-module.ts" />
11
+ /**
12
+ * Describes why a module was instantiated.
13
+ * Shared between browser and Node.js runtimes.
14
+ */ var SourceType = /*#__PURE__*/ function(SourceType) {
15
+ /**
16
+ * The module was instantiated because it was included in an evaluated chunk's
17
+ * runtime.
18
+ * SourceData is a ChunkPath.
19
+ */ SourceType[SourceType["Runtime"] = 0] = "Runtime";
20
+ /**
21
+ * The module was instantiated because a parent module imported it.
22
+ * SourceData is a ModuleId.
23
+ */ SourceType[SourceType["Parent"] = 1] = "Parent";
24
+ /**
25
+ * The module was instantiated because it was included in a chunk's hot module
26
+ * update.
27
+ * SourceData is an array of ModuleIds or undefined.
28
+ */ SourceType[SourceType["Update"] = 2] = "Update";
29
+ return SourceType;
30
+ }(SourceType || {});
31
+ /**
32
+ * Flag indicating which module object type to create when a module is merged. Set to `true`
33
+ * by each runtime that uses ModuleWithDirection (browser dev-base.ts, nodejs dev-base.ts,
34
+ * nodejs build-base.ts). Browser production (build-base.ts) leaves it as `false` since it
35
+ * uses plain Module objects.
36
+ */ let createModuleWithDirectionFlag = false;
37
+ const REEXPORTED_OBJECTS = new WeakMap();
38
+ /**
39
+ * Constructs the `__turbopack_context__` object for a module.
40
+ */ function Context(module, exports) {
41
+ this.m = module;
42
+ // We need to store this here instead of accessing it from the module object to:
43
+ // 1. Make it available to factories directly, since we rewrite `this` to
44
+ // `__turbopack_context__.e` in CJS modules.
45
+ // 2. Support async modules which rewrite `module.exports` to a promise, so we
46
+ // can still access the original exports object from functions like
47
+ // `esmExport`
48
+ // Ideally we could find a new approach for async modules and drop this property altogether.
49
+ this.e = exports;
50
+ }
51
+ const contextPrototype = Context.prototype;
52
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
53
+ const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
54
+ function defineProp(obj, name, options) {
55
+ if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
56
+ }
57
+ function getOverwrittenModule(moduleCache, id) {
58
+ let module = moduleCache.get(id);
59
+ if (module === undefined) {
60
+ if (createModuleWithDirectionFlag) {
61
+ // set in development modes for hmr support
62
+ module = createModuleWithDirection(id);
63
+ } else {
64
+ module = createModuleObject(id);
65
+ }
66
+ moduleCache.set(id, module);
67
+ }
68
+ return module;
69
+ }
70
+ /**
71
+ * Creates the module object. Only done here to ensure all module objects have the same shape.
72
+ */ function createModuleObject(id) {
73
+ return {
74
+ exports: {},
75
+ error: undefined,
76
+ id,
77
+ namespaceObject: undefined
78
+ };
79
+ }
80
+ function createModuleWithDirection(id) {
81
+ return {
82
+ exports: {},
83
+ error: undefined,
84
+ id,
85
+ namespaceObject: undefined,
86
+ parents: [],
87
+ children: []
88
+ };
89
+ }
90
+ const BindingTag_Value = 0;
91
+ /**
92
+ * Terminates a module's group of entries in an {@link EsmReexports} list.
93
+ */ const REEXPORT_GROUP_END = 0;
94
+ /**
95
+ * Adds the getters to the exports object.
96
+ */ function esm(exports, bindings, dynamic) {
97
+ defineProp(exports, '__esModule', {
98
+ value: true
99
+ });
100
+ if (toStringTag) defineProp(exports, toStringTag, {
101
+ value: 'Module'
102
+ });
103
+ let i = 0;
104
+ while(i < bindings.length){
105
+ const propName = bindings[i++];
106
+ const tagOrFunction = bindings[i++];
107
+ if (typeof tagOrFunction === 'number') {
108
+ if (tagOrFunction === BindingTag_Value) {
109
+ defineProp(exports, propName, {
110
+ value: bindings[i++],
111
+ enumerable: true,
112
+ writable: false
113
+ });
114
+ } else {
115
+ throw new Error(`unexpected tag: ${tagOrFunction}`);
116
+ }
117
+ } else {
118
+ const getterFn = tagOrFunction;
119
+ if (typeof bindings[i] === 'function') {
120
+ const setterFn = bindings[i++];
121
+ defineProp(exports, propName, {
122
+ get: getterFn,
123
+ set: setterFn,
124
+ enumerable: true
125
+ });
126
+ } else {
127
+ defineProp(exports, propName, {
128
+ get: getterFn,
129
+ enumerable: true
130
+ });
131
+ }
132
+ }
133
+ }
134
+ // The properties defined above are already non-configurable and
135
+ // non-writable, so the namespace's existing exports are effectively
136
+ // immutable. Sealing additionally makes the object non-extensible, matching
137
+ // real ESM-namespace semantics. Modules with dynamic re-exports
138
+ // (`export *` from a CommonJS module) must stay extensible so the dynamic
139
+ // export proxy can surface keys discovered at runtime, so skip the seal for
140
+ // them.
141
+ if (!dynamic) Object.seal(exports);
142
+ }
143
+ /**
144
+ * Makes the module an ESM with exports
145
+ */ function esmExport(bindings, id, dynamic) {
146
+ let module;
147
+ let exports;
148
+ if (id != null) {
149
+ module = getOverwrittenModule(this.c, id);
150
+ exports = module.exports;
151
+ } else {
152
+ module = this.m;
153
+ exports = this.e;
154
+ }
155
+ module.namespaceObject = exports;
156
+ esm(exports, bindings, dynamic);
157
+ }
158
+ contextPrototype.s = esmExport;
159
+ /**
160
+ * Registers re-exports that all forward to properties of other modules.
161
+ *
162
+ * This is a compact spelling of the pattern
163
+ *
164
+ * ```js
165
+ * var ns = context.i(moduleId)
166
+ * context.s([exportName, () => ns[importedName], ...])
167
+ * ```
168
+ *
169
+ * The list is a flat sequence of groups. Each group starts with the source the exports come from,
170
+ * followed by that group's entries, and is terminated by the `0` sentinel (or the end of the list).
171
+ *
172
+ * The group head is either a **module id**, which is instantiated here:
173
+ *
174
+ * ```js
175
+ * context.S([
176
+ * 76061, 'default', 'f', 'named', 'A', 0,
177
+ * 29842, 'otherModule', 'f',
178
+ * ])
179
+ * ```
180
+ *
181
+ * or the **namespace value** of a module that has already been imported, which is used directly:
182
+ *
183
+ * ```js
184
+ * var ns1 = context.i(76061)
185
+ * context.S([ns1, 'default', 'f', 'named', 'A'])
186
+ * ```
187
+ *
188
+ * The producer picks the namespace form when it has generated the import anyway -- because some
189
+ * later import must not be reordered past it -- so nothing is instantiated twice. The two are told
190
+ * apart by type: a module id is always a string or number. A CommonJS function export produces a
191
+ * callable namespace value, so namespace heads can be functions as well as objects.
192
+ *
193
+ * Entries are `exportName, importedName` pairs, except when a group holds exactly one string. That
194
+ * string is then a comma-joined list of the same pairs, which saves the repeated quoting:
195
+ *
196
+ * ```js
197
+ * context.S([
198
+ * 76061, 'default,f,named,A', 0,
199
+ * 29842, 'otherModule,f',
200
+ * ])
201
+ * ```
202
+ *
203
+ * The producer picks that spelling independently for each group whose names contain no commas,
204
+ * since that group's names are recovered by splitting on them.
205
+ *
206
+ * Groups whose head is a module id are instantiated in list order, at the point where the call
207
+ * appears, so the producer must not merge such a group across an import of another module. The
208
+ * destination reuses a source data value or getter descriptor when one exists, falling back to a
209
+ * wrapper getter for dynamic/proxy/inherited properties.
210
+ *
211
+ * `id` names the module the exports belong to when this module was merged into a scope-hoisting
212
+ * group, exactly as it does for {@link EsmExport}.
213
+ *
214
+ * Only the source descriptor's payload (value or getter) is reused. {@link esm} still defines a
215
+ * fresh enumerable, non-configurable destination property, and no source setter is ever forwarded.
216
+ */ function esmReexport(list, id) {
217
+ const bindings = [];
218
+ let i = 0;
219
+ while(i < list.length){
220
+ const head = list[i++];
221
+ const start = i;
222
+ while(i < list.length && list[i] !== REEXPORT_GROUP_END)i++;
223
+ const end = i;
224
+ // Skip the sentinel, if this group was terminated by one rather than by the end of the list.
225
+ i++;
226
+ // Module ids are always strings or numbers. Other values are already-imported namespaces;
227
+ // notably, interop with a CommonJS function export produces a callable namespace function.
228
+ // `esmImport` may return a promise for an async module, but re-exports of async modules keep
229
+ // going through `context.s`, so the producer never routes them here and this stays synchronous.
230
+ const namespace = typeof head === 'string' || typeof head === 'number' ? esmImport.call(this, head) : head;
231
+ if (end - start === 1) {
232
+ const pairs = list[start].split(',');
233
+ for(let j = 0; j < pairs.length; j += 2){
234
+ appendReexportBinding(bindings, pairs[j], namespace, pairs[j + 1]);
235
+ }
236
+ } else {
237
+ for(let j = start; j < end; j += 2){
238
+ appendReexportBinding(bindings, list[j], namespace, list[j + 1]);
239
+ }
240
+ }
241
+ }
242
+ esmExport.call(this, bindings, id);
243
+ }
244
+ contextPrototype.S = esmReexport;
245
+ function appendReexportBinding(bindings, exportedName, namespace, importedName) {
246
+ const descriptor = Reflect.getOwnPropertyDescriptor(namespace, importedName);
247
+ if (descriptor) {
248
+ if ('value' in descriptor) {
249
+ // Code generation only routes immutable imported bindings through this helper, so a data
250
+ // descriptor is a constant export and can be captured once.
251
+ bindings.push(exportedName, BindingTag_Value, descriptor.value);
252
+ return;
253
+ }
254
+ if (descriptor.get) {
255
+ // Accessors remain live by reusing the source getter. `esmReexport` is only called by
256
+ // generated code: every group head is either produced by
257
+ // `this.i` or is the namespace variable from a generated `this.i` call. Every getter on such
258
+ // a namespace is receiver-independent: ESM bindings are compiler-generated arrow functions,
259
+ // and the CommonJS/dynamic-namespace paths create arrows in `createGetter` and
260
+ // `getOwnPropertyDescriptor`. The destination can therefore reuse the exact function instead
261
+ // of allocating another wrapper getter.
262
+ bindings.push(exportedName, descriptor.get);
263
+ return;
264
+ }
265
+ }
266
+ // Dynamic/proxy/inherited CommonJS edge cases may not expose a usable own descriptor.
267
+ bindings.push(exportedName, ()=>namespace[importedName]);
268
+ }
269
+ function ensureDynamicExports(module, exports) {
270
+ let reexportedObjects = REEXPORTED_OBJECTS.get(module);
271
+ if (!reexportedObjects) {
272
+ REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
273
+ // Returns the re-exported object that provides `prop` as an own property,
274
+ // or `undefined` if none does. The traps share this logic so they always
275
+ // agree on which keys are synthesized from `reexportedObjects`. `default`
276
+ // is never re-exported by `export *`, so it is never synthesized.
277
+ const reexportOwning = (prop)=>{
278
+ if (prop !== 'default') {
279
+ for (const obj of reexportedObjects){
280
+ if (hasOwnProperty.call(obj, prop)) return obj;
281
+ }
282
+ }
283
+ return undefined;
284
+ };
285
+ // Modules with dynamic re-exports are not sealed by `esm()`, so the
286
+ // target beneath the namespace stays extensible. That is what lets the
287
+ // `ownKeys` and `getOwnPropertyDescriptor` traps legally report keys that
288
+ // exist on `reexportedObjects` but not on the target itself.
289
+ module.exports = module.namespaceObject = new Proxy(exports, {
290
+ get (target, prop) {
291
+ if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
292
+ return Reflect.get(target, prop);
293
+ }
294
+ const obj = reexportOwning(prop);
295
+ return obj && Reflect.get(obj, prop);
296
+ },
297
+ // The namespace is read-only, like a real esm namespace object. The
298
+ // re-exported modules can still mutate their own exports (exposed live
299
+ // via `get`), but mutating the namespace itself is rejected. Refusing
300
+ // here, rather than forwarding to the extensible target, also prevents an
301
+ // assignment/definition from shadowing a dynamic re-export. It also
302
+ // prevents delete from removing a static export.
303
+ set () {
304
+ return false;
305
+ },
306
+ defineProperty () {
307
+ return false;
308
+ },
309
+ deleteProperty () {
310
+ return false;
311
+ },
312
+ // The `has` trap ensures that `'exportName' in starImports` will reflect
313
+ // the truth of whether a key is exported.
314
+ has (target, prop) {
315
+ if (Reflect.has(target, prop)) return true;
316
+ if (prop === 'default' || prop === '__esModule') return false;
317
+ return reexportOwning(prop) !== undefined;
318
+ },
319
+ // ownKeys and getOwnPropertyDescriptor together make the keys enumerable.
320
+ // If a value is returned from `ownKeys` but its property descriptor is
321
+ // not enumerable, it will not be visible to iterator methods.
322
+ // Collectively, they allow code like the following:
323
+ //
324
+ // ```
325
+ // // module.js re-exports dynamic CJS exports
326
+ // export * from './legacyModule.cjs'
327
+ //
328
+ // // from another JS file, reference the re-exported dynamic values
329
+ // import * as Namespace from './module.js'
330
+ // Object.keys(Namespace)
331
+ // ```
332
+ ownKeys (target) {
333
+ const keys = Reflect.ownKeys(target);
334
+ for (const obj of reexportedObjects){
335
+ for (const key of Reflect.ownKeys(obj)){
336
+ if (key !== 'default' && !keys.includes(key)) keys.push(key);
337
+ }
338
+ }
339
+ return keys;
340
+ },
341
+ getOwnPropertyDescriptor (target, prop) {
342
+ const own = Reflect.getOwnPropertyDescriptor(target, prop);
343
+ if (own || prop === 'default' || prop === '__esModule') return own;
344
+ const obj = reexportOwning(prop);
345
+ if (obj) {
346
+ // Synthetic keys don't exist on the target, so they MUST be
347
+ // reported as configurable. However the set/delete traps above will
348
+ // prevent them from actually being changed
349
+ return {
350
+ enumerable: true,
351
+ configurable: true,
352
+ get: ()=>Reflect.get(obj, prop)
353
+ };
354
+ }
355
+ return undefined;
356
+ }
357
+ });
358
+ }
359
+ return reexportedObjects;
360
+ }
361
+ /**
362
+ * Dynamically exports properties from an object
363
+ */ function dynamicExport(object, id) {
364
+ let module;
365
+ let exports;
366
+ if (id != null) {
367
+ module = getOverwrittenModule(this.c, id);
368
+ exports = module.exports;
369
+ } else {
370
+ module = this.m;
371
+ exports = this.e;
372
+ }
373
+ const reexportedObjects = ensureDynamicExports(module, exports);
374
+ if (typeof object === 'object' && object !== null) {
375
+ reexportedObjects.push(object);
376
+ }
377
+ }
378
+ contextPrototype.j = dynamicExport;
379
+ function exportValue(value, id) {
380
+ let module;
381
+ if (id != null) {
382
+ module = getOverwrittenModule(this.c, id);
383
+ } else {
384
+ module = this.m;
385
+ }
386
+ module.exports = value;
387
+ }
388
+ contextPrototype.v = exportValue;
389
+ function exportNamespace(namespace, id) {
390
+ let module;
391
+ if (id != null) {
392
+ module = getOverwrittenModule(this.c, id);
393
+ } else {
394
+ module = this.m;
395
+ }
396
+ module.exports = module.namespaceObject = namespace;
397
+ }
398
+ contextPrototype.n = exportNamespace;
399
+ function createGetter(obj, key) {
400
+ return ()=>obj[key];
401
+ }
402
+ /**
403
+ * @returns prototype of the object
404
+ */ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
405
+ /** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
406
+ null,
407
+ getProto({}),
408
+ getProto([]),
409
+ getProto(getProto)
410
+ ];
411
+ /**
412
+ * @param raw
413
+ * @param ns
414
+ * @param allowExportDefault
415
+ * * `false`: will have the raw module as default export
416
+ * * `true`: will have the default property as default export
417
+ */ function interopEsm(raw, ns, allowExportDefault) {
418
+ const bindings = [];
419
+ let defaultLocation = -1;
420
+ for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
421
+ for (const key of Object.getOwnPropertyNames(current)){
422
+ bindings.push(key, createGetter(raw, key));
423
+ if (defaultLocation === -1 && key === 'default') {
424
+ defaultLocation = bindings.length - 1;
425
+ }
426
+ }
427
+ }
428
+ // this is not really correct
429
+ // we should set the `default` getter if the imported module is a `.cjs file`
430
+ if (!(allowExportDefault && defaultLocation >= 0)) {
431
+ // Replace the binding with one for the namespace itself in order to preserve iteration order.
432
+ if (defaultLocation >= 0) {
433
+ // Replace the getter with the value
434
+ bindings.splice(defaultLocation, 1, BindingTag_Value, raw);
435
+ } else {
436
+ bindings.push('default', BindingTag_Value, raw);
437
+ }
438
+ }
439
+ esm(ns, bindings);
440
+ return ns;
441
+ }
442
+ function createNS(raw) {
443
+ if (typeof raw === 'function') {
444
+ return function(...args) {
445
+ return raw.apply(this, args);
446
+ };
447
+ } else {
448
+ return Object.create(null);
449
+ }
450
+ }
451
+ function esmImport(id) {
452
+ const module = getOrInstantiateModuleFromParent(id, this.m);
453
+ // any ES module has to have `module.namespaceObject` defined.
454
+ if (module.namespaceObject) return module.namespaceObject;
455
+ // only ESM can be an async module, so we don't need to worry about exports being a promise here.
456
+ const raw = module.exports;
457
+ return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
458
+ }
459
+ contextPrototype.i = esmImport;
460
+ function asyncLoader(moduleId) {
461
+ const loader = this.r(moduleId);
462
+ return loader(esmImport.bind(this));
463
+ }
464
+ contextPrototype.A = asyncLoader;
465
+ // Add a simple runtime require so that environments without one can still pass
466
+ // `typeof require` CommonJS checks so that exports are correctly registered.
467
+ const runtimeRequire = // @ts-ignore
468
+ typeof require === 'function' ? require : function require1() {
469
+ throw new Error('Unexpected use of runtime require');
470
+ };
471
+ contextPrototype.t = runtimeRequire;
472
+ function commonJsRequire(id) {
473
+ return getOrInstantiateModuleFromParent(id, this.m).exports;
474
+ }
475
+ contextPrototype.r = commonJsRequire;
476
+ /**
477
+ * Remove fragments and query parameters since they are never part of the context map keys
478
+ *
479
+ * This matches how we parse patterns at resolving time. Arguably we should only do this for
480
+ * strings passed to `import` but the resolve does it for `import` and `require` and so we do
481
+ * here as well.
482
+ */ function parseRequest(request) {
483
+ // Per the URI spec fragments can contain `?` characters, so we should trim it off first
484
+ // https://datatracker.ietf.org/doc/html/rfc3986#section-3.5
485
+ const hashIndex = request.indexOf('#');
486
+ if (hashIndex !== -1) {
487
+ request = request.substring(0, hashIndex);
488
+ }
489
+ const queryIndex = request.indexOf('?');
490
+ if (queryIndex !== -1) {
491
+ request = request.substring(0, queryIndex);
492
+ }
493
+ return request;
494
+ }
495
+ /**
496
+ * `require.context` and require/import expression runtime.
497
+ */ function moduleContext(map) {
498
+ function moduleContext(id) {
499
+ id = parseRequest(id);
500
+ if (hasOwnProperty.call(map, id)) {
501
+ return map[id].module();
502
+ }
503
+ const e = new Error(`Cannot find module '${id}'`);
504
+ e.code = 'MODULE_NOT_FOUND';
505
+ throw e;
506
+ }
507
+ moduleContext.keys = ()=>{
508
+ return Object.keys(map);
509
+ };
510
+ moduleContext.resolve = (id)=>{
511
+ id = parseRequest(id);
512
+ if (hasOwnProperty.call(map, id)) {
513
+ return map[id].id();
514
+ }
515
+ const e = new Error(`Cannot find module '${id}'`);
516
+ e.code = 'MODULE_NOT_FOUND';
517
+ throw e;
518
+ };
519
+ moduleContext.import = async (id)=>{
520
+ return await moduleContext(id);
521
+ };
522
+ return moduleContext;
523
+ }
524
+ contextPrototype.f = moduleContext;
525
+ /**
526
+ * Returns the path of a chunk defined by its data.
527
+ */ function getChunkPath(chunkData) {
528
+ return typeof chunkData === 'string' ? chunkData : chunkData.path;
529
+ }
530
+ // Load the CompressedModuleFactories of a chunk into the `moduleFactories` Map.
531
+ // The flat format alternates one or more module IDs with their factory function.
532
+ // Strict factories can be prepended as a nested array.
533
+ function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
534
+ let i = offset;
535
+ const strictFactories = chunkModules[i];
536
+ if (Array.isArray(strictFactories)) {
537
+ installCompressedModuleFactories(strictFactories, 0, moduleFactories, newModuleId);
538
+ i++;
539
+ }
540
+ while(i < chunkModules.length){
541
+ let end = i + 1;
542
+ // Find our factory function
543
+ while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
544
+ end++;
545
+ }
546
+ if (end === chunkModules.length) {
547
+ throw new Error('malformed chunk format, expected a factory function');
548
+ }
549
+ // Install the factory for each module ID that doesn't already have one.
550
+ // When some IDs in this group already have a factory, reuse that existing
551
+ // group factory for the missing IDs to keep all IDs in the group consistent.
552
+ // Otherwise, install the factory from this chunk.
553
+ const moduleFactoryFn = chunkModules[end];
554
+ let existingGroupFactory = undefined;
555
+ for(let j = i; j < end; j++){
556
+ const id = chunkModules[j];
557
+ const existingFactory = moduleFactories.get(id);
558
+ if (existingFactory) {
559
+ existingGroupFactory = existingFactory;
560
+ break;
561
+ }
562
+ }
563
+ const factoryToInstall = existingGroupFactory ?? moduleFactoryFn;
564
+ let didInstallFactory = false;
565
+ for(let j = i; j < end; j++){
566
+ const id = chunkModules[j];
567
+ if (!moduleFactories.has(id)) {
568
+ if (!didInstallFactory) {
569
+ if (factoryToInstall === moduleFactoryFn) {
570
+ applyModuleFactoryName(moduleFactoryFn);
571
+ }
572
+ didInstallFactory = true;
573
+ }
574
+ moduleFactories.set(id, factoryToInstall);
575
+ newModuleId?.(id);
576
+ }
577
+ }
578
+ i = end + 1;
579
+ }
580
+ }
581
+ /**
582
+ * A pseudo "fake" URL object to resolve to its relative path.
583
+ *
584
+ * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
585
+ * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
586
+ * hydration mismatch.
587
+ *
588
+ * This is based on webpack's existing implementation:
589
+ * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
590
+ */ const relativeURL = function relativeURL(inputUrl) {
591
+ const realUrl = new URL(inputUrl, 'x:/');
592
+ const values = {};
593
+ for(const key in realUrl)values[key] = realUrl[key];
594
+ values.href = inputUrl;
595
+ values.pathname = inputUrl.replace(/[?#].*/, '');
596
+ values.origin = values.protocol = '';
597
+ values.toString = values.toJSON = (..._args)=>inputUrl;
598
+ for(const key in values)Object.defineProperty(this, key, {
599
+ enumerable: true,
600
+ configurable: true,
601
+ value: values[key]
602
+ });
603
+ };
604
+ relativeURL.prototype = URL.prototype;
605
+ contextPrototype.U = relativeURL;
606
+ /**
607
+ * Utility function to ensure all variants of an enum are handled.
608
+ */ function invariant(never, computeMessage) {
609
+ throw new Error(`Invariant: ${computeMessage(never)}`);
610
+ }
611
+ /**
612
+ * Constructs an error message for when a module factory is not available.
613
+ */ function factoryNotAvailableMessage(moduleId, sourceType, sourceData) {
614
+ let instantiationReason;
615
+ switch(sourceType){
616
+ case 0:
617
+ instantiationReason = `as a runtime entry of chunk ${sourceData}`;
618
+ break;
619
+ case 1:
620
+ instantiationReason = `because it was required from module ${sourceData}`;
621
+ break;
622
+ case 2:
623
+ instantiationReason = 'because of an HMR update';
624
+ break;
625
+ default:
626
+ invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
627
+ }
628
+ return `Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available.`;
629
+ }
630
+ /**
631
+ * Returns a `file://` URL under a synthetic directory named after `root`
632
+ * (`ROOT` for the project root), for when the real filesystem path is unknown.
633
+ * The root name and path segments are percent-encoded so the result is always
634
+ * a valid file URI.
635
+ */ function placeholderFileUrl(modulePath, root) {
636
+ return `file:///${encodeURIComponent(root ?? 'ROOT')}/${modulePath.split('/').map(encodeURIComponent).join('/')}`;
637
+ }
638
+ /**
639
+ * A stub function to make `require` available but non-functional in ESM.
640
+ */ function requireStub(_moduleId) {
641
+ throw new Error('dynamic usage of require is not supported');
642
+ }
643
+ contextPrototype.z = requireStub;
644
+ // Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
645
+ contextPrototype.g = globalThis;
646
+ function applyModuleFactoryName(factory) {
647
+ // Give the module factory a nice name to improve stack traces.
648
+ Object.defineProperty(factory, 'name', {
649
+ value: 'module evaluation'
650
+ });
651
+ }
652
+ /// <reference path="./runtime-types.d.ts" />
653
+ /// <reference path="./runtime-utils.ts" />
654
+ /**
655
+ * Top-level-await / async-module machinery. This is only included in the runtime
656
+ * when the module graph actually contains an async module (a module with
657
+ * top-level await, or one that transitively depends on one). When no async
658
+ * module is present, the chunk items never reference `__turbopack_context__.a`,
659
+ * so this whole file can be omitted.
660
+ *
661
+ * everything below is adapted from webpack
662
+ * https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
663
+ */ const turbopackQueues = Symbol('turbopack queues');
664
+ const turbopackExports = Symbol('turbopack exports');
665
+ const turbopackError = Symbol('turbopack error');
666
+ function isPromise(maybePromise) {
667
+ return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
668
+ }
669
+ function isAsyncModuleExt(obj) {
670
+ return turbopackQueues in obj;
671
+ }
672
+ function createPromise() {
673
+ let resolve;
674
+ let reject;
675
+ const promise = new Promise((res, rej)=>{
676
+ reject = rej;
677
+ resolve = res;
678
+ });
679
+ return {
680
+ promise,
681
+ resolve: resolve,
682
+ reject: reject
683
+ };
684
+ }
685
+ function resolveQueue(queue) {
686
+ if (queue && queue.status !== 1) {
687
+ queue.status = 1;
688
+ queue.forEach((fn)=>fn.queueCount--);
689
+ queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
690
+ }
691
+ }
692
+ function wrapDeps(deps) {
693
+ return deps.map((dep)=>{
694
+ if (dep !== null && typeof dep === 'object') {
695
+ if (isAsyncModuleExt(dep)) return dep;
696
+ if (isPromise(dep)) {
697
+ const queue = Object.assign([], {
698
+ status: 0
699
+ });
700
+ const obj = {
701
+ [turbopackExports]: {},
702
+ [turbopackQueues]: (fn)=>fn(queue)
703
+ };
704
+ dep.then((res)=>{
705
+ obj[turbopackExports] = res;
706
+ resolveQueue(queue);
707
+ }, (err)=>{
708
+ obj[turbopackError] = err;
709
+ resolveQueue(queue);
710
+ });
711
+ return obj;
712
+ }
713
+ }
714
+ return {
715
+ [turbopackExports]: dep,
716
+ [turbopackQueues]: ()=>{}
717
+ };
718
+ });
719
+ }
720
+ function asyncModule(body, hasAwait) {
721
+ const module = this.m;
722
+ const queue = hasAwait ? Object.assign([], {
723
+ status: -1
724
+ }) : undefined;
725
+ const depQueues = new Set();
726
+ const { resolve, reject, promise: rawPromise } = createPromise();
727
+ const promise = Object.assign(rawPromise, {
728
+ [turbopackExports]: module.exports,
729
+ [turbopackQueues]: (fn)=>{
730
+ queue && fn(queue);
731
+ depQueues.forEach(fn);
732
+ promise['catch'](()=>{});
733
+ }
734
+ });
735
+ const attributes = {
736
+ get () {
737
+ return promise;
738
+ },
739
+ set (v) {
740
+ // Calling `esmExport` leads to this.
741
+ if (v !== promise) {
742
+ promise[turbopackExports] = v;
743
+ }
744
+ }
745
+ };
746
+ Object.defineProperty(module, 'exports', attributes);
747
+ Object.defineProperty(module, 'namespaceObject', attributes);
748
+ function handleAsyncDependencies(deps) {
749
+ const currentDeps = wrapDeps(deps);
750
+ const getResult = ()=>currentDeps.map((d)=>{
751
+ if (d[turbopackError]) throw d[turbopackError];
752
+ return d[turbopackExports];
753
+ });
754
+ const { promise, resolve } = createPromise();
755
+ const fn = Object.assign(()=>resolve(getResult), {
756
+ queueCount: 0
757
+ });
758
+ function fnQueue(q) {
759
+ if (q !== queue && !depQueues.has(q)) {
760
+ depQueues.add(q);
761
+ if (q && q.status === 0) {
762
+ fn.queueCount++;
763
+ q.push(fn);
764
+ }
765
+ }
766
+ }
767
+ currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
768
+ return fn.queueCount ? promise : getResult();
769
+ }
770
+ function asyncResult(err) {
771
+ if (err) {
772
+ reject(promise[turbopackError] = err);
773
+ } else {
774
+ resolve(promise[turbopackExports]);
775
+ }
776
+ resolveQueue(queue);
777
+ }
778
+ body(handleAsyncDependencies, asyncResult);
779
+ if (queue && queue.status === -1) {
780
+ queue.status = 0;
781
+ }
782
+ }
783
+ contextPrototype.a = asyncModule;
784
+ /// <reference path="../shared/runtime/runtime-utils.ts" />
785
+ /// A 'base' utilities to support runtime can have externals.
786
+ /// Currently this is for node.js / edge runtime both.
787
+ /// If a fn requires node.js specific behavior, it should be placed in `node-external-utils` instead.
788
+ async function externalImport(id) {
789
+ let raw;
790
+ try {
791
+ raw = await import(id);
792
+ } catch (err) {
793
+ // TODO(alexkirsz) This can happen when a client-side module tries to load
794
+ // an external module we don't provide a shim for (e.g. querystring, url).
795
+ // For now, we fail semi-silently, but in the future this should be a
796
+ // compilation error.
797
+ throw new Error(`Failed to load external module ${id}: ${err}`);
798
+ }
799
+ if (raw && raw.__esModule && raw.default && 'default' in raw.default) {
800
+ return interopEsm(raw.default, createNS(raw), true);
801
+ }
802
+ return raw;
803
+ }
804
+ contextPrototype.y = externalImport;
805
+ function externalRequire(id, thunk, esm = false) {
806
+ let raw;
807
+ try {
808
+ raw = thunk();
809
+ } catch (err) {
810
+ // TODO(alexkirsz) This can happen when a client-side module tries to load
811
+ // an external module we don't provide a shim for (e.g. querystring, url).
812
+ // For now, we fail semi-silently, but in the future this should be a
813
+ // compilation error.
814
+ throw new Error(`Failed to load external module ${id}: ${err}`);
815
+ }
816
+ if (!esm || raw.__esModule) {
817
+ return raw;
818
+ }
819
+ return interopEsm(raw, createNS(raw), true);
820
+ }
821
+ externalRequire.resolve = (id, options)=>{
822
+ return require.resolve(id, options);
823
+ };
824
+ contextPrototype.x = externalRequire;
825
+ /* eslint-disable @typescript-eslint/no-unused-vars */ const path = require('path');
826
+ const relativePathToRuntimeRoot = path.relative(RUNTIME_PUBLIC_PATH, '.');
827
+ // Compute the relative path to the `distDir`.
828
+ const relativePathToDistRoot = path.join(relativePathToRuntimeRoot, RELATIVE_ROOT_PATH);
829
+ const RUNTIME_ROOT = path.resolve(__filename, relativePathToRuntimeRoot);
830
+ // Compute the absolute path to the root, by stripping distDir from the absolute path to this file.
831
+ const ABSOLUTE_ROOT = path.resolve(__filename, relativePathToDistRoot);
832
+ /**
833
+ * Returns an absolute path to the given module path.
834
+ * Module path should be relative, either path to a file or a directory.
835
+ *
836
+ * This fn allows to calculate an absolute path for some global static values, such as
837
+ * `__dirname` or `import.meta.url` that Turbopack will not embeds in compile time.
838
+ * See ImportMetaBinding::code_generation for the usage.
839
+ */ function resolveAbsolutePath(modulePath) {
840
+ if (modulePath) {
841
+ return path.join(ABSOLUTE_ROOT, modulePath);
842
+ }
843
+ return ABSOLUTE_ROOT;
844
+ }
845
+ Context.prototype.P = resolveAbsolutePath;
846
+ /**
847
+ * Returns an absolute `file://` URL for the given module path, which is
848
+ * relative to the project root or the named `root`.
849
+ *
850
+ * Uses `url.pathToFileURL` so that the resulting URL is a valid file URI on
851
+ * all platforms (forward slashes on Windows, drive letters handled
852
+ * correctly, path segments URL-encoded).
853
+ *
854
+ * The location of a named `root` isn't known at runtime (the output may have
855
+ * been moved away from the sources), so this returns a placeholder URL for it.
856
+ */ function resolveFileUrl(modulePath, root) {
857
+ if (root !== undefined) {
858
+ return placeholderFileUrl(modulePath, root);
859
+ }
860
+ return require('url').pathToFileURL(resolveAbsolutePath(modulePath)).href;
861
+ }
862
+ Context.prototype.F = resolveFileUrl;
863
+ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../../shared/runtime/runtime-utils.ts" />
864
+ /// <reference path="../../shared-node/base-externals-utils.ts" />
865
+ /// <reference path="../../shared-node/node-externals-utils.ts" />
866
+ /// <reference path="./nodejs-globals.d.ts" />
867
+ /**
868
+ * Base Node.js runtime shared between production and development.
869
+ * Contains chunk loading, module caching, and other non-HMR functionality.
870
+ */ process.env.TURBOPACK = '1';
871
+ const url = require('url');
872
+ const moduleFactories = new Map();
873
+ const moduleCache = new Map();
874
+ /**
875
+ * Returns an absolute path to the given module's id.
876
+ */ function resolvePathFromModule(moduleId) {
877
+ const exported = this.r(moduleId);
878
+ const exportedPath = exported?.default ?? exported;
879
+ if (typeof exportedPath !== 'string') {
880
+ return exported;
881
+ }
882
+ const strippedAssetPrefix = exportedPath.slice(ASSET_PREFIX.length);
883
+ const resolved = path.resolve(RUNTIME_ROOT, strippedAssetPrefix);
884
+ return url.pathToFileURL(resolved).href;
885
+ }
886
+ /**
887
+ * Exports a URL value. No suffix is added in Node.js runtime.
888
+ */ function exportUrl(urlValue, id) {
889
+ exportValue.call(this, urlValue, id);
890
+ }
891
+ function loadRuntimeChunk(sourcePath, chunkData) {
892
+ if (typeof chunkData === 'string') {
893
+ loadRuntimeChunkPath(sourcePath, chunkData);
894
+ } else {
895
+ loadRuntimeChunkPath(sourcePath, chunkData.path);
896
+ }
897
+ }
898
+ const loadedChunks = new Set();
899
+ const unsupportedLoadChunk = Promise.resolve(undefined);
900
+ const loadedChunk = Promise.resolve(undefined);
901
+ const chunkCache = new Map();
902
+ function clearChunkCache() {
903
+ chunkCache.clear();
904
+ loadedChunks.clear();
905
+ }
906
+ function loadRuntimeChunkPath(sourcePath, chunkPath) {
907
+ if (!isJs(chunkPath)) {
908
+ // We only support loading JS chunks in Node.js.
909
+ // This branch can be hit when trying to load a CSS chunk.
910
+ return;
911
+ }
912
+ if (loadedChunks.has(chunkPath)) {
913
+ return;
914
+ }
915
+ try {
916
+ const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
917
+ const chunkModules = require(resolved);
918
+ installCompressedModuleFactories(chunkModules, 0, moduleFactories);
919
+ loadedChunks.add(chunkPath);
920
+ } catch (cause) {
921
+ let errorMessage = `Failed to load chunk ${chunkPath}`;
922
+ if (sourcePath) {
923
+ errorMessage += ` from runtime for chunk ${sourcePath}`;
924
+ }
925
+ const error = new Error(errorMessage, {
926
+ cause
927
+ });
928
+ error.name = 'ChunkLoadError';
929
+ throw error;
930
+ }
931
+ }
932
+ function loadChunkAsync(chunkData) {
933
+ const chunkPath = typeof chunkData === 'string' ? chunkData : chunkData.path;
934
+ if (!isJs(chunkPath)) {
935
+ // We only support loading JS chunks in Node.js.
936
+ // This branch can be hit when trying to load a CSS chunk.
937
+ return unsupportedLoadChunk;
938
+ }
939
+ let entry = chunkCache.get(chunkPath);
940
+ if (entry === undefined) {
941
+ try {
942
+ // resolve to an absolute path to simplify `require` handling
943
+ const resolved = path.resolve(RUNTIME_ROOT, chunkPath);
944
+ // TODO: consider switching to `import()` to enable concurrent chunk loading and async file io
945
+ // However this is incompatible with hot reloading (since `import` doesn't use the require cache)
946
+ const chunkModules = require(resolved);
947
+ installCompressedModuleFactories(chunkModules, 0, moduleFactories);
948
+ entry = loadedChunk;
949
+ } catch (cause) {
950
+ const errorMessage = `Failed to load chunk ${chunkPath} from module ${this.m.id}`;
951
+ const error = new Error(errorMessage, {
952
+ cause
953
+ });
954
+ error.name = 'ChunkLoadError';
955
+ // Cache the failure promise, future requests will also get this same rejection
956
+ entry = Promise.reject(error);
957
+ }
958
+ chunkCache.set(chunkPath, entry);
959
+ }
960
+ // TODO: Return an instrumented Promise that React can use instead of relying on referential equality.
961
+ return entry;
962
+ }
963
+ contextPrototype.l = loadChunkAsync;
964
+ function loadChunkAsyncByUrl(chunkUrl) {
965
+ const path1 = url.fileURLToPath(new URL(chunkUrl, RUNTIME_ROOT));
966
+ return loadChunkAsync.call(this, path1);
967
+ }
968
+ contextPrototype.L = loadChunkAsyncByUrl;
969
+ // Shared runtime primitive: the root that on-disk chunk paths are resolved
970
+ // against. Used by the bundled wasm helper (exposed as `__turbopack_runtime_root__`).
971
+ contextPrototype.w = RUNTIME_ROOT;
972
+ const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
973
+ /**
974
+ * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
975
+ */ function isJs(chunkUrlOrPath) {
976
+ return regexJsUrl.test(chunkUrlOrPath);
977
+ }
978
+ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-base.ts" />
979
+ /**
980
+ * Production Node.js runtime.
981
+ * Uses ModuleWithDirection and simple module instantiation without HMR support.
982
+ */ // moduleCache and moduleFactories are declared in runtime-base.ts
983
+ // this is read in runtime-utils.ts so it creates a module with direction for hmr
984
+ createModuleWithDirectionFlag = true;
985
+ const nodeContextPrototype = Context.prototype;
986
+ nodeContextPrototype.q = exportUrl;
987
+ nodeContextPrototype.M = moduleFactories;
988
+ // Cast moduleCache to ModuleWithDirection for production mode
989
+ nodeContextPrototype.c = moduleCache;
990
+ nodeContextPrototype.R = resolvePathFromModule;
991
+ nodeContextPrototype.C = clearChunkCache;
992
+ function instantiateModule(id, sourceType, sourceData) {
993
+ const moduleFactory = moduleFactories.get(id);
994
+ if (typeof moduleFactory !== 'function') {
995
+ // This can happen if modules incorrectly handle HMR disposes/updates,
996
+ // e.g. when they keep a `setTimeout` around which still executes old code
997
+ // and contains e.g. a `require("something")` call.
998
+ throw new Error(factoryNotAvailableMessage(id, sourceType, sourceData));
999
+ }
1000
+ const module1 = createModuleWithDirection(id);
1001
+ const exports = module1.exports;
1002
+ moduleCache.set(id, module1);
1003
+ const context = new Context(module1, exports);
1004
+ // NOTE(alexkirsz) This can fail when the module encounters a runtime error.
1005
+ try {
1006
+ moduleFactory(context, module1, exports);
1007
+ } catch (error) {
1008
+ module1.error = error;
1009
+ throw error;
1010
+ }
1011
+ ;
1012
+ module1.loaded = true;
1013
+ if (module1.namespaceObject && module1.exports !== module1.namespaceObject) {
1014
+ // in case of a circular dependency: cjs1 -> esm2 -> cjs1
1015
+ interopEsm(module1.exports, module1.namespaceObject);
1016
+ }
1017
+ return module1;
1018
+ }
1019
+ /**
1020
+ * Retrieves a module from the cache, or instantiate it if it is not cached.
1021
+ */ // @ts-ignore
1022
+ function getOrInstantiateModuleFromParent(id, sourceModule) {
1023
+ const module1 = moduleCache.get(id);
1024
+ if (module1) {
1025
+ if (module1.error) {
1026
+ throw module1.error;
1027
+ }
1028
+ return module1;
1029
+ }
1030
+ return instantiateModule(id, SourceType.Parent, sourceModule.id);
1031
+ }
1032
+ /**
1033
+ * Instantiates a runtime module.
1034
+ */ function instantiateRuntimeModule(chunkPath, moduleId) {
1035
+ return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
1036
+ }
1037
+ /**
1038
+ * Retrieves a module from the cache, or instantiate it as a runtime module if it is not cached.
1039
+ */ // @ts-ignore TypeScript doesn't separate this module space from the browser runtime
1040
+ function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
1041
+ const module1 = moduleCache.get(moduleId);
1042
+ if (module1) {
1043
+ if (module1.error) {
1044
+ throw module1.error;
1045
+ }
1046
+ return module1;
1047
+ }
1048
+ return instantiateRuntimeModule(chunkPath, moduleId);
1049
+ }
1050
+ module.exports = (sourcePath)=>({
1051
+ m: (id)=>getOrInstantiateRuntimeModule(sourcePath, id),
1052
+ c: (chunkData)=>loadRuntimeChunk(sourcePath, chunkData)
1053
+ });
1054
+
1055
+
1056
+ //# sourceMappingURL=%5Bturbopack%5D_runtime.js.map