@farm.js/core 0.1.80 → 0.1.81

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 (358) hide show
  1. package/dist/{agent-mcp.d-BPa5n0ld.d.ts → agent-mcp.d-Cxi3214_.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-DMqOqnOA.d.mts} +1 -1
  3. package/dist/agent-runtime.d.mts +2 -1
  4. package/dist/agent-runtime.d.ts +2 -1
  5. package/dist/analyzer-435DCIQ6.cjs +17 -0
  6. package/dist/{analyzer-F7CWE5VA.mjs → analyzer-IC66UJCU.mjs} +3 -2
  7. package/dist/api/client.cjs +1 -1
  8. package/dist/api/client.mjs +1 -1
  9. package/dist/api/client.native.cjs +1 -1
  10. package/dist/api/client.native.mjs +1 -1
  11. package/dist/api/node.cjs +1 -1
  12. package/dist/api/node.d.mts +4 -3
  13. package/dist/api/node.d.ts +4 -3
  14. package/dist/api/node.mjs +1 -1
  15. package/dist/api/route-manager.cjs +4 -4
  16. package/dist/api/route-manager.d.mts +4 -3
  17. package/dist/api/route-manager.d.ts +4 -3
  18. package/dist/api/route-manager.mjs +3 -3
  19. package/dist/api/runtime.cjs +1 -1
  20. package/dist/api/runtime.d.mts +3 -2
  21. package/dist/api/runtime.d.ts +3 -2
  22. package/dist/api/runtime.mjs +1 -1
  23. package/dist/api.cjs +5 -5
  24. package/dist/api.d.mts +5 -4
  25. package/dist/api.d.ts +5 -4
  26. package/dist/api.mjs +4 -4
  27. package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-Bbxp5kes.d.mts} +1 -1
  28. package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-C8Cswd31.d.ts} +1 -1
  29. package/dist/app-markdown.cjs +3 -3
  30. package/dist/app-markdown.d.mts +5 -4
  31. package/dist/app-markdown.d.ts +5 -4
  32. package/dist/app-markdown.mjs +2 -2
  33. package/dist/{app.d-DXeRWZK7.d.mts → app.d-BJuSurgy.d.mts} +13 -4
  34. package/dist/{app.d-DwX1ePhs.d.ts → app.d-DGIoFt5D.d.ts} +13 -4
  35. package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
  36. package/dist/{chunk-GCRT6GJG.mjs → chunk-2HMSSPCZ.mjs} +26 -0
  37. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  38. package/dist/chunk-2UYYXSUS.mjs +401 -0
  39. package/dist/{chunk-G4SZC2WH.cjs → chunk-2Y2HRZQY.cjs} +431 -332
  40. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  41. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  42. package/dist/{chunk-ZVSQN7NC.cjs → chunk-46UV2E7I.cjs} +40 -43
  43. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  44. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  45. package/dist/{chunk-XZBBKZGW.mjs → chunk-5N526T7Q.mjs} +64 -33
  46. package/dist/{chunk-XY5OZQF6.cjs → chunk-ADQ2LATR.cjs} +2 -2
  47. package/dist/{chunk-7DD5TNPS.cjs → chunk-AHVF5GI2.cjs} +2 -2
  48. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  49. package/dist/chunk-B7L24VPX.cjs +401 -0
  50. package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
  51. package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
  52. package/dist/{chunk-44G4XHEL.mjs → chunk-BJWJP5A4.mjs} +9 -9
  53. package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
  54. package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
  55. package/dist/chunk-C5QHZ626.cjs +85 -0
  56. package/dist/{chunk-X4TSMQWF.cjs → chunk-CL7BUGVB.cjs} +465 -360
  57. package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
  58. package/dist/{chunk-AXA2BSX3.cjs → chunk-CPZZBCPO.cjs} +22 -21
  59. package/dist/chunk-D2VAANBS.mjs +48 -0
  60. package/dist/{chunk-JGEN2FIT.mjs → chunk-D77OGI6X.mjs} +1 -1
  61. package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  62. package/dist/{chunk-ZPEZXQTM.cjs → chunk-E3HBD2K3.cjs} +2 -2
  63. package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  64. package/dist/chunk-EZYKV24V.mjs +385 -0
  65. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  66. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  67. package/dist/{chunk-5OAN7BG5.cjs → chunk-FYZD7DUS.cjs} +4 -4
  68. package/dist/{chunk-RQBGHHOQ.mjs → chunk-GY63XD6K.mjs} +1 -1
  69. package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
  70. package/dist/{chunk-MDEFTF63.mjs → chunk-HTNJ7A4D.mjs} +25 -28
  71. package/dist/chunk-I4WZRG73.mjs +54 -0
  72. package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
  73. package/dist/{chunk-V73Y4UBL.mjs → chunk-IM3UINTZ.mjs} +1 -1
  74. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  75. package/dist/{chunk-ZDYYZX73.mjs → chunk-IPG6B25T.mjs} +194 -89
  76. package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
  77. package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
  78. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  79. package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
  80. package/dist/{chunk-67MZTLTF.cjs → chunk-M6DAIE4T.cjs} +27 -1
  81. package/dist/{chunk-LVGB5PYK.cjs → chunk-MOGRRZMW.cjs} +17 -17
  82. package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
  83. package/dist/{chunk-GBW5DU7V.mjs → chunk-NOYKBGUK.mjs} +376 -277
  84. package/dist/{chunk-CCMP4JD2.cjs → chunk-NSLRK5DK.cjs} +1 -1
  85. package/dist/{chunk-WJ2O2MPP.cjs → chunk-OIWDEDUO.cjs} +394 -363
  86. package/dist/{chunk-K3XKEZR6.mjs → chunk-ONSZP5JK.mjs} +1 -1
  87. package/dist/{chunk-SDICLSQU.cjs → chunk-OUDNUFVR.cjs} +10 -10
  88. package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
  89. package/dist/{chunk-EG5YBYHO.mjs → chunk-POL5RCVU.mjs} +1 -1
  90. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  91. package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
  92. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  93. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  94. package/dist/{chunk-3JQBQG7K.mjs → chunk-RZ6XUEQS.mjs} +2 -2
  95. package/dist/{chunk-QHAISITM.mjs → chunk-S3IWDDQ3.mjs} +1 -1
  96. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  97. package/dist/{chunk-YN3YMSKD.mjs → chunk-TLSGRK7E.mjs} +3 -3
  98. package/dist/chunk-UDMBUTJD.mjs +85 -0
  99. package/dist/{chunk-NJ4OASLP.mjs → chunk-UF4BNKKJ.mjs} +1 -1
  100. package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
  101. package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  102. package/dist/chunk-VS7HLH4S.cjs +385 -0
  103. package/dist/{chunk-ANZLZNNX.cjs → chunk-W6C3LEXX.cjs} +3 -3
  104. package/dist/chunk-WMRGIQTA.cjs +48 -0
  105. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  106. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  107. package/dist/{chunk-TS3ZHJN5.cjs → chunk-XOGCNKB7.cjs} +3 -3
  108. package/dist/{chunk-KEU55O2D.mjs → chunk-XOXCQGAF.mjs} +7 -6
  109. package/dist/{chunk-4MIDUSIX.mjs → chunk-YH7ENV3K.mjs} +14 -14
  110. package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
  111. package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
  112. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  113. package/dist/{chunk-DVHFIETW.cjs → chunk-ZIYJWJV2.cjs} +13 -13
  114. package/dist/{chunk-Z4SMFUZ7.cjs → chunk-ZKNXCRUQ.cjs} +7 -7
  115. package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-D8O1v2_X.d.mts} +5 -5
  116. package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-hf4L1MNP.d.ts} +5 -5
  117. package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-CX8UCQh-.d.ts} +1 -1
  118. package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DFwUHlOz.d.mts} +1 -1
  119. package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-BflSNO-b.d.mts} +2 -13
  120. package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-qWp8hNwd.d.ts} +2 -13
  121. package/dist/client-plugins.d.mts +2 -1
  122. package/dist/client-plugins.d.ts +2 -1
  123. package/dist/client.cjs +9 -8
  124. package/dist/client.d.mts +20 -151
  125. package/dist/client.d.ts +20 -151
  126. package/dist/client.mjs +8 -7
  127. package/dist/config.d.mts +2 -1
  128. package/dist/config.d.ts +2 -1
  129. package/dist/desktop.d.mts +3 -2
  130. package/dist/desktop.d.ts +3 -2
  131. package/dist/{devtools-JJOYTIMS.cjs → devtools-EI5N366Z.cjs} +9 -9
  132. package/dist/{devtools-F3FDFV26.mjs → devtools-XJHODO5H.mjs} +7 -7
  133. package/dist/docs.cjs +9 -9
  134. package/dist/docs.d.mts +4 -3
  135. package/dist/docs.d.ts +4 -3
  136. package/dist/docs.mjs +8 -8
  137. package/dist/environment/vite.cjs +7 -6
  138. package/dist/environment/vite.mjs +6 -5
  139. package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-C2oRihfa.d.ts} +1 -1
  140. package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-DoH5Krkq.d.mts} +1 -1
  141. package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-BrX53wFQ.d.mts} +1 -1
  142. package/dist/{headers.d-CAW4wPey.d.ts → headers.d-Dj0mfYpb.d.ts} +1 -1
  143. package/dist/index.cjs +58 -56
  144. package/dist/{index.d-ah2c89Wu.d.ts → index.d-Dhc2scRl.d.ts} +1 -1
  145. package/dist/{index.d-BEVK61zS.d.mts → index.d-DzDHOttz.d.mts} +1 -1
  146. package/dist/index.d.mts +25 -23
  147. package/dist/index.d.ts +25 -23
  148. package/dist/index.mjs +62 -60
  149. package/dist/instrumentation.cjs +3 -3
  150. package/dist/instrumentation.mjs +2 -2
  151. package/dist/integrations/orm.d.mts +2 -1
  152. package/dist/integrations/orm.d.ts +2 -1
  153. package/dist/integrations.d.mts +2 -1
  154. package/dist/integrations.d.ts +2 -1
  155. package/dist/internal/app-markdown-runtime.cjs +2 -2
  156. package/dist/internal/app-markdown-runtime.d.mts +12 -5
  157. package/dist/internal/app-markdown-runtime.d.ts +12 -5
  158. package/dist/internal/app-markdown-runtime.mjs +1 -1
  159. package/dist/internal/build-runtime.cjs +41 -40
  160. package/dist/internal/build-runtime.d.mts +5 -4
  161. package/dist/internal/build-runtime.d.ts +5 -4
  162. package/dist/internal/build-runtime.mjs +40 -39
  163. package/dist/internal/cli-runtime.cjs +19 -19
  164. package/dist/internal/cli-runtime.d.mts +8 -7
  165. package/dist/internal/cli-runtime.d.ts +8 -7
  166. package/dist/internal/cli-runtime.mjs +20 -20
  167. package/dist/internal/client-error-overlay.cjs +4 -4
  168. package/dist/internal/client-error-overlay.mjs +1 -1
  169. package/dist/internal/client-runtime.cjs +76 -15
  170. package/dist/internal/client-runtime.d.mts +18 -7
  171. package/dist/internal/client-runtime.d.ts +18 -7
  172. package/dist/internal/client-runtime.mjs +67 -6
  173. package/dist/internal/compression-runtime.d.mts +2 -1
  174. package/dist/internal/compression-runtime.d.ts +2 -1
  175. package/dist/internal/config-runtime.cjs +9 -9
  176. package/dist/internal/config-runtime.d.mts +4 -3
  177. package/dist/internal/config-runtime.d.ts +4 -3
  178. package/dist/internal/config-runtime.mjs +8 -8
  179. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  180. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  181. package/dist/internal/form-actions.cjs +3 -3
  182. package/dist/internal/form-actions.mjs +2 -2
  183. package/dist/internal/infra-analytics-runtime.cjs +7 -7
  184. package/dist/internal/infra-analytics-runtime.mjs +5 -5
  185. package/dist/internal/island-codec.cjs +3 -3
  186. package/dist/internal/island-codec.mjs +2 -2
  187. package/dist/internal/island-value-store.d.mts +1 -1
  188. package/dist/internal/island-value-store.d.ts +1 -1
  189. package/dist/internal/islands-boot.cjs +9 -3
  190. package/dist/internal/islands-boot.mjs +9 -3
  191. package/dist/internal/islands-runtime.cjs +10 -56
  192. package/dist/internal/islands-runtime.mjs +6 -52
  193. package/dist/internal/islands-server.cjs +4 -4
  194. package/dist/internal/islands-server.mjs +3 -3
  195. package/dist/internal/islx-actions-client.cjs +36 -0
  196. package/dist/internal/islx-actions-client.d.mts +13 -0
  197. package/dist/internal/islx-actions-client.d.ts +13 -0
  198. package/dist/internal/islx-actions-client.mjs +36 -0
  199. package/dist/internal/islx-actions-server.cjs +8 -0
  200. package/dist/internal/islx-actions-server.d.mts +6 -0
  201. package/dist/internal/islx-actions-server.d.ts +6 -0
  202. package/dist/internal/islx-actions-server.mjs +8 -0
  203. package/dist/internal/islx-client.d.mts +0 -4
  204. package/dist/internal/islx-client.d.ts +0 -4
  205. package/dist/internal/isolated-boundary.cjs +3 -3
  206. package/dist/internal/isolated-boundary.d.mts +1 -1
  207. package/dist/internal/isolated-boundary.d.ts +1 -1
  208. package/dist/internal/isolated-boundary.mjs +2 -2
  209. package/dist/internal/metadata-image-runtime.cjs +4 -2
  210. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  211. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  212. package/dist/internal/metadata-image-runtime.mjs +5 -3
  213. package/dist/internal/native-server-fns.cjs +5 -4
  214. package/dist/internal/native-server-fns.mjs +4 -3
  215. package/dist/internal/navigation-neutral.cjs +36 -0
  216. package/dist/internal/navigation-neutral.d.mts +14 -0
  217. package/dist/internal/navigation-neutral.d.ts +14 -0
  218. package/dist/internal/navigation-neutral.mjs +36 -0
  219. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  220. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  221. package/dist/internal/production-runtime.cjs +24 -24
  222. package/dist/internal/production-runtime.d.mts +11 -10
  223. package/dist/internal/production-runtime.d.ts +11 -10
  224. package/dist/internal/production-runtime.mjs +29 -29
  225. package/dist/internal/server-tree.cjs +5 -4
  226. package/dist/internal/server-tree.d.mts +3 -4
  227. package/dist/internal/server-tree.d.ts +3 -4
  228. package/dist/internal/server-tree.mjs +4 -3
  229. package/dist/internal/spa-router.cjs +3 -3
  230. package/dist/internal/spa-router.d.mts +4 -3
  231. package/dist/internal/spa-router.d.ts +4 -3
  232. package/dist/internal/spa-router.mjs +2 -2
  233. package/dist/internal/start-manifest.d.mts +2 -1
  234. package/dist/internal/start-manifest.d.ts +2 -1
  235. package/dist/internal/vercel-edge-middleware.cjs +1 -1
  236. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  237. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  238. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  239. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  240. package/dist/layers-XLOMMQP7.cjs +21 -0
  241. package/dist/markdown.d.mts +2 -1
  242. package/dist/markdown.d.ts +2 -1
  243. package/dist/middleware.cjs +5 -5
  244. package/dist/middleware.d.mts +2 -1
  245. package/dist/middleware.d.ts +2 -1
  246. package/dist/middleware.mjs +4 -4
  247. package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DOaeUoWq.d.mts} +1 -1
  248. package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-DwXjaOHY.d.ts} +1 -1
  249. package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
  250. package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
  251. package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-BElGUMgt.d.mts} +1 -1
  252. package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-o3pPd9VI.d.ts} +1 -1
  253. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  254. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  255. package/dist/navigation.cjs +6 -6
  256. package/dist/navigation.d.mts +7 -6
  257. package/dist/navigation.d.ts +7 -6
  258. package/dist/navigation.mjs +5 -5
  259. package/dist/{nitro-6UOJXJZ6.cjs → nitro-XGIO6EQN.cjs} +2 -2
  260. package/dist/{nitro-C3MYDX7V.mjs → nitro-YLTGVGK4.mjs} +1 -1
  261. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  262. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  263. package/dist/plugin.cjs +32 -30
  264. package/dist/plugin.d.mts +6 -5
  265. package/dist/plugin.d.ts +6 -5
  266. package/dist/plugin.mjs +31 -29
  267. package/dist/query/client.cjs +10 -10
  268. package/dist/query/client.mjs +5 -5
  269. package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BD06tqFA.d.ts} +1 -1
  270. package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-xWCRAJeR.d.mts} +1 -1
  271. package/dist/renderer/none/server.cjs +5 -1
  272. package/dist/renderer/none/server.d.mts +3 -1
  273. package/dist/renderer/none/server.d.ts +3 -1
  274. package/dist/renderer/none/server.mjs +4 -0
  275. package/dist/renderer/react/server.cjs +6 -6
  276. package/dist/renderer/react/server.mjs +3 -3
  277. package/dist/renderer-client.cjs +34 -15
  278. package/dist/renderer-client.d.mts +13 -97
  279. package/dist/renderer-client.d.ts +13 -97
  280. package/dist/renderer-client.mjs +23 -4
  281. package/dist/renderer.cjs +4 -2
  282. package/dist/renderer.d.mts +33 -5
  283. package/dist/renderer.d.ts +33 -5
  284. package/dist/renderer.mjs +3 -1
  285. package/dist/{request.d-CE0FIkiM.d.ts → request.d-DUMuWxSN.d.ts} +1 -1
  286. package/dist/{request.d-RCnCBuWq.d.mts → request.d-Dx82V8bz.d.mts} +1 -1
  287. package/dist/request.d.mts +3 -2
  288. package/dist/request.d.ts +3 -2
  289. package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BwBVpLtD.d.ts} +1 -1
  290. package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-DJh6GauM.d.mts} +1 -1
  291. package/dist/{router.d-D8Vvwl4i.d.mts → router.d-BtkKDxUB.d.mts} +1 -1
  292. package/dist/{router.d-BU_WE6Ol.d.ts → router.d-CJBSG5jr.d.ts} +1 -1
  293. package/dist/routes.cjs +1 -1
  294. package/dist/routes.d.mts +2 -1
  295. package/dist/routes.d.ts +2 -1
  296. package/dist/routes.mjs +1 -1
  297. package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-GD6KLOIG.mjs} +13 -13
  298. package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-H5AXQA7A.cjs} +14 -14
  299. package/dist/{runtime-SQFRHRGJ.mjs → runtime-OJ7FXFUI.mjs} +13 -13
  300. package/dist/{runtime-WZ3CHHGJ.cjs → runtime-YWQVBC3V.cjs} +15 -15
  301. package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-BQnD0cfC.d.ts} +1 -1
  302. package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-C4SuZXf6.d.mts} +1 -1
  303. package/dist/server-action-security.cjs +1 -1
  304. package/dist/server-action-security.mjs +1 -1
  305. package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-9rH7ZoEq.d.mts} +1 -1
  306. package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-rfKOcE0N.d.ts} +1 -1
  307. package/dist/server-fn.cjs +3 -3
  308. package/dist/server-fn.mjs +2 -2
  309. package/dist/server-plugins.cjs +1 -1
  310. package/dist/server-plugins.d.mts +4 -3
  311. package/dist/server-plugins.d.ts +4 -3
  312. package/dist/server-plugins.mjs +1 -1
  313. package/dist/server-query.cjs +4 -4
  314. package/dist/server-query.mjs +3 -3
  315. package/dist/server.cjs +64 -59
  316. package/dist/server.d.mts +12 -11
  317. package/dist/server.d.ts +12 -11
  318. package/dist/server.mjs +45 -40
  319. package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-DMKiBsHH.d.ts} +3 -3
  320. package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-V6XLSTCy.d.mts} +3 -3
  321. package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-BnCKPQL0.d.mts} +2 -2
  322. package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-MNedvvMB.d.ts} +2 -2
  323. package/dist/store-core.d-Ad5biajo.d.ts +301 -0
  324. package/dist/store-core.d-BqJI1-ix.d.mts +301 -0
  325. package/dist/testing.cjs +3 -3
  326. package/dist/testing.d.mts +2 -1
  327. package/dist/testing.d.ts +2 -1
  328. package/dist/testing.mjs +3 -3
  329. package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-BEKLWa0Z.d.mts} +1 -1
  330. package/dist/{utils.d-_dvevm5s.d.ts → utils.d-BdjHKDuT.d.ts} +1 -1
  331. package/dist/version.cjs +2 -2
  332. package/dist/version.mjs +1 -1
  333. package/dist/vite.cjs +34 -30
  334. package/dist/vite.d.mts +18 -7
  335. package/dist/vite.d.ts +18 -7
  336. package/dist/vite.mjs +33 -29
  337. package/dist/workflows.cjs +2 -2
  338. package/dist/workflows.mjs +1 -1
  339. package/package.json +17 -2
  340. package/dist/analyzer-I7RBBQ65.cjs +0 -16
  341. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  342. package/dist/chunk-HONTCUK6.mjs +0 -203
  343. package/dist/chunk-K6PGK7DC.cjs +0 -203
  344. package/dist/chunk-NBIVGHAT.mjs +0 -50
  345. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  346. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  347. package/dist/layers-HMEGUEXM.cjs +0 -21
  348. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  349. package/dist/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
  350. package/dist/{chunk-KKVRWNDH.mjs → chunk-6WVRVGKC.mjs} +3 -3
  351. package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
  352. package/dist/{chunk-MQOHYV6L.cjs → chunk-LKIG5SM6.cjs} +2 -2
  353. package/dist/{chunk-UWOCYINY.cjs → chunk-OFVCWV2D.cjs} +2 -2
  354. package/dist/{chunk-3K2E55BJ.mjs → chunk-OO4GVGM3.mjs} +3 -3
  355. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  356. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  357. package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
  358. package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
