@farm.js/core 0.1.49 → 0.1.51-beta.0

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 (363) hide show
  1. package/README.md +163 -3
  2. package/dist/{agent-mcp-Bb8hnnqd.d.ts → agent-mcp-BBMfNpsC.d.ts} +1 -1
  3. package/dist/{agent-mcp-ir3v4fHf.d.mts → agent-mcp-D44ip11f.d.mts} +1 -1
  4. package/dist/agent-runtime.cjs +3 -3
  5. package/dist/agent-runtime.d.mts +6 -6
  6. package/dist/agent-runtime.d.ts +6 -6
  7. package/dist/agent-runtime.mjs +2 -2
  8. package/dist/analyzer-HOUCQR3K.mjs +1066 -0
  9. package/dist/analyzer-VKUDHNDF.cjs +1066 -0
  10. package/dist/api/client.d.mts +0 -1
  11. package/dist/api/client.d.ts +0 -1
  12. package/dist/api/route-manager.cjs +8 -8
  13. package/dist/api/route-manager.d.mts +10 -10
  14. package/dist/api/route-manager.d.ts +10 -10
  15. package/dist/api/route-manager.mjs +7 -7
  16. package/dist/api/runtime.cjs +3 -3
  17. package/dist/api/runtime.d.mts +7 -7
  18. package/dist/api/runtime.d.ts +7 -7
  19. package/dist/api/runtime.mjs +2 -2
  20. package/dist/api.cjs +9 -9
  21. package/dist/api.d.mts +10 -10
  22. package/dist/api.d.ts +10 -10
  23. package/dist/api.mjs +8 -8
  24. package/dist/{app-y649szYm.d.ts → app-CourU3rQ.d.ts} +7 -7
  25. package/dist/{app-DLzz02du.d.mts → app-aeD4s_mg.d.mts} +7 -7
  26. package/dist/{app-manifest-Crn8Qd3U.d.mts → app-manifest-BC6mFn5A.d.mts} +1 -1
  27. package/dist/{app-manifest-DNeTKMRL.d.ts → app-manifest-LzjoNPeq.d.ts} +1 -1
  28. package/dist/app-markdown.d.mts +7 -7
  29. package/dist/app-markdown.d.ts +7 -7
  30. package/dist/base-path-BOUV5ozD.d.mts +10 -0
  31. package/dist/base-path-BOUV5ozD.d.ts +10 -0
  32. package/dist/cache.d.mts +4 -3
  33. package/dist/cache.d.ts +4 -3
  34. package/dist/{chunk-YQGZLCT4.cjs → chunk-2IAPKPEB.cjs} +6 -6
  35. package/dist/chunk-2KVDHNQS.mjs +224 -0
  36. package/dist/{chunk-QFQDRJKJ.mjs → chunk-3HA7PP72.mjs} +2 -2
  37. package/dist/{chunk-6LH33DLL.cjs → chunk-3OWVWZ6R.cjs} +28 -2
  38. package/dist/{chunk-GXSMF7UR.mjs → chunk-4GJJ65RB.mjs} +10 -2
  39. package/dist/{chunk-GERUXONA.cjs → chunk-5A77OEIG.cjs} +4 -1
  40. package/dist/{chunk-4HBKBHVP.mjs → chunk-5ENW27SL.mjs} +1 -1
  41. package/dist/{chunk-MTB57GOK.mjs → chunk-724WT3NI.mjs} +4 -2
  42. package/dist/{chunk-XLYXG73A.mjs → chunk-75WWOZ5C.mjs} +22 -0
  43. package/dist/{chunk-VCKGOXFI.cjs → chunk-76GHW3WI.cjs} +7 -1
  44. package/dist/{chunk-ZIBIE7AH.mjs → chunk-7UPCJDB5.mjs} +7 -1
  45. package/dist/{chunk-4IICUBQX.cjs → chunk-A5BJKSZE.cjs} +2 -2
  46. package/dist/{chunk-UYQOIPXE.mjs → chunk-AER5I65K.mjs} +1 -1
  47. package/dist/{chunk-WB6XES4V.mjs → chunk-ALEUMLJN.mjs} +34 -5
  48. package/dist/{chunk-Z4LTSH7D.mjs → chunk-AMRK3P6W.mjs} +175 -71
  49. package/dist/{chunk-TTYXOAB7.mjs → chunk-ANHZ6SUL.mjs} +1 -1
  50. package/dist/{chunk-ZBS3GOQZ.cjs → chunk-AQLHD6HZ.cjs} +35 -61
  51. package/dist/{chunk-L6QDME5Z.cjs → chunk-B3GZAQSC.cjs} +3 -3
  52. package/dist/chunk-CKPTIEDX.cjs +12 -0
  53. package/dist/{chunk-JPAVNDZH.cjs → chunk-CY7H5KS4.cjs} +25 -25
  54. package/dist/{chunk-4S7M63WX.cjs → chunk-DGOLAZLV.cjs} +22 -1
  55. package/dist/{chunk-4HM5B5RR.cjs → chunk-DWW3AMJX.cjs} +343 -308
  56. package/dist/{chunk-EQMTJBB7.cjs → chunk-DZZHTMWM.cjs} +35 -6
  57. package/dist/chunk-E36C43IX.cjs +224 -0
  58. package/dist/{chunk-J2ZEVDEK.cjs → chunk-EHB77D5U.cjs} +3 -3
  59. package/dist/{chunk-WQGRD5BJ.cjs → chunk-EX6ZSN5P.cjs} +1 -16
  60. package/dist/{chunk-C5S457CK.cjs → chunk-F42U3R4F.cjs} +214 -193
  61. package/dist/{chunk-FGJQS4EC.cjs → chunk-FK25QSVC.cjs} +4 -3
  62. package/dist/{chunk-JOHXK4BB.mjs → chunk-FSQMN2MQ.mjs} +2 -1
  63. package/dist/{chunk-2H3FJYY6.mjs → chunk-FSXSQQTV.mjs} +3 -2
  64. package/dist/chunk-G2KTRMWA.mjs +40 -0
  65. package/dist/{chunk-C6U66WWF.mjs → chunk-GFT5AHAT.mjs} +13 -0
  66. package/dist/chunk-GNZIAJGB.mjs +358 -0
  67. package/dist/{chunk-TXK4D46O.mjs → chunk-H3ASZDT7.mjs} +21 -1
  68. package/dist/{chunk-AXRNEVCS.cjs → chunk-HASX6DC7.cjs} +8 -8
  69. package/dist/{chunk-NW2BKDVT.mjs → chunk-HHFMECFO.mjs} +1 -1
  70. package/dist/{chunk-HELQXYVI.cjs → chunk-I2DQGS56.cjs} +11 -9
  71. package/dist/{chunk-IVHPRF4W.mjs → chunk-I2ZA5SXS.mjs} +81 -46
  72. package/dist/{chunk-EVCQX243.cjs → chunk-IOUOGRDX.cjs} +13 -5
  73. package/dist/{chunk-CBJKDB6F.mjs → chunk-IRSS4HS4.mjs} +1 -1
  74. package/dist/{chunk-NPPT4RWF.cjs → chunk-J22JD5YJ.cjs} +7 -7
  75. package/dist/{chunk-VJXLUTBM.mjs → chunk-JF5CNHHF.mjs} +9 -9
  76. package/dist/{chunk-VR4SEDEM.mjs → chunk-JWI5PUO2.mjs} +6 -2
  77. package/dist/{chunk-6XFGJBYX.cjs → chunk-JYNNIGQO.cjs} +16 -7
  78. package/dist/{chunk-EXHEPWFJ.cjs → chunk-KHXAJ2KA.cjs} +16 -16
  79. package/dist/{chunk-ALD2WMLA.mjs → chunk-KY32FWK7.mjs} +4 -4
  80. package/dist/{chunk-BR5FSKZ5.cjs → chunk-LEIXUFJN.cjs} +6 -2
  81. package/dist/{chunk-5566GNEG.cjs → chunk-LIFUPCXW.cjs} +13 -0
  82. package/dist/{chunk-I2SWKWO7.mjs → chunk-LJDIFIJ2.mjs} +1 -1
  83. package/dist/chunk-LMFJCXDD.mjs +55 -0
  84. package/dist/{chunk-IXSMFKZ2.cjs → chunk-LNM57D3H.cjs} +4 -4
  85. package/dist/{chunk-ATHPRVP2.mjs → chunk-LZ4SB57H.mjs} +3 -3
  86. package/dist/{chunk-73XBJRZW.cjs → chunk-MMEEXMUQ.cjs} +2 -2
  87. package/dist/chunk-N4AQNEXR.cjs +17 -0
  88. package/dist/{chunk-JZMZKABS.cjs → chunk-NWUHS6GV.cjs} +3 -2
  89. package/dist/{chunk-KZT2VHRQ.cjs → chunk-O3MMJPC2.cjs} +19 -19
  90. package/dist/{chunk-JWP56HCP.mjs → chunk-OD6WM3I7.mjs} +2 -2
  91. package/dist/{chunk-R2SEZEBC.cjs → chunk-OYNNA4DD.cjs} +4 -4
  92. package/dist/{chunk-GBPDSUFE.mjs → chunk-OZK2DS44.mjs} +1 -1
  93. package/dist/{chunk-A7DK663W.cjs → chunk-PDJSL7PL.cjs} +50 -39
  94. package/dist/{chunk-XLLVWLWO.mjs → chunk-PIHKO25G.mjs} +1 -1
  95. package/dist/chunk-PIUTGRDI.cjs +358 -0
  96. package/dist/{chunk-XO6WL6NL.mjs → chunk-PPDHCRTC.mjs} +1 -1
  97. package/dist/{chunk-LZBM35DH.mjs → chunk-QI5AQMEE.mjs} +20 -9
  98. package/dist/{chunk-FR4HJDI6.cjs → chunk-QK3HBOTG.cjs} +27 -30
  99. package/dist/{chunk-Q3UU2KXC.mjs → chunk-QMDU6QHN.mjs} +4 -1
  100. package/dist/chunk-QXJADAQB.cjs +40 -0
  101. package/dist/{chunk-DGVVVYKD.mjs → chunk-R5P4KFPM.mjs} +2 -2
  102. package/dist/{chunk-3HBFI373.cjs → chunk-S5AQ7CAC.cjs} +14 -14
  103. package/dist/{chunk-Z3BXMMFF.mjs → chunk-S5ZA2T2W.mjs} +63 -42
  104. package/dist/{chunk-PXEXOQ5R.mjs → chunk-SHS6KXOZ.mjs} +1 -1
  105. package/dist/{chunk-ETF5C6HR.cjs → chunk-SJ23LJ3N.cjs} +3 -3
  106. package/dist/{chunk-LL7TDMOM.mjs → chunk-SMUW7UST.mjs} +33 -59
  107. package/dist/{chunk-VCFBQFOV.mjs → chunk-SN5VSO3Q.mjs} +9 -7
  108. package/dist/{chunk-AIHD6VME.cjs → chunk-SO3T6T4I.cjs} +482 -378
  109. package/dist/{chunk-JHXJBNLY.cjs → chunk-SUCDVKUB.cjs} +21 -1
  110. package/dist/{chunk-DM3TFCC2.cjs → chunk-SUV6YO4Q.cjs} +5 -5
  111. package/dist/{chunk-NG44F7AH.mjs → chunk-T4EW7AAD.mjs} +2 -2
  112. package/dist/{chunk-JUMPFVMK.mjs → chunk-TUOO6IK3.mjs} +9 -0
  113. package/dist/chunk-UB7RVEMX.mjs +73 -0
  114. package/dist/{chunk-CDTIXBKN.mjs → chunk-UN6N623E.mjs} +2 -2
  115. package/dist/{chunk-BEXYFR2R.cjs → chunk-USL2ANCB.cjs} +10 -10
  116. package/dist/{chunk-HAH4FBTA.mjs → chunk-VAHBCI6X.mjs} +1 -1
  117. package/dist/{chunk-QNQEK3OF.cjs → chunk-VIFPE5RG.cjs} +14 -14
  118. package/dist/{chunk-HTLCLOXQ.cjs → chunk-VO6NLTV4.cjs} +3 -3
  119. package/dist/{chunk-XN2MB4QZ.cjs → chunk-VQJYGZNX.cjs} +4 -4
  120. package/dist/{chunk-N25RPPO5.cjs → chunk-WAPQWAE6.cjs} +10 -10
  121. package/dist/{chunk-5PKDHKQP.cjs → chunk-WFVSAT7Y.cjs} +6 -4
  122. package/dist/{chunk-EA5PMJDU.mjs → chunk-WSY2JD7O.mjs} +7 -7
  123. package/dist/{chunk-HNAUK3SC.mjs → chunk-WVX3BUNJ.mjs} +40 -199
  124. package/dist/chunk-X3EFRVXY.mjs +12 -0
  125. package/dist/{chunk-UCQ52TJY.mjs → chunk-X3JNB2TB.mjs} +1 -1
  126. package/dist/{chunk-J5VCA45K.cjs → chunk-X5BCMLGP.cjs} +1 -1
  127. package/dist/{chunk-SSNN55Q6.cjs → chunk-XB24LZWI.cjs} +10 -10
  128. package/dist/{chunk-XXB37YET.cjs → chunk-XLRLSTJ6.cjs} +7 -7
  129. package/dist/{chunk-BNMHXVLL.mjs → chunk-XMHERKSE.mjs} +0 -15
  130. package/dist/chunk-XPMC4E2G.cjs +55 -0
  131. package/dist/{chunk-J27BZO67.mjs → chunk-XWC5NAHV.mjs} +23 -26
  132. package/dist/{chunk-DRFADSKY.mjs → chunk-XXXRRVY6.mjs} +4 -4
  133. package/dist/{chunk-C7425KDG.cjs → chunk-XYL4HSVC.cjs} +2 -2
  134. package/dist/{chunk-2SVJGOAX.mjs → chunk-Y3N5BFRJ.mjs} +3 -3
  135. package/dist/{chunk-ZSIGEHSE.cjs → chunk-Y7TLL65B.cjs} +21 -180
  136. package/dist/{chunk-PEHL3IZL.cjs → chunk-YB44NKC2.cjs} +2 -2
  137. package/dist/chunk-YKHRCY4T.cjs +73 -0
  138. package/dist/{chunk-RYDDUCNJ.mjs → chunk-YLNBWUVS.mjs} +1 -1
  139. package/dist/chunk-Z5A6CNV2.mjs +60 -0
  140. package/dist/chunk-Z64V4WZI.mjs +17 -0
  141. package/dist/{chunk-ACI52TCN.mjs → chunk-ZF3GX4O7.mjs} +1 -1
  142. package/dist/client/lifecycle.d.mts +1 -1
  143. package/dist/client/lifecycle.d.ts +1 -1
  144. package/dist/{client-plugins-DFDQUI9Q.d.ts → client-plugins-CFBEfVPO.d.ts} +34 -10
  145. package/dist/{client-plugins-BNBeyLMi.d.mts → client-plugins-cqy_dQd0.d.mts} +34 -10
  146. package/dist/client-plugins.d.mts +6 -6
  147. package/dist/client-plugins.d.ts +6 -6
  148. package/dist/client.cjs +13 -9
  149. package/dist/client.d.mts +11 -10
  150. package/dist/client.d.ts +11 -10
  151. package/dist/client.mjs +15 -11
  152. package/dist/client.react-server.mjs +1 -1
  153. package/dist/config-CnhyvvmT.d.mts +188 -0
  154. package/dist/config-CnhyvvmT.d.ts +188 -0
  155. package/dist/config.d.mts +6 -6
  156. package/dist/config.d.ts +6 -6
  157. package/dist/cron.cjs +4 -4
  158. package/dist/cron.mjs +3 -3
  159. package/dist/desktop.d.mts +7 -7
  160. package/dist/desktop.d.ts +7 -7
  161. package/dist/{dev-guard-YO6KPIOQ.mjs → dev-guard-4PFQNXQX.mjs} +2 -1
  162. package/dist/{dev-guard-PLHL6OTJ.cjs → dev-guard-YLO5DE3H.cjs} +4 -3
  163. package/dist/{devtools-BLKHPY3C.mjs → devtools-4MLL3RAL.mjs} +10 -10
  164. package/dist/{devtools-A37WWJZL.cjs → devtools-4ZLMD454.cjs} +12 -12
  165. package/dist/docs.cjs +14 -14
  166. package/dist/docs.d.mts +7 -7
  167. package/dist/docs.d.ts +7 -7
  168. package/dist/docs.mjs +13 -13
  169. package/dist/environment/vite.d.mts +1 -1
  170. package/dist/environment/vite.d.ts +1 -1
  171. package/dist/generate-route-types-DQP0cUzk.d.ts +33 -0
  172. package/dist/generate-route-types-TF5Wwtvz.d.mts +33 -0
  173. package/dist/i18n/client.d.mts +2 -2
  174. package/dist/i18n/client.d.ts +2 -2
  175. package/dist/i18n/index.d.mts +3 -3
  176. package/dist/i18n/index.d.ts +3 -3
  177. package/dist/i18n/server.d.mts +5 -5
  178. package/dist/i18n/server.d.ts +5 -5
  179. package/dist/image/server.cjs +3 -3
  180. package/dist/image/server.mjs +2 -2
  181. package/dist/image/sharp.cjs +10 -10
  182. package/dist/image/sharp.mjs +2 -2
  183. package/dist/{index-DBdiTkNc.d.ts → index-BYkNbeQV.d.mts} +2 -2
  184. package/dist/{index-CeJ9_s9p.d.mts → index-BxjN_UDZ.d.ts} +2 -2
  185. package/dist/{index-MocnSP3a.d.ts → index-D3l4tREW.d.ts} +2 -2
  186. package/dist/{index-Cl3akY5U.d.mts → index-DPUAPho_.d.mts} +2 -2
  187. package/dist/index.cjs +88 -79
  188. package/dist/index.d.mts +29 -45
  189. package/dist/index.d.ts +29 -45
  190. package/dist/index.mjs +92 -83
  191. package/dist/integrations.cjs +3 -3
  192. package/dist/integrations.d.mts +6 -6
  193. package/dist/integrations.d.ts +6 -6
  194. package/dist/integrations.mjs +2 -2
  195. package/dist/internal/app-markdown-runtime.d.mts +7 -7
  196. package/dist/internal/app-markdown-runtime.d.ts +7 -7
  197. package/dist/internal/build-runtime.cjs +47 -43
  198. package/dist/internal/build-runtime.d.mts +9 -9
  199. package/dist/internal/build-runtime.d.ts +9 -9
  200. package/dist/internal/build-runtime.mjs +46 -42
  201. package/dist/internal/cli-runtime.cjs +24 -23
  202. package/dist/internal/cli-runtime.mjs +24 -23
  203. package/dist/internal/client-error-overlay.cjs +4 -4
  204. package/dist/internal/client-error-overlay.mjs +1 -1
  205. package/dist/internal/client-runtime.cjs +22 -3
  206. package/dist/internal/client-runtime.d.mts +46 -4
  207. package/dist/internal/client-runtime.d.ts +46 -4
  208. package/dist/internal/client-runtime.mjs +22 -3
  209. package/dist/internal/compression-runtime.d.mts +6 -6
  210. package/dist/internal/compression-runtime.d.ts +6 -6
  211. package/dist/internal/config-runtime.cjs +20 -13
  212. package/dist/internal/config-runtime.d.mts +259 -18
  213. package/dist/internal/config-runtime.d.ts +259 -18
  214. package/dist/internal/config-runtime.mjs +18 -11
  215. package/dist/internal/form-actions.cjs +5 -4
  216. package/dist/internal/form-actions.mjs +4 -3
  217. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  218. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  219. package/dist/internal/islands-runtime.cjs +56 -0
  220. package/dist/internal/islands-runtime.mjs +57 -1
  221. package/dist/internal/metadata-image-runtime.cjs +3 -3
  222. package/dist/internal/metadata-image-runtime.mjs +2 -2
  223. package/dist/internal/product-telemetry-runtime.cjs +2 -2
  224. package/dist/internal/product-telemetry-runtime.mjs +1 -1
  225. package/dist/internal/production-runtime.cjs +18 -15
  226. package/dist/internal/production-runtime.d.mts +33 -20
  227. package/dist/internal/production-runtime.d.ts +33 -20
  228. package/dist/internal/production-runtime.mjs +20 -17
  229. package/dist/internal/server-fn-transform.cjs +13 -0
  230. package/dist/internal/server-fn-transform.d.mts +24 -0
  231. package/dist/internal/server-fn-transform.d.ts +24 -0
  232. package/dist/internal/server-fn-transform.mjs +13 -0
  233. package/dist/{layers-D9fbe-rz.d.ts → layers-CcS42OGR.d.mts} +1 -1
  234. package/dist/{layers-D9fbe-rz.d.mts → layers-CcS42OGR.d.ts} +1 -1
  235. package/dist/{lifecycle-DK06VuKP.d.ts → lifecycle-C2aLBOwu.d.mts} +1 -1
  236. package/dist/{lifecycle-DK06VuKP.d.mts → lifecycle-C2aLBOwu.d.ts} +1 -1
  237. package/dist/markdown.d.mts +6 -6
  238. package/dist/markdown.d.ts +6 -6
  239. package/dist/middleware.cjs +11 -11
  240. package/dist/middleware.d.mts +8 -8
  241. package/dist/middleware.d.ts +8 -8
  242. package/dist/middleware.mjs +10 -10
  243. package/dist/mobile.cjs +9 -0
  244. package/dist/mobile.d.mts +94 -0
  245. package/dist/mobile.d.ts +94 -0
  246. package/dist/mobile.mjs +9 -0
  247. package/dist/navigation-delegate-BU4xqdnw.d.ts +29 -0
  248. package/dist/navigation-delegate-DLhbfEN4.d.mts +29 -0
  249. package/dist/navigation.cjs +5 -5
  250. package/dist/navigation.d.mts +9 -9
  251. package/dist/navigation.d.ts +9 -9
  252. package/dist/navigation.mjs +4 -4
  253. package/dist/{nitro-BIXIKJZS.cjs → nitro-CK7M4RMY.cjs} +12 -12
  254. package/dist/{nitro-UT2J5A5D.mjs → nitro-R444AF3O.mjs} +8 -8
  255. package/dist/platform.cjs +2 -1
  256. package/dist/platform.d.mts +4 -3
  257. package/dist/platform.d.ts +4 -3
  258. package/dist/platform.mjs +2 -1
  259. package/dist/{plugin-4KYXV7BB.mjs → plugin-53SY5YBS.mjs} +1 -1
  260. package/dist/{plugin-WBANOZQM.cjs → plugin-HZIBL3DW.cjs} +2 -2
  261. package/dist/plugin.cjs +40 -36
  262. package/dist/plugin.d.mts +13 -8
  263. package/dist/plugin.d.ts +13 -8
  264. package/dist/plugin.mjs +39 -35
  265. package/dist/{production-runtime-B3qFFtKF.d.ts → production-runtime-C78A8YgK.d.ts} +3 -3
  266. package/dist/{production-runtime-DcD-GRAv.d.mts → production-runtime-DLA4J5WG.d.mts} +3 -3
  267. package/dist/production-vite-BQFAlG7n.d.mts +13 -0
  268. package/dist/production-vite-BQFAlG7n.d.ts +13 -0
  269. package/dist/{programmatic-routes-client-fD9f4XqU.d.ts → programmatic-routes-client-CBqkNhBy.d.ts} +2 -2
  270. package/dist/{programmatic-routes-client-DzbYGiZQ.d.mts → programmatic-routes-client-NpqGBn-i.d.mts} +2 -2
  271. package/dist/query/client.cjs +6 -6
  272. package/dist/query/client.mjs +2 -2
  273. package/dist/{render-plan-DqJ51ufr.d.mts → render-plan-C9sWvDTv.d.mts} +1 -1
  274. package/dist/{render-plan-B6cfssrr.d.ts → render-plan-CrqcBbnV.d.ts} +1 -1
  275. package/dist/renderer-client.cjs +17 -12
  276. package/dist/renderer-client.d.mts +9 -8
  277. package/dist/renderer-client.d.ts +9 -8
  278. package/dist/renderer-client.mjs +10 -5
  279. package/dist/{request-jhvUMXRx.d.ts → request-BizeuqD7.d.ts} +1 -1
  280. package/dist/{request-UuAxHn8h.d.mts → request-WwB1-Uim.d.mts} +1 -1
  281. package/dist/request.d.mts +7 -7
  282. package/dist/request.d.ts +7 -7
  283. package/dist/{resolver-DC57A4vz.d.ts → resolver-CJ-D9nP-.d.ts} +1 -1
  284. package/dist/{resolver-C2G-3Tm6.d.mts → resolver-TDyZKgKI.d.mts} +1 -1
  285. package/dist/{route-rendering-Sn50cYZf.d.ts → route-rendering-BGhJN64l.d.ts} +1 -1
  286. package/dist/{route-rendering-Cou00t1X.d.mts → route-rendering-S6NFjnx4.d.mts} +1 -1
  287. package/dist/{router-0X9DCTcm.d.mts → router-BIheIy9G.d.mts} +1 -1
  288. package/dist/{router-xwLvi48p.d.ts → router-BUD_j2EL.d.ts} +1 -1
  289. package/dist/routes-8PT9cl60.d.ts +121 -0
  290. package/dist/routes-kEUsXHx3.d.mts +121 -0
  291. package/dist/routes.cjs +3 -2
  292. package/dist/routes.d.mts +7 -7
  293. package/dist/routes.d.ts +7 -7
  294. package/dist/routes.mjs +2 -1
  295. package/dist/{rsc-pipeline-VKHMABDJ.cjs → rsc-pipeline-JRGUZBYM.cjs} +18 -16
  296. package/dist/{rsc-pipeline-F6ZPH5MU.mjs → rsc-pipeline-OLAVIKI3.mjs} +17 -15
  297. package/dist/{runtime-B9HmxiZc.d.ts → runtime-C4CmlOOh.d.ts} +2 -2
  298. package/dist/{runtime-tkSXZiqO.d.ts → runtime-CWP-21hP.d.ts} +1 -1
  299. package/dist/{runtime-CMrsyChI.d.mts → runtime-CgJwe6H_.d.mts} +1 -1
  300. package/dist/{runtime-CCxTmGuf.d.mts → runtime-CihDZ2Rn.d.mts} +2 -2
  301. package/dist/runtime-G23RSLEK.cjs +1005 -0
  302. package/dist/runtime-OGCHDACZ.mjs +1005 -0
  303. package/dist/{schema-dev-notice-O3I5HLXK.mjs → schema-dev-notice-F6QYSOAI.mjs} +4 -4
  304. package/dist/{schema-dev-notice-Z73J3NJ6.cjs → schema-dev-notice-UU7DMZEU.cjs} +7 -7
  305. package/dist/{search-client-BTXL5XWD.mjs → search-client-OXH6GBNO.mjs} +5 -3
  306. package/dist/search-client-ZZLKVO5R.cjs +15 -0
  307. package/dist/server-action-security.cjs +3 -3
  308. package/dist/server-action-security.mjs +2 -2
  309. package/dist/server-fn-client.d.mts +0 -1
  310. package/dist/server-fn-client.d.ts +0 -1
  311. package/dist/server-fn.cjs +4 -4
  312. package/dist/server-fn.d.mts +0 -1
  313. package/dist/server-fn.d.ts +0 -1
  314. package/dist/server-fn.mjs +3 -3
  315. package/dist/server-plugins.cjs +1 -1
  316. package/dist/server-plugins.d.mts +7 -7
  317. package/dist/server-plugins.d.ts +7 -7
  318. package/dist/server-plugins.mjs +1 -1
  319. package/dist/server-query-client.cjs +4 -3
  320. package/dist/server-query-client.d.mts +0 -1
  321. package/dist/server-query-client.d.ts +0 -1
  322. package/dist/server-query-client.mjs +3 -2
  323. package/dist/server-query.cjs +5 -5
  324. package/dist/server-query.d.mts +0 -1
  325. package/dist/server-query.d.ts +0 -1
  326. package/dist/server-query.mjs +4 -4
  327. package/dist/server.cjs +104 -79
  328. package/dist/server.d.mts +22 -17
  329. package/dist/server.d.ts +22 -17
  330. package/dist/server.mjs +73 -48
  331. package/dist/{spa-router-B48EjsS1.d.mts → spa-router-CVOL0Vrq.d.mts} +4 -4
  332. package/dist/{spa-router-B06APnGK.d.ts → spa-router-Kytv4jSB.d.ts} +4 -4
  333. package/dist/testing.cjs +16 -15
  334. package/dist/testing.d.mts +6 -6
  335. package/dist/testing.d.ts +6 -6
  336. package/dist/testing.mjs +12 -11
  337. package/dist/{types--Wh02r5_.d.mts → types-C41ePjvP.d.mts} +1 -1
  338. package/dist/{types--Wh02r5_.d.ts → types-C41ePjvP.d.ts} +1 -1
  339. package/dist/{utils-C5fyK2tE.d.ts → utils-DbyXlzaj.d.ts} +1 -1
  340. package/dist/{utils-hyAwmcN6.d.mts → utils-Dsa1HZ7X.d.mts} +1 -1
  341. package/dist/version.cjs +2 -2
  342. package/dist/version.mjs +1 -1
  343. package/dist/vite.cjs +40 -36
  344. package/dist/vite.d.mts +9 -9
  345. package/dist/vite.d.ts +9 -9
  346. package/dist/vite.mjs +39 -35
  347. package/dist/{workflows-Df1C_7OG.d.mts → workflows-CRMzQZ3k.d.mts} +2 -1
  348. package/dist/{workflows-Df1C_7OG.d.ts → workflows-CRMzQZ3k.d.ts} +2 -1
  349. package/dist/workflows.cjs +5 -5
  350. package/dist/workflows.d.mts +1 -1
  351. package/dist/workflows.d.ts +1 -1
  352. package/dist/workflows.mjs +4 -4
  353. package/package.json +16 -3
  354. package/dist/base-path-leyrqXbX.d.mts +0 -19
  355. package/dist/base-path-leyrqXbX.d.ts +0 -19
  356. package/dist/cache-invalidation-BD0z_lfu.d.mts +0 -4
  357. package/dist/cache-invalidation-BD0z_lfu.d.ts +0 -4
  358. package/dist/chunk-45EUIICW.mjs +0 -15
  359. package/dist/chunk-MJ6IC4K2.mjs +0 -34
  360. package/dist/chunk-V7KTQR4C.cjs +0 -15
  361. package/dist/search-client-QCYAL6AY.cjs +0 -13
  362. package/dist/{chunk-5OJVKXFV.cjs → chunk-N7JQXQAV.cjs} +2 -2
  363. package/dist/{chunk-72KABRWN.mjs → chunk-WSDKXV4E.mjs} +4 -4
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunk4S7M63WXcjs = require('./chunk-4S7M63WX.cjs');
5
4
 
