@farm.js/core 0.1.75 → 0.1.76

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 (213) hide show
  1. package/dist/{agent-mcp.d-Djvao5eV.d.ts → agent-mcp.d-Cftp2kFv.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-wA13pwmS.d.mts → agent-mcp.d-D0FMmqi0.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +2 -2
  4. package/dist/agent-runtime.d.mts +7 -5
  5. package/dist/agent-runtime.d.ts +7 -5
  6. package/dist/agent-runtime.mjs +1 -1
  7. package/dist/analyzer-KFJGYJS7.cjs +16 -0
  8. package/dist/{analyzer-LJHMFCDW.mjs → analyzer-NLQKPN74.mjs} +2 -2
  9. package/dist/api/node.d.mts +9 -7
  10. package/dist/api/node.d.ts +9 -7
  11. package/dist/api/route-manager.d.mts +9 -7
  12. package/dist/api/route-manager.d.ts +9 -7
  13. package/dist/api/runtime.d.mts +8 -6
  14. package/dist/api/runtime.d.ts +8 -6
  15. package/dist/api.d.mts +10 -8
  16. package/dist/api.d.ts +10 -8
  17. package/dist/{app-manifest.d-BukcP_EV.d.ts → app-manifest.d-7PmA_9hm.d.ts} +1 -1
  18. package/dist/{app-manifest.d-DIuqSi9k.d.mts → app-manifest.d-cpOw_sV5.d.mts} +1 -1
  19. package/dist/app-markdown.d.mts +8 -6
  20. package/dist/app-markdown.d.ts +8 -6
  21. package/dist/{app.d-YVuFb10p.d.mts → app.d-DUZvwnFF.d.mts} +5 -4
  22. package/dist/{app.d-BQqmM6Gy.d.ts → app.d-wOkxXre8.d.ts} +5 -4
  23. package/dist/{chunk-A5F55ZFA.mjs → chunk-2GZZVIXY.mjs} +1 -1
  24. package/dist/{chunk-4BS3HSY7.cjs → chunk-2JEXQAIR.cjs} +2 -2
  25. package/dist/{chunk-OZARLCYQ.cjs → chunk-2WKGQCAV.cjs} +162 -162
  26. package/dist/{chunk-B4CWYGCG.mjs → chunk-3OYFMOBY.mjs} +1 -1
  27. package/dist/{chunk-GNY7BO7R.mjs → chunk-5EEQNZLU.mjs} +2 -2
  28. package/dist/{chunk-XGDI4OUB.cjs → chunk-6ZFGWB75.cjs} +13 -1
  29. package/dist/{chunk-6MATGOEF.mjs → chunk-A2VFKOQL.mjs} +1 -1
  30. package/dist/{chunk-YL7BKHYE.cjs → chunk-BBRSPKFI.cjs} +277 -265
  31. package/dist/{chunk-BNTRXJL4.cjs → chunk-BYJPBJ4E.cjs} +3 -3
  32. package/dist/{chunk-4ZSZI6XL.cjs → chunk-CCQZDOQR.cjs} +8 -8
  33. package/dist/{chunk-OFIFRB62.mjs → chunk-CKBBKRBO.mjs} +34 -18
  34. package/dist/{chunk-IK33N2AN.cjs → chunk-DTNWLRRF.cjs} +144 -128
  35. package/dist/{chunk-BUC3FDYC.cjs → chunk-DVW6SKHA.cjs} +2 -2
  36. package/dist/{chunk-MFU7SXAB.mjs → chunk-E77ZKNPN.mjs} +1 -1
  37. package/dist/{chunk-YCNKS6SD.mjs → chunk-GP5BWTO7.mjs} +2 -2
  38. package/dist/{chunk-HT2SZKXG.mjs → chunk-H76C5AOU.mjs} +12 -0
  39. package/dist/{chunk-ZV76IQG7.cjs → chunk-HKGU2X4I.cjs} +2 -2
  40. package/dist/{chunk-4T2RB4JA.mjs → chunk-JL6XHQZF.mjs} +3 -3
  41. package/dist/{chunk-HV2WZFUW.mjs → chunk-MOS2N377.mjs} +1 -1
  42. package/dist/{chunk-IDOUCM2X.mjs → chunk-O225GNEU.mjs} +53 -41
  43. package/dist/{chunk-NPGXX7HN.cjs → chunk-PSNYVBWC.cjs} +3 -3
  44. package/dist/{chunk-WHCNJVYU.cjs → chunk-PXXG5BID.cjs} +3 -3
  45. package/dist/{chunk-TJVUTGED.mjs → chunk-Q4X3MX4J.mjs} +201 -3
  46. package/dist/{chunk-TFEODQLG.mjs → chunk-Q7JMHO5U.mjs} +2 -2
  47. package/dist/{chunk-JNZDTE75.cjs → chunk-QP4GYVRR.cjs} +6 -6
  48. package/dist/{chunk-HVJ7IACB.cjs → chunk-QTDIOZV6.cjs} +2 -2
  49. package/dist/{chunk-YSTKSZD2.mjs → chunk-SGQXJVFX.mjs} +1 -1
  50. package/dist/{chunk-KPYQ32BA.cjs → chunk-TMVVBK5S.cjs} +2 -2
  51. package/dist/{chunk-JMYXO572.cjs → chunk-UBXNTZCY.cjs} +205 -7
  52. package/dist/{chunk-2NQ3S2SJ.mjs → chunk-VDJ3CLBR.mjs} +1 -1
  53. package/dist/{chunk-WJ5CCQBM.cjs → chunk-WILPJVQE.cjs} +4 -4
  54. package/dist/{chunk-PBQGIA27.cjs → chunk-WJDMH3E7.cjs} +4 -4
  55. package/dist/{chunk-ZPCZWEU3.cjs → chunk-WMJQNVKX.cjs} +2 -2
  56. package/dist/{chunk-H7QY7ZE4.mjs → chunk-X3HUT4JU.mjs} +1 -1
  57. package/dist/{chunk-IVBDRAOR.cjs → chunk-XLOORES5.cjs} +1 -1
  58. package/dist/{chunk-QGYHE6VJ.mjs → chunk-YHE7HH2I.mjs} +19 -19
  59. package/dist/{chunk-4MU4QCX4.mjs → chunk-YONTMPZ6.mjs} +1 -1
  60. package/dist/{chunk-GLF44JKY.mjs → chunk-YQXJY7E7.mjs} +1 -1
  61. package/dist/cli-runtime.d-D84CwyPI.d.ts +535 -0
  62. package/dist/cli-runtime.d-OQY2pgwK.d.mts +535 -0
  63. package/dist/client/lifecycle.d.mts +1 -1
  64. package/dist/client/lifecycle.d.ts +1 -1
  65. package/dist/{client-component.d-CZ1NpHAY.d.ts → client-component.d-Bf8jZqW7.d.ts} +2 -137
  66. package/dist/{client-component.d-BeqVuqy2.d.mts → client-component.d-Bh6CfC5z.d.mts} +2 -137
  67. package/dist/{client-plugins.d-D9kWC0QB.d.ts → client-plugins.d-DuujrC8d.d.ts} +4 -4
  68. package/dist/{client-plugins.d-ChceYO9t.d.mts → client-plugins.d-r3K2oQ6w.d.mts} +4 -4
  69. package/dist/client-plugins.d.mts +7 -5
  70. package/dist/client-plugins.d.ts +7 -5
  71. package/dist/client.d.mts +12 -10
  72. package/dist/client.d.ts +12 -10
  73. package/dist/config.d.mts +7 -5
  74. package/dist/config.d.ts +7 -5
  75. package/dist/desktop.d.mts +8 -6
  76. package/dist/desktop.d.ts +8 -6
  77. package/dist/{devtools-T5I2WHRX.cjs → devtools-3WZIZ7KK.cjs} +3 -3
  78. package/dist/{devtools-B3W3DLPG.mjs → devtools-MBZPUH3U.mjs} +2 -2
  79. package/dist/docs.cjs +4 -4
  80. package/dist/docs.d.mts +10 -65
  81. package/dist/docs.d.ts +10 -65
  82. package/dist/docs.mjs +3 -3
  83. package/dist/environment/vite.cjs +3 -3
  84. package/dist/environment/vite.mjs +2 -2
  85. package/dist/handler.d-Bd5lRSvb.d.ts +62 -0
  86. package/dist/handler.d-SRH-AKzf.d.mts +62 -0
  87. package/dist/{headers.d-BawakaPv.d.mts → headers.d-CHHvyaIG.d.mts} +1 -1
  88. package/dist/{headers.d-Aux4JVnm.d.ts → headers.d-D-OvGikv.d.ts} +1 -1
  89. package/dist/index.cjs +22 -20
  90. package/dist/index.d-BOPsgMlI.d.mts +16 -0
  91. package/dist/index.d-BiUtYJUG.d.ts +16 -0
  92. package/dist/index.d.mts +39 -556
  93. package/dist/index.d.ts +39 -556
  94. package/dist/index.mjs +21 -19
  95. package/dist/integrations/orm.cjs +3 -3
  96. package/dist/integrations/orm.d.mts +6 -4
  97. package/dist/integrations/orm.d.ts +6 -4
  98. package/dist/integrations/orm.mjs +2 -2
  99. package/dist/integrations.cjs +2 -2
  100. package/dist/integrations.d.mts +7 -5
  101. package/dist/integrations.d.ts +7 -5
  102. package/dist/integrations.mjs +1 -1
  103. package/dist/internal/app-markdown-runtime.d.mts +8 -6
  104. package/dist/internal/app-markdown-runtime.d.ts +8 -6
  105. package/dist/internal/build-runtime.cjs +19 -19
  106. package/dist/internal/build-runtime.d.mts +10 -7
  107. package/dist/internal/build-runtime.d.ts +10 -7
  108. package/dist/internal/build-runtime.mjs +18 -18
  109. package/dist/internal/cli-runtime.cjs +11 -6
  110. package/dist/internal/cli-runtime.d.mts +45 -0
  111. package/dist/internal/cli-runtime.d.ts +45 -0
  112. package/dist/internal/cli-runtime.mjs +10 -5
  113. package/dist/internal/client-error-overlay.cjs +4 -4
  114. package/dist/internal/client-error-overlay.mjs +1 -1
  115. package/dist/internal/client-runtime.d.mts +11 -9
  116. package/dist/internal/client-runtime.d.ts +11 -9
  117. package/dist/internal/compression-runtime.d.mts +7 -5
  118. package/dist/internal/compression-runtime.d.ts +7 -5
  119. package/dist/internal/config-runtime.cjs +4 -4
  120. package/dist/internal/config-runtime.d.mts +9 -7
  121. package/dist/internal/config-runtime.d.ts +9 -7
  122. package/dist/internal/config-runtime.mjs +3 -3
  123. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  124. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  125. package/dist/internal/native-server-fns.cjs +4 -4
  126. package/dist/internal/native-server-fns.mjs +3 -3
  127. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  128. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  129. package/dist/internal/production-runtime.cjs +7 -7
  130. package/dist/internal/production-runtime.d.mts +16 -14
  131. package/dist/internal/production-runtime.d.ts +16 -14
  132. package/dist/internal/production-runtime.mjs +6 -6
  133. package/dist/internal/start-manifest.d.mts +7 -5
  134. package/dist/internal/start-manifest.d.ts +7 -5
  135. package/dist/{lifecycle.d-OtGWAvJT.d.mts → lifecycle.d-VzcXyEyn.d.mts} +1 -1
  136. package/dist/{lifecycle.d-OtGWAvJT.d.ts → lifecycle.d-VzcXyEyn.d.ts} +1 -1
  137. package/dist/markdown.d.mts +7 -5
  138. package/dist/markdown.d.ts +7 -5
  139. package/dist/middleware.d.mts +7 -5
  140. package/dist/middleware.d.ts +7 -5
  141. package/dist/{mount.d-Ca8eb9GB.d.ts → mount.d-C2yq0Zzz.d.ts} +1 -1
  142. package/dist/{mount.d-BomEt2kV.d.mts → mount.d-vq1HTq5u.d.mts} +1 -1
  143. package/dist/{navigation-delegate.d-DJCC2jXF.d.ts → navigation-delegate.d-D7xIin3i.d.ts} +1 -1
  144. package/dist/{navigation-delegate.d-B1ujRkYo.d.mts → navigation-delegate.d-DS2Sqm7E.d.mts} +1 -1
  145. package/dist/navigation.d.mts +10 -8
  146. package/dist/navigation.d.ts +10 -8
  147. package/dist/{plugin-FD4S2QEJ.mjs → plugin-6CHZBFJD.mjs} +1 -1
  148. package/dist/{plugin-5BNPYCER.cjs → plugin-YXPIS3XX.cjs} +2 -2
  149. package/dist/plugin.cjs +12 -12
  150. package/dist/plugin.d.mts +11 -8
  151. package/dist/plugin.d.ts +11 -8
  152. package/dist/plugin.mjs +11 -11
  153. package/dist/{render-plan.d-BxRbaxYA.d.ts → render-plan.d-BCq0nfdw.d.ts} +1 -1
  154. package/dist/{render-plan.d-CFod_Zf-.d.mts → render-plan.d-X6KqerAM.d.mts} +1 -1
  155. package/dist/renderer-client.d.mts +10 -8
  156. package/dist/renderer-client.d.ts +10 -8
  157. package/dist/{request.d-DG4TeXMM.d.mts → request.d-Be9rWboC.d.mts} +1 -1
  158. package/dist/{request.d-DRQgaXGG.d.ts → request.d-CPdq2_kC.d.ts} +1 -1
  159. package/dist/request.d.mts +8 -6
  160. package/dist/request.d.ts +8 -6
  161. package/dist/{route-rendering.d-BXtZKgqu.d.mts → route-rendering.d-CIPli7Ve.d.mts} +1 -1
  162. package/dist/{route-rendering.d-Db07UNVG.d.ts → route-rendering.d-CKB5GhQr.d.ts} +1 -1
  163. package/dist/{router.d-BC3hyjf0.d.ts → router.d-CvrbOXzF.d.ts} +1 -1
  164. package/dist/{router.d-B61kXqxJ.d.mts → router.d-VxTgLGxN.d.mts} +1 -1
  165. package/dist/routes.d.mts +7 -5
  166. package/dist/routes.d.ts +7 -5
  167. package/dist/{rsc-pipeline-LJ7YCGY6.mjs → rsc-pipeline-FPE4OL57.mjs} +4 -4
  168. package/dist/{rsc-pipeline-VENBFYXW.cjs → rsc-pipeline-TPHK74VE.cjs} +5 -5
  169. package/dist/{runtime-4DWUXZHS.mjs → runtime-45BD33OJ.mjs} +3 -3
  170. package/dist/{runtime-UNDTYGQS.cjs → runtime-UBG657UC.cjs} +5 -5
  171. package/dist/{runtime.d-Cl6EBGmC.d.mts → runtime.d-Cn1jiDNI.d.mts} +1 -1
  172. package/dist/{runtime.d-SC95yDzr.d.ts → runtime.d-Ps54JWpo.d.ts} +1 -1
  173. package/dist/{schema.d-Dny9pnrm.d.mts → schema.d-BM-uVGpx.d.mts} +1 -1
  174. package/dist/{schema.d-Dny9pnrm.d.ts → schema.d-BM-uVGpx.d.ts} +1 -1
  175. package/dist/schema.d.mts +1 -1
  176. package/dist/schema.d.ts +1 -1
  177. package/dist/{index.d-r1MLpgeE.d.ts → server-components-status.d-Dhtbs5lC.d.ts} +2 -15
  178. package/dist/{index.d-Ccq42CPU.d.mts → server-components-status.d-DnmipSb3.d.mts} +2 -15
  179. package/dist/server-plugins.d.mts +9 -7
  180. package/dist/server-plugins.d.ts +9 -7
  181. package/dist/server.cjs +37 -35
  182. package/dist/server.d.mts +17 -14
  183. package/dist/server.d.ts +17 -14
  184. package/dist/server.mjs +16 -14
  185. package/dist/session-ACVUJ5XV.cjs +23 -0
  186. package/dist/{session-QZXZOPR2.mjs → session-ASQTJNBK.mjs} +2 -2
  187. package/dist/{spa-router.d-DrlXgDqY.d.mts → spa-router.d-DXm5J9rM.d.mts} +4 -4
  188. package/dist/{spa-router.d-DwM02Mwd.d.ts → spa-router.d-cppVufl2.d.ts} +4 -4
  189. package/dist/ssg.d-CI5OFl8H.d.ts +138 -0
  190. package/dist/ssg.d-Duzy1wQc.d.mts +138 -0
  191. package/dist/storage.cjs +4 -2
  192. package/dist/storage.d.mts +14 -4
  193. package/dist/storage.d.ts +14 -4
  194. package/dist/storage.mjs +3 -1
  195. package/dist/testing.d.mts +7 -5
  196. package/dist/testing.d.ts +7 -5
  197. package/dist/{types.d-BnIqOn9w.d.mts → types.d-D5cY6XjK.d.mts} +43 -2
  198. package/dist/{types.d-BnIqOn9w.d.ts → types.d-D5cY6XjK.d.ts} +43 -2
  199. package/dist/{utils.d-CHzxAshz.d.mts → utils.d-CNI-I8ZV.d.mts} +1 -1
  200. package/dist/{utils.d-C6KXz3uB.d.ts → utils.d-D3dfy8zh.d.ts} +1 -1
  201. package/dist/version.cjs +2 -2
  202. package/dist/version.mjs +1 -1
  203. package/dist/vite.cjs +12 -12
  204. package/dist/vite.d.mts +12 -9
  205. package/dist/vite.d.ts +12 -9
  206. package/dist/vite.mjs +11 -11
  207. package/package.json +10 -3
  208. package/dist/analyzer-23GCBYFI.cjs +0 -16
  209. package/dist/session-2Q72D4QV.cjs +0 -23
  210. /package/dist/{chunk-PMU4U2W2.cjs → chunk-22T75EML.cjs} +0 -0
  211. /package/dist/{chunk-5O3SK3ZC.mjs → chunk-6MNDFNZW.mjs} +0 -0
  212. /package/dist/{chunk-Z5ZZAGIH.mjs → chunk-LSHUCNIF.mjs} +0 -0
  213. /package/dist/{chunk-6DBBMQWT.cjs → chunk-OWO7KDZ3.cjs} +0 -0
@@ -40,15 +40,15 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
40
40
 
41
41
 
42
42
 
43
- var _chunkIK33N2ANcjs = require('./chunk-IK33N2AN.cjs');
43
+ var _chunkDTNWLRRFcjs = require('./chunk-DTNWLRRF.cjs');
44
44
 
45
45
 
46
46
 
47
47
 
48
- var _chunkHVJ7IACBcjs = require('./chunk-HVJ7IACB.cjs');
48
+ var _chunkQTDIOZV6cjs = require('./chunk-QTDIOZV6.cjs');
49
49
 
50
50
 
51
- var _chunkPMU4U2W2cjs = require('./chunk-PMU4U2W2.cjs');
51
+ var _chunk22T75EMLcjs = require('./chunk-22T75EML.cjs');
52
52
 
53
53
 
54
54
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
@@ -64,7 +64,7 @@ var _chunk7564NP5Zcjs = require('./chunk-7564NP5Z.cjs');
64
64
 
65
65
 
66
66
 
67
- var _chunkXGDI4OUBcjs = require('./chunk-XGDI4OUB.cjs');
67
+ var _chunk6ZFGWB75cjs = require('./chunk-6ZFGWB75.cjs');
68
68
 
69
69
 
70
70
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -82,13 +82,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
82
82
 
83
83
 
84
84
 
85
- var _chunkWJ5CCQBMcjs = require('./chunk-WJ5CCQBM.cjs');
85
+ var _chunkWILPJVQEcjs = require('./chunk-WILPJVQE.cjs');
86
86
 
87
87
 
88
88
  var _chunkYRXPDKMMcjs = require('./chunk-YRXPDKMM.cjs');
89
89
 
90
90
 
91
- var _chunkKPYQ32BAcjs = require('./chunk-KPYQ32BA.cjs');
91
+ var _chunkTMVVBK5Scjs = require('./chunk-TMVVBK5S.cjs');
92
92
 
93
93
 
94
94
 
@@ -139,7 +139,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
139
139
 
140
140
 
141
141
 
142
- var _chunkJNZDTE75cjs = require('./chunk-JNZDTE75.cjs');
142
+ var _chunkQP4GYVRRcjs = require('./chunk-QP4GYVRR.cjs');
143
143
 
144
144
 
145
145
 
@@ -215,7 +215,7 @@ var _chunk2YJ4DHTDcjs = require('./chunk-2YJ4DHTD.cjs');
215
215
 
216
216
 
217
217
 
218
- var _chunk6DBBMQWTcjs = require('./chunk-6DBBMQWT.cjs');
218
+ var _chunkOWO7KDZ3cjs = require('./chunk-OWO7KDZ3.cjs');
219
219
 
220
220
 
221
221
 
@@ -301,7 +301,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
301
301
  var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
302
302
 
303
303
 
304
- var _chunkIVBDRAORcjs = require('./chunk-IVBDRAOR.cjs');
304
+ var _chunkXLOORES5cjs = require('./chunk-XLOORES5.cjs');
305
305
 
306
306
 
307
307
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -700,7 +700,7 @@ function findClientServerFnViolation(code, id) {
700
700
  return null;
701
701
  }
702
702
  function createServerFnBoundaryDiagnostic(violation, id, location) {
703
- return _chunkJNZDTE75cjs.createFarmDiagnostic.call(void 0,
703
+ return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
704
704
  "CLIENT_SERVER_FUNCTION",
705
705
  id,
706
706
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -959,21 +959,21 @@ function readPropertyKey(property) {
959
959
  function createClientBoundaryDiagnostic(file, finding, location) {
960
960
  switch (finding.kind) {
961
961
  case "server-env":
962
- return _chunkJNZDTE75cjs.createFarmDiagnostic.call(void 0,
962
+ return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
963
963
  "CLIENT_SERVER_ENV",
964
964
  file,
965
965
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
966
966
  location
967
967
  );
968
968
  case "public-env":
969
- return _chunkJNZDTE75cjs.createFarmDiagnostic.call(void 0,
969
+ return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
970
970
  "CLIENT_PROCESS_ENV_PUBLIC",
971
971
  file,
972
972
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
973
973
  location
974
974
  );
975
975
  case "builtin":
976
- return _chunkJNZDTE75cjs.createFarmDiagnostic.call(void 0,
976
+ return _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
977
977
  "CLIENT_NODE_BUILTIN",
978
978
  file,
979
979
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1274,7 +1274,7 @@ function loadFarmWorkflowsDevRuntime() {
1274
1274
  return import("./workflows.cjs");
1275
1275
  }
1276
1276
  function loadFarmDevtoolsSnapshotRuntime() {
1277
- return import("./devtools-T5I2WHRX.cjs");
1277
+ return import("./devtools-3WZIZ7KK.cjs");
1278
1278
  }
1279
1279
  function loadFarmDevtoolsUIRuntime() {
1280
1280
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -1305,16 +1305,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1305
1305
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1306
1306
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1307
1307
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1308
- _chunkIK33N2ANcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1309
- new RegExp(`^${_chunkJNZDTE75cjs.FARM_RESOLVE_FROM_PREFIX}`),
1308
+ _chunkDTNWLRRFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1309
+ new RegExp(`^${_chunkQP4GYVRRcjs.FARM_RESOLVE_FROM_PREFIX}`),
1310
1310
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1311
1311
  // included.
1312
1312
  /^node:/,
1313
- _chunkIK33N2ANcjs.exactIdPattern.call(void 0, _module.builtinModules)
1313
+ _chunkDTNWLRRFcjs.exactIdPattern.call(void 0, _module.builtinModules)
1314
1314
  ];
1315
1315
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1316
- _chunkIK33N2ANcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1317
- new RegExp(`^${_chunkJNZDTE75cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1316
+ _chunkDTNWLRRFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1317
+ new RegExp(`^${_chunkQP4GYVRRcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1318
1318
  ];
1319
1319
  function createFarmPlatformClientModule(platform) {
1320
1320
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1350,18 +1350,18 @@ function farmIslandContainersPlugin(config) {
1350
1350
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1351
1351
  return null;
1352
1352
  }
1353
- if (_chunkJNZDTE75cjs.hasUseClientDirective.call(void 0, code)) return null;
1353
+ if (_chunkQP4GYVRRcjs.hasUseClientDirective.call(void 0, code)) return null;
1354
1354
  const file = id.split("?", 1)[0];
1355
- const bindings = _chunkJNZDTE75cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1355
+ const bindings = _chunkQP4GYVRRcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1356
1356
  if (bindings.length === 0) return null;
1357
- const grown = _chunkJNZDTE75cjs.wrapFarmIslandContainers.call(void 0, {
1357
+ const grown = _chunkQP4GYVRRcjs.wrapFarmIslandContainers.call(void 0, {
1358
1358
  code,
1359
1359
  file,
1360
1360
  bindings,
1361
- reference: _chunkJNZDTE75cjs.farmIslandContainerReferencePath.call(void 0, root)
1361
+ reference: _chunkQP4GYVRRcjs.farmIslandContainerReferencePath.call(void 0, root)
1362
1362
  });
1363
1363
  if (grown === null) return null;
1364
- _chunkJNZDTE75cjs.ensureFarmIslandContainerReference.call(void 0, root);
1364
+ _chunkQP4GYVRRcjs.ensureFarmIslandContainerReference.call(void 0, root);
1365
1365
  return { code: grown, map: null };
1366
1366
  }
1367
1367
  };
@@ -1375,15 +1375,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1375
1375
  config(config) {
1376
1376
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1377
1377
  if (options.distDir) {
1378
- _chunkJNZDTE75cjs.usePackageScanCacheFile.call(void 0,
1378
+ _chunkQP4GYVRRcjs.usePackageScanCacheFile.call(void 0,
1379
1379
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1380
1380
  );
1381
1381
  }
1382
- const bundledPackages = _chunkJNZDTE75cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1382
+ const bundledPackages = _chunkQP4GYVRRcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1383
1383
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1384
- _chunkJNZDTE75cjs.persistPackageScanCache.call(void 0, );
1384
+ _chunkQP4GYVRRcjs.persistPackageScanCache.call(void 0, );
1385
1385
  return {
1386
- optimizeDeps: { rolldownOptions: { plugins: [_chunkJNZDTE75cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1386
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkQP4GYVRRcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1387
1387
  ssr: {
1388
1388
  noExternal: [
1389
1389
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1407,8 +1407,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1407
1407
  return FARM_SERVER_ONLY_PACKAGE_ID;
1408
1408
  }
1409
1409
  this.error(
1410
- _chunkJNZDTE75cjs.formatFarmDiagnostic.call(void 0,
1411
- _chunkJNZDTE75cjs.createFarmDiagnostic.call(void 0,
1410
+ _chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
1411
+ _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
1412
1412
  "CLIENT_SERVER_ONLY_IMPORT",
1413
1413
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1414
1414
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1418,9 +1418,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1418
1418
  );
1419
1419
  }
1420
1420
  if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
1421
- return _chunkJNZDTE75cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1421
+ return _chunkQP4GYVRRcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1422
1422
  }
1423
- const resolveFrom = importer ? _chunkJNZDTE75cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1423
+ const resolveFrom = importer ? _chunkQP4GYVRRcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1424
1424
  if (resolveFrom) {
1425
1425
  const directory = path6.dirname(resolveFrom.importer);
1426
1426
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1437,8 +1437,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1437
1437
  const importedBy = importer ? ` (imported by ${importer})` : "";
1438
1438
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
1439
1439
  this.error(
1440
- _chunkJNZDTE75cjs.formatFarmDiagnostic.call(void 0,
1441
- _chunkJNZDTE75cjs.createFarmDiagnostic.call(void 0,
1440
+ _chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
1441
+ _chunkQP4GYVRRcjs.createFarmDiagnostic.call(void 0,
1442
1442
  "CLIENT_SERVER_ONLY_ENTRY",
1443
1443
  _nullishCoalesce(importer, () => ( id)),
1444
1444
  `${id} is server-only and cannot be imported into client code.`
@@ -1463,7 +1463,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1463
1463
  if (id === FARM_PLATFORM_CLIENT_ID) {
1464
1464
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1465
1465
  }
1466
- return _nullishCoalesce(_chunkJNZDTE75cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1466
+ return _nullishCoalesce(_chunkQP4GYVRRcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1467
1467
  }
1468
1468
  }
1469
1469
  };
@@ -1496,7 +1496,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1496
1496
  if (!snapshot) return "";
1497
1497
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1498
1498
  if (snapshot.routing === "none") return runtime;
1499
- return `${_chunkXGDI4OUBcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1499
+ return `${_chunk6ZFGWB75cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1500
1500
  }
1501
1501
  function getPublicEnvDefine(config) {
1502
1502
  const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
@@ -1569,7 +1569,7 @@ function sendFarmDevRuntimeHookError(res, json) {
1569
1569
  res.end(json ? _chunk4VLXQ55Ocjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1570
1570
  }
1571
1571
  function opensFarmDevRuntimeSession(pm) {
1572
- return pm.hasRuntimeRequestHooks() || _chunkHVJ7IACBcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1572
+ return pm.hasRuntimeRequestHooks() || _chunkQTDIOZV6cjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1573
1573
  }
1574
1574
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1575
1575
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1682,7 +1682,7 @@ function interceptFarmDevPageResponse(options) {
1682
1682
  res.end = originalEnd;
1683
1683
  res.writeHead = originalWriteHead;
1684
1684
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1685
- delete res[_chunkPMU4U2W2cjs.FARM_NODE_RESPONSE_END_PENDING];
1685
+ delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
1686
1686
  };
1687
1687
  let runtimeHookFailed = false;
1688
1688
  const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
@@ -1806,7 +1806,7 @@ function interceptFarmDevPageResponse(options) {
1806
1806
  });
1807
1807
  res.end = ((...args) => {
1808
1808
  interceptedEnd = true;
1809
- res[_chunkPMU4U2W2cjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1809
+ res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1810
1810
  if (afterResponseCalled) return res;
1811
1811
  afterResponseCalled = true;
1812
1812
  options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
@@ -1889,7 +1889,7 @@ function interceptFarmDevPageResponse(options) {
1889
1889
  res.end = originalEnd;
1890
1890
  res.writeHead = originalWriteHead;
1891
1891
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1892
- delete res[_chunkPMU4U2W2cjs.FARM_NODE_RESPONSE_END_PENDING];
1892
+ delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
1893
1893
  originalEnd(...originalEndArgs);
1894
1894
  }).catch((error) => {
1895
1895
  reportFailure(error);
@@ -1906,14 +1906,14 @@ function interceptFarmDevPageResponse(options) {
1906
1906
  res.end = originalEnd;
1907
1907
  res.writeHead = originalWriteHead;
1908
1908
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1909
- delete res[_chunkPMU4U2W2cjs.FARM_NODE_RESPONSE_END_PENDING];
1909
+ delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
1910
1910
  originalEnd(body, callback);
1911
1911
  } else {
1912
1912
  res.write = originalWrite;
1913
1913
  res.end = originalEnd;
1914
1914
  res.writeHead = originalWriteHead;
1915
1915
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1916
- delete res[_chunkPMU4U2W2cjs.FARM_NODE_RESPONSE_END_PENDING];
1916
+ delete res[_chunk22T75EMLcjs.FARM_NODE_RESPONSE_END_PENDING];
1917
1917
  originalEnd(...originalEndArgs);
1918
1918
  }
1919
1919
  });
@@ -2077,7 +2077,7 @@ function transformIsolatedClientBoundaryModule(options) {
2077
2077
  return null;
2078
2078
  }
2079
2079
  const body = Array.isArray(ast.body) ? ast.body : [];
2080
- const everyExportIsComponent = options.code.includes(_chunkJNZDTE75cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkJNZDTE75cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2080
+ const everyExportIsComponent = options.code.includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2081
2081
  const replacements = [];
2082
2082
  const wrapperStatements = [];
2083
2083
  const originalEntries = [];
@@ -2228,16 +2228,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2228
2228
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2229
2229
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2230
2230
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2231
- if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkJNZDTE75cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2231
+ if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkQP4GYVRRcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2232
2232
  }
2233
2233
  findings.push(finding);
2234
2234
  }
2235
2235
  if (findings.length === 0) return;
2236
2236
  warnedClientBoundaryIds.add(id);
2237
- const locate = _chunkJNZDTE75cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2237
+ const locate = _chunkQP4GYVRRcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2238
2238
  _chunkGC5ROI3Acjs.logger.warn(
2239
2239
  findings.map(
2240
- (finding) => _chunkJNZDTE75cjs.formatFarmDiagnostic.call(void 0,
2240
+ (finding) => _chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
2241
2241
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2242
2242
  config.root
2243
2243
  )
@@ -2278,7 +2278,7 @@ function hasFarmSourceAliasOverride(alias) {
2278
2278
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2279
2279
  const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2280
2280
  const imageImports = farmImageImportsPlugin();
2281
- const fontImports = _chunkIK33N2ANcjs.farmFontImportsPlugin.call(void 0, {
2281
+ const fontImports = _chunkDTNWLRRFcjs.farmFontImportsPlugin.call(void 0, {
2282
2282
  root: options.root,
2283
2283
  basePath: options.basePath,
2284
2284
  publicDir: options.publicDir
@@ -2325,6 +2325,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2325
2325
  let openAPIManager = null;
2326
2326
  let middlewareManager;
2327
2327
  let refreshRouteDiscovery = null;
2328
+ const pendingRouteReloads = /* @__PURE__ */ new Set();
2328
2329
  let workflowHandler = null;
2329
2330
  let isBuild = false;
2330
2331
  let farmOwnsDevCors = false;
@@ -2357,11 +2358,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2357
2358
  isBuild = configEnv.command === "build";
2358
2359
  const farmAliases = {
2359
2360
  ..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, options.layers),
2360
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkIK33N2ANcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2361
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkDTNWLRRFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2361
2362
  };
2362
2363
  if (Object.keys(farmAliases).length > 0) {
2363
2364
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2364
- userConfig.resolve.alias = _chunkIK33N2ANcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2365
+ userConfig.resolve.alias = _chunkDTNWLRRFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2365
2366
  }
2366
2367
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2367
2368
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
@@ -2435,7 +2436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2435
2436
  } catch (e21) {
2436
2437
  }
2437
2438
  };
2438
- farmApp = new (0, _chunkIK33N2ANcjs.FarmApp)(
2439
+ farmApp = new (0, _chunkDTNWLRRFcjs.FarmApp)(
2439
2440
  {
2440
2441
  ...options,
2441
2442
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2443,7 +2444,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2443
2444
  server
2444
2445
  );
2445
2446
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2446
- _chunkJNZDTE75cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2447
+ _chunkQP4GYVRRcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2447
2448
  farmApp.getConfig().root,
2448
2449
  options.distDir || ".farm"
2449
2450
  )
@@ -2454,7 +2455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2454
2455
  let farmAppPackages;
2455
2456
  if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
2456
2457
  farmMiddlewares.use((_req, res, next) => {
2457
- if (_chunkKPYQ32BAcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2458
+ if (_chunkTMVVBK5Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2458
2459
  res.setHeader("X-Robots-Tag", _chunkF4ID7BGOcjs.FARM_PREVIEW_ROBOTS_TAG);
2459
2460
  }
2460
2461
  next();
@@ -2462,7 +2463,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2462
2463
  }
2463
2464
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2464
2465
  const devBuiltInRoutePaths = new Set(
2465
- _chunkWJ5CCQBMcjs.listFarmBuiltInRoutePaths.call(void 0, {
2466
+ _chunkWILPJVQEcjs.listFarmBuiltInRoutePaths.call(void 0, {
2466
2467
  agent: {
2467
2468
  apiCatalog: true,
2468
2469
  mcp: true,
@@ -2591,8 +2592,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2591
2592
  let typeArtifactGenScheduled = null;
2592
2593
  let pendingTypeArtifacts = createEmptyTypeArtifactSelection();
2593
2594
  let pendingTypeArtifactReason = "";
2594
- let routeRefreshScheduled = null;
2595
- let pendingRouteRefreshIncludesMiddleware = false;
2595
+ let queuedRouteFiles;
2596
2596
  const scheduleTypeArtifactGen = (file, event, selection) => {
2597
2597
  const normalizedFile = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, file);
2598
2598
  for (const [artifact, enabled] of Object.entries(selection)) {
@@ -2635,20 +2635,29 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2635
2635
  }
2636
2636
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2637
2637
  if (isRouteRefreshEvent) {
2638
- if (file.includes("middleware.")) {
2639
- pendingRouteRefreshIncludesMiddleware = true;
2640
- }
2641
- if (!routeRefreshScheduled) {
2642
- routeRefreshScheduled = setTimeout(() => {
2643
- routeRefreshScheduled = null;
2644
- const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
2645
- pendingRouteRefreshIncludesMiddleware = false;
2646
- Promise.all([
2647
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
2648
- reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
2649
- ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkGC5ROI3Acjs.logger.warn(`Route refresh failed: ${error.message}`));
2638
+ if (!queuedRouteFiles) {
2639
+ const files = /* @__PURE__ */ new Set();
2640
+ queuedRouteFiles = files;
2641
+ pendingRouteReloads.add(files);
2642
+ setTimeout(async () => {
2643
+ queuedRouteFiles = void 0;
2644
+ try {
2645
+ await Promise.all([
2646
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
2647
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
2648
+ ]);
2649
+ if (pendingRouteReloads.size === 1)
2650
+ server.ws.send({ type: "full-reload", path: "*" });
2651
+ } catch (error) {
2652
+ _chunkGC5ROI3Acjs.logger.warn(
2653
+ `Route refresh failed: ${error instanceof Error ? error.message : String(error)}`
2654
+ );
2655
+ } finally {
2656
+ pendingRouteReloads.delete(files);
2657
+ }
2650
2658
  }, 50);
2651
2659
  }
2660
+ queuedRouteFiles.add(normalizedFile);
2652
2661
  }
2653
2662
  });
2654
2663
  });
@@ -2793,7 +2802,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2793
2802
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2794
2803
  };
2795
2804
  releaseDocsMCPServers();
2796
- const isFarmDocsPathGuarded = (href) => _chunkXGDI4OUBcjs.farmPathGuardCoversPage.call(void 0,
2805
+ const isFarmDocsPathGuarded = (href) => _chunk6ZFGWB75cjs.farmPathGuardCoversPage.call(void 0,
2797
2806
  {
2798
2807
  config: farmConfig,
2799
2808
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2806,7 +2815,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2806
2815
  clientEntry: "/@farm/client.js",
2807
2816
  resolveLayoutFonts: resolveDocsLayoutFonts,
2808
2817
  fontStylesheetHref: "/@farm/fonts.css",
2809
- globalStylesheetHref: _chunkIK33N2ANcjs.resolveDevGlobalStylesheetHref.call(void 0,
2818
+ globalStylesheetHref: _chunkDTNWLRRFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2810
2819
  farmConfig.root,
2811
2820
  farmConfig.srcDir
2812
2821
  ),
@@ -2837,7 +2846,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2837
2846
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2838
2847
  resolveLayoutFonts: resolveDocsLayoutFonts,
2839
2848
  fontStylesheetHref: "/@farm/fonts.css",
2840
- globalStylesheetHref: _chunkIK33N2ANcjs.resolveDevGlobalStylesheetHref.call(void 0,
2849
+ globalStylesheetHref: _chunkDTNWLRRFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2841
2850
  farmConfig.root,
2842
2851
  farmConfig.srcDir
2843
2852
  ),
@@ -3005,7 +3014,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3005
3014
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3006
3015
  res.statusCode = 200;
3007
3016
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3008
- res.end(requestMethod === "HEAD" ? void 0 : _chunkIK33N2ANcjs.FARM_VIDEO_PLAYER_HTML);
3017
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkDTNWLRRFcjs.FARM_VIDEO_PLAYER_HTML);
3009
3018
  return;
3010
3019
  }
3011
3020
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3285,9 +3294,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3285
3294
  if (pm && opensFarmDevRuntimeSession(pm)) {
3286
3295
  try {
3287
3296
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3288
- const route = _chunkWJ5CCQBMcjs.setFarmRouteLabel.call(void 0,
3297
+ const route = _chunkWILPJVQEcjs.setFarmRouteLabel.call(void 0,
3289
3298
  { pathname: requestPathname },
3290
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWJ5CCQBMcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3299
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWILPJVQEcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3291
3300
  );
3292
3301
  runtimeSession2 = await pm.beginRuntimeRequest(
3293
3302
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3376,8 +3385,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3376
3385
  );
3377
3386
  return;
3378
3387
  }
3379
- if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunkWJ5CCQBMcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3380
- const manifestGuardCoversPath = (path7) => _chunkXGDI4OUBcjs.farmPathGuardCoversEndpoint.call(void 0,
3388
+ if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunkWILPJVQEcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3389
+ const manifestGuardCoversPath = (path7) => _chunk6ZFGWB75cjs.farmPathGuardCoversEndpoint.call(void 0,
3381
3390
  {
3382
3391
  config: farmConfig,
3383
3392
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3386,18 +3395,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3386
3395
  apiServerBasePath
3387
3396
  );
3388
3397
  await serveBuiltInRoute(async () => {
3389
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkIK33N2ANcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3390
- const manifest = await _chunkWJ5CCQBMcjs.createFarmAppManifestResponse.call(void 0,
3398
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkDTNWLRRFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3399
+ const manifest = await _chunkWILPJVQEcjs.createFarmAppManifestResponse.call(void 0,
3391
3400
  new Request(parsedRequestUrl, {
3392
3401
  method: requestMethod,
3393
3402
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3394
3403
  }),
3395
3404
  {
3396
- ..._chunkWJ5CCQBMcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3405
+ ..._chunkWILPJVQEcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3397
3406
  build: "development",
3398
3407
  packages: farmAppPackages,
3399
3408
  // Read again on each request; unchanged files come from a cache.
3400
- webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkIK33N2ANcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3409
+ webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkDTNWLRRFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3401
3410
  }),
3402
3411
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3403
3412
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3415,11 +3424,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3415
3424
  });
3416
3425
  return;
3417
3426
  }
3418
- if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkWJ5CCQBMcjs.FARM_API_CATALOG_PATH) {
3427
+ if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkWILPJVQEcjs.FARM_API_CATALOG_PATH) {
3419
3428
  await serveBuiltInRoute(
3420
- () => _chunkWJ5CCQBMcjs.createFarmApiCatalogResponse.call(void 0,
3429
+ () => _chunkWILPJVQEcjs.createFarmApiCatalogResponse.call(void 0,
3421
3430
  requestMethod,
3422
- _chunkWJ5CCQBMcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3431
+ _chunkWILPJVQEcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3423
3432
  new Request(parsedRequestUrl, {
3424
3433
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3425
3434
  })
@@ -3428,7 +3437,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3428
3437
  return;
3429
3438
  }
3430
3439
  if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
3431
- const aiCatalog = _chunkWJ5CCQBMcjs.createFarmAiCatalogResponse.call(void 0,
3440
+ const aiCatalog = _chunkWILPJVQEcjs.createFarmAiCatalogResponse.call(void 0,
3432
3441
  new Request(parsedRequestUrl, {
3433
3442
  method: requestMethod,
3434
3443
  headers: {
@@ -3510,7 +3519,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3510
3519
  {
3511
3520
  kind: "docs",
3512
3521
  computed: docsResponse,
3513
- label: _chunkWJ5CCQBMcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3522
+ label: _chunkWILPJVQEcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3514
3523
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3515
3524
  {
3516
3525
  path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
@@ -3547,7 +3556,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3547
3556
  }
3548
3557
  const markdownRouteLabel = () => (
3549
3558
  // On the route path, as production labels it: /fr/index.md is /index.md.
3550
- _chunkWJ5CCQBMcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3559
+ _chunkWILPJVQEcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3551
3560
  toRoutePathname(requestPathname),
3552
3561
  (page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
3553
3562
  )
@@ -3568,7 +3577,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3568
3577
  return {
3569
3578
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3570
3579
  // Project-relative, as production sends it: never the machine's path.
3571
- filePath: _chunkIK33N2ANcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3580
+ filePath: _chunkDTNWLRRFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3572
3581
  };
3573
3582
  },
3574
3583
  // The anonymous check goes through this server, so its guards and
@@ -3703,7 +3712,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3703
3712
  }
3704
3713
  const configuredIntegrations = currentConfig.integrations;
3705
3714
  const tryConfiguredIntegrationRoute = async () => {
3706
- const matchedRoute = _chunk6DBBMQWTcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3715
+ const matchedRoute = _chunkOWO7KDZ3cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3707
3716
  pathname: requestPathname,
3708
3717
  method: requestMethod
3709
3718
  });
@@ -3717,7 +3726,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3717
3726
  await pm.runHookParallelFiltered(
3718
3727
  "beforeRequest",
3719
3728
  (plugin2) => {
3720
- const owner = _chunk6DBBMQWTcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3729
+ const owner = _chunkOWO7KDZ3cjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3721
3730
  return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3722
3731
  },
3723
3732
  req,
@@ -3747,7 +3756,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3747
3756
  });
3748
3757
  const dispatchIntegration = async (request, runtime) => {
3749
3758
  try {
3750
- const result = await _chunk6DBBMQWTcjs.dispatchIntegrationRequest.call(void 0,
3759
+ const result = await _chunkOWO7KDZ3cjs.dispatchIntegrationRequest.call(void 0,
3751
3760
  {
3752
3761
  integration: matchedRoute.integration,
3753
3762
  config: currentConfig,
@@ -3814,7 +3823,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3814
3823
  const hasLocalDevRoute = () => {
3815
3824
  const routeManager3 = farmApp.getRouteManager();
3816
3825
  return Boolean(
3817
- _chunk6DBBMQWTcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3826
+ _chunkOWO7KDZ3cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3818
3827
  pathname: requestPathname,
3819
3828
  method: requestMethod
3820
3829
  }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
@@ -3911,9 +3920,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3911
3920
  );
3912
3921
  const docsRuntimeOptions = () => ({
3913
3922
  kind: "docs",
3914
- route: _chunkWJ5CCQBMcjs.setFarmRouteLabel.call(void 0,
3923
+ route: _chunkWILPJVQEcjs.setFarmRouteLabel.call(void 0,
3915
3924
  { pathname: pathname2, pattern: urlPath2 },
3916
- _chunkWJ5CCQBMcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3925
+ _chunkWILPJVQEcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3917
3926
  path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
3918
3927
  roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
3919
3928
  })
@@ -4267,7 +4276,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4267
4276
  );
4268
4277
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4269
4278
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4270
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkJNZDTE75cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4279
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkQP4GYVRRcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4271
4280
  const isClientComponent = moduleMetadata.isClientComponent;
4272
4281
  const shouldHydrate = moduleMetadata.shouldHydrate;
4273
4282
  let mergedMetadata = {};
@@ -4275,7 +4284,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4275
4284
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
4276
4285
  );
4277
4286
  const layoutHydrationMetadata = layouts.map(
4278
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkJNZDTE75cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
4287
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4288
+ (entry) => entry.pattern === layout.pattern
4289
+ ), () => ( {
4290
+ ..._chunkQP4GYVRRcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4291
+ serverTree: false
4292
+ }))
4279
4293
  );
4280
4294
  const shouldHydrateLayout = layoutHydrationMetadata.some(
4281
4295
  (metadata) => metadata.shouldHydrate
@@ -4288,7 +4302,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4288
4302
  ];
4289
4303
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4290
4304
  _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
4291
- ) === "islands" ? _chunkIK33N2ANcjs.resolveFarmRouteRootStrategy.call(void 0,
4305
+ ) === "islands" ? _chunkDTNWLRRFcjs.resolveFarmRouteRootStrategy.call(void 0,
4292
4306
  route,
4293
4307
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4294
4308
  layouts.map((layout, index) => ({
@@ -4354,7 +4368,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4354
4368
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4355
4369
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4356
4370
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4357
- ), () => ( _chunkJNZDTE75cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4371
+ ), () => ( _chunkQP4GYVRRcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4358
4372
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4359
4373
  request: targetRequest,
4360
4374
  params: slot.params,
@@ -4400,15 +4414,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4400
4414
  );
4401
4415
  const projectRoot = server.config.root;
4402
4416
  const toUrlPath = (absolutePath) => _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4403
- const renderPlan = _chunkXGDI4OUBcjs.createFarmRouteRenderPlan.call(void 0, {
4417
+ const renderPlan = _chunk6ZFGWB75cjs.createFarmRouteRenderPlan.call(void 0, {
4404
4418
  pageShouldHydrate: shouldHydrate,
4405
4419
  layoutShouldHydrate: shouldHydrateLayout,
4406
4420
  islandStrategy: hydrationIslandStrategy,
4407
4421
  rendering: _chunk7564NP5Zcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4408
4422
  });
4409
4423
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4410
- const layoutStartIndex = _chunkXGDI4OUBcjs.getSharedLayoutPrefixLength.call(void 0,
4411
- _chunkXGDI4OUBcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4424
+ const layoutStartIndex = _chunk6ZFGWB75cjs.getSharedLayoutPrefixLength.call(void 0,
4425
+ _chunk6ZFGWB75cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4412
4426
  destinationLayoutPatterns
4413
4427
  );
4414
4428
  const renderer = farmApp.getServerRenderer();
@@ -4423,7 +4437,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4423
4437
  params,
4424
4438
  layouts: layouts.map((layout, index) => ({
4425
4439
  pattern: layout.pattern,
4426
- module: layoutModules[index]
4440
+ module: layoutModules[index],
4441
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.serverTree])
4427
4442
  })),
4428
4443
  layoutStartIndex,
4429
4444
  slots: routeSlots.map((slot) => ({
@@ -4489,7 +4504,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4489
4504
  {
4490
4505
  status: 200,
4491
4506
  headers: {
4492
- "Cache-Control": _chunkXGDI4OUBcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4507
+ "Cache-Control": _chunk6ZFGWB75cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4493
4508
  "X-Farm-Navigation": "html-fragment",
4494
4509
  Vary: "X-Farm-Layout-Chain",
4495
4510
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4531,14 +4546,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4531
4546
  trustProxy: currentServerConfig.trustProxy
4532
4547
  }).pathname;
4533
4548
  const routeManager2 = farmApp.getRouteManager();
4534
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _314 => _314.hasHook, 'call', _315 => _315("beforeRequest")]), () => ( false));
4535
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("afterResponse")]), () => ( false));
4536
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("afterRender")]), () => ( false)));
4549
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("beforeRequest")]), () => ( false));
4550
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("afterResponse")]), () => ( false));
4551
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasHook, 'call', _323 => _323("afterRender")]), () => ( false)));
4537
4552
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4538
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasRuntimeHook, 'call', _323 => _323("after")]), () => ( false));
4553
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
4539
4554
  const pageBuiltInRouteLabel = (pathname2) => {
4540
4555
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4541
- const mcpLabel = _chunkWJ5CCQBMcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4556
+ const mcpLabel = _chunkWILPJVQEcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4542
4557
  if (mcpLabel) return mcpLabel;
4543
4558
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4544
4559
  return routePathname === _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkYRXPDKMMcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4547,13 +4562,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4547
4562
  const match = routeManager2.matchRoute(pathname2);
4548
4563
  return {
4549
4564
  kind: "page",
4550
- route: _chunkWJ5CCQBMcjs.setFarmRouteLabel.call(void 0,
4565
+ route: _chunkWILPJVQEcjs.setFarmRouteLabel.call(void 0,
4551
4566
  {
4552
4567
  pathname: pathname2,
4553
- pattern: _optionalChain([match, 'optionalAccess', _324 => _324.route, 'optionalAccess', _325 => _325.pattern]) || null,
4554
- params: _optionalChain([match, 'optionalAccess', _326 => _326.params]) || {}
4568
+ pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
4569
+ params: _optionalChain([match, 'optionalAccess', _328 => _328.params]) || {}
4555
4570
  },
4556
- _optionalChain([match, 'optionalAccess', _327 => _327.route]) ? null : pageBuiltInRouteLabel(pathname2)
4571
+ _optionalChain([match, 'optionalAccess', _329 => _329.route]) ? null : pageBuiltInRouteLabel(pathname2)
4557
4572
  )
4558
4573
  };
4559
4574
  };
@@ -4633,7 +4648,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4633
4648
  }) : void 0;
4634
4649
  let middlewareFailed = false;
4635
4650
  try {
4636
- if (_optionalChain([middlewareManager, 'optionalAccess', _328 => _328.hasMiddleware, 'call', _329 => _329()])) {
4651
+ if (_optionalChain([middlewareManager, 'optionalAccess', _330 => _330.hasMiddleware, 'call', _331 => _331()])) {
4637
4652
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4638
4653
  const handled = await runFarmMiddlewareWithNavigation(
4639
4654
  farmApp.getServerRenderer(),
@@ -4646,7 +4661,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4646
4661
  throw error;
4647
4662
  });
4648
4663
  if (handled) {
4649
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _330 => _330.isEnded, 'call', _331 => _331()])) {
4664
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
4650
4665
  const duration = Date.now() - startTime;
4651
4666
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4652
4667
  }
@@ -4661,8 +4676,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4661
4676
  res
4662
4677
  );
4663
4678
  }
4664
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
4665
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
4679
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
4680
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
4666
4681
  const duration = Date.now() - startTime;
4667
4682
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4668
4683
  }
@@ -4681,8 +4696,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4681
4696
  await pm.reportRuntimeRequestError(runtimeSession, error);
4682
4697
  } else {
4683
4698
  await pm.failRuntimeRequest(runtimeSession, error);
4684
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
4685
- _optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.release, 'call', _339 => _339()]);
4699
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.isEnded, 'call', _339 => _339()])) {
4700
+ _optionalChain([responseInterceptor, 'optionalAccess', _340 => _340.release, 'call', _341 => _341()]);
4686
4701
  console.error("[FARM] Page error:", error);
4687
4702
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4688
4703
  return;
@@ -4699,7 +4714,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4699
4714
  }
4700
4715
  })
4701
4716
  );
4702
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _340 => _340.stack, 'access', _341 => _341.at, 'call', _342 => _342(-1), 'optionalAccess', _343 => _343.handle]);
4717
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _342 => _342.stack, 'access', _343 => _343.at, 'call', _344 => _344(-1), 'optionalAccess', _345 => _345.handle]);
4703
4718
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4704
4719
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4705
4720
  }
@@ -4728,7 +4743,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4728
4743
  });
4729
4744
  }
4730
4745
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4731
- const root = _optionalChain([farmApp, 'optionalAccess', _344 => _344.getConfig, 'call', _345 => _345(), 'access', _346 => _346.root]) || _optionalChain([server, 'optionalAccess', _347 => _347.config, 'access', _348 => _348.root]) || options.root;
4746
+ const root = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347(), 'access', _348 => _348.root]) || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || options.root;
4732
4747
  return this.resolve(id, path6.join(root, "package.json"), {
4733
4748
  ...resolveOptions,
4734
4749
  skipSelf: true
@@ -4756,7 +4771,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4756
4771
  }
4757
4772
  },
4758
4773
  async load(id, loadOptions) {
4759
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _349 => _349.ssr]) && !farmSetupContext.getStore()) {
4774
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _351 => _351.ssr]) && !farmSetupContext.getStore()) {
4760
4775
  await pendingClientSetup;
4761
4776
  }
4762
4777
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4774,8 +4789,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4774
4789
  if (imageModule) return imageModule;
4775
4790
  }
4776
4791
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4777
- const renderer = _optionalChain([farmApp, 'optionalAccess', _350 => _350.getConfig, 'call', _351 => _351(), 'access', _352 => _352.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4778
- const root = _optionalChain([server, 'optionalAccess', _353 => _353.config, 'access', _354 => _354.root]) || options.root;
4792
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _352 => _352.getConfig, 'call', _353 => _353(), 'access', _354 => _354.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4793
+ const root = _optionalChain([server, 'optionalAccess', _355 => _355.config, 'access', _356 => _356.root]) || options.root;
4779
4794
  if (isClientEnvironment(this, loadOptions)) {
4780
4795
  return generateProgrammaticClientRouteModuleForId(
4781
4796
  id,
@@ -4791,65 +4806,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4791
4806
  return FARM_DEV_CLIENT_BOOT_MODULE;
4792
4807
  }
4793
4808
  if (isFarmClientVirtualId(id)) {
4794
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _355 => _355.getConfig, 'call', _356 => _356()]);
4795
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _357 => _357.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4796
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _358 => _358.integrations]) || options.integrations;
4797
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.root]) || _optionalChain([server, 'optionalAccess', _360 => _360.config, 'access', _361 => _361.root]) || process.cwd();
4798
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _362 => _362.docs]);
4809
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358()]);
4810
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4811
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.integrations]) || options.integrations;
4812
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.root]) || _optionalChain([server, 'optionalAccess', _362 => _362.config, 'access', _363 => _363.root]) || process.cwd();
4813
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.docs]);
4799
4814
  const adapterOwnsDocsRuntime = Boolean(
4800
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _363 => _363.adapter, 'optionalAccess', _364 => _364.server]) && docs.adapter.react
4815
+ _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _365 => _365.adapter, 'optionalAccess', _366 => _366.server]) && docs.adapter.react
4801
4816
  );
