@farm.js/core 0.1.81 → 0.1.82

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 (240) hide show
  1. package/dist/{agent-mcp.d-Cxi3214_.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DMqOqnOA.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +4 -3
  4. package/dist/agent-runtime.d.mts +1 -1
  5. package/dist/agent-runtime.d.ts +1 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-LV23T6QN.cjs +17 -0
  8. package/dist/{analyzer-IC66UJCU.mjs → analyzer-RPU2KG4J.mjs} +2 -2
  9. package/dist/api/node.cjs +5 -4
  10. package/dist/api/node.d.mts +3 -3
  11. package/dist/api/node.d.ts +3 -3
  12. package/dist/api/node.mjs +4 -3
  13. package/dist/api/route-manager.cjs +5 -4
  14. package/dist/api/route-manager.d.mts +3 -3
  15. package/dist/api/route-manager.d.ts +3 -3
  16. package/dist/api/route-manager.mjs +4 -3
  17. package/dist/api/runtime.cjs +4 -3
  18. package/dist/api/runtime.d.mts +2 -2
  19. package/dist/api/runtime.d.ts +2 -2
  20. package/dist/api/runtime.mjs +3 -2
  21. package/dist/api.cjs +7 -6
  22. package/dist/api.d.mts +4 -4
  23. package/dist/api.d.ts +4 -4
  24. package/dist/api.mjs +6 -5
  25. package/dist/{app-manifest.d-Bbxp5kes.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
  26. package/dist/{app-manifest.d-C8Cswd31.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
  27. package/dist/app-markdown.d.mts +2 -2
  28. package/dist/app-markdown.d.ts +2 -2
  29. package/dist/{app.d-BJuSurgy.d.mts → app.d-C0ePpuaG.d.mts} +21 -4
  30. package/dist/{app.d-DGIoFt5D.d.ts → app.d-CIoXsAbN.d.ts} +21 -4
  31. package/dist/chunk-3DE6RK7K.cjs +36 -0
  32. package/dist/{chunk-NOYKBGUK.mjs → chunk-47I2MYIR.mjs} +130 -46
  33. package/dist/{chunk-GY63XD6K.mjs → chunk-4X7LSGM6.mjs} +1 -1
  34. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  35. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  36. package/dist/{chunk-CPZZBCPO.cjs → chunk-5MUFW5UU.cjs} +2 -2
  37. package/dist/{chunk-LKIG5SM6.cjs → chunk-5P65LXGU.cjs} +9 -9
  38. package/dist/{chunk-XOXCQGAF.mjs → chunk-63ZE6B6M.mjs} +1 -1
  39. package/dist/{chunk-XOGCNKB7.cjs → chunk-6BPFIYGY.cjs} +3 -3
  40. package/dist/{chunk-UF4BNKKJ.mjs → chunk-6QYPP5KC.mjs} +2 -2
  41. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  42. package/dist/{chunk-2Y2HRZQY.cjs → chunk-AIPZDBP6.cjs} +312 -228
  43. package/dist/{chunk-CL7BUGVB.cjs → chunk-ARORZ3MH.cjs} +286 -240
  44. package/dist/{chunk-ONSZP5JK.mjs → chunk-AUFEM3FB.mjs} +1 -1
  45. package/dist/{chunk-FYZD7DUS.cjs → chunk-B2PGVHBG.cjs} +4 -4
  46. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  47. package/dist/{chunk-M6DAIE4T.cjs → chunk-BCTHOQPP.cjs} +10 -8
  48. package/dist/{chunk-S3IWDDQ3.mjs → chunk-C3VCYOU4.mjs} +1 -1
  49. package/dist/{chunk-OO4GVGM3.mjs → chunk-CA2HBLXP.mjs} +11 -1
  50. package/dist/{chunk-W6C3LEXX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
  51. package/dist/{chunk-YH7ENV3K.mjs → chunk-CJDBTTLB.mjs} +4 -4
  52. package/dist/{chunk-5N526T7Q.mjs → chunk-DAXU2NBE.mjs} +74 -18
  53. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  54. package/dist/{chunk-46UV2E7I.cjs → chunk-DRO3NXA3.cjs} +9 -9
  55. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  56. package/dist/{chunk-HTNJ7A4D.mjs → chunk-EL2Z6YFZ.mjs} +2 -2
  57. package/dist/{chunk-IM3UINTZ.mjs → chunk-GXLNARPO.mjs} +151 -16
  58. package/dist/{chunk-E3HBD2K3.cjs → chunk-HHQEKLZL.cjs} +2 -2
  59. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  60. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  61. package/dist/{chunk-BJWJP5A4.mjs → chunk-I4DR3HCH.mjs} +3 -3
  62. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  63. package/dist/{chunk-NSLRK5DK.cjs → chunk-JK26IMT7.cjs} +1 -1
  64. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  65. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  66. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  67. package/dist/{chunk-MOGRRZMW.cjs → chunk-LM2ZDNDD.cjs} +16 -16
  68. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  69. package/dist/{chunk-ZIYJWJV2.cjs → chunk-N2EFMN2K.cjs} +8 -8
  70. package/dist/{chunk-6WVRVGKC.mjs → chunk-NAHDG6UX.mjs} +1 -1
  71. package/dist/{chunk-OFVCWV2D.cjs → chunk-NEKO3HM2.cjs} +11 -1
  72. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  73. package/dist/{chunk-IPG6B25T.mjs → chunk-NRCKBDYP.mjs} +78 -32
  74. package/dist/{chunk-POL5RCVU.mjs → chunk-OMB7UGVW.mjs} +1 -1
  75. package/dist/{chunk-D77OGI6X.mjs → chunk-OP5VI4TP.mjs} +1 -1
  76. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  77. package/dist/{chunk-OIWDEDUO.cjs → chunk-Q2VOT3K2.cjs} +392 -336
  78. package/dist/{chunk-RZ6XUEQS.mjs → chunk-QSMUMK7Y.mjs} +2 -2
  79. package/dist/{chunk-2HMSSPCZ.mjs → chunk-RMLR5RMH.mjs} +4 -2
  80. package/dist/{chunk-ADQ2LATR.cjs → chunk-RMPUEH5T.cjs} +2 -2
  81. package/dist/{chunk-AHVF5GI2.cjs → chunk-S7WZUK3B.cjs} +2 -2
  82. package/dist/{chunk-ZKNXCRUQ.cjs → chunk-U54REWMJ.cjs} +23 -23
  83. package/dist/chunk-U6XYBTUT.mjs +36 -0
  84. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  85. package/dist/{chunk-OUDNUFVR.cjs → chunk-VMBIKDKW.cjs} +4 -4
  86. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  87. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  88. package/dist/{chunk-TLSGRK7E.mjs → chunk-ZIZRIZLP.mjs} +1 -1
  89. package/dist/{cli-runtime.d-D8O1v2_X.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
  90. package/dist/{cli-runtime.d-hf4L1MNP.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
  91. package/dist/{client-component.d-CX8UCQh-.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
  92. package/dist/{client-component.d-DFwUHlOz.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
  93. package/dist/{client-plugins.d-BflSNO-b.d.mts → client-plugins.d-C1WM3ieD.d.mts} +6 -1
  94. package/dist/{client-plugins.d-qWp8hNwd.d.ts → client-plugins.d-DcmDzcSC.d.ts} +6 -1
  95. package/dist/client-plugins.d.mts +1 -1
  96. package/dist/client-plugins.d.ts +1 -1
  97. package/dist/client.d.mts +7 -7
  98. package/dist/client.d.ts +7 -7
  99. package/dist/config.d.mts +1 -1
  100. package/dist/config.d.ts +1 -1
  101. package/dist/cron.cjs +2 -2
  102. package/dist/cron.mjs +1 -1
  103. package/dist/desktop.d.mts +2 -2
  104. package/dist/desktop.d.ts +2 -2
  105. package/dist/{devtools-EI5N366Z.cjs → devtools-5B7NZE6F.cjs} +10 -9
  106. package/dist/{devtools-XJHODO5H.mjs → devtools-C5GXZZ7E.mjs} +7 -6
  107. package/dist/docs.cjs +9 -8
  108. package/dist/docs.d.mts +3 -3
  109. package/dist/docs.d.ts +3 -3
  110. package/dist/docs.mjs +8 -7
  111. package/dist/environment/vite.cjs +4 -4
  112. package/dist/environment/vite.mjs +3 -3
  113. package/dist/{handler.d-DoH5Krkq.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
  114. package/dist/{handler.d-C2oRihfa.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
  115. package/dist/{headers.d-BrX53wFQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
  116. package/dist/{headers.d-Dj0mfYpb.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
  117. package/dist/index.cjs +28 -27
  118. package/dist/{index.d-DzDHOttz.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
  119. package/dist/{index.d-Dhc2scRl.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
  120. package/dist/index.d.mts +22 -22
  121. package/dist/index.d.ts +22 -22
  122. package/dist/index.mjs +27 -26
  123. package/dist/integrations/orm.d.mts +1 -1
  124. package/dist/integrations/orm.d.ts +1 -1
  125. package/dist/integrations.cjs +4 -3
  126. package/dist/integrations.d.mts +1 -1
  127. package/dist/integrations.d.ts +1 -1
  128. package/dist/integrations.mjs +3 -2
  129. package/dist/internal/app-markdown-runtime.d.mts +2 -2
  130. package/dist/internal/app-markdown-runtime.d.ts +2 -2
  131. package/dist/internal/build-runtime.cjs +26 -25
  132. package/dist/internal/build-runtime.d.mts +4 -4
  133. package/dist/internal/build-runtime.d.ts +4 -4
  134. package/dist/internal/build-runtime.mjs +25 -24
  135. package/dist/internal/cli-runtime.cjs +11 -10
  136. package/dist/internal/cli-runtime.d.mts +7 -7
  137. package/dist/internal/cli-runtime.d.ts +7 -7
  138. package/dist/internal/cli-runtime.mjs +10 -9
  139. package/dist/internal/client-error-overlay.cjs +4 -4
  140. package/dist/internal/client-error-overlay.mjs +1 -1
  141. package/dist/internal/client-runtime.d.mts +5 -5
  142. package/dist/internal/client-runtime.d.ts +5 -5
  143. package/dist/internal/compression-runtime.d.mts +1 -1
  144. package/dist/internal/compression-runtime.d.ts +1 -1
  145. package/dist/internal/config-runtime.cjs +9 -8
  146. package/dist/internal/config-runtime.d.mts +3 -3
  147. package/dist/internal/config-runtime.d.ts +3 -3
  148. package/dist/internal/config-runtime.mjs +8 -7
  149. package/dist/internal/infra-analytics-runtime.cjs +8 -6
  150. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  151. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  152. package/dist/internal/infra-analytics-runtime.mjs +8 -6
  153. package/dist/internal/islands-boot.cjs +54 -20
  154. package/dist/internal/islands-boot.d.mts +5 -3
  155. package/dist/internal/islands-boot.d.ts +5 -3
  156. package/dist/internal/islands-boot.mjs +49 -15
  157. package/dist/internal/native-server-fns.cjs +4 -4
  158. package/dist/internal/native-server-fns.mjs +3 -3
  159. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  160. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  161. package/dist/internal/production-runtime.cjs +11 -6
  162. package/dist/internal/production-runtime.d.mts +13 -11
  163. package/dist/internal/production-runtime.d.ts +13 -11
  164. package/dist/internal/production-runtime.mjs +10 -5
  165. package/dist/internal/spa-router.d.mts +3 -3
  166. package/dist/internal/spa-router.d.ts +3 -3
  167. package/dist/internal/start-manifest.d.mts +1 -1
  168. package/dist/internal/start-manifest.d.ts +1 -1
  169. package/dist/markdown.d.mts +1 -1
  170. package/dist/markdown.d.ts +1 -1
  171. package/dist/middleware.d.mts +1 -1
  172. package/dist/middleware.d.ts +1 -1
  173. package/dist/{mount.d-DwXjaOHY.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
  174. package/dist/{mount.d-DOaeUoWq.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
  175. package/dist/{navigation-delegate.d-o3pPd9VI.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
  176. package/dist/{navigation-delegate.d-BElGUMgt.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
  177. package/dist/navigation.d.mts +4 -4
  178. package/dist/navigation.d.ts +4 -4
  179. package/dist/{nitro-YLTGVGK4.mjs → nitro-FK3SZM4H.mjs} +1 -1
  180. package/dist/{nitro-XGIO6EQN.cjs → nitro-YDFMH5PY.cjs} +4 -4
  181. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  182. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  183. package/dist/plugin.cjs +21 -19
  184. package/dist/plugin.d.mts +5 -5
  185. package/dist/plugin.d.ts +5 -5
  186. package/dist/plugin.mjs +20 -18
  187. package/dist/{render-plan.d-BD06tqFA.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
  188. package/dist/{render-plan.d-xWCRAJeR.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
  189. package/dist/renderer-client.cjs +48 -5
  190. package/dist/renderer-client.d.mts +5 -5
  191. package/dist/renderer-client.d.ts +5 -5
  192. package/dist/renderer-client.mjs +48 -5
  193. package/dist/renderer.cjs +2 -2
  194. package/dist/renderer.d.mts +10 -0
  195. package/dist/renderer.d.ts +10 -0
  196. package/dist/renderer.mjs +1 -1
  197. package/dist/{request.d-Dx82V8bz.d.mts → request.d-BhggxQf3.d.mts} +1 -1
  198. package/dist/{request.d-DUMuWxSN.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
  199. package/dist/request.d.mts +2 -2
  200. package/dist/request.d.ts +2 -2
  201. package/dist/{route-rendering.d-BwBVpLtD.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
  202. package/dist/{route-rendering.d-DJh6GauM.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
  203. package/dist/{router.d-CJBSG5jr.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
  204. package/dist/{router.d-BtkKDxUB.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
  205. package/dist/routes.d.mts +1 -1
  206. package/dist/routes.d.ts +1 -1
  207. package/dist/{rsc-pipeline-H5AXQA7A.cjs → rsc-pipeline-5AOF64FL.cjs} +10 -9
  208. package/dist/{rsc-pipeline-GD6KLOIG.mjs → rsc-pipeline-DNRLYOJ7.mjs} +9 -8
  209. package/dist/{runtime-OJ7FXFUI.mjs → runtime-EHG2FRXZ.mjs} +9 -8
  210. package/dist/{runtime-YWQVBC3V.cjs → runtime-ZVHG5SRB.cjs} +13 -12
  211. package/dist/{runtime.d-BQnD0cfC.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
  212. package/dist/{runtime.d-C4SuZXf6.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
  213. package/dist/{server-components-status.d-rfKOcE0N.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
  214. package/dist/{server-components-status.d-9rH7ZoEq.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
  215. package/dist/server-plugins.d.mts +3 -3
  216. package/dist/server-plugins.d.ts +3 -3
  217. package/dist/server.cjs +54 -48
  218. package/dist/server.d.mts +11 -11
  219. package/dist/server.d.ts +11 -11
  220. package/dist/server.mjs +30 -24
  221. package/dist/{spa-router.d-DMKiBsHH.d.ts → spa-router.d-Bjgl-Osi.d.ts} +2 -2
  222. package/dist/{spa-router.d-V6XLSTCy.d.mts → spa-router.d-l3G38xHa.d.mts} +2 -2
  223. package/dist/{ssg.d-MNedvvMB.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
  224. package/dist/{ssg.d-BnCKPQL0.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
  225. package/dist/{store-core.d-BqJI1-ix.d.mts → store-core.d-BZjuC6Zc.d.mts} +11 -3
  226. package/dist/{store-core.d-Ad5biajo.d.ts → store-core.d-BaOUOPf7.d.ts} +11 -3
  227. package/dist/testing.cjs +5 -4
  228. package/dist/testing.d.mts +1 -1
  229. package/dist/testing.d.ts +1 -1
  230. package/dist/testing.mjs +4 -3
  231. package/dist/{utils.d-BdjHKDuT.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
  232. package/dist/{utils.d-BEKLWa0Z.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
  233. package/dist/version.cjs +2 -2
  234. package/dist/version.mjs +1 -1
  235. package/dist/vite.cjs +21 -19
  236. package/dist/vite.d.mts +6 -6
  237. package/dist/vite.d.ts +6 -6
  238. package/dist/vite.mjs +20 -18
  239. package/package.json +2 -2
  240. package/dist/analyzer-435DCIQ6.cjs +0 -17
@@ -43,19 +43,19 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkCL7BUGVBcjs = require('./chunk-CL7BUGVB.cjs');
46
+ var _chunkARORZ3MHcjs = require('./chunk-ARORZ3MH.cjs');
47
47
 
48
48
 
49
49
 
50
50
 
51
- var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
51
+ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
52
52
 
53
53
 
54
- var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
54
+ var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
55
55
 
56
56
 
57
57
 
58
- var _chunkOUDNUFVRcjs = require('./chunk-OUDNUFVR.cjs');
58
+ var _chunkVMBIKDKWcjs = require('./chunk-VMBIKDKW.cjs');
59
59
 
60
60
 
61
61
  var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
@@ -67,12 +67,13 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
67
67
 
68
68
 
69
69
 
70
- var _chunkOFVCWV2Dcjs = require('./chunk-OFVCWV2D.cjs');
70
+ var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
71
71
 
72
72
 
73
73
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
74
74
 
75
75
 
76
+ var _chunkCD5Z7RR5cjs = require('./chunk-CD5Z7RR5.cjs');
76
77
 
77
78
 
78
79
 
@@ -85,13 +86,15 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
85
86
 
86
87
 
87
88
 
88
- var _chunkFYZD7DUScjs = require('./chunk-FYZD7DUS.cjs');
89
+
90
+
91
+ var _chunkB2PGVHBGcjs = require('./chunk-B2PGVHBG.cjs');
89
92
 
90
93
 
91
94
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
92
95
 
93
96
 
94
- var _chunkADQ2LATRcjs = require('./chunk-ADQ2LATR.cjs');
97
+ var _chunkRMPUEH5Tcjs = require('./chunk-RMPUEH5T.cjs');
95
98
 
96
99
 
97
100
 
@@ -142,7 +145,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
142
145
 
143
146
 
144
147
 
145
- var _chunk46UV2E7Icjs = require('./chunk-46UV2E7I.cjs');
148
+ var _chunkDRO3NXA3cjs = require('./chunk-DRO3NXA3.cjs');
146
149
 
147
150
 
148
151
 
@@ -166,7 +169,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
166
169
 
167
170
 
168
171
 
169
- var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
172
+ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
170
173
 
171
174
 
172
175
  var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
@@ -187,13 +190,16 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
187
190
 
188
191
 
189
192
 
190
- var _chunkM6DAIE4Tcjs = require('./chunk-M6DAIE4T.cjs');
193
+ var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
191
194
 
192
195
 
193
196
 
194
197
  var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
195
198
 
196
199
 
200
+ var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
201
+
202
+
197
203
  var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
198
204
 
199
205
 
@@ -218,7 +224,7 @@ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
218
224
 
219
225
 
220
226
 
221
- var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
227
+ var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
222
228
 
223
229
 
224
230
 
@@ -241,7 +247,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
241
247
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
242
248
 
243
249
 
244
- var _chunkLKIG5SM6cjs = require('./chunk-LKIG5SM6.cjs');
250
+ var _chunk5P65LXGUcjs = require('./chunk-5P65LXGU.cjs');
245
251
 
246
252
 
247
253
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -253,7 +259,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
253
259
 
254
260
 
255
261
 
256
- var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
262
+ var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
257
263
 
258
264
 
259
265
  var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
@@ -304,7 +310,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
304
310
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
305
311
 
306
312
 
307
- var _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
313
+ var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
308
314
 
309
315
 
310
316
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -386,9 +392,8 @@ var _module = require('module');
386
392
  // src/dev-preview-guard.ts
387
393
  var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
388
394
 
389
- var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
390
395
  function isFarmPreviewTunnelRequest(headers) {
391
- return headers[FARM_PREVIEW_REQUEST_HEADER] !== void 0;
396
+ return headers[_chunkHQKCSJEHcjs.FARM_PREVIEW_REQUEST_HEADER] !== void 0;
392
397
  }
393
398
  var VITE_DEFAULT_FS_DENY = [
394
399
  ".env",
@@ -706,7 +711,7 @@ function findClientServerFnViolation(code, id) {
706
711
  return null;
707
712
  }
708
713
  function createServerFnBoundaryDiagnostic(violation, id, location) {
709
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
714
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
710
715
  "CLIENT_SERVER_FUNCTION",
711
716
  id,
712
717
  `${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.`,
@@ -965,21 +970,21 @@ function readPropertyKey(property) {
965
970
  function createClientBoundaryDiagnostic(file, finding, location) {
966
971
  switch (finding.kind) {
967
972
  case "server-env":
968
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
973
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
969
974
  "CLIENT_SERVER_ENV",
970
975
  file,
971
976
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
972
977
  location
973
978
  );
974
979
  case "public-env":
975
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
980
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
976
981
  "CLIENT_PROCESS_ENV_PUBLIC",
977
982
  file,
978
983
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
979
984
  location
980
985
  );
981
986
  case "builtin":
982
- return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
987
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
983
988
  "CLIENT_NODE_BUILTIN",
984
989
  file,
985
990
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1235,8 +1240,8 @@ function farmLlmsTxtGeneratedPaths(config) {
1235
1240
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1236
1241
  }
1237
1242
  function farmAgentGeneratedPaths(config) {
1238
- const crawlers = _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1239
- const sitemap = _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1243
+ const crawlers = _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1244
+ const sitemap = _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1240
1245
  return [
1241
1246
  ...farmLlmsTxtGeneratedPaths(config),
1242
1247
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1281,7 +1286,7 @@ function loadFarmWorkflowsDevRuntime() {
1281
1286
  return import("./workflows.cjs");
1282
1287
  }
1283
1288
  function loadFarmDevtoolsSnapshotRuntime() {
1284
- return import("./devtools-EI5N366Z.cjs");
1289
+ return import("./devtools-5B7NZE6F.cjs");
1285
1290
  }
1286
1291
  function loadFarmDevtoolsUIRuntime() {
1287
1292
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1306,7 +1311,7 @@ function farmI18nClientBridgePlugin() {
1306
1311
  };
1307
1312
  }
1308
1313
  function farmNavigationPlugin(renderer) {
1309
- const otherRenderer = !_chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1314
+ const otherRenderer = !_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1310
1315
  return {
1311
1316
  name: "farm:navigation",
1312
1317
  config() {
@@ -1331,16 +1336,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1331
1336
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1332
1337
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1333
1338
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1334
- _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1335
- new RegExp(`^${_chunk46UV2E7Icjs.FARM_RESOLVE_FROM_PREFIX}`),
1339
+ _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1340
+ new RegExp(`^${_chunkDRO3NXA3cjs.FARM_RESOLVE_FROM_PREFIX}`),
1336
1341
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1337
1342
  // included.
1338
1343
  /^node:/,
1339
- _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, _module.builtinModules)
1344
+ _chunkARORZ3MHcjs.exactIdPattern.call(void 0, _module.builtinModules)
1340
1345
  ];
1341
1346
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1342
- _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1343
- new RegExp(`^${_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1347
+ _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1348
+ new RegExp(`^${_chunkDRO3NXA3cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1344
1349
  ];
1345
1350
  function createFarmPlatformClientModule(platform) {
1346
1351
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1376,18 +1381,18 @@ function farmIslandContainersPlugin(config) {
1376
1381
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1377
1382
  return null;
1378
1383
  }
1379
- if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) return null;
1384
+ if (_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, code)) return null;
1380
1385
  const file = id.split("?", 1)[0];
1381
- const bindings = _chunk46UV2E7Icjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1386
+ const bindings = _chunkDRO3NXA3cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1382
1387
  if (bindings.length === 0) return null;
1383
- const grown = _chunk46UV2E7Icjs.wrapFarmIslandContainers.call(void 0, {
1388
+ const grown = _chunkDRO3NXA3cjs.wrapFarmIslandContainers.call(void 0, {
1384
1389
  code,
1385
1390
  file,
1386
1391
  bindings,
1387
- reference: _chunk46UV2E7Icjs.farmIslandContainerReferencePath.call(void 0, root)
1392
+ reference: _chunkDRO3NXA3cjs.farmIslandContainerReferencePath.call(void 0, root)
1388
1393
  });
1389
1394
  if (grown === null) return null;
1390
- _chunk46UV2E7Icjs.ensureFarmIslandContainerReference.call(void 0, root);
1395
+ _chunkDRO3NXA3cjs.ensureFarmIslandContainerReference.call(void 0, root);
1391
1396
  return { code: grown, map: null };
1392
1397
  }
1393
1398
  };
@@ -1401,15 +1406,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1401
1406
  config(config) {
1402
1407
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1403
1408
  if (options.distDir) {
1404
- _chunk46UV2E7Icjs.usePackageScanCacheFile.call(void 0,
1409
+ _chunkDRO3NXA3cjs.usePackageScanCacheFile.call(void 0,
1405
1410
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1406
1411
  );
1407
1412
  }
1408
- const bundledPackages = _chunk46UV2E7Icjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1413
+ const bundledPackages = _chunkDRO3NXA3cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1409
1414
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1410
- _chunk46UV2E7Icjs.persistPackageScanCache.call(void 0, );
1415
+ _chunkDRO3NXA3cjs.persistPackageScanCache.call(void 0, );
1411
1416
  return {
1412
- optimizeDeps: { rolldownOptions: { plugins: [_chunk46UV2E7Icjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1417
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkDRO3NXA3cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1413
1418
  ssr: {
1414
1419
  noExternal: [
1415
1420
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1433,8 +1438,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1433
1438
  return FARM_SERVER_ONLY_PACKAGE_ID;
1434
1439
  }
1435
1440
  this.error(
1436
- _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1437
- _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1441
+ _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
1442
+ _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
1438
1443
  "CLIENT_SERVER_ONLY_IMPORT",
1439
1444
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1440
1445
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1444,9 +1449,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1444
1449
  );
1445
1450
  }
1446
1451
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1447
- return _chunk46UV2E7Icjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1452
+ return _chunkDRO3NXA3cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1448
1453
  }
1449
- const resolveFrom = importer ? _chunk46UV2E7Icjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1454
+ const resolveFrom = importer ? _chunkDRO3NXA3cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1450
1455
  if (resolveFrom) {
1451
1456
  const directory = path6.dirname(resolveFrom.importer);
1452
1457
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1463,8 +1468,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1463
1468
  const importedBy = importer ? ` (imported by ${importer})` : "";
1464
1469
  if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1465
1470
  this.error(
1466
- _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1467
- _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1471
+ _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
1472
+ _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
1468
1473
  "CLIENT_SERVER_ONLY_ENTRY",
1469
1474
  _nullishCoalesce(importer, () => ( id)),
1470
1475
  `${id} is server-only and cannot be imported into client code.`
@@ -1489,7 +1494,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1489
1494
  if (id === FARM_PLATFORM_CLIENT_ID) {
1490
1495
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1491
1496
  }
1492
- return _nullishCoalesce(_chunk46UV2E7Icjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1497
+ return _nullishCoalesce(_chunkDRO3NXA3cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1493
1498
  }
1494
1499
  }
1495
1500
  };
@@ -1522,7 +1527,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1522
1527
  if (!snapshot) return "";
1523
1528
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1524
1529
  if (snapshot.routing === "none") return runtime;
1525
- return `${_chunkOFVCWV2Dcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1530
+ return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1526
1531
  }
1527
1532
  function getPublicEnvDefine(config) {
1528
1533
  const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
@@ -1569,7 +1574,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1569
1574
  }
1570
1575
  res.statusCode = 500;
1571
1576
  res.setHeader("Content-Type", "application/json");
1572
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1577
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1573
1578
  });
1574
1579
  };
1575
1580
  }
@@ -1577,10 +1582,10 @@ function sendFarmDevErrorJSON(res) {
1577
1582
  res.statusCode = 500;
1578
1583
  res.setHeader("Content-Type", "application/json");
1579
1584
  res.setHeader("Cache-Control", "private, no-store");
1580
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1585
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1581
1586
  }
1582
1587
  function createFarmDevMiddlewareErrorResponse() {
1583
- return new Response(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1588
+ return new Response(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1584
1589
  status: 500,
1585
1590
  headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
1586
1591
  });
@@ -1592,10 +1597,10 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
1592
1597
  }
1593
1598
  function sendFarmDevRuntimeHookError(res, json) {
1594
1599
  setFarmDevRuntimeHookErrorHead(res, json);
1595
- res.end(json ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1600
+ res.end(json ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1596
1601
  }
1597
1602
  function opensFarmDevRuntimeSession(pm) {
1598
- return pm.hasRuntimeRequestHooks() || _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1603
+ return pm.hasRuntimeRequestHooks() || _chunkDMSXZNQRcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1599
1604
  }
1600
1605
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1601
1606
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1708,7 +1713,7 @@ function interceptFarmDevPageResponse(options) {
1708
1713
  res.end = originalEnd;
1709
1714
  res.writeHead = originalWriteHead;
1710
1715
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1711
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1716
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1712
1717
  };
1713
1718
  let runtimeHookFailed = false;
1714
1719
  const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
@@ -1722,7 +1727,7 @@ function interceptFarmDevPageResponse(options) {
1722
1727
  const writeRuntimeHookFailure = () => {
1723
1728
  setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
1724
1729
  originalWriteHead(500);
1725
- originalWrite(options.jsonError ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1730
+ originalWrite(options.jsonError ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1726
1731
  };
1727
1732
  const htmlChunks = [];
1728
1733
  const responseChunks = [];
@@ -1832,7 +1837,7 @@ function interceptFarmDevPageResponse(options) {
1832
1837
  });
1833
1838
  res.end = ((...args) => {
1834
1839
  interceptedEnd = true;
1835
- res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1840
+ res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1836
1841
  if (afterResponseCalled) return res;
1837
1842
  afterResponseCalled = true;
1838
1843
  options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
@@ -1915,7 +1920,7 @@ function interceptFarmDevPageResponse(options) {
1915
1920
  res.end = originalEnd;
1916
1921
  res.writeHead = originalWriteHead;
1917
1922
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1918
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1923
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1919
1924
  originalEnd(...originalEndArgs);
1920
1925
  }).catch((error) => {
1921
1926
  reportFailure(error);
@@ -1932,14 +1937,14 @@ function interceptFarmDevPageResponse(options) {
1932
1937
  res.end = originalEnd;
1933
1938
  res.writeHead = originalWriteHead;
1934
1939
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1935
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1940
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1936
1941
  originalEnd(body, callback);
1937
1942
  } else {
1938
1943
  res.write = originalWrite;
1939
1944
  res.end = originalEnd;
1940
1945
  res.writeHead = originalWriteHead;
1941
1946
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1942
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1947
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1943
1948
  originalEnd(...originalEndArgs);
1944
1949
  }
1945
1950
  });
@@ -1970,7 +1975,7 @@ function getEnvDefines(config, configEnv) {
1970
1975
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1971
1976
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1972
1977
  config.images,
1973
- _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1978
+ _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1974
1979
  )
1975
1980
  )
1976
1981
  )
@@ -2103,7 +2108,7 @@ function transformIsolatedClientBoundaryModule(options) {
2103
2108
  return null;
2104
2109
  }
2105
2110
  const body = Array.isArray(ast.body) ? ast.body : [];
2106
- const everyExportIsComponent = options.code.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2111
+ const everyExportIsComponent = options.code.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2107
2112
  const replacements = [];
2108
2113
  const wrapperStatements = [];
2109
2114
  const originalEntries = [];
@@ -2254,16 +2259,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2254
2259
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2255
2260
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2256
2261
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2257
- if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2262
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkDRO3NXA3cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2258
2263
  }
2259
2264
  findings.push(finding);
2260
2265
  }
2261
2266
  if (findings.length === 0) return;
2262
2267
  warnedClientBoundaryIds.add(id);
2263
- const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2268
+ const locate = _chunkDRO3NXA3cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2264
2269
  _chunk7U4XF76Rcjs.logger.warn(
2265
2270
  findings.map(
2266
- (finding) => _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
2271
+ (finding) => _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
2267
2272
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2268
2273
  config.root
2269
2274
  )
@@ -2280,7 +2285,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2280
2285
  );
2281
2286
  }
2282
2287
  function shouldEmitFarmClientRootHmr(renderer) {
2283
- return _chunkM6DAIE4Tcjs.getFarmRendererCapabilities.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2288
+ return _chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2284
2289
  }
2285
2290
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2286
2291
  function toFarmRuntimeModuleId(specifier) {
@@ -2311,9 +2316,9 @@ function hasFarmSourceAliasOverride(alias) {
2311
2316
  );
2312
2317
  }
2313
2318
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2314
- const rendererDisabled = _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2319
+ const rendererDisabled = _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2315
2320
  const imageImports = farmImageImportsPlugin();
2316
- const fontImports = _chunkCL7BUGVBcjs.farmFontImportsPlugin.call(void 0, {
2321
+ const fontImports = _chunkARORZ3MHcjs.farmFontImportsPlugin.call(void 0, {
2317
2322
  root: options.root,
2318
2323
  basePath: options.basePath,
2319
2324
  publicDir: options.publicDir
@@ -2347,8 +2352,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2347
2352
  if (mdxComponents) files.add(mdxComponents);
2348
2353
  return files;
2349
2354
  };
2350
- const islxActionsMode = () => _chunkCL7BUGVBcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2351
- const islandsServerFns = () => _chunkCL7BUGVBcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2355
+ const islxActionsMode = () => _chunkARORZ3MHcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2356
+ const islandsServerFns = () => _chunkARORZ3MHcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2352
2357
  let reactRefreshActive = false;
2353
2358
  let server;
2354
2359
  let deferredGates;
@@ -2391,11 +2396,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2391
2396
  isBuild = configEnv.command === "build";
2392
2397
  const farmAliases = {
2393
2398
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2394
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2399
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2395
2400
  };
2396
2401
  if (Object.keys(farmAliases).length > 0) {
2397
2402
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2398
- userConfig.resolve.alias = _chunkCL7BUGVBcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2403
+ userConfig.resolve.alias = _chunkARORZ3MHcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2399
2404
  }
2400
2405
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2401
2406
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
@@ -2469,7 +2474,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2469
2474
  } catch (e21) {
2470
2475
  }
2471
2476
  };
2472
- farmApp = new (0, _chunkCL7BUGVBcjs.FarmApp)(
2477
+ farmApp = new (0, _chunkARORZ3MHcjs.FarmApp)(
2473
2478
  {
2474
2479
  ...options,
2475
2480
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2477,7 +2482,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2477
2482
  server
2478
2483
  );
2479
2484
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2480
- _chunk46UV2E7Icjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2485
+ _chunkDRO3NXA3cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2481
2486
  farmApp.getConfig().root,
2482
2487
  options.distDir || ".farm"
2483
2488
  )
@@ -2488,15 +2493,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2488
2493
  let farmAppPackages;
2489
2494
  if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2490
2495
  farmMiddlewares.use((_req, res, next) => {
2491
- if (_chunkADQ2LATRcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2492
- res.setHeader("X-Robots-Tag", _chunk4OFWG4IKcjs.FARM_PREVIEW_ROBOTS_TAG);
2496
+ if (_chunkRMPUEH5Tcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2497
+ res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2493
2498
  }
2494
2499
  next();
2495
2500
  });
2496
2501
  }
2497
2502
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2498
2503
  const devBuiltInRoutePaths = new Set(
2499
- _chunkFYZD7DUScjs.listFarmBuiltInRoutePaths.call(void 0, {
2504
+ _chunkB2PGVHBGcjs.listFarmBuiltInRoutePaths.call(void 0, {
2500
2505
  agent: {
2501
2506
  apiCatalog: true,
2502
2507
  mcp: true,
@@ -2546,7 +2551,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2546
2551
  );
2547
2552
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2548
2553
  try {
2549
- const result = await _chunkOUDNUFVRcjs.generateFarmTypeArtifacts.call(void 0, {
2554
+ const result = await _chunkVMBIKDKWcjs.generateFarmTypeArtifacts.call(void 0, {
2550
2555
  root: farmConfig.root,
2551
2556
  srcDir: farmConfig.srcDir,
2552
2557
  layers: farmConfig.layers,
@@ -2590,7 +2595,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2590
2595
  farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2591
2596
  );
2592
2597
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2593
- ..._chunkM6DAIE4Tcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2598
+ ..._chunkBCTHOQPPcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2594
2599
  ".md",
2595
2600
  ".mdx"
2596
2601
  ]);
@@ -2729,7 +2734,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2729
2734
  }
2730
2735
  })]);
2731
2736
  }
2732
- apiRouteManager = new (0, _chunkLKIG5SM6cjs.APIRouteManager)(appDirs, server, {
2737
+ apiRouteManager = new (0, _chunk5P65LXGUcjs.APIRouteManager)(appDirs, server, {
2733
2738
  plugins: farmConfig.plugins,
2734
2739
  i18n: farmApp.getI18nRuntime(),
2735
2740
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2831,7 +2836,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2831
2836
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2832
2837
  };
2833
2838
  releaseDocsMCPServers();
2834
- const isFarmDocsPathGuarded = (href) => _chunkOFVCWV2Dcjs.farmPathGuardCoversPage.call(void 0,
2839
+ const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
2835
2840
  {
2836
2841
  config: farmConfig,
2837
2842
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2844,7 +2849,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2844
2849
  clientEntry: "/@farm/client.js",
2845
2850
  resolveLayoutFonts: resolveDocsLayoutFonts,
2846
2851
  fontStylesheetHref: "/@farm/fonts.css",
2847
- globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2852
+ globalStylesheetHref: _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
2848
2853
  farmConfig.root,
2849
2854
  farmConfig.srcDir
2850
2855
  ),
@@ -2875,7 +2880,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2875
2880
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2876
2881
  resolveLayoutFonts: resolveDocsLayoutFonts,
2877
2882
  fontStylesheetHref: "/@farm/fonts.css",
2878
- globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2883
+ globalStylesheetHref: _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
2879
2884
  farmConfig.root,
2880
2885
  farmConfig.srcDir
2881
2886
  ),
@@ -2910,6 +2915,24 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2910
2915
  });
2911
2916
  }
2912
2917
  }
2918
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.find, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")]);
2919
+ if (farmInfraAnalyticsPlugin) {
2920
+ _chunkCD5Z7RR5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2921
+ if (farmDocsDevRuntime) {
2922
+ const label = _chunkB2PGVHBGcjs.resolveFarmDocsRouteLabel.call(void 0,
2923
+ _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2924
+ {
2925
+ path: _optionalChain([farmConfig, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.entry]) || "/docs",
2926
+ roots: _optionalChain([farmConfig, 'access', _194 => _194.docs, 'optionalAccess', _195 => _195.roots, 'optionalAccess', _196 => _196.map, 'call', _197 => _197((root) => root.entry)]),
2927
+ pages: await getFarmDocsPagePaths()
2928
+ }
2929
+ );
2930
+ if (label) return _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2931
+ }
2932
+ const match = farmApp.getRouteManager().matchRoute(pathname);
2933
+ return { pathname, pattern: _optionalChain([match, 'access', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null };
2934
+ });
2935
+ }
2913
2936
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
2914
2937
  const docsContentDirs = farmDocsDevRuntime.getFarmDocsContentDirs(farmConfig.docs, {
2915
2938
  root: farmConfig.root,
@@ -2982,7 +3005,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2982
3005
  }
2983
3006
  },
2984
3007
  (request) => {
2985
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options));
3008
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _200 => _200.getConfig, 'call', _201 => _201()]), () => ( options));
2986
3009
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2987
3010
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
2988
3011
  trustProxy: currentServerConfig.trustProxy
@@ -2998,7 +3021,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2998
3021
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2999
3022
  const requestUrl = req.url || "/";
3000
3023
  const requestMethod = req.method || "GET";
3001
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _190 => _190.getConfig, 'call', _191 => _191()]), () => ( options));
3024
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _202 => _202.getConfig, 'call', _203 => _203()]), () => ( options));
3002
3025
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
3003
3026
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
3004
3027
  trustProxy: currentServerConfig.trustProxy
@@ -3040,10 +3063,35 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3040
3063
  return;
3041
3064
  }
3042
3065
  }
3066
+ if (pm && requestMethod !== "GET" && requestMethod !== "HEAD" && pm._hasRuntimeEndpoint(requestPathname)) {
3067
+ let body;
3068
+ try {
3069
+ body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
3070
+ } catch (error) {
3071
+ res.statusCode = _nullishCoalesce(error.status, () => ( 400));
3072
+ res.end();
3073
+ return;
3074
+ }
3075
+ let response;
3076
+ try {
3077
+ const endpointRequest = createRequestFromNodeRequest(req, parsedRequestUrl);
3078
+ response = await pm.runRuntimeRequest(
3079
+ new Request(endpointRequest, { method: requestMethod, body: toRequestBody(body) }),
3080
+ // An endpoint answers before the handler would run.
3081
+ () => new Response(null, { status: 404 }),
3082
+ { kind: "request", route: { pathname: requestPathname } }
3083
+ );
3084
+ } catch (e22) {
3085
+ sendFarmDevRuntimeHookError(res, true);
3086
+ return;
3087
+ }
3088
+ await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3089
+ return;
3090
+ }
3043
3091
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3044
3092
  res.statusCode = 200;
3045
3093
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3046
- res.end(requestMethod === "HEAD" ? void 0 : _chunkCL7BUGVBcjs.FARM_VIDEO_PLAYER_HTML);
3094
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkARORZ3MHcjs.FARM_VIDEO_PLAYER_HTML);
3047
3095
  return;
3048
3096
  }
3049
3097
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3072,7 +3120,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3072
3120
  if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_PATH)) {
3073
3121
  launchUrl = referrerUrl;
3074
3122
  }
3075
- } catch (e22) {
3123
+ } catch (e23) {
3076
3124
  }
3077
3125
  }
3078
3126
  launchUrl.searchParams.set(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_LAUNCH_PARAM, "1");
@@ -3098,7 +3146,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3098
3146
  openapi: options.openapi
3099
3147
  },
3100
3148
  workflows: discoveredWorkflows,
3101
- plugins: _optionalChain([pm, 'optionalAccess', _192 => _192.getSortedPlugins, 'call', _193 => _193()])
3149
+ plugins: _optionalChain([pm, 'optionalAccess', _204 => _204.getSortedPlugins, 'call', _205 => _205()])
3102
3150
  });
3103
3151
  res.statusCode = 200;
3104
3152
  res.setHeader(
@@ -3122,7 +3170,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3122
3170
  }
3123
3171
  const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
3124
3172
  const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
3125
- const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3173
+ const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3126
3174
  const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
3127
3175
  let pageHookRouteMatch;
3128
3176
  const pageHookRoute = () => {
@@ -3133,10 +3181,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3133
3181
  render: {
3134
3182
  pathname: pathname2,
3135
3183
  method: requestMethod,
3136
- routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
3137
- params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {}
3184
+ routePattern: _optionalChain([match, 'optionalAccess', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null,
3185
+ params: _optionalChain([match, 'optionalAccess', _208 => _208.params]) || {}
3138
3186
  },
3139
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((layout) => layout.pattern)
3187
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _209 => _209.layouts]) || []).map((layout) => layout.pattern)
3140
3188
  };
3141
3189
  return pageHookRouteMatch;
3142
3190
  };
@@ -3203,7 +3251,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3203
3251
  const redirectResponse = response;
3204
3252
  try {
3205
3253
  const metadataRoute = matchAppMetadataRoute(requestPathname);
3206
- const kind = metadataRoute ? "asset" : _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3254
+ const kind = metadataRoute ? "asset" : _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3207
3255
  response = await pm.runRuntimeRequest(
3208
3256
  createRequestFromNodeRequest(req, parsedRequestUrl),
3209
3257
  async () => {
@@ -3212,7 +3260,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3212
3260
  },
3213
3261
  { kind, route: { pathname: requestPathname, ...metadataRoute } }
3214
3262
  );
3215
- } catch (e23) {
3263
+ } catch (e24) {
3216
3264
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3217
3265
  logResponse(requestMethod, requestUrl, 500, 0, "PAGE");
3218
3266
  return;
@@ -3224,7 +3272,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3224
3272
  }
3225
3273
  }
3226
3274
  const runAppMiddlewareForContentRoute = async () => {
3227
- if (!_optionalChain([middlewareManager, 'optionalAccess', _198 => _198.hasMiddleware, 'call', _199 => _199()])) return false;
3275
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _210 => _210.hasMiddleware, 'call', _211 => _211()])) return false;
3228
3276
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3229
3277
  return runFarmMiddlewareWithNavigation(
3230
3278
  farmApp.getServerRenderer(),
@@ -3253,7 +3301,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3253
3301
  return errorResponse;
3254
3302
  }
3255
3303
  );
3256
- } catch (e24) {
3304
+ } catch (e25) {
3257
3305
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3258
3306
  return 500;
3259
3307
  }
@@ -3262,7 +3310,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3262
3310
  return response.status;
3263
3311
  };
3264
3312
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3265
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _200 => _200.hasRuntimeHook, 'call', _201 => _201("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()]) ? interceptFarmDevPageResponse({
3313
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _212 => _212.hasRuntimeHook, 'call', _213 => _213("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()]) ? interceptFarmDevPageResponse({
3266
3314
  req,
3267
3315
  res,
3268
3316
  pm,
@@ -3275,7 +3323,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3275
3323
  urlPath: requestUrl,
3276
3324
  pathname: requestPathname,
3277
3325
  startTime: Date.now(),
3278
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _204 => _204(status)]),
3326
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _216 => _216(status)]),
3279
3327
  // The runtime reports a runtime.after failure itself.
3280
3328
  emitError: async () => {
3281
3329
  },
@@ -3286,7 +3334,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3286
3334
  handled = await runAppMiddlewareForContentRoute();
3287
3335
  } catch (error) {
3288
3336
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3289
- _optionalChain([interceptor, 'optionalAccess', _205 => _205.release, 'call', _206 => _206()]);
3337
+ _optionalChain([interceptor, 'optionalAccess', _217 => _217.release, 'call', _218 => _218()]);
3290
3338
  throw error;
3291
3339
  }
3292
3340
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3294,10 +3342,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3294
3342
  return true;
3295
3343
  }
3296
3344
  if (!handled) {
3297
- _optionalChain([interceptor, 'optionalAccess', _207 => _207.release, 'call', _208 => _208()]);
3345
+ _optionalChain([interceptor, 'optionalAccess', _219 => _219.release, 'call', _220 => _220()]);
3298
3346
  return false;
3299
3347
  }
3300
- if (!_optionalChain([interceptor, 'optionalAccess', _209 => _209.isEnded, 'call', _210 => _210()])) _optionalChain([logResponse2, 'optionalCall', _211 => _211(res.statusCode || 200)]);
3348
+ if (!_optionalChain([interceptor, 'optionalAccess', _221 => _221.isEnded, 'call', _222 => _222()])) _optionalChain([logResponse2, 'optionalCall', _223 => _223(res.statusCode || 200)]);
3301
3349
  return true;
3302
3350
  };
3303
3351
  const serveBuiltInRoute = async (respond, {
@@ -3306,14 +3354,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3306
3354
  label
3307
3355
  } = {}) => {
3308
3356
  const discard = async () => {
3309
- await _optionalChain([computed, 'optionalAccess', _212 => _212.body, 'optionalAccess', _213 => _213.cancel, 'call', _214 => _214(), 'access', _215 => _215.catch, 'call', _216 => _216(() => {
3357
+ await _optionalChain([computed, 'optionalAccess', _224 => _224.body, 'optionalAccess', _225 => _225.cancel, 'call', _226 => _226(), 'access', _227 => _227.catch, 'call', _228 => _228(() => {
3310
3358
  })]);
3311
3359
  };
3312
3360
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
3313
3361
  let runtimeResponse;
3314
3362
  try {
3315
3363
  runtimeResponse = await pm.endRuntimeRequest(runtimeSession3, response2);
3316
- } catch (e25) {
3364
+ } catch (e26) {
3317
3365
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3318
3366
  return;
3319
3367
  }
@@ -3323,15 +3371,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3323
3371
  if (pm && opensFarmDevRuntimeSession(pm)) {
3324
3372
  try {
3325
3373
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3326
- const route = _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
3374
+ const route = _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
3327
3375
  { pathname: requestPathname },
3328
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3376
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkB2PGVHBGcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3329
3377
  );
3330
3378
  runtimeSession2 = await pm.beginRuntimeRequest(
3331
3379
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3332
3380
  { kind, route }
3333
3381
  );
3334
- } catch (e26) {
3382
+ } catch (e27) {
3335
3383
  await discard();
3336
3384
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3337
3385
  return;
@@ -3363,7 +3411,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3363
3411
  }
3364
3412
  responding = true;
3365
3413
  response = await respond(
3366
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _217 => _217.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3414
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _229 => _229.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3367
3415
  );
3368
3416
  } catch (error) {
3369
3417
  if (!responding && !res.headersSent) {
@@ -3383,7 +3431,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3383
3431
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3384
3432
  };
3385
3433
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3386
- if (openAPIManager && _optionalChain([options, 'access', _218 => _218.openapi, 'optionalAccess', _219 => _219.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3434
+ if (openAPIManager && _optionalChain([options, 'access', _230 => _230.openapi, 'optionalAccess', _231 => _231.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3387
3435
  const specManager = openAPIManager;
3388
3436
  await serveBuiltInRoute(async () => {
3389
3437
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3403,7 +3451,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3403
3451
  });
3404
3452
  return;
3405
3453
  }
3406
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _220 => _220.openapi, 'optionalAccess', _221 => _221.route])) {
3454
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _232 => _232.openapi, 'optionalAccess', _233 => _233.route])) {
3407
3455
  const docsManager = openAPIManager;
3408
3456
  await serveBuiltInRoute(
3409
3457
  async () => {
@@ -3414,8 +3462,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3414
3462
  );
3415
3463
  return;
3416
3464
  }
3417
- if (_optionalChain([options, 'access', _222 => _222.agent, 'optionalAccess', _223 => _223.manifest]) !== false && _chunkFYZD7DUScjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3418
- const manifestGuardCoversPath = (path7) => _chunkOFVCWV2Dcjs.farmPathGuardCoversEndpoint.call(void 0,
3465
+ if (_optionalChain([options, 'access', _234 => _234.agent, 'optionalAccess', _235 => _235.manifest]) !== false && _chunkB2PGVHBGcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3466
+ const manifestGuardCoversPath = (path7) => _chunkNEKO3HM2cjs.farmPathGuardCoversEndpoint.call(void 0,
3419
3467
  {
3420
3468
  config: farmConfig,
3421
3469
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3424,18 +3472,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3424
3472
  apiServerBasePath
3425
3473
  );
3426
3474
  await serveBuiltInRoute(async () => {
3427
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkCL7BUGVBcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3428
- const manifest = await _chunkFYZD7DUScjs.createFarmAppManifestResponse.call(void 0,
3475
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkARORZ3MHcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3476
+ const manifest = await _chunkB2PGVHBGcjs.createFarmAppManifestResponse.call(void 0,
3429
3477
  new Request(parsedRequestUrl, {
3430
3478
  method: requestMethod,
3431
3479
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3432
3480
  }),
3433
3481
  {
3434
- ..._chunkFYZD7DUScjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3482
+ ..._chunkB2PGVHBGcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3435
3483
  build: "development",
3436
3484
  packages: farmAppPackages,
3437
3485
  // Read again on each request; unchanged files come from a cache.
3438
- webmcpTools: _optionalChain([farmConfig, 'access', _224 => _224.plugins, 'optionalAccess', _225 => _225.some, 'call', _226 => _226(({ name }) => name === "farm:webmcp")]) ? _chunkCL7BUGVBcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3486
+ webmcpTools: _optionalChain([farmConfig, 'access', _236 => _236.plugins, 'optionalAccess', _237 => _237.some, 'call', _238 => _238(({ name }) => name === "farm:webmcp")]) ? _chunkARORZ3MHcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3439
3487
  }),
3440
3488
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3441
3489
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3453,11 +3501,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3453
3501
  });
3454
3502
  return;
3455
3503
  }
3456
- if (_optionalChain([options, 'access', _227 => _227.agent, 'optionalAccess', _228 => _228.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkFYZD7DUScjs.FARM_API_CATALOG_PATH) {
3504
+ if (_optionalChain([options, 'access', _239 => _239.agent, 'optionalAccess', _240 => _240.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkB2PGVHBGcjs.FARM_API_CATALOG_PATH) {
3457
3505
  await serveBuiltInRoute(
3458
- () => _chunkFYZD7DUScjs.createFarmApiCatalogResponse.call(void 0,
3506
+ () => _chunkB2PGVHBGcjs.createFarmApiCatalogResponse.call(void 0,
3459
3507
  requestMethod,
3460
- _chunkFYZD7DUScjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3508
+ _chunkB2PGVHBGcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3461
3509
  new Request(parsedRequestUrl, {
3462
3510
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3463
3511
  })
@@ -3465,8 +3513,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3465
3513
  );
3466
3514
  return;
3467
3515
  }
3468
- if (_optionalChain([options, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.aiCatalog]) !== false) {
3469
- const aiCatalog = _chunkFYZD7DUScjs.createFarmAiCatalogResponse.call(void 0,
3516
+ if (_optionalChain([options, 'access', _241 => _241.agent, 'optionalAccess', _242 => _242.aiCatalog]) !== false) {
3517
+ const aiCatalog = _chunkB2PGVHBGcjs.createFarmAiCatalogResponse.call(void 0,
3470
3518
  new Request(parsedRequestUrl, {
3471
3519
  method: requestMethod,
3472
3520
  headers: {
@@ -3514,7 +3562,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3514
3562
  );
3515
3563
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3516
3564
  if (docsResponse) {
3517
- const docsPage = _optionalChain([docsResponse, 'access', _231 => _231.headers, 'access', _232 => _232.get, 'call', _233 => _233("content-type"), 'optionalAccess', _234 => _234.toLowerCase, 'call', _235 => _235(), 'access', _236 => _236.includes, 'call', _237 => _237("text/html")]);
3565
+ const docsPage = _optionalChain([docsResponse, 'access', _243 => _243.headers, 'access', _244 => _244.get, 'call', _245 => _245("content-type"), 'optionalAccess', _246 => _246.toLowerCase, 'call', _247 => _247(), 'access', _248 => _248.includes, 'call', _249 => _249("text/html")]);
3518
3566
  await serveBuiltInRoute(
3519
3567
  async (request) => {
3520
3568
  if (!docsPage) {
@@ -3532,7 +3580,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3532
3580
  farmConfig.deploymentId
3533
3581
  );
3534
3582
  if (deploymentMismatch) {
3535
- await _optionalChain([docsResponse, 'access', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240()]);
3583
+ await _optionalChain([docsResponse, 'access', _250 => _250.body, 'optionalAccess', _251 => _251.cancel, 'call', _252 => _252()]);
3536
3584
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3537
3585
  }
3538
3586
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3548,11 +3596,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3548
3596
  {
3549
3597
  kind: "docs",
3550
3598
  computed: docsResponse,
3551
- label: _chunkFYZD7DUScjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3599
+ label: _chunkB2PGVHBGcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3552
3600
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3553
3601
  {
3554
- path: _optionalChain([farmConfig, 'access', _241 => _241.docs, 'optionalAccess', _242 => _242.entry]) || "/docs",
3555
- roots: _optionalChain([farmConfig, 'access', _243 => _243.docs, 'optionalAccess', _244 => _244.roots, 'optionalAccess', _245 => _245.map, 'call', _246 => _246((root) => root.entry)]),
3602
+ path: _optionalChain([farmConfig, 'access', _253 => _253.docs, 'optionalAccess', _254 => _254.entry]) || "/docs",
3603
+ roots: _optionalChain([farmConfig, 'access', _255 => _255.docs, 'optionalAccess', _256 => _256.roots, 'optionalAccess', _257 => _257.map, 'call', _258 => _258((root) => root.entry)]),
3556
3604
  pages: await getFarmDocsPagePaths()
3557
3605
  }
3558
3606
  )
@@ -3561,7 +3609,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3561
3609
  return;
3562
3610
  }
3563
3611
  }
3564
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _247 => _247.headers, 'access', _248 => _248.accept, 'optionalAccess', _249 => _249.includes, 'call', _250 => _250(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3612
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _259 => _259.headers, 'access', _260 => _260.accept, 'optionalAccess', _261 => _261.includes, 'call', _262 => _262(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3565
3613
  const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3566
3614
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3567
3615
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3579,15 +3627,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3579
3627
  });
3580
3628
  await serveBuiltInRoute(() => treeResponse, {
3581
3629
  computed: treeResponse,
3582
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _251 => _251.getRouteManager, 'call', _252 => _252(), 'access', _253 => _253.matchRoute, 'call', _254 => _254(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]), () => ( null))
3630
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _263 => _263.getRouteManager, 'call', _264 => _264(), 'access', _265 => _265.matchRoute, 'call', _266 => _266(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _267 => _267.route, 'optionalAccess', _268 => _268.pattern]), () => ( null))
3583
3631
  });
3584
3632
  return;
3585
3633
  }
3586
3634
  const markdownRouteLabel = () => (
3587
3635
  // On the route path, as production labels it: /fr/index.md is /index.md.
3588
- _chunkFYZD7DUScjs.resolveFarmMarkdownRouteLabel.call(void 0,
3636
+ _chunkB2PGVHBGcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3589
3637
  toRoutePathname(requestPathname),
3590
- (page) => _optionalChain([farmApp, 'access', _257 => _257.getRouteManager, 'call', _258 => _258(), 'access', _259 => _259.matchRoute, 'call', _260 => _260(page), 'access', _261 => _261.route, 'optionalAccess', _262 => _262.pattern])
3638
+ (page) => _optionalChain([farmApp, 'access', _269 => _269.getRouteManager, 'call', _270 => _270(), 'access', _271 => _271.matchRoute, 'call', _272 => _272(page), 'access', _273 => _273.route, 'optionalAccess', _274 => _274.pattern])
3591
3639
  )
3592
3640
  );
3593
3641
  const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
@@ -3599,14 +3647,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3599
3647
  routePathname: toRoutePathname,
3600
3648
  resolveSource: async (pathname2) => {
3601
3649
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3602
- const sourcePath = _optionalChain([match, 'access', _263 => _263.route, 'optionalAccess', _264 => _264.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3650
+ const sourcePath = _optionalChain([match, 'access', _275 => _275.route, 'optionalAccess', _276 => _276.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3603
3651
  if (!sourcePath) {
3604
3652
  return null;
3605
3653
  }
3606
3654
  return {
3607
3655
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3608
3656
  // Project-relative, as production sends it: never the machine's path.
3609
- filePath: _chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3657
+ filePath: _chunkARORZ3MHcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3610
3658
  };
3611
3659
  },
3612
3660
  // The anonymous check goes through this server, so its guards and
@@ -3741,7 +3789,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3741
3789
  }
3742
3790
  const configuredIntegrations = currentConfig.integrations;
3743
3791
  const tryConfiguredIntegrationRoute = async () => {
3744
- const matchedRoute = _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3792
+ const matchedRoute = _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3745
3793
  pathname: requestPathname,
3746
3794
  method: requestMethod
3747
3795
  });
@@ -3755,8 +3803,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3755
3803
  await pm.runHookParallelFiltered(
3756
3804
  "beforeRequest",
3757
3805
  (plugin2) => {
3758
- const owner = _chunkWGWWRV2Mcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3759
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _265 => _265.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3806
+ const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3807
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _277 => _277.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3760
3808
  },
3761
3809
  req,
3762
3810
  res
@@ -3785,7 +3833,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3785
3833
  });
3786
3834
  const dispatchIntegration = async (request, runtime) => {
3787
3835
  try {
3788
- const result = await _chunkWGWWRV2Mcjs.dispatchIntegrationRequest.call(void 0,
3836
+ const result = await _chunkB3HQTGXScjs.dispatchIntegrationRequest.call(void 0,
3789
3837
  {
3790
3838
  integration: matchedRoute.integration,
3791
3839
  config: currentConfig,
@@ -3793,7 +3841,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3793
3841
  isProd: false
3794
3842
  },
3795
3843
  request,
3796
- { clientAddress: _optionalChain([req, 'access', _266 => _266.socket, 'optionalAccess', _267 => _267.remoteAddress]) }
3844
+ { clientAddress: _optionalChain([req, 'access', _278 => _278.socket, 'optionalAccess', _279 => _279.remoteAddress]) }
3797
3845
  );
3798
3846
  if (!result) {
3799
3847
  throw new Error(`Matched integration route did not return a response`);
@@ -3801,8 +3849,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3801
3849
  return result;
3802
3850
  } catch (error) {
3803
3851
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3804
- await _optionalChain([runtime, 'optionalAccess', _268 => _268.reportError, 'call', _269 => _269(error)]);
3805
- return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
3852
+ await _optionalChain([runtime, 'optionalAccess', _280 => _280.reportError, 'call', _281 => _281(error)]);
3853
+ return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
3806
3854
  }
3807
3855
  };
3808
3856
  runtimeReportsErrors = Boolean(pm);
@@ -3843,7 +3891,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3843
3891
  } else if (!res.writableEnded) {
3844
3892
  res.statusCode = 500;
3845
3893
  res.setHeader("Content-Type", "application/json");
3846
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3894
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3847
3895
  }
3848
3896
  return true;
3849
3897
  }
@@ -3852,10 +3900,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3852
3900
  const hasLocalDevRoute = () => {
3853
3901
  const routeManager3 = farmApp.getRouteManager();
3854
3902
  return Boolean(
3855
- _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3903
+ _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3856
3904
  pathname: requestPathname,
3857
3905
  method: requestMethod
3858
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _270 => _270.isFarmDocsAPIRequest, 'call', _271 => _271(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3906
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _282 => _282.isFarmDocsAPIRequest, 'call', _283 => _283(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3859
3907
  );
3860
3908
  };
3861
3909
  try {
@@ -3889,7 +3937,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3889
3937
  }
3890
3938
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
3891
3939
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
3892
- if (hasMatchedApiRoute || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3940
+ if (hasMatchedApiRoute || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3893
3941
  const startTime2 = Date.now();
3894
3942
  const method2 = req.method || "GET";
3895
3943
  const urlPath2 = req.url || "/";
@@ -3918,7 +3966,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3918
3966
  _chunk7U4XF76Rcjs.logger.error(`Request hook error: ${error}`);
3919
3967
  res.statusCode = 500;
3920
3968
  res.setHeader("Content-Type", "application/json");
3921
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3969
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3922
3970
  return;
3923
3971
  }
3924
3972
  const createAPIRequest = async () => {
@@ -3945,15 +3993,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3945
3993
  );
3946
3994
  };
3947
3995
  const isDocsAPIRequest = Boolean(
3948
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _272 => _272.isFarmDocsAPIRequest, 'call', _273 => _273(pathname2)])
3996
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _284 => _284.isFarmDocsAPIRequest, 'call', _285 => _285(pathname2)])
3949
3997
  );
3950
3998
  const docsRuntimeOptions = () => ({
3951
3999
  kind: "docs",
3952
- route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
4000
+ route: _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
3953
4001
  { pathname: pathname2, pattern: urlPath2 },
3954
- _chunkFYZD7DUScjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3955
- path: _optionalChain([farmConfig, 'access', _274 => _274.docs, 'optionalAccess', _275 => _275.entry]) || "/docs",
3956
- roots: _optionalChain([farmConfig, 'access', _276 => _276.docs, 'optionalAccess', _277 => _277.roots, 'optionalAccess', _278 => _278.map, 'call', _279 => _279((root) => root.entry)])
4002
+ _chunkB2PGVHBGcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4003
+ path: _optionalChain([farmConfig, 'access', _286 => _286.docs, 'optionalAccess', _287 => _287.entry]) || "/docs",
4004
+ roots: _optionalChain([farmConfig, 'access', _288 => _288.docs, 'optionalAccess', _289 => _289.roots, 'optionalAccess', _290 => _290.map, 'call', _291 => _291((root) => root.entry)])
3957
4005
  })
3958
4006
  )
3959
4007
  });
@@ -4035,7 +4083,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4035
4083
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4036
4084
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4037
4085
  if (apiHandler && hasExplicitAPIRoute) {
4038
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _280 => _280.route, 'access', _281 => _281.path]) || urlPath2;
4086
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _292 => _292.route, 'access', _293 => _293.path]) || urlPath2;
4039
4087
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4040
4088
  type: "route.matched",
4041
4089
  pathname: pathname2,
@@ -4085,8 +4133,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4085
4133
  error
4086
4134
  });
4087
4135
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4088
- await _optionalChain([runtime, 'optionalAccess', _282 => _282.reportError, 'call', _283 => _283(error)]);
4089
- response = _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
4136
+ await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
4137
+ response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
4090
4138
  }
4091
4139
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
4092
4140
  };
@@ -4190,12 +4238,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4190
4238
  }
4191
4239
  return;
4192
4240
  }
4193
- if (_optionalChain([req, 'access', _284 => _284.url, 'optionalAccess', _285 => _285.startsWith, 'call', _286 => _286("/@")]) || _optionalChain([req, 'access', _287 => _287.url, 'optionalAccess', _288 => _288.startsWith, 'call', _289 => _289("/node_modules")])) {
4241
+ if (_optionalChain([req, 'access', _296 => _296.url, 'optionalAccess', _297 => _297.startsWith, 'call', _298 => _298("/@")]) || _optionalChain([req, 'access', _299 => _299.url, 'optionalAccess', _300 => _300.startsWith, 'call', _301 => _301("/node_modules")])) {
4194
4242
  return next();
4195
4243
  }
4196
4244
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4197
4245
  requestPathname,
4198
- _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291()]),
4246
+ _optionalChain([farmApp, 'optionalAccess', _302 => _302.getRouteManager, 'call', _303 => _303()]),
4199
4247
  [server.config.publicDir, server.config.root],
4200
4248
  farmAgentGeneratedPaths(farmConfig),
4201
4249
  requestMethod
@@ -4203,7 +4251,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4203
4251
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4204
4252
  return next();
4205
4253
  }
4206
- if (_optionalChain([req, 'access', _292 => _292.url, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("/__farm/page-data")])) {
4254
+ if (_optionalChain([req, 'access', _304 => _304.url, 'optionalAccess', _305 => _305.startsWith, 'call', _306 => _306("/__farm/page-data")])) {
4207
4255
  const urlObj = parsedRequestUrl;
4208
4256
  const targetPath = urlObj.searchParams.get("path") || "/";
4209
4257
  let renderedRequest;
@@ -4233,7 +4281,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4233
4281
  renderedRequest = targetRequest;
4234
4282
  let middlewareMap = /* @__PURE__ */ new Map();
4235
4283
  let middlewareContext = /* @__PURE__ */ new Map();
4236
- if (_optionalChain([middlewareManager, 'optionalAccess', _295 => _295.hasMiddleware, 'call', _296 => _296()])) {
4284
+ if (_optionalChain([middlewareManager, 'optionalAccess', _307 => _307.hasMiddleware, 'call', _308 => _308()])) {
4237
4285
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4238
4286
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4239
4287
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4267,10 +4315,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4267
4315
  if (pm) {
4268
4316
  await pm.runHookParallel("afterRouteMatch", {
4269
4317
  pathname: targetPath,
4270
- matched: !!_optionalChain([match, 'optionalAccess', _297 => _297.route]),
4271
- routePattern: _optionalChain([match, 'optionalAccess', _298 => _298.route, 'optionalAccess', _299 => _299.pattern]) || null,
4272
- params: _optionalChain([match, 'optionalAccess', _300 => _300.params]) || {},
4273
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _301 => _301.layouts]) || []).map((l) => l.pattern)
4318
+ matched: !!_optionalChain([match, 'optionalAccess', _309 => _309.route]),
4319
+ routePattern: _optionalChain([match, 'optionalAccess', _310 => _310.route, 'optionalAccess', _311 => _311.pattern]) || null,
4320
+ params: _optionalChain([match, 'optionalAccess', _312 => _312.params]) || {},
4321
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _313 => _313.layouts]) || []).map((l) => l.pattern)
4274
4322
  });
4275
4323
  }
4276
4324
  if (!match) {
@@ -4305,7 +4353,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4305
4353
  );
4306
4354
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4307
4355
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4308
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4356
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4309
4357
  const isClientComponent = moduleMetadata.isClientComponent;
4310
4358
  const shouldHydrate = moduleMetadata.shouldHydrate;
4311
4359
  let mergedMetadata = {};
@@ -4316,7 +4364,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4316
4364
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4317
4365
  (entry) => entry.pattern === layout.pattern
4318
4366
  ), () => ( {
4319
- ..._chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4367
+ ..._chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4320
4368
  serverTree: false
4321
4369
  }))
4322
4370
  );
@@ -4330,17 +4378,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4330
4378
  )
4331
4379
  ];
4332
4380
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4333
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303()]), () => ( options))), 'access', _304 => _304.experimental, 'optionalAccess', _305 => _305.serverComponents])
4334
- ) === "islands" ? _chunkCL7BUGVBcjs.resolveFarmRouteRootStrategy.call(void 0,
4381
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315()]), () => ( options))), 'access', _316 => _316.experimental, 'optionalAccess', _317 => _317.serverComponents])
4382
+ ) === "islands" ? _chunkARORZ3MHcjs.resolveFarmRouteRootStrategy.call(void 0,
4335
4383
  route,
4336
4384
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4337
4385
  layouts.map((layout, index) => ({
4338
4386
  pattern: layout.pattern,
4339
4387
  modulePath: layout.modulePath,
4340
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _306 => _306[index], 'optionalAccess', _307 => _307.shouldHydrate]) === true,
4388
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _318 => _318[index], 'optionalAccess', _319 => _319.shouldHydrate]) === true,
4341
4389
  // Manifest entries carry it; metadata read from source does not.
4342
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _308 => _308[index], 'optionalAccess', _309 => _309.hasIsolatedClientBoundaries]) === true,
4343
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _310 => _310[index], 'optionalAccess', _311 => _311.islandStrategy]), () => ( null))
4390
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _320 => _320[index], 'optionalAccess', _321 => _321.hasIsolatedClientBoundaries]) === true,
4391
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.islandStrategy]), () => ( null))
4344
4392
  })),
4345
4393
  server.config.root,
4346
4394
  true
@@ -4397,7 +4445,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4397
4445
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4398
4446
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4399
4447
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4400
- ), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4448
+ ), () => ( _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4401
4449
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4402
4450
  request: targetRequest,
4403
4451
  params: slot.params,
@@ -4443,15 +4491,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4443
4491
  );
4444
4492
  const projectRoot = server.config.root;
4445
4493
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4446
- const renderPlan = _chunkOFVCWV2Dcjs.createFarmRouteRenderPlan.call(void 0, {
4494
+ const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
4447
4495
  pageShouldHydrate: shouldHydrate,
4448
4496
  layoutShouldHydrate: shouldHydrateLayout,
4449
4497
  islandStrategy: hydrationIslandStrategy,
4450
- rendering: _chunkOUDNUFVRcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4498
+ rendering: _chunkVMBIKDKWcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4451
4499
  });
4452
4500
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4453
- const layoutStartIndex = _chunkOFVCWV2Dcjs.getSharedLayoutPrefixLength.call(void 0,
4454
- _chunkOFVCWV2Dcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4501
+ const layoutStartIndex = _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0,
4502
+ _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4455
4503
  destinationLayoutPatterns
4456
4504
  );
4457
4505
  const renderer = farmApp.getServerRenderer();
@@ -4461,13 +4509,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4461
4509
  middlewareContext,
4462
4510
  () => renderer.renderNavigationFragment({
4463
4511
  PageComponent: routeModule.default,
4464
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _312 => _312.default]),
4512
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _324 => _324.default]),
4465
4513
  pageProps: routeProps,
4466
4514
  params,
4467
4515
  layouts: layouts.map((layout, index) => ({
4468
4516
  pattern: layout.pattern,
4469
4517
  module: layoutModules[index],
4470
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _313 => _313[index], 'optionalAccess', _314 => _314.serverTree])
4518
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _325 => _325[index], 'optionalAccess', _326 => _326.serverTree])
4471
4519
  })),
4472
4520
  layoutStartIndex,
4473
4521
  slots: routeSlots.map((slot) => ({
@@ -4533,7 +4581,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4533
4581
  {
4534
4582
  status: 200,
4535
4583
  headers: {
4536
- "Cache-Control": _chunkOFVCWV2Dcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4584
+ "Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4537
4585
  "X-Farm-Navigation": "html-fragment",
4538
4586
  Vary: "X-Farm-Layout-Chain",
4539
4587
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4575,14 +4623,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4575
4623
  trustProxy: currentServerConfig.trustProxy
4576
4624
  }).pathname;
4577
4625
  const routeManager2 = farmApp.getRouteManager();
4578
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _315 => _315.hasHook, 'call', _316 => _316("beforeRequest")]), () => ( false));
4579
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _317 => _317.hasHook, 'call', _318 => _318("afterResponse")]), () => ( false));
4580
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _319 => _319.hasHook, 'call', _320 => _320("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _321 => _321.hasHook, 'call', _322 => _322("afterRender")]), () => ( false)));
4626
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _327 => _327.hasHook, 'call', _328 => _328("beforeRequest")]), () => ( false));
4627
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _329 => _329.hasHook, 'call', _330 => _330("afterResponse")]), () => ( false));
4628
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterRender")]), () => ( false)));
4581
4629
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4582
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _323 => _323.hasRuntimeHook, 'call', _324 => _324("after")]), () => ( false));
4630
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasRuntimeHook, 'call', _336 => _336("after")]), () => ( false));
4583
4631
  const pageBuiltInRouteLabel = (pathname2) => {
4584
4632
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4585
- const mcpLabel = _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4633
+ const mcpLabel = _chunkB2PGVHBGcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4586
4634
  if (mcpLabel) return mcpLabel;
4587
4635
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4588
4636
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4591,13 +4639,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4591
4639
  const match = routeManager2.matchRoute(pathname2);
4592
4640
  return {
4593
4641
  kind: "page",
4594
- route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
4642
+ route: _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
4595
4643
  {
4596
4644
  pathname: pathname2,
4597
- pattern: _optionalChain([match, 'optionalAccess', _325 => _325.route, 'optionalAccess', _326 => _326.pattern]) || null,
4598
- params: _optionalChain([match, 'optionalAccess', _327 => _327.params]) || {}
4645
+ pattern: _optionalChain([match, 'optionalAccess', _337 => _337.route, 'optionalAccess', _338 => _338.pattern]) || null,
4646
+ params: _optionalChain([match, 'optionalAccess', _339 => _339.params]) || {}
4599
4647
  },
4600
- _optionalChain([match, 'optionalAccess', _328 => _328.route]) ? null : pageBuiltInRouteLabel(pathname2)
4648
+ _optionalChain([match, 'optionalAccess', _340 => _340.route]) ? null : pageBuiltInRouteLabel(pathname2)
4601
4649
  )
4602
4650
  };
4603
4651
  };
@@ -4677,7 +4725,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4677
4725
  }) : void 0;
4678
4726
  let middlewareFailed = false;
4679
4727
  try {
4680
- if (_optionalChain([middlewareManager, 'optionalAccess', _329 => _329.hasMiddleware, 'call', _330 => _330()])) {
4728
+ if (_optionalChain([middlewareManager, 'optionalAccess', _341 => _341.hasMiddleware, 'call', _342 => _342()])) {
4681
4729
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4682
4730
  const handled = await runFarmMiddlewareWithNavigation(
4683
4731
  farmApp.getServerRenderer(),
@@ -4690,7 +4738,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4690
4738
  throw error;
4691
4739
  });
4692
4740
  if (handled) {
4693
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _331 => _331.isEnded, 'call', _332 => _332()])) {
4741
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _343 => _343.isEnded, 'call', _344 => _344()])) {
4694
4742
  const duration = Date.now() - startTime;
4695
4743
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4696
4744
  }
@@ -4705,8 +4753,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4705
4753
  res
4706
4754
  );
4707
4755
  }
4708
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4709
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4756
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _345 => _345.isEnded, 'call', _346 => _346()])) {
4757
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
4710
4758
  const duration = Date.now() - startTime;
4711
4759
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4712
4760
  }
@@ -4725,8 +4773,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4725
4773
  await pm.reportRuntimeRequestError(runtimeSession, error);
4726
4774
  } else {
4727
4775
  await pm.failRuntimeRequest(runtimeSession, error);
4728
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.isEnded, 'call', _338 => _338()])) {
4729
- _optionalChain([responseInterceptor, 'optionalAccess', _339 => _339.release, 'call', _340 => _340()]);
4776
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
4777
+ _optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.release, 'call', _352 => _352()]);
4730
4778
  console.error("[FARM] Page error:", error);
4731
4779
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4732
4780
  return;
@@ -4743,7 +4791,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4743
4791
  }
4744
4792
  })
4745
4793
  );
4746
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _341 => _341.stack, 'access', _342 => _342.at, 'call', _343 => _343(-1), 'optionalAccess', _344 => _344.handle]);
4794
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _353 => _353.stack, 'access', _354 => _354.at, 'call', _355 => _355(-1), 'optionalAccess', _356 => _356.handle]);
4747
4795
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4748
4796
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4749
4797
  }
@@ -4772,7 +4820,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4772
4820
  });
4773
4821
  }
4774
4822
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4775
- const root = _optionalChain([farmApp, 'optionalAccess', _345 => _345.getConfig, 'call', _346 => _346(), 'access', _347 => _347.root]) || _optionalChain([server, 'optionalAccess', _348 => _348.config, 'access', _349 => _349.root]) || options.root;
4823
+ const root = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358(), 'access', _359 => _359.root]) || _optionalChain([server, 'optionalAccess', _360 => _360.config, 'access', _361 => _361.root]) || options.root;
4776
4824
  return this.resolve(id, path6.join(root, "package.json"), {
4777
4825
  ...resolveOptions,
4778
4826
  skipSelf: true
@@ -4800,7 +4848,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4800
4848
  }
4801
4849
  },
4802
4850
  async load(id, loadOptions) {
4803
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _350 => _350.ssr]) && !farmSetupContext.getStore()) {
4851
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _362 => _362.ssr]) && !farmSetupContext.getStore()) {
4804
4852
  await pendingClientSetup;
4805
4853
  }
4806
4854
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4818,8 +4866,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4818
4866
  if (imageModule) return imageModule;
4819
4867
  }
4820
4868
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4821
- const renderer = _optionalChain([farmApp, 'optionalAccess', _351 => _351.getConfig, 'call', _352 => _352(), 'access', _353 => _353.renderer]) || _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, options.renderer);
4822
- const root = _optionalChain([server, 'optionalAccess', _354 => _354.config, 'access', _355 => _355.root]) || options.root;
4869
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _363 => _363.getConfig, 'call', _364 => _364(), 'access', _365 => _365.renderer]) || _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, options.renderer);
4870
+ const root = _optionalChain([server, 'optionalAccess', _366 => _366.config, 'access', _367 => _367.root]) || options.root;
4823
4871
  if (isClientEnvironment(this, loadOptions)) {
4824
4872
  return generateProgrammaticClientRouteModuleForId(
4825
4873
  id,
@@ -4835,65 +4883,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4835
4883
  return FARM_DEV_CLIENT_BOOT_MODULE;
4836
4884
  }
4837
4885
  if (isFarmClientVirtualId(id)) {
4838
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _356 => _356.getConfig, 'call', _357 => _357()]);
4839
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _358 => _358.renderer]) || _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, options.renderer);
4840
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.integrations]) || options.integrations;
4841
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.root]) || _optionalChain([server, 'optionalAccess', _361 => _361.config, 'access', _362 => _362.root]) || process.cwd();
4842
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _363 => _363.docs]);
4886
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _368 => _368.getConfig, 'call', _369 => _369()]);
4887
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _370 => _370.renderer]) || _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, options.renderer);
4888
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.integrations]) || options.integrations;
4889
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.root]) || _optionalChain([server, 'optionalAccess', _373 => _373.config, 'access', _374 => _374.root]) || process.cwd();
4890
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.docs]);
4843
4891
  const adapterOwnsDocsRuntime = Boolean(
4844
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _364 => _364.adapter, 'optionalAccess', _365 => _365.server]) && docs.adapter.react
4892
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _376 => _376.adapter, 'optionalAccess', _377 => _377.server]) && docs.adapter.react
4845
4893
  );
4846
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _366 => _366.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4894
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4847
4895
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4848
- _optionalChain([docs, 'optionalAccess', _367 => _367.enabled]) ? loadFarmDocsDevRuntime() : null,
4849
- _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4896
+ _optionalChain([docs, 'optionalAccess', _379 => _379.enabled]) ? loadFarmDocsDevRuntime() : null,
4897
+ _optionalChain([docs, 'optionalAccess', _380 => _380.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4850
4898
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4851
4899
  ]);
4852
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _369 => _369.isFarmDocsSearchEnabled, 'call', _370 => _370(docs)]), () => ( false));
4900
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _381 => _381.isFarmDocsSearchEnabled, 'call', _382 => _382(docs)]), () => ( false));
4853
4901
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4854
4902
  docsSearchEnabled,
4855
4903
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4856
4904
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4857
4905
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4858
4906
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4859
- const integrationProviders = _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, integrations);
4860
- const isolatedHydrationMode = _chunk46UV2E7Icjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4861
- _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.experimental, 'optionalAccess', _372 => _372.isolatedClientHydration]),
4907
+ const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4908
+ const isolatedHydrationMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4909
+ _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.experimental, 'optionalAccess', _384 => _384.isolatedClientHydration]),
4862
4910
  {
4863
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.serverComponents])) === "rsc",
4911
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.serverComponents])) === "rsc",
4864
4912
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4865
4913
  }
4866
4914
  );
4867
4915
  return generateClientCode(
4868
4916
  integrationProviders,
4869
4917
  [
4870
- ..._chunkWGWWRV2Mcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4871
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _375 => _375.getFarmDocsDocumentNavigationMatchers, 'call', _376 => _376(docs)]), () => ( []))
4918
+ ..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4919
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _387 => _387.getFarmDocsDocumentNavigationMatchers, 'call', _388 => _388(docs)]), () => ( []))
4872
4920
  ],
4873
4921
  generatedDocsSearchRuntime,
4874
4922
  `${generatedDevtoolsClientRuntime}
4875
4923
  ${generatedDevIndicatorsClientRuntime}`,
4876
- _optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.plugins]) || [],
4924
+ _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.plugins]) || [],
4877
4925
  root,
4878
- _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.srcDir]) || options.srcDir || "src",
4879
- _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.publicRuntimeConfig]) || options.publicRuntimeConfig,
4880
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _380 => _380.adapter, 'optionalAccess', _381 => _381.react]) : void 0,
4926
+ _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.srcDir]) || options.srcDir || "src",
4927
+ _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.publicRuntimeConfig]) || options.publicRuntimeConfig,
4928
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _392 => _392.adapter, 'optionalAccess', _393 => _393.react]) : void 0,
4881
4929
  renderer,
4882
- isolatedHydrationMode === "enabled" || _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _382 => _382.getRouteManager, 'call', _383 => _383(), 'access', _384 => _384.getIsolatedClientBoundaryModules, 'call', _385 => _385(root)])))), 'optionalAccess', _386 => _386.size]) > 0,
4883
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.trailingSlash]), () => ( false)),
4884
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.basePath]), () => ( "/")),
4885
- _chunkCL7BUGVBcjs.generateClientCachePersistenceCode.call(void 0,
4886
- _chunkCL7BUGVBcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.cache]))
4930
+ isolatedHydrationMode === "enabled" || _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _394 => _394.getRouteManager, 'call', _395 => _395(), 'access', _396 => _396.getIsolatedClientBoundaryModules, 'call', _397 => _397(root)])))), 'optionalAccess', _398 => _398.size]) > 0,
4931
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _399 => _399.trailingSlash]), () => ( false)),
4932
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.basePath]), () => ( "/")),
4933
+ _chunkARORZ3MHcjs.generateClientCachePersistenceCode.call(void 0,
4934
+ _chunkARORZ3MHcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.cache]))
4887
4935
  ),
4888
- _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4889
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.experimental, 'optionalAccess', _391 => _391.serverComponents])) === "islands"
4936
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4937
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands"
4890
4938
  );
4891
4939
  }
4892
4940
  if (id === "/@farm/server") {
4893
4941
  return generateServerCode();
4894
4942
  }
4895
4943
  if (id === "/@farm/manifest") {
4896
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _392 => _392.getRouteManager, 'call', _393 => _393()]);
4944
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _404 => _404.getRouteManager, 'call', _405 => _405()]);
4897
4945
  if (!routeManager) {
4898
4946
  return `
4899
4947
  export const getManifest = () => ({
@@ -4905,11 +4953,11 @@ export const getManifest = () => ({
4905
4953
  });
4906
4954
  `;
4907
4955
  }
4908
- const globalStylesheetHref = _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
4956
+ const globalStylesheetHref = _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
4909
4957
  server.config.root,
4910
- _optionalChain([farmApp, 'optionalAccess', _394 => _394.getConfig, 'call', _395 => _395(), 'access', _396 => _396.srcDir])
4958
+ _optionalChain([farmApp, 'optionalAccess', _406 => _406.getConfig, 'call', _407 => _407(), 'access', _408 => _408.srcDir])
4911
4959
  );
4912
- const fullManifest = _chunkCL7BUGVBcjs.createFarmDevClientManifest.call(void 0,
4960
+ const fullManifest = _chunkARORZ3MHcjs.createFarmDevClientManifest.call(void 0,
4913
4961
  routeManager.generateClientManifest(server.config.root),
4914
4962
  {
4915
4963
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4925,64 +4973,64 @@ export { manifest };
4925
4973
  }
4926
4974
  },
4927
4975
  async transform(code, id, transformOptions) {
4928
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _397 => _397.ssr]) && !farmSetupContext.getStore()) {
4976
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) && !farmSetupContext.getStore()) {
4929
4977
  await pendingClientSetup;
4930
4978
  }
4931
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4932
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _399 => _399.getConfig, 'call', _400 => _400()]), () => ( options));
4979
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4980
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412()]), () => ( options));
4933
4981
  let rewrotePackageImports = false;
4934
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _401 => _401.experimental, 'optionalAccess', _402 => _402.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _403 => _403.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) {
4982
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, code)) {
4935
4983
  const file = id.split("?", 1)[0];
4936
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _404 => _404.config, 'access', _405 => _405.root]) || process.cwd();
4984
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _416 => _416.config, 'access', _417 => _417.root]) || process.cwd();
4937
4985
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4938
4986
  const rewrite = () => {
4939
- if (_optionalChain([transformOptions, 'optionalAccess', _406 => _406.ssr]) === true) {
4987
+ if (_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true) {
4940
4988
  if (farmReactServerFiles.has(file)) {
4941
- for (const child of _chunk46UV2E7Icjs.farmRelativeImportFiles.call(void 0, code, file))
4989
+ for (const child of _chunkDRO3NXA3cjs.farmRelativeImportFiles.call(void 0, code, file))
4942
4990
  farmReactServerFiles.add(child);
4943
4991
  }
4944
- const serverModule = farmReactServerFiles.has(file) || !_chunk46UV2E7Icjs.getFarmClientReachableModules.call(void 0,
4992
+ const serverModule = farmReactServerFiles.has(file) || !_chunkDRO3NXA3cjs.getFarmClientReachableModules.call(void 0,
4945
4993
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4946
4994
  projectRoot
4947
4995
  ).has(path6.resolve(file));
4948
- const reactServer = !serverModule ? null : _chunk46UV2E7Icjs.rewriteFarmReactServerImports.call(void 0, {
4996
+ const reactServer = !serverModule ? null : _chunkDRO3NXA3cjs.rewriteFarmReactServerImports.call(void 0, {
4949
4997
  code,
4950
4998
  file,
4951
- reference: (specifier, exportName) => _chunk46UV2E7Icjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4999
+ reference: (specifier, exportName) => _chunkDRO3NXA3cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4952
5000
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4953
5001
  });
4954
5002
  if (reactServer !== null) {
4955
5003
  code = reactServer;
4956
5004
  rewrotePackageImports = true;
4957
5005
  }
4958
- const internal = farmReactServerFiles.has(file) ? _chunk46UV2E7Icjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5006
+ const internal = farmReactServerFiles.has(file) ? _chunkDRO3NXA3cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4959
5007
  code,
4960
5008
  file,
4961
- reference: (clientFile) => _chunk46UV2E7Icjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5009
+ reference: (clientFile) => _chunkDRO3NXA3cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4962
5010
  }) : null;
4963
5011
  if (internal !== null) {
4964
5012
  code = internal;
4965
5013
  rewrotePackageImports = true;
4966
5014
  }
4967
5015
  }
4968
- const rewritePackageImports = (source2) => _chunk46UV2E7Icjs.rewriteFarmPackageClientImports.call(void 0, {
5016
+ const rewritePackageImports = (source2) => _chunkDRO3NXA3cjs.rewriteFarmPackageClientImports.call(void 0, {
4969
5017
  code: source2,
4970
5018
  file,
4971
5019
  root: projectRoot,
4972
- isClientPackage: (specifier) => _chunk46UV2E7Icjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5020
+ isClientPackage: (specifier) => _chunkDRO3NXA3cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4973
5021
  });
4974
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
5022
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _419 => _419.getRouteManager, 'call', _420 => _420()]);
4975
5023
  const source = code;
4976
5024
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4977
5025
  if (referenced !== null) {
4978
5026
  code = referenced;
4979
5027
  rewrotePackageImports = true;
4980
5028
  }
4981
- if (_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) === true) {
5029
+ if (_optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true) {
4982
5030
  const cached = rewriteFarmReactCacheImport(
4983
5031
  code,
4984
5032
  file,
4985
- _optionalChain([runtimeModule, 'optionalCall', _410 => _410(FARM_REACT_CACHE_MODULE)])
5033
+ _optionalChain([runtimeModule, 'optionalCall', _422 => _422(FARM_REACT_CACHE_MODULE)])
4986
5034
  );
4987
5035
  if (cached !== null) {
4988
5036
  code = cached;
@@ -4990,12 +5038,12 @@ export { manifest };
4990
5038
  }
4991
5039
  }
4992
5040
  };
4993
- if (buildSnapshot) _chunk46UV2E7Icjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5041
+ if (buildSnapshot) _chunkDRO3NXA3cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4994
5042
  else rewrite();
4995
5043
  }
4996
5044
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4997
5045
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4998
- environment: _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true ? "rsc" : "client"
5046
+ environment: _optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true ? "rsc" : "client"
4999
5047
  });
5000
5048
  if (serverFns) {
5001
5049
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
@@ -5008,8 +5056,8 @@ export { manifest };
5008
5056
  const actionModule = transformFarmFormActionModule({
5009
5057
  code,
5010
5058
  id,
5011
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _412 => _412.config, 'access', _413 => _413.root]) || process.cwd(),
5012
- ssr: _optionalChain([transformOptions, 'optionalAccess', _414 => _414.ssr]) === true,
5059
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _424 => _424.config, 'access', _425 => _425.root]) || process.cwd(),
5060
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true,
5013
5061
  // Parsed by file type: page components are TSX.
5014
5062
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
5015
5063
  runtimeModule,
@@ -5017,21 +5065,21 @@ export { manifest };
5017
5065
  });
5018
5066
  if (actionModule) return { code: actionModule, map: null };
5019
5067
  }
5020
- if (!_optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr])) {
5021
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _416 => _416.getConfig, 'call', _417 => _417(), 'optionalAccess', _418 => _418.docs]));
5022
- if (_chunkCL7BUGVBcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5023
- const redacted = _chunkCL7BUGVBcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5068
+ if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr])) {
5069
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429(), 'optionalAccess', _430 => _430.docs]));
5070
+ if (_chunkARORZ3MHcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5071
+ const redacted = _chunkARORZ3MHcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5024
5072
  if (redacted !== null) return { code: redacted, map: null };
5025
5073
  }
5026
5074
  }
5027
- if (!_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr])) {
5028
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _420 => _420.getConfig, 'call', _421 => _421()]), () => ( options));
5029
- if ((_optionalChain([currentConfig, 'access', _422 => _422.experimental, 'optionalAccess', _423 => _423.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5075
+ if (!_optionalChain([transformOptions, 'optionalAccess', _431 => _431.ssr])) {
5076
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _432 => _432.getConfig, 'call', _433 => _433()]), () => ( options));
5077
+ if ((_optionalChain([currentConfig, 'access', _434 => _434.experimental, 'optionalAccess', _435 => _435.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5030
5078
  const violation = findClientServerFnViolation(code, id);
5031
5079
  if (violation) {
5032
- const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5080
+ const locate = _chunkDRO3NXA3cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5033
5081
  this.error(
5034
- _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
5082
+ _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
5035
5083
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5036
5084
  currentConfig.root
5037
5085
  )
@@ -5039,8 +5087,8 @@ export { manifest };
5039
5087
  }
5040
5088
  }
5041
5089
  }
5042
- if (!_optionalChain([transformOptions, 'optionalAccess', _424 => _424.ssr]) && shouldInspectClientBoundary(id, code)) {
5043
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _425 => _425.getConfig, 'call', _426 => _426()]), () => ( options)));
5090
+ if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr]) && shouldInspectClientBoundary(id, code)) {
5091
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438()]), () => ( options)));
5044
5092
  }
5045
5093
  if (typeof imageImports.transform === "function") {
5046
5094
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5055,13 +5103,13 @@ export { manifest };
5055
5103
  id,
5056
5104
  transformOptions
5057
5105
  );
5058
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _427 => _427.code, 'optionalAccess', _428 => _428.toString, 'call', _429 => _429()]);
5106
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _439 => _439.code, 'optionalAccess', _440 => _440.toString, 'call', _441 => _441()]);
5059
5107
  if (fontCode) {
5060
5108
  transformedCode = fontCode;
5061
5109
  transformed = true;
5062
5110
  }
5063
5111
  }
5064
- if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) && server) {
5112
+ if (_optionalChain([transformOptions, 'optionalAccess', _442 => _442.ssr]) && server) {
5065
5113
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5066
5114
  code: transformedCode,
5067
5115
  id,
@@ -5073,26 +5121,26 @@ export { manifest };
5073
5121
  transformed = true;
5074
5122
  }
5075
5123
  }
5076
- if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, transformedCode)) {
5124
+ if (_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5077
5125
  const clientBoundarySource = transformedCode;
5078
5126
  const moduleInfo = this.getModuleInfo(id);
5079
5127
  if (moduleInfo) {
5080
5128
  moduleInfo.isClientComponent = true;
5081
5129
  }
5082
- transformedCode = _chunk46UV2E7Icjs.stripUseClientDirective.call(void 0, transformedCode);
5130
+ transformedCode = _chunkDRO3NXA3cjs.stripUseClientDirective.call(void 0, transformedCode);
5083
5131
  transformed = true;
5084
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
5132
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _443 => _443.getConfig, 'call', _444 => _444()]), () => ( options));
5085
5133
  let isolatedModuleReference = null;
5086
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd();
5134
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _445 => _445.config, 'access', _446 => _446.root]) || process.cwd();
5087
5135
  const cleanId = id.split("?", 1)[0];
5088
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _435 => _435.getRouteManager, 'call', _436 => _436(), 'access', _437 => _437.getIsolatedClientBoundaryModules, 'call', _438 => _438(root)])));
5089
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _439 => _439.has, 'call', _440 => _440(path6.resolve(cleanId))]) === true;
5090
- if (_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunk46UV2E7Icjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5091
- cleanId.replace(/\\/g, "/").includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5136
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _447 => _447.getRouteManager, 'call', _448 => _448(), 'access', _449 => _449.getIsolatedClientBoundaryModules, 'call', _450 => _450(root)])));
5137
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _451 => _451.has, 'call', _452 => _452(path6.resolve(cleanId))]) === true;
5138
+ if (_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkDRO3NXA3cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5139
+ cleanId.replace(/\\/g, "/").includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5092
5140
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5093
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _441 => _441.experimental, 'optionalAccess', _442 => _442.serverComponents])) === "islands";
5094
- const explicitStrategy = _chunk46UV2E7Icjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5095
- const inference = islandsMode && explicitStrategy === null ? _chunkCL7BUGVBcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5141
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _453 => _453.experimental, 'optionalAccess', _454 => _454.serverComponents])) === "islands";
5142
+ const explicitStrategy = _chunkDRO3NXA3cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5143
+ const inference = islandsMode && explicitStrategy === null ? _chunkARORZ3MHcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5096
5144
  if (inference) {
5097
5145
  for (const file of inference.files) {
5098
5146
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5105,8 +5153,8 @@ export { manifest };
5105
5153
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5106
5154
  parse: (source) => this.parse(source),
5107
5155
  slots: islandsMode,
5108
- browser: _optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) !== true,
5109
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _444 => _444.strategy]) === "interaction",
5156
+ browser: _optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) !== true,
5157
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _456 => _456.strategy]) === "interaction",
5110
5158
  runtimeModule
5111
5159
  });
5112
5160
  if (!transformedBoundary) {
@@ -5137,7 +5185,7 @@ export { manifest };
5137
5185
  );
5138
5186
  return;
5139
5187
  }` : "";
5140
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5188
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _457 => _457.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5141
5189
  if (import.meta.hot) {
5142
5190
  import.meta.hot.accept((newModule) => {
5143
5191
  ${isolatedHmrUpdate}
@@ -5193,14 +5241,14 @@ if (import.meta.hot) {
5193
5241
  }
5194
5242
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5195
5243
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5196
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd(), options.outDir || "dist");
5244
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _458 => _458.config, 'access', _459 => _459.root]) || process.cwd(), options.outDir || "dist");
5197
5245
  const clientDir = path6.join(outDir, "client");
5198
5246
  for (const page of ssgPages) {
5199
5247
  try {
5200
5248
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5201
5249
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5202
5250
  const mod = await routeManager.loadRouteModule(page.filePath);
5203
- if (!_optionalChain([mod, 'optionalAccess', _448 => _448.default])) return;
5251
+ if (!_optionalChain([mod, 'optionalAccess', _460 => _460.default])) return;
5204
5252
  const { layouts } = routeManager.matchRoute(page.urlPath);
5205
5253
  const layoutModules = await Promise.all(
5206
5254
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5232,7 +5280,7 @@ if (import.meta.hot) {
5232
5280
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5233
5281
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5234
5282
  const fullHtml = `<!DOCTYPE html>
5235
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _449 => _449.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5283
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _461 => _461.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5236
5284
  <head>
5237
5285
  <meta charset="utf-8">
5238
5286
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5277,12 +5325,12 @@ if (import.meta.hot) {
5277
5325
  watchChange(id, change) {
5278
5326
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5279
5327
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5280
- _optionalChain([farmApp, 'optionalAccess', _450 => _450.getRouteManager, 'call', _451 => _451(), 'access', _452 => _452.noteSourceChange, 'call', _453 => _453(id, change.event)]);
5328
+ _optionalChain([farmApp, 'optionalAccess', _462 => _462.getRouteManager, 'call', _463 => _463(), 'access', _464 => _464.noteSourceChange, 'call', _465 => _465(id, change.event)]);
5281
5329
  }
5282
- _chunk46UV2E7Icjs.invalidateFarmClientReachableModules.call(void 0, );
5283
- _chunk46UV2E7Icjs.invalidateFarmClientOnlyScan.call(void 0, );
5284
- _chunkCL7BUGVBcjs.invalidateFarmRouteRootInferences.call(void 0, );
5285
- _chunk46UV2E7Icjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5330
+ _chunkDRO3NXA3cjs.invalidateFarmClientReachableModules.call(void 0, );
5331
+ _chunkDRO3NXA3cjs.invalidateFarmClientOnlyScan.call(void 0, );
5332
+ _chunkARORZ3MHcjs.invalidateFarmRouteRootInferences.call(void 0, );
5333
+ _chunkDRO3NXA3cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5286
5334
  },
5287
5335
  async handleHotUpdate(ctx) {
5288
5336
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5307,7 +5355,7 @@ if (import.meta.hot) {
5307
5355
  server2.moduleGraph.invalidateModule(mod);
5308
5356
  }
5309
5357
  }
5310
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _454 => _454.getConfig, 'call', _455 => _455()]);
5358
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getConfig, 'call', _467 => _467()]);
5311
5359
  const normalizedFile = file.replace(/\\/g, "/");
5312
5360
  const reloadAfterEdit = () => {
5313
5361
  for (const files of pendingRouteReloads) {
@@ -5315,10 +5363,10 @@ if (import.meta.hot) {
5315
5363
  }
5316
5364
  server2.ws.send({ type: "full-reload", path: "*" });
5317
5365
  };
5318
- if (normalizedFile.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5366
+ if (normalizedFile.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5319
5367
  path6.posix.join(
5320
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _456 => _456.root]) || options.root || server2.config.root),
5321
- _chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY
5368
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.root]) || options.root || server2.config.root),
5369
+ _chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5322
5370
  )
5323
5371
  ))
5324
5372
  return modules;
@@ -5326,7 +5374,7 @@ if (import.meta.hot) {
5326
5374
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5327
5375
  )) {
5328
5376
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5329
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _457 => _457(`updated ${file}`)]);
5377
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
5330
5378
  reloadAfterEdit();
5331
5379
  return [];
5332
5380
  }
@@ -5336,7 +5384,7 @@ if (import.meta.hot) {
5336
5384
  for (const mod of modules) {
5337
5385
  server2.moduleGraph.invalidateModule(mod);
5338
5386
  }
5339
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
5387
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5340
5388
  reloadAfterEdit();
5341
5389
  return [];
5342
5390
  }
@@ -5346,22 +5394,22 @@ if (import.meta.hot) {
5346
5394
  for (const mod of modules) {
5347
5395
  server2.moduleGraph.invalidateModule(mod);
5348
5396
  }
5349
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
5397
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5350
5398
  reloadAfterEdit();
5351
5399
  return [];
5352
5400
  }
5353
5401
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5354
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5402
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5355
5403
  }
5356
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _461 => _461.experimental, 'optionalAccess', _462 => _462.isolatedClientHydration]);
5357
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464()]);
5404
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _473 => _473.experimental, 'optionalAccess', _474 => _474.isolatedClientHydration]);
5405
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _475 => _475.getRouteManager, 'call', _476 => _476()]);
5358
5406
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5359
- const tracksAsyncOwnerIslands = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _465 => _465.renderer])) && planRouteManager !== void 0;
5407
+ const tracksAsyncOwnerIslands = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _477 => _477.renderer])) && planRouteManager !== void 0;
5360
5408
  let clientPlanCurrent = false;
5361
5409
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5362
5410
  const routeManager = planRouteManager;
5363
- await _optionalChain([ctx, 'access', _466 => _466.read, 'optionalCall', _467 => _467()]);
5364
- if (_optionalChain([routeManager, 'optionalAccess', _468 => _468.isEditPlanNeutral, 'call', _469 => _469(file)])) {
5411
+ await _optionalChain([ctx, 'access', _478 => _478.read, 'optionalCall', _479 => _479()]);
5412
+ if (_optionalChain([routeManager, 'optionalAccess', _480 => _480.isEditPlanNeutral, 'call', _481 => _481(file)])) {
5365
5413
  clientPlanCurrent = true;
5366
5414
  } else if (routeManager) {
5367
5415
  routeManager.noteSourceChange(file, "update");
@@ -5422,7 +5470,7 @@ if (import.meta.hot) {
5422
5470
  }
5423
5471
  return [];
5424
5472
  }
5425
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _470 => _470.getRouteManager, 'call', _471 => _471(), 'access', _472 => _472.invalidateClientManifest, 'call', _473 => _473()]);
5473
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _482 => _482.getRouteManager, 'call', _483 => _483(), 'access', _484 => _484.invalidateClientManifest, 'call', _485 => _485()]);
5426
5474
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5427
5475
  if (manifestModule) {
5428
5476
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5437,7 +5485,7 @@ if (import.meta.hot) {
5437
5485
  return [];
5438
5486
  }
5439
5487
  }
5440
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _474 => _474.environments, 'access', _475 => _475.client, 'optionalAccess', _476 => _476.moduleGraph, 'access', _477 => _477.getModulesByFile, 'call', _478 => _478(normalizedFile), 'optionalAccess', _479 => _479.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5488
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _486 => _486.environments, 'access', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph, 'access', _489 => _489.getModulesByFile, 'call', _490 => _490(normalizedFile), 'optionalAccess', _491 => _491.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5441
5489
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5442
5490
  reloadAfterEdit();
5443
5491
  return [];
@@ -5535,7 +5583,7 @@ function createPageDataMiddlewareResponse(res) {
5535
5583
  return (...args) => {
5536
5584
  if (captures(target.statusCode, target.getHeader("location"))) {
5537
5585
  const callback = args.find((arg) => typeof arg === "function");
5538
- _optionalChain([callback, 'optionalCall', _480 => _480()]);
5586
+ _optionalChain([callback, 'optionalCall', _492 => _492()]);
5539
5587
  return property === "write" ? true : response;
5540
5588
  }
5541
5589
  return target[property](...args);
@@ -5580,7 +5628,7 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
5580
5628
  if (fs2.realpathSync(farmRoot) === fs2.realpathSync(viteRoot)) {
5581
5629
  return path6.resolve(viteRoot);
5582
5630
  }
5583
- } catch (e27) {
5631
+ } catch (e28) {
5584
5632
  }
5585
5633
  return farmRoot;
5586
5634
  }
@@ -5599,12 +5647,12 @@ function isFarmClientVirtualId(id) {
5599
5647
  }
5600
5648
  function isClientEnvironment(context, loadOptions) {
5601
5649
  const environment = context.environment;
5602
- if (_optionalChain([environment, 'optionalAccess', _481 => _481.config, 'optionalAccess', _482 => _482.consumer])) return environment.config.consumer === "client";
5603
- if (_optionalChain([environment, 'optionalAccess', _483 => _483.name])) return environment.name === "client";
5604
- return _optionalChain([loadOptions, 'optionalAccess', _484 => _484.ssr]) !== true;
5650
+ if (_optionalChain([environment, 'optionalAccess', _493 => _493.config, 'optionalAccess', _494 => _494.consumer])) return environment.config.consumer === "client";
5651
+ if (_optionalChain([environment, 'optionalAccess', _495 => _495.name])) return environment.name === "client";
5652
+ return _optionalChain([loadOptions, 'optionalAccess', _496 => _496.ssr]) !== true;
5605
5653
  }
5606
5654
  function invalidateProgrammaticClientRouteModules(server) {
5607
- const graph = _optionalChain([server, 'access', _485 => _485.environments, 'optionalAccess', _486 => _486.client, 'optionalAccess', _487 => _487.moduleGraph]);
5655
+ const graph = _optionalChain([server, 'access', _497 => _497.environments, 'optionalAccess', _498 => _498.client, 'optionalAccess', _499 => _499.moduleGraph]);
5608
5656
  if (!graph) return;
5609
5657
  for (const [id, module] of graph.idToModuleMap) {
5610
5658
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5614,27 +5662,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5614
5662
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5615
5663
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5616
5664
  watchFile(routesFile);
5617
- return _chunk46UV2E7Icjs.generateProgrammaticClientRouteModule.call(void 0, {
5665
+ return _chunkDRO3NXA3cjs.generateProgrammaticClientRouteModule.call(void 0, {
5618
5666
  kind: parsed.kind,
5619
5667
  routePath: parsed.routePath,
5620
5668
  routesFile,
5621
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _488 => _488.routes, 'access', _489 => _489.get, 'call', _490 => _490(
5622
- _chunk46UV2E7Icjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5669
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _500 => _500.routes, 'access', _501 => _501.get, 'call', _502 => _502(
5670
+ _chunkDRO3NXA3cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5623
5671
  )]),
5624
5672
  // React's client module exports no createElement; the main client entry imports React too.
5625
- rendererClient: _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5673
+ rendererClient: _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5626
5674
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5627
5675
  });
5628
5676
  }
5629
5677
  function resolveRealModuleFile(filePath, root) {
5630
- const resolved = _nullishCoalesce(_chunk46UV2E7Icjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5678
+ const resolved = _nullishCoalesce(_chunkDRO3NXA3cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5631
5679
  try {
5632
5680
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5633
- } catch (e28) {
5681
+ } catch (e29) {
5634
5682
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5635
5683
  }
5636
5684
  }
5637
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER) {
5685
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkBCTHOQPPcjs.REACT_RENDERER) {
5638
5686
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5639
5687
  if (!parsed) {
5640
5688
  return "";
@@ -5941,12 +5989,12 @@ async function parseRouteModuleProps(routeModule, input) {
5941
5989
  }
5942
5990
  const schemas = routeModule.__farmRouteSchemas;
5943
5991
  const params = parseRouteModuleSchema(
5944
- _optionalChain([schemas, 'optionalAccess', _491 => _491.params]),
5992
+ _optionalChain([schemas, 'optionalAccess', _503 => _503.params]),
5945
5993
  input.props.params,
5946
5994
  "params",
5947
5995
  input.routePath
5948
5996
  );
5949
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _492 => _492.search]), input.search, "search", input.routePath);
5997
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _504 => _504.search]), input.search, "search", input.routePath);
5950
5998
  return {
5951
5999
  ...input.props,
5952
6000
  params,
@@ -5965,20 +6013,20 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5965
6013
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
5966
6014
  }
5967
6015
  }
5968
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5969
- const providerClientCode = _chunkCL7BUGVBcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6016
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkBCTHOQPPcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6017
+ const providerClientCode = _chunkARORZ3MHcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5970
6018
  integrationProviders,
5971
6019
  root,
5972
6020
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
5973
6021
  );
5974
- const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
6022
+ const clientPluginEntry = _chunkDMSXZNQRcjs.generateFarmClientPluginEntryCode.call(void 0,
5975
6023
  plugins,
5976
6024
  root,
5977
6025
  srcDir,
5978
6026
  publicRuntimeConfig
5979
6027
  );
5980
- const appSetupPath = _chunkM6DAIE4Tcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5981
- const rendererClientImports = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6028
+ const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6029
+ const rendererClientImports = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5982
6030
  import { hydrateRoot, createRoot } from 'react-dom/client'
5983
6031
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
5984
6032
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6030,7 +6078,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6030
6078
  return null;
6031
6079
  }
6032
6080
  }
6033
- ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6081
+ ${islandValues ? `${_chunkARORZ3MHcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6034
6082
  let farmLastRouteState = null;
6035
6083
 
6036
6084
  // A hot update to a layout tree's client module renders the route again.
@@ -6871,7 +6919,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6871
6919
  return loadedLayouts;
6872
6920
  }
6873
6921
 
6874
- ${_chunkCL7BUGVBcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6922
+ ${_chunkARORZ3MHcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6875
6923
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6876
6924
  let wrapped = element;
6877
6925
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6950,7 +6998,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
6950
6998
 
6951
6999
  function hydrateFarmRoute(container, route) {
6952
7000
  farmLastRouteState = route;
6953
- ${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7001
+ ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
6954
7002
  }
6955
7003
 
6956
7004
  function renderFarmRoute(root, route) {
@@ -7094,7 +7142,7 @@ async function tryHydrateImportedPage(
7094
7142
  wrap: wrapFarmClientRouteGraph,
7095
7143
  };
7096
7144
  } else if (useHydrate && container?.id === '__farm_page__') {
7097
- wrappedElement = wrapFarmClientRouteGraph(${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7145
+ wrappedElement = wrapFarmClientRouteGraph(${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7098
7146
  } else {
7099
7147
  wrappedElement = await buildWrappedHydrationElement(
7100
7148
  currentPageComponent,
@@ -7114,6 +7162,8 @@ async function tryHydrateImportedPage(
7114
7162
  window.__FARM_REACT_ROOT__ = reactRoot;
7115
7163
  return true;
7116
7164
  } catch (error) {
7165
+ // The page still works, but the server's DOM, focus, and typed input are gone, so say so.
7166
+ console.error('[Farm.js] Hydration error; rendering the page on the client instead:', error);
7117
7167
  appRoot = createRoot(container);
7118
7168
  if (routeState) renderFarmRoute(appRoot, routeState);
7119
7169
  else appRoot.render(wrappedElement);
@@ -7169,7 +7219,7 @@ function readActiveLayoutPatterns() {
7169
7219
  );
7170
7220
  }
7171
7221
 
7172
- ${_chunkCL7BUGVBcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7222
+ ${_chunkARORZ3MHcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7173
7223
 
7174
7224
  function activateFragmentScripts(root) {
7175
7225
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7228,7 +7278,7 @@ function getLayoutShell(root, patterns, index, find) {
7228
7278
  return shell.innerHTML;
7229
7279
  }
7230
7280
 
7231
- ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7281
+ ${islandValues ? _chunkARORZ3MHcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7232
7282
  container,
7233
7283
  fragment,
7234
7284
  currentPatterns,
@@ -7250,6 +7300,8 @@ ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function repl
7250
7300
  ) {
7251
7301
  sharedCount++;
7252
7302
  }
7303
+ // After the comparison: a noscript turned to text serializes escaped in the template's document.
7304
+ adoptFarmParsedNodes(fragment);
7253
7305
 
7254
7306
  const fragmentTreeRoot = nextPatterns.length > 0
7255
7307
  ? find(fragment, nextPatterns[0])
@@ -7301,9 +7353,9 @@ ${islandValues ? `
7301
7353
  return nextTarget;
7302
7354
  }
7303
7355
 
7304
- ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7356
+ ${islandValues ? `${_chunkARORZ3MHcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7305
7357
 
7306
- ${_chunkCL7BUGVBcjs.FARM_EARLY_NAVIGATION_SOURCE}
7358
+ ${_chunkARORZ3MHcjs.FARM_EARLY_NAVIGATION_SOURCE}
7307
7359
 
7308
7360
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7309
7361
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7473,9 +7525,12 @@ async function streamFarmDevNavigation(stream, root, generation) {
7473
7525
  observer.disconnect();
7474
7526
  return stream.cancel();
7475
7527
  }
7476
- const parsed = new DOMParser().parseFromString('<div id="root">' + flush, 'text/html');
7528
+ const parsed = new DOMParser()
7529
+ .parseFromString('<div id="root">' + flush, 'text/html')
7530
+ .getElementById('root');
7531
+ adoptFarmParsedNodes(parsed);
7477
7532
  const fragment = document.createDocumentFragment();
7478
- for (const node of Array.from(parsed.getElementById('root').childNodes)) fragment.appendChild(node);
7533
+ for (const node of Array.from(parsed.childNodes)) fragment.appendChild(node);
7479
7534
  activateFragmentScripts(fragment);
7480
7535
  root.appendChild(fragment);
7481
7536
  }
@@ -7628,6 +7683,7 @@ async function renderPage(pageData, info) {
7628
7683
  ${isolatedHydrationEnabled ? "disposeFarmIsolatedClientBoundaries(container);" : ""}
7629
7684
  if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
7630
7685
  if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
7686
+ adoptFarmParsedNodes(fragment);
7631
7687
  container.replaceChildren(fragment);
7632
7688
  activateFragmentScripts(container);
7633
7689
  } else {
@@ -8004,9 +8060,9 @@ function generateClientManifest(bundle) {
8004
8060
  return manifest;
8005
8061
  }
8006
8062
  async function defineConfig(config = {}) {
8007
- const tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
8063
+ const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8008
8064
  const appRoot = path6.resolve(config.root || process.cwd());
8009
- if (_optionalChain([config, 'access', _493 => _493.extends, 'optionalAccess', _494 => _494.length])) {
8065
+ if (_optionalChain([config, 'access', _505 => _505.extends, 'optionalAccess', _506 => _506.length])) {
8010
8066
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8011
8067
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8012
8068
  root: appRoot,
@@ -8015,12 +8071,12 @@ async function defineConfig(config = {}) {
8015
8071
  );
8016
8072
  config = layeredConfig;
8017
8073
  }
8018
- config.renderer = _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, config.renderer);
8019
- config.images = _chunkCL7BUGVBcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8020
- const rendererVitePlugins = await _chunkM6DAIE4Tcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8074
+ config.renderer = _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, config.renderer);
8075
+ config.images = _chunkARORZ3MHcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8076
+ const rendererVitePlugins = await _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8021
8077
  ssr: true
8022
8078
  });
8023
- const reactRefreshPlugins = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8079
+ const reactRefreshPlugins = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8024
8080
  const nodeBuiltinStubs = {
8025
8081
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8026
8082
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8108,13 +8164,13 @@ async function defineConfig(config = {}) {
8108
8164
  if (!serverStarted) {
8109
8165
  serverStarted = true;
8110
8166
  const elapsed = Date.now() - startTime;
8111
- const address = _optionalChain([server, 'access', _495 => _495.httpServer, 'optionalAccess', _496 => _496.address, 'call', _497 => _497()]);
8167
+ const address = _optionalChain([server, 'access', _507 => _507.httpServer, 'optionalAccess', _508 => _508.address, 'call', _509 => _509()]);
8112
8168
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8113
8169
  const hostConfig = server.config.server.host;
8114
8170
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8115
8171
  console.log("");
8116
8172
  console.log(
8117
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkNSLRK5DKcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8173
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkJK26IMT7cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8118
8174
  );
8119
8175
  console.log("");
8120
8176
  console.log(
@@ -8148,7 +8204,7 @@ async function defineConfig(config = {}) {
8148
8204
  plugins: [
8149
8205
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8150
8206
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8151
- _chunkCL7BUGVBcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8207
+ _chunkARORZ3MHcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8152
8208
  tailwindVitePlugin,
8153
8209
  ...rendererVitePlugins,
8154
8210
  ...reactRefreshPlugins,
@@ -8158,14 +8214,14 @@ async function defineConfig(config = {}) {
8158
8214
  farmNavigationPlugin(config.renderer),
8159
8215
  farmIslandContainersPlugin(config),
8160
8216
  farmPlugin(config),
8161
- _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8217
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8162
8218
  farmBrandingPlugin
8163
8219
  ],
8164
8220
  customLogger: farmLogger,
8165
8221
  clearScreen: false,
8166
8222
  optimizeDeps: {
8167
- ..._chunkCL7BUGVBcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8168
- _chunkCL7BUGVBcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8223
+ ..._chunkARORZ3MHcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8224
+ _chunkARORZ3MHcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8169
8225
  appRoot,
8170
8226
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8171
8227
  ),
@@ -8209,7 +8265,7 @@ async function defineConfig(config = {}) {
8209
8265
  // Stub out problematic server-only modules during dev mode
8210
8266
  alias: {
8211
8267
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8212
- ..._chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8268
+ ..._chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8213
8269
  // Nitro internals that should not be resolved in browser
8214
8270
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8215
8271
  "@poppinss/dumper": "data:text/javascript,export default {};",