5
+ var _chunkDGOLAZLVcjs = require('./chunk-DGOLAZLV.cjs');
6
6
 
7
- var _chunkZBS3GOQZcjs = require('./chunk-ZBS3GOQZ.cjs');
8
7
 
9
8
 
10
- var _chunk4IICUBQXcjs = require('./chunk-4IICUBQX.cjs');
11
9
 
10
+ var _chunkPIUTGRDIcjs = require('./chunk-PIUTGRDI.cjs');
12
11
 
13
12
 
13
+ var _chunkA5BJKSZEcjs = require('./chunk-A5BJKSZE.cjs');
14
14
 
15
15
 
16
16
 
@@ -34,19 +34,23 @@ var _chunk4IICUBQXcjs = require('./chunk-4IICUBQX.cjs');
34
34
 
35
35
 
36
36
 
37
- var _chunkC5S457CKcjs = require('./chunk-C5S457CK.cjs');
38
37
 
39
38
 
40
- var _chunkIXSMFKZ2cjs = require('./chunk-IXSMFKZ2.cjs');
39
+
40
+ var _chunkF42U3R4Fcjs = require('./chunk-F42U3R4F.cjs');
41
+
42
+
43
+ var _chunkLNM57D3Hcjs = require('./chunk-LNM57D3H.cjs');
41
44
 
42
45
 
43
46
  var _chunk3EEET2Q5cjs = require('./chunk-3EEET2Q5.cjs');
44
47
 
45
48
 
49
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
46
50
 
47
- var _chunkZSIGEHSEcjs = require('./chunk-ZSIGEHSE.cjs');
48
51
 
49
52
 
53
+ var _chunkY7TLL65Bcjs = require('./chunk-Y7TLL65B.cjs');
50
54
 
51
55
 
52
56
 
@@ -55,11 +59,12 @@ var _chunkZSIGEHSEcjs = require('./chunk-ZSIGEHSE.cjs');
55
59
 
56
60
 
57
61
 
58
- var _chunkVCKGOXFIcjs = require('./chunk-VCKGOXFI.cjs');
59
62
 
60
63
 
64
+ var _chunk76GHW3WIcjs = require('./chunk-76GHW3WI.cjs');
61
65
 
62
66
 
67
+ var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
63
68
 
64
69
 
65
70
 
@@ -70,13 +75,14 @@ var _chunkVCKGOXFIcjs = require('./chunk-VCKGOXFI.cjs');
70
75
 
71
76
 
72
77
 
73
- var _chunkNPPT4RWFcjs = require('./chunk-NPPT4RWF.cjs');
74
78
 
75
79
 
76
- var _chunkSBABQKPTcjs = require('./chunk-SBABQKPT.cjs');
77
80
 
78
81
 
79
- var _chunkSGBNF56Scjs = require('./chunk-SGBNF56S.cjs');
82
+ var _chunkJ22JD5YJcjs = require('./chunk-J22JD5YJ.cjs');
83
+
84
+
85
+ var _chunkSBABQKPTcjs = require('./chunk-SBABQKPT.cjs');
80
86
 
81
87
 
82
88
  var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
@@ -88,6 +94,11 @@ var _chunkJ37KTQIAcjs = require('./chunk-J37KTQIA.cjs');
88
94
 
89
95
 
90
96
 
97
+
98
+ var _chunkJATTVAHAcjs = require('./chunk-JATTVAHA.cjs');
99
+
100
+
101
+
91
102
  var _chunkSM2SYWARcjs = require('./chunk-SM2SYWAR.cjs');
92
103
 
93
104
 
@@ -135,11 +146,6 @@ var _chunk5Y2P454Ocjs = require('./chunk-5Y2P454O.cjs');
135
146
 
136
147
 
137
148
 
138
- var _chunkJATTVAHAcjs = require('./chunk-JATTVAHA.cjs');
139
-
140
-
141
-
142
-
143
149
 
144
150
 
145
151
 
@@ -155,10 +161,10 @@ var _chunkX333W5KVcjs = require('./chunk-X333W5KV.cjs');
155
161
 
156
162
 
157
163
 
158
- var _chunkN25RPPO5cjs = require('./chunk-N25RPPO5.cjs');
164
+ var _chunkWAPQWAE6cjs = require('./chunk-WAPQWAE6.cjs');
159
165
 
160
166
 
161
- var _chunkBEXYFR2Rcjs = require('./chunk-BEXYFR2R.cjs');
167
+ var _chunkUSL2ANCBcjs = require('./chunk-USL2ANCB.cjs');
162
168
 
163
169
 
164
170
 
@@ -174,7 +180,7 @@ var _chunkKBGZ5FD6cjs = require('./chunk-KBGZ5FD6.cjs');
174
180
  var _chunkP2355C6Ecjs = require('./chunk-P2355C6E.cjs');
175
181
 
176
182
 
177
- var _chunkEXHEPWFJcjs = require('./chunk-EXHEPWFJ.cjs');
183
+ var _chunkKHXAJ2KAcjs = require('./chunk-KHXAJ2KA.cjs');
178
184
 
179
185
 
180
186
  var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
@@ -184,7 +190,7 @@ var _chunkRVGLYMJMcjs = require('./chunk-RVGLYMJM.cjs');
184
190
  var _chunkKORZ6PREcjs = require('./chunk-KORZ6PRE.cjs');
185
191
 
186
192
 
187
- var _chunkR2SEZEBCcjs = require('./chunk-R2SEZEBC.cjs');
193
+ var _chunkOYNNA4DDcjs = require('./chunk-OYNNA4DD.cjs');
188
194
 
189
195
 
190
196
  var _chunk6ONBZGVHcjs = require('./chunk-6ONBZGVH.cjs');
@@ -200,7 +206,7 @@ var _chunkY3WG64CPcjs = require('./chunk-Y3WG64CP.cjs');
200
206
 
201
207
 
202
208
 
203
- var _chunk6XFGJBYXcjs = require('./chunk-6XFGJBYX.cjs');
209
+ var _chunkJYNNIGQOcjs = require('./chunk-JYNNIGQO.cjs');
204
210
 
205
211
 
206
212
 
@@ -209,10 +215,11 @@ var _chunkLNVGXUL3cjs = require('./chunk-LNVGXUL3.cjs');
209
215
 
210
216
 
211
217
 
212
- var _chunkXN2MB4QZcjs = require('./chunk-XN2MB4QZ.cjs');
218
+ var _chunkVQJYGZNXcjs = require('./chunk-VQJYGZNX.cjs');
219
+
213
220
 
214
221
 
215
- var _chunkJHXJBNLYcjs = require('./chunk-JHXJBNLY.cjs');
222
+ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
216
223
 
217
224
 
218
225
 
@@ -227,13 +234,13 @@ var _chunkZ5MZDFX4cjs = require('./chunk-Z5MZDFX4.cjs');
227
234
 
228
235
 
229
236
 
230
- var _chunk5566GNEGcjs = require('./chunk-5566GNEG.cjs');
237
+ var _chunkLIFUPCXWcjs = require('./chunk-LIFUPCXW.cjs');
231
238
 
232
239
 
233
240
  var _chunkB5BBTPJQcjs = require('./chunk-B5BBTPJQ.cjs');
234
241
 
235
242
 
236
- var _chunkJ5VCA45Kcjs = require('./chunk-J5VCA45K.cjs');
243
+ var _chunkX5BCMLGPcjs = require('./chunk-X5BCMLGP.cjs');
237
244
 
238
245
 
239
246
  var _chunkIWFV5ZEDcjs = require('./chunk-IWFV5ZED.cjs');
@@ -691,7 +698,7 @@ function resolveFarmPageDataFailure(error) {
691
698
  }
692
699
 
693
700
  // src/openapi/dev-status.ts