4802
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _365 => _365.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4817
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _367 => _367.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4803
4818
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4804
- _optionalChain([docs, 'optionalAccess', _366 => _366.enabled]) ? loadFarmDocsDevRuntime() : null,
4805
- _optionalChain([docs, 'optionalAccess', _367 => _367.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4819
+ _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) ? loadFarmDocsDevRuntime() : null,
4820
+ _optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4806
4821
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4807
4822
  ]);
4808
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _368 => _368.isFarmDocsSearchEnabled, 'call', _369 => _369(docs)]), () => ( false));
4823
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _370 => _370.isFarmDocsSearchEnabled, 'call', _371 => _371(docs)]), () => ( false));
4809
4824
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4810
4825
  docsSearchEnabled,
4811
4826
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4812
4827
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4813
4828
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4814
4829
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4815
- const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunk6DBBMQWTcjs.getIntegrationProviders.call(void 0, integrations) : [];
4816
- const isolatedHydrationMode = _chunkJNZDTE75cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4817
- _optionalChain([resolvedConfig, 'optionalAccess', _370 => _370.experimental, 'optionalAccess', _371 => _371.isolatedClientHydration]),
4830
+ const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkOWO7KDZ3cjs.getIntegrationProviders.call(void 0, integrations) : [];
4831
+ const isolatedHydrationMode = _chunkQP4GYVRRcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4832
+ _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
4818
4833
  {
4819
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.serverComponents])) === "rsc",
4834
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
4820
4835
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4821
4836
  }
