@farm.js/core 0.1.51-beta.2 → 0.1.60

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 (321) hide show
  1. package/dist/{agent-mcp-handler-WWCC4GLG.mjs → agent-mcp-handler-7QMX2LUY.mjs} +7 -7
  2. package/dist/agent-mcp-handler-OV4WRFBL.cjs +18 -0
  3. package/dist/{agent-mcp.d-Z5DuwrqW.d.mts → agent-mcp.d-C-2S9bnP.d.mts} +1 -1
  4. package/dist/{agent-mcp.d-CR5Ov83o.d.ts → agent-mcp.d-SIoCUP1I.d.ts} +1 -1
  5. package/dist/agent-runtime.cjs +5 -5
  6. package/dist/agent-runtime.d.mts +2 -2
  7. package/dist/agent-runtime.d.ts +2 -2
  8. package/dist/agent-runtime.mjs +4 -4
  9. package/dist/{analyzer-Z6TNEAET.mjs → analyzer-22BEYV7S.mjs} +126 -12
  10. package/dist/{analyzer-T76CN3S7.cjs → analyzer-LCSI3NSH.cjs} +132 -18
  11. package/dist/api/client.cjs +5 -4
  12. package/dist/api/client.d.mts +1 -1
  13. package/dist/api/client.d.ts +1 -1
  14. package/dist/api/client.mjs +3 -2
  15. package/dist/api/client.native.cjs +45 -0
  16. package/dist/api/client.native.d.mts +23 -0
  17. package/dist/api/client.native.d.ts +23 -0
  18. package/dist/api/client.native.mjs +45 -0
  19. package/dist/api/route-manager.cjs +7 -7
  20. package/dist/api/route-manager.d.mts +4 -4
  21. package/dist/api/route-manager.d.ts +4 -4
  22. package/dist/api/route-manager.mjs +6 -6
  23. package/dist/api/runtime.cjs +5 -5
  24. package/dist/api/runtime.d.mts +3 -3
  25. package/dist/api/runtime.d.ts +3 -3
  26. package/dist/api/runtime.mjs +4 -4
  27. package/dist/{api-client.d-CeA6tNA6.d.mts → api-client.d-BNLXNCXJ.d.mts} +1 -1
  28. package/dist/{api-client.d-BWcqZciH.d.ts → api-client.d-ddQBNGtu.d.ts} +1 -1
  29. package/dist/api.cjs +11 -11
  30. package/dist/api.d.mts +5 -5
  31. package/dist/api.d.ts +5 -5
  32. package/dist/api.mjs +10 -10
  33. package/dist/{app-manifest.d-CAHkOBFa.d.mts → app-manifest.d-DrSAHskY.d.mts} +1 -1
  34. package/dist/{app-manifest.d-DiWr_Jfx.d.ts → app-manifest.d-Tb3CJpL4.d.ts} +1 -1
  35. package/dist/app-markdown.cjs +7 -7
  36. package/dist/app-markdown.d.mts +3 -3
  37. package/dist/app-markdown.d.ts +3 -3
  38. package/dist/app-markdown.mjs +6 -6
  39. package/dist/{app.d-DmapqkbV.d.ts → app.d-CmWlYpZJ.d.ts} +9 -4
  40. package/dist/{app.d-BfgJCsTQ.d.mts → app.d-D6QQM_kk.d.mts} +9 -4
  41. package/dist/{chunk-SN5VSO3Q.mjs → chunk-25T5VXOE.mjs} +7 -9
  42. package/dist/{chunk-GUJTVM36.cjs → chunk-2FRLSDBT.cjs} +1 -1
  43. package/dist/{chunk-LM2YOGDK.mjs → chunk-2I6PUKWJ.mjs} +1 -1
  44. package/dist/{chunk-EIMK7D2D.mjs → chunk-2KTYMMWT.mjs} +34 -4
  45. package/dist/{chunk-B5BBTPJQ.cjs → chunk-2OF5RPVU.cjs} +14 -14
  46. package/dist/chunk-37PYUEK5.mjs +533 -0
  47. package/dist/chunk-3HLQTOVU.cjs +6 -0
  48. package/dist/{chunk-VSLM6BHX.cjs → chunk-3OJNNCDL.cjs} +9 -9
  49. package/dist/{chunk-X3JNB2TB.mjs → chunk-3PX4AIXO.mjs} +36 -5
  50. package/dist/{chunk-UQHIWZZ6.cjs → chunk-3TL3AH25.cjs} +12 -6
  51. package/dist/chunk-3YMLUNL2.cjs +251 -0
  52. package/dist/chunk-4JTQPOKO.cjs +137 -0
  53. package/dist/{chunk-QXPSWMUD.cjs → chunk-4P23B7DU.cjs} +5 -5
  54. package/dist/{chunk-YVJV7Q2X.mjs → chunk-55U5QIXQ.mjs} +1 -1
  55. package/dist/{chunk-5N7QAGEA.cjs → chunk-5JNUYGNF.cjs} +37 -7
  56. package/dist/{chunk-NJLTQR5P.cjs → chunk-6BJJYOFL.cjs} +7 -7
  57. package/dist/chunk-6UUH4N4J.mjs +251 -0
  58. package/dist/{chunk-2NHOYYUT.mjs → chunk-7H45IJWO.mjs} +2 -2
  59. package/dist/{chunk-NN3MOPSI.mjs → chunk-A2MN5PQJ.mjs} +7 -7
  60. package/dist/{chunk-KY32FWK7.mjs → chunk-BHJAYPYU.mjs} +2 -2
  61. package/dist/{chunk-VAHBCI6X.mjs → chunk-BQWBHWEW.mjs} +26 -1
  62. package/dist/{chunk-KJMWAUKE.mjs → chunk-C7GJDVN4.mjs} +1 -1
  63. package/dist/{chunk-OYNNA4DD.cjs → chunk-CBKRS3M4.cjs} +9 -9
  64. package/dist/{chunk-I2DQGS56.cjs → chunk-CBOEJ5Z4.cjs} +39 -41
  65. package/dist/{chunk-BOVGCUDZ.cjs → chunk-CI4UNQHO.cjs} +2 -2
  66. package/dist/{chunk-S5AQ7CAC.cjs → chunk-CNNBFGL5.cjs} +39 -14
  67. package/dist/chunk-D2X5MUF5.cjs +1457 -0
  68. package/dist/{chunk-LEIXUFJN.cjs → chunk-D4MRNBVF.cjs} +10 -9
  69. package/dist/{chunk-2KVDHNQS.mjs → chunk-D7LTCK3U.mjs} +2 -2
  70. package/dist/{chunk-J3LBO2O4.cjs → chunk-DPJ66FSI.cjs} +22 -22
  71. package/dist/{chunk-NYQSC4DX.cjs → chunk-DZPR2W6U.cjs} +5 -5
  72. package/dist/{chunk-GW4YUIHW.mjs → chunk-E72UD6ME.mjs} +1 -1
  73. package/dist/chunk-EFZGB7JC.cjs +114 -0
  74. package/dist/{chunk-XXXRRVY6.mjs → chunk-EGVC4LIG.mjs} +5 -5
  75. package/dist/{chunk-72NBDVWQ.mjs → chunk-EXUONJYV.mjs} +3 -3
  76. package/dist/{chunk-VS7EHLLW.mjs → chunk-EZ34EHQP.mjs} +1 -1
  77. package/dist/{chunk-FM2UEKS2.mjs → chunk-F6Y7ZAPQ.mjs} +2 -2
  78. package/dist/{chunk-LMFJCXDD.mjs → chunk-FN5UEC7I.mjs} +1 -1
  79. package/dist/{chunk-E6LTONL4.mjs → chunk-FORSVMEJ.mjs} +2 -2
  80. package/dist/{chunk-6CYQQQGR.mjs → chunk-HPWB57PZ.mjs} +1 -1
  81. package/dist/{chunk-Y2G5SJFB.mjs → chunk-IFHPDLIS.mjs} +1 -1
  82. package/dist/{chunk-GNJIYJMS.cjs → chunk-IFXSBJPN.cjs} +16 -16
  83. package/dist/{chunk-74Z5KX4A.mjs → chunk-ILMTRGBG.mjs} +309 -56
  84. package/dist/{chunk-NXBHYO7S.cjs → chunk-JBK7UJOI.cjs} +14 -11
  85. package/dist/chunk-JI5D7MXY.mjs +137 -0
  86. package/dist/{chunk-QXJADAQB.cjs → chunk-JIBEFLQ7.cjs} +6 -2
  87. package/dist/{chunk-LZ4SB57H.mjs → chunk-JPIUGDK4.mjs} +1 -1
  88. package/dist/{chunk-Y3N5BFRJ.mjs → chunk-JSDV2NUN.mjs} +1 -1
  89. package/dist/{chunk-IRSS4HS4.mjs → chunk-K3RU5MOR.mjs} +1 -1
  90. package/dist/chunk-KPOMS5RO.cjs +237 -0
  91. package/dist/{chunk-LAZK6UV7.mjs → chunk-KVW2M6PI.mjs} +1 -1
  92. package/dist/{chunk-5IONBVJY.cjs → chunk-LB3DPQP6.cjs} +22 -22
  93. package/dist/{chunk-CZ35L6PL.mjs → chunk-LJVNMGE3.mjs} +10 -4
  94. package/dist/chunk-LLZSYFOM.mjs +6 -0
  95. package/dist/{chunk-X2AMN2WV.cjs → chunk-LQNW3ABP.cjs} +10 -10
  96. package/dist/{chunk-6ONBZGVH.cjs → chunk-LRB5OVRT.cjs} +3 -3
  97. package/dist/{chunk-WJFFPXCV.cjs → chunk-LT4VAF5Z.cjs} +12 -10
  98. package/dist/{chunk-F6TLUMH7.mjs → chunk-M53MIIXY.mjs} +1 -1
  99. package/dist/{chunk-HIFIG6HL.cjs → chunk-MEQN6DDA.cjs} +5 -5
  100. package/dist/{chunk-XLRLSTJ6.cjs → chunk-MGKW5XZE.cjs} +7 -7
  101. package/dist/{chunk-B3GZAQSC.cjs → chunk-MHLNWRCJ.cjs} +3 -3
  102. package/dist/{chunk-5ENW27SL.mjs → chunk-MMK4MZUN.mjs} +1 -1
  103. package/dist/{chunk-DTU4PX7V.cjs → chunk-MTWXOEI4.cjs} +927 -629
  104. package/dist/chunk-NHD7BAKD.mjs +1457 -0
  105. package/dist/{chunk-NPQLMP7M.cjs → chunk-NQJDO7K7.cjs} +32 -31
  106. package/dist/{chunk-76GHW3WI.cjs → chunk-O27PLNQZ.cjs} +10 -10
  107. package/dist/{chunk-PIHKO25G.mjs → chunk-OM7WILES.mjs} +1 -1
  108. package/dist/{chunk-7UPCJDB5.mjs → chunk-PCXIJKPM.mjs} +8 -8
  109. package/dist/{chunk-IWFV5ZED.cjs → chunk-PMJSG4JS.cjs} +1 -1
  110. package/dist/{chunk-JATTVAHA.cjs → chunk-PRFNLQSP.cjs} +4 -4
  111. package/dist/{chunk-SBABQKPT.cjs → chunk-QAS7KE7J.cjs} +7 -7
  112. package/dist/chunk-QGOZLGVP.mjs +0 -0
  113. package/dist/{chunk-VQJYGZNX.cjs → chunk-QMNWKQL4.cjs} +1 -1
  114. package/dist/{chunk-XB24LZWI.cjs → chunk-QRX4JRBO.cjs} +3 -3
  115. package/dist/{chunk-LNM57D3H.cjs → chunk-R53QDV6T.cjs} +4 -4
  116. package/dist/{chunk-SUV6YO4Q.cjs → chunk-RAWWCDCT.cjs} +5 -5
  117. package/dist/{chunk-LJDIFIJ2.mjs → chunk-RPUJHJHE.mjs} +4 -4
  118. package/dist/{chunk-G2KTRMWA.mjs → chunk-RSEAX5MW.mjs} +4 -0
  119. package/dist/chunk-SJRCWF4Z.mjs +237 -0
  120. package/dist/{chunk-IBSAYAWB.mjs → chunk-SX7EECTS.mjs} +8 -5
  121. package/dist/{chunk-KBRZAYI7.mjs → chunk-T4TBK5NY.mjs} +2 -2
  122. package/dist/{chunk-4SSRBCBR.mjs → chunk-T7I62A4C.mjs} +619 -321
  123. package/dist/{chunk-E36C43IX.cjs → chunk-U4BJKNIR.cjs} +6 -6
  124. package/dist/{chunk-YU42A5MA.cjs → chunk-UDJY2ZGY.cjs} +533 -280
  125. package/dist/{chunk-SHS6KXOZ.mjs → chunk-UR25Z5Z6.mjs} +1 -1
  126. package/dist/{chunk-WZW6LEHM.cjs → chunk-UYSTTPYJ.cjs} +1590 -1019
  127. package/dist/{chunk-KRRZJ77U.mjs → chunk-UZZ6IEQP.mjs} +3 -3
  128. package/dist/{chunk-EKJYE4Y7.cjs → chunk-VGG74PSU.cjs} +25 -25
  129. package/dist/{chunk-CTM4SPB3.mjs → chunk-VPTWKOCY.mjs} +20 -19
  130. package/dist/{chunk-UN6N623E.mjs → chunk-VQJHT2ND.mjs} +2 -2
  131. package/dist/{chunk-SJ23LJ3N.cjs → chunk-VVTJTMGQ.cjs} +3 -3
  132. package/dist/{chunk-KHXAJ2KA.cjs → chunk-W2RZ73IU.cjs} +12 -12
  133. package/dist/{chunk-JWI5PUO2.mjs → chunk-W2ZXMMHA.mjs} +2 -1
  134. package/dist/{chunk-BLD5GVCG.mjs → chunk-W6QLRQ3V.mjs} +1 -1
  135. package/dist/{chunk-AV26KHTG.mjs → chunk-X2CZTWQA.mjs} +2 -2
  136. package/dist/chunk-XPIPMWY3.cjs +1 -0
  137. package/dist/chunk-XTG73QZA.cjs +533 -0
  138. package/dist/{chunk-XPMC4E2G.cjs → chunk-XVSBALOY.cjs} +3 -3
  139. package/dist/{chunk-XYL4HSVC.cjs → chunk-YI6FKTTN.cjs} +38 -7
  140. package/dist/{chunk-N77JBPLC.mjs → chunk-YSXTNSXS.mjs} +10 -8
  141. package/dist/{chunk-EHB77D5U.cjs → chunk-ZDAEHG2O.cjs} +3 -3
  142. package/dist/{chunk-PMKUU273.mjs → chunk-ZFUKPWFC.mjs} +1226 -655
  143. package/dist/{chunk-E73PGHSR.mjs → chunk-ZMHAFH4R.mjs} +8 -8
  144. package/dist/{chunk-ZOWNWHK6.cjs → chunk-ZNH6NR3H.cjs} +2 -2
  145. package/dist/chunk-ZNXTU4YH.mjs +114 -0
  146. package/dist/{chunk-PFV2KPDZ.cjs → chunk-ZOYKJBP5.cjs} +3 -3
  147. package/dist/{chunk-CECUDGXQ.cjs → chunk-ZP32GNJQ.cjs} +13 -13
  148. package/dist/{chunk-72D2NX77.mjs → chunk-ZZ2QKCKW.mjs} +1 -1
  149. package/dist/{client-plugins.d-Bx3FXpqm.d.mts → client-plugins.d-CgQQ-EAv.d.mts} +25 -4
  150. package/dist/{client-plugins.d-TiLbS5j4.d.ts → client-plugins.d-vXrbcfJ1.d.ts} +25 -4
  151. package/dist/client-plugins.d.mts +2 -2
  152. package/dist/client-plugins.d.ts +2 -2
  153. package/dist/client.cjs +9 -9
  154. package/dist/client.d.mts +9 -9
  155. package/dist/client.d.ts +9 -9
  156. package/dist/client.mjs +9 -9
  157. package/dist/{config.d-iRPI16ku.d.mts → config.d-DqZkLwef.d.mts} +146 -1
  158. package/dist/{config.d-iRPI16ku.d.ts → config.d-DqZkLwef.d.ts} +146 -1
  159. package/dist/config.d.mts +2 -2
  160. package/dist/config.d.ts +2 -2
  161. package/dist/cron.cjs +3 -3
  162. package/dist/cron.d.mts +10 -0
  163. package/dist/cron.d.ts +10 -0
  164. package/dist/cron.mjs +2 -2
  165. package/dist/desktop.d.mts +3 -3
  166. package/dist/desktop.d.ts +3 -3
  167. package/dist/{devtools-UQLDAOEI.mjs → devtools-KQZ6SRCJ.mjs} +16 -16
  168. package/dist/{devtools-6XWCZIGO.cjs → devtools-UF6JYHUN.cjs} +18 -18
  169. package/dist/docs.cjs +19 -19
  170. package/dist/docs.d.mts +3 -3
  171. package/dist/docs.d.ts +3 -3
  172. package/dist/docs.mjs +18 -18
  173. package/dist/index.cjs +99 -95
  174. package/dist/{index.d-yueUNipJ.d.ts → index.d-DlCELfhf.d.ts} +1 -1
  175. package/dist/{index.d-YxJ2AiDF.d.mts → index.d-Dmfb7Kb_.d.mts} +1 -1
  176. package/dist/index.d.mts +18 -18
  177. package/dist/index.d.ts +18 -18
  178. package/dist/index.mjs +139 -135
  179. package/dist/integrations.cjs +5 -5
  180. package/dist/integrations.d.mts +2 -2
  181. package/dist/integrations.d.ts +2 -2
  182. package/dist/integrations.mjs +4 -4
  183. package/dist/internal/app-markdown-runtime.cjs +6 -6
  184. package/dist/internal/app-markdown-runtime.d.mts +3 -3
  185. package/dist/internal/app-markdown-runtime.d.ts +3 -3
  186. package/dist/internal/app-markdown-runtime.mjs +5 -5
  187. package/dist/internal/build-runtime.cjs +52 -50
  188. package/dist/internal/build-runtime.d.mts +4 -4
  189. package/dist/internal/build-runtime.d.ts +4 -4
  190. package/dist/internal/build-runtime.mjs +51 -49
  191. package/dist/internal/cli-runtime.cjs +28 -28
  192. package/dist/internal/cli-runtime.mjs +28 -28
  193. package/dist/internal/client-error-overlay.cjs +4 -4
  194. package/dist/internal/client-error-overlay.mjs +1 -1
  195. package/dist/internal/client-runtime.cjs +20 -15
  196. package/dist/internal/client-runtime.d.mts +5 -5
  197. package/dist/internal/client-runtime.d.ts +5 -5
  198. package/dist/internal/client-runtime.mjs +8 -3
  199. package/dist/internal/compression-runtime.d.mts +2 -2
  200. package/dist/internal/compression-runtime.d.ts +2 -2
  201. package/dist/internal/config-runtime.cjs +18 -18
  202. package/dist/internal/config-runtime.d.mts +119 -7
  203. package/dist/internal/config-runtime.d.ts +119 -7
  204. package/dist/internal/config-runtime.mjs +17 -17
  205. package/dist/internal/infra-analytics-runtime.cjs +11 -11
  206. package/dist/internal/infra-analytics-runtime.mjs +9 -9
  207. package/dist/internal/islands-boot.cjs +211 -0
  208. package/dist/internal/islands-boot.d.mts +8 -0
  209. package/dist/internal/islands-boot.d.ts +8 -0
  210. package/dist/internal/islands-boot.mjs +211 -0
  211. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  212. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  213. package/dist/internal/production-runtime.cjs +42 -28
  214. package/dist/internal/production-runtime.d.mts +50 -12
  215. package/dist/internal/production-runtime.d.ts +50 -12
  216. package/dist/internal/production-runtime.mjs +52 -38
  217. package/dist/markdown.cjs +7 -5
  218. package/dist/markdown.d.mts +2 -2
  219. package/dist/markdown.d.ts +2 -2
  220. package/dist/markdown.mjs +6 -4
  221. package/dist/middleware.cjs +10 -10
  222. package/dist/middleware.d.mts +4 -4
  223. package/dist/middleware.d.ts +4 -4
  224. package/dist/middleware.mjs +9 -9
  225. package/dist/mobile.d.mts +43 -5
  226. package/dist/mobile.d.ts +43 -5
  227. package/dist/modules-VHD7BELU.mjs +13 -0
  228. package/dist/modules-WT5D3AWY.cjs +13 -0
  229. package/dist/native-specs-BD7HOTMJ.mjs +15 -0
  230. package/dist/native-specs-IQQRJOOW.cjs +15 -0
  231. package/dist/native-tree-6G5O53O3.cjs +27 -0
  232. package/dist/native-tree-VWNW2MQ2.mjs +27 -0
  233. package/dist/native.cjs +87 -0
  234. package/dist/native.d.mts +72 -0
  235. package/dist/native.d.ts +72 -0
  236. package/dist/native.mjs +87 -0
  237. package/dist/{navigation-delegate.d-HnDXhlyP.d.mts → navigation-delegate.d-CnOTWOyi.d.mts} +1 -1
  238. package/dist/{navigation-delegate.d-BY1e_Xrh.d.ts → navigation-delegate.d-JXx40JzR.d.ts} +1 -1
  239. package/dist/navigation.cjs +5 -5
  240. package/dist/navigation.d.mts +5 -5
  241. package/dist/navigation.d.ts +5 -5
  242. package/dist/navigation.mjs +4 -4
  243. package/dist/{nitro-R444AF3O.mjs → nitro-FLN6DRGJ.mjs} +7 -7
  244. package/dist/{nitro-CK7M4RMY.cjs → nitro-HXAZZQKY.cjs} +12 -12
  245. package/dist/plugin.cjs +43 -42
  246. package/dist/plugin.d.mts +5 -4
  247. package/dist/plugin.d.ts +5 -4
  248. package/dist/plugin.mjs +42 -41
  249. package/dist/port-C6GBH4C6.cjs +419 -0
  250. package/dist/port-WOOQ3V56.mjs +419 -0
  251. package/dist/{production-runtime.d-BpJUDzP8.d.mts → production-runtime.d-CP5s6RuY.d.mts} +1 -1
  252. package/dist/{production-runtime.d-lMjvE9cf.d.ts → production-runtime.d-N-cE3pmy.d.ts} +1 -1
  253. package/dist/{programmatic-routes-client.d-BlFp5hv4.d.ts → programmatic-routes-client.d-CLG2N1yH.d.ts} +2 -2
  254. package/dist/{programmatic-routes-client.d-6CGQ3TCk.d.mts → programmatic-routes-client.d-CPbNqtIi.d.mts} +2 -2
  255. package/dist/query/client.cjs +6 -6
  256. package/dist/query/client.mjs +2 -2
  257. package/dist/{render-plan.d-DhP0mTHF.d.ts → render-plan.d-B9lAP3uX.d.ts} +1 -1
  258. package/dist/{render-plan.d-BH9edqKs.d.mts → render-plan.d-DZ-qjjdG.d.mts} +1 -1
  259. package/dist/renderer/react/server.cjs +2 -2
  260. package/dist/renderer/react/server.mjs +3 -3
  261. package/dist/renderer-client.cjs +6 -6
  262. package/dist/renderer-client.d.mts +5 -5
  263. package/dist/renderer-client.d.ts +5 -5
  264. package/dist/renderer-client.mjs +2 -2
  265. package/dist/{request.d-BVZrsR1v.d.ts → request.d-BiicaNxb.d.ts} +1 -1
  266. package/dist/{request.d-DJFRdKi8.d.mts → request.d-DV0oeUit.d.mts} +1 -1
  267. package/dist/request.d.mts +3 -3
  268. package/dist/request.d.ts +3 -3
  269. package/dist/{route-rendering.d-Bpmw7PED.d.mts → route-rendering.d-BrIKA51A.d.mts} +1 -1
  270. package/dist/{route-rendering.d-B00JtK_-.d.ts → route-rendering.d-Iss0C7GR.d.ts} +1 -1
  271. package/dist/{router.d-Bd1x9XxQ.d.ts → router.d-DjGn_al7.d.ts} +1 -1
  272. package/dist/{router.d-e0jQ3jQ-.d.mts → router.d-mNTbOGV_.d.mts} +1 -1
  273. package/dist/{routes.d-D96Dq9lz.d.ts → routes.d-BKSjHuH9.d.ts} +27 -4
  274. package/dist/{routes.d-Cmv8TgVq.d.mts → routes.d-qd8Qf4LG.d.mts} +27 -4
  275. package/dist/routes.d.mts +2 -2
  276. package/dist/routes.d.ts +2 -2
  277. package/dist/{rsc-pipeline-DX4OC5FN.cjs → rsc-pipeline-SVLBTY7H.cjs} +21 -21
  278. package/dist/{rsc-pipeline-ZQ4CTVEG.mjs → rsc-pipeline-WBLBDQXA.mjs} +20 -20
  279. package/dist/{runtime-NQ3EDSA7.cjs → runtime-DGUOWSMF.cjs} +307 -48
  280. package/dist/{runtime-NPDRDV6R.mjs → runtime-HFZTVNFF.mjs} +298 -39
  281. package/dist/{runtime.d-CgB3IJDq.d.mts → runtime.d-BNVbojF1.d.mts} +1 -1
  282. package/dist/{runtime.d-D-td-RR3.d.ts → runtime.d-Bm_4hP5T.d.ts} +1 -1
  283. package/dist/{schema-dev-notice-F6QYSOAI.mjs → schema-dev-notice-JMXEQWIQ.mjs} +3 -3
  284. package/dist/{schema-dev-notice-UU7DMZEU.cjs → schema-dev-notice-PLBFDTOF.cjs} +6 -6
  285. package/dist/server-fn-client.d.mts +1 -1
  286. package/dist/server-fn-client.d.ts +1 -1
  287. package/dist/server-plugins.cjs +1 -1
  288. package/dist/server-plugins.d.mts +3 -3
  289. package/dist/server-plugins.d.ts +3 -3
  290. package/dist/server-plugins.mjs +1 -1
  291. package/dist/server.cjs +82 -81
  292. package/dist/server.d.mts +12 -11
  293. package/dist/server.d.ts +12 -11
  294. package/dist/server.mjs +65 -64
  295. package/dist/session-2Q72D4QV.cjs +23 -0
  296. package/dist/{session-IGEDQ5PY.mjs → session-QZXZOPR2.mjs} +2 -2
  297. package/dist/shell-render.d-CG6bPiiA.d.mts +41 -0
  298. package/dist/shell-render.d-CG6bPiiA.d.ts +41 -0
  299. package/dist/{spa-router.d-CO01mVOM.d.ts → spa-router.d-DAtnNoBe.d.ts} +11 -2
  300. package/dist/{spa-router.d-BWDhS0FK.d.mts → spa-router.d-DHDoXxDE.d.mts} +11 -2
  301. package/dist/testing.cjs +7 -7
  302. package/dist/testing.d.mts +2 -2
  303. package/dist/testing.d.ts +2 -2
  304. package/dist/testing.mjs +6 -6
  305. package/dist/{utils.d-B77__yh8.d.ts → utils.d-DwZ-KLSB.d.ts} +7 -1
  306. package/dist/{utils.d-DRDazhCA.d.mts → utils.d-uKZcKJk4.d.mts} +7 -1
  307. package/dist/version.cjs +2 -2
  308. package/dist/version.mjs +1 -1
  309. package/dist/vite.cjs +43 -42
  310. package/dist/vite.d.mts +17 -6
  311. package/dist/vite.d.ts +17 -6
  312. package/dist/vite.mjs +42 -41
  313. package/dist/workflows.cjs +3 -3
  314. package/dist/workflows.mjs +2 -2
  315. package/package.json +17 -3
  316. package/dist/agent-mcp-handler-RT3COCEL.cjs +0 -18
  317. package/dist/session-AAU7RNRO.cjs +0 -23
  318. package/dist/{chunk-7FVVQEVL.cjs → chunk-4BS3HSY7.cjs} +2 -2
  319. package/dist/{chunk-N7JQXQAV.cjs → chunk-5OJVKXFV.cjs} +2 -2
  320. package/dist/{chunk-WSDKXV4E.mjs → chunk-72KABRWN.mjs} +4 -4
  321. package/dist/{chunk-C3BOESDW.mjs → chunk-B4CWYGCG.mjs} +3 -3