694
- function reportOpenAPIDevGenerationResult(spec, output = _chunkXN2MB4QZcjs.logger) {
701
+ function reportOpenAPIDevGenerationResult(spec, output = _chunkVQJYGZNXcjs.logger) {
695
702
  if (spec) {
696
703
  output.success("\u2705 OpenAPI documentation enabled");
697
704
  return;
@@ -744,7 +751,7 @@ function loadFarmDocsDevRuntime() {
744
751
  return import("./docs.cjs");
745
752
  }
746
753
  function loadFarmDocsSearchDevRuntime() {
747
- return import("./search-client-QCYAL6AY.cjs");
754
+ return import("./search-client-ZZLKVO5R.cjs");
748
755
  }
749
756
  function loadFarmOpenAPIDevRuntime() {
750
757
  return import("./manager-2LUKNX2N.cjs");
@@ -753,7 +760,7 @@ function loadFarmWorkflowsDevRuntime() {
753
760
  return import("./workflows.cjs");
754
761
  }
755
762
  function loadFarmDevtoolsSnapshotRuntime() {
756
- return import("./devtools-A37WWJZL.cjs");
763
+ return import("./devtools-4ZLMD454.cjs");
757
764
  }
758
765
  function loadFarmDevtoolsUIRuntime() {
759
766
  return import("./devtools-ui-SYRUXUA7.cjs");
@@ -781,7 +788,7 @@ var FARM_SERVER_ONLY_ENTRIES = /* @__PURE__ */ new Set(["@farm.js/core/og"]);
781
788
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
782
789
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
783
790
  function createFarmPlatformClientModule() {
784
- return `export function platform() { return ${JSON.stringify(_chunkZBS3GOQZcjs.resolveFarmPlatform.call(void 0, ))}; }
791
+ return `export function platform() { return ${JSON.stringify(_chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))}; }
785
792
  export function appDataDir() {
786
793
  throw new Error("[Farm] appDataDir() is server-only. Read and write app data from a server function or API route.");
787
794
  }
@@ -846,7 +853,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
846
853
  if (!snapshot) return "";
847
854
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
848
855
  if (snapshot.routing === "none") return runtime;
849
- return `${_chunkVCKGOXFIcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
856
+ return `${_chunk76GHW3WIcjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
850
857
  }
851
858
  function getPublicEnvDefine(config) {
852
859
  const publicEnv = _optionalChain([config, 'access', _48 => _48.env, 'optionalAccess', _49 => _49.public]);
@@ -1189,7 +1196,7 @@ function rewriteEarlySsrRelativeImports(options) {
1189
1196
  replacements.push({
1190
1197
  start: source.start,
1191
1198
  end: source.end,
1192
- code: JSON.stringify(`${_chunkXN2MB4QZcjs.toViteModuleId.call(void 0, resolvedPath, options.root)}${suffix}`)
1199
+ code: JSON.stringify(`${_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, resolvedPath, options.root)}${suffix}`)
1193
1200
  });
1194
1201
  });
1195
1202
  if (replacements.length === 0) return null;
@@ -1353,7 +1360,7 @@ function warnClientBoundaryOnce(context, id, code, config) {
1353
1360
  return;
1354
1361
  }
1355
1362
  warnedClientBoundaryIds.add(id);
1356
- _chunkXN2MB4QZcjs.logger.warn(formatClientBoundaryWarning(id, findings));
1363
+ _chunkVQJYGZNXcjs.logger.warn(formatClientBoundaryWarning(id, findings));
1357
1364
  }
1358
1365
  function shouldEmitFarmClientRootHmr(renderer) {
1359
1366
  return _chunkRD623KW4cjs.getFarmRendererCapabilities.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
@@ -1367,13 +1374,17 @@ function hasViteAlias(alias, find) {
1367
1374
  }
1368
1375
  function farmPlugin(options = {}, initialPluginManager) {
1369
1376
  const imageImports = farmImageImportsPlugin();
1370
- const fontImports = _chunkC5S457CKcjs.farmFontImportsPlugin.call(void 0, {
1377
+ const fontImports = _chunkF42U3R4Fcjs.farmFontImportsPlugin.call(void 0, {
1371
1378
  root: options.root,
1372
1379
  basePath: options.basePath,
1373
1380
  publicDir: options.publicDir
1374
1381
  });
1375
1382
  let farmApp;
1376
1383
  let serverFnTransformActive = false;
1384
+ const islandsServerFns = () => {
1385
+ const config = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _72 => _72.getConfig, 'call', _73 => _73()]), () => ( options));
1386
+ return _optionalChain([config, 'access', _74 => _74.experimental, 'optionalAccess', _75 => _75.serverActions]) === true && _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _76 => _76.experimental, 'optionalAccess', _77 => _77.serverComponents])) === "islands";
1387
+ };
1377
1388
  let reactRefreshActive = false;
1378
1389
  let server;
1379
1390
  let apiRouteManager;
@@ -1397,14 +1408,14 @@ function farmPlugin(options = {}, initialPluginManager) {
1397
1408
  ].join(" ");
1398
1409
  console.log(log);
1399
1410
  };
1400
- const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _72 => _72.getRouteManager, 'call', _73 => _73(), 'access', _74 => _74.getProgrammaticClientRoutes, 'call', _75 => _75()])));
1411
+ const getProgrammaticClientRoutes = () => _nullishCoalesce(options.programmaticClientRoutes, () => ( _optionalChain([farmApp, 'optionalAccess', _78 => _78.getRouteManager, 'call', _79 => _79(), 'access', _80 => _80.getProgrammaticClientRoutes, 'call', _81 => _81()])));
1401
1412
  return {
1402
1413
  name: "farm",
1403
1414
  api: { getProgrammaticClientRoutes },
1404
1415
  config(userConfig, configEnv) {
1405
1416
  isBuild = configEnv.command === "build";
1406
1417
  const layerAliases = _chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, options.layers);
1407
- const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _76 => _76.resolve, 'optionalAccess', _77 => _77.alias]), "@") ? {} : _chunkC5S457CKcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1418
+ const sourceAlias = hasViteAlias(_optionalChain([userConfig, 'access', _82 => _82.resolve, 'optionalAccess', _83 => _83.alias]), "@") ? {} : _chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir);
1408
1419
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
1409
1420
  return {
1410
1421
  // Honor Farm's publicDir so the dev server serves the same static
@@ -1420,7 +1431,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1420
1431
  server: {
1421
1432
  fs: {
1422
1433
  ...layerRoots.length ? { allow: [path5.resolve(options.root || process.cwd()), ...layerRoots] } : {},
1423
- deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _78 => _78.server, 'optionalAccess', _79 => _79.fs, 'optionalAccess', _80 => _80.deny]), options)
1434
+ deny: getFarmDevFsDeny(_optionalChain([userConfig, 'access', _84 => _84.server, 'optionalAccess', _85 => _85.fs, 'optionalAccess', _86 => _86.deny]), options)
1424
1435
  }
1425
1436
  }
1426
1437
  };
@@ -1432,23 +1443,17 @@ function farmPlugin(options = {}, initialPluginManager) {
1432
1443
  serverFnTransformActive = config.plugins.some(
1433
1444
  (plugin) => plugin.name === SERVER_FN_TRANSFORM_PLUGIN
1434
1445
  );
1435
- reactRefreshActive = _chunk4S7M63WXcjs.isFarmReactRefreshActive.call(void 0, config);
1436
- if (_optionalChain([options, 'access', _81 => _81.experimental, 'optionalAccess', _82 => _82.serverActions]) === true && !serverFnTransformActive) {
1437
- _chunkXN2MB4QZcjs.logger.warn(
1446
+ reactRefreshActive = _chunkDGOLAZLVcjs.isFarmReactRefreshActive.call(void 0, config);
1447
+ if (_optionalChain([options, 'access', _87 => _87.experimental, 'optionalAccess', _88 => _88.serverActions]) === true && !serverFnTransformActive && !islandsServerFns()) {
1448
+ _chunkVQJYGZNXcjs.logger.warn(
1438
1449
  "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."
1439
1450
  );
1440
1451
  }
1441
1452
  },
1442
1453
  async configureServer(viteServer) {
1443
- if (_chunkZBS3GOQZcjs.resolveFarmPlatform.call(void 0, ) === "desktop") {
1444
- const { createFarmDesktopDevGuard } = await import("./dev-guard-PLHL6OTJ.cjs");
1445
- viteServer.middlewares.use(
1446
- createFarmDesktopDevGuard(viteServer, { basePath: options.basePath || "" })
1447
- );
1448
- }
1449
1454
  viteServer.middlewares.use(
1450
1455
  createFarmDevPreviewGuard(viteServer, {
1451
- getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _83 => _83.getConfig, 'call', _84 => _84()]), () => ( options)))
1456
+ getSourceRoots: () => _chunk5Y2P454Ocjs.getFarmSourceRoots.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _89 => _89.getConfig, 'call', _90 => _90()]), () => ( options)))
1452
1457
  })
1453
1458
  );
1454
1459
  if (typeof fontImports.configureServer === "function") {
@@ -1463,7 +1468,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1463
1468
  } catch (e12) {
1464
1469
  }
1465
1470
  };
1466
- farmApp = new (0, _chunkC5S457CKcjs.FarmApp)(
1471
+ farmApp = new (0, _chunkF42U3R4Fcjs.FarmApp)(
1467
1472
  {
1468
1473
  ...options,
1469
1474
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -1473,7 +1478,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1473
1478
  await farmApp.initialize();
1474
1479
  const farmConfig = farmApp.getConfig();
1475
1480
  let farmAppPackages;
1476
- if (_optionalChain([farmConfig, 'access', _85 => _85.agent, 'optionalAccess', _86 => _86.noindexPreviews])) {
1481
+ if (_optionalChain([farmConfig, 'access', _91 => _91.agent, 'optionalAccess', _92 => _92.noindexPreviews])) {
1477
1482
  server.middlewares.use((_req, res, next) => {
1478
1483
  if (_chunkSGBNF56Scjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
1479
1484
  res.setHeader("X-Robots-Tag", _chunkNYQSC4DXcjs.FARM_PREVIEW_ROBOTS_TAG);
@@ -1483,7 +1488,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1483
1488
  }
1484
1489
  const apiServerBasePath = _chunkB5BBTPJQcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
1485
1490
  const devBuiltInRoutePaths = new Set(
1486
- _chunkNPPT4RWFcjs.listFarmBuiltInRoutePaths.call(void 0, {
1491
+ _chunkJ22JD5YJcjs.listFarmBuiltInRoutePaths.call(void 0, {
1487
1492
  agent: {
1488
1493
  apiCatalog: true,
1489
1494
  mcp: true,
@@ -1494,20 +1499,20 @@ function farmPlugin(options = {}, initialPluginManager) {
1494
1499
  openapi: options.openapi
1495
1500
  })
1496
1501
  );
1497
- const serverConfig = _chunk5566GNEGcjs.resolveFarmServerConfig.call(void 0, farmConfig.server);
1502
+ const serverConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, farmConfig.server);
1498
1503
  globalThis.__FARM_IMAGE_CONFIG__ = _chunkHEPJIKKQcjs.getPublicFarmImageConfig.call(void 0, farmConfig.images);
1499
1504
  let imageHandler = null;
1500
1505
  if (farmConfig.images.provider !== "none") {
1501
1506
  const { createNodeImageFetcher, createNodeImageUrlValidator, createSharpImageTransformer } = await import("./image/sharp.cjs");
1502
- imageHandler = _chunk4IICUBQXcjs.createFarmImageHandler.call(void 0, farmConfig.images, {
1507
+ imageHandler = _chunkA5BJKSZEcjs.createFarmImageHandler.call(void 0, farmConfig.images, {
1503
1508
  transform: createSharpImageTransformer(),
1504
1509
  fetchRemote: createNodeImageFetcher(farmConfig.images),
1505
1510
  validateRemoteUrl: createNodeImageUrlValidator(farmConfig.images),
1506
1511
  // Vite owns this address. Unlike request.url, it cannot be replaced by
1507
1512
  // a caller-controlled Host header.
1508
- trustedLocalOrigin: () => _optionalChain([server, 'access', _87 => _87.resolvedUrls, 'optionalAccess', _88 => _88.local, 'access', _89 => _89[0]]),
1513
+ trustedLocalOrigin: () => _optionalChain([server, 'access', _93 => _93.resolvedUrls, 'optionalAccess', _94 => _94.local, 'access', _95 => _95[0]]),
1509
1514
  onError(error) {
1510
- _chunkXN2MB4QZcjs.logger.error(
1515
+ _chunkVQJYGZNXcjs.logger.error(
1511
1516
  `Image optimization failed: ${error instanceof Error ? error.message : String(error)}`
1512
1517
  );
1513
1518
  }
@@ -1525,15 +1530,15 @@ function farmPlugin(options = {}, initialPluginManager) {
1525
1530
  const workflowConfig = farmConfig.workflows;
1526
1531
  const farmDocsDevRuntime = farmConfig.docs.enabled ? await loadFarmDocsDevRuntime() : null;
1527
1532
  const getExtraRouteTypes = () => [
1528
- ..._optionalChain([options, 'access', _90 => _90.openapi, 'optionalAccess', _91 => _91.enabled]) && options.openapi.route ? [options.openapi.route] : [],
1529
- ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _92 => _92.getFarmDocsRouteTypeEntries, 'call', _93 => _93(farmConfig.docs)]), () => ( []))
1533
+ ..._optionalChain([options, 'access', _96 => _96.openapi, 'optionalAccess', _97 => _97.enabled]) && options.openapi.route ? [options.openapi.route] : [],
1534
+ ..._nullishCoalesce(_optionalChain([farmDocsDevRuntime, 'optionalAccess', _98 => _98.getFarmDocsRouteTypeEntries, 'call', _99 => _99(farmConfig.docs)]), () => ( []))
1530
1535
  ];
1531
1536
  const appDirSlugs = sourceRoots.map(
1532
1537
  (source) => path5.join(source.root, source.srcDir, "app").replace(/\\/g, "/")
1533
1538
  );
1534
1539
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
1535
1540
  try {
1536
- const result = await _chunkZSIGEHSEcjs.generateFarmTypeArtifacts.call(void 0, {
1541
+ const result = await _chunkY7TLL65Bcjs.generateFarmTypeArtifacts.call(void 0, {
1537
1542
  root: farmConfig.root,
1538
1543
  srcDir: farmConfig.srcDir,
1539
1544
  layers: farmConfig.layers,
@@ -1562,7 +1567,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1562
1567
  }
1563
1568
  } catch (e) {
1564
1569
  const message = e instanceof Error ? e.message : String(e);
1565
- _chunkXN2MB4QZcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
1570
+ _chunkVQJYGZNXcjs.logger.warn(`Route type generation failed (farm.d.ts may be stale): ${message}`);
1566
1571
  if (pm) {
1567
1572
  await emitPluginError("type-artifact-generation", e, { reason });
1568
1573
  }
@@ -1573,7 +1578,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1573
1578
  (source) => path5.join(source.root, source.srcDir).replace(/\\/g, "/")
1574
1579
  );
1575
1580
  const layerConfigFiles = new Set(
1576
- farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _94 => _94.configFile, 'optionalAccess', _95 => _95.replace, 'call', _96 => _96(/\\/g, "/")])).filter((file) => Boolean(file))
1581
+ farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _100 => _100.configFile, 'optionalAccess', _101 => _101.replace, 'call', _102 => _102(/\\/g, "/")])).filter((file) => Boolean(file))
1577
1582
  );
1578
1583
  const routeModuleExtensions = /* @__PURE__ */ new Set([
1579
1584
  ..._chunkRD623KW4cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
@@ -1615,7 +1620,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1615
1620
  let routeRefreshScheduled = null;
1616
1621
  let pendingRouteRefreshIncludesMiddleware = false;
1617
1622
  const scheduleTypeArtifactGen = (file, event, selection) => {
1618
- const normalizedFile = _chunkXN2MB4QZcjs.toPosixPath.call(void 0, file);
1623
+ const normalizedFile = _chunkVQJYGZNXcjs.toPosixPath.call(void 0, file);
1619
1624
  for (const [artifact, enabled] of Object.entries(selection)) {
1620
1625
  if (enabled) {
1621
1626
  pendingTypeArtifacts[artifact] = true;
@@ -1636,7 +1641,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1636
1641
  ["add", "change", "unlink"].forEach((ev) => {
1637
1642
  server.watcher.on(ev, (file) => {
1638
1643
  if (ev === "add") {
1639
- _chunk6XFGJBYXcjs.invalidateFailedFarmDevModules.call(void 0, server);
1644
+ _chunkJYNNIGQOcjs.invalidateFailedFarmDevModules.call(void 0, server);
1640
1645
  }
1641
1646
  const normalizedFile = file.replace(/\\/g, "/");
1642
1647
  const configChanged = isFarmConfigFile(file, farmConfig.root) || layerConfigFiles.has(normalizedFile);
@@ -1652,7 +1657,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1652
1657
  scheduleTypeArtifactGen(file, ev, typeArtifacts);
1653
1658
  }
1654
1659
  if (isI18nCatalogFile(file)) {
1655
- _optionalChain([farmApp, 'optionalAccess', _97 => _97.getI18nRuntime, 'call', _98 => _98(), 'access', _99 => _99.reload, 'call', _100 => _100(), 'access', _101 => _101.then, 'call', _102 => _102(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _103 => _103.catch, 'call', _104 => _104((error) => _chunkXN2MB4QZcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1660
+ _optionalChain([farmApp, 'optionalAccess', _103 => _103.getI18nRuntime, 'call', _104 => _104(), 'access', _105 => _105.reload, 'call', _106 => _106(), 'access', _107 => _107.then, 'call', _108 => _108(() => server.ws.send({ type: "full-reload", path: "*" })), 'access', _109 => _109.catch, 'call', _110 => _110((error) => _chunkVQJYGZNXcjs.logger.warn(`i18n catalog reload failed: ${error.message}`))]);
1656
1661
  }
1657
1662
  const isRouteRefreshEvent = (ev !== "change" || isStaticMetadataImageFile(file)) && (isAppRuntimeFile(file) || isProgrammaticRouteFile(file) || isProgrammaticRouteSourceFile(file) && (ev === "unlink" || fileContainsProgrammaticPageRoute(file)));
1658
1663
  if (isRouteRefreshEvent) {
@@ -1665,9 +1670,9 @@ function farmPlugin(options = {}, initialPluginManager) {
1665
1670
  const reloadsMiddleware = pendingRouteRefreshIncludesMiddleware;
1666
1671
  pendingRouteRefreshIncludesMiddleware = false;
1667
1672
  Promise.all([
1668
- _optionalChain([refreshRouteDiscovery, 'optionalCall', _105 => _105(`${ev} ${file}`)]),
1669
- reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _106 => _106.reload, 'call', _107 => _107()]) : void 0
1670
- ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkXN2MB4QZcjs.logger.warn(`Route refresh failed: ${error.message}`));
1673
+ _optionalChain([refreshRouteDiscovery, 'optionalCall', _111 => _111(`${ev} ${file}`)]),
1674
+ reloadsMiddleware ? _optionalChain([middlewareManager, 'optionalAccess', _112 => _112.reload, 'call', _113 => _113()]) : void 0
1675
+ ]).then(() => server.ws.send({ type: "full-reload", path: "*" })).catch((error) => _chunkVQJYGZNXcjs.logger.warn(`Route refresh failed: ${error.message}`));
1671
1676
  }, 50);
1672
1677
  }
1673
1678
  }
@@ -1701,7 +1706,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1701
1706
  });
1702
1707
  }
1703
1708
  const dispatchToDevServer = _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server);
1704
- apiRouteManager = new (0, _chunkEXHEPWFJcjs.APIRouteManager)(appDirs, server, {
1709
+ apiRouteManager = new (0, _chunkKHXAJ2KAcjs.APIRouteManager)(appDirs, server, {
1705
1710
  plugins: farmConfig.plugins,
1706
1711
  i18n: farmApp.getI18nRuntime(),
1707
1712
  bodySizeLimit: serverConfig.bodySizeLimit,
@@ -1725,17 +1730,17 @@ function farmPlugin(options = {}, initialPluginManager) {
1725
1730
  discoveredWorkflows = await discoverFarmWorkflows(
1726
1731
  { ...farmConfig, workflows: workflowConfig },
1727
1732
  {
1728
- loadModule: async (filePath) => _chunk6XFGJBYXcjs.loadFarmDevModule.call(void 0, server, filePath)
1733
+ loadModule: async (filePath) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, filePath)
1729
1734
  }
1730
1735
  );
1731
1736
  if (discoveredWorkflows.length > 0) {
1732
1737
  workflowHandler = createFarmWorkflowRequestHandler({
1733
1738
  workflows: discoveredWorkflows,
1734
1739
  config: workflowConfig,
1735
- loadModule: async (workflow) => _chunk6XFGJBYXcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
1740
+ loadModule: async (workflow) => _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, workflow.filePath),
1736
1741
  server: farmConfig.server
1737
1742
  });
1738
- _chunkXN2MB4QZcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
1743
+ _chunkVQJYGZNXcjs.logger.success(`\u2705 Discovered ${discoveredWorkflows.length} Farm workflow task(s)`);
1739
1744
  }
1740
1745
  }
1741
1746
  if (pm) {
@@ -1747,7 +1752,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1747
1752
  });
1748
1753
  }
1749
1754
  }
1750
- middlewareManager = new (0, _chunkBEXYFR2Rcjs.MiddlewareManager)(
1755
+ middlewareManager = new (0, _chunkUSL2ANCBcjs.MiddlewareManager)(
1751
1756
  appDirs,
1752
1757
  server,
1753
1758
  farmConfig.middleware,
@@ -1768,11 +1773,11 @@ function farmPlugin(options = {}, initialPluginManager) {
1768
1773
  });
1769
1774
  }
1770
1775
  }
1771
- if (_optionalChain([options, 'access', _108 => _108.openapi, 'optionalAccess', _109 => _109.enabled])) {
1776
+ if (_optionalChain([options, 'access', _114 => _114.openapi, 'optionalAccess', _115 => _115.enabled])) {
1772
1777
  const { OpenAPIManager } = await loadFarmOpenAPIDevRuntime();
1773
1778
  openAPIManager = new OpenAPIManager(appDirs, options.openapi, {
1774
1779
  mode: "development",
1775
- apiBaseURL: typeof _optionalChain([options, 'access', _110 => _110.api, 'optionalAccess', _111 => _111.baseURL]) === "string" ? options.api.baseURL : void 0
1780
+ apiBaseURL: typeof _optionalChain([options, 'access', _116 => _116.api, 'optionalAccess', _117 => _117.baseURL]) === "string" ? options.api.baseURL : void 0
1776
1781
  });
1777
1782
  const spec = await openAPIManager.generateSpec();
1778
1783
  reportOpenAPIDevGenerationResult(spec);
@@ -1789,7 +1794,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1789
1794
  await openAPIManager.invalidateCache();
1790
1795
  }
1791
1796
  if (process.env.FARM_VERBOSE) {
1792
- _chunkXN2MB4QZcjs.logger.info(`Refreshed routes: ${reason}`);
1797
+ _chunkVQJYGZNXcjs.logger.info(`Refreshed routes: ${reason}`);
1793
1798
  }
1794
1799
  };
1795
1800
  const farmDocsFontAssetList = farmDocsDevRuntime ? _chunkERMUL73Lcjs.resolveFarmDocsFontAssets.call(void 0, farmConfig.root) : [];
@@ -1801,7 +1806,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1801
1806
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
1802
1807
  };
1803
1808
  releaseDocsMCPServers();
1804
- const isFarmDocsPathGuarded = (href) => _chunkVCKGOXFIcjs.farmPathGuardCoversPage.call(void 0,
1809
+ const isFarmDocsPathGuarded = (href) => _chunk76GHW3WIcjs.farmPathGuardCoversPage.call(void 0,
1805
1810
  {
1806
1811
  config: farmConfig,
1807
1812
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -1814,19 +1819,19 @@ function farmPlugin(options = {}, initialPluginManager) {
1814
1819
  clientEntry: "/@farm/client.js",
1815
1820
  resolveLayoutFonts: resolveDocsLayoutFonts,
1816
1821
  fontStylesheetHref: "/@farm/fonts.css",
1817
- globalStylesheetHref: _chunkC5S457CKcjs.resolveDevGlobalStylesheetHref.call(void 0,
1822
+ globalStylesheetHref: _chunkF42U3R4Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
1818
1823
  farmConfig.root,
1819
1824
  farmConfig.srcDir
1820
1825
  ),
1821
1826
  loadModule: async (specifier) => {
1822
1827
  const resolved = await server.environments.ssr.pluginContainer.resolveId(specifier);
1823
- if (specifier === _optionalChain([farmConfig, 'access', _112 => _112.docs, 'access', _113 => _113.adapter, 'optionalAccess', _114 => _114.server]) && _optionalChain([resolved, 'optionalAccess', _115 => _115.id])) {
1828
+ if (specifier === _optionalChain([farmConfig, 'access', _118 => _118.docs, 'access', _119 => _119.adapter, 'optionalAccess', _120 => _120.server]) && _optionalChain([resolved, 'optionalAccess', _121 => _121.id])) {
1824
1829
  return import(
1825
1830
  /* @vite-ignore */
1826
1831
  _url.pathToFileURL.call(void 0, resolved.id).href
1827
1832
  );
1828
1833
  }
1829
- return _chunk6XFGJBYXcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _116 => _116.id]), () => ( specifier)));
1834
+ return _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _122 => _122.id]), () => ( specifier)));
1830
1835
  },
1831
1836
  registerMCPServer: (mcpServer) => {
1832
1837
  const dispose = _chunk6ONBZGVHcjs.registerFarmMCPServer.call(void 0, mcpServer);
@@ -1844,21 +1849,21 @@ function farmPlugin(options = {}, initialPluginManager) {
1844
1849
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
1845
1850
  resolveLayoutFonts: resolveDocsLayoutFonts,
1846
1851
  fontStylesheetHref: "/@farm/fonts.css",
1847
- globalStylesheetHref: _chunkC5S457CKcjs.resolveDevGlobalStylesheetHref.call(void 0,
1852
+ globalStylesheetHref: _chunkF42U3R4Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
1848
1853
  farmConfig.root,
1849
1854
  farmConfig.srcDir
1850
1855
  ),
1851
1856
  isPathGuarded: isFarmDocsPathGuarded
1852
1857
  }) : null;
1853
1858
  const wrapFarmDocsResponseWithLayouts = async (request, response) => {
1854
- if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _117 => _117.headers, 'access', _118 => _118.get, 'call', _119 => _119("content-type"), 'optionalAccess', _120 => _120.toLowerCase, 'call', _121 => _121(), 'access', _122 => _122.includes, 'call', _123 => _123("text/html")])) {
1859
+ if (request.method === "HEAD" || response.headers.has("x-farm-docs-adapter") || !_optionalChain([response, 'access', _123 => _123.headers, 'access', _124 => _124.get, 'call', _125 => _125("content-type"), 'optionalAccess', _126 => _126.toLowerCase, 'call', _127 => _127(), 'access', _128 => _128.includes, 'call', _129 => _129("text/html")])) {
1855
1860
  return response;
1856
1861
  }
1857
1862
  const pathname = new URL(request.url).pathname;
1858
1863
  const matchedRoute = routeManager.matchRoute(pathname);
1859
1864
  const layoutEntries = matchedRoute.layouts.map((layout) => ({
1860
1865
  ...layout,
1861
- metadata: _chunkC5S457CKcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1866
+ metadata: _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, layout.modulePath, farmConfig.root)
1862
1867
  }));
1863
1868
  if (!layoutEntries.some((layout) => layout.metadata.shouldHydrate)) {
1864
1869
  return response;
@@ -1872,9 +1877,9 @@ function farmPlugin(options = {}, initialPluginManager) {
1872
1877
  headers: response.headers
1873
1878
  });
1874
1879
  }
1875
- const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _124 => _124.getConfig, 'call', _125 => _125()]), () => ( options))).renderer);
1880
+ const docsRenderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, (_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _130 => _130.getConfig, 'call', _131 => _131()]), () => ( options))).renderer);
1876
1881
  const [rendererRuntime, layoutModules] = await Promise.all([
1877
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunk6XFGJBYXcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
1882
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, docsRenderer) ? import("./renderer/react/server.cjs") : _chunkJYNNIGQOcjs.loadFarmDevModule.call(void 0, server, docsRenderer.server),
1878
1883
  Promise.all(
1879
1884
  layoutEntries.map((layout) => routeManager.loadLayoutModule(layout.modulePath))
1880
1885
  )
@@ -1886,7 +1891,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1886
1891
  (strategy) => strategy === hydrationStrategies[0]
1887
1892
  ) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