4822
4837
  );
4823
4838
  return generateClientCode(
4824
4839
  integrationProviders,
4825
4840
  [
4826
- ..._chunk6DBBMQWTcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4827
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _374 => _374.getFarmDocsDocumentNavigationMatchers, 'call', _375 => _375(docs)]), () => ( []))
4841
+ ..._chunkOWO7KDZ3cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4842
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
4828
4843
  ],
4829
4844
  generatedDocsSearchRuntime,
4830
4845
  `${generatedDevtoolsClientRuntime}
4831
4846
  ${generatedDevIndicatorsClientRuntime}`,
4832
- _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.plugins]) || [],
4847
+ _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.plugins]) || [],
4833
4848
  root,
4834
- _optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.srcDir]) || options.srcDir || "src",
4835
- _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.publicRuntimeConfig]) || options.publicRuntimeConfig,
4836
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _379 => _379.adapter, 'optionalAccess', _380 => _380.react]) : void 0,
4849
+ _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.srcDir]) || options.srcDir || "src",
4850
+ _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.publicRuntimeConfig]) || options.publicRuntimeConfig,
4851
+ _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _381 => _381.adapter, 'optionalAccess', _382 => _382.react]) : void 0,
4837
4852
  renderer,
4838
- isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _381 => _381.getRouteManager, 'call', _382 => _382(), 'access', _383 => _383.getIsolatedClientBoundaryModules, 'call', _384 => _384(root)])))), 'optionalAccess', _385 => _385.size]) > 0,
4839
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _386 => _386.trailingSlash]), () => ( false)),
4840
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.basePath]), () => ( "/")),
4841
- _chunkIK33N2ANcjs.generateClientCachePersistenceCode.call(void 0,
4842
- _chunkIK33N2ANcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.cache]))
4853
+ isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
4854
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
4855
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
4856
+ _chunkDTNWLRRFcjs.generateClientCachePersistenceCode.call(void 0,
4857
+ _chunkDTNWLRRFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
4843
4858
  ),
