@farm.js/core 0.2.0-beta.1 → 0.2.0-beta.4

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 (691) hide show
  1. package/dist/THIRD-PARTY-LICENSES.md +3220 -0
  2. package/dist/after.cjs +3 -3
  3. package/dist/after.mjs +1 -1
  4. package/dist/{agent-mcp-handler-GDY5CPPW.mjs → agent-mcp-handler-BY7VJQ4W.mjs} +5 -5
  5. package/dist/agent-mcp-handler-S4UTE7NO.cjs +21 -0
  6. package/dist/{agent-mcp.d-CMGqpUbk.d.mts → agent-mcp.d-BdFnjlAT.d.mts} +1 -1
  7. package/dist/{agent-mcp.d-BdM0pIrD.d.ts → agent-mcp.d-CAwDC9y4.d.ts} +1 -1
  8. package/dist/agent-runtime.cjs +25 -22
  9. package/dist/agent-runtime.d.mts +1 -1
  10. package/dist/agent-runtime.d.ts +1 -1
  11. package/dist/agent-runtime.mjs +2 -2
  12. package/dist/analyzer-3AMJK27J.cjs +17 -0
  13. package/dist/{analyzer-RYSF2BM3.mjs → analyzer-K3S4YRAH.mjs} +3 -3
  14. package/dist/api/client.cjs +16 -16
  15. package/dist/api/client.mjs +1 -1
  16. package/dist/api/client.native.cjs +21 -18
  17. package/dist/api/client.native.mjs +1 -1
  18. package/dist/api/node.cjs +29 -26
  19. package/dist/api/node.d.mts +3 -3
  20. package/dist/api/node.d.ts +3 -3
  21. package/dist/api/node.mjs +1 -1
  22. package/dist/api/route-manager.cjs +45 -45
  23. package/dist/api/route-manager.d.mts +3 -3
  24. package/dist/api/route-manager.d.ts +3 -3
  25. package/dist/api/route-manager.mjs +4 -4
  26. package/dist/api/runtime.cjs +25 -25
  27. package/dist/api/runtime.d.mts +2 -2
  28. package/dist/api/runtime.d.ts +2 -2
  29. package/dist/api/runtime.mjs +1 -1
  30. package/dist/api.cjs +57 -57
  31. package/dist/api.d.mts +4 -4
  32. package/dist/api.d.ts +4 -4
  33. package/dist/api.mjs +5 -5
  34. package/dist/{app-manifest.d-BeDB2OVm.d.mts → app-manifest.d-COs1wBGz.d.mts} +1 -1
  35. package/dist/{app-manifest.d-COhjPgHn.d.ts → app-manifest.d-Dczk-fwt.d.ts} +1 -1
  36. package/dist/app-markdown-compiler-4RCCOTTF.cjs +33007 -0
  37. package/dist/app-markdown-compiler-OM2AMFRK.mjs +32402 -0
  38. package/dist/app-markdown.cjs +18 -16
  39. package/dist/app-markdown.d.mts +3 -3
  40. package/dist/app-markdown.d.ts +3 -3
  41. package/dist/app-markdown.mjs +8 -6
  42. package/dist/{app.d-CoY-zsJt.d.ts → app.d-DREl_yXh.d.ts} +26 -10
  43. package/dist/{app.d-DE5KNbmf.d.mts → app.d-LepnxO-5.d.mts} +26 -10
  44. package/dist/cache.cjs +8 -8
  45. package/dist/cache.mjs +1 -1
  46. package/dist/{chunk-AG27TI6Q.mjs → chunk-23NBOP43.mjs} +3 -0
  47. package/dist/{chunk-OLKYHTLN.cjs → chunk-25CHWAZY.cjs} +14 -10
  48. package/dist/{chunk-26WP75W5.cjs → chunk-27IPPPCV.cjs} +51 -40
  49. package/dist/{chunk-PHCJJJZV.cjs → chunk-2HC46EGU.cjs} +6 -2
  50. package/dist/{chunk-MF3IA2AW.cjs → chunk-2L4M6YUG.cjs} +6 -1
  51. package/dist/{chunk-YPAOC3FO.mjs → chunk-2ORWY3SE.mjs} +4 -4
  52. package/dist/{chunk-VGZIIOU6.cjs → chunk-2PSN2PUJ.cjs} +12 -8
  53. package/dist/{chunk-CIY74JLV.cjs → chunk-2RA2VIKN.cjs} +9 -5
  54. package/dist/{chunk-NZRAUCUL.cjs → chunk-2UV765GT.cjs} +26 -20
  55. package/dist/{chunk-A3LNXQJJ.cjs → chunk-2VLW3HWJ.cjs} +9 -2
  56. package/dist/{chunk-4EBC7EMW.cjs → chunk-323JTLXR.cjs} +6 -1
  57. package/dist/{chunk-7KJJ4SBS.cjs → chunk-32HGOX3M.cjs} +6 -1
  58. package/dist/{chunk-RKQOMG2X.cjs → chunk-3ACTVXZG.cjs} +9 -5
  59. package/dist/{chunk-N3H7UPBM.cjs → chunk-3EZHMZGD.cjs} +6 -1
  60. package/dist/{chunk-LQWIIBI2.cjs → chunk-3KLDTMIC.cjs} +6 -1
  61. package/dist/{chunk-OO7DYIJD.cjs → chunk-3YT7DIIS.cjs} +7 -1
  62. package/dist/{chunk-HR5GU4UU.cjs → chunk-4A6WSOZH.cjs} +55 -49
  63. package/dist/{chunk-E5UN4OWX.cjs → chunk-4JARM2QQ.cjs} +6 -1
  64. package/dist/{chunk-VGVRGGP4.cjs → chunk-4JCX33RZ.cjs} +13 -8
  65. package/dist/chunk-4RLFAN7T.cjs +6 -0
  66. package/dist/{chunk-OZUINP2P.cjs → chunk-4USE4SEU.cjs} +19 -15
  67. package/dist/{chunk-PENBZAHJ.cjs → chunk-57OAZCWQ.cjs} +6 -1
  68. package/dist/{chunk-TWFJJPE7.cjs → chunk-5BZ7PR3T.cjs} +42 -38
  69. package/dist/{chunk-JYQ6DGPW.cjs → chunk-5P3TZGS3.cjs} +52 -45
  70. package/dist/{chunk-2U2GRXP5.mjs → chunk-5UMPMVNF.mjs} +1 -1
  71. package/dist/{chunk-OZC2JPW6.cjs → chunk-5XYJ5KRN.cjs} +6 -1
  72. package/dist/{chunk-QKW6DLDT.cjs → chunk-5YT2ZSWS.cjs} +17 -13
  73. package/dist/{chunk-QCKSYYXK.cjs → chunk-63S7DAEG.cjs} +21 -17
  74. package/dist/{chunk-FDGYDQGL.cjs → chunk-66WIOZXX.cjs} +7 -1
  75. package/dist/{chunk-MHKPXX3J.cjs → chunk-6AUPJYHF.cjs} +13 -9
  76. package/dist/{chunk-DVJM55D2.cjs → chunk-6FIY4KBC.cjs} +6 -1
  77. package/dist/{chunk-TIZJYHB7.mjs → chunk-6IUWKO2Q.mjs} +15 -0
  78. package/dist/{chunk-VWIW47FW.cjs → chunk-6K7LEL2T.cjs} +6 -1
  79. package/dist/{chunk-UZCMMJJT.cjs → chunk-6NQ63L6N.cjs} +6 -1
  80. package/dist/{chunk-BTVDYS4B.cjs → chunk-6QCZWAGO.cjs} +6 -1
  81. package/dist/{chunk-RDADQG5S.cjs → chunk-6QWCFVGL.cjs} +14 -7
  82. package/dist/{chunk-JRGR5Z4K.cjs → chunk-6VC7NUY3.cjs} +6 -1
  83. package/dist/{chunk-CKPTIEDX.cjs → chunk-7BFFBYLN.cjs} +6 -1
  84. package/dist/{chunk-7Q7UB4TL.cjs → chunk-7GKZDRY2.cjs} +9 -5
  85. package/dist/{chunk-WP77JDKI.cjs → chunk-7JI7W2MD.cjs} +34 -30
  86. package/dist/{chunk-C7LCTVJ2.cjs → chunk-7JZVCHNF.cjs} +10 -6
  87. package/dist/{chunk-QZUCVJZJ.cjs → chunk-7M3X4CBY.cjs} +6 -1
  88. package/dist/{chunk-7JUIK547.cjs → chunk-7MQMWGTL.cjs} +6 -1
  89. package/dist/{chunk-PIUTGRDI.cjs → chunk-7O3YJ6NP.cjs} +6 -1
  90. package/dist/{chunk-SXCL2MIN.cjs → chunk-7V5MQSBL.cjs} +9 -1
  91. package/dist/{chunk-7U4XF76R.cjs → chunk-7ZDLE77P.cjs} +12 -8
  92. package/dist/{chunk-NU5XLYRN.cjs → chunk-A2ELHZBZ.cjs} +10 -1
  93. package/dist/{chunk-DMSXZNQR.cjs → chunk-ADCVSTFV.cjs} +18 -11
  94. package/dist/{chunk-ISSFWEPY.mjs → chunk-AGEBFYHF.mjs} +35 -18
  95. package/dist/{chunk-ND65INFS.cjs → chunk-AGT633OM.cjs} +27 -23
  96. package/dist/{chunk-WEZTGM7N.cjs → chunk-APKULXZV.cjs} +11 -9
  97. package/dist/chunk-AZJEQ5CR.cjs +6 -0
  98. package/dist/{chunk-ZMSVKVI3.cjs → chunk-B2VSX33T.cjs} +6 -1
  99. package/dist/{chunk-AQIRXBBY.cjs → chunk-B6JPBPBQ.cjs} +6 -1
  100. package/dist/{chunk-QBXS4TNG.mjs → chunk-BL54BTVJ.mjs} +1 -1
  101. package/dist/{chunk-W76C7TCW.cjs → chunk-BNVQSUZK.cjs} +6 -2
  102. package/dist/{chunk-MNUYXZV7.cjs → chunk-BNWADCG2.cjs} +6 -1
  103. package/dist/{chunk-CCAUIBIS.cjs → chunk-BRWSQDKO.cjs} +10 -1
  104. package/dist/{chunk-6BMAGVDI.cjs → chunk-C4DZAEVT.cjs} +48 -41
  105. package/dist/{chunk-KQS27YN7.cjs → chunk-C6DR4JAR.cjs} +14 -10
  106. package/dist/{chunk-Y3WG64CP.cjs → chunk-CH2JX3CM.cjs} +6 -1
  107. package/dist/{chunk-KQ6TYQU7.cjs → chunk-COMBIEAP.cjs} +44 -36
  108. package/dist/{chunk-YU2MNIIY.mjs → chunk-CRF5MOLO.mjs} +17 -4
  109. package/dist/{chunk-YUQUGVSV.cjs → chunk-CTTXHHZG.cjs} +50 -46
  110. package/dist/{chunk-FDZZ6K3N.cjs → chunk-CUW7K4AU.cjs} +14 -10
  111. package/dist/{chunk-NQ3Y6E2T.mjs → chunk-CV4MOEMO.mjs} +2 -2
  112. package/dist/chunk-CWSUKW2H.cjs +6 -0
  113. package/dist/{chunk-DZC2XGK4.mjs → chunk-D5OY5OKA.mjs} +132 -48
  114. package/dist/{chunk-T3SMMLSB.cjs → chunk-DB4NOIQC.cjs} +12 -8
  115. package/dist/{chunk-PKV3JGMS.mjs → chunk-DFLCEMQ3.mjs} +1 -1
  116. package/dist/{chunk-OWOUTKIJ.cjs → chunk-DQYMTSF3.cjs} +6 -1
  117. package/dist/{chunk-7V5M43ND.mjs → chunk-DVL3UVYT.mjs} +2 -2
  118. package/dist/{chunk-ZSVFI7JM.cjs → chunk-DVXT7RLV.cjs} +23 -18
  119. package/dist/{chunk-UNOXV37V.cjs → chunk-DYGHX2UR.cjs} +6 -1
  120. package/dist/{chunk-M3JYBZO2.cjs → chunk-E5AC7E25.cjs} +24 -20
  121. package/dist/{chunk-LSHX2H5G.cjs → chunk-EBE6BK54.cjs} +6 -1
  122. package/dist/{chunk-YNPVG2GG.mjs → chunk-EBVKVDQA.mjs} +1 -1
  123. package/dist/{chunk-WT6RAN2I.cjs → chunk-EGMJ5KEU.cjs} +6 -1
  124. package/dist/{chunk-22KXTL3I.cjs → chunk-EJLMRNSV.cjs} +24 -19
  125. package/dist/{chunk-RDNKQ5MK.cjs → chunk-EMM3YXXI.cjs} +19 -15
  126. package/dist/{chunk-EACD6ND7.cjs → chunk-ERSLQ4C7.cjs} +18 -11
  127. package/dist/{chunk-4WXNTAOM.mjs → chunk-EUVHELJL.mjs} +1 -1
  128. package/dist/{chunk-J6TZRYCO.cjs → chunk-F5JTXLS7.cjs} +6 -1
  129. package/dist/{chunk-FLKG2PYH.cjs → chunk-F5T55PYX.cjs} +103 -95
  130. package/dist/{chunk-N2ZMSSPP.cjs → chunk-FYVSAWJP.cjs} +77 -70
  131. package/dist/{chunk-HUGPJFOC.cjs → chunk-G22QP2MX.cjs} +9 -5
  132. package/dist/{chunk-PMJSG4JS.cjs → chunk-G5KGLMPN.cjs} +6 -1
  133. package/dist/{chunk-R5U7OIPI.cjs → chunk-GAII22G2.cjs} +6 -1
  134. package/dist/{chunk-6CTFVBAT.cjs → chunk-GKYOFMPQ.cjs} +6 -1
  135. package/dist/{chunk-JYT7AN37.cjs → chunk-GLP3ID53.cjs} +6 -1
  136. package/dist/{chunk-QBJ6N5MT.mjs → chunk-GN2RXH72.mjs} +1 -1
  137. package/dist/{chunk-RQRTH57V.cjs → chunk-GQONHUMI.cjs} +6 -1
  138. package/dist/{chunk-EOXPRC2C.cjs → chunk-GQQID5IB.cjs} +7 -1
  139. package/dist/{chunk-IUKBPBM7.cjs → chunk-GUDYDNKU.cjs} +6 -1
  140. package/dist/{chunk-6GJZJAED.mjs → chunk-GUNPDMSX.mjs} +1 -1
  141. package/dist/{chunk-KCJBIWBM.mjs → chunk-GVORDLLV.mjs} +1 -1
  142. package/dist/{chunk-ZZGQD3LL.mjs → chunk-GXWCR7PP.mjs} +11 -5
  143. package/dist/{chunk-VS7HLH4S.cjs → chunk-GYH2B4YQ.cjs} +12 -8
  144. package/dist/{chunk-IJPRCQHW.cjs → chunk-H3TYWCMG.cjs} +18 -14
  145. package/dist/{chunk-2OF5RPVU.cjs → chunk-H5AC3XSE.cjs} +18 -14
  146. package/dist/{chunk-ZIOFRBIU.cjs → chunk-H7INTSUK.cjs} +15 -9
  147. package/dist/{chunk-RFNQTQ44.cjs → chunk-HBRCMX24.cjs} +10 -5
  148. package/dist/{chunk-XRSNW4IU.mjs → chunk-HDZ2AMDD.mjs} +5 -0
  149. package/dist/{chunk-UA77C2ZA.cjs → chunk-HF3JJPH4.cjs} +58 -50
  150. package/dist/{chunk-CPMK7EFR.mjs → chunk-HFOME6I2.mjs} +7 -7
  151. package/dist/{chunk-XGL42MQ7.mjs → chunk-HIDZM23B.mjs} +1 -1
  152. package/dist/{chunk-T7UC2ORA.cjs → chunk-HP7QYVST.cjs} +7 -1
  153. package/dist/{chunk-JP5TWUK2.cjs → chunk-HSAHQBMG.cjs} +8 -4
  154. package/dist/{chunk-3BTN3NP7.cjs → chunk-I5PDHLKE.cjs} +6 -2
  155. package/dist/{chunk-L4B7PB3H.cjs → chunk-IASZIYNM.cjs} +1384 -757
  156. package/dist/{chunk-2RSVYJT6.cjs → chunk-IBZW57NW.cjs} +9 -5
  157. package/dist/{chunk-KORZ6PRE.cjs → chunk-IDUGG7VR.cjs} +6 -1
  158. package/dist/{chunk-6JHZPB52.cjs → chunk-IEZFFXSC.cjs} +10 -6
  159. package/dist/{chunk-VACYUMXW.cjs → chunk-IGA3OTFY.cjs} +37 -29
  160. package/dist/{chunk-4ZVKDHS6.cjs → chunk-IGBQSUT5.cjs} +55 -40
  161. package/dist/{chunk-OQOII62L.mjs → chunk-II4ENBE4.mjs} +1 -1
  162. package/dist/{chunk-JIBEFLQ7.cjs → chunk-IKYNDANT.cjs} +7 -1
  163. package/dist/{chunk-Z43CIBUR.cjs → chunk-IU4YTFFQ.cjs} +16 -12
  164. package/dist/{chunk-KBGZ5FD6.cjs → chunk-IVEV44O2.cjs} +6 -2
  165. package/dist/{chunk-MCSRMEQV.cjs → chunk-J2JMESBJ.cjs} +6 -1
  166. package/dist/{chunk-WMRGIQTA.cjs → chunk-J3RIMCBD.cjs} +6 -1
  167. package/dist/{chunk-N4AQNEXR.cjs → chunk-JIBZ6SCC.cjs} +6 -1
  168. package/dist/{chunk-IZYFP7IN.cjs → chunk-JOSR2E2C.cjs} +17 -13
  169. package/dist/{chunk-AOKXITZ6.cjs → chunk-JOZDAIKZ.cjs} +6 -1
  170. package/dist/{chunk-NG2EZ6QS.cjs → chunk-JYQMGMKT.cjs} +20 -6
  171. package/dist/{chunk-J6RFB324.cjs → chunk-JZCUDAH2.cjs} +6 -1
  172. package/dist/{chunk-ECVSRE4Y.mjs → chunk-K44IR6WC.mjs} +1 -1
  173. package/dist/{chunk-SUCDVKUB.cjs → chunk-K6LZMZNB.cjs} +6 -1
  174. package/dist/{chunk-GYJT2U7J.cjs → chunk-KAD5WBY4.cjs} +9 -5
  175. package/dist/{chunk-52Q4OB4A.cjs → chunk-KBURN62Z.cjs} +10 -6
  176. package/dist/{chunk-O4JYMU5N.cjs → chunk-KDUVIJSZ.cjs} +22 -18
  177. package/dist/{chunk-2LHZD3OP.cjs → chunk-KEBD377T.cjs} +6 -2
  178. package/dist/{chunk-3DE6RK7K.cjs → chunk-KHTJVI6B.cjs} +6 -1
  179. package/dist/{chunk-OY5XDG24.cjs → chunk-KI3B3H5K.cjs} +9 -5
  180. package/dist/{chunk-KRU3XPOW.cjs → chunk-KM7ZRKCH.cjs} +61 -49
  181. package/dist/{chunk-P2355C6E.cjs → chunk-KSRWTQ6J.cjs} +6 -1
  182. package/dist/{chunk-SHIWRBFI.cjs → chunk-KUG3P3GY.cjs} +6 -1
  183. package/dist/{chunk-T7HGXF7D.cjs → chunk-KXCPX3HE.cjs} +11 -7
  184. package/dist/{chunk-C5QHZ626.cjs → chunk-KXXZDS7C.cjs} +6 -1
  185. package/dist/{chunk-DUIP64BF.cjs → chunk-KYFTDHNN.cjs} +6 -1
  186. package/dist/{chunk-VXCFJWK5.cjs → chunk-L6CW5AWM.cjs} +6 -1
  187. package/dist/{chunk-XGPRM7OK.cjs → chunk-LEK3P2ZD.cjs} +16 -7
  188. package/dist/{chunk-HA7YRO53.cjs → chunk-LF7HAALM.cjs} +6 -1
  189. package/dist/{chunk-2KMIJDY6.cjs → chunk-LG62AYPQ.cjs} +6 -1
  190. package/dist/{chunk-SMUW7UST.mjs → chunk-LO5BNR6Y.mjs} +7 -2
  191. package/dist/{chunk-4A6A6P4T.mjs → chunk-LOQVWATF.mjs} +2 -2
  192. package/dist/{chunk-PEQJ4UUT.mjs → chunk-LP6DIYGA.mjs} +2 -2
  193. package/dist/{chunk-PWDBWXQI.cjs → chunk-LVYUTMW4.cjs} +6 -1
  194. package/dist/{chunk-EBKYRP2P.mjs → chunk-LWQ6IESX.mjs} +1 -1
  195. package/dist/{chunk-XRRHPBG2.cjs → chunk-M6W3AN57.cjs} +6 -1
  196. package/dist/{chunk-PZXYAWYG.cjs → chunk-M7RS7HSB.cjs} +13 -8
  197. package/dist/{chunk-27ESPHQA.cjs → chunk-MBDDLYT5.cjs} +59 -38
  198. package/dist/{chunk-CEVXKJKF.cjs → chunk-MMSCWTJT.cjs} +6 -1
  199. package/dist/{chunk-OOOUYA6L.mjs → chunk-MRDI6MTL.mjs} +8 -8
  200. package/dist/{chunk-B3HQTGXS.cjs → chunk-N4AM7Q34.cjs} +83 -74
  201. package/dist/{chunk-DXUXQP2T.cjs → chunk-N4C72FCD.cjs} +6 -1
  202. package/dist/{chunk-H7REG7OX.cjs → chunk-NKW4JEOH.cjs} +13 -9
  203. package/dist/{chunk-XRFGOYXG.cjs → chunk-NMMCBJZM.cjs} +17 -12
  204. package/dist/{chunk-FJGA3XWL.cjs → chunk-NNHIV3O2.cjs} +9 -2
  205. package/dist/{chunk-SHDCKRP4.cjs → chunk-NQUZDXKJ.cjs} +7 -3
  206. package/dist/{chunk-Y3DO7BIJ.cjs → chunk-O7B6LJWE.cjs} +10 -3
  207. package/dist/{chunk-5GFTMTX3.cjs → chunk-OBERQH7M.cjs} +42 -37
  208. package/dist/{chunk-NW3DL2PM.cjs → chunk-OCQSYDMG.cjs} +11 -4
  209. package/dist/{chunk-ZNXU4E6A.cjs → chunk-OSLI2SCA.cjs} +83 -72
  210. package/dist/{chunk-HLYRXN2I.cjs → chunk-OUOUPA37.cjs} +6 -1
  211. package/dist/{chunk-YIGUFJMR.cjs → chunk-OVSK47CZ.cjs} +6 -1
  212. package/dist/{chunk-ATYTLVSI.cjs → chunk-OX63SW6N.cjs} +7 -1
  213. package/dist/{chunk-YKHRCY4T.cjs → chunk-P2LSRUQB.cjs} +6 -1
  214. package/dist/{chunk-XJDB564A.cjs → chunk-P4ZLFUNB.cjs} +7 -2
  215. package/dist/{chunk-2OFP3IVA.cjs → chunk-P5RNGH52.cjs} +32 -18
  216. package/dist/{chunk-VZWAXQME.mjs → chunk-P67RLOMO.mjs} +34 -2
  217. package/dist/{chunk-6FXBJPF5.cjs → chunk-PCF54MSR.cjs} +6 -1
  218. package/dist/{chunk-GVYZCJZH.cjs → chunk-PHYSFHJK.cjs} +6 -1
  219. package/dist/{chunk-4DCWVSL2.cjs → chunk-PHZ7MLRQ.cjs} +6 -1
  220. package/dist/{chunk-PCAEJNQF.cjs → chunk-PNMRXZS5.cjs} +13 -9
  221. package/dist/{chunk-HS4JPIGR.cjs → chunk-PRKFECGT.cjs} +7 -3
  222. package/dist/{chunk-OIPPISQ6.cjs → chunk-PSALMEHJ.cjs} +431 -212
  223. package/dist/{chunk-YUCU6XB4.cjs → chunk-PYPHM7AS.cjs} +9 -4
  224. package/dist/{chunk-ZPQY7O64.cjs → chunk-QBCR2EHA.cjs} +9 -5
  225. package/dist/{chunk-H7OFZJCV.cjs → chunk-QBMMQS25.cjs} +14 -8
  226. package/dist/{chunk-Y2FEFQAY.cjs → chunk-QCVP22KW.cjs} +8 -5
  227. package/dist/{chunk-J3GFOQOL.cjs → chunk-QGJL7EPX.cjs} +13 -9
  228. package/dist/{chunk-2PE5STAR.cjs → chunk-QHHEL4ZO.cjs} +6 -2
  229. package/dist/{chunk-LTOT5KVJ.mjs → chunk-QKXQFBNL.mjs} +1 -1
  230. package/dist/{chunk-L6E5BSNU.cjs → chunk-QT7MJL5E.cjs} +7 -3
  231. package/dist/{chunk-ERMUL73L.cjs → chunk-QTGYT2DF.cjs} +6 -1
  232. package/dist/{chunk-WBTHHTBO.cjs → chunk-QW5I5D5T.cjs} +6 -1
  233. package/dist/{chunk-IIHZ2BEE.cjs → chunk-QZRFEHMS.cjs} +15 -11
  234. package/dist/{chunk-HXNLKCWH.cjs → chunk-QZVPBDF7.cjs} +6 -1
  235. package/dist/{chunk-W53Z4WDI.cjs → chunk-R6GOH5CH.cjs} +18 -14
  236. package/dist/{chunk-2BEGVSDF.cjs → chunk-RBDAW6IZ.cjs} +7 -3
  237. package/dist/{chunk-PLJMEUAN.cjs → chunk-RFKPIAOF.cjs} +9 -1
  238. package/dist/{chunk-HQEYZSF3.cjs → chunk-RGIHE6YL.cjs} +6 -2
  239. package/dist/{chunk-6B44ZU5P.cjs → chunk-RHORD2K2.cjs} +19 -15
  240. package/dist/{chunk-5AL2GXAU.mjs → chunk-RKWZ6F5D.mjs} +2 -2
  241. package/dist/{chunk-OCS3PSYR.cjs → chunk-RLC7NNTA.cjs} +6 -1
  242. package/dist/{chunk-STF6VDYQ.cjs → chunk-RQSPBWXJ.cjs} +6 -1
  243. package/dist/{chunk-RWR7SMD7.cjs → chunk-S2QSTMBE.cjs} +7 -3
  244. package/dist/{chunk-HZY63K5C.mjs → chunk-S6MGFULY.mjs} +2 -2
  245. package/dist/{chunk-GCJ4GNMC.cjs → chunk-SGBEJBBB.cjs} +8 -4
  246. package/dist/chunk-SGRWZEQC.cjs +44 -0
  247. package/dist/{chunk-NDMPGFKL.cjs → chunk-SIQPXYBB.cjs} +6 -1
  248. package/dist/{chunk-2HTNASSB.cjs → chunk-SM4Y7CL4.cjs} +10 -6
  249. package/dist/{chunk-UNJZGVPU.cjs → chunk-SQ5O5EDN.cjs} +6 -1
  250. package/dist/{chunk-A25FXJ7D.cjs → chunk-SWOJU7LI.cjs} +6 -1
  251. package/dist/{chunk-BNH53KOT.cjs → chunk-SZBBBLLS.cjs} +6 -1
  252. package/dist/{chunk-23BZ7ZH6.mjs → chunk-T4NOMZTS.mjs} +7 -4
  253. package/dist/{chunk-ML4TOUZP.cjs → chunk-T4YCWRCJ.cjs} +6 -1
  254. package/dist/{chunk-NDOE76QC.cjs → chunk-TDAH76RR.cjs} +8 -4
  255. package/dist/{chunk-D22BUQKW.cjs → chunk-TFCBJFP7.cjs} +6 -1
  256. package/dist/{chunk-ICOJ2BC6.mjs → chunk-TP3ISVRU.mjs} +26 -19
  257. package/dist/{chunk-3EIPOTZV.cjs → chunk-TP7JAC3T.cjs} +6 -2
  258. package/dist/{chunk-4IE3YK7U.mjs → chunk-TQCDN4DV.mjs} +1 -1
  259. package/dist/{chunk-FB4CWSC2.cjs → chunk-TSLXAEGM.cjs} +16 -12
  260. package/dist/{chunk-2NOHVIJ3.cjs → chunk-U2HFXURZ.cjs} +36 -13
  261. package/dist/{chunk-SHD265HW.cjs → chunk-U3NUGF2E.cjs} +7 -1
  262. package/dist/{chunk-SVXOCTQ2.cjs → chunk-UARKTC55.cjs} +6 -1
  263. package/dist/{chunk-KBIM7PFQ.cjs → chunk-UBH2OARS.cjs} +758 -643
  264. package/dist/{chunk-WX752VMN.mjs → chunk-UCRNNDNS.mjs} +1 -1
  265. package/dist/{chunk-UZM3PDKK.cjs → chunk-UGL4BDNB.cjs} +27 -3
  266. package/dist/{chunk-GBMWLDCC.cjs → chunk-UHTXBC4Q.cjs} +7 -1
  267. package/dist/{chunk-47JV57DA.cjs → chunk-UOFTT6S4.cjs} +6 -1
  268. package/dist/{chunk-MO4UTDQ6.mjs → chunk-V36K4TSU.mjs} +2 -2
  269. package/dist/{chunk-SPKZCFPH.mjs → chunk-V5F6HN7E.mjs} +4 -4
  270. package/dist/{chunk-I2RBHZF7.cjs → chunk-VB7P66Q4.cjs} +6 -1
  271. package/dist/{chunk-BIAGSYIZ.cjs → chunk-VD7ENQP2.cjs} +54 -47
  272. package/dist/{chunk-NVXU5BEG.mjs → chunk-VGX75645.mjs} +266 -61
  273. package/dist/{chunk-NLBHLPEO.cjs → chunk-VIDUNAQE.cjs} +6 -1
  274. package/dist/{chunk-6ETHVRFO.cjs → chunk-VMIR4SUL.cjs} +760 -714
  275. package/dist/{chunk-VM57CK74.cjs → chunk-VNWKJOJF.cjs} +6 -1
  276. package/dist/{chunk-HENPVGZC.cjs → chunk-VQYGXWCS.cjs} +103 -63
  277. package/dist/{chunk-AMMFRXFW.mjs → chunk-VS4ABIJJ.mjs} +1 -1
  278. package/dist/{chunk-MPU5DOXX.cjs → chunk-VUCDMV3Q.cjs} +6 -1
  279. package/dist/{chunk-CIQCJ72N.mjs → chunk-VVIO7QGN.mjs} +772 -176
  280. package/dist/{chunk-L2GUEYHR.cjs → chunk-VZ2P6GRC.cjs} +8 -1
  281. package/dist/{chunk-3SPECQXI.cjs → chunk-W4KSV6GX.cjs} +13 -9
  282. package/dist/{chunk-KMGHXIDA.cjs → chunk-W4WFKRLR.cjs} +17 -13
  283. package/dist/chunk-W7BMZI3I.cjs +6 -0
  284. package/dist/{chunk-HR4N2K4V.mjs → chunk-WABOJXAA.mjs} +2 -2
  285. package/dist/{chunk-LTXKRIST.mjs → chunk-WANLI3ZC.mjs} +2 -2
  286. package/dist/{chunk-SNP33A33.cjs → chunk-WCPGU6J6.cjs} +6 -1
  287. package/dist/{chunk-2OR5WAD5.cjs → chunk-WFNL24R6.cjs} +58 -43
  288. package/dist/{chunk-XOFJUSWC.cjs → chunk-WJ5ADUI2.cjs} +18 -14
  289. package/dist/{chunk-Z7ZRBCAB.mjs → chunk-WLOIUPV2.mjs} +97 -66
  290. package/dist/{chunk-TE7AX6HB.mjs → chunk-WV63R4GE.mjs} +1 -1
  291. package/dist/{chunk-JCYDWJVO.cjs → chunk-WZSLDPVZ.cjs} +13 -9
  292. package/dist/{chunk-O5YM6GU3.mjs → chunk-X2TC6PBK.mjs} +1 -1
  293. package/dist/{chunk-BSX5OGSD.cjs → chunk-XE3E4MER.cjs} +24 -20
  294. package/dist/{chunk-3BIASUGR.cjs → chunk-XEPUUTGC.cjs} +6 -1
  295. package/dist/{chunk-HQKCSJEH.cjs → chunk-XH4GQ7MT.cjs} +17 -10
  296. package/dist/{chunk-SIECKBNK.cjs → chunk-XJEOHDPN.cjs} +6 -1
  297. package/dist/{chunk-5AMH6AFA.cjs → chunk-XK7SRVHC.cjs} +15 -11
  298. package/dist/chunk-XPVS4HKU.cjs +16 -0
  299. package/dist/{chunk-WKVYF2B5.cjs → chunk-XSJYXUY6.cjs} +6 -1
  300. package/dist/{chunk-5DX3O6TT.cjs → chunk-XSLYRNNA.cjs} +8 -4
  301. package/dist/{chunk-UUQNJDGH.cjs → chunk-XTQPYWQW.cjs} +6 -1
  302. package/dist/{chunk-3HLQTOVU.cjs → chunk-XVD5Y6S4.cjs} +6 -1
  303. package/dist/{chunk-7Q2YWZF7.cjs → chunk-XXBWKAJF.cjs} +14 -10
  304. package/dist/{chunk-YDXLC4DW.cjs → chunk-XZ6L3FUU.cjs} +6 -1
  305. package/dist/{chunk-FZ7OUN5M.cjs → chunk-Y3HLU2XL.cjs} +6 -2
  306. package/dist/{chunk-I2BYNELA.cjs → chunk-Y6WRVFD6.cjs} +9 -5
  307. package/dist/{chunk-OOZEU5KK.cjs → chunk-YC3LKWJO.cjs} +6 -1
  308. package/dist/{chunk-SXXSQVKK.cjs → chunk-YCIFGYBY.cjs} +13 -8
  309. package/dist/{chunk-CYOTNHDF.cjs → chunk-YHALJBYT.cjs} +6 -2
  310. package/dist/{chunk-WOAXQ5MZ.cjs → chunk-YLEL4ZRQ.cjs} +18 -14
  311. package/dist/{chunk-WEGAVN37.cjs → chunk-YMJK6VWQ.cjs} +6 -1
  312. package/dist/{chunk-2HW5LWAH.cjs → chunk-YQ5NVEFS.cjs} +6 -1
  313. package/dist/{chunk-AQLHD6HZ.cjs → chunk-YQXLBYY2.cjs} +20 -11
  314. package/dist/{chunk-IBEHVSU4.cjs → chunk-YUV5XXDC.cjs} +6 -1
  315. package/dist/{chunk-PWMJBCAN.cjs → chunk-YV47TSSB.cjs} +7 -3
  316. package/dist/{chunk-X333W5KV.cjs → chunk-YZMSJRM5.cjs} +6 -1
  317. package/dist/{chunk-VFMHE5D3.cjs → chunk-Z23OCU33.cjs} +29 -25
  318. package/dist/{chunk-DBYNZIIQ.cjs → chunk-Z2JQR56W.cjs} +6 -1
  319. package/dist/{chunk-RK3YYUX6.cjs → chunk-ZKVA2TV6.cjs} +6 -1
  320. package/dist/{chunk-SAPG45RA.cjs → chunk-ZPZGC6OD.cjs} +31 -27
  321. package/dist/{chunk-DV52ZS53.cjs → chunk-ZRRNF26T.cjs} +6 -2
  322. package/dist/{chunk-PO5MXV5X.cjs → chunk-ZSSBEPN4.cjs} +6 -1
  323. package/dist/{cli-runtime.d-qL44rqYO.d.mts → cli-runtime.d-BGaFPum1.d.mts} +5 -5
  324. package/dist/{cli-runtime.d-jqZ7YCsm.d.ts → cli-runtime.d-Bvfxt4uo.d.ts} +5 -5
  325. package/dist/client/lifecycle.cjs +8 -3
  326. package/dist/client/lifecycle.mjs +1 -1
  327. package/dist/{client-component.d-B2L2LyAr.d.mts → client-component.d-BA6kXI5L.d.mts} +1 -1
  328. package/dist/{client-component.d-BDD5aiUb.d.ts → client-component.d-LSEmRhuI.d.ts} +1 -1
  329. package/dist/client-plugins.cjs +8 -3
  330. package/dist/{client-plugins.d-Crct3m_r.d.ts → client-plugins.d-CQ6AGHP0.d.ts} +44 -4
  331. package/dist/{client-plugins.d-Dzc3vOw_.d.mts → client-plugins.d-CVUMc2ai.d.mts} +44 -4
  332. package/dist/client-plugins.d.mts +1 -1
  333. package/dist/client-plugins.d.ts +1 -1
  334. package/dist/client-plugins.mjs +1 -1
  335. package/dist/client.cjs +51 -51
  336. package/dist/client.d.mts +7 -7
  337. package/dist/client.d.ts +7 -7
  338. package/dist/client.mjs +4 -4
  339. package/dist/config.cjs +3 -3
  340. package/dist/config.d.mts +1 -1
  341. package/dist/config.d.ts +1 -1
  342. package/dist/config.mjs +1 -1
  343. package/dist/cron.cjs +9 -9
  344. package/dist/cron.mjs +1 -1
  345. package/dist/deferred.cjs +3 -3
  346. package/dist/deferred.mjs +1 -1
  347. package/dist/deployment.cjs +3 -3
  348. package/dist/deployment.mjs +1 -1
  349. package/dist/desktop.cjs +4 -1
  350. package/dist/desktop.d.mts +2 -2
  351. package/dist/desktop.d.ts +2 -2
  352. package/dist/desktop.mjs +1 -1
  353. package/dist/{dev-guard-VIEEA4LS.cjs → dev-guard-M3ZCDWCK.cjs} +14 -11
  354. package/dist/{dev-guard-K3GJDPEQ.mjs → dev-guard-TFVWJNIB.mjs} +2 -2
  355. package/dist/{devtools-JTJA2KIZ.cjs → devtools-OBQY3XOY.cjs} +72 -69
  356. package/dist/{devtools-5DBTT2DI.mjs → devtools-RYTO2V7G.mjs} +7 -7
  357. package/dist/{devtools-client-BKBCCORT.cjs → devtools-client-3K67NMWA.cjs} +7 -4
  358. package/dist/{devtools-client-L4MUWD6K.mjs → devtools-client-WAMA6Q77.mjs} +1 -1
  359. package/dist/{devtools-ui-C2EMF2SO.cjs → devtools-ui-TPBPQEEB.cjs} +4 -1
  360. package/dist/{devtools-ui-BOG33MT5.mjs → devtools-ui-UYEVDADD.mjs} +1 -1
  361. package/dist/docs.cjs +72 -72
  362. package/dist/docs.d.mts +3 -3
  363. package/dist/docs.d.ts +3 -3
  364. package/dist/docs.mjs +9 -9
  365. package/dist/env-types.cjs +4 -4
  366. package/dist/env-types.mjs +1 -1
  367. package/dist/env.cjs +4 -4
  368. package/dist/env.mjs +1 -1
  369. package/dist/environment/vite.cjs +16 -16
  370. package/dist/environment/vite.mjs +3 -3
  371. package/dist/environment.cjs +3 -3
  372. package/dist/environment.mjs +1 -1
  373. package/dist/font.cjs +3 -3
  374. package/dist/font.mjs +1 -1
  375. package/dist/{handler.d-B1S1ZBqS.d.mts → handler.d-DLKZDAYR.d.mts} +1 -1
  376. package/dist/{handler.d-ZweCBJD4.d.ts → handler.d-nkrNn_0M.d.ts} +1 -1
  377. package/dist/headers.cjs +6 -6
  378. package/dist/{headers.d-C-yGl_f6.d.mts → headers.d-C3k520Fc.d.mts} +1 -1
  379. package/dist/{headers.d-BgBdQN8x.d.ts → headers.d-DVBrYnqP.d.ts} +1 -1
  380. package/dist/headers.mjs +1 -1
  381. package/dist/i18n/client.cjs +23 -20
  382. package/dist/i18n/client.mjs +1 -1
  383. package/dist/i18n/index.cjs +12 -7
  384. package/dist/i18n/index.mjs +1 -1
  385. package/dist/i18n/server.cjs +11 -11
  386. package/dist/i18n/server.mjs +1 -1
  387. package/dist/image/server.cjs +8 -8
  388. package/dist/image/server.mjs +1 -1
  389. package/dist/image/sharp.cjs +21 -18
  390. package/dist/image/sharp.mjs +1 -1
  391. package/dist/image.cjs +7 -4
  392. package/dist/image.mjs +1 -1
  393. package/dist/index.cjs +232 -216
  394. package/dist/{index.d-13h3oDu7.d.mts → index.d-5PDB032w.d.mts} +1 -1
  395. package/dist/{index.d-CtoniAXT.d.ts → index.d-e5WhoB07.d.ts} +1 -1
  396. package/dist/index.d.mts +23 -23
  397. package/dist/index.d.ts +23 -23
  398. package/dist/index.mjs +53 -49
  399. package/dist/instrumentation.cjs +5 -5
  400. package/dist/instrumentation.mjs +1 -1
  401. package/dist/integrations/orm.cjs +7 -7
  402. package/dist/integrations/orm.d.mts +1 -1
  403. package/dist/integrations/orm.d.ts +1 -1
  404. package/dist/integrations/orm.mjs +3 -3
  405. package/dist/integrations.cjs +24 -22
  406. package/dist/integrations.d.mts +1 -1
  407. package/dist/integrations.d.ts +1 -1
  408. package/dist/integrations.mjs +4 -2
  409. package/dist/internal/app-markdown-runtime.cjs +16 -14
  410. package/dist/internal/app-markdown-runtime.d.mts +10 -5
  411. package/dist/internal/app-markdown-runtime.d.ts +10 -5
  412. package/dist/internal/app-markdown-runtime.mjs +7 -5
  413. package/dist/internal/build-runtime.cjs +186 -181
  414. package/dist/internal/build-runtime.d.mts +4 -4
  415. package/dist/internal/build-runtime.d.ts +4 -4
  416. package/dist/internal/build-runtime.mjs +38 -38
  417. package/dist/internal/cli-runtime.cjs +105 -100
  418. package/dist/internal/cli-runtime.d.mts +7 -7
  419. package/dist/internal/cli-runtime.d.ts +7 -7
  420. package/dist/internal/cli-runtime.mjs +17 -17
  421. package/dist/internal/client-error-overlay.cjs +12 -9
  422. package/dist/internal/client-error-overlay.mjs +2 -2
  423. package/dist/internal/client-runtime.cjs +37 -26
  424. package/dist/internal/client-runtime.d.mts +5 -5
  425. package/dist/internal/client-runtime.d.ts +5 -5
  426. package/dist/internal/client-runtime.mjs +1 -1
  427. package/dist/internal/compression-runtime.cjs +4 -4
  428. package/dist/internal/compression-runtime.d.mts +1 -1
  429. package/dist/internal/compression-runtime.d.ts +1 -1
  430. package/dist/internal/compression-runtime.mjs +1 -1
  431. package/dist/internal/config-runtime.cjs +85 -82
  432. package/dist/internal/config-runtime.d.mts +3 -3
  433. package/dist/internal/config-runtime.d.ts +3 -3
  434. package/dist/internal/config-runtime.mjs +9 -9
  435. package/dist/internal/desktop-guard.cjs +5 -5
  436. package/dist/internal/desktop-guard.mjs +1 -1
  437. package/dist/internal/docs-precompiled-runtime.cjs +10 -7
  438. package/dist/internal/docs-precompiled-runtime.mjs +1 -1
  439. package/dist/internal/form-actions-client.cjs +4 -1
  440. package/dist/internal/form-actions-client.mjs +1 -1
  441. package/dist/internal/form-actions.cjs +13 -13
  442. package/dist/internal/form-actions.mjs +1 -1
  443. package/dist/internal/infra-analytics-runtime.cjs +32 -29
  444. package/dist/internal/infra-analytics-runtime.mjs +8 -8
  445. package/dist/internal/island-codec.cjs +4 -4
  446. package/dist/internal/island-codec.mjs +1 -1
  447. package/dist/internal/island-value-store.cjs +4 -1
  448. package/dist/internal/island-value-store.mjs +1 -1
  449. package/dist/internal/islands-action-client.cjs +10 -10
  450. package/dist/internal/islands-action-client.mjs +1 -1
  451. package/dist/internal/islands-boot.cjs +6 -3
  452. package/dist/internal/islands-boot.mjs +1 -1
  453. package/dist/internal/islands-runtime.cjs +12 -9
  454. package/dist/internal/islands-runtime.mjs +2 -2
  455. package/dist/internal/islands-server-tree.cjs +4 -1
  456. package/dist/internal/islands-server-tree.mjs +1 -1
  457. package/dist/internal/islands-server.cjs +9 -6
  458. package/dist/internal/islands-server.mjs +1 -1
  459. package/dist/internal/islx-actions-client.cjs +13 -10
  460. package/dist/internal/islx-actions-client.mjs +1 -1
  461. package/dist/internal/islx-actions-server.cjs +4 -1
  462. package/dist/internal/islx-actions-server.mjs +1 -1
  463. package/dist/internal/islx-client.cjs +7 -4
  464. package/dist/internal/islx-client.mjs +2 -2
  465. package/dist/internal/islx-react.cjs +4 -1
  466. package/dist/internal/islx-server.cjs +4 -1
  467. package/dist/internal/isolated-boundary.cjs +5 -5
  468. package/dist/internal/isolated-boundary.mjs +1 -1
  469. package/dist/internal/metadata-image-runtime.cjs +8 -8
  470. package/dist/internal/metadata-image-runtime.d.mts +2 -2
  471. package/dist/internal/metadata-image-runtime.d.ts +2 -2
  472. package/dist/internal/metadata-image-runtime.mjs +1 -1
  473. package/dist/internal/native-server-fns.cjs +10 -10
  474. package/dist/internal/native-server-fns.mjs +4 -4
  475. package/dist/internal/navigation-neutral.cjs +6 -3
  476. package/dist/internal/navigation-neutral.mjs +1 -1
  477. package/dist/internal/product-telemetry-runtime.cjs +4 -4
  478. package/dist/internal/product-telemetry-runtime.mjs +3 -3
  479. package/dist/internal/production-node-env.cjs +3 -3
  480. package/dist/internal/production-node-env.mjs +2 -2
  481. package/dist/internal/production-runtime.cjs +97 -89
  482. package/dist/internal/production-runtime.d.mts +10 -10
  483. package/dist/internal/production-runtime.d.ts +10 -10
  484. package/dist/internal/production-runtime.mjs +14 -14
  485. package/dist/internal/react-cache.cjs +10 -7
  486. package/dist/internal/react-cache.mjs +1 -1
  487. package/dist/internal/renderer-islands.cjs +4 -1
  488. package/dist/internal/renderer-islands.mjs +1 -1
  489. package/dist/internal/request-cookies.cjs +3 -3
  490. package/dist/internal/request-cookies.mjs +1 -1
  491. package/dist/internal/server-fn-transform.cjs +3 -3
  492. package/dist/internal/server-fn-transform.mjs +1 -1
  493. package/dist/internal/server-tree.cjs +5 -5
  494. package/dist/internal/server-tree.mjs +1 -1
  495. package/dist/internal/spa-router.cjs +20 -20
  496. package/dist/internal/spa-router.d.mts +3 -3
  497. package/dist/internal/spa-router.d.ts +3 -3
  498. package/dist/internal/spa-router.mjs +3 -3
  499. package/dist/internal/start-manifest.cjs +4 -1
  500. package/dist/internal/start-manifest.d.mts +1 -1
  501. package/dist/internal/start-manifest.d.ts +1 -1
  502. package/dist/internal/start-manifest.mjs +1 -1
  503. package/dist/internal/vercel-edge-middleware.cjs +23 -20
  504. package/dist/internal/vercel-edge-middleware.mjs +1 -1
  505. package/dist/json-ld.cjs +4 -1
  506. package/dist/json-ld.mjs +1 -1
  507. package/dist/layers-GP57TBE2.cjs +21 -0
  508. package/dist/{layers-744BBUY5.mjs → layers-IMRXNZRB.mjs} +1 -1
  509. package/dist/{libsql-http-M6LMNXCN.cjs → libsql-http-5GYGFVGC.cjs} +94 -87
  510. package/dist/{libsql-http-2QD224YS.mjs → libsql-http-PBJXNEOX.mjs} +1 -1
  511. package/dist/manager-3DFQDKJ6.cjs +18 -0
  512. package/dist/{manager-7BNSJKME.mjs → manager-GZUTAN5Q.mjs} +2 -2
  513. package/dist/markdown.cjs +12 -12
  514. package/dist/markdown.d.mts +1 -1
  515. package/dist/markdown.d.ts +1 -1
  516. package/dist/markdown.mjs +2 -2
  517. package/dist/middleware.cjs +32 -32
  518. package/dist/middleware.d.mts +1 -1
  519. package/dist/middleware.d.ts +1 -1
  520. package/dist/middleware.mjs +4 -4
  521. package/dist/mobile.cjs +4 -1
  522. package/dist/mobile.mjs +1 -1
  523. package/dist/{modules-3Q2ZCY4Q.mjs → modules-IVJXVV4W.mjs} +1 -1
  524. package/dist/modules-JDPCBWND.cjs +13 -0
  525. package/dist/{mount.d-_6Un9wdK.d.mts → mount.d-COIrFH0i.d.mts} +1 -1
  526. package/dist/{mount.d-DyKlRR6z.d.ts → mount.d-Cbz8vsSZ.d.ts} +1 -1
  527. package/dist/{native-server-fn-handler-PYK65A46.mjs → native-server-fn-handler-IMLQMSIR.mjs} +1 -1
  528. package/dist/native-server-fn-handler-U7I6H6MM.cjs +30 -0
  529. package/dist/{native-specs-A7YOL463.mjs → native-specs-4DOPYSOJ.mjs} +1 -1
  530. package/dist/native-specs-IXHEIZCD.cjs +15 -0
  531. package/dist/{native-tree-LNO7K6JR.mjs → native-tree-2GQMSOLV.mjs} +3 -3
  532. package/dist/native-tree-PHCV43W4.cjs +28 -0
  533. package/dist/native.cjs +4 -1
  534. package/dist/native.mjs +1 -1
  535. package/dist/{navigation-delegate.d-BbW1_pf_.d.ts → navigation-delegate.d-dlnYTX-Y.d.ts} +1 -1
  536. package/dist/{navigation-delegate.d-B9GjWbov.d.mts → navigation-delegate.d-yulG9Dp5.d.mts} +1 -1
  537. package/dist/navigation.cjs +26 -26
  538. package/dist/navigation.d.mts +4 -4
  539. package/dist/navigation.d.ts +4 -4
  540. package/dist/navigation.mjs +5 -5
  541. package/dist/{nitro-FK3SZM4H.mjs → nitro-6HSEGMWJ.mjs} +2 -2
  542. package/dist/{nitro-YDFMH5PY.cjs → nitro-K4MCBBB6.cjs} +31 -28
  543. package/dist/{node-module-bundle-ZWCQJCKA.mjs → node-module-bundle-4IN4YCDV.mjs} +1 -1
  544. package/dist/node-module-bundle-PHKRIHI6.cjs +15 -0
  545. package/dist/observability.cjs +3 -3
  546. package/dist/observability.mjs +1 -1
  547. package/dist/og.cjs +4 -1
  548. package/dist/og.mjs +1 -1
  549. package/dist/platform.cjs +4 -1
  550. package/dist/platform.mjs +1 -1
  551. package/dist/{plugin-EVKQZBNW.mjs → plugin-B7I5QVBE.mjs} +2 -2
  552. package/dist/plugin-QYBJSGHG.cjs +33 -0
  553. package/dist/plugin.cjs +175 -170
  554. package/dist/plugin.d.mts +5 -5
  555. package/dist/plugin.d.ts +5 -5
  556. package/dist/plugin.mjs +31 -31
  557. package/dist/{port-STMSGUVU.cjs → port-2YV5GBDN.cjs} +13 -10
  558. package/dist/{port-CEZTV776.mjs → port-4ZIDLV4Z.mjs} +1 -1
  559. package/dist/query/client.cjs +38 -34
  560. package/dist/query/client.mjs +3 -3
  561. package/dist/query/index.cjs +5 -5
  562. package/dist/query/index.mjs +1 -1
  563. package/dist/query/parsers.cjs +3 -3
  564. package/dist/query/parsers.mjs +1 -1
  565. package/dist/query/server.cjs +8 -5
  566. package/dist/query/server.mjs +1 -1
  567. package/dist/{render-plan.d-DaM1NPnm.d.mts → render-plan.d-BW56oxMP.d.mts} +1 -1
  568. package/dist/{render-plan.d-D0FV9lDT.d.ts → render-plan.d-Cz7bQmcf.d.ts} +1 -1
  569. package/dist/renderer/none/server.cjs +4 -1
  570. package/dist/renderer/none/server.mjs +1 -1
  571. package/dist/renderer/react/client.cjs +4 -1
  572. package/dist/renderer/react/client.mjs +1 -1
  573. package/dist/renderer/react/server.cjs +14 -11
  574. package/dist/renderer/react/server.mjs +1 -1
  575. package/dist/renderer/react/vite.cjs +4 -1
  576. package/dist/renderer/react/vite.mjs +1 -1
  577. package/dist/renderer-client.cjs +67 -64
  578. package/dist/renderer-client.d.mts +5 -5
  579. package/dist/renderer-client.d.ts +5 -5
  580. package/dist/renderer-client.mjs +3 -3
  581. package/dist/renderer.cjs +11 -6
  582. package/dist/renderer.d.mts +22 -11
  583. package/dist/renderer.d.ts +22 -11
  584. package/dist/renderer.mjs +1 -1
  585. package/dist/request.cjs +9 -4
  586. package/dist/{request.d-CrXC7voZ.d.ts → request.d-BaFROByP.d.ts} +1 -1
  587. package/dist/{request.d-DVSLilGx.d.mts → request.d-BwgX-7Wi.d.mts} +1 -1
  588. package/dist/request.d.mts +2 -2
  589. package/dist/request.d.ts +2 -2
  590. package/dist/request.mjs +1 -1
  591. package/dist/{route-rendering.d-CWi3UYtR.d.mts → route-rendering.d-BzeFPYGc.d.mts} +1 -1
  592. package/dist/{route-rendering.d-OfbM_rj8.d.ts → route-rendering.d-D4kUuncg.d.ts} +1 -1
  593. package/dist/router.cjs +5 -5
  594. package/dist/{router.d-Bm9FNSu3.d.ts → router.d-B9qJdgjt.d.ts} +1 -1
  595. package/dist/{router.d-YKVirmj4.d.mts → router.d-D-p8WElf.d.mts} +1 -1
  596. package/dist/router.mjs +1 -1
  597. package/dist/routes.cjs +16 -16
  598. package/dist/routes.d.mts +3 -3
  599. package/dist/routes.d.ts +3 -3
  600. package/dist/routes.mjs +1 -1
  601. package/dist/{rsc-pipeline-W5DSWDHD.mjs → rsc-pipeline-Y6D6KBES.mjs} +12 -12
  602. package/dist/rsc-pipeline-YHVEHWTU.cjs +91 -0
  603. package/dist/{runtime-UOZKSM5S.mjs → runtime-62ZIEV6U.mjs} +11 -11
  604. package/dist/{runtime-YV4X5FAK.cjs → runtime-LKEMFXHW.cjs} +129 -119
  605. package/dist/{runtime.d-BVj6apd0.d.mts → runtime.d-BUtDIrRJ.d.mts} +1 -1
  606. package/dist/{runtime.d-D7QYVJGO.d.ts → runtime.d-Du64AX3R.d.ts} +1 -1
  607. package/dist/safe-fetch.cjs +4 -4
  608. package/dist/safe-fetch.mjs +1 -1
  609. package/dist/{schema-dev-notice-EUPAUJVN.mjs → schema-dev-notice-EZAOFO7A.mjs} +1 -1
  610. package/dist/{schema-dev-notice-ZSCL47CT.cjs → schema-dev-notice-Y4J5KPEY.cjs} +16 -13
  611. package/dist/schema.cjs +4 -4
  612. package/dist/schema.mjs +1 -1
  613. package/dist/{search-client-GIXIEU75.mjs → search-client-HN3ZY6AK.mjs} +1 -1
  614. package/dist/search-client-Z7KDVD4C.cjs +15 -0
  615. package/dist/server-action-security.cjs +10 -10
  616. package/dist/server-action-security.mjs +1 -1
  617. package/dist/{server-components-status.d-BDVcxi0z.d.mts → server-components-status.d-B0YP-m9A.d.mts} +1 -1
  618. package/dist/{server-components-status.d-CfKDpmCH.d.ts → server-components-status.d-CvFhb6-t.d.ts} +1 -1
  619. package/dist/server-fn-client.cjs +4 -4
  620. package/dist/server-fn-client.mjs +1 -1
  621. package/dist/server-fn.cjs +17 -17
  622. package/dist/server-fn.mjs +1 -1
  623. package/dist/server-plugins.cjs +21 -16
  624. package/dist/server-plugins.d.mts +3 -3
  625. package/dist/server-plugins.d.ts +3 -3
  626. package/dist/server-plugins.mjs +1 -1
  627. package/dist/server-query-client.cjs +10 -10
  628. package/dist/server-query-client.mjs +1 -1
  629. package/dist/server-query.cjs +19 -19
  630. package/dist/server-query.mjs +1 -1
  631. package/dist/server.cjs +225 -216
  632. package/dist/server.d.mts +11 -11
  633. package/dist/server.d.ts +11 -11
  634. package/dist/server.mjs +34 -34
  635. package/dist/session-J7NTZI56.cjs +24 -0
  636. package/dist/{session-4IB34X35.mjs → session-ZFM3RDG2.mjs} +3 -3
  637. package/dist/{spa-router.d-DGmropfK.d.mts → spa-router.d-CkR14oGH.d.mts} +2 -2
  638. package/dist/{spa-router.d-nE1jHNGt.d.ts → spa-router.d-D4ye2WFk.d.ts} +2 -2
  639. package/dist/{ssg.d-jXlUAKzg.d.ts → ssg.d-BCJB_f7B.d.ts} +2 -2
  640. package/dist/{ssg.d-DS-gXUbf.d.mts → ssg.d-DFs97VTY.d.mts} +2 -2
  641. package/dist/storage.cjs +4 -4
  642. package/dist/storage.mjs +2 -2
  643. package/dist/{store-core.d-B5cwOd8g.d.ts → store-core.d-0W2YScl8.d.ts} +2 -2
  644. package/dist/{store-core.d-C-gATBwd.d.mts → store-core.d-Vk5UDKeC.d.mts} +2 -2
  645. package/dist/testing.cjs +65 -62
  646. package/dist/testing.d.mts +1 -1
  647. package/dist/testing.d.ts +1 -1
  648. package/dist/testing.mjs +4 -4
  649. package/dist/theme/client.cjs +5 -5
  650. package/dist/theme/client.mjs +1 -1
  651. package/dist/theme/index.cjs +4 -4
  652. package/dist/theme/index.mjs +1 -1
  653. package/dist/theme/runtime.cjs +3 -3
  654. package/dist/theme/runtime.mjs +1 -1
  655. package/dist/theme/server.cjs +8 -8
  656. package/dist/theme/server.mjs +1 -1
  657. package/dist/{utils.d-BODwBtkz.d.ts → utils.d-Ba3N28fk.d.ts} +1 -1
  658. package/dist/{utils.d-Cmj-fzds.d.mts → utils.d-Cloiko8d.d.mts} +1 -1
  659. package/dist/version.cjs +3 -3
  660. package/dist/version.mjs +2 -2
  661. package/dist/vite.cjs +168 -168
  662. package/dist/vite.d.mts +6 -6
  663. package/dist/vite.d.ts +6 -6
  664. package/dist/vite.mjs +31 -31
  665. package/dist/workflows.cjs +14 -14
  666. package/dist/workflows.mjs +2 -2
  667. package/package.json +5 -5
  668. package/LICENSE +0 -22
  669. package/dist/agent-mcp-handler-IUL6OPC3.cjs +0 -21
  670. package/dist/analyzer-IIWSUXSQ.cjs +0 -17
  671. package/dist/chunk-3376ZTRC.cjs +0 -1
  672. package/dist/chunk-K5NI5YQR.cjs +0 -1
  673. package/dist/chunk-MCJLA63J.cjs +0 -1
  674. package/dist/chunk-THGSPDFD.cjs +0 -40
  675. package/dist/chunk-V3Y3R3JJ.cjs +0 -9
  676. package/dist/chunk-YTAABQEV.cjs +0 -1
  677. package/dist/layers-XLOMMQP7.cjs +0 -21
  678. package/dist/manager-37UJPUN4.cjs +0 -18
  679. package/dist/modules-KDHFBQ6L.cjs +0 -13
  680. package/dist/native-server-fn-handler-57TCQPSM.cjs +0 -30
  681. package/dist/native-specs-JDPH26AO.cjs +0 -15
  682. package/dist/native-tree-5TENEQ7Y.cjs +0 -28
  683. package/dist/node-module-bundle-TNSY5PAC.cjs +0 -15
  684. package/dist/plugin-MWO3G2XM.cjs +0 -33
  685. package/dist/rsc-pipeline-LGXJGGMW.cjs +0 -91
  686. package/dist/search-client-A7YJT7JZ.cjs +0 -15
  687. package/dist/session-MOYQJ7E6.cjs +0 -24
  688. package/dist/{chunk-IVP5Q4BX.mjs → chunk-6IKUYFNQ.mjs} +0 -0
  689. package/dist/{chunk-D7LXBLUW.mjs → chunk-FYTZZM5U.mjs} +3 -3
  690. /package/dist/{chunk-URBP6DLH.mjs → chunk-LQZXCSYG.mjs} +0 -0
  691. /package/dist/{chunk-M6AJZ4XR.mjs → chunk-QNJUQIUZ.mjs} +0 -0