@@ -37,10 +37,13 @@ var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
37
37
 
38
38
 
39
39
 
40
- var _chunkWZW6LEHMcjs = require('./chunk-WZW6LEHM.cjs');
41
40
 
42
41
 
43
- var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
42
+
43
+ var _chunkUYSTTPYJcjs = require('./chunk-UYSTTPYJ.cjs');
44
+
45
+
46
+ var _chunkR53QDV6Tcjs = require('./chunk-R53QDV6T.cjs');
44
47
 
45
48
 
46
49
  var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
@@ -50,7 +53,7 @@ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
50
53
 
51
54
 
52
55
 
53
- var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
56
+ var _chunk3TL3AH25cjs = require('./chunk-3TL3AH25.cjs');
54
57
 
55
58
 
56
59
 
@@ -61,7 +64,10 @@ var _chunkUQHIWZZ6cjs = require('./chunk-UQHIWZZ6.cjs');
61
64
 
62
65
 
63
66
 
64
- var _chunk76GHW3WIcjs = require('./chunk-76GHW3WI.cjs');
67
+ var _chunkO27PLNQZcjs = require('./chunk-O27PLNQZ.cjs');
68
+
69
+
70
+ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
65
71
 
66
72
 
67
73
  var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
@@ -79,10 +85,10 @@ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
79
85
 
80
86
 
81
87
 
82
- var _chunkJ3LBO2O4cjs = require('./chunk-J3LBO2O4.cjs');
88
+ var _chunkDPJ66FSIcjs = require('./chunk-DPJ66FSI.cjs');
83
89
 
84
90
 
85
- var _chunkSBABQKPTcjs = require('./chunk-SBABQKPT.cjs');
91
+ var _chunkQAS7KE7Jcjs = require('./chunk-QAS7KE7J.cjs');
86
92
 
87
93
 
88
94
  var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
@@ -97,11 +103,6 @@ var _chunkNK2VWS7Pcjs = require('./chunk-NK2VWS7P.cjs');
97
103
 
98
104
 
99
105
 
100
-
101
- var _chunkJATTVAHAcjs = require('./chunk-JATTVAHA.cjs');
102
-
103
-
104
-
105
106
  var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
106
107
 
107
108
 
@@ -129,10 +130,15 @@ var _chunkRD623KW4cjs = require('./chunk-RD623KW4.cjs');
129
130
 
130
131
 
131
132
 
132
- var _chunkNYQSC4DXcjs = require('./chunk-NYQSC4DX.cjs');
133
+ var _chunkDZPR2W6Ucjs = require('./chunk-DZPR2W6U.cjs');
134
+
135
+
136
+ var _chunkMEQN6DDAcjs = require('./chunk-MEQN6DDA.cjs');
133
137
 
134
138
 
135
- var _chunkHIFIG6HLcjs = require('./chunk-HIFIG6HL.cjs');
139
+
140
+
141
+ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
136
142
 
137
143
 
138
144
 
@@ -144,7 +150,7 @@ var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
144
150
 
145
151
 
146
152
 
147
- var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
153
+ var _chunkPRFNLQSPcjs = require('./chunk-PRFNLQSP.cjs');
148
154
 
149
155
 
150
156
 
@@ -153,7 +159,7 @@ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
153
159
 
154
160
 
155
161
 
156
- var _chunkWJFFPXCVcjs = require('./chunk-WJFFPXCV.cjs');
162
+ var _chunkLT4VAF5Zcjs = require('./chunk-LT4VAF5Z.cjs');
157
163
 
158
164
 
159
165
 
@@ -164,10 +170,10 @@ var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
164
170
 
165
171
 
166
172
 
167
- var _chunkCECUDGXQcjs = require('./chunk-CECUDGXQ.cjs');
173
+ var _chunkZP32GNJQcjs = require('./chunk-ZP32GNJQ.cjs');
168
174
 
169
175
 
170
- var _chunkX2AMN2WVcjs = require('./chunk-X2AMN2WV.cjs');
176
+ var _chunkLQNW3ABPcjs = require('./chunk-LQNW3ABP.cjs');
171
177
 
172
178
 
173
179
 
@@ -183,7 +189,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
183
189
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
184
190
 
185
191
 
186
- var _chunkKHXAJ2KAcjs = require('./chunk-KHXAJ2KA.cjs');
192
+ var _chunkW2RZ73IUcjs = require('./chunk-W2RZ73IU.cjs');
187
193
 
188
194
 
189
195
  var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
@@ -193,10 +199,10 @@ var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
193
199
  var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
194
200
 
195
201
 
196
- var _chunkOYNNA4DDcjs = require('./chunk-OYNNA4DD.cjs');
202
+ var _chunkCBKRS3M4cjs = require('./chunk-CBKRS3M4.cjs');
197
203
 
198
204
 
199
- var _chunk6ONBZGVHcjs = require('./chunk-6ONBZGVH.cjs');
205
+ var _chunkLRB5OVRTcjs = require('./chunk-LRB5OVRT.cjs');
200
206
 
201
207
 
202
208
 
@@ -218,7 +224,7 @@ var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
218
224
 
219
225
 
220
226
 
221
- var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
227
+ var _chunkQMNWKQL4cjs = require('./chunk-QMNWKQL4.cjs');
222
228
 
223
229
 
224
230
 
@@ -234,20 +240,20 @@ var _chunkEVIWKPJVcjs = require('./chunk-EVIWKPJV.cjs');
234
240
  var _chunkYIHRZBD7cjs = require('./chunk-YIHRZBD7.cjs');
235
241
 
236
242
 
243
+ var _chunk2OF5RPVUcjs = require('./chunk-2OF5RPVU.cjs');
237
244
 
238
245
 
239
246
 
240
247
 
241
- var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
242
248
 
243
249
 
244
- var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
250
+ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
245
251
 
246
252
 
247
- var _chunkGUJTVM36cjs = require('./chunk-GUJTVM36.cjs');
253
+ var _chunk2FRLSDBTcjs = require('./chunk-2FRLSDBT.cjs');
248
254
 
249
255
 
250
- var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
256
+ var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
251
257
 
252
258
 
253
259
 
@@ -703,7 +709,7 @@ function resolveFarmPageDataFailure(error) {
703
709
  }
704
710
 
705
711
  // src/openapi/dev-status.ts
706
- function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logger) {
712
+ function reportOpenAPIDevGenerationResult(spec, output = _chunkQMNWKQL4cjs.logger) {
707
713
  if (spec) {
708
714
  output.success("\u2705 OpenAPI documentation enabled");
709
715
  return;
@@ -714,13 +720,13 @@ function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logge
714
720
  // src/vite.ts
715
721
  var SERVER_FN_TRANSFORM_PLUGIN = "@farm.js/plugin/rsc:server-fn-actions";
716
722
  function farmLlmsTxtGeneratedPaths(config) {
717
- const llms = _chunkHIFIG6HLcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _39 => _39.agent, 'optionalAccess', _40 => _40.llmsTxt]));
723
+ const llms = _chunkMEQN6DDAcjs.resolveFarmLlmsTxtConfig.call(void 0, _optionalChain([config, 'access', _39 => _39.agent, 'optionalAccess', _40 => _40.llmsTxt]));
718
724
  if (!llms.enabled) return [];
719
725
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
720
726
  }