4844
4859
  _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4845
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.experimental, 'optionalAccess', _390 => _390.serverComponents])) === "islands"
4860
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
4846
4861
  );
4847
4862
  }
4848
4863
  if (id === "/@farm/server") {
4849
4864
  return generateServerCode();
4850
4865
  }
4851
4866
  if (id === "/@farm/manifest") {
4852
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _391 => _391.getRouteManager, 'call', _392 => _392()]);
4867
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getRouteManager, 'call', _394 => _394()]);
4853
4868
  if (!routeManager) {
4854
4869
  return `
4855
4870
  export const getManifest = () => ({
@@ -4861,11 +4876,11 @@ export const getManifest = () => ({
4861
4876
  });
4862
4877
  `;
4863
4878
  }
4864
- const globalStylesheetHref = _chunkIK33N2ANcjs.resolveDevGlobalStylesheetHref.call(void 0,
4879
+ const globalStylesheetHref = _chunkDTNWLRRFcjs.resolveDevGlobalStylesheetHref.call(void 0,
4865
4880
  server.config.root,
4866
- _optionalChain([farmApp, 'optionalAccess', _393 => _393.getConfig, 'call', _394 => _394(), 'access', _395 => _395.srcDir])
4881
+ _optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
4867
4882
  );
4868
- const fullManifest = _chunkIK33N2ANcjs.createFarmDevClientManifest.call(void 0,
4883
+ const fullManifest = _chunkDTNWLRRFcjs.createFarmDevClientManifest.call(void 0,
4869
4884
  routeManager.generateClientManifest(server.config.root),
4870
4885
  {
4871
4886
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4881,64 +4896,64 @@ export { manifest };
4881
4896
  }
4882
4897
  },
4883
4898
  async transform(code, id, transformOptions) {
4884
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _396 => _396.ssr]) && !farmSetupContext.getStore()) {
4899
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) && !farmSetupContext.getStore()) {
4885
4900
  await pendingClientSetup;
4886
4901
  }
