@kimuson/claude-code-viewer 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/README.md +0 -5
  2. package/dist/standalone/.next/BUILD_ID +1 -1
  3. package/dist/standalone/.next/app-build-manifest.json +17 -17
  4. package/dist/standalone/.next/app-path-routes-manifest.json +2 -2
  5. package/dist/standalone/.next/build-manifest.json +2 -2
  6. package/dist/standalone/.next/server/app/_not-found/page.js +1 -1
  7. package/dist/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
  8. package/dist/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  9. package/dist/standalone/.next/server/app/api/[[...route]]/route.js +2 -2
  10. package/dist/standalone/.next/server/app/api/[[...route]]/route_client-reference-manifest.js +1 -1
  11. package/dist/standalone/.next/server/app/page.js +2 -2
  12. package/dist/standalone/.next/server/app/page.js.nft.json +1 -1
  13. package/dist/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  14. package/dist/standalone/.next/server/app/projects/[projectId]/page.js +2 -2
  15. package/dist/standalone/.next/server/app/projects/[projectId]/page.js.nft.json +1 -1
  16. package/dist/standalone/.next/server/app/projects/[projectId]/page_client-reference-manifest.js +1 -1
  17. package/dist/standalone/.next/server/app/projects/[projectId]/sessions/[sessionId]/page.js +2 -2
  18. package/dist/standalone/.next/server/app/projects/[projectId]/sessions/[sessionId]/page.js.nft.json +1 -1
  19. package/dist/standalone/.next/server/app/projects/[projectId]/sessions/[sessionId]/page_client-reference-manifest.js +1 -1
  20. package/dist/standalone/.next/server/app/projects/page.js +1 -1
  21. package/dist/standalone/.next/server/app/projects/page.js.nft.json +1 -1
  22. package/dist/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
  23. package/dist/standalone/.next/server/app-paths-manifest.json +2 -2
  24. package/dist/standalone/.next/server/chunks/216.js +5 -0
  25. package/dist/standalone/.next/server/chunks/440.js +5 -0
  26. package/dist/standalone/.next/server/chunks/725.js +5 -0
  27. package/dist/standalone/.next/server/chunks/744.js +5 -0
  28. package/dist/standalone/.next/server/chunks/791.js +1 -1
  29. package/dist/standalone/.next/server/chunks/8.js +9 -0
  30. package/dist/standalone/.next/server/chunks/837.js +1 -0
  31. package/dist/standalone/.next/server/chunks/842.js +9 -0
  32. package/dist/standalone/.next/server/chunks/866.js +1 -0
  33. package/dist/standalone/.next/server/chunks/880.js +1 -0
  34. package/dist/standalone/.next/server/chunks/921.js +1 -0
  35. package/dist/standalone/.next/server/chunks/946.js +1 -0
  36. package/dist/standalone/.next/server/pages/500.html +1 -1
  37. package/dist/standalone/.next/server/pages/_app/build-manifest.json +24 -0
  38. package/dist/standalone/.next/server/pages/_app/client-build-manifest.json +5 -0
  39. package/dist/standalone/.next/server/pages/_app/next-font-manifest.json +6 -0
  40. package/dist/standalone/.next/server/pages/_app/pages-manifest.json +3 -0
  41. package/dist/standalone/.next/server/pages/_app/react-loadable-manifest.json +1 -0
  42. package/dist/standalone/.next/server/pages/_app.js.map +5 -0
  43. package/dist/standalone/.next/server/pages/_document/next-font-manifest.json +6 -0
  44. package/dist/standalone/.next/server/pages/_document/pages-manifest.json +3 -0
  45. package/dist/standalone/.next/server/pages/_document/react-loadable-manifest.json +1 -0
  46. package/dist/standalone/.next/server/pages/_document.js.map +5 -0
  47. package/dist/standalone/.next/server/pages/_error/build-manifest.json +24 -0
  48. package/dist/standalone/.next/server/pages/_error/client-build-manifest.json +5 -0
  49. package/dist/standalone/.next/server/pages/_error/next-font-manifest.json +6 -0
  50. package/dist/standalone/.next/server/pages/_error/pages-manifest.json +3 -0
  51. package/dist/standalone/.next/server/pages/_error/react-loadable-manifest.json +1 -0
  52. package/dist/standalone/.next/server/pages/_error.js.map +5 -0
  53. package/dist/standalone/.next/static/-C_aw5qp4WRpZLxKvls_q/_buildManifest.js +1 -0
  54. package/dist/standalone/.next/static/-C_aw5qp4WRpZLxKvls_q/_ssgManifest.js +1 -0
  55. package/dist/standalone/.next/static/23uvba8RlaxCaoa5OiBQP/_buildManifest.js +1 -0
  56. package/dist/standalone/.next/static/23uvba8RlaxCaoa5OiBQP/_ssgManifest.js +1 -0
  57. package/dist/standalone/.next/static/7c2VjICJUWm7vUD2fAum8/_buildManifest.js +1 -0
  58. package/dist/standalone/.next/static/7c2VjICJUWm7vUD2fAum8/_ssgManifest.js +1 -0
  59. package/dist/standalone/.next/static/9SDA_h7WDmmoFWPbps4Fn/_buildManifest.js +1 -0
  60. package/dist/standalone/.next/static/9SDA_h7WDmmoFWPbps4Fn/_ssgManifest.js +1 -0
  61. package/dist/standalone/.next/static/Da8e6NLQq01CAFo8O13j6/_buildManifest.js +1 -0
  62. package/dist/standalone/.next/static/Da8e6NLQq01CAFo8O13j6/_ssgManifest.js +1 -0
  63. package/dist/standalone/.next/static/GD7LQJ8gE1cW_fRed-j1C/_buildManifest.js +1 -0
  64. package/dist/standalone/.next/static/GD7LQJ8gE1cW_fRed-j1C/_ssgManifest.js +1 -0
  65. package/dist/standalone/.next/static/H-5h51WEzU2ys-hWA4OUt/_buildManifest.js +1 -0
  66. package/dist/standalone/.next/static/H-5h51WEzU2ys-hWA4OUt/_ssgManifest.js +1 -0
  67. package/dist/standalone/.next/static/L2hEa9LvG28lUDLLpdKW9/_buildManifest.js +1 -0
  68. package/dist/standalone/.next/static/L2hEa9LvG28lUDLLpdKW9/_ssgManifest.js +1 -0
  69. package/dist/standalone/.next/static/O43uyF0ac2ZdNoZ1ZCnKf/_buildManifest.js +1 -0
  70. package/dist/standalone/.next/static/O43uyF0ac2ZdNoZ1ZCnKf/_ssgManifest.js +1 -0
  71. package/dist/standalone/.next/static/PyI7qeky3k1jffXuSFrjs/_buildManifest.js +1 -0
  72. package/dist/standalone/.next/static/PyI7qeky3k1jffXuSFrjs/_ssgManifest.js +1 -0
  73. package/dist/standalone/.next/static/WqxyAkkmDIRWMgidzO8Db/_buildManifest.js +1 -0
  74. package/dist/standalone/.next/static/WqxyAkkmDIRWMgidzO8Db/_ssgManifest.js +1 -0
  75. package/dist/standalone/.next/static/ZeOFUJB_IZeb5OILHne1z/_buildManifest.js +1 -0
  76. package/dist/standalone/.next/static/ZeOFUJB_IZeb5OILHne1z/_ssgManifest.js +1 -0
  77. package/dist/standalone/.next/static/chunks/105-a007546befae4563.js +1 -0
  78. package/dist/standalone/.next/static/chunks/185-711c14dc27c4bc61.js +1 -0
  79. package/dist/standalone/.next/static/chunks/24-ffb10c209d2142dc.js +1 -0
  80. package/dist/standalone/.next/static/chunks/281-795fb16f0b06afb8.js +1 -0
  81. package/dist/standalone/.next/static/chunks/498-00a3d5dd9837a27f.js +16 -0
  82. package/dist/standalone/.next/static/chunks/5-ab2b7527e79dd03f.js +1 -0
  83. package/dist/standalone/.next/static/chunks/5-c3f389512791ecb2.js +1 -0
  84. package/dist/standalone/.next/static/chunks/642-114376e98078b3eb.js +1 -0
  85. package/dist/standalone/.next/static/chunks/648-038543aa7a87beca.js +1 -0
  86. package/dist/standalone/.next/static/chunks/693-5c7ba2352f548e34.js +1 -0
  87. package/dist/standalone/.next/static/chunks/693-7e9bae18be0d9c6b.js +1 -0
  88. package/dist/standalone/.next/static/chunks/693-b3b27b94a68ea0bc.js +1 -0
  89. package/dist/standalone/.next/static/chunks/693-c42159ca627810b6.js +1 -0
  90. package/dist/standalone/.next/static/chunks/693-c4a72446cbe56a20.js +1 -0
  91. package/dist/standalone/.next/static/chunks/693-e95ee9bc25076ecd.js +1 -0
  92. package/dist/standalone/.next/static/chunks/693-e99fc5f3437674b1.js +1 -0
  93. package/dist/standalone/.next/static/chunks/719-ffb34f83f1a29ef9.js +16 -0
  94. package/dist/standalone/.next/static/chunks/888-4f8c8a1dbfc2f887.js +1 -0
  95. package/dist/standalone/.next/static/chunks/889-c7b6397ab2356461.js +16 -0
  96. package/dist/standalone/.next/static/chunks/[next]_entry_page-loader_ts_0196946f._.js +23 -0
  97. package/dist/standalone/.next/static/chunks/[next]_entry_page-loader_ts_0196946f._.js.map +6 -0
  98. package/dist/standalone/.next/static/chunks/[next]_entry_page-loader_ts_fa2ec1ea._.js +23 -0
  99. package/dist/standalone/.next/static/chunks/[next]_entry_page-loader_ts_fa2ec1ea._.js.map +6 -0
  100. package/dist/standalone/.next/static/chunks/[root-of-the-server]__092393de._.js +481 -0
  101. package/dist/standalone/.next/static/chunks/[root-of-the-server]__092393de._.js.map +6 -0
  102. package/dist/standalone/.next/static/chunks/[root-of-the-server]__45f039c3._.js +481 -0
  103. package/dist/standalone/.next/static/chunks/[root-of-the-server]__45f039c3._.js.map +6 -0
  104. package/dist/standalone/.next/static/chunks/app/layout-b6165efd2dda60fa.js +1 -0
  105. package/dist/standalone/.next/static/chunks/app/layout-dae4ccdd1163e4b9.js +1 -0
  106. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/page-1581695cbf18ca8f.js +1 -0
  107. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/page-2d759c1ef2fc1f3f.js +1 -0
  108. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/page-994bb53630390872.js +1 -0
  109. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/page-b31f4471e31e815a.js +1 -0
  110. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/page-d26a7b8eac784a60.js +1 -0
  111. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-05274c303803f9e5.js +1 -0
  112. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-0e763809b4b33824.js +1 -0
  113. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-34e0546e8de7d155.js +1 -0
  114. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-4df39886af6c75d0.js +1 -0
  115. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-57ace7dee9bb2e7e.js +1 -0
  116. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-613351836e4c27fb.js +1 -0
  117. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-8bb6f1f7fa3696bc.js +1 -0
  118. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-b77875877f3d28d0.js +1 -0
  119. package/dist/standalone/.next/static/chunks/app/projects/[projectId]/sessions/[sessionId]/page-b87566287155f190.js +1 -0
  120. package/dist/standalone/.next/static/chunks/app/projects/page-41b00f4e43f17357.js +1 -0
  121. package/dist/standalone/.next/static/chunks/app/projects/page-eb83c5ea58201eab.js +1 -0
  122. package/dist/standalone/.next/static/chunks/b5d7d_next_app_49bc0f6c.js +8 -0
  123. package/dist/standalone/.next/static/chunks/b5d7d_next_app_49bc0f6c.js.map +6 -0
  124. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_bbef2511._.js +2107 -0
  125. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_bbef2511._.js.map +26 -0
  126. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_c8a9b47e._.js +1942 -0
  127. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_c8a9b47e._.js.map +25 -0
  128. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_client_aca12300._.js +4030 -0
  129. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_client_aca12300._.js.map +45 -0
  130. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_compiled_950aaaf6._.js +2222 -0
  131. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_compiled_950aaaf6._.js.map +16 -0
  132. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_compiled_next-devtools_index_6fd12744.js +28954 -0
  133. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_compiled_next-devtools_index_6fd12744.js.map +6 -0
  134. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_shared_lib_754ee35b._.js +5164 -0
  135. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_shared_lib_754ee35b._.js.map +62 -0
  136. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_shared_lib_deb14b6a._.js +5455 -0
  137. package/dist/standalone/.next/static/chunks/b5d7d_next_dist_shared_lib_deb14b6a._.js.map +66 -0
  138. package/dist/standalone/.next/static/chunks/b5d7d_next_error_f5f4698d.js +8 -0
  139. package/dist/standalone/.next/static/chunks/b5d7d_next_error_f5f4698d.js.map +6 -0
  140. package/dist/standalone/.next/static/chunks/c8656_react-dom_b208eddd._.js +14182 -0
  141. package/dist/standalone/.next/static/chunks/c8656_react-dom_b208eddd._.js.map +9 -0
  142. package/dist/standalone/.next/static/chunks/node_modules__pnpm_7dc0a620._.js +1336 -0
  143. package/dist/standalone/.next/static/chunks/node_modules__pnpm_7dc0a620._.js.map +16 -0
  144. package/dist/standalone/.next/static/chunks/pages/_app.js +14 -0
  145. package/dist/standalone/.next/static/chunks/pages/_error.js +14 -0
  146. package/dist/standalone/.next/static/chunks/pages__app_2da965e7._.js +16 -0
  147. package/dist/standalone/.next/static/chunks/pages__app_5e653343._.js.map +10 -0
  148. package/dist/standalone/.next/static/chunks/pages__error_2da965e7._.js +16 -0
  149. package/dist/standalone/.next/static/chunks/pages__error_57ca05a1._.js.map +10 -0
  150. package/dist/standalone/.next/static/chunks/turbopack-pages__app_5e653343._.js +1823 -0
  151. package/dist/standalone/.next/static/chunks/turbopack-pages__error_57ca05a1._.js +1823 -0
  152. package/dist/standalone/.next/static/css/09df4ee87d7591ca.css +3 -0
  153. package/dist/standalone/.next/static/css/36303a8dc8947596.css +3 -0
  154. package/dist/standalone/.next/static/css/79abaac46cb1972c.css +3 -0
  155. package/dist/standalone/.next/static/css/b871907fe73de1d5.css +3 -0
  156. package/dist/standalone/.next/static/css/b911fd9edbcfba1e.css +3 -0
  157. package/dist/standalone/.next/static/gHcDMwTmj2EUNXWVFDlCZ/_buildManifest.js +1 -0
  158. package/dist/standalone/.next/static/gHcDMwTmj2EUNXWVFDlCZ/_ssgManifest.js +1 -0
  159. package/dist/standalone/.next/static/gJy76OTvdPcbpfkijLfv_/_buildManifest.js +1 -0
  160. package/dist/standalone/.next/static/gJy76OTvdPcbpfkijLfv_/_ssgManifest.js +1 -0
  161. package/dist/standalone/.next/static/lr9BjpI_yzrMDd09cVRXH/_buildManifest.js +1 -0
  162. package/dist/standalone/.next/static/lr9BjpI_yzrMDd09cVRXH/_ssgManifest.js +1 -0
  163. package/dist/standalone/.next/static/p5lIOxOLNncFm4zH1-_ip/_buildManifest.js +1 -0
  164. package/dist/standalone/.next/static/p5lIOxOLNncFm4zH1-_ip/_ssgManifest.js +1 -0
  165. package/dist/standalone/.next/static/zS7AFHKjuHulYMQ1_wDup/_buildManifest.js +1 -0
  166. package/dist/standalone/.next/static/zS7AFHKjuHulYMQ1_wDup/_ssgManifest.js +1 -0
  167. package/dist/standalone/package.json +8 -1
  168. package/package.json +8 -1