721
727
  function farmAgentGeneratedPaths(config) {
722
- const crawlers = _chunkNYQSC4DXcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _41 => _41.agent, 'optionalAccess', _42 => _42.crawlers]));
723
- const sitemap = _chunkNYQSC4DXcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _43 => _43.agent, 'optionalAccess', _44 => _44.sitemap]));
728
+ const crawlers = _chunkDZPR2W6Ucjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _41 => _41.agent, 'optionalAccess', _42 => _42.crawlers]));
729
+ const sitemap = _chunkDZPR2W6Ucjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _43 => _43.agent, 'optionalAccess', _44 => _44.sitemap]));
724
730
  return [
725
731
  ...farmLlmsTxtGeneratedPaths(config),
726
732
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -765,7 +771,7 @@ function loadFarmWorkflowsDevRuntime() {
765
771
  return import("./workflows.cjs");
766
772
  }
767
773
  function loadFarmDevtoolsSnapshotRuntime() {
768
- return import("./devtools-6XWCZIGO.cjs");
774
+ return import("./devtools-UF6JYHUN.cjs");
769
775
  }
770
776
  function loadFarmDevtoolsUIRuntime() {
771
777
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -792,14 +798,14 @@ function farmI18nClientBridgePlugin() {
792
798
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
793
799
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
794
800
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
795
- function createFarmPlatformClientModule() {
796
- return `export function platform() { return ${JSON.stringify(_chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))}; }
801
+ function createFarmPlatformClientModule(platform) {
802
+ return `export function platform() { return ${JSON.stringify(platform)}; }
797
803
  export function appDataDir() {
798
804
  throw new Error("[Farm] appDataDir() is server-only. Read and write app data from a server function or API route.");
799
805
  }
800
806
  `;
801
807
  }
802
- function farmServerOnlyEntriesPlugin() {
808
+ function farmServerOnlyEntriesPlugin(options = {}) {
803
809
  let root = process.cwd();
804
810
  let vercelOgInstalled = false;
805
811
  return {
@@ -813,14 +819,14 @@ function farmServerOnlyEntriesPlugin() {
813
819
  configResolved(config) {
814
820
  root = config.root;
815
821
  },
816
- resolveId(id, importer, options) {
817
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options, 'optionalAccess', _46 => _46.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
818
- if (!_optionalChain([options, 'optionalAccess', _47 => _47.ssr]) && _module.isBuiltin.call(void 0, id)) {
819
- return _chunkNK2VWS7Pcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options);
822
+ resolveId(id, importer, options2) {
823
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _46 => _46.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
824
+ if (!_optionalChain([options2, 'optionalAccess', _47 => _47.ssr]) && _module.isBuiltin.call(void 0, id)) {
825
+ return _chunkNK2VWS7Pcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
820
826
  }
821
827
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
822
828
  const importedBy = importer ? ` (imported by ${importer})` : "";
823
- if (!_optionalChain([options, 'optionalAccess', _48 => _48.ssr])) {
829
+ if (!_optionalChain([options2, 'optionalAccess', _48 => _48.ssr])) {
824
830
  this.error(
825
831
  `${id} is server-only and cannot be imported into client code${importedBy}. Use it from an API route or another server module.`
826
832
  );
@@ -834,7 +840,9 @@ function farmServerOnlyEntriesPlugin() {
834
840
  return null;
835
841
  },
836
842
  load(id) {
837
- if (id === FARM_PLATFORM_CLIENT_ID) return createFarmPlatformClientModule();
843
+ if (id === FARM_PLATFORM_CLIENT_ID) {
844
+ return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
845
+ }
838
846
  return _nullishCoalesce(_chunkNK2VWS7Pcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
839
847
  }
840
848
  };
@@ -867,7 +875,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
867
875
  if (!snapshot) return "";
868
876
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
869
877
  if (snapshot.routing === "none") return runtime;
870
- return `${_chunk76GHW3WIcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
878
+ return `${_chunkO27PLNQZcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
871
879
  }
872
880
  function getPublicEnvDefine(config) {
873
881
  const publicEnv = _optionalChain([config, 'access', _49 => _49.env, 'optionalAccess', _50 => _50.public]);
@@ -1172,7 +1180,7 @@ function getEnvDefines(config, configEnv) {
1172
1180
  }
1173
1181
  function getFarmAPIBaseURLDefine(config) {
1174
1182
  const baseURL = _optionalChain([config, 'access', _58 => _58.api, 'optionalAccess', _59 => _59.baseURL]);
1175
- return typeof baseURL === "string" && baseURL ? baseURL : _chunkIWFV5ZEDcjs.DEFAULT_FARM_API_BASE_PATH;
1183
+ return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1176
1184
  }
1177
1185
  function isResolvedEnvScope(value) {
1178
1186
  if (!value || typeof value !== "object" || Array.isArray(value)) {
@@ -1218,8 +1226,8 @@ function rewriteEarlySsrRelativeImports(options) {
1218
1226
  const sourcePath = suffixIndex === -1 ? source.value : source.value.slice(0, suffixIndex);
1219
1227
  const suffix = suffixIndex === -1 ? "" : source.value.slice(suffixIndex);
1220
1228
  const resolvedPath = path5.resolve(path5.dirname(cleanId), sourcePath);
1221
- const moduleId = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, resolvedPath, options.root);
1222
- const specifier = moduleId.startsWith("/@fs/") ? _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
1229
+ const moduleId = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, resolvedPath, options.root);
1230
+ const specifier = moduleId.startsWith("/@fs/") ? _chunkQMNWKQL4cjs.toPosixPath.call(void 0, resolvedPath) : moduleId;
1223
1231
  replacements.push({
1224
1232
  start: source.start,
1225
1233
  end: source.end,
@@ -1250,7 +1258,7 @@ function transformIsolatedClientBoundaryModule(options) {
1250
1258
  const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
1251
1259
  wrapperStatements.push(
1252
1260
  // Islands mode renders through islx; the older isolated hydration keeps Farm's boundary.
1253
- options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
1261
+ options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
1254
1262
  );
1255
1263
  wrapperStatements.push(
1256
1264
  isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
@@ -1387,7 +1395,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
1387
1395
  return;
1388
1396
  }
1389
1397
  warnedClientBoundaryIds.add(id);
1390
- _chunkVQJYGZNXcjs.logger.warn(formatClientBoundaryWarning(id, findings));
1398
+ _chunkQMNWKQL4cjs.logger.warn(formatClientBoundaryWarning(id, findings));
1391
1399
  }
1392
1400
  function shouldEmitFarmClientRootHmr(renderer) {
1393
1401
  return _chunkRD623KW4cjs.getFarmRendererCapabilities.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
@@ -1401,7 +1409,7 @@ function hasViteAlias(alias, find) {
1401
1409
  }
1402
1410
  function farmPlugin(options = {}, initialPluginManager) {
1403
1411
  const imageImports = farmImageImportsPlugin();
1404
- const fontImports = _chunkWZW6LEHMcjs.farmFontImportsPlugin.call(void 0, {
1412
+ const fontImports = _chunkUYSTTPYJcjs.farmFontImportsPlugin.call(void 0, {
1405
1413
  root: options.root,
1406
1414
  basePath: options.basePath,
1407
1415
  publicDir: options.publicDir
@@ -1442,7 +1450,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1442
1450
  config(userConfig, configEnv) {
1443
1451
  isBuild = configEnv.command === "build";
1444
1452
  const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
1445
- const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} : _chunkWZW6LEHMcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1453
+ const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _83 => _83.resolve, 'optionalAccess', _84 => _84.alias]), "@") ? {} : _chunkUYSTTPYJcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1446
1454
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
1447
1455
  return {
1448
1456
  // Honor Farm's publicDir so the dev server serves the same static
@@ -1472,7 +1480,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1472
1480
  );
1473
1481
  reactRefreshActive = _chunk65Y5SIBHcjs.isFarmReactRefreshActive.call(void 0, config);
1474
1482
  if (_optionalChain([options, 'access', _88 => _88.experimental, 'optionalAccess', _89 => _89.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
1475
- _chunkVQJYGZNXcjs.logger.warn(
1483
+ _chunkQMNWKQL4cjs.logger.warn(
1476
1484
  "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."
1477
1485
  );
1478
1486
  }
@@ -1495,7 +1503,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1495
1503
  } catch (e12) {
1496
1504
  }
1497
1505
  };
1498
- farmApp = new (0, _chunkWZW6LEHMcjs.FarmApp)(
1506
+ farmApp = new (0, _chunkUYSTTPYJcjs.FarmApp)(
1499
1507
  {
1500
1508
  ...options,
1501
1509
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -1508,14 +1516,14 @@ function farmPlugin(options = {}, initialPluginManager) {
1508
1516
  if (_optionalChain([farmConfig, 'access', _92 => _92.agent, 'optionalAccess', _93 => _93.noindexPreviews])) {
1509
1517
  server.middlewares.use((_req, res, next) => {
1510
1518
  if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
1511
- res.setHeader("X-Robots-Tag", _chunkNYQSC4DXcjs.FARM_PREVIEW_ROBOTS_TAG);
1519
+ res.setHeader("X-Robots-Tag", _chunkDZPR2W6Ucjs.FARM_PREVIEW_ROBOTS_TAG);
1512
1520
  }
1513
1521
  next();
1514
1522
  });
1515
1523
  }
1516
- const apiServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
1524
+ const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
1517
1525
  const devBuiltInRoutePaths = new Set(
1518
- _chunkJ3LBO2O4cjs.listFarmBuiltInRoutePaths.call(void 0, {
1526
+ _chunkDPJ66FSIcjs.listFarmBuiltInRoutePaths.call(void 0, {
1519
1527
  agent: {
1520
1528
  apiCatalog: true,
1521
1529
  mcp: true,
@@ -1539,7 +1547,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1539
1547
  // a caller-controlled Host header.
1540
1548
  trustedLocalOrigin: () => _optionalChain([server, 'access', _94 => _94.resolvedUrls, 'optionalAccess', _95 => _95.local, 'access', _96 => _96[0]]),
1541
1549
  onError(error) {
1542
- _chunkVQJYGZNXcjs.logger.error(
1550
+ _chunkQMNWKQL4cjs.logger.error(
1543
1551
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
1544
1552
  );
1545
1553
  }
@@ -1565,7 +1573,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1565
1573
  );
1566
1574
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
1567
1575
  try {
1568
- const result = await _chunkUQHIWZZ6cjs.generateFarmTypeArtifacts.call(void 0, {
1576
+ const result = await _chunk3TL3AH25cjs.generateFarmTypeArtifacts.call(void 0, {
1569
1577
  root: farmConfig.root,
1570
1578
  srcDir: farmConfig.srcDir,
1571
1579
  layers: farmConfig.layers,
@@ -1594,7 +1602,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1594
1602
  }
1595
1603
  } catch (e) {
1596
1604
  const message = e instanceof Error ? e.message : String(e);
1597
- _chunkVQJYGZNXcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
1605
+ _chunkQMNWKQL4cjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
1598
1606
  if (pm) {
1599
1607
  await emitPluginError("type-artifact-generation", e, { reason });
1600
1608
  }
@@ -1647,7 +1655,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1647
1655
  let routeRefreshScheduled = null;
1648
1656
  let pendingRouteRefreshIncludesMiddleware = false;
1649
1657
  const scheduleTypeArtifactGen = (file, event, selection) => {
1650
- const normalizedFile = _chunkVQJYGZNXcjs.toPosixPath.call(void 0, file);
1658
+ const normalizedFile = _chunkQMNWKQL4cjs.toPosixPath.call(void 0, file);
1651
1659
  for (const [artifact, enabled] of Object.entries(selection)) {
1652
1660
  if (enabled) {
1653
1661
  pendingTypeArtifacts[artifact] = true;
@@ -1684,7 +1692,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1684
1692
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
1685
1693
  }
1686
1694
  if (isI18nCatalogFile(file)) {
1687
- _optionalChain([farmApp, 'optionalAccess', _104 => _104.getI18nRuntime, 'call', _105 => _105(), 'access', _106 => _106.reload, 'call', _107 => _107(), 'access', _108 => _108.then, 'call', _109 => _109(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _110 => _110.catch, 'call', _111 => _111((error) => _chunkVQJYGZNXcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1695
+ _optionalChain([farmApp, 'optionalAccess', _104 => _104.getI18nRuntime, 'call', _105 => _105(), 'access', _106 => _106.reload, 'call', _107 => _107(), 'access', _108 => _108.then, 'call', _109 => _109(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _110 => _110.catch, 'call', _111 => _111((error) => _chunkQMNWKQL4cjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1688
1696
  }
1689
1697
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
1690
1698
  if (isRouteRefreshEvent) {
@@ -1699,7 +1707,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1699
1707
  Promise.all([
1700
1708
  _optionalChain([refreshRouteDiscovery, 'optionalCall', _112 => _112(`${ev} ${file}`)]),
1701
1709
  reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _113 => _113.reload, 'call', _114 => _114()]) : void 0
1702
- ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkVQJYGZNXcjs.logger.warn(`Route refresh failed: ${error.message}`));
1710
+ ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkQMNWKQL4cjs.logger.warn(`Route refresh failed: ${error.message}`));
1703
1711
  }, 50);
1704
1712
  }
1705
1713
  }
@@ -1733,7 +1741,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1733
1741
  });
1734
1742
  }
1735
1743
  const dispatchToDevServer = _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server);
1736
- apiRouteManager = new (0, _chunkKHXAJ2KAcjs.APIRouteManager)(appDirs, server, {
1744
+ apiRouteManager = new (0, _chunkW2RZ73IUcjs.APIRouteManager)(appDirs, server, {
1737
1745
  plugins: farmConfig.plugins,
1738
1746
  i18n: farmApp.getI18nRuntime(),
1739
1747
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -1767,7 +1775,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1767
1775
  loadModule: async (workflow) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
1768
1776
  server: farmConfig.server
1769
1777
  });
1770
- _chunkVQJYGZNXcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
1778
+ _chunkQMNWKQL4cjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
1771
1779
  }
1772
1780
  }
1773
1781
  if (pm) {
@@ -1779,7 +1787,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1779
1787
  });
1780
1788
  }
1781
1789
  }
1782
- middlewareManager = new (0, _chunkX2AMN2WVcjs.MiddlewareManager)(
1790
+ middlewareManager = new (0, _chunkLQNW3ABPcjs.MiddlewareManager)(
1783
1791
  appDirs,
1784
1792
  server,
1785
1793
  farmConfig.middleware,
@@ -1821,7 +1829,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1821
1829
  await openAPIManager.invalidateCache();
1822
1830
  }
1823
1831
  if (process.env.FARM_VERBOSE) {
1824
- _chunkVQJYGZNXcjs.logger.info(`Refreshed routes: ${reason}`);
1832
+ _chunkQMNWKQL4cjs.logger.info(`Refreshed routes: ${reason}`);
1825
1833
  }
1826
1834
  };
1827
1835
  const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
@@ -1833,7 +1841,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1833
1841
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
1834
1842
  };
1835
1843
  releaseDocsMCPServers();
1836
- const isFarmDocsPathGuarded = (href) => _chunk76GHW3WIcjs.farmPathGuardCoversPage.call(void 0,
1844
+ const isFarmDocsPathGuarded = (href) => _chunkO27PLNQZcjs.farmPathGuardCoversPage.call(void 0,
1837
1845
  {
1838
1846
  config: farmConfig,
1839
1847
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -1846,7 +1854,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1846
1854
  clientEntry: "/@farm/client.js",
1847
1855
  resolveLayoutFonts: resolveDocsLayoutFonts,
1848
1856
  fontStylesheetHref: "/@farm/fonts.css",
1849
- globalStylesheetHref: _chunkWZW6LEHMcjs.resolveDevGlobalStylesheetHref.call(void 0,
1857
+ globalStylesheetHref: _chunkUYSTTPYJcjs.resolveDevGlobalStylesheetHref.call(void 0,
1850
1858
  farmConfig.root,
1851
1859
  farmConfig.srcDir
1852
1860
  ),
@@ -1861,7 +1869,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1861
1869
  return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _123 => _123.id]), () => ( specifier)));
1862
1870
  },
1863
1871
  registerMCPServer: (mcpServer) => {
1864
- const dispose = _chunk6ONBZGVHcjs.registerFarmMCPServer.call(void 0, mcpServer);
1872
+ const dispose = _chunkLRB5OVRTcjs.registerFarmMCPServer.call(void 0, mcpServer);
1865
1873
  docsMCPServerDisposers.add(dispose);
1866
1874
  return () => {
1867
1875
  docsMCPServerDisposers.delete(dispose);
@@ -1876,7 +1884,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1876
1884
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
1877
1885
  resolveLayoutFonts: resolveDocsLayoutFonts,
1878
1886
  fontStylesheetHref: "/@farm/fonts.css",
1879
- globalStylesheetHref: _chunkWZW6LEHMcjs.resolveDevGlobalStylesheetHref.call(void 0,
1887
+ globalStylesheetHref: _chunkUYSTTPYJcjs.resolveDevGlobalStylesheetHref.call(void 0,
1880
1888
  farmConfig.root,
1881
1889
  farmConfig.srcDir
1882
1890
  ),
@@ -1890,7 +1898,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1890
1898
  const matchedRoute = routeManager.matchRoute(pathname);
1891
1899
  const layoutEntries = matchedRoute.layouts.map((layout) => ({
1892
1900
  ...layout,
1893
- metadata: _chunkWZW6LEHMcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1901
+ metadata: _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1894
1902
  }));
1895
1903
  if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
1896
1904
  return response;
@@ -1918,7 +1926,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1918
1926
  (strategy) => strategy === hydrationStrategies[0]
1919
1927
  ) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
1920
1928
  const params = matchedRoute.params || {};
1921
- const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
1929
+ const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
1922
1930
  const clientLayouts = Object.fromEntries(
1923
1931
  layoutEntries.map((layout) => [
1924
1932
  layout.pattern,
@@ -2121,7 +2129,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2121
2129
  } else {
2122
2130
  if (!warnedDeprecatedDevtoolsDashboard) {
2123
2131
  warnedDeprecatedDevtoolsDashboard = true;
2124
- _chunkVQJYGZNXcjs.logger.warn(
2132
+ _chunkQMNWKQL4cjs.logger.warn(
2125
2133
  "The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
2126
2134
  );
2127
2135
  }
@@ -2154,9 +2162,9 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2154
2162
  if (_optionalChain([pm, 'optionalAccess', _148 => _148.hasRuntimeRequestHooks, 'call', _149 => _149()])) {
2155
2163
  try {
2156
2164
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
2157
- const route = _chunkJ3LBO2O4cjs.setFarmRouteLabel.call(void 0,
2165
+ const route = _chunkDPJ66FSIcjs.setFarmRouteLabel.call(void 0,
2158
2166
  { pathname: requestPathname },
2159
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkJ3LBO2O4cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2167
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkDPJ66FSIcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2160
2168
  );
2161
2169
  runtimeSession2 = await pm.beginRuntimeRequest(
2162
2170
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -2232,24 +2240,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2232
2240
  );
2233
2241
  return;
2234
2242
  }
2235
- if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false && _chunkJ3LBO2O4cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2243
+ if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.manifest]) !== false && _chunkDPJ66FSIcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2236
2244
  await serveBuiltInRoute(async () => {
2237
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkWZW6LEHMcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2238
- const manifest = await _chunkJ3LBO2O4cjs.createFarmAppManifestResponse.call(void 0,
2245
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkUYSTTPYJcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2246
+ const manifest = await _chunkDPJ66FSIcjs.createFarmAppManifestResponse.call(void 0,
2239
2247
  new Request(parsedRequestUrl, {
2240
2248
  method: requestMethod,
2241
2249
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
2242
2250
  }),
2243
2251
  {
2244
- ..._chunkJ3LBO2O4cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2252
+ ..._chunkDPJ66FSIcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2245
2253
  build: "development",
2246
2254
  packages: farmAppPackages,
2247
2255
  // Read again on each request; unchanged files come from a cache.
2248
- webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ? _chunkWZW6LEHMcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2256
+ webmcpTools: _optionalChain([farmConfig, 'access', _157 => _157.plugins, 'optionalAccess', _158 => _158.some, 'call', _159 => _159(({ name }) => name === "farm:webmcp")]) ? _chunkUYSTTPYJcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2249
2257
  }),
2250
2258
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
2251
2259
  // A guard written for an MCP server's path keeps its tools out of the public view.
2252
- guardCoversPath: (path6) => _chunk76GHW3WIcjs.farmPathGuardCoversEndpoint.call(void 0,
2260
+ guardCoversPath: (path6) => _chunkO27PLNQZcjs.farmPathGuardCoversEndpoint.call(void 0,
2253
2261
  {
2254
2262
  config: farmConfig,
2255
2263
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2263,11 +2271,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2263
2271
  });
2264
2272
  return;
2265
2273
  }
2266
- if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkJ3LBO2O4cjs.FARM_API_CATALOG_PATH) {
2274
+ if (_optionalChain([options, 'access', _160 => _160.agent, 'optionalAccess', _161 => _161.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkDPJ66FSIcjs.FARM_API_CATALOG_PATH) {
2267
2275
  await serveBuiltInRoute(
2268
- () => _chunkJ3LBO2O4cjs.createFarmApiCatalogResponse.call(void 0,
2276
+ () => _chunkDPJ66FSIcjs.createFarmApiCatalogResponse.call(void 0,
2269
2277
  requestMethod,
2270
- _chunkJ3LBO2O4cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2278
+ _chunkDPJ66FSIcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2271
2279
  new Request(parsedRequestUrl, {
2272
2280
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
2273
2281
  })
@@ -2276,7 +2284,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2276
2284
  return;
2277
2285
  }
2278
2286
  if (_optionalChain([options, 'access', _162 => _162.agent, 'optionalAccess', _163 => _163.aiCatalog]) !== false) {
2279
- const aiCatalog = _chunkJ3LBO2O4cjs.createFarmAiCatalogResponse.call(void 0,
2287
+ const aiCatalog = _chunkDPJ66FSIcjs.createFarmAiCatalogResponse.call(void 0,
2280
2288
  new Request(parsedRequestUrl, {
2281
2289
  method: requestMethod,
2282
2290
  headers: {
@@ -2320,7 +2328,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2320
2328
  {
2321
2329
  kind: "docs",
2322
2330
  computed: docsResponse,
2323
- label: _chunkJ3LBO2O4cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2331
+ label: _chunkDPJ66FSIcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2324
2332
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2325
2333
  {
2326
2334
  path: _optionalChain([farmConfig, 'access', _164 => _164.docs, 'optionalAccess', _165 => _165.entry]) || "/docs",
@@ -2332,11 +2340,28 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2332
2340
  return;
2333
2341
  }
2334
2342
  }
2335
- const markdownRouteLabel = () => _chunkJ3LBO2O4cjs.resolveFarmMarkdownRouteLabel.call(void 0,
2343
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD") && _optionalChain([req, 'access', _170 => _170.headers, 'access', _171 => _171.accept, 'optionalAccess', _172 => _172.includes, 'call', _173 => _173(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
2344
+ const { createFarmNativeTreeResponse } = await import("./native-tree-6G5O53O3.cjs");
2345
+ const treeResponse = await createFarmNativeTreeResponse({
2346
+ request: new Request(fullUrl, { method: requestMethod, headers: docsHeaders }),
2347
+ // As for the Markdown mirror: this server's own listener, redirects not followed.
2348
+ renderPage: (request) => _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
2349
+ new Request(request, {
2350
+ signal: res.destroyed ? AbortSignal.abort() : _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2351
+ })
2352
+ )
2353
+ });
2354
+ await serveBuiltInRoute(() => treeResponse, {
2355
+ computed: treeResponse,
2356
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _174 => _174.getRouteManager, 'call', _175 => _175(), 'access', _176 => _176.matchRoute, 'call', _177 => _177(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _178 => _178.route, 'optionalAccess', _179 => _179.pattern]), () => ( null))
2357
+ });
2358
+ return;
2359
+ }
2360
+ const markdownRouteLabel = () => _chunkDPJ66FSIcjs.resolveFarmMarkdownRouteLabel.call(void 0,
2336
2361
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2337
- (page) => _optionalChain([farmApp, 'access', _170 => _170.getRouteManager, 'call', _171 => _171(), 'access', _172 => _172.matchRoute, 'call', _173 => _173(page), 'access', _174 => _174.route, 'optionalAccess', _175 => _175.pattern])
2362
+ (page) => _optionalChain([farmApp, 'access', _180 => _180.getRouteManager, 'call', _181 => _181(), 'access', _182 => _182.matchRoute, 'call', _183 => _183(page), 'access', _184 => _184.route, 'optionalAccess', _185 => _185.pattern])
2338
2363
  );
2339
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkJATTVAHAcjs.createFarmMarkdownSourceResponse.call(void 0, {
2364
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunkPRFNLQSPcjs.createFarmMarkdownSourceResponse.call(void 0, {
2340
2365
  request: new Request(fullUrl, {
2341
2366
  method: requestMethod,
2342
2367
  headers: docsHeaders
@@ -2344,7 +2369,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2344
2369
  config: farmApp.getConfig().mdx,
2345
2370
  resolveSource: async (pathname2) => {
2346
2371
  const match = farmApp.getRouteManager().matchRoute(pathname2);
2347
- const sourcePath = _optionalChain([match, 'access', _176 => _176.route, 'optionalAccess', _177 => _177.markdownSourcePath]) || (match.route && _chunkJATTVAHAcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2372
+ const sourcePath = _optionalChain([match, 'access', _186 => _186.route, 'optionalAccess', _187 => _187.markdownSourcePath]) || (match.route && _chunkPRFNLQSPcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2348
2373
  if (!sourcePath) {
2349
2374
  return null;
2350
2375
  }
@@ -2369,7 +2394,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2369
2394
  });
2370
2395
  return;
2371
2396
  }
2372
- const markdownResponse = viteModuleRequest ? null : await _chunkWJFFPXCVcjs.createMarkdownMirrorResponse.call(void 0, {
2397
+ const markdownResponse = viteModuleRequest ? null : await _chunkLT4VAF5Zcjs.createMarkdownMirrorResponse.call(void 0, {
2373
2398
  request: new Request(fullUrl, {
2374
2399
  method: requestMethod,
2375
2400
  headers: docsHeaders
@@ -2400,16 +2425,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2400
2425
  });
2401
2426
  return;
2402
2427
  }
2403
- if (!viteModuleRequest && _chunkWJFFPXCVcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
2404
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkJATTVAHAcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
2428
+ if (!viteModuleRequest && _chunkLT4VAF5Zcjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
2429
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkPRFNLQSPcjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname));
2405
2430
  if (!markdownRoute.route) {
2406
2431
  await serveBuiltInRoute(
2407
2432
  () => new Response(
2408
- _chunkWJFFPXCVcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
2433
+ _chunkLT4VAF5Zcjs.createFarmMarkdownErrorBody.call(void 0, 404, requestPathname, farmConfig.basePath || "/"),
2409
2434
  {
2410
2435
  status: 404,
2411
2436
  headers: {
2412
- "Content-Type": _chunkWJFFPXCVcjs.FARM_MARKDOWN_CONTENT_TYPE,
2437
+ "Content-Type": _chunkLT4VAF5Zcjs.FARM_MARKDOWN_CONTENT_TYPE,
2413
2438
  "X-Farm-Markdown-Error": "404",
2414
2439
  "Cache-Control": "no-store"
2415
2440
  }
@@ -2419,7 +2444,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2419
2444
  return;
2420
2445
  }
2421
2446
  }
2422
- const markdownPageTarget = _chunkWJFFPXCVcjs.resolveMarkdownMirrorTarget.call(void 0,
2447
+ const markdownPageTarget = _chunkLT4VAF5Zcjs.resolveMarkdownMirrorTarget.call(void 0,
2423
2448
  farmApp.getConfig().md,
2424
2449
  requestPathname,
2425
2450
  {
@@ -2432,7 +2457,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2432
2457
  if (!varyValues.some((value) => value.toLowerCase() === "accept")) {
2433
2458
  res.setHeader("Vary", [...varyValues, "Accept"].join(", "));
2434
2459
  }
2435
- const alternatePath = _chunkWJFFPXCVcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
2460
+ const alternatePath = _chunkLT4VAF5Zcjs.getFarmMarkdownMirrorPath.call(void 0, markdownPageTarget.pathname);
2436
2461
  const alternateLink = `<${alternatePath}>; rel="alternate"; type="text/markdown"`;
2437
2462
  const currentLink = res.getHeader("Link");
2438
2463
  res.setHeader(
@@ -2470,7 +2495,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2470
2495
  }
2471
2496
  const configuredIntegrations = currentConfig.integrations;
2472
2497
  const tryConfiguredIntegrationRoute = async () => {
2473
- const matchedRoute = _chunkCECUDGXQcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
2498
+ const matchedRoute = _chunkZP32GNJQcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
2474
2499
  pathname: requestPathname,
2475
2500
  method: requestMethod
2476
2501
  });
@@ -2483,8 +2508,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2483
2508
  await pm.runHookParallelFiltered(
2484
2509
  "beforeRequest",
2485
2510
  (plugin) => {
2486
- const owner = _chunkCECUDGXQcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2487
- return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _178 => _178.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2511
+ const owner = _chunkZP32GNJQcjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2512
+ return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _188 => _188.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2488
2513
  },
2489
2514
  req,
2490
2515
  res
@@ -2512,7 +2537,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2512
2537
  signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2513
2538
  });
2514
2539
  const dispatchIntegration = async (request) => {
2515
- const result = await _chunkCECUDGXQcjs.dispatchIntegrationRequest.call(void 0,
2540
+ const result = await _chunkZP32GNJQcjs.dispatchIntegrationRequest.call(void 0,
2516
2541
  {
2517
2542
  integration: matchedRoute.integration,
2518
2543
  config: currentConfig,
@@ -2520,7 +2545,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2520
2545
  isProd: false
2521
2546
  },
2522
2547
  request,
2523
- { clientAddress: _optionalChain([req, 'access', _179 => _179.socket, 'optionalAccess', _180 => _180.remoteAddress]) }
2548
+ { clientAddress: _optionalChain([req, 'access', _189 => _189.socket, 'optionalAccess', _190 => _190.remoteAddress]) }
2524
2549
  );
2525
2550
  if (!result) {
2526
2551
  throw new Error(`Matched integration route did not return a response`);
@@ -2555,7 +2580,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2555
2580
  method: requestMethod,
2556
2581
  integration: matchedRoute.key
2557
2582
  });
2558
- _chunkVQJYGZNXcjs.logger.error(`Integration route error: ${error}`);
2583
+ _chunkQMNWKQL4cjs.logger.error(`Integration route error: ${error}`);
2559
2584
  if (!res.writableEnded) {
2560
2585
  res.statusCode = 500;
2561
2586
  res.setHeader("Content-Type", "application/json");
@@ -2576,7 +2601,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2576
2601
  }
2577
2602
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
2578
2603
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
2579
- if (hasMatchedApiRoute || _chunkOYNNA4DDcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
2604
+ if (hasMatchedApiRoute || _chunkCBKRS3M4cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
2580
2605
  const startTime2 = Date.now();
2581
2606
  const method2 = req.method || "GET";
2582
2607
  const urlPath2 = req.url || "/";
@@ -2584,7 +2609,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2584
2609
  trustProxy: currentServerConfig.trustProxy
2585
2610
  }).pathname;
2586
2611
  const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
2587
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _181 => _181.isFarmDocsAPIRequest, 'call', _182 => _182(requestPathname)])
2612
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _191 => _191.isFarmDocsAPIRequest, 'call', _192 => _192(requestPathname)])
2588
2613
  );
2589
2614
  try {
2590
2615
  if (pm) {
@@ -2609,7 +2634,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2609
2634
  urlPath: urlPath2,
2610
2635
  method: method2
2611
2636
  });
2612
- _chunkVQJYGZNXcjs.logger.error(`Request hook error: ${error}`);
2637
+ _chunkQMNWKQL4cjs.logger.error(`Request hook error: ${error}`);
2613
2638
  res.statusCode = 500;
2614
2639
  res.setHeader("Content-Type", "application/json");
2615
2640
  res.end(JSON.stringify({ error: "Internal server error" }));
@@ -2628,7 +2653,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2628
2653
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
2629
2654
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
2630
2655
  if (apiHandler && hasExplicitAPIRoute) {
2631
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _183 => _183.route, 'access', _184 => _184.path]) || urlPath2;
2656
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _193 => _193.route, 'access', _194 => _194.path]) || urlPath2;
2632
2657
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
2633
2658
  type: "route.matched",
2634
2659
  pathname: pathname2,
@@ -2711,14 +2736,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2711
2736
  urlPath: urlPath2,
2712
2737
  method: method2
2713
2738
  });
2714
- _chunkVQJYGZNXcjs.logger.error(`API route error: ${error}`);
2739
+ _chunkQMNWKQL4cjs.logger.error(`API route error: ${error}`);
2715
2740
  res.statusCode = 500;
2716
2741
  res.setHeader("Content-Type", "application/json");
2717
2742
  res.end(JSON.stringify({ error: "Internal server error" }));
2718
2743
  return;
2719
2744
  }
2720
2745
  }
2721
- if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _185 => _185.isFarmDocsAPIRequest, 'call', _186 => _186(pathname2)])) {
2746
+ if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _195 => _195.isFarmDocsAPIRequest, 'call', _196 => _196(pathname2)])) {
2722
2747
  try {
2723
2748
  const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
2724
2749
  const headers = new Headers();
@@ -2756,11 +2781,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2756
2781
  };
2757
2782
  const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
2758
2783
  kind: "docs",
2759
- route: _chunkJ3LBO2O4cjs.setFarmRouteLabel.call(void 0,
2784
+ route: _chunkDPJ66FSIcjs.setFarmRouteLabel.call(void 0,
2760
2785
  { pathname: pathname2, pattern: apiLifecyclePayload.routePath },
2761
- _chunkJ3LBO2O4cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2762
- path: _optionalChain([farmConfig, 'access', _187 => _187.docs, 'optionalAccess', _188 => _188.entry]) || "/docs",
2763
- roots: _optionalChain([farmConfig, 'access', _189 => _189.docs, 'optionalAccess', _190 => _190.roots, 'optionalAccess', _191 => _191.map, 'call', _192 => _192((root) => root.entry)])
2786
+ _chunkDPJ66FSIcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2787
+ path: _optionalChain([farmConfig, 'access', _197 => _197.docs, 'optionalAccess', _198 => _198.entry]) || "/docs",
2788
+ roots: _optionalChain([farmConfig, 'access', _199 => _199.docs, 'optionalAccess', _200 => _200.roots, 'optionalAccess', _201 => _201.map, 'call', _202 => _202((root) => root.entry)])
2764
2789
  })
2765
2790
  )
2766
2791
  }) : await invokeDocsAPIHandler(request);
@@ -2780,7 +2805,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2780
2805
  urlPath: urlPath2,
2781
2806
  method: method2
2782
2807
  });
2783
- _chunkVQJYGZNXcjs.logger.error(`Docs API route error: ${error}`);
2808
+ _chunkQMNWKQL4cjs.logger.error(`Docs API route error: ${error}`);
2784
2809
  res.statusCode = 500;
2785
2810
  res.setHeader("Content-Type", "application/json");
2786
2811
  res.end(JSON.stringify({ error: "Internal server error" }));
@@ -2794,18 +2819,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2794
2819
  res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
2795
2820
  return;
2796
2821
  }
2797
- if (_optionalChain([req, 'access', _193 => _193.url, 'optionalAccess', _194 => _194.startsWith, 'call', _195 => _195("/@")]) || _optionalChain([req, 'access', _196 => _196.url, 'optionalAccess', _197 => _197.startsWith, 'call', _198 => _198("/node_modules")])) {
2822
+ if (_optionalChain([req, 'access', _203 => _203.url, 'optionalAccess', _204 => _204.startsWith, 'call', _205 => _205("/@")]) || _optionalChain([req, 'access', _206 => _206.url, 'optionalAccess', _207 => _207.startsWith, 'call', _208 => _208("/node_modules")])) {
2798
2823
  return next();
2799
2824
  }
2800
2825
  if (shouldBypassFarmRouterForDottedPath(
2801
2826
  requestPathname,
2802
- _optionalChain([farmApp, 'optionalAccess', _199 => _199.getRouteManager, 'call', _200 => _200()]),
2827
+ _optionalChain([farmApp, 'optionalAccess', _209 => _209.getRouteManager, 'call', _210 => _210()]),
2803
2828
  [server.config.publicDir, server.config.root],
2804
2829
  farmAgentGeneratedPaths(farmConfig)
2805
2830
  )) {
2806
2831
  return next();
2807
2832
  }
2808
- if (_optionalChain([req, 'access', _201 => _201.url, 'optionalAccess', _202 => _202.startsWith, 'call', _203 => _203("/__farm/page-data")])) {
2833
+ if (_optionalChain([req, 'access', _211 => _211.url, 'optionalAccess', _212 => _212.startsWith, 'call', _213 => _213("/__farm/page-data")])) {
2809
2834
  const urlObj = parsedRequestUrl;
2810
2835
  const targetPath = urlObj.searchParams.get("path") || "/";
2811
2836
  try {
@@ -2833,7 +2858,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2833
2858
  });
2834
2859
  let middlewareMap = /* @__PURE__ */ new Map();
2835
2860
  let middlewareContext = /* @__PURE__ */ new Map();
2836
- if (_optionalChain([middlewareManager, 'optionalAccess', _204 => _204.hasMiddleware, 'call', _205 => _205()])) {
2861
+ if (_optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()])) {
2837
2862
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
2838
2863
  const handled = await runFarmMiddlewareWithNavigation(
2839
2864
  farmApp.getServerRenderer(),
@@ -2861,10 +2886,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2861
2886
  if (pm) {
2862
2887
  await pm.runHookParallel("afterRouteMatch", {
2863
2888
  pathname: targetPath,
2864
- matched: !!_optionalChain([match, 'optionalAccess', _206 => _206.route]),
2865
- routePattern: _optionalChain([match, 'optionalAccess', _207 => _207.route, 'optionalAccess', _208 => _208.pattern]) || null,
2866
- params: _optionalChain([match, 'optionalAccess', _209 => _209.params]) || {},
2867
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _210 => _210.layouts]) || []).map((l) => l.pattern)
2889
+ matched: !!_optionalChain([match, 'optionalAccess', _216 => _216.route]),
2890
+ routePattern: _optionalChain([match, 'optionalAccess', _217 => _217.route, 'optionalAccess', _218 => _218.pattern]) || null,
2891
+ params: _optionalChain([match, 'optionalAccess', _219 => _219.params]) || {},
2892
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _220 => _220.layouts]) || []).map((l) => l.pattern)
2868
2893
  });
2869
2894
  }
2870
2895
  if (!match) {
@@ -2887,7 +2912,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2887
2912
  );
2888
2913
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
2889
2914
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
2890
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkWZW6LEHMcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
2915
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
2891
2916
  const isClientComponent = moduleMetadata.isClientComponent;
2892
2917
  const shouldHydrate = moduleMetadata.shouldHydrate;
2893
2918
  let mergedMetadata = {};
@@ -2895,7 +2920,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2895
2920
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
2896
2921
  );
2897
2922
  const layoutHydrationMetadata = layouts.map(
2898
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkWZW6LEHMcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
2923
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
2899
2924
  );
2900
2925
  const shouldHydrateLayout = layoutHydrationMetadata.some(
2901
2926
  (metadata) => metadata.shouldHydrate
@@ -2906,9 +2931,22 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2906
2931
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
2907
2932
  )
2908
2933
  ];
2909
- const hydrationIslandStrategy = hydrationStrategies.every(
2910
- (strategy) => strategy === hydrationStrategies[0]
2911
- ) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
2934
+ const hydrationIslandStrategy = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0,
2935
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _221 => _221.getConfig, 'call', _222 => _222()]), () => ( options))), 'access', _223 => _223.experimental, 'optionalAccess', _224 => _224.serverComponents])
2936
+ ) === "islands" ? _chunkUYSTTPYJcjs.resolveFarmRouteRootStrategy.call(void 0,
2937
+ route,
2938
+ { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
2939
+ layouts.map((layout, index) => ({
2940
+ pattern: layout.pattern,
2941
+ modulePath: layout.modulePath,
2942
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _225 => _225[index], 'optionalAccess', _226 => _226.shouldHydrate]) === true,
2943
+ // Manifest entries carry it; metadata read from source does not.
2944
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _227 => _227[index], 'optionalAccess', _228 => _228.hasIsolatedClientBoundaries]) === true,
2945
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _229 => _229[index], 'optionalAccess', _230 => _230.islandStrategy]), () => ( null))
2946
+ })),
2947
+ server.config.root,
2948
+ true
2949
+ ) : hydrationStrategies.every((strategy) => strategy === hydrationStrategies[0]) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
2912
2950
  const targetUrl = new URL(targetPath, "http://localhost");
2913
2951
  const searchParams = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
2914
2952
  const routeContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
@@ -2952,14 +2990,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2952
2990
  mergedMetadata = await _chunk6IOZPJ3Icjs.mergeModuleViewport.call(void 0, mergedMetadata, routeModule, routeProps);
2953
2991
  mergedMetadata = _chunk6IOZPJ3Icjs.addMetadataMarkdownAlternate.call(void 0,
2954
2992
  mergedMetadata,
2955
- _chunkWJFFPXCVcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
2993
+ _chunkLT4VAF5Zcjs.getFarmMarkdownAlternatePath.call(void 0, farmApp.getConfig().md, targetRequestUrl.pathname)
2956
2994
  );
2957
2995
  const routeSlots = await Promise.all(
2958
2996
  slots.map(async (slot) => {
2959
2997
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
2960
2998
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
2961
2999
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
2962
- ), () => ( _chunkWZW6LEHMcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
3000
+ ), () => ( _chunkUYSTTPYJcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
2963
3001
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
2964
3002
  request: targetRequest,
2965
3003
  params: slot.params,
@@ -3004,16 +3042,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3004
3042
  })
3005
3043
  );
3006
3044
  const projectRoot = server.config.root;
3007
- const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
3008
- const renderPlan = _chunk76GHW3WIcjs.createFarmRouteRenderPlan.call(void 0, {
3045
+ const toUrlPath = (absolutePath) => _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
3046
+ const renderPlan = _chunkO27PLNQZcjs.createFarmRouteRenderPlan.call(void 0, {
3009
3047
  pageShouldHydrate: shouldHydrate,
3010
3048
  layoutShouldHydrate: shouldHydrateLayout,
3011
3049
  islandStrategy: hydrationIslandStrategy,
3012
- rendering: _chunkUQHIWZZ6cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
3050
+ rendering: _chunk3TL3AH25cjs.resolveRouteRenderingConfig.call(void 0, routeModule)
3013
3051
  });
3014
3052
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
3015
- const layoutStartIndex = _chunk76GHW3WIcjs.getSharedLayoutPrefixLength.call(void 0,
3016
- _chunk76GHW3WIcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
3053
+ const layoutStartIndex = _chunkO27PLNQZcjs.getSharedLayoutPrefixLength.call(void 0,
3054
+ _chunkO27PLNQZcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
3017
3055
  destinationLayoutPatterns
3018
3056
  );
3019
3057
  const renderer = farmApp.getServerRenderer();
@@ -3023,7 +3061,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3023
3061
  middlewareContext,
3024
3062
  () => renderer.renderNavigationFragment({
3025
3063
  PageComponent: routeModule.default,
3026
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _211 => _211.default]),
3064
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _231 => _231.default]),
3027
3065
  pageProps: routeProps,
3028
3066
  params,
3029
3067
  layouts: layouts.map((layout, index) => ({
@@ -3094,7 +3132,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3094
3132
  {
3095
3133
  status: 200,
3096
3134
  headers: {
3097
- "Cache-Control": _chunk76GHW3WIcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3135
+ "Cache-Control": _chunkO27PLNQZcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3098
3136
  "X-Farm-Navigation": "html-fragment",
3099
3137
  Vary: "X-Farm-Layout-Chain",
3100
3138
  [_chunkE552H232cjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -3102,7 +3140,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3102
3140
  },
3103
3141
  {
3104
3142
  onError(error, id) {
3105
- _chunkVQJYGZNXcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
3143
+ _chunkQMNWKQL4cjs.logger.error(`Deferred route data ${id} failed: ${error}`);
3106
3144
  }
3107
3145
  }
3108
3146
  )
@@ -3131,21 +3169,21 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3131
3169
  trustProxy: currentServerConfig.trustProxy
3132
3170
  }).pathname;
3133
3171
  const routeManager2 = farmApp.getRouteManager();
3134
- const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _212 => _212.hasHook, 'call', _213 => _213("beforeRouteMatch")]), () => ( false));
3135
- const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _214 => _214.hasHook, 'call', _215 => _215("afterRouteMatch")]), () => ( false));
3136
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _216 => _216.hasHook, 'call', _217 => _217("beforeRequest")]), () => ( false));
3137
- const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _218 => _218.hasHook, 'call', _219 => _219("beforeRender")]), () => ( false));
3138
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _220 => _220.hasHook, 'call', _221 => _221("afterResponse")]), () => ( false));
3139
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _222 => _222.hasHook, 'call', _223 => _223("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _224 => _224.hasHook, 'call', _225 => _225("afterRender")]), () => ( false)));
3140
- const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _226 => _226.hasRuntimeRequestHooks, 'call', _227 => _227()]), () => ( false));
3141
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _228 => _228.hasRuntimeHook, 'call', _229 => _229("after")]), () => ( false));
3172
+ const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _232 => _232.hasHook, 'call', _233 => _233("beforeRouteMatch")]), () => ( false));
3173
+ const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _234 => _234.hasHook, 'call', _235 => _235("afterRouteMatch")]), () => ( false));
3174
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _236 => _236.hasHook, 'call', _237 => _237("beforeRequest")]), () => ( false));
3175
+ const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _238 => _238.hasHook, 'call', _239 => _239("beforeRender")]), () => ( false));
3176
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _240 => _240.hasHook, 'call', _241 => _241("afterResponse")]), () => ( false));
3177
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _242 => _242.hasHook, 'call', _243 => _243("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _244 => _244.hasHook, 'call', _245 => _245("afterRender")]), () => ( false)));
3178
+ const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _246 => _246.hasRuntimeRequestHooks, 'call', _247 => _247()]), () => ( false));
3179
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _248 => _248.hasRuntimeHook, 'call', _249 => _249("after")]), () => ( false));
3142
3180
  const requestedMatch = routeManager2.matchRoute(requestedPathname);
3143
3181
  const pageBuiltInRouteLabel = (pathname2) => {
3144
3182
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
3145
- const mcpLabel = _chunkJ3LBO2O4cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3183
+ const mcpLabel = _chunkDPJ66FSIcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3146
3184
  if (mcpLabel) return mcpLabel;
3147
3185
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
3148
- return routePathname === _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH : null;
3186
+ return routePathname === _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkQAS7KE7Jcjs.FARM_DEFAULT_MCP_PATH : null;
3149
3187
  };
3150
3188
  let runtimeSession;
3151
3189
  if (pm && hasRuntimeRequestHooks) {
@@ -3154,13 +3192,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3154
3192
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3155
3193
  {
3156
3194
  kind: "page",
3157
- route: _chunkJ3LBO2O4cjs.setFarmRouteLabel.call(void 0,
3195
+ route: _chunkDPJ66FSIcjs.setFarmRouteLabel.call(void 0,
3158
3196
  {
3159
3197
  pathname: requestedPathname,
3160
- pattern: _optionalChain([requestedMatch, 'optionalAccess', _230 => _230.route, 'optionalAccess', _231 => _231.pattern]) || null,
3161
- params: _optionalChain([requestedMatch, 'optionalAccess', _232 => _232.params]) || {}
3198
+ pattern: _optionalChain([requestedMatch, 'optionalAccess', _250 => _250.route, 'optionalAccess', _251 => _251.pattern]) || null,
3199
+ params: _optionalChain([requestedMatch, 'optionalAccess', _252 => _252.params]) || {}
3162
3200
  },
3163
- _optionalChain([requestedMatch, 'optionalAccess', _233 => _233.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3201
+ _optionalChain([requestedMatch, 'optionalAccess', _253 => _253.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3164
3202
  )
3165
3203
  }
3166
3204
  );
@@ -3193,17 +3231,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3193
3231
  if (pm && hasAfterRouteMatchHook) {
3194
3232
  await pm.runHookParallel("afterRouteMatch", {
3195
3233
  pathname,
3196
- matched: !!_optionalChain([routeMatch, 'optionalAccess', _234 => _234.route]),
3197
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _235 => _235.route, 'optionalAccess', _236 => _236.pattern]) || null,
3198
- params: _optionalChain([routeMatch, 'optionalAccess', _237 => _237.params]) || {},
3199
- layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _238 => _238.layouts]) || []).map((l) => l.pattern)
3234
+ matched: !!_optionalChain([routeMatch, 'optionalAccess', _254 => _254.route]),
3235
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _255 => _255.route, 'optionalAccess', _256 => _256.pattern]) || null,
3236
+ params: _optionalChain([routeMatch, 'optionalAccess', _257 => _257.params]) || {},
3237
+ layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _258 => _258.layouts]) || []).map((l) => l.pattern)
3200
3238
  });
3201
3239
  }
3202
3240
  const renderPayload = {
3203
3241
  pathname,
3204
3242
  method,
3205
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _239 => _239.route, 'optionalAccess', _240 => _240.pattern]) || null,
3206
- params: _optionalChain([routeMatch, 'optionalAccess', _241 => _241.params]) || {}
3243
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _259 => _259.route, 'optionalAccess', _260 => _260.pattern]) || null,
3244
+ params: _optionalChain([routeMatch, 'optionalAccess', _261 => _261.params]) || {}
3207
3245
  };
3208
3246
  const shouldInterceptResponse = Boolean(
3209
3247
  pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
@@ -3225,7 +3263,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3225
3263
  emitError: (error) => emitPluginError("response-end", error, { pathname })
3226
3264
  }) : void 0;
3227
3265
  try {
3228
- if (_optionalChain([middlewareManager, 'optionalAccess', _242 => _242.hasMiddleware, 'call', _243 => _243()])) {
3266
+ if (_optionalChain([middlewareManager, 'optionalAccess', _262 => _262.hasMiddleware, 'call', _263 => _263()])) {
3229
3267
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3230
3268
  const handled = await runFarmMiddlewareWithNavigation(
3231
3269
  farmApp.getServerRenderer(),
@@ -3235,7 +3273,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3235
3273
  () => middlewareManager.execute(req, res)
3236
3274
  );
3237
3275
  if (handled) {
3238
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _244 => _244.isEnded, 'call', _245 => _245()])) {
3276
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _264 => _264.isEnded, 'call', _265 => _265()])) {
3239
3277
  const duration = Date.now() - startTime;
3240
3278
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3241
3279
  }
@@ -3248,14 +3286,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3248
3286
  req.url || "/",
3249
3287
  `http://${req.headers.host || "localhost:3000"}`
3250
3288
  ).pathname;
3251
- const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _246 => _246.matchRoute, 'call', _247 => _247(currentPathname), 'optionalAccess', _248 => _248.route]));
3289
+ const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _266 => _266.matchRoute, 'call', _267 => _267(currentPathname), 'optionalAccess', _268 => _268.route]));
3252
3290
  await pm.runHookParallelFiltered(
3253
3291
  "beforeRequest",
3254
3292
  (plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
3255
3293
  req,
3256
3294
  res
3257
3295
  );
3258
- if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _249 => _249.url, 'optionalAccess', _250 => _250.startsWith, 'call', _251 => _251("/")]) && !res.writableEnded) {
3296
+ if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _269 => _269.url, 'optionalAccess', _270 => _270.startsWith, 'call', _271 => _271("/")]) && !res.writableEnded) {
3259
3297
  const destinationUrl = new URL(req.url, fullUrl);
3260
3298
  const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
3261
3299
  const guarded = await pm.runRuntimeBeforeForRewrite(
@@ -3265,8 +3303,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3265
3303
  kind: "page",
3266
3304
  route: {
3267
3305
  pathname: destinationUrl.pathname,
3268
- pattern: _optionalChain([destinationMatch, 'optionalAccess', _252 => _252.route, 'optionalAccess', _253 => _253.pattern]) || null,
3269
- params: _optionalChain([destinationMatch, 'optionalAccess', _254 => _254.params]) || {}
3306
+ pattern: _optionalChain([destinationMatch, 'optionalAccess', _272 => _272.route, 'optionalAccess', _273 => _273.pattern]) || null,
3307
+ params: _optionalChain([destinationMatch, 'optionalAccess', _274 => _274.params]) || {}
3270
3308
  }
3271
3309
  }
3272
3310
  );