4887
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _397 => _397.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4888
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _398 => _398.getConfig, 'call', _399 => _399()]), () => ( options));
4902
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4903
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
4889
4904
  let rewrotePackageImports = false;
4890
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _400 => _400.experimental, 'optionalAccess', _401 => _401.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _402 => _402.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkJNZDTE75cjs.hasUseClientDirective.call(void 0, code)) {
4905
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkQP4GYVRRcjs.hasUseClientDirective.call(void 0, code)) {
4891
4906
  const file = id.split("?", 1)[0];
4892
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _403 => _403.config, 'access', _404 => _404.root]) || process.cwd();
4907
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
4893
4908
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4894
4909
  const rewrite = () => {
4895
- if (_optionalChain([transformOptions, 'optionalAccess', _405 => _405.ssr]) === true) {
4910
+ if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
4896
4911
  if (farmReactServerFiles.has(file)) {
4897
- for (const child of _chunkJNZDTE75cjs.farmRelativeImportFiles.call(void 0, code, file))
4912
+ for (const child of _chunkQP4GYVRRcjs.farmRelativeImportFiles.call(void 0, code, file))
4898
4913
  farmReactServerFiles.add(child);
4899
4914
  }
4900
- const serverModule = farmReactServerFiles.has(file) || !_chunkJNZDTE75cjs.getFarmClientReachableModules.call(void 0,
4915
+ const serverModule = farmReactServerFiles.has(file) || !_chunkQP4GYVRRcjs.getFarmClientReachableModules.call(void 0,
4901
4916
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4902
4917
  projectRoot
4903
4918
  ).has(path6.resolve(file));
4904
- const reactServer = !serverModule ? null : _chunkJNZDTE75cjs.rewriteFarmReactServerImports.call(void 0, {
4919
+ const reactServer = !serverModule ? null : _chunkQP4GYVRRcjs.rewriteFarmReactServerImports.call(void 0, {
4905
4920
  code,
4906
4921
  file,
4907
- reference: (specifier, exportName) => _chunkJNZDTE75cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4922
+ reference: (specifier, exportName) => _chunkQP4GYVRRcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4908
4923
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4909
4924
  });
4910
4925
  if (reactServer !== null) {
4911
4926
  code = reactServer;
4912
4927
  rewrotePackageImports = true;
4913
4928
  }
4914
- const internal = farmReactServerFiles.has(file) ? _chunkJNZDTE75cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4929
+ const internal = farmReactServerFiles.has(file) ? _chunkQP4GYVRRcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4915
4930
  code,
4916
4931
  file,
4917
- reference: (clientFile) => _chunkJNZDTE75cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4932
+ reference: (clientFile) => _chunkQP4GYVRRcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4918
4933
  }) : null;
4919
4934
  if (internal !== null) {
4920
4935
  code = internal;
4921
4936
  rewrotePackageImports = true;
4922
4937
  }
4923
4938
  }
4924
- const rewritePackageImports = (source2) => _chunkJNZDTE75cjs.rewriteFarmPackageClientImports.call(void 0, {
4939
+ const rewritePackageImports = (source2) => _chunkQP4GYVRRcjs.rewriteFarmPackageClientImports.call(void 0, {
4925
4940
  code: source2,
4926
4941
  file,
4927
4942
  root: projectRoot,
4928
- isClientPackage: (specifier) => _chunkJNZDTE75cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4943
+ isClientPackage: (specifier) => _chunkQP4GYVRRcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4929
4944
  });
4930
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _406 => _406.getRouteManager, 'call', _407 => _407()]);
4945
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
4931
4946
  const source = code;
4932
4947
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4933
4948
  if (referenced !== null) {
4934
4949
  code = referenced;
4935
4950
  rewrotePackageImports = true;
4936
4951
  }
4937
- if (_optionalChain([transformOptions, 'optionalAccess', _408 => _408.ssr]) === true) {
4952
+ if (_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true) {
4938
4953
  const cached = rewriteFarmReactCacheImport(
4939
4954
  code,
4940
4955
  file,
4941
- _optionalChain([runtimeModule, 'optionalCall', _409 => _409(FARM_REACT_CACHE_MODULE)])
4956
+ _optionalChain([runtimeModule, 'optionalCall', _411 => _411(FARM_REACT_CACHE_MODULE)])
4942
4957
  );
4943
4958
  if (cached !== null) {
4944
4959
  code = cached;
@@ -4946,46 +4961,46 @@ export { manifest };
4946
4961
  }
4947
4962
  }
4948
4963
  };
4949
- if (buildSnapshot) _chunkJNZDTE75cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4964
+ if (buildSnapshot) _chunkQP4GYVRRcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4950
4965
  else rewrite();
4951
4966
  }
4952
4967
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4953
4968
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4954
- environment: _optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true ? "rsc" : "client"
4969
+ environment: _optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) === true ? "rsc" : "client"
4955
4970
  });