1888
1893
  const params = matchedRoute.params || {};
1889
- const toUrlPath = (absolutePath) => _chunkXN2MB4QZcjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
1894
+ const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, farmConfig.root);
1890
1895
  const clientLayouts = Object.fromEntries(
1891
1896
  layoutEntries.map((layout) => [
1892
1897
  layout.pattern,
@@ -1901,7 +1906,7 @@ function farmPlugin(options = {}, initialPluginManager) {
1901
1906
  ])
1902
1907
  );
1903
1908
  const inlineValue = (value) => JSON.stringify(value).replace(/</g, "\\u003c").replace(/>/g, "\\u003e");
1904
- const pageModulePath = _optionalChain([matchedRoute, 'access', _126 => _126.route, 'optionalAccess', _127 => _127.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
1909
+ const pageModulePath = _optionalChain([matchedRoute, 'access', _132 => _132.route, 'optionalAccess', _133 => _133.modulePath]) ? toUrlPath(matchedRoute.route.modulePath) : "";
1905
1910
  const bootstrapScript = `<script>
1906
1911
  window.__FARM_PROPS__ = ${inlineValue({ params })};
1907
1912
  window.__FARM_ROUTE_SLOTS__ = [];
@@ -1997,8 +2002,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
1997
2002
  }
1998
2003
  },
1999
2004
  (request) => {
2000
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _128 => _128.getConfig, 'call', _129 => _129()]), () => ( options));
2001
- const currentServerConfig = _chunk5566GNEGcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2005
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _134 => _134.getConfig, 'call', _135 => _135()]), () => ( options));
2006
+ const currentServerConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2002
2007
  return _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, request, {
2003
2008
  trustProxy: currentServerConfig.trustProxy
2004
2009
  });
@@ -2008,8 +2013,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2008
2013
  withAPIRequestTracing(async (req, res, next) => {
2009
2014
  const requestUrl = req.url || "/";
2010
2015
  const requestMethod = req.method || "GET";
2011
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _130 => _130.getConfig, 'call', _131 => _131()]), () => ( options));
2012
- const currentServerConfig = _chunk5566GNEGcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2016
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _136 => _136.getConfig, 'call', _137 => _137()]), () => ( options));
2017
+ const currentServerConfig = _chunkLIFUPCXWcjs.resolveFarmServerConfig.call(void 0, currentConfig.server);
2013
2018
  const parsedRequestUrl = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
2014
2019
  trustProxy: currentServerConfig.trustProxy
2015
2020
  });
@@ -2076,7 +2081,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2076
2081
  openapi: options.openapi
2077
2082
  },
2078
2083
  workflows: discoveredWorkflows,
2079
- plugins: _optionalChain([pm, 'optionalAccess', _132 => _132.getSortedPlugins, 'call', _133 => _133()])
2084
+ plugins: _optionalChain([pm, 'optionalAccess', _138 => _138.getSortedPlugins, 'call', _139 => _139()])
2080
2085
  });
2081
2086
  res.statusCode = 200;
2082
2087
  res.setHeader(
@@ -2089,7 +2094,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2089
2094
  } else {
2090
2095
  if (!warnedDeprecatedDevtoolsDashboard) {
2091
2096
  warnedDeprecatedDevtoolsDashboard = true;
2092
- _chunkXN2MB4QZcjs.logger.warn(
2097
+ _chunkVQJYGZNXcjs.logger.warn(
2093
2098
  "The built-in DevTools dashboard is deprecated. Install @farm.js/devtools and add devtools() to plugins in farm.config.ts."
2094
2099
  );
2095
2100
  }
@@ -2099,7 +2104,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2099
2104
  return;
2100
2105
  }
2101
2106
  const runAppMiddlewareForContentRoute = async () => {
2102
- if (!_optionalChain([middlewareManager, 'optionalAccess', _134 => _134.hasMiddleware, 'call', _135 => _135()])) return false;
2107
+ if (!_optionalChain([middlewareManager, 'optionalAccess', _140 => _140.hasMiddleware, 'call', _141 => _141()])) return false;
2103
2108
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
2104
2109
  return runFarmMiddlewareWithNavigation(
2105
2110
  farmApp.getServerRenderer(),
@@ -2115,16 +2120,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2115
2120
  label
2116
2121
  } = {}) => {
2117
2122
  const discard = async () => {
2118
- await _optionalChain([computed, 'optionalAccess', _136 => _136.body, 'optionalAccess', _137 => _137.cancel, 'call', _138 => _138(), 'access', _139 => _139.catch, 'call', _140 => _140(() => {
2123
+ await _optionalChain([computed, 'optionalAccess', _142 => _142.body, 'optionalAccess', _143 => _143.cancel, 'call', _144 => _144(), 'access', _145 => _145.catch, 'call', _146 => _146(() => {
2119
2124
  })]);
2120
2125
  };
2121
2126
  let runtimeSession2;
2122
- if (_optionalChain([pm, 'optionalAccess', _141 => _141.hasRuntimeRequestHooks, 'call', _142 => _142()])) {
2127
+ if (_optionalChain([pm, 'optionalAccess', _147 => _147.hasRuntimeRequestHooks, 'call', _148 => _148()])) {
2123
2128
  try {
2124
2129
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
2125
- const route = _chunkNPPT4RWFcjs.setFarmRouteLabel.call(void 0,
2130
+ const route = _chunkJ22JD5YJcjs.setFarmRouteLabel.call(void 0,
2126
2131
  { pathname: requestPathname },
2127
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkNPPT4RWFcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2132
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkJ22JD5YJcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
2128
2133
  );
2129
2134
  runtimeSession2 = await pm.beginRuntimeRequest(
2130
2135
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -2156,7 +2161,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2156
2161
  let response;
2157
2162
  try {
2158
2163
  response = await respond(
2159
- _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _143 => _143.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
2164
+ _nullishCoalesce(_optionalChain([runtimeSession2, 'optionalAccess', _149 => _149.request]), () => ( createRequestFromNodeRequest(req, new URL(fullUrl))))
2160
2165
  );
2161
2166
  } catch (error) {
2162
2167
  if (runtimeSession2) await pm.failRuntimeRequest(runtimeSession2, error);
@@ -2169,7 +2174,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2169
2174
  );
2170
2175
  };
2171
2176
  const openAPIRequestPathname = openAPIManager ? _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) : requestPathname;
2172
- if (openAPIManager && _optionalChain([options, 'access', _144 => _144.openapi, 'optionalAccess', _145 => _145.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
2177
+ if (openAPIManager && _optionalChain([options, 'access', _150 => _150.openapi, 'optionalAccess', _151 => _151.specRoute]) && openAPIRequestPathname === options.openapi.specRoute) {
2173
2178
  const specManager = openAPIManager;
2174
2179
  await serveBuiltInRoute(async () => {
2175
2180
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
@@ -2189,7 +2194,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2189
2194
  });
2190
2195
  return;
2191
2196
  }
2192
- if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _146 => _146.openapi, 'optionalAccess', _147 => _147.route])) {
2197
+ if (openAPIManager && openAPIRequestPathname === _optionalChain([options, 'access', _152 => _152.openapi, 'optionalAccess', _153 => _153.route])) {
2193
2198
  const docsManager = openAPIManager;
2194
2199
  await serveBuiltInRoute(
2195
2200
  async () => {
@@ -2200,24 +2205,24 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2200
2205
  );
2201
2206
  return;
2202
2207
  }
2203
- if (_optionalChain([options, 'access', _148 => _148.agent, 'optionalAccess', _149 => _149.manifest]) !== false && _chunkNPPT4RWFcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2208
+ if (_optionalChain([options, 'access', _154 => _154.agent, 'optionalAccess', _155 => _155.manifest]) !== false && _chunkJ22JD5YJcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
2204
2209
  await serveBuiltInRoute(async () => {
2205
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkC5S457CKcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2206
- const manifest = await _chunkNPPT4RWFcjs.createFarmAppManifestResponse.call(void 0,
2210
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkF42U3R4Fcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
2211
+ const manifest = await _chunkJ22JD5YJcjs.createFarmAppManifestResponse.call(void 0,
2207
2212
  new Request(parsedRequestUrl, {
2208
2213
  method: requestMethod,
2209
2214
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
2210
2215
  }),
2211
2216
  {
2212
- ..._chunkNPPT4RWFcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2217
+ ..._chunkJ22JD5YJcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
2213
2218
  build: "development",
2214
2219
  packages: farmAppPackages,
2215
2220
  // Read again on each request; unchanged files come from a cache.
2216
- webmcpTools: _optionalChain([farmConfig, 'access', _150 => _150.plugins, 'optionalAccess', _151 => _151.some, 'call', _152 => _152(({ name }) => name === "farm:webmcp")]) ? _chunkC5S457CKcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2221
+ webmcpTools: _optionalChain([farmConfig, 'access', _156 => _156.plugins, 'optionalAccess', _157 => _157.some, 'call', _158 => _158(({ name }) => name === "farm:webmcp")]) ? _chunkF42U3R4Fcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
2217
2222
  }),
2218
2223
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
2219
2224
  // A guard written for an MCP server's path keeps its tools out of the public view.
2220
- guardCoversPath: (path6) => _chunkVCKGOXFIcjs.farmPathGuardCoversEndpoint.call(void 0,
2225
+ guardCoversPath: (path6) => _chunk76GHW3WIcjs.farmPathGuardCoversEndpoint.call(void 0,
2221
2226
  {
2222
2227
  config: farmConfig,
2223
2228
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2231,11 +2236,11 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2231
2236
  });
2232
2237
  return;
2233
2238
  }
2234
- if (_optionalChain([options, 'access', _153 => _153.agent, 'optionalAccess', _154 => _154.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkNPPT4RWFcjs.FARM_API_CATALOG_PATH) {
2239
+ if (_optionalChain([options, 'access', _159 => _159.agent, 'optionalAccess', _160 => _160.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkJ22JD5YJcjs.FARM_API_CATALOG_PATH) {
2235
2240
  await serveBuiltInRoute(
2236
- () => _chunkNPPT4RWFcjs.createFarmApiCatalogResponse.call(void 0,
2241
+ () => _chunkJ22JD5YJcjs.createFarmApiCatalogResponse.call(void 0,
2237
2242
  requestMethod,
2238
- _chunkNPPT4RWFcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2243
+ _chunkJ22JD5YJcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
2239
2244
  new Request(parsedRequestUrl, {
2240
2245
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
2241
2246
  })
@@ -2243,8 +2248,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2243
2248
  );
2244
2249
  return;
2245
2250
  }
2246
- if (_optionalChain([options, 'access', _155 => _155.agent, 'optionalAccess', _156 => _156.aiCatalog]) !== false) {
2247
- const aiCatalog = _chunkNPPT4RWFcjs.createFarmAiCatalogResponse.call(void 0,
2251
+ if (_optionalChain([options, 'access', _161 => _161.agent, 'optionalAccess', _162 => _162.aiCatalog]) !== false) {
2252
+ const aiCatalog = _chunkJ22JD5YJcjs.createFarmAiCatalogResponse.call(void 0,
2248
2253
  new Request(parsedRequestUrl, {
2249
2254
  method: requestMethod,
2250
2255
  headers: {
@@ -2280,7 +2285,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2280
2285
  method: requestMethod,
2281
2286
  headers: docsHeaders
2282
2287
  });
2283
- const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunk5566GNEGcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
2288
+ const docsBodyInit = requestMethod === "GET" || requestMethod === "HEAD" ? {} : { body: _chunkLIFUPCXWcjs.createFarmNodeRequestBodyStream.call(void 0, req), duplex: "half" };
2284
2289
  const docsResponse = await farmDocsHandler(new Request(docsRequest, docsBodyInit));
2285
2290
  if (docsResponse) {
2286
2291
  await serveBuiltInRoute(
@@ -2288,18 +2293,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2288
2293
  {
2289
2294
  kind: "docs",
2290
2295
  computed: docsResponse,
2291
- label: _chunkNPPT4RWFcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2296
+ label: _chunkJ22JD5YJcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
2292
2297
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2293
- { path: _optionalChain([farmConfig, 'access', _157 => _157.docs, 'optionalAccess', _158 => _158.entry]) || "/docs" }
2298
+ { path: _optionalChain([farmConfig, 'access', _163 => _163.docs, 'optionalAccess', _164 => _164.entry]) || "/docs" }
2294
2299
  )
2295
2300
  }
2296
2301
  );
2297
2302
  return;
2298
2303
  }
2299
2304
  }
2300
- const markdownRouteLabel = () => _chunkNPPT4RWFcjs.resolveFarmMarkdownRouteLabel.call(void 0,
2305
+ const markdownRouteLabel = () => _chunkJ22JD5YJcjs.resolveFarmMarkdownRouteLabel.call(void 0,
2301
2306
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
2302
- (page) => _optionalChain([farmApp, 'access', _159 => _159.getRouteManager, 'call', _160 => _160(), 'access', _161 => _161.matchRoute, 'call', _162 => _162(page), 'access', _163 => _163.route, 'optionalAccess', _164 => _164.pattern])
2307
+ (page) => _optionalChain([farmApp, 'access', _165 => _165.getRouteManager, 'call', _166 => _166(), 'access', _167 => _167.matchRoute, 'call', _168 => _168(page), 'access', _169 => _169.route, 'optionalAccess', _170 => _170.pattern])
2303
2308
  );
2304
2309
  const markdownSourceResponse = viteModuleRequest ? null : await _chunkJATTVAHAcjs.createFarmMarkdownSourceResponse.call(void 0, {
2305
2310
  request: new Request(fullUrl, {
@@ -2309,7 +2314,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2309
2314
  config: farmApp.getConfig().mdx,
2310
2315
  resolveSource: async (pathname2) => {
2311
2316
  const match = farmApp.getRouteManager().matchRoute(pathname2);
2312
- const sourcePath = _optionalChain([match, 'access', _165 => _165.route, 'optionalAccess', _166 => _166.markdownSourcePath]) || (match.route && _chunkJATTVAHAcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2317
+ const sourcePath = _optionalChain([match, 'access', _171 => _171.route, 'optionalAccess', _172 => _172.markdownSourcePath]) || (match.route && _chunkJATTVAHAcjs.isFarmMarkdownPageFile.call(void 0, match.route.modulePath) ? match.route.modulePath : null);
2313
2318
  if (!sourcePath) {
2314
2319
  return null;
2315
2320
  }
@@ -2323,7 +2328,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2323
2328
  // this server's own listener, never the host the caller's Host names.
2324
2329
  renderPage: async (request) => _chunkBNH53KOTcjs.createFarmDevServerDispatch.call(void 0, server)(
2325
2330
  new Request(request, {
2326
- signal: res.destroyed ? AbortSignal.abort() : _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2331
+ signal: res.destroyed ? AbortSignal.abort() : _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2327
2332
  })
2328
2333
  )
2329
2334
  });
@@ -2352,7 +2357,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2352
2357
  headers,
2353
2358
  // Only accepted mirrors need disconnect listeners. An earlier
2354
2359
  // close (for example while the docs handler ran) must also abort.
2355
- signal: res.destroyed ? AbortSignal.abort() : _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2360
+ signal: res.destroyed ? AbortSignal.abort() : _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2356
2361
  })
2357
2362
  );
2358
2363
  },
@@ -2409,13 +2414,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2409
2414
  let workflowBody;
2410
2415
  try {
2411
2416
  if (requestMethod !== "GET" && requestMethod !== "HEAD") {
2412
- workflowBody = await _chunk5566GNEGcjs.readNodeRequestBody.call(void 0,
2417
+ workflowBody = await _chunkLIFUPCXWcjs.readNodeRequestBody.call(void 0,
2413
2418
  req,
2414
2419
  currentServerConfig.bodySizeLimit
2415
2420
  );
2416
2421
  }
2417
2422
  } catch (error) {
2418
- const response = _chunk5566GNEGcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2423
+ const response = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2419
2424
  if (!response) throw error;
2420
2425
  await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, response);
2421
2426
  return;
@@ -2425,7 +2430,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2425
2430
  method: requestMethod,
2426
2431
  headers: docsHeaders,
2427
2432
  body: toRequestBody(workflowBody),
2428
- signal: _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2433
+ signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2429
2434
  })
2430
2435
  );
2431
2436
  if (workflowResponse) {
@@ -2435,7 +2440,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2435
2440
  }
2436
2441
  const configuredIntegrations = currentConfig.integrations;
2437
2442
  const tryConfiguredIntegrationRoute = async () => {
2438
- const matchedRoute = _chunkN25RPPO5cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
2443
+ const matchedRoute = _chunkWAPQWAE6cjs.matchIntegrationRoute.call(void 0, configuredIntegrations, {
2439
2444
  pathname: requestPathname,
2440
2445
  method: requestMethod
2441
2446
  });
@@ -2448,8 +2453,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2448
2453
  await pm.runHookParallelFiltered(
2449
2454
  "beforeRequest",
2450
2455
  (plugin) => {
2451
- const owner = _chunkN25RPPO5cjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2452
- return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _167 => _167.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2456
+ const owner = _chunkWAPQWAE6cjs.getFarmIntegrationPluginOwner.call(void 0, plugin);
2457
+ return plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME && (_optionalChain([owner, 'optionalAccess', _173 => _173.source]) !== "lifecycle" || owner.key !== matchedRoute.key);
2453
2458
  },
2454
2459
  req,
2455
2460
  res
@@ -2468,16 +2473,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2468
2473
  }
2469
2474
  let body;
2470
2475
  if (req.method !== "GET" && req.method !== "HEAD") {
2471
- body = await _chunk5566GNEGcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
2476
+ body = await _chunkLIFUPCXWcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
2472
2477
  }
2473
2478
  const integrationRequest = new Request(fullUrl, {
2474
2479
  method: req.method,
2475
2480
  headers,
2476
2481
  body: toRequestBody(body),
2477
- signal: _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2482
+ signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2478
2483
  });
2479
2484
  const dispatchIntegration = async (request) => {
2480
- const result = await _chunkN25RPPO5cjs.dispatchIntegrationRequest.call(void 0,
2485
+ const result = await _chunkWAPQWAE6cjs.dispatchIntegrationRequest.call(void 0,
2481
2486
  {
2482
2487
  integration: matchedRoute.integration,
2483
2488
  config: currentConfig,
@@ -2485,7 +2490,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2485
2490
  isProd: false
2486
2491
  },
2487
2492
  request,
2488
- { clientAddress: _optionalChain([req, 'access', _168 => _168.socket, 'optionalAccess', _169 => _169.remoteAddress]) }
2493
+ { clientAddress: _optionalChain([req, 'access', _174 => _174.socket, 'optionalAccess', _175 => _175.remoteAddress]) }
2489
2494
  );
2490
2495
  if (!result) {
2491
2496
  throw new Error(`Matched integration route did not return a response`);
@@ -2507,7 +2512,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2507
2512
  await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, response);
2508
2513
  return true;
2509
2514
  } catch (error) {
2510
- const bodyErrorResponse = _chunk5566GNEGcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2515
+ const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2511
2516
  if (bodyErrorResponse) {
2512
2517
  await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
2513
2518
  return true;
@@ -2520,7 +2525,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2520
2525
  method: requestMethod,
2521
2526
  integration: matchedRoute.key
2522
2527
  });
2523
- _chunkXN2MB4QZcjs.logger.error(`Integration route error: ${error}`);
2528
+ _chunkVQJYGZNXcjs.logger.error(`Integration route error: ${error}`);
2524
2529
  if (!res.writableEnded) {
2525
2530
  res.statusCode = 500;
2526
2531
  res.setHeader("Content-Type", "application/json");
@@ -2541,16 +2546,19 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2541
2546
  }
2542
2547
  const matchedApiRoute = apiRouteManager.matchRoute(requestPathname);
2543
2548
  const hasMatchedApiRoute = Boolean(matchedApiRoute);
2544
- if (hasMatchedApiRoute || _chunkR2SEZEBCcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
2549
+ if (hasMatchedApiRoute || _chunkOYNNA4DDcjs.isFarmAPIPathname.call(void 0, requestPathname, apiServerBasePath)) {
2545
2550
  const startTime2 = Date.now();
2546
2551
  const method2 = req.method || "GET";
2547
2552
  const urlPath2 = req.url || "/";
2548
2553
  const pathname2 = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
2549
2554
  trustProxy: currentServerConfig.trustProxy
2550
2555
  }).pathname;
2556
+ const servesLocalApiRoute = hasMatchedApiRoute || Boolean(
2557
+ farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _176 => _176.isFarmDocsAPIRequest, 'call', _177 => _177(requestPathname)])
2558
+ );
2551
2559
  try {
2552
2560
  if (pm) {
2553
- if (hasMatchedApiRoute) {
2561
+ if (servesLocalApiRoute) {
2554
2562
  await pm.runHookParallelFiltered(
2555
2563
  "beforeRequest",
2556
2564
  (plugin) => plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
@@ -2571,16 +2579,26 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2571
2579
  urlPath: urlPath2,
2572
2580
  method: method2
2573
2581
  });
2574
- _chunkXN2MB4QZcjs.logger.error(`Request hook error: ${error}`);
2582
+ _chunkVQJYGZNXcjs.logger.error(`Request hook error: ${error}`);
2575
2583
  res.statusCode = 500;
2576
2584
  res.setHeader("Content-Type", "application/json");
2577
2585
  res.end(JSON.stringify({ error: "Internal server error" }));
2578
2586
  return;
2579
2587
  }
2588
+ if (await runAppMiddlewareForContentRoute()) {
2589
+ const duration2 = Date.now() - startTime2;
2590
+ logResponse(method2, urlPath2, res.statusCode || 200, duration2, "API");
2591
+ return;
2592
+ }
2580
2593
  const apiHandler = apiRouteManager.getHandler({ throwOnError: true });
2581
- const hasExplicitAPIRoute = hasMatchedApiRoute || Boolean(apiRouteManager.matchRoute(pathname2));
2594
+ const routedPathname = _chunkHNAISJFDcjs.resolveFarmRequestURL.call(void 0, req, {
2595
+ trustProxy: currentServerConfig.trustProxy
2596
+ }).pathname;
2597
+ const rewritten = routedPathname !== pathname2;
2598
+ const routedApiRoute = rewritten ? apiRouteManager.matchRoute(routedPathname) : matchedApiRoute || apiRouteManager.matchRoute(pathname2);
2599
+ const hasExplicitAPIRoute = Boolean(routedApiRoute);
2582
2600
  if (apiHandler && hasExplicitAPIRoute) {
2583
- const apiRoutePattern = _optionalChain([matchedApiRoute, 'optionalAccess', _170 => _170.route, 'access', _171 => _171.path]) || _optionalChain([apiRouteManager, 'access', _172 => _172.matchRoute, 'call', _173 => _173(pathname2), 'optionalAccess', _174 => _174.route, 'access', _175 => _175.path]) || urlPath2;
2601
+ const apiRoutePattern = _optionalChain([routedApiRoute, 'optionalAccess', _178 => _178.route, 'access', _179 => _179.path]) || urlPath2;
2584
2602
  _chunkEVIWKPJVcjs.emitFarmEvent.call(void 0, {
2585
2603
  type: "route.matched",
2586
2604
  pathname: pathname2,
@@ -2602,13 +2620,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2602
2620
  }
2603
2621
  let body;
2604
2622
  if (req.method !== "GET" && req.method !== "HEAD") {
2605
- body = await _chunk5566GNEGcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
2623
+ body = await _chunkLIFUPCXWcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
2606
2624
  }
2607
2625
  const request = new Request(url, {
2608
2626
  method: req.method,
2609
2627
  headers,
2610
2628
  body: toRequestBody(body),
2611
- signal: _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2629
+ signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2612
2630
  });
2613
2631
  const apiLifecyclePayload = {
2614
2632
  pathname: new URL(url).pathname,
@@ -2653,7 +2671,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2653
2671
  durationMs: duration2,
2654
2672
  error
2655
2673
  });
2656
- const bodyErrorResponse = _chunk5566GNEGcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2674
+ const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2657
2675
  if (bodyErrorResponse) {
2658
2676
  logResponse(method2, urlPath2, bodyErrorResponse.status, duration2, "API");
2659
2677
  await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
@@ -2663,14 +2681,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2663
2681
  urlPath: urlPath2,
2664
2682
  method: method2
2665
2683
  });
2666
- _chunkXN2MB4QZcjs.logger.error(`API route error: ${error}`);
2684
+ _chunkVQJYGZNXcjs.logger.error(`API route error: ${error}`);
2667
2685
  res.statusCode = 500;
2668
2686
  res.setHeader("Content-Type", "application/json");
2669
2687
  res.end(JSON.stringify({ error: "Internal server error" }));
2670
2688
  return;
2671
2689
  }
2672
2690
  }
2673
- if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _176 => _176.isFarmDocsAPIRequest, 'call', _177 => _177(pathname2)])) {
2691
+ if (farmDocsAPIHandler && _optionalChain([farmDocsDevRuntime, 'optionalAccess', _180 => _180.isFarmDocsAPIRequest, 'call', _181 => _181(pathname2)])) {
2674
2692
  try {
2675
2693
  const url = `http://${req.headers.host || "localhost:3000"}${req.url}`;
2676
2694
  const headers = new Headers();
@@ -2681,13 +2699,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2681
2699
  }
2682
2700
  let body;
2683
2701
  if (req.method !== "GET" && req.method !== "HEAD") {
2684
- body = await _chunk5566GNEGcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
2702
+ body = await _chunkLIFUPCXWcjs.readNodeRequestBody.call(void 0, req, currentServerConfig.bodySizeLimit);
2685
2703
  }
2686
2704
  const request = new Request(url, {
2687
2705
  method: req.method,
2688
2706
  headers,
2689
2707
  body: toRequestBody(body),
2690
- signal: _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2708
+ signal: _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2691
2709
  });
2692
2710
  const apiLifecyclePayload = {
2693
2711
  pathname: pathname2,
@@ -2708,10 +2726,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2708
2726
  };
2709
2727
  const docsResponse = pm ? await pm.runRuntimeRequest(request, invokeDocsAPIHandler, {
2710
2728
  kind: "docs",
2711
- route: _chunkNPPT4RWFcjs.setFarmRouteLabel.call(void 0,
2729
+ route: _chunkJ22JD5YJcjs.setFarmRouteLabel.call(void 0,
2712
2730
  { pathname: pathname2, pattern: apiLifecyclePayload.routePath },
2713
- _chunkNPPT4RWFcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2714
- path: _optionalChain([farmConfig, 'access', _178 => _178.docs, 'optionalAccess', _179 => _179.entry]) || "/docs"
2731
+ _chunkJ22JD5YJcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
2732
+ path: _optionalChain([farmConfig, 'access', _182 => _182.docs, 'optionalAccess', _183 => _183.entry]) || "/docs"
2715
2733
  })
2716
2734
  )
2717
2735
  }) : await invokeDocsAPIHandler(request);
@@ -2722,7 +2740,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2722
2740
  return;
2723
2741
  }