@@ -3278,8 +3316,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3278
3316
  }
3279
3317
  }
3280
3318
  }
3281
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _255 => _255.isEnded, 'call', _256 => _256()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3282
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _257 => _257.isEnded, 'call', _258 => _258()])) {
3319
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _275 => _275.isEnded, 'call', _276 => _276()]) || await proxyFarmExternalRewrite(req, res, currentServerConfig.bodySizeLimit)) {
3320
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _277 => _277.isEnded, 'call', _278 => _278()])) {
3283
3321
  const duration = Date.now() - startTime;
3284
3322
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3285
3323
  }
@@ -3317,7 +3355,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3317
3355
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
3318
3356
  return id;
3319
3357
  }
3320
- if (isFarmClientVirtualId(id)) {
3358
+ if (isFarmClientVirtualId(id) || id === FARM_DEV_CLIENT_BOOT_ID) {
3321
3359
  return id;
3322
3360
  }
3323
3361
  if (id === "/@farm/server") {
@@ -3343,8 +3381,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3343
3381
  if (imageModule) return imageModule;
3344
3382
  }
3345
3383
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
3346
- const renderer = _optionalChain([farmApp, 'optionalAccess', _259 => _259.getConfig, 'call', _260 => _260(), 'access', _261 => _261.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3347
- const root = _optionalChain([server, 'optionalAccess', _262 => _262.config, 'access', _263 => _263.root]) || options.root;
3384
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _279 => _279.getConfig, 'call', _280 => _280(), 'access', _281 => _281.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3385
+ const root = _optionalChain([server, 'optionalAccess', _282 => _282.config, 'access', _283 => _283.root]) || options.root;
3348
3386
  if (isClientEnvironment(this, loadOptions)) {
3349
3387
  return generateProgrammaticClientRouteModuleForId(
3350
3388
  id,
@@ -3356,66 +3394,69 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3356
3394
  }
3357
3395
  return generateProgrammaticRouteModule(id, root, renderer);
3358
3396
  }
3397
+ if (id === FARM_DEV_CLIENT_BOOT_ID) {
3398
+ return FARM_DEV_CLIENT_BOOT_MODULE;
3399
+ }
3359
3400
  if (isFarmClientVirtualId(id)) {
3360
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _264 => _264.getConfig, 'call', _265 => _265()]);
3361
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _266 => _266.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3362
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _267 => _267.integrations]) || options.integrations;
3363
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _268 => _268.root]) || _optionalChain([server, 'optionalAccess', _269 => _269.config, 'access', _270 => _270.root]) || process.cwd();
3364
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _271 => _271.docs]);
3401
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _284 => _284.getConfig, 'call', _285 => _285()]);
3402
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _286 => _286.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3403
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _287 => _287.integrations]) || options.integrations;
3404
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _288 => _288.root]) || _optionalChain([server, 'optionalAccess', _289 => _289.config, 'access', _290 => _290.root]) || process.cwd();
3405
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _291 => _291.docs]);
3365
3406
  const adapterOwnsDocsRuntime = Boolean(
3366
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _272 => _272.adapter, 'optionalAccess', _273 => _273.server]) && docs.adapter.react
3407
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _292 => _292.adapter, 'optionalAccess', _293 => _293.server]) && docs.adapter.react
3367
3408
  );