4956
4971
  if (serverFns) {
4957
4972
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
4958
4973
  code = serverFns.code;
4959
4974
  }
4960
4975
  }
4961
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _411 => _411.experimental, 'optionalAccess', _412 => _412.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4976
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4962
4977
  const file = id.split("?", 1)[0];
4963
4978
  const actionModule = transformFarmFormActionModule({
4964
4979
  code,
4965
4980
  id,
4966
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _413 => _413.config, 'access', _414 => _414.root]) || process.cwd(),
4967
- ssr: _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true,
4981
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _415 => _415.config, 'access', _416 => _416.root]) || process.cwd(),
4982
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) === true,
4968
4983
  // Parsed by file type: page components are TSX.
4969
4984
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
4970
4985
  runtimeModule
4971
4986
  });
4972
4987
  if (actionModule) return { code: actionModule, map: null };
4973
4988
  }
4974
- if (!_optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr])) {
4975
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _417 => _417.getConfig, 'call', _418 => _418(), 'optionalAccess', _419 => _419.docs]));
4976
- if (_chunkIK33N2ANcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4977
- const redacted = _chunkIK33N2ANcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4989
+ if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
4990
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
4991
+ if (_chunkDTNWLRRFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4992
+ const redacted = _chunkDTNWLRRFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
4978
4993
  if (redacted !== null) return { code: redacted, map: null };
4979
4994
  }
4980
4995
  }
4981
- if (!_optionalChain([transformOptions, 'optionalAccess', _420 => _420.ssr])) {
4982
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _421 => _421.getConfig, 'call', _422 => _422()]), () => ( options));
4983
- if ((_optionalChain([currentConfig, 'access', _423 => _423.experimental, 'optionalAccess', _424 => _424.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
4996
+ if (!_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr])) {
4997
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _423 => _423.getConfig, 'call', _424 => _424()]), () => ( options));
4998
+ if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
4984
4999
  const violation = findClientServerFnViolation(code, id);
4985
5000
  if (violation) {
4986
- const locate = _chunkJNZDTE75cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5001
+ const locate = _chunkQP4GYVRRcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
4987
5002
  this.error(
4988
- _chunkJNZDTE75cjs.formatFarmDiagnostic.call(void 0,
5003
+ _chunkQP4GYVRRcjs.formatFarmDiagnostic.call(void 0,
4989
5004
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
4990
5005
  currentConfig.root
4991
5006
  )
@@ -4993,8 +5008,8 @@ export { manifest };
4993
5008
  }
4994
5009
  }
4995
5010
  }
