@farm.js/core 0.1.80 → 0.1.82

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/dist/{agent-mcp.d-BPa5n0ld.d.ts → agent-mcp.d-C2Su3x4D.d.ts} +1 -1
  2. package/dist/{agent-mcp.d-DOP95Jxm.d.mts → agent-mcp.d-Yak-LqRd.d.mts} +1 -1
  3. package/dist/agent-runtime.cjs +4 -3
  4. package/dist/agent-runtime.d.mts +2 -1
  5. package/dist/agent-runtime.d.ts +2 -1
  6. package/dist/agent-runtime.mjs +3 -2
  7. package/dist/analyzer-LV23T6QN.cjs +17 -0
  8. package/dist/{analyzer-F7CWE5VA.mjs → analyzer-RPU2KG4J.mjs} +3 -2
  9. package/dist/api/client.cjs +1 -1
  10. package/dist/api/client.mjs +1 -1
  11. package/dist/api/client.native.cjs +1 -1
  12. package/dist/api/client.native.mjs +1 -1
  13. package/dist/api/node.cjs +6 -5
  14. package/dist/api/node.d.mts +4 -3
  15. package/dist/api/node.d.ts +4 -3
  16. package/dist/api/node.mjs +5 -4
  17. package/dist/api/route-manager.cjs +7 -6
  18. package/dist/api/route-manager.d.mts +4 -3
  19. package/dist/api/route-manager.d.ts +4 -3
  20. package/dist/api/route-manager.mjs +6 -5
  21. package/dist/api/runtime.cjs +5 -4
  22. package/dist/api/runtime.d.mts +3 -2
  23. package/dist/api/runtime.d.ts +3 -2
  24. package/dist/api/runtime.mjs +4 -3
  25. package/dist/api.cjs +9 -8
  26. package/dist/api.d.mts +5 -4
  27. package/dist/api.d.ts +5 -4
  28. package/dist/api.mjs +8 -7
  29. package/dist/{app-manifest.d-9UD6BznX.d.mts → app-manifest.d-BcyOFMrg.d.mts} +1 -1
  30. package/dist/{app-manifest.d-CO6Iu0Hx.d.ts → app-manifest.d-DZyXaICz.d.ts} +1 -1
  31. package/dist/app-markdown.cjs +3 -3
  32. package/dist/app-markdown.d.mts +5 -4
  33. package/dist/app-markdown.d.ts +5 -4
  34. package/dist/app-markdown.mjs +2 -2
  35. package/dist/{app.d-DXeRWZK7.d.mts → app.d-C0ePpuaG.d.mts} +30 -4
  36. package/dist/{app.d-DwX1ePhs.d.ts → app.d-CIoXsAbN.d.ts} +30 -4
  37. package/dist/{chunk-Q4TRGTO7.cjs → chunk-26WP75W5.cjs} +32 -16
  38. package/dist/{chunk-7KDCVSTR.mjs → chunk-2PFGA6PB.mjs} +2 -2
  39. package/dist/chunk-2UYYXSUS.mjs +401 -0
  40. package/dist/{chunk-PL7MCYYD.mjs → chunk-3AV4DCXY.mjs} +58 -358
  41. package/dist/{chunk-3GNHJ3RN.cjs → chunk-3BTN3NP7.cjs} +2 -2
  42. package/dist/chunk-3DE6RK7K.cjs +36 -0
  43. package/dist/{chunk-GBW5DU7V.mjs → chunk-47I2MYIR.mjs} +487 -304
  44. package/dist/{chunk-RQBGHHOQ.mjs → chunk-4X7LSGM6.mjs} +1 -1
  45. package/dist/{chunk-QMR2TUVZ.cjs → chunk-52Q4OB4A.cjs} +4 -4
  46. package/dist/{chunk-BPWTSPK6.mjs → chunk-5AL2GXAU.mjs} +1 -1
  47. package/dist/{chunk-GAWSWJJ2.cjs → chunk-5GFTMTX3.cjs} +2 -2
  48. package/dist/chunk-5MMKNW7Q.cjs +54 -0
  49. package/dist/{chunk-AXA2BSX3.cjs → chunk-5MUFW5UU.cjs} +22 -21
  50. package/dist/{chunk-MQOHYV6L.cjs → chunk-5P65LXGU.cjs} +11 -11
  51. package/dist/{chunk-KEU55O2D.mjs → chunk-63ZE6B6M.mjs} +7 -6
  52. package/dist/{chunk-TS3ZHJN5.cjs → chunk-6BPFIYGY.cjs} +3 -3
  53. package/dist/{chunk-NJ4OASLP.mjs → chunk-6QYPP5KC.mjs} +2 -2
  54. package/dist/{chunk-ATISIC6G.mjs → chunk-7VJXYB6S.mjs} +7 -1
  55. package/dist/{chunk-G4SZC2WH.cjs → chunk-AIPZDBP6.cjs} +557 -374
  56. package/dist/{chunk-X4TSMQWF.cjs → chunk-ARORZ3MH.cjs} +548 -397
  57. package/dist/{chunk-K3XKEZR6.mjs → chunk-AUFEM3FB.mjs} +1 -1
  58. package/dist/{chunk-MGKWYPE3.mjs → chunk-AYDVUCXD.mjs} +1 -0
  59. package/dist/{chunk-5OAN7BG5.cjs → chunk-B2PGVHBG.cjs} +4 -4
  60. package/dist/{chunk-WGWWRV2M.cjs → chunk-B3HQTGXS.cjs} +6 -4
  61. package/dist/chunk-B7L24VPX.cjs +401 -0
  62. package/dist/{chunk-5VDJEKGK.cjs → chunk-BBVLOEND.cjs} +1 -1
  63. package/dist/{chunk-XF7MJSUS.mjs → chunk-BCQIXH7L.mjs} +1 -1
  64. package/dist/{chunk-67MZTLTF.cjs → chunk-BCTHOQPP.cjs} +37 -9
  65. package/dist/{chunk-GBESKA76.cjs → chunk-BSX5OGSD.cjs} +1 -1
  66. package/dist/{chunk-CNDBLUKI.mjs → chunk-BVJUFVCU.mjs} +1 -1
  67. package/dist/{chunk-QHAISITM.mjs → chunk-C3VCYOU4.mjs} +1 -1
  68. package/dist/chunk-C5QHZ626.cjs +85 -0
  69. package/dist/{chunk-3K2E55BJ.mjs → chunk-CA2HBLXP.mjs} +13 -3
  70. package/dist/{chunk-ANZLZNNX.cjs → chunk-CD5Z7RR5.cjs} +155 -20
  71. package/dist/{chunk-4MIDUSIX.mjs → chunk-CJDBTTLB.mjs} +17 -17
  72. package/dist/{chunk-RLCOWWE5.cjs → chunk-CN2JOTRO.cjs} +7 -7
  73. package/dist/chunk-D2VAANBS.mjs +48 -0
  74. package/dist/{chunk-XZBBKZGW.mjs → chunk-DAXU2NBE.mjs} +128 -41
  75. package/dist/{chunk-4H4ZXUNB.cjs → chunk-DJ3PVHTW.cjs} +3 -3
  76. package/dist/{chunk-Z5BANEQD.cjs → chunk-DMSXZNQR.cjs} +2 -2
  77. package/dist/{chunk-ZVSQN7NC.cjs → chunk-DRO3NXA3.cjs} +40 -43
  78. package/dist/{chunk-4OFWG4IK.cjs → chunk-EACD6ND7.cjs} +8 -2
  79. package/dist/{chunk-Q4YEAWUK.mjs → chunk-ECVSRE4Y.mjs} +3 -2
  80. package/dist/{chunk-MDEFTF63.mjs → chunk-EL2Z6YFZ.mjs} +25 -28
  81. package/dist/chunk-EZYKV24V.mjs +385 -0
  82. package/dist/{chunk-TVCFY3KK.cjs → chunk-FB4CWSC2.cjs} +12 -12
  83. package/dist/{chunk-IYFBLWXU.cjs → chunk-FULX5RYX.cjs} +61 -361
  84. package/dist/{chunk-V73Y4UBL.mjs → chunk-GXLNARPO.mjs} +151 -16
  85. package/dist/{chunk-ZPEZXQTM.cjs → chunk-HHQEKLZL.cjs} +2 -2
  86. package/dist/{chunk-HNUBRUFQ.cjs → chunk-HQEYZSF3.cjs} +4 -3
  87. package/dist/{chunk-5ZHC6QGD.cjs → chunk-HQKCSJEH.cjs} +8 -2
  88. package/dist/{chunk-RHI67C2V.cjs → chunk-HUGPJFOC.cjs} +1 -35
  89. package/dist/{chunk-44G4XHEL.mjs → chunk-I4DR3HCH.mjs} +11 -11
  90. package/dist/chunk-I4WZRG73.mjs +54 -0
  91. package/dist/{chunk-MUZHULW2.mjs → chunk-ICOJ2BC6.mjs} +23 -7
  92. package/dist/{chunk-MNIR7I7B.mjs → chunk-INKVDO42.mjs} +1 -1
  93. package/dist/{chunk-C2OLXVUC.mjs → chunk-IVP5Q4BX.mjs} +10 -3
  94. package/dist/{chunk-HEDGTXXB.cjs → chunk-JB4BHRFK.cjs} +17 -17
  95. package/dist/{chunk-XKUKWMGX.cjs → chunk-JCYDWJVO.cjs} +3 -3
  96. package/dist/{chunk-CCMP4JD2.cjs → chunk-JK26IMT7.cjs} +1 -1
  97. package/dist/{chunk-WIZRYFB2.cjs → chunk-JYQ6DGPW.cjs} +8 -6
  98. package/dist/{chunk-SVCUSOEF.mjs → chunk-KR5DF7WK.mjs} +1 -1
  99. package/dist/{chunk-TYHWZOA2.mjs → chunk-KWI3SQFX.mjs} +4 -2
  100. package/dist/{chunk-POVHO46S.mjs → chunk-L3RDECA5.mjs} +1 -1
  101. package/dist/{chunk-LVGB5PYK.cjs → chunk-LM2ZDNDD.cjs} +28 -28
  102. package/dist/{chunk-COTFX4GT.mjs → chunk-LTOT5KVJ.mjs} +1 -1
  103. package/dist/{chunk-RPA45OQS.mjs → chunk-MO4UTDQ6.mjs} +1 -1
  104. package/dist/{chunk-DVHFIETW.cjs → chunk-N2EFMN2K.cjs} +18 -18
  105. package/dist/{chunk-MZ5QGWRW.mjs → chunk-N3VMHPIY.mjs} +2 -2
  106. package/dist/{chunk-KKVRWNDH.mjs → chunk-NAHDG6UX.mjs} +4 -4
  107. package/dist/{chunk-UWOCYINY.cjs → chunk-NEKO3HM2.cjs} +12 -2
  108. package/dist/{chunk-SLEHAGGV.mjs → chunk-NQ3Y6E2T.mjs} +7 -1
  109. package/dist/{chunk-ZDYYZX73.mjs → chunk-NRCKBDYP.mjs} +266 -115
  110. package/dist/{chunk-EG5YBYHO.mjs → chunk-OMB7UGVW.mjs} +1 -1
  111. package/dist/{chunk-JGEN2FIT.mjs → chunk-OP5VI4TP.mjs} +1 -1
  112. package/dist/{chunk-7VCLTNED.mjs → chunk-PNMAD3OS.mjs} +1 -35
  113. package/dist/{chunk-3XTRT3MB.mjs → chunk-PO5MZIWK.mjs} +1 -1
  114. package/dist/{chunk-ASYOWPSR.cjs → chunk-PWDBWXQI.cjs} +2 -1
  115. package/dist/{chunk-WJ2O2MPP.cjs → chunk-Q2VOT3K2.cjs} +494 -407
  116. package/dist/{chunk-7YLDUB4R.cjs → chunk-QCKSYYXK.cjs} +7 -7
  117. package/dist/{chunk-57QAQU4F.mjs → chunk-QRNYSISP.mjs} +1 -1
  118. package/dist/{chunk-3JQBQG7K.mjs → chunk-QSMUMK7Y.mjs} +2 -2
  119. package/dist/{chunk-PRL7FXG4.cjs → chunk-RDNKQ5MK.cjs} +12 -13
  120. package/dist/{chunk-GCRT6GJG.mjs → chunk-RMLR5RMH.mjs} +30 -2
  121. package/dist/{chunk-XY5OZQF6.cjs → chunk-RMPUEH5T.cjs} +2 -2
  122. package/dist/{chunk-7DD5TNPS.cjs → chunk-S7WZUK3B.cjs} +2 -2
  123. package/dist/{chunk-EGHPFXPZ.cjs → chunk-SAPG45RA.cjs} +23 -23
  124. package/dist/{chunk-Z4SMFUZ7.cjs → chunk-U54REWMJ.cjs} +23 -23
  125. package/dist/chunk-U6XYBTUT.mjs +36 -0
  126. package/dist/chunk-UDMBUTJD.mjs +85 -0
  127. package/dist/{chunk-WHEQJN4G.cjs → chunk-UGD53SNO.cjs} +2 -2
  128. package/dist/{chunk-TCMRLW3K.cjs → chunk-VACYUMXW.cjs} +10 -3
  129. package/dist/{chunk-SDICLSQU.cjs → chunk-VMBIKDKW.cjs} +10 -10
  130. package/dist/{chunk-WBPVLCNE.mjs → chunk-VPGEYX5Y.mjs} +4 -4
  131. package/dist/chunk-VS7HLH4S.cjs +385 -0
  132. package/dist/{chunk-UGLTOLTJ.cjs → chunk-W76C7TCW.cjs} +2 -2
  133. package/dist/chunk-WMRGIQTA.cjs +48 -0
  134. package/dist/{chunk-52LTENRE.cjs → chunk-WOAXQ5MZ.cjs} +9 -9
  135. package/dist/{chunk-C6HGUTXB.mjs → chunk-XBSIGZ4J.mjs} +2 -3
  136. package/dist/{chunk-6JWXHPVR.mjs → chunk-XRSNW4IU.mjs} +4 -2
  137. package/dist/{chunk-2RRTOKRZ.mjs → chunk-YHM4PXJY.mjs} +1 -1
  138. package/dist/{chunk-A5D3UMLJ.mjs → chunk-YSU3WCW6.mjs} +1 -1
  139. package/dist/{chunk-4STJ6LGR.mjs → chunk-Z3RM3VA2.mjs} +1 -1
  140. package/dist/{chunk-YN3YMSKD.mjs → chunk-ZIZRIZLP.mjs} +3 -3
  141. package/dist/{cli-runtime.d-DPNTN-JV.d.mts → cli-runtime.d-Hnvvadz7.d.mts} +5 -5
  142. package/dist/{cli-runtime.d-8BhZy_wr.d.ts → cli-runtime.d-I0MphTbc.d.ts} +5 -5
  143. package/dist/{client-component.d-CkDcob6D.d.ts → client-component.d-5QEvtJsg.d.ts} +1 -1
  144. package/dist/{client-component.d-CMCdyAr8.d.mts → client-component.d-DapRqtSC.d.mts} +1 -1
  145. package/dist/{client-plugins.d-WcMwOZGZ.d.mts → client-plugins.d-C1WM3ieD.d.mts} +7 -13
  146. package/dist/{client-plugins.d-BYIovYqX.d.ts → client-plugins.d-DcmDzcSC.d.ts} +7 -13
  147. package/dist/client-plugins.d.mts +2 -1
  148. package/dist/client-plugins.d.ts +2 -1
  149. package/dist/client.cjs +9 -8
  150. package/dist/client.d.mts +20 -151
  151. package/dist/client.d.ts +20 -151
  152. package/dist/client.mjs +8 -7
  153. package/dist/config.d.mts +2 -1
  154. package/dist/config.d.ts +2 -1
  155. package/dist/cron.cjs +2 -2
  156. package/dist/cron.mjs +1 -1
  157. package/dist/desktop.d.mts +3 -2
  158. package/dist/desktop.d.ts +3 -2
  159. package/dist/{devtools-JJOYTIMS.cjs → devtools-5B7NZE6F.cjs} +15 -14
  160. package/dist/{devtools-F3FDFV26.mjs → devtools-C5GXZZ7E.mjs} +12 -11
  161. package/dist/docs.cjs +14 -13
  162. package/dist/docs.d.mts +4 -3
  163. package/dist/docs.d.ts +4 -3
  164. package/dist/docs.mjs +13 -12
  165. package/dist/environment/vite.cjs +7 -6
  166. package/dist/environment/vite.mjs +6 -5
  167. package/dist/{handler.d-s3IM6pbJ.d.mts → handler.d-B8bPCBzl.d.mts} +1 -1
  168. package/dist/{handler.d-BwdOyc9x.d.ts → handler.d-Cliwo6Nu.d.ts} +1 -1
  169. package/dist/{headers.d-BR-OXrqQ.d.mts → headers.d-CVwSpSGX.d.mts} +1 -1
  170. package/dist/{headers.d-CAW4wPey.d.ts → headers.d-C_btqjV6.d.ts} +1 -1
  171. package/dist/index.cjs +68 -65
  172. package/dist/{index.d-BEVK61zS.d.mts → index.d-DFuMZk9-.d.mts} +1 -1
  173. package/dist/{index.d-ah2c89Wu.d.ts → index.d-hOEbMcLk.d.ts} +1 -1
  174. package/dist/index.d.mts +25 -23
  175. package/dist/index.d.ts +25 -23
  176. package/dist/index.mjs +72 -69
  177. package/dist/instrumentation.cjs +3 -3
  178. package/dist/instrumentation.mjs +2 -2
  179. package/dist/integrations/orm.d.mts +2 -1
  180. package/dist/integrations/orm.d.ts +2 -1
  181. package/dist/integrations.cjs +4 -3
  182. package/dist/integrations.d.mts +2 -1
  183. package/dist/integrations.d.ts +2 -1
  184. package/dist/integrations.mjs +3 -2
  185. package/dist/internal/app-markdown-runtime.cjs +2 -2
  186. package/dist/internal/app-markdown-runtime.d.mts +12 -5
  187. package/dist/internal/app-markdown-runtime.d.ts +12 -5
  188. package/dist/internal/app-markdown-runtime.mjs +1 -1
  189. package/dist/internal/build-runtime.cjs +49 -47
  190. package/dist/internal/build-runtime.d.mts +5 -4
  191. package/dist/internal/build-runtime.d.ts +5 -4
  192. package/dist/internal/build-runtime.mjs +48 -46
  193. package/dist/internal/cli-runtime.cjs +25 -24
  194. package/dist/internal/cli-runtime.d.mts +8 -7
  195. package/dist/internal/cli-runtime.d.ts +8 -7
  196. package/dist/internal/cli-runtime.mjs +26 -25
  197. package/dist/internal/client-error-overlay.cjs +4 -4
  198. package/dist/internal/client-error-overlay.mjs +1 -1
  199. package/dist/internal/client-runtime.cjs +76 -15
  200. package/dist/internal/client-runtime.d.mts +18 -7
  201. package/dist/internal/client-runtime.d.ts +18 -7
  202. package/dist/internal/client-runtime.mjs +67 -6
  203. package/dist/internal/compression-runtime.d.mts +2 -1
  204. package/dist/internal/compression-runtime.d.ts +2 -1
  205. package/dist/internal/config-runtime.cjs +14 -13
  206. package/dist/internal/config-runtime.d.mts +4 -3
  207. package/dist/internal/config-runtime.d.ts +4 -3
  208. package/dist/internal/config-runtime.mjs +13 -12
  209. package/dist/internal/docs-precompiled-runtime.cjs +1 -1
  210. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  211. package/dist/internal/form-actions.cjs +3 -3
  212. package/dist/internal/form-actions.mjs +2 -2
  213. package/dist/internal/infra-analytics-runtime.cjs +9 -7
  214. package/dist/internal/infra-analytics-runtime.d.mts +8 -2
  215. package/dist/internal/infra-analytics-runtime.d.ts +8 -2
  216. package/dist/internal/infra-analytics-runtime.mjs +9 -7
  217. package/dist/internal/island-codec.cjs +3 -3
  218. package/dist/internal/island-codec.mjs +2 -2
  219. package/dist/internal/island-value-store.d.mts +1 -1
  220. package/dist/internal/island-value-store.d.ts +1 -1
  221. package/dist/internal/islands-boot.cjs +63 -23
  222. package/dist/internal/islands-boot.d.mts +5 -3
  223. package/dist/internal/islands-boot.d.ts +5 -3
  224. package/dist/internal/islands-boot.mjs +58 -18
  225. package/dist/internal/islands-runtime.cjs +10 -56
  226. package/dist/internal/islands-runtime.mjs +6 -52
  227. package/dist/internal/islands-server.cjs +4 -4
  228. package/dist/internal/islands-server.mjs +3 -3
  229. package/dist/internal/islx-actions-client.cjs +36 -0
  230. package/dist/internal/islx-actions-client.d.mts +13 -0
  231. package/dist/internal/islx-actions-client.d.ts +13 -0
  232. package/dist/internal/islx-actions-client.mjs +36 -0
  233. package/dist/internal/islx-actions-server.cjs +8 -0
  234. package/dist/internal/islx-actions-server.d.mts +6 -0
  235. package/dist/internal/islx-actions-server.d.ts +6 -0
  236. package/dist/internal/islx-actions-server.mjs +8 -0
  237. package/dist/internal/islx-client.d.mts +0 -4
  238. package/dist/internal/islx-client.d.ts +0 -4
  239. package/dist/internal/isolated-boundary.cjs +3 -3
  240. package/dist/internal/isolated-boundary.d.mts +1 -1
  241. package/dist/internal/isolated-boundary.d.ts +1 -1
  242. package/dist/internal/isolated-boundary.mjs +2 -2
  243. package/dist/internal/metadata-image-runtime.cjs +4 -2
  244. package/dist/internal/metadata-image-runtime.d.mts +18 -2
  245. package/dist/internal/metadata-image-runtime.d.ts +18 -2
  246. package/dist/internal/metadata-image-runtime.mjs +5 -3
  247. package/dist/internal/native-server-fns.cjs +5 -4
  248. package/dist/internal/native-server-fns.mjs +4 -3
  249. package/dist/internal/navigation-neutral.cjs +36 -0
  250. package/dist/internal/navigation-neutral.d.mts +14 -0
  251. package/dist/internal/navigation-neutral.d.ts +14 -0
  252. package/dist/internal/navigation-neutral.mjs +36 -0
  253. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  254. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  255. package/dist/internal/production-runtime.cjs +30 -25
  256. package/dist/internal/production-runtime.d.mts +14 -11
  257. package/dist/internal/production-runtime.d.ts +14 -11
  258. package/dist/internal/production-runtime.mjs +35 -30
  259. package/dist/internal/server-tree.cjs +5 -4
  260. package/dist/internal/server-tree.d.mts +3 -4
  261. package/dist/internal/server-tree.d.ts +3 -4
  262. package/dist/internal/server-tree.mjs +4 -3
  263. package/dist/internal/spa-router.cjs +3 -3
  264. package/dist/internal/spa-router.d.mts +4 -3
  265. package/dist/internal/spa-router.d.ts +4 -3
  266. package/dist/internal/spa-router.mjs +2 -2
  267. package/dist/internal/start-manifest.d.mts +2 -1
  268. package/dist/internal/start-manifest.d.ts +2 -1
  269. package/dist/internal/vercel-edge-middleware.cjs +1 -1
  270. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  271. package/dist/island-value-protocol.d-fEoc1m8e.d.mts +27 -0
  272. package/dist/island-value-protocol.d-fEoc1m8e.d.ts +27 -0
  273. package/dist/{layers-5ZD4764G.mjs → layers-744BBUY5.mjs} +2 -2
  274. package/dist/layers-XLOMMQP7.cjs +21 -0
  275. package/dist/markdown.d.mts +2 -1
  276. package/dist/markdown.d.ts +2 -1
  277. package/dist/middleware.cjs +5 -5
  278. package/dist/middleware.d.mts +2 -1
  279. package/dist/middleware.d.ts +2 -1
  280. package/dist/middleware.mjs +4 -4
  281. package/dist/{mount.d-DcoPFqv5.d.ts → mount.d-CAovYKfs.d.ts} +1 -1
  282. package/dist/{mount.d-Ylo-CmzK.d.mts → mount.d-DLeYxeRR.d.mts} +1 -1
  283. package/dist/{native-server-fn-handler-TNVFEQW3.cjs → native-server-fn-handler-57TCQPSM.cjs} +4 -4
  284. package/dist/{native-server-fn-handler-OXFTI6V5.mjs → native-server-fn-handler-PYK65A46.mjs} +3 -3
  285. package/dist/{navigation-delegate.d-2MK4YSlL.d.ts → navigation-delegate.d-BLM-8Q3Z.d.ts} +1 -1
  286. package/dist/{navigation-delegate.d-BA5h0fbE.d.mts → navigation-delegate.d-Chv93QS6.d.mts} +1 -1
  287. package/dist/navigation-errors.d-DwHtoMyR.d.mts +13 -0
  288. package/dist/navigation-errors.d-DwHtoMyR.d.ts +13 -0
  289. package/dist/navigation.cjs +6 -6
  290. package/dist/navigation.d.mts +7 -6
  291. package/dist/navigation.d.ts +7 -6
  292. package/dist/navigation.mjs +5 -5
  293. package/dist/{nitro-C3MYDX7V.mjs → nitro-FK3SZM4H.mjs} +2 -2
  294. package/dist/{nitro-6UOJXJZ6.cjs → nitro-YDFMH5PY.cjs} +6 -6
  295. package/dist/node-module-bundle-TNSY5PAC.cjs +15 -0
  296. package/dist/{node-module-bundle-XPLBMXRD.mjs → node-module-bundle-ZWCQJCKA.mjs} +3 -1
  297. package/dist/{plugin-LN3JBZRR.cjs → plugin-3PT7I26P.cjs} +2 -2
  298. package/dist/{plugin-33I3V42N.mjs → plugin-QOTAPTVV.mjs} +1 -1
  299. package/dist/plugin.cjs +41 -37
  300. package/dist/plugin.d.mts +6 -5
  301. package/dist/plugin.d.ts +6 -5
  302. package/dist/plugin.mjs +40 -36
  303. package/dist/query/client.cjs +10 -10
  304. package/dist/query/client.mjs +5 -5
  305. package/dist/{render-plan.d-2o-AG-ot.d.ts → render-plan.d-BSTjTH8h.d.ts} +1 -1
  306. package/dist/{render-plan.d-ChYBMhLu.d.mts → render-plan.d-CK5Lggyb.d.mts} +1 -1
  307. package/dist/renderer/none/server.cjs +5 -1
  308. package/dist/renderer/none/server.d.mts +3 -1
  309. package/dist/renderer/none/server.d.ts +3 -1
  310. package/dist/renderer/none/server.mjs +4 -0
  311. package/dist/renderer/react/server.cjs +6 -6
  312. package/dist/renderer/react/server.mjs +3 -3
  313. package/dist/renderer-client.cjs +79 -17
  314. package/dist/renderer-client.d.mts +13 -97
  315. package/dist/renderer-client.d.ts +13 -97
  316. package/dist/renderer-client.mjs +69 -7
  317. package/dist/renderer.cjs +4 -2
  318. package/dist/renderer.d.mts +43 -5
  319. package/dist/renderer.d.ts +43 -5
  320. package/dist/renderer.mjs +3 -1
  321. package/dist/{request.d-RCnCBuWq.d.mts → request.d-BhggxQf3.d.mts} +1 -1
  322. package/dist/{request.d-CE0FIkiM.d.ts → request.d-CyJS9bjm.d.ts} +1 -1
  323. package/dist/request.d.mts +3 -2
  324. package/dist/request.d.ts +3 -2
  325. package/dist/{route-rendering.d-BTPOM2nU.d.ts → route-rendering.d-BLPPmI5I.d.ts} +1 -1
  326. package/dist/{route-rendering.d-BZJnfKsp.d.mts → route-rendering.d-CUpG2mZJ.d.mts} +1 -1
  327. package/dist/{router.d-BU_WE6Ol.d.ts → router.d-0X2Ki6rf.d.ts} +1 -1
  328. package/dist/{router.d-D8Vvwl4i.d.mts → router.d-2NQM1Kgw.d.mts} +1 -1
  329. package/dist/routes.cjs +1 -1
  330. package/dist/routes.d.mts +2 -1
  331. package/dist/routes.d.ts +2 -1
  332. package/dist/routes.mjs +1 -1
  333. package/dist/{rsc-pipeline-A3R4U26C.cjs → rsc-pipeline-5AOF64FL.cjs} +19 -18
  334. package/dist/{rsc-pipeline-JZWVSHOR.mjs → rsc-pipeline-DNRLYOJ7.mjs} +18 -17
  335. package/dist/{runtime-SQFRHRGJ.mjs → runtime-EHG2FRXZ.mjs} +18 -17
  336. package/dist/{runtime-WZ3CHHGJ.cjs → runtime-ZVHG5SRB.cjs} +20 -19
  337. package/dist/{runtime.d-DJ6IIKcF.d.ts → runtime.d-CXuwkUgr.d.ts} +1 -1
  338. package/dist/{runtime.d-BnmuOXVD.d.mts → runtime.d-CaFXcu_Q.d.mts} +1 -1
  339. package/dist/server-action-security.cjs +1 -1
  340. package/dist/server-action-security.mjs +1 -1
  341. package/dist/{server-components-status.d-BeqSXcjM.d.ts → server-components-status.d-BdeFD8ZH.d.ts} +1 -1
  342. package/dist/{server-components-status.d-BzOg9M8g.d.mts → server-components-status.d-Cp7zvBm5.d.mts} +1 -1
  343. package/dist/server-fn.cjs +3 -3
  344. package/dist/server-fn.mjs +2 -2
  345. package/dist/server-plugins.cjs +1 -1
  346. package/dist/server-plugins.d.mts +4 -3
  347. package/dist/server-plugins.d.ts +4 -3
  348. package/dist/server-plugins.mjs +1 -1
  349. package/dist/server-query.cjs +4 -4
  350. package/dist/server-query.mjs +3 -3
  351. package/dist/server.cjs +82 -71
  352. package/dist/server.d.mts +12 -11
  353. package/dist/server.d.ts +12 -11
  354. package/dist/server.mjs +61 -50
  355. package/dist/{spa-router.d-BOwuVkMl.d.ts → spa-router.d-Bjgl-Osi.d.ts} +3 -3
  356. package/dist/{spa-router.d-CDpftSsk.d.mts → spa-router.d-l3G38xHa.d.mts} +3 -3
  357. package/dist/{ssg.d-BTVqyq8T.d.ts → ssg.d-DDca17Lc.d.ts} +2 -2
  358. package/dist/{ssg.d-Bx_WFuwg.d.mts → ssg.d-RnlHOqUL.d.mts} +2 -2
  359. package/dist/store-core.d-BZjuC6Zc.d.mts +309 -0
  360. package/dist/store-core.d-BaOUOPf7.d.ts +309 -0
  361. package/dist/testing.cjs +7 -6
  362. package/dist/testing.d.mts +2 -1
  363. package/dist/testing.d.ts +2 -1
  364. package/dist/testing.mjs +6 -5
  365. package/dist/{utils.d-_dvevm5s.d.ts → utils.d-D8TWmpWo.d.ts} +1 -1
  366. package/dist/{utils.d-JkrpS-NJ.d.mts → utils.d-tdzw0_zQ.d.mts} +1 -1
  367. package/dist/version.cjs +2 -2
  368. package/dist/version.mjs +1 -1
  369. package/dist/vite.cjs +43 -37
  370. package/dist/vite.d.mts +18 -7
  371. package/dist/vite.d.ts +18 -7
  372. package/dist/vite.mjs +42 -36
  373. package/dist/workflows.cjs +2 -2
  374. package/dist/workflows.mjs +1 -1
  375. package/package.json +17 -2
  376. package/dist/analyzer-I7RBBQ65.cjs +0 -16
  377. package/dist/chunk-CQL5ZGFU.cjs +0 -50
  378. package/dist/chunk-HONTCUK6.mjs +0 -203
  379. package/dist/chunk-K6PGK7DC.cjs +0 -203
  380. package/dist/chunk-NBIVGHAT.mjs +0 -50
  381. package/dist/island-value-protocol.d-BRayRghM.d.mts +0 -12
  382. package/dist/island-value-protocol.d-BRayRghM.d.ts +0 -12
  383. package/dist/layers-HMEGUEXM.cjs +0 -21
  384. package/dist/node-module-bundle-M6BISE2P.cjs +0 -13
  385. package/dist/{chunk-EY7ED5UW.mjs → chunk-3RVLJTFZ.mjs} +3 -3
  386. package/dist/{chunk-UJPE75GF.mjs → chunk-J2VUPCCR.mjs} +3 -3
  387. package/dist/{chunk-PBJ7MEOV.cjs → chunk-OZUINP2P.cjs} +2 -2
  388. package/dist/{chunk-7FQFK3OA.mjs → chunk-V7HNYR76.mjs} +3 -3
  389. package/dist/{chunk-2FK47RRZ.cjs → chunk-VGHDPEPQ.cjs} +2 -2
  390. package/dist/{chunk-CGIVCGH5.cjs → chunk-XOFJUSWC.cjs} +2 -2
