@farm.js/core 0.1.83 → 0.1.85

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 (115) hide show
  1. package/dist/{analyzer-Y6IY26HI.mjs → analyzer-R6KNJ6IO.mjs} +2 -2
  2. package/dist/analyzer-XVY76XMM.cjs +17 -0
  3. package/dist/{app.d-eSm7jgoc.d.mts → app.d-Bvpc2eJq.d.mts} +1 -1
  4. package/dist/{app.d-CVPu_hoD.d.ts → app.d-DEKpJEp4.d.ts} +1 -1
  5. package/dist/{chunk-R3VLM2MW.mjs → chunk-2DMOB6BH.mjs} +5 -5
  6. package/dist/{chunk-3CZ4MJHW.cjs → chunk-3HWNYLQV.cjs} +1 -1
  7. package/dist/{chunk-NGTZHWBG.cjs → chunk-3OKSEJ33.cjs} +31 -10
  8. package/dist/{chunk-B5SJYXJK.mjs → chunk-3TCFONUE.mjs} +16 -7
  9. package/dist/{chunk-U56Z3755.mjs → chunk-4QCMTIBM.mjs} +9 -9
  10. package/dist/{chunk-DZTWUEBB.cjs → chunk-7TPLDPNC.cjs} +10 -10
  11. package/dist/{chunk-55UJGUBP.cjs → chunk-BBX4RPOV.cjs} +13 -13
  12. package/dist/{chunk-RGTZAM6Y.mjs → chunk-BCCCPFHQ.mjs} +25 -4
  13. package/dist/{chunk-IABI62FH.cjs → chunk-BZN5HX7Y.cjs} +2 -2
  14. package/dist/{chunk-FFWSER54.mjs → chunk-CDZ55QRD.mjs} +1 -1
  15. package/dist/{chunk-IAIRQAHA.mjs → chunk-CWUQBECF.mjs} +1 -1
  16. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  17. package/dist/{chunk-NDWI6FDH.mjs → chunk-GFVPQ25Z.mjs} +132 -33
  18. package/dist/{chunk-5X5GJU5A.cjs → chunk-GLNVLCUH.cjs} +6 -6
  19. package/dist/{chunk-JHRJ5V2F.cjs → chunk-H6C45DCF.cjs} +165 -162
  20. package/dist/{chunk-LN6FAYNB.cjs → chunk-HKJIUZS5.cjs} +2 -2
  21. package/dist/{chunk-ORBBAA7B.mjs → chunk-J7VIXTPQ.mjs} +1 -1
  22. package/dist/{chunk-HRH7OKBQ.cjs → chunk-L3BSHASB.cjs} +4 -4
  23. package/dist/{chunk-ELNRKD4V.mjs → chunk-L5HDCDFT.mjs} +1 -1
  24. package/dist/chunk-MAPHNGTF.cjs +98 -0
  25. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  26. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  27. package/dist/{chunk-EFI6QWBQ.cjs → chunk-OYM6VJEF.cjs} +35 -26
  28. package/dist/{chunk-43N3X6OO.mjs → chunk-PQR5A7R2.mjs} +1 -1
  29. package/dist/{chunk-3DAJXBSL.cjs → chunk-Q7GB3I4O.cjs} +2 -2
  30. package/dist/{chunk-A5BHJHDF.cjs → chunk-QUHDVJMR.cjs} +3 -3
  31. package/dist/chunk-RJBUI5AN.mjs +18 -0
  32. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  33. package/dist/{chunk-OM6JIIJU.cjs → chunk-RVJQHQCG.cjs} +4 -4
  34. package/dist/{chunk-WCSBYQOT.cjs → chunk-TOUC6BR3.cjs} +4 -4
  35. package/dist/{chunk-WZV2G2A6.mjs → chunk-U6HUVY5R.mjs} +90 -29
  36. package/dist/{chunk-SLIXHUMS.cjs → chunk-UEQC4ZLP.cjs} +446 -347
  37. package/dist/{chunk-7X2CYE66.cjs → chunk-WYTK7HQS.cjs} +261 -200
  38. package/dist/{chunk-DPUZVGXH.mjs → chunk-X7RSOEMQ.mjs} +33 -30
  39. package/dist/{chunk-NKVBWPXR.mjs → chunk-XIXAUXV3.mjs} +1 -1
  40. package/dist/{chunk-RNJX3MD6.mjs → chunk-YS647ASS.mjs} +1 -1
  41. package/dist/{chunk-VQ6IXALL.mjs → chunk-YX532KEF.mjs} +2 -2
  42. package/dist/{chunk-K3GHY7GY.mjs → chunk-Z3LOPHSO.mjs} +1 -1
  43. package/dist/{client-component.d-DLknFP8l.d.ts → client-component.d-CZG02pIh.d.ts} +2 -1
  44. package/dist/{client-component.d-DLMCzmUx.d.mts → client-component.d-miqIXyQv.d.mts} +2 -1
  45. package/dist/{devtools-OI52TCSD.mjs → devtools-34ZQWX3M.mjs} +4 -4
  46. package/dist/{devtools-ZM2AR36W.cjs → devtools-SXL5RFE5.cjs} +6 -6
  47. package/dist/docs.cjs +6 -6
  48. package/dist/docs.mjs +5 -5
  49. package/dist/environment/vite.cjs +5 -5
  50. package/dist/environment/vite.mjs +4 -4
  51. package/dist/index.cjs +26 -25
  52. package/dist/index.d.mts +2 -2
  53. package/dist/index.d.ts +2 -2
  54. package/dist/index.mjs +26 -25
  55. package/dist/internal/build-runtime.cjs +26 -25
  56. package/dist/internal/build-runtime.mjs +25 -24
  57. package/dist/internal/cli-runtime.cjs +8 -8
  58. package/dist/internal/cli-runtime.mjs +7 -7
  59. package/dist/internal/client-error-overlay.cjs +4 -4
  60. package/dist/internal/client-error-overlay.mjs +1 -1
  61. package/dist/internal/client-runtime.d.mts +3 -37
  62. package/dist/internal/client-runtime.d.ts +3 -37
  63. package/dist/internal/config-runtime.cjs +6 -6
  64. package/dist/internal/config-runtime.mjs +5 -5
  65. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  66. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  67. package/dist/internal/islands-runtime.cjs +15 -8
  68. package/dist/internal/islands-runtime.d.mts +2 -3
  69. package/dist/internal/islands-runtime.d.ts +2 -3
  70. package/dist/internal/islands-runtime.mjs +15 -8
  71. package/dist/internal/islands-server-tree.cjs +8 -0
  72. package/dist/internal/islands-server-tree.d.mts +5 -0
  73. package/dist/internal/islands-server-tree.d.ts +5 -0
  74. package/dist/internal/islands-server-tree.mjs +8 -0
  75. package/dist/internal/islx-actions-server.d.mts +0 -3
  76. package/dist/internal/islx-actions-server.d.ts +0 -3
  77. package/dist/internal/native-server-fns.cjs +4 -4
  78. package/dist/internal/native-server-fns.mjs +3 -3
  79. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  80. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  81. package/dist/internal/production-runtime.cjs +15 -15
  82. package/dist/internal/production-runtime.mjs +21 -21
  83. package/dist/internal/renderer-islands.cjs +47 -0
  84. package/dist/internal/renderer-islands.d.mts +32 -0
  85. package/dist/internal/renderer-islands.d.ts +32 -0
  86. package/dist/internal/renderer-islands.mjs +47 -0
  87. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  88. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  89. package/dist/plugin.cjs +20 -19
  90. package/dist/plugin.d.mts +1 -1
  91. package/dist/plugin.d.ts +1 -1
  92. package/dist/plugin.mjs +19 -18
  93. package/dist/renderer.cjs +8 -2
  94. package/dist/renderer.d.mts +81 -1
  95. package/dist/renderer.d.ts +81 -1
  96. package/dist/renderer.mjs +7 -1
  97. package/dist/{rsc-pipeline-MFJZGDPE.cjs → rsc-pipeline-ESPGX4VX.cjs} +9 -9
  98. package/dist/{rsc-pipeline-TRZVFCBX.mjs → rsc-pipeline-MW2V3WEE.mjs} +8 -8
  99. package/dist/{runtime-MJUG2HGR.cjs → runtime-FCMLEBTX.cjs} +13 -14
  100. package/dist/{runtime-O4Y3Z6V3.mjs → runtime-KGSOEMLT.mjs} +10 -11
  101. package/dist/server.cjs +50 -50
  102. package/dist/server.d.mts +2 -2
  103. package/dist/server.d.ts +2 -2
  104. package/dist/server.mjs +28 -28
  105. package/dist/version.cjs +2 -2
  106. package/dist/version.mjs +1 -1
  107. package/dist/vite.cjs +20 -19
  108. package/dist/vite.d.mts +8 -2
  109. package/dist/vite.d.ts +8 -2
  110. package/dist/vite.mjs +19 -18
  111. package/package.json +13 -3
  112. package/dist/analyzer-WGH6J2HN.cjs +0 -17
  113. package/dist/chunk-4QENVMG7.mjs +0 -34
  114. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  115. package/dist/{chunk-CA2HBLXP.mjs → chunk-4EEAPBNV.mjs} +3 -3
@@ -43,7 +43,7 @@ var _chunkRDADQG5Scjs = require('./chunk-RDADQG5S.cjs');
43
43
 
44
44
 
45
45
 
46
- var _chunkJHRJ5V2Fcjs = require('./chunk-JHRJ5V2F.cjs');
46
+ var _chunkH6C45DCFcjs = require('./chunk-H6C45DCF.cjs');
47
47
 
48
48
 
49
49
 
@@ -54,26 +54,29 @@ var _chunkDMSXZNQRcjs = require('./chunk-DMSXZNQR.cjs');
54
54
  var _chunkVACYUMXWcjs = require('./chunk-VACYUMXW.cjs');
55
55
 
56
56
 
57
+ var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
57
58
 
58
- var _chunkHRH7OKBQcjs = require('./chunk-HRH7OKBQ.cjs');
59
59
 
60
60
 
61
- var _chunkAQLHD6HZcjs = require('./chunk-AQLHD6HZ.cjs');
61
+ var _chunkL3BSHASBcjs = require('./chunk-L3BSHASB.cjs');
62
62
 
63
63
 