@@ -41,7 +41,9 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
41
41
 
42
42
 
43
43
 
44
- var _chunkX4TSMQWFcjs = require('./chunk-X4TSMQWF.cjs');
44
+
45
+
46
+ var _chunkCL7BUGVBcjs = require('./chunk-CL7BUGVB.cjs');
45
47
 
46
48
 
47
49
 
@@ -52,11 +54,11 @@ var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
52
54
  var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
53
55
 
54
56
 
55
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
56
57
 
58
+ var _chunkOUDNUFVRcjs = require('./chunk-OUDNUFVR.cjs');
57
59
 
58
60
 
59
- var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
61
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
60
62
 
61
63
 
62
64
 
@@ -65,7 +67,7 @@ var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
65
67
 
66
68
 
67
69
 
68
- var _chunkUWOCYINYcjs = require('./chunk-UWOCYINY.cjs');
70
+ var _chunkOFVCWV2Dcjs = require('./chunk-OFVCWV2D.cjs');
69
71
 
70
72
 
71
73
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
@@ -83,13 +85,13 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
83
85
 
84
86
 
85
87
 
86
- var _chunk5OAN7BG5cjs = require('./chunk-5OAN7BG5.cjs');
88
+ var _chunkFYZD7DUScjs = require('./chunk-FYZD7DUS.cjs');
87
89
 
88
90
 
89
91
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
90
92
 
91
93
 
92
- var _chunkXY5OZQF6cjs = require('./chunk-XY5OZQF6.cjs');
94
+ var _chunkADQ2LATRcjs = require('./chunk-ADQ2LATR.cjs');
93
95
 
94
96
 
95
97
 
@@ -140,7 +142,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
140
142
 
141
143
 
142
144
 
143
- var _chunkZVSQN7NCcjs = require('./chunk-ZVSQN7NC.cjs');
145
+ var _chunk46UV2E7Icjs = require('./chunk-46UV2E7I.cjs');
144
146
 
145
147
 
146
148
 
@@ -175,17 +177,17 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
175
177
 
176
178
 
177
179
 
180
+ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
178
181
 
179
182
 
180
183
 
181
184
 
182
185
 
183
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
184
186
 
185
187
 
186
188
 
187
189
 
188
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
190
+ var _chunkM6DAIE4Tcjs = require('./chunk-M6DAIE4T.cjs');
189
191
 
190
192
 
191
193
 
@@ -197,7 +199,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
197
199
 
198
200
 
199
201
 
200
- var _chunkQ4TRGTO7cjs = require('./chunk-Q4TRGTO7.cjs');
202
+ var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
201
203
 
202
204
 
203
205
 
@@ -223,7 +225,7 @@ var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
223
225
  var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
224
226
 
225
227
 
226
- var _chunk2FK47RRZcjs = require('./chunk-2FK47RRZ.cjs');
228
+ var _chunkVGHDPEPQcjs = require('./chunk-VGHDPEPQ.cjs');
227
229
 
228
230
 
229
231
 
@@ -239,7 +241,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
239
241
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
240
242
 
241
243
 
242
- var _chunkMQOHYV6Lcjs = require('./chunk-MQOHYV6L.cjs');
244
+ var _chunkLKIG5SM6cjs = require('./chunk-LKIG5SM6.cjs');
243
245
 
244
246
 
245
247
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -302,7 +304,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
302
304
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
303
305
 
304
306
 
305
- var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
307
+ var _chunkNSLRK5DKcjs = require('./chunk-NSLRK5DK.cjs');
306
308
 
307
309
 
308
310
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -364,7 +366,10 @@ function transformFarmFormActionModule(options) {
364
366
  root: options.root,
365
367
  environment: options.ssr ? "server" : "client",
366
368
  parse: options.parse,
367
- runtime: {
369
+ runtime: options.runtime === "renderer" ? {
370
+ server: runtimeModule("@farm.js/core/internal/islx-actions-server"),
371
+ client: runtimeModule("@farm.js/core/internal/islx-actions-client")
372
+ } : {
368
373
  server: runtimeModule("@farm.js/core/internal/islx-server"),
369
374
  client: runtimeModule("@farm.js/core/internal/islx-client")
370
375
  }
@@ -701,7 +706,7 @@ function findClientServerFnViolation(code, id) {
701
706
  return null;
702
707
  }
703
708
  function createServerFnBoundaryDiagnostic(violation, id, location) {
704
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
709
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
705
710
  "CLIENT_SERVER_FUNCTION",
706
711
  id,
707
712
  `${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.`,
@@ -960,21 +965,21 @@ function readPropertyKey(property) {
960
965
  function createClientBoundaryDiagnostic(file, finding, location) {
961
966
  switch (finding.kind) {
962
967
  case "server-env":
963
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
968
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
964
969
  "CLIENT_SERVER_ENV",
965
970
  file,
966
971
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
967
972
  location
968
973
  );
969
974
  case "public-env":
970
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
975
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
971
976
  "CLIENT_PROCESS_ENV_PUBLIC",
972
977
  file,
973
978
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
974
979
  location
975
980
  );
976
981
  case "builtin":
977
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
982
+ return _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
978
983
  "CLIENT_NODE_BUILTIN",
979
984
  file,
980
985
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1276,7 +1281,7 @@ function loadFarmWorkflowsDevRuntime() {
1276
1281
  return import("./workflows.cjs");
1277
1282
  }
1278
1283
  function loadFarmDevtoolsSnapshotRuntime() {
1279
- return import("./devtools-JJOYTIMS.cjs");
1284
+ return import("./devtools-EI5N366Z.cjs");
1280
1285
  }
1281
1286
  function loadFarmDevtoolsUIRuntime() {
1282
1287
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1300,6 +1305,25 @@ function farmI18nClientBridgePlugin() {
1300
1305
  }
1301
1306
  };
1302
1307
  }
1308
+ 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";
1310
+ return {
1311
+ name: "farm:navigation",
1312
+ config() {
1313
+ if (!otherRenderer) return;
1314
+ return {
1315
+ resolve: {
1316
+ alias: [
1317
+ {
1318
+ find: /^@farm\.js\/core\/navigation$/,
1319
+ replacement: "@farm.js/core/internal/navigation-neutral"
1320
+ }
1321
+ ]
1322
+ }
1323
+ };
1324
+ }
1325
+ };
1326
+ }
1303
1327
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
1304
1328
  var SERVER_ONLY_PACKAGE = "server-only";
1305
1329
  var farmReactServerFiles = /* @__PURE__ */ new Set();
@@ -1307,16 +1331,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1307
1331
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1308
1332
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1309
1333
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1310
- _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1311
- new RegExp(`^${_chunkZVSQN7NCcjs.FARM_RESOLVE_FROM_PREFIX}`),
1334
+ _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1335
+ new RegExp(`^${_chunk46UV2E7Icjs.FARM_RESOLVE_FROM_PREFIX}`),
1312
1336
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1313
1337
  // included.
1314
1338
  /^node:/,
1315
- _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, _module.builtinModules)
1339
+ _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, _module.builtinModules)
1316
1340
  ];
1317
1341
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1318
- _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1319
- new RegExp(`^${_chunkZVSQN7NCcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1342
+ _chunkCL7BUGVBcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1343
+ new RegExp(`^${_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1320
1344
  ];
1321
1345
  function createFarmPlatformClientModule(platform) {
1322
1346
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1346,24 +1370,24 @@ function farmIslandContainersPlugin(config) {
1346
1370
  root = config.root || resolved.root;
1347
1371
  },
1348
1372
  transform(code, id) {
1349
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _69 => _69.experimental, 'optionalAccess', _70 => _70.serverComponents])) !== "islands") {
1373
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1350
1374
  return null;
1351
1375
  }
1352
1376
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1353
1377
  return null;
1354
1378
  }
1355
- if (_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, code)) return null;
1379
+ if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, code)) return null;
1356
1380
  const file = id.split("?", 1)[0];
1357
- const bindings = _chunkZVSQN7NCcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1381
+ const bindings = _chunk46UV2E7Icjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1358
1382
  if (bindings.length === 0) return null;
1359
- const grown = _chunkZVSQN7NCcjs.wrapFarmIslandContainers.call(void 0, {
1383
+ const grown = _chunk46UV2E7Icjs.wrapFarmIslandContainers.call(void 0, {
1360
1384
  code,
1361
1385
  file,
1362
1386
  bindings,
1363
- reference: _chunkZVSQN7NCcjs.farmIslandContainerReferencePath.call(void 0, root)
1387
+ reference: _chunk46UV2E7Icjs.farmIslandContainerReferencePath.call(void 0, root)
1364
1388
  });
1365
1389
  if (grown === null) return null;
1366
- _chunkZVSQN7NCcjs.ensureFarmIslandContainerReference.call(void 0, root);
1390
+ _chunk46UV2E7Icjs.ensureFarmIslandContainerReference.call(void 0, root);
1367
1391
  return { code: grown, map: null };
1368
1392
  }
1369
1393
  };