@@ -41,22 +41,24 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
41
41
 
42
42
 
43
43
 
44
- var _chunkX4TSMQWFcjs = require('./chunk-X4TSMQWF.cjs');
45
44
 
46
45
 
46
+ var _chunkARORZ3MHcjs = require('./chunk-ARORZ3MH.cjs');
47
47
 
48
48
 
49
- var _chunkZ5BANEQDcjs = require('./chunk-Z5BANEQD.cjs');
50
49
 
51
50
 
52
- var _chunkTCMRLW3Kcjs = require('./chunk-TCMRLW3K.cjs');
51
+ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
53
52
 
54
53
 
55
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
54
+ var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
55
+
56
56
 
57
57
 
58
+ var _chunkVMBIKDKWcjs = require('./chunk-VMBIKDKW.cjs');
58
59
 
59
- var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
60
+
61
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
60
62
 
61
63
 
62
64
 
@@ -65,12 +67,13 @@ var _chunkSDICLSQUcjs = require('./chunk-SDICLSQU.cjs');
65
67
 
66
68
 
67
69
 
68
- var _chunkUWOCYINYcjs = require('./chunk-UWOCYINY.cjs');
70
+ var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
69
71
 
70
72
 
71
73
  var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
72
74
 
73
75
 
76
+ var _chunkCD5Z7RR5cjs = require('./chunk-CD5Z7RR5.cjs');
74
77
 
75
78
 
76
79
 
@@ -83,13 +86,15 @@ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
83
86
 
84
87
 
85
88
 
86
- var _chunk5OAN7BG5cjs = require('./chunk-5OAN7BG5.cjs');
89
+
90
+
91
+ var _chunkB2PGVHBGcjs = require('./chunk-B2PGVHBG.cjs');
87
92
 
88
93
 
89
94
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
90
95
 
91
96
 
92
- var _chunkXY5OZQF6cjs = require('./chunk-XY5OZQF6.cjs');
97
+ var _chunkRMPUEH5Tcjs = require('./chunk-RMPUEH5T.cjs');
93
98
 
94
99
 
95
100
 
@@ -140,7 +145,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
140
145
 
141
146
 
142
147
 
143
- var _chunkZVSQN7NCcjs = require('./chunk-ZVSQN7NC.cjs');
148
+ var _chunkDRO3NXA3cjs = require('./chunk-DRO3NXA3.cjs');
144
149
 
145
150
 
146
151
 
@@ -164,7 +169,7 @@ var _chunkSTF6VDYQcjs = require('./chunk-STF6VDYQ.cjs');
164
169
 
165
170
 
166
171
 
167
- var _chunk4OFWG4IKcjs = require('./chunk-4OFWG4IK.cjs');
172
+ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
168
173
 
169
174
 
170
175
  var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
@@ -175,29 +180,32 @@ var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
175
180
 
176
181
 
177
182
 
183
+ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
178
184
 
179
185
 
180
186
 
181
187
 
182
188
 
183
- var _chunk67MZTLTFcjs = require('./chunk-67MZTLTF.cjs');
184
189
 
185
190
 
186
191
 
187
192
 
188
- var _chunkQMR2TUVZcjs = require('./chunk-QMR2TUVZ.cjs');
193
+ var _chunkBCTHOQPPcjs = require('./chunk-BCTHOQPP.cjs');
189
194
 
190
195
 
191
196
 
192
197
  var _chunkMCSRMEQVcjs = require('./chunk-MCSRMEQV.cjs');
193
198
 
194
199
 
200
+ var _chunkHQKCSJEHcjs = require('./chunk-HQKCSJEH.cjs');
201
+
202
+
195
203
  var _chunk3EIPOTZVcjs = require('./chunk-3EIPOTZV.cjs');
196
204
 
197
205
 
198
206
 
199
207
 
200
- var _chunkQ4TRGTO7cjs = require('./chunk-Q4TRGTO7.cjs');
208
+ var _chunk26WP75W5cjs = require('./chunk-26WP75W5.cjs');
201
209
 
202
210
 
203
211
 
@@ -216,14 +224,14 @@ var _chunk2NOHVIJ3cjs = require('./chunk-2NOHVIJ3.cjs');
216
224
 
217
225
 
218
226
 
219
- var _chunkWGWWRV2Mcjs = require('./chunk-WGWWRV2M.cjs');
227
+ var _chunkB3HQTGXScjs = require('./chunk-B3HQTGXS.cjs');
220
228
 
221
229
 
222
230
 
223
231
  var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
224
232
 
225
233
 
226
- var _chunk2FK47RRZcjs = require('./chunk-2FK47RRZ.cjs');
234
+ var _chunkVGHDPEPQcjs = require('./chunk-VGHDPEPQ.cjs');
227
235
 
228
236
 
229
237
 
@@ -239,7 +247,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
239
247
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
240
248
 
241
249
 
242
- var _chunkMQOHYV6Lcjs = require('./chunk-MQOHYV6L.cjs');
250
+ var _chunk5P65LXGUcjs = require('./chunk-5P65LXGU.cjs');
243
251
 
244
252
 
245
253
  var _chunkSXXSQVKKcjs = require('./chunk-SXXSQVKK.cjs');
@@ -251,7 +259,7 @@ var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
251
259
 
252
260
 
253
261
 
254
- var _chunkWIZRYFB2cjs = require('./chunk-WIZRYFB2.cjs');
262
+ var _chunkJYQ6DGPWcjs = require('./chunk-JYQ6DGPW.cjs');
255
263
 
256
264
 
257
265
  var _chunkRKQOMG2Xcjs = require('./chunk-RKQOMG2X.cjs');
@@ -302,7 +310,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
302
310
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
303
311
 
304
312
 
305
- var _chunkCCMP4JD2cjs = require('./chunk-CCMP4JD2.cjs');
313
+ var _chunkJK26IMT7cjs = require('./chunk-JK26IMT7.cjs');
306
314
 
307
315
 
308
316
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -364,7 +372,10 @@ function transformFarmFormActionModule(options) {
364
372
  root: options.root,
365
373
  environment: options.ssr ? "server" : "client",
366
374
  parse: options.parse,
367
- runtime: {
375
+ runtime: options.runtime === "renderer" ? {
376
+ server: runtimeModule("@farm.js/core/internal/islx-actions-server"),
377
+ client: runtimeModule("@farm.js/core/internal/islx-actions-client")
378
+ } : {
368
379
  server: runtimeModule("@farm.js/core/internal/islx-server"),
369
380
  client: runtimeModule("@farm.js/core/internal/islx-client")
370
381
  }
@@ -381,9 +392,8 @@ var _module = require('module');
381
392
  // src/dev-preview-guard.ts
382
393
  var _fs = require('fs'); var fs2 = _interopRequireWildcard(_fs); var fs = _interopRequireWildcard(_fs);
383
394
 
384
- var FARM_PREVIEW_REQUEST_HEADER = "x-farm-preview";
385
395
  function isFarmPreviewTunnelRequest(headers) {
386
- return headers[FARM_PREVIEW_REQUEST_HEADER] !== void 0;
396
+ return headers[_chunkHQKCSJEHcjs.FARM_PREVIEW_REQUEST_HEADER] !== void 0;
387
397
  }
388
398
  var VITE_DEFAULT_FS_DENY = [
389
399
  ".env",
@@ -701,7 +711,7 @@ function findClientServerFnViolation(code, id) {
701
711
  return null;
702
712
  }
703
713
  function createServerFnBoundaryDiagnostic(violation, id, location) {
704
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
714
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
705
715
  "CLIENT_SERVER_FUNCTION",
706
716
  id,
707
717
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -960,21 +970,21 @@ function readPropertyKey(property) {
960
970
  function createClientBoundaryDiagnostic(file, finding, location) {
961
971
  switch (finding.kind) {
962
972
  case "server-env":
963
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
973
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
964
974
  "CLIENT_SERVER_ENV",
965
975
  file,
966
976
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
967
977
  location
968
978
  );
969
979
  case "public-env":
970
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
980
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
971
981
  "CLIENT_PROCESS_ENV_PUBLIC",
972
982
  file,
973
983
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
974
984
  location
975
985
  );
976
986
  case "builtin":
977
- return _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
987
+ return _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
978
988
  "CLIENT_NODE_BUILTIN",
979
989
  file,
980
990
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1230,8 +1240,8 @@ function farmLlmsTxtGeneratedPaths(config) {
1230
1240
  return llms.full ? ["/llms.txt", "/llms-full.txt"] : ["/llms.txt"];
1231
1241
  }
1232
1242
  function farmAgentGeneratedPaths(config) {
1233
- const crawlers = _chunk4OFWG4IKcjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1234
- const sitemap = _chunk4OFWG4IKcjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1243
+ const crawlers = _chunkEACD6ND7cjs.resolveFarmAgentCrawlers.call(void 0, _optionalChain([config, 'access', _64 => _64.agent, 'optionalAccess', _65 => _65.crawlers]));
1244
+ const sitemap = _chunkEACD6ND7cjs.resolveFarmAgentSitemap.call(void 0, _optionalChain([config, 'access', _66 => _66.agent, 'optionalAccess', _67 => _67.sitemap]));
1235
1245
  return [
1236
1246
  ...farmLlmsTxtGeneratedPaths(config),
1237
1247
  ...sitemap.enabled ? ["/sitemap.xml"] : [],
@@ -1276,7 +1286,7 @@ function loadFarmWorkflowsDevRuntime() {
1276
1286
  return import("./workflows.cjs");
1277
1287
  }
1278
1288
  function loadFarmDevtoolsSnapshotRuntime() {
1279
- return import("./devtools-JJOYTIMS.cjs");
1289
+ return import("./devtools-5B7NZE6F.cjs");
1280
1290
  }
1281
1291
  function loadFarmDevtoolsUIRuntime() {
1282
1292
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1300,6 +1310,25 @@ function farmI18nClientBridgePlugin() {
1300
1310
  }
1301
1311
  };
1302
1312
  }
1313
+ function farmNavigationPlugin(renderer) {
1314
+ const otherRenderer = !_chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1315
+ return {
1316
+ name: "farm:navigation",
1317
+ config() {
1318
+ if (!otherRenderer) return;
1319
+ return {
1320
+ resolve: {
1321
+ alias: [
1322
+ {
1323
+ find: /^@farm\.js\/core\/navigation$/,
1324
+ replacement: "@farm.js/core/internal/navigation-neutral"
1325
+ }
1326
+ ]
1327
+ }
1328
+ };
1329
+ }
1330
+ };
1331
+ }
1303
1332
  var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
1304
1333
  var SERVER_ONLY_PACKAGE = "server-only";
1305
1334
  var farmReactServerFiles = /* @__PURE__ */ new Set();
@@ -1307,16 +1336,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1307
1336
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1308
1337
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1309
1338
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1310
- _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1311
- new RegExp(`^${_chunkZVSQN7NCcjs.FARM_RESOLVE_FROM_PREFIX}`),
1339
+ _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1340
+ new RegExp(`^${_chunkDRO3NXA3cjs.FARM_RESOLVE_FROM_PREFIX}`),
1312
1341
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1313
1342
  // included.
1314
1343
  /^node:/,
1315
- _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, _module.builtinModules)
1344
+ _chunkARORZ3MHcjs.exactIdPattern.call(void 0, _module.builtinModules)
1316
1345
  ];
1317
1346
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1318
- _chunkX4TSMQWFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1319
- new RegExp(`^${_chunkZVSQN7NCcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1347
+ _chunkARORZ3MHcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1348
+ new RegExp(`^${_chunkDRO3NXA3cjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1320
1349
  ];
1321
1350
  function createFarmPlatformClientModule(platform) {
1322
1351
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1346,24 +1375,24 @@ function farmIslandContainersPlugin(config) {
1346
1375
  root = config.root || resolved.root;
1347
1376
  },
1348
1377
  transform(code, id) {
1349
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _69 => _69.experimental, 'optionalAccess', _70 => _70.serverComponents])) !== "islands") {
1378
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1350
1379
  return null;
1351
1380
  }
1352
1381
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1353
1382
  return null;
1354
1383
  }
1355
- if (_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, code)) return null;
1384
+ if (_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, code)) return null;
1356
1385
  const file = id.split("?", 1)[0];
1357
- const bindings = _chunkZVSQN7NCcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1386
+ const bindings = _chunkDRO3NXA3cjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1358
1387
  if (bindings.length === 0) return null;
1359
- const grown = _chunkZVSQN7NCcjs.wrapFarmIslandContainers.call(void 0, {
1388
+ const grown = _chunkDRO3NXA3cjs.wrapFarmIslandContainers.call(void 0, {
1360
1389
  code,
1361
1390
  file,
1362
1391
  bindings,
1363
- reference: _chunkZVSQN7NCcjs.farmIslandContainerReferencePath.call(void 0, root)
1392
+ reference: _chunkDRO3NXA3cjs.farmIslandContainerReferencePath.call(void 0, root)
1364
1393
  });
1365
1394
  if (grown === null) return null;
1366
- _chunkZVSQN7NCcjs.ensureFarmIslandContainerReference.call(void 0, root);
1395
+ _chunkDRO3NXA3cjs.ensureFarmIslandContainerReference.call(void 0, root);
1367
1396
  return { code: grown, map: null };
1368
1397
  }
1369
1398
  };