64
+ var _chunkMAPHNGTFcjs = require('./chunk-MAPHNGTF.cjs');
64
65
 
65
66
 
67
+ var _chunkRVJQHQCGcjs = require('./chunk-RVJQHQCG.cjs');
66
68
 
67
69
 
68
70
 
69
71
 
70
- var _chunkNEKO3HM2cjs = require('./chunk-NEKO3HM2.cjs');
71
72
 
72
73
 
73
- var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
74
74
 
75
75
 
76
- var _chunkOM6JIIJUcjs = require('./chunk-OM6JIIJU.cjs');
76
+ var _chunk4B6YJ5DScjs = require('./chunk-4B6YJ5DS.cjs');
77
+
78
+
79
+ var _chunk3HLQTOVUcjs = require('./chunk-3HLQTOVU.cjs');
77
80
 
78
81
 
79
82
 
@@ -88,13 +91,13 @@ var _chunkOM6JIIJUcjs = require('./chunk-OM6JIIJU.cjs');
88
91
 
89
92
 
90
93
 
91
- var _chunkWCSBYQOTcjs = require('./chunk-WCSBYQOT.cjs');
94
+ var _chunkTOUC6BR3cjs = require('./chunk-TOUC6BR3.cjs');
92
95
 
93
96
 
94
97
  var _chunkW53Z4WDIcjs = require('./chunk-W53Z4WDI.cjs');
95
98
 
96
99
 
97
- var _chunkIABI62FHcjs = require('./chunk-IABI62FH.cjs');
100
+ var _chunkBZN5HX7Ycjs = require('./chunk-BZN5HX7Y.cjs');
98
101
 
99
102
 
100
103
 
@@ -145,7 +148,7 @@ var _chunk7EPYN7GWcjs = require('./chunk-7EPYN7GW.cjs');
145
148
 
146
149
 
147
150
 
148
- var _chunkEFI6QWBQcjs = require('./chunk-EFI6QWBQ.cjs');
151
+ var _chunkOYM6VJEFcjs = require('./chunk-OYM6VJEF.cjs');
149
152
 
150
153
 
151
154
 
@@ -177,9 +180,6 @@ var _chunkEACD6ND7cjs = require('./chunk-EACD6ND7.cjs');
177
180
  var _chunkOLKYHTLNcjs = require('./chunk-OLKYHTLN.cjs');
178
181
 
179
182
 
180
- var _chunkRE5E2G5Scjs = require('./chunk-RE5E2G5S.cjs');
181
-
182
-
183
183
 
184
184
 
185
185
  var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
@@ -192,7 +192,8 @@ var _chunk52Q4OB4Acjs = require('./chunk-52Q4OB4A.cjs');
192
192
 
193
193
 
194
194
 
195
- var _chunkNGTZHWBGcjs = require('./chunk-NGTZHWBG.cjs');
195
+
196
+ var _chunk3OKSEJ33cjs = require('./chunk-3OKSEJ33.cjs');
196
197
 
197
198
 
198
199
 
@@ -312,7 +313,7 @@ var _chunkSUCDVKUBcjs = require('./chunk-SUCDVKUB.cjs');
312
313
  var _chunkPLJMEUANcjs = require('./chunk-PLJMEUAN.cjs');
313
314
 
314
315
 
315
- var _chunk3CZ4MJHWcjs = require('./chunk-3CZ4MJHW.cjs');
316
+ var _chunk3HWNYLQVcjs = require('./chunk-3HWNYLQV.cjs');
316
317
 
317
318
 
318
319
  var _chunkPMJSG4JScjs = require('./chunk-PMJSG4JS.cjs');
@@ -713,7 +714,7 @@ function findClientServerFnViolation(code, id) {
713
714
  return null;
714
715
  }