@@ -1377,15 +1401,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1377
1401
  config(config) {
1378
1402
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1379
1403
  if (options.distDir) {
1380
- _chunkZVSQN7NCcjs.usePackageScanCacheFile.call(void 0,
1404
+ _chunk46UV2E7Icjs.usePackageScanCacheFile.call(void 0,
1381
1405
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1382
1406
  );
1383
1407
  }
1384
- const bundledPackages = _chunkZVSQN7NCcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1408
+ const bundledPackages = _chunk46UV2E7Icjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1385
1409
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1386
- _chunkZVSQN7NCcjs.persistPackageScanCache.call(void 0, );
1410
+ _chunk46UV2E7Icjs.persistPackageScanCache.call(void 0, );
1387
1411
  return {
1388
- optimizeDeps: { rolldownOptions: { plugins: [_chunkZVSQN7NCcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1412
+ optimizeDeps: { rolldownOptions: { plugins: [_chunk46UV2E7Icjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1389
1413
  ssr: {
1390
1414
  noExternal: [
1391
1415
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1403,14 +1427,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1403
1427
  resolveId: {
1404
1428
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1405
1429
  handler(id, importer, options2) {
1406
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _71 => _71.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1430
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1407
1431
  if (id === SERVER_ONLY_PACKAGE) {
1408
- if (_optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) || _optionalChain([options2, 'optionalAccess', _73 => _73.scan])) {
1432
+ if (_optionalChain([options2, 'optionalAccess', _73 => _73.ssr]) || _optionalChain([options2, 'optionalAccess', _74 => _74.scan])) {
1409
1433
  return FARM_SERVER_ONLY_PACKAGE_ID;
1410
1434
  }
1411
1435
  this.error(
1412
- _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
1413
- _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
1436
+ _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1437
+ _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1414
1438
  "CLIENT_SERVER_ONLY_IMPORT",
1415
1439
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1416
1440
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1419,10 +1443,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1419
1443
  )
1420
1444
  );
1421
1445
  }
1422
- if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
1423
- return _chunkZVSQN7NCcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1446
+ if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1447
+ return _chunk46UV2E7Icjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1424
1448
  }
1425
- const resolveFrom = importer ? _chunkZVSQN7NCcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1449
+ const resolveFrom = importer ? _chunk46UV2E7Icjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1426
1450
  if (resolveFrom) {
1427
1451
  const directory = path6.dirname(resolveFrom.importer);
1428
1452
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1437,10 +1461,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1437
1461
  }
1438
1462
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1439
1463
  const importedBy = importer ? ` (imported by ${importer})` : "";
1440
- if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
1464
+ if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1441
1465
  this.error(
1442
- _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
1443
- _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
1466
+ _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
1467
+ _chunk46UV2E7Icjs.createFarmDiagnostic.call(void 0,
1444
1468
  "CLIENT_SERVER_ONLY_ENTRY",
1445
1469
  _nullishCoalesce(importer, () => ( id)),
1446
1470
  `${id} is server-only and cannot be imported into client code.`
@@ -1465,7 +1489,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1465
1489
  if (id === FARM_PLATFORM_CLIENT_ID) {
1466
1490
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1467
1491
  }
1468
- return _nullishCoalesce(_chunkZVSQN7NCcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1492
+ return _nullishCoalesce(_chunk46UV2E7Icjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1469
1493
  }
1470
1494
  }
1471
1495
  };
@@ -1498,10 +1522,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1498
1522
  if (!snapshot) return "";
1499
1523
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1500
1524
  if (snapshot.routing === "none") return runtime;
1501
- return `${_chunkUWOCYINYcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1525
+ return `${_chunkOFVCWV2Dcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1502
1526
  }
1503
1527
  function getPublicEnvDefine(config) {
1504
- const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
1528
+ const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
1505
1529
  if (!isResolvedEnvScope(publicEnv)) {
1506
1530
  return {};
1507
1531
  }
@@ -1540,7 +1564,7 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1540
1564
  return;
1541
1565
  }
1542
1566
  if (res.headersSent) {
1543
- _optionalChain([res, 'access', _78 => _78.destroy, 'optionalCall', _79 => _79(error instanceof Error ? error : new Error(String(error)))]);
1567
+ _optionalChain([res, 'access', _79 => _79.destroy, 'optionalCall', _80 => _80(error instanceof Error ? error : new Error(String(error)))]);
1544
1568
  return;
1545
1569
  }
1546
1570
  res.statusCode = 500;
@@ -1676,7 +1700,7 @@ function interceptFarmDevPageResponse(options) {
1676
1700
  const originalWrite = res.write.bind(res);
1677
1701
  const originalEnd = res.end.bind(res);
1678
1702
  const originalWriteHead = res.writeHead.bind(res);
1679
- const originalFlushHeaders = _optionalChain([res, 'access', _80 => _80.flushHeaders, 'optionalAccess', _81 => _81.bind, 'call', _82 => _82(res)]);
1703
+ const originalFlushHeaders = _optionalChain([res, 'access', _81 => _81.flushHeaders, 'optionalAccess', _82 => _82.bind, 'call', _83 => _83(res)]);
1680
1704
  let afterResponseCalled = false;
1681
1705
  let interceptedEnd = false;
1682
1706
  const restore = () => {
@@ -1738,7 +1762,7 @@ function interceptFarmDevPageResponse(options) {
1738
1762
  ).then(async (runtimeResponse) => {
1739
1763
  applyWebResponseToNodeResponse(runtimeResponse, res);
1740
1764
  if (!res.headersSent) originalWriteHead(res.statusCode);
1741
- _optionalChain([originalFlushHeaders, 'optionalCall', _83 => _83()]);
1765
+ _optionalChain([originalFlushHeaders, 'optionalCall', _84 => _84()]);
1742
1766
  if (!runtimeResponse.body) return;
1743
1767
  const reader = runtimeResponse.body.getReader();
1744
1768
  for (; ; ) {
@@ -1787,7 +1811,7 @@ function interceptFarmDevPageResponse(options) {
1787
1811
  if (streamsThroughRuntime()) {
1788
1812
  streamRuntimeChunk(bufferChunk);
1789
1813
  const callback = args.find((arg) => typeof arg === "function");
1790
- _optionalChain([callback, 'optionalCall', _84 => _84()]);
1814
+ _optionalChain([callback, 'optionalCall', _85 => _85()]);
1791
1815
  return true;
1792
1816
  }
1793
1817
  if (isHtmlResponse && bufferChunk) {
@@ -1799,7 +1823,7 @@ function interceptFarmDevPageResponse(options) {
1799
1823
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1800
1824
  if (shouldBufferResponse) {
1801
1825
  const callback = args.find((arg) => typeof arg === "function");
1802
- _optionalChain([callback, 'optionalCall', _85 => _85()]);
1826
+ _optionalChain([callback, 'optionalCall', _86 => _86()]);
1803
1827
  return true;
1804
1828
  }
1805
1829
  const writeResult = originalWrite(chunk, ...args);
@@ -1946,18 +1970,18 @@ function getEnvDefines(config, configEnv) {
1946
1970
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1947
1971
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1948
1972
  config.images,
1949
- _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1973
+ _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1950
1974
  )
1951
1975
  )
1952
1976
  )
1953
1977
  };
1954
- if (_optionalChain([configEnv, 'optionalAccess', _86 => _86.isSsrBuild])) {
1978
+ if (_optionalChain([configEnv, 'optionalAccess', _87 => _87.isSsrBuild])) {
1955
1979
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1956
1980
  }
1957
1981
  return defines;
1958
1982
  }
1959
1983
  function getFarmAPIBaseURLDefine(config) {
1960
- const baseURL = _optionalChain([config, 'access', _87 => _87.api, 'optionalAccess', _88 => _88.baseURL]);
1984
+ const baseURL = _optionalChain([config, 'access', _88 => _88.api, 'optionalAccess', _89 => _89.baseURL]);
1961
1985
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1962
1986
  }
1963
1987
  function isResolvedEnvScope(value) {
@@ -2079,7 +2103,7 @@ function transformIsolatedClientBoundaryModule(options) {
2079
2103
  return null;
2080
2104
  }
2081
2105
  const body = Array.isArray(ast.body) ? ast.body : [];
2082
- const everyExportIsComponent = options.code.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2106
+ const everyExportIsComponent = options.code.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2083
2107
  const replacements = [];
2084
2108
  const wrapperStatements = [];
2085
2109
  const originalEntries = [];
@@ -2098,9 +2122,9 @@ function transformIsolatedClientBoundaryModule(options) {
2098
2122
  transformedExports++;
2099
2123
  };
2100
2124
  for (const node of body) {
2101
- if (_optionalChain([node, 'optionalAccess', _89 => _89.type]) === "ExportDefaultDeclaration" && node.declaration) {
2125
+ if (_optionalChain([node, 'optionalAccess', _90 => _90.type]) === "ExportDefaultDeclaration" && node.declaration) {
2102
2126
  const declaration2 = node.declaration;
2103
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _90 => _90.id, 'optionalAccess', _91 => _91.name])) {
2127
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.name])) {
2104
2128
  replacements.push({
2105
2129
  start: node.start,
2106
2130
  end: node.end,
@@ -2118,11 +2142,11 @@ function transformIsolatedClientBoundaryModule(options) {
2118
2142
  }
2119
2143
  continue;
2120
2144
  }
2121
- if (_optionalChain([node, 'optionalAccess', _92 => _92.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2145
+ if (_optionalChain([node, 'optionalAccess', _93 => _93.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2122
2146
  const specifiers = (node.specifiers || []).filter(
2123
2147
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
2124
2148
  );
2125
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _93 => _93.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.value]), () => ( "")))));
2149
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _95 => _95.value]), () => ( "")))));
2126
2150
  const isComponentExport = (specifier) => {
2127
2151
  const exported = specifierName(specifier.exported);
2128
2152
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -2149,14 +2173,14 @@ function transformIsolatedClientBoundaryModule(options) {
2149
2173
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
2150
2174
  continue;
2151
2175
  }
2152
- if (_optionalChain([node, 'optionalAccess', _95 => _95.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2176
+ if (_optionalChain([node, 'optionalAccess', _96 => _96.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2153
2177
  const declaration = node.declaration;
2154
2178
  const declaredNames = [];
2155
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _96 => _96.id, 'optionalAccess', _97 => _97.name])) {
2179
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _97 => _97.id, 'optionalAccess', _98 => _98.name])) {
2156
2180
  declaredNames.push(declaration.id.name);
2157
2181
  } else if (declaration.type === "VariableDeclaration") {
2158
2182
  for (const declarator of declaration.declarations || []) {
2159
- if (_optionalChain([declarator, 'access', _98 => _98.id, 'optionalAccess', _99 => _99.type]) === "Identifier") declaredNames.push(declarator.id.name);
2183
+ if (_optionalChain([declarator, 'access', _99 => _99.id, 'optionalAccess', _100 => _100.type]) === "Identifier") declaredNames.push(declarator.id.name);
2160
2184
  }
2161
2185
  }
2162
2186
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -2225,21 +2249,21 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2225
2249
  } catch (e20) {
2226
2250
  return;
2227
2251
  }
2228
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _100 => _100.env, 'optionalAccess', _101 => _101.public]), () => ( {}))));
2252
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _101 => _101.env, 'optionalAccess', _102 => _102.public]), () => ( {}))));
2229
2253
  const findings = [];
2230
2254
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2231
2255
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2232
2256
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2233
- if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkZVSQN7NCcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2257
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunk46UV2E7Icjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2234
2258
  }
2235
2259
  findings.push(finding);
2236
2260
  }
2237
2261
  if (findings.length === 0) return;
2238
2262
  warnedClientBoundaryIds.add(id);
2239
- const locate = _chunkZVSQN7NCcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2263
+ const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2240
2264
  _chunk7U4XF76Rcjs.logger.warn(
2241
2265
  findings.map(
2242
- (finding) => _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
2266
+ (finding) => _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
2243
2267
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2244
2268
  config.root
2245
2269
  )
@@ -2256,7 +2280,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2256
2280
  );
2257
2281
  }
2258
2282
  function shouldEmitFarmClientRootHmr(renderer) {
2259
- return _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2283
+ return _chunkM6DAIE4Tcjs.getFarmRendererCapabilities.call(void 0, _chunkM6DAIE4Tcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2260
2284
  }
2261
2285
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2262
2286
  function toFarmRuntimeModuleId(specifier) {
@@ -2287,23 +2311,23 @@ function hasFarmSourceAliasOverride(alias) {
2287
2311
  );
2288
2312
  }
2289
2313
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2290
- const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2314
+ const rendererDisabled = _chunkM6DAIE4Tcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2291
2315
  const imageImports = farmImageImportsPlugin();
2292
- const fontImports = _chunkX4TSMQWFcjs.farmFontImportsPlugin.call(void 0, {
2316
+ const fontImports = _chunkCL7BUGVBcjs.farmFontImportsPlugin.call(void 0, {
2293
2317
  root: options.root,
2294
2318
  basePath: options.basePath,
2295
2319
  publicDir: options.publicDir
2296
2320
  });
2297
2321
  let farmApp;
2298
2322
  const isFarmGeneratedOutput = (file) => {
2299
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _105 => _105.getConfig, 'call', _106 => _106(), 'access', _107 => _107.root]), () => ( options.root));
2323
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _106 => _106.getConfig, 'call', _107 => _107(), 'access', _108 => _108.root]), () => ( options.root));
2300
2324
  if (!root) return file.includes("/.farm/");
2301
2325
  const output = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2302
2326
  return file === output || file.startsWith(`${output}/`);
2303
2327
  };
2304
2328
  let serverFnTransformActive = false;
2305
2329
  const getFarmRenderedServerModules = () => {
2306
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _108 => _108.getRouteManager, 'call', _109 => _109()]);
2330
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _109 => _109.getRouteManager, 'call', _110 => _110()]);
2307
2331
  if (!routeManager) return /* @__PURE__ */ new Set();
2308
2332
  const files = /* @__PURE__ */ new Set();
2309
2333
  for (const entries of [
@@ -2323,10 +2347,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2323
2347
  if (mdxComponents) files.add(mdxComponents);
2324
2348
  return files;
2325
2349
  };
2326
- const islandsServerFns = () => {
2327
- const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options));
2328
- return _optionalChain([config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _114 => _114.experimental, 'optionalAccess', _115 => _115.serverComponents])) === "islands";
2329
- };
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)));
2330
2352
  let reactRefreshActive = false;
2331
2353
  let server;
2332
2354
  let deferredGates;
@@ -2355,9 +2377,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2355
2377
  ].join(" ");
2356
2378
  console.log(log);
2357
2379
  };
2358
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _116 => _116.getRouteManager, 'call', _117 => _117(), 'access', _118 => _118.getProgrammaticClientRoutes, 'call', _119 => _119()])));
2380
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _115 => _115.getRouteManager, 'call', _116 => _116(), 'access', _117 => _117.getProgrammaticClientRoutes, 'call', _118 => _118()])));
2359
2381
  const isOutsideAppRoot = (file) => {
2360
- const root = _optionalChain([farmApp, 'optionalAccess', _120 => _120.getConfig, 'call', _121 => _121(), 'access', _122 => _122.root]) || _optionalChain([server, 'optionalAccess', _123 => _123.config, 'access', _124 => _124.root]) || options.root;
2382
+ const root = _optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120(), 'access', _121 => _121.root]) || _optionalChain([server, 'optionalAccess', _122 => _122.config, 'access', _123 => _123.root]) || options.root;
2361
2383
  if (!root) return false;
2362
2384
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2363
2385
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2368,15 +2390,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2368
2390
  config(userConfig, configEnv) {
2369
2391
  isBuild = configEnv.command === "build";
2370
2392
  const farmAliases = {
2371
- ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, options.layers),
2372
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2393
+ ..._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)
2373
2395
  };
2374
2396
  if (Object.keys(farmAliases).length > 0) {
2375
2397
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2376
- userConfig.resolve.alias = _chunkX4TSMQWFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2398
+ userConfig.resolve.alias = _chunkCL7BUGVBcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2377
2399
  }
2378
2400
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2379
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
2401
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
2380
2402
  return {
2381
2403
  // Honor Farm's publicDir so the dev server serves the same static
2382
2404
  // directory the production client build emits.
@@ -2389,13 +2411,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2389
2411
  ...farmOwnsDevCors ? { cors: false } : {},
2390
2412
  fs: {
2391
2413
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2392
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _129 => _129.server, 'optionalAccess', _130 => _130.fs, 'optionalAccess', _131 => _131.deny]), options)
2414
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _128 => _128.server, 'optionalAccess', _129 => _129.fs, 'optionalAccess', _130 => _130.deny]), options)
2393
2415
  }