2724
2742
  } catch (error) {
2725
- const bodyErrorResponse = _chunk5566GNEGcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2743
+ const bodyErrorResponse = _chunkLIFUPCXWcjs.createFarmRequestBodyErrorResponse.call(void 0, error);
2726
2744
  if (bodyErrorResponse) {
2727
2745
  await _chunkZ5MZDFX4cjs.sendWebResponse.call(void 0, res, bodyErrorResponse);
2728
2746
  return;
@@ -2731,7 +2749,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2731
2749
  urlPath: urlPath2,
2732
2750
  method: method2
2733
2751
  });
2734
- _chunkXN2MB4QZcjs.logger.error(`Docs API route error: ${error}`);
2752
+ _chunkVQJYGZNXcjs.logger.error(`Docs API route error: ${error}`);
2735
2753
  res.statusCode = 500;
2736
2754
  res.setHeader("Content-Type", "application/json");
2737
2755
  res.end(JSON.stringify({ error: "Internal server error" }));
@@ -2745,25 +2763,25 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2745
2763
  res.end(JSON.stringify({ error: "API route not found", pathname: pathname2 }));
2746
2764
  return;
2747
2765
  }
2748
- if (_optionalChain([req, 'access', _180 => _180.url, 'optionalAccess', _181 => _181.startsWith, 'call', _182 => _182("/@")]) || _optionalChain([req, 'access', _183 => _183.url, 'optionalAccess', _184 => _184.startsWith, 'call', _185 => _185("/node_modules")])) {
2766
+ if (_optionalChain([req, 'access', _184 => _184.url, 'optionalAccess', _185 => _185.startsWith, 'call', _186 => _186("/@")]) || _optionalChain([req, 'access', _187 => _187.url, 'optionalAccess', _188 => _188.startsWith, 'call', _189 => _189("/node_modules")])) {
2749
2767
  return next();
2750
2768
  }
2751
2769
  if (shouldBypassFarmRouterForDottedPath(
2752
2770
  requestPathname,
2753
- _optionalChain([farmApp, 'optionalAccess', _186 => _186.getRouteManager, 'call', _187 => _187()]),
2771
+ _optionalChain([farmApp, 'optionalAccess', _190 => _190.getRouteManager, 'call', _191 => _191()]),
2754
2772
  [server.config.publicDir, server.config.root],
2755
2773
  farmAgentGeneratedPaths(farmConfig)
2756
2774
  )) {
2757
2775
  return next();
2758
2776
  }
2759
- if (_optionalChain([req, 'access', _188 => _188.url, 'optionalAccess', _189 => _189.startsWith, 'call', _190 => _190("/__farm/page-data")])) {
2777
+ if (_optionalChain([req, 'access', _192 => _192.url, 'optionalAccess', _193 => _193.startsWith, 'call', _194 => _194("/__farm/page-data")])) {
2760
2778
  const urlObj = parsedRequestUrl;
2761
2779
  const targetPath = urlObj.searchParams.get("path") || "/";
2762
2780
  try {
2763
2781
  const request = createRequestFromNodeRequest(
2764
2782
  req,
2765
2783
  urlObj,
2766
- _chunk5566GNEGcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2784
+ _chunkLIFUPCXWcjs.createFarmNodeRequestAbortSignal.call(void 0, req, res)
2767
2785
  );
2768
2786
  const deploymentMismatch = _chunkE552H232cjs.getFarmDeploymentMismatch.call(void 0,
2769
2787
  request,
@@ -2784,7 +2802,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2784
2802
  });
2785
2803
  let middlewareMap = /* @__PURE__ */ new Map();
2786
2804
  let middlewareContext = /* @__PURE__ */ new Map();
2787
- if (_optionalChain([middlewareManager, 'optionalAccess', _191 => _191.hasMiddleware, 'call', _192 => _192()])) {
2805
+ if (_optionalChain([middlewareManager, 'optionalAccess', _195 => _195.hasMiddleware, 'call', _196 => _196()])) {
2788
2806
  const targetNodeRequest = createPageDataMiddlewareRequest(req, targetRequestUrl);
2789
2807
  const handled = await runFarmMiddlewareWithNavigation(
2790
2808
  farmApp.getServerRenderer(),
@@ -2812,10 +2830,10 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2812
2830
  if (pm) {
2813
2831
  await pm.runHookParallel("afterRouteMatch", {
2814
2832
  pathname: targetPath,
2815
- matched: !!_optionalChain([match, 'optionalAccess', _193 => _193.route]),
2816
- routePattern: _optionalChain([match, 'optionalAccess', _194 => _194.route, 'optionalAccess', _195 => _195.pattern]) || null,
2817
- params: _optionalChain([match, 'optionalAccess', _196 => _196.params]) || {},
2818
- layoutPatterns: (_optionalChain([match, 'optionalAccess', _197 => _197.layouts]) || []).map((l) => l.pattern)
2833
+ matched: !!_optionalChain([match, 'optionalAccess', _197 => _197.route]),
2834
+ routePattern: _optionalChain([match, 'optionalAccess', _198 => _198.route, 'optionalAccess', _199 => _199.pattern]) || null,
2835
+ params: _optionalChain([match, 'optionalAccess', _200 => _200.params]) || {},
2836
+ layoutPatterns: (_optionalChain([match, 'optionalAccess', _201 => _201.layouts]) || []).map((l) => l.pattern)
2819
2837
  });
2820
2838
  }
2821
2839
  if (!match) {
@@ -2838,7 +2856,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2838
2856
  );
2839
2857
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
2840
2858
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
2841
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkC5S457CKcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
2859
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
2842
2860
  const isClientComponent = moduleMetadata.isClientComponent;
2843
2861
  const shouldHydrate = moduleMetadata.shouldHydrate;
2844
2862
  let mergedMetadata = {};
@@ -2846,7 +2864,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2846
2864
  layouts.map((layout) => routeManager3.loadLayoutModule(layout.modulePath))
2847
2865
  );
2848
2866
  const layoutHydrationMetadata = layouts.map(
2849
- (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkC5S457CKcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
2867
+ (layout) => _nullishCoalesce(navigationManifest.layouts.find((entry) => entry.pattern === layout.pattern), () => ( _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root)))
2850
2868
  );
2851
2869
  const shouldHydrateLayout = layoutHydrationMetadata.some(
2852
2870
  (metadata) => metadata.shouldHydrate
@@ -2861,7 +2879,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2861
2879
  (strategy) => strategy === hydrationStrategies[0]
2862
2880
  ) ? _nullishCoalesce(hydrationStrategies[0], () => ( "load")) : "load";
2863
2881
  const targetUrl = new URL(targetPath, "http://localhost");
2864
- const searchParams = _chunkJHXJBNLYcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
2882
+ const searchParams = _chunkSUCDVKUBcjs.searchParamsToObject.call(void 0, targetUrl.searchParams);
2865
2883
  const routeContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
2866
2884
  request: targetRequest,
2867
2885
  params,
@@ -2872,7 +2890,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2872
2890
  props: _chunkX333W5KVcjs.withFarmRouteContext.call(void 0,
2873
2891
  {
2874
2892
  params,
2875
- searchParams: Promise.resolve(searchParams),
2893
+ searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParams),
2876
2894
  path: targetUrl.pathname,
2877
2895
  middleware: middlewareMap.size > 0 ? { data: middlewareMap } : void 0
2878
2896
  },
@@ -2910,7 +2928,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2910
2928
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
2911
2929
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
2912
2930
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
2913
- ), () => ( _chunkC5S457CKcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
2931
+ ), () => ( _chunkF42U3R4Fcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
2914
2932
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
2915
2933
  request: targetRequest,
2916
2934
  params: slot.params,
@@ -2921,7 +2939,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2921
2939
  props: _chunkX333W5KVcjs.withFarmRouteContext.call(void 0,
2922
2940
  {
2923
2941
  params: slot.params,
2924
- searchParams: Promise.resolve(searchParams),
2942
+ searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, searchParams),
2925
2943
  path: targetUrl.pathname
2926
2944
  },
2927
2945
  slotContext
@@ -2955,16 +2973,16 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2955
2973
  })
2956
2974
  );
2957
2975
  const projectRoot = server.config.root;
2958
- const toUrlPath = (absolutePath) => _chunkXN2MB4QZcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
2959
- const renderPlan = _chunkVCKGOXFIcjs.createFarmRouteRenderPlan.call(void 0, {
2976
+ const toUrlPath = (absolutePath) => _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
2977
+ const renderPlan = _chunk76GHW3WIcjs.createFarmRouteRenderPlan.call(void 0, {
2960
2978
  pageShouldHydrate: shouldHydrate,
2961
2979
  layoutShouldHydrate: shouldHydrateLayout,
2962
2980
  islandStrategy: hydrationIslandStrategy,
2963
- rendering: _chunkZSIGEHSEcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
2981
+ rendering: _chunkY7TLL65Bcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
2964
2982
  });
2965
2983
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
2966
- const layoutStartIndex = _chunkVCKGOXFIcjs.getSharedLayoutPrefixLength.call(void 0,
2967
- _chunkVCKGOXFIcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
2984
+ const layoutStartIndex = _chunk76GHW3WIcjs.getSharedLayoutPrefixLength.call(void 0,
2985
+ _chunk76GHW3WIcjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
2968
2986
  destinationLayoutPatterns
2969
2987
  );
2970
2988
  const renderer = farmApp.getServerRenderer();
@@ -2974,7 +2992,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
2974
2992
  middlewareContext,
2975
2993
  () => renderer.renderNavigationFragment({
2976
2994
  PageComponent: routeModule.default,
2977
- LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _198 => _198.default]),
2995
+ LoadingComponent: _optionalChain([loadingModule, 'optionalAccess', _202 => _202.default]),
2978
2996
  pageProps: routeProps,
2979
2997
  params,
2980
2998
  layouts: layouts.map((layout, index) => ({
@@ -3045,7 +3063,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3045
3063
  {
3046
3064
  status: 200,
3047
3065
  headers: {
3048
- "Cache-Control": _chunkVCKGOXFIcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3066
+ "Cache-Control": _chunk76GHW3WIcjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
3049
3067
  "X-Farm-Navigation": "html-fragment",
3050
3068
  Vary: "X-Farm-Layout-Chain",
3051
3069
  [_chunkE552H232cjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -3053,7 +3071,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3053
3071
  },
3054
3072
  {
3055
3073
  onError(error, id) {
3056
- _chunkXN2MB4QZcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
3074
+ _chunkVQJYGZNXcjs.logger.error(`Deferred route data ${id} failed: ${error}`);
3057
3075
  }
3058
3076
  }
3059
3077
  )
@@ -3082,18 +3100,18 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3082
3100
  trustProxy: currentServerConfig.trustProxy
3083
3101
  }).pathname;
3084
3102
  const routeManager2 = farmApp.getRouteManager();
3085
- const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _199 => _199.hasHook, 'call', _200 => _200("beforeRouteMatch")]), () => ( false));
3086
- const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _201 => _201.hasHook, 'call', _202 => _202("afterRouteMatch")]), () => ( false));
3087
- const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _203 => _203.hasHook, 'call', _204 => _204("beforeRequest")]), () => ( false));
3088
- const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _205 => _205.hasHook, 'call', _206 => _206("beforeRender")]), () => ( false));
3089
- const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _207 => _207.hasHook, 'call', _208 => _208("afterResponse")]), () => ( false));
3090
- const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _209 => _209.hasHook, 'call', _210 => _210("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _211 => _211.hasHook, 'call', _212 => _212("afterRender")]), () => ( false)));
3091
- const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _213 => _213.hasRuntimeRequestHooks, 'call', _214 => _214()]), () => ( false));
3092
- const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _215 => _215.hasRuntimeHook, 'call', _216 => _216("after")]), () => ( false));
3103
+ const hasBeforeRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _203 => _203.hasHook, 'call', _204 => _204("beforeRouteMatch")]), () => ( false));
3104
+ const hasAfterRouteMatchHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _205 => _205.hasHook, 'call', _206 => _206("afterRouteMatch")]), () => ( false));
3105
+ const hasBeforeRequestHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _207 => _207.hasHook, 'call', _208 => _208("beforeRequest")]), () => ( false));
3106
+ const hasBeforeRenderHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _209 => _209.hasHook, 'call', _210 => _210("beforeRender")]), () => ( false));
3107
+ const hasAfterResponseHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _211 => _211.hasHook, 'call', _212 => _212("afterResponse")]), () => ( false));
3108
+ const hasHTMLTransformHook = (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _213 => _213.hasHook, 'call', _214 => _214("transformHTML")]), () => ( false))) || (_nullishCoalesce(_optionalChain([pm, 'optionalAccess', _215 => _215.hasHook, 'call', _216 => _216("afterRender")]), () => ( false)));
3109
+ const hasRuntimeRequestHooks = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _217 => _217.hasRuntimeRequestHooks, 'call', _218 => _218()]), () => ( false));
3110
+ const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _219 => _219.hasRuntimeHook, 'call', _220 => _220("after")]), () => ( false));
3093
3111
  const requestedMatch = routeManager2.matchRoute(requestedPathname);