@@ -1,40 +1,45 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkWMRGIQTAcjs = require('./chunk-WMRGIQTA.cjs');
4
+ var _chunkJ3RIMCBDcjs = require('./chunk-J3RIMCBD.cjs');
5
5
 
6
6
 
7
- var _chunkMNUYXZV7cjs = require('./chunk-MNUYXZV7.cjs');
7
+ var _chunkBNWADCG2cjs = require('./chunk-BNWADCG2.cjs');
8
8
 
9
9
 
10
- var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
10
+ var _chunkKBURN62Zcjs = require('./chunk-KBURN62Z.cjs');
11
11
 
12
12
 
13
13
 
14
14
 
15
15
 
16
16
 
17
- var _chunkT7UC2ORAcjs = require('./chunk-T7UC2ORA.cjs');
17
+ var _chunkHP7QYVSTcjs = require('./chunk-HP7QYVST.cjs');
18
18
 
19
19
 
20
- var _chunk7KJJ4SBScjs = require('./chunk-7KJJ4SBS.cjs');
20
+ var _chunk32HGOX3Mcjs = require('./chunk-32HGOX3M.cjs');
21
21
 
22
22
 
23
23
 
24
24
 
25
- var _chunkYUCU6XB4cjs = require('./chunk-YUCU6XB4.cjs');
25
+ var _chunkPYPHM7AScjs = require('./chunk-PYPHM7AS.cjs');
26
26
 