2394
2416
  }
2395
2417
  };
2396
2418
  },
2397
2419
  configEnvironment(name, environmentConfig, env) {
2398
- if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _132 => _132.dev, 'optionalAccess', _133 => _133.createEnvironment])) {
2420
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _131 => _131.dev, 'optionalAccess', _132 => _132.createEnvironment])) {
2399
2421
  return;
2400
2422
  }
2401
2423
  return {
@@ -2414,7 +2436,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2414
2436
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2415
2437
  );
2416
2438
  reactRefreshActive = _chunkY2FEFQAYcjs.isFarmReactRefreshActive.call(void 0, config);
2417
- if (_optionalChain([options, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2439
+ if (_optionalChain([options, 'access', _133 => _133.experimental, 'optionalAccess', _134 => _134.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2418
2440
  _chunk7U4XF76Rcjs.logger.warn(
2419
2441
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2420
2442
  );
@@ -2423,20 +2445,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2423
2445
  async configureServer(viteServer) {
2424
2446
  viteServer.middlewares.use(
2425
2447
  createFarmDevPreviewGuard(viteServer, {
2426
- getSourceRoots: () => _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _136 => _136.getConfig, 'call', _137 => _137()]), () => ( options)))
2448
+ getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _135 => _135.getConfig, 'call', _136 => _136()]), () => ( options)))
2427
2449
  })
2428
2450
  );
2429
2451
  if (typeof fontImports.configureServer === "function") {
2430
2452
  await fontImports.configureServer.call(this, viteServer);
2431
2453
  }
2432
2454
  server = viteServer;
2433
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _138 => _138.pre, 'access', _139 => _139.target]), () => ( viteServer.middlewares));
2434
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _140 => _140.post, 'access', _141 => _141.target]), () => ( viteServer.middlewares));
2455
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _137 => _137.pre, 'access', _138 => _138.target]), () => ( viteServer.middlewares));
2456
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _139 => _139.post, 'access', _140 => _140.target]), () => ( viteServer.middlewares));
2435
2457
  const pm = initialPluginManager;
2436
2458
  const configRoutePlugins = new Set(
2437
- _optionalChain([pm, 'optionalAccess', _142 => _142.getPlugins, 'call', _143 => _143(), 'access', _144 => _144.filter, 'call', _145 => _145(isFarmConfigRoutePlugin), 'access', _146 => _146.map, 'call', _147 => _147((plugin2) => plugin2.name)])
2459
+ _optionalChain([pm, 'optionalAccess', _141 => _141.getPlugins, 'call', _142 => _142(), 'access', _143 => _143.filter, 'call', _144 => _144(isFarmConfigRoutePlugin), 'access', _145 => _145.map, 'call', _146 => _146((plugin2) => plugin2.name)])
2438
2460
  );
2439
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _148 => _148.getPlugins, 'call', _149 => _149()]), () => ( []))).flatMap((plugin2) => {
2461
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _147 => _147.getPlugins, 'call', _148 => _148()]), () => ( []))).flatMap((plugin2) => {
2440
2462
  const matcher = _chunkH7OFZJCVcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2441
2463
  return matcher ? [matcher] : [];
2442
2464
  });
@@ -2447,7 +2469,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2447
2469
  } catch (e21) {
2448
2470
  }
2449
2471
  };
2450
- farmApp = new (0, _chunkX4TSMQWFcjs.FarmApp)(
2472
+ farmApp = new (0, _chunkCL7BUGVBcjs.FarmApp)(
2451
2473
  {
2452
2474
  ...options,
2453
2475
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2455,7 +2477,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2455
2477
  server
2456
2478
  );
2457
2479
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2458
- _chunkZVSQN7NCcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2480
+ _chunk46UV2E7Icjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2459
2481
  farmApp.getConfig().root,
2460
2482
  options.distDir || ".farm"
2461
2483
  )
@@ -2464,9 +2486,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2464
2486
  await farmApp.initialize();
2465
2487
  const farmConfig = farmApp.getConfig();
2466
2488
  let farmAppPackages;
2467
- if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
2489
+ if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2468
2490
  farmMiddlewares.use((_req, res, next) => {
2469
- if (_chunkXY5OZQF6cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2491
+ if (_chunkADQ2LATRcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2470
2492
  res.setHeader("X-Robots-Tag", _chunk4OFWG4IKcjs.FARM_PREVIEW_ROBOTS_TAG);
2471
2493
  }
2472
2494
  next();
@@ -2474,7 +2496,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2474
2496
  }
2475
2497
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2476
2498
  const devBuiltInRoutePaths = new Set(
2477
- _chunk5OAN7BG5cjs.listFarmBuiltInRoutePaths.call(void 0, {
2499
+ _chunkFYZD7DUScjs.listFarmBuiltInRoutePaths.call(void 0, {
2478
2500
  agent: {
2479
2501
  apiCatalog: true,
2480
2502
  mcp: true,
@@ -2496,7 +2518,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2496
2518
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2497
2519
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2498
2520
  // a caller-controlled Host header.
2499
- trustedLocalOrigin: () => _optionalChain([server, 'access', _152 => _152.resolvedUrls, 'optionalAccess', _153 => _153.local, 'access', _154 => _154[0]]),
2521
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _151 => _151.resolvedUrls, 'optionalAccess', _152 => _152.local, 'access', _153 => _153[0]]),
2500
2522
  onError(error) {
2501
2523
  _chunk7U4XF76Rcjs.logger.error(
2502
2524
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2504,7 +2526,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2504
2526
  }
2505
2527
  });
2506
2528
  }
2507
- const sourceRoots = _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, farmConfig);
2529
+ const sourceRoots = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, farmConfig);
2508
2530
  server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
2509
2531
  if (farmConfig.i18n.enabled) {
2510
2532
  server.watcher.add(
@@ -2516,15 +2538,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2516
2538
  const workflowConfig = farmConfig.workflows;
2517
2539
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2518
2540
  const getExtraRouteTypes = () => [
2519
- ..._optionalChain([options, 'access', _155 => _155.openapi, 'optionalAccess', _156 => _156.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2520
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _157 => _157.getFarmDocsRouteTypeEntries, 'call', _158 => _158(farmConfig.docs)]), () => ( []))
2541
+ ..._optionalChain([options, 'access', _154 => _154.openapi, 'optionalAccess', _155 => _155.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2542
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _156 => _156.getFarmDocsRouteTypeEntries, 'call', _157 => _157(farmConfig.docs)]), () => ( []))
2521
2543
  ];
2522
2544
  const appDirSlugs = sourceRoots.map(
2523
2545
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2524
2546
  );
2525
2547
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2526
2548
  try {
2527
- const result = await _chunkSDICLSQUcjs.generateFarmTypeArtifacts.call(void 0, {
2549
+ const result = await _chunkOUDNUFVRcjs.generateFarmTypeArtifacts.call(void 0, {
2528
2550
  root: farmConfig.root,
2529
2551
  srcDir: farmConfig.srcDir,
2530
2552
  layers: farmConfig.layers,
@@ -2565,10 +2587,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2565
2587
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2566
2588
  );
2567
2589
  const layerConfigFiles = new Set(
2568
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _159 => _159.configFile, 'optionalAccess', _160 => _160.replace, 'call', _161 => _161(/\\/g, "/")])).filter((file) => Boolean(file))
2590
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2569
2591
  );
2570
2592
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2571
- ..._chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2593
+ ..._chunkM6DAIE4Tcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2572
2594
  ".md",
2573
2595
  ".mdx"
2574
2596
  ]);
@@ -2638,7 +2660,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2638
2660
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2639
2661
  }
2640
2662
  if (isI18nCatalogFile(file)) {
2641
- _optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2663
+ _optionalChain([farmApp, 'optionalAccess', _161 => _161.getI18nRuntime, 'call', _162 => _162(), 'access', _163 => _163.reload, 'call', _164 => _164(), 'access', _165 => _165.then, 'call', _166 => _166(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _167 => _167.catch, 'call', _168 => _168((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2642
2664
  }
2643
2665
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2644
2666
  if (isRouteRefreshEvent) {
@@ -2650,8 +2672,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2650
2672
  queuedRouteFiles = void 0;
2651
2673
  try {
2652
2674
  await Promise.all([
2653
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
2654
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
2675
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _169 => _169(`${ev} ${file}`)]),
2676
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _170 => _170.reload, 'call', _171 => _171()]) : void 0
2655
2677
  ]);
2656
2678
  if (pendingRouteReloads.size === 1)
2657
2679
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2668,7 +2690,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2668
2690
  }
2669
2691
  });
2670
2692
  });
2671
- const appDirs = _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, farmConfig);
2693
+ const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, farmConfig);
2672
2694
  const routeManager = farmApp.getRouteManager();
2673
2695
  const discoveredRoutes = [];
2674
2696
  for (const [pattern, entry] of routeManager.getRoutes()) {
@@ -2700,14 +2722,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2700
2722
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2701
2723
  const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
2702
2724
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2703
- _optionalChain([server, 'access', _173 => _173.httpServer, 'optionalAccess', _174 => _174.once, 'call', _175 => _175("close", () => {
2725
+ _optionalChain([server, 'access', _172 => _172.httpServer, 'optionalAccess', _173 => _173.once, 'call', _174 => _174("close", () => {
2704
2726
  const globals = globalThis;
2705
2727
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2706
2728
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2707
2729
  }
2708
2730
  })]);
2709
2731
  }
2710
- apiRouteManager = new (0, _chunkMQOHYV6Lcjs.APIRouteManager)(appDirs, server, {
2732
+ apiRouteManager = new (0, _chunkLKIG5SM6cjs.APIRouteManager)(appDirs, server, {
2711
2733
  plugins: farmConfig.plugins,
2712
2734
  i18n: farmApp.getI18nRuntime(),
2713
2735
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2753,7 +2775,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2753
2775
  });
2754
2776
  }
2755
2777
  }
2756
- middlewareManager = new (0, _chunk2FK47RRZcjs.MiddlewareManager)(
2778
+ middlewareManager = new (0, _chunkVGHDPEPQcjs.MiddlewareManager)(
2757
2779
  appDirs,
2758
2780
  server,
2759
2781
  farmConfig.middleware,
@@ -2774,11 +2796,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2774
2796
  });
2775
2797
  }
2776
2798
  }
2777
- if (_optionalChain([options, 'access', _176 => _176.openapi, 'optionalAccess', _177 => _177.enabled])) {
2799
+ if (_optionalChain([options, 'access', _175 => _175.openapi, 'optionalAccess', _176 => _176.enabled])) {
2778
2800
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2779
2801
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2780
2802
  mode: "development",
2781
- apiBaseURL: typeof _optionalChain([options, 'access', _178 => _178.api, 'optionalAccess', _179 => _179.baseURL]) === "string" ? options.api.baseURL : void 0,
2803
+ apiBaseURL: typeof _optionalChain([options, 'access', _177 => _177.api, 'optionalAccess', _178 => _178.baseURL]) === "string" ? options.api.baseURL : void 0,
2782
2804
  routes: () => apiRouteManager.getRoutes().values(),
2783
2805
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2784
2806
  });
@@ -2809,7 +2831,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2809
2831
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2810
2832
  };
2811
2833
  releaseDocsMCPServers();
2812
- const isFarmDocsPathGuarded = (href) => _chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0,
2834
+ const isFarmDocsPathGuarded = (href) => _chunkOFVCWV2Dcjs.farmPathGuardCoversPage.call(void 0,
2813
2835
  {
2814
2836
  config: farmConfig,
2815
2837
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2822,20 +2844,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2822
2844
  clientEntry: "/@farm/client.js",
2823
2845
  resolveLayoutFonts: resolveDocsLayoutFonts,
2824
2846
  fontStylesheetHref: "/@farm/fonts.css",
2825
- globalStylesheetHref: _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2847
+ globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2826
2848
  farmConfig.root,
2827
2849
  farmConfig.srcDir
2828
2850
  ),
2829
2851
  loadModule: async (specifier) => {
2830
2852
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2831
- if (specifier === _optionalChain([farmConfig, 'access', _180 => _180.docs, 'access', _181 => _181.adapter, 'optionalAccess', _182 => _182.server]) && _optionalChain([resolved, 'optionalAccess', _183 => _183.id])) {
2853
+ if (specifier === _optionalChain([farmConfig, 'access', _179 => _179.docs, 'access', _180 => _180.adapter, 'optionalAccess', _181 => _181.server]) && _optionalChain([resolved, 'optionalAccess', _182 => _182.id])) {
2832
2854
  const file = resolved.id.split("?", 1)[0];
2833
2855
  return import(
2834
2856
  /* @vite-ignore */
2835
2857
  _url.pathToFileURL.call(void 0, file).href
2836
2858
  );
2837
2859
  }
2838
- return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _184 => _184.id]), () => ( specifier)));
2860
+ return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _183 => _183.id]), () => ( specifier)));
2839
2861
  },
2840
2862
  registerMCPServer: (mcpServer) => {
2841
2863
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2853,7 +2875,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2853
2875
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2854
2876
  resolveLayoutFonts: resolveDocsLayoutFonts,
2855
2877
  fontStylesheetHref: "/@farm/fonts.css",
2856
- globalStylesheetHref: _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2878
+ globalStylesheetHref: _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
2857
2879
  farmConfig.root,
2858
2880
  farmConfig.srcDir
2859
2881
  ),
@@ -2861,7 +2883,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2861
2883
  basePath: farmConfig.basePath
2862
2884
  }) : null;
2863
2885
  const farmDocsListsPages = Boolean(
2864
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _185 => _185.getPlugins, 'call', _186 => _186(), 'access', _187 => _187.some, 'call', _188 => _188((plugin2) => plugin2.name === "farm:infra-analytics")])
2886
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _184 => _184.getPlugins, 'call', _185 => _185(), 'access', _186 => _186.some, 'call', _187 => _187((plugin2) => plugin2.name === "farm:infra-analytics")])
2865
2887
  );
2866
2888
  let farmDocsPagePaths;
2867
2889
  const getFarmDocsPagePaths = () => {
@@ -2960,7 +2982,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2960
2982
  }
2961
2983
  },
2962
2984
  (request) => {
2963
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _189 => _189.getConfig, 'call', _190 => _190()]), () => ( options));
2985
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _188 => _188.getConfig, 'call', _189 => _189()]), () => ( options));
2964
2986
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2965
2987
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
2966
2988
  trustProxy: currentServerConfig.trustProxy
@@ -2976,7 +2998,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2976
2998
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2977
2999
  const requestUrl = req.url || "/";
2978
3000
  const requestMethod = req.method || "GET";
2979
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _191 => _191.getConfig, 'call', _192 => _192()]), () => ( options));
3001
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _190 => _190.getConfig, 'call', _191 => _191()]), () => ( options));
2980
3002
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2981
3003
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
2982
3004
  trustProxy: currentServerConfig.trustProxy
@@ -3021,7 +3043,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3021
3043
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3022
3044
  res.statusCode = 200;
3023
3045
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3024
- res.end(requestMethod === "HEAD" ? void 0 : _chunkX4TSMQWFcjs.FARM_VIDEO_PLAYER_HTML);
3046
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkCL7BUGVBcjs.FARM_VIDEO_PLAYER_HTML);
3025
3047
  return;
3026
3048
  }
3027
3049
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3076,7 +3098,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3076
3098
  openapi: options.openapi
3077
3099
  },
3078
3100
  workflows: discoveredWorkflows,
3079
- plugins: _optionalChain([pm, 'optionalAccess', _193 => _193.getSortedPlugins, 'call', _194 => _194()])
3101
+ plugins: _optionalChain([pm, 'optionalAccess', _192 => _192.getSortedPlugins, 'call', _193 => _193()])
3080
3102
  });