3094
3112
  const pageBuiltInRouteLabel = (pathname2) => {
3095
3113
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
3096
- const mcpLabel = _chunkNPPT4RWFcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3114
+ const mcpLabel = _chunkJ22JD5YJcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
3097
3115
  if (mcpLabel) return mcpLabel;
3098
3116
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
3099
3117
  return routePathname === _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkSBABQKPTcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -3105,13 +3123,13 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3105
3123
  createRequestFromNodeRequest(req, new URL(fullUrl)),
3106
3124
  {
3107
3125
  kind: "page",
3108
- route: _chunkNPPT4RWFcjs.setFarmRouteLabel.call(void 0,
3126
+ route: _chunkJ22JD5YJcjs.setFarmRouteLabel.call(void 0,
3109
3127
  {
3110
3128
  pathname: requestedPathname,
3111
- pattern: _optionalChain([requestedMatch, 'optionalAccess', _217 => _217.route, 'optionalAccess', _218 => _218.pattern]) || null,
3112
- params: _optionalChain([requestedMatch, 'optionalAccess', _219 => _219.params]) || {}
3129
+ pattern: _optionalChain([requestedMatch, 'optionalAccess', _221 => _221.route, 'optionalAccess', _222 => _222.pattern]) || null,
3130
+ params: _optionalChain([requestedMatch, 'optionalAccess', _223 => _223.params]) || {}
3113
3131
  },
3114
- _optionalChain([requestedMatch, 'optionalAccess', _220 => _220.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3132
+ _optionalChain([requestedMatch, 'optionalAccess', _224 => _224.route]) ? null : pageBuiltInRouteLabel(requestedPathname)
3115
3133
  )
3116
3134
  }
3117
3135
  );
@@ -3144,17 +3162,17 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3144
3162
  if (pm && hasAfterRouteMatchHook) {
3145
3163
  await pm.runHookParallel("afterRouteMatch", {
3146
3164
  pathname,
3147
- matched: !!_optionalChain([routeMatch, 'optionalAccess', _221 => _221.route]),
3148
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _222 => _222.route, 'optionalAccess', _223 => _223.pattern]) || null,
3149
- params: _optionalChain([routeMatch, 'optionalAccess', _224 => _224.params]) || {},
3150
- layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _225 => _225.layouts]) || []).map((l) => l.pattern)
3165
+ matched: !!_optionalChain([routeMatch, 'optionalAccess', _225 => _225.route]),
3166
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _226 => _226.route, 'optionalAccess', _227 => _227.pattern]) || null,
3167
+ params: _optionalChain([routeMatch, 'optionalAccess', _228 => _228.params]) || {},
3168
+ layoutPatterns: (_optionalChain([routeMatch, 'optionalAccess', _229 => _229.layouts]) || []).map((l) => l.pattern)
3151
3169
  });
3152
3170
  }
3153
3171
  const renderPayload = {
3154
3172
  pathname,
3155
3173
  method,
3156
- routePattern: _optionalChain([routeMatch, 'optionalAccess', _226 => _226.route, 'optionalAccess', _227 => _227.pattern]) || null,
3157
- params: _optionalChain([routeMatch, 'optionalAccess', _228 => _228.params]) || {}
3174
+ routePattern: _optionalChain([routeMatch, 'optionalAccess', _230 => _230.route, 'optionalAccess', _231 => _231.pattern]) || null,
3175
+ params: _optionalChain([routeMatch, 'optionalAccess', _232 => _232.params]) || {}
3158
3176
  };
3159
3177
  const shouldInterceptResponse = Boolean(
3160
3178
  pm && (hasAfterResponseHook || hasHTMLTransformHook || runtimeSession && hasRuntimeAfterHook)
@@ -3176,7 +3194,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3176
3194
  emitError: (error) => emitPluginError("response-end", error, { pathname })
3177
3195
  }) : void 0;
3178
3196
  try {
3179
- if (_optionalChain([middlewareManager, 'optionalAccess', _229 => _229.hasMiddleware, 'call', _230 => _230()])) {
3197
+ if (_optionalChain([middlewareManager, 'optionalAccess', _233 => _233.hasMiddleware, 'call', _234 => _234()])) {
3180
3198
  const middlewareRequest = createRequestFromNodeRequest(req, new URL(fullUrl));
3181
3199
  const handled = await runFarmMiddlewareWithNavigation(
3182
3200
  farmApp.getServerRenderer(),
@@ -3186,7 +3204,7 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3186
3204
  () => middlewareManager.execute(req, res)
3187
3205
  );
3188
3206
  if (handled) {
3189
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _231 => _231.isEnded, 'call', _232 => _232()])) {
3207
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _235 => _235.isEnded, 'call', _236 => _236()])) {
3190
3208
  const duration = Date.now() - startTime;
3191
3209
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3192
3210
  }
@@ -3199,14 +3217,14 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3199
3217
  req.url || "/",
3200
3218
  `http://${req.headers.host || "localhost:3000"}`
3201
3219
  ).pathname;
3202
- const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _233 => _233.matchRoute, 'call', _234 => _234(currentPathname), 'optionalAccess', _235 => _235.route]));
3220
+ const hasLocalPageRoute = Boolean(_optionalChain([routeManager2, 'access', _237 => _237.matchRoute, 'call', _238 => _238(currentPathname), 'optionalAccess', _239 => _239.route]));
3203
3221
  await pm.runHookParallelFiltered(
3204
3222
  "beforeRequest",
3205
3223
  (plugin) => !hasLocalPageRoute || plugin.name !== _chunkUYTAP4FQcjs.FARM_CONFIG_REWRITES_PLUGIN_NAME,
3206
3224
  req,
3207
3225
  res
3208
3226
  );
3209
- if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _236 => _236.url, 'optionalAccess', _237 => _237.startsWith, 'call', _238 => _238("/")]) && !res.writableEnded) {
3227
+ if (runtimeSession && req.url !== urlBeforeRequestHooks && _optionalChain([req, 'access', _240 => _240.url, 'optionalAccess', _241 => _241.startsWith, 'call', _242 => _242("/")]) && !res.writableEnded) {
3210
3228
  const destinationUrl = new URL(req.url, fullUrl);
3211
3229
  const destinationMatch = routeManager2.matchRoute(destinationUrl.pathname);
3212
3230
  const guarded = await pm.runRuntimeBeforeForRewrite(
@@ -3216,8 +3234,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3216
3234
  kind: "page",
3217
3235
  route: {
3218
3236
  pathname: destinationUrl.pathname,
3219
- pattern: _optionalChain([destinationMatch, 'optionalAccess', _239 => _239.route, 'optionalAccess', _240 => _240.pattern]) || null,
3220
- params: _optionalChain([destinationMatch, 'optionalAccess', _241 => _241.params]) || {}
3237
+ pattern: _optionalChain([destinationMatch, 'optionalAccess', _243 => _243.route, 'optionalAccess', _244 => _244.pattern]) || null,
3238
+ params: _optionalChain([destinationMatch, 'optionalAccess', _245 => _245.params]) || {}
3221
3239
  }
3222
3240
  }
3223
3241
  );
@@ -3229,8 +3247,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3229
3247
  }
3230
3248
  }
3231
3249
  }
3232
- if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _242 => _242.isEnded, 'call', _243 => _243()])) {
3233
- if (!_optionalChain([responseInterceptor, 'optionalAccess', _244 => _244.isEnded, 'call', _245 => _245()])) {
3250
+ if (res.writableEnded || _optionalChain([responseInterceptor, 'optionalAccess', _246 => _246.isEnded, 'call', _247 => _247()])) {
3251
+ if (!_optionalChain([responseInterceptor, 'optionalAccess', _248 => _248.isEnded, 'call', _249 => _249()])) {
3234
3252
  const duration = Date.now() - startTime;
3235
3253
  logResponse(method, urlPath, res.statusCode || 200, duration, "PAGE");
3236
3254
  }
@@ -3279,6 +3297,12 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3279
3297
  }
3280
3298
  },
3281
3299
  async load(id, loadOptions) {
3300
+ if (_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && islandsServerFns()) {
3301
+ const file = id.split("?", 1)[0];
3302
+ this.addWatchFile(file);
3303
+ const source = await fs2.promises.readFile(file, "utf8");
3304
+ return _nullishCoalesce(_chunkPIUTGRDIcjs.createFarmServerFnBoundaryModule.call(void 0, source, file), () => ( "export {};\n"));
3305
+ }
3282
3306
  if (typeof fontImports.load === "function") {
3283
3307
  const fontModule = await fontImports.load.call(this, id);
3284
3308
  if (fontModule) return fontModule;
@@ -3288,8 +3312,8 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3288
3312
  if (imageModule) return imageModule;
3289
3313
  }
3290
3314
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
3291
- const renderer = _optionalChain([farmApp, 'optionalAccess', _246 => _246.getConfig, 'call', _247 => _247(), 'access', _248 => _248.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3292
- const root = _optionalChain([server, 'optionalAccess', _249 => _249.config, 'access', _250 => _250.root]) || options.root;
3315
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _250 => _250.getConfig, 'call', _251 => _251(), 'access', _252 => _252.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3316
+ const root = _optionalChain([server, 'optionalAccess', _253 => _253.config, 'access', _254 => _254.root]) || options.root;
3293
3317
  if (isClientEnvironment(this, loadOptions)) {
3294
3318
  return generateProgrammaticClientRouteModuleForId(
3295
3319
  id,
@@ -3302,65 +3326,65 @@ window.__FARM_MANIFEST__ = ${inlineValue({
3302
3326
  return generateProgrammaticRouteModule(id, root, renderer);
3303
3327
  }
3304
3328
  if (isFarmClientVirtualId(id)) {
3305
- const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _251 => _251.getConfig, 'call', _252 => _252()]);
3306
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _253 => _253.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3307
- const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _254 => _254.integrations]) || options.integrations;
3308
- const root = _optionalChain([resolvedConfig, 'optionalAccess', _255 => _255.root]) || _optionalChain([server, 'optionalAccess', _256 => _256.config, 'access', _257 => _257.root]) || process.cwd();
3309
- const docs = _optionalChain([resolvedConfig, 'optionalAccess', _258 => _258.docs]);
3329
+ const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _255 => _255.getConfig, 'call', _256 => _256()]);
3330
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _257 => _257.renderer]) || _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, options.renderer);
3331
+ const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _258 => _258.integrations]) || options.integrations;
3332
+ const root = _optionalChain([resolvedConfig, 'optionalAccess', _259 => _259.root]) || _optionalChain([server, 'optionalAccess', _260 => _260.config, 'access', _261 => _261.root]) || process.cwd();
3333
+ const docs = _optionalChain([resolvedConfig, 'optionalAccess', _262 => _262.docs]);
3310
3334
  const adapterOwnsDocsRuntime = Boolean(
3311
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _259 => _259.adapter, 'optionalAccess', _260 => _260.server]) && docs.adapter.react
3335
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([docs, 'optionalAccess', _263 => _263.adapter, 'optionalAccess', _264 => _264.server]) && docs.adapter.react
3312
3336
  );