3368
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _274 => _274.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3409
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _294 => _294.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3369
3410
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
3370
- _optionalChain([docs, 'optionalAccess', _275 => _275.enabled]) ? loadFarmDocsDevRuntime() : null,
3371
- _optionalChain([docs, 'optionalAccess', _276 => _276.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3411
+ _optionalChain([docs, 'optionalAccess', _295 => _295.enabled]) ? loadFarmDocsDevRuntime() : null,
3412
+ _optionalChain([docs, 'optionalAccess', _296 => _296.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3372
3413
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
3373
3414
  ]);
3374
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _277 => _277.isFarmDocsSearchEnabled, 'call', _278 => _278(docs)]), () => ( false));
3415
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _297 => _297.isFarmDocsSearchEnabled, 'call', _298 => _298(docs)]), () => ( false));
3375
3416
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
3376
3417
  docsSearchEnabled,
3377
3418
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
3378
3419
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
3379
3420
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
3380
3421
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
3381
- const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkCECUDGXQcjs.getIntegrationProviders.call(void 0, integrations) : [];
3382
- const isolatedHydrationMode = _chunkWZW6LEHMcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3383
- _optionalChain([resolvedConfig, 'optionalAccess', _279 => _279.experimental, 'optionalAccess', _280 => _280.isolatedClientHydration]),
3422
+ const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkZP32GNJQcjs.getIntegrationProviders.call(void 0, integrations) : [];
3423
+ const isolatedHydrationMode = _chunkUYSTTPYJcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3424
+ _optionalChain([resolvedConfig, 'optionalAccess', _299 => _299.experimental, 'optionalAccess', _300 => _300.isolatedClientHydration]),
3384
3425
  {
3385
- serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _281 => _281.experimental, 'optionalAccess', _282 => _282.serverComponents])) === "rsc",
3426
+ serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _301 => _301.experimental, 'optionalAccess', _302 => _302.serverComponents])) === "rsc",
3386
3427
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
3387
3428
  }