27
27
 
28
- var _chunk7U4XF76Rcjs = require('./chunk-7U4XF76R.cjs');
28
+ var _chunk7ZDLE77Pcjs = require('./chunk-7ZDLE77P.cjs');
29
29
 
30
30
 
31
- var _chunkV3Y3R3JJcjs = require('./chunk-V3Y3R3JJ.cjs');
31
+ var _chunkXPVS4HKUcjs = require('./chunk-XPVS4HKU.cjs');
32
+
33
+
34
+ var _chunkUGL4BDNBcjs = require('./chunk-UGL4BDNB.cjs');
32
35
 
33
36
  // src/environment-vite.ts
37
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
34
38
  var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
35
39
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
36
40
 
37
41
  // src/diagnostics.ts
42
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
38
43
  var _tracemapping = require('@jridgewell/trace-mapping');
39
44
 
40
45
  var BOUNDARY_DOCS = "/docs/environment-functions#boundary-diagnostics";
@@ -146,21 +151,30 @@ function createFarmSourceLocator(code, getCombinedSourcemap) {
146
151
  }
147
152
 
148
153
  // src/islands-react-server-exports.ts
154
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
149
155
 
150
156
 
151
157
  var _parseAst = require('rolldown/parseAst');
152
158
  var _utils = require('rolldown/utils');
153
159
 
154
160
  // src/utils/source-snapshot.ts
161
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
155
162
 
156
163
 
157
164
  var snapshot;
158
165
  var base;
159
166
  var volatile;
160
167
  var trace;
168
+ var traceGroups;
161
169
  function farmSourceSnapshotPathKey(file, paths = _path2.default) {
170
+ if (paths === _path2.default && _path2.default.sep === "/" && isNormalizedPosixPath(file)) return file;
162
171
  return paths.resolve(file);
163
172
  }