4996
- if (!_optionalChain([transformOptions, 'optionalAccess', _425 => _425.ssr]) && shouldInspectClientBoundary(id, code)) {
4997
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _426 => _426.getConfig, 'call', _427 => _427()]), () => ( options)));
5011
+ if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) && shouldInspectClientBoundary(id, code)) {
5012
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429()]), () => ( options)));
4998
5013
  }
4999
5014
  if (typeof imageImports.transform === "function") {
5000
5015
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5009,13 +5024,13 @@ export { manifest };
5009
5024
  id,
5010
5025
  transformOptions
5011
5026
  );
5012
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _428 => _428.code, 'optionalAccess', _429 => _429.toString, 'call', _430 => _430()]);
5027
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _430 => _430.code, 'optionalAccess', _431 => _431.toString, 'call', _432 => _432()]);
5013
5028
  if (fontCode) {
5014
5029
  transformedCode = fontCode;
5015
5030
  transformed = true;
5016
5031
  }
5017
5032
  }
5018
- if (_optionalChain([transformOptions, 'optionalAccess', _431 => _431.ssr]) && server) {
5033
+ if (_optionalChain([transformOptions, 'optionalAccess', _433 => _433.ssr]) && server) {
5019
5034
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5020
5035
  code: transformedCode,
5021
5036
  id,
@@ -5027,26 +5042,26 @@ export { manifest };
5027
5042
  transformed = true;
5028
5043
  }
5029
5044
  }
5030
- if (_chunkJNZDTE75cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5045
+ if (_chunkQP4GYVRRcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5031
5046
  const clientBoundarySource = transformedCode;
5032
5047
  const moduleInfo = this.getModuleInfo(id);
5033
5048
  if (moduleInfo) {
5034
5049
  moduleInfo.isClientComponent = true;
5035
5050
  }
5036
- transformedCode = _chunkJNZDTE75cjs.stripUseClientDirective.call(void 0, transformedCode);
5051
+ transformedCode = _chunkQP4GYVRRcjs.stripUseClientDirective.call(void 0, transformedCode);
5037
5052
  transformed = true;
5038
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _432 => _432.getConfig, 'call', _433 => _433()]), () => ( options));
5053
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
5039
5054
  let isolatedModuleReference = null;
5040
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _434 => _434.config, 'access', _435 => _435.root]) || process.cwd();
5055
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _436 => _436.config, 'access', _437 => _437.root]) || process.cwd();
5041
5056
  const cleanId = id.split("?", 1)[0];
5042
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _436 => _436.getRouteManager, 'call', _437 => _437(), 'access', _438 => _438.getIsolatedClientBoundaryModules, 'call', _439 => _439(root)])));
5043
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _440 => _440.has, 'call', _441 => _441(path6.resolve(cleanId))]) === true;
5044
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkJNZDTE75cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5045
- cleanId.replace(/\\/g, "/").includes(_chunkJNZDTE75cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5057
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
5058
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
5059
+ if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkQP4GYVRRcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5060
+ cleanId.replace(/\\/g, "/").includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5046
5061
  isolatedModuleReference = _chunkGC5ROI3Acjs.toViteModuleId.call(void 0, cleanId, root);
5047
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _442 => _442.experimental, 'optionalAccess', _443 => _443.serverComponents])) === "islands";
5048
- const explicitStrategy = _chunkJNZDTE75cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5049
- const inference = islandsMode && explicitStrategy === null ? _chunkIK33N2ANcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5062
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
5063
+ const explicitStrategy = _chunkQP4GYVRRcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5064
+ const inference = islandsMode && explicitStrategy === null ? _chunkDTNWLRRFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5050
5065
  if (inference) {
5051
5066
  for (const file of inference.files) {
5052
5067
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5059,8 +5074,8 @@ export { manifest };
5059
5074
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5060
5075
  parse: (source) => this.parse(source),
5061
5076
  slots: islandsMode,
5062
- browser: _optionalChain([transformOptions, 'optionalAccess', _444 => _444.ssr]) !== true,
5063
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _445 => _445.strategy]) === "interaction",
5077
+ browser: _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) !== true,
5078
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _447 => _447.strategy]) === "interaction",
5064
5079
  runtimeModule
5065
5080
  });
5066
5081
  if (!transformedBoundary) {
@@ -5091,7 +5106,7 @@ export { manifest };
5091
5106
  );
5092
5107
  return;
5093
5108
  }` : "";
5094
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5109
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _448 => _448.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5095
5110
  if (import.meta.hot) {
5096
5111
  import.meta.hot.accept((newModule) => {
5097
5112
  ${isolatedHmrUpdate}
@@ -5147,14 +5162,14 @@ if (import.meta.hot) {
5147
5162
  }
5148
5163
  _chunkGC5ROI3Acjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5149
5164
  _chunkGC5ROI3Acjs.logger.info("Pre-rendering SSG pages...");
5150
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _447 => _447.config, 'access', _448 => _448.root]) || process.cwd(), options.outDir || "dist");
5165
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
5151
5166
  const clientDir = path6.join(outDir, "client");
5152
5167
  for (const page of ssgPages) {
5153
5168
  try {
5154
5169
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5155
5170
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5156
5171
  const mod = await routeManager.loadRouteModule(page.filePath);
5157
- if (!_optionalChain([mod, 'optionalAccess', _449 => _449.default])) return;
5172
+ if (!_optionalChain([mod, 'optionalAccess', _451 => _451.default])) return;
5158
5173
  const { layouts } = routeManager.matchRoute(page.urlPath);
5159
5174
  const layoutModules = await Promise.all(
5160
5175
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5186,7 +5201,7 @@ if (import.meta.hot) {
5186
5201
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5187
5202
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5188
5203
  const fullHtml = `<!DOCTYPE html>
5189
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _450 => _450.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5204
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _452 => _452.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5190
5205
  <head>
5191
5206
  <meta charset="utf-8">
5192
5207
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5231,12 +5246,12 @@ if (import.meta.hot) {
5231
5246
  watchChange(id, change) {
5232
5247
  const watched = _chunkGC5ROI3Acjs.toPosixPath.call(void 0, id);
5233
5248
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5234
- _optionalChain([farmApp, 'optionalAccess', _451 => _451.getRouteManager, 'call', _452 => _452(), 'access', _453 => _453.noteSourceChange, 'call', _454 => _454(id, change.event)]);
5249
+ _optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
5235
5250
  }
5236
- _chunkJNZDTE75cjs.invalidateFarmClientReachableModules.call(void 0, );
5237
- _chunkJNZDTE75cjs.invalidateFarmClientOnlyScan.call(void 0, );
5238
- _chunkIK33N2ANcjs.invalidateFarmRouteRootInferences.call(void 0, );
5239
- _chunkJNZDTE75cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5251
+ _chunkQP4GYVRRcjs.invalidateFarmClientReachableModules.call(void 0, );
5252
+ _chunkQP4GYVRRcjs.invalidateFarmClientOnlyScan.call(void 0, );
5253
+ _chunkDTNWLRRFcjs.invalidateFarmRouteRootInferences.call(void 0, );
5254
+ _chunkQP4GYVRRcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5240
5255
  },
5241
5256
  async handleHotUpdate(ctx) {
5242
5257
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5261,12 +5276,18 @@ if (import.meta.hot) {
5261
5276
  server2.moduleGraph.invalidateModule(mod);
5262
5277
  }
5263
5278
  }
5264
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _455 => _455.getConfig, 'call', _456 => _456()]);
5279
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _457 => _457.getConfig, 'call', _458 => _458()]);
5265
5280
  const normalizedFile = file.replace(/\\/g, "/");
5266
- if (normalizedFile.includes(_chunkJNZDTE75cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5281
+ const reloadAfterEdit = () => {
5282
+ for (const files of pendingRouteReloads) {
5283
+ if (files.has(normalizedFile)) return;
5284
+ }
5285
+ server2.ws.send({ type: "full-reload", path: "*" });
5286
+ };
5287
+ if (normalizedFile.includes(_chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5267
5288
  path6.posix.join(
5268
- _chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _457 => _457.root]) || options.root || server2.config.root),
5269
- _chunkJNZDTE75cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5289
+ _chunkGC5ROI3Acjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
5290
+ _chunkQP4GYVRRcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5270
5291
  )
5271
5292
  ))
5272
5293
  return modules;
@@ -5274,8 +5295,8 @@ if (import.meta.hot) {
5274
5295
  (appDir) => normalizedFile.startsWith(`${_chunkGC5ROI3Acjs.toPosixPath.call(void 0, appDir)}/api/`)
5275
5296
  )) {
5276
5297
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5277
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
5278
- server2.ws.send({ type: "full-reload", path: "*" });
5298
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5299
+ reloadAfterEdit();
5279
5300
  return [];
5280
5301
  }
5281
5302
  const currentSrcRoot = currentFarmConfig ? _chunkMTBDJ326cjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
@@ -5284,11 +5305,8 @@ if (import.meta.hot) {
5284
5305
  for (const mod of modules) {
5285
5306
  server2.moduleGraph.invalidateModule(mod);
5286
5307
  }
5287
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
5288
- server2.ws.send({
5289
- type: "full-reload",
5290
- path: "*"
5291
- });
5308
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5309
+ reloadAfterEdit();
5292
5310
  return [];
5293
5311
  }
5294
5312
  if (currentSrcRoot && isPotentialProgrammaticRouteSourceFile(normalizedFile, currentSrcRoot) && fileContainsProgrammaticPageRoute(file)) {
@@ -5297,24 +5315,21 @@ if (import.meta.hot) {
5297
5315
  for (const mod of modules) {
5298
5316
  server2.moduleGraph.invalidateModule(mod);
5299
5317
  }
5300
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5301
- server2.ws.send({
5302
- type: "full-reload",
5303
- path: "*"
5304
- });
5318
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
5319
+ reloadAfterEdit();
5305
5320
  return [];
5306
5321
  }
5307
5322
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5308
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5323
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
5309
5324
  }
5310
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _462 => _462.experimental, 'optionalAccess', _463 => _463.isolatedClientHydration]);
5311
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _464 => _464.getRouteManager, 'call', _465 => _465()]);
5325
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
5326
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
5312
5327
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5313
- const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _466 => _466.renderer])) && planRouteManager !== void 0;
5328
+ const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
5314
5329
  let clientPlanCurrent = false;
5315
5330
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5316
5331
  const routeManager = planRouteManager;
5317
- if (_optionalChain([routeManager, 'optionalAccess', _467 => _467.isEditPlanNeutral, 'call', _468 => _468(file)])) {
5332
+ if (_optionalChain([routeManager, 'optionalAccess', _469 => _469.isEditPlanNeutral, 'call', _470 => _470(file)])) {
5318
5333
  clientPlanCurrent = true;
5319
5334
  } else if (routeManager) {
5320
5335
  routeManager.noteSourceChange(file, "update");
@@ -5346,7 +5361,7 @@ if (import.meta.hot) {
5346
5361
  const clientModule = server2.moduleGraph.getModuleById(clientId);
5347
5362
  if (clientModule) server2.moduleGraph.invalidateModule(clientModule);
5348
5363
  }
5349
- server2.ws.send({ type: "full-reload", path: "*" });
5364
+ reloadAfterEdit();
5350
5365
  return [];
5351
5366
  }
5352
5367
  clientPlanCurrent = true;
@@ -5375,7 +5390,7 @@ if (import.meta.hot) {
5375
5390
  }
5376
5391
  return [];
5377
5392
  }