715
716
  function createServerFnBoundaryDiagnostic(violation, id, location) {
716
- return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
717
+ return _chunkOYM6VJEFcjs.createFarmDiagnostic.call(void 0,
717
718
  "CLIENT_SERVER_FUNCTION",
718
719
  id,
719
720
  `${violation.factory} handlers run only on the server, but this module is bundled into the client, so the handler and its Node-only imports would run in the browser.`,
@@ -972,21 +973,21 @@ function readPropertyKey(property) {
972
973
  function createClientBoundaryDiagnostic(file, finding, location) {
973
974
  switch (finding.kind) {
974
975
  case "server-env":
975
- return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
976
+ return _chunkOYM6VJEFcjs.createFarmDiagnostic.call(void 0,
976
977
  "CLIENT_SERVER_ENV",
977
978
  file,
978
979
  `process.env.${finding.name} is read at module scope in a module compiled for the browser, where it is undefined.`,
979
980
  location
980
981
  );
981
982
  case "public-env":
982
- return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
983
+ return _chunkOYM6VJEFcjs.createFarmDiagnostic.call(void 0,
983
984
  "CLIENT_PROCESS_ENV_PUBLIC",
984
985
  file,
985
986
  `process.env.${finding.name} is declared public, but process.env is not populated in the browser, so this module-scope read is undefined there.`,
986
987
  location
987
988
  );
988
989
  case "builtin":
989
- return _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
990
+ return _chunkOYM6VJEFcjs.createFarmDiagnostic.call(void 0,
990
991
  "CLIENT_NODE_BUILTIN",
991
992
  file,
992
993
  `"${finding.name}" is imported into a module compiled for the browser, which gets a stub whose exports without a Web API equivalent are undefined.`,
@@ -1288,7 +1289,7 @@ function loadFarmWorkflowsDevRuntime() {
1288
1289
  return import("./workflows.cjs");
1289
1290
  }
1290
1291
  function loadFarmDevtoolsSnapshotRuntime() {
1291
- return import("./devtools-ZM2AR36W.cjs");
1292
+ return import("./devtools-SXL5RFE5.cjs");
1292
1293
  }
1293
1294
  function loadFarmDevtoolsUIRuntime() {
1294
1295
  return import("./devtools-ui-C2EMF2SO.cjs");
@@ -1313,7 +1314,7 @@ function farmI18nClientBridgePlugin() {
1313
1314
  };
1314
1315
  }
1315
1316
  function farmNavigationPlugin(renderer) {
1316
- const otherRenderer = !_chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1317
+ const otherRenderer = !_chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, renderer) && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer || void 0) && _optionalChain([(renderer || void 0), 'optionalAccess', _69 => _69.name]) !== "preact";
1317
1318
  return {
1318
1319
  name: "farm:navigation",
1319
1320
  config() {
@@ -1338,16 +1339,16 @@ var FARM_SERVER_ONLY_PACKAGE_ID = "\0farm:server-only";
1338
1339
  var FARM_PLATFORM_ENTRY = "@farm.js/core/platform";
1339
1340
  var FARM_PLATFORM_CLIENT_ID = "\0farm:platform-client";
1340
1341
  var FARM_SERVER_ONLY_ENTRIES_RESOLVE_FILTER = [
1341
- _chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1342
- new RegExp(`^${_chunkEFI6QWBQcjs.FARM_RESOLVE_FROM_PREFIX}`),
1342
+ _chunkH6C45DCFcjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1343
+ new RegExp(`^${_chunkOYM6VJEFcjs.FARM_RESOLVE_FROM_PREFIX}`),
1343
1344
  // What isBuiltin() accepts: `node:` ids and the builtin names, subpaths such as fs/promises
1344
1345
  // included.
1345
1346
  /^node:/,
1346
- _chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, _module.builtinModules)
1347
+ _chunkH6C45DCFcjs.exactIdPattern.call(void 0, _module.builtinModules)
1347
1348
  ];
1348
1349
  var FARM_SERVER_ONLY_ENTRIES_LOAD_FILTER = [
1349
- _chunkJHRJ5V2Fcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1350
- new RegExp(`^${_chunkEFI6QWBQcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1350
+ _chunkH6C45DCFcjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1351
+ new RegExp(`^${_chunkOYM6VJEFcjs.FARM_BROWSER_BUILTIN_PREFIX}`)
1351
1352
  ];
1352
1353
  function createFarmPlatformClientModule(platform) {
1353
1354
  return `export function platform() { return ${JSON.stringify(platform)}; }
@@ -1377,24 +1378,24 @@ function farmIslandContainersPlugin(config) {
1377
1378
  root = config.root || resolved.root;
1378
1379
  },
1379
1380
  transform(code, id) {
1380
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1381
+ if (_chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([config, 'access', _70 => _70.experimental, 'optionalAccess', _71 => _71.serverComponents])) !== "islands") {
1381
1382
  return null;
1382
1383
  }
1383
1384
  if (id.startsWith("\0") || id.includes("/node_modules/") || !/\.[jt]sx(?:$|\?)/.test(id)) {
1384
1385
  return null;
1385
1386
  }
1386
- if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, code)) return null;
1387
+ if (_chunkOYM6VJEFcjs.hasUseClientDirective.call(void 0, code)) return null;
1387
1388
  const file = id.split("?", 1)[0];
1388
- const bindings = _chunkEFI6QWBQcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1389
+ const bindings = _chunkOYM6VJEFcjs.getFarmClientRenderingBindings.call(void 0, code, file, root);
1389
1390
  if (bindings.length === 0) return null;
1390
- const grown = _chunkEFI6QWBQcjs.wrapFarmIslandContainers.call(void 0, {
1391
+ const grown = _chunkOYM6VJEFcjs.wrapFarmIslandContainers.call(void 0, {
1391
1392
  code,
1392
1393
  file,
1393
1394
  bindings,
1394
- reference: _chunkEFI6QWBQcjs.farmIslandContainerReferencePath.call(void 0, root)
1395
+ reference: _chunkOYM6VJEFcjs.farmIslandContainerReferencePath.call(void 0, root)
1395
1396
  });
1396
1397
  if (grown === null) return null;
1397
- _chunkEFI6QWBQcjs.ensureFarmIslandContainerReference.call(void 0, root);
1398
+ _chunkOYM6VJEFcjs.ensureFarmIslandContainerReference.call(void 0, root);
1398
1399
  return { code: grown, map: null };
1399
1400
  }
1400
1401
  };
@@ -1408,20 +1409,25 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1408
1409
  config(config) {
1409
1410
  const appRoot = path6.resolve(_nullishCoalesce(config.root, () => ( process.cwd())));
1410
1411
  if (options.distDir) {
1411
- _chunkEFI6QWBQcjs.usePackageScanCacheFile.call(void 0,
1412
+ _chunkOYM6VJEFcjs.usePackageScanCacheFile.call(void 0,
1412
1413
  path6.resolve(appRoot, options.distDir, "cache", "package-scans.json")
1413
1414
  );
1414
1415
  }
1415
- const bundledPackages = _chunkEFI6QWBQcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1416
+ const bundledPackages = _chunkOYM6VJEFcjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1416
1417
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1417
- _chunkEFI6QWBQcjs.persistPackageScanCache.call(void 0, );
1418
+ _chunkOYM6VJEFcjs.persistPackageScanCache.call(void 0, );
1418
1419
  return {
1419
- optimizeDeps: { rolldownOptions: { plugins: [_chunkEFI6QWBQcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1420
+ optimizeDeps: {
1421
+ // A package that defines fonts is served unbundled, so Farm's font compiler sees it.
1422
+ exclude: bundledPackages.filter(({ fonts }) => fonts).map(({ name }) => name),
1423
+ rolldownOptions: { plugins: [_chunkOYM6VJEFcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] }
1424
+ },
1420
1425
  ssr: {
1421
1426
  noExternal: [
1422
1427
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
1423
1428
  SERVER_ONLY_PACKAGE,
1424
- // Packages Node cannot load as a bundler does (stylesheet imports, `module`-only ESM).
1429
+ // Packages Node cannot load as a bundler does (stylesheet imports, `module`-only ESM,
1430
+ // fonts that only Farm's font compiler can build).
1425
1431
  ...bundledPackages.map(({ name }) => name)
1426
1432
  ],
1427
1433
  ...prebundle
@@ -1440,8 +1446,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1440
1446
  return FARM_SERVER_ONLY_PACKAGE_ID;
1441
1447
  }
1442
1448
  this.error(
1443
- _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
1444
- _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
1449
+ _chunkOYM6VJEFcjs.formatFarmDiagnostic.call(void 0,
1450
+ _chunkOYM6VJEFcjs.createFarmDiagnostic.call(void 0,
1445
1451
  "CLIENT_SERVER_ONLY_IMPORT",
1446
1452
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1447
1453
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1451,9 +1457,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1451
1457
  );
1452
1458
  }
1453
1459
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1454
- return _chunkEFI6QWBQcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1460
+ return _chunkOYM6VJEFcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1455
1461
  }
1456
- const resolveFrom = importer ? _chunkEFI6QWBQcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1462
+ const resolveFrom = importer ? _chunkOYM6VJEFcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1457
1463
  if (resolveFrom) {
1458
1464
  const directory = path6.dirname(resolveFrom.importer);
1459
1465
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1470,8 +1476,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1470
1476
  const importedBy = importer ? ` (imported by ${importer})` : "";
1471
1477
  if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1472
1478
  this.error(
1473
- _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
1474
- _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
1479
+ _chunkOYM6VJEFcjs.formatFarmDiagnostic.call(void 0,
1480
+ _chunkOYM6VJEFcjs.createFarmDiagnostic.call(void 0,
1475
1481
  "CLIENT_SERVER_ONLY_ENTRY",
1476
1482
  _nullishCoalesce(importer, () => ( id)),
1477
1483
  `${id} is server-only and cannot be imported into client code.`
@@ -1496,7 +1502,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1496
1502
  if (id === FARM_PLATFORM_CLIENT_ID) {
1497
1503
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1498
1504
  }
1499
- return _nullishCoalesce(_chunkEFI6QWBQcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1505
+ return _nullishCoalesce(_chunkOYM6VJEFcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1500
1506
  }
1501
1507
  }
1502
1508
  };
@@ -1529,7 +1535,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1529
1535
  if (!snapshot) return "";
1530
1536
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1531
1537
  if (snapshot.routing === "none") return runtime;
1532
- return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1538
+ return `${_chunk4B6YJ5DScjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1533
1539
  }
1534
1540
  function getPublicEnvDefine(config) {
1535
1541
  const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
@@ -1977,7 +1983,7 @@ function getEnvDefines(config, configEnv) {
1977
1983
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1978
1984
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1979
1985
  config.images,
1980
- _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1986
+ _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1981
1987
  )
1982
1988
  )
1983
1989
  )
@@ -2110,7 +2116,7 @@ function transformIsolatedClientBoundaryModule(options) {
2110
2116
  return null;
2111
2117
  }
2112
2118
  const body = Array.isArray(ast.body) ? ast.body : [];
2113
- const everyExportIsComponent = options.code.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2119
+ const everyExportIsComponent = options.code.includes(_chunkOYM6VJEFcjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkOYM6VJEFcjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2114
2120
  const replacements = [];
2115
2121
  const wrapperStatements = [];
2116
2122
  const originalEntries = [];
@@ -2120,7 +2126,7 @@ function transformIsolatedClientBoundaryModule(options) {
2120
2126
  const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
2121
2127
  wrapperStatements.push(
2122
2128
  // Islands mode renders through islx; the older isolated hydration keeps Farm's boundary.
2123
- options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
2129
+ options.withIsland ? `const ${wrapperName} = __farm_with_island__(${localName}, { src: ${JSON.stringify(options.moduleReference)}, export: ${JSON.stringify(exportName)}, strategy: ${JSON.stringify(options.islandStrategy)} });` : options.slots && options.inferredInteraction ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, "interaction", { inferred: true });` : options.slots ? `const ${wrapperName} = __farm_islx_island__(${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});` : `const ${wrapperName} = __farm_create_isolated_boundary__(__farm_isolated_react__, ${localName}, ${JSON.stringify(options.moduleReference)}, ${JSON.stringify(exportName)}, ${JSON.stringify(options.islandStrategy)});`
2124
2130
  );
2125
2131
  wrapperStatements.push(
2126
2132
  isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
@@ -2208,7 +2214,11 @@ function transformIsolatedClientBoundaryModule(options) {
2208
2214
  output = output.slice(0, replacement.start) + replacement.code + output.slice(replacement.end);
2209
2215
  }
2210
2216
  const isComponent = `(value) => typeof value === "function" || (typeof value === "object" && value !== null && [Symbol.for("react.memo"), Symbol.for("react.forward_ref"), Symbol.for("react.lazy")].includes(value.$$typeof))`;
2211
- const runtimeImport = options.slots ? options.browser ? "const __farm_islx_island__ = (component) => component;" : `import { createIsland as __farm_islx_create_island__ } from ${islxReact};
2217
+ const runtimeImport = options.withIsland ? (
2218
+ // The renderer's withIsland returns a value that isn't one of its components unchanged.
2219
+ `import { withIsland as __farm_renderer_with_island__ } from ${JSON.stringify(options.withIsland)};
2220
+ const __farm_with_island__ = (component, reference) => component !== null && (typeof component === "function" || typeof component === "object") ? __farm_renderer_with_island__(component, reference) : component;`
2221
+ ) : options.slots ? options.browser ? "const __farm_islx_island__ = (component) => component;" : `import { createIsland as __farm_islx_create_island__ } from ${islxReact};
2212
2222
  const __farm_is_component__ = ${isComponent};
2213
2223
  const __farm_islx_island__ = (component, ...rest) => __farm_is_component__(component) ? __farm_islx_create_island__(component, ...rest) : component;` : `import * as __farm_isolated_react__ from "react";
2214
2224
  import { createFarmIsolatedClientBoundary as __farm_create_boundary__ } from ${isolatedBoundary};
@@ -2261,16 +2271,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2261
2271
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2262
2272
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2263
2273
  const resolved = await context.resolve(finding.name, id).catch(() => null);
2264
- if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkEFI6QWBQcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2274
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkOYM6VJEFcjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2265
2275
  }
2266
2276
  findings.push(finding);
2267
2277
  }
2268
2278
  if (findings.length === 0) return;
2269
2279
  warnedClientBoundaryIds.add(id);
2270
- const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2280
+ const locate = _chunkOYM6VJEFcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2271
2281
  _chunk7U4XF76Rcjs.logger.warn(
2272
2282
  findings.map(
2273
- (finding) => _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
2283
+ (finding) => _chunkOYM6VJEFcjs.formatFarmDiagnostic.call(void 0,
2274
2284
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2275
2285
  config.root
2276
2286
  )
@@ -2287,7 +2297,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2287
2297
  );
2288
2298
  }
2289
2299
  function shouldEmitFarmClientRootHmr(renderer) {
2290
- return _chunkNGTZHWBGcjs.getFarmRendererCapabilities.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2300
+ return _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2291
2301
  }
2292
2302
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2293
2303
  function toFarmRuntimeModuleId(specifier) {
@@ -2318,9 +2328,9 @@ function hasFarmSourceAliasOverride(alias) {
2318
2328
  );
2319
2329
  }
2320
2330
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2321
- const rendererDisabled = _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2331
+ const rendererDisabled = _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, options.renderer);
2322
2332
  const imageImports = farmImageImportsPlugin();
2323
- const fontImports = _chunkJHRJ5V2Fcjs.farmFontImportsPlugin.call(void 0, {
2333
+ const fontImports = _chunkH6C45DCFcjs.farmFontImportsPlugin.call(void 0, {
2324
2334
  root: options.root,
2325
2335
  basePath: options.basePath,
2326
2336
  publicDir: options.publicDir
@@ -2354,8 +2364,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2354
2364
  if (mdxComponents) files.add(mdxComponents);
2355
2365
  return files;
2356
2366
  };
2357
- const islxActionsMode = () => _chunkJHRJ5V2Fcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2358
- const islandsServerFns = () => _chunkJHRJ5V2Fcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2367
+ const islxActionsMode = () => _chunkH6C45DCFcjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2368
+ const islandsServerFns = () => _chunkH6C45DCFcjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2359
2369
  let reactRefreshActive = false;
2360
2370
  let server;
2361
2371
  let deferredGates;
@@ -2398,11 +2408,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2398
2408
  isBuild = configEnv.command === "build";
2399
2409
  const farmAliases = {
2400
2410
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, options.layers),
2401
- ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2411
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkH6C45DCFcjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2402
2412
  };
2403
2413
  if (Object.keys(farmAliases).length > 0) {
2404
2414
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2405
- userConfig.resolve.alias = _chunkJHRJ5V2Fcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2415
+ userConfig.resolve.alias = _chunkH6C45DCFcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2406
2416
  }
2407
2417
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2408
2418
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
@@ -2476,7 +2486,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2476
2486
  } catch (e21) {
2477
2487
  }
2478
2488
  };
2479
- farmApp = new (0, _chunkJHRJ5V2Fcjs.FarmApp)(
2489
+ farmApp = new (0, _chunkH6C45DCFcjs.FarmApp)(
2480
2490
  {
2481
2491
  ...options,
2482
2492
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2484,7 +2494,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2484
2494
  server
2485
2495
  );
2486
2496
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2487
- _chunkEFI6QWBQcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2497
+ _chunkOYM6VJEFcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2488
2498
  farmApp.getConfig().root,
2489
2499
  options.distDir || ".farm"
2490
2500
  )
@@ -2495,7 +2505,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2495
2505
  let farmAppPackages;
2496
2506
  if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2497
2507
  farmMiddlewares.use((_req, res, next) => {
2498
- if (_chunkIABI62FHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2508
+ if (_chunkBZN5HX7Ycjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2499
2509
  res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2500
2510
  }
2501
2511
  next();
@@ -2503,7 +2513,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2503
2513
  }
2504
2514
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2505
2515
  const devBuiltInRoutePaths = new Set(
2506
- _chunkWCSBYQOTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2516
+ _chunkTOUC6BR3cjs.listFarmBuiltInRoutePaths.call(void 0, {
2507
2517
  agent: {
2508
2518
  apiCatalog: true,
2509
2519
  mcp: true,
@@ -2553,7 +2563,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2553
2563
  );
2554
2564
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2555
2565
  try {
2556
- const result = await _chunkHRH7OKBQcjs.generateFarmTypeArtifacts.call(void 0, {
2566
+ const result = await _chunkL3BSHASBcjs.generateFarmTypeArtifacts.call(void 0, {
2557
2567
  root: farmConfig.root,
2558
2568
  srcDir: farmConfig.srcDir,
2559
2569
  layers: farmConfig.layers,
@@ -2598,7 +2608,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2598
2608
  farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2599
2609
  );
2600
2610
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2601
- ..._chunkNGTZHWBGcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2611
+ ..._chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2602
2612
  ".md",
2603
2613
  ".mdx"
2604
2614
  ]);
@@ -2840,7 +2850,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2840
2850
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2841
2851
  };
2842
2852
  releaseDocsMCPServers();
2843
- const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
2853
+ const isFarmDocsPathGuarded = (href) => _chunk4B6YJ5DScjs.farmPathGuardCoversPage.call(void 0,
2844
2854
  {
2845
2855
  config: farmConfig,
2846
2856
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2854,7 +2864,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2854
2864
  rendererServer: farmConfig.renderer.server,
2855
2865
  resolveLayoutFonts: resolveDocsLayoutFonts,
2856
2866
  fontStylesheetHref: "/@farm/fonts.css",
2857
- globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
2867
+ globalStylesheetHref: _chunkH6C45DCFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2858
2868
  farmConfig.root,
2859
2869
  farmConfig.srcDir
2860
2870
  ),
@@ -2885,7 +2895,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2885
2895
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2886
2896
  resolveLayoutFonts: resolveDocsLayoutFonts,
2887
2897
  fontStylesheetHref: "/@farm/fonts.css",
2888
- globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
2898
+ globalStylesheetHref: _chunkH6C45DCFcjs.resolveDevGlobalStylesheetHref.call(void 0,
2889
2899
  farmConfig.root,
2890
2900
  farmConfig.srcDir
2891
2901
  ),
@@ -2922,9 +2932,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2922
2932
  }
2923
2933
  const farmInfraAnalyticsPlugin = _optionalChain([pm, 'optionalAccess', _192 => _192.getPlugins, 'call', _193 => _193(), 'access', _194 => _194.find, 'call', _195 => _195((plugin2) => plugin2.name === "farm:infra-analytics")]);
2924
2934
  if (farmInfraAnalyticsPlugin) {
2925
- _chunkOM6JIIJUcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2935
+ _chunkRVJQHQCGcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2926
2936
  if (farmDocsDevRuntime) {
2927
- const label = _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0,
2937
+ const label = _chunkTOUC6BR3cjs.resolveFarmDocsRouteLabel.call(void 0,
2928
2938
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2929
2939
  {
2930
2940
  path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
@@ -2932,7 +2942,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2932
2942
  pages: await getFarmDocsPagePaths()
2933
2943
  }
2934
2944
  );
2935
- if (label) return _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2945
+ if (label) return _chunkTOUC6BR3cjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2936
2946
  }
2937
2947
  const match = farmApp.getRouteManager().matchRoute(pathname);
2938
2948
  return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
@@ -3096,7 +3106,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3096
3106
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3097
3107
  res.statusCode = 200;
3098
3108
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3099
- res.end(requestMethod === "HEAD" ? void 0 : _chunkJHRJ5V2Fcjs.FARM_VIDEO_PLAYER_HTML);
3109
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkH6C45DCFcjs.FARM_VIDEO_PLAYER_HTML);
3100
3110
  return;
3101
3111
  }
3102
3112
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3376,9 +3386,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3376
3386
  if (pm && opensFarmDevRuntimeSession(pm)) {
3377
3387
  try {
3378
3388
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3379
- const route = _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
3389
+ const route = _chunkTOUC6BR3cjs.setFarmRouteLabel.call(void 0,
3380
3390
  { pathname: requestPathname },
3381
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3391
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkTOUC6BR3cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3382
3392
  );
3383
3393
  runtimeSession2 = await pm.beginRuntimeRequest(
3384
3394
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3467,8 +3477,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3467
3477
  );
3468
3478
  return;
3469
3479
  }
3470
- if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunkWCSBYQOTcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3471
- const manifestGuardCoversPath = (path7) => _chunkNEKO3HM2cjs.farmPathGuardCoversEndpoint.call(void 0,
3480
+ if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunkTOUC6BR3cjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3481
+ const manifestGuardCoversPath = (path7) => _chunk4B6YJ5DScjs.farmPathGuardCoversEndpoint.call(void 0,
3472
3482
  {
3473
3483
  config: farmConfig,
3474
3484
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3477,18 +3487,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3477
3487
  apiServerBasePath
3478
3488
  );
3479
3489
  await serveBuiltInRoute(async () => {
3480
- _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkJHRJ5V2Fcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3481
- const manifest = await _chunkWCSBYQOTcjs.createFarmAppManifestResponse.call(void 0,
3490
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkH6C45DCFcjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3491
+ const manifest = await _chunkTOUC6BR3cjs.createFarmAppManifestResponse.call(void 0,
3482
3492
  new Request(parsedRequestUrl, {
3483
3493
  method: requestMethod,
3484
3494
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3485
3495
  }),
3486
3496
  {
3487
- ..._chunkWCSBYQOTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3497
+ ..._chunkTOUC6BR3cjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3488
3498
  build: "development",
3489
3499
  packages: farmAppPackages,
3490
3500
  // Read again on each request; unchanged files come from a cache.
3491
- webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkJHRJ5V2Fcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3501
+ webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkH6C45DCFcjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3492
3502
  }),
3493
3503
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3494
3504
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3506,11 +3516,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3506
3516
  });
3507
3517
  return;
3508
3518
  }
3509
- if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkWCSBYQOTcjs.FARM_API_CATALOG_PATH) {
3519
+ if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunkTOUC6BR3cjs.FARM_API_CATALOG_PATH) {
3510
3520
  await serveBuiltInRoute(
3511
- () => _chunkWCSBYQOTcjs.createFarmApiCatalogResponse.call(void 0,
3521
+ () => _chunkTOUC6BR3cjs.createFarmApiCatalogResponse.call(void 0,
3512
3522
  requestMethod,
3513
- _chunkWCSBYQOTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3523
+ _chunkTOUC6BR3cjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3514
3524
  new Request(parsedRequestUrl, {
3515
3525
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3516
3526
  })
@@ -3519,7 +3529,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3519
3529
  return;
3520
3530
  }
3521
3531
  if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
3522
- const aiCatalog = _chunkWCSBYQOTcjs.createFarmAiCatalogResponse.call(void 0,
3532
+ const aiCatalog = _chunkTOUC6BR3cjs.createFarmAiCatalogResponse.call(void 0,
3523
3533
  new Request(parsedRequestUrl, {
3524
3534
  method: requestMethod,
3525
3535
  headers: {
@@ -3601,7 +3611,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3601
3611
  {
3602
3612
  kind: "docs",
3603
3613
  computed: docsResponse,
3604
- label: _chunkWCSBYQOTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3614
+ label: _chunkTOUC6BR3cjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3605
3615
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3606
3616
  {
3607
3617
  path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
@@ -3638,7 +3648,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3638
3648
  }
3639
3649
  const markdownRouteLabel = () => (
3640
3650
  // On the route path, as production labels it: /fr/index.md is /index.md.
3641
- _chunkWCSBYQOTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3651
+ _chunkTOUC6BR3cjs.resolveFarmMarkdownRouteLabel.call(void 0,
3642
3652
  toRoutePathname(requestPathname),
3643
3653
  (page) => _optionalChain([farmApp, 'access', _273 => _273.getRouteManager, 'call', _274 => _274(), 'access', _275 => _275.matchRoute, 'call', _276 => _276(page), 'access', _277 => _277.route, 'optionalAccess', _278 => _278.pattern])
3644
3654
  )
@@ -3659,7 +3669,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3659
3669
  return {
3660
3670
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3661
3671
  // Project-relative, as production sends it: never the machine's path.
3662
- filePath: _chunkJHRJ5V2Fcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3672
+ filePath: _chunkH6C45DCFcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3663
3673
  };
3664
3674
  },
3665
3675
  // The anonymous check goes through this server, so its guards and
@@ -4002,9 +4012,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4002
4012
  );
4003
4013
  const docsRuntimeOptions = () => ({
4004
4014
  kind: "docs",
4005
- route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
4015
+ route: _chunkTOUC6BR3cjs.setFarmRouteLabel.call(void 0,
4006
4016
  { pathname: pathname2, pattern: urlPath2 },
4007
- _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4017
+ _chunkTOUC6BR3cjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4008
4018
  path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
4009
4019
  roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
4010
4020
  })
@@ -4358,7 +4368,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4358
4368
  );
4359
4369
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4360
4370
  const navigationManifest = routeManager3.generateClientManifest(server.config.root);
4361
- const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4371
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkOYM6VJEFcjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4362
4372
  const isClientComponent = moduleMetadata.isClientComponent;
4363
4373
  const shouldHydrate = moduleMetadata.shouldHydrate;
4364
4374
  let mergedMetadata = {};
@@ -4369,7 +4379,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4369
4379
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4370
4380
  (entry) => entry.pattern === layout.pattern
4371
4381
  ), () => ( {
4372
- ..._chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4382
+ ..._chunkOYM6VJEFcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4373
4383
  serverTree: false
4374
4384
  }))
4375
4385
  );
@@ -4382,9 +4392,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4382
4392
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
4383
4393
  )
4384
4394
  ];
4385
- const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4395
+ const hydrationIslandStrategy = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0,
4386
4396
  _optionalChain([(_nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _318 => _318.getConfig, 'call', _319 => _319()]), () => ( options))), 'access', _320 => _320.experimental, 'optionalAccess', _321 => _321.serverComponents])
4387
- ) === "islands" ? _chunkJHRJ5V2Fcjs.resolveFarmRouteRootStrategy.call(void 0,
4397
+ ) === "islands" ? _chunkH6C45DCFcjs.resolveFarmRouteRootStrategy.call(void 0,
4388
4398
  route,
4389
4399
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4390
4400
  layouts.map((layout, index) => ({
@@ -4450,7 +4460,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4450
4460
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4451
4461
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4452
4462
  (entry) => entry.name === slot.name && entry.ownerPattern === slot.ownerPattern && entry.pattern === slot.route.pattern
4453
- ), () => ( _chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4463
+ ), () => ( _chunkOYM6VJEFcjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4454
4464
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4455
4465
  request: targetRequest,
4456
4466
  params: slot.params,
@@ -4496,15 +4506,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4496
4506
  );
4497
4507
  const projectRoot = server.config.root;
4498
4508
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4499
- const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
4509
+ const renderPlan = _chunk4B6YJ5DScjs.createFarmRouteRenderPlan.call(void 0, {
4500
4510
  pageShouldHydrate: shouldHydrate,
4501
4511
  layoutShouldHydrate: shouldHydrateLayout,
4502
4512
  islandStrategy: hydrationIslandStrategy,
4503
- rendering: _chunkHRH7OKBQcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4513
+ rendering: _chunkL3BSHASBcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4504
4514
  });
4505
4515
  const destinationLayoutPatterns = layouts.map((layout) => layout.pattern);
4506
- const layoutStartIndex = _chunkNEKO3HM2cjs.getSharedLayoutPrefixLength.call(void 0,
4507
- _chunkNEKO3HM2cjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4516
+ const layoutStartIndex = _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0,
4517
+ _chunk4B6YJ5DScjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4508
4518
  destinationLayoutPatterns
4509
4519
  );
4510
4520
  const renderer = farmApp.getServerRenderer();
@@ -4586,7 +4596,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4586
4596
  {
4587
4597
  status: 200,
4588
4598
  headers: {
4589
- "Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4599
+ "Cache-Control": _chunk4B6YJ5DScjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4590
4600
  "X-Farm-Navigation": "html-fragment",
4591
4601
  Vary: "X-Farm-Layout-Chain",
4592
4602
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4635,7 +4645,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4635
4645
  const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
4636
4646
  const pageBuiltInRouteLabel = (pathname2) => {
4637
4647
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4638
- const mcpLabel = _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4648
+ const mcpLabel = _chunkTOUC6BR3cjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4639
4649
  if (mcpLabel) return mcpLabel;
4640
4650
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4641
4651
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4644,7 +4654,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4644
4654
  const match = routeManager2.matchRoute(pathname2);
4645
4655
  return {
4646
4656
  kind: "page",
4647
- route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
4657
+ route: _chunkTOUC6BR3cjs.setFarmRouteLabel.call(void 0,
4648
4658
  {
4649
4659
  pathname: pathname2,
4650
4660
  pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
@@ -4871,7 +4881,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4871
4881
  if (imageModule) return imageModule;
4872
4882
  }
4873
4883
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) {
4874
- const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, options.renderer);
4884
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, options.renderer);
4875
4885
  const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4876
4886
  if (isClientEnvironment(this, loadOptions)) {
4877
4887
  return generateProgrammaticClientRouteModuleForId(
@@ -4889,7 +4899,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4889
4899
  }
4890
4900
  if (isFarmClientVirtualId(id)) {
4891
4901
  const resolvedConfig = _optionalChain([farmApp, 'optionalAccess', _372 => _372.getConfig, 'call', _373 => _373()]);
4892
- const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, options.renderer);
4902
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, options.renderer);
4893
4903
  const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
4894
4904
  const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
4895
4905
  const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
@@ -4908,10 +4918,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4908
4918
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4909
4919
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4910
4920
  const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4911
- const isolatedHydrationMode = _chunkEFI6QWBQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4921
+ const isolatedHydrationMode = _chunkOYM6VJEFcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4912
4922
  _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
4913
4923
  {
4914
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4924
+ serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4915
4925
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4916
4926
  }
4917
4927
  );
@@ -4930,14 +4940,14 @@ ${generatedDevIndicatorsClientRuntime}`,
4930
4940
  _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
4931
4941
  adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
4932
4942
  renderer,
4933
- isolatedHydrationMode === "enabled" || _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _395 => _395.getRouteManager, 'call', _396 => _396(), 'access', _397 => _397.getIsolatedClientBoundaryModules, 'call', _398 => _398(root)])))), 'optionalAccess', _399 => _399.size]) > 0,
4943
+ isolatedHydrationMode === "enabled" || _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _optionalChain([(_nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _395 => _395.getRouteManager, 'call', _396 => _396(), 'access', _397 => _397.getIsolatedClientBoundaryModules, 'call', _398 => _398(root)])))), 'optionalAccess', _399 => _399.size]) > 0,
4934
4944
  _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
4935
4945
  _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _401 => _401.basePath]), () => ( "/")),
4936
- _chunkJHRJ5V2Fcjs.generateClientCachePersistenceCode.call(void 0,
4937
- _chunkJHRJ5V2Fcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
4946
+ _chunkH6C45DCFcjs.generateClientCachePersistenceCode.call(void 0,
4947
+ _chunkH6C45DCFcjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
4938
4948
  ),
4939
4949
  adapterOwnsDocsRuntime ? _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, docs) : void 0,
4940
- _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
4950
+ _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
4941
4951
  );
4942
4952
  }
4943
4953
  if (id === "/@farm/server") {
@@ -4956,11 +4966,11 @@ export const getManifest = () => ({
4956
4966
  });
4957
4967
  `;
4958
4968
  }
4959
- const globalStylesheetHref = _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
4969
+ const globalStylesheetHref = _chunkH6C45DCFcjs.resolveDevGlobalStylesheetHref.call(void 0,
4960
4970
  server.config.root,
4961
4971
  _optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
4962
4972
  );
4963
- const fullManifest = _chunkJHRJ5V2Fcjs.createFarmDevClientManifest.call(void 0,
4973
+ const fullManifest = _chunkH6C45DCFcjs.createFarmDevClientManifest.call(void 0,
4964
4974
  routeManager.generateClientManifest(server.config.root),
4965
4975
  {
4966
4976
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4982,45 +4992,45 @@ export { manifest };
4982
4992
  const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4983
4993
  const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
4984
4994
  let rewrotePackageImports = false;
4985
- if (_chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, code)) {
4995
+ if (_chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([actionConfig, 'access', _414 => _414.experimental, 'optionalAccess', _415 => _415.serverComponents])) === "islands" && (!id.includes("/node_modules/") || _optionalChain([transformOptions, 'optionalAccess', _416 => _416.ssr]) === true && farmReactServerFiles.has(id.split("?", 1)[0])) && !id.startsWith("\0") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id) && !_chunkOYM6VJEFcjs.hasUseClientDirective.call(void 0, code)) {
4986
4996
  const file = id.split("?", 1)[0];
4987
4997
  const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
4988
4998
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4989
4999
  const rewrite = () => {
4990
5000
  if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
4991
5001
  if (farmReactServerFiles.has(file)) {
4992
- for (const child of _chunkEFI6QWBQcjs.farmRelativeImportFiles.call(void 0, code, file))
5002
+ for (const child of _chunkOYM6VJEFcjs.farmRelativeImportFiles.call(void 0, code, file))
4993
5003
  farmReactServerFiles.add(child);
4994
5004
  }
4995
- const serverModule = farmReactServerFiles.has(file) || !_chunkEFI6QWBQcjs.getFarmClientReachableModules.call(void 0,
5005
+ const serverModule = farmReactServerFiles.has(file) || !_chunkOYM6VJEFcjs.getFarmClientReachableModules.call(void 0,
4996
5006
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4997
5007
  projectRoot
4998
5008
  ).has(path6.resolve(file));
4999
- const reactServer = !serverModule ? null : _chunkEFI6QWBQcjs.rewriteFarmReactServerImports.call(void 0, {
5009
+ const reactServer = !serverModule ? null : _chunkOYM6VJEFcjs.rewriteFarmReactServerImports.call(void 0, {
5000
5010
  code,
5001
5011
  file,
5002
- reference: (specifier, exportName) => _chunkEFI6QWBQcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5012
+ reference: (specifier, exportName) => _chunkOYM6VJEFcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5003
5013
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5004
5014
  });
5005
5015
  if (reactServer !== null) {
5006
5016
  code = reactServer;
5007
5017
  rewrotePackageImports = true;
5008
5018
  }
5009
- const internal = farmReactServerFiles.has(file) ? _chunkEFI6QWBQcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5019
+ const internal = farmReactServerFiles.has(file) ? _chunkOYM6VJEFcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5010
5020
  code,
5011
5021
  file,
5012
- reference: (clientFile) => _chunkEFI6QWBQcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5022
+ reference: (clientFile) => _chunkOYM6VJEFcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5013
5023
  }) : null;
5014
5024
  if (internal !== null) {
5015
5025
  code = internal;
5016
5026
  rewrotePackageImports = true;
5017
5027
  }
5018
5028
  }
5019
- const rewritePackageImports = (source2) => _chunkEFI6QWBQcjs.rewriteFarmPackageClientImports.call(void 0, {
5029
+ const rewritePackageImports = (source2) => _chunkOYM6VJEFcjs.rewriteFarmPackageClientImports.call(void 0, {
5020
5030
  code: source2,
5021
5031
  file,
5022
5032
  root: projectRoot,
5023
- isClientPackage: (specifier) => _chunkEFI6QWBQcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5033
+ isClientPackage: (specifier) => _chunkOYM6VJEFcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5024
5034
  });
5025
5035
  const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
5026
5036
  const source = code;
@@ -5041,7 +5051,7 @@ export { manifest };
5041
5051
  }
5042
5052
  }
5043
5053
  };
5044
- if (buildSnapshot) _chunkEFI6QWBQcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5054
+ if (buildSnapshot) _chunkOYM6VJEFcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5045
5055
  else rewrite();
5046
5056
  }
5047
5057
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
@@ -5070,8 +5080,8 @@ export { manifest };
5070
5080
  }
5071
5081
  if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5072
5082
  const docsConfigModule = _chunkXJDB564Acjs.getFarmDocsAdapterConfigModule.call(void 0, _optionalChain([farmApp, 'optionalAccess', _429 => _429.getConfig, 'call', _430 => _430(), 'optionalAccess', _431 => _431.docs]));
5073
- if (_chunkJHRJ5V2Fcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5074
- const redacted = _chunkJHRJ5V2Fcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5083
+ if (_chunkH6C45DCFcjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5084
+ const redacted = _chunkH6C45DCFcjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5075
5085
  if (redacted !== null) return { code: redacted, map: null };
5076
5086
  }
5077
5087
  }
@@ -5080,9 +5090,9 @@ export { manifest };
5080
5090
  if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5081
5091
  const violation = findClientServerFnViolation(code, id);
5082
5092
  if (violation) {
5083
- const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5093
+ const locate = _chunkOYM6VJEFcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5084
5094
  this.error(
5085
- _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
5095
+ _chunkOYM6VJEFcjs.formatFarmDiagnostic.call(void 0,
5086
5096
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5087
5097
  currentConfig.root
5088
5098
  )
@@ -5124,26 +5134,27 @@ export { manifest };
5124
5134
  transformed = true;
5125
5135
  }
5126
5136
  }
5127
- if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5137
+ if (_chunkOYM6VJEFcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5128
5138
  const clientBoundarySource = transformedCode;
5129
5139
  const moduleInfo = this.getModuleInfo(id);
5130
5140
  if (moduleInfo) {
5131
5141
  moduleInfo.isClientComponent = true;
5132
5142
  }
5133
- transformedCode = _chunkEFI6QWBQcjs.stripUseClientDirective.call(void 0, transformedCode);
5143
+ transformedCode = _chunkOYM6VJEFcjs.stripUseClientDirective.call(void 0, transformedCode);
5134
5144
  transformed = true;
5135
5145
  const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5136
5146
  let isolatedModuleReference = null;
5147
+ let rendererIslandModule = false;
5137
5148
  const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5138
5149
  const cleanId = id.split("?", 1)[0];
5139
5150
  const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5140
5151
  const selectedForIsolatedHydration = _optionalChain([selectedIsolatedModules, 'optionalAccess', _452 => _452.has, 'call', _453 => _453(path6.resolve(cleanId))]) === true;
5141
- if (_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkEFI6QWBQcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5142
- cleanId.replace(/\\/g, "/").includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5152
+ if (_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkOYM6VJEFcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5153
+ cleanId.replace(/\\/g, "/").includes(_chunkOYM6VJEFcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5143
5154
  isolatedModuleReference = _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root);
5144
- const islandsMode = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
5145
- const explicitStrategy = _chunkEFI6QWBQcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5146
- const inference = islandsMode && explicitStrategy === null ? _chunkJHRJ5V2Fcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5155
+ const islandsMode = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
5156
+ const explicitStrategy = _chunkOYM6VJEFcjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5157
+ const inference = islandsMode && explicitStrategy === null ? _chunkH6C45DCFcjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5147
5158
  if (inference) {
5148
5159
  for (const file of inference.files) {
5149
5160
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5166,6 +5177,24 @@ export { manifest };
5166
5177
  );
5167
5178
  }
5168
5179
  transformedCode = transformedBoundary;
5180
+ } else if (selectedForIsolatedHydration && _chunkMAPHNGTFcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkOYM6VJEFcjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkOYM6VJEFcjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5181
+ rendererIslandModule = true;
5182
+ if (_optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) === true) {
5183
+ const renderer = _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5184
+ const transformedBoundary = transformIsolatedClientBoundaryModule({
5185
+ code: transformedCode,
5186
+ moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
5187
+ islandStrategy: _nullishCoalesce(_chunkOYM6VJEFcjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5188
+ parse: (source) => this.parse(source),
5189
+ withIsland: renderer.server
5190
+ });
5191
+ if (!transformedBoundary) {
5192
+ this.error(
5193
+ `[Farm.js] Could not compile the island module ${cleanId} for renderer \`${renderer.name}\`. Set experimental.isolatedClientHydration = "off" to hydrate its routes whole.`
5194
+ );
5195
+ }
5196
+ transformedCode = transformedBoundary;
5197
+ }
5169
5198
  }
5170
5199
  if (!farmApp) {
5171
5200
  return {
@@ -5188,7 +5217,7 @@ export { manifest };
5188
5217
  );
5189
5218
  return;
5190
5219
  }` : "";
5191
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5220
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _459 => _459.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5192
5221
  if (import.meta.hot) {
5193
5222
  import.meta.hot.accept((newModule) => {
5194
5223
  ${isolatedHmrUpdate}
@@ -5244,14 +5273,14 @@ if (import.meta.hot) {
5244
5273
  }
5245
5274
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5246
5275
  _chunk7U4XF76Rcjs.logger.info("Pre-rendering SSG pages...");
5247
- const outDir = path6.join(_optionalChain([server, 'optionalAccess', _459 => _459.config, 'access', _460 => _460.root]) || process.cwd(), options.outDir || "dist");
5276
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _460 => _460.config, 'access', _461 => _461.root]) || process.cwd(), options.outDir || "dist");
5248
5277
  const clientDir = path6.join(outDir, "client");
5249
5278
  for (const page of ssgPages) {
5250
5279
  try {
5251
5280
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5252
5281
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5253
5282
  const mod = await routeManager.loadRouteModule(page.filePath);
5254
- if (!_optionalChain([mod, 'optionalAccess', _461 => _461.default])) return;
5283
+ if (!_optionalChain([mod, 'optionalAccess', _462 => _462.default])) return;
5255
5284
  const { layouts } = routeManager.matchRoute(page.urlPath);
5256
5285
  const layoutModules = await Promise.all(
5257
5286
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5283,7 +5312,7 @@ if (import.meta.hot) {
5283
5312
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5284
5313
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5285
5314
  const fullHtml = `<!DOCTYPE html>
5286
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _462 => _462.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5315
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _463 => _463.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5287
5316
  <head>
5288
5317
  <meta charset="utf-8">
5289
5318
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5328,12 +5357,12 @@ if (import.meta.hot) {
5328
5357
  watchChange(id, change) {
5329
5358
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5330
5359
  if (!watched.includes("/node_modules/") && !isFarmGeneratedOutput(watched)) {
5331
- _optionalChain([farmApp, 'optionalAccess', _463 => _463.getRouteManager, 'call', _464 => _464(), 'access', _465 => _465.noteSourceChange, 'call', _466 => _466(id, change.event)]);
5360
+ _optionalChain([farmApp, 'optionalAccess', _464 => _464.getRouteManager, 'call', _465 => _465(), 'access', _466 => _466.noteSourceChange, 'call', _467 => _467(id, change.event)]);
5332
5361
  }
5333
- _chunkEFI6QWBQcjs.invalidateFarmClientReachableModules.call(void 0, );
5334
- _chunkEFI6QWBQcjs.invalidateFarmClientOnlyScan.call(void 0, );
5335
- _chunkJHRJ5V2Fcjs.invalidateFarmRouteRootInferences.call(void 0, );
5336
- _chunkEFI6QWBQcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5362
+ _chunkOYM6VJEFcjs.invalidateFarmClientReachableModules.call(void 0, );
5363
+ _chunkOYM6VJEFcjs.invalidateFarmClientOnlyScan.call(void 0, );
5364
+ _chunkH6C45DCFcjs.invalidateFarmRouteRootInferences.call(void 0, );
5365
+ _chunkOYM6VJEFcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5337
5366
  },
5338
5367
  async handleHotUpdate(ctx) {
5339
5368
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5358,7 +5387,7 @@ if (import.meta.hot) {
5358
5387
  server2.moduleGraph.invalidateModule(mod);
5359
5388
  }
5360
5389
  }
5361
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _467 => _467.getConfig, 'call', _468 => _468()]);
5390
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _468 => _468.getConfig, 'call', _469 => _469()]);
5362
5391
  const normalizedFile = file.replace(/\\/g, "/");
5363
5392
  const reloadAfterEdit = () => {
5364
5393
  for (const files of pendingRouteReloads) {
@@ -5366,10 +5395,10 @@ if (import.meta.hot) {
5366
5395
  }
5367
5396
  server2.ws.send({ type: "full-reload", path: "*" });
5368
5397
  };
5369
- if (normalizedFile.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5398
+ if (normalizedFile.includes(_chunkOYM6VJEFcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5370
5399
  path6.posix.join(
5371
- _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _469 => _469.root]) || options.root || server2.config.root),
5372
- _chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5400
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _470 => _470.root]) || options.root || server2.config.root),
5401
+ _chunkOYM6VJEFcjs.FARM_CLIENT_REFERENCE_DIRECTORY
5373
5402
  )
5374
5403
  ))
5375
5404
  return modules;
@@ -5377,7 +5406,7 @@ if (import.meta.hot) {
5377
5406
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5378
5407
  )) {
5379
5408
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5380
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5409
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5381
5410
  reloadAfterEdit();
5382
5411
  return [];
5383
5412
  }
@@ -5387,7 +5416,7 @@ if (import.meta.hot) {
5387
5416
  for (const mod of modules) {
5388
5417
  server2.moduleGraph.invalidateModule(mod);
5389
5418
  }
5390
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5419
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5391
5420
  reloadAfterEdit();
5392
5421
  return [];
5393
5422
  }
@@ -5397,22 +5426,22 @@ if (import.meta.hot) {
5397
5426
  for (const mod of modules) {
5398
5427
  server2.moduleGraph.invalidateModule(mod);
5399
5428
  }
5400
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5429
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5401
5430
  reloadAfterEdit();
5402
5431
  return [];
5403
5432
  }
5404
5433
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5405
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5434
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _474 => _474(`updated ${file}`)]);
5406
5435
  }
5407
- const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _474 => _474.experimental, 'optionalAccess', _475 => _475.isolatedClientHydration]);
5408
- const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _476 => _476.getRouteManager, 'call', _477 => _477()]);
5436
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
5437
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
5409
5438
  const isHydrationPlanSource = /\.[cm]?[jt]sx?$/.test(normalizedFile) && !normalizedFile.includes("/node_modules/") && !isFarmGeneratedOutput(normalizedFile);
5410
- const tracksAsyncOwnerIslands = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _478 => _478.renderer])) && planRouteManager !== void 0;
5439
+ const tracksAsyncOwnerIslands = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
5411
5440
  let clientPlanCurrent = false;
5412
5441
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5413
5442
  const routeManager = planRouteManager;
5414
- await _optionalChain([ctx, 'access', _479 => _479.read, 'optionalCall', _480 => _480()]);
5415
- if (_optionalChain([routeManager, 'optionalAccess', _481 => _481.isEditPlanNeutral, 'call', _482 => _482(file)])) {
5443
+ await _optionalChain([ctx, 'access', _480 => _480.read, 'optionalCall', _481 => _481()]);
5444
+ if (_optionalChain([routeManager, 'optionalAccess', _482 => _482.isEditPlanNeutral, 'call', _483 => _483(file)])) {
5416
5445
  clientPlanCurrent = true;
5417
5446
  } else if (routeManager) {
5418
5447
  routeManager.noteSourceChange(file, "update");
@@ -5456,7 +5485,7 @@ if (import.meta.hot) {
5456
5485
  }
5457
5486
  }
5458
5487
  }
5459
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _483 => _483.getRouteManager, 'call', _484 => _484(), 'access', _485 => _485.isRendererRouteModule, 'call', _486 => _486(normalizedFile)]) === true;
5488
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _484 => _484.getRouteManager, 'call', _485 => _485(), 'access', _486 => _486.isRendererRouteModule, 'call', _487 => _487(normalizedFile)]) === true;
5460
5489
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5461
5490
  if (normalizedFile.includes("middleware.")) {
5462
5491
  if (middlewareManager) {
@@ -5474,7 +5503,7 @@ if (import.meta.hot) {
5474
5503
  }
5475
5504
  return [];
5476
5505
  }
5477
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _487 => _487.getRouteManager, 'call', _488 => _488(), 'access', _489 => _489.invalidateClientManifest, 'call', _490 => _490()]);
5506
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _488 => _488.getRouteManager, 'call', _489 => _489(), 'access', _490 => _490.invalidateClientManifest, 'call', _491 => _491()]);
5478
5507
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5479
5508
  if (manifestModule) {
5480
5509
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5489,7 +5518,7 @@ if (import.meta.hot) {
5489
5518
  return [];
5490
5519
  }
5491
5520
  }