3388
3429
  );
3389
3430
  return generateClientCode(
3390
3431
  integrationProviders,
3391
3432
  [
3392
- ..._chunkCECUDGXQcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3393
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _283 => _283.getFarmDocsDocumentNavigationMatchers, 'call', _284 => _284(docs)]), () => ( []))
3433
+ ..._chunkZP32GNJQcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3434
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _303 => _303.getFarmDocsDocumentNavigationMatchers, 'call', _304 => _304(docs)]), () => ( []))
3394
3435
  ],
3395
3436
  generatedDocsSearchRuntime,
3396
3437
  `${generatedDevtoolsClientRuntime}
3397
3438
  ${generatedDevIndicatorsClientRuntime}`,
3398
- _optionalChain([resolvedConfig, 'optionalAccess', _285 => _285.plugins]) || [],
3439
+ _optionalChain([resolvedConfig, 'optionalAccess', _305 => _305.plugins]) || [],
3399
3440
  root,
3400
- _optionalChain([resolvedConfig, 'optionalAccess', _286 => _286.srcDir]) || options.srcDir || "src",
3401
- _optionalChain([resolvedConfig, 'optionalAccess', _287 => _287.publicRuntimeConfig]) || options.publicRuntimeConfig,
3402
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _288 => _288.adapter, 'optionalAccess', _289 => _289.react]) : void 0,
3441
+ _optionalChain([resolvedConfig, 'optionalAccess', _306 => _306.srcDir]) || options.srcDir || "src",
3442
+ _optionalChain([resolvedConfig, 'optionalAccess', _307 => _307.publicRuntimeConfig]) || options.publicRuntimeConfig,
3443
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _308 => _308.adapter, 'optionalAccess', _309 => _309.react]) : void 0,
3403
3444
  renderer,
3404
- isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _290 => _290.getRouteManager, 'call', _291 => _291(), 'access', _292 => _292.getIsolatedClientBoundaryModules, 'call', _293 => _293(root)])))), 'optionalAccess', _294 => _294.size]) > 0,
3405
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _295 => _295.trailingSlash]), () => ( false)),
3406
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _296 => _296.basePath]), () => ( "/")),
3407
- _chunkWZW6LEHMcjs.generateClientCachePersistenceCode.call(void 0,
3408
- _chunkWZW6LEHMcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _297 => _297.cache]))
3445
+ isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _310 => _310.getRouteManager, 'call', _311 => _311(), 'access', _312 => _312.getIsolatedClientBoundaryModules, 'call', _313 => _313(root)])))), 'optionalAccess', _314 => _314.size]) > 0,
3446
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _315 => _315.trailingSlash]), () => ( false)),
3447
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _316 => _316.basePath]), () => ( "/")),
3448
+ _chunkUYSTTPYJcjs.generateClientCachePersistenceCode.call(void 0,
3449
+ _chunkUYSTTPYJcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _317 => _317.cache]))
3409
3450
  ),
3410
3451
  _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
3411
- _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _298 => _298.experimental, 'optionalAccess', _299 => _299.serverComponents])) === "islands"
3452
+ _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _318 => _318.experimental, 'optionalAccess', _319 => _319.serverComponents])) === "islands"
3412
3453
  );
3413
3454
  }
3414
3455
  if (id === "/@farm/server") {
3415
3456
  return generateServerCode();
3416
3457
  }
3417
3458
  if (id === "/@farm/manifest") {
3418
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _300 => _300.getRouteManager, 'call', _301 => _301()]);
3459
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _320 => _320.getRouteManager, 'call', _321 => _321()]);
3419
3460
  if (!routeManager) {
3420
3461
  return `
3421
3462
  export const getManifest = () => ({
@@ -3428,9 +3469,9 @@ export const getManifest = () => ({
3428
3469
  `;
3429
3470
  }
3430
3471
  const manifest = routeManager.generateClientManifest(server.config.root);
3431
- const globalStylesheetHref = _chunkWZW6LEHMcjs.resolveDevGlobalStylesheetHref.call(void 0,
3472
+ const globalStylesheetHref = _chunkUYSTTPYJcjs.resolveDevGlobalStylesheetHref.call(void 0,
3432
3473
  server.config.root,
3433
- _optionalChain([farmApp, 'optionalAccess', _302 => _302.getConfig, 'call', _303 => _303(), 'access', _304 => _304.srcDir])
3474
+ _optionalChain([farmApp, 'optionalAccess', _322 => _322.getConfig, 'call', _323 => _323(), 'access', _324 => _324.srcDir])
3434
3475
  );
3435
3476
  const fullManifest = {
3436
3477
  clientEntry: "/@farm/client.js",
@@ -3456,11 +3497,11 @@ export const getManifest = () => ({
3456
3497
  };
3457
3498
  }
3458
3499
  for (const layout of manifest.layouts) {
3459
- const groupScope = _chunk76GHW3WIcjs.getRouteGroupScope.call(void 0, layout.pattern);
3500
+ const groupScope = _chunkO27PLNQZcjs.getRouteGroupScope.call(void 0, layout.pattern);
3460
3501
  fullManifest.layouts[layout.pattern] = {
3461
3502
  modulePath: layout.modulePath,
3462
3503
  pattern: layout.pattern,
3463
- ...groupScope ? { urlPattern: _chunk76GHW3WIcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3504
+ ...groupScope ? { urlPattern: _chunkO27PLNQZcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3464
3505
  shouldHydrate: layout.shouldHydrate,
3465
3506
  islandStrategy: layout.islandStrategy,
3466
3507
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -3486,46 +3527,46 @@ export const manifest = getManifest();
3486
3527
  }
3487
3528
  },
3488
3529
  async transform(code, id, transformOptions) {
3489
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _305 => _305.getConfig, 'call', _306 => _306()]), () => ( options));
3530
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _325 => _325.getConfig, 'call', _326 => _326()]), () => ( options));
3490
3531
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3491
3532
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
3492
- environment: _optionalChain([transformOptions, 'optionalAccess', _307 => _307.ssr]) === true ? "rsc" : "client"
3533
+ environment: _optionalChain([transformOptions, 'optionalAccess', _327 => _327.ssr]) === true ? "rsc" : "client"
3493
3534
  });
3494
3535
  if (serverFns) {
3495
3536
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
3496
3537
  code = serverFns.code;
3497
3538
  }
3498
3539
  }
3499
- if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _308 => _308.experimental, 'optionalAccess', _309 => _309.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3540
+ if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _328 => _328.experimental, 'optionalAccess', _329 => _329.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3500
3541
  const file = id.split("?", 1)[0];
3501
3542
  const actionModule = transformFarmFormActionModule({
3502
3543
  code,
3503
3544
  id,
3504
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _310 => _310.config, 'access', _311 => _311.root]) || process.cwd(),
3505
- ssr: _optionalChain([transformOptions, 'optionalAccess', _312 => _312.ssr]) === true,
3545
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _330 => _330.config, 'access', _331 => _331.root]) || process.cwd(),
3546
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _332 => _332.ssr]) === true,
3506
3547
  // Parsed by file type: page components are TSX.
3507
3548
  parse: (source) => _vite.parseSync.call(void 0, file, source).program
3508
3549
  });
3509
3550
  if (actionModule) return { code: actionModule, map: null };
3510
3551
  }
3511
- if (!_optionalChain([transformOptions, 'optionalAccess', _313 => _313.ssr])) {
3512
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315(), 'optionalAccess', _316 => _316.docs]));
3513
- if (_chunkWZW6LEHMcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3514
- const redacted = _chunkWZW6LEHMcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3552
+ if (!_optionalChain([transformOptions, 'optionalAccess', _333 => _333.ssr])) {
3553
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _334 => _334.getConfig, 'call', _335 => _335(), 'optionalAccess', _336 => _336.docs]));
3554
+ if (_chunkUYSTTPYJcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3555
+ const redacted = _chunkUYSTTPYJcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3515
3556
  if (redacted !== null) return { code: redacted, map: null };
3516
3557
  }
3517
3558
  }
3518
- if (!_optionalChain([transformOptions, 'optionalAccess', _317 => _317.ssr])) {
3519
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options));
3520
- if ((_optionalChain([currentConfig, 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3559
+ if (!_optionalChain([transformOptions, 'optionalAccess', _337 => _337.ssr])) {
3560
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _338 => _338.getConfig, 'call', _339 => _339()]), () => ( options));
3561
+ if ((_optionalChain([currentConfig, 'access', _340 => _340.experimental, 'optionalAccess', _341 => _341.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3521
3562
  const violation = findClientServerFnViolation(code, id);
3522
3563
  if (violation) {
3523
3564
  this.error(formatServerFnBoundaryError(violation, id));
3524
3565
  }
3525
3566
  }
3526
3567
  }
3527
- if (!_optionalChain([transformOptions, 'optionalAccess', _322 => _322.ssr]) && shouldInspectClientBoundary(id, code)) {
3528
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _323 => _323.getConfig, 'call', _324 => _324()]), () => ( options)));
3568
+ if (!_optionalChain([transformOptions, 'optionalAccess', _342 => _342.ssr]) && shouldInspectClientBoundary(id, code)) {
3569
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _343 => _343.getConfig, 'call', _344 => _344()]), () => ( options)));
3529
3570
  }
3530
3571
  if (typeof imageImports.transform === "function") {
3531
3572
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -3540,13 +3581,13 @@ export const manifest = getManifest();
3540
3581
  id,
3541
3582
  transformOptions
3542
3583
  );
3543
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _325 => _325.code, 'optionalAccess', _326 => _326.toString, 'call', _327 => _327()]);
3584
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _345 => _345.code, 'optionalAccess', _346 => _346.toString, 'call', _347 => _347()]);
3544
3585
  if (fontCode) {
3545
3586
  transformedCode = fontCode;
3546
3587
  transformed = true;
3547
3588
  }
3548
3589
  }
3549
- if (_optionalChain([transformOptions, 'optionalAccess', _328 => _328.ssr]) && server) {
3590
+ if (_optionalChain([transformOptions, 'optionalAccess', _348 => _348.ssr]) && server) {
3550
3591
  const rewrittenImports = rewriteEarlySsrRelativeImports({
3551
3592
  code: transformedCode,
3552
3593
  id,
@@ -3558,28 +3599,38 @@ export const manifest = getManifest();
3558
3599
  transformed = true;
3559
3600
  }
3560
3601
  }
3561
- if (_chunkWZW6LEHMcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3602
+ if (_chunkUYSTTPYJcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3562
3603
  const clientBoundarySource = transformedCode;
3563
3604
  const moduleInfo = this.getModuleInfo(id);
3564
3605
  if (moduleInfo) {
3565
3606
  moduleInfo.isClientComponent = true;
3566
3607
  }
3567
- transformedCode = _chunkWZW6LEHMcjs.stripUseClientDirective.call(void 0, transformedCode);
3608
+ transformedCode = _chunkUYSTTPYJcjs.stripUseClientDirective.call(void 0, transformedCode);
3568
3609
  transformed = true;
3569
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _329 => _329.getConfig, 'call', _330 => _330()]), () => ( options));
3610
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _349 => _349.getConfig, 'call', _350 => _350()]), () => ( options));
3570
3611
  let isolatedModuleReference = null;
3571
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _331 => _331.config, 'access', _332 => _332.root]) || process.cwd();
3612
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _351 => _351.config, 'access', _352 => _352.root]) || process.cwd();
3572
3613
  const cleanId = id.split("?", 1)[0];