5378
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _469 => _469.getRouteManager, 'call', _470 => _470(), 'access', _471 => _471.invalidateClientManifest, 'call', _472 => _472()]);
5393
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _471 => _471.getRouteManager, 'call', _472 => _472(), 'access', _473 => _473.invalidateClientManifest, 'call', _474 => _474()]);
5379
5394
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5380
5395
  if (manifestModule) {
5381
5396
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5386,16 +5401,13 @@ if (import.meta.hot) {
5386
5401
  for (const mod of modules) {
5387
5402
  server2.moduleGraph.invalidateModule(mod);
5388
5403
  }
5389
- server2.ws.send({
5390
- type: "full-reload",
5391
- path: "*"
5392
- });
5404
+ reloadAfterEdit();
5393
5405
  return [];
5394
5406
  }
5395
5407
  }
5396
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _473 => _473.environments, 'access', _474 => _474.client, 'optionalAccess', _475 => _475.moduleGraph, 'access', _476 => _476.getModulesByFile, 'call', _477 => _477(normalizedFile), 'optionalAccess', _478 => _478.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5408
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _475 => _475.environments, 'access', _476 => _476.client, 'optionalAccess', _477 => _477.moduleGraph, 'access', _478 => _478.getModulesByFile, 'call', _479 => _479(normalizedFile), 'optionalAccess', _480 => _480.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5397
5409
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5398
- server2.ws.send({ type: "full-reload", path: "*" });
5410
+ reloadAfterEdit();
5399
5411
  return [];
5400
5412
  }
5401
5413
  return modules;
@@ -5491,7 +5503,7 @@ function createPageDataMiddlewareResponse(res) {
5491
5503
  return (...args) => {
5492
5504
  if (captures(target.statusCode, target.getHeader("location"))) {
5493
5505
  const callback = args.find((arg) => typeof arg === "function");
5494
- _optionalChain([callback, 'optionalCall', _479 => _479()]);
5506
+ _optionalChain([callback, 'optionalCall', _481 => _481()]);
5495
5507
  return property === "write" ? true : response;
5496
5508
  }
5497
5509
  return target[property](...args);
@@ -5555,12 +5567,12 @@ function isFarmClientVirtualId(id) {
5555
5567
  }
5556
5568
  function isClientEnvironment(context, loadOptions) {
5557
5569
  const environment = context.environment;
5558
- if (_optionalChain([environment, 'optionalAccess', _480 => _480.config, 'optionalAccess', _481 => _481.consumer])) return environment.config.consumer === "client";
5559
- if (_optionalChain([environment, 'optionalAccess', _482 => _482.name])) return environment.name === "client";
5560
- return _optionalChain([loadOptions, 'optionalAccess', _483 => _483.ssr]) !== true;
5570
+ if (_optionalChain([environment, 'optionalAccess', _482 => _482.config, 'optionalAccess', _483 => _483.consumer])) return environment.config.consumer === "client";
5571
+ if (_optionalChain([environment, 'optionalAccess', _484 => _484.name])) return environment.name === "client";
5572
+ return _optionalChain([loadOptions, 'optionalAccess', _485 => _485.ssr]) !== true;
5561
5573
  }
5562
5574
  function invalidateProgrammaticClientRouteModules(server) {
5563
- const graph = _optionalChain([server, 'access', _484 => _484.environments, 'optionalAccess', _485 => _485.client, 'optionalAccess', _486 => _486.moduleGraph]);
5575
+ const graph = _optionalChain([server, 'access', _486 => _486.environments, 'optionalAccess', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph]);
5564
5576
  if (!graph) return;
5565
5577
  for (const [id, module] of graph.idToModuleMap) {
5566
5578
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5570,19 +5582,19 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5570
5582
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5571
5583
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5572
5584
  watchFile(routesFile);
5573
- return _chunkJNZDTE75cjs.generateProgrammaticClientRouteModule.call(void 0, {
5585
+ return _chunkQP4GYVRRcjs.generateProgrammaticClientRouteModule.call(void 0, {
5574
5586
  kind: parsed.kind,
5575
5587
  routePath: parsed.routePath,
5576
5588
  routesFile,
5577
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _487 => _487.routes, 'access', _488 => _488.get, 'call', _489 => _489(
5578
- _chunkJNZDTE75cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5589
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _489 => _489.routes, 'access', _490 => _490.get, 'call', _491 => _491(
5590
+ _chunkQP4GYVRRcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5579
5591
  )]),
5580
5592
  rendererServer: renderer.server,
5581
5593
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5582
5594
  });
5583
5595
  }
5584
5596
  function resolveRealModuleFile(filePath, root) {
5585
- const resolved = _nullishCoalesce(_chunkJNZDTE75cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5597
+ const resolved = _nullishCoalesce(_chunkQP4GYVRRcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5586
5598
  try {
5587
5599
  return _chunkGC5ROI3Acjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5588
5600
  } catch (e28) {
@@ -5896,12 +5908,12 @@ async function parseRouteModuleProps(routeModule, input) {
5896
5908
  }
5897
5909
  const schemas = routeModule.__farmRouteSchemas;
5898
5910
  const params = parseRouteModuleSchema(
5899
- _optionalChain([schemas, 'optionalAccess', _490 => _490.params]),
5911
+ _optionalChain([schemas, 'optionalAccess', _492 => _492.params]),
5900
5912
  input.props.params,
5901
5913
  "params",
5902
5914
  input.routePath
5903
5915
  );
5904
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _491 => _491.search]), input.search, "search", input.routePath);
5916
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _493 => _493.search]), input.search, "search", input.routePath);
5905
5917
  return {
5906
5918
  ...input.props,
5907
5919
  params,
@@ -5921,12 +5933,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5921
5933
  }
5922
5934
  }
5923
5935
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5924
- const providerClientCode = _chunkIK33N2ANcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5936
+ const providerClientCode = _chunkDTNWLRRFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5925
5937
  integrationProviders,
5926
5938
  root,
5927
5939
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
5928
5940
  );
5929
- const clientPluginEntry = _chunkHVJ7IACBcjs.generateFarmClientPluginEntryCode.call(void 0,
5941
+ const clientPluginEntry = _chunkQTDIOZV6cjs.generateFarmClientPluginEntryCode.call(void 0,
5930
5942
  plugins,
5931
5943
  root,
5932
5944
  srcDir,
@@ -5976,7 +5988,7 @@ async function createFarmServerTreePageElement(source, pathname) {
5976
5988
  return null;
5977
5989
  }
5978
5990
  }
5979
- ${islandValues ? `${_chunkIK33N2ANcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5991
+ ${islandValues ? `${_chunkDTNWLRRFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
5980
5992
  let farmLastRouteState = null;
5981
5993
 
5982
5994
  // A hot update to a layout tree's client module renders the route again.
@@ -6816,7 +6828,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6816
6828
  return loadedLayouts;
6817
6829
  }
6818
6830
 
6819
- ${_chunkIK33N2ANcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6831
+ ${_chunkDTNWLRRFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6820
6832
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6821
6833
  let wrapped = element;
6822
6834
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7114,7 +7126,7 @@ function readActiveLayoutPatterns() {
7114
7126
  );
7115
7127
  }
7116
7128
 
7117
- ${_chunkIK33N2ANcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7129
+ ${_chunkDTNWLRRFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7118
7130
 
7119
7131
  function activateFragmentScripts(root) {
7120
7132
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7173,7 +7185,7 @@ function getLayoutShell(root, patterns, index, find) {
7173
7185
  return shell.innerHTML;
7174
7186
  }
7175
7187
 
7176
- ${islandValues ? _chunkIK33N2ANcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7188
+ ${islandValues ? _chunkDTNWLRRFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7177
7189
  container,
7178
7190
  fragment,
7179
7191
  currentPatterns,
@@ -7246,7 +7258,7 @@ ${islandValues ? `
7246
7258
  return nextTarget;
7247
7259
  }
7248
7260
 
7249
- ${islandValues ? `${_chunkIK33N2ANcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7261
+ ${islandValues ? `${_chunkDTNWLRRFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7250
7262
 
7251
7263
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7252
7264
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7943,9 +7955,9 @@ function generateClientManifest(bundle) {
7943
7955
  return manifest;
7944
7956
  }
7945
7957
  async function defineConfig(config = {}) {
7946
- const tailwindVitePlugin = await _chunkHVJ7IACBcjs.loadTailwindVitePlugin.call(void 0, );
7958
+ const tailwindVitePlugin = await _chunkQTDIOZV6cjs.loadTailwindVitePlugin.call(void 0, );
7947
7959
  const appRoot = path6.resolve(config.root || process.cwd());
7948
- if (_optionalChain([config, 'access', _492 => _492.extends, 'optionalAccess', _493 => _493.length])) {
7960
+ if (_optionalChain([config, 'access', _494 => _494.extends, 'optionalAccess', _495 => _495.length])) {
7949
7961
  const { config: layeredConfig } = await import("./layers-7P4RLKVX.cjs").then(
7950
7962
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
7951
7963
  root: appRoot,
@@ -7955,7 +7967,7 @@ async function defineConfig(config = {}) {
7955
7967
  config = layeredConfig;
7956
7968
  }
7957
7969
  config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7958
- config.images = _chunkIK33N2ANcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7970
+ config.images = _chunkDTNWLRRFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7959
7971
  const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
7960
7972
  ssr: true
7961
7973
  });
@@ -8047,13 +8059,13 @@ async function defineConfig(config = {}) {
8047
8059
  if (!serverStarted) {
8048
8060
  serverStarted = true;
8049
8061
  const elapsed = Date.now() - startTime;
8050
- const address = _optionalChain([server, 'access', _494 => _494.httpServer, 'optionalAccess', _495 => _495.address, 'call', _496 => _496()]);
8062
+ const address = _optionalChain([server, 'access', _496 => _496.httpServer, 'optionalAccess', _497 => _497.address, 'call', _498 => _498()]);
8051
8063
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8052
8064
  const hostConfig = server.config.server.host;
8053
8065
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8054
8066
  console.log("");
8055
8067
  console.log(
8056
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkIVBDRAORcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8068
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkXLOORES5cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8057
8069
  );
8058
8070
  console.log("");
8059
8071
  console.log(
@@ -8087,7 +8099,7 @@ async function defineConfig(config = {}) {
8087
8099
  plugins: [
8088
8100
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8089
8101
  _chunk3QM74STYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8090
- _chunkIK33N2ANcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8102
+ _chunkDTNWLRRFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8091
8103
  tailwindVitePlugin,
8092
8104
  ...rendererVitePlugins,
8093
8105
  ...reactRefreshPlugins,
@@ -8096,14 +8108,14 @@ async function defineConfig(config = {}) {
8096
8108
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
8097
8109
  farmIslandContainersPlugin(config),
8098
8110
  farmPlugin(config),
8099
- _chunkJNZDTE75cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8111
+ _chunkQP4GYVRRcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8100
8112
  farmBrandingPlugin
8101
8113
  ],
8102
8114
  customLogger: farmLogger,
8103
8115
  clearScreen: false,
8104
8116
  optimizeDeps: {
8105
- ..._chunkIK33N2ANcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8106
- _chunkIK33N2ANcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8117
+ ..._chunkDTNWLRRFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8118
+ _chunkDTNWLRRFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8107
8119
  appRoot,
8108
8120
  _chunkMTBDJ326cjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8109
8121
  ),
@@ -8146,7 +8158,7 @@ async function defineConfig(config = {}) {
8146
8158
  // Stub out problematic server-only modules during dev mode
8147
8159
  alias: {
8148
8160
  ..._chunkMTBDJ326cjs.getFarmLayerAliases.call(void 0, config.layers),
8149
- ..._chunkIK33N2ANcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8161
+ ..._chunkDTNWLRRFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8150
8162
  // Nitro internals that should not be resolved in browser
8151
8163
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8152
8164
  "@poppinss/dumper": "data:text/javascript,export default {};",