3313
- const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _261 => _261.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3337
+ const devtools = _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _265 => _265.devtools]), () => ( _chunkSTF6VDYQcjs.resolveFarmDevtoolsConfig.call(void 0, false, "production")));
3314
3338
  const [docsRuntime, docsSearchRuntime, devtoolsClientRuntime] = await Promise.all([
3315
- _optionalChain([docs, 'optionalAccess', _262 => _262.enabled]) ? loadFarmDocsDevRuntime() : null,
3316
- _optionalChain([docs, 'optionalAccess', _263 => _263.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3339
+ _optionalChain([docs, 'optionalAccess', _266 => _266.enabled]) ? loadFarmDocsDevRuntime() : null,
3340
+ _optionalChain([docs, 'optionalAccess', _267 => _267.enabled]) && !adapterOwnsDocsRuntime ? loadFarmDocsSearchDevRuntime() : null,
3317
3341
  devtools.enabled ? loadFarmDevtoolsClientRuntime() : null
3318
3342
  ]);
3319
- const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _264 => _264.isFarmDocsSearchEnabled, 'call', _265 => _265(docs)]), () => ( false));
3343
+ const docsSearchEnabled = _nullishCoalesce(_optionalChain([docsSearchRuntime, 'optionalAccess', _268 => _268.isFarmDocsSearchEnabled, 'call', _269 => _269(docs)]), () => ( false));
3320
3344
  const generatedDocsSearchRuntime = docsSearchRuntime ? docsSearchRuntime.generateFarmDocsSearchClientRuntime(
3321
3345
  docsSearchEnabled,
3322
3346
  docsSearchEnabled ? docsSearchRuntime.resolveFarmDocsSearchClientModule(root) : void 0
3323
3347
  ) : EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME;
3324
3348
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
3325
3349
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkBPNOYILCcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
3326
- const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkN25RPPO5cjs.getIntegrationProviders.call(void 0, integrations) : [];
3327
- const isolatedHydrationMode = _chunkC5S457CKcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3328
- _optionalChain([resolvedConfig, 'optionalAccess', _266 => _266.experimental, 'optionalAccess', _267 => _267.isolatedClientHydration]),
3350
+ const integrationProviders = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkWAPQWAE6cjs.getIntegrationProviders.call(void 0, integrations) : [];
3351
+ const isolatedHydrationMode = _chunkF42U3R4Fcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
3352
+ _optionalChain([resolvedConfig, 'optionalAccess', _270 => _270.experimental, 'optionalAccess', _271 => _271.isolatedClientHydration]),
3329
3353
  {
3330
- serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _268 => _268.experimental, 'optionalAccess', _269 => _269.serverComponents])) === "rsc",
3354
+ serverComponents: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _272 => _272.experimental, 'optionalAccess', _273 => _273.serverComponents])) === "rsc",
3331
3355
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
3332
3356
  }
3333
3357
  );
3334
3358
  return generateClientCode(
3335
3359
  integrationProviders,
3336
3360
  [
3337
- ..._chunkN25RPPO5cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3338
- ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _270 => _270.getFarmDocsDocumentNavigationMatchers, 'call', _271 => _271(docs)]), () => ( []))
3361
+ ..._chunkWAPQWAE6cjs.getIntegrationDocumentNavigationMatchers.call(void 0, integrations),
3362
+ ..._nullishCoalesce(_optionalChain([docsRuntime, 'optionalAccess', _274 => _274.getFarmDocsDocumentNavigationMatchers, 'call', _275 => _275(docs)]), () => ( []))
3339
3363
  ],
3340
3364
  generatedDocsSearchRuntime,
3341
3365
  `${generatedDevtoolsClientRuntime}
3342
3366
  ${generatedDevIndicatorsClientRuntime}`,
3343
- _optionalChain([resolvedConfig, 'optionalAccess', _272 => _272.plugins]) || [],
3367
+ _optionalChain([resolvedConfig, 'optionalAccess', _276 => _276.plugins]) || [],
3344
3368
  root,
3345
- _optionalChain([resolvedConfig, 'optionalAccess', _273 => _273.srcDir]) || options.srcDir || "src",
3346
- _optionalChain([resolvedConfig, 'optionalAccess', _274 => _274.publicRuntimeConfig]) || options.publicRuntimeConfig,
3347
- _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _275 => _275.adapter, 'optionalAccess', _276 => _276.react]) : void 0,
3369
+ _optionalChain([resolvedConfig, 'optionalAccess', _277 => _277.srcDir]) || options.srcDir || "src",
3370
+ _optionalChain([resolvedConfig, 'optionalAccess', _278 => _278.publicRuntimeConfig]) || options.publicRuntimeConfig,
3371
+ _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _optionalChain([docs, 'optionalAccess', _279 => _279.adapter, 'optionalAccess', _280 => _280.react]) : void 0,
3348
3372
  renderer,
3349
- isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _277 => _277.getRouteManager, 'call', _278 => _278(), 'access', _279 => _279.getIsolatedClientBoundaryModules, 'call', _280 => _280(root)])))), 'optionalAccess', _281 => _281.size]) > 0,
3350
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _282 => _282.trailingSlash]), () => ( false)),
3351
- _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _283 => _283.basePath]), () => ( "/")),
3352
- _chunkC5S457CKcjs.generateClientCachePersistenceCode.call(void 0,
3353
- _chunkC5S457CKcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _284 => _284.cache]))
3373
+ isolatedHydrationMode === "enabled" || _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _281 => _281.getRouteManager, 'call', _282 => _282(), 'access', _283 => _283.getIsolatedClientBoundaryModules, 'call', _284 => _284(root)])))), 'optionalAccess', _285 => _285.size]) > 0,
3374
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _286 => _286.trailingSlash]), () => ( false)),
3375
+ _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _287 => _287.basePath]), () => ( "/")),
3376
+ _chunkF42U3R4Fcjs.generateClientCachePersistenceCode.call(void 0,
3377
+ _chunkF42U3R4Fcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _288 => _288.cache]))
3354
3378
  ),
3355
3379
  _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
3356
- _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _285 => _285.experimental, 'optionalAccess', _286 => _286.serverComponents])) === "islands"
3380
+ _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _289 => _289.experimental, 'optionalAccess', _290 => _290.serverComponents])) === "islands"
3357
3381
  );
3358
3382
  }
3359
3383
  if (id === "/@farm/server") {
3360
3384
  return generateServerCode();
3361
3385
  }
3362
3386
  if (id === "/@farm/manifest") {
3363
- const routeManager = _optionalChain([farmApp, 'optionalAccess', _287 => _287.getRouteManager, 'call', _288 => _288()]);
3387
+ const routeManager = _optionalChain([farmApp, 'optionalAccess', _291 => _291.getRouteManager, 'call', _292 => _292()]);
3364
3388
  if (!routeManager) {
3365
3389
  return `
3366
3390
  export const getManifest = () => ({
@@ -3373,9 +3397,9 @@ export const getManifest = () => ({
3373
3397
  `;
3374
3398
  }
3375
3399
  const manifest = routeManager.generateClientManifest(server.config.root);
3376
- const globalStylesheetHref = _chunkC5S457CKcjs.resolveDevGlobalStylesheetHref.call(void 0,
3400
+ const globalStylesheetHref = _chunkF42U3R4Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
3377
3401
  server.config.root,
3378
- _optionalChain([farmApp, 'optionalAccess', _289 => _289.getConfig, 'call', _290 => _290(), 'access', _291 => _291.srcDir])
3402
+ _optionalChain([farmApp, 'optionalAccess', _293 => _293.getConfig, 'call', _294 => _294(), 'access', _295 => _295.srcDir])
3379
3403
  );
3380
3404
  const fullManifest = {
3381
3405
  clientEntry: "/@farm/client.js",
@@ -3401,11 +3425,11 @@ export const getManifest = () => ({
3401
3425
  };
3402
3426
  }
3403
3427
  for (const layout of manifest.layouts) {
3404
- const groupScope = _chunkVCKGOXFIcjs.getRouteGroupScope.call(void 0, layout.pattern);
3428
+ const groupScope = _chunk76GHW3WIcjs.getRouteGroupScope.call(void 0, layout.pattern);
3405
3429
  fullManifest.layouts[layout.pattern] = {
3406
3430
  modulePath: layout.modulePath,
3407
3431
  pattern: layout.pattern,
3408
- ...groupScope ? { urlPattern: _chunkVCKGOXFIcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3432
+ ...groupScope ? { urlPattern: _chunk76GHW3WIcjs.stripRouteGroups.call(void 0, layout.pattern), groupScope } : {},
3409
3433
  shouldHydrate: layout.shouldHydrate,
3410
3434
  islandStrategy: layout.islandStrategy,
3411
3435
  // Islands mode: rebuilt from its server tree, so its module is never preloaded.
@@ -3431,37 +3455,46 @@ export const manifest = getManifest();
3431
3455
  }
3432
3456
  },
3433
3457
  async transform(code, id, transformOptions) {
3434
- const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _292 => _292.getConfig, 'call', _293 => _293()]), () => ( options));
3435
- if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _294 => _294.experimental, 'optionalAccess', _295 => _295.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3458
+ const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _296 => _296.getConfig, 'call', _297 => _297()]), () => ( options));
3459
+ if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3460
+ const serverFns = _chunkPIUTGRDIcjs.transformFarmServerFns.call(void 0, code, id, {
3461
+ environment: _optionalChain([transformOptions, 'optionalAccess', _298 => _298.ssr]) === true ? "rsc" : "client"
3462
+ });
3463
+ if (serverFns) {
3464
+ if (!serverFns.code.includes("use server")) return { code: serverFns.code, map: null };
3465
+ code = serverFns.code;
3466
+ }
3467
+ }
3468
+ if (_chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _299 => _299.experimental, 'optionalAccess', _300 => _300.serverComponents])) === "islands" && code.includes("use server") && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
3436
3469
  const file = id.split("?", 1)[0];
3437
3470
  const actionModule = transformFarmFormActionModule({
3438
3471
  code,
3439
3472
  id,
3440
- root: actionConfig.root || _optionalChain([server, 'optionalAccess', _296 => _296.config, 'access', _297 => _297.root]) || process.cwd(),
3441
- ssr: _optionalChain([transformOptions, 'optionalAccess', _298 => _298.ssr]) === true,
3473
+ root: actionConfig.root || _optionalChain([server, 'optionalAccess', _301 => _301.config, 'access', _302 => _302.root]) || process.cwd(),
3474
+ ssr: _optionalChain([transformOptions, 'optionalAccess', _303 => _303.ssr]) === true,
3442
3475
  // Parsed by file type: page components are TSX.
3443
3476
  parse: (source) => _vite.parseSync.call(void 0, file, source).program
3444
3477
  });
3445
3478
  if (actionModule) return { code: actionModule, map: null };
3446
3479
  }
3447
- if (!_optionalChain([transformOptions, 'optionalAccess', _299 => _299.ssr])) {
3448
- const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _300 => _300.getConfig, 'call', _301 => _301(), 'optionalAccess', _302 => _302.docs]));
3449
- if (_chunkC5S457CKcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3450
- const redacted = _chunkC5S457CKcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3480
+ if (!_optionalChain([transformOptions, 'optionalAccess', _304 => _304.ssr])) {
3481
+ const docsConfigModule = _chunkSM2SYWARcjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _305 => _305.getConfig, 'call', _306 => _306(), 'optionalAccess', _307 => _307.docs]));
3482
+ if (_chunkF42U3R4Fcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
3483
+ const redacted = _chunkF42U3R4Fcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
3451
3484
  if (redacted !== null) return { code: redacted, map: null };
3452
3485
  }
3453
3486
  }
3454
- if (!_optionalChain([transformOptions, 'optionalAccess', _303 => _303.ssr])) {
3455
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _304 => _304.getConfig, 'call', _305 => _305()]), () => ( options));
3456
- if (_optionalChain([currentConfig, 'access', _306 => _306.experimental, 'optionalAccess', _307 => _307.serverActions]) !== true || !serverFnTransformActive) {
3487
+ if (!_optionalChain([transformOptions, 'optionalAccess', _308 => _308.ssr])) {
3488
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _309 => _309.getConfig, 'call', _310 => _310()]), () => ( options));
3489
+ if ((_optionalChain([currentConfig, 'access', _311 => _311.experimental, 'optionalAccess', _312 => _312.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
3457
3490
  const violation = findClientServerFnViolation(code, id);
3458
3491
  if (violation) {
3459
3492
  this.error(formatServerFnBoundaryError(violation, id));
3460
3493
  }
3461
3494
  }
3462
3495
  }
3463
- if (!_optionalChain([transformOptions, 'optionalAccess', _308 => _308.ssr]) && shouldInspectClientBoundary(id, code)) {
3464
- warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _309 => _309.getConfig, 'call', _310 => _310()]), () => ( options)));
3496
+ if (!_optionalChain([transformOptions, 'optionalAccess', _313 => _313.ssr]) && shouldInspectClientBoundary(id, code)) {
3497
+ warnClientBoundaryOnce(this, id, code, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _314 => _314.getConfig, 'call', _315 => _315()]), () => ( options)));
3465
3498
  }
3466
3499
  if (typeof imageImports.transform === "function") {
3467
3500
  const imageModule = await imageImports.transform.call(this, code, id, transformOptions);
@@ -3476,13 +3509,13 @@ export const manifest = getManifest();
3476
3509
  id,
3477
3510
  transformOptions
3478
3511
  );
3479
- const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _311 => _311.code, 'optionalAccess', _312 => _312.toString, 'call', _313 => _313()]);
3512
+ const fontCode = typeof fontResult === "string" ? fontResult : _optionalChain([fontResult, 'optionalAccess', _316 => _316.code, 'optionalAccess', _317 => _317.toString, 'call', _318 => _318()]);
3480
3513
  if (fontCode) {
3481
3514
  transformedCode = fontCode;
3482
3515
  transformed = true;
3483
3516
  }
3484
3517
  }
3485
- if (_optionalChain([transformOptions, 'optionalAccess', _314 => _314.ssr]) && server) {
3518
+ if (_optionalChain([transformOptions, 'optionalAccess', _319 => _319.ssr]) && server) {
3486
3519
  const rewrittenImports = rewriteEarlySsrRelativeImports({
3487
3520
  code: transformedCode,
3488
3521
  id,
@@ -3494,28 +3527,28 @@ export const manifest = getManifest();
3494
3527
  transformed = true;
3495
3528
  }
3496
3529
  }
3497
- if (_chunkC5S457CKcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3530
+ if (_chunkF42U3R4Fcjs.hasUseClientDirective.call(void 0, transformedCode)) {
3498
3531
  const clientBoundarySource = transformedCode;
3499
3532
  const moduleInfo = this.getModuleInfo(id);
3500
3533
  if (moduleInfo) {
3501
3534
  moduleInfo.isClientComponent = true;
3502
3535
  }
3503
- transformedCode = _chunkC5S457CKcjs.stripUseClientDirective.call(void 0, transformedCode);
3536
+ transformedCode = _chunkF42U3R4Fcjs.stripUseClientDirective.call(void 0, transformedCode);
3504
3537
  transformed = true;
3505
- const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _315 => _315.getConfig, 'call', _316 => _316()]), () => ( options));
3538
+ const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _320 => _320.getConfig, 'call', _321 => _321()]), () => ( options));
3506
3539
  let isolatedModuleReference = null;
3507
- const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _317 => _317.config, 'access', _318 => _318.root]) || process.cwd();
3540
+ const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _322 => _322.config, 'access', _323 => _323.root]) || process.cwd();
3508
3541
  const cleanId = id.split("?", 1)[0];
3509
- const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _319 => _319.getRouteManager, 'call', _320 => _320(), 'access', _321 => _321.getIsolatedClientBoundaryModules, 'call', _322 => _322(root)])));
3510
- const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _323 => _323.has, 'call', _324 => _324(path5.resolve(cleanId))]) === true;
3511
- if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkC5S457CKcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3512
- isolatedModuleReference = _chunkXN2MB4QZcjs.toViteModuleId.call(void 0, cleanId, root);
3542
+ const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _324 => _324.getRouteManager, 'call', _325 => _325(), 'access', _326 => _326.getIsolatedClientBoundaryModules, 'call', _327 => _327(root)])));
3543
+ const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _328 => _328.has, 'call', _329 => _329(path5.resolve(cleanId))]) === true;
3544
+ if (_chunkRD623KW4cjs.isReactRenderer.call(void 0, _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && _chunkF42U3R4Fcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource)) {
3545
+ isolatedModuleReference = _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, cleanId, root);
3513
3546
  const transformedBoundary = transformIsolatedClientBoundaryModule({
3514
3547
  code: transformedCode,
3515
3548
  moduleReference: isolatedModuleReference,
3516
- islandStrategy: _nullishCoalesce(_chunkC5S457CKcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
3549
+ islandStrategy: _nullishCoalesce(_chunkF42U3R4Fcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
3517
3550
  parse: (source) => this.parse(source),
3518
- slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _325 => _325.experimental, 'optionalAccess', _326 => _326.serverComponents])) === "islands"
3551
+ slots: _chunkBPNOYILCcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _330 => _330.experimental, 'optionalAccess', _331 => _331.serverComponents])) === "islands"
3519
3552
  });
3520
3553
  if (!transformedBoundary) {
3521
3554
  this.error(
@@ -3545,7 +3578,7 @@ export const manifest = getManifest();
3545
3578
  );
3546
3579
  return;
3547
3580
  }` : "";
3548
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _327 => _327.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3581
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _332 => _332.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
3549
3582
  if (import.meta.hot) {
3550
3583
  import.meta.hot.accept((newModule) => {
3551
3584
  ${isolatedHmrUpdate}
@@ -3595,19 +3628,19 @@ if (import.meta.hot) {
3595
3628
  if (!routeManager) return;
3596
3629
  const { ssg: ssgPages, ssr: ssrRoutes } = await routeManager.collectSSGPages();
3597
3630
  if (ssgPages.length === 0) {
3598
- _chunkXN2MB4QZcjs.logger.info("No SSG pages found - all pages will use SSR");
3631
+ _chunkVQJYGZNXcjs.logger.info("No SSG pages found - all pages will use SSR");
3599
3632
  return;
3600
3633
  }
3601
- _chunkXN2MB4QZcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3602
- _chunkXN2MB4QZcjs.logger.info("Pre-rendering SSG pages...");
3603
- const outDir = path5.join(_optionalChain([server, 'optionalAccess', _328 => _328.config, 'access', _329 => _329.root]) || process.cwd(), options.outDir || "dist");
3634
+ _chunkVQJYGZNXcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
3635
+ _chunkVQJYGZNXcjs.logger.info("Pre-rendering SSG pages...");
3636
+ const outDir = path5.join(_optionalChain([server, 'optionalAccess', _333 => _333.config, 'access', _334 => _334.root]) || process.cwd(), options.outDir || "dist");
3604
3637
  const clientDir = path5.join(outDir, "client");
3605
3638
  for (const page of ssgPages) {
3606
3639
  try {
3607
3640
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
3608
3641
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
3609
3642
  const mod = await routeManager.loadRouteModule(page.filePath);
3610
- if (!_optionalChain([mod, 'optionalAccess', _330 => _330.default])) return;
3643
+ if (!_optionalChain([mod, 'optionalAccess', _335 => _335.default])) return;
3611
3644
  const { layouts } = routeManager.matchRoute(page.urlPath);
3612
3645
  const layoutModules = await Promise.all(
3613
3646
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -3617,7 +3650,7 @@ if (import.meta.hot) {
3617
3650
  const PageComponent = mod.default;
3618
3651
  const pageProps = {
3619
3652
  params: page.params,
3620
- searchParams: Promise.resolve({}),
3653
+ searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, {}),
3621
3654
  path: page.urlPath
3622
3655
  };
3623
3656
  let pageElement = React.createElement(
@@ -3639,7 +3672,7 @@ if (import.meta.hot) {
3639
3672
  const i18nSnapshot = _chunkRVGLYMJMcjs.getFarmI18nClientSnapshot.call(void 0, );
3640
3673
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
3641
3674
  const fullHtml = `<!DOCTYPE html>
3642
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _331 => _331.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3675
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _336 => _336.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
3643
3676
  <head>
3644
3677
  <meta charset="utf-8">
3645
3678
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -3657,10 +3690,10 @@ if (import.meta.hot) {
3657
3690
  fs2.mkdirSync(path5.dirname(outputPath), { recursive: true });
3658
3691
  fs2.writeFileSync(outputPath, fullHtml);
3659
3692
  const revalidateInfo = page.revalidate ? ` (revalidate: ${page.revalidate}s)` : "";
3660
- _chunkXN2MB4QZcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
3693
+ _chunkVQJYGZNXcjs.logger.success(` \u2713 ${page.urlPath}${revalidateInfo}`);
3661
3694
  });