3573
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _333 => _333.getRouteManager, 'call', _334 => _334(), 'access', _335 => _335.getIsolatedClientBoundaryModules, 'call', _336 => _336(root)])));
3574
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _337 => _337.has, 'call', _338 => _338(path5.resolve(cleanId))]) === true;
3575
- if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkWZW6LEHMcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3576
- isolatedModuleReference = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, cleanId, root);
3614
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _353 => _353.getRouteManager, 'call', _354 => _354(), 'access', _355 => _355.getIsolatedClientBoundaryModules, 'call', _356 => _356(root)])));
3615
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _357 => _357.has, 'call', _358 => _358(path5.resolve(cleanId))]) === true;
3616
+ if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkUYSTTPYJcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3617
+ isolatedModuleReference = _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, cleanId, root);
3618
+ const islandsMode = _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _359 => _359.experimental, 'optionalAccess', _360 => _360.serverComponents])) === "islands";
3619
+ const explicitStrategy = _chunkUYSTTPYJcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
3620
+ const inference = islandsMode && explicitStrategy === null ? _chunkUYSTTPYJcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
3621
+ if (inference) {
3622
+ for (const file of inference.files) {
3623
+ if (file !== path5.resolve(cleanId)) this.addWatchFile(file);
3624
+ recordFarmIslandInferenceDependency(file, cleanId);
3625
+ }
3626
+ }
3577
3627
  const transformedBoundary = transformIsolatedClientBoundaryModule({
3578
3628
  code: transformedCode,
3579
3629
  moduleReference: isolatedModuleReference,
3580
- islandStrategy: _nullishCoalesce(_chunkWZW6LEHMcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
3630
+ islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
3581
3631
  parse: (source) => this.parse(source),
3582
- slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _339 => _339.experimental, 'optionalAccess', _340 => _340.serverComponents])) === "islands"
3632
+ slots: islandsMode,
3633
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _361 => _361.strategy]) === "interaction"
3583
3634
  });
3584
3635
  if (!transformedBoundary) {
3585
3636
  this.error(
@@ -3609,7 +3660,7 @@ export const manifest = getManifest();
3609
3660
  );
3610
3661
  return;
3611
3662
  }` : "";
3612
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _341 => _341.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3663
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _362 => _362.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3613
3664
  if (import.meta.hot) {
3614
3665
  import.meta.hot.accept((newModule) => {
3615
3666
  ${isolatedHmrUpdate}
@@ -3659,19 +3710,19 @@ if (import.meta.hot) {
3659
3710
  if (!routeManager) return;
3660
3711
  const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
3661
3712
  if (ssgPages.length === 0) {
3662
- _chunkVQJYGZNXcjs.logger.info("No SSG pages found - all pages will use SSR");
3713
+ _chunkQMNWKQL4cjs.logger.info("No SSG pages found - all pages will use SSR");
3663
3714
  return;
3664
3715
  }
3665
- _chunkVQJYGZNXcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3666
- _chunkVQJYGZNXcjs.logger.info("Pre-rendering SSG pages...");
3667
- const outDir = path5.join(_optionalChain([server, 'optionalAccess', _342 => _342.config, 'access', _343 => _343.root]) || process.cwd(), options.outDir || "dist");
3716
+ _chunkQMNWKQL4cjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3717
+ _chunkQMNWKQL4cjs.logger.info("Pre-rendering SSG pages...");
3718
+ const outDir = path5.join(_optionalChain([server, 'optionalAccess', _363 => _363.config, 'access', _364 => _364.root]) || process.cwd(), options.outDir || "dist");
3668
3719
  const clientDir = path5.join(outDir, "client");
3669
3720
  for (const page of ssgPages) {
3670
3721
  try {
3671
3722
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
3672
3723
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
3673
3724
  const mod = await routeManager.loadRouteModule(page.filePath);
3674
- if (!_optionalChain([mod, 'optionalAccess', _344 => _344.default])) return;
3725
+ if (!_optionalChain([mod, 'optionalAccess', _365 => _365.default])) return;
3675
3726
  const { layouts } = routeManager.matchRoute(page.urlPath);
3676
3727
  const layoutModules = await Promise.all(
3677
3728
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -3703,7 +3754,7 @@ if (import.meta.hot) {
3703
3754
  const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
3704
3755
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
3705
3756
  const fullHtml = `<!DOCTYPE html>
3706
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _345 => _345.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3757
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _366 => _366.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3707
3758
  <head>
3708
3759
  <meta charset="utf-8">
3709
3760
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -3721,10 +3772,10 @@ if (import.meta.hot) {
3721
3772
  fs2.mkdirSync(path5.dirname(outputPath), { recursive: true });
3722
3773
  fs2.writeFileSync(outputPath, fullHtml);
3723
3774
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
3724
- _chunkVQJYGZNXcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
3775
+ _chunkQMNWKQL4cjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
3725
3776
  });
3726
3777
  } catch (error) {
3727
- _chunkVQJYGZNXcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
3778
+ _chunkQMNWKQL4cjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
3728
3779
  }
3729
3780
  }
3730
3781
  const manifestPath = path5.join(outDir, "__ssg_manifest.json");
@@ -3740,9 +3791,9 @@ if (import.meta.hot) {
3740
3791
  2
3741
3792
  )
3742
3793
  );
3743
- _chunkVQJYGZNXcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
3794
+ _chunkQMNWKQL4cjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
3744
3795
  } catch (error) {
3745
- _chunkVQJYGZNXcjs.logger.error(`SSG build failed: ${error}`);
3796
+ _chunkQMNWKQL4cjs.logger.error(`SSG build failed: ${error}`);
3746
3797
  }
3747
3798
  },
3748
3799
  async handleHotUpdate(ctx) {
@@ -3761,13 +3812,19 @@ if (import.meta.hot) {
3761
3812
  });
3762
3813
  }
3763
3814
  }
3764
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347()]);
3815
+ for (const island of _nullishCoalesce(farmIslandInferenceDependents.get(path5.resolve(file)), () => ( []))) {
3816
+ if (island === path5.resolve(file)) continue;
3817
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, island)), () => ( []))) {
3818
+ server2.moduleGraph.invalidateModule(mod);
3819
+ }
3820
+ }
3821
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368()]);
3765
3822
  const normalizedFile = file.replace(/\\/g, "/");
3766
3823
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
3767
- (appDir) => normalizedFile.startsWith(`${_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appDir)}/api/`)
3824
+ (appDir) => normalizedFile.startsWith(`${_chunkQMNWKQL4cjs.toPosixPath.call(void 0, appDir)}/api/`)
3768
3825
  )) {
3769
3826
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3770
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _348 => _348(`updated ${file}`)]);
3827
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _369 => _369(`updated ${file}`)]);
3771
3828
  server2.ws.send({ type: "full-reload", path: "*" });
3772
3829
  return [];
3773
3830
  }
@@ -3777,7 +3834,7 @@ if (import.meta.hot) {
3777
3834
  for (const mod of modules) {
3778
3835
  server2.moduleGraph.invalidateModule(mod);
3779
3836
  }
3780
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _349 => _349(`updated ${file}`)]);
3837
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _370 => _370(`updated ${file}`)]);
3781
3838
  server2.ws.send({
3782
3839
  type: "full-reload",
3783
3840
  path: "*"
@@ -3790,7 +3847,7 @@ if (import.meta.hot) {
3790
3847
  for (const mod of modules) {
3791
3848
  server2.moduleGraph.invalidateModule(mod);
3792
3849
  }
3793
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _350 => _350(`updated ${file}`)]);
3850
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _371 => _371(`updated ${file}`)]);
3794
3851
  server2.ws.send({
3795
3852
  type: "full-reload",
3796
3853
  path: "*"
@@ -3798,12 +3855,12 @@ if (import.meta.hot) {
3798
3855
  return [];
3799
3856
  }
3800
3857
  if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
3801
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _351 => _351(`updated ${file}`)]);
3858
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _372 => _372(`updated ${file}`)]);
3802
3859
  }
3803
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _352 => _352.experimental, 'optionalAccess', _353 => _353.isolatedClientHydration]);
3804
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _354 => _354.getRouteManager, 'call', _355 => _355()]);
3860
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _373 => _373.experimental, 'optionalAccess', _374 => _374.isolatedClientHydration]);
3861
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _375 => _375.getRouteManager, 'call', _376 => _376()]);
3805
3862
  const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
3806
- const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _356 => _356.renderer])) && planRouteManager !== void 0;
3863
+ const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _377 => _377.renderer])) && planRouteManager !== void 0;
3807
3864
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
3808
3865
  const routeManager = planRouteManager;
3809
3866
  if (routeManager) {
@@ -3827,7 +3884,7 @@ if (import.meta.hot) {
3827
3884
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3828
3885
  for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
3829
3886
  if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
3830
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkVQJYGZNXcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
3887
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkQMNWKQL4cjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
3831
3888
  server2.moduleGraph.invalidateModule(mod);
3832
3889
  }
3833
3890
  }
@@ -3839,7 +3896,7 @@ if (import.meta.hot) {
3839
3896
  return [];
3840
3897
  }
3841
3898
  } catch (error) {
3842
- _chunkVQJYGZNXcjs.logger.warn(
3899
+ _chunkQMNWKQL4cjs.logger.warn(
3843
3900
  `[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
3844
3901
  );
3845
3902
  return modules;
@@ -3850,7 +3907,7 @@ if (import.meta.hot) {
3850
3907
  if (normalizedFile.includes("middleware.")) {
3851
3908
  if (middlewareManager) {
3852
3909
  await middlewareManager.reload();
3853
- _chunkVQJYGZNXcjs.logger.success("\u2705 Middleware reloaded!");
3910
+ _chunkQMNWKQL4cjs.logger.success("\u2705 Middleware reloaded!");
3854
3911
  if (initialPluginManager) {
3855
3912
  for (const middleware of middlewareManager.getMiddlewares()) {
3856
3913
  await initialPluginManager.runHookParallel("middlewareDiscovered", {
@@ -3863,7 +3920,7 @@ if (import.meta.hot) {
3863
3920
  }
3864
3921
  return [];
3865
3922
  }
3866
- _optionalChain([farmApp, 'optionalAccess', _357 => _357.getRouteManager, 'call', _358 => _358(), 'access', _359 => _359.invalidateClientManifest, 'call', _360 => _360()]);
3923
+ _optionalChain([farmApp, 'optionalAccess', _378 => _378.getRouteManager, 'call', _379 => _379(), 'access', _380 => _380.invalidateClientManifest, 'call', _381 => _381()]);
3867
3924
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
3868
3925
  if (manifestModule) {
3869
3926
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -3913,18 +3970,27 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
3913
3970
  }
3914
3971
  return farmRoot;
3915
3972
  }
3973
+ var farmIslandInferenceDependents = /* @__PURE__ */ new Map();
3974
+ function recordFarmIslandInferenceDependency(file, island) {
3975
+ const key = path5.resolve(file);
3976
+ let islands = farmIslandInferenceDependents.get(key);
3977
+ if (!islands) farmIslandInferenceDependents.set(key, islands = /* @__PURE__ */ new Set());
3978
+ islands.add(path5.resolve(island));
3979
+ }
3980
+ var FARM_DEV_CLIENT_BOOT_ID = "/@farm/client-boot.js";
3981
+ var FARM_DEV_CLIENT_BOOT_MODULE = 'import { startFarmIslandsBoot } from "@farm.js/core/internal/islands-boot";\nstartFarmIslandsBoot();\n';
3916
3982
  function isFarmClientVirtualId(id) {
3917
3983
  const pathname = id.split("?", 1)[0];
3918
3984
  return pathname === "/@farm/client" || pathname === "/@farm/client.js";
3919
3985
  }
3920
3986
  function isClientEnvironment(context, loadOptions) {
3921
3987
  const environment = context.environment;
3922
- if (_optionalChain([environment, 'optionalAccess', _361 => _361.config, 'optionalAccess', _362 => _362.consumer])) return environment.config.consumer === "client";
3923
- if (_optionalChain([environment, 'optionalAccess', _363 => _363.name])) return environment.name === "client";
3924
- return _optionalChain([loadOptions, 'optionalAccess', _364 => _364.ssr]) !== true;
3988
+ if (_optionalChain([environment, 'optionalAccess', _382 => _382.config, 'optionalAccess', _383 => _383.consumer])) return environment.config.consumer === "client";
3989
+ if (_optionalChain([environment, 'optionalAccess', _384 => _384.name])) return environment.name === "client";
3990
+ return _optionalChain([loadOptions, 'optionalAccess', _385 => _385.ssr]) !== true;
3925
3991
  }
3926
3992
  function invalidateProgrammaticClientRouteModules(server) {
3927
- const graph = _optionalChain([server, 'access', _365 => _365.environments, 'optionalAccess', _366 => _366.client, 'optionalAccess', _367 => _367.moduleGraph]);
3993
+ const graph = _optionalChain([server, 'access', _386 => _386.environments, 'optionalAccess', _387 => _387.client, 'optionalAccess', _388 => _388.moduleGraph]);
3928
3994
  if (!graph) return;
3929
3995
  for (const [id, module] of graph.idToModuleMap) {
3930
3996
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -3938,7 +4004,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
3938
4004
  kind: parsed.kind,
3939
4005
  routePath: parsed.routePath,
3940
4006
  routesFile,
3941
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _368 => _368.routes, 'access', _369 => _369.get, 'call', _370 => _370(
4007
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _389 => _389.routes, 'access', _390 => _390.get, 'call', _391 => _391(
3942
4008
  _chunkNK2VWS7Pcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
3943
4009
  )]),
3944
4010
  rendererServer: renderer.server,
@@ -3946,11 +4012,11 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
3946
4012
  });
3947
4013
  }
3948
4014
  function resolveRealModuleFile(filePath, root) {
3949
- const resolved = _nullishCoalesce(_chunkWZW6LEHMcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
4015
+ const resolved = _nullishCoalesce(_chunkUYSTTPYJcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
3950
4016
  try {
3951
- return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
4017
+ return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
3952
4018
  } catch (e15) {
3953
- return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolved);
4019
+ return _chunkQMNWKQL4cjs.toPosixPath.call(void 0, resolved);
3954
4020
  }
3955
4021
  }
3956
4022
  function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkRD623KW4cjs.REACT_RENDERER) {
@@ -4246,7 +4312,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
4246
4312
  `.trim();
4247
4313
  }
4248
4314
  function toProgrammaticRouteImportSpecifier(filePath, root) {
4249
- return root ? _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
4315
+ return root ? _chunkQMNWKQL4cjs.toViteModuleId.call(void 0, filePath, root) : filePath;
4250
4316
  }
4251
4317
  async function parseRouteModuleProps(routeModule, input) {
4252
4318
  if (typeof routeModule.__farmResolveRouteProps === "function") {
@@ -4260,12 +4326,12 @@ async function parseRouteModuleProps(routeModule, input) {
4260
4326
  }
4261
4327
  const schemas = routeModule.__farmRouteSchemas;
4262
4328
  const params = parseRouteModuleSchema(
4263
- _optionalChain([schemas, 'optionalAccess', _371 => _371.params]),
4329
+ _optionalChain([schemas, 'optionalAccess', _392 => _392.params]),
4264
4330
  input.props.params,
4265
4331
  "params",
4266
4332
  input.routePath
4267
4333
  );
4268
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _372 => _372.search]), input.search, "search", input.routePath);
4334
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _393 => _393.search]), input.search, "search", input.routePath);
4269
4335
  return {
4270
4336
  ...input.props,
4271
4337
  params,
@@ -4285,12 +4351,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
4285
4351
  }
4286
4352
  }
4287
4353
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
4288
- const providerClientCode = _chunkWZW6LEHMcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4354
+ const providerClientCode = _chunkUYSTTPYJcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4289
4355
  integrationProviders,
4290
4356
  root,
4291
4357
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
4292
4358
  );
4293
- const clientPluginEntry = _chunkWZW6LEHMcjs.generateFarmClientPluginEntryCode.call(void 0,
4359
+ const clientPluginEntry = _chunkUYSTTPYJcjs.generateFarmClientPluginEntryCode.call(void 0,
4294
4360
  plugins,
4295
4361
  root,
4296
4362
  srcDir,
@@ -4299,7 +4365,7 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
4299
4365
  const appSetupPath = _chunkRD623KW4cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
4300
4366
  const rendererClientImports = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
4301
4367
  import { hydrateRoot, createRoot } from 'react-dom/client'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
4302
- import __farmAppSetup from ${JSON.stringify(_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, appSetupPath, root))}
4368
+ import __farmAppSetup from ${JSON.stringify(_chunkQMNWKQL4cjs.toViteModuleId.call(void 0, appSetupPath, root))}
4303
4369
  __farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
4304
4370
  const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
4305
4371
  const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
@@ -4338,7 +4404,7 @@ async function createFarmServerTreePageElement(source, pathname) {
4338
4404
  return null;
4339
4405
  }
4340
4406
  }