3081
3103
  res.statusCode = 200;
3082
3104
  res.setHeader(
@@ -3111,10 +3133,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3111
3133
  render: {
3112
3134
  pathname: pathname2,
3113
3135
  method: requestMethod,
3114
- routePattern: _optionalChain([match, 'optionalAccess', _195 => _195.route, 'optionalAccess', _196 => _196.pattern]) || null,
3115
- params: _optionalChain([match, 'optionalAccess', _197 => _197.params]) || {}
3136
+ routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
3137
+ params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {}
3116
3138
  },
3117
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _198 => _198.layouts]) || []).map((layout) => layout.pattern)
3139
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((layout) => layout.pattern)
3118
3140
  };
3119
3141
  return pageHookRouteMatch;
3120
3142
  };
@@ -3202,7 +3224,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3202
3224
  }
3203
3225
  }
3204
3226
  const runAppMiddlewareForContentRoute = async () => {
3205
- if (!_optionalChain([middlewareManager, 'optionalAccess', _199 => _199.hasMiddleware, 'call', _200 => _200()])) return false;
3227
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _198 => _198.hasMiddleware, 'call', _199 => _199()])) return false;
3206
3228
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3207
3229
  return runFarmMiddlewareWithNavigation(
3208
3230
  farmApp.getServerRenderer(),
@@ -3240,7 +3262,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3240
3262
  return response.status;
3241
3263
  };
3242
3264
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3243
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _201 => _201.hasRuntimeHook, 'call', _202 => _202("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _203 => _203.hasMiddleware, 'call', _204 => _204()]) ? interceptFarmDevPageResponse({
3265
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _200 => _200.hasRuntimeHook, 'call', _201 => _201("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _202 => _202.hasMiddleware, 'call', _203 => _203()]) ? interceptFarmDevPageResponse({
3244
3266
  req,
3245
3267
  res,
3246
3268
  pm,
@@ -3253,7 +3275,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3253
3275
  urlPath: requestUrl,
3254
3276
  pathname: requestPathname,
3255
3277
  startTime: Date.now(),
3256
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _205 => _205(status)]),
3278
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _204 => _204(status)]),
3257
3279
  // The runtime reports a runtime.after failure itself.
3258
3280
  emitError: async () => {
3259
3281
  },
@@ -3264,7 +3286,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3264
3286
  handled = await runAppMiddlewareForContentRoute();
3265
3287
  } catch (error) {
3266
3288
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3267
- _optionalChain([interceptor, 'optionalAccess', _206 => _206.release, 'call', _207 => _207()]);
3289
+ _optionalChain([interceptor, 'optionalAccess', _205 => _205.release, 'call', _206 => _206()]);
3268
3290
  throw error;
3269
3291
  }
3270
3292
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3272,10 +3294,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3272
3294
  return true;
3273
3295
  }
3274
3296
  if (!handled) {
3275
- _optionalChain([interceptor, 'optionalAccess', _208 => _208.release, 'call', _209 => _209()]);
3297
+ _optionalChain([interceptor, 'optionalAccess', _207 => _207.release, 'call', _208 => _208()]);
3276
3298
  return false;
3277
3299
  }
3278
- if (!_optionalChain([interceptor, 'optionalAccess', _210 => _210.isEnded, 'call', _211 => _211()])) _optionalChain([logResponse2, 'optionalCall', _212 => _212(res.statusCode || 200)]);
3300
+ if (!_optionalChain([interceptor, 'optionalAccess', _209 => _209.isEnded, 'call', _210 => _210()])) _optionalChain([logResponse2, 'optionalCall', _211 => _211(res.statusCode || 200)]);
3279
3301
  return true;
3280
3302
  };
3281
3303
  const serveBuiltInRoute = async (respond, {
@@ -3284,7 +3306,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3284
3306
  label
3285
3307
  } = {}) => {
3286
3308
  const discard = async () => {
3287
- await _optionalChain([computed, 'optionalAccess', _213 => _213.body, 'optionalAccess', _214 => _214.cancel, 'call', _215 => _215(), 'access', _216 => _216.catch, 'call', _217 => _217(() => {
3309
+ await _optionalChain([computed, 'optionalAccess', _212 => _212.body, 'optionalAccess', _213 => _213.cancel, 'call', _214 => _214(), 'access', _215 => _215.catch, 'call', _216 => _216(() => {
3288
3310
  })]);
3289
3311
  };
3290
3312
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
@@ -3301,9 +3323,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3301
3323
  if (pm && opensFarmDevRuntimeSession(pm)) {
3302
3324
  try {
3303
3325
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3304
- const route = _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
3326
+ const route = _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
3305
3327
  { pathname: requestPathname },
3306
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk5OAN7BG5cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3328
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3307
3329
  );
3308
3330
  runtimeSession2 = await pm.beginRuntimeRequest(
3309
3331
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3341,7 +3363,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3341
3363
  }
3342
3364
  responding = true;
3343
3365
  response = await respond(
3344
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _218 => _218.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3366
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _217 => _217.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3345
3367
  );
3346
3368
  } catch (error) {
3347
3369
  if (!responding && !res.headersSent) {
@@ -3361,7 +3383,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3361
3383
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3362
3384
  };
3363
3385
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3364
- if (openAPIManager && _optionalChain([options, 'access', _219 => _219.openapi, 'optionalAccess', _220 => _220.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3386
+ if (openAPIManager && _optionalChain([options, 'access', _218 => _218.openapi, 'optionalAccess', _219 => _219.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3365
3387
  const specManager = openAPIManager;
3366
3388
  await serveBuiltInRoute(async () => {
3367
3389
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3381,7 +3403,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3381
3403
  });
3382
3404
  return;
3383
3405
  }
3384
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _221 => _221.openapi, 'optionalAccess', _222 => _222.route])) {
3406
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _220 => _220.openapi, 'optionalAccess', _221 => _221.route])) {
3385
3407
  const docsManager = openAPIManager;
3386
3408
  await serveBuiltInRoute(
3387
3409
  async () => {
@@ -3392,8 +3414,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3392
3414
  );
3393
3415
  return;
3394
3416
  }
3395
- if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunk5OAN7BG5cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3396
- const manifestGuardCoversPath = (path7) => _chunkUWOCYINYcjs.farmPathGuardCoversEndpoint.call(void 0,
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,
3397
3419
  {
3398
3420
  config: farmConfig,
3399
3421
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3402,18 +3424,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3402
3424
  apiServerBasePath
3403
3425
  );
3404
3426
  await serveBuiltInRoute(async () => {
3405
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkX4TSMQWFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3406
- const manifest = await _chunk5OAN7BG5cjs.createFarmAppManifestResponse.call(void 0,
3427
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkCL7BUGVBcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3428
+ const manifest = await _chunkFYZD7DUScjs.createFarmAppManifestResponse.call(void 0,
3407
3429
  new Request(parsedRequestUrl, {
3408
3430
  method: requestMethod,
3409
3431
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3410
3432
  }),
3411
3433
  {
3412
- ..._chunk5OAN7BG5cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3434
+ ..._chunkFYZD7DUScjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3413
3435
  build: "development",
3414
3436
  packages: farmAppPackages,
3415
3437
  // Read again on each request; unchanged files come from a cache.
3416
- webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkX4TSMQWFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
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) : []
3417
3439
  }),
3418
3440
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3419
3441
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3431,11 +3453,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3431
3453
  });
3432
3454
  return;
3433
3455
  }
3434
- if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk5OAN7BG5cjs.FARM_API_CATALOG_PATH) {
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) {
3435
3457
  await serveBuiltInRoute(
3436
- () => _chunk5OAN7BG5cjs.createFarmApiCatalogResponse.call(void 0,
3458
+ () => _chunkFYZD7DUScjs.createFarmApiCatalogResponse.call(void 0,
3437
3459
  requestMethod,
3438
- _chunk5OAN7BG5cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3460
+ _chunkFYZD7DUScjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3439
3461
  new Request(parsedRequestUrl, {
3440
3462
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3441
3463
  })
@@ -3443,8 +3465,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3443
3465
  );
3444
3466
  return;
3445
3467
  }
3446
- if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
3447
- const aiCatalog = _chunk5OAN7BG5cjs.createFarmAiCatalogResponse.call(void 0,
3468
+ if (_optionalChain([options, 'access', _229 => _229.agent, 'optionalAccess', _230 => _230.aiCatalog]) !== false) {
3469
+ const aiCatalog = _chunkFYZD7DUScjs.createFarmAiCatalogResponse.call(void 0,
3448
3470
  new Request(parsedRequestUrl, {
3449
3471
  method: requestMethod,
3450
3472
  headers: {
@@ -3492,7 +3514,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3492
3514
  );
3493
3515
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3494
3516
  if (docsResponse) {
3495
- const docsPage = _optionalChain([docsResponse, 'access', _232 => _232.headers, 'access', _233 => _233.get, 'call', _234 => _234("content-type"), 'optionalAccess', _235 => _235.toLowerCase, 'call', _236 => _236(), 'access', _237 => _237.includes, 'call', _238 => _238("text/html")]);
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")]);
3496
3518
  await serveBuiltInRoute(
3497
3519
  async (request) => {
3498
3520
  if (!docsPage) {
@@ -3510,7 +3532,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3510
3532
  farmConfig.deploymentId
3511
3533
  );
3512
3534
  if (deploymentMismatch) {
3513
- await _optionalChain([docsResponse, 'access', _239 => _239.body, 'optionalAccess', _240 => _240.cancel, 'call', _241 => _241()]);
3535
+ await _optionalChain([docsResponse, 'access', _238 => _238.body, 'optionalAccess', _239 => _239.cancel, 'call', _240 => _240()]);
3514
3536
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3515
3537
  }
3516
3538
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3526,11 +3548,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3526
3548
  {
3527
3549
  kind: "docs",
3528
3550
  computed: docsResponse,
3529
- label: _chunk5OAN7BG5cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3551
+ label: _chunkFYZD7DUScjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3530
3552
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3531
3553
  {
3532
- path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
3533
- roots: _optionalChain([farmConfig, 'access', _244 => _244.docs, 'optionalAccess', _245 => _245.roots, 'optionalAccess', _246 => _246.map, 'call', _247 => _247((root) => root.entry)]),
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)]),
3534
3556
  pages: await getFarmDocsPagePaths()
3535
3557
  }
3536
3558
  )
@@ -3539,7 +3561,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3539
3561
  return;
3540
3562
  }
3541
3563
  }
3542
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _248 => _248.headers, 'access', _249 => _249.accept, 'optionalAccess', _250 => _250.includes, 'call', _251 => _251(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
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)])) {
3543
3565
  const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3544
3566
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3545
3567
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3557,18 +3579,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3557
3579
  });
3558
3580
  await serveBuiltInRoute(() => treeResponse, {
3559
3581
  computed: treeResponse,
3560
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _252 => _252.getRouteManager, 'call', _253 => _253(), 'access', _254 => _254.matchRoute, 'call', _255 => _255(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _256 => _256.route, 'optionalAccess', _257 => _257.pattern]), () => ( null))
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))
3561
3583
  });
3562
3584
  return;
3563
3585
  }
3564
3586
  const markdownRouteLabel = () => (
3565
3587
  // On the route path, as production labels it: /fr/index.md is /index.md.
3566
- _chunk5OAN7BG5cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3588
+ _chunkFYZD7DUScjs.resolveFarmMarkdownRouteLabel.call(void 0,
3567
3589
  toRoutePathname(requestPathname),
3568
- (page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
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])
3569
3591
  )
3570
3592
  );
3571
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkQ4TRGTO7cjs.createFarmMarkdownSourceResponse.call(void 0, {
3593
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
3572
3594
  request: new Request(fullUrl, {
3573
3595
  method: requestMethod,
3574
3596
  headers: docsHeaders
@@ -3577,14 +3599,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3577
3599
  routePathname: toRoutePathname,
3578
3600
  resolveSource: async (pathname2) => {
3579
3601
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3580
- const sourcePath = _optionalChain([match, 'access', _264 => _264.route, 'optionalAccess', _265 => _265.markdownSourcePath]) || (match.route && _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
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);
3581
3603
  if (!sourcePath) {
3582
3604
  return null;
3583
3605
  }
3584
3606
  return {
3585
3607
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3586
3608
  // Project-relative, as production sends it: never the machine's path.
3587
- filePath: _chunkX4TSMQWFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3609
+ filePath: _chunkCL7BUGVBcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3588
3610
  };
3589
3611
  },
3590
3612
  // The anonymous check goes through this server, so its guards and
@@ -3650,7 +3672,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3650
3672
  return;
3651
3673
  }
3652
3674
  if (!viteModuleRequest && _chunk2NOHVIJ3cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3653
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkQ4TRGTO7cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3675
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk26WP75W5cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3654
3676
  if (!markdownRoute.route) {
3655
3677
  await serveBuiltInRoute(
3656
3678
  () => new Response(
@@ -3734,7 +3756,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3734
3756
  "beforeRequest",
3735
3757
  (plugin2) => {
3736
3758
  const owner = _chunkWGWWRV2Mcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3737
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3759
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _265 => _265.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3738
3760
  },
3739
3761
  req,
3740
3762
  res
@@ -3771,7 +3793,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3771
3793
  isProd: false
3772
3794
  },
3773
3795
  request,
3774
- { clientAddress: _optionalChain([req, 'access', _267 => _267.socket, 'optionalAccess', _268 => _268.remoteAddress]) }
3796
+ { clientAddress: _optionalChain([req, 'access', _266 => _266.socket, 'optionalAccess', _267 => _267.remoteAddress]) }
3775
3797
  );
3776
3798
  if (!result) {
3777
3799
  throw new Error(`Matched integration route did not return a response`);
@@ -3779,7 +3801,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3779
3801
  return result;
3780
3802
  } catch (error) {
3781
3803
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3782
- await _optionalChain([runtime, 'optionalAccess', _269 => _269.reportError, 'call', _270 => _270(error)]);
3804
+ await _optionalChain([runtime, 'optionalAccess', _268 => _268.reportError, 'call', _269 => _269(error)]);
3783
3805
  return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
3784
3806
  }
3785
3807
  };
@@ -3833,7 +3855,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3833
3855
  _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3834
3856
  pathname: requestPathname,
3835
3857
  method: requestMethod
3836
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
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)
3837
3859
  );
3838
3860
  };
3839
3861
  try {
@@ -3923,15 +3945,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3923
3945
  );
3924
3946
  };
3925
3947
  const isDocsAPIRequest = Boolean(
3926
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _273 => _273.isFarmDocsAPIRequest, 'call', _274 => _274(pathname2)])
3948
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _272 => _272.isFarmDocsAPIRequest, 'call', _273 => _273(pathname2)])
3927
3949
  );
3928
3950
  const docsRuntimeOptions = () => ({
3929
3951
  kind: "docs",
3930
- route: _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
3952
+ route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
3931
3953
  { pathname: pathname2, pattern: urlPath2 },
3932
- _chunk5OAN7BG5cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3933
- path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
3934
- roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
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)])
3935
3957
  })
3936
3958
  )
3937
3959
  });
@@ -4013,7 +4035,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4013
4035
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4014
4036
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4015
4037
  if (apiHandler && hasExplicitAPIRoute) {
4016
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _281 => _281.route, 'access', _282 => _282.path]) || urlPath2;
4038
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _280 => _280.route, 'access', _281 => _281.path]) || urlPath2;
4017
4039
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4018
4040
  type: "route.matched",
4019
4041
  pathname: pathname2,
@@ -4063,7 +4085,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4063
4085
  error
4064
4086
  });
4065
4087
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4066
- await _optionalChain([runtime, 'optionalAccess', _283 => _283.reportError, 'call', _284 => _284(error)]);
4088
+ await _optionalChain([runtime, 'optionalAccess', _282 => _282.reportError, 'call', _283 => _283(error)]);
4067
4089
  response = _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