@@ -1377,15 +1406,15 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1377
1406
  config(config) {
1378
1407
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1379
1408
  if (options.distDir) {
1380
- _chunkZVSQN7NCcjs.usePackageScanCacheFile.call(void 0,
1409
+ _chunkDRO3NXA3cjs.usePackageScanCacheFile.call(void 0,
1381
1410
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1382
1411
  );
1383
1412
  }
1384
- const bundledPackages = _chunkZVSQN7NCcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1413
+ const bundledPackages = _chunkDRO3NXA3cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1385
1414
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1386
- _chunkZVSQN7NCcjs.persistPackageScanCache.call(void 0, );
1415
+ _chunkDRO3NXA3cjs.persistPackageScanCache.call(void 0, );
1387
1416
  return {
1388
- optimizeDeps: { rolldownOptions: { plugins: [_chunkZVSQN7NCcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1417
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkDRO3NXA3cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1389
1418
  ssr: {
1390
1419
  noExternal: [
1391
1420
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1403,14 +1432,14 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1403
1432
  resolveId: {
1404
1433
  filter: { id: FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER },
1405
1434
  handler(id, importer, options2) {
1406
- if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _71 => _71.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1435
+ if (id === FARM_PLATFORM_ENTRY) return _optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) ? null : FARM_PLATFORM_CLIENT_ID;
1407
1436
  if (id === SERVER_ONLY_PACKAGE) {
1408
- if (_optionalChain([options2, 'optionalAccess', _72 => _72.ssr]) || _optionalChain([options2, 'optionalAccess', _73 => _73.scan])) {
1437
+ if (_optionalChain([options2, 'optionalAccess', _73 => _73.ssr]) || _optionalChain([options2, 'optionalAccess', _74 => _74.scan])) {
1409
1438
  return FARM_SERVER_ONLY_PACKAGE_ID;
1410
1439
  }
1411
1440
  this.error(
1412
- _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
1413
- _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
1441
+ _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
1442
+ _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
1414
1443
  "CLIENT_SERVER_ONLY_IMPORT",
1415
1444
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1416
1445
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1419,10 +1448,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1419
1448
  )
1420
1449
  );
1421
1450
  }
1422
- if (!_optionalChain([options2, 'optionalAccess', _74 => _74.ssr]) && _module.isBuiltin.call(void 0, id)) {
1423
- return _chunkZVSQN7NCcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1451
+ if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1452
+ return _chunkDRO3NXA3cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1424
1453
  }
1425
- const resolveFrom = importer ? _chunkZVSQN7NCcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1454
+ const resolveFrom = importer ? _chunkDRO3NXA3cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1426
1455
  if (resolveFrom) {
1427
1456
  const directory = path6.dirname(resolveFrom.importer);
1428
1457
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1437,10 +1466,10 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1437
1466
  }
1438
1467
  if (!FARM_SERVER_ONLY_ENTRIES.has(id)) return null;
1439
1468
  const importedBy = importer ? ` (imported by ${importer})` : "";
1440
- if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr])) {
1469
+ if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1441
1470
  this.error(
1442
- _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
1443
- _chunkZVSQN7NCcjs.createFarmDiagnostic.call(void 0,
1471
+ _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
1472
+ _chunkDRO3NXA3cjs.createFarmDiagnostic.call(void 0,
1444
1473
  "CLIENT_SERVER_ONLY_ENTRY",
1445
1474
  _nullishCoalesce(importer, () => ( id)),
1446
1475
  `${id} is server-only and cannot be imported into client code.`
@@ -1465,7 +1494,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1465
1494
  if (id === FARM_PLATFORM_CLIENT_ID) {
1466
1495
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1467
1496
  }
1468
- return _nullishCoalesce(_chunkZVSQN7NCcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1497
+ return _nullishCoalesce(_chunkDRO3NXA3cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1469
1498
  }
1470
1499
  }
1471
1500
  };
@@ -1498,10 +1527,10 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1498
1527
  if (!snapshot) return "";
1499
1528
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1500
1529
  if (snapshot.routing === "none") return runtime;
1501
- return `${_chunkUWOCYINYcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1530
+ return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1502
1531
  }
1503
1532
  function getPublicEnvDefine(config) {
1504
- const publicEnv = _optionalChain([config, 'access', _76 => _76.env, 'optionalAccess', _77 => _77.public]);
1533
+ const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
1505
1534
  if (!isResolvedEnvScope(publicEnv)) {
1506
1535
  return {};
1507
1536
  }
@@ -1540,12 +1569,12 @@ function withFarmRequestTracing(handler, apiRuntime, resolveTraceUrl = (request)
1540
1569
  return;
1541
1570
  }
1542
1571
  if (res.headersSent) {
1543
- _optionalChain([res, 'access', _78 => _78.destroy, 'optionalCall', _79 => _79(error instanceof Error ? error : new Error(String(error)))]);
1572
+ _optionalChain([res, 'access', _79 => _79.destroy, 'optionalCall', _80 => _80(error instanceof Error ? error : new Error(String(error)))]);
1544
1573
  return;
1545
1574
  }
1546
1575
  res.statusCode = 500;
1547
1576
  res.setHeader("Content-Type", "application/json");
1548
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1577
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1549
1578
  });
1550
1579
  };
1551
1580
  }
@@ -1553,10 +1582,10 @@ function sendFarmDevErrorJSON(res) {
1553
1582
  res.statusCode = 500;
1554
1583
  res.setHeader("Content-Type", "application/json");
1555
1584
  res.setHeader("Cache-Control", "private, no-store");
1556
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1585
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
1557
1586
  }
1558
1587
  function createFarmDevMiddlewareErrorResponse() {
1559
- return new Response(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1588
+ return new Response(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY, {
1560
1589
  status: 500,
1561
1590
  headers: { "Content-Type": "application/json", "Cache-Control": "private, no-store" }
1562
1591
  });
@@ -1568,10 +1597,10 @@ function setFarmDevRuntimeHookErrorHead(res, json) {
1568
1597
  }
1569
1598
  function sendFarmDevRuntimeHookError(res, json) {
1570
1599
  setFarmDevRuntimeHookErrorHead(res, json);
1571
- res.end(json ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1600
+ res.end(json ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1572
1601
  }
1573
1602
  function opensFarmDevRuntimeSession(pm) {
1574
- return pm.hasRuntimeRequestHooks() || _chunkZ5BANEQDcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1603
+ return pm.hasRuntimeRequestHooks() || _chunkDMSXZNQRcjs.hasFarmServerRuntimePlugins.call(void 0, pm.getPlugins());
1575
1604
  }
1576
1605
  var FARM_CONFIG_ROUTE_PLUGIN_NAMES = /* @__PURE__ */ new Set([
1577
1606
  _chunkH7OFZJCVcjs.FARM_CONFIG_HEADERS_PLUGIN_NAME,
@@ -1676,7 +1705,7 @@ function interceptFarmDevPageResponse(options) {
1676
1705
  const originalWrite = res.write.bind(res);
1677
1706
  const originalEnd = res.end.bind(res);
1678
1707
  const originalWriteHead = res.writeHead.bind(res);
1679
- const originalFlushHeaders = _optionalChain([res, 'access', _80 => _80.flushHeaders, 'optionalAccess', _81 => _81.bind, 'call', _82 => _82(res)]);
1708
+ const originalFlushHeaders = _optionalChain([res, 'access', _81 => _81.flushHeaders, 'optionalAccess', _82 => _82.bind, 'call', _83 => _83(res)]);
1680
1709
  let afterResponseCalled = false;
1681
1710
  let interceptedEnd = false;
1682
1711
  const restore = () => {
@@ -1684,7 +1713,7 @@ function interceptFarmDevPageResponse(options) {
1684
1713
  res.end = originalEnd;
1685
1714
  res.writeHead = originalWriteHead;
1686
1715
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1687
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1716
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1688
1717
  };
1689
1718
  let runtimeHookFailed = false;
1690
1719
  const endRuntimeRequest = (response) => pm.endRuntimeRequest(runtimeSession, response).catch((error) => {
@@ -1698,7 +1727,7 @@ function interceptFarmDevPageResponse(options) {
1698
1727
  const writeRuntimeHookFailure = () => {
1699
1728
  setFarmDevRuntimeHookErrorHead(res, Boolean(options.jsonError));
1700
1729
  originalWriteHead(500);
1701
- originalWrite(options.jsonError ? _chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1730
+ originalWrite(options.jsonError ? _chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY : "Internal Server Error");
1702
1731
  };
1703
1732
  const htmlChunks = [];
1704
1733
  const responseChunks = [];
@@ -1738,7 +1767,7 @@ function interceptFarmDevPageResponse(options) {
1738
1767
  ).then(async (runtimeResponse) => {
1739
1768
  applyWebResponseToNodeResponse(runtimeResponse, res);
1740
1769
  if (!res.headersSent) originalWriteHead(res.statusCode);
1741
- _optionalChain([originalFlushHeaders, 'optionalCall', _83 => _83()]);
1770
+ _optionalChain([originalFlushHeaders, 'optionalCall', _84 => _84()]);
1742
1771
  if (!runtimeResponse.body) return;
1743
1772
  const reader = runtimeResponse.body.getReader();
1744
1773
  for (; ; ) {
@@ -1787,7 +1816,7 @@ function interceptFarmDevPageResponse(options) {
1787
1816
  if (streamsThroughRuntime()) {
1788
1817
  streamRuntimeChunk(bufferChunk);
1789
1818
  const callback = args.find((arg) => typeof arg === "function");
1790
- _optionalChain([callback, 'optionalCall', _84 => _84()]);
1819
+ _optionalChain([callback, 'optionalCall', _85 => _85()]);
1791
1820
  return true;
1792
1821
  }
1793
1822
  if (isHtmlResponse && bufferChunk) {
@@ -1799,7 +1828,7 @@ function interceptFarmDevPageResponse(options) {
1799
1828
  const shouldBufferResponse = isHtmlResponse ? bufferPluginResponse : Boolean(runtimeSession && hasRuntimeAfterHook);
1800
1829
  if (shouldBufferResponse) {
1801
1830
  const callback = args.find((arg) => typeof arg === "function");
1802
- _optionalChain([callback, 'optionalCall', _85 => _85()]);
1831
+ _optionalChain([callback, 'optionalCall', _86 => _86()]);
1803
1832
  return true;
1804
1833
  }
1805
1834
  const writeResult = originalWrite(chunk, ...args);
@@ -1808,7 +1837,7 @@ function interceptFarmDevPageResponse(options) {
1808
1837
  });
1809
1838
  res.end = ((...args) => {
1810
1839
  interceptedEnd = true;
1811
- res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1840
+ res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING] = true;
1812
1841
  if (afterResponseCalled) return res;
1813
1842
  afterResponseCalled = true;
1814
1843
  options.logResponse(method, urlPath, res.statusCode || 200, Date.now() - startTime, "PAGE");
@@ -1891,7 +1920,7 @@ function interceptFarmDevPageResponse(options) {
1891
1920
  res.end = originalEnd;
1892
1921
  res.writeHead = originalWriteHead;
1893
1922
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1894
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1923
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1895
1924
  originalEnd(...originalEndArgs);
1896
1925
  }).catch((error) => {
1897
1926
  reportFailure(error);
@@ -1908,14 +1937,14 @@ function interceptFarmDevPageResponse(options) {
1908
1937
  res.end = originalEnd;
1909
1938
  res.writeHead = originalWriteHead;
1910
1939
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1911
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1940
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1912
1941
  originalEnd(body, callback);
1913
1942
  } else {
1914
1943
  res.write = originalWrite;
1915
1944
  res.end = originalEnd;
1916
1945
  res.writeHead = originalWriteHead;
1917
1946
  if (originalFlushHeaders) res.flushHeaders = originalFlushHeaders;
1918
- delete res[_chunkTCMRLW3Kcjs.FARM_NODE_RESPONSE_END_PENDING];
1947
+ delete res[_chunkVACYUMXWcjs.FARM_NODE_RESPONSE_END_PENDING];
1919
1948
  originalEnd(...originalEndArgs);
1920
1949
  }
1921
1950
  });
@@ -1946,18 +1975,18 @@ function getEnvDefines(config, configEnv) {
1946
1975
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1947
1976
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1948
1977
  config.images,
1949
- _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1978
+ _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1950
1979
  )
1951
1980
  )
1952
1981
  )
1953
1982
  };
1954
- if (_optionalChain([configEnv, 'optionalAccess', _86 => _86.isSsrBuild])) {
1983
+ if (_optionalChain([configEnv, 'optionalAccess', _87 => _87.isSsrBuild])) {
1955
1984
  defines.__FARM_ENV__ = JSON.stringify(_chunk3EIPOTZVcjs.createBundledEnv.call(void 0, getFullEnvDefine(config)));
1956
1985
  }
1957
1986
  return defines;
1958
1987
  }
1959
1988
  function getFarmAPIBaseURLDefine(config) {
1960
- const baseURL = _optionalChain([config, 'access', _87 => _87.api, 'optionalAccess', _88 => _88.baseURL]);
1989
+ const baseURL = _optionalChain([config, 'access', _88 => _88.api, 'optionalAccess', _89 => _89.baseURL]);
1961
1990
  return typeof baseURL === "string" && baseURL ? baseURL : _chunkPMJSG4JScjs.DEFAULT_FARM_API_BASE_PATH;
1962
1991
  }
1963
1992
  function isResolvedEnvScope(value) {
@@ -2079,7 +2108,7 @@ function transformIsolatedClientBoundaryModule(options) {
2079
2108
  return null;
2080
2109
  }
2081
2110
  const body = Array.isArray(ast.body) ? ast.body : [];
2082
- const everyExportIsComponent = options.code.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2111
+ const everyExportIsComponent = options.code.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2083
2112
  const replacements = [];
2084
2113
  const wrapperStatements = [];
2085
2114
  const originalEntries = [];
@@ -2098,9 +2127,9 @@ function transformIsolatedClientBoundaryModule(options) {
2098
2127
  transformedExports++;
2099
2128
  };
2100
2129
  for (const node of body) {
2101
- if (_optionalChain([node, 'optionalAccess', _89 => _89.type]) === "ExportDefaultDeclaration" && node.declaration) {
2130
+ if (_optionalChain([node, 'optionalAccess', _90 => _90.type]) === "ExportDefaultDeclaration" && node.declaration) {
2102
2131
  const declaration2 = node.declaration;
2103
- if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _90 => _90.id, 'optionalAccess', _91 => _91.name])) {
2132
+ if ((declaration2.type === "FunctionDeclaration" || declaration2.type === "ClassDeclaration") && _optionalChain([declaration2, 'access', _91 => _91.id, 'optionalAccess', _92 => _92.name])) {
2104
2133
  replacements.push({
2105
2134
  start: node.start,
2106
2135
  end: node.end,
@@ -2118,11 +2147,11 @@ function transformIsolatedClientBoundaryModule(options) {
2118
2147
  }
2119
2148
  continue;
2120
2149
  }
2121
- if (_optionalChain([node, 'optionalAccess', _92 => _92.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2150
+ if (_optionalChain([node, 'optionalAccess', _93 => _93.type]) === "ExportNamedDeclaration" && !node.declaration && node.exportKind !== "type") {
2122
2151
  const specifiers = (node.specifiers || []).filter(
2123
2152
  (specifier) => specifier.type === "ExportSpecifier" && specifier.exportKind !== "type"
2124
2153
  );
2125
- const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _93 => _93.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.value]), () => ( "")))));
2154
+ const specifierName = (name) => _nullishCoalesce(_optionalChain([name, 'optionalAccess', _94 => _94.name]), () => ( String(_nullishCoalesce(_optionalChain([name, 'optionalAccess', _95 => _95.value]), () => ( "")))));
2126
2155
  const isComponentExport = (specifier) => {
2127
2156
  const exported = specifierName(specifier.exported);
2128
2157
  return everyExportIsComponent || exported === "default" || /^[A-Z]/.test(exported);
@@ -2149,14 +2178,14 @@ function transformIsolatedClientBoundaryModule(options) {
2149
2178
  if (kept.length > 0) wrapperStatements.push(`export { ${kept.join(", ")} };`);
2150
2179
  continue;
2151
2180
  }
2152
- if (_optionalChain([node, 'optionalAccess', _95 => _95.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2181
+ if (_optionalChain([node, 'optionalAccess', _96 => _96.type]) !== "ExportNamedDeclaration" || !node.declaration) continue;
2153
2182
  const declaration = node.declaration;
2154
2183
  const declaredNames = [];
2155
- if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _96 => _96.id, 'optionalAccess', _97 => _97.name])) {
2184
+ if ((declaration.type === "FunctionDeclaration" || declaration.type === "ClassDeclaration") && _optionalChain([declaration, 'access', _97 => _97.id, 'optionalAccess', _98 => _98.name])) {
2156
2185
  declaredNames.push(declaration.id.name);
2157
2186
  } else if (declaration.type === "VariableDeclaration") {
2158
2187
  for (const declarator of declaration.declarations || []) {
2159
- if (_optionalChain([declarator, 'access', _98 => _98.id, 'optionalAccess', _99 => _99.type]) === "Identifier") declaredNames.push(declarator.id.name);
2188
+ if (_optionalChain([declarator, 'access', _99 => _99.id, 'optionalAccess', _100 => _100.type]) === "Identifier") declaredNames.push(declarator.id.name);
2160
2189
  }
2161
2190
  }
2162
2191
  const componentNames = declaredNames.filter((name) => /^[A-Z]/.test(name));
@@ -2225,21 +2254,21 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2225
2254
  } catch (e20) {
2226
2255
  return;
2227
2256
  }
2228
- const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _100 => _100.env, 'optionalAccess', _101 => _101.public]), () => ( {}))));
2257
+ const publicKeys = new Set(Object.keys(_nullishCoalesce(_optionalChain([config, 'access', _101 => _101.env, 'optionalAccess', _102 => _102.public]), () => ( {}))));
2229
2258
  const findings = [];
2230
2259
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2231
2260
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2232
2261
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2233
- if (!_optionalChain([resolved, 'optionalAccess', _102 => _102.id, 'access', _103 => _103.startsWith, 'call', _104 => _104(_chunkZVSQN7NCcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2262
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkDRO3NXA3cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2234
2263
  }
2235
2264
  findings.push(finding);
2236
2265
  }
2237
2266
  if (findings.length === 0) return;
2238
2267
  warnedClientBoundaryIds.add(id);
2239
- const locate = _chunkZVSQN7NCcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2268
+ const locate = _chunkDRO3NXA3cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2240
2269
  _chunk7U4XF76Rcjs.logger.warn(
2241
2270
  findings.map(
2242
- (finding) => _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
2271
+ (finding) => _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
2243
2272
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2244
2273
  config.root
2245
2274
  )
@@ -2256,7 +2285,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2256
2285
  );
2257
2286
  }
2258
2287
  function shouldEmitFarmClientRootHmr(renderer) {
2259
- return _chunk67MZTLTFcjs.getFarmRendererCapabilities.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2288
+ return _chunkBCTHOQPPcjs.getFarmRendererCapabilities.call(void 0, _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2260
2289
  }
2261
2290
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2262
2291
  function toFarmRuntimeModuleId(specifier) {
@@ -2287,23 +2316,23 @@ function hasFarmSourceAliasOverride(alias) {
2287
2316
  );
2288
2317
  }
2289
2318
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2290
- const rendererDisabled = _chunk67MZTLTFcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2319
+ const rendererDisabled = _chunkBCTHOQPPcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2291
2320
  const imageImports = farmImageImportsPlugin();
2292
- const fontImports = _chunkX4TSMQWFcjs.farmFontImportsPlugin.call(void 0, {
2321
+ const fontImports = _chunkARORZ3MHcjs.farmFontImportsPlugin.call(void 0, {
2293
2322
  root: options.root,
2294
2323
  basePath: options.basePath,
2295
2324
  publicDir: options.publicDir
2296
2325
  });
2297
2326
  let farmApp;
2298
2327
  const isFarmGeneratedOutput = (file) => {
2299
- const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _105 => _105.getConfig, 'call', _106 => _106(), 'access', _107 => _107.root]), () => ( options.root));
2328
+ const root = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _106 => _106.getConfig, 'call', _107 => _107(), 'access', _108 => _108.root]), () => ( options.root));
2300
2329
  if (!root) return file.includes("/.farm/");
2301
2330
  const output = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, path6.resolve(root, options.distDir || ".farm"));
2302
2331
  return file === output || file.startsWith(`${output}/`);
2303
2332
  };
2304
2333
  let serverFnTransformActive = false;
2305
2334
  const getFarmRenderedServerModules = () => {
2306
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _108 => _108.getRouteManager, 'call', _109 => _109()]);
2335
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _109 => _109.getRouteManager, 'call', _110 => _110()]);
2307
2336
  if (!routeManager) return /* @__PURE__ */ new Set();
2308
2337
  const files = /* @__PURE__ */ new Set();
2309
2338
  for (const entries of [
@@ -2323,10 +2352,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2323
2352
  if (mdxComponents) files.add(mdxComponents);
2324
2353
  return files;
2325
2354
  };
2326
- const islandsServerFns = () => {
2327
- const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _110 => _110.getConfig, 'call', _111 => _111()]), () => ( options));
2328
- return _optionalChain([config, 'access', _112 => _112.experimental, 'optionalAccess', _113 => _113.serverActions]) === true && _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _114 => _114.experimental, 'optionalAccess', _115 => _115.serverComponents])) === "islands";
2329
- };
2355
+ const islxActionsMode = () => _chunkARORZ3MHcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2356
+ const islandsServerFns = () => _chunkARORZ3MHcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2330
2357
  let reactRefreshActive = false;
2331
2358
  let server;
2332
2359
  let deferredGates;
@@ -2355,9 +2382,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2355
2382
  ].join(" ");
2356
2383
  console.log(log);
2357
2384
  };
2358
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _116 => _116.getRouteManager, 'call', _117 => _117(), 'access', _118 => _118.getProgrammaticClientRoutes, 'call', _119 => _119()])));
2385
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _115 => _115.getRouteManager, 'call', _116 => _116(), 'access', _117 => _117.getProgrammaticClientRoutes, 'call', _118 => _118()])));
2359
2386
  const isOutsideAppRoot = (file) => {
2360
- const root = _optionalChain([farmApp, 'optionalAccess', _120 => _120.getConfig, 'call', _121 => _121(), 'access', _122 => _122.root]) || _optionalChain([server, 'optionalAccess', _123 => _123.config, 'access', _124 => _124.root]) || options.root;
2387
+ const root = _optionalChain([farmApp, 'optionalAccess', _119 => _119.getConfig, 'call', _120 => _120(), 'access', _121 => _121.root]) || _optionalChain([server, 'optionalAccess', _122 => _122.config, 'access', _123 => _123.root]) || options.root;
2361
2388
  if (!root) return false;
2362
2389
  const relative4 = path6.relative(root, file.split("?", 1)[0]);
2363
2390
  return relative4.startsWith("..") || path6.isAbsolute(relative4);
@@ -2368,15 +2395,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2368
2395
  config(userConfig, configEnv) {
2369
2396
  isBuild = configEnv.command === "build";
2370
2397
  const farmAliases = {
2371
- ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, options.layers),
2372
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _125 => _125.resolve, 'optionalAccess', _126 => _126.alias])) ? {} : _chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2398
+ ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2399
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2373
2400
  };
2374
2401
  if (Object.keys(farmAliases).length > 0) {
2375
2402
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2376
- userConfig.resolve.alias = _chunkX4TSMQWFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2403
+ userConfig.resolve.alias = _chunkARORZ3MHcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2377
2404
  }
2378
2405
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2379
- farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _127 => _127.server, 'optionalAccess', _128 => _128.cors]) === void 0;
2406
+ farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
2380
2407
  return {
2381
2408
  // Honor Farm's publicDir so the dev server serves the same static
2382
2409
  // directory the production client build emits.
@@ -2389,13 +2416,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2389
2416
  ...farmOwnsDevCors ? { cors: false } : {},
2390
2417
  fs: {
2391
2418
  ...layerRoots.length ? { allow: [path6.resolve(options.root || process.cwd()), ...layerRoots] } : {},
2392
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _129 => _129.server, 'optionalAccess', _130 => _130.fs, 'optionalAccess', _131 => _131.deny]), options)
2419
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _128 => _128.server, 'optionalAccess', _129 => _129.fs, 'optionalAccess', _130 => _130.deny]), options)
2393
2420
  }
2394
2421
  }
2395
2422
  };
2396
2423
  },
2397
2424
  configEnvironment(name, environmentConfig, env) {
2398
- if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _132 => _132.dev, 'optionalAccess', _133 => _133.createEnvironment])) {
2425
+ if (env.command !== "serve" || name !== "ssr" && name !== "rsc" || _optionalChain([environmentConfig, 'access', _131 => _131.dev, 'optionalAccess', _132 => _132.createEnvironment])) {
2399
2426
  return;
2400
2427
  }
2401
2428
  return {
@@ -2414,7 +2441,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2414
2441
  (plugin2) => plugin2.name === SERVER_FN_TRANSFORM_PLUGIN
2415
2442
  );
2416
2443
  reactRefreshActive = _chunkY2FEFQAYcjs.isFarmReactRefreshActive.call(void 0, config);
2417
- if (_optionalChain([options, 'access', _134 => _134.experimental, 'optionalAccess', _135 => _135.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2444
+ if (_optionalChain([options, 'access', _133 => _133.experimental, 'optionalAccess', _134 => _134.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
2418
2445
  _chunk7U4XF76Rcjs.logger.warn(
2419
2446
  "experimental.serverActions has no effect without @farm.js/plugin/rsc in the Vite plugins. Server functions stay server-only, and importing one from client code is a build error."
2420
2447
  );
@@ -2423,20 +2450,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2423
2450
  async configureServer(viteServer) {
2424
2451
  viteServer.middlewares.use(
2425
2452
  createFarmDevPreviewGuard(viteServer, {
2426
- getSourceRoots: () => _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _136 => _136.getConfig, 'call', _137 => _137()]), () => ( options)))
2453
+ getSourceRoots: () => _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _135 => _135.getConfig, 'call', _136 => _136()]), () => ( options)))
2427
2454
  })
2428
2455
  );
2429
2456
  if (typeof fontImports.configureServer === "function") {
2430
2457
  await fontImports.configureServer.call(this, viteServer);
2431
2458
  }
2432
2459
  server = viteServer;
2433
- const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _138 => _138.pre, 'access', _139 => _139.target]), () => ( viteServer.middlewares));
2434
- const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _140 => _140.post, 'access', _141 => _141.target]), () => ( viteServer.middlewares));
2460
+ const farmMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _137 => _137.pre, 'access', _138 => _138.target]), () => ( viteServer.middlewares));
2461
+ const farmPostMiddlewares = _nullishCoalesce(_optionalChain([deferredGates, 'optionalAccess', _139 => _139.post, 'access', _140 => _140.target]), () => ( viteServer.middlewares));
2435
2462
  const pm = initialPluginManager;
2436
2463
  const configRoutePlugins = new Set(
2437
- _optionalChain([pm, 'optionalAccess', _142 => _142.getPlugins, 'call', _143 => _143(), 'access', _144 => _144.filter, 'call', _145 => _145(isFarmConfigRoutePlugin), 'access', _146 => _146.map, 'call', _147 => _147((plugin2) => plugin2.name)])
2464
+ _optionalChain([pm, 'optionalAccess', _141 => _141.getPlugins, 'call', _142 => _142(), 'access', _143 => _143.filter, 'call', _144 => _144(isFarmConfigRoutePlugin), 'access', _145 => _145.map, 'call', _146 => _146((plugin2) => plugin2.name)])
2438
2465
  );
2439
- const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _148 => _148.getPlugins, 'call', _149 => _149()]), () => ( []))).flatMap((plugin2) => {
2466
+ const configRedirectMatchers = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _147 => _147.getPlugins, 'call', _148 => _148()]), () => ( []))).flatMap((plugin2) => {
2440
2467
  const matcher = _chunkH7OFZJCVcjs.getConfigRedirectMatcher.call(void 0, plugin2);
2441
2468
  return matcher ? [matcher] : [];
2442
2469
  });
@@ -2447,7 +2474,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2447
2474
  } catch (e21) {
2448
2475
  }
2449
2476
  };
2450
- farmApp = new (0, _chunkX4TSMQWFcjs.FarmApp)(
2477
+ farmApp = new (0, _chunkARORZ3MHcjs.FarmApp)(
2451
2478
  {
2452
2479
  ...options,
2453
2480
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2455,7 +2482,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2455
2482
  server
2456
2483
  );
2457
2484
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2458
- _chunkZVSQN7NCcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2485
+ _chunkDRO3NXA3cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2459
2486
  farmApp.getConfig().root,
2460
2487
  options.distDir || ".farm"
2461
2488
  )
@@ -2464,17 +2491,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2464
2491
  await farmApp.initialize();
2465
2492
  const farmConfig = farmApp.getConfig();
2466
2493
  let farmAppPackages;
2467
- if (_optionalChain([farmConfig, 'access', _150 => _150.agent, 'optionalAccess', _151 => _151.noindexPreviews])) {
2494
+ if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2468
2495
  farmMiddlewares.use((_req, res, next) => {
2469
- if (_chunkXY5OZQF6cjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2470
- res.setHeader("X-Robots-Tag", _chunk4OFWG4IKcjs.FARM_PREVIEW_ROBOTS_TAG);
2496
+ if (_chunkRMPUEH5Tcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2497
+ res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2471
2498
  }
2472
2499
  next();
2473
2500
  });
2474
2501
  }
2475
2502
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2476
2503
  const devBuiltInRoutePaths = new Set(
2477
- _chunk5OAN7BG5cjs.listFarmBuiltInRoutePaths.call(void 0, {
2504
+ _chunkB2PGVHBGcjs.listFarmBuiltInRoutePaths.call(void 0, {
2478
2505
  agent: {
2479
2506
  apiCatalog: true,
2480
2507
  mcp: true,
@@ -2496,7 +2523,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2496
2523
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
2497
2524
  // Vite owns this address. Unlike request.url, it cannot be replaced by
2498
2525
  // a caller-controlled Host header.
2499
- trustedLocalOrigin: () => _optionalChain([server, 'access', _152 => _152.resolvedUrls, 'optionalAccess', _153 => _153.local, 'access', _154 => _154[0]]),
2526
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _151 => _151.resolvedUrls, 'optionalAccess', _152 => _152.local, 'access', _153 => _153[0]]),
2500
2527
  onError(error) {
2501
2528
  _chunk7U4XF76Rcjs.logger.error(
2502
2529
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
@@ -2504,7 +2531,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2504
2531
  }
2505
2532
  });
2506
2533
  }
2507
- const sourceRoots = _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, farmConfig);
2534
+ const sourceRoots = _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, farmConfig);
2508
2535
  server.watcher.add(sourceRoots.map((source) => path6.join(source.root, source.srcDir)));
2509
2536
  if (farmConfig.i18n.enabled) {
2510
2537
  server.watcher.add(
@@ -2516,15 +2543,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2516
2543
  const workflowConfig = farmConfig.workflows;
2517
2544
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
2518
2545
  const getExtraRouteTypes = () => [
2519
- ..._optionalChain([options, 'access', _155 => _155.openapi, 'optionalAccess', _156 => _156.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2520
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _157 => _157.getFarmDocsRouteTypeEntries, 'call', _158 => _158(farmConfig.docs)]), () => ( []))
2546
+ ..._optionalChain([options, 'access', _154 => _154.openapi, 'optionalAccess', _155 => _155.enabled]) && options.openapi.route ? [options.openapi.route] : [],
2547
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _156 => _156.getFarmDocsRouteTypeEntries, 'call', _157 => _157(farmConfig.docs)]), () => ( []))
2521
2548
  ];
2522
2549
  const appDirSlugs = sourceRoots.map(
2523
2550
  (source) => path6.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
2524
2551
  );
2525
2552
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2526
2553
  try {
2527
- const result = await _chunkSDICLSQUcjs.generateFarmTypeArtifacts.call(void 0, {
2554
+ const result = await _chunkVMBIKDKWcjs.generateFarmTypeArtifacts.call(void 0, {
2528
2555
  root: farmConfig.root,
2529
2556
  srcDir: farmConfig.srcDir,
2530
2557
  layers: farmConfig.layers,
@@ -2565,10 +2592,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2565
2592
  (source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")
2566
2593
  );
2567
2594
  const layerConfigFiles = new Set(
2568
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _159 => _159.configFile, 'optionalAccess', _160 => _160.replace, 'call', _161 => _161(/\\/g, "/")])).filter((file) => Boolean(file))
2595
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2569
2596
  );
2570
2597
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2571
- ..._chunk67MZTLTFcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2598
+ ..._chunkBCTHOQPPcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2572
2599
  ".md",
2573
2600
  ".mdx"
2574
2601
  ]);
@@ -2638,7 +2665,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2638
2665
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
2639
2666
  }
2640
2667
  if (isI18nCatalogFile(file)) {
2641
- _optionalChain([farmApp, 'optionalAccess', _162 => _162.getI18nRuntime, 'call', _163 => _163(), 'access', _164 => _164.reload, 'call', _165 => _165(), 'access', _166 => _166.then, 'call', _167 => _167(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _168 => _168.catch, 'call', _169 => _169((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2668
+ _optionalChain([farmApp, 'optionalAccess', _161 => _161.getI18nRuntime, 'call', _162 => _162(), 'access', _163 => _163.reload, 'call', _164 => _164(), 'access', _165 => _165.then, 'call', _166 => _166(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _167 => _167.catch, 'call', _168 => _168((error) => _chunk7U4XF76Rcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
2642
2669
  }
2643
2670
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
2644
2671
  if (isRouteRefreshEvent) {
@@ -2650,8 +2677,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2650
2677
  queuedRouteFiles = void 0;
2651
2678
  try {
2652
2679
  await Promise.all([
2653
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _170 => _170(`${ev} ${file}`)]),
2654
- [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _171 => _171.reload, 'call', _172 => _172()]) : void 0
2680
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _169 => _169(`${ev} ${file}`)]),
2681
+ [...files].some((path7) => path7.includes("middleware.")) ? _optionalChain([middlewareManager, 'optionalAccess', _170 => _170.reload, 'call', _171 => _171()]) : void 0
2655
2682
  ]);
2656
2683
  if (pendingRouteReloads.size === 1)
2657
2684
  server.ws.send({ type: "full-reload", path: "*" });
@@ -2668,7 +2695,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2668
2695
  }
2669
2696
  });
2670
2697
  });
2671
- const appDirs = _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, farmConfig);
2698
+ const appDirs = _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, farmConfig);
2672
2699
  const routeManager = farmApp.getRouteManager();
2673
2700
  const discoveredRoutes = [];
2674
2701
  for (const [pattern, entry] of routeManager.getRoutes()) {
@@ -2700,14 +2727,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2700
2727
  const { FARM_DEV_SERVER_MODULE_LOADER } = await import("./internal/native-server-fns.cjs");
2701
2728
  const load = (file) => _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, file);
2702
2729
  globalThis[FARM_DEV_SERVER_MODULE_LOADER] = load;
2703
- _optionalChain([server, 'access', _173 => _173.httpServer, 'optionalAccess', _174 => _174.once, 'call', _175 => _175("close", () => {
2730
+ _optionalChain([server, 'access', _172 => _172.httpServer, 'optionalAccess', _173 => _173.once, 'call', _174 => _174("close", () => {
2704
2731
  const globals = globalThis;
2705
2732
  if (globals[FARM_DEV_SERVER_MODULE_LOADER] === load) {
2706
2733
  delete globals[FARM_DEV_SERVER_MODULE_LOADER];
2707
2734
  }
2708
2735
  })]);
2709
2736
  }
2710
- apiRouteManager = new (0, _chunkMQOHYV6Lcjs.APIRouteManager)(appDirs, server, {
2737
+ apiRouteManager = new (0, _chunk5P65LXGUcjs.APIRouteManager)(appDirs, server, {
2711
2738
  plugins: farmConfig.plugins,
2712
2739
  i18n: farmApp.getI18nRuntime(),
2713
2740
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -2753,7 +2780,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2753
2780
  });
2754
2781
  }
2755
2782
  }
2756
- middlewareManager = new (0, _chunk2FK47RRZcjs.MiddlewareManager)(
2783
+ middlewareManager = new (0, _chunkVGHDPEPQcjs.MiddlewareManager)(
2757
2784
  appDirs,
2758
2785
  server,
2759
2786
  farmConfig.middleware,
@@ -2774,11 +2801,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2774
2801
  });
2775
2802
  }
2776
2803
  }
2777
- if (_optionalChain([options, 'access', _176 => _176.openapi, 'optionalAccess', _177 => _177.enabled])) {
2804
+ if (_optionalChain([options, 'access', _175 => _175.openapi, 'optionalAccess', _176 => _176.enabled])) {
2778
2805
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
2779
2806
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
2780
2807
  mode: "development",
2781
- apiBaseURL: typeof _optionalChain([options, 'access', _178 => _178.api, 'optionalAccess', _179 => _179.baseURL]) === "string" ? options.api.baseURL : void 0,
2808
+ apiBaseURL: typeof _optionalChain([options, 'access', _177 => _177.api, 'optionalAccess', _178 => _178.baseURL]) === "string" ? options.api.baseURL : void 0,
2782
2809
  routes: () => apiRouteManager.getRoutes().values(),
2783
2810
  loadModule: (filePath) => apiRouteManager.loadModule(filePath)
2784
2811
  });
@@ -2809,7 +2836,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2809
2836
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2810
2837
  };
2811
2838
  releaseDocsMCPServers();
2812
- const isFarmDocsPathGuarded = (href) => _chunkUWOCYINYcjs.farmPathGuardCoversPage.call(void 0,
2839
+ const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
2813
2840
  {
2814
2841
  config: farmConfig,
2815
2842
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2822,20 +2849,20 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2822
2849
  clientEntry: "/@farm/client.js",
2823
2850
  resolveLayoutFonts: resolveDocsLayoutFonts,
2824
2851
  fontStylesheetHref: "/@farm/fonts.css",
2825
- globalStylesheetHref: _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2852
+ globalStylesheetHref: _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
2826
2853
  farmConfig.root,
2827
2854
  farmConfig.srcDir
2828
2855
  ),
2829
2856
  loadModule: async (specifier) => {
2830
2857
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
2831
- if (specifier === _optionalChain([farmConfig, 'access', _180 => _180.docs, 'access', _181 => _181.adapter, 'optionalAccess', _182 => _182.server]) && _optionalChain([resolved, 'optionalAccess', _183 => _183.id])) {
2858
+ if (specifier === _optionalChain([farmConfig, 'access', _179 => _179.docs, 'access', _180 => _180.adapter, 'optionalAccess', _181 => _181.server]) && _optionalChain([resolved, 'optionalAccess', _182 => _182.id])) {
2832
2859
  const file = resolved.id.split("?", 1)[0];
2833
2860
  return import(
2834
2861
  /* @vite-ignore */
2835
2862
  _url.pathToFileURL.call(void 0, file).href
2836
2863
  );
2837
2864
  }
2838
- return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _184 => _184.id]), () => ( specifier)));
2865
+ return _chunk25JGHAGHcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _183 => _183.id]), () => ( specifier)));
2839
2866
  },
2840
2867
  registerMCPServer: (mcpServer) => {
2841
2868
  const dispose = _chunkRKQOMG2Xcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -2853,7 +2880,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2853
2880
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2854
2881
  resolveLayoutFonts: resolveDocsLayoutFonts,
2855
2882
  fontStylesheetHref: "/@farm/fonts.css",
2856
- globalStylesheetHref: _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2883
+ globalStylesheetHref: _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
2857
2884
  farmConfig.root,
2858
2885
  farmConfig.srcDir
2859
2886
  ),
@@ -2861,7 +2888,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2861
2888
  basePath: farmConfig.basePath
2862
2889
  }) : null;
2863
2890
  const farmDocsListsPages = Boolean(
2864
- farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _185 => _185.getPlugins, 'call', _186 => _186(), 'access', _187 => _187.some, 'call', _188 => _188((plugin2) => plugin2.name === "farm:infra-analytics")])
2891
+ farmDocsDevRuntime && _optionalChain([pm, 'optionalAccess', _184 => _184.getPlugins, 'call', _185 => _185(), 'access', _186 => _186.some, 'call', _187 => _187((plugin2) => plugin2.name === "farm:infra-analytics")])
2865
2892
  );
2866
2893
  let farmDocsPagePaths;
2867
2894
  const getFarmDocsPagePaths = () => {
@@ -2888,6 +2915,24 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2888
2915
  });
2889
2916
  }
2890
2917
  }
2918
+ const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _188 => _188.getPlugins, 'call', _189 => _189(), 'access', _190 => _190.find, 'call', _191 => _191((plugin2) => plugin2.name === "farm:infra-analytics")]);
2919
+ if (farmInfraAnalyticsPlugin) {
2920
+ _chunkCD5Z7RR5cjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2921
+ if (farmDocsDevRuntime) {
2922
+ const label = _chunkB2PGVHBGcjs.resolveFarmDocsRouteLabel.call(void 0,
2923
+ _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2924
+ {
2925
+ path: _optionalChain([farmConfig, 'access', _192 => _192.docs, 'optionalAccess', _193 => _193.entry]) || "/docs",
2926
+ roots: _optionalChain([farmConfig, 'access', _194 => _194.docs, 'optionalAccess', _195 => _195.roots, 'optionalAccess', _196 => _196.map, 'call', _197 => _197((root) => root.entry)]),
2927
+ pages: await getFarmDocsPagePaths()
2928
+ }
2929
+ );
2930
+ if (label) return _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2931
+ }
2932
+ const match = farmApp.getRouteManager().matchRoute(pathname);
2933
+ return { pathname, pattern: _optionalChain([match, 'access', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null };
2934
+ });
2935
+ }
2891
2936
  if (farmDocsDevRuntime && !farmDocsDevRuntime.hasFarmDocsRuntimeAdapter(farmConfig.docs)) {
2892
2937
  const docsContentDirs = farmDocsDevRuntime.getFarmDocsContentDirs(farmConfig.docs, {
2893
2938
  root: farmConfig.root,
@@ -2960,7 +3005,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2960
3005
  }
2961
3006
  },
2962
3007
  (request) => {
2963
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _189 => _189.getConfig, 'call', _190 => _190()]), () => ( options));
3008
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _200 => _200.getConfig, 'call', _201 => _201()]), () => ( options));
2964
3009
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2965
3010
  return _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, request, {
2966
3011
  trustProxy: currentServerConfig.trustProxy
@@ -2976,7 +3021,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2976
3021
  withAPIRequestTracing(async function handleFarmDevRequest(req, res, next) {
2977
3022
  const requestUrl = req.url || "/";
2978
3023
  const requestMethod = req.method || "GET";
2979
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _191 => _191.getConfig, 'call', _192 => _192()]), () => ( options));
3024
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _202 => _202.getConfig, 'call', _203 => _203()]), () => ( options));
2980
3025
  const currentServerConfig = _chunk7Q7UB4TLcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2981
3026
  const parsedRequestUrl = _chunk2RSVYJT6cjs.resolveFarmRequestURL.call(void 0, req, {
2982
3027
  trustProxy: currentServerConfig.trustProxy
@@ -3018,10 +3063,35 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3018
3063
  return;
3019
3064
  }
3020
3065
  }
3066
+ if (pm && requestMethod !== "GET" && requestMethod !== "HEAD" && pm._hasRuntimeEndpoint(requestPathname)) {
3067
+ let body;
3068
+ try {
3069
+ body = await _chunk7Q7UB4TLcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
3070
+ } catch (error) {
3071
+ res.statusCode = _nullishCoalesce(error.status, () => ( 400));
3072
+ res.end();
3073
+ return;
3074
+ }
3075
+ let response;
3076
+ try {
3077
+ const endpointRequest = createRequestFromNodeRequest(req, parsedRequestUrl);
3078
+ response = await pm.runRuntimeRequest(
3079
+ new Request(endpointRequest, { method: requestMethod, body: toRequestBody(body) }),
3080
+ // An endpoint answers before the handler would run.
3081
+ () => new Response(null, { status: 404 }),
3082
+ { kind: "request", route: { pathname: requestPathname } }
3083
+ );
3084
+ } catch (e22) {
3085
+ sendFarmDevRuntimeHookError(res, true);
3086
+ return;
3087
+ }
3088
+ await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3089
+ return;
3090
+ }
3021
3091
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3022
3092
  res.statusCode = 200;
3023
3093
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3024
- res.end(requestMethod === "HEAD" ? void 0 : _chunkX4TSMQWFcjs.FARM_VIDEO_PLAYER_HTML);
3094
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkARORZ3MHcjs.FARM_VIDEO_PLAYER_HTML);
3025
3095
  return;
3026
3096
  }
3027
3097
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3050,7 +3120,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3050
3120
  if (referrerUrl.origin === parsedRequestUrl.origin && !referrerUrl.pathname.startsWith(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_PATH)) {
3051
3121
  launchUrl = referrerUrl;
3052
3122
  }
3053
- } catch (e22) {
3123
+ } catch (e23) {
3054
3124
  }
3055
3125
  }
3056
3126
  launchUrl.searchParams.set(_chunkSTF6VDYQcjs.FARM_DEVTOOLS_LAUNCH_PARAM, "1");
@@ -3076,7 +3146,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3076
3146
  openapi: options.openapi
3077
3147
  },
3078
3148
  workflows: discoveredWorkflows,
3079
- plugins: _optionalChain([pm, 'optionalAccess', _193 => _193.getSortedPlugins, 'call', _194 => _194()])
3149
+ plugins: _optionalChain([pm, 'optionalAccess', _204 => _204.getSortedPlugins, 'call', _205 => _205()])
3080
3150
  });
3081
3151
  res.statusCode = 200;
3082
3152
  res.setHeader(
@@ -3100,7 +3170,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3100
3170
  }
3101
3171
  const isViteOwnedRequest = () => requestUrl.startsWith("/@") || requestUrl.startsWith("/node_modules/") || requestUrl.startsWith("/__farm/") || isViteModuleRequest(parsedRequestUrl, req.headers) || (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname.includes(".") && (devServableFileExists(requestPathname, [server.config.publicDir]) || isViteDevClientRequest(parsedRequestUrl, req.headers) && devServableFileExists(requestPathname, [server.config.root]));
3102
3172
  const configRewriteSource = req[FARM_DEV_CONFIG_REWRITE_SOURCE];
3103
- const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3173
+ const runtimeHookErrorAnswersJSON = rendererDisabled || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath);
3104
3174
  const requestedPagePathname = configRewriteSource === void 0 ? requestPathname : new URL(configRewriteSource).pathname;
3105
3175
  let pageHookRouteMatch;
3106
3176
  const pageHookRoute = () => {
@@ -3111,10 +3181,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3111
3181
  render: {
3112
3182
  pathname: pathname2,
3113
3183
  method: requestMethod,
3114
- routePattern: _optionalChain([match, 'optionalAccess', _195 => _195.route, 'optionalAccess', _196 => _196.pattern]) || null,
3115
- params: _optionalChain([match, 'optionalAccess', _197 => _197.params]) || {}
3184
+ routePattern: _optionalChain([match, 'optionalAccess', _206 => _206.route, 'optionalAccess', _207 => _207.pattern]) || null,
3185
+ params: _optionalChain([match, 'optionalAccess', _208 => _208.params]) || {}
3116
3186
  },
3117
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _198 => _198.layouts]) || []).map((layout) => layout.pattern)
3187
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _209 => _209.layouts]) || []).map((layout) => layout.pattern)
3118
3188
  };
3119
3189
  return pageHookRouteMatch;
3120
3190
  };
@@ -3181,7 +3251,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3181
3251
  const redirectResponse = response;
3182
3252
  try {
3183
3253
  const metadataRoute = matchAppMetadataRoute(requestPathname);
3184
- const kind = metadataRoute ? "asset" : _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3254
+ const kind = metadataRoute ? "asset" : _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath) ? "api" : requestMethod === "GET" || requestMethod === "HEAD" ? "page" : "request";
3185
3255
  response = await pm.runRuntimeRequest(
3186
3256
  createRequestFromNodeRequest(req, parsedRequestUrl),
3187
3257
  async () => {
@@ -3190,7 +3260,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3190
3260
  },
3191
3261
  { kind, route: { pathname: requestPathname, ...metadataRoute } }
3192
3262
  );
3193
- } catch (e23) {
3263
+ } catch (e24) {
3194
3264
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3195
3265
  logResponse(requestMethod, requestUrl, 500, 0, "PAGE");
3196
3266
  return;
@@ -3202,7 +3272,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3202
3272
  }
3203
3273
  }
3204
3274
  const runAppMiddlewareForContentRoute = async () => {
3205
- if (!_optionalChain([middlewareManager, 'optionalAccess', _199 => _199.hasMiddleware, 'call', _200 => _200()])) return false;
3275
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _210 => _210.hasMiddleware, 'call', _211 => _211()])) return false;
3206
3276
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3207
3277
  return runFarmMiddlewareWithNavigation(
3208
3278
  farmApp.getServerRenderer(),
@@ -3231,7 +3301,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3231
3301
  return errorResponse;
3232
3302
  }
3233
3303
  );
3234
- } catch (e24) {
3304
+ } catch (e25) {
3235
3305
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3236
3306
  return 500;
3237
3307
  }
@@ -3240,7 +3310,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3240
3310
  return response.status;
3241
3311
  };
3242
3312
  const runAppMiddlewareInRuntimeSession = async (runtimeSession2, logResponse2) => {
3243
- const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _201 => _201.hasRuntimeHook, 'call', _202 => _202("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _203 => _203.hasMiddleware, 'call', _204 => _204()]) ? interceptFarmDevPageResponse({
3313
+ const interceptor = runtimeSession2 && _optionalChain([pm, 'optionalAccess', _212 => _212.hasRuntimeHook, 'call', _213 => _213("after")]) && _optionalChain([middlewareManager, 'optionalAccess', _214 => _214.hasMiddleware, 'call', _215 => _215()]) ? interceptFarmDevPageResponse({
3244
3314
  req,
3245
3315
  res,
3246
3316
  pm,
@@ -3253,7 +3323,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3253
3323
  urlPath: requestUrl,
3254
3324
  pathname: requestPathname,
3255
3325
  startTime: Date.now(),
3256
- logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _205 => _205(status)]),
3326
+ logResponse: (_method, _path, status) => _optionalChain([logResponse2, 'optionalCall', _216 => _216(status)]),
3257
3327
  // The runtime reports a runtime.after failure itself.
3258
3328
  emitError: async () => {
3259
3329
  },
@@ -3264,7 +3334,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3264
3334
  handled = await runAppMiddlewareForContentRoute();
3265
3335
  } catch (error) {
3266
3336
  if (runtimeHookErrorAnswersJSON || res.headersSent) {
3267
- _optionalChain([interceptor, 'optionalAccess', _206 => _206.release, 'call', _207 => _207()]);
3337
+ _optionalChain([interceptor, 'optionalAccess', _217 => _217.release, 'call', _218 => _218()]);
3268
3338
  throw error;
3269
3339
  }
3270
3340
  if (runtimeSession2) await pm.reportRuntimeRequestError(runtimeSession2, error);
@@ -3272,10 +3342,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3272
3342
  return true;
3273
3343
  }
3274
3344
  if (!handled) {
3275
- _optionalChain([interceptor, 'optionalAccess', _208 => _208.release, 'call', _209 => _209()]);
3345
+ _optionalChain([interceptor, 'optionalAccess', _219 => _219.release, 'call', _220 => _220()]);
3276
3346
  return false;
3277
3347
  }
3278
- if (!_optionalChain([interceptor, 'optionalAccess', _210 => _210.isEnded, 'call', _211 => _211()])) _optionalChain([logResponse2, 'optionalCall', _212 => _212(res.statusCode || 200)]);
3348
+ if (!_optionalChain([interceptor, 'optionalAccess', _221 => _221.isEnded, 'call', _222 => _222()])) _optionalChain([logResponse2, 'optionalCall', _223 => _223(res.statusCode || 200)]);
3279
3349
  return true;
3280
3350
  };
3281
3351
  const serveBuiltInRoute = async (respond, {
@@ -3284,14 +3354,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3284
3354
  label
3285
3355
  } = {}) => {
3286
3356
  const discard = async () => {
3287
- await _optionalChain([computed, 'optionalAccess', _213 => _213.body, 'optionalAccess', _214 => _214.cancel, 'call', _215 => _215(), 'access', _216 => _216.catch, 'call', _217 => _217(() => {
3357
+ await _optionalChain([computed, 'optionalAccess', _224 => _224.body, 'optionalAccess', _225 => _225.cancel, 'call', _226 => _226(), 'access', _227 => _227.catch, 'call', _228 => _228(() => {
3288
3358
  })]);
3289
3359
  };
3290
3360
  const sendRuntimeResponse = async (runtimeSession3, response2) => {
3291
3361
  let runtimeResponse;
3292
3362
  try {
3293
3363
  runtimeResponse = await pm.endRuntimeRequest(runtimeSession3, response2);
3294
- } catch (e25) {
3364
+ } catch (e26) {
3295
3365
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3296
3366
  return;
3297
3367
  }
@@ -3301,15 +3371,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3301
3371
  if (pm && opensFarmDevRuntimeSession(pm)) {
3302
3372
  try {
3303
3373
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3304
- const route = _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
3374
+ const route = _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
3305
3375
  { pathname: requestPathname },
3306
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk5OAN7BG5cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3376
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkB2PGVHBGcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3307
3377
  );
3308
3378
  runtimeSession2 = await pm.beginRuntimeRequest(
3309
3379
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3310
3380
  { kind, route }
3311
3381
  );
3312
- } catch (e26) {
3382
+ } catch (e27) {
3313
3383
  await discard();
3314
3384
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
3315
3385
  return;
@@ -3341,7 +3411,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3341
3411
  }
3342
3412
  responding = true;
3343
3413
  response = await respond(
3344
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _218 => _218.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3414
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _229 => _229.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
3345
3415
  );
3346
3416
  } catch (error) {
3347
3417
  if (!responding && !res.headersSent) {
@@ -3361,7 +3431,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3361
3431
  else await _chunkJRGR5Z4Kcjs.sendWebResponse.call(void 0, res, response);
3362
3432
  };
3363
3433
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
3364
- if (openAPIManager && _optionalChain([options, 'access', _219 => _219.openapi, 'optionalAccess', _220 => _220.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3434
+ if (openAPIManager && _optionalChain([options, 'access', _230 => _230.openapi, 'optionalAccess', _231 => _231.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
3365
3435
  const specManager = openAPIManager;
3366
3436
  await serveBuiltInRoute(async () => {
3367
3437
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -3381,7 +3451,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3381
3451
  });
3382
3452
  return;
3383
3453
  }
3384
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _221 => _221.openapi, 'optionalAccess', _222 => _222.route])) {
3454
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _232 => _232.openapi, 'optionalAccess', _233 => _233.route])) {
3385
3455
  const docsManager = openAPIManager;
3386
3456
  await serveBuiltInRoute(
3387
3457
  async () => {
@@ -3392,8 +3462,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3392
3462
  );
3393
3463
  return;
3394
3464
  }
3395
- if (_optionalChain([options, 'access', _223 => _223.agent, 'optionalAccess', _224 => _224.manifest]) !== false && _chunk5OAN7BG5cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3396
- const manifestGuardCoversPath = (path7) => _chunkUWOCYINYcjs.farmPathGuardCoversEndpoint.call(void 0,
3465
+ if (_optionalChain([options, 'access', _234 => _234.agent, 'optionalAccess', _235 => _235.manifest]) !== false && _chunkB2PGVHBGcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3466
+ const manifestGuardCoversPath = (path7) => _chunkNEKO3HM2cjs.farmPathGuardCoversEndpoint.call(void 0,
3397
3467
  {
3398
3468
  config: farmConfig,
3399
3469
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3402,18 +3472,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3402
3472
  apiServerBasePath
3403
3473
  );
3404
3474
  await serveBuiltInRoute(async () => {
3405
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkX4TSMQWFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3406
- const manifest = await _chunk5OAN7BG5cjs.createFarmAppManifestResponse.call(void 0,
3475
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkARORZ3MHcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3476
+ const manifest = await _chunkB2PGVHBGcjs.createFarmAppManifestResponse.call(void 0,
3407
3477
  new Request(parsedRequestUrl, {
3408
3478
  method: requestMethod,
3409
3479
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3410
3480
  }),
3411
3481
  {
3412
- ..._chunk5OAN7BG5cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3482
+ ..._chunkB2PGVHBGcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3413
3483
  build: "development",
3414
3484
  packages: farmAppPackages,
3415
3485
  // Read again on each request; unchanged files come from a cache.
3416
- webmcpTools: _optionalChain([farmConfig, 'access', _225 => _225.plugins, 'optionalAccess', _226 => _226.some, 'call', _227 => _227(({ name }) => name === "farm:webmcp")]) ? _chunkX4TSMQWFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3486
+ webmcpTools: _optionalChain([farmConfig, 'access', _236 => _236.plugins, 'optionalAccess', _237 => _237.some, 'call', _238 => _238(({ name }) => name === "farm:webmcp")]) ? _chunkARORZ3MHcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3417
3487
  }),
3418
3488
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3419
3489
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3431,11 +3501,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3431
3501
  });
3432
3502
  return;
3433
3503
  }
3434
- if (_optionalChain([options, 'access', _228 => _228.agent, 'optionalAccess', _229 => _229.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk5OAN7BG5cjs.FARM_API_CATALOG_PATH) {
3504
+ if (_optionalChain([options, 'access', _239 => _239.agent, 'optionalAccess', _240 => _240.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkB2PGVHBGcjs.FARM_API_CATALOG_PATH) {
3435
3505
  await serveBuiltInRoute(
3436
- () => _chunk5OAN7BG5cjs.createFarmApiCatalogResponse.call(void 0,
3506
+ () => _chunkB2PGVHBGcjs.createFarmApiCatalogResponse.call(void 0,
3437
3507
  requestMethod,
3438
- _chunk5OAN7BG5cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3508
+ _chunkB2PGVHBGcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3439
3509
  new Request(parsedRequestUrl, {
3440
3510
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3441
3511
  })
@@ -3443,8 +3513,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3443
3513
  );
3444
3514
  return;
3445
3515
  }
3446
- if (_optionalChain([options, 'access', _230 => _230.agent, 'optionalAccess', _231 => _231.aiCatalog]) !== false) {
3447
- const aiCatalog = _chunk5OAN7BG5cjs.createFarmAiCatalogResponse.call(void 0,
3516
+ if (_optionalChain([options, 'access', _241 => _241.agent, 'optionalAccess', _242 => _242.aiCatalog]) !== false) {
3517
+ const aiCatalog = _chunkB2PGVHBGcjs.createFarmAiCatalogResponse.call(void 0,
3448
3518
  new Request(parsedRequestUrl, {
3449
3519
  method: requestMethod,
3450
3520
  headers: {
@@ -3492,7 +3562,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3492
3562
  );
3493
3563
  const docsResponse = await farmDocsHandler(docsHandlerRequest);
3494
3564
  if (docsResponse) {
3495
- const docsPage = _optionalChain([docsResponse, 'access', _232 => _232.headers, 'access', _233 => _233.get, 'call', _234 => _234("content-type"), 'optionalAccess', _235 => _235.toLowerCase, 'call', _236 => _236(), 'access', _237 => _237.includes, 'call', _238 => _238("text/html")]);
3565
+ const docsPage = _optionalChain([docsResponse, 'access', _243 => _243.headers, 'access', _244 => _244.get, 'call', _245 => _245("content-type"), 'optionalAccess', _246 => _246.toLowerCase, 'call', _247 => _247(), 'access', _248 => _248.includes, 'call', _249 => _249("text/html")]);
3496
3566
  await serveBuiltInRoute(
3497
3567
  async (request) => {
3498
3568
  if (!docsPage) {
@@ -3510,7 +3580,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3510
3580
  farmConfig.deploymentId
3511
3581
  );
3512
3582
  if (deploymentMismatch) {
3513
- await _optionalChain([docsResponse, 'access', _239 => _239.body, 'optionalAccess', _240 => _240.cancel, 'call', _241 => _241()]);
3583
+ await _optionalChain([docsResponse, 'access', _250 => _250.body, 'optionalAccess', _251 => _251.cancel, 'call', _252 => _252()]);
3514
3584
  return _chunkNLBHLPEOcjs.createFarmDeploymentMismatchResponse.call(void 0, deploymentMismatch);
3515
3585
  }
3516
3586
  return _chunkNLBHLPEOcjs.withFarmDeploymentResponse.call(void 0,
@@ -3526,11 +3596,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3526
3596
  {
3527
3597
  kind: "docs",
3528
3598
  computed: docsResponse,
3529
- label: _chunk5OAN7BG5cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3599
+ label: _chunkB2PGVHBGcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3530
3600
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3531
3601
  {
3532
- path: _optionalChain([farmConfig, 'access', _242 => _242.docs, 'optionalAccess', _243 => _243.entry]) || "/docs",
3533
- roots: _optionalChain([farmConfig, 'access', _244 => _244.docs, 'optionalAccess', _245 => _245.roots, 'optionalAccess', _246 => _246.map, 'call', _247 => _247((root) => root.entry)]),
3602
+ path: _optionalChain([farmConfig, 'access', _253 => _253.docs, 'optionalAccess', _254 => _254.entry]) || "/docs",
3603
+ roots: _optionalChain([farmConfig, 'access', _255 => _255.docs, 'optionalAccess', _256 => _256.roots, 'optionalAccess', _257 => _257.map, 'call', _258 => _258((root) => root.entry)]),
3534
3604
  pages: await getFarmDocsPagePaths()
3535
3605
  }
3536
3606
  )
@@ -3539,7 +3609,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3539
3609
  return;
3540
3610
  }
3541
3611
  }
3542
- if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _248 => _248.headers, 'access', _249 => _249.accept, 'optionalAccess', _250 => _250.includes, 'call', _251 => _251(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3612
+ if (options.mobileClient && !viteModuleRequest && (requestMethod === "GET" || requestMethod === "HEAD" || requestMethod === "POST") && _optionalChain([req, 'access', _259 => _259.headers, 'access', _260 => _260.accept, 'optionalAccess', _261 => _261.includes, 'call', _262 => _262(_chunk3HLQTOVUcjs.FARM_NATIVE_TREE_CONTENT_TYPE)])) {
3543
3613
  const { createFarmNativeTreeResponse } = await import("./native-tree-5TENEQ7Y.cjs");
3544
3614
  const treeBodyInit = requestMethod === "POST" ? { body: _chunk7Q7UB4TLcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" } : {};
3545
3615
  const treeResponse = await createFarmNativeTreeResponse({
@@ -3557,18 +3627,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3557
3627
  });
3558
3628
  await serveBuiltInRoute(() => treeResponse, {
3559
3629
  computed: treeResponse,
3560
- label: _nullishCoalesce(_optionalChain([farmApp, 'access', _252 => _252.getRouteManager, 'call', _253 => _253(), 'access', _254 => _254.matchRoute, 'call', _255 => _255(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _256 => _256.route, 'optionalAccess', _257 => _257.pattern]), () => ( null))
3630
+ label: _nullishCoalesce(_optionalChain([farmApp, 'access', _263 => _263.getRouteManager, 'call', _264 => _264(), 'access', _265 => _265.matchRoute, 'call', _266 => _266(_chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath)), 'access', _267 => _267.route, 'optionalAccess', _268 => _268.pattern]), () => ( null))
3561
3631
  });
3562
3632
  return;
3563
3633
  }
3564
3634
  const markdownRouteLabel = () => (
3565
3635
  // On the route path, as production labels it: /fr/index.md is /index.md.
3566
- _chunk5OAN7BG5cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3636
+ _chunkB2PGVHBGcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3567
3637
  toRoutePathname(requestPathname),
3568
- (page) => _optionalChain([farmApp, 'access', _258 => _258.getRouteManager, 'call', _259 => _259(), 'access', _260 => _260.matchRoute, 'call', _261 => _261(page), 'access', _262 => _262.route, 'optionalAccess', _263 => _263.pattern])
3638
+ (page) => _optionalChain([farmApp, 'access', _269 => _269.getRouteManager, 'call', _270 => _270(), 'access', _271 => _271.matchRoute, 'call', _272 => _272(page), 'access', _273 => _273.route, 'optionalAccess', _274 => _274.pattern])
3569
3639
  )
3570
3640
  );
3571
- const markdownSourceResponse = viteModuleRequest ? null : await _chunkQ4TRGTO7cjs.createFarmMarkdownSourceResponse.call(void 0, {
3641
+ const markdownSourceResponse = viteModuleRequest ? null : await _chunk26WP75W5cjs.createFarmMarkdownSourceResponse.call(void 0, {
3572
3642
  request: new Request(fullUrl, {
3573
3643
  method: requestMethod,
3574
3644
  headers: docsHeaders
@@ -3577,14 +3647,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3577
3647
  routePathname: toRoutePathname,
3578
3648
  resolveSource: async (pathname2) => {
3579
3649
  const match = farmApp.getRouteManager().matchRoute(pathname2);
3580
- const sourcePath = _optionalChain([match, 'access', _264 => _264.route, 'optionalAccess', _265 => _265.markdownSourcePath]) || (match.route && _chunkQ4TRGTO7cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3650
+ const sourcePath = _optionalChain([match, 'access', _275 => _275.route, 'optionalAccess', _276 => _276.markdownSourcePath]) || (match.route && _chunk26WP75W5cjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
3581
3651
  if (!sourcePath) {
3582
3652
  return null;
3583
3653
  }
3584
3654
  return {
3585
3655
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3586
3656
  // Project-relative, as production sends it: never the machine's path.
3587
- filePath: _chunkX4TSMQWFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3657
+ filePath: _chunkARORZ3MHcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3588
3658
  };
3589
3659
  },
3590
3660
  // The anonymous check goes through this server, so its guards and
@@ -3650,7 +3720,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3650
3720
  return;
3651
3721
  }
3652
3722
  if (!viteModuleRequest && _chunk2NOHVIJ3cjs.farmRequestWantsMarkdown.call(void 0, requestPathname, req.headers.accept)) {
3653
- const markdownRoute = farmApp.getRouteManager().matchRoute(_chunkQ4TRGTO7cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3723
+ const markdownRoute = farmApp.getRouteManager().matchRoute(_chunk26WP75W5cjs.normalizeFarmMarkdownRoutePath.call(void 0, requestPathname, toRoutePathname));
3654
3724
  if (!markdownRoute.route) {
3655
3725
  await serveBuiltInRoute(
3656
3726
  () => new Response(
@@ -3719,7 +3789,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3719
3789
  }
3720
3790
  const configuredIntegrations = currentConfig.integrations;
3721
3791
  const tryConfiguredIntegrationRoute = async () => {
3722
- const matchedRoute = _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3792
+ const matchedRoute = _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3723
3793
  pathname: requestPathname,
3724
3794
  method: requestMethod
3725
3795
  });
@@ -3733,8 +3803,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3733
3803
  await pm.runHookParallelFiltered(
3734
3804
  "beforeRequest",
3735
3805
  (plugin2) => {
3736
- const owner = _chunkWGWWRV2Mcjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3737
- return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _266 => _266.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3806
+ const owner = _chunkB3HQTGXScjs.getFarmIntegrationPluginOwner.call(void 0, plugin2);
3807
+ return !isFarmConfigRoutePlugin(plugin2) && (_optionalChain([owner, 'optionalAccess', _277 => _277.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
3738
3808
  },
3739
3809
  req,
3740
3810
  res
@@ -3763,7 +3833,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3763
3833
  });
3764
3834
  const dispatchIntegration = async (request, runtime) => {
3765
3835
  try {
3766
- const result = await _chunkWGWWRV2Mcjs.dispatchIntegrationRequest.call(void 0,
3836
+ const result = await _chunkB3HQTGXScjs.dispatchIntegrationRequest.call(void 0,
3767
3837
  {
3768
3838
  integration: matchedRoute.integration,
3769
3839
  config: currentConfig,
@@ -3771,7 +3841,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3771
3841
  isProd: false
3772
3842
  },
3773
3843
  request,
3774
- { clientAddress: _optionalChain([req, 'access', _267 => _267.socket, 'optionalAccess', _268 => _268.remoteAddress]) }
3844
+ { clientAddress: _optionalChain([req, 'access', _278 => _278.socket, 'optionalAccess', _279 => _279.remoteAddress]) }
3775
3845
  );
3776
3846
  if (!result) {
3777
3847
  throw new Error(`Matched integration route did not return a response`);
@@ -3779,8 +3849,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3779
3849
  return result;
3780
3850
  } catch (error) {
3781
3851
  _chunk7U4XF76Rcjs.logger.error(`Integration route error: ${error}`);
3782
- await _optionalChain([runtime, 'optionalAccess', _269 => _269.reportError, 'call', _270 => _270(error)]);
3783
- return _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
3852
+ await _optionalChain([runtime, 'optionalAccess', _280 => _280.reportError, 'call', _281 => _281(error)]);
3853
+ return _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
3784
3854
  }
3785
3855
  };
3786
3856
  runtimeReportsErrors = Boolean(pm);
@@ -3821,7 +3891,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3821
3891
  } else if (!res.writableEnded) {
3822
3892
  res.statusCode = 500;
3823
3893
  res.setHeader("Content-Type", "application/json");
3824
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3894
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3825
3895
  }
3826
3896
  return true;
3827
3897
  }
@@ -3830,10 +3900,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3830
3900
  const hasLocalDevRoute = () => {
3831
3901
  const routeManager3 = farmApp.getRouteManager();
3832
3902
  return Boolean(
3833
- _chunkWGWWRV2Mcjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3903
+ _chunkB3HQTGXScjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
3834
3904
  pathname: requestPathname,
3835
3905
  method: requestMethod
3836
- }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _271 => _271.isFarmDocsAPIRequest, 'call', _272 => _272(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3906
+ }) || routeManager3.matchRedirect(requestPathname) || apiRouteManager.matchRoute(requestPathname) || farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _282 => _282.isFarmDocsAPIRequest, 'call', _283 => _283(requestPathname)]) || routeManager3.matchRoute(requestPathname).route || routeManager3.matchMetadataRoute(requestPathname) || routeManager3.matchMetadataImage(requestPathname)
3837
3907
  );
3838
3908
  };
3839
3909
  try {
@@ -3867,7 +3937,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3867
3937
  }
3868
3938
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
3869
3939
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
3870
- if (hasMatchedApiRoute || _chunkWIZRYFB2cjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3940
+ if (hasMatchedApiRoute || _chunkJYQ6DGPWcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
3871
3941
  const startTime2 = Date.now();
3872
3942
  const method2 = req.method || "GET";
3873
3943
  const urlPath2 = req.url || "/";
@@ -3896,7 +3966,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3896
3966
  _chunk7U4XF76Rcjs.logger.error(`Request hook error: ${error}`);
3897
3967
  res.statusCode = 500;
3898
3968
  res.setHeader("Content-Type", "application/json");
3899
- res.end(_chunkWIZRYFB2cjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3969
+ res.end(_chunkJYQ6DGPWcjs.FARM_INTERNAL_SERVER_ERROR_BODY);
3900
3970
  return;
3901
3971
  }
3902
3972
  const createAPIRequest = async () => {
@@ -3923,15 +3993,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3923
3993
  );
3924
3994
  };
3925
3995
  const isDocsAPIRequest = Boolean(
3926
- farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _273 => _273.isFarmDocsAPIRequest, 'call', _274 => _274(pathname2)])
3996
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _284 => _284.isFarmDocsAPIRequest, 'call', _285 => _285(pathname2)])
3927
3997
  );
3928
3998
  const docsRuntimeOptions = () => ({
3929
3999
  kind: "docs",
3930
- route: _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
4000
+ route: _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
3931
4001
  { pathname: pathname2, pattern: urlPath2 },
3932
- _chunk5OAN7BG5cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
3933
- path: _optionalChain([farmConfig, 'access', _275 => _275.docs, 'optionalAccess', _276 => _276.entry]) || "/docs",
3934
- roots: _optionalChain([farmConfig, 'access', _277 => _277.docs, 'optionalAccess', _278 => _278.roots, 'optionalAccess', _279 => _279.map, 'call', _280 => _280((root) => root.entry)])
4002
+ _chunkB2PGVHBGcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4003
+ path: _optionalChain([farmConfig, 'access', _286 => _286.docs, 'optionalAccess', _287 => _287.entry]) || "/docs",
4004
+ roots: _optionalChain([farmConfig, 'access', _288 => _288.docs, 'optionalAccess', _289 => _289.roots, 'optionalAccess', _290 => _290.map, 'call', _291 => _291((root) => root.entry)])
3935
4005
  })
3936
4006
  )
3937
4007
  });
@@ -4013,7 +4083,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4013
4083
  const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
4014
4084
  const hasExplicitAPIRoute = Boolean(routedApiRoute);
4015
4085
  if (apiHandler && hasExplicitAPIRoute) {
4016
- const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _281 => _281.route, 'access', _282 => _282.path]) || urlPath2;
4086
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _292 => _292.route, 'access', _293 => _293.path]) || urlPath2;
4017
4087
  _chunkPLJMEUANcjs.emitFarmEvent.call(void 0, {
4018
4088
  type: "route.matched",
4019
4089
  pathname: pathname2,
@@ -4063,8 +4133,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4063
4133
  error
4064
4134
  });
4065
4135
  _chunk7U4XF76Rcjs.logger.error(`API route error: ${error}`);
4066
- await _optionalChain([runtime, 'optionalAccess', _283 => _283.reportError, 'call', _284 => _284(error)]);
4067
- response = _chunkWIZRYFB2cjs.createFarmInternalServerErrorResponse.call(void 0, );
4136
+ await _optionalChain([runtime, 'optionalAccess', _294 => _294.reportError, 'call', _295 => _295(error)]);
4137
+ response = _chunkJYQ6DGPWcjs.createFarmInternalServerErrorResponse.call(void 0, );
4068
4138
  }
4069
4139
  return pm ? await pm.runHookSerial("afterApiHandler", response, apiLifecyclePayload) : response;
4070
4140
  };
@@ -4168,12 +4238,12 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4168
4238
  }
4169
4239
  return;
4170
4240
  }
4171
- if (_optionalChain([req, 'access', _285 => _285.url, 'optionalAccess', _286 => _286.startsWith, 'call', _287 => _287("/@")]) || _optionalChain([req, 'access', _288 => _288.url, 'optionalAccess', _289 => _289.startsWith, 'call', _290 => _290("/node_modules")])) {
4241
+ if (_optionalChain([req, 'access', _296 => _296.url, 'optionalAccess', _297 => _297.startsWith, 'call', _298 => _298("/@")]) || _optionalChain([req, 'access', _299 => _299.url, 'optionalAccess', _300 => _300.startsWith, 'call', _301 => _301("/node_modules")])) {
4172
4242
  return next();
4173
4243
  }
4174
4244
  if (!deferredDottedRequests.has(req) && shouldBypassFarmRouterForDottedPath(
4175
4245
  requestPathname,
4176
- _optionalChain([farmApp, 'optionalAccess', _291 => _291.getRouteManager, 'call', _292 => _292()]),
4246
+ _optionalChain([farmApp, 'optionalAccess', _302 => _302.getRouteManager, 'call', _303 => _303()]),
4177
4247
  [server.config.publicDir, server.config.root],
4178
4248
  farmAgentGeneratedPaths(farmConfig),
4179
4249
  requestMethod
@@ -4181,7 +4251,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4181
4251
  if (!viteModuleRequest) deferredDottedRequests.set(req, requestUrl);
4182
4252
  return next();
4183
4253
  }
4184
- if (_optionalChain([req, 'access', _293 => _293.url, 'optionalAccess', _294 => _294.startsWith, 'call', _295 => _295("/__farm/page-data")])) {
4254
+ if (_optionalChain([req, 'access', _304 => _304.url, 'optionalAccess', _305 => _305.startsWith, 'call', _306 => _306("/__farm/page-data")])) {
4185
4255
  const urlObj = parsedRequestUrl;
4186
4256
  const targetPath = urlObj.searchParams.get("path") || "/";
4187
4257
  let renderedRequest;
@@ -4211,7 +4281,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4211
4281
  renderedRequest = targetRequest;
4212
4282
  let middlewareMap = /* @__PURE__ */ new Map();
4213
4283
  let middlewareContext = /* @__PURE__ */ new Map();
4214
- if (_optionalChain([middlewareManager, 'optionalAccess', _296 => _296.hasMiddleware, 'call', _297 => _297()])) {
4284
+ if (_optionalChain([middlewareManager, 'optionalAccess', _307 => _307.hasMiddleware, 'call', _308 => _308()])) {
4215
4285
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
4216
4286
  const targetNodeResponse = createPageDataMiddlewareResponse(res);
4217
4287
  const handled = await runFarmMiddlewareWithNavigation(
@@ -4245,10 +4315,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4245
4315
  if (pm) {
4246
4316
  await pm.runHookParallel("afterRouteMatch", {
4247
4317
  pathname: targetPath,
4248
- matched: !!_optionalChain([match, 'optionalAccess', _298 => _298.route]),
4249
- routePattern: _optionalChain([match, 'optionalAccess', _299 => _299.route, 'optionalAccess', _300 => _300.pattern]) || null,
4250
- params: _optionalChain([match, 'optionalAccess', _301 => _301.params]) || {},
4251
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _302 => _302.layouts]) || []).map((l) => l.pattern)
4318
+ matched: !!_optionalChain([match, 'optionalAccess', _309 => _309.route]),
4319
+ routePattern: _optionalChain([match, 'optionalAccess', _310 => _310.route, 'optionalAccess', _311 => _311.pattern]) || null,
4320
+ params: _optionalChain([match, 'optionalAccess', _312 => _312.params]) || {},
4321
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _313 => _313.layouts]) || []).map((l) => l.pattern)
4252
4322
  });
4253
4323
  }
4254
4324
  if (!match) {
@@ -4283,7 +4353,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4283
4353
  );
4284
4354
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4285
4355
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4286
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4356
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4287
4357
  const isClientComponent = moduleMetadata.isClientComponent;
4288
4358
  const shouldHydrate = moduleMetadata.shouldHydrate;
4289
4359
  let mergedMetadata = {};
@@ -4294,7 +4364,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4294
4364
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4295
4365
  (entry) => entry.pattern === layout.pattern
4296
4366
  ), () => ( {
4297
- ..._chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4367
+ ..._chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4298
4368
  serverTree: false
4299
4369
  }))
4300
4370
  );
@@ -4308,17 +4378,17 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4308
4378
  )
4309
4379
  ];
4310
4380
  const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4311
- _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _303 => _303.getConfig, 'call', _304 => _304()]), () => ( options))), 'access', _305 => _305.experimental, 'optionalAccess', _306 => _306.serverComponents])
4312
- ) === "islands" ? _chunkX4TSMQWFcjs.resolveFarmRouteRootStrategy.call(void 0,
4381
+ _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315()]), () => ( options))), 'access', _316 => _316.experimental, 'optionalAccess', _317 => _317.serverComponents])
4382
+ ) === "islands" ? _chunkARORZ3MHcjs.resolveFarmRouteRootStrategy.call(void 0,
4313
4383
  route,
4314
4384
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4315
4385
  layouts.map((layout, index) => ({
4316
4386
  pattern: layout.pattern,
4317
4387
  modulePath: layout.modulePath,
4318
- shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _307 => _307[index], 'optionalAccess', _308 => _308.shouldHydrate]) === true,
4388
+ shouldHydrate: _optionalChain([layoutHydrationMetadata, 'access', _318 => _318[index], 'optionalAccess', _319 => _319.shouldHydrate]) === true,
4319
4389
  // Manifest entries carry it; metadata read from source does not.
4320
- hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _309 => _309[index], 'optionalAccess', _310 => _310.hasIsolatedClientBoundaries]) === true,
4321
- islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _311 => _311[index], 'optionalAccess', _312 => _312.islandStrategy]), () => ( null))
4390
+ hasIsolatedClientBoundaries: _optionalChain([layoutHydrationMetadata, 'access', _320 => _320[index], 'optionalAccess', _321 => _321.hasIsolatedClientBoundaries]) === true,
4391
+ islandStrategy: _nullishCoalesce(_optionalChain([layoutHydrationMetadata, 'access', _322 => _322[index], 'optionalAccess', _323 => _323.islandStrategy]), () => ( null))
4322
4392
  })),
4323
4393
  server.config.root,
4324
4394
  true
@@ -4375,7 +4445,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4375
4445
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4376
4446
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4377
4447
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4378
- ), () => ( _chunkZVSQN7NCcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4448
+ ), () => ( _chunkDRO3NXA3cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4379
4449
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4380
4450
  request: targetRequest,
4381
4451
  params: slot.params,
@@ -4421,15 +4491,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4421
4491
  );
4422
4492
  const projectRoot = server.config.root;
4423
4493
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4424
- const renderPlan = _chunkUWOCYINYcjs.createFarmRouteRenderPlan.call(void 0, {
4494
+ const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
4425
4495
  pageShouldHydrate: shouldHydrate,
4426
4496
  layoutShouldHydrate: shouldHydrateLayout,
4427
4497
  islandStrategy: hydrationIslandStrategy,
4428
- rendering: _chunkSDICLSQUcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4498
+ rendering: _chunkVMBIKDKWcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4429
4499
  });
4430
4500
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4431
- const layoutStartIndex = _chunkUWOCYINYcjs.getSharedLayoutPrefixLength.call(void 0,
4432
- _chunkUWOCYINYcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4501
+ const layoutStartIndex = _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0,
4502
+ _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4433
4503
  destinationLayoutPatterns
4434
4504
  );
4435
4505
  const renderer = farmApp.getServerRenderer();
@@ -4439,13 +4509,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4439
4509
  middlewareContext,
4440
4510
  () => renderer.renderNavigationFragment({
4441
4511
  PageComponent: routeModule.default,
4442
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _313 => _313.default]),
4512
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _324 => _324.default]),
4443
4513
  pageProps: routeProps,
4444
4514
  params,
4445
4515
  layouts: layouts.map((layout, index) => ({
4446
4516
  pattern: layout.pattern,
4447
4517
  module: layoutModules[index],
4448
- serverTree: _optionalChain([layoutHydrationMetadata, 'access', _314 => _314[index], 'optionalAccess', _315 => _315.serverTree])
4518
+ serverTree: _optionalChain([layoutHydrationMetadata, 'access', _325 => _325[index], 'optionalAccess', _326 => _326.serverTree])
4449
4519
  })),
4450
4520
  layoutStartIndex,
4451
4521
  slots: routeSlots.map((slot) => ({
@@ -4511,7 +4581,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4511
4581
  {
4512
4582
  status: 200,
4513
4583
  headers: {
4514
- "Cache-Control": _chunkUWOCYINYcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4584
+ "Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4515
4585
  "X-Farm-Navigation": "html-fragment",
4516
4586
  Vary: "X-Farm-Layout-Chain",
4517
4587
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4553,14 +4623,14 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4553
4623
  trustProxy: currentServerConfig.trustProxy
4554
4624
  }).pathname;
4555
4625
  const routeManager2 = farmApp.getRouteManager();
4556
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _316 => _316.hasHook, 'call', _317 => _317("beforeRequest")]), () => ( false));
4557
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _318 => _318.hasHook, 'call', _319 => _319("afterResponse")]), () => ( false));
4558
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _320 => _320.hasHook, 'call', _321 => _321("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _322 => _322.hasHook, 'call', _323 => _323("afterRender")]), () => ( false)));
4626
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _327 => _327.hasHook, 'call', _328 => _328("beforeRequest")]), () => ( false));
4627
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _329 => _329.hasHook, 'call', _330 => _330("afterResponse")]), () => ( false));
4628
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _331 => _331.hasHook, 'call', _332 => _332("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _333 => _333.hasHook, 'call', _334 => _334("afterRender")]), () => ( false)));
4559
4629
  const opensRuntimeSession = pm ? opensFarmDevRuntimeSession(pm) : false;
4560
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _324 => _324.hasRuntimeHook, 'call', _325 => _325("after")]), () => ( false));
4630
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _335 => _335.hasRuntimeHook, 'call', _336 => _336("after")]), () => ( false));
4561
4631
  const pageBuiltInRouteLabel = (pathname2) => {
4562
4632
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4563
- const mcpLabel = _chunk5OAN7BG5cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4633
+ const mcpLabel = _chunkB2PGVHBGcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4564
4634
  if (mcpLabel) return mcpLabel;
4565
4635
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4566
4636
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4569,13 +4639,13 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4569
4639
  const match = routeManager2.matchRoute(pathname2);
4570
4640
  return {
4571
4641
  kind: "page",
4572
- route: _chunk5OAN7BG5cjs.setFarmRouteLabel.call(void 0,
4642
+ route: _chunkB2PGVHBGcjs.setFarmRouteLabel.call(void 0,
4573
4643
  {
4574
4644
  pathname: pathname2,
4575
- pattern: _optionalChain([match, 'optionalAccess', _326 => _326.route, 'optionalAccess', _327 => _327.pattern]) || null,
4576
- params: _optionalChain([match, 'optionalAccess', _328 => _328.params]) || {}
4645
+ pattern: _optionalChain([match, 'optionalAccess', _337 => _337.route, 'optionalAccess', _338 => _338.pattern]) || null,
4646
+ params: _optionalChain([match, 'optionalAccess', _339 => _339.params]) || {}
4577
4647
  },
4578
- _optionalChain([match, 'optionalAccess', _329 => _329.route]) ? null : pageBuiltInRouteLabel(pathname2)
4648
+ _optionalChain([match, 'optionalAccess', _340 => _340.route]) ? null : pageBuiltInRouteLabel(pathname2)
4579
4649
  )
4580
4650
  };
4581
4651
  };
@@ -4655,7 +4725,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4655
4725
  }) : void 0;
4656
4726
  let middlewareFailed = false;
4657
4727
  try {
4658
- if (_optionalChain([middlewareManager, 'optionalAccess', _330 => _330.hasMiddleware, 'call', _331 => _331()])) {
4728
+ if (_optionalChain([middlewareManager, 'optionalAccess', _341 => _341.hasMiddleware, 'call', _342 => _342()])) {
4659
4729
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
4660
4730
  const handled = await runFarmMiddlewareWithNavigation(
4661
4731
  farmApp.getServerRenderer(),
@@ -4668,7 +4738,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4668
4738
  throw error;
4669
4739
  });
4670
4740
  if (handled) {
4671
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _332 => _332.isEnded, 'call', _333 => _333()])) {
4741
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _343 => _343.isEnded, 'call', _344 => _344()])) {
4672
4742
  const duration = Date.now() - startTime;
4673
4743
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4674
4744
  }
@@ -4683,8 +4753,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4683
4753
  res
4684
4754
  );
4685
4755
  }
4686
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _334 => _334.isEnded, 'call', _335 => _335()])) {
4687
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _336 => _336.isEnded, 'call', _337 => _337()])) {
4756
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _345 => _345.isEnded, 'call', _346 => _346()])) {
4757
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _347 => _347.isEnded, 'call', _348 => _348()])) {
4688
4758
  const duration = Date.now() - startTime;
4689
4759
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
4690
4760
  }
@@ -4703,8 +4773,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4703
4773
  await pm.reportRuntimeRequestError(runtimeSession, error);
4704
4774
  } else {
4705
4775
  await pm.failRuntimeRequest(runtimeSession, error);
4706
- if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _338 => _338.isEnded, 'call', _339 => _339()])) {
4707
- _optionalChain([responseInterceptor, 'optionalAccess', _340 => _340.release, 'call', _341 => _341()]);
4776
+ if (!res.headersSent && !_optionalChain([responseInterceptor, 'optionalAccess', _349 => _349.isEnded, 'call', _350 => _350()])) {
4777
+ _optionalChain([responseInterceptor, 'optionalAccess', _351 => _351.release, 'call', _352 => _352()]);
4708
4778
  console.error("[FARM] Page error:", error);
4709
4779
  sendFarmDevRuntimeHookError(res, runtimeHookErrorAnswersJSON);
4710
4780
  return;
@@ -4721,7 +4791,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4721
4791
  }
4722
4792
  })
4723
4793
  );
4724
- const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _342 => _342.stack, 'access', _343 => _343.at, 'call', _344 => _344(-1), 'optionalAccess', _345 => _345.handle]);
4794
+ const farmRequestMiddleware = _optionalChain([farmMiddlewares, 'access', _353 => _353.stack, 'access', _354 => _354.at, 'call', _355 => _355(-1), 'optionalAccess', _356 => _356.handle]);
4725
4795
  if (farmOwnsDevCors && viteServer.config.server.cors === false) {
4726
4796
  farmMiddlewares.use(createFarmDevViteCorsMiddleware());
4727
4797
  }
@@ -4750,7 +4820,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4750
4820
  });
4751
4821
  }
4752
4822
  if (id.startsWith("@farm.js/core/internal/") && importer && isOutsideAppRoot(importer)) {
4753
- const root = _optionalChain([farmApp, 'optionalAccess', _346 => _346.getConfig, 'call', _347 => _347(), 'access', _348 => _348.root]) || _optionalChain([server, 'optionalAccess', _349 => _349.config, 'access', _350 => _350.root]) || options.root;
4823
+ const root = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358(), 'access', _359 => _359.root]) || _optionalChain([server, 'optionalAccess', _360 => _360.config, 'access', _361 => _361.root]) || options.root;
4754
4824
  return this.resolve(id, path6.join(root, "package.json"), {
4755
4825
  ...resolveOptions,
4756
4826
  skipSelf: true
@@ -4778,7 +4848,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4778
4848
  }
4779
4849
  },
4780
4850
  async load(id, loadOptions) {
4781
- if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _351 => _351.ssr]) && !farmSetupContext.getStore()) {
4851
+ if (pendingClientSetup && !_optionalChain([loadOptions, 'optionalAccess', _362 => _362.ssr]) && !farmSetupContext.getStore()) {
4782
4852
  await pendingClientSetup;
4783
4853
  }
4784
4854
  if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
@@ -4796,8 +4866,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4796
4866
  if (imageModule) return imageModule;
4797
4867
  }
4798
4868
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4799
- const renderer = _optionalChain([farmApp, 'optionalAccess', _352 => _352.getConfig, 'call', _353 => _353(), 'access', _354 => _354.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4800
- const root = _optionalChain([server, 'optionalAccess', _355 => _355.config, 'access', _356 => _356.root]) || options.root;
4869
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _363 => _363.getConfig, 'call', _364 => _364(), 'access', _365 => _365.renderer]) || _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, options.renderer);
4870
+ const root = _optionalChain([server, 'optionalAccess', _366 => _366.config, 'access', _367 => _367.root]) || options.root;
4801
4871
  if (isClientEnvironment(this, loadOptions)) {
4802
4872
  return generateProgrammaticClientRouteModuleForId(
4803
4873
  id,
@@ -4813,65 +4883,65 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4813
4883
  return FARM_DEV_CLIENT_BOOT_MODULE;
4814
4884
  }
4815
4885
  if (isFarmClientVirtualId(id)) {
4816
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _357 => _357.getConfig, 'call', _358 => _358()]);
4817
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _359 => _359.renderer]) || _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, options.renderer);
4818
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _360 => _360.integrations]) || options.integrations;
4819
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _361 => _361.root]) || _optionalChain([server, 'optionalAccess', _362 => _362.config, 'access', _363 => _363.root]) || process.cwd();
4820
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _364 => _364.docs]);
4886
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _368 => _368.getConfig, 'call', _369 => _369()]);
4887
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _370 => _370.renderer]) || _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, options.renderer);
4888
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _371 => _371.integrations]) || options.integrations;
4889
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.root]) || _optionalChain([server, 'optionalAccess', _373 => _373.config, 'access', _374 => _374.root]) || process.cwd();
4890
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.docs]);
4821
4891
  const adapterOwnsDocsRuntime = Boolean(
4822
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _365 => _365.adapter, 'optionalAccess', _366 => _366.server]) && docs.adapter.react
4892
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _376 => _376.adapter, 'optionalAccess', _377 => _377.server]) && docs.adapter.react
4823
4893
  );
4824
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _367 => _367.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4894
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
4825
4895
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
4826
- _optionalChain([docs, 'optionalAccess', _368 => _368.enabled]) ? loadFarmDocsDevRuntime() : null,
4827
- _optionalChain([docs, 'optionalAccess', _369 => _369.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4896
+ _optionalChain([docs, 'optionalAccess', _379 => _379.enabled]) ? loadFarmDocsDevRuntime() : null,
4897
+ _optionalChain([docs, 'optionalAccess', _380 => _380.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
4828
4898
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
4829
4899
  ]);
4830
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _370 => _370.isFarmDocsSearchEnabled, 'call', _371 => _371(docs)]), () => ( false));
4900
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _381 => _381.isFarmDocsSearchEnabled, 'call', _382 => _382(docs)]), () => ( false));
4831
4901
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
4832
4902
  docsSearchEnabled,
4833
4903
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
4834
4904
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
4835
4905
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4836
4906
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkUVV3I5QAcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4837
- const integrationProviders = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkWGWWRV2Mcjs.getIntegrationProviders.call(void 0, integrations) : [];
4838
- const isolatedHydrationMode = _chunkZVSQN7NCcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4839
- _optionalChain([resolvedConfig, 'optionalAccess', _372 => _372.experimental, 'optionalAccess', _373 => _373.isolatedClientHydration]),
4907
+ const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4908
+ const isolatedHydrationMode = _chunkDRO3NXA3cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4909
+ _optionalChain([resolvedConfig, 'optionalAccess', _383 => _383.experimental, 'optionalAccess', _384 => _384.isolatedClientHydration]),
4840
4910
  {
4841
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.experimental, 'optionalAccess', _375 => _375.serverComponents])) === "rsc",
4911
+ serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.serverComponents])) === "rsc",
4842
4912
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4843
4913
  }
4844
4914
  );
4845
4915
  return generateClientCode(
4846
4916
  integrationProviders,
4847
4917
  [
4848
- ..._chunkWGWWRV2Mcjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4849
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _376 => _376.getFarmDocsDocumentNavigationMatchers, 'call', _377 => _377(docs)]), () => ( []))
4918
+ ..._chunkB3HQTGXScjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
4919
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _387 => _387.getFarmDocsDocumentNavigationMatchers, 'call', _388 => _388(docs)]), () => ( []))
4850
4920
  ],
4851
4921
  generatedDocsSearchRuntime,
4852
4922
  `${generatedDevtoolsClientRuntime}
4853
4923
  ${generatedDevIndicatorsClientRuntime}`,
4854
- _optionalChain([resolvedConfig, 'optionalAccess', _378 => _378.plugins]) || [],
4924
+ _optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.plugins]) || [],
4855
4925
  root,
4856
- _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.srcDir]) || options.srcDir || "src",
4857
- _optionalChain([resolvedConfig, 'optionalAccess', _380 => _380.publicRuntimeConfig]) || options.publicRuntimeConfig,
4858
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _381 => _381.adapter, 'optionalAccess', _382 => _382.react]) : void 0,
4926
+ _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.srcDir]) || options.srcDir || "src",
4927
+ _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.publicRuntimeConfig]) || options.publicRuntimeConfig,
4928
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _392 => _392.adapter, 'optionalAccess', _393 => _393.react]) : void 0,
4859
4929
  renderer,
4860
- isolatedHydrationMode === "enabled" || _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _383 => _383.getRouteManager, 'call', _384 => _384(), 'access', _385 => _385.getIsolatedClientBoundaryModules, 'call', _386 => _386(root)])))), 'optionalAccess', _387 => _387.size]) > 0,
4861
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _388 => _388.trailingSlash]), () => ( false)),
4862
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _389 => _389.basePath]), () => ( "/")),
4863
- _chunkX4TSMQWFcjs.generateClientCachePersistenceCode.call(void 0,
4864
- _chunkX4TSMQWFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _390 => _390.cache]))
4930
+ isolatedHydrationMode === "enabled" || _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _394 => _394.getRouteManager, 'call', _395 => _395(), 'access', _396 => _396.getIsolatedClientBoundaryModules, 'call', _397 => _397(root)])))), 'optionalAccess', _398 => _398.size]) > 0,
4931
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _399 => _399.trailingSlash]), () => ( false)),
4932
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.basePath]), () => ( "/")),
4933
+ _chunkARORZ3MHcjs.generateClientCachePersistenceCode.call(void 0,
4934
+ _chunkARORZ3MHcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.cache]))
4865
4935
  ),
4866
- _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4867
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _391 => _391.experimental, 'optionalAccess', _392 => _392.serverComponents])) === "islands"
4936
+ _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4937
+ _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands"
4868
4938
  );
4869
4939
  }
4870
4940
  if (id === "/@farm/server") {
4871
4941
  return generateServerCode();
4872
4942
  }
4873
4943
  if (id === "/@farm/manifest") {
4874
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _393 => _393.getRouteManager, 'call', _394 => _394()]);
4944
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _404 => _404.getRouteManager, 'call', _405 => _405()]);
4875
4945
  if (!routeManager) {
4876
4946
  return `
4877
4947
  export const getManifest = () => ({
@@ -4883,11 +4953,11 @@ export const getManifest = () => ({
4883
4953
  });
4884
4954
  `;
4885
4955
  }
4886
- const globalStylesheetHref = _chunkX4TSMQWFcjs.resolveDevGlobalStylesheetHref.call(void 0,
4956
+ const globalStylesheetHref = _chunkARORZ3MHcjs.resolveDevGlobalStylesheetHref.call(void 0,
4887
4957
  server.config.root,
4888
- _optionalChain([farmApp, 'optionalAccess', _395 => _395.getConfig, 'call', _396 => _396(), 'access', _397 => _397.srcDir])
4958
+ _optionalChain([farmApp, 'optionalAccess', _406 => _406.getConfig, 'call', _407 => _407(), 'access', _408 => _408.srcDir])
4889
4959
  );
4890
- const fullManifest = _chunkX4TSMQWFcjs.createFarmDevClientManifest.call(void 0,
4960
+ const fullManifest = _chunkARORZ3MHcjs.createFarmDevClientManifest.call(void 0,
4891
4961
  routeManager.generateClientManifest(server.config.root),
4892
4962
  {
4893
4963
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4903,64 +4973,64 @@ export { manifest };
4903
4973
  }
4904
4974
  },
4905
4975
  async transform(code, id, transformOptions) {
4906
- if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _398 => _398.ssr]) && !farmSetupContext.getStore()) {
4976
+ if (pendingClientSetup && !_optionalChain([transformOptions, 'optionalAccess', _409 => _409.ssr]) && !farmSetupContext.getStore()) {
4907
4977
  await pendingClientSetup;
4908
4978
  }
4909
- const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _399 => _399.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4910
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _400 => _400.getConfig, 'call', _401 => _401()]), () => ( options));
4979
+ const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4980
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _411 => _411.getConfig, 'call', _412 => _412()]), () => ( options));
4911
4981
  let rewrotePackageImports = false;
4912
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _402 => _402.experimental, 'optionalAccess', _403 => _403.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _404 => _404.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, code)) {
4982
+ if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _415 => _415.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, code)) {
4913
4983
  const file = id.split("?", 1)[0];
4914
- const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _405 => _405.config, 'access', _406 => _406.root]) || process.cwd();
4984
+ const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _416 => _416.config, 'access', _417 => _417.root]) || process.cwd();
4915
4985
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4916
4986
  const rewrite = () => {
4917
- if (_optionalChain([transformOptions, 'optionalAccess', _407 => _407.ssr]) === true) {
4987
+ if (_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr]) === true) {
4918
4988
  if (farmReactServerFiles.has(file)) {
4919
- for (const child of _chunkZVSQN7NCcjs.farmRelativeImportFiles.call(void 0, code, file))
4989
+ for (const child of _chunkDRO3NXA3cjs.farmRelativeImportFiles.call(void 0, code, file))
4920
4990
  farmReactServerFiles.add(child);
4921
4991
  }
4922
- const serverModule = farmReactServerFiles.has(file) || !_chunkZVSQN7NCcjs.getFarmClientReachableModules.call(void 0,
4992
+ const serverModule = farmReactServerFiles.has(file) || !_chunkDRO3NXA3cjs.getFarmClientReachableModules.call(void 0,
4923
4993
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4924
4994
  projectRoot
4925
4995
  ).has(path6.resolve(file));
4926
- const reactServer = !serverModule ? null : _chunkZVSQN7NCcjs.rewriteFarmReactServerImports.call(void 0, {
4996
+ const reactServer = !serverModule ? null : _chunkDRO3NXA3cjs.rewriteFarmReactServerImports.call(void 0, {
4927
4997
  code,
4928
4998
  file,
4929
- reference: (specifier, exportName) => _chunkZVSQN7NCcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4999
+ reference: (specifier, exportName) => _chunkDRO3NXA3cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
4930
5000
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
4931
5001
  });
4932
5002
  if (reactServer !== null) {
4933
5003
  code = reactServer;
4934
5004
  rewrotePackageImports = true;
4935
5005
  }
4936
- const internal = farmReactServerFiles.has(file) ? _chunkZVSQN7NCcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5006
+ const internal = farmReactServerFiles.has(file) ? _chunkDRO3NXA3cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
4937
5007
  code,
4938
5008
  file,
4939
- reference: (clientFile) => _chunkZVSQN7NCcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5009
+ reference: (clientFile) => _chunkDRO3NXA3cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
4940
5010
  }) : null;
4941
5011
  if (internal !== null) {
4942
5012
  code = internal;
4943
5013
  rewrotePackageImports = true;
4944
5014
  }
4945
5015
  }
4946
- const rewritePackageImports = (source2) => _chunkZVSQN7NCcjs.rewriteFarmPackageClientImports.call(void 0, {
5016
+ const rewritePackageImports = (source2) => _chunkDRO3NXA3cjs.rewriteFarmPackageClientImports.call(void 0, {
4947
5017
  code: source2,
4948
5018
  file,
4949
5019
  root: projectRoot,
4950
- isClientPackage: (specifier) => _chunkZVSQN7NCcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5020
+ isClientPackage: (specifier) => _chunkDRO3NXA3cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
4951
5021
  });
4952
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _408 => _408.getRouteManager, 'call', _409 => _409()]);
5022
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _419 => _419.getRouteManager, 'call', _420 => _420()]);
4953
5023
  const source = code;
4954
5024
  const referenced = routeManager ? routeManager.inspectPackages(() => rewritePackageImports(source)) : rewritePackageImports(source);
4955
5025
  if (referenced !== null) {
4956
5026
  code = referenced;
4957
5027
  rewrotePackageImports = true;
4958
5028
  }
4959
- if (_optionalChain([transformOptions, 'optionalAccess', _410 => _410.ssr]) === true) {
5029
+ if (_optionalChain([transformOptions, 'optionalAccess', _421 => _421.ssr]) === true) {
4960
5030
  const cached = rewriteFarmReactCacheImport(
4961
5031
  code,
4962
5032
  file,
4963
- _optionalChain([runtimeModule, 'optionalCall', _411 => _411(FARM_REACT_CACHE_MODULE)])
5033
+ _optionalChain([runtimeModule, 'optionalCall', _422 => _422(FARM_REACT_CACHE_MODULE)])
4964
5034
  );
4965
5035
  if (cached !== null) {
4966
5036
  code = cached;
@@ -4968,46 +5038,48 @@ export { manifest };
4968
5038
  }
4969
5039
  }
4970
5040
  };
4971
- if (buildSnapshot) _chunkZVSQN7NCcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5041
+ if (buildSnapshot) _chunkDRO3NXA3cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
4972
5042
  else rewrite();
4973
5043
  }
4974
5044
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4975
5045
  const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
4976
- environment: _optionalChain([transformOptions, 'optionalAccess', _412 => _412.ssr]) === true ? "rsc" : "client"
5046
+ environment: _optionalChain([transformOptions, 'optionalAccess', _423 => _423.ssr]) === true ? "rsc" : "client"
4977
5047
  });
4978
5048
  if (serverFns) {
4979
5049
  if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
4980
5050
  code = serverFns.code;
4981
5051
  }
4982
5052
  }
4983
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _413 => _413.experimental, 'optionalAccess', _414 => _414.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
5053
+ const actionsMode = islxActionsMode();
5054
+ if (actionsMode !== null && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
4984
5055
  const file = id.split("?", 1)[0];
4985
5056
  const actionModule = transformFarmFormActionModule({
4986
5057
  code,
4987
5058
  id,
4988
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _415 => _415.config, 'access', _416 => _416.root]) || process.cwd(),
4989
- ssr: _optionalChain([transformOptions, 'optionalAccess', _417 => _417.ssr]) === true,
5059
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _424 => _424.config, 'access', _425 => _425.root]) || process.cwd(),
5060
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _426 => _426.ssr]) === true,
4990
5061
  // Parsed by file type: page components are TSX.
4991
5062
  parse: (source) => _vite.parseSync.call(void 0, file, source).program,
4992
- runtimeModule
5063
+ runtimeModule,
5064
+ runtime: actionsMode
4993
5065
  });
4994
5066
  if (actionModule) return { code: actionModule, map: null };
4995
5067
  }
4996
- if (!_optionalChain([transformOptions, 'optionalAccess', _418 => _418.ssr])) {
4997
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _419 => _419.getConfig, 'call', _420 => _420(), 'optionalAccess', _421 => _421.docs]));
4998
- if (_chunkX4TSMQWFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
4999
- const redacted = _chunkX4TSMQWFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5068
+ if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr])) {
5069
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429(), 'optionalAccess', _430 => _430.docs]));
5070
+ if (_chunkARORZ3MHcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5071
+ const redacted = _chunkARORZ3MHcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5000
5072
  if (redacted !== null) return { code: redacted, map: null };
5001
5073
  }
5002
5074
  }
5003
- if (!_optionalChain([transformOptions, 'optionalAccess', _422 => _422.ssr])) {
5004
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _423 => _423.getConfig, 'call', _424 => _424()]), () => ( options));
5005
- if ((_optionalChain([currentConfig, 'access', _425 => _425.experimental, 'optionalAccess', _426 => _426.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5075
+ if (!_optionalChain([transformOptions, 'optionalAccess', _431 => _431.ssr])) {
5076
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _432 => _432.getConfig, 'call', _433 => _433()]), () => ( options));
5077
+ if ((_optionalChain([currentConfig, 'access', _434 => _434.experimental, 'optionalAccess', _435 => _435.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5006
5078
  const violation = findClientServerFnViolation(code, id);
5007
5079
  if (violation) {
5008
- const locate = _chunkZVSQN7NCcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5080
+ const locate = _chunkDRO3NXA3cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5009
5081
  this.error(
5010
- _chunkZVSQN7NCcjs.formatFarmDiagnostic.call(void 0,
5082
+ _chunkDRO3NXA3cjs.formatFarmDiagnostic.call(void 0,
5011
5083
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5012
5084
  currentConfig.root
5013
5085
  )
@@ -5015,8 +5087,8 @@ export { manifest };
5015
5087
  }
5016
5088
  }
5017
5089
  }
5018
- if (!_optionalChain([transformOptions, 'optionalAccess', _427 => _427.ssr]) && shouldInspectClientBoundary(id, code)) {
5019
- await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _428 => _428.getConfig, 'call', _429 => _429()]), () => ( options)));
5090
+ if (!_optionalChain([transformOptions, 'optionalAccess', _436 => _436.ssr]) && shouldInspectClientBoundary(id, code)) {
5091
+ await warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _437 => _437.getConfig, 'call', _438 => _438()]), () => ( options)));
5020
5092
  }
5021
5093
  if (typeof imageImports.transform === "function") {
5022
5094
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -5031,13 +5103,13 @@ export { manifest };
5031
5103
  id,
5032
5104
  transformOptions
5033
5105
  );
5034
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _430 => _430.code, 'optionalAccess', _431 => _431.toString, 'call', _432 => _432()]);
5106
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _439 => _439.code, 'optionalAccess', _440 => _440.toString, 'call', _441 => _441()]);
5035
5107
  if (fontCode) {
5036
5108
  transformedCode = fontCode;
5037
5109
  transformed = true;
5038
5110
  }
5039
5111
  }
5040
- if (_optionalChain([transformOptions, 'optionalAccess', _433 => _433.ssr]) && server) {
5112
+ if (_optionalChain([transformOptions, 'optionalAccess', _442 => _442.ssr]) && server) {
5041
5113
  const rewrittenImports = rewriteEarlySsrRelativeImports({
5042
5114
  code: transformedCode,
5043
5115
  id,
@@ -5049,26 +5121,26 @@ export { manifest };
5049
5121
  transformed = true;
5050
5122
  }
5051
5123
  }
5052
- if (_chunkZVSQN7NCcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5124
+ if (_chunkDRO3NXA3cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5053
5125
  const clientBoundarySource = transformedCode;
5054
5126
  const moduleInfo = this.getModuleInfo(id);
5055
5127
  if (moduleInfo) {
5056
5128
  moduleInfo.isClientComponent = true;
5057
5129
  }
5058
- transformedCode = _chunkZVSQN7NCcjs.stripUseClientDirective.call(void 0, transformedCode);
5130
+ transformedCode = _chunkDRO3NXA3cjs.stripUseClientDirective.call(void 0, transformedCode);
5059
5131
  transformed = true;
5060
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _434 => _434.getConfig, 'call', _435 => _435()]), () => ( options));
5132
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _443 => _443.getConfig, 'call', _444 => _444()]), () => ( options));
5061
5133
  let isolatedModuleReference = null;
5062
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _436 => _436.config, 'access', _437 => _437.root]) || process.cwd();
5134
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _445 => _445.config, 'access', _446 => _446.root]) || process.cwd();
5063
5135
  const cleanId = id.split("?", 1)[0];
5064
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _438 => _438.getRouteManager, 'call', _439 => _439(), 'access', _440 => _440.getIsolatedClientBoundaryModules, 'call', _441 => _441(root)])));
5065
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _442 => _442.has, 'call', _443 => _443(path6.resolve(cleanId))]) === true;
5066
- if (_chunk67MZTLTFcjs.isReactRenderer.call(void 0, _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkZVSQN7NCcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5067
- cleanId.replace(/\\/g, "/").includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5136
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _447 => _447.getRouteManager, 'call', _448 => _448(), 'access', _449 => _449.getIsolatedClientBoundaryModules, 'call', _450 => _450(root)])));
5137
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _451 => _451.has, 'call', _452 => _452(path6.resolve(cleanId))]) === true;
5138
+ if (_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkDRO3NXA3cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5139
+ cleanId.replace(/\\/g, "/").includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5068
5140
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5069
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _444 => _444.experimental, 'optionalAccess', _445 => _445.serverComponents])) === "islands";
5070
- const explicitStrategy = _chunkZVSQN7NCcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5071
- const inference = islandsMode && explicitStrategy === null ? _chunkX4TSMQWFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5141
+ const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _453 => _453.experimental, 'optionalAccess', _454 => _454.serverComponents])) === "islands";
5142
+ const explicitStrategy = _chunkDRO3NXA3cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5143
+ const inference = islandsMode && explicitStrategy === null ? _chunkARORZ3MHcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5072
5144
  if (inference) {
5073
5145
  for (const file of inference.files) {
5074
5146
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5081,8 +5153,8 @@ export { manifest };
5081
5153
  islandStrategy: _nullishCoalesce(explicitStrategy, () => ( "load")),
5082
5154
  parse: (source) => this.parse(source),
5083
5155
  slots: islandsMode,
5084
- browser: _optionalChain([transformOptions, 'optionalAccess', _446 => _446.ssr]) !== true,
5085
- inferredInteraction: _optionalChain([inference, 'optionalAccess', _447 => _447.strategy]) === "interaction",
5156
+ browser: _optionalChain([transformOptions, 'optionalAccess', _455 => _455.ssr]) !== true,
5157
+ inferredInteraction: _optionalChain([inference, 'optionalAccess', _456 => _456.strategy]) === "interaction",
5086
5158
  runtimeModule
5087
5159
  });
5088
5160
  if (!transformedBoundary) {
@@ -5113,7 +5185,7 @@ export { manifest };
5113
5185
  );
5114
5186
  return;
5115
5187
  }` : "";
5116
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _448 => _448.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5188
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _457 => _457.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5117
5189
  if (import.meta.hot) {
5118
5190
  import.meta.hot.accept((newModule) => {
5119
5191
  ${isolatedHmrUpdate}
@@ -5169,14 +5241,14 @@ if (import.meta.hot) {
5169
5241
  }
5170
5242
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5171
5243
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5172
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _449 => _449.config, 'access', _450 => _450.root]) || process.cwd(), options.outDir || "dist");
5244
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _458 => _458.config, 'access', _459 => _459.root]) || process.cwd(), options.outDir || "dist");
5173
5245
  const clientDir = path6.join(outDir, "client");
5174
5246
  for (const page of ssgPages) {
5175
5247
  try {
5176
5248
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5177
5249
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5178
5250
  const mod = await routeManager.loadRouteModule(page.filePath);
5179
- if (!_optionalChain([mod, 'optionalAccess', _451 => _451.default])) return;
5251
+ if (!_optionalChain([mod, 'optionalAccess', _460 => _460.default])) return;
5180
5252
  const { layouts } = routeManager.matchRoute(page.urlPath);
5181
5253
  const layoutModules = await Promise.all(
5182
5254
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5208,7 +5280,7 @@ if (import.meta.hot) {
5208
5280
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5209
5281
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5210
5282
  const fullHtml = `<!DOCTYPE html>
5211
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _452 => _452.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5283
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _461 => _461.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5212
5284
  <head>
5213
5285
  <meta charset="utf-8">
5214
5286
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5253,12 +5325,12 @@ if (import.meta.hot) {
5253
5325
  watchChange(id, change) {
5254
5326
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5255
5327
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5256
- _optionalChain([farmApp, 'optionalAccess', _453 => _453.getRouteManager, 'call', _454 => _454(), 'access', _455 => _455.noteSourceChange, 'call', _456 => _456(id, change.event)]);
5328
+ _optionalChain([farmApp, 'optionalAccess', _462 => _462.getRouteManager, 'call', _463 => _463(), 'access', _464 => _464.noteSourceChange, 'call', _465 => _465(id, change.event)]);
5257
5329
  }
5258
- _chunkZVSQN7NCcjs.invalidateFarmClientReachableModules.call(void 0, );
5259
- _chunkZVSQN7NCcjs.invalidateFarmClientOnlyScan.call(void 0, );
5260
- _chunkX4TSMQWFcjs.invalidateFarmRouteRootInferences.call(void 0, );
5261
- _chunkZVSQN7NCcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5330
+ _chunkDRO3NXA3cjs.invalidateFarmClientReachableModules.call(void 0, );
5331
+ _chunkDRO3NXA3cjs.invalidateFarmClientOnlyScan.call(void 0, );
5332
+ _chunkARORZ3MHcjs.invalidateFarmRouteRootInferences.call(void 0, );
5333
+ _chunkDRO3NXA3cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5262
5334
  },
5263
5335
  async handleHotUpdate(ctx) {
5264
5336
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5283,7 +5355,7 @@ if (import.meta.hot) {
5283
5355
  server2.moduleGraph.invalidateModule(mod);
5284
5356
  }
5285
5357
  }
5286
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _457 => _457.getConfig, 'call', _458 => _458()]);
5358
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getConfig, 'call', _467 => _467()]);
5287
5359
  const normalizedFile = file.replace(/\\/g, "/");
5288
5360
  const reloadAfterEdit = () => {
5289
5361
  for (const files of pendingRouteReloads) {
@@ -5291,28 +5363,28 @@ if (import.meta.hot) {
5291
5363
  }
5292
5364
  server2.ws.send({ type: "full-reload", path: "*" });
5293
5365
  };
5294
- if (normalizedFile.includes(_chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5366
+ if (normalizedFile.includes(_chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5295
5367
  path6.posix.join(
5296
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _459 => _459.root]) || options.root || server2.config.root),
5297
- _chunkZVSQN7NCcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5368
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.root]) || options.root || server2.config.root),
5369
+ _chunkDRO3NXA3cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5298
5370
  )
5299
5371
  ))
5300
5372
  return modules;
5301
- if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5373
+ if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
5302
5374
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5303
5375
  )) {
5304
5376
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5305
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _460 => _460(`updated ${file}`)]);
5377
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _469 => _469(`updated ${file}`)]);
5306
5378
  reloadAfterEdit();
5307
5379
  return [];
5308
5380
  }
5309
- const currentSrcRoot = currentFarmConfig ? _chunkQMR2TUVZcjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5381
+ const currentSrcRoot = currentFarmConfig ? _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, currentFarmConfig).map((source) => path6.join(source.root, source.srcDir).replace(/\\/g, "/")).find((sourceRoot) => normalizedFile.startsWith(`${sourceRoot}/`)) || null : null;
5310
5382
  if (currentSrcRoot && normalizedFile.startsWith(`${currentSrcRoot}/`) && _chunkYUCU6XB4cjs.isProgrammaticRoutesFileName.call(void 0, normalizedFile)) {
5311
5383
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5312
5384
  for (const mod of modules) {
5313
5385
  server2.moduleGraph.invalidateModule(mod);
5314
5386
  }
5315
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _461 => _461(`updated ${file}`)]);
5387
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5316
5388
  reloadAfterEdit();
5317
5389
  return [];
5318
5390
  }
@@ -5322,22 +5394,22 @@ if (import.meta.hot) {
5322
5394
  for (const mod of modules) {
5323
5395
  server2.moduleGraph.invalidateModule(mod);
5324
5396
  }
5325
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _462 => _462(`updated ${file}`)]);
5397
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5326
5398
  reloadAfterEdit();
5327
5399
  return [];
5328
5400
  }
5329
5401
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5330
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _463 => _463(`updated ${file}`)]);
5402
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5331
5403
  }
5332
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _464 => _464.experimental, 'optionalAccess', _465 => _465.isolatedClientHydration]);
5333
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _466 => _466.getRouteManager, 'call', _467 => _467()]);
5404
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _473 => _473.experimental, 'optionalAccess', _474 => _474.isolatedClientHydration]);
5405
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _475 => _475.getRouteManager, 'call', _476 => _476()]);
5334
5406
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5335
- const tracksAsyncOwnerIslands = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _468 => _468.renderer])) && planRouteManager !== void 0;
5407
+ const tracksAsyncOwnerIslands = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _477 => _477.renderer])) && planRouteManager !== void 0;
5336
5408
  let clientPlanCurrent = false;
5337
5409
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5338
5410
  const routeManager = planRouteManager;
5339
- await _optionalChain([ctx, 'access', _469 => _469.read, 'optionalCall', _470 => _470()]);
5340
- if (_optionalChain([routeManager, 'optionalAccess', _471 => _471.isEditPlanNeutral, 'call', _472 => _472(file)])) {
5411
+ await _optionalChain([ctx, 'access', _478 => _478.read, 'optionalCall', _479 => _479()]);
5412
+ if (_optionalChain([routeManager, 'optionalAccess', _480 => _480.isEditPlanNeutral, 'call', _481 => _481(file)])) {
5341
5413
  clientPlanCurrent = true;
5342
5414
  } else if (routeManager) {
5343
5415
  routeManager.noteSourceChange(file, "update");
@@ -5398,7 +5470,7 @@ if (import.meta.hot) {
5398
5470
  }
5399
5471
  return [];
5400
5472
  }
5401
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _473 => _473.getRouteManager, 'call', _474 => _474(), 'access', _475 => _475.invalidateClientManifest, 'call', _476 => _476()]);
5473
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _482 => _482.getRouteManager, 'call', _483 => _483(), 'access', _484 => _484.invalidateClientManifest, 'call', _485 => _485()]);
5402
5474
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5403
5475
  if (manifestModule) {
5404
5476
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5413,7 +5485,7 @@ if (import.meta.hot) {
5413
5485
  return [];
5414
5486
  }
5415
5487
  }
5416
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _477 => _477.environments, 'access', _478 => _478.client, 'optionalAccess', _479 => _479.moduleGraph, 'access', _480 => _480.getModulesByFile, 'call', _481 => _481(normalizedFile), 'optionalAccess', _482 => _482.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5488
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _486 => _486.environments, 'access', _487 => _487.client, 'optionalAccess', _488 => _488.moduleGraph, 'access', _489 => _489.getModulesByFile, 'call', _490 => _490(normalizedFile), 'optionalAccess', _491 => _491.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5417
5489
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5418
5490
  reloadAfterEdit();
5419
5491
  return [];
@@ -5511,7 +5583,7 @@ function createPageDataMiddlewareResponse(res) {
5511
5583
  return (...args) => {
5512
5584
  if (captures(target.statusCode, target.getHeader("location"))) {
5513
5585
  const callback = args.find((arg) => typeof arg === "function");
5514
- _optionalChain([callback, 'optionalCall', _483 => _483()]);
5586
+ _optionalChain([callback, 'optionalCall', _492 => _492()]);
5515
5587
  return property === "write" ? true : response;
5516
5588
  }
5517
5589
  return target[property](...args);
@@ -5556,7 +5628,7 @@ function resolveDevelopmentRoot(farmRoot, viteRoot) {
5556
5628
  if (fs2.realpathSync(farmRoot) === fs2.realpathSync(viteRoot)) {
5557
5629
  return path6.resolve(viteRoot);
5558
5630
  }
5559
- } catch (e27) {
5631
+ } catch (e28) {
5560
5632
  }
5561
5633
  return farmRoot;
5562
5634
  }
@@ -5575,12 +5647,12 @@ function isFarmClientVirtualId(id) {
5575
5647
  }
5576
5648
  function isClientEnvironment(context, loadOptions) {
5577
5649
  const environment = context.environment;
5578
- if (_optionalChain([environment, 'optionalAccess', _484 => _484.config, 'optionalAccess', _485 => _485.consumer])) return environment.config.consumer === "client";
5579
- if (_optionalChain([environment, 'optionalAccess', _486 => _486.name])) return environment.name === "client";
5580
- return _optionalChain([loadOptions, 'optionalAccess', _487 => _487.ssr]) !== true;
5650
+ if (_optionalChain([environment, 'optionalAccess', _493 => _493.config, 'optionalAccess', _494 => _494.consumer])) return environment.config.consumer === "client";
5651
+ if (_optionalChain([environment, 'optionalAccess', _495 => _495.name])) return environment.name === "client";
5652
+ return _optionalChain([loadOptions, 'optionalAccess', _496 => _496.ssr]) !== true;
5581
5653
  }
5582
5654
  function invalidateProgrammaticClientRouteModules(server) {
5583
- const graph = _optionalChain([server, 'access', _488 => _488.environments, 'optionalAccess', _489 => _489.client, 'optionalAccess', _490 => _490.moduleGraph]);
5655
+ const graph = _optionalChain([server, 'access', _497 => _497.environments, 'optionalAccess', _498 => _498.client, 'optionalAccess', _499 => _499.moduleGraph]);
5584
5656
  if (!graph) return;
5585
5657
  for (const [id, module] of graph.idToModuleMap) {
5586
5658
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5590,26 +5662,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5590
5662
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5591
5663
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5592
5664
  watchFile(routesFile);
5593
- return _chunkZVSQN7NCcjs.generateProgrammaticClientRouteModule.call(void 0, {
5665
+ return _chunkDRO3NXA3cjs.generateProgrammaticClientRouteModule.call(void 0, {
5594
5666
  kind: parsed.kind,
5595
5667
  routePath: parsed.routePath,
5596
5668
  routesFile,
5597
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _491 => _491.routes, 'access', _492 => _492.get, 'call', _493 => _493(
5598
- _chunkZVSQN7NCcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5669
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _500 => _500.routes, 'access', _501 => _501.get, 'call', _502 => _502(
5670
+ _chunkDRO3NXA3cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5599
5671
  )]),
5600
- rendererServer: renderer.server,
5672
+ // React's client module exports no createElement; the main client entry imports React too.
5673
+ rendererClient: _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5601
5674
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5602
5675
  });
5603
5676
  }
5604
5677
  function resolveRealModuleFile(filePath, root) {
5605
- const resolved = _nullishCoalesce(_chunkZVSQN7NCcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5678
+ const resolved = _nullishCoalesce(_chunkDRO3NXA3cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5606
5679
  try {
5607
5680
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5608
- } catch (e28) {
5681
+ } catch (e29) {
5609
5682
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5610
5683
  }
5611
5684
  }
5612
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk67MZTLTFcjs.REACT_RENDERER) {
5685
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkBCTHOQPPcjs.REACT_RENDERER) {
5613
5686
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5614
5687
  if (!parsed) {
5615
5688
  return "";
@@ -5916,12 +5989,12 @@ async function parseRouteModuleProps(routeModule, input) {
5916
5989
  }
5917
5990
  const schemas = routeModule.__farmRouteSchemas;
5918
5991
  const params = parseRouteModuleSchema(
5919
- _optionalChain([schemas, 'optionalAccess', _494 => _494.params]),
5992
+ _optionalChain([schemas, 'optionalAccess', _503 => _503.params]),
5920
5993
  input.props.params,
5921
5994
  "params",
5922
5995
  input.routePath
5923
5996
  );
5924
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _495 => _495.search]), input.search, "search", input.routePath);
5997
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _504 => _504.search]), input.search, "search", input.routePath);
5925
5998
  return {
5926
5999
  ...input.props,
5927
6000
  params,
@@ -5940,20 +6013,20 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
5940
6013
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
5941
6014
  }
5942
6015
  }
5943
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunk67MZTLTFcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
5944
- const providerClientCode = _chunkX4TSMQWFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6016
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkBCTHOQPPcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6017
+ const providerClientCode = _chunkARORZ3MHcjs.generateFarmIntegrationProviderClientCode.call(void 0,
5945
6018
  integrationProviders,
5946
6019
  root,
5947
6020
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
5948
6021
  );
5949
- const clientPluginEntry = _chunkZ5BANEQDcjs.generateFarmClientPluginEntryCode.call(void 0,
6022
+ const clientPluginEntry = _chunkDMSXZNQRcjs.generateFarmClientPluginEntryCode.call(void 0,
5950
6023
  plugins,
5951
6024
  root,
5952
6025
  srcDir,
5953
6026
  publicRuntimeConfig
5954
6027
  );
5955
- const appSetupPath = _chunk67MZTLTFcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
5956
- const rendererClientImports = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6028
+ const appSetupPath = _chunkBCTHOQPPcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6029
+ const rendererClientImports = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
5957
6030
  import { hydrateRoot, createRoot } from 'react-dom/client'
5958
6031
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
5959
6032
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6005,7 +6078,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6005
6078
  return null;
6006
6079
  }
6007
6080
  }
6008
- ${islandValues ? `${_chunkX4TSMQWFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6081
+ ${islandValues ? `${_chunkARORZ3MHcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6009
6082
  let farmLastRouteState = null;
6010
6083
 
6011
6084
  // A hot update to a layout tree's client module renders the route again.
@@ -6033,7 +6106,7 @@ import {
6033
6106
  createFarmDeploymentRequestHeaders,
6034
6107
  isFarmDeploymentMismatchResponse,
6035
6108
  } from '@farm.js/core/deployment'
6036
- ${islandValues ? "import { getFarmIslandValueHeaders } from '@farm.js/core/internal/client-runtime'" : ""}
6109
+ ${islandValues ? "import { getFarmIslandValueHeaders, keepFarmIslandValues } from '@farm.js/core/internal/client-runtime'" : ""}
6037
6110
  ${providerClientCode.imports}
6038
6111
  ${clientPluginEntry.imports}
6039
6112
 
@@ -6846,7 +6919,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6846
6919
  return loadedLayouts;
6847
6920
  }
6848
6921
 
6849
- ${_chunkX4TSMQWFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6922
+ ${_chunkARORZ3MHcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6850
6923
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6851
6924
  let wrapped = element;
6852
6925
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -6925,7 +6998,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
6925
6998
 
6926
6999
  function hydrateFarmRoute(container, route) {
6927
7000
  farmLastRouteState = route;
6928
- ${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7001
+ ${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
6929
7002
  }
6930
7003
 
6931
7004
  function renderFarmRoute(root, route) {
@@ -7069,7 +7142,7 @@ async function tryHydrateImportedPage(
7069
7142
  wrap: wrapFarmClientRouteGraph,
7070
7143
  };
7071
7144
  } else if (useHydrate && container?.id === '__farm_page__') {
7072
- wrappedElement = wrapFarmClientRouteGraph(${_chunk67MZTLTFcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7145
+ wrappedElement = wrapFarmClientRouteGraph(${_chunkBCTHOQPPcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7073
7146
  } else {
7074
7147
  wrappedElement = await buildWrappedHydrationElement(
7075
7148
  currentPageComponent,
@@ -7089,6 +7162,8 @@ async function tryHydrateImportedPage(
7089
7162
  window.__FARM_REACT_ROOT__ = reactRoot;
7090
7163
  return true;
7091
7164
  } catch (error) {
7165
+ // The page still works, but the server's DOM, focus, and typed input are gone, so say so.
7166
+ console.error('[Farm.js] Hydration error; rendering the page on the client instead:', error);
7092
7167
  appRoot = createRoot(container);
7093
7168
  if (routeState) renderFarmRoute(appRoot, routeState);
7094
7169
  else appRoot.render(wrappedElement);
@@ -7144,7 +7219,7 @@ function readActiveLayoutPatterns() {
7144
7219
  );
7145
7220
  }
7146
7221
 
7147
- ${_chunkX4TSMQWFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7222
+ ${_chunkARORZ3MHcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7148
7223
 
7149
7224
  function activateFragmentScripts(root) {
7150
7225
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7203,7 +7278,7 @@ function getLayoutShell(root, patterns, index, find) {
7203
7278
  return shell.innerHTML;
7204
7279
  }
7205
7280
 
7206
- ${islandValues ? _chunkX4TSMQWFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7281
+ ${islandValues ? _chunkARORZ3MHcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7207
7282
  container,
7208
7283
  fragment,
7209
7284
  currentPatterns,
@@ -7225,6 +7300,8 @@ ${islandValues ? _chunkX4TSMQWFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function repl
7225
7300
  ) {
7226
7301
  sharedCount++;
7227
7302
  }
7303
+ // After the comparison: a noscript turned to text serializes escaped in the template's document.
7304
+ adoptFarmParsedNodes(fragment);
7228
7305
 
7229
7306
  const fragmentTreeRoot = nextPatterns.length > 0
7230
7307
  ? find(fragment, nextPatterns[0])
@@ -7276,9 +7353,9 @@ ${islandValues ? `
7276
7353
  return nextTarget;
7277
7354
  }
7278
7355
 
7279
- ${islandValues ? `${_chunkX4TSMQWFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7356
+ ${islandValues ? `${_chunkARORZ3MHcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7280
7357
 
7281
- ${_chunkX4TSMQWFcjs.FARM_EARLY_NAVIGATION_SOURCE}
7358
+ ${_chunkARORZ3MHcjs.FARM_EARLY_NAVIGATION_SOURCE}
7282
7359
 
7283
7360
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7284
7361
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7355,7 +7432,8 @@ async function fetchFarmNavigationDocument(path, context) {
7355
7432
  Accept: 'text/html',
7356
7433
  // A refresh arrives whole, like a transition: the islands it keeps are all in it.
7357
7434
  ...(context.prefetch || context.refresh ? {} : { 'F-Stream': 'flush' }),
7358
- ...getFarmIslandValueHeaders(),
7435
+ // The swap keeps the values only the page holds (keepFarmIslandValues).
7436
+ ...getFarmIslandValueHeaders(container),
7359
7437
  // A prefetch names its layouts even when it keeps none: that marks it as a navigation,
7360
7438
  // which the server answers without loading.tsx.
7361
7439
  ...(identities.length || context.prefetch ? { 'F-Layouts': JSON.stringify(identities) } : {}),
@@ -7447,9 +7525,12 @@ async function streamFarmDevNavigation(stream, root, generation) {
7447
7525
  observer.disconnect();
7448
7526
  return stream.cancel();
7449
7527
  }
7450
- const parsed = new DOMParser().parseFromString('<div id="root">' + flush, 'text/html');
7528
+ const parsed = new DOMParser()
7529
+ .parseFromString('<div id="root">' + flush, 'text/html')
7530
+ .getElementById('root');
7531
+ adoptFarmParsedNodes(parsed);
7451
7532
  const fragment = document.createDocumentFragment();
7452
- for (const node of Array.from(parsed.getElementById('root').childNodes)) fragment.appendChild(node);
7533
+ for (const node of Array.from(parsed.childNodes)) fragment.appendChild(node);
7453
7534
  activateFragmentScripts(fragment);
7454
7535
  root.appendChild(fragment);
7455
7536
  }
@@ -7595,12 +7676,14 @@ async function renderPage(pageData, info) {
7595
7676
  );
7596
7677
  } else {
7597
7678
  ${isolatedHydrationEnabled ? "let isolatedHydrationScope = container;" : ""}
7679
+ ${islandValues ? "const keepValues = keepFarmIslandValues(container);" : ""}
7598
7680
  // A route whose layouts hydrate renders them for its own root (inline client components,
7599
7681
  // islands mode's layout trees), so the HTML of shared layouts is replaced too.
7600
7682
  if (activeLayoutShouldHydrate || layoutShouldHydrate) {
7601
7683
  ${isolatedHydrationEnabled ? "disposeFarmIsolatedClientBoundaries(container);" : ""}
7602
7684
  if (appRoot) { try { appRoot.unmount(); } catch (error) {} appRoot = null; }
7603
7685
  if (reactRoot) { try { reactRoot.unmount(); } catch (error) {} reactRoot = null; }
7686
+ adoptFarmParsedNodes(fragment);
7604
7687
  container.replaceChildren(fragment);
7605
7688
  activateFragmentScripts(container);
7606
7689
  } else {
@@ -7609,6 +7692,7 @@ async function renderPage(pageData, info) {
7609
7692
  delete window.__FARM_REACT_ROOT__;
7610
7693
  ${isolatedHydrationEnabled ? islandValues ? "isolatedHydrationScope = (pageData.farmDocument ? replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), info?.refresh === true, findLayoutBoundaryByIdentity) : replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true)) || container;" : "isolatedHydrationScope = replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns, info?.refresh === true) || container;" : islandValues ? "if (pageData.farmDocument) replaceNavigationBoundary(container, fragment, readLayoutIdentities(container), readLayoutIdentities(fragment), false, findLayoutBoundaryByIdentity); else replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);" : "replaceNavigationBoundary(container, fragment, activeLayoutPatterns, layoutPatterns);"}
7611
7694
  }
7695
+ ${islandValues ? "keepValues();" : ""}
7612
7696
 
7613
7697
  const hydrationController = new AbortController();
7614
7698
  if (
@@ -7976,10 +8060,10 @@ function generateClientManifest(bundle) {
7976
8060
  return manifest;
7977
8061
  }
7978
8062
  async function defineConfig(config = {}) {
7979
- const tailwindVitePlugin = await _chunkZ5BANEQDcjs.loadTailwindVitePlugin.call(void 0, );
8063
+ const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
7980
8064
  const appRoot = path6.resolve(config.root || process.cwd());
7981
- if (_optionalChain([config, 'access', _496 => _496.extends, 'optionalAccess', _497 => _497.length])) {
7982
- const { config: layeredConfig } = await import("./layers-HMEGUEXM.cjs").then(
8065
+ if (_optionalChain([config, 'access', _505 => _505.extends, 'optionalAccess', _506 => _506.length])) {
8066
+ const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
7983
8067
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
7984
8068
  root: appRoot,
7985
8069
  mode: process.env.NODE_ENV === "production" ? "production" : "development"
@@ -7987,12 +8071,12 @@ async function defineConfig(config = {}) {
7987
8071
  );
7988
8072
  config = layeredConfig;
7989
8073
  }
7990
- config.renderer = _chunk67MZTLTFcjs.resolveFarmRenderer.call(void 0, config.renderer);
7991
- config.images = _chunkX4TSMQWFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
7992
- const rendererVitePlugins = await _chunk67MZTLTFcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8074
+ config.renderer = _chunkBCTHOQPPcjs.resolveFarmRenderer.call(void 0, config.renderer);
8075
+ config.images = _chunkARORZ3MHcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8076
+ const rendererVitePlugins = await _chunkBCTHOQPPcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
7993
8077
  ssr: true
7994
8078
  });
7995
- const reactRefreshPlugins = _chunk67MZTLTFcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8079
+ const reactRefreshPlugins = _chunkBCTHOQPPcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
7996
8080
  const nodeBuiltinStubs = {
7997
8081
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
7998
8082
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8080,13 +8164,13 @@ async function defineConfig(config = {}) {
8080
8164
  if (!serverStarted) {
8081
8165
  serverStarted = true;
8082
8166
  const elapsed = Date.now() - startTime;
8083
- const address = _optionalChain([server, 'access', _498 => _498.httpServer, 'optionalAccess', _499 => _499.address, 'call', _500 => _500()]);
8167
+ const address = _optionalChain([server, 'access', _507 => _507.httpServer, 'optionalAccess', _508 => _508.address, 'call', _509 => _509()]);
8084
8168
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8085
8169
  const hostConfig = server.config.server.host;
8086
8170
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8087
8171
  console.log("");
8088
8172
  console.log(
8089
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkCCMP4JD2cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8173
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkJK26IMT7cjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8090
8174
  );
8091
8175
  console.log("");
8092
8176
  console.log(
@@ -8120,27 +8204,29 @@ async function defineConfig(config = {}) {
8120
8204
  plugins: [
8121
8205
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8122
8206
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8123
- _chunkX4TSMQWFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8207
+ _chunkARORZ3MHcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8124
8208
  tailwindVitePlugin,
8125
8209
  ...rendererVitePlugins,
8126
8210
  ...reactRefreshPlugins,
8127
8211
  viteBrowserExternalPlugin,
8128
8212
  farmI18nClientBridgePlugin(),
8129
8213
  farmServerOnlyEntriesPlugin({ distDir: config.distDir || ".farm" }),
8214
+ farmNavigationPlugin(config.renderer),
8130
8215
  farmIslandContainersPlugin(config),
8131
8216
  farmPlugin(config),
8132
- _chunkZVSQN7NCcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8217
+ _chunkDRO3NXA3cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8133
8218
  farmBrandingPlugin
8134
8219
  ],
8135
8220
  customLogger: farmLogger,
8136
8221
  clearScreen: false,
8137
8222
  optimizeDeps: {
8138
- ..._chunkX4TSMQWFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8139
- _chunkX4TSMQWFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8223
+ ..._chunkARORZ3MHcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8224
+ _chunkARORZ3MHcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8140
8225
  appRoot,
8141
- _chunkQMR2TUVZcjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8226
+ _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8142
8227
  ),
8143
- config.renderer
8228
+ config.renderer,
8229
+ appRoot
8144
8230
  ),
8145
8231
  // Pre-bundle every framework client-runtime entry with the renderer. Without
8146
8232
  // this, Vite can discover a linked Farm entry after the page has loaded,
@@ -8178,8 +8264,8 @@ async function defineConfig(config = {}) {
8178
8264
  dedupe: [...config.renderer.dedupe || []],
8179
8265
  // Stub out problematic server-only modules during dev mode
8180
8266
  alias: {
8181
- ..._chunkQMR2TUVZcjs.getFarmLayerAliases.call(void 0, config.layers),
8182
- ..._chunkX4TSMQWFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8267
+ ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8268
+ ..._chunkARORZ3MHcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8183
8269
  // Nitro internals that should not be resolved in browser
8184
8270
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8185
8271
  "@poppinss/dumper": "data:text/javascript,export default {};",
@@ -8212,4 +8298,5 @@ async function defineConfig(config = {}) {
8212
8298
 
8213
8299
 
8214
8300
 
8215
- exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;
8301
+
8302
+ exports.isViteModuleRequest = isViteModuleRequest; exports.isViteDevClientRequest = isViteDevClientRequest; exports.farmImageImportsPlugin = farmImageImportsPlugin; exports.farmI18nClientBridgePlugin = farmI18nClientBridgePlugin; exports.farmNavigationPlugin = farmNavigationPlugin; exports.farmIslandContainersPlugin = farmIslandContainersPlugin; exports.farmServerOnlyEntriesPlugin = farmServerOnlyEntriesPlugin; exports.withFarmRequestTracing = withFarmRequestTracing; exports.rewriteEarlySsrRelativeImports = rewriteEarlySsrRelativeImports; exports.transformIsolatedClientBoundaryModule = transformIsolatedClientBoundaryModule; exports.isFarmAppRuntimeFile = isFarmAppRuntimeFile; exports.shouldEmitFarmClientRootHmr = shouldEmitFarmClientRootHmr; exports.farmPlugin = farmPlugin; exports.defineConfig = defineConfig;