@@ -0,0 +1,1823 @@
1
+ (globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([
2
+ typeof document === "object" ? document.currentScript : undefined,
3
+ {"otherChunks":["static/chunks/b5d7d_next_dist_compiled_next-devtools_index_6fd12744.js","static/chunks/b5d7d_next_dist_compiled_950aaaf6._.js","static/chunks/b5d7d_next_dist_shared_lib_754ee35b._.js","static/chunks/b5d7d_next_dist_client_aca12300._.js","static/chunks/b5d7d_next_dist_c8a9b47e._.js","static/chunks/b5d7d_next_app_49bc0f6c.js","static/chunks/[next]_entry_page-loader_ts_fa2ec1ea._.js","static/chunks/c8656_react-dom_b208eddd._.js","static/chunks/node_modules__pnpm_7dc0a620._.js","static/chunks/[root-of-the-server]__45f039c3._.js"],"runtimeModuleIds":["[project]/node_modules/.pnpm/next@15.5.2_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/compiled/@next/react-refresh-utils/dist/runtime.js [client] (ecmascript)","[project]/node_modules/.pnpm/next@15.5.2_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/client/next-dev-turbopack.js [client] (ecmascript)","[hmr-entry]/hmr-entry.js { ENTRY => \"[project]/pages/_app\" }"]}
4
+ ]);
5
+ (() => {
6
+ if (!Array.isArray(globalThis.TURBOPACK)) {
7
+ return;
8
+ }
9
+
10
+ const CHUNK_BASE_PATH = "/_next/";
11
+ const CHUNK_SUFFIX_PATH = "";
12
+ const RELATIVE_ROOT_PATH = "/ROOT";
13
+ const RUNTIME_PUBLIC_PATH = "/_next/";
14
+ /**
15
+ * This file contains runtime types and functions that are shared between all
16
+ * TurboPack ECMAScript runtimes.
17
+ *
18
+ * It will be prepended to the runtime code of each runtime.
19
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="./runtime-types.d.ts" />
20
+ const REEXPORTED_OBJECTS = new WeakMap();
21
+ /**
22
+ * Constructs the `__turbopack_context__` object for a module.
23
+ */ function Context(module, exports) {
24
+ this.m = module;
25
+ // We need to store this here instead of accessing it from the module object to:
26
+ // 1. Make it available to factories directly, since we rewrite `this` to
27
+ // `__turbopack_context__.e` in CJS modules.
28
+ // 2. Support async modules which rewrite `module.exports` to a promise, so we
29
+ // can still access the original exports object from functions like
30
+ // `esmExport`
31
+ // Ideally we could find a new approach for async modules and drop this property altogether.
32
+ this.e = exports;
33
+ }
34
+ const contextPrototype = Context.prototype;
35
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
36
+ const toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag;
37
+ function defineProp(obj, name, options) {
38
+ if (!hasOwnProperty.call(obj, name)) Object.defineProperty(obj, name, options);
39
+ }
40
+ function getOverwrittenModule(moduleCache, id) {
41
+ let module = moduleCache[id];
42
+ if (!module) {
43
+ // This is invoked when a module is merged into another module, thus it wasn't invoked via
44
+ // instantiateModule and the cache entry wasn't created yet.
45
+ module = createModuleObject(id);
46
+ moduleCache[id] = module;
47
+ }
48
+ return module;
49
+ }
50
+ /**
51
+ * Creates the module object. Only done here to ensure all module objects have the same shape.
52
+ */ function createModuleObject(id) {
53
+ return {
54
+ exports: {},
55
+ error: undefined,
56
+ id,
57
+ namespaceObject: undefined
58
+ };
59
+ }
60
+ /**
61
+ * Adds the getters to the exports object.
62
+ */ function esm(exports, getters) {
63
+ defineProp(exports, '__esModule', {
64
+ value: true
65
+ });
66
+ if (toStringTag) defineProp(exports, toStringTag, {
67
+ value: 'Module'
68
+ });
69
+ let i = 0;
70
+ while(i < getters.length){
71
+ const propName = getters[i++];
72
+ // TODO(luke.sandberg): we could support raw values here, but would need a discriminator beyond 'not a function'
73
+ const getter = getters[i++];
74
+ if (typeof getters[i] === 'function') {
75
+ // a setter
76
+ defineProp(exports, propName, {
77
+ get: getter,
78
+ set: getters[i++],
79
+ enumerable: true
80
+ });
81
+ } else {
82
+ defineProp(exports, propName, {
83
+ get: getter,
84
+ enumerable: true
85
+ });
86
+ }
87
+ }
88
+ Object.seal(exports);
89
+ }
90
+ /**
91
+ * Makes the module an ESM with exports
92
+ */ function esmExport(getters, id) {
93
+ let module;
94
+ let exports;
95
+ if (id != null) {
96
+ module = getOverwrittenModule(this.c, id);
97
+ exports = module.exports;
98
+ } else {
99
+ module = this.m;
100
+ exports = this.e;
101
+ }
102
+ module.namespaceObject = exports;
103
+ esm(exports, getters);
104
+ }
105
+ contextPrototype.s = esmExport;
106
+ function ensureDynamicExports(module, exports) {
107
+ let reexportedObjects = REEXPORTED_OBJECTS.get(module);
108
+ if (!reexportedObjects) {
109
+ REEXPORTED_OBJECTS.set(module, reexportedObjects = []);
110
+ module.exports = module.namespaceObject = new Proxy(exports, {
111
+ get (target, prop) {
112
+ if (hasOwnProperty.call(target, prop) || prop === 'default' || prop === '__esModule') {
113
+ return Reflect.get(target, prop);
114
+ }
115
+ for (const obj of reexportedObjects){
116
+ const value = Reflect.get(obj, prop);
117
+ if (value !== undefined) return value;
118
+ }
119
+ return undefined;
120
+ },
121
+ ownKeys (target) {
122
+ const keys = Reflect.ownKeys(target);
123
+ for (const obj of reexportedObjects){
124
+ for (const key of Reflect.ownKeys(obj)){
125
+ if (key !== 'default' && !keys.includes(key)) keys.push(key);
126
+ }
127
+ }
128
+ return keys;
129
+ }
130
+ });
131
+ }
132
+ return reexportedObjects;
133
+ }
134
+ /**
135
+ * Dynamically exports properties from an object
136
+ */ function dynamicExport(object, id) {
137
+ let module;
138
+ let exports;
139
+ if (id != null) {
140
+ module = getOverwrittenModule(this.c, id);
141
+ exports = module.exports;
142
+ } else {
143
+ module = this.m;
144
+ exports = this.e;
145
+ }
146
+ const reexportedObjects = ensureDynamicExports(module, exports);
147
+ if (typeof object === 'object' && object !== null) {
148
+ reexportedObjects.push(object);
149
+ }
150
+ }
151
+ contextPrototype.j = dynamicExport;
152
+ function exportValue(value, id) {
153
+ let module;
154
+ if (id != null) {
155
+ module = getOverwrittenModule(this.c, id);
156
+ } else {
157
+ module = this.m;
158
+ }
159
+ module.exports = value;
160
+ }
161
+ contextPrototype.v = exportValue;
162
+ function exportNamespace(namespace, id) {
163
+ let module;
164
+ if (id != null) {
165
+ module = getOverwrittenModule(this.c, id);
166
+ } else {
167
+ module = this.m;
168
+ }
169
+ module.exports = module.namespaceObject = namespace;
170
+ }
171
+ contextPrototype.n = exportNamespace;
172
+ function createGetter(obj, key) {
173
+ return ()=>obj[key];
174
+ }
175
+ /**
176
+ * @returns prototype of the object
177
+ */ const getProto = Object.getPrototypeOf ? (obj)=>Object.getPrototypeOf(obj) : (obj)=>obj.__proto__;
178
+ /** Prototypes that are not expanded for exports */ const LEAF_PROTOTYPES = [
179
+ null,
180
+ getProto({}),
181
+ getProto([]),
182
+ getProto(getProto)
183
+ ];
184
+ /**
185
+ * @param raw
186
+ * @param ns
187
+ * @param allowExportDefault
188
+ * * `false`: will have the raw module as default export
189
+ * * `true`: will have the default property as default export
190
+ */ function interopEsm(raw, ns, allowExportDefault) {
191
+ const getters = [];
192
+ // The index of the `default` export if any
193
+ let defaultLocation = -1;
194
+ for(let current = raw; (typeof current === 'object' || typeof current === 'function') && !LEAF_PROTOTYPES.includes(current); current = getProto(current)){
195
+ for (const key of Object.getOwnPropertyNames(current)){
196
+ getters.push(key, createGetter(raw, key));
197
+ if (defaultLocation === -1 && key === 'default') {
198
+ defaultLocation = getters.length - 1;
199
+ }
200
+ }
201
+ }
202
+ // this is not really correct
203
+ // we should set the `default` getter if the imported module is a `.cjs file`
204
+ if (!(allowExportDefault && defaultLocation >= 0)) {
205
+ // Replace the binding with one for the namespace itself in order to preserve iteration order.
206
+ if (defaultLocation >= 0) {
207
+ getters[defaultLocation] = ()=>raw;
208
+ } else {
209
+ getters.push('default', ()=>raw);
210
+ }
211
+ }
212
+ esm(ns, getters);
213
+ return ns;
214
+ }
215
+ function createNS(raw) {
216
+ if (typeof raw === 'function') {
217
+ return function(...args) {
218
+ return raw.apply(this, args);
219
+ };
220
+ } else {
221
+ return Object.create(null);
222
+ }
223
+ }
224
+ function esmImport(id) {
225
+ const module = getOrInstantiateModuleFromParent(id, this.m);
226
+ // any ES module has to have `module.namespaceObject` defined.
227
+ if (module.namespaceObject) return module.namespaceObject;
228
+ // only ESM can be an async module, so we don't need to worry about exports being a promise here.
229
+ const raw = module.exports;
230
+ return module.namespaceObject = interopEsm(raw, createNS(raw), raw && raw.__esModule);
231
+ }
232
+ contextPrototype.i = esmImport;
233
+ function asyncLoader(moduleId) {
234
+ const loader = this.r(moduleId);
235
+ return loader(this.i.bind(this));
236
+ }
237
+ contextPrototype.A = asyncLoader;
238
+ // Add a simple runtime require so that environments without one can still pass
239
+ // `typeof require` CommonJS checks so that exports are correctly registered.
240
+ const runtimeRequire = // @ts-ignore
241
+ typeof require === 'function' ? require : function require1() {
242
+ throw new Error('Unexpected use of runtime require');
243
+ };
244
+ contextPrototype.t = runtimeRequire;
245
+ function commonJsRequire(id) {
246
+ return getOrInstantiateModuleFromParent(id, this.m).exports;
247
+ }
248
+ contextPrototype.r = commonJsRequire;
249
+ /**
250
+ * `require.context` and require/import expression runtime.
251
+ */ function moduleContext(map) {
252
+ function moduleContext(id) {
253
+ if (hasOwnProperty.call(map, id)) {
254
+ return map[id].module();
255
+ }
256
+ const e = new Error(`Cannot find module '${id}'`);
257
+ e.code = 'MODULE_NOT_FOUND';
258
+ throw e;
259
+ }
260
+ moduleContext.keys = ()=>{
261
+ return Object.keys(map);
262
+ };
263
+ moduleContext.resolve = (id)=>{
264
+ if (hasOwnProperty.call(map, id)) {
265
+ return map[id].id();
266
+ }
267
+ const e = new Error(`Cannot find module '${id}'`);
268
+ e.code = 'MODULE_NOT_FOUND';
269
+ throw e;
270
+ };
271
+ moduleContext.import = async (id)=>{
272
+ return await moduleContext(id);
273
+ };
274
+ return moduleContext;
275
+ }
276
+ contextPrototype.f = moduleContext;
277
+ /**
278
+ * Returns the path of a chunk defined by its data.
279
+ */ function getChunkPath(chunkData) {
280
+ return typeof chunkData === 'string' ? chunkData : chunkData.path;
281
+ }
282
+ function isPromise(maybePromise) {
283
+ return maybePromise != null && typeof maybePromise === 'object' && 'then' in maybePromise && typeof maybePromise.then === 'function';
284
+ }
285
+ function isAsyncModuleExt(obj) {
286
+ return turbopackQueues in obj;
287
+ }
288
+ function createPromise() {
289
+ let resolve;
290
+ let reject;
291
+ const promise = new Promise((res, rej)=>{
292
+ reject = rej;
293
+ resolve = res;
294
+ });
295
+ return {
296
+ promise,
297
+ resolve: resolve,
298
+ reject: reject
299
+ };
300
+ }
301
+ // Load the CompressedmoduleFactories of a chunk into the `moduleFactories` Map.
302
+ // The CompressedModuleFactories format is
303
+ // - 1 or more module ids
304
+ // - a module factory function
305
+ // So walking this is a little complex but the flat structure is also fast to
306
+ // traverse, we can use `typeof` operators to distinguish the two cases.
307
+ function installCompressedModuleFactories(chunkModules, offset, moduleFactories, newModuleId) {
308
+ let i = offset;
309
+ while(i < chunkModules.length){
310
+ let moduleId = chunkModules[i];
311
+ let end = i + 1;
312
+ // Find our factory function
313
+ while(end < chunkModules.length && typeof chunkModules[end] !== 'function'){
314
+ end++;
315
+ }
316
+ if (end === chunkModules.length) {
317
+ throw new Error('malformed chunk format, expected a factory function');
318
+ }
319
+ // Each chunk item has a 'primary id' and optional additional ids. If the primary id is already
320
+ // present we know all the additional ids are also present, so we don't need to check.
321
+ if (!moduleFactories.has(moduleId)) {
322
+ const moduleFactoryFn = chunkModules[end];
323
+ applyModuleFactoryName(moduleFactoryFn);
324
+ newModuleId?.(moduleId);
325
+ for(; i < end; i++){
326
+ moduleId = chunkModules[i];
327
+ moduleFactories.set(moduleId, moduleFactoryFn);
328
+ }
329
+ }
330
+ i = end + 1; // end is pointing at the last factory advance to the next id or the end of the array.
331
+ }
332
+ }
333
+ // everything below is adapted from webpack
334
+ // https://github.com/webpack/webpack/blob/6be4065ade1e252c1d8dcba4af0f43e32af1bdc1/lib/runtime/AsyncModuleRuntimeModule.js#L13
335
+ const turbopackQueues = Symbol('turbopack queues');
336
+ const turbopackExports = Symbol('turbopack exports');
337
+ const turbopackError = Symbol('turbopack error');
338
+ function resolveQueue(queue) {
339
+ if (queue && queue.status !== 1) {
340
+ queue.status = 1;
341
+ queue.forEach((fn)=>fn.queueCount--);
342
+ queue.forEach((fn)=>fn.queueCount-- ? fn.queueCount++ : fn());
343
+ }
344
+ }
345
+ function wrapDeps(deps) {
346
+ return deps.map((dep)=>{
347
+ if (dep !== null && typeof dep === 'object') {
348
+ if (isAsyncModuleExt(dep)) return dep;
349
+ if (isPromise(dep)) {
350
+ const queue = Object.assign([], {
351
+ status: 0
352
+ });
353
+ const obj = {
354
+ [turbopackExports]: {},
355
+ [turbopackQueues]: (fn)=>fn(queue)
356
+ };
357
+ dep.then((res)=>{
358
+ obj[turbopackExports] = res;
359
+ resolveQueue(queue);
360
+ }, (err)=>{
361
+ obj[turbopackError] = err;
362
+ resolveQueue(queue);
363
+ });
364
+ return obj;
365
+ }
366
+ }
367
+ return {
368
+ [turbopackExports]: dep,
369
+ [turbopackQueues]: ()=>{}
370
+ };
371
+ });
372
+ }
373
+ function asyncModule(body, hasAwait) {
374
+ const module = this.m;
375
+ const queue = hasAwait ? Object.assign([], {
376
+ status: -1
377
+ }) : undefined;
378
+ const depQueues = new Set();
379
+ const { resolve, reject, promise: rawPromise } = createPromise();
380
+ const promise = Object.assign(rawPromise, {
381
+ [turbopackExports]: module.exports,
382
+ [turbopackQueues]: (fn)=>{
383
+ queue && fn(queue);
384
+ depQueues.forEach(fn);
385
+ promise['catch'](()=>{});
386
+ }
387
+ });
388
+ const attributes = {
389
+ get () {
390
+ return promise;
391
+ },
392
+ set (v) {
393
+ // Calling `esmExport` leads to this.
394
+ if (v !== promise) {
395
+ promise[turbopackExports] = v;
396
+ }
397
+ }
398
+ };
399
+ Object.defineProperty(module, 'exports', attributes);
400
+ Object.defineProperty(module, 'namespaceObject', attributes);
401
+ function handleAsyncDependencies(deps) {
402
+ const currentDeps = wrapDeps(deps);
403
+ const getResult = ()=>currentDeps.map((d)=>{
404
+ if (d[turbopackError]) throw d[turbopackError];
405
+ return d[turbopackExports];
406
+ });
407
+ const { promise, resolve } = createPromise();
408
+ const fn = Object.assign(()=>resolve(getResult), {
409
+ queueCount: 0
410
+ });
411
+ function fnQueue(q) {
412
+ if (q !== queue && !depQueues.has(q)) {
413
+ depQueues.add(q);
414
+ if (q && q.status === 0) {
415
+ fn.queueCount++;
416
+ q.push(fn);
417
+ }
418
+ }
419
+ }
420
+ currentDeps.map((dep)=>dep[turbopackQueues](fnQueue));
421
+ return fn.queueCount ? promise : getResult();
422
+ }
423
+ function asyncResult(err) {
424
+ if (err) {
425
+ reject(promise[turbopackError] = err);
426
+ } else {
427
+ resolve(promise[turbopackExports]);
428
+ }
429
+ resolveQueue(queue);
430
+ }
431
+ body(handleAsyncDependencies, asyncResult);
432
+ if (queue && queue.status === -1) {
433
+ queue.status = 0;
434
+ }
435
+ }
436
+ contextPrototype.a = asyncModule;
437
+ /**
438
+ * A pseudo "fake" URL object to resolve to its relative path.
439
+ *
440
+ * When UrlRewriteBehavior is set to relative, calls to the `new URL()` will construct url without base using this
441
+ * runtime function to generate context-agnostic urls between different rendering context, i.e ssr / client to avoid
442
+ * hydration mismatch.
443
+ *
444
+ * This is based on webpack's existing implementation:
445
+ * https://github.com/webpack/webpack/blob/87660921808566ef3b8796f8df61bd79fc026108/lib/runtime/RelativeUrlRuntimeModule.js
446
+ */ const relativeURL = function relativeURL(inputUrl) {
447
+ const realUrl = new URL(inputUrl, 'x:/');
448
+ const values = {};
449
+ for(const key in realUrl)values[key] = realUrl[key];
450
+ values.href = inputUrl;
451
+ values.pathname = inputUrl.replace(/[?#].*/, '');
452
+ values.origin = values.protocol = '';
453
+ values.toString = values.toJSON = (..._args)=>inputUrl;
454
+ for(const key in values)Object.defineProperty(this, key, {
455
+ enumerable: true,
456
+ configurable: true,
457
+ value: values[key]
458
+ });
459
+ };
460
+ relativeURL.prototype = URL.prototype;
461
+ contextPrototype.U = relativeURL;
462
+ /**
463
+ * Utility function to ensure all variants of an enum are handled.
464
+ */ function invariant(never, computeMessage) {
465
+ throw new Error(`Invariant: ${computeMessage(never)}`);
466
+ }
467
+ /**
468
+ * A stub function to make `require` available but non-functional in ESM.
469
+ */ function requireStub(_moduleId) {
470
+ throw new Error('dynamic usage of require is not supported');
471
+ }
472
+ contextPrototype.z = requireStub;
473
+ // Make `globalThis` available to the module in a way that cannot be shadowed by a local variable.
474
+ contextPrototype.g = globalThis;
475
+ function applyModuleFactoryName(factory) {
476
+ // Give the module factory a nice name to improve stack traces.
477
+ Object.defineProperty(factory, 'name', {
478
+ value: '__TURBOPACK__module__evaluation__'
479
+ });
480
+ }
481
+ /**
482
+ * This file contains runtime types and functions that are shared between all
483
+ * Turbopack *development* ECMAScript runtimes.
484
+ *
485
+ * It will be appended to the runtime code of each runtime right after the
486
+ * shared runtime utils.
487
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../base/globals.d.ts" />
488
+ /// <reference path="../../../shared/runtime-utils.ts" />
489
+ // Used in WebWorkers to tell the runtime about the chunk base path
490
+ const browserContextPrototype = Context.prototype;
491
+ var SourceType = /*#__PURE__*/ function(SourceType) {
492
+ /**
493
+ * The module was instantiated because it was included in an evaluated chunk's
494
+ * runtime.
495
+ * SourceData is a ChunkPath.
496
+ */ SourceType[SourceType["Runtime"] = 0] = "Runtime";
497
+ /**
498
+ * The module was instantiated because a parent module imported it.
499
+ * SourceData is a ModuleId.
500
+ */ SourceType[SourceType["Parent"] = 1] = "Parent";
501
+ /**
502
+ * The module was instantiated because it was included in a chunk's hot module
503
+ * update.
504
+ * SourceData is an array of ModuleIds or undefined.
505
+ */ SourceType[SourceType["Update"] = 2] = "Update";
506
+ return SourceType;
507
+ }(SourceType || {});
508
+ const moduleFactories = new Map();
509
+ contextPrototype.M = moduleFactories;
510
+ const availableModules = new Map();
511
+ const availableModuleChunks = new Map();
512
+ function factoryNotAvailable(moduleId, sourceType, sourceData) {
513
+ let instantiationReason;
514
+ switch(sourceType){
515
+ case 0:
516
+ instantiationReason = `as a runtime entry of chunk ${sourceData}`;
517
+ break;
518
+ case 1:
519
+ instantiationReason = `because it was required from module ${sourceData}`;
520
+ break;
521
+ case 2:
522
+ instantiationReason = 'because of an HMR update';
523
+ break;
524
+ default:
525
+ invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
526
+ }
527
+ throw new Error(`Module ${moduleId} was instantiated ${instantiationReason}, but the module factory is not available. It might have been deleted in an HMR update.`);
528
+ }
529
+ function loadChunk(chunkData) {
530
+ return loadChunkInternal(1, this.m.id, chunkData);
531
+ }
532
+ browserContextPrototype.l = loadChunk;
533
+ function loadInitialChunk(chunkPath, chunkData) {
534
+ return loadChunkInternal(0, chunkPath, chunkData);
535
+ }
536
+ async function loadChunkInternal(sourceType, sourceData, chunkData) {
537
+ if (typeof chunkData === 'string') {
538
+ return loadChunkPath(sourceType, sourceData, chunkData);
539
+ }
540
+ const includedList = chunkData.included || [];
541
+ const modulesPromises = includedList.map((included)=>{
542
+ if (moduleFactories.has(included)) return true;
543
+ return availableModules.get(included);
544
+ });
545
+ if (modulesPromises.length > 0 && modulesPromises.every((p)=>p)) {
546
+ // When all included items are already loaded or loading, we can skip loading ourselves
547
+ await Promise.all(modulesPromises);
548
+ return;
549
+ }
550
+ const includedModuleChunksList = chunkData.moduleChunks || [];
551
+ const moduleChunksPromises = includedModuleChunksList.map((included)=>{
552
+ // TODO(alexkirsz) Do we need this check?
553
+ // if (moduleFactories[included]) return true;
554
+ return availableModuleChunks.get(included);
555
+ }).filter((p)=>p);
556
+ let promise;
557
+ if (moduleChunksPromises.length > 0) {
558
+ // Some module chunks are already loaded or loading.
559
+ if (moduleChunksPromises.length === includedModuleChunksList.length) {
560
+ // When all included module chunks are already loaded or loading, we can skip loading ourselves
561
+ await Promise.all(moduleChunksPromises);
562
+ return;
563
+ }
564
+ const moduleChunksToLoad = new Set();
565
+ for (const moduleChunk of includedModuleChunksList){
566
+ if (!availableModuleChunks.has(moduleChunk)) {
567
+ moduleChunksToLoad.add(moduleChunk);
568
+ }
569
+ }
570
+ for (const moduleChunkToLoad of moduleChunksToLoad){
571
+ const promise = loadChunkPath(sourceType, sourceData, moduleChunkToLoad);
572
+ availableModuleChunks.set(moduleChunkToLoad, promise);
573
+ moduleChunksPromises.push(promise);
574
+ }
575
+ promise = Promise.all(moduleChunksPromises);
576
+ } else {
577
+ promise = loadChunkPath(sourceType, sourceData, chunkData.path);
578
+ // Mark all included module chunks as loading if they are not already loaded or loading.
579
+ for (const includedModuleChunk of includedModuleChunksList){
580
+ if (!availableModuleChunks.has(includedModuleChunk)) {
581
+ availableModuleChunks.set(includedModuleChunk, promise);
582
+ }
583
+ }
584
+ }
585
+ for (const included of includedList){
586
+ if (!availableModules.has(included)) {
587
+ // It might be better to race old and new promises, but it's rare that the new promise will be faster than a request started earlier.
588
+ // In production it's even more rare, because the chunk optimization tries to deduplicate modules anyway.
589
+ availableModules.set(included, promise);
590
+ }
591
+ }
592
+ await promise;
593
+ }
594
+ const loadedChunk = Promise.resolve(undefined);
595
+ const instrumentedBackendLoadChunks = new WeakMap();
596
+ // Do not make this async. React relies on referential equality of the returned Promise.
597
+ function loadChunkByUrl(chunkUrl) {
598
+ return loadChunkByUrlInternal(1, this.m.id, chunkUrl);
599
+ }
600
+ browserContextPrototype.L = loadChunkByUrl;
601
+ // Do not make this async. React relies on referential equality of the returned Promise.
602
+ function loadChunkByUrlInternal(sourceType, sourceData, chunkUrl) {
603
+ const thenable = BACKEND.loadChunkCached(sourceType, chunkUrl);
604
+ let entry = instrumentedBackendLoadChunks.get(thenable);
605
+ if (entry === undefined) {
606
+ const resolve = instrumentedBackendLoadChunks.set.bind(instrumentedBackendLoadChunks, thenable, loadedChunk);
607
+ entry = thenable.then(resolve).catch((error)=>{
608
+ let loadReason;
609
+ switch(sourceType){
610
+ case 0:
611
+ loadReason = `as a runtime dependency of chunk ${sourceData}`;
612
+ break;
613
+ case 1:
614
+ loadReason = `from module ${sourceData}`;
615
+ break;
616
+ case 2:
617
+ loadReason = 'from an HMR update';
618
+ break;
619
+ default:
620
+ invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
621
+ }
622
+ throw new Error(`Failed to load chunk ${chunkUrl} ${loadReason}${error ? `: ${error}` : ''}`, error ? {
623
+ cause: error
624
+ } : undefined);
625
+ });
626
+ instrumentedBackendLoadChunks.set(thenable, entry);
627
+ }
628
+ return entry;
629
+ }
630
+ // Do not make this async. React relies on referential equality of the returned Promise.
631
+ function loadChunkPath(sourceType, sourceData, chunkPath) {
632
+ const url = getChunkRelativeUrl(chunkPath);
633
+ return loadChunkByUrlInternal(sourceType, sourceData, url);
634
+ }
635
+ /**
636
+ * Returns an absolute url to an asset.
637
+ */ function resolvePathFromModule(moduleId) {
638
+ const exported = this.r(moduleId);
639
+ return exported?.default ?? exported;
640
+ }
641
+ browserContextPrototype.R = resolvePathFromModule;
642
+ /**
643
+ * no-op for browser
644
+ * @param modulePath
645
+ */ function resolveAbsolutePath(modulePath) {
646
+ return `/ROOT/${modulePath ?? ''}`;
647
+ }
648
+ browserContextPrototype.P = resolveAbsolutePath;
649
+ /**
650
+ * Returns a blob URL for the worker.
651
+ * @param chunks list of chunks to load
652
+ */ function getWorkerBlobURL(chunks) {
653
+ // It is important to reverse the array so when bootstrapping we can infer what chunk is being
654
+ // evaluated by poping urls off of this array. See `getPathFromScript`
655
+ let bootstrap = `self.TURBOPACK_WORKER_LOCATION = ${JSON.stringify(location.origin)};
656
+ self.TURBOPACK_NEXT_CHUNK_URLS = ${JSON.stringify(chunks.reverse().map(getChunkRelativeUrl), null, 2)};
657
+ importScripts(...self.TURBOPACK_NEXT_CHUNK_URLS.map(c => self.TURBOPACK_WORKER_LOCATION + c).reverse());`;
658
+ let blob = new Blob([
659
+ bootstrap
660
+ ], {
661
+ type: 'text/javascript'
662
+ });
663
+ return URL.createObjectURL(blob);
664
+ }
665
+ browserContextPrototype.b = getWorkerBlobURL;
666
+ /**
667
+ * Instantiates a runtime module.
668
+ */ function instantiateRuntimeModule(moduleId, chunkPath) {
669
+ return instantiateModule(moduleId, 0, chunkPath);
670
+ }
671
+ /**
672
+ * Returns the URL relative to the origin where a chunk can be fetched from.
673
+ */ function getChunkRelativeUrl(chunkPath) {
674
+ return `${CHUNK_BASE_PATH}${chunkPath.split('/').map((p)=>encodeURIComponent(p)).join('/')}${CHUNK_SUFFIX_PATH}`;
675
+ }
676
+ function getPathFromScript(chunkScript) {
677
+ if (typeof chunkScript === 'string') {
678
+ return chunkScript;
679
+ }
680
+ const chunkUrl = typeof TURBOPACK_NEXT_CHUNK_URLS !== 'undefined' ? TURBOPACK_NEXT_CHUNK_URLS.pop() : chunkScript.getAttribute('src');
681
+ const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''));
682
+ const path = src.startsWith(CHUNK_BASE_PATH) ? src.slice(CHUNK_BASE_PATH.length) : src;
683
+ return path;
684
+ }
685
+ const regexJsUrl = /\.js(?:\?[^#]*)?(?:#.*)?$/;
686
+ /**
687
+ * Checks if a given path/URL ends with .js, optionally followed by ?query or #fragment.
688
+ */ function isJs(chunkUrlOrPath) {
689
+ return regexJsUrl.test(chunkUrlOrPath);
690
+ }
691
+ const regexCssUrl = /\.css(?:\?[^#]*)?(?:#.*)?$/;
692
+ /**
693
+ * Checks if a given path/URL ends with .css, optionally followed by ?query or #fragment.
694
+ */ function isCss(chunkUrl) {
695
+ return regexCssUrl.test(chunkUrl);
696
+ }
697
+ function loadWebAssembly(chunkPath, edgeModule, importsObj) {
698
+ return BACKEND.loadWebAssembly(1, this.m.id, chunkPath, edgeModule, importsObj);
699
+ }
700
+ contextPrototype.w = loadWebAssembly;
701
+ function loadWebAssemblyModule(chunkPath, edgeModule) {
702
+ return BACKEND.loadWebAssemblyModule(1, this.m.id, chunkPath, edgeModule);
703
+ }
704
+ contextPrototype.u = loadWebAssemblyModule;
705
+ /// <reference path="./dev-globals.d.ts" />
706
+ /// <reference path="./dev-protocol.d.ts" />
707
+ /// <reference path="./dev-extensions.ts" />
708
+ const devContextPrototype = Context.prototype;
709
+ /**
710
+ * This file contains runtime types and functions that are shared between all
711
+ * Turbopack *development* ECMAScript runtimes.
712
+ *
713
+ * It will be appended to the runtime code of each runtime right after the
714
+ * shared runtime utils.
715
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ const devModuleCache = Object.create(null);
716
+ devContextPrototype.c = devModuleCache;
717
+ class UpdateApplyError extends Error {
718
+ name = 'UpdateApplyError';
719
+ dependencyChain;
720
+ constructor(message, dependencyChain){
721
+ super(message);
722
+ this.dependencyChain = dependencyChain;
723
+ }
724
+ }
725
+ /**
726
+ * Module IDs that are instantiated as part of the runtime of a chunk.
727
+ */ const runtimeModules = new Set();
728
+ /**
729
+ * Map from module ID to the chunks that contain this module.
730
+ *
731
+ * In HMR, we need to keep track of which modules are contained in which so
732
+ * chunks. This is so we don't eagerly dispose of a module when it is removed
733
+ * from chunk A, but still exists in chunk B.
734
+ */ const moduleChunksMap = new Map();
735
+ /**
736
+ * Map from a chunk path to all modules it contains.
737
+ */ const chunkModulesMap = new Map();
738
+ /**
739
+ * Chunk lists that contain a runtime. When these chunk lists receive an update
740
+ * that can't be reconciled with the current state of the page, we need to
741
+ * reload the runtime entirely.
742
+ */ const runtimeChunkLists = new Set();
743
+ /**
744
+ * Map from a chunk list to the chunk paths it contains.
745
+ */ const chunkListChunksMap = new Map();
746
+ /**
747
+ * Map from a chunk path to the chunk lists it belongs to.
748
+ */ const chunkChunkListsMap = new Map();
749
+ /**
750
+ * Maps module IDs to persisted data between executions of their hot module
751
+ * implementation (`hot.data`).
752
+ */ const moduleHotData = new Map();
753
+ /**
754
+ * Maps module instances to their hot module state.
755
+ */ const moduleHotState = new Map();
756
+ /**
757
+ * Modules that call `module.hot.invalidate()` (while being updated).
758
+ */ const queuedInvalidatedModules = new Set();
759
+ /**
760
+ * Gets or instantiates a runtime module.
761
+ */ // @ts-ignore
762
+ function getOrInstantiateRuntimeModule(chunkPath, moduleId) {
763
+ const module = devModuleCache[moduleId];
764
+ if (module) {
765
+ if (module.error) {
766
+ throw module.error;
767
+ }
768
+ return module;
769
+ }
770
+ // @ts-ignore
771
+ return instantiateModule(moduleId, SourceType.Runtime, chunkPath);
772
+ }
773
+ /**
774
+ * Retrieves a module from the cache, or instantiate it if it is not cached.
775
+ */ // @ts-ignore Defined in `runtime-utils.ts`
776
+ const getOrInstantiateModuleFromParent = (id, sourceModule)=>{
777
+ if (!sourceModule.hot.active) {
778
+ console.warn(`Unexpected import of module ${id} from module ${sourceModule.id}, which was deleted by an HMR update`);
779
+ }
780
+ const module = devModuleCache[id];
781
+ if (sourceModule.children.indexOf(id) === -1) {
782
+ sourceModule.children.push(id);
783
+ }
784
+ if (module) {
785
+ if (module.error) {
786
+ throw module.error;
787
+ }
788
+ if (module.parents.indexOf(sourceModule.id) === -1) {
789
+ module.parents.push(sourceModule.id);
790
+ }
791
+ return module;
792
+ }
793
+ return instantiateModule(id, SourceType.Parent, sourceModule.id);
794
+ };
795
+ function DevContext(module, exports, refresh) {
796
+ Context.call(this, module, exports);
797
+ this.k = refresh;
798
+ }
799
+ DevContext.prototype = Context.prototype;
800
+ function instantiateModule(moduleId, sourceType, sourceData) {
801
+ // We are in development, this is always a string.
802
+ let id = moduleId;
803
+ const moduleFactory = moduleFactories.get(id);
804
+ if (typeof moduleFactory !== 'function') {
805
+ // This can happen if modules incorrectly handle HMR disposes/updates,
806
+ // e.g. when they keep a `setTimeout` around which still executes old code
807
+ // and contains e.g. a `require("something")` call.
808
+ factoryNotAvailable(id, sourceType, sourceData);
809
+ }
810
+ const hotData = moduleHotData.get(id);
811
+ const { hot, hotState } = createModuleHot(id, hotData);
812
+ let parents;
813
+ switch(sourceType){
814
+ case SourceType.Runtime:
815
+ runtimeModules.add(id);
816
+ parents = [];
817
+ break;
818
+ case SourceType.Parent:
819
+ // No need to add this module as a child of the parent module here, this
820
+ // has already been taken care of in `getOrInstantiateModuleFromParent`.
821
+ parents = [
822
+ sourceData
823
+ ];
824
+ break;
825
+ case SourceType.Update:
826
+ parents = sourceData || [];
827
+ break;
828
+ default:
829
+ invariant(sourceType, (sourceType)=>`Unknown source type: ${sourceType}`);
830
+ }
831
+ const module = createModuleObject(id);
832
+ const exports = module.exports;
833
+ module.parents = parents;
834
+ module.children = [];
835
+ module.hot = hot;
836
+ devModuleCache[id] = module;
837
+ moduleHotState.set(module, hotState);
838
+ // NOTE(alexkirsz) This can fail when the module encounters a runtime error.
839
+ try {
840
+ runModuleExecutionHooks(module, (refresh)=>{
841
+ const context = new DevContext(module, exports, refresh);
842
+ moduleFactory(context, module, exports);
843
+ });
844
+ } catch (error) {
845
+ module.error = error;
846
+ throw error;
847
+ }
848
+ if (module.namespaceObject && module.exports !== module.namespaceObject) {
849
+ // in case of a circular dependency: cjs1 -> esm2 -> cjs1
850
+ interopEsm(module.exports, module.namespaceObject);
851
+ }
852
+ return module;
853
+ }
854
+ const DUMMY_REFRESH_CONTEXT = {
855
+ register: (_type, _id)=>{},
856
+ signature: ()=>(_type)=>{},
857
+ registerExports: (_module, _helpers)=>{}
858
+ };
859
+ /**
860
+ * NOTE(alexkirsz) Webpack has a "module execution" interception hook that
861
+ * Next.js' React Refresh runtime hooks into to add module context to the
862
+ * refresh registry.
863
+ */ function runModuleExecutionHooks(module, executeModule) {
864
+ if (typeof globalThis.$RefreshInterceptModuleExecution$ === 'function') {
865
+ const cleanupReactRefreshIntercept = globalThis.$RefreshInterceptModuleExecution$(module.id);
866
+ try {
867
+ executeModule({
868
+ register: globalThis.$RefreshReg$,
869
+ signature: globalThis.$RefreshSig$,
870
+ registerExports: registerExportsAndSetupBoundaryForReactRefresh
871
+ });
872
+ } finally{
873
+ // Always cleanup the intercept, even if module execution failed.
874
+ cleanupReactRefreshIntercept();
875
+ }
876
+ } else {
877
+ // If the react refresh hooks are not installed we need to bind dummy functions.
878
+ // This is expected when running in a Web Worker. It is also common in some of
879
+ // our test environments.
880
+ executeModule(DUMMY_REFRESH_CONTEXT);
881
+ }
882
+ }
883
+ /**
884
+ * This is adapted from https://github.com/vercel/next.js/blob/3466862d9dc9c8bb3131712134d38757b918d1c0/packages/react-refresh-utils/internal/ReactRefreshModule.runtime.ts
885
+ */ function registerExportsAndSetupBoundaryForReactRefresh(module, helpers) {
886
+ const currentExports = module.exports;
887
+ const prevExports = module.hot.data.prevExports ?? null;
888
+ helpers.registerExportsForReactRefresh(currentExports, module.id);
889
+ // A module can be accepted automatically based on its exports, e.g. when
890
+ // it is a Refresh Boundary.
891
+ if (helpers.isReactRefreshBoundary(currentExports)) {
892
+ // Save the previous exports on update, so we can compare the boundary
893
+ // signatures.
894
+ module.hot.dispose((data)=>{
895
+ data.prevExports = currentExports;
896
+ });
897
+ // Unconditionally accept an update to this module, we'll check if it's
898
+ // still a Refresh Boundary later.
899
+ module.hot.accept();
900
+ // This field is set when the previous version of this module was a
901
+ // Refresh Boundary, letting us know we need to check for invalidation or
902
+ // enqueue an update.
903
+ if (prevExports !== null) {
904
+ // A boundary can become ineligible if its exports are incompatible
905
+ // with the previous exports.
906
+ //
907
+ // For example, if you add/remove/change exports, we'll want to
908
+ // re-execute the importing modules, and force those components to
909
+ // re-render. Similarly, if you convert a class component to a
910
+ // function, we want to invalidate the boundary.
911
+ if (helpers.shouldInvalidateReactRefreshBoundary(helpers.getRefreshBoundarySignature(prevExports), helpers.getRefreshBoundarySignature(currentExports))) {
912
+ module.hot.invalidate();
913
+ } else {
914
+ helpers.scheduleUpdate();
915
+ }
916
+ }
917
+ } else {
918
+ // Since we just executed the code for the module, it's possible that the
919
+ // new exports made it ineligible for being a boundary.
920
+ // We only care about the case when we were _previously_ a boundary,
921
+ // because we already accepted this update (accidental side effect).
922
+ const isNoLongerABoundary = prevExports !== null;
923
+ if (isNoLongerABoundary) {
924
+ module.hot.invalidate();
925
+ }
926
+ }
927
+ }
928
+ function formatDependencyChain(dependencyChain) {
929
+ return `Dependency chain: ${dependencyChain.join(' -> ')}`;
930
+ }
931
+ function computeOutdatedModules(added, modified) {
932
+ const newModuleFactories = new Map();
933
+ for (const [moduleId, entry] of added){
934
+ if (entry != null) {
935
+ newModuleFactories.set(moduleId, _eval(entry));
936
+ }
937
+ }
938
+ const outdatedModules = computedInvalidatedModules(modified.keys());
939
+ for (const [moduleId, entry] of modified){
940
+ newModuleFactories.set(moduleId, _eval(entry));
941
+ }
942
+ return {
943
+ outdatedModules,
944
+ newModuleFactories
945
+ };
946
+ }
947
+ function computedInvalidatedModules(invalidated) {
948
+ const outdatedModules = new Set();
949
+ for (const moduleId of invalidated){
950
+ const effect = getAffectedModuleEffects(moduleId);
951
+ switch(effect.type){
952
+ case 'unaccepted':
953
+ throw new UpdateApplyError(`cannot apply update: unaccepted module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain);
954
+ case 'self-declined':
955
+ throw new UpdateApplyError(`cannot apply update: self-declined module. ${formatDependencyChain(effect.dependencyChain)}.`, effect.dependencyChain);
956
+ case 'accepted':
957
+ for (const outdatedModuleId of effect.outdatedModules){
958
+ outdatedModules.add(outdatedModuleId);
959
+ }
960
+ break;
961
+ // TODO(alexkirsz) Dependencies: handle dependencies effects.
962
+ default:
963
+ invariant(effect, (effect)=>`Unknown effect type: ${effect?.type}`);
964
+ }
965
+ }
966
+ return outdatedModules;
967
+ }
968
+ function computeOutdatedSelfAcceptedModules(outdatedModules) {
969
+ const outdatedSelfAcceptedModules = [];
970
+ for (const moduleId of outdatedModules){
971
+ const module = devModuleCache[moduleId];
972
+ const hotState = moduleHotState.get(module);
973
+ if (module && hotState.selfAccepted && !hotState.selfInvalidated) {
974
+ outdatedSelfAcceptedModules.push({
975
+ moduleId,
976
+ errorHandler: hotState.selfAccepted
977
+ });
978
+ }
979
+ }
980
+ return outdatedSelfAcceptedModules;
981
+ }
982
+ /**
983
+ * Adds, deletes, and moves modules between chunks. This must happen before the
984
+ * dispose phase as it needs to know which modules were removed from all chunks,
985
+ * which we can only compute *after* taking care of added and moved modules.
986
+ */ function updateChunksPhase(chunksAddedModules, chunksDeletedModules) {
987
+ for (const [chunkPath, addedModuleIds] of chunksAddedModules){
988
+ for (const moduleId of addedModuleIds){
989
+ addModuleToChunk(moduleId, chunkPath);
990
+ }
991
+ }
992
+ const disposedModules = new Set();
993
+ for (const [chunkPath, addedModuleIds] of chunksDeletedModules){
994
+ for (const moduleId of addedModuleIds){
995
+ if (removeModuleFromChunk(moduleId, chunkPath)) {
996
+ disposedModules.add(moduleId);
997
+ }
998
+ }
999
+ }
1000
+ return {
1001
+ disposedModules
1002
+ };
1003
+ }
1004
+ function disposePhase(outdatedModules, disposedModules) {
1005
+ for (const moduleId of outdatedModules){
1006
+ disposeModule(moduleId, 'replace');
1007
+ }
1008
+ for (const moduleId of disposedModules){
1009
+ disposeModule(moduleId, 'clear');
1010
+ }
1011
+ // Removing modules from the module cache is a separate step.
1012
+ // We also want to keep track of previous parents of the outdated modules.
1013
+ const outdatedModuleParents = new Map();
1014
+ for (const moduleId of outdatedModules){
1015
+ const oldModule = devModuleCache[moduleId];
1016
+ outdatedModuleParents.set(moduleId, oldModule?.parents);
1017
+ delete devModuleCache[moduleId];
1018
+ }
1019
+ // TODO(alexkirsz) Dependencies: remove outdated dependency from module
1020
+ // children.
1021
+ return {
1022
+ outdatedModuleParents
1023
+ };
1024
+ }
1025
+ /**
1026
+ * Disposes of an instance of a module.
1027
+ *
1028
+ * Returns the persistent hot data that should be kept for the next module
1029
+ * instance.
1030
+ *
1031
+ * NOTE: mode = "replace" will not remove modules from the devModuleCache
1032
+ * This must be done in a separate step afterwards.
1033
+ * This is important because all modules need to be disposed to update the
1034
+ * parent/child relationships before they are actually removed from the devModuleCache.
1035
+ * If this was done in this method, the following disposeModule calls won't find
1036
+ * the module from the module id in the cache.
1037
+ */ function disposeModule(moduleId, mode) {
1038
+ const module = devModuleCache[moduleId];
1039
+ if (!module) {
1040
+ return;
1041
+ }
1042
+ const hotState = moduleHotState.get(module);
1043
+ const data = {};
1044
+ // Run the `hot.dispose` handler, if any, passing in the persistent
1045
+ // `hot.data` object.
1046
+ for (const disposeHandler of hotState.disposeHandlers){
1047
+ disposeHandler(data);
1048
+ }
1049
+ // This used to warn in `getOrInstantiateModuleFromParent` when a disposed
1050
+ // module is still importing other modules.
1051
+ module.hot.active = false;
1052
+ moduleHotState.delete(module);
1053
+ // TODO(alexkirsz) Dependencies: delete the module from outdated deps.
1054
+ // Remove the disposed module from its children's parent list.
1055
+ // It will be added back once the module re-instantiates and imports its
1056
+ // children again.
1057
+ for (const childId of module.children){
1058
+ const child = devModuleCache[childId];
1059
+ if (!child) {
1060
+ continue;
1061
+ }
1062
+ const idx = child.parents.indexOf(module.id);
1063
+ if (idx >= 0) {
1064
+ child.parents.splice(idx, 1);
1065
+ }
1066
+ }
1067
+ switch(mode){
1068
+ case 'clear':
1069
+ delete devModuleCache[module.id];
1070
+ moduleHotData.delete(module.id);
1071
+ break;
1072
+ case 'replace':
1073
+ moduleHotData.set(module.id, data);
1074
+ break;
1075
+ default:
1076
+ invariant(mode, (mode)=>`invalid mode: ${mode}`);
1077
+ }
1078
+ }
1079
+ function applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, reportError) {
1080
+ // Update module factories.
1081
+ for (const [moduleId, factory] of newModuleFactories.entries()){
1082
+ applyModuleFactoryName(factory);
1083
+ moduleFactories.set(moduleId, factory);
1084
+ }
1085
+ // TODO(alexkirsz) Run new runtime entries here.
1086
+ // TODO(alexkirsz) Dependencies: call accept handlers for outdated deps.
1087
+ // Re-instantiate all outdated self-accepted modules.
1088
+ for (const { moduleId, errorHandler } of outdatedSelfAcceptedModules){
1089
+ try {
1090
+ instantiateModule(moduleId, SourceType.Update, outdatedModuleParents.get(moduleId));
1091
+ } catch (err) {
1092
+ if (typeof errorHandler === 'function') {
1093
+ try {
1094
+ errorHandler(err, {
1095
+ moduleId,
1096
+ module: devModuleCache[moduleId]
1097
+ });
1098
+ } catch (err2) {
1099
+ reportError(err2);
1100
+ reportError(err);
1101
+ }
1102
+ } else {
1103
+ reportError(err);
1104
+ }
1105
+ }
1106
+ }
1107
+ }
1108
+ function applyUpdate(update) {
1109
+ switch(update.type){
1110
+ case 'ChunkListUpdate':
1111
+ applyChunkListUpdate(update);
1112
+ break;
1113
+ default:
1114
+ invariant(update, (update)=>`Unknown update type: ${update.type}`);
1115
+ }
1116
+ }
1117
+ function applyChunkListUpdate(update) {
1118
+ if (update.merged != null) {
1119
+ for (const merged of update.merged){
1120
+ switch(merged.type){
1121
+ case 'EcmascriptMergedUpdate':
1122
+ applyEcmascriptMergedUpdate(merged);
1123
+ break;
1124
+ default:
1125
+ invariant(merged, (merged)=>`Unknown merged type: ${merged.type}`);
1126
+ }
1127
+ }
1128
+ }
1129
+ if (update.chunks != null) {
1130
+ for (const [chunkPath, chunkUpdate] of Object.entries(update.chunks)){
1131
+ const chunkUrl = getChunkRelativeUrl(chunkPath);
1132
+ switch(chunkUpdate.type){
1133
+ case 'added':
1134
+ BACKEND.loadChunkCached(SourceType.Update, chunkUrl);
1135
+ break;
1136
+ case 'total':
1137
+ DEV_BACKEND.reloadChunk?.(chunkUrl);
1138
+ break;
1139
+ case 'deleted':
1140
+ DEV_BACKEND.unloadChunk?.(chunkUrl);
1141
+ break;
1142
+ case 'partial':
1143
+ invariant(chunkUpdate.instruction, (instruction)=>`Unknown partial instruction: ${JSON.stringify(instruction)}.`);
1144
+ break;
1145
+ default:
1146
+ invariant(chunkUpdate, (chunkUpdate)=>`Unknown chunk update type: ${chunkUpdate.type}`);
1147
+ }
1148
+ }
1149
+ }
1150
+ }
1151
+ function applyEcmascriptMergedUpdate(update) {
1152
+ const { entries = {}, chunks = {} } = update;
1153
+ const { added, modified, chunksAdded, chunksDeleted } = computeChangedModules(entries, chunks);
1154
+ const { outdatedModules, newModuleFactories } = computeOutdatedModules(added, modified);
1155
+ const { disposedModules } = updateChunksPhase(chunksAdded, chunksDeleted);
1156
+ applyInternal(outdatedModules, disposedModules, newModuleFactories);
1157
+ }
1158
+ function applyInvalidatedModules(outdatedModules) {
1159
+ if (queuedInvalidatedModules.size > 0) {
1160
+ computedInvalidatedModules(queuedInvalidatedModules).forEach((moduleId)=>{
1161
+ outdatedModules.add(moduleId);
1162
+ });
1163
+ queuedInvalidatedModules.clear();
1164
+ }
1165
+ return outdatedModules;
1166
+ }
1167
+ function applyInternal(outdatedModules, disposedModules, newModuleFactories) {
1168
+ outdatedModules = applyInvalidatedModules(outdatedModules);
1169
+ const outdatedSelfAcceptedModules = computeOutdatedSelfAcceptedModules(outdatedModules);
1170
+ const { outdatedModuleParents } = disposePhase(outdatedModules, disposedModules);
1171
+ // we want to continue on error and only throw the error after we tried applying all updates
1172
+ let error;
1173
+ function reportError(err) {
1174
+ if (!error) error = err;
1175
+ }
1176
+ applyPhase(outdatedSelfAcceptedModules, newModuleFactories, outdatedModuleParents, reportError);
1177
+ if (error) {
1178
+ throw error;
1179
+ }
1180
+ if (queuedInvalidatedModules.size > 0) {
1181
+ applyInternal(new Set(), [], new Map());
1182
+ }
1183
+ }
1184
+ function computeChangedModules(entries, updates) {
1185
+ const chunksAdded = new Map();
1186
+ const chunksDeleted = new Map();
1187
+ const added = new Map();
1188
+ const modified = new Map();
1189
+ const deleted = new Set();
1190
+ for (const [chunkPath, mergedChunkUpdate] of Object.entries(updates)){
1191
+ switch(mergedChunkUpdate.type){
1192
+ case 'added':
1193
+ {
1194
+ const updateAdded = new Set(mergedChunkUpdate.modules);
1195
+ for (const moduleId of updateAdded){
1196
+ added.set(moduleId, entries[moduleId]);
1197
+ }
1198
+ chunksAdded.set(chunkPath, updateAdded);
1199
+ break;
1200
+ }
1201
+ case 'deleted':
1202
+ {
1203
+ // We could also use `mergedChunkUpdate.modules` here.
1204
+ const updateDeleted = new Set(chunkModulesMap.get(chunkPath));
1205
+ for (const moduleId of updateDeleted){
1206
+ deleted.add(moduleId);
1207
+ }
1208
+ chunksDeleted.set(chunkPath, updateDeleted);
1209
+ break;
1210
+ }
1211
+ case 'partial':
1212
+ {
1213
+ const updateAdded = new Set(mergedChunkUpdate.added);
1214
+ const updateDeleted = new Set(mergedChunkUpdate.deleted);
1215
+ for (const moduleId of updateAdded){
1216
+ added.set(moduleId, entries[moduleId]);
1217
+ }
1218
+ for (const moduleId of updateDeleted){
1219
+ deleted.add(moduleId);
1220
+ }
1221
+ chunksAdded.set(chunkPath, updateAdded);
1222
+ chunksDeleted.set(chunkPath, updateDeleted);
1223
+ break;
1224
+ }
1225
+ default:
1226
+ invariant(mergedChunkUpdate, (mergedChunkUpdate)=>`Unknown merged chunk update type: ${mergedChunkUpdate.type}`);
1227
+ }
1228
+ }
1229
+ // If a module was added from one chunk and deleted from another in the same update,
1230
+ // consider it to be modified, as it means the module was moved from one chunk to another
1231
+ // AND has new code in a single update.
1232
+ for (const moduleId of added.keys()){
1233
+ if (deleted.has(moduleId)) {
1234
+ added.delete(moduleId);
1235
+ deleted.delete(moduleId);
1236
+ }
1237
+ }
1238
+ for (const [moduleId, entry] of Object.entries(entries)){
1239
+ // Modules that haven't been added to any chunk but have new code are considered
1240
+ // to be modified.
1241
+ // This needs to be under the previous loop, as we need it to get rid of modules
1242
+ // that were added and deleted in the same update.
1243
+ if (!added.has(moduleId)) {
1244
+ modified.set(moduleId, entry);
1245
+ }
1246
+ }
1247
+ return {
1248
+ added,
1249
+ deleted,
1250
+ modified,
1251
+ chunksAdded,
1252
+ chunksDeleted
1253
+ };
1254
+ }
1255
+ function getAffectedModuleEffects(moduleId) {
1256
+ const outdatedModules = new Set();
1257
+ const queue = [
1258
+ {
1259
+ moduleId,
1260
+ dependencyChain: []
1261
+ }
1262
+ ];
1263
+ let nextItem;
1264
+ while(nextItem = queue.shift()){
1265
+ const { moduleId, dependencyChain } = nextItem;
1266
+ if (moduleId != null) {
1267
+ if (outdatedModules.has(moduleId)) {
1268
+ continue;
1269
+ }
1270
+ outdatedModules.add(moduleId);
1271
+ }
1272
+ // We've arrived at the runtime of the chunk, which means that nothing
1273
+ // else above can accept this update.
1274
+ if (moduleId === undefined) {
1275
+ return {
1276
+ type: 'unaccepted',
1277
+ dependencyChain
1278
+ };
1279
+ }
1280
+ const module = devModuleCache[moduleId];
1281
+ const hotState = moduleHotState.get(module);
1282
+ if (// The module is not in the cache. Since this is a "modified" update,
1283
+ // it means that the module was never instantiated before.
1284
+ !module || hotState.selfAccepted && !hotState.selfInvalidated) {
1285
+ continue;
1286
+ }
1287
+ if (hotState.selfDeclined) {
1288
+ return {
1289
+ type: 'self-declined',
1290
+ dependencyChain,
1291
+ moduleId
1292
+ };
1293
+ }
1294
+ if (runtimeModules.has(moduleId)) {
1295
+ queue.push({
1296
+ moduleId: undefined,
1297
+ dependencyChain: [
1298
+ ...dependencyChain,
1299
+ moduleId
1300
+ ]
1301
+ });
1302
+ continue;
1303
+ }
1304
+ for (const parentId of module.parents){
1305
+ const parent = devModuleCache[parentId];
1306
+ if (!parent) {
1307
+ continue;
1308
+ }
1309
+ // TODO(alexkirsz) Dependencies: check accepted and declined
1310
+ // dependencies here.
1311
+ queue.push({
1312
+ moduleId: parentId,
1313
+ dependencyChain: [
1314
+ ...dependencyChain,
1315
+ moduleId
1316
+ ]
1317
+ });
1318
+ }
1319
+ }
1320
+ return {
1321
+ type: 'accepted',
1322
+ moduleId,
1323
+ outdatedModules
1324
+ };
1325
+ }
1326
+ function handleApply(chunkListPath, update) {
1327
+ switch(update.type){
1328
+ case 'partial':
1329
+ {
1330
+ // This indicates that the update is can be applied to the current state of the application.
1331
+ applyUpdate(update.instruction);
1332
+ break;
1333
+ }
1334
+ case 'restart':
1335
+ {
1336
+ // This indicates that there is no way to apply the update to the
1337
+ // current state of the application, and that the application must be
1338
+ // restarted.
1339
+ DEV_BACKEND.restart();
1340
+ break;
1341
+ }
1342
+ case 'notFound':
1343
+ {
1344
+ // This indicates that the chunk list no longer exists: either the dynamic import which created it was removed,
1345
+ // or the page itself was deleted.
1346
+ // If it is a dynamic import, we simply discard all modules that the chunk has exclusive access to.
1347
+ // If it is a runtime chunk list, we restart the application.
1348
+ if (runtimeChunkLists.has(chunkListPath)) {
1349
+ DEV_BACKEND.restart();
1350
+ } else {
1351
+ disposeChunkList(chunkListPath);
1352
+ }
1353
+ break;
1354
+ }
1355
+ default:
1356
+ throw new Error(`Unknown update type: ${update.type}`);
1357
+ }
1358
+ }
1359
+ function createModuleHot(moduleId, hotData) {
1360
+ const hotState = {
1361
+ selfAccepted: false,
1362
+ selfDeclined: false,
1363
+ selfInvalidated: false,
1364
+ disposeHandlers: []
1365
+ };
1366
+ const hot = {
1367
+ // TODO(alexkirsz) This is not defined in the HMR API. It was used to
1368
+ // decide whether to warn whenever an HMR-disposed module required other
1369
+ // modules. We might want to remove it.
1370
+ active: true,
1371
+ data: hotData ?? {},
1372
+ // TODO(alexkirsz) Support full (dep, callback, errorHandler) form.
1373
+ accept: (modules, _callback, _errorHandler)=>{
1374
+ if (modules === undefined) {
1375
+ hotState.selfAccepted = true;
1376
+ } else if (typeof modules === 'function') {
1377
+ hotState.selfAccepted = modules;
1378
+ } else {
1379
+ throw new Error('unsupported `accept` signature');
1380
+ }
1381
+ },
1382
+ decline: (dep)=>{
1383
+ if (dep === undefined) {
1384
+ hotState.selfDeclined = true;
1385
+ } else {
1386
+ throw new Error('unsupported `decline` signature');
1387
+ }
1388
+ },
1389
+ dispose: (callback)=>{
1390
+ hotState.disposeHandlers.push(callback);
1391
+ },
1392
+ addDisposeHandler: (callback)=>{
1393
+ hotState.disposeHandlers.push(callback);
1394
+ },
1395
+ removeDisposeHandler: (callback)=>{
1396
+ const idx = hotState.disposeHandlers.indexOf(callback);
1397
+ if (idx >= 0) {
1398
+ hotState.disposeHandlers.splice(idx, 1);
1399
+ }
1400
+ },
1401
+ invalidate: ()=>{
1402
+ hotState.selfInvalidated = true;
1403
+ queuedInvalidatedModules.add(moduleId);
1404
+ },
1405
+ // NOTE(alexkirsz) This is part of the management API, which we don't
1406
+ // implement, but the Next.js React Refresh runtime uses this to decide
1407
+ // whether to schedule an update.
1408
+ status: ()=>'idle',
1409
+ // NOTE(alexkirsz) Since we always return "idle" for now, these are no-ops.
1410
+ addStatusHandler: (_handler)=>{},
1411
+ removeStatusHandler: (_handler)=>{},
1412
+ // NOTE(jridgewell) Check returns the list of updated modules, but we don't
1413
+ // want the webpack code paths to ever update (the turbopack paths handle
1414
+ // this already).
1415
+ check: ()=>Promise.resolve(null)
1416
+ };
1417
+ return {
1418
+ hot,
1419
+ hotState
1420
+ };
1421
+ }
1422
+ /**
1423
+ * Removes a module from a chunk.
1424
+ * Returns `true` if there are no remaining chunks including this module.
1425
+ */ function removeModuleFromChunk(moduleId, chunkPath) {
1426
+ const moduleChunks = moduleChunksMap.get(moduleId);
1427
+ moduleChunks.delete(chunkPath);
1428
+ const chunkModules = chunkModulesMap.get(chunkPath);
1429
+ chunkModules.delete(moduleId);
1430
+ const noRemainingModules = chunkModules.size === 0;
1431
+ if (noRemainingModules) {
1432
+ chunkModulesMap.delete(chunkPath);
1433
+ }
1434
+ const noRemainingChunks = moduleChunks.size === 0;
1435
+ if (noRemainingChunks) {
1436
+ moduleChunksMap.delete(moduleId);
1437
+ }
1438
+ return noRemainingChunks;
1439
+ }
1440
+ /**
1441
+ * Disposes of a chunk list and its corresponding exclusive chunks.
1442
+ */ function disposeChunkList(chunkListPath) {
1443
+ const chunkPaths = chunkListChunksMap.get(chunkListPath);
1444
+ if (chunkPaths == null) {
1445
+ return false;
1446
+ }
1447
+ chunkListChunksMap.delete(chunkListPath);
1448
+ for (const chunkPath of chunkPaths){
1449
+ const chunkChunkLists = chunkChunkListsMap.get(chunkPath);
1450
+ chunkChunkLists.delete(chunkListPath);
1451
+ if (chunkChunkLists.size === 0) {
1452
+ chunkChunkListsMap.delete(chunkPath);
1453
+ disposeChunk(chunkPath);
1454
+ }
1455
+ }
1456
+ // We must also dispose of the chunk list's chunk itself to ensure it may
1457
+ // be reloaded properly in the future.
1458
+ const chunkListUrl = getChunkRelativeUrl(chunkListPath);
1459
+ DEV_BACKEND.unloadChunk?.(chunkListUrl);
1460
+ return true;
1461
+ }
1462
+ /**
1463
+ * Disposes of a chunk and its corresponding exclusive modules.
1464
+ *
1465
+ * @returns Whether the chunk was disposed of.
1466
+ */ function disposeChunk(chunkPath) {
1467
+ const chunkUrl = getChunkRelativeUrl(chunkPath);
1468
+ // This should happen whether the chunk has any modules in it or not.
1469
+ // For instance, CSS chunks have no modules in them, but they still need to be unloaded.
1470
+ DEV_BACKEND.unloadChunk?.(chunkUrl);
1471
+ const chunkModules = chunkModulesMap.get(chunkPath);
1472
+ if (chunkModules == null) {
1473
+ return false;
1474
+ }
1475
+ chunkModules.delete(chunkPath);
1476
+ for (const moduleId of chunkModules){
1477
+ const moduleChunks = moduleChunksMap.get(moduleId);
1478
+ moduleChunks.delete(chunkPath);
1479
+ const noRemainingChunks = moduleChunks.size === 0;
1480
+ if (noRemainingChunks) {
1481
+ moduleChunksMap.delete(moduleId);
1482
+ disposeModule(moduleId, 'clear');
1483
+ availableModules.delete(moduleId);
1484
+ }
1485
+ }
1486
+ return true;
1487
+ }
1488
+ /**
1489
+ * Adds a module to a chunk.
1490
+ */ function addModuleToChunk(moduleId, chunkPath) {
1491
+ let moduleChunks = moduleChunksMap.get(moduleId);
1492
+ if (!moduleChunks) {
1493
+ moduleChunks = new Set([
1494
+ chunkPath
1495
+ ]);
1496
+ moduleChunksMap.set(moduleId, moduleChunks);
1497
+ } else {
1498
+ moduleChunks.add(chunkPath);
1499
+ }
1500
+ let chunkModules = chunkModulesMap.get(chunkPath);
1501
+ if (!chunkModules) {
1502
+ chunkModules = new Set([
1503
+ moduleId
1504
+ ]);
1505
+ chunkModulesMap.set(chunkPath, chunkModules);
1506
+ } else {
1507
+ chunkModules.add(moduleId);
1508
+ }
1509
+ }
1510
+ /**
1511
+ * Marks a chunk list as a runtime chunk list. There can be more than one
1512
+ * runtime chunk list. For instance, integration tests can have multiple chunk
1513
+ * groups loaded at runtime, each with its own chunk list.
1514
+ */ function markChunkListAsRuntime(chunkListPath) {
1515
+ runtimeChunkLists.add(chunkListPath);
1516
+ }
1517
+ function registerChunk(registration) {
1518
+ const chunkPath = getPathFromScript(registration[0]);
1519
+ let runtimeParams;
1520
+ // When bootstrapping we are passed a single runtimeParams object so we can distinguish purely based on length
1521
+ if (registration.length === 2) {
1522
+ runtimeParams = registration[1];
1523
+ } else {
1524
+ runtimeParams = undefined;
1525
+ installCompressedModuleFactories(registration, /* offset= */ 1, moduleFactories, (id)=>addModuleToChunk(id, chunkPath));
1526
+ }
1527
+ return BACKEND.registerChunk(chunkPath, runtimeParams);
1528
+ }
1529
+ /**
1530
+ * Subscribes to chunk list updates from the update server and applies them.
1531
+ */ function registerChunkList(chunkList) {
1532
+ const chunkListScript = chunkList.script;
1533
+ const chunkListPath = getPathFromScript(chunkListScript);
1534
+ // The "chunk" is also registered to finish the loading in the backend
1535
+ BACKEND.registerChunk(chunkListPath);
1536
+ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS.push([
1537
+ chunkListPath,
1538
+ handleApply.bind(null, chunkListPath)
1539
+ ]);
1540
+ // Adding chunks to chunk lists and vice versa.
1541
+ const chunkPaths = new Set(chunkList.chunks.map(getChunkPath));
1542
+ chunkListChunksMap.set(chunkListPath, chunkPaths);
1543
+ for (const chunkPath of chunkPaths){
1544
+ let chunkChunkLists = chunkChunkListsMap.get(chunkPath);
1545
+ if (!chunkChunkLists) {
1546
+ chunkChunkLists = new Set([
1547
+ chunkListPath
1548
+ ]);
1549
+ chunkChunkListsMap.set(chunkPath, chunkChunkLists);
1550
+ } else {
1551
+ chunkChunkLists.add(chunkListPath);
1552
+ }
1553
+ }
1554
+ if (chunkList.source === 'entry') {
1555
+ markChunkListAsRuntime(chunkListPath);
1556
+ }
1557
+ }
1558
+ globalThis.TURBOPACK_CHUNK_UPDATE_LISTENERS ??= [];
1559
+ /**
1560
+ * This file contains the runtime code specific to the Turbopack development
1561
+ * ECMAScript DOM runtime.
1562
+ *
1563
+ * It will be appended to the base development runtime code.
1564
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../../../browser/runtime/base/runtime-base.ts" />
1565
+ /// <reference path="../../../shared/runtime-types.d.ts" />
1566
+ let BACKEND;
1567
+ /**
1568
+ * Maps chunk paths to the corresponding resolver.
1569
+ */ const chunkResolvers = new Map();
1570
+ (()=>{
1571
+ BACKEND = {
1572
+ async registerChunk (chunkPath, params) {
1573
+ const chunkUrl = getChunkRelativeUrl(chunkPath);
1574
+ const resolver = getOrCreateResolver(chunkUrl);
1575
+ resolver.resolve();
1576
+ if (params == null) {
1577
+ return;
1578
+ }
1579
+ for (const otherChunkData of params.otherChunks){
1580
+ const otherChunkPath = getChunkPath(otherChunkData);
1581
+ const otherChunkUrl = getChunkRelativeUrl(otherChunkPath);
1582
+ // Chunk might have started loading, so we want to avoid triggering another load.
1583
+ getOrCreateResolver(otherChunkUrl);
1584
+ }
1585
+ // This waits for chunks to be loaded, but also marks included items as available.
1586
+ await Promise.all(params.otherChunks.map((otherChunkData)=>loadInitialChunk(chunkPath, otherChunkData)));
1587
+ if (params.runtimeModuleIds.length > 0) {
1588
+ for (const moduleId of params.runtimeModuleIds){
1589
+ getOrInstantiateRuntimeModule(chunkPath, moduleId);
1590
+ }
1591
+ }
1592
+ },
1593
+ /**
1594
+ * Loads the given chunk, and returns a promise that resolves once the chunk
1595
+ * has been loaded.
1596
+ */ loadChunkCached (sourceType, chunkUrl) {
1597
+ return doLoadChunk(sourceType, chunkUrl);
1598
+ },
1599
+ async loadWebAssembly (_sourceType, _sourceData, wasmChunkPath, _edgeModule, importsObj) {
1600
+ const req = fetchWebAssembly(wasmChunkPath);
1601
+ const { instance } = await WebAssembly.instantiateStreaming(req, importsObj);
1602
+ return instance.exports;
1603
+ },
1604
+ async loadWebAssemblyModule (_sourceType, _sourceData, wasmChunkPath, _edgeModule) {
1605
+ const req = fetchWebAssembly(wasmChunkPath);
1606
+ return await WebAssembly.compileStreaming(req);
1607
+ }
1608
+ };
1609
+ function getOrCreateResolver(chunkUrl) {
1610
+ let resolver = chunkResolvers.get(chunkUrl);
1611
+ if (!resolver) {
1612
+ let resolve;
1613
+ let reject;
1614
+ const promise = new Promise((innerResolve, innerReject)=>{
1615
+ resolve = innerResolve;
1616
+ reject = innerReject;
1617
+ });
1618
+ resolver = {
1619
+ resolved: false,
1620
+ loadingStarted: false,
1621
+ promise,
1622
+ resolve: ()=>{
1623
+ resolver.resolved = true;
1624
+ resolve();
1625
+ },
1626
+ reject: reject
1627
+ };
1628
+ chunkResolvers.set(chunkUrl, resolver);
1629
+ }
1630
+ return resolver;
1631
+ }
1632
+ /**
1633
+ * Loads the given chunk, and returns a promise that resolves once the chunk
1634
+ * has been loaded.
1635
+ */ function doLoadChunk(sourceType, chunkUrl) {
1636
+ const resolver = getOrCreateResolver(chunkUrl);
1637
+ if (resolver.loadingStarted) {
1638
+ return resolver.promise;
1639
+ }
1640
+ if (sourceType === SourceType.Runtime) {
1641
+ // We don't need to load chunks references from runtime code, as they're already
1642
+ // present in the DOM.
1643
+ resolver.loadingStarted = true;
1644
+ if (isCss(chunkUrl)) {
1645
+ // CSS chunks do not register themselves, and as such must be marked as
1646
+ // loaded instantly.
1647
+ resolver.resolve();
1648
+ }
1649
+ // We need to wait for JS chunks to register themselves within `registerChunk`
1650
+ // before we can start instantiating runtime modules, hence the absence of
1651
+ // `resolver.resolve()` in this branch.
1652
+ return resolver.promise;
1653
+ }
1654
+ if (typeof importScripts === 'function') {
1655
+ // We're in a web worker
1656
+ if (isCss(chunkUrl)) {
1657
+ // ignore
1658
+ } else if (isJs(chunkUrl)) {
1659
+ self.TURBOPACK_NEXT_CHUNK_URLS.push(chunkUrl);
1660
+ importScripts(TURBOPACK_WORKER_LOCATION + chunkUrl);
1661
+ } else {
1662
+ throw new Error(`can't infer type of chunk from URL ${chunkUrl} in worker`);
1663
+ }
1664
+ } else {
1665
+ // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.
1666
+ const decodedChunkUrl = decodeURI(chunkUrl);
1667
+ if (isCss(chunkUrl)) {
1668
+ const previousLinks = document.querySelectorAll(`link[rel=stylesheet][href="${chunkUrl}"],link[rel=stylesheet][href^="${chunkUrl}?"],link[rel=stylesheet][href="${decodedChunkUrl}"],link[rel=stylesheet][href^="${decodedChunkUrl}?"]`);
1669
+ if (previousLinks.length > 0) {
1670
+ // CSS chunks do not register themselves, and as such must be marked as
1671
+ // loaded instantly.
1672
+ resolver.resolve();
1673
+ } else {
1674
+ const link = document.createElement('link');
1675
+ link.rel = 'stylesheet';
1676
+ link.href = chunkUrl;
1677
+ link.onerror = ()=>{
1678
+ resolver.reject();
1679
+ };
1680
+ link.onload = ()=>{
1681
+ // CSS chunks do not register themselves, and as such must be marked as
1682
+ // loaded instantly.
1683
+ resolver.resolve();
1684
+ };
1685
+ // Append to the `head` for webpack compatibility.
1686
+ document.head.appendChild(link);
1687
+ }
1688
+ } else if (isJs(chunkUrl)) {
1689
+ const previousScripts = document.querySelectorAll(`script[src="${chunkUrl}"],script[src^="${chunkUrl}?"],script[src="${decodedChunkUrl}"],script[src^="${decodedChunkUrl}?"]`);
1690
+ if (previousScripts.length > 0) {
1691
+ // There is this edge where the script already failed loading, but we
1692
+ // can't detect that. The Promise will never resolve in this case.
1693
+ for (const script of Array.from(previousScripts)){
1694
+ script.addEventListener('error', ()=>{
1695
+ resolver.reject();
1696
+ });
1697
+ }
1698
+ } else {
1699
+ const script = document.createElement('script');
1700
+ script.src = chunkUrl;
1701
+ // We'll only mark the chunk as loaded once the script has been executed,
1702
+ // which happens in `registerChunk`. Hence the absence of `resolve()` in
1703
+ // this branch.
1704
+ script.onerror = ()=>{
1705
+ resolver.reject();
1706
+ };
1707
+ // Append to the `head` for webpack compatibility.
1708
+ document.head.appendChild(script);
1709
+ }
1710
+ } else {
1711
+ throw new Error(`can't infer type of chunk from URL ${chunkUrl}`);
1712
+ }
1713
+ }
1714
+ resolver.loadingStarted = true;
1715
+ return resolver.promise;
1716
+ }
1717
+ function fetchWebAssembly(wasmChunkPath) {
1718
+ return fetch(getChunkRelativeUrl(wasmChunkPath));
1719
+ }
1720
+ })();
1721
+ /**
1722
+ * This file contains the runtime code specific to the Turbopack development
1723
+ * ECMAScript DOM runtime.
1724
+ *
1725
+ * It will be appended to the base development runtime code.
1726
+ */ /* eslint-disable @typescript-eslint/no-unused-vars */ /// <reference path="../base/runtime-base.ts" />
1727
+ /// <reference path="../base/dev-base.ts" />
1728
+ /// <reference path="./runtime-backend-dom.ts" />
1729
+ /// <reference path="../../../shared/require-type.d.ts" />
1730
+ let DEV_BACKEND;
1731
+ (()=>{
1732
+ DEV_BACKEND = {
1733
+ unloadChunk (chunkUrl) {
1734
+ deleteResolver(chunkUrl);
1735
+ // TODO(PACK-2140): remove this once all filenames are guaranteed to be escaped.
1736
+ const decodedChunkUrl = decodeURI(chunkUrl);
1737
+ if (isCss(chunkUrl)) {
1738
+ const links = document.querySelectorAll(`link[href="${chunkUrl}"],link[href^="${chunkUrl}?"],link[href="${decodedChunkUrl}"],link[href^="${decodedChunkUrl}?"]`);
1739
+ for (const link of Array.from(links)){
1740
+ link.remove();
1741
+ }
1742
+ } else if (isJs(chunkUrl)) {
1743
+ // Unloading a JS chunk would have no effect, as it lives in the JS
1744
+ // runtime once evaluated.
1745
+ // However, we still want to remove the script tag from the DOM to keep
1746
+ // the HTML somewhat consistent from the user's perspective.
1747
+ const scripts = document.querySelectorAll(`script[src="${chunkUrl}"],script[src^="${chunkUrl}?"],script[src="${decodedChunkUrl}"],script[src^="${decodedChunkUrl}?"]`);
1748
+ for (const script of Array.from(scripts)){
1749
+ script.remove();
1750
+ }
1751
+ } else {
1752
+ throw new Error(`can't infer type of chunk from URL ${chunkUrl}`);
1753
+ }
1754
+ },
1755
+ reloadChunk (chunkUrl) {
1756
+ return new Promise((resolve, reject)=>{
1757
+ if (!isCss(chunkUrl)) {
1758
+ reject(new Error('The DOM backend can only reload CSS chunks'));
1759
+ return;
1760
+ }
1761
+ const decodedChunkUrl = decodeURI(chunkUrl);
1762
+ const previousLinks = document.querySelectorAll(`link[rel=stylesheet][href="${chunkUrl}"],link[rel=stylesheet][href^="${chunkUrl}?"],link[rel=stylesheet][href="${decodedChunkUrl}"],link[rel=stylesheet][href^="${decodedChunkUrl}?"]`);
1763
+ if (previousLinks.length === 0) {
1764
+ reject(new Error(`No link element found for chunk ${chunkUrl}`));
1765
+ return;
1766
+ }
1767
+ const link = document.createElement('link');
1768
+ link.rel = 'stylesheet';
1769
+ if (navigator.userAgent.includes('Firefox')) {
1770
+ // Firefox won't reload CSS files that were previously loaded on the current page,
1771
+ // we need to add a query param to make sure CSS is actually reloaded from the server.
1772
+ //
1773
+ // I believe this is this issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1037506
1774
+ //
1775
+ // Safari has a similar issue, but only if you have a `<link rel=preload ... />` tag
1776
+ // pointing to the same URL as the stylesheet: https://bugs.webkit.org/show_bug.cgi?id=187726
1777
+ link.href = `${chunkUrl}?ts=${Date.now()}`;
1778
+ } else {
1779
+ link.href = chunkUrl;
1780
+ }
1781
+ link.onerror = ()=>{
1782
+ reject();
1783
+ };
1784
+ link.onload = ()=>{
1785
+ // First load the new CSS, then remove the old ones. This prevents visible
1786
+ // flickering that would happen in-between removing the previous CSS and
1787
+ // loading the new one.
1788
+ for (const previousLink of Array.from(previousLinks))previousLink.remove();
1789
+ // CSS chunks do not register themselves, and as such must be marked as
1790
+ // loaded instantly.
1791
+ resolve();
1792
+ };
1793
+ // Make sure to insert the new CSS right after the previous one, so that
1794
+ // its precedence is higher.
1795
+ previousLinks[0].parentElement.insertBefore(link, previousLinks[0].nextSibling);
1796
+ });
1797
+ },
1798
+ restart: ()=>self.location.reload()
1799
+ };
1800
+ function deleteResolver(chunkUrl) {
1801
+ chunkResolvers.delete(chunkUrl);
1802
+ }
1803
+ })();
1804
+ function _eval({ code, url, map }) {
1805
+ code += `\n\n//# sourceURL=${encodeURI(location.origin + CHUNK_BASE_PATH + url + CHUNK_SUFFIX_PATH)}`;
1806
+ if (map) {
1807
+ code += `\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${btoa(// btoa doesn't handle nonlatin characters, so escape them as \x sequences
1808
+ // See https://stackoverflow.com/a/26603875
1809
+ unescape(encodeURIComponent(map)))}`;
1810
+ }
1811
+ // eslint-disable-next-line no-eval
1812
+ return eval(code);
1813
+ }
1814
+ const chunksToRegister = globalThis.TURBOPACK;
1815
+ globalThis.TURBOPACK = { push: registerChunk };
1816
+ chunksToRegister.forEach(registerChunk);
1817
+ const chunkListsToRegister = globalThis.TURBOPACK_CHUNK_LISTS || [];
1818
+ globalThis.TURBOPACK_CHUNK_LISTS = { push: registerChunkList };
1819
+ chunkListsToRegister.forEach(registerChunkList);
1820
+ })();
1821
+
1822
+
1823
+ //# sourceMappingURL=pages__app_5e653343._.js.map