4068
4090
  }
4069
4091
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
@@ -4168,12 +4190,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4168
4190
  }
4169
4191
  return;
4170
4192
  }
4171
- if (_optionalChain([req, 'access', _285 => _285.url, 'optionalAccess', _286 => _286.startsWith, 'call', _287 => _287("/@")]) || _optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/node_modules")])) {
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")])) {
4172
4194
  return next();
4173
4195
  }
4174
4196
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4175
4197
  requestPathname,
4176
- _optionalChain([farmApp, 'optionalAccess', _291 => _291.getRouteManager, 'call', _292 => _292()]),
4198
+ _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291()]),
4177
4199
  [server.config.publicDir, server.config.root],
4178
4200
  farmAgentGeneratedPaths(farmConfig),
4179
4201
  requestMethod
@@ -4181,7 +4203,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4181
4203
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4182
4204
  return next();
4183
4205
  }
4184
- if (_optionalChain([req, 'access', _293 => _293.url, 'optionalAccess', _294 => _294.startsWith, 'call', _295 => _295("/__farm/page-data")])) {
4206
+ if (_optionalChain([req, 'access', _292 => _292.url, 'optionalAccess', _293 => _293.startsWith, 'call', _294 => _294("/__farm/page-data")])) {
4185
4207
  const urlObj = parsedRequestUrl;
4186
4208
  const targetPath = urlObj.searchParams.get("path") || "/";
4187
4209
  let renderedRequest;
@@ -4211,7 +4233,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4211
4233
  renderedRequest = targetRequest;
4212
4234
  let middlewareMap = /* @__PURE__ */ new Map();
4213
4235
  let middlewareContext = /* @__PURE__ */ new Map();
4214
- if (_optionalChain([middlewareManager, 'optionalAccess', _296 => _296.hasMiddleware, 'call', _297 => _297()])) {
4236
+ if (_optionalChain([middlewareManager, 'optionalAccess', _295 => _295.hasMiddleware, 'call', _296 => _296()])) {
4215
4237
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4216
4238
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4217
4239
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4245,10 +4267,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4245
4267
  if (pm) {
4246
4268
  await pm.runHookParallel("afterRouteMatch", {
4247
4269
  pathname: targetPath,
4248
- matched: !!_optionalChain([match, 'optionalAccess', _298 => _298.route]),
4249
- routePattern: _optionalChain([match, 'optionalAccess', _299 => _299.route, 'optionalAccess', _300 => _300.pattern]) || null,
4250
- params: _optionalChain([match, 'optionalAccess', _301 => _301.params]) || {},
4251
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _302 => _302.layouts]) || []).map((l) => l.pattern)
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)
4252
4274
  });
4253
4275
  }
4254
4276
  if (!match) {
@@ -4283,7 +4305,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4283
4305
  );
4284
4306
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4285
4307
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4286
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, route.modulePath, 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)));
4287
4309
  const isClientComponent = moduleMetadata.isClientComponent;
4288
4310
  const shouldHydrate = moduleMetadata.shouldHydrate;
4289
4311
  let mergedMetadata = {};
@@ -4294,7 +4316,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4294
4316
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4295
4317
  (entry) => entry.pattern === layout.pattern
4296
4318
  ), () => ( {
4297
- ..._chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4319
+ ..._chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4298
4320
  serverTree: false
4299
4321
  }))
4300
4322
  );
@@ -4308,17 +4330,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4308
4330
  )
4309
4331
  ];
4310
4332
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4311
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
4312
- ) === "islands" ? _chunkX4TSMQWFcjs.resolveFarmRouteRootStrategy.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,
4313
4335
  route,
4314
4336
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4315
4337
  layouts.map((layout, index) => ({
4316
4338
  pattern: layout.pattern,
4317
4339
  modulePath: layout.modulePath,
4318
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _307 => _307[index], 'optionalAccess', _308 => _308.shouldHydrate]) === true,
4340
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _306 => _306[index], 'optionalAccess', _307 => _307.shouldHydrate]) === true,
4319
4341
  // Manifest entries carry it; metadata read from source does not.
4320
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _309 => _309[index], 'optionalAccess', _310 => _310.hasIsolatedClientBoundaries]) === true,
4321
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _311 => _311[index], 'optionalAccess', _312 => _312.islandStrategy]), () => ( null))
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))
4322
4344
  })),
4323
4345
  server.config.root,
4324
4346
  true
@@ -4375,7 +4397,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4375
4397
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4376
4398
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4377
4399
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4378
- ), () => ( _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4400
+ ), () => ( _chunk46UV2E7Icjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4379
4401
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4380
4402
  request: targetRequest,
4381
4403
  params: slot.params,
@@ -4421,15 +4443,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4421
4443
  );
4422
4444
  const projectRoot = server.config.root;
4423
4445
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4424
- const renderPlan = _chunkUWOCYINYcjs.createFarmRouteRenderPlan.call(void 0, {
4446
+ const renderPlan = _chunkOFVCWV2Dcjs.createFarmRouteRenderPlan.call(void 0, {
4425
4447
  pageShouldHydrate: shouldHydrate,
4426
4448
  layoutShouldHydrate: shouldHydrateLayout,
4427
4449
  islandStrategy: hydrationIslandStrategy,
4428
- rendering: _chunkSDICLSQUcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4450
+ rendering: _chunkOUDNUFVRcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4429
4451
  });
4430
4452
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4431
- const layoutStartIndex = _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0,
4432
- _chunkUWOCYINYcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4453
+ const layoutStartIndex = _chunkOFVCWV2Dcjs.getSharedLayoutPrefixLength.call(void 0,
4454
+ _chunkOFVCWV2Dcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4433
4455
  destinationLayoutPatterns
4434
4456
  );
4435
4457
  const renderer = farmApp.getServerRenderer();
@@ -4439,13 +4461,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4439
4461
  middlewareContext,
4440
4462
  () => renderer.renderNavigationFragment({
4441
4463
  PageComponent: routeModule.default,
4442
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _313 => _313.default]),
4464
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _312 => _312.default]),
4443
4465
  pageProps: routeProps,
4444
4466
  params,
4445
4467
  layouts: layouts.map((layout, index) => ({
4446
4468
  pattern: layout.pattern,
4447
4469
  module: layoutModules[index],
4448
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.serverTree])
4470
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _313 => _313[index], 'optionalAccess', _314 => _314.serverTree])
4449
4471
  })),
4450
4472
  layoutStartIndex,
4451
4473
  slots: routeSlots.map((slot) => ({
@@ -4511,7 +4533,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4511
4533
  {
4512
4534
  status: 200,
4513
4535
  headers: {
4514
- "Cache-Control": _chunkUWOCYINYcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4536
+ "Cache-Control": _chunkOFVCWV2Dcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4515
4537
  "X-Farm-Navigation": "html-fragment",
4516
4538
  Vary: "X-Farm-Layout-Chain",
4517
4539
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4553,14 +4575,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4553
4575
  trustProxy: currentServerConfig.trustProxy
4554
4576
  }).pathname;
4555
4577
  const routeManager2 = farmApp.getRouteManager();
4556
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("beforeRequest")]), () => ( false));
4557
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("afterResponse")]), () => ( false));
4558
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasHook, 'call', _323 => _323("afterRender")]), () => ( false)));
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)));
4559
4581
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4560
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
4582
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _323 => _323.hasRuntimeHook, 'call', _324 => _324("after")]), () => ( false));
4561
4583
  const pageBuiltInRouteLabel = (pathname2) => {
4562
4584
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4563
- const mcpLabel = _chunk5OAN7BG5cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4585
+ const mcpLabel = _chunkFYZD7DUScjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4564
4586
  if (mcpLabel) return mcpLabel;
4565
4587
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4566
4588
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4569,13 +4591,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4569
4591
  const match = routeManager2.matchRoute(pathname2);
4570
4592
  return {
4571
4593
  kind: "page",
4572
- route: _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
4594
+ route: _chunkFYZD7DUScjs.setFarmRouteLabel.call(void 0,
4573
4595
  {
4574
4596
  pathname: pathname2,
4575
- pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
4576
- params: _optionalChain([match, 'optionalAccess', _328 => _328.params]) || {}
4597
+ pattern: _optionalChain([match, 'optionalAccess', _325 => _325.route, 'optionalAccess', _326 => _326.pattern]) || null,
4598
+ params: _optionalChain([match, 'optionalAccess', _327 => _327.params]) || {}
4577
4599
  },
4578
- _optionalChain([match, 'optionalAccess', _329 => _329.route]) ? null : pageBuiltInRouteLabel(pathname2)
4600
+ _optionalChain([match, 'optionalAccess', _328 => _328.route]) ? null : pageBuiltInRouteLabel(pathname2)
4579
4601
  )
4580
4602
  };
4581
4603
  };
@@ -4655,7 +4677,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4655
4677
  }) : void 0;
4656
4678
  let middlewareFailed = false;
4657
4679
  try {
4658
- if (_optionalChain([middlewareManager, 'optionalAccess', _330 => _330.hasMiddleware, 'call', _331 => _331()])) {
4680
+ if (_optionalChain([middlewareManager, 'optionalAccess', _329 => _329.hasMiddleware, 'call', _330 => _330()])) {
4659
4681
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4660
4682
  const handled = await runFarmMiddlewareWithNavigation(
4661
4683
  farmApp.getServerRenderer(),
@@ -4668,7 +4690,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4668
4690
  throw error;
4669
4691
  });
4670
4692
  if (handled) {
4671
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
4693
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _331 => _331.isEnded, 'call', _332 => _332()])) {
4672
4694
  const duration = Date.now() - startTime;
4673
4695
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4674
4696
  }
@@ -4683,8 +4705,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4683
4705
  res
4684
4706
  );
4685
4707
  }
4686
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
4687
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
4708
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _333 => _333.isEnded, 'call', _334 => _334()])) {
4709
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _335 => _335.isEnded, 'call', _336 => _336()])) {
4688
4710
  const duration = Date.now() - startTime;
4689
4711
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4690
4712
  }
@@ -4703,8 +4725,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4703
4725
  await pm.reportRuntimeRequestError(runtimeSession, error);
4704
4726
  } else {
4705
4727
  await pm.failRuntimeRequest(runtimeSession, error);
4706
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.isEnded, 'call', _339 => _339()])) {
4707
- _optionalChain([responseInterceptor, 'optionalAccess', _340 => _340.release, 'call', _341 => _341()]);
4728
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _337 => _337.isEnded, 'call', _338 => _338()])) {
4729
+ _optionalChain([responseInterceptor, 'optionalAccess', _339 => _339.release, 'call', _340 => _340()]);
4708
4730
  console.error("[FARM] Page error:", error);
4709
4731
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4710
4732
  return;
@@ -4721,7 +4743,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4721
4743
  }
4722
4744
  })
4723
4745
  );
4724
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _342 => _342.stack, 'access', _343 => _343.at, 'call', _344 => _344(-1), 'optionalAccess', _345 => _345.handle]);
4746
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _341 => _341.stack, 'access', _342 => _342.at, 'call', _343 => _343(-1), 'optionalAccess', _344 => _344.handle]);
4725
4747
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4726
4748
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4727
4749
  }
@@ -4750,7 +4772,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4750
4772
  });
4751
4773
  }
4752
4774
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4753
- const root = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347(), 'access', _348 => _348.root]) || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || options.root;
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;
4754
4776
  return this.resolve(id, path6.join(root, "package.json"), {
4755
4777
  ...resolveOptions,
4756
4778
  skipSelf: true
@@ -4778,7 +4800,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4778
4800
  }
4779
4801
  },
4780
4802
  async load(id, loadOptions) {
4781
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _351 => _351.ssr]) && !farmSetupContext.getStore()) {
4803
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _350 => _350.ssr]) && !farmSetupContext.getStore()) {
4782
4804
  await pendingClientSetup;
4783
4805
  }
4784
4806
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4796,8 +4818,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4796
4818
  if (imageModule) return imageModule;
4797
4819
  }
4798
4820
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4799
- const renderer = _optionalChain([farmApp, 'optionalAccess', _352 => _352.getConfig, 'call', _353 => _353(), 'access', _354 => _354.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4800
- const root = _optionalChain([server, 'optionalAccess', _355 => _355.config, 'access', _356 => _356.root]) || options.root;
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;
4801
4823
  if (isClientEnvironment(this, loadOptions)) {
4802
4824
  return generateProgrammaticClientRouteModuleForId(
4803
4825
  id,
@@ -4813,32 +4835,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4813
4835
  return FARM_DEV_CLIENT_BOOT_MODULE;
4814
4836
  }
4815
4837
  if (isFarmClientVirtualId(id)) {
4816
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358()]);
4817
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4818
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.integrations]) || options.integrations;
4819
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.root]) || _optionalChain([server, 'optionalAccess', _362 => _362.config, 'access', _363 => _363.root]) || process.cwd();
4820
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.docs]);
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]);
4821
4843
  const adapterOwnsDocsRuntime = Boolean(
4822
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _365 => _365.adapter, 'optionalAccess', _366 => _366.server]) && docs.adapter.react
4844
+ _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _364 => _364.adapter, 'optionalAccess', _365 => _365.server]) && docs.adapter.react
4823
4845
  );
4824
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _367 => _367.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4846
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _366 => _366.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4825
4847
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4826
- _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) ? loadFarmDocsDevRuntime() : null,
4827
- _optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4848
+ _optionalChain([docs, 'optionalAccess', _367 => _367.enabled]) ? loadFarmDocsDevRuntime() : null,
4849
+ _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4828
4850
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4829
4851
  ]);
4830
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _370 => _370.isFarmDocsSearchEnabled, 'call', _371 => _371(docs)]), () => ( false));
4852
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _369 => _369.isFarmDocsSearchEnabled, 'call', _370 => _370(docs)]), () => ( false));
4831
4853
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4832
4854
  docsSearchEnabled,
4833
4855
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4834
4856
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4835
4857
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4836
4858
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4837
- const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, integrations) : [];
4838
- const isolatedHydrationMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4839
- _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
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]),
4840
4862
  {
4841
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
4863
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.serverComponents])) === "rsc",
4842
4864
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4843
4865
  }
4844
4866
  );
@@ -4846,32 +4868,32 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4846
4868
  integrationProviders,
4847
4869
  [
4848
4870
  ..._chunkWGWWRV2Mcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4849
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
4871
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _375 => _375.getFarmDocsDocumentNavigationMatchers, 'call', _376 => _376(docs)]), () => ( []))
4850
4872
  ],
4851
4873
  generatedDocsSearchRuntime,
4852
4874
  `${generatedDevtoolsClientRuntime}
4853
4875
  ${generatedDevIndicatorsClientRuntime}`,
4854
- _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.plugins]) || [],
4876
+ _optionalChain([resolvedConfig, 'optionalAccess', _377 => _377.plugins]) || [],
4855
4877
  root,
4856
- _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.srcDir]) || options.srcDir || "src",
4857
- _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.publicRuntimeConfig]) || options.publicRuntimeConfig,
4858
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _381 => _381.adapter, 'optionalAccess', _382 => _382.react]) : void 0,
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,
4859
4881
  renderer,
4860
- isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
4861
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
4862
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
4863
- _chunkX4TSMQWFcjs.generateClientCachePersistenceCode.call(void 0,
4864
- _chunkX4TSMQWFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
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]))
4865
4887
  ),
4866
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4867
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
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"
4868
4890
  );
4869
4891
  }
4870
4892
  if (id === "/@farm/server") {
4871
4893
  return generateServerCode();
4872
4894
  }