3662
3695
  } catch (error) {
3663
- _chunkXN2MB4QZcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
3696
+ _chunkVQJYGZNXcjs.logger.error(` \u2717 ${page.urlPath}: ${error}`);
3664
3697
  }
3665
3698
  }
3666
3699
  const manifestPath = path5.join(outDir, "__ssg_manifest.json");
@@ -3676,9 +3709,9 @@ if (import.meta.hot) {
3676
3709
  2
3677
3710
  )
3678
3711
  );
3679
- _chunkXN2MB4QZcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
3712
+ _chunkVQJYGZNXcjs.logger.success(`SSG complete: ${ssgPages.length} pages pre-rendered`);
3680
3713
  } catch (error) {
3681
- _chunkXN2MB4QZcjs.logger.error(`SSG build failed: ${error}`);
3714
+ _chunkVQJYGZNXcjs.logger.error(`SSG build failed: ${error}`);
3682
3715
  }
3683
3716
  },
3684
3717
  async handleHotUpdate(ctx) {
@@ -3697,13 +3730,13 @@ if (import.meta.hot) {
3697
3730
  });
3698
3731
  }
3699
3732
  }
3700
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _332 => _332.getConfig, 'call', _333 => _333()]);
3733
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _337 => _337.getConfig, 'call', _338 => _338()]);
3701
3734
  const normalizedFile = file.replace(/\\/g, "/");
3702
3735
  if (currentFarmConfig && /\/route\.(?:ts|tsx|js|jsx)$/.test(normalizedFile) && _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, currentFarmConfig).some(
3703
- (appDir) => normalizedFile.startsWith(`${_chunkXN2MB4QZcjs.toPosixPath.call(void 0, appDir)}/api/`)
3736
+ (appDir) => normalizedFile.startsWith(`${_chunkVQJYGZNXcjs.toPosixPath.call(void 0, appDir)}/api/`)
3704
3737
  )) {
3705
3738
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3706
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _334 => _334(`updated ${file}`)]);
3739
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _339 => _339(`updated ${file}`)]);
3707
3740
  server2.ws.send({ type: "full-reload", path: "*" });
3708
3741
  return [];
3709
3742
  }
@@ -3713,7 +3746,7 @@ if (import.meta.hot) {
3713
3746
  for (const mod of modules) {
3714
3747
  server2.moduleGraph.invalidateModule(mod);
3715
3748
  }
3716
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _335 => _335(`updated ${file}`)]);
3749
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _340 => _340(`updated ${file}`)]);
3717
3750
  server2.ws.send({
3718
3751
  type: "full-reload",
3719
3752
  path: "*"
@@ -3726,20 +3759,20 @@ if (import.meta.hot) {
3726
3759
  for (const mod of modules) {
3727
3760
  server2.moduleGraph.invalidateModule(mod);
3728
3761
  }
3729
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _336 => _336(`updated ${file}`)]);
3762
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _341 => _341(`updated ${file}`)]);
3730
3763
  server2.ws.send({
3731
3764
  type: "full-reload",
3732
3765
  path: "*"
3733
3766
  });
3734
3767
  return [];
3735
3768
  }
3736
- if (apiRouteManager && _chunk6XFGJBYXcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
3737
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _337 => _337(`updated ${file}`)]);
3769
+ if (apiRouteManager && _chunkJYNNIGQOcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
3770
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _342 => _342(`updated ${file}`)]);
3738
3771
  }
3739
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _338 => _338.experimental, 'optionalAccess', _339 => _339.isolatedClientHydration]);
3740
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _340 => _340.getRouteManager, 'call', _341 => _341()]);
3772
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _343 => _343.experimental, 'optionalAccess', _344 => _344.isolatedClientHydration]);
3773
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _345 => _345.getRouteManager, 'call', _346 => _346()]);
3741
3774
  const isHydrationPlanSource = currentSrcRoot !== null && normalizedFile.startsWith(`${currentSrcRoot}/`) && /\.[cm]?[jt]sx?$/.test(normalizedFile);
3742
- const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _342 => _342.renderer])) && planRouteManager !== void 0;
3775
+ const tracksAsyncOwnerIslands = _chunkRD623KW4cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _347 => _347.renderer])) && planRouteManager !== void 0;
3743
3776
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
3744
3777
  const routeManager = planRouteManager;
3745
3778
  if (routeManager) {
@@ -3763,7 +3796,7 @@ if (import.meta.hot) {
3763
3796
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
3764
3797
  for (const boundary of /* @__PURE__ */ new Set([...previousBoundaries, ...nextBoundaries])) {
3765
3798
  if (previousBoundaries.has(boundary) === nextBoundaries.has(boundary)) continue;
3766
- for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkXN2MB4QZcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
3799
+ for (const mod of _nullishCoalesce(server2.moduleGraph.getModulesByFile(_chunkVQJYGZNXcjs.toPosixPath.call(void 0, boundary)), () => ( []))) {
3767
3800
  server2.moduleGraph.invalidateModule(mod);
3768
3801
  }
3769
3802
  }
@@ -3775,7 +3808,7 @@ if (import.meta.hot) {
3775
3808
  return [];
3776
3809
  }
3777
3810
  } catch (error) {
3778
- _chunkXN2MB4QZcjs.logger.warn(
3811
+ _chunkVQJYGZNXcjs.logger.warn(
3779
3812
  `[Farm.js] Could not refresh the client hydration plan after ${file}: ${error instanceof Error ? error.message : String(error)}`
3780
3813
  );
3781
3814
  return modules;
@@ -3786,7 +3819,7 @@ if (import.meta.hot) {
3786
3819
  if (normalizedFile.includes("middleware.")) {
3787
3820
  if (middlewareManager) {
3788
3821
  await middlewareManager.reload();
3789
- _chunkXN2MB4QZcjs.logger.success("\u2705 Middleware reloaded!");
3822
+ _chunkVQJYGZNXcjs.logger.success("\u2705 Middleware reloaded!");
3790
3823
  if (initialPluginManager) {
3791
3824
  for (const middleware of middlewareManager.getMiddlewares()) {
3792
3825
  await initialPluginManager.runHookParallel("middlewareDiscovered", {
@@ -3799,7 +3832,7 @@ if (import.meta.hot) {
3799
3832
  }
3800
3833
  return [];
3801
3834
  }
3802
- _optionalChain([farmApp, 'optionalAccess', _343 => _343.getRouteManager, 'call', _344 => _344(), 'access', _345 => _345.invalidateClientManifest, 'call', _346 => _346()]);
3835
+ _optionalChain([farmApp, 'optionalAccess', _348 => _348.getRouteManager, 'call', _349 => _349(), 'access', _350 => _350.invalidateClientManifest, 'call', _351 => _351()]);
3803
3836
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
3804
3837
  if (manifestModule) {
3805
3838
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -3855,12 +3888,12 @@ function isFarmClientVirtualId(id) {
3855
3888
  }
3856
3889
  function isClientEnvironment(context, loadOptions) {
3857
3890
  const environment = context.environment;
3858
- if (_optionalChain([environment, 'optionalAccess', _347 => _347.config, 'optionalAccess', _348 => _348.consumer])) return environment.config.consumer === "client";
3859
- if (_optionalChain([environment, 'optionalAccess', _349 => _349.name])) return environment.name === "client";
3860
- return _optionalChain([loadOptions, 'optionalAccess', _350 => _350.ssr]) !== true;
3891
+ if (_optionalChain([environment, 'optionalAccess', _352 => _352.config, 'optionalAccess', _353 => _353.consumer])) return environment.config.consumer === "client";
3892
+ if (_optionalChain([environment, 'optionalAccess', _354 => _354.name])) return environment.name === "client";
3893
+ return _optionalChain([loadOptions, 'optionalAccess', _355 => _355.ssr]) !== true;
3861
3894
  }
3862
3895
  function invalidateProgrammaticClientRouteModules(server) {
3863
- const graph = _optionalChain([server, 'access', _351 => _351.environments, 'optionalAccess', _352 => _352.client, 'optionalAccess', _353 => _353.moduleGraph]);
3896
+ const graph = _optionalChain([server, 'access', _356 => _356.environments, 'optionalAccess', _357 => _357.client, 'optionalAccess', _358 => _358.moduleGraph]);
3864
3897
  if (!graph) return;
3865
3898
  for (const [id, module] of graph.idToModuleMap) {
3866
3899
  if (_chunkE7QOEV5Zcjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -3874,7 +3907,7 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
3874
3907
  kind: parsed.kind,
3875
3908
  routePath: parsed.routePath,
3876
3909
  routesFile,
3877
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _354 => _354.routes, 'access', _355 => _355.get, 'call', _356 => _356(
3910
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _359 => _359.routes, 'access', _360 => _360.get, 'call', _361 => _361(
3878
3911
  _chunkJ37KTQIAcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
3879
3912
  )]),
3880
3913
  rendererServer: renderer.server,
@@ -3882,11 +3915,11 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
3882
3915
  });
3883
3916
  }
3884
3917
  function resolveRealModuleFile(filePath, root) {
3885
- const resolved = _nullishCoalesce(_chunkC5S457CKcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
3918
+ const resolved = _nullishCoalesce(_chunkF42U3R4Fcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
3886
3919
  try {
3887
- return _chunkXN2MB4QZcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
3920
+ return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
3888
3921
  } catch (e15) {
3889
- return _chunkXN2MB4QZcjs.toPosixPath.call(void 0, resolved);
3922
+ return _chunkVQJYGZNXcjs.toPosixPath.call(void 0, resolved);
3890
3923
  }
3891
3924
  }
3892
3925
  function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkRD623KW4cjs.REACT_RENDERER) {
@@ -4182,7 +4215,7 @@ export const OPTIONS = __farmRoute.methods.OPTIONS;
4182
4215
  `.trim();
4183
4216
  }
4184
4217
  function toProgrammaticRouteImportSpecifier(filePath, root) {
4185
- return root ? _chunkXN2MB4QZcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
4218
+ return root ? _chunkVQJYGZNXcjs.toViteModuleId.call(void 0, filePath, root) : filePath;
4186
4219
  }
4187
4220
  async function parseRouteModuleProps(routeModule, input) {
4188
4221
  if (typeof routeModule.__farmResolveRouteProps === "function") {
@@ -4196,17 +4229,17 @@ async function parseRouteModuleProps(routeModule, input) {
4196
4229
  }
4197
4230
  const schemas = routeModule.__farmRouteSchemas;
4198
4231
  const params = parseRouteModuleSchema(
4199
- _optionalChain([schemas, 'optionalAccess', _357 => _357.params]),
4232
+ _optionalChain([schemas, 'optionalAccess', _362 => _362.params]),
4200
4233
  input.props.params,
4201
4234
  "params",
4202
4235
  input.routePath
4203
4236
  );
4204
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _358 => _358.search]), input.search, "search", input.routePath);
4237
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _363 => _363.search]), input.search, "search", input.routePath);
4205
4238
  return {
4206
4239
  ...input.props,
4207
4240
  params,
4208
4241
  search,
4209
- searchParams: Promise.resolve(search)
4242
+ searchParams: _chunkSUCDVKUBcjs.createFarmSearchParams.call(void 0, search)
4210
4243
  };
4211
4244
  }
4212
4245
  function parseRouteModuleSchema(schema, value, label, routePath) {
@@ -4221,12 +4254,12 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
4221
4254
  }
4222
4255
  }
4223
4256
  function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterReact, renderer = _chunkRD623KW4cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
4224
- const providerClientCode = _chunkC5S457CKcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4257
+ const providerClientCode = _chunkF42U3R4Fcjs.generateFarmIntegrationProviderClientCode.call(void 0,
4225
4258
  integrationProviders,
4226
4259
  root,
4227
4260
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
4228
4261
  );
4229
- const clientPluginEntry = _chunkC5S457CKcjs.generateFarmClientPluginEntryCode.call(void 0,
4262
+ const clientPluginEntry = _chunkF42U3R4Fcjs.generateFarmClientPluginEntryCode.call(void 0,
4230
4263
  plugins,
4231
4264
  root,
4232
4265
  srcDir,
@@ -4235,7 +4268,7 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
4235
4268
  const appSetupPath = _chunkRD623KW4cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
4236
4269
  const rendererClientImports = _chunkRD623KW4cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
4237
4270
  import { hydrateRoot, createRoot } from 'react-dom/client'` : appSetupPath ? `import React, { hydrateRoot, createRoot, configureApp as __farmConfigureApp } from ${JSON.stringify(renderer.client)}
4238
- import __farmAppSetup from ${JSON.stringify(_chunkXN2MB4QZcjs.toViteModuleId.call(void 0, appSetupPath, root))}
4271
+ import __farmAppSetup from ${JSON.stringify(_chunkVQJYGZNXcjs.toViteModuleId.call(void 0, appSetupPath, root))}
4239
4272
  __farmConfigureApp(__farmAppSetup)` : `import React, { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}`;
4240
4273
  const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
4241
4274
  const docsAdapterImportBlock = _chunkSM2SYWARcjs.generateFarmDocsAdapterClientRuntime.call(void 0,
@@ -4274,7 +4307,7 @@ async function createFarmServerTreePageElement(source, pathname) {
4274
4307
  return null;
4275
4308
  }
4276
4309
  }
4277
- ${islandValues ? `${_chunkC5S457CKcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4310
+ ${islandValues ? `${_chunkF42U3R4Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
4278
4311
  let farmLastRouteState = null;
4279
4312
 
4280
4313
  // A hot update to a layout tree's client module renders the route again.
@@ -4294,7 +4327,7 @@ ${isolatedHydrationImport}
4294
4327
  import { installChunkErrorRecovery, SPARouter } from '@farm.js/core/client'
4295
4328
  import { createClientPluginManager } from '@farm.js/core/plugin/client'
4296
4329
  import { isFarmRouteActive } from '@farm.js/core/router'
4297
- import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
4330
+ import { isFarmBlockedNavigationURL, replayFarmQueuedInteraction, scheduleFarmIslandHydration, createFarmSearchParams, searchParamsToObject, setFarmBasePath, setFarmTrailingSlashPreference, stripFarmBasePath } from '@farm.js/core/internal/client-runtime'
4298
4331
  import { reviveDeferredData } from '@farm.js/core/deferred'
4299
4332
  import {
4300
4333
  createFarmDeploymentMismatchError,
@@ -5083,7 +5116,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
5083
5116
  return loadedLayouts;
5084
5117
  }
5085
5118
 
5086
- ${_chunkC5S457CKcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5119
+ ${_chunkF42U3R4Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
5087
5120
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
5088
5121
  let wrapped = element;
5089
5122
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -5119,7 +5152,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
5119
5152
  window.__FARM_PROPS__ = revivedProps;
5120
5153
  return {
5121
5154
  ...revivedProps,
5122
- searchParams: Promise.resolve(revivedProps.search ?? revivedProps.searchParams ?? {}),
5155
+ searchParams: createFarmSearchParams(revivedProps.search ?? revivedProps.searchParams ?? {}),
5123
5156
  path: revivedProps.path || path,
5124
5157
  };
5125
5158
  }
@@ -5128,7 +5161,7 @@ async function buildRouteComponentProps(pageModule, params, searchParams, path,
5128
5161
  const rawProps = {
5129
5162
  ...(existingProps || {}),
5130
5163
  params,
5131
- searchParams: Promise.resolve(searchParams),
5164
+ searchParams: createFarmSearchParams(searchParams),
5132
5165
  path,
5133
5166
  };
5134
5167
  // Keep top-level route errors inside the router's navigation transaction.
@@ -5934,9 +5967,9 @@ function generateClientManifest(bundle) {
5934
5967
  return manifest;
5935
5968
  }
5936
5969
  async function defineConfig(config = {}) {
5937
- const tailwindVitePlugin = await _chunkIXSMFKZ2cjs.loadTailwindVitePlugin.call(void 0, );
5970
+ const tailwindVitePlugin = await _chunkLNM57D3Hcjs.loadTailwindVitePlugin.call(void 0, );
5938
5971
  const appRoot = path5.resolve(config.root || process.cwd());
5939
- if (_optionalChain([config, 'access', _359 => _359.extends, 'optionalAccess', _360 => _360.length])) {
5972
+ if (_optionalChain([config, 'access', _364 => _364.extends, 'optionalAccess', _365 => _365.length])) {
5940
5973
  const { config: layeredConfig } = await import("./layers-DMRXRL7F.cjs").then(
5941
5974
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
5942
5975
  root: appRoot,
@@ -5946,11 +5979,11 @@ async function defineConfig(config = {}) {
5946
5979
  config = layeredConfig;
5947
5980
  }
5948
5981
  config.renderer = _chunkRD623KW4cjs.resolveFarmRenderer.call(void 0, config.renderer);
5949
- config.images = _chunkC5S457CKcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
5982
+ config.images = _chunkF42U3R4Fcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
5950
5983
  const rendererVitePlugins = await _chunkRD623KW4cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
5951
5984
  ssr: true
5952
5985
  });
5953
- const reactRefreshPlugins = _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) ? await _chunk4S7M63WXcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
5986
+ const reactRefreshPlugins = _chunkRD623KW4cjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkDGOLAZLVcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
5954
5987
  const nodeBuiltinStubs = {
5955
5988
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
5956
5989
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -6038,13 +6071,13 @@ async function defineConfig(config = {}) {
6038
6071
  if (!serverStarted) {
6039
6072
  serverStarted = true;
6040
6073
  const elapsed = Date.now() - startTime;
6041
- const address = _optionalChain([server, 'access', _361 => _361.httpServer, 'optionalAccess', _362 => _362.address, 'call', _363 => _363()]);
6074
+ const address = _optionalChain([server, 'access', _366 => _366.httpServer, 'optionalAccess', _367 => _367.address, 'call', _368 => _368()]);
6042
6075
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
6043
6076
  const hostConfig = server.config.server.host;
6044
6077
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
6045
6078
  console.log("");
6046
6079
  console.log(
6047
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkJ5VCA45Kcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6080
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkX5BCMLGPcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
6048
6081
  );
6049
6082
  console.log("");
6050
6083
  console.log(
@@ -6076,7 +6109,9 @@ async function defineConfig(config = {}) {
6076
6109
  };
6077
6110
  return {
6078
6111
  plugins: [
6079
- _chunkC5S457CKcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6112
+ // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
6113
+ _chunkDGOLAZLVcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
6114
+ _chunkF42U3R4Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
6080
6115
  tailwindVitePlugin,
6081
6116
  ...rendererVitePlugins,
6082
6117
  ...reactRefreshPlugins,
@@ -6090,8 +6125,8 @@ async function defineConfig(config = {}) {
6090
6125
  customLogger: farmLogger,
6091
6126
  clearScreen: false,
6092
6127
  optimizeDeps: {
6093
- ..._chunkC5S457CKcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6094
- _chunkC5S457CKcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6128
+ ..._chunkF42U3R4Fcjs.createFarmClientOptimizeDepsConfig.call(void 0,
6129
+ _chunkF42U3R4Fcjs.createFarmClientOptimizeDepsEntries.call(void 0,
6095
6130
  appRoot,
6096
6131
  _chunk5Y2P454Ocjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
6097
6132
  ),
@@ -6134,7 +6169,7 @@ async function defineConfig(config = {}) {
6134
6169
  // Stub out problematic server-only modules during dev mode
6135
6170
  alias: {
6136
6171
  ..._chunk5Y2P454Ocjs.getFarmLayerAliases.call(void 0, config.layers),
6137
- ..._chunkC5S457CKcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6172
+ ..._chunkF42U3R4Fcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
6138
6173
  // Nitro internals that should not be resolved in browser
6139
6174
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
6140
6175
  "@poppinss/dumper": "data:text/javascript,export default {};",