4341
- ${islandValues ? `${_chunkWZW6LEHMcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4407
+ ${islandValues ? `${_chunkUYSTTPYJcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4342
4408
  let farmLastRouteState = null;
4343
4409
 
4344
4410
  // A hot update to a layout tree's client module renders the route again.
@@ -4365,6 +4431,7 @@ import {
4365
4431
  createFarmDeploymentRequestHeaders,
4366
4432
  isFarmDeploymentMismatchResponse,
4367
4433
  } from '@farm.js/core/deployment'
4434
+ ${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
4368
4435
  ${providerClientCode.imports}
4369
4436
  ${clientPluginEntry.imports}
4370
4437
 
@@ -4831,6 +4898,7 @@ class LegacyManifestSPARouter {
4831
4898
  // Initialize the SPA router
4832
4899
  const spaRouter = new SPARouter({
4833
4900
  shouldUseDocumentNavigation: matchesDocumentNavigation,
4901
+ ${islandValues ? "fetchNavigationDocument: fetchFarmNavigationDocument," : ""}
4834
4902
  });
4835
4903
  window.__FARM_SPA_ROUTER__ = spaRouter;
4836
4904
 
@@ -5147,7 +5215,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
5147
5215
  return loadedLayouts;
5148
5216
  }
5149
5217
 
5150
- ${_chunkWZW6LEHMcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5218
+ ${_chunkUYSTTPYJcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5151
5219
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
5152
5220
  let wrapped = element;
5153
5221
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -5449,7 +5517,14 @@ function parseNavigationFragment(html) {
5449
5517
  return template.content;
5450
5518
  }
5451
5519
 
5452
- function replaceNavigationBoundary(container, fragment, currentPatterns, nextPatterns, refresh = false) {
5520
+ function replaceNavigationBoundary(
5521
+ container,
5522
+ fragment,
5523
+ currentPatterns,
5524
+ nextPatterns,
5525
+ refresh = false,
5526
+ find = findLayoutBoundary,
5527
+ ) {
5453
5528
  let sharedCount = 0;
5454
5529
  while (
5455
5530
  sharedCount < currentPatterns.length &&
@@ -5460,13 +5535,13 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
5460
5535
  }
5461
5536
 
5462
5537
  const fragmentTreeRoot = nextPatterns.length > 0
5463
- ? findLayoutBoundary(fragment, nextPatterns[0])
5538
+ ? find(fragment, nextPatterns[0])
5464
5539
  : fragment.querySelector('#__farm_page__');
5465
5540
  const currentTarget = sharedCount < currentPatterns.length
5466
- ? findLayoutBoundary(container, currentPatterns[sharedCount])
5541
+ ? find(container, currentPatterns[sharedCount])
5467
5542
  : container.querySelector('#__farm_page__');
5468
5543
  const nextTarget = sharedCount < nextPatterns.length
5469
- ? findLayoutBoundary(fragment, nextPatterns[sharedCount])
5544
+ ? find(fragment, nextPatterns[sharedCount])
5470
5545
  : fragment.querySelector('#__farm_page__');
5471
5546
 
5472
5547
  if (!currentTarget || !nextTarget) {
@@ -5497,6 +5572,184 @@ function replaceNavigationBoundary(container, fragment, currentPatterns, nextPat
5497
5572
  return nextTarget;
5498
5573
  }
5499
5574
 
5575
+ ${islandValues ? `${_chunkUYSTTPYJcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
5576
+
5577
+ // Islands mode navigates as the production client does: it fetches the page itself, names the
5578
+ // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
5579
+ // before slow Suspense content. Other pages (a client page, a layout that hydrates, route slots)
5580
+ // keep the page-data request.
5581
+ function farmLayoutIdentity(boundary) {
5582
+ return boundary.getAttribute('data-farm-layout-key') || boundary.getAttribute('data-farm-layout-pattern');
5583
+ }
5584
+
5585
+ function findLayoutBoundaryByIdentity(root, identity) {
5586
+ const boundaries = root.querySelectorAll
5587
+ ? root.querySelectorAll('[data-farm-layout-boundary="true"]')
5588
+ : [];
5589
+ for (const boundary of boundaries) {
5590
+ if (farmLayoutIdentity(boundary) === identity) return boundary;
5591
+ }
5592
+ return null;
5593
+ }
5594
+
5595
+ function readLayoutIdentities(root) {
5596
+ return Array.from(root.querySelectorAll ? root.querySelectorAll('[data-farm-layout-boundary="true"]') : [])
5597
+ .map(farmLayoutIdentity)
5598
+ .filter(Boolean);
5599
+ }
5600
+
5601
+ // A segment response leaves out the layouts the browser said it shows. It fits this page only if
5602
+ // the page still shows each of them, at the same depth.
5603
+ function fitsFarmSegment(currentRoot, nextRoot) {
5604
+ const nextBoundaries = Array.from(nextRoot.querySelectorAll('[data-farm-layout-boundary="true"]'));
5605
+ const lastKept = nextBoundaries
5606
+ .map((boundary) => boundary.getAttribute('data-farm-layout-kept') === 'true')
5607
+ .lastIndexOf(true);
5608
+ if (lastKept === -1) return true;
5609
+ const current = readLayoutIdentities(currentRoot);
5610
+ for (let index = 0; index <= lastKept; index++) {
5611
+ if (current[index] !== farmLayoutIdentity(nextBoundaries[index])) return false;
5612
+ }
5613
+ return true;
5614
+ }
5615
+
5616
+ // Each navigation starts a new generation, so a page left while it streams stops adding content.
5617
+ let farmNavigationStreamGeneration = 0;
5618
+
5619
+ function farmDocumentNavigationRoute(pathname) {
5620
+ const match = findRoute(pathname);
5621
+ if (!match) return null;
5622
+ const route = match.route;
5623
+ if (route.isClientComponent || route.shouldHydrate) return null;
5624
+ if (route.renderPlan && route.renderPlan.hydration !== 'none') return null;
5625
+ const layouts = findLayouts(pathname);
5626
+ if (layouts.some((layout) => layout.shouldHydrate)) return null;
5627
+ const owners = new Set([route.pattern, ...layouts.map((layout) => layout.pattern)]);
5628
+ if ((getManifest().slots || []).some((slot) => owners.has(slot.ownerPattern))) return null;
5629
+ return { ...match, layouts };
5630
+ }
5631
+
5632
+ async function fetchFarmNavigationDocument(path, context) {
5633
+ farmNavigationStreamGeneration++;
5634
+ const url = new URL(path, window.location.href);
5635
+ const match = farmDocumentNavigationRoute(url.pathname);
5636
+ const container = document.getElementById('root');
5637
+ if (!match || !container) return null;
5638
+ const deploymentId = window.__FARM_DEPLOYMENT_ID__;
5639
+ const request = async (keepLayouts) => {
5640
+ // A refresh renders every layout; so does a page whose layout React owns, which the swap
5641
+ // replaces whole.
5642
+ const identities =
5643
+ keepLayouts && !context.refresh && !activeLayoutShouldHydrate
5644
+ ? readLayoutIdentities(container)
5645
+ : [];
5646
+ const response = await fetch(url.pathname + url.search, {
5647
+ signal: context.signal,
5648
+ redirect: 'manual',
5649
+ headers: createFarmDeploymentRequestHeaders(deploymentId, {
5650
+ Accept: 'text/html',
5651
+ 'F-Stream': 'flush',
5652
+ ...getFarmIslandValueHeaders(),
5653
+ ...(identities.length ? { 'F-Layouts': JSON.stringify(identities) } : {}),
5654
+ }),
5655
+ });
5656
+ if (isFarmDeploymentMismatchResponse(response, deploymentId)) {
5657
+ const error = createFarmDeploymentMismatchError(response, deploymentId || 'unknown');
5658
+ window.dispatchEvent(new CustomEvent('farm:deployment-mismatch', { detail: error }));
5659
+ throw error;
5660
+ }
5661
+ // A redirect, an error or anything but HTML: the router loads the document instead.
5662
+ if (
5663
+ !response.ok ||
5664
+ !response.body ||
5665
+ !(response.headers.get('content-type') || '').includes('text/html')
5666
+ ) {
5667
+ throw new Error('Failed to fetch the page: ' + response.status);
5668
+ }
5669
+ const stream = await readFarmNavigationStream(response.body, response.headers.get('F-Flush'));
5670
+ const doc = new DOMParser().parseFromString(stream.shell, 'text/html');
5671
+ return { stream, doc, nextRoot: doc.getElementById('root') };
5672
+ };
5673
+ let result = await request(true);
5674
+ if (result.nextRoot && !fitsFarmSegment(container, result.nextRoot)) {
5675
+ result.stream.cancel?.();
5676
+ result = await request(false);
5677
+ }
5678
+ if (!result.nextRoot) {
5679
+ result.stream.cancel?.();
5680
+ throw new Error('The page has no #root');
5681
+ }
5682
+ const { stream, doc, nextRoot } = result;
5683
+ const description = doc.querySelector('meta[name="description"]')?.getAttribute('content');
5684
+ return {
5685
+ props: { params: match.params },
5686
+ modulePath: match.route.modulePath,
5687
+ isClientComponent: false,
5688
+ pageShouldHydrate: false,
5689
+ layoutShouldHydrate: false,
5690
+ shouldHydrate: false,
5691
+ islandStrategy: 'load',
5692
+ renderPlan: match.route.renderPlan,
5693
+ fragment: {
5694
+ html: nextRoot.innerHTML,
5695
+ layoutPatterns: Array.from(nextRoot.querySelectorAll('[data-farm-layout-boundary="true"]'))
5696
+ .map((boundary) => boundary.getAttribute('data-farm-layout-pattern'))
5697
+ .filter(Boolean),
5698
+ },
5699
+ metadata: { title: doc.title, ...(description ? { description } : {}) },
5700
+ layoutModules: match.layouts.map((layout) => layout.modulePath),
5701
+ farmDocument: { stream: stream.next ? stream : null },
5702
+ };
5703
+ }
5704
+
5705
+ // Adds the flushes after a streamed navigation's shell, as the production client does: React's
5706
+ // staged Suspense content and the scripts that reveal it.${isolatedHydrationEnabled ? " The islands React reveals hydrate as they\n// appear, and the ones it removes (a replaced fallback) are released." : ""}
5707
+ async function streamFarmDevNavigation(stream, root, generation) {
5708
+ const isCurrent = () => generation === farmNavigationStreamGeneration && root.isConnected;
5709
+ ${isolatedHydrationEnabled ? `let streaming = true;
5710
+ const removed = new Set();
5711
+ let queued = false;
5712
+ const run = () => {
5713
+ queued = false;
5714
+ if (!isCurrent()) return observer.disconnect();
5715
+ for (const node of removed) if (!node.isConnected) disposeFarmIsolatedClientBoundaries(node);
5716
+ removed.clear();
5717
+ if (!streaming && !root.querySelector('div[hidden][id^="S:"]')) observer.disconnect();
5718
+ hydrateFarmIsolatedClientBoundaries(root).catch((error) => {
5719
+ console.error('[Farm.js] Hydrating streamed islands failed:', error);
5720
+ });
5721
+ };
5722
+ const observer = new MutationObserver((records) => {
5723
+ for (const record of records) for (const node of record.removedNodes) removed.add(node);
5724
+ if (queued) return;
5725
+ queued = true;
5726
+ queueMicrotask(run);
5727
+ });
5728
+ observer.observe(root, { childList: true, subtree: true });` : "const observer = { disconnect() {} };"}
5729
+ try {
5730
+ for (let flush = await stream.next(); flush !== null; flush = await stream.next()) {
5731
+ if (!isCurrent()) {
5732
+ observer.disconnect();
5733
+ return stream.cancel();
5734
+ }
5735
+ const parsed = new DOMParser().parseFromString('<div id="root">' + flush, 'text/html');
5736
+ const fragment = document.createDocumentFragment();
5737
+ for (const node of Array.from(parsed.getElementById('root').childNodes)) fragment.appendChild(node);
5738
+ activateFragmentScripts(fragment);
5739
+ root.appendChild(fragment);
5740
+ }
5741
+ } catch (error) {
5742
+ ${isolatedHydrationEnabled ? "streaming = false;" : ""}
5743
+ if (!isCurrent()) return observer.disconnect();
5744
+ console.error('[Farm.js] A streamed navigation failed:', error);
5745
+ ${isolatedHydrationEnabled ? "farmIsolatedHydrationRuntime.endStream?.(root);\n if (!queued) run();" : ""}
5746
+ return;
5747
+ }
5748
+ if (!isCurrent()) return observer.disconnect();
5749
+ ${isolatedHydrationEnabled ? "streaming = false;\n farmIsolatedHydrationRuntime.endStream?.(root);\n if (!queued) run();" : "observer.disconnect();"}
5750
+ }
5751
+ ` : ""}
5752
+
5500
5753
  let activeLayoutPatterns = readActiveLayoutPatterns();
5501
5754
  let activeLayoutShouldHydrate = window.__FARM_LAYOUT_SHOULD_HYDRATE__ === true;
5502
5755
 
@@ -5506,6 +5759,7 @@ async function renderPage(pageData, info) {
5506
5759
  const container = document.getElementById('root');
5507
5760
  if (!container) return;
5508
5761
  cancelPendingPageHydration();
5762
+ ${islandValues ? "const farmStreamGeneration = ++farmNavigationStreamGeneration;" : ""}
5509
5763
  const destination = window.location.pathname + window.location.search;
5510
5764
 
5511
5765
  if (pageData.interception) {
@@ -5635,7 +5889,7 @@ async function renderPage(pageData, info) {
5635
5889
  if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
5636
5890
  if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
5637
5891
  delete window.__FARM_REACT_ROOT__;
5638
- ${isolatedHydrationEnabled ? "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
5892
+ ${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);"}
5639
5893
  }
5640
5894
 
5641
5895
  const hydrationController = new AbortController();
@@ -5690,6 +5944,7 @@ async function renderPage(pageData, info) {
5690
5944
  activeLayoutPatterns = layoutPatterns;
5691
5945
  activeLayoutShouldHydrate = layoutShouldHydrate;
5692
5946
  window.__FARM_LOADING_MODULE__ = route.loadingModulePath || null;
5947
+ ${islandValues ? "if (pageData.farmDocument?.stream) void streamFarmDevNavigation(pageData.farmDocument.stream, container, farmStreamGeneration);" : ""}
5693
5948
  return true;
5694
5949
  };
5695
5950
 
@@ -5776,12 +6031,10 @@ function farmIslandsOnlyDocument() {
5776
6031
  (window.__FARM_SHOULD_HYDRATE__ === true || pageShouldHydrate || layoutShouldHydrate);
5777
6032
  const hydratedSlots = await hydrateInitialRouteSlots();
5778
6033
  ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !pageShouldHydrate && !layoutShouldHydrate) {
5779
- const hydrationController = new AbortController();
5780
- pendingPageHydrationController = hydrationController;
5781
6034
  // Islands mode hydrates the document, as production does, so islx also watches the islands
5782
- // that stream in after this runs.
5783
- await hydrateFarmIsolatedClientBoundaries(${islandValues ? "document" : "rootContainer"}, hydrationController.signal);
5784
- if (hydrationController.signal.aborted) return;
6035
+ // that stream in after this runs. Not cancelled by a navigation: an island it removes is
6036
+ // disposed with its DOM, and one in a layout it keeps still waits for its trigger.
6037
+ await hydrateFarmIsolatedClientBoundaries(${islandValues ? "document" : "rootContainer"});
5785
6038
  // The rest of the document is static server HTML with nothing to hydrate, so
5786
6039
  // stop holding its clicks and submits once the load-strategy islands are live.
5787
6040
  // Deferred islands capture their own interactions, and held targets outside an
@@ -6001,9 +6254,9 @@ function generateClientManifest(bundle) {
6001
6254
  return manifest;
6002
6255
  }
6003
6256
  async function defineConfig(config = {}) {
6004
- const tailwindVitePlugin = await _chunkLNM57D3Hcjs.loadTailwindVitePlugin.call(void 0, );
6257
+ const tailwindVitePlugin = await _chunkR53QDV6Tcjs.loadTailwindVitePlugin.call(void 0, );
6005
6258
  const appRoot = path5.resolve(config.root || process.cwd());
6006
- if (_optionalChain([config, 'access', _373 => _373.extends, 'optionalAccess', _374 => _374.length])) {
6259
+ if (_optionalChain([config, 'access', _394 => _394.extends, 'optionalAccess', _395 => _395.length])) {
6007
6260
  const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
6008
6261
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
6009
6262
  root: appRoot,
@@ -6013,7 +6266,7 @@ async function defineConfig(config = {}) {
6013
6266
  config = layeredConfig;
6014
6267
  }
6015
6268
  config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
6016
- config.images = _chunkWZW6LEHMcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
6269
+ config.images = _chunkUYSTTPYJcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
6017
6270
  const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
6018
6271
  ssr: true
6019
6272
  });
@@ -6105,13 +6358,13 @@ async function defineConfig(config = {}) {
6105
6358
  if (!serverStarted) {
6106
6359
  serverStarted = true;
6107
6360
  const elapsed = Date.now() - startTime;
6108
- const address = _optionalChain([server, 'access', _375 => _375.httpServer, 'optionalAccess', _376 => _376.address, 'call', _377 => _377()]);
6361
+ const address = _optionalChain([server, 'access', _396 => _396.httpServer, 'optionalAccess', _397 => _397.address, 'call', _398 => _398()]);
6109
6362
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
6110
6363
  const hostConfig = server.config.server.host;
6111
6364
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
6112
6365
  console.log("");
6113
6366
  console.log(
6114
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkGUJTVM36cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6367
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk2FRLSDBTcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6115
6368
  );
6116
6369
  console.log("");
6117
6370
  console.log(
@@ -6145,7 +6398,7 @@ async function defineConfig(config = {}) {
6145
6398
  plugins: [
6146
6399
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
6147
6400
  _chunk65Y5SIBHcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
6148
- _chunkWZW6LEHMcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6401
+ _chunkUYSTTPYJcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6149
6402
  tailwindVitePlugin,
6150
6403
  ...rendererVitePlugins,
6151
6404
  ...reactRefreshPlugins,
@@ -6159,8 +6412,8 @@ async function defineConfig(config = {}) {
6159
6412
  customLogger: farmLogger,
6160
6413
  clearScreen: false,
6161
6414
  optimizeDeps: {
6162
- ..._chunkWZW6LEHMcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6163
- _chunkWZW6LEHMcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6415
+ ..._chunkUYSTTPYJcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6416
+ _chunkUYSTTPYJcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6164
6417
  appRoot,
6165
6418
  _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
6166
6419
  ),
@@ -6203,7 +6456,7 @@ async function defineConfig(config = {}) {
6203
6456
  // Stub out problematic server-only modules during dev mode
6204
6457
  alias: {
6205
6458
  ..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
6206
- ..._chunkWZW6LEHMcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6459
+ ..._chunkUYSTTPYJcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6207
6460
  // Nitro internals that should not be resolved in browser
6208
6461
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
6209
6462
  "@poppinss/dumper": "data:text/javascript,export default {};",