4873
4895
  if (id === "/@farm/manifest") {
4874
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getRouteManager, 'call', _394 => _394()]);
4896
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _392 => _392.getRouteManager, 'call', _393 => _393()]);
4875
4897
  if (!routeManager) {
4876
4898
  return `
4877
4899
  export const getManifest = () => ({
@@ -4883,11 +4905,11 @@ export const getManifest = () => ({
4883
4905
  });
4884
4906
  `;
4885
4907
  }
4886
- const globalStylesheetHref = _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
4908
+ const globalStylesheetHref = _chunkCL7BUGVBcjs.resolveDevGlobalStylesheetHref.call(void 0,
4887
4909
  server.config.root,
4888
- _optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
4910
+ _optionalChain([farmApp, 'optionalAccess', _394 => _394.getConfig, 'call', _395 => _395(), 'access', _396 => _396.srcDir])
4889
4911
  );
4890
- const fullManifest = _chunkX4TSMQWFcjs.createFarmDevClientManifest.call(void 0,
4912
+ const fullManifest = _chunkCL7BUGVBcjs.createFarmDevClientManifest.call(void 0,
4891
4913
  routeManager.generateClientManifest(server.config.root),
4892
4914
  {
4893
4915
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4903,64 +4925,64 @@ export { manifest };
4903
4925
  }
4904
4926
  },
4905
4927
  async transform(code, id, transformOptions) {
4906
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) && !farmSetupContext.getStore()) {
4928
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _397 => _397.ssr]) && !farmSetupContext.getStore()) {
4907
4929
  await pendingClientSetup;
4908
4930
  }
4909
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4910
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
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));
4911
4933
  let rewrotePackageImports = false;
4912
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, code)) {
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)) {
4913
4935
  const file = id.split("?", 1)[0];
4914
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
4936
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _404 => _404.config, 'access', _405 => _405.root]) || process.cwd();
4915
4937
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4916
4938
  const rewrite = () => {
4917
- if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
4939
+ if (_optionalChain([transformOptions, 'optionalAccess', _406 => _406.ssr]) === true) {
4918
4940
  if (farmReactServerFiles.has(file)) {
4919
- for (const child of _chunkZVSQN7NCcjs.farmRelativeImportFiles.call(void 0, code, file))
4941
+ for (const child of _chunk46UV2E7Icjs.farmRelativeImportFiles.call(void 0, code, file))
4920
4942
  farmReactServerFiles.add(child);
4921
4943
  }
4922
- const serverModule = farmReactServerFiles.has(file) || !_chunkZVSQN7NCcjs.getFarmClientReachableModules.call(void 0,
4944
+ const serverModule = farmReactServerFiles.has(file) || !_chunk46UV2E7Icjs.getFarmClientReachableModules.call(void 0,
4923
4945
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4924
4946
  projectRoot
4925
4947
  ).has(path6.resolve(file));
4926
- const reactServer = !serverModule ? null : _chunkZVSQN7NCcjs.rewriteFarmReactServerImports.call(void 0, {
4948
+ const reactServer = !serverModule ? null : _chunk46UV2E7Icjs.rewriteFarmReactServerImports.call(void 0, {
4927
4949
  code,
4928
4950
  file,
4929
- reference: (specifier, exportName) => _chunkZVSQN7NCcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4951
+ reference: (specifier, exportName) => _chunk46UV2E7Icjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4930
4952
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4931
4953
  });
4932
4954
  if (reactServer !== null) {
4933
4955
  code = reactServer;
4934
4956
  rewrotePackageImports = true;
4935
4957
  }
4936
- const internal = farmReactServerFiles.has(file) ? _chunkZVSQN7NCcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4958
+ const internal = farmReactServerFiles.has(file) ? _chunk46UV2E7Icjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4937
4959
  code,
4938
4960
  file,
4939
- reference: (clientFile) => _chunkZVSQN7NCcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4961
+ reference: (clientFile) => _chunk46UV2E7Icjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4940
4962
  }) : null;
4941
4963
  if (internal !== null) {
4942
4964
  code = internal;
4943
4965
  rewrotePackageImports = true;
4944
4966
  }
4945
4967
  }
4946
- const rewritePackageImports = (source2) => _chunkZVSQN7NCcjs.rewriteFarmPackageClientImports.call(void 0, {
4968
+ const rewritePackageImports = (source2) => _chunk46UV2E7Icjs.rewriteFarmPackageClientImports.call(void 0, {
4947
4969
  code: source2,
4948
4970
  file,
4949
4971
  root: projectRoot,
4950
- isClientPackage: (specifier) => _chunkZVSQN7NCcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4972
+ isClientPackage: (specifier) => _chunk46UV2E7Icjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4951
4973
  });
4952
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
4974
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _407 => _407.getRouteManager, 'call', _408 => _408()]);
4953
4975
  const source = code;
4954
4976
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4955
4977
  if (referenced !== null) {
4956
4978
  code = referenced;
4957
4979
  rewrotePackageImports = true;
4958
4980
  }
4959
- if (_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true) {
4981
+ if (_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) === true) {
4960
4982
  const cached = rewriteFarmReactCacheImport(
4961
4983
  code,
4962
4984
  file,
4963
- _optionalChain([runtimeModule, 'optionalCall', _411 => _411(FARM_REACT_CACHE_MODULE)])
4985
+ _optionalChain([runtimeModule, 'optionalCall', _410 => _410(FARM_REACT_CACHE_MODULE)])
4964
4986
  );
4965
4987
  if (cached !== null) {
4966
4988
  code = cached;
@@ -4968,46 +4990,48 @@ export { manifest };
4968
4990
  }
4969
4991
  }
4970
4992
  };
4971
- if (buildSnapshot) _chunkZVSQN7NCcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4993
+ if (buildSnapshot) _chunk46UV2E7Icjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4972
4994
  else rewrite();
4973
4995
  }
4974
4996
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4975
4997
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4976
- environment: _optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) === true ? "rsc" : "client"
4998
+ environment: _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true ? "rsc" : "client"
4977
4999
  });
4978
5000
  if (serverFns) {
4979
5001
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
4980
5002
  code = serverFns.code;
4981
5003
  }
4982
5004
  }
4983
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5005
+ const actionsMode = islxActionsMode();
5006
+ if (actionsMode !== null && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4984
5007
  const file = id.split("?", 1)[0];
4985
5008
  const actionModule = transformFarmFormActionModule({
4986
5009
  code,
4987
5010
  id,
4988
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _415 => _415.config, 'access', _416 => _416.root]) || process.cwd(),
4989
- ssr: _optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) === true,
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,
4990
5013
  // Parsed by file type: page components are TSX.
4991
5014
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
4992
- runtimeModule
5015
+ runtimeModule,
5016
+ runtime: actionsMode
4993
5017
  });
4994
5018
  if (actionModule) return { code: actionModule, map: null };
4995
5019
  }
4996
- if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
4997
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
4998
- if (_chunkX4TSMQWFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4999
- const redacted = _chunkX4TSMQWFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
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]);
5000
5024
  if (redacted !== null) return { code: redacted, map: null };
5001
5025
  }
5002
5026
  }
5003
- if (!_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr])) {
5004
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _423 => _423.getConfig, 'call', _424 => _424()]), () => ( options));
5005
- if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
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()) {
5006
5030
  const violation = findClientServerFnViolation(code, id);
5007
5031
  if (violation) {
5008
- const locate = _chunkZVSQN7NCcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5032
+ const locate = _chunk46UV2E7Icjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5009
5033
  this.error(
5010
- _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
5034
+ _chunk46UV2E7Icjs.formatFarmDiagnostic.call(void 0,
5011
5035
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5012
5036
  currentConfig.root
5013
5037
  )
@@ -5015,8 +5039,8 @@ export { manifest };
5015
5039
  }
5016
5040
  }
5017
5041
  }
5018
- if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) && shouldInspectClientBoundary(id, code)) {
5019
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429()]), () => ( options)));
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)));
5020
5044
  }
5021
5045
  if (typeof imageImports.transform === "function") {
5022
5046
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5031,13 +5055,13 @@ export { manifest };
5031
5055
  id,
5032
5056
  transformOptions
5033
5057
  );
5034
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _430 => _430.code, 'optionalAccess', _431 => _431.toString, 'call', _432 => _432()]);
5058
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _427 => _427.code, 'optionalAccess', _428 => _428.toString, 'call', _429 => _429()]);
5035
5059
  if (fontCode) {
5036
5060
  transformedCode = fontCode;
5037
5061
  transformed = true;
5038
5062
  }
5039
5063
  }
5040
- if (_optionalChain([transformOptions, 'optionalAccess', _433 => _433.ssr]) && server) {
5064
+ if (_optionalChain([transformOptions, 'optionalAccess', _430 => _430.ssr]) && server) {
5041
5065
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5042
5066
  code: transformedCode,
5043
5067
  id,
@@ -5049,26 +5073,26 @@ export { manifest };
5049
5073
  transformed = true;
5050
5074
  }
5051
5075
  }
5052
- if (_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5076
+ if (_chunk46UV2E7Icjs.hasUseClientDirective.call(void 0, transformedCode)) {
5053
5077
  const clientBoundarySource = transformedCode;
5054
5078
  const moduleInfo = this.getModuleInfo(id);
5055
5079
  if (moduleInfo) {
5056
5080
  moduleInfo.isClientComponent = true;
5057
5081
  }
5058
- transformedCode = _chunkZVSQN7NCcjs.stripUseClientDirective.call(void 0, transformedCode);
5082
+ transformedCode = _chunk46UV2E7Icjs.stripUseClientDirective.call(void 0, transformedCode);
5059
5083
  transformed = true;
5060
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
5084
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _431 => _431.getConfig, 'call', _432 => _432()]), () => ( options));
5061
5085
  let isolatedModuleReference = null;
5062
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _436 => _436.config, 'access', _437 => _437.root]) || process.cwd();
5086
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _433 => _433.config, 'access', _434 => _434.root]) || process.cwd();
5063
5087
  const cleanId = id.split("?", 1)[0];
5064
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
5065
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
5066
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkZVSQN7NCcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5067
- cleanId.replace(/\\/g, "/").includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
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))) {
5068
5092
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5069
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
5070
- const explicitStrategy = _chunkZVSQN7NCcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5071
- const inference = islandsMode && explicitStrategy === null ? _chunkX4TSMQWFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
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;
5072
5096
  if (inference) {
5073
5097
  for (const file of inference.files) {
5074
5098
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5081,8 +5105,8 @@ export { manifest };
5081
5105
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5082
5106
  parse: (source) => this.parse(source),
5083
5107
  slots: islandsMode,
5084
- browser: _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) !== true,
5085
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _447 => _447.strategy]) === "interaction",
5108
+ browser: _optionalChain([transformOptions, 'optionalAccess', _443 => _443.ssr]) !== true,
5109
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _444 => _444.strategy]) === "interaction",
5086
5110
  runtimeModule
5087
5111
  });
5088
5112
  if (!transformedBoundary) {
@@ -5113,7 +5137,7 @@ export { manifest };
5113
5137
  );
5114
5138
  return;
5115
5139
  }` : "";
5116
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _448 => _448.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5140
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _445 => _445.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5117
5141
  if (import.meta.hot) {
5118
5142
  import.meta.hot.accept((newModule) => {
5119
5143
  ${isolatedHmrUpdate}
@@ -5169,14 +5193,14 @@ if (import.meta.hot) {
5169
5193
  }
5170
5194
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5171
5195
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5172
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
5196
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd(), options.outDir || "dist");
5173
5197
  const clientDir = path6.join(outDir, "client");
5174
5198
  for (const page of ssgPages) {
5175
5199
  try {
5176
5200
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5177
5201
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5178
5202
  const mod = await routeManager.loadRouteModule(page.filePath);
5179
- if (!_optionalChain([mod, 'optionalAccess', _451 => _451.default])) return;
5203
+ if (!_optionalChain([mod, 'optionalAccess', _448 => _448.default])) return;
5180
5204
  const { layouts } = routeManager.matchRoute(page.urlPath);
5181
5205
  const layoutModules = await Promise.all(
5182
5206
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5208,7 +5232,7 @@ if (import.meta.hot) {
5208
5232
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5209
5233
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5210
5234
  const fullHtml = `<!DOCTYPE html>
5211
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _452 => _452.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5235
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _449 => _449.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5212
5236
  <head>
5213
5237
  <meta charset="utf-8">
5214
5238
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5253,12 +5277,12 @@ if (import.meta.hot) {
5253
5277
  watchChange(id, change) {
5254
5278
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5255
5279
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5256
- _optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
5280
+ _optionalChain([farmApp, 'optionalAccess', _450 => _450.getRouteManager, 'call', _451 => _451(), 'access', _452 => _452.noteSourceChange, 'call', _453 => _453(id, change.event)]);
5257
5281
  }
5258
- _chunkZVSQN7NCcjs.invalidateFarmClientReachableModules.call(void 0, );
5259
- _chunkZVSQN7NCcjs.invalidateFarmClientOnlyScan.call(void 0, );
5260
- _chunkX4TSMQWFcjs.invalidateFarmRouteRootInferences.call(void 0, );
5261
- _chunkZVSQN7NCcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5282
+ _chunk46UV2E7Icjs.invalidateFarmClientReachableModules.call(void 0, );
5283
+ _chunk46UV2E7Icjs.invalidateFarmClientOnlyScan.call(void 0, );
5284
+ _chunkCL7BUGVBcjs.invalidateFarmRouteRootInferences.call(void 0, );
5285
+ _chunk46UV2E7Icjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5262
5286
  },
5263
5287
  async handleHotUpdate(ctx) {
5264
5288
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5283,7 +5307,7 @@ if (import.meta.hot) {
5283
5307
  server2.moduleGraph.invalidateModule(mod);
5284
5308
  }
5285
5309
  }
5286
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _457 => _457.getConfig, 'call', _458 => _458()]);
5310
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _454 => _454.getConfig, 'call', _455 => _455()]);
5287
5311
  const normalizedFile = file.replace(/\\/g, "/");
5288
5312
  const reloadAfterEdit = () => {
5289
5313
  for (const files of pendingRouteReloads) {
@@ -5291,28 +5315,28 @@ if (import.meta.hot) {
5291
5315
  }
5292
5316
  server2.ws.send({ type: "full-reload", path: "*" });
5293
5317
  };
5294
- if (normalizedFile.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5318
+ if (normalizedFile.includes(_chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5295
5319
  path6.posix.join(
5296
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
5297
- _chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5320
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _456 => _456.root]) || options.root || server2.config.root),
5321
+ _chunk46UV2E7Icjs.FARM_CLIENT_REFERENCE_DIRECTORY
5298
5322
  )
5299
5323
  ))
5300
5324
  return modules;
5301
- if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5325
+ if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5302
5326
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5303
5327
  )) {
5304
5328
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5305
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5329
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _457 => _457(`updated ${file}`)]);
5306
5330
  reloadAfterEdit();
5307
5331
  return [];
5308
5332
  }
5309
- const currentSrcRoot = currentFarmConfig ? _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5333
+ const currentSrcRoot = currentFarmConfig ? _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5310
5334
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5311
5335
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5312
5336
  for (const mod of modules) {
5313
5337
  server2.moduleGraph.invalidateModule(mod);
5314
5338
  }
5315
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5339
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _458 => _458(`updated ${file}`)]);
5316
5340
  reloadAfterEdit();
5317
5341
  return [];
5318
5342
  }
@@ -5322,22 +5346,22 @@ if (import.meta.hot) {
5322
5346
  for (const mod of modules) {
5323
5347
  server2.moduleGraph.invalidateModule(mod);
5324
5348
  }
5325
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
5349
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _459 => _459(`updated ${file}`)]);
5326
5350
  reloadAfterEdit();
5327
5351
  return [];
5328
5352
  }
5329
5353
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5330
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
5354
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5331
5355
  }