173
+ function isNormalizedPosixPath(file) {
174
+ if (file.charCodeAt(0) !== 47) return false;
175
+ if (file.length === 1) return true;
176
+ return !file.endsWith("/") && !file.endsWith("/.") && !file.endsWith("/..") && !file.includes("//") && !file.includes("/./") && !file.includes("/../");
177
+ }
164
178
  function getFarmSourceStamp(file) {
165
179
  try {
166
180
  const stat = _fs2.default.statSync(file);
@@ -251,6 +265,15 @@ function withFarmSourceSnapshotOf(store, operation) {
251
265
  base = void 0;
252
266
  }
253
267
  }
268
+ function withFarmSourceSnapshotAside(store, operation) {
269
+ const saved = { snapshot, base, volatile, trace, traceGroups };
270
+ snapshot = base = volatile = trace = traceGroups = void 0;
271
+ try {
272
+ return store ? withFarmSourceSnapshotOf(store, operation) : withFarmSourceSnapshot(operation);
273
+ } finally {
274
+ ({ snapshot, base, volatile, trace, traceGroups } = saved);
275
+ }
276
+ }
254
277
  function memoizeInFarmSourceSnapshot(scope, key, compute, lasting) {
255
278
  if (!snapshot) return compute();
256
279
  let entries = snapshot.get(scope);
@@ -265,18 +288,59 @@ function memoizeInFarmSourceSnapshot(scope, key, compute, lasting) {
265
288
  if (lasting && !lasting(result)) _optionalChain([volatile, 'optionalAccess', _18 => _18.push, 'call', _19 => _19([scope, key])]);
266
289
  return result;
267
290
  }
291
+ function hasFarmNodeModulesDirectory(directory) {
292
+ return memoizeInFarmSourceSnapshot(
293
+ "node-modules-directory",
294
+ farmSourceSnapshotPathKey(directory),
295
+ () => _fs2.default.existsSync(_path2.default.join(directory, "node_modules")),
296
+ () => false
297
+ );
298
+ }
299
+ function readFarmPackageManifest(file) {
300
+ return memoizeInFarmSourceSnapshot(
301
+ "package-manifest",
302
+ farmSourceSnapshotPathKey(file),
303
+ () => {
304
+ try {
305
+ return JSON.parse(_fs2.default.readFileSync(file, "utf8"));
306
+ } catch (e3) {
307
+ return null;
308
+ }
309
+ },
310
+ () => false
311
+ );
312
+ }
268
313
  function noteFarmSourceRead(file) {
269
314
  _optionalChain([trace, 'optionalAccess', _20 => _20.add, 'call', _21 => _21(file)]);
270
315
  }
316
+ function noteFarmSourceReads(files) {
317
+ if (traceGroups) traceGroups.add(files);
318
+ else if (trace) for (const file of files) trace.add(file);
319
+ }
271
320
  function traceFarmSourceReads(operation) {
321
+ const { result, files } = traceReads(operation, false);
322
+ return { result, files: [...files] };
323
+ }
324
+ function traceFarmSourceReadGroups(operation) {
325
+ const { result, files, groups } = traceReads(operation, true);
326
+ return { result, files: [...files], groups: [...groups] };
327
+ }
328
+ function traceReads(operation, grouped) {
272
329
  const outer = trace;
330
+ const outerGroups = traceGroups;
273
331
  const files = /* @__PURE__ */ new Set();
332
+ const groups = grouped ? /* @__PURE__ */ new Set() : void 0;
274
333
  trace = files;
334
+ traceGroups = groups;
275
335
  try {
276
- return { result: operation(), files: [...files] };
336
+ return { result: operation(), files, groups };
277
337
  } finally {
278
338
  trace = outer;
279
- if (outer) for (const file of files) outer.add(file);
339
+ traceGroups = outerGroups;
340
+ if (outer) {
341
+ for (const file of files) outer.add(file);
342
+ if (groups) for (const group of groups) noteFarmSourceReads(group);
343
+ }
280
344
  }
281
345
  }
282
346
 
@@ -304,11 +368,21 @@ function packageNameOf(specifier) {
304
368
  return { name, subpath: parts.slice(name.startsWith("@") ? 2 : 1).join("/") };
305
369
  }
306
370
  function findPackageDirectory(importer, name) {
307
- for (let current = _path2.default.dirname(importer); ; current = _path2.default.dirname(current)) {
308
- const directory = _path2.default.join(current, "node_modules", name);
309
- if (_fs2.default.existsSync(_path2.default.join(directory, "package.json"))) return _fs2.default.realpathSync(directory);
310
- if (_path2.default.dirname(current) === current) return null;
311
- }
371
+ const start = _path2.default.dirname(importer);
372
+ return memoizeInFarmSourceSnapshot(
373
+ "package-directory",
374
+ `${farmSourceSnapshotPathKey(start)}\0${name}`,
375
+ () => {
376
+ for (let current = start; ; current = _path2.default.dirname(current)) {
377
+ const directory = _path2.default.join(current, "node_modules", name);
378
+ if (hasFarmNodeModulesDirectory(current) && _fs2.default.existsSync(_path2.default.join(directory, "package.json"))) {
379
+ return _fs2.default.realpathSync(directory);
380
+ }
381
+ if (_path2.default.dirname(current) === current) return null;
382
+ }
383
+ },
384
+ (directory) => directory !== null
385
+ );
312
386
  }
313
387
  function pickTarget(value, conditions) {
314
388
  if (typeof value === "string") return value;
@@ -372,7 +446,7 @@ function resolveFarmReactServerExport(importer, specifier) {
372
446
  const file = _path2.default.resolve(directory, server);
373
447
  if (_fs2.default.existsSync(file)) resolved = file;
374
448
  }
375
- } catch (e3) {
449
+ } catch (e4) {
376
450
  resolved = null;
377
451
  }
378
452
  cache.set(key, resolved);
@@ -387,7 +461,7 @@ function readModule(file) {
387
461
  let stat;
388
462
  try {
389
463
  stat = _fs2.default.statSync(file);
390
- } catch (e4) {
464
+ } catch (e5) {
391
465
  return null;
392
466
  }
393
467
  noteFarmSourceRead(file);
@@ -397,7 +471,7 @@ function readModule(file) {
397
471
  try {
398
472
  const code = _fs2.default.readFileSync(file, "utf8");
399
473
  program = _parseAst.parseAst.call(void 0, code, { lang: parseLang(file) });
400
- } catch (e5) {
474
+ } catch (e6) {
401
475
  program = null;
402
476
  }
403
477
  parsedModules.set(file, { size: stat.size, mtimeMs: stat.mtimeMs, program });
@@ -431,13 +505,14 @@ function resolveFarmPackageDefaultEntry(importer, specifier, conditions = ["brow
431
505
  const directory = findPackageDirectory(importer, parsed.name);
432
506
  if (!directory) return null;
433
507
  try {
434
- const manifest = JSON.parse(_fs2.default.readFileSync(_path2.default.join(directory, "package.json"), "utf8"));
508
+ const manifest = readFarmPackageManifest(_path2.default.join(directory, "package.json"));
509
+ if (manifest === null) return null;
435
510
  const target = _nullishCoalesce(pickTarget(exportEntry(manifest.exports, parsed.subpath), conditions), () => ( (!parsed.subpath ? _nullishCoalesce(_nullishCoalesce(manifest.module, () => ( manifest.main)), () => ( "index.js")) : parsed.subpath)));
436
511
  return resolveRelative(
437
512
  _path2.default.join(directory, "package.json"),
438
513
  `./${String(target).replace(/^\.\//, "")}`
439
514
  );
440
- } catch (e6) {
515
+ } catch (e7) {
441
516
  return null;
442
517
  }
443
518
  }
@@ -505,7 +580,11 @@ function traceExport(file, name, depth) {
505
580
  return void 0;
506
581
  }
507
582
  function traceFarmExport(file, name) {
508
- return _optionalChain([traceExport, 'call', _34 => _34(file, name, 0), 'optionalAccess', _35 => _35.kind]);
583
+ return memoizeInFarmSourceSnapshot(
584
+ "export-kind",
585
+ `${farmSourceSnapshotPathKey(file)}\0${name}`,
586
+ () => _optionalChain([traceExport, 'call', _34 => _34(file, name, 0), 'optionalAccess', _35 => _35.kind])
587
+ );
509
588
  }
510
589
  function isFarmClientExport(file, name) {
511
590
  return traceFarmExport(file, name) === "client";
@@ -525,7 +604,7 @@ function parseCode(code, file) {
525
604
  return memoizeInFarmSourceSnapshot(`ast:${lang}`, code, () => {
526
605
  try {
527
606
  return _parseAst.parseAst.call(void 0, code, { lang });
528
- } catch (e7) {
607
+ } catch (e8) {
529
608
  return null;
530
609
  }
531
610
  });
@@ -730,7 +809,7 @@ function scanFarmStaticImports(code, lang) {
730
809
  let result;
731
810
  try {
732
811
  result = _utils.parseSync.call(void 0, "file.js", code, { lang, preserveParens: false });
733
- } catch (e8) {
812
+ } catch (e9) {
734
813
  return null;
735
814
  }
736
815
  if (result.errors.length > 0) return null;
@@ -762,7 +841,7 @@ function readModuleImports(file) {
762
841
  let stat;
763
842
  try {
764
843
  stat = _fs2.default.statSync(file);
765
- } catch (e9) {
844
+ } catch (e10) {
766
845
  return null;
767
846
  }
768
847
  noteFarmSourceRead(file);
@@ -776,7 +855,7 @@ function readModuleImports(file) {
776
855
  let code;
777
856
  try {
778
857
  code = _fs2.default.readFileSync(file, "utf8");
779
- } catch (e10) {
858
+ } catch (e11) {
780
859
  code = void 0;
781
860
  }
782
861
  imports = code === void 0 ? null : scanFarmStaticImports(code, parseLang(file));
@@ -785,9 +864,21 @@ function readModuleImports(file) {
785
864
  return imports;
786
865
  }
787
866
  var clientOnlyFreeFiles = /* @__PURE__ */ new Set();
788
- function invalidateFarmClientOnlyScan() {
867
+ function invalidateFarmClientOnlyScan(file, event) {
868
+ if (file && event === "update" && _path2.default.basename(file) !== "package.json" && !isClientOnlyScanned(file)) {
869
+ return;
870
+ }
789
871
  clientOnlyFreeFiles.clear();
790
872
  }
873
+ function isClientOnlyScanned(file) {
874
+ const resolved = _path2.default.resolve(file);
875
+ if (clientOnlyFreeFiles.has(resolved)) return true;
876
+ try {
877
+ return clientOnlyFreeFiles.has(_fs2.default.realpathSync(resolved));
878
+ } catch (e12) {
879
+ return true;
880
+ }
881
+ }
791
882
  function resolveServerEntry(importer, specifier) {
792
883
  const parsed = packageNameOf(specifier);
793
884
  if (!parsed || REACT_PACKAGES.has(parsed.name) || parsed.name.startsWith("@farm.js/")) {
@@ -873,7 +964,7 @@ function stampScannedPath(directory, target) {
873
964
  const stat = _fs2.default.statSync(target, { throwIfNoEntry: false });
874
965
  if (!stat) return void 0;
875
966
  return [_path2.default.relative(directory, target), stat.size, stat.mtimeMs, stat.ctimeMs];
876
- } catch (e11) {
967
+ } catch (e13) {
877
968
  return void 0;
878
969
  }
879
970
  }
@@ -886,12 +977,12 @@ function usePackageScanCacheFile(file) {
886
977
  const stored = /* @__PURE__ */ new Map();
887
978
  try {
888
979
  const value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
889
- if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkV3Y3R3JJcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
980
+ if (_optionalChain([value, 'optionalAccess', _68 => _68.schema]) === PACKAGE_SCAN_CACHE_SCHEMA && value.farm === _chunkXPVS4HKUcjs.FARM_VERSION && value.scans && typeof value.scans === "object") {
890
981
  for (const [directory, scan] of Object.entries(value.scans)) {
891
982
  if (isStoredPackageScan(scan)) stored.set(directory, scan);
892
983
  }
893
984
  }
894
- } catch (e12) {
985
+ } catch (e14) {
895
986
  }
896
987
  packageScanCache = { file, stored, dirty: false };
897
988
  }
@@ -915,14 +1006,14 @@ function persistPackageScanCache() {
915
1006
  _fs2.default.mkdirSync(_path2.default.dirname(cache2.file), { recursive: true });
916
1007
  _fs2.default.writeFileSync(
917
1008
  temporary,
918
- JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkV3Y3R3JJcjs.FARM_VERSION, scans })
1009
+ JSON.stringify({ schema: PACKAGE_SCAN_CACHE_SCHEMA, farm: _chunkXPVS4HKUcjs.FARM_VERSION, scans })
919
1010
  );
920
1011
  _fs2.default.renameSync(temporary, cache2.file);
921
1012
  cache2.dirty = false;
922
- } catch (e13) {
1013
+ } catch (e15) {
923
1014
  try {
924
1015
  _fs2.default.rmSync(temporary, { force: true });
925
- } catch (e14) {
1016
+ } catch (e16) {
926
1017
  }
927
1018
  }
928
1019
  }
@@ -946,7 +1037,7 @@ function scanPackage(directory) {
946
1037
  stamps.push(stampScannedPath(directory, current));
947
1038
  try {
948
1039
  entries = _fs2.default.readdirSync(current, { withFileTypes: true });
949
- } catch (e15) {
1040
+ } catch (e17) {
950
1041
  continue;
951
1042
  }
952
1043
  for (const entry of entries) {
@@ -958,7 +1049,7 @@ function scanPackage(directory) {
958
1049
  stamps.push(stampScannedPath(directory, file));
959
1050
  try {
960
1051
  code = _fs2.default.readFileSync(file, "utf8");
961
- } catch (e16) {
1052
+ } catch (e18) {
962
1053
  continue;
963
1054
  }
964
1055
  for (const match of code.matchAll(IMPORT_SPECIFIER)) scan.imports.add(match[1]);
@@ -985,7 +1076,7 @@ function findFarmServerBundledPackage(importer, specifier) {
985
1076
  if (manifest.exports === void 0 && manifest.type !== "module" && typeof manifest.module === "string" && typeof manifest.main === "string" && _path2.default.resolve(directory, manifest.main) !== _path2.default.resolve(directory, manifest.module)) {
986
1077
  return { name: parsed.name, prebundle: isSelfContainedPackage(manifest, importer) };
987
1078
  }
988
- } catch (e17) {
1079
+ } catch (e19) {
989
1080
  return null;
990
1081
  }
991
1082
  const scan = scanPackage(directory);
@@ -1008,7 +1099,7 @@ function findFarmPackageManifest(importer, specifier) {
1008
1099
  try {
1009
1100
  const manifest = JSON.parse(_fs2.default.readFileSync(_path2.default.join(directory, "package.json"), "utf8"));
1010
1101
  names = new Set(Object.keys(_nullishCoalesce(manifest.dependencies, () => ( {}))));
1011
- } catch (e18) {
1102
+ } catch (e20) {
1012
1103
  return null;
1013
1104
  }
1014
1105
  const dependencies = [...scanPackage(directory).imports].filter((imported) => {
@@ -1063,9 +1154,11 @@ function listFarmModuleExports(entry) {
1063
1154
  }
1064
1155
 
1065
1156
  // src/programmatic-routes-client.ts
1157
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1066
1158
  var _module = require('module');
1067
1159
 
1068
1160
  // src/browser-builtins.ts
1161
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1069
1162
 
1070
1163
  var FARM_BROWSER_BUILTIN_PREFIX = "\0farm:browser-builtin:";
1071
1164
  var BROWSER_IMPLEMENTATIONS = {
@@ -1138,7 +1231,7 @@ function resolveProgrammaticClientRoutes(options) {
1138
1231
  let untraced = false;
1139
1232
  const definedIn = /* @__PURE__ */ new Map();
1140
1233
  for (const route of definitions) {
1141
- const source = _chunkYUCU6XB4cjs.getProgrammaticRouteDefinitionSource.call(void 0, route);
1234
+ const source = _chunkPYPHM7AScjs.getProgrammaticRouteDefinitionSource.call(void 0, route);
1142
1235
  const callers = (_nullishCoalesce(_optionalChain([source, 'optionalAccess', _85 => _85.stacks]), () => ( []))).map((stack) => findRouteCallers(stack, modulesByFile));
1143
1236
  for (const caller of callers.flat()) caller.routeSource = true;
1144
1237
  definedIn.set(route, callers.flat());
@@ -1454,7 +1547,7 @@ function holdsRouteDefinition(value, definitions) {
1454
1547
  if (descriptor && "value" in descriptor) next(descriptor.value);
1455
1548
  }
1456
1549
  }
1457
- } catch (e19) {
1550
+ } catch (e21) {
1458
1551
  }
1459
1552
  }
1460
1553
  return false;
@@ -1547,7 +1640,7 @@ function readJsonString(text) {
1547
1640
  try {
1548
1641
  const value = JSON.parse(text);
1549
1642
  return typeof value === "string" ? value : void 0;
1550
- } catch (e20) {
1643
+ } catch (e22) {
1551
1644
  return void 0;
1552
1645
  }
1553
1646
  }
@@ -1555,7 +1648,7 @@ function readJsonArray(text) {
1555
1648
  try {
1556
1649
  const value = JSON.parse(text);
1557
1650
  return Array.isArray(value) ? value : void 0;
1558
- } catch (e21) {
1651
+ } catch (e23) {
1559
1652
  return void 0;
1560
1653
  }
1561
1654
  }
@@ -1565,13 +1658,13 @@ function readExports(namespace) {
1565
1658
  let keys;
1566
1659
  try {
1567
1660
  keys = Object.keys(namespace);
1568
- } catch (e22) {
1661
+ } catch (e24) {
1569
1662
  return [];
1570
1663
  }
1571
1664
  for (const key of keys) {
1572
1665
  try {
1573
1666
  entries.push([key, namespace[key]]);
1574
- } catch (e23) {
1667
+ } catch (e25) {
1575
1668
  }
1576
1669
  }
1577
1670
  return entries;
@@ -1604,7 +1697,7 @@ function toModuleFile(file) {
1604
1697
  if (file.startsWith("file://")) {
1605
1698
  try {
1606
1699
  return toPosixPath(_url.fileURLToPath.call(void 0, file));
1607
- } catch (e24) {
1700
+ } catch (e26) {
1608
1701
  return toPosixPath(file);
1609
1702
  }
1610
1703
  }
@@ -1612,11 +1705,13 @@ function toModuleFile(file) {
1612
1705
  }
1613
1706
 
1614
1707
  // src/utils/client-component.ts
1708
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1615
1709
 
1616
1710
 
1617
1711
 
1618
1712
 
1619
1713
  // src/islands-package-references.ts
1714
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1620
1715
  var _crypto = require('crypto');
1621
1716
 
1622
1717
 
@@ -1634,7 +1729,7 @@ function parse(code, file) {
1634
1729
  function parseAs(code, lang) {
1635
1730
  try {
1636
1731
  return _parseAst.parseAst.call(void 0, code, { lang });
1637
- } catch (e25) {
1732
+ } catch (e27) {
1638
1733
  return null;
1639
1734
  }
1640
1735
  }
@@ -1774,11 +1869,11 @@ function packageLookup(directory, packageName) {
1774
1869
  `${farmSourceSnapshotPathKey(directory)}\0${packageName}`,
1775
1870
  () => {
1776
1871
  for (let current = directory; ; current = _path2.default.dirname(current)) {
1777
- if (_path2.default.basename(current) !== "node_modules") {
1872
+ if (_path2.default.basename(current) !== "node_modules" && hasFarmNodeModulesDirectory(current)) {
1778
1873
  const candidate = _path2.default.join(current, "node_modules", packageName);
1779
1874
  try {
1780
1875
  return { from: current, real: _fs2.default.realpathSync(candidate) };
1781
- } catch (e26) {
1876
+ } catch (e28) {
1782
1877
  }
1783
1878
  }
1784
1879
  if (_path2.default.dirname(current) === current) return null;
@@ -1795,7 +1890,7 @@ function referenceResolveFrom(root, specifier, importer) {
1795
1890
  if (_optionalChain([app, 'optionalAccess', _101 => _101.real]) === own.real) return null;
1796
1891
  try {
1797
1892
  return _fs2.default.realpathSync(own.from);
1798
- } catch (e27) {
1893
+ } catch (e29) {
1799
1894
  return own.from;
1800
1895
  }
1801
1896
  }
@@ -1818,22 +1913,19 @@ function ensureFarmPackageClientReference(root, specifier, exportName, importer)
1818
1913
  `export { __farm_reference__ as ${exportName} };`,
1819
1914
  ""
1820
1915
  ].join("\n");
1821
- let current = null;
1822
- try {
1823
- current = _fs2.default.readFileSync(file, "utf8");
1824
- } catch (e28) {
1825
- }
1826
- if (current !== source) {
1827
- _fs2.default.mkdirSync(_path2.default.dirname(file), { recursive: true });
1828
- _fs2.default.writeFileSync(file, source);
1829
- }
1916
+ memoizeInFarmSourceSnapshot(
1917
+ "client-reference-file",
1918
+ `${file}\0${source}`,
1919
+ () => writeIfChanged(file, source),
1920
+ () => false
1921
+ );
1830
1922
  return file;
1831
1923
  }
1832
1924
  function writeIfChanged(file, source) {
1833
1925
  let current = null;
1834
1926
  try {
1835
1927
  current = _fs2.default.readFileSync(file, "utf8");
1836
- } catch (e29) {
1928
+ } catch (e30) {
1837
1929
  }
1838
1930
  if (current !== source) {
1839
1931
  _fs2.default.mkdirSync(_path2.default.dirname(file), { recursive: true });
@@ -1845,7 +1937,7 @@ function owningPackage(file) {
1845
1937
  try {
1846
1938
  const manifest = JSON.parse(_fs2.default.readFileSync(_path2.default.join(current, "package.json"), "utf8"));
1847
1939
  if (typeof manifest.name === "string") return { directory: current, name: manifest.name };
1848
- } catch (e30) {
1940
+ } catch (e31) {
1849
1941
  }
1850
1942
  if (_path2.default.dirname(current) === current) return null;
1851
1943
  }
@@ -1929,6 +2021,7 @@ function rewriteFarmPackageClientImports(options) {
1929
2021
  }
1930
2022
 
1931
2023
  // src/islands-containers.ts
2024
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
1932
2025
 
1933
2026
 
1934
2027
 
@@ -1947,6 +2040,7 @@ var ISLAND_CONTAINER_TAGS = /* @__PURE__ */ new Set([
1947
2040
  "ul",
1948
2041
  "ol"
1949
2042
  ]);
2043
+ var FARM_ISLAND_CONTAINER_TAG = /<(?:table|thead|tbody|tfoot|tr|select|optgroup|datalist|svg|ul|ol)[\s>/]/;
1950
2044
  var FLOW_CONTENT_TAGS = /* @__PURE__ */ new Set(["td", "th", "caption", "foreignObject", "li"]);
1951
2045
  function farmIslandContainerReferencePath(root) {
1952
2046
  return _path2.default.join(root, ".farm", "client-references", "farm.js+core", "__island-container.tsx");
@@ -1965,7 +2059,7 @@ function ensureFarmIslandContainerReference(root) {
1965
2059
  let current = null;
1966
2060
  try {
1967
2061
  current = _fs2.default.readFileSync(file, "utf8");
1968
- } catch (e31) {
2062
+ } catch (e32) {
1969
2063
  }
1970
2064
  if (current !== source) {
1971
2065
  _fs2.default.mkdirSync(_path2.default.dirname(file), { recursive: true });
@@ -1979,7 +2073,7 @@ function parse2(code, file) {
1979
2073
  return memoizeInFarmSourceSnapshot(`ast:${lang}`, code, () => {
1980
2074
  try {
1981
2075
  return _parseAst.parseAst.call(void 0, code, { lang });
1982
- } catch (e32) {
2076
+ } catch (e33) {
1983
2077
  return null;
1984
2078
  }
1985
2079
  });
@@ -1996,9 +2090,7 @@ function jsxName(node) {
1996
2090
  }
1997
2091
  function findFarmIslandContainers(code, file, bindings) {
1998
2092
  if (bindings.length === 0) return [];
1999
- if (!/<(?:table|thead|tbody|tfoot|tr|select|optgroup|datalist|svg|ul|ol)[\s>/]/.test(code)) {
2000
- return [];
2001
- }
2093
+ if (!FARM_ISLAND_CONTAINER_TAG.test(code)) return [];
2002
2094
  const program = parse2(code, file);
2003
2095
  if (!program) return null;
2004
2096
  const names = new Set(bindings);
@@ -2072,6 +2164,7 @@ ${declaration}${code.slice(prologueEnd)}`;
2072
2164
  }
2073
2165
 
2074
2166
  // src/utils/package-client-boundary-cache.ts
2167
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
2075
2168
  var _async_hooks = require('async_hooks');
2076
2169
 
2077
2170
 
@@ -2118,7 +2211,7 @@ function stampPackagePath(target, kind) {
2118
2211
  const stat = _fs2.default.statSync(target, { throwIfNoEntry: false });
2119
2212
  if (!stat || (kind === "file" ? !stat.isFile() : !stat.isDirectory())) return void 0;
2120
2213
  return [target, stat.size, stat.mtimeMs, stat.ctimeMs];
2121
- } catch (e33) {
2214
+ } catch (e34) {
2122
2215
  return void 0;
2123
2216
  }
2124
2217
  }
@@ -2154,7 +2247,8 @@ var PackageClientBoundaryCache = class {
2154
2247
  else this.dirty = true;
2155
2248
  }
2156
2249
  }
2157
- return _optionalChain([entries, 'optionalAccess', _114 => _114.find, 'call', _115 => _115(
2250
+ if (visited.size === 0) return _optionalChain([entries, 'optionalAccess', _114 => _114.find, 'call', _115 => _115((entry) => entry.stops.length === 0)]);
2251
+ return _optionalChain([entries, 'optionalAccess', _116 => _116.find, 'call', _117 => _117(
2158
2252
  (entry) => entry.stops.every((file) => visited.has(file)) && !entry.files.some((file) => visited.has(file))
2159
2253
  )]);
2160
2254
  }
@@ -2173,7 +2267,7 @@ var PackageClientBoundaryCache = class {
2173
2267
  await _fs2.default.promises.mkdir(_path2.default.dirname(file), { recursive: true });
2174
2268
  await _fs2.default.promises.writeFile(temporary, contents);
2175
2269
  await _fs2.default.promises.rename(temporary, file);
2176
- } catch (e34) {
2270
+ } catch (e35) {
2177
2271
  await _fs2.default.promises.rm(temporary, { force: true }).catch(() => {
2178
2272
  });
2179
2273
  }
@@ -2188,10 +2282,10 @@ var PackageClientBoundaryCache = class {
2188
2282
  _fs2.default.mkdirSync(_path2.default.dirname(file), { recursive: true });
2189
2283
  _fs2.default.writeFileSync(temporary, contents);
2190
2284
  _fs2.default.renameSync(temporary, file);
2191
- } catch (e35) {
2285
+ } catch (e36) {
2192
2286
  try {
2193
2287
  _fs2.default.rmSync(temporary, { force: true });
2194
- } catch (e36) {
2288
+ } catch (e37) {
2195
2289
  }
2196
2290
  }
2197
2291
  }
@@ -2225,7 +2319,7 @@ var PackageClientBoundaryCache = class {
2225
2319
  }
2226
2320
  const contents = JSON.stringify({
2227
2321
  schema: SCHEMA_VERSION,
2228
- farm: _chunkV3Y3R3JJcjs.FARM_VERSION,
2322
+ farm: _chunkXPVS4HKUcjs.FARM_VERSION,
2229
2323
  paths,
2230
2324
  entries
2231
2325
  });
@@ -2262,10 +2356,10 @@ function readStoredCache(file) {
2262
2356
  let value;
2263
2357
  try {
2264
2358
  value = JSON.parse(_fs2.default.readFileSync(file, "utf8"));
2265
- } catch (e37) {
2359
+ } catch (e38) {
2266
2360
  return null;
2267
2361
  }
2268
- if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkV3Y3R3JJcjs.FARM_VERSION) {
2362
+ if (!isRecord(value) || value.schema !== SCHEMA_VERSION || value.farm !== _chunkXPVS4HKUcjs.FARM_VERSION) {
2269
2363
  return null;
2270
2364
  }
2271
2365
  const { paths, entries } = value;
@@ -2276,7 +2370,7 @@ function readStoredCache(file) {
2276
2370
  const usable = variants.filter((entry) => isStoredEntry(entry, paths.length));
2277
2371
  if (usable.length > 0) valid[key] = usable;
2278
2372
  }
2279
- return { schema: SCHEMA_VERSION, farm: _chunkV3Y3R3JJcjs.FARM_VERSION, paths, entries: valid };
2373
+ return { schema: SCHEMA_VERSION, farm: _chunkXPVS4HKUcjs.FARM_VERSION, paths, entries: valid };
2280
2374
  }
2281
2375
  function isRecord(value) {
2282
2376
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -2290,7 +2384,7 @@ function isPathIndexList(value, pathCount) {
2290
2384
  function isStoredEntry(value, pathCount) {
2291
2385
  if (!isRecord(value) || !isRecord(value.result)) return false;
2292
2386
  const { isClientComponent, shouldHydrate, islandStrategy } = value.result;
2293
- return isPathIndexList(value.files, pathCount) && isPathIndexList(value.directories, pathCount) && Array.isArray(value.stops) && value.stops.every((file) => typeof file === "string" && _path2.default.isAbsolute(file)) && typeof isClientComponent === "boolean" && typeof shouldHydrate === "boolean" && (islandStrategy === null || _chunk7KJJ4SBScjs.isFarmIslandStrategy.call(void 0, islandStrategy)) && Object.keys(value.result).length === 3;
2387
+ return isPathIndexList(value.files, pathCount) && isPathIndexList(value.directories, pathCount) && Array.isArray(value.stops) && value.stops.every((file) => typeof file === "string" && _path2.default.isAbsolute(file)) && typeof isClientComponent === "boolean" && typeof shouldHydrate === "boolean" && (islandStrategy === null || _chunk32HGOX3Mcjs.isFarmIslandStrategy.call(void 0, islandStrategy)) && Object.keys(value.result).length === 3;
2294
2388
  }
2295
2389
  var STORAGE_KEY = /* @__PURE__ */ Symbol.for("@farm.js/core/package-client-boundary-cache");
2296
2390
  function getStorage() {
@@ -2314,8 +2408,13 @@ async function withPackageClientBoundaryCache(operation) {
2314
2408
  await cache2.persist();
2315
2409
  }
2316
2410
  }
2411
+ function bindPackageClientBoundaryCache() {
2412
+ const cache2 = getPackageClientBoundaryCache();
2413
+ if (!cache2) return (operation) => operation();
2414
+ return (operation) => getPackageClientBoundaryCache() ? operation() : getStorage().run(cache2, operation);
2415
+ }
2317
2416
  function usePackageClientBoundaryCacheFile(file) {
2318
- _optionalChain([getPackageClientBoundaryCache, 'call', _116 => _116(), 'optionalAccess', _117 => _117.load, 'call', _118 => _118(file)]);
2417
+ _optionalChain([getPackageClientBoundaryCache, 'call', _118 => _118(), 'optionalAccess', _119 => _119.load, 'call', _120 => _120(file)]);
2319
2418
  }
2320
2419
  function resolvePackageClientBoundaryCacheFile(root, distDir) {
2321
2420
  return _path2.default.resolve(root, distDir, "cache", "client-boundaries.json");
@@ -2332,7 +2431,7 @@ function runWithPackageClientBoundaryCacheFile(file, operation) {
2332
2431
  var latestDevCache;
2333
2432
  function runWithLatestPackageClientBoundaryCache(file, operation) {
2334
2433
  if (getPackageClientBoundaryCache()) return operation();
2335
- if (_optionalChain([latestDevCache, 'optionalAccess', _119 => _119.file]) !== file) {
2434
+ if (_optionalChain([latestDevCache, 'optionalAccess', _121 => _121.file]) !== file) {
2336
2435
  const cache2 = new PackageClientBoundaryCache();
2337
2436
  cache2.load(file);
2338
2437
  latestDevCache = { file, cache: cache2 };
@@ -2344,22 +2443,23 @@ function dropLatestPackageClientBoundaryCache() {
2344
2443
  }
2345
2444
 
2346
2445
  // src/utils/renderer-hydration.ts
2446
+ _chunkUGL4BDNBcjs.init_define_import_meta.call(void 0, );
2347
2447
 
2348
2448
 
2349
2449
  var scopes = /* @__PURE__ */ new Map();
2350
2450
  function realPath(file) {
2351
2451
  try {
2352
2452
  return _fs2.default.realpathSync(file);
2353
- } catch (e38) {
2453
+ } catch (e39) {
2354
2454
  return _path2.default.resolve(file);
2355
2455
  }
2356
2456
  }
2357
2457
  function setFarmRendererHydrationScope(roots, renderer, routeModules) {
2358
2458
  const keys = roots.map(realPath);
2359
2459
  const ruleSetsHydration = routeModules.some(
2360
- (entry) => _optionalChain([entry, 'access', _120 => _120.hydration, 'optionalAccess', _121 => _121.hydrate]) !== void 0 || _optionalChain([entry, 'access', _122 => _122.hydration, 'optionalAccess', _123 => _123.strategy]) !== void 0
2460
+ (entry) => _optionalChain([entry, 'access', _122 => _122.hydration, 'optionalAccess', _123 => _123.hydrate]) !== void 0 || _optionalChain([entry, 'access', _124 => _124.hydration, 'optionalAccess', _125 => _125.strategy]) !== void 0
2361
2461
  );
2362
- if (!_optionalChain([renderer, 'optionalAccess', _124 => _124.hydration]) && !_optionalChain([renderer, 'optionalAccess', _125 => _125.compile]) && !ruleSetsHydration) {
2462
+ if (!_optionalChain([renderer, 'optionalAccess', _126 => _126.hydration]) && !_optionalChain([renderer, 'optionalAccess', _127 => _127.compile]) && !ruleSetsHydration) {
2363
2463
  for (const key of keys) scopes.delete(key);
2364
2464
  return () => {
2365
2465
  };
@@ -2390,7 +2490,7 @@ function findScope(file) {
2390
2490
  if (file !== root && !file.startsWith(`${root}${_path2.default.sep}`)) continue;
2391
2491
  if (!match || root.length > match.length) match = { length: root.length, scope };
2392
2492
  }
2393
- return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _126 => _126.scope]), () => ( null));
2493
+ return _nullishCoalesce(_optionalChain([match, 'optionalAccess', _128 => _128.scope]), () => ( null));
2394
2494
  }
2395
2495
  function resolveFarmRendererModuleHydration(content, sourcePath, readSource) {
2396
2496
  if (scopes.size === 0) return null;
@@ -2399,7 +2499,7 @@ function resolveFarmRendererModuleHydration(content, sourcePath, readSource) {
2399
2499
  if (!scope) return null;
2400
2500
  const route = scope.routeModules.get(file);
2401
2501
  const options = scope.renderer.hydration;
2402
- const own = _optionalChain([options, 'optionalAccess', _127 => _127.resolve]) && scope.extensions.has(_path2.default.extname(file).toLowerCase()) ? readOwnHydration(scope, content, file) : {};
2502
+ const own = _optionalChain([options, 'optionalAccess', _129 => _129.resolve]) && scope.extensions.has(_path2.default.extname(file).toLowerCase()) ? readOwnHydration(scope, content, file) : {};
2403
2503
  if (!route && own.hydrate === void 0 && own.strategy === void 0) return null;
2404
2504
  const source = readSource();
2405
2505
  const where = `${file} sets its hydration twice`;
@@ -2413,9 +2513,9 @@ function resolveFarmRendererModuleHydration(content, sourcePath, readSource) {
2413
2513
  `${where}: \`export const island = "${source.strategy}"\` and renderer \`${scope.renderer.name}\`'s syntax, which says "${own.strategy}". Keep one of them.`
2414
2514
  );
2415
2515
  }
2416
- const kindDefault = _optionalChain([route, 'optionalAccess', _128 => _128.kind]) === "page" ? _optionalChain([options, 'optionalAccess', _129 => _129.pages]) : _optionalChain([route, 'optionalAccess', _130 => _130.kind]) === "layout" ? _optionalChain([options, 'optionalAccess', _131 => _131.layouts]) : void 0;
2417
- const hydrate = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.hydrate, () => ( source.hydrate)), () => ( _optionalChain([route, 'optionalAccess', _132 => _132.hydration, 'access', _133 => _133.hydrate]))), () => ( kindDefault)), () => ( false));
2418
- const strategy = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.strategy, () => ( source.strategy)), () => ( _optionalChain([route, 'optionalAccess', _134 => _134.hydration, 'access', _135 => _135.strategy]))), () => ( ((hydrate || source.clientDirective) && route ? _optionalChain([options, 'optionalAccess', _136 => _136.strategy]) : void 0))), () => ( null));
2516
+ const kindDefault = _optionalChain([route, 'optionalAccess', _130 => _130.kind]) === "page" ? _optionalChain([options, 'optionalAccess', _131 => _131.pages]) : _optionalChain([route, 'optionalAccess', _132 => _132.kind]) === "layout" ? _optionalChain([options, 'optionalAccess', _133 => _133.layouts]) : void 0;
2517
+ const hydrate = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.hydrate, () => ( source.hydrate)), () => ( _optionalChain([route, 'optionalAccess', _134 => _134.hydration, 'access', _135 => _135.hydrate]))), () => ( kindDefault)), () => ( false));
2518
+ const strategy = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(own.strategy, () => ( source.strategy)), () => ( _optionalChain([route, 'optionalAccess', _136 => _136.hydration, 'access', _137 => _137.strategy]))), () => ( ((hydrate || source.clientDirective) && route ? _optionalChain([options, 'optionalAccess', _138 => _138.strategy]) : void 0))), () => ( null));
2419
2519
  return { hydrate, strategy };
2420
2520
  }
2421
2521
  function readOwnHydration(scope, content, file) {
@@ -2424,7 +2524,7 @@ function readOwnHydration(scope, content, file) {
2424
2524
  try {
2425
2525
  value = scope.renderer.hydration.resolve(content, file);
2426
2526
  } catch (error) {
2427
- throw _chunkT7UC2ORAcjs.createFarmRendererHookError.call(void 0,
2527
+ throw _chunkHP7QYVSTcjs.createFarmRendererHookError.call(void 0,
2428
2528
  `${where} threw: ${error instanceof Error ? error.message : String(error)}`,
2429
2529
  error
2430
2530
  );
@@ -2435,7 +2535,7 @@ function readOwnHydration(scope, content, file) {
2435
2535
  `${where} returned ${JSON.stringify(value)}. Return \`{ hydrate?, strategy? }\`, or nothing to leave the file to Farm.`
2436
2536
  );
2437
2537
  }
2438
- return _chunkT7UC2ORAcjs.readFarmRendererHydration.call(void 0, value, where);
2538
+ return _chunkHP7QYVSTcjs.readFarmRendererHydration.call(void 0, value, where);
2439
2539
  }
2440
2540
  function mayCompileFarmRendererSource(file) {
2441
2541
  if (scopes.size === 0) return false;
@@ -2449,7 +2549,7 @@ function compileFarmRendererSource(content, sourcePath) {
2449
2549
  if (scopes.size === 0) return content;
2450
2550
  const file = realPath(sourcePath);
2451
2551
  const scope = findScope(file);
2452
- const compile = _optionalChain([scope, 'optionalAccess', _137 => _137.renderer, 'access', _138 => _138.compile]);
2552
+ const compile = _optionalChain([scope, 'optionalAccess', _139 => _139.renderer, 'access', _140 => _140.compile]);
2453
2553
  if (!scope || !compile || !scope.extensions.has(_path2.default.extname(file).toLowerCase())) {
2454
2554
  return content;
2455
2555
  }
@@ -2458,7 +2558,7 @@ function compileFarmRendererSource(content, sourcePath) {
2458
2558
  try {
2459
2559
  value = compile.call(scope.renderer, content, file);
2460
2560
  } catch (error) {
2461
- throw _chunkT7UC2ORAcjs.createFarmRendererHookError.call(void 0,
2561
+ throw _chunkHP7QYVSTcjs.createFarmRendererHookError.call(void 0,
2462
2562
  `${where} threw: ${error instanceof Error ? error.message : String(error)}`,
2463
2563
  error
2464
2564
  );
@@ -2510,9 +2610,9 @@ function scanMarkdownCode(content) {
2510
2610
  let inCode = false;
2511
2611
  for (; index < lines.length; index++) {
2512
2612
  const line = lines[index];
2513
- const marker = _optionalChain([/^ {0,3}(`{3,}|~{3,})/, 'access', _139 => _139.exec, 'call', _140 => _140(line), 'optionalAccess', _141 => _141[1]]);
2613
+ const marker = _optionalChain([/^ {0,3}(`{3,}|~{3,})/, 'access', _141 => _141.exec, 'call', _142 => _142(line), 'optionalAccess', _143 => _143[1]]);
2514
2614
  if (fence) {
2515
- if (_optionalChain([marker, 'optionalAccess', _142 => _142[0]]) === fence[0] && marker.length >= fence.length && line.trim() === marker) {
2615
+ if (_optionalChain([marker, 'optionalAccess', _144 => _144[0]]) === fence[0] && marker.length >= fence.length && line.trim() === marker) {
2516
2616
  fence = null;
2517
2617
  }
2518
2618
  } else if (inCode) {
@@ -2538,7 +2638,7 @@ function readSourceFileContents(filePath) {
2538
2638
  return null;
2539
2639
  }
2540
2640
  return _fs2.default.readFileSync(filePath, "utf-8");
2541
- } catch (e39) {
2641
+ } catch (e40) {
2542
2642
  return null;
2543
2643
  }
2544
2644
  }
@@ -2551,7 +2651,7 @@ function resolveModuleSourcePath(modulePath, root) {
2551
2651
  if (modulePath.startsWith("file://")) {
2552
2652
  try {
2553
2653
  candidates.add(_url.fileURLToPath.call(void 0, modulePath));
2554
- } catch (e40) {
2654
+ } catch (e41) {
2555
2655
  }
2556
2656
  }
2557
2657
  if (modulePath.startsWith("/@fs/")) {
@@ -2564,7 +2664,7 @@ function resolveModuleSourcePath(modulePath, root) {
2564
2664
  candidates.add(_path2.default.join(root, normalized));
2565
2665
  candidates.add(_path2.default.resolve(root, normalized));
2566
2666
  }
2567
- if (_optionalChain([withoutQuery, 'optionalAccess', _143 => _143.startsWith, 'call', _144 => _144("/src/")])) {
2667
+ if (_optionalChain([withoutQuery, 'optionalAccess', _145 => _145.startsWith, 'call', _146 => _146("/src/")])) {
2568
2668
  const normalized = withoutQuery.replace(/^\/+/, "");
2569
2669
  candidates.add(_path2.default.join(process.cwd(), normalized));
2570
2670
  candidates.add(_path2.default.resolve(process.cwd(), normalized));
@@ -2577,7 +2677,7 @@ function resolveModuleSourcePath(modulePath, root) {
2577
2677
  return null;
2578
2678
  }
2579
2679
  function getFarmClientHydrationPlanOptions(renderer, hasUnsupportedIntegrationProvider) {
2580
- return { asyncOwnerIslands: _chunkT7UC2ORAcjs.isReactRenderer.call(void 0, renderer) && !hasUnsupportedIntegrationProvider };
2680
+ return { asyncOwnerIslands: _chunkHP7QYVSTcjs.isReactRenderer.call(void 0, renderer) && !hasUnsupportedIntegrationProvider };
2581
2681
  }
2582
2682
  function describeSuppressedAsyncHydration(subject, reason) {
2583
2683
  const remediation = reason ? "Fix the reason above, or render the interactive UI from a synchronous owner." : 'Move the interactive UI into an eligible "use client" boundary, or render it from a synchronous owner.';
@@ -2634,7 +2734,7 @@ function hasUseClientDirective(content) {
2634
2734
  return false;
2635
2735
  }
2636
2736
  function hasHydrateExport(content) {
2637
- return _optionalChain([_chunkWMRGIQTAcjs.readFarmHydrateExport.call(void 0, content), 'optionalAccess', _145 => _145.value]) === true;
2737
+ return _optionalChain([_chunkJ3RIMCBDcjs.readFarmHydrateExport.call(void 0, content), 'optionalAccess', _147 => _147.value]) === true;
2638
2738
  }
2639
2739
  var REGEXP_PREFIX_PUNCTUATION = /* @__PURE__ */ new Set([
2640
2740
  "(",
@@ -2823,7 +2923,7 @@ function isIslandExportStart(tokens, index) {
2823
2923
  const token = tokens[index];
2824
2924
  const previous = tokens[index - 1];
2825
2925
  const startsStatement = !previous || previous.value === ";" || previous.value === "{" || previous.value === "}" || token.line > previous.line;
2826
- return startsStatement && token.value === "export" && _optionalChain([tokens, 'access', _146 => _146[index + 1], 'optionalAccess', _147 => _147.value]) === "const" && _optionalChain([tokens, 'access', _148 => _148[index + 2], 'optionalAccess', _149 => _149.value]) === "island";
2926
+ return startsStatement && token.value === "export" && _optionalChain([tokens, 'access', _148 => _148[index + 1], 'optionalAccess', _149 => _149.value]) === "const" && _optionalChain([tokens, 'access', _150 => _150[index + 2], 'optionalAccess', _151 => _151.value]) === "island";
2827
2927
  }
2828
2928
  function getIslandStrategyExport(content) {
2829
2929
  if (!content) return null;
@@ -2831,15 +2931,15 @@ function getIslandStrategyExport(content) {
2831
2931
  for (let index = 0; index < tokens.length - 2; index++) {
2832
2932
  if (!isIslandExportStart(tokens, index)) continue;
2833
2933
  let valueIndex = index + 3;
2834
- if (_optionalChain([tokens, 'access', _150 => _150[valueIndex], 'optionalAccess', _151 => _151.value]) === ":") {
2934
+ if (_optionalChain([tokens, 'access', _152 => _152[valueIndex], 'optionalAccess', _153 => _153.value]) === ":") {
2835
2935
  while (valueIndex < tokens.length && tokens[valueIndex].value !== "=") valueIndex++;
2836
2936
  }
2837
- if (_optionalChain([tokens, 'access', _152 => _152[valueIndex], 'optionalAccess', _153 => _153.value]) !== "=") break;
2937
+ if (_optionalChain([tokens, 'access', _154 => _154[valueIndex], 'optionalAccess', _155 => _155.value]) !== "=") break;
2838
2938
  valueIndex++;
2839
2939
  const literal = tokens[valueIndex];
2840
- if (!literal || literal.kind !== "string" || !_chunk7KJJ4SBScjs.isFarmIslandStrategy.call(void 0, literal.value)) break;
2940
+ if (!literal || literal.kind !== "string" || !_chunk32HGOX3Mcjs.isFarmIslandStrategy.call(void 0, literal.value)) break;
2841
2941
  let trailingIndex = valueIndex + 1;
2842
- if (_optionalChain([tokens, 'access', _154 => _154[trailingIndex], 'optionalAccess', _155 => _155.value]) === "as" && _optionalChain([tokens, 'access', _156 => _156[trailingIndex + 1], 'optionalAccess', _157 => _157.value]) === "const") {
2942
+ if (_optionalChain([tokens, 'access', _156 => _156[trailingIndex], 'optionalAccess', _157 => _157.value]) === "as" && _optionalChain([tokens, 'access', _158 => _158[trailingIndex + 1], 'optionalAccess', _159 => _159.value]) === "const") {
2843
2943
  trailingIndex += 2;
2844
2944
  }
2845
2945
  const trailing = tokens[trailingIndex];
@@ -2865,13 +2965,13 @@ function hasAsyncDefaultExport(content) {
2865
2965
  for (let index = 0; index < tokens.length - 2; index++) {
2866
2966
  const token = tokens[index];
2867
2967
  if (token.kind !== "identifier" || token.value !== "export") continue;
2868
- if (_optionalChain([tokens, 'access', _158 => _158[index - 1], 'optionalAccess', _159 => _159.value]) === ".") continue;
2869
- if (_optionalChain([tokens, 'access', _160 => _160[index + 1], 'optionalAccess', _161 => _161.value]) !== "default") continue;
2968
+ if (_optionalChain([tokens, 'access', _160 => _160[index - 1], 'optionalAccess', _161 => _161.value]) === ".") continue;
2969
+ if (_optionalChain([tokens, 'access', _162 => _162[index + 1], 'optionalAccess', _163 => _163.value]) !== "default") continue;
2870
2970
  const exported = tokens[index + 2];
2871
2971
  if (exported.kind === "identifier" && exported.value === "async") {
2872
2972
  return true;
2873
2973
  }
2874
- if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access', _162 => _162[index + 3], 'optionalAccess', _163 => _163.value]) !== "(" && isAsyncLocalDeclaration(tokens, exported.value)) {
2974
+ if (exported.kind === "identifier" && !["function", "class"].includes(exported.value) && _optionalChain([tokens, 'access', _164 => _164[index + 3], 'optionalAccess', _165 => _165.value]) !== "(" && isAsyncLocalDeclaration(tokens, exported.value)) {
2875
2975
  return true;
2876
2976
  }
2877
2977
  }
@@ -2879,15 +2979,23 @@ function hasAsyncDefaultExport(content) {
2879
2979
  }
2880
2980
  function isAsyncLocalDeclaration(tokens, name) {
2881
2981
  for (let index = 0; index < tokens.length - 2; index++) {
2882
- if (tokens[index].value === "async" && _optionalChain([tokens, 'access', _164 => _164[index + 1], 'optionalAccess', _165 => _165.value]) === "function" && _optionalChain([tokens, 'access', _166 => _166[index + 2], 'optionalAccess', _167 => _167.value]) === name) {
2982
+ if (tokens[index].value === "async" && _optionalChain([tokens, 'access', _166 => _166[index + 1], 'optionalAccess', _167 => _167.value]) === "function" && _optionalChain([tokens, 'access', _168 => _168[index + 2], 'optionalAccess', _169 => _169.value]) === name) {
2883
2983
  return true;
2884
2984
  }
2885
- if (tokens[index].value === name && _optionalChain([tokens, 'access', _168 => _168[index + 1], 'optionalAccess', _169 => _169.value]) === "=" && _optionalChain([tokens, 'access', _170 => _170[index + 2], 'optionalAccess', _171 => _171.value]) === "async") {
2985
+ if (tokens[index].value === name && _optionalChain([tokens, 'access', _170 => _170[index + 1], 'optionalAccess', _171 => _171.value]) === "=" && _optionalChain([tokens, 'access', _172 => _172[index + 2], 'optionalAccess', _173 => _173.value]) === "async") {
2886
2986
  return true;
2887
2987
  }
2888
2988
  }
2889
2989
  return false;
2890
2990
  }
2991
+ function parseImportedModuleMetadata(content) {
2992
+ if (!content) return parseClientModuleMetadata(content, false);
2993
+ return memoizeInFarmSourceSnapshot(
2994
+ "imported-module-metadata",
2995
+ content,
2996
+ () => parseClientModuleMetadata(content, false)
2997
+ );
2998
+ }
2891
2999
  function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
2892
3000
  if (!content) {
2893
3001
  return {
@@ -2897,9 +3005,9 @@ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
2897
3005
  };
2898
3006
  }
2899
3007
  const isClientComponent = hasUseClientDirective(content);
2900
- const hydrate = _chunkWMRGIQTAcjs.readFarmHydrateExport.call(void 0, content);
3008
+ const hydrate = _chunkJ3RIMCBDcjs.readFarmHydrateExport.call(void 0, content);
2901
3009
  if (inspectIslandExport && hydrate && hydrate.value === null) {
2902
- throw new Error(_chunkWMRGIQTAcjs.formatFarmHydrateExportError.call(void 0, hydrate, sourcePath));
3010
+ throw new Error(_chunkJ3RIMCBDcjs.formatFarmHydrateExportError.call(void 0, hydrate, sourcePath));
2903
3011
  }
2904
3012
  const rendererHydration = inspectIslandExport && sourcePath ? (
2905
3013
  // The renderer's own syntax is read from the file as written, before its `compile()`.
@@ -2907,7 +3015,7 @@ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
2907
3015
  mayCompileFarmRendererSource(sourcePath) && readSourceIfExists(sourcePath) || content,
2908
3016
  sourcePath,
2909
3017
  () => ({
2910
- hydrate: typeof _optionalChain([hydrate, 'optionalAccess', _172 => _172.value]) === "boolean" ? hydrate.value : void 0,
3018
+ hydrate: typeof _optionalChain([hydrate, 'optionalAccess', _174 => _174.value]) === "boolean" ? hydrate.value : void 0,
2911
3019
  strategy: getIslandStrategyExport(content),
2912
3020
  clientDirective: isClientComponent
2913
3021
  })
@@ -2920,7 +3028,7 @@ function parseClientModuleMetadata(content, inspectIslandExport, sourcePath) {
2920
3028
  islandStrategy: rendererHydration.strategy
2921
3029
  };
2922
3030
  }
2923
- const hasHydrate = _optionalChain([hydrate, 'optionalAccess', _173 => _173.value]) === true;
3031
+ const hasHydrate = _optionalChain([hydrate, 'optionalAccess', _175 => _175.value]) === true;
2924
3032
  return {
2925
3033
  isClientComponent,
2926
3034
  hasHydrateExport: hasHydrate,
@@ -2950,7 +3058,7 @@ function getFarmClientRenderingBindings(code, file, root) {
2950
3058
  for (const [specifier, locals] of getStaticImportBindings(code)) {
2951
3059
  const imported = resolveImportedModule(file, specifier, root);
2952
3060
  if (!imported.path) continue;
2953
- const metadata = imported.local ? inspectClientModuleMetadata(imported.path, root, /* @__PURE__ */ new Set([_path2.default.resolve(file)]), false) : inspectPackageClientBoundary(imported.path, root, /* @__PURE__ */ new Set());
3061
+ const metadata = imported.local ? inspectClientModuleMetadata(imported.path, root, /* @__PURE__ */ new Set([_path2.default.resolve(file)]), false) : inspectPackageClientBoundary(imported.path, root);
2954
3062
  if (metadata.isClientComponent || metadata.shouldHydrate) bindings.push(...locals);
2955
3063
  }
2956
3064
  return bindings;
@@ -3123,7 +3231,7 @@ function planClientModuleHydration(modulePath, root, mode, options) {
3123
3231
  return plan;
3124
3232
  }
3125
3233
  function usesFarmServerTree(plan) {
3126
- return _optionalChain([plan, 'optionalAccess', _174 => _174.asyncOwnerIslands]) === true && plan.isolatedBoundaries.length > 0;
3234
+ return _optionalChain([plan, 'optionalAccess', _176 => _176.asyncOwnerIslands]) === true && plan.isolatedBoundaries.length > 0;
3127
3235
  }
3128
3236
  function getMarkdownPageHydrationPlan(componentsModulePath, root, mode = "off", options = {}) {
3129
3237
  const plan = {
@@ -3253,7 +3361,7 @@ function clientModulePlanSignature(content) {
3253
3361
  isIsolatableClientBoundarySource(content),
3254
3362
  getImportSpecifiers(content).sort()
3255
3363
  ]);
3256
- } catch (e41) {
3364
+ } catch (e42) {
3257
3365
  return null;
3258
3366
  }
3259
3367
  }
@@ -3261,6 +3369,48 @@ function isFarmClientModulePlanUnchanged(file, previous) {
3261
3369
  const signature = clientModulePlanSignature(previous);
3262
3370
  return signature !== null && signature === clientModulePlanSignature(readSourceFileContents(file));
3263
3371
  }
3372
+ var SERVER_PLAN_SIGNATURE_SOURCE = /\.[cm]?[jt]sx?$/;
3373
+ function serverModulePlanSignature(content, file) {
3374
+ if (!content || !SERVER_PLAN_SIGNATURE_SOURCE.test(file) || mayCompileFarmRendererSource(file) || hasUseClientDirective(content)) {
3375
+ return null;
3376
+ }
3377
+ try {
3378
+ const bindings = getStaticImportBindings(content);
3379
+ const specifiers = getImportSpecifiers(content);
3380
+ return JSON.stringify([
3381
+ parseClientModuleMetadata(content, false),
3382
+ parseClientModuleMetadata(content, true, file),
3383
+ _nullishCoalesce(_optionalChain([DEFAULT_REEXPORT, 'access', _177 => _177.exec, 'call', _178 => _178(content), 'optionalAccess', _179 => _179[2]]), () => ( null)),
3384
+ hasAsyncDefaultExport(content),
3385
+ specifiers,
3386
+ getImportSpecifiers(content, { dynamic: true }),
3387
+ getImportSpecifiers(content, { reexportsOnly: true }),
3388
+ [...bindings],
3389
+ [...new Set(specifiers)].map((specifier) => {
3390
+ const locals = _nullishCoalesce(bindings.get(specifier), () => ( []));
3391
+ return [
3392
+ countStaticJsxUses(content, locals),
3393
+ _nullishCoalesce(findParserSensitiveJsxContainer(content, locals), () => ( null)),
3394
+ passesElementValuedProps(content, locals),
3395
+ hasDynamicJsxCardinality(content, locals),
3396
+ rendersOnlyLeafElements(content, locals),
3397
+ (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _180 => _180(content, file, locals), 'optionalAccess', _181 => _181.length]), () => ( 0))) > 0,
3398
+ findFarmPackageClientImports(content, file, (candidate) => candidate === specifier).map(
3399
+ farmPackageClientImportExports
3400
+ ),
3401
+ findFarmReactServerClientNames(content, file, specifier),
3402
+ findFarmReactServerClientModules(content, file, specifier)
3403
+ ];
3404
+ })
3405
+ ]);
3406
+ } catch (e43) {
3407
+ return null;
3408
+ }
3409
+ }
3410
+ function isFarmServerModulePlanUnchanged(file, previous) {
3411
+ const signature = serverModulePlanSignature(previous, file);
3412
+ return signature !== null && signature === serverModulePlanSignature(readSourceFileContents(file), file);
3413
+ }
3264
3414
  function exportListNames(content) {
3265
3415
  const names = [];
3266
3416
  for (const match of content.matchAll(/\bexport\s*(type\s*)?\{([^}]*)\}/g)) {
@@ -3273,12 +3423,20 @@ function exportListNames(content) {
3273
3423
  }
3274
3424
  return names;
3275
3425
  }
3426
+ var NO_IMPORT_BINDINGS = /* @__PURE__ */ new Map();
3276
3427
  function getStaticImportBindings(content) {
3428
+ if (!content) return NO_IMPORT_BINDINGS;
3429
+ return memoizeInFarmSourceSnapshot(
3430
+ "import-bindings",
3431
+ content,
3432
+ () => scanStaticImportBindings(content)
3433
+ );
3434
+ }
3435
+ function scanStaticImportBindings(content) {
3277
3436
  const bindings = /* @__PURE__ */ new Map();
3278
- if (!content) return bindings;
3279
3437
  const tokens = tokenizeModuleSource(content);
3280
3438
  for (let index = 0; index < tokens.length; index++) {
3281
- if (tokens[index].value !== "import" || _optionalChain([tokens, 'access', _175 => _175[index - 1], 'optionalAccess', _176 => _176.value]) === ".") continue;
3439
+ if (tokens[index].value !== "import" || _optionalChain([tokens, 'access', _182 => _182[index - 1], 'optionalAccess', _183 => _183.value]) === ".") continue;
3282
3440
  const first = tokens[index + 1];
3283
3441
  if (!first || first.value === "type" || first.value === "(" || first.kind === "string") {
3284
3442
  continue;
@@ -3286,7 +3444,7 @@ function getStaticImportBindings(content) {
3286
3444
  let fromIndex = -1;
3287
3445
  for (let cursor = index + 1; cursor < tokens.length; cursor++) {
3288
3446
  if (tokens[cursor].value === ";") break;
3289
- if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access', _177 => _177[cursor + 1], 'optionalAccess', _178 => _178.kind]) === "string") {
3447
+ if (tokens[cursor].value === "from" && _optionalChain([tokens, 'access', _184 => _184[cursor + 1], 'optionalAccess', _185 => _185.kind]) === "string") {
3290
3448
  fromIndex = cursor;
3291
3449
  break;
3292
3450
  }
@@ -3295,13 +3453,13 @@ function getStaticImportBindings(content) {
3295
3453
  const specifier = tokens[fromIndex + 1].value;
3296
3454
  const clause = tokens.slice(index + 1, fromIndex);
3297
3455
  const localNames = [];
3298
- if (_optionalChain([clause, 'access', _179 => _179[0], 'optionalAccess', _180 => _180.kind]) === "identifier" && clause[0].value !== "type") {
3456
+ if (_optionalChain([clause, 'access', _186 => _186[0], 'optionalAccess', _187 => _187.kind]) === "identifier" && clause[0].value !== "type") {
3299
3457
  localNames.push(clause[0].value);
3300
3458
  }
3301
3459
  const namespaceAs = clause.findIndex(
3302
- (token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access', _181 => _181[clauseIndex + 1], 'optionalAccess', _182 => _182.value]) === "as"
3460
+ (token, clauseIndex) => token.value === "*" && _optionalChain([clause, 'access', _188 => _188[clauseIndex + 1], 'optionalAccess', _189 => _189.value]) === "as"
3303
3461
  );
3304
- if (namespaceAs !== -1 && _optionalChain([clause, 'access', _183 => _183[namespaceAs + 2], 'optionalAccess', _184 => _184.kind]) === "identifier") {
3462
+ if (namespaceAs !== -1 && _optionalChain([clause, 'access', _190 => _190[namespaceAs + 2], 'optionalAccess', _191 => _191.kind]) === "identifier") {
3305
3463
  localNames.push(clause[namespaceAs + 2].value);
3306
3464
  }
3307
3465
  const openingBrace = clause.findIndex((token) => token.value === "{");
@@ -3311,11 +3469,11 @@ function getStaticImportBindings(content) {
3311
3469
  if (openingBrace !== -1 && closingBrace !== -1) {
3312
3470
  let entryStart = openingBrace + 1;
3313
3471
  for (let cursor = entryStart; cursor <= closingBrace; cursor++) {
3314
- if (cursor !== closingBrace && _optionalChain([clause, 'access', _185 => _185[cursor], 'optionalAccess', _186 => _186.value]) !== ",") continue;
3472
+ if (cursor !== closingBrace && _optionalChain([clause, 'access', _192 => _192[cursor], 'optionalAccess', _193 => _193.value]) !== ",") continue;
3315
3473
  const entry = clause.slice(entryStart, cursor).filter((token) => token.value !== "type");
3316
3474
  const asIndex = entry.findIndex((token) => token.value === "as");
3317
3475
  const local = asIndex === -1 ? entry[0] : entry[asIndex + 1];
3318
- if (_optionalChain([local, 'optionalAccess', _187 => _187.kind]) === "identifier") localNames.push(local.value);
3476
+ if (_optionalChain([local, 'optionalAccess', _194 => _194.kind]) === "identifier") localNames.push(local.value);
3319
3477
  entryStart = cursor + 1;
3320
3478
  }
3321
3479
  }
@@ -3352,7 +3510,7 @@ function findParserSensitiveJsxContainer(content, localBindings) {
3352
3510
  const open = [];
3353
3511
  const isSelfClosing = (openingIndex) => {
3354
3512
  for (let index = openingIndex; index < tokens.length; index++) {
3355
- if (tokens[index].value === ">") return _optionalChain([tokens, 'access', _188 => _188[index - 1], 'optionalAccess', _189 => _189.value]) === "/";
3513
+ if (tokens[index].value === ">") return _optionalChain([tokens, 'access', _195 => _195[index - 1], 'optionalAccess', _196 => _196.value]) === "/";
3356
3514
  }
3357
3515
  return false;
3358
3516
  };
@@ -3360,7 +3518,7 @@ function findParserSensitiveJsxContainer(content, localBindings) {
3360
3518
  if (tokens[index].value !== "<") continue;
3361
3519
  if (tokens[index + 1].value === "/") {
3362
3520
  const closing = tokens[index + 2];
3363
- const at = _optionalChain([closing, 'optionalAccess', _190 => _190.kind]) === "identifier" ? open.lastIndexOf(closing.value) : -1;
3521
+ const at = _optionalChain([closing, 'optionalAccess', _197 => _197.kind]) === "identifier" ? open.lastIndexOf(closing.value) : -1;
3364
3522
  if (at !== -1) open.length = at;
3365
3523
  continue;
3366
3524
  }
@@ -3403,7 +3561,7 @@ function findMatchingToken(tokens, openingIndex, opening, closing) {
3403
3561
  }
3404
3562
  function containsClientJsx(tokens, start, end, clientBindings) {
3405
3563
  for (let index = start; index < end; index++) {
3406
- if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access', _191 => _191[index + 1], 'optionalAccess', _192 => _192.value]))) return true;
3564
+ if (tokens[index].value === "<" && clientBindings.has(_optionalChain([tokens, 'access', _198 => _198[index + 1], 'optionalAccess', _199 => _199.value]))) return true;
3407
3565
  }
3408
3566
  return false;
3409
3567
  }
@@ -3441,7 +3599,7 @@ function getClientRenderingHelpers(tokens, clientBindings) {
3441
3599
  let helperName;
3442
3600
  let bodyStart = -1;
3443
3601
  let bodyEnd = -1;
3444
- if (tokens[index].value === "function" && _optionalChain([tokens, 'access', _193 => _193[index + 1], 'optionalAccess', _194 => _194.kind]) === "identifier") {
3602
+ if (tokens[index].value === "function" && _optionalChain([tokens, 'access', _200 => _200[index + 1], 'optionalAccess', _201 => _201.kind]) === "identifier") {
3445
3603
  helperName = tokens[index + 1].value;
3446
3604
  const parametersStart = tokens.findIndex(
3447
3605
  (token, tokenIndex) => tokenIndex > index + 1 && token.value === "("
@@ -3451,21 +3609,21 @@ function getClientRenderingHelpers(tokens, clientBindings) {
3451
3609
  (token, tokenIndex) => tokenIndex > parametersEnd && token.value === "{"
3452
3610
  );
3453
3611
  if (bodyStart !== -1) bodyEnd = findMatchingToken(tokens, bodyStart, "{", "}");
3454
- } else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access', _195 => _195[index + 1], 'optionalAccess', _196 => _196.kind]) === "identifier") {
3612
+ } else if ((tokens[index].value === "const" || tokens[index].value === "let" || tokens[index].value === "var") && _optionalChain([tokens, 'access', _202 => _202[index + 1], 'optionalAccess', _203 => _203.kind]) === "identifier") {
3455
3613
  helperName = tokens[index + 1].value;
3456
3614
  let assignmentIndex = -1;
3457
3615
  let arrowIndex = -1;
3458
3616
  for (let cursor = index + 2; cursor < tokens.length; cursor++) {
3459
3617
  if (tokens[cursor].value === ";") break;
3460
3618
  if (assignmentIndex === -1 && tokens[cursor].value === "=") assignmentIndex = cursor;
3461
- if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access', _197 => _197[cursor + 1], 'optionalAccess', _198 => _198.value]) === ">") {
3619
+ if (tokens[cursor].value === "=" && _optionalChain([tokens, 'access', _204 => _204[cursor + 1], 'optionalAccess', _205 => _205.value]) === ">") {
3462
3620
  arrowIndex = cursor;
3463
3621
  break;
3464
3622
  }
3465
3623
  }
3466
3624
  if (arrowIndex !== -1) {
3467
3625
  bodyStart = arrowIndex + 2;
3468
- bodyEnd = _optionalChain([tokens, 'access', _199 => _199[bodyStart], 'optionalAccess', _200 => _200.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : findStatementEnd(tokens, bodyStart);
3626
+ bodyEnd = _optionalChain([tokens, 'access', _206 => _206[bodyStart], 'optionalAccess', _207 => _207.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : findStatementEnd(tokens, bodyStart);
3469
3627
  } else if (assignmentIndex !== -1) {
3470
3628
  bodyStart = assignmentIndex + 1;
3471
3629
  bodyEnd = findStatementEnd(tokens, bodyStart);
@@ -3505,14 +3663,14 @@ function passesElementValuedProps(content, localBindings) {
3505
3663
  else if (value === "}") braceDepth--;
3506
3664
  else if (value === "<" && braceDepth > 0) return true;
3507
3665
  else if (value === ">" && braceDepth === 0) {
3508
- selfClosing = _optionalChain([tokens, 'access', _201 => _201[cursor - 1], 'optionalAccess', _202 => _202.value]) === "/";
3666
+ selfClosing = _optionalChain([tokens, 'access', _208 => _208[cursor - 1], 'optionalAccess', _209 => _209.value]) === "/";
3509
3667
  break;
3510
3668
  }
3511
3669
  }
3512
3670
  if (selfClosing || cursor >= tokens.length) continue;
3513
3671
  for (let child = cursor + 1; child < tokens.length; child++) {
3514
3672
  if (tokens[child].value !== "<") continue;
3515
- const closesBoundary = _optionalChain([tokens, 'access', _203 => _203[child + 1], 'optionalAccess', _204 => _204.value]) === "/" && _optionalChain([tokens, 'access', _205 => _205[child + 2], 'optionalAccess', _206 => _206.value]) === name;
3673
+ const closesBoundary = _optionalChain([tokens, 'access', _210 => _210[child + 1], 'optionalAccess', _211 => _211.value]) === "/" && _optionalChain([tokens, 'access', _212 => _212[child + 2], 'optionalAccess', _213 => _213.value]) === name;
3516
3674
  if (!closesBoundary) return true;
3517
3675
  break;
3518
3676
  }
@@ -3534,7 +3692,7 @@ function rendersOnlyLeafElements(content, localBindings) {
3534
3692
  else if (value === "<" && braceDepth > 0) return false;
3535
3693
  else if (value === ">" && braceDepth === 0) break;
3536
3694
  }
3537
- if (cursor >= tokens.length || _optionalChain([tokens, 'access', _207 => _207[cursor - 1], 'optionalAccess', _208 => _208.value]) !== "/") return false;
3695
+ if (cursor >= tokens.length || _optionalChain([tokens, 'access', _214 => _214[cursor - 1], 'optionalAccess', _215 => _215.value]) !== "/") return false;
3538
3696
  }
3539
3697
  return true;
3540
3698
  }
@@ -3546,9 +3704,9 @@ function hasDynamicJsxCardinality(content, localBindings) {
3546
3704
  const containsDynamicRenderer = (start, end) => containsClientJsx(tokens, start, end, clientBindings) || tokens.slice(start, end).some((token) => renderingHelpers.has(token.value));
3547
3705
  for (let index = 0; index < tokens.length; index++) {
3548
3706
  let callStart = -1;
3549
- if (tokens[index].value === "." && (_optionalChain([tokens, 'access', _209 => _209[index + 1], 'optionalAccess', _210 => _210.value]) === "map" || _optionalChain([tokens, 'access', _211 => _211[index + 1], 'optionalAccess', _212 => _212.value]) === "flatMap") && _optionalChain([tokens, 'access', _213 => _213[index + 2], 'optionalAccess', _214 => _214.value]) === "(") {
3707
+ if (tokens[index].value === "." && (_optionalChain([tokens, 'access', _216 => _216[index + 1], 'optionalAccess', _217 => _217.value]) === "map" || _optionalChain([tokens, 'access', _218 => _218[index + 1], 'optionalAccess', _219 => _219.value]) === "flatMap") && _optionalChain([tokens, 'access', _220 => _220[index + 2], 'optionalAccess', _221 => _221.value]) === "(") {
3550
3708
  callStart = index + 2;
3551
- } else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access', _215 => _215[index + 1], 'optionalAccess', _216 => _216.value]) === "." && _optionalChain([tokens, 'access', _217 => _217[index + 2], 'optionalAccess', _218 => _218.value]) === "from" && _optionalChain([tokens, 'access', _219 => _219[index + 3], 'optionalAccess', _220 => _220.value]) === "(") {
3709
+ } else if (tokens[index].value === "Array" && _optionalChain([tokens, 'access', _222 => _222[index + 1], 'optionalAccess', _223 => _223.value]) === "." && _optionalChain([tokens, 'access', _224 => _224[index + 2], 'optionalAccess', _225 => _225.value]) === "from" && _optionalChain([tokens, 'access', _226 => _226[index + 3], 'optionalAccess', _227 => _227.value]) === "(") {
3552
3710
  callStart = index + 3;
3553
3711
  }
3554
3712
  if (callStart !== -1) {
@@ -3557,10 +3715,10 @@ function hasDynamicJsxCardinality(content, localBindings) {
3557
3715
  index = callEnd;
3558
3716
  continue;
3559
3717
  }
3560
- if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access', _221 => _221[index + 1], 'optionalAccess', _222 => _222.value]) === "(") {
3718
+ if ((tokens[index].value === "for" || tokens[index].value === "while") && _optionalChain([tokens, 'access', _228 => _228[index + 1], 'optionalAccess', _229 => _229.value]) === "(") {
3561
3719
  const conditionEnd = findMatchingToken(tokens, index + 1, "(", ")");
3562
3720
  const bodyStart = conditionEnd + 1;
3563
- const bodyEnd = _optionalChain([tokens, 'access', _223 => _223[bodyStart], 'optionalAccess', _224 => _224.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : tokens.findIndex((token, tokenIndex) => tokenIndex > bodyStart && token.value === ";");
3721
+ const bodyEnd = _optionalChain([tokens, 'access', _230 => _230[bodyStart], 'optionalAccess', _231 => _231.value]) === "{" ? findMatchingToken(tokens, bodyStart, "{", "}") : tokens.findIndex((token, tokenIndex) => tokenIndex > bodyStart && token.value === ";");
3564
3722
  if (containsDynamicRenderer(bodyStart, bodyEnd === -1 ? tokens.length : bodyEnd)) return true;
3565
3723
  }
3566
3724
  }
@@ -3582,7 +3740,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
3582
3740
  if (visiting.has(moduleSourcePath)) return 0;
3583
3741
  visiting.add(moduleSourcePath);
3584
3742
  const content = readModuleCode(moduleSourcePath);
3585
- const parsed = parseClientModuleMetadata(content, false);
3743
+ const parsed = parseImportedModuleMetadata(content);
3586
3744
  if (parsed.isClientComponent) {
3587
3745
  if (!isIsolatableClientBoundarySource(content)) {
3588
3746
  fallbackReason = `client boundary ${moduleSourcePath} uses an unsupported export shape`;
@@ -3644,7 +3802,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
3644
3802
  if (reference) importedBoundaryCount += visit(reference);
3645
3803
  }
3646
3804
  } else {
3647
- const packageMetadata = inspectPackageClientBoundary(importedPath, root, /* @__PURE__ */ new Set());
3805
+ const packageMetadata = inspectPackageClientBoundary(importedPath, root);
3648
3806
  if (!packageMetadata.shouldHydrate) continue;
3649
3807
  const references = options.packageReferences && projectRoot ? findFarmPackageClientImports(
3650
3808
  _nullishCoalesce(content, () => ( "")),
@@ -3679,7 +3837,7 @@ function collectIsolatedClientBoundaries(ownerPath, root, options = {}) {
3679
3837
  const localBindings = _nullishCoalesce(importedBindings.get(specifier), () => ( []));
3680
3838
  const staticUses = countStaticJsxUses(content, localBindings);
3681
3839
  if (staticUses > 0) {
3682
- const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _225 => _225(_nullishCoalesce(content, () => ( "")), moduleSourcePath, localBindings), 'optionalAccess', _226 => _226.length]), () => ( 0))) > 0;
3840
+ const grows = options.packageReferences === true && projectRoot !== void 0 && (_nullishCoalesce(_optionalChain([findFarmIslandContainers, 'call', _232 => _232(_nullishCoalesce(content, () => ( "")), moduleSourcePath, localBindings), 'optionalAccess', _233 => _233.length]), () => ( 0))) > 0;
3683
3841
  if (grows) visit(ensureFarmIslandContainerReference(projectRoot));
3684
3842
  const container = grows ? void 0 : findParserSensitiveJsxContainer(content, localBindings);
3685
3843
  if (container) {
@@ -3769,43 +3927,65 @@ function inspectClientModuleMetadata(resolvedPath, root, visited, inspectIslandE
3769
3927
  function farmWorkspaceServerEntry(entry) {
3770
3928
  const real = realpathOrSelf(entry);
3771
3929
  if (real.split(_path2.default.sep).includes("node_modules")) return null;
3772
- if (parseClientModuleMetadata(readIfExists(real), false).isClientComponent) return null;
3930
+ if (parseImportedModuleMetadata(readIfExists(real)).isClientComponent) return null;
3773
3931
  return real;
3774
3932
  }
3775
3933
  function realpathOrSelf(file) {
3776
- try {
3777
- return _fs2.default.realpathSync(file);
3778
- } catch (e42) {
3779
- return file;
3780
- }
3781
- }
3934
+ const real = memoizeInFarmSourceSnapshot(
3935
+ "realpath",
3936
+ farmSourceSnapshotPathKey(file),
3937
+ () => {
3938
+ try {
3939
+ return _fs2.default.realpathSync(file);
3940
+ } catch (e44) {
3941
+ return null;
3942
+ }
3943
+ },
3944
+ (resolved) => resolved !== null
3945
+ );
3946
+ return _nullishCoalesce(real, () => ( file));
3947
+ }
3948
+ var NODE_MODULES_SEGMENT2 = `${_path2.default.sep}node_modules${_path2.default.sep}`;
3949
+ function getInstalledPackageDirectory(file, start) {
3950
+ let end = file.indexOf(_path2.default.sep, start);
3951
+ if (end !== -1 && file[start] === "@") end = file.indexOf(_path2.default.sep, end + 1);
3952
+ return end === -1 ? file : file.slice(0, end);
3953
+ }
3954
+ function installedRealPath(file) {
3955
+ const segment = file.lastIndexOf(NODE_MODULES_SEGMENT2);
3956
+ if (segment === -1) return file;
3957
+ const directory = getInstalledPackageDirectory(file, segment + NODE_MODULES_SEGMENT2.length);
3958
+ const real = realpathOrSelf(directory);
3959
+ if (real === directory || !real.includes(NODE_MODULES_SEGMENT2)) return file;
3960
+ return real + file.slice(directory.length);
3961
+ }
3962
+ var NO_VISITED_FILES = /* @__PURE__ */ new Set();
3782
3963
  function getBarePackageReexports(content) {
3783
3964
  return getImportSpecifiers(content, { reexportsOnly: true }).filter(
3784
3965
  (specifier) => bareSpecifierPackage(specifier)
3785
3966
  );
3786
3967
  }
3787
- function inspectPackageClientBoundary(resolvedPath, root, visited) {
3968
+ function inspectPackageClientBoundary(importedPath, root, visited) {
3969
+ const resolvedPath = importedPath && installedRealPath(importedPath);
3788
3970
  const cache2 = getPackageClientBoundaryCache();
3789
- if (!cache2 || !resolvedPath || visited.has(resolvedPath)) {
3790
- return traversePackageClientBoundary(resolvedPath, root, visited);
3971
+ if (!cache2 || !resolvedPath || _optionalChain([visited, 'optionalAccess', _234 => _234.has, 'call', _235 => _235(resolvedPath)])) {
3972
+ return traversePackageClientBoundary(resolvedPath, root, _nullishCoalesce(visited, () => ( /* @__PURE__ */ new Set())));
3791
3973
  }
3792
3974
  const key = `${_nullishCoalesce(root, () => ( ""))}\0${resolvedPath}`;
3793
- const cached = cache2.find(key, visited);
3975
+ const cached = cache2.find(key, _nullishCoalesce(visited, () => ( NO_VISITED_FILES)));
3794
3976
  if (cached) {
3795
- for (const file of cached.files) {
3796
- visited.add(file);
3797
- noteFarmSourceRead(file);
3798
- }
3977
+ if (visited) for (const file of cached.files) visited.add(file);
3978
+ noteFarmSourceReads(cached.files);
3799
3979
  return { ...cached.result };
3800
3980
  }
3801
3981
  const trace2 = new PackageInspectionTrace();
3802
- const result = traversePackageClientBoundary(resolvedPath, root, visited, trace2);
3982
+ const result = traversePackageClientBoundary(resolvedPath, root, _nullishCoalesce(visited, () => ( /* @__PURE__ */ new Set())), trace2);
3803
3983
  cache2.add(key, trace2.toEntry(result));
3804
3984
  return result;
3805
3985
  }
3806
3986
  function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
3807
3987
  if (!resolvedPath || visited.has(resolvedPath)) {
3808
- if (resolvedPath) _optionalChain([trace2, 'optionalAccess', _227 => _227.stop, 'call', _228 => _228(resolvedPath)]);
3988
+ if (resolvedPath) _optionalChain([trace2, 'optionalAccess', _236 => _236.stop, 'call', _237 => _237(resolvedPath)]);
3809
3989
  return {
3810
3990
  isClientComponent: false,
3811
3991
  shouldHydrate: false,
@@ -3813,9 +3993,9 @@ function traversePackageClientBoundary(resolvedPath, root, visited, trace2) {
3813
3993
  };
3814
3994
  }
3815
3995
  visited.add(resolvedPath);
3816
- _optionalChain([trace2, 'optionalAccess', _229 => _229.visit, 'call', _230 => _230(resolvedPath)]);
3996
+ _optionalChain([trace2, 'optionalAccess', _238 => _238.visit, 'call', _239 => _239(resolvedPath)]);
3817
3997
  const content = readIfExists(resolvedPath);
3818
- const parsed = parseClientModuleMetadata(content, false);
3998
+ const parsed = parseImportedModuleMetadata(content);
3819
3999
  let importsClientBoundary = false;
3820
4000
  let importedIslandStrategy = null;
3821
4001
  const reexports = getBarePackageReexports(content);
@@ -3871,7 +4051,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3871
4051
  braceDepth = Math.max(0, braceDepth - 1);
3872
4052
  continue;
3873
4053
  }
3874
- if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access', _231 => _231[index - 1], 'optionalAccess', _232 => _232.value]) !== "." && _optionalChain([tokens, 'access', _233 => _233[index + 1], 'optionalAccess', _234 => _234.value]) === "(" && _optionalChain([tokens, 'access', _235 => _235[index + 2], 'optionalAccess', _236 => _236.kind]) === "string") {
4054
+ if (dynamic && keyword.kind === "identifier" && keyword.value === "import" && _optionalChain([tokens, 'access', _240 => _240[index - 1], 'optionalAccess', _241 => _241.value]) !== "." && _optionalChain([tokens, 'access', _242 => _242[index + 1], 'optionalAccess', _243 => _243.value]) === "(" && _optionalChain([tokens, 'access', _244 => _244[index + 2], 'optionalAccess', _245 => _245.kind]) === "string") {
3875
4055
  matches.add(tokens[index + 2].value);
3876
4056
  continue;
3877
4057
  }
@@ -3881,7 +4061,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3881
4061
  }
3882
4062
  if (reexportsOnly && keyword.value !== "export") continue;
3883
4063
  const previous = tokens[index - 1];
3884
- if (_optionalChain([previous, 'optionalAccess', _237 => _237.value]) === ".") continue;
4064
+ if (_optionalChain([previous, 'optionalAccess', _246 => _246.value]) === ".") continue;
3885
4065
  const first = tokens[index + 1];
3886
4066
  if (!first || first.value === "type" || first.value === "(" || first.value === ".") {
3887
4067
  continue;
@@ -3897,7 +4077,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3897
4077
  for (let cursor = index + 1; cursor < tokens.length; cursor++) {
3898
4078
  const token = tokens[cursor];
3899
4079
  if (token.value === ";") break;
3900
- if (token.value === "from" && _optionalChain([tokens, 'access', _238 => _238[cursor + 1], 'optionalAccess', _239 => _239.kind]) === "string") {
4080
+ if (token.value === "from" && _optionalChain([tokens, 'access', _247 => _247[cursor + 1], 'optionalAccess', _248 => _248.kind]) === "string") {
3901
4081
  fromIndex = cursor;
3902
4082
  break;
3903
4083
  }
@@ -3915,7 +4095,7 @@ function scanImportSpecifiers(content, { reexportsOnly = false, dynamic = false
3915
4095
  return Array.from(matches);
3916
4096
  }
3917
4097
  function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
3918
- if (_optionalChain([tokens, 'access', _240 => _240[startIndex], 'optionalAccess', _241 => _241.value]) !== "{") return false;
4098
+ if (_optionalChain([tokens, 'access', _249 => _249[startIndex], 'optionalAccess', _250 => _250.value]) !== "{") return false;
3919
4099
  let closingBraceIndex = -1;
3920
4100
  for (let index = startIndex + 1; index < endIndex; index++) {
3921
4101
  if (tokens[index].value !== "}") continue;
@@ -3925,7 +4105,7 @@ function isTypeOnlyNamedClause(tokens, startIndex, endIndex) {
3925
4105
  if (closingBraceIndex === -1) return false;
3926
4106
  let entryStartsAt = startIndex + 1;
3927
4107
  for (let index = entryStartsAt; index <= closingBraceIndex; index++) {
3928
- if (index !== closingBraceIndex && _optionalChain([tokens, 'access', _242 => _242[index], 'optionalAccess', _243 => _243.value]) !== ",") continue;
4108
+ if (index !== closingBraceIndex && _optionalChain([tokens, 'access', _251 => _251[index], 'optionalAccess', _252 => _252.value]) !== ",") continue;
3929
4109
  const entry = tokens.slice(entryStartsAt, index);
3930
4110
  if (entry.length > 0 && entry[0].value !== "type") return false;
3931
4111
  entryStartsAt = index + 1;
@@ -3965,7 +4145,7 @@ function warnUnresolvedAliasImport(importerPath, specifier, root) {
3965
4145
  if (!ALIAS_IMPORT.test(specifier) || warnedUnresolvedAliasImports.has(specifier)) return;
3966
4146
  warnedUnresolvedAliasImports.add(specifier);
3967
4147
  const importer = root ? _path2.default.relative(root, importerPath) : importerPath;
3968
- _chunk7U4XF76Rcjs.logger.warn(
4148
+ _chunk7ZDLE77Pcjs.logger.warn(
3969
4149
  `Could not resolve "${specifier}" (imported by ${importer}) while checking which pages need client JavaScript. If it holds client components, they will not hydrate. Map the alias in tsconfig.json "paths" or package.json "imports".`
3970
4150
  );
3971
4151
  }
@@ -3996,17 +4176,25 @@ function matchProjectImportAlias(alias, specifier) {
3996
4176
  return specifier.slice(alias.prefix.length, specifier.length - alias.suffix.length);
3997
4177
  }
3998
4178
  function getProjectImportAliases(projectRoot) {
3999
- const sourceDir = _chunkMNUYXZV7cjs.getFarmProjectSourceDir.call(void 0, projectRoot);
4179
+ return memoizeInFarmSourceSnapshot(
4180
+ "project-aliases",
4181
+ farmSourceSnapshotPathKey(projectRoot),
4182
+ () => readProjectImportAliases(projectRoot),
4183
+ () => false
4184
+ );
4185
+ }
4186
+ function readProjectImportAliases(projectRoot) {
4187
+ const sourceDir = _chunkBNWADCG2cjs.getFarmProjectSourceDir.call(void 0, projectRoot);
4000
4188
  const cached = projectImportAliasCache.get(projectRoot);
4001
4189
  const dependencies = new Set(
4002
- _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _244 => _244.stamps, 'access', _245 => _245.keys, 'call', _246 => _246()]), () => ( PROJECT_ALIAS_FILES.map((file) => _path2.default.join(projectRoot, file))))
4190
+ _nullishCoalesce(_optionalChain([cached, 'optionalAccess', _253 => _253.stamps, 'access', _254 => _254.keys, 'call', _255 => _255()]), () => ( PROJECT_ALIAS_FILES.map((file) => _path2.default.join(projectRoot, file))))
4003
4191
  );
4004
4192
  const stamps = /* @__PURE__ */ new Map();
4005
4193
  for (const file of dependencies) {
4006
4194
  noteFarmSourceRead(file);
4007
4195
  stamps.set(file, getFarmSourceStamp(file));
4008
4196
  }
4009
- if (_optionalChain([cached, 'optionalAccess', _247 => _247.sourceDir]) === sourceDir && [...stamps].every(([file, stamp]) => cached.stamps.get(file) === stamp))
4197
+ if (_optionalChain([cached, 'optionalAccess', _256 => _256.sourceDir]) === sourceDir && [...stamps].every(([file, stamp]) => cached.stamps.get(file) === stamp))
4010
4198
  return cached.aliases;
4011
4199
  dependencies.clear();
4012
4200
  for (const file of PROJECT_ALIAS_FILES) dependencies.add(_path2.default.join(projectRoot, file));
@@ -4035,7 +4223,7 @@ function readTsconfigPathAliases(projectRoot, dependencies) {
4035
4223
  const configPath = _path2.default.join(projectRoot, name);
4036
4224
  if (!_fs2.default.existsSync(configPath)) continue;
4037
4225
  const resolved = readTsconfigPaths(configPath, /* @__PURE__ */ new Set(), dependencies);
4038
- if (!_optionalChain([resolved, 'optionalAccess', _248 => _248.paths])) return [];
4226
+ if (!_optionalChain([resolved, 'optionalAccess', _257 => _257.paths])) return [];
4039
4227
  const base2 = _nullishCoalesce(resolved.baseUrl, () => ( resolved.pathsDirectory));
4040
4228
  return Object.entries(resolved.paths).flatMap(([pattern, targets]) => {
4041
4229
  if (!Array.isArray(targets)) return [];
@@ -4071,18 +4259,18 @@ function readTsconfigPaths(configPath, visited, dependencies) {
4071
4259
  inherited = _nullishCoalesce(readTsconfigPaths(parentPath, visited, dependencies), () => ( inherited));
4072
4260
  }
4073
4261
  const options = _nullishCoalesce(config.compilerOptions, () => ( {}));
4074
- const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _249 => _249.baseUrl]);
4262
+ const baseUrl = typeof options.baseUrl === "string" ? _path2.default.resolve(directory, options.baseUrl) : _optionalChain([inherited, 'optionalAccess', _258 => _258.baseUrl]);
4075
4263
  if (options.paths && typeof options.paths === "object") {
4076
4264
  return { paths: options.paths, pathsDirectory: directory, baseUrl };
4077
4265
  }
4078
4266
  return inherited ? { ...inherited, baseUrl } : { pathsDirectory: directory, baseUrl };
4079
4267
  }
4080
4268
  function readPackageImportAliases(projectRoot) {
4081
- const imports = _optionalChain([readPackageJson, 'call', _250 => _250(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _251 => _251.imports]);
4269
+ const imports = _optionalChain([readFarmPackageManifest, 'call', _259 => _259(_path2.default.join(projectRoot, "package.json")), 'optionalAccess', _260 => _260.imports]);
4082
4270
  if (!imports || typeof imports !== "object") return [];
4083
4271
  return Object.entries(imports).flatMap(([pattern, value]) => {
4084
4272
  const target = resolveConditionalExportTarget(value);
4085
- if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _252 => _252.startsWith, 'call', _253 => _253("./")])) return [];
4273
+ if (!pattern.startsWith("#") || !_optionalChain([target, 'optionalAccess', _261 => _261.startsWith, 'call', _262 => _262("./")])) return [];
4086
4274
  const wildcardIndex = pattern.indexOf("*");
4087
4275
  return [
4088
4276
  {
@@ -4098,7 +4286,7 @@ function readJsonWithComments(filePath) {
4098
4286
  let source;
4099
4287
  try {
4100
4288
  source = _fs2.default.readFileSync(filePath, "utf8");
4101
- } catch (e43) {
4289
+ } catch (e45) {
4102
4290
  return null;
4103
4291
  }
4104
4292
  let output = "";
@@ -4126,7 +4314,7 @@ function readJsonWithComments(filePath) {
4126
4314
  }
4127
4315
  try {
4128
4316
  return JSON.parse(output.replace(/,(\s*[}\]])/g, "$1"));
4129
- } catch (e44) {
4317
+ } catch (e46) {
4130
4318
  return null;
4131
4319
  }
4132
4320
  }
@@ -4146,17 +4334,17 @@ function resolvePackageModuleSourcePath(importerPath, specifier, root) {
4146
4334
  const packageDirectory = findPackageDirectory2(importerPath, packageName, root);
4147
4335
  if (!packageDirectory) return null;
4148
4336
  const packageJsonPath = _path2.default.join(packageDirectory, "package.json");
4149
- const packageJson = readPackageJson(packageJsonPath);
4337
+ const packageJson = readFarmPackageManifest(packageJsonPath);
4150
4338
  const exportKey = packageSubpath ? `./${packageSubpath}` : ".";
4151
- const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _254 => _254.exports]), exportKey);
4339
+ const exportTarget = resolvePackageExport(_optionalChain([packageJson, 'optionalAccess', _263 => _263.exports]), exportKey);
4152
4340
  const candidates = /* @__PURE__ */ new Set();
4153
- if (_optionalChain([exportTarget, 'optionalAccess', _255 => _255.startsWith, 'call', _256 => _256("./")])) {
4341
+ if (_optionalChain([exportTarget, 'optionalAccess', _264 => _264.startsWith, 'call', _265 => _265("./")])) {
4154
4342
  candidates.add(_path2.default.resolve(packageDirectory, exportTarget));
4155
4343
  }
4156
4344
  if (packageSubpath) {
4157
4345
  candidates.add(_path2.default.join(packageDirectory, packageSubpath));
4158
4346
  } else {
4159
- for (const entry of [_optionalChain([packageJson, 'optionalAccess', _257 => _257.browser]), _optionalChain([packageJson, 'optionalAccess', _258 => _258.module]), _optionalChain([packageJson, 'optionalAccess', _259 => _259.main])]) {
4347
+ for (const entry of [_optionalChain([packageJson, 'optionalAccess', _266 => _266.browser]), _optionalChain([packageJson, 'optionalAccess', _267 => _267.module]), _optionalChain([packageJson, 'optionalAccess', _268 => _268.main])]) {
4160
4348
  if (typeof entry === "string") candidates.add(_path2.default.resolve(packageDirectory, entry));
4161
4349
  }
4162
4350
  candidates.add(_path2.default.join(packageDirectory, "index"));
@@ -4182,6 +4370,7 @@ function findPackageDirectory2(importerPath, packageName, root) {
4182
4370
  }
4183
4371
  }
4184
4372
  for (const searchRoot of searchRoots) {
4373
+ if (!hasFarmNodeModulesDirectory(searchRoot)) continue;
4185
4374
  const packageDirectory = _path2.default.join(searchRoot, "node_modules", packageName);
4186
4375
  if (_fs2.default.existsSync(_path2.default.join(packageDirectory, "package.json"))) {
4187
4376
  return packageDirectory;
@@ -4189,13 +4378,6 @@ function findPackageDirectory2(importerPath, packageName, root) {
4189
4378
  }
4190
4379
  return null;
4191
4380
  }
4192
- function readPackageJson(packageJsonPath) {
4193
- try {
4194
- return JSON.parse(_fs2.default.readFileSync(packageJsonPath, "utf8"));
4195
- } catch (e45) {
4196
- return null;
4197
- }
4198
- }
4199
4381
  function resolvePackageExport(exportsField, exportKey) {
4200
4382
  if (typeof exportsField === "string") {
4201
4383
  return exportKey === "." ? exportsField : null;
@@ -4221,7 +4403,7 @@ function resolvePackageExport(exportsField, exportKey) {
4221
4403
  if (!exportKey.startsWith(prefix) || !exportKey.endsWith(suffix)) continue;
4222
4404
  const wildcard = exportKey.slice(prefix.length, exportKey.length - suffix.length);
4223
4405
  const target = resolveConditionalExportTarget(value);
4224
- return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _260 => _260.replace, 'call', _261 => _261("*", wildcard)]), () => ( null));
4406
+ return _nullishCoalesce(_optionalChain([target, 'optionalAccess', _269 => _269.replace, 'call', _270 => _270("*", wildcard)]), () => ( null));
4225
4407
  }
4226
4408
  return null;
4227
4409
  }
@@ -4264,8 +4446,8 @@ function resolveSourceCandidatePath(candidate) {
4264
4446
  }
4265
4447
  for (const sourcePath of paths) {
4266
4448
  try {
4267
- if (_optionalChain([_fs2.default, 'access', _262 => _262.statSync, 'call', _263 => _263(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _264 => _264.isFile, 'call', _265 => _265()])) return sourcePath;
4268
- } catch (e46) {
4449
+ if (_optionalChain([_fs2.default, 'access', _271 => _271.statSync, 'call', _272 => _272(sourcePath, { throwIfNoEntry: false }), 'optionalAccess', _273 => _273.isFile, 'call', _274 => _274()])) return sourcePath;
4450
+ } catch (e47) {
4269
4451
  }
4270
4452
  }
4271
4453
  return null;
@@ -4273,7 +4455,7 @@ function resolveSourceCandidatePath(candidate) {
4273
4455
  function isFarmPackageClientBoundary(importerPath, specifier, root) {
4274
4456
  const imported = resolveImportedModule(importerPath, specifier, root);
4275
4457
  if (imported.local || !imported.path) return false;
4276
- return inspectPackageClientBoundary(imported.path, root, /* @__PURE__ */ new Set()).shouldHydrate;
4458
+ return inspectPackageClientBoundary(imported.path, root).shouldHydrate;
4277
4459
  }
4278
4460
  var CLIENT_PACKAGE_SCAN_EXTENSIONS = /\.(?:[cm]?[jt]sx?)$/;
4279
4461
  var CLIENT_PACKAGE_SCAN_SKIP = /* @__PURE__ */ new Set([
@@ -4307,7 +4489,7 @@ function scanFarmPackageImports(directory, root) {
4307
4489
  let entries;
4308
4490
  try {
4309
4491
  entries = _fs2.default.readdirSync(current, { withFileTypes: true });
4310
- } catch (e47) {
4492
+ } catch (e48) {
4311
4493
  return;
4312
4494
  }
4313
4495
  for (const entry of entries) {
@@ -4340,7 +4522,7 @@ function collectFarmServerBundledPackageInfo(directory) {
4340
4522
  let entries;
4341
4523
  try {
4342
4524
  entries = _fs2.default.readdirSync(current, { withFileTypes: true });
4343
- } catch (e48) {
4525
+ } catch (e49) {
4344
4526
  return;
4345
4527
  }
4346
4528
  for (const entry of entries) {
@@ -4369,17 +4551,43 @@ var clientReachableModules = /* @__PURE__ */ new Map();
4369
4551
  function invalidateFarmClientReachableModules() {
4370
4552
  clientReachableModules.clear();
4371
4553
  }
4554
+ function isClientEntrySource(content) {
4555
+ return hasUseClientDirective(content) || hasHydrateExport(content);
4556
+ }
4557
+ function getClientReachableImports(content) {
4558
+ return getImportSpecifiers(content, { dynamic: true });
4559
+ }
4560
+ function noteFarmClientReachableModuleChange(file, event, options) {
4561
+ if (event !== "update") {
4562
+ invalidateFarmClientReachableModules();
4563
+ return;
4564
+ }
4565
+ const resolved = _path2.default.resolve(file);
4566
+ let content;
4567
+ for (const [key, scan] of clientReachableModules) {
4568
+ const read = scan.reads.get(resolved);
4569
+ if (!read) {
4570
+ if (options.appSource) clientReachableModules.delete(key);
4571
+ continue;
4572
+ }
4573
+ if (content === void 0) content = readIfExists(resolved);
4574
+ if (read.entry !== void 0 && read.entry !== isClientEntrySource(content) || read.imports !== void 0 && read.imports !== getClientReachableImports(content).join("\0")) {
4575
+ clientReachableModules.delete(key);
4576
+ }
4577
+ }
4578
+ }
4372
4579
  function getFarmClientReachableModules(directory, root) {
4373
4580
  const key = `${_path2.default.resolve(root)}\0${_path2.default.resolve(directory)}`;
4374
4581
  const cached = clientReachableModules.get(key);
4375
- if (cached) return cached;
4582
+ if (cached) return cached.modules;
4376
4583
  const reachable = /* @__PURE__ */ new Set();
4584
+ const reads = /* @__PURE__ */ new Map();
4377
4585
  const queue = [];
4378
4586
  const walk2 = (current) => {
4379
4587
  let entries;
4380
4588
  try {
4381
4589
  entries = _fs2.default.readdirSync(current, { withFileTypes: true });
4382
- } catch (e49) {
4590
+ } catch (e50) {
4383
4591
  return;
4384
4592
  }
4385
4593
  for (const entry of entries) {
@@ -4387,8 +4595,9 @@ function getFarmClientReachableModules(directory, root) {
4387
4595
  if (entry.isDirectory()) {
4388
4596
  if (!entry.name.startsWith(".") && !CLIENT_PACKAGE_SCAN_SKIP.has(entry.name)) walk2(file);
4389
4597
  } else if (isScannedSourceFile(entry.name)) {
4390
- const content = readIfExists(file);
4391
- if (hasUseClientDirective(content) || hasHydrateExport(content)) queue.push(file);
4598
+ const clientEntry = isClientEntrySource(readIfExists(file));
4599
+ reads.set(_path2.default.resolve(file), { entry: clientEntry });
4600
+ if (clientEntry) queue.push(file);
4392
4601
  }
4393
4602
  }
4394
4603
  };
@@ -4397,14 +4606,18 @@ function getFarmClientReachableModules(directory, root) {
4397
4606
  const file = _path2.default.resolve(queue.pop());
4398
4607
  if (reachable.has(file)) continue;
4399
4608
  reachable.add(file);
4400
- for (const specifier of getImportSpecifiers(readIfExists(file), { dynamic: true })) {
4609
+ const imports = getClientReachableImports(readIfExists(file));
4610
+ const read = reads.get(file);
4611
+ if (read) read.imports = imports.join("\0");
4612
+ else reads.set(file, { imports: imports.join("\0") });
4613
+ for (const specifier of imports) {
4401
4614
  const imported = resolveImportedModule(file, specifier, root);
4402
4615
  if (imported.local && imported.path && !reachable.has(_path2.default.resolve(imported.path))) {
4403
4616
  queue.push(imported.path);
4404
4617
  }
4405
4618
  }
4406
4619
  }
4407
- clientReachableModules.set(key, reachable);
4620
+ clientReachableModules.set(key, { modules: reachable, reads });
4408
4621
  return reachable;
4409
4622
  }
4410
4623
  function resolveFarmClientOptimizeDeps(directory, root) {
@@ -4414,7 +4627,7 @@ function resolveFarmClientOptimizeDeps(directory, root) {
4414
4627
  const imports = scanFarmPackageImports(directory, root);
4415
4628
  for (const specifier of imports.client) {
4416
4629
  const fonts = findFarmServerBundledPackage(importer, specifier);
4417
- if (_optionalChain([fonts, 'optionalAccess', _266 => _266.fonts])) {
4630
+ if (_optionalChain([fonts, 'optionalAccess', _275 => _275.fonts])) {
4418
4631
  exclude.add(fonts.name);
4419
4632
  continue;
4420
4633
  }
@@ -4483,20 +4696,20 @@ function transformEnvironmentFunctions(options) {
4483
4696
  function farmEnvironmentFunctionsPlugin(options = {}) {
4484
4697
  let routesFiles = /* @__PURE__ */ new Set();
4485
4698
  const componentExtensions = new Set(
4486
- _chunkT7UC2ORAcjs.getFarmRendererComponentExtensions.call(void 0, options.renderer || void 0)
4699
+ _chunkHP7QYVSTcjs.getFarmRendererComponentExtensions.call(void 0, options.renderer || void 0)
4487
4700
  );
4488
4701
  let farmApi;
4489
4702
  let isBuild = false;
4490
4703
  let projectRoot = process.cwd();
4491
4704
  let sources;
4492
4705
  const routeSourceFiles = () => {
4493
- const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _267 => _267.getProgrammaticClientRoutes, 'call', _268 => _268()]);
4494
- if (_optionalChain([sources, 'optionalAccess', _269 => _269.for]) !== clientRoutes || !sources) {
4706
+ const clientRoutes = _optionalChain([farmApi, 'optionalAccess', _276 => _276.getProgrammaticClientRoutes, 'call', _277 => _277()]);
4707
+ if (_optionalChain([sources, 'optionalAccess', _278 => _278.for]) !== clientRoutes || !sources) {
4495
4708
  sources = {
4496
4709
  for: clientRoutes,
4497
4710
  files: /* @__PURE__ */ new Set([
4498
4711
  ...routesFiles,
4499
- ...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _270 => _270.routeSourceFiles]), () => ( []))].map(resolvedFile)
4712
+ ...[..._nullishCoalesce(_optionalChain([clientRoutes, 'optionalAccess', _279 => _279.routeSourceFiles]), () => ( []))].map(resolvedFile)
4500
4713
  ])
4501
4714
  };
4502
4715
  }
@@ -4517,11 +4730,11 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4517
4730
  configResolved(config) {
4518
4731
  isBuild = config.command === "build";
4519
4732
  projectRoot = config.root;
4520
- farmApi = _optionalChain([config, 'access', _271 => _271.plugins, 'access', _272 => _272.find, 'call', _273 => _273((plugin) => plugin.name === "farm"), 'optionalAccess', _274 => _274.api]);
4733
+ farmApi = _optionalChain([config, 'access', _280 => _280.plugins, 'access', _281 => _281.find, 'call', _282 => _282((plugin) => plugin.name === "farm"), 'optionalAccess', _283 => _283.api]);
4521
4734
  sources = void 0;
4522
4735
  routesFiles = new Set(
4523
- _chunk52Q4OB4Acjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
4524
- (source) => _chunkYUCU6XB4cjs.PROGRAMMATIC_ROUTE_FILE_NAMES.map(
4736
+ _chunkKBURN62Zcjs.getFarmSourceRoots.call(void 0, { ...options, root: _nullishCoalesce(options.root, () => ( config.root)) }).flatMap(
4737
+ (source) => _chunkPYPHM7AScjs.PROGRAMMATIC_ROUTE_FILE_NAMES.map(
4525
4738
  (name) => resolvedFile(_path2.default.resolve(source.root, source.srcDir, name))
4526
4739
  )
4527
4740
  )
@@ -4530,7 +4743,7 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4530
4743
  transform(code, id, transformOptions) {
4531
4744
  const environment = resolveBuildEnvironment(
4532
4745
  this,
4533
- _optionalChain([transformOptions, 'optionalAccess', _275 => _275.ssr])
4746
+ _optionalChain([transformOptions, 'optionalAccess', _284 => _284.ssr])
4534
4747
  );
4535
4748
  const parse3 = (source) => this.parse(source);
4536
4749
  const result = transformEnvironmentFunctions({
@@ -4540,10 +4753,10 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4540
4753
  parse: parse3,
4541
4754
  componentExtensions
4542
4755
  });
4543
- if (environment === "client" && !isBuild && !_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
4756
+ if (environment === "client" && !isBuild && !_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id) && routeSourceFiles().has(moduleFile(id)) && !isProgrammaticRouteActionProxy(code)) {
4544
4757
  this.error(routeSourceError(moduleFile(id)));
4545
4758
  }
4546
- if (environment === "server" && _chunkT7UC2ORAcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _276 => _276.experimental, 'optionalAccess', _277 => _277.serverComponents])) === "islands" && isApplicationScript(id)) {
4759
+ if (environment === "server" && _chunkHP7QYVSTcjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([options, 'access', _285 => _285.experimental, 'optionalAccess', _286 => _286.serverComponents])) === "islands" && isApplicationScript(id)) {
4547
4760
  const file = id.split("?", 1)[0];
4548
4761
  const root = _fs.realpathSync.call(void 0, _nullishCoalesce(options.root, () => ( projectRoot)));
4549
4762
  const clientCode = getFarmClientReachableModules(root, root).has(_path2.default.resolve(file)) || _fs.existsSync.call(void 0, file) && hasUseClientDirective(_fs.readFileSync.call(void 0, file, "utf8"));
@@ -4575,9 +4788,9 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4575
4788
  if (resolveBuildEnvironment(context, false) !== "client") return;
4576
4789
  const forbidden = routeSourceFiles();
4577
4790
  for (const id of this.getModuleIds()) {
4578
- if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4791
+ if (_chunkPYPHM7AScjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4579
4792
  const chain = findClientNodeBuiltinChain(id, (moduleId) => {
4580
- return _optionalChain([this, 'access', _278 => _278.getModuleInfo, 'call', _279 => _279(moduleId), 'optionalAccess', _280 => _280.importedIds]);
4793
+ return _optionalChain([this, 'access', _287 => _287.getModuleInfo, 'call', _288 => _288(moduleId), 'optionalAccess', _289 => _289.importedIds]);
4581
4794
  });
4582
4795
  if (chain) {
4583
4796
  this.error(
@@ -4595,8 +4808,8 @@ function farmEnvironmentFunctionsPlugin(options = {}) {
4595
4808
  }
4596
4809
  if (!forbidden.has(moduleFile(id))) continue;
4597
4810
  const info = this.getModuleInfo(id);
4598
- if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _281 => _281.code]))) continue;
4599
- this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _282 => _282.importers, 'access', _283 => _283.map, 'call', _284 => _284(moduleFile)])));
4811
+ if (isProgrammaticRouteActionProxy(_optionalChain([info, 'optionalAccess', _290 => _290.code]))) continue;
4812
+ this.error(routeSourceError(moduleFile(id), _optionalChain([info, 'optionalAccess', _291 => _291.importers, 'access', _292 => _292.map, 'call', _293 => _293(moduleFile)])));
4600
4813
  }
4601
4814
  }
4602
4815
  };
@@ -4610,13 +4823,13 @@ function moduleFile(id) {
4610
4823
  function resolvedFile(filePath) {
4611
4824
  try {
4612
4825
  return moduleFile(_fs.realpathSync.call(void 0, filePath));
4613
- } catch (e50) {
4826
+ } catch (e51) {
4614
4827
  return moduleFile(filePath);
4615
4828
  }
4616
4829
  }
4617
4830
  function resolveBuildEnvironment(context, ssr) {
4618
- if (_optionalChain([context, 'access', _285 => _285.environment, 'optionalAccess', _286 => _286.name]) === "client") return "client";
4619
- if (_optionalChain([context, 'access', _287 => _287.environment, 'optionalAccess', _288 => _288.name]) === "rsc" || _optionalChain([context, 'access', _289 => _289.environment, 'optionalAccess', _290 => _290.name]) === "ssr") {
4831
+ if (_optionalChain([context, 'access', _294 => _294.environment, 'optionalAccess', _295 => _295.name]) === "client") return "client";
4832
+ if (_optionalChain([context, 'access', _296 => _296.environment, 'optionalAccess', _297 => _297.name]) === "rsc" || _optionalChain([context, 'access', _298 => _298.environment, 'optionalAccess', _299 => _299.name]) === "ssr") {
4620
4833
  return "server";
4621
4834
  }
4622
4835
  return ssr ? "server" : "client";
@@ -4943,4 +5156,10 @@ function transformError(id, message) {
4943
5156
 
4944
5157
 
4945
5158
 
4946
- exports.FARM_BROWSER_BUILTIN_PREFIX = FARM_BROWSER_BUILTIN_PREFIX; exports.resolveFarmBrowserBuiltin = resolveFarmBrowserBuiltin; exports.loadFarmBrowserBuiltin = loadFarmBrowserBuiltin; exports.farmBrowserBuiltinsOptimizerPlugin = farmBrowserBuiltinsOptimizerPlugin; exports.programmaticClientRouteKey = programmaticClientRouteKey; exports.resolveProgrammaticClientRoutes = resolveProgrammaticClientRoutes; exports.createEvaluatedRouteGraph = createEvaluatedRouteGraph; exports.mergeProgrammaticClientRoutes = mergeProgrammaticClientRoutes; exports.generateProgrammaticClientRouteModule = generateProgrammaticClientRouteModule; exports.getFarmSourceStamp = getFarmSourceStamp; exports.FarmSourceSnapshotStore = FarmSourceSnapshotStore; exports.withFarmSourceSnapshot = withFarmSourceSnapshot; exports.withFarmSourceSnapshotOf = withFarmSourceSnapshotOf; exports.memoizeInFarmSourceSnapshot = memoizeInFarmSourceSnapshot; exports.noteFarmSourceRead = noteFarmSourceRead; exports.traceFarmSourceReads = traceFarmSourceReads; exports.rewriteFarmReactServerClientModuleImports = rewriteFarmReactServerClientModuleImports; exports.rewriteFarmReactServerImports = rewriteFarmReactServerImports; exports.invalidateFarmClientOnlyScan = invalidateFarmClientOnlyScan; exports.farmRelativeImportFiles = farmRelativeImportFiles; exports.usePackageScanCacheFile = usePackageScanCacheFile; exports.persistPackageScanCache = persistPackageScanCache; exports.FARM_CLIENT_REFERENCE_PRAGMA = FARM_CLIENT_REFERENCE_PRAGMA; exports.FARM_CLIENT_REFERENCE_DIRECTORY = FARM_CLIENT_REFERENCE_DIRECTORY; exports.FARM_RESOLVE_FROM_PREFIX = FARM_RESOLVE_FROM_PREFIX; exports.parseFarmResolveFrom = parseFarmResolveFrom; exports.ensureFarmPackageClientReference = ensureFarmPackageClientReference; exports.ensureFarmInternalClientReference = ensureFarmInternalClientReference; exports.rewriteFarmPackageClientImports = rewriteFarmPackageClientImports; exports.farmIslandContainerReferencePath = farmIslandContainerReferencePath; exports.ensureFarmIslandContainerReference = ensureFarmIslandContainerReference; exports.wrapFarmIslandContainers = wrapFarmIslandContainers; exports.withPackageClientBoundaryCache = withPackageClientBoundaryCache; exports.usePackageClientBoundaryCacheFile = usePackageClientBoundaryCacheFile; exports.resolvePackageClientBoundaryCacheFile = resolvePackageClientBoundaryCacheFile; exports.runWithPackageClientBoundaryCacheFile = runWithPackageClientBoundaryCacheFile; exports.runWithLatestPackageClientBoundaryCache = runWithLatestPackageClientBoundaryCache; exports.dropLatestPackageClientBoundaryCache = dropLatestPackageClientBoundaryCache; exports.setFarmRendererHydrationScope = setFarmRendererHydrationScope; exports.resolveModuleSourcePath = resolveModuleSourcePath; exports.getFarmClientHydrationPlanOptions = getFarmClientHydrationPlanOptions; exports.describeSuppressedAsyncHydration = describeSuppressedAsyncHydration; exports.resolveFarmIsolatedClientHydrationMode = resolveFarmIsolatedClientHydrationMode; exports.hasUseClientDirective = hasUseClientDirective; exports.getIslandStrategyExport = getIslandStrategyExport; exports.stripUseClientDirective = stripUseClientDirective; exports.getFarmClientRenderingBindings = getFarmClientRenderingBindings; exports.collectFarmRenderedClientModules = collectFarmRenderedClientModules; exports.collectFarmServerStylesheets = collectFarmServerStylesheets; exports.getClientModuleMetadata = getClientModuleMetadata; exports.getClientModuleHydrationPlanKey = getClientModuleHydrationPlanKey; exports.getClientModuleHydrationPlan = getClientModuleHydrationPlan; exports.usesFarmServerTree = usesFarmServerTree; exports.createMarkdownPageHydrationPlanner = createMarkdownPageHydrationPlanner; exports.enforceFarmIsolatedHydrationRouteBudget = enforceFarmIsolatedHydrationRouteBudget; exports.isIsolatableClientBoundarySource = isIsolatableClientBoundarySource; exports.isFarmClientModulePlanUnchanged = isFarmClientModulePlanUnchanged; exports.resolveImportedModule = resolveImportedModule; exports.isFarmPackageClientBoundary = isFarmPackageClientBoundary; exports.collectFarmClientPackageImports = collectFarmClientPackageImports; exports.collectFarmServerBundledPackageInfo = collectFarmServerBundledPackageInfo; exports.invalidateFarmClientReachableModules = invalidateFarmClientReachableModules; exports.getFarmClientReachableModules = getFarmClientReachableModules; exports.resolveFarmClientOptimizeDeps = resolveFarmClientOptimizeDeps; exports.createFarmDiagnostic = createFarmDiagnostic; exports.formatFarmDiagnostic = formatFarmDiagnostic; exports.createFarmSourceLocator = createFarmSourceLocator; exports.transformEnvironmentFunctions = transformEnvironmentFunctions; exports.farmEnvironmentFunctionsPlugin = farmEnvironmentFunctionsPlugin;
5159
+
5160
+
5161
+
5162
+
5163
+
5164
+
5165
+ exports.FARM_BROWSER_BUILTIN_PREFIX = FARM_BROWSER_BUILTIN_PREFIX; exports.resolveFarmBrowserBuiltin = resolveFarmBrowserBuiltin; exports.loadFarmBrowserBuiltin = loadFarmBrowserBuiltin; exports.farmBrowserBuiltinsOptimizerPlugin = farmBrowserBuiltinsOptimizerPlugin; exports.programmaticClientRouteKey = programmaticClientRouteKey; exports.resolveProgrammaticClientRoutes = resolveProgrammaticClientRoutes; exports.createEvaluatedRouteGraph = createEvaluatedRouteGraph; exports.mergeProgrammaticClientRoutes = mergeProgrammaticClientRoutes; exports.generateProgrammaticClientRouteModule = generateProgrammaticClientRouteModule; exports.getFarmSourceStamp = getFarmSourceStamp; exports.FarmSourceSnapshotStore = FarmSourceSnapshotStore; exports.withFarmSourceSnapshot = withFarmSourceSnapshot; exports.withFarmSourceSnapshotOf = withFarmSourceSnapshotOf; exports.withFarmSourceSnapshotAside = withFarmSourceSnapshotAside; exports.memoizeInFarmSourceSnapshot = memoizeInFarmSourceSnapshot; exports.noteFarmSourceRead = noteFarmSourceRead; exports.traceFarmSourceReads = traceFarmSourceReads; exports.traceFarmSourceReadGroups = traceFarmSourceReadGroups; exports.rewriteFarmReactServerClientModuleImports = rewriteFarmReactServerClientModuleImports; exports.rewriteFarmReactServerImports = rewriteFarmReactServerImports; exports.invalidateFarmClientOnlyScan = invalidateFarmClientOnlyScan; exports.farmRelativeImportFiles = farmRelativeImportFiles; exports.usePackageScanCacheFile = usePackageScanCacheFile; exports.persistPackageScanCache = persistPackageScanCache; exports.FARM_CLIENT_REFERENCE_PRAGMA = FARM_CLIENT_REFERENCE_PRAGMA; exports.FARM_CLIENT_REFERENCE_DIRECTORY = FARM_CLIENT_REFERENCE_DIRECTORY; exports.FARM_RESOLVE_FROM_PREFIX = FARM_RESOLVE_FROM_PREFIX; exports.parseFarmResolveFrom = parseFarmResolveFrom; exports.ensureFarmPackageClientReference = ensureFarmPackageClientReference; exports.ensureFarmInternalClientReference = ensureFarmInternalClientReference; exports.rewriteFarmPackageClientImports = rewriteFarmPackageClientImports; exports.FARM_ISLAND_CONTAINER_TAG = FARM_ISLAND_CONTAINER_TAG; exports.farmIslandContainerReferencePath = farmIslandContainerReferencePath; exports.ensureFarmIslandContainerReference = ensureFarmIslandContainerReference; exports.wrapFarmIslandContainers = wrapFarmIslandContainers; exports.withPackageClientBoundaryCache = withPackageClientBoundaryCache; exports.bindPackageClientBoundaryCache = bindPackageClientBoundaryCache; exports.usePackageClientBoundaryCacheFile = usePackageClientBoundaryCacheFile; exports.resolvePackageClientBoundaryCacheFile = resolvePackageClientBoundaryCacheFile; exports.runWithPackageClientBoundaryCacheFile = runWithPackageClientBoundaryCacheFile; exports.runWithLatestPackageClientBoundaryCache = runWithLatestPackageClientBoundaryCache; exports.dropLatestPackageClientBoundaryCache = dropLatestPackageClientBoundaryCache; exports.setFarmRendererHydrationScope = setFarmRendererHydrationScope; exports.resolveModuleSourcePath = resolveModuleSourcePath; exports.getFarmClientHydrationPlanOptions = getFarmClientHydrationPlanOptions; exports.describeSuppressedAsyncHydration = describeSuppressedAsyncHydration; exports.resolveFarmIsolatedClientHydrationMode = resolveFarmIsolatedClientHydrationMode; exports.hasUseClientDirective = hasUseClientDirective; exports.getIslandStrategyExport = getIslandStrategyExport; exports.stripUseClientDirective = stripUseClientDirective; exports.getFarmClientRenderingBindings = getFarmClientRenderingBindings; exports.collectFarmRenderedClientModules = collectFarmRenderedClientModules; exports.collectFarmServerStylesheets = collectFarmServerStylesheets; exports.getClientModuleMetadata = getClientModuleMetadata; exports.getClientModuleHydrationPlanKey = getClientModuleHydrationPlanKey; exports.getClientModuleHydrationPlan = getClientModuleHydrationPlan; exports.usesFarmServerTree = usesFarmServerTree; exports.createMarkdownPageHydrationPlanner = createMarkdownPageHydrationPlanner; exports.enforceFarmIsolatedHydrationRouteBudget = enforceFarmIsolatedHydrationRouteBudget; exports.isIsolatableClientBoundarySource = isIsolatableClientBoundarySource; exports.isFarmClientModulePlanUnchanged = isFarmClientModulePlanUnchanged; exports.isFarmServerModulePlanUnchanged = isFarmServerModulePlanUnchanged; exports.getInstalledPackageDirectory = getInstalledPackageDirectory; exports.resolveImportedModule = resolveImportedModule; exports.isFarmPackageClientBoundary = isFarmPackageClientBoundary; exports.collectFarmClientPackageImports = collectFarmClientPackageImports; exports.collectFarmServerBundledPackageInfo = collectFarmServerBundledPackageInfo; exports.noteFarmClientReachableModuleChange = noteFarmClientReachableModuleChange; exports.getFarmClientReachableModules = getFarmClientReachableModules; exports.resolveFarmClientOptimizeDeps = resolveFarmClientOptimizeDeps; exports.createFarmDiagnostic = createFarmDiagnostic; exports.formatFarmDiagnostic = formatFarmDiagnostic; exports.createFarmSourceLocator = createFarmSourceLocator; exports.transformEnvironmentFunctions = transformEnvironmentFunctions; exports.farmEnvironmentFunctionsPlugin = farmEnvironmentFunctionsPlugin;