5492
- if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _491 => _491.environments, 'access', _492 => _492.client, 'optionalAccess', _493 => _493.moduleGraph, 'access', _494 => _494.getModulesByFile, 'call', _495 => _495(normalizedFile), 'optionalAccess', _496 => _496.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5521
+ if (/\.[cm]?[jt]sx?$/.test(normalizedFile) && !_optionalChain([server2, 'access', _492 => _492.environments, 'access', _493 => _493.client, 'optionalAccess', _494 => _494.moduleGraph, 'access', _495 => _495.getModulesByFile, 'call', _496 => _496(normalizedFile), 'optionalAccess', _497 => _497.size]) && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, getFarmRenderedServerModules()).length > 0) {
5493
5522
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5494
5523
  reloadAfterEdit();
5495
5524
  return [];
@@ -5587,7 +5616,7 @@ function createPageDataMiddlewareResponse(res) {
5587
5616
  return (...args) => {
5588
5617
  if (captures(target.statusCode, target.getHeader("location"))) {
5589
5618
  const callback = args.find((arg) => typeof arg === "function");
5590
- _optionalChain([callback, 'optionalCall', _497 => _497()]);
5619
+ _optionalChain([callback, 'optionalCall', _498 => _498()]);
5591
5620
  return property === "write" ? true : response;
5592
5621
  }
5593
5622
  return target[property](...args);
@@ -5651,12 +5680,12 @@ function isFarmClientVirtualId(id) {
5651
5680
  }
5652
5681
  function isClientEnvironment(context, loadOptions) {
5653
5682
  const environment = context.environment;
5654
- if (_optionalChain([environment, 'optionalAccess', _498 => _498.config, 'optionalAccess', _499 => _499.consumer])) return environment.config.consumer === "client";
5655
- if (_optionalChain([environment, 'optionalAccess', _500 => _500.name])) return environment.name === "client";
5656
- return _optionalChain([loadOptions, 'optionalAccess', _501 => _501.ssr]) !== true;
5683
+ if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
5684
+ if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
5685
+ return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
5657
5686
  }
5658
5687
  function invalidateProgrammaticClientRouteModules(server) {
5659
- const graph = _optionalChain([server, 'access', _502 => _502.environments, 'optionalAccess', _503 => _503.client, 'optionalAccess', _504 => _504.moduleGraph]);
5688
+ const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5660
5689
  if (!graph) return;
5661
5690
  for (const [id, module] of graph.idToModuleMap) {
5662
5691
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5666,27 +5695,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5666
5695
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5667
5696
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5668
5697
  watchFile(routesFile);
5669
- return _chunkEFI6QWBQcjs.generateProgrammaticClientRouteModule.call(void 0, {
5698
+ return _chunkOYM6VJEFcjs.generateProgrammaticClientRouteModule.call(void 0, {
5670
5699
  kind: parsed.kind,
5671
5700
  routePath: parsed.routePath,
5672
5701
  routesFile,
5673
- route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _505 => _505.routes, 'access', _506 => _506.get, 'call', _507 => _507(
5674
- _chunkEFI6QWBQcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5702
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
5703
+ _chunkOYM6VJEFcjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5675
5704
  )]),
5676
5705
  // React's client module exports no createElement; the main client entry imports React too.
5677
- rendererClient: _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5706
+ rendererClient: _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5678
5707
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5679
5708
  });
5680
5709
  }
5681
5710
  function resolveRealModuleFile(filePath, root) {
5682
- const resolved = _nullishCoalesce(_chunkEFI6QWBQcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5711
+ const resolved = _nullishCoalesce(_chunkOYM6VJEFcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5683
5712
  try {
5684
5713
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5685
5714
  } catch (e29) {
5686
5715
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5687
5716
  }
5688
5717
  }
5689
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER) {
5718
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk3OKSEJ33cjs.REACT_RENDERER) {
5690
5719
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5691
5720
  if (!parsed) {
5692
5721
  return "";
@@ -5993,12 +6022,12 @@ async function parseRouteModuleProps(routeModule, input) {
5993
6022
  }
5994
6023
  const schemas = routeModule.__farmRouteSchemas;
5995
6024
  const params = parseRouteModuleSchema(
5996
- _optionalChain([schemas, 'optionalAccess', _508 => _508.params]),
6025
+ _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
5997
6026
  input.props.params,
5998
6027
  "params",
5999
6028
  input.routePath
6000
6029
  );
6001
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _509 => _509.search]), input.search, "search", input.routePath);
6030
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
6002
6031
  return {
6003
6032
  ...input.props,
6004
6033
  params,
@@ -6017,8 +6046,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6017
6046
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
6018
6047
  }
6019
6048
  }
6020
- function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6021
- const providerClientCode = _chunkJHRJ5V2Fcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6049
+ function generateClientCode(integrationProviders = [], documentNavigationMatchers = [], docsSearchClientRuntime = EMPTY_FARM_DOCS_SEARCH_CLIENT_RUNTIME, devtoolsClientRuntime = "", plugins = [], root = process.cwd(), srcDir = "src", publicRuntimeConfig = void 0, docsAdapterUI, renderer = _chunk3OKSEJ33cjs.REACT_RENDERER, isolatedHydrationEnabled = false, trailingSlash = false, basePath = "/", clientCachePersistence = { imports: "", init: "" }, docsConfigModule, islandValues = false) {
6050
+ const providerClientCode = _chunkH6C45DCFcjs.generateFarmIntegrationProviderClientCode.call(void 0,
6022
6051
  integrationProviders,
6023
6052
  root,
6024
6053
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -6029,8 +6058,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
6029
6058
  srcDir,
6030
6059
  publicRuntimeConfig
6031
6060
  );
6032
- const appSetupPath = _chunkNGTZHWBGcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6033
- const rendererClientImports = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6061
+ const appSetupPath = _chunk3OKSEJ33cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6062
+ const rendererClientImports = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6034
6063
  import { hydrateRoot, createRoot } from 'react-dom/client'
6035
6064
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
6036
6065
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6044,14 +6073,46 @@ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${J
6044
6073
  import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
6045
6074
  const React = { ...__farmRendererClient }`
6046
6075
  );
6047
- const isolatedHydrationImport = isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
6076
+ const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
6077
+ const isolatedHydrationImport = rendererIslands ? "import { createFarmRendererIslandRuntime } from '@farm.js/core/internal/renderer-islands'" : isolatedHydrationEnabled ? `${islandValues ? "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph, createFarmServerTreeElement, createFarmServerTreeLayout } from '@farm.js/core/internal/islands-runtime'" : "import { createFarmIsolatedHydrationRuntime, createFarmServerPageBoundary, wrapFarmIsolatedClientGraph } from '@farm.js/core/internal/isolated-boundary'\nimport { createFarmServerTreeElement } from '@farm.js/core/internal/server-tree'"}` : "";
6048
6078
  const docsAdapterImportBlock = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
6049
6079
  docsAdapterUI,
6050
6080
  docsConfigModule,
6051
6081
  // Config resolution keeps an adapter to its UI's renderer, so this is the UI's renderer too.
6052
- _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
6082
+ _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
6053
6083
  );
6054
- const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6084
+ const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
6085
+ renderer: React,
6086
+ load: (reference) => import(/* @vite-ignore */ farmModuleUrl(reference)),
6087
+ schedule: scheduleFarmIslandHydration,
6088
+ });
6089
+ window.__FARM_ISOLATED_HYDRATION_RUNTIME__ = farmIsolatedHydrationRuntime;
6090
+ // A hydrating layout keeps a page that doesn't hydrate as server HTML in a plain element. The
6091
+ // renderer's root never renders the page's islands, so the runtime starts them after each render.
6092
+ const FarmServerPage = 'div';
6093
+ // Island modules reach the browser as written, so a client tree has nothing to mark.
6094
+ function wrapFarmIsolatedClientGraph(_React, element) { return element; }
6095
+
6096
+ function disposeFarmIsolatedClientBoundaries(scope) {
6097
+ farmIsolatedHydrationRuntime.dispose(scope);
6098
+ }
6099
+
6100
+ async function hydrateFarmIsolatedClientBoundaries(scope = document, signal) {
6101
+ await farmIsolatedHydrationRuntime.hydrate(scope, signal);
6102
+ }
6103
+
6104
+ // After a hydrating layout renders another page: release the islands whose markup it replaced,
6105
+ // and start the new page's.
6106
+ async function hydrateFarmLayoutPageIslands(container) {
6107
+ farmIsolatedHydrationRuntime.prune();
6108
+ await hydrateFarmIsolatedClientBoundaries(container);
6109
+ }
6110
+
6111
+ async function createFarmServerTreePageElement() { return null; }
6112
+ async function buildFarmTreeLayouts() { return true; }
6113
+ function getFarmTreeLayoutComponent() { return null; }
6114
+ let farmLastRouteState = null;
6115
+ function rerenderFarmTreeLayouts() {}` : isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6055
6116
  ReactRuntime: React,
6056
6117
  hydrateRoot,
6057
6118
  load: (reference) => import(/* @vite-ignore */ farmModuleUrl(reference)),
@@ -6084,7 +6145,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6084
6145
  return null;
6085
6146
  }
6086
6147
  }
6087
- ${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6148
+ ${islandValues ? `${_chunkH6C45DCFcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6088
6149
  let farmLastRouteState = null;
6089
6150
 
6090
6151
  // A hot update to a layout tree's client module renders the route again.
@@ -6925,7 +6986,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6925
6986
  return loadedLayouts;
6926
6987
  }
6927
6988
 
6928
- ${_chunkJHRJ5V2Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6989
+ ${_chunkH6C45DCFcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6929
6990
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6930
6991
  let wrapped = element;
6931
6992
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7004,7 +7065,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
7004
7065
 
7005
7066
  function hydrateFarmRoute(container, route) {
7006
7067
  farmLastRouteState = route;
7007
- ${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7068
+ ${_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "return hydrateRoot(container, route.element);" : "return route.layouts.length > 0 ? hydrateRoot(container, route.element, route) : hydrateRoot(container, route.element);"}
7008
7069
  }
7009
7070
 
7010
7071
  function renderFarmRoute(root, route) {
@@ -7148,7 +7209,7 @@ async function tryHydrateImportedPage(
7148
7209
  wrap: wrapFarmClientRouteGraph,
7149
7210
  };
7150
7211
  } else if (useHydrate && container?.id === '__farm_page__') {
7151
- wrappedElement = wrapFarmClientRouteGraph(${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7212
+ wrappedElement = wrapFarmClientRouteGraph(${_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7152
7213
  } else {
7153
7214
  wrappedElement = await buildWrappedHydrationElement(
7154
7215
  currentPageComponent,
@@ -7225,7 +7286,7 @@ function readActiveLayoutPatterns() {
7225
7286
  );
7226
7287
  }
7227
7288
 
7228
- ${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7289
+ ${_chunkH6C45DCFcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7229
7290
 
7230
7291
  function activateFragmentScripts(root) {
7231
7292
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7284,7 +7345,7 @@ function getLayoutShell(root, patterns, index, find) {
7284
7345
  return shell.innerHTML;
7285
7346
  }
7286
7347
 
7287
- ${islandValues ? _chunkJHRJ5V2Fcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7348
+ ${islandValues ? _chunkH6C45DCFcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7288
7349
  container,
7289
7350
  fragment,
7290
7351
  currentPatterns,
@@ -7359,9 +7420,9 @@ ${islandValues ? `
7359
7420
  return nextTarget;
7360
7421
  }
7361
7422
 
7362
- ${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7423
+ ${islandValues ? `${_chunkH6C45DCFcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7363
7424
 
7364
- ${_chunkJHRJ5V2Fcjs.FARM_EARLY_NAVIGATION_SOURCE}
7425
+ ${_chunkH6C45DCFcjs.FARM_EARLY_NAVIGATION_SOURCE}
7365
7426
 
7366
7427
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7367
7428
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7680,6 +7741,7 @@ async function renderPage(pageData, info) {
7680
7741
  loadingModulePath: route.loadingModulePath,
7681
7742
  },
7682
7743
  );
7744
+ ${rendererIslands ? "await hydrateFarmLayoutPageIslands(container);" : ""}
7683
7745
  } else {
7684
7746
  ${isolatedHydrationEnabled ? "let isolatedHydrationScope = container;" : ""}
7685
7747
  ${islandValues ? "const keepValues = keepFarmIslandValues(container);" : ""}
@@ -7702,7 +7764,7 @@ async function renderPage(pageData, info) {
7702
7764
 
7703
7765
  const hydrationController = new AbortController();
7704
7766
  if (
7705
- shouldHydrate${isolatedHydrationEnabled ? " || (hasIsolatedClientBoundaries && !layoutShouldHydrate)" : ""}
7767
+ shouldHydrate${rendererIslands ? " || hasIsolatedClientBoundaries" : isolatedHydrationEnabled ? " || (hasIsolatedClientBoundaries && !layoutShouldHydrate)" : ""}
7706
7768
  ) {
7707
7769
  pendingPageHydrationController = hydrationController;
7708
7770
  }
@@ -7740,7 +7802,7 @@ async function renderPage(pageData, info) {
7740
7802
  });
7741
7803
  }
7742
7804
  }
7743
- ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !layoutShouldHydrate) {
7805
+ ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries${rendererIslands ? "" : " && !layoutShouldHydrate"}) {
7744
7806
  await hydrateFarmIsolatedClientBoundaries(
7745
7807
  isolatedHydrationScope,
7746
7808
  hydrationController.signal,
@@ -7959,8 +8021,7 @@ function farmIslandsOnlyDocument() {
7959
8021
  },
7960
8022
  });
7961
8023
  ${isolatedHydrationEnabled ? `const isolatedHydration =
7962
- hasIsolatedClientBoundaries &&
7963
- !layoutShouldHydrate
8024
+ hasIsolatedClientBoundaries${rendererIslands ? "" : " &&\n !layoutShouldHydrate"}
7964
8025
  ? hydrateFarmIsolatedClientBoundaries(rootContainer, hydrationController.signal)
7965
8026
  : Promise.resolve();
7966
8027
  await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
@@ -8068,7 +8129,7 @@ function generateClientManifest(bundle) {
8068
8129
  async function defineConfig(config = {}) {
8069
8130
  const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8070
8131
  const appRoot = path6.resolve(config.root || process.cwd());
8071
- if (_optionalChain([config, 'access', _510 => _510.extends, 'optionalAccess', _511 => _511.length])) {
8132
+ if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8072
8133
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8073
8134
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8074
8135
  root: appRoot,
@@ -8077,12 +8138,12 @@ async function defineConfig(config = {}) {
8077
8138
  );
8078
8139
  config = layeredConfig;
8079
8140
  }
8080
- config.renderer = _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, config.renderer);
8081
- config.images = _chunkJHRJ5V2Fcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8082
- const rendererVitePlugins = await _chunkNGTZHWBGcjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8141
+ config.renderer = _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, config.renderer);
8142
+ config.images = _chunkH6C45DCFcjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8143
+ const rendererVitePlugins = await _chunk3OKSEJ33cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8083
8144
  ssr: true
8084
8145
  });
8085
- const reactRefreshPlugins = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8146
+ const reactRefreshPlugins = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8086
8147
  const nodeBuiltinStubs = {
8087
8148
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8088
8149
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8170,13 +8231,13 @@ async function defineConfig(config = {}) {
8170
8231
  if (!serverStarted) {
8171
8232
  serverStarted = true;
8172
8233
  const elapsed = Date.now() - startTime;
8173
- const address = _optionalChain([server, 'access', _512 => _512.httpServer, 'optionalAccess', _513 => _513.address, 'call', _514 => _514()]);
8234
+ const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8174
8235
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8175
8236
  const hostConfig = server.config.server.host;
8176
8237
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8177
8238
  console.log("");
8178
8239
  console.log(
8179
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk3CZ4MJHWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8240
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk3HWNYLQVcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8180
8241
  );
8181
8242
  console.log("");
8182
8243
  console.log(
@@ -8210,7 +8271,7 @@ async function defineConfig(config = {}) {
8210
8271
  plugins: [
8211
8272
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8212
8273
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8213
- _chunkJHRJ5V2Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8274
+ _chunkH6C45DCFcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8214
8275
  tailwindVitePlugin,
8215
8276
  ...rendererVitePlugins,
8216
8277
  ...reactRefreshPlugins,
@@ -8220,14 +8281,14 @@ async function defineConfig(config = {}) {
8220
8281
  farmNavigationPlugin(config.renderer),
8221
8282
  farmIslandContainersPlugin(config),
8222
8283
  farmPlugin(config),
8223
- _chunkEFI6QWBQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8284
+ _chunkOYM6VJEFcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8224
8285
  farmBrandingPlugin
8225
8286
  ],
8226
8287
  customLogger: farmLogger,
8227
8288
  clearScreen: false,
8228
8289
  optimizeDeps: {
8229
- ..._chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8230
- _chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8290
+ ..._chunkH6C45DCFcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8291
+ _chunkH6C45DCFcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8231
8292
  appRoot,
8232
8293
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8233
8294
  ),
@@ -8271,7 +8332,7 @@ async function defineConfig(config = {}) {
8271
8332
  // Stub out problematic server-only modules during dev mode
8272
8333
  alias: {
8273
8334
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8274
- ..._chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8335
+ ..._chunkH6C45DCFcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8275
8336
  // Nitro internals that should not be resolved in browser
8276
8337
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8277
8338
  "@poppinss/dumper": "data:text/javascript,export default {};",