5332
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
5333
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
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()]);
5334
5358
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5335
- const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
5359
+ const tracksAsyncOwnerIslands = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _465 => _465.renderer])) && planRouteManager !== void 0;
5336
5360
  let clientPlanCurrent = false;
5337
5361
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5338
5362
  const routeManager = planRouteManager;
5339
- await _optionalChain([ctx, 'access', _469 => _469.read, 'optionalCall', _470 => _470()]);
5340
- if (_optionalChain([routeManager, 'optionalAccess', _471 => _471.isEditPlanNeutral, 'call', _472 => _472(file)])) {
5363
+ await _optionalChain([ctx, 'access', _466 => _466.read, 'optionalCall', _467 => _467()]);
5364
+ if (_optionalChain([routeManager, 'optionalAccess', _468 => _468.isEditPlanNeutral, 'call', _469 => _469(file)])) {
5341
5365
  clientPlanCurrent = true;
5342
5366
  } else if (routeManager) {
5343
5367
  routeManager.noteSourceChange(file, "update");
@@ -5398,7 +5422,7 @@ if (import.meta.hot) {
5398
5422
  }
5399
5423
  return [];
5400
5424
  }
5401
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.invalidateClientManifest, 'call', _476 => _476()]);
5425
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _470 => _470.getRouteManager, 'call', _471 => _471(), 'access', _472 => _472.invalidateClientManifest, 'call', _473 => _473()]);
5402
5426
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5403
5427
  if (manifestModule) {
5404
5428
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5413,7 +5437,7 @@ if (import.meta.hot) {
5413
5437
  return [];
5414
5438
  }
5415
5439
  }
5416
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _477 => _477.environments, 'access', _478 => _478.client, 'optionalAccess', _479 => _479.moduleGraph, 'access', _480 => _480.getModulesByFile, 'call', _481 => _481(normalizedFile), 'optionalAccess', _482 => _482.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
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) {
5417
5441
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5418
5442
  reloadAfterEdit();
5419
5443
  return [];
@@ -5511,7 +5535,7 @@ function createPageDataMiddlewareResponse(res) {
5511
5535
  return (...args) => {
5512
5536
  if (captures(target.statusCode, target.getHeader("location"))) {
5513
5537
  const callback = args.find((arg) => typeof arg === "function");
5514
- _optionalChain([callback, 'optionalCall', _483 => _483()]);
5538
+ _optionalChain([callback, 'optionalCall', _480 => _480()]);
5515
5539
  return property === "write" ? true : response;
5516
5540
  }
5517
5541
  return target[property](...args);
@@ -5575,12 +5599,12 @@ function isFarmClientVirtualId(id) {
5575
5599
  }
5576
5600
  function isClientEnvironment(context, loadOptions) {
5577
5601
  const environment = context.environment;
5578
- if (_optionalChain([environment, 'optionalAccess', _484 => _484.config, 'optionalAccess', _485 => _485.consumer])) return environment.config.consumer === "client";
5579
- if (_optionalChain([environment, 'optionalAccess', _486 => _486.name])) return environment.name === "client";
5580
- return _optionalChain([loadOptions, 'optionalAccess', _487 => _487.ssr]) !== true;
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;
5581
5605
  }
5582
5606
  function invalidateProgrammaticClientRouteModules(server) {
5583
- const graph = _optionalChain([server, 'access', _488 => _488.environments, 'optionalAccess', _489 => _489.client, 'optionalAccess', _490 => _490.moduleGraph]);
5607
+ const graph = _optionalChain([server, 'access', _485 => _485.environments, 'optionalAccess', _486 => _486.client, 'optionalAccess', _487 => _487.moduleGraph]);
5584
5608
  if (!graph) return;
5585
5609
  for (const [id, module] of graph.idToModuleMap) {
5586
5610
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5590,26 +5614,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5590
5614
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5591
5615
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5592
5616
  watchFile(routesFile);
5593
- return _chunkZVSQN7NCcjs.generateProgrammaticClientRouteModule.call(void 0, {
5617
+ return _chunk46UV2E7Icjs.generateProgrammaticClientRouteModule.call(void 0, {
5594
5618
  kind: parsed.kind,
5595
5619
  routePath: parsed.routePath,
5596
5620
  routesFile,
5597
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _491 => _491.routes, 'access', _492 => _492.get, 'call', _493 => _493(
5598
- _chunkZVSQN7NCcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
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)
5599
5623
  )]),
5600
- rendererServer: renderer.server,
5624
+ // 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,
5601
5626
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5602
5627
  });
5603
5628
  }
5604
5629
  function resolveRealModuleFile(filePath, root) {
5605
- const resolved = _nullishCoalesce(_chunkZVSQN7NCcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5630
+ const resolved = _nullishCoalesce(_chunk46UV2E7Icjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5606
5631
  try {
5607
5632
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5608
5633
  } catch (e28) {
5609
5634
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5610
5635
  }
5611
5636
  }
5612
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk67MZTLTFcjs.REACT_RENDERER) {
5637
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkM6DAIE4Tcjs.REACT_RENDERER) {
5613
5638
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5614
5639
  if (!parsed) {
5615
5640
  return "";
@@ -5916,12 +5941,12 @@ async function parseRouteModuleProps(routeModule, input) {
5916
5941
  }
5917
5942
  const schemas = routeModule.__farmRouteSchemas;
5918
5943
  const params = parseRouteModuleSchema(
5919
- _optionalChain([schemas, 'optionalAccess', _494 => _494.params]),
5944
+ _optionalChain([schemas, 'optionalAccess', _491 => _491.params]),
5920
5945
  input.props.params,
5921
5946
  "params",
5922
5947
  input.routePath
5923
5948
  );
5924
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _495 => _495.search]), input.search, "search", input.routePath);
5949
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _492 => _492.search]), input.search, "search", input.routePath);
5925
5950
  return {
5926
5951
  ...input.props,
5927
5952
  params,
@@ -5940,8 +5965,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5940
5965
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
5941
5966
  }
5942
5967
  }
5943
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5944
- const providerClientCode = _chunkX4TSMQWFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
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,
5945
5970
  integrationProviders,
5946
5971
  root,
5947
5972
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -5952,8 +5977,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
5952
5977
  srcDir,
5953
5978
  publicRuntimeConfig
5954
5979
  );
5955
- const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5956
- const rendererClientImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5980
+ const appSetupPath = _chunkM6DAIE4Tcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5981
+ const rendererClientImports = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5957
5982
  import { hydrateRoot, createRoot } from 'react-dom/client'
5958
5983
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
5959
5984
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6005,7 +6030,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6005
6030
  return null;
6006
6031
  }
6007
6032
  }
6008
- ${islandValues ? `${_chunkX4TSMQWFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6033
+ ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6009
6034
  let farmLastRouteState = null;
6010
6035
 
6011
6036
  // A hot update to a layout tree's client module renders the route again.
@@ -6033,7 +6058,7 @@ import {
6033
6058
  createFarmDeploymentRequestHeaders,
6034
6059
  isFarmDeploymentMismatchResponse,
6035
6060
  } from '@farm.js/core/deployment'
6036
- ${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
6061
+ ${islandValues ? "import { getFarmIslandValueHeaders, keepFarmIslandValues } from '@farm.js/core/internal/client-runtime'" : ""}
6037
6062
  ${providerClientCode.imports}
6038
6063
  ${clientPluginEntry.imports}
6039
6064
 
@@ -6846,7 +6871,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6846
6871
  return loadedLayouts;
6847
6872
  }
6848
6873
 
6849
- ${_chunkX4TSMQWFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6874
+ ${_chunkCL7BUGVBcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6850
6875
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6851
6876
  let wrapped = element;
6852
6877
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6925,7 +6950,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
6925
6950
 
6926
6951
  function hydrateFarmRoute(container, route) {
6927
6952
  farmLastRouteState = route;
6928
- ${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
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);"}
6929
6954
  }
6930
6955
 
6931
6956
  function renderFarmRoute(root, route) {
@@ -7069,7 +7094,7 @@ async function tryHydrateImportedPage(
7069
7094
  wrap: wrapFarmClientRouteGraph,
7070
7095
  };
7071
7096
  } else if (useHydrate && container?.id === '__farm_page__') {
7072
- wrappedElement = wrapFarmClientRouteGraph(${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7097
+ wrappedElement = wrapFarmClientRouteGraph(${_chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7073
7098
  } else {
7074
7099
  wrappedElement = await buildWrappedHydrationElement(
7075
7100
  currentPageComponent,
@@ -7144,7 +7169,7 @@ function readActiveLayoutPatterns() {
7144
7169
  );
7145
7170
  }
7146
7171
 
7147
- ${_chunkX4TSMQWFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7172
+ ${_chunkCL7BUGVBcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7148
7173
 
7149
7174
  function activateFragmentScripts(root) {
7150
7175
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7203,7 +7228,7 @@ function getLayoutShell(root, patterns, index, find) {
7203
7228
  return shell.innerHTML;
7204
7229
  }
7205
7230
 
7206
- ${islandValues ? _chunkX4TSMQWFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7231
+ ${islandValues ? _chunkCL7BUGVBcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7207
7232
  container,
7208
7233
  fragment,
7209
7234
  currentPatterns,
@@ -7276,9 +7301,9 @@ ${islandValues ? `
7276
7301
  return nextTarget;
7277
7302
  }
7278
7303
 
7279
- ${islandValues ? `${_chunkX4TSMQWFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7304
+ ${islandValues ? `${_chunkCL7BUGVBcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7280
7305
 
7281
- ${_chunkX4TSMQWFcjs.FARM_EARLY_NAVIGATION_SOURCE}
7306
+ ${_chunkCL7BUGVBcjs.FARM_EARLY_NAVIGATION_SOURCE}
7282
7307
 
7283
7308
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7284
7309
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7355,7 +7380,8 @@ async function fetchFarmNavigationDocument(path, context) {
7355
7380
  Accept: 'text/html',
7356
7381
  // A refresh arrives whole, like a transition: the islands it keeps are all in it.
7357
7382
  ...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
7358
- ...getFarmIslandValueHeaders(),
7383
+ // The swap keeps the values only the page holds (keepFarmIslandValues).
7384
+ ...getFarmIslandValueHeaders(container),
7359
7385
  // A prefetch names its layouts even when it keeps none: that marks it as a navigation,
7360
7386
  // which the server answers without loading.tsx.
7361
7387
  ...(identities.length || context.prefetch ? { 'F-Layouts': JSON.stringify(identities) } : {}),
@@ -7595,6 +7621,7 @@ async function renderPage(pageData, info) {
7595
7621
  );
7596
7622
  } else {
7597
7623
  ${isolatedHydrationEnabled ? "let isolatedHydrationScope = container;" : ""}
7624
+ ${islandValues ? "const keepValues = keepFarmIslandValues(container);" : ""}
7598
7625
  // A route whose layouts hydrate renders them for its own root (inline client components,
7599
7626
  // islands mode's layout trees), so the HTML of shared layouts is replaced too.
7600
7627
  if (activeLayoutShouldHydrate || layoutShouldHydrate) {
@@ -7609,6 +7636,7 @@ async function renderPage(pageData, info) {
7609
7636
  delete window.__FARM_REACT_ROOT__;
7610
7637
  ${isolatedHydrationEnabled ? islandValues ? "isolatedHydrationScope = (pageData.farmDocument ? replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), info?.refresh === true, findLayoutBoundaryByIdentity) : replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true)) || container;" : "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : islandValues ? "if (pageData.farmDocument) replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), false, findLayoutBoundaryByIdentity); else replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
7611
7638
  }
7639
+ ${islandValues ? "keepValues();" : ""}
7612
7640
 
7613
7641
  const hydrationController = new AbortController();
7614
7642
  if (
@@ -7978,8 +8006,8 @@ function generateClientManifest(bundle) {
7978
8006
  async function defineConfig(config = {}) {
7979
8007
  const tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
7980
8008
  const appRoot = path6.resolve(config.root || process.cwd());
7981
- if (_optionalChain([config, 'access', _496 => _496.extends, 'optionalAccess', _497 => _497.length])) {
7982
- const { config: layeredConfig } = await import("./layers-HMEGUEXM.cjs").then(
8009
+ if (_optionalChain([config, 'access', _493 => _493.extends, 'optionalAccess', _494 => _494.length])) {
8010
+ const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
7983
8011
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
7984
8012
  root: appRoot,
7985
8013
  mode: process.env.NODE_ENV === "production" ? "production" : "development"
@@ -7987,12 +8015,12 @@ async function defineConfig(config = {}) {
7987
8015
  );
7988
8016
  config = layeredConfig;
7989
8017
  }
7990
- config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7991
- config.images = _chunkX4TSMQWFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7992
- const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
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, {
7993
8021
  ssr: true
7994
8022
  });
7995
- const reactRefreshPlugins = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8023
+ const reactRefreshPlugins = _chunkM6DAIE4Tcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
7996
8024
  const nodeBuiltinStubs = {
7997
8025
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
7998
8026
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8080,13 +8108,13 @@ async function defineConfig(config = {}) {
8080
8108
  if (!serverStarted) {
8081
8109
  serverStarted = true;
8082
8110
  const elapsed = Date.now() - startTime;
8083
- const address = _optionalChain([server, 'access', _498 => _498.httpServer, 'optionalAccess', _499 => _499.address, 'call', _500 => _500()]);
8111
+ const address = _optionalChain([server, 'access', _495 => _495.httpServer, 'optionalAccess', _496 => _496.address, 'call', _497 => _497()]);
8084
8112
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8085
8113
  const hostConfig = server.config.server.host;
8086
8114
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8087
8115
  console.log("");
8088
8116
  console.log(
8089
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkCCMP4JD2cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8117
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkNSLRK5DKcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8090
8118
  );
8091
8119
  console.log("");
8092
8120
  console.log(
@@ -8120,27 +8148,29 @@ async function defineConfig(config = {}) {
8120
8148
  plugins: [
8121
8149
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8122
8150
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8123
- _chunkX4TSMQWFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8151
+ _chunkCL7BUGVBcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8124
8152
  tailwindVitePlugin,
8125
8153
  ...rendererVitePlugins,
8126
8154
  ...reactRefreshPlugins,
8127
8155
  viteBrowserExternalPlugin,
8128
8156
  farmI18nClientBridgePlugin(),
8129
8157
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
8158
+ farmNavigationPlugin(config.renderer),
8130
8159
  farmIslandContainersPlugin(config),
8131
8160
  farmPlugin(config),
8132
- _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8161
+ _chunk46UV2E7Icjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8133
8162
  farmBrandingPlugin
8134
8163
  ],
8135
8164
  customLogger: farmLogger,
8136
8165
  clearScreen: false,
8137
8166
  optimizeDeps: {
8138
- ..._chunkX4TSMQWFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8139
- _chunkX4TSMQWFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8167
+ ..._chunkCL7BUGVBcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8168
+ _chunkCL7BUGVBcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8140
8169
  appRoot,
8141
- _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8170
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8142
8171
  ),
8143
- config.renderer
8172
+ config.renderer,
8173
+ appRoot
8144
8174
  ),
8145
8175
  // Pre-bundle every framework client-runtime entry with the renderer. Without
8146
8176
  // this, Vite can discover a linked Farm entry after the page has loaded,
@@ -8178,8 +8208,8 @@ async function defineConfig(config = {}) {
8178
8208
  dedupe: [...config.renderer.dedupe || []],
8179
8209
  // Stub out problematic server-only modules during dev mode
8180
8210
  alias: {
8181
- ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, config.layers),
8182
- ..._chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8211
+ ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8212
+ ..._chunkCL7BUGVBcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8183
8213
  // Nitro internals that should not be resolved in browser
8184
8214
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8185
8215
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -8212,4 +8242,5 @@ async function defineConfig(config = {}) {
8212
8242
 
8213
8243
 
8214
8244
 
8215
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
8245
+
8246
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmNavigationPlugin = farmNavigationPlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;