@farm.js/core 0.1.83 → 0.1.84

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 (95) hide show
  1. package/dist/{analyzer-Y6IY26HI.mjs → analyzer-7RNO3XKC.mjs} +2 -2
  2. package/dist/analyzer-PFKA5NI6.cjs +17 -0
  3. package/dist/{chunk-WCSBYQOT.cjs → chunk-22BTYPIX.cjs} +4 -4
  4. package/dist/{chunk-NGTZHWBG.cjs → chunk-3OKSEJ33.cjs} +31 -10
  5. package/dist/{chunk-VQ6IXALL.mjs → chunk-3WM7VBGW.mjs} +2 -2
  6. package/dist/{chunk-IABI62FH.cjs → chunk-57EEWWUS.cjs} +2 -2
  7. package/dist/{chunk-7X2CYE66.cjs → chunk-5I4ZGKP2.cjs} +255 -199
  8. package/dist/{chunk-RGTZAM6Y.mjs → chunk-BCCCPFHQ.mjs} +25 -4
  9. package/dist/{chunk-55UJGUBP.cjs → chunk-BOEDYXAX.cjs} +13 -13
  10. package/dist/{chunk-DPUZVGXH.mjs → chunk-BRDGINBB.mjs} +31 -28
  11. package/dist/{chunk-FFWSER54.mjs → chunk-BZY3SRRD.mjs} +1 -1
  12. package/dist/{chunk-3CZ4MJHW.cjs → chunk-CVZY4TLW.cjs} +1 -1
  13. package/dist/{chunk-IAIRQAHA.mjs → chunk-CWUQBECF.mjs} +1 -1
  14. package/dist/{chunk-WZV2G2A6.mjs → chunk-DFDQGHPU.mjs} +83 -27
  15. package/dist/{chunk-SLIXHUMS.cjs → chunk-DSWSDDP2.cjs} +230 -201
  16. package/dist/{chunk-EFI6QWBQ.cjs → chunk-EBSL5TW7.cjs} +15 -15
  17. package/dist/{chunk-U56Z3755.mjs → chunk-EDBIBO67.mjs} +9 -9
  18. package/dist/{chunk-BBVLOEND.cjs → chunk-F7JVO3OZ.cjs} +4 -4
  19. package/dist/{chunk-5X5GJU5A.cjs → chunk-GLNVLCUH.cjs} +6 -6
  20. package/dist/{chunk-DZTWUEBB.cjs → chunk-HOQ2MYBJ.cjs} +10 -10
  21. package/dist/{chunk-NKVBWPXR.mjs → chunk-I5CVJ24H.mjs} +1 -1
  22. package/dist/{chunk-R3VLM2MW.mjs → chunk-INU4K4U4.mjs} +5 -5
  23. package/dist/{chunk-43N3X6OO.mjs → chunk-IRJSZAJB.mjs} +1 -1
  24. package/dist/{chunk-NDWI6FDH.mjs → chunk-KXVMWLTC.mjs} +59 -30
  25. package/dist/{chunk-HRH7OKBQ.cjs → chunk-L3BSHASB.cjs} +4 -4
  26. package/dist/{chunk-ELNRKD4V.mjs → chunk-L5HDCDFT.mjs} +1 -1
  27. package/dist/{chunk-RNJX3MD6.mjs → chunk-M5XU22PQ.mjs} +1 -1
  28. package/dist/chunk-MAPHNGTF.cjs +98 -0
  29. package/dist/{chunk-RE5E2G5S.cjs → chunk-MNUYXZV7.cjs} +2 -18
  30. package/dist/{chunk-ORBBAA7B.mjs → chunk-MUUDHWQZ.mjs} +1 -1
  31. package/dist/{chunk-YSU3WCW6.mjs → chunk-MYSH5Y4E.mjs} +1 -1
  32. package/dist/{chunk-K3GHY7GY.mjs → chunk-NLHSKKTT.mjs} +1 -1
  33. package/dist/{chunk-JHRJ5V2F.cjs → chunk-OFVBMS6I.cjs} +165 -162
  34. package/dist/{chunk-3DAJXBSL.cjs → chunk-OP7BIEUW.cjs} +2 -2
  35. package/dist/chunk-RJBUI5AN.mjs +18 -0
  36. package/dist/chunk-RQ6XX5IN.mjs +98 -0
  37. package/dist/{chunk-LN6FAYNB.cjs → chunk-USMRAC72.cjs} +2 -2
  38. package/dist/{chunk-B5SJYXJK.mjs → chunk-XLULEFRW.mjs} +6 -6
  39. package/dist/{chunk-A5BHJHDF.cjs → chunk-YU6VL7H5.cjs} +3 -3
  40. package/dist/{chunk-OM6JIIJU.cjs → chunk-Z37PDUJR.cjs} +4 -4
  41. package/dist/{devtools-ZM2AR36W.cjs → devtools-4SVIRV4P.cjs} +6 -6
  42. package/dist/{devtools-OI52TCSD.mjs → devtools-MWQA5LVN.mjs} +4 -4
  43. package/dist/docs.cjs +6 -6
  44. package/dist/docs.mjs +5 -5
  45. package/dist/environment/vite.cjs +5 -5
  46. package/dist/environment/vite.mjs +4 -4
  47. package/dist/index.cjs +25 -24
  48. package/dist/index.mjs +24 -23
  49. package/dist/internal/build-runtime.cjs +26 -25
  50. package/dist/internal/build-runtime.mjs +25 -24
  51. package/dist/internal/cli-runtime.cjs +8 -8
  52. package/dist/internal/cli-runtime.mjs +7 -7
  53. package/dist/internal/client-error-overlay.cjs +4 -4
  54. package/dist/internal/client-error-overlay.mjs +1 -1
  55. package/dist/internal/client-runtime.d.mts +3 -37
  56. package/dist/internal/client-runtime.d.ts +3 -37
  57. package/dist/internal/config-runtime.cjs +6 -6
  58. package/dist/internal/config-runtime.mjs +5 -5
  59. package/dist/internal/infra-analytics-runtime.cjs +6 -6
  60. package/dist/internal/infra-analytics-runtime.mjs +4 -4
  61. package/dist/internal/native-server-fns.cjs +4 -4
  62. package/dist/internal/native-server-fns.mjs +3 -3
  63. package/dist/internal/product-telemetry-runtime.cjs +3 -3
  64. package/dist/internal/product-telemetry-runtime.mjs +2 -2
  65. package/dist/internal/production-runtime.cjs +13 -13
  66. package/dist/internal/production-runtime.mjs +19 -19
  67. package/dist/internal/renderer-islands.cjs +47 -0
  68. package/dist/internal/renderer-islands.d.mts +32 -0
  69. package/dist/internal/renderer-islands.d.ts +32 -0
  70. package/dist/internal/renderer-islands.mjs +47 -0
  71. package/dist/island-runtime.d-BA7EPo1v.d.ts +38 -0
  72. package/dist/island-runtime.d-BBS_YUSX.d.mts +38 -0
  73. package/dist/plugin.cjs +20 -19
  74. package/dist/plugin.mjs +19 -18
  75. package/dist/renderer.cjs +8 -2
  76. package/dist/renderer.d.mts +81 -1
  77. package/dist/renderer.d.ts +81 -1
  78. package/dist/renderer.mjs +7 -1
  79. package/dist/{rsc-pipeline-MFJZGDPE.cjs → rsc-pipeline-OWBEZ7HB.cjs} +9 -9
  80. package/dist/{rsc-pipeline-TRZVFCBX.mjs → rsc-pipeline-UT3Z2GDO.mjs} +8 -8
  81. package/dist/{runtime-O4Y3Z6V3.mjs → runtime-F5I3WY3B.mjs} +10 -11
  82. package/dist/{runtime-MJUG2HGR.cjs → runtime-SRMQ46SK.cjs} +13 -14
  83. package/dist/server.cjs +50 -50
  84. package/dist/server.mjs +28 -28
  85. package/dist/version.cjs +2 -2
  86. package/dist/version.mjs +1 -1
  87. package/dist/vite.cjs +20 -19
  88. package/dist/vite.d.mts +6 -0
  89. package/dist/vite.d.ts +6 -0
  90. package/dist/vite.mjs +19 -18
  91. package/package.json +8 -3
  92. package/dist/analyzer-WGH6J2HN.cjs +0 -17
  93. package/dist/chunk-4QENVMG7.mjs +0 -34
  94. package/dist/{chunk-NEKO3HM2.cjs → chunk-4B6YJ5DS.cjs} +2 -2
  95. 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 _chunkOFVBMS6Icjs = require('./chunk-OFVBMS6I.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 _chunkZ37PDUJRcjs = require('./chunk-Z37PDUJR.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 _chunk22BTYPIXcjs = require('./chunk-22BTYPIX.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 _chunk57EEWWUScjs = require('./chunk-57EEWWUS.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 _chunkEBSL5TW7cjs = require('./chunk-EBSL5TW7.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 _chunkCVZY4TLWcjs = require('./chunk-CVZY4TLW.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 _chunkEBSL5TW7cjs.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 _chunkEBSL5TW7cjs.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 _chunkEBSL5TW7cjs.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 _chunkEBSL5TW7cjs.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-4SVIRV4P.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
+ _chunkOFVBMS6Icjs.exactIdPattern.call(void 0, [FARM_PLATFORM_ENTRY, SERVER_ONLY_PACKAGE, ...FARM_SERVER_ONLY_ENTRIES]),
1343
+ new RegExp(`^${_chunkEBSL5TW7cjs.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
+ _chunkOFVBMS6Icjs.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
+ _chunkOFVBMS6Icjs.exactIdPattern.call(void 0, [FARM_SERVER_ONLY_PACKAGE_ID, FARM_PLATFORM_CLIENT_ID]),
1351
+ new RegExp(`^${_chunkEBSL5TW7cjs.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 (_chunkEBSL5TW7cjs.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 = _chunkEBSL5TW7cjs.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 = _chunkEBSL5TW7cjs.wrapFarmIslandContainers.call(void 0, {
1391
1392
  code,
1392
1393
  file,
1393
1394
  bindings,
1394
- reference: _chunkEFI6QWBQcjs.farmIslandContainerReferencePath.call(void 0, root)
1395
+ reference: _chunkEBSL5TW7cjs.farmIslandContainerReferencePath.call(void 0, root)
1395
1396
  });
1396
1397
  if (grown === null) return null;
1397
- _chunkEFI6QWBQcjs.ensureFarmIslandContainerReference.call(void 0, root);
1398
+ _chunkEBSL5TW7cjs.ensureFarmIslandContainerReference.call(void 0, root);
1398
1399
  return { code: grown, map: null };
1399
1400
  }
1400
1401
  };
@@ -1408,15 +1409,15 @@ 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
+ _chunkEBSL5TW7cjs.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 = _chunkEBSL5TW7cjs.collectFarmServerBundledPackageInfo.call(void 0, appRoot);
1416
1417
  const prebundle = options.prebundleServerPackages ? createFarmServerPrebundleConfig(bundledPackages) : {};
1417
- _chunkEFI6QWBQcjs.persistPackageScanCache.call(void 0, );
1418
+ _chunkEBSL5TW7cjs.persistPackageScanCache.call(void 0, );
1418
1419
  return {
1419
- optimizeDeps: { rolldownOptions: { plugins: [_chunkEFI6QWBQcjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1420
+ optimizeDeps: { rolldownOptions: { plugins: [_chunkEBSL5TW7cjs.farmBrowserBuiltinsOptimizerPlugin.call(void 0, )] } },
1420
1421
  ssr: {
1421
1422
  noExternal: [
1422
1423
  // Resolve `server-only` here rather than in Node, which would load its throwing build.
@@ -1440,8 +1441,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1440
1441
  return FARM_SERVER_ONLY_PACKAGE_ID;
1441
1442
  }
1442
1443
  this.error(
1443
- _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
1444
- _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
1444
+ _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
1445
+ _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
1445
1446
  "CLIENT_SERVER_ONLY_IMPORT",
1446
1447
  _nullishCoalesce(importer, () => ( "<unknown module>")),
1447
1448
  `${importer ? "This module" : "A module"} imports "server-only", so it must not reach the browser, but client code imports it.`
@@ -1451,9 +1452,9 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1451
1452
  );
1452
1453
  }
1453
1454
  if (!_optionalChain([options2, 'optionalAccess', _75 => _75.ssr]) && _module.isBuiltin.call(void 0, id)) {
1454
- return _chunkEFI6QWBQcjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1455
+ return _chunkEBSL5TW7cjs.resolveFarmBrowserBuiltin.call(void 0, this, id, importer, options2);
1455
1456
  }
1456
- const resolveFrom = importer ? _chunkEFI6QWBQcjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1457
+ const resolveFrom = importer ? _chunkEBSL5TW7cjs.parseFarmResolveFrom.call(void 0, id, importer.split("?", 1)[0]) : null;
1457
1458
  if (resolveFrom) {
1458
1459
  const directory = path6.dirname(resolveFrom.importer);
1459
1460
  return this.resolve(resolveFrom.specifier, resolveFrom.importer, {
@@ -1470,8 +1471,8 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1470
1471
  const importedBy = importer ? ` (imported by ${importer})` : "";
1471
1472
  if (!_optionalChain([options2, 'optionalAccess', _76 => _76.ssr])) {
1472
1473
  this.error(
1473
- _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
1474
- _chunkEFI6QWBQcjs.createFarmDiagnostic.call(void 0,
1474
+ _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
1475
+ _chunkEBSL5TW7cjs.createFarmDiagnostic.call(void 0,
1475
1476
  "CLIENT_SERVER_ONLY_ENTRY",
1476
1477
  _nullishCoalesce(importer, () => ( id)),
1477
1478
  `${id} is server-only and cannot be imported into client code.`
@@ -1496,7 +1497,7 @@ function farmServerOnlyEntriesPlugin(options = {}) {
1496
1497
  if (id === FARM_PLATFORM_CLIENT_ID) {
1497
1498
  return createFarmPlatformClientModule(_nullishCoalesce(options.platform, () => ( _chunkAQLHD6HZcjs.resolveFarmPlatform.call(void 0, ))));
1498
1499
  }
1499
- return _nullishCoalesce(_chunkEFI6QWBQcjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1500
+ return _nullishCoalesce(_chunkEBSL5TW7cjs.loadFarmBrowserBuiltin.call(void 0, id), () => ( null));
1500
1501
  }
1501
1502
  }
1502
1503
  };
@@ -1529,7 +1530,7 @@ function renderFarmI18nStaticHead(requestPath, snapshot) {
1529
1530
  if (!snapshot) return "";
1530
1531
  const runtime = `<script>window.__FARM_I18N__ = ${serializeFarmInlineValue(snapshot)};</script>`;
1531
1532
  if (snapshot.routing === "none") return runtime;
1532
- return `${_chunkNEKO3HM2cjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1533
+ return `${_chunk4B6YJ5DScjs.renderFarmLocaleAlternateLinks.call(void 0, requestPath, snapshot)}${runtime}`;
1533
1534
  }
1534
1535
  function getPublicEnvDefine(config) {
1535
1536
  const publicEnv = _optionalChain([config, 'access', _77 => _77.env, 'optionalAccess', _78 => _78.public]);
@@ -1977,7 +1978,7 @@ function getEnvDefines(config, configEnv) {
1977
1978
  _chunkMCSRMEQVcjs.getPublicFarmImageConfig.call(void 0,
1978
1979
  _chunkMCSRMEQVcjs.resolveFarmImageConfig.call(void 0,
1979
1980
  config.images,
1980
- _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1981
+ _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, config.renderer) ? "none" : void 0
1981
1982
  )
1982
1983
  )
1983
1984
  )
@@ -2110,7 +2111,7 @@ function transformIsolatedClientBoundaryModule(options) {
2110
2111
  return null;
2111
2112
  }
2112
2113
  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);
2114
+ const everyExportIsComponent = options.code.includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_PRAGMA) || options.moduleReference.includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY);
2114
2115
  const replacements = [];
2115
2116
  const wrapperStatements = [];
2116
2117
  const originalEntries = [];
@@ -2120,7 +2121,7 @@ function transformIsolatedClientBoundaryModule(options) {
2120
2121
  const wrapperName = `__farm_isolated_boundary_${safeName || "default"}__`;
2121
2122
  wrapperStatements.push(
2122
2123
  // 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)});`
2124
+ 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
2125
  );
2125
2126
  wrapperStatements.push(
2126
2127
  isDefault ? `export default ${wrapperName};` : `export { ${wrapperName} as ${exportName} };`
@@ -2208,7 +2209,11 @@ function transformIsolatedClientBoundaryModule(options) {
2208
2209
  output = output.slice(0, replacement.start) + replacement.code + output.slice(replacement.end);
2209
2210
  }
2210
2211
  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};
2212
+ const runtimeImport = options.withIsland ? (
2213
+ // The renderer's withIsland returns a value that isn't one of its components unchanged.
2214
+ `import { withIsland as __farm_renderer_with_island__ } from ${JSON.stringify(options.withIsland)};
2215
+ const __farm_with_island__ = (component, reference) => component !== null && (typeof component === "function" || typeof component === "object") ? __farm_renderer_with_island__(component, reference) : component;`
2216
+ ) : options.slots ? options.browser ? "const __farm_islx_island__ = (component) => component;" : `import { createIsland as __farm_islx_create_island__ } from ${islxReact};
2212
2217
  const __farm_is_component__ = ${isComponent};
2213
2218
  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
2219
  import { createFarmIsolatedClientBoundary as __farm_create_boundary__ } from ${isolatedBoundary};
@@ -2261,16 +2266,16 @@ async function warnClientBoundaryOnce(context, id, code, config) {
2261
2266
  for (const finding of analyzeClientBoundary(program, publicKeys)) {
2262
2267
  if (finding.kind === "builtin" && !finding.name.startsWith("node:")) {
2263
2268
  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;
2269
+ if (!_optionalChain([resolved, 'optionalAccess', _103 => _103.id, 'access', _104 => _104.startsWith, 'call', _105 => _105(_chunkEBSL5TW7cjs.FARM_BROWSER_BUILTIN_PREFIX)])) continue;
2265
2270
  }
2266
2271
  findings.push(finding);
2267
2272
  }
2268
2273
  if (findings.length === 0) return;
2269
2274
  warnedClientBoundaryIds.add(id);
2270
- const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2275
+ const locate = _chunkEBSL5TW7cjs.createFarmSourceLocator.call(void 0, code, () => context.getCombinedSourcemap());
2271
2276
  _chunk7U4XF76Rcjs.logger.warn(
2272
2277
  findings.map(
2273
- (finding) => _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
2278
+ (finding) => _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
2274
2279
  createClientBoundaryDiagnostic(id, finding, locate(finding.start)),
2275
2280
  config.root
2276
2281
  )
@@ -2287,7 +2292,7 @@ function isFarmAppRuntimeFile(file, appDirs, routeModuleExtensions) {
2287
2292
  );
2288
2293
  }
2289
2294
  function shouldEmitFarmClientRootHmr(renderer) {
2290
- return _chunkNGTZHWBGcjs.getFarmRendererCapabilities.call(void 0, _chunkNGTZHWBGcjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2295
+ return _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, renderer)).reconcilesRerenders;
2291
2296
  }
2292
2297
  var FARM_RUNTIME_MODULE_PREFIX = "/@farm/runtime/";
2293
2298
  function toFarmRuntimeModuleId(specifier) {
@@ -2318,9 +2323,9 @@ function hasFarmSourceAliasOverride(alias) {
2318
2323
  );
2319
2324
  }
2320
2325
  function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2321
- const rendererDisabled = _chunkNGTZHWBGcjs.isFarmRendererDisabled.call(void 0, options.renderer);
2326
+ const rendererDisabled = _chunk3OKSEJ33cjs.isFarmRendererDisabled.call(void 0, options.renderer);
2322
2327
  const imageImports = farmImageImportsPlugin();
2323
- const fontImports = _chunkJHRJ5V2Fcjs.farmFontImportsPlugin.call(void 0, {
2328
+ const fontImports = _chunkOFVBMS6Icjs.farmFontImportsPlugin.call(void 0, {
2324
2329
  root: options.root,
2325
2330
  basePath: options.basePath,
2326
2331
  publicDir: options.publicDir
@@ -2354,8 +2359,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2354
2359
  if (mdxComponents) files.add(mdxComponents);
2355
2360
  return files;
2356
2361
  };
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)));
2362
+ const islxActionsMode = () => _chunkOFVBMS6Icjs.resolveFarmIslxActionsMode.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _111 => _111.getConfig, 'call', _112 => _112()]), () => ( options)));
2363
+ const islandsServerFns = () => _chunkOFVBMS6Icjs.farmBrowserServerFnsEnabled.call(void 0, _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _113 => _113.getConfig, 'call', _114 => _114()]), () => ( options)));
2359
2364
  let reactRefreshActive = false;
2360
2365
  let server;
2361
2366
  let deferredGates;
@@ -2398,11 +2403,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2398
2403
  isBuild = configEnv.command === "build";
2399
2404
  const farmAliases = {
2400
2405
  ..._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)
2406
+ ...hasFarmSourceAliasOverride(_optionalChain([userConfig, 'access', _124 => _124.resolve, 'optionalAccess', _125 => _125.alias])) ? {} : _chunkOFVBMS6Icjs.createFarmSourceAlias.call(void 0, options.root || process.cwd(), options.srcDir)
2402
2407
  };
2403
2408
  if (Object.keys(farmAliases).length > 0) {
2404
2409
  _nullishCoalesce(userConfig.resolve, () => ( (userConfig.resolve = {})));
2405
- userConfig.resolve.alias = _chunkJHRJ5V2Fcjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2410
+ userConfig.resolve.alias = _chunkOFVBMS6Icjs.mergeFarmViteAlias.call(void 0, farmAliases, userConfig.resolve.alias);
2406
2411
  }
2407
2412
  const layerRoots = (_nullishCoalesce(options.layers, () => ( []))).map((layer) => layer.root);
2408
2413
  farmOwnsDevCors = !isBuild && _optionalChain([userConfig, 'access', _126 => _126.server, 'optionalAccess', _127 => _127.cors]) === void 0;
@@ -2476,7 +2481,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2476
2481
  } catch (e21) {
2477
2482
  }
2478
2483
  };
2479
- farmApp = new (0, _chunkJHRJ5V2Fcjs.FarmApp)(
2484
+ farmApp = new (0, _chunkOFVBMS6Icjs.FarmApp)(
2480
2485
  {
2481
2486
  ...options,
2482
2487
  root: resolveDevelopmentRoot(options.root, server.config.root)
@@ -2484,7 +2489,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2484
2489
  server
2485
2490
  );
2486
2491
  farmApp.getRouteManager().usePackageClientBoundaryCacheFile(
2487
- _chunkEFI6QWBQcjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2492
+ _chunkEBSL5TW7cjs.resolvePackageClientBoundaryCacheFile.call(void 0,
2488
2493
  farmApp.getConfig().root,
2489
2494
  options.distDir || ".farm"
2490
2495
  )
@@ -2495,7 +2500,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2495
2500
  let farmAppPackages;
2496
2501
  if (_optionalChain([farmConfig, 'access', _149 => _149.agent, 'optionalAccess', _150 => _150.noindexPreviews])) {
2497
2502
  farmMiddlewares.use((_req, res, next) => {
2498
- if (_chunkIABI62FHcjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2503
+ if (_chunk57EEWWUScjs.isFarmPreviewDeploymentEnvironment.call(void 0, process.env)) {
2499
2504
  res.setHeader("X-Robots-Tag", _chunkEACD6ND7cjs.FARM_PREVIEW_ROBOTS_TAG);
2500
2505
  }
2501
2506
  next();
@@ -2503,7 +2508,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2503
2508
  }
2504
2509
  const apiServerBasePath = _chunk2OF5RPVUcjs.resolveFarmAPIServerBasePath.call(void 0, farmConfig.api);
2505
2510
  const devBuiltInRoutePaths = new Set(
2506
- _chunkWCSBYQOTcjs.listFarmBuiltInRoutePaths.call(void 0, {
2511
+ _chunk22BTYPIXcjs.listFarmBuiltInRoutePaths.call(void 0, {
2507
2512
  agent: {
2508
2513
  apiCatalog: true,
2509
2514
  mcp: true,
@@ -2553,7 +2558,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2553
2558
  );
2554
2559
  const generateTypeArtifacts = async (reason, selection = ALL_TYPE_ARTIFACTS, log = false) => {
2555
2560
  try {
2556
- const result = await _chunkHRH7OKBQcjs.generateFarmTypeArtifacts.call(void 0, {
2561
+ const result = await _chunkL3BSHASBcjs.generateFarmTypeArtifacts.call(void 0, {
2557
2562
  root: farmConfig.root,
2558
2563
  srcDir: farmConfig.srcDir,
2559
2564
  layers: farmConfig.layers,
@@ -2598,7 +2603,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2598
2603
  farmConfig.layers.map((layer) => _optionalChain([layer, 'access', _158 => _158.configFile, 'optionalAccess', _159 => _159.replace, 'call', _160 => _160(/\\/g, "/")])).filter((file) => Boolean(file))
2599
2604
  );
2600
2605
  const routeModuleExtensions = /* @__PURE__ */ new Set([
2601
- ..._chunkNGTZHWBGcjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2606
+ ..._chunk3OKSEJ33cjs.resolveFarmComponentExtensions.call(void 0, farmConfig.renderer.componentExtensions),
2602
2607
  ".md",
2603
2608
  ".mdx"
2604
2609
  ]);
@@ -2840,7 +2845,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2840
2845
  return _chunk7EPYN7GWcjs.resolveFarmLayoutFonts.call(void 0, layoutModules);
2841
2846
  };
2842
2847
  releaseDocsMCPServers();
2843
- const isFarmDocsPathGuarded = (href) => _chunkNEKO3HM2cjs.farmPathGuardCoversPage.call(void 0,
2848
+ const isFarmDocsPathGuarded = (href) => _chunk4B6YJ5DScjs.farmPathGuardCoversPage.call(void 0,
2844
2849
  {
2845
2850
  config: farmConfig,
2846
2851
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -2854,7 +2859,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2854
2859
  rendererServer: farmConfig.renderer.server,
2855
2860
  resolveLayoutFonts: resolveDocsLayoutFonts,
2856
2861
  fontStylesheetHref: "/@farm/fonts.css",
2857
- globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
2862
+ globalStylesheetHref: _chunkOFVBMS6Icjs.resolveDevGlobalStylesheetHref.call(void 0,
2858
2863
  farmConfig.root,
2859
2864
  farmConfig.srcDir
2860
2865
  ),
@@ -2885,7 +2890,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2885
2890
  fontAssets: _chunkERMUL73Lcjs.toFarmDocsPublicFontAssets.call(void 0, farmDocsFontAssetList),
2886
2891
  resolveLayoutFonts: resolveDocsLayoutFonts,
2887
2892
  fontStylesheetHref: "/@farm/fonts.css",
2888
- globalStylesheetHref: _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
2893
+ globalStylesheetHref: _chunkOFVBMS6Icjs.resolveDevGlobalStylesheetHref.call(void 0,
2889
2894
  farmConfig.root,
2890
2895
  farmConfig.srcDir
2891
2896
  ),
@@ -2922,9 +2927,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2922
2927
  }
2923
2928
  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
2929
  if (farmInfraAnalyticsPlugin) {
2925
- _chunkOM6JIIJUcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2930
+ _chunkZ37PDUJRcjs._setFarmInfraAnalyticsWebMCPRoute.call(void 0, farmInfraAnalyticsPlugin, async (pathname) => {
2926
2931
  if (farmDocsDevRuntime) {
2927
- const label = _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0,
2932
+ const label = _chunk22BTYPIXcjs.resolveFarmDocsRouteLabel.call(void 0,
2928
2933
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname, farmConfig.basePath),
2929
2934
  {
2930
2935
  path: _optionalChain([farmConfig, 'access', _196 => _196.docs, 'optionalAccess', _197 => _197.entry]) || "/docs",
@@ -2932,7 +2937,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
2932
2937
  pages: await getFarmDocsPagePaths()
2933
2938
  }
2934
2939
  );
2935
- if (label) return _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2940
+ if (label) return _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0, { pathname }, label);
2936
2941
  }
2937
2942
  const match = farmApp.getRouteManager().matchRoute(pathname);
2938
2943
  return { pathname, pattern: _optionalChain([match, 'access', _202 => _202.route, 'optionalAccess', _203 => _203.pattern]) || null };
@@ -3096,7 +3101,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3096
3101
  if (!rendererDisabled && (requestMethod === "GET" || requestMethod === "HEAD") && requestPathname === _chunkY3DO7BIJcjs.FARM_VIDEO_PLAYER_PATH) {
3097
3102
  res.statusCode = 200;
3098
3103
  res.setHeader("Content-Type", "text/html; charset=utf-8");
3099
- res.end(requestMethod === "HEAD" ? void 0 : _chunkJHRJ5V2Fcjs.FARM_VIDEO_PLAYER_HTML);
3104
+ res.end(requestMethod === "HEAD" ? void 0 : _chunkOFVBMS6Icjs.FARM_VIDEO_PLAYER_HTML);
3100
3105
  return;
3101
3106
  }
3102
3107
  const farmDocsFontPath = farmDocsFontAssets.get(requestPathname);
@@ -3376,9 +3381,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3376
3381
  if (pm && opensFarmDevRuntimeSession(pm)) {
3377
3382
  try {
3378
3383
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath);
3379
- const route = _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
3384
+ const route = _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0,
3380
3385
  { pathname: requestPathname },
3381
- label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3386
+ label !== void 0 ? label : devBuiltInRoutePaths.has(routePathname) ? routePathname : _chunk22BTYPIXcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath)
3382
3387
  );
3383
3388
  runtimeSession2 = await pm.beginRuntimeRequest(
3384
3389
  createRequestFromNodeRequest(req, new URL(fullUrl)),
@@ -3467,8 +3472,8 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3467
3472
  );
3468
3473
  return;
3469
3474
  }
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,
3475
+ if (_optionalChain([options, 'access', _238 => _238.agent, 'optionalAccess', _239 => _239.manifest]) !== false && _chunk22BTYPIXcjs.isFarmAppManifestPath.call(void 0, _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath))) {
3476
+ const manifestGuardCoversPath = (path7) => _chunk4B6YJ5DScjs.farmPathGuardCoversEndpoint.call(void 0,
3472
3477
  {
3473
3478
  config: farmConfig,
3474
3479
  middlewareRoutes: middlewareManager.getMiddlewares().filter((entry) => entry.source !== "config")
@@ -3477,18 +3482,18 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3477
3482
  apiServerBasePath
3478
3483
  );
3479
3484
  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,
3485
+ _nullishCoalesce(farmAppPackages, () => ( (farmAppPackages = _chunkOFVBMS6Icjs.resolveFarmAppPackages.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd()))))));
3486
+ const manifest = await _chunk22BTYPIXcjs.createFarmAppManifestResponse.call(void 0,
3482
3487
  new Request(parsedRequestUrl, {
3483
3488
  method: requestMethod,
3484
3489
  headers: { "if-none-match": String(_nullishCoalesce(req.headers["if-none-match"], () => ( ""))) }
3485
3490
  }),
3486
3491
  {
3487
- ..._chunkWCSBYQOTcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3492
+ ..._chunk22BTYPIXcjs.resolveFarmAppManifestInput.call(void 0, farmConfig, {
3488
3493
  build: "development",
3489
3494
  packages: farmAppPackages,
3490
3495
  // 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) : []
3496
+ webmcpTools: _optionalChain([farmConfig, 'access', _240 => _240.plugins, 'optionalAccess', _241 => _241.some, 'call', _242 => _242(({ name }) => name === "farm:webmcp")]) ? _chunkOFVBMS6Icjs.collectFarmWebMCPTools.call(void 0, _nullishCoalesce(farmConfig.root, () => ( process.cwd())), farmConfig.srcDir) : []
3492
3497
  }),
3493
3498
  defaultMCP: () => farmApp.getServerRenderer().getDefaultMCPServer(),
3494
3499
  // A guard written for an MCP server's path keeps its tools out of the public view.
@@ -3506,11 +3511,11 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3506
3511
  });
3507
3512
  return;
3508
3513
  }
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) {
3514
+ if (_optionalChain([options, 'access', _243 => _243.agent, 'optionalAccess', _244 => _244.apiCatalog]) && _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath) === _chunk22BTYPIXcjs.FARM_API_CATALOG_PATH) {
3510
3515
  await serveBuiltInRoute(
3511
- () => _chunkWCSBYQOTcjs.createFarmApiCatalogResponse.call(void 0,
3516
+ () => _chunk22BTYPIXcjs.createFarmApiCatalogResponse.call(void 0,
3512
3517
  requestMethod,
3513
- _chunkWCSBYQOTcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3518
+ _chunk22BTYPIXcjs.resolveFarmApiCatalogInput.call(void 0, { ...options, api: farmConfig.api }),
3514
3519
  new Request(parsedRequestUrl, {
3515
3520
  headers: { "user-agent": String(_nullishCoalesce(req.headers["user-agent"], () => ( ""))) }
3516
3521
  })
@@ -3519,7 +3524,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3519
3524
  return;
3520
3525
  }
3521
3526
  if (_optionalChain([options, 'access', _245 => _245.agent, 'optionalAccess', _246 => _246.aiCatalog]) !== false) {
3522
- const aiCatalog = _chunkWCSBYQOTcjs.createFarmAiCatalogResponse.call(void 0,
3527
+ const aiCatalog = _chunk22BTYPIXcjs.createFarmAiCatalogResponse.call(void 0,
3523
3528
  new Request(parsedRequestUrl, {
3524
3529
  method: requestMethod,
3525
3530
  headers: {
@@ -3601,7 +3606,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3601
3606
  {
3602
3607
  kind: "docs",
3603
3608
  computed: docsResponse,
3604
- label: _chunkWCSBYQOTcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3609
+ label: _chunk22BTYPIXcjs.resolveFarmDocsEngineRouteLabel.call(void 0,
3605
3610
  _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, requestPathname, farmConfig.basePath),
3606
3611
  {
3607
3612
  path: _optionalChain([farmConfig, 'access', _257 => _257.docs, 'optionalAccess', _258 => _258.entry]) || "/docs",
@@ -3638,7 +3643,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3638
3643
  }
3639
3644
  const markdownRouteLabel = () => (
3640
3645
  // On the route path, as production labels it: /fr/index.md is /index.md.
3641
- _chunkWCSBYQOTcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3646
+ _chunk22BTYPIXcjs.resolveFarmMarkdownRouteLabel.call(void 0,
3642
3647
  toRoutePathname(requestPathname),
3643
3648
  (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
3649
  )
@@ -3659,7 +3664,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
3659
3664
  return {
3660
3665
  source: await fs2.promises.readFile(sourcePath, "utf8"),
3661
3666
  // Project-relative, as production sends it: never the machine's path.
3662
- filePath: _chunkJHRJ5V2Fcjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3667
+ filePath: _chunkOFVBMS6Icjs.toBakedMarkdownSourcePath.call(void 0, farmApp.getConfig().root, sourcePath)
3663
3668
  };
3664
3669
  },
3665
3670
  // The anonymous check goes through this server, so its guards and
@@ -4002,9 +4007,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4002
4007
  );
4003
4008
  const docsRuntimeOptions = () => ({
4004
4009
  kind: "docs",
4005
- route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
4010
+ route: _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0,
4006
4011
  { pathname: pathname2, pattern: urlPath2 },
4007
- _chunkWCSBYQOTcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4012
+ _chunk22BTYPIXcjs.resolveFarmDocsRouteLabel.call(void 0, pathname2, {
4008
4013
  path: _optionalChain([farmConfig, 'access', _290 => _290.docs, 'optionalAccess', _291 => _291.entry]) || "/docs",
4009
4014
  roots: _optionalChain([farmConfig, 'access', _292 => _292.docs, 'optionalAccess', _293 => _293.roots, 'optionalAccess', _294 => _294.map, 'call', _295 => _295((root) => root.entry)])
4010
4015
  })
@@ -4358,7 +4363,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4358
4363
  );
4359
4364
  const loadingModule = loadingBoundary ? await routeManager3.loadRouteModule(loadingBoundary.modulePath) : null;
4360
4365
  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)));
4366
+ const moduleMetadata = _nullishCoalesce(navigationManifest.routes.find((entry) => entry.pattern === route.pattern), () => ( _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, route.modulePath, server.config.root)));
4362
4367
  const isClientComponent = moduleMetadata.isClientComponent;
4363
4368
  const shouldHydrate = moduleMetadata.shouldHydrate;
4364
4369
  let mergedMetadata = {};
@@ -4369,7 +4374,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4369
4374
  (layout) => _nullishCoalesce(navigationManifest.layouts.find(
4370
4375
  (entry) => entry.pattern === layout.pattern
4371
4376
  ), () => ( {
4372
- ..._chunkEFI6QWBQcjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4377
+ ..._chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, layout.modulePath, server.config.root),
4373
4378
  serverTree: false
4374
4379
  }))
4375
4380
  );
@@ -4382,9 +4387,9 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4382
4387
  (metadata) => metadata.shouldHydrate && metadata.islandStrategy ? [metadata.islandStrategy] : []
4383
4388
  )
4384
4389
  ];
4385
- const hydrationIslandStrategy = _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0,
4390
+ const hydrationIslandStrategy = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0,
4386
4391
  _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,
4392
+ ) === "islands" ? _chunkOFVBMS6Icjs.resolveFarmRouteRootStrategy.call(void 0,
4388
4393
  route,
4389
4394
  { shouldHydrate, islandStrategy: _nullishCoalesce(moduleMetadata.islandStrategy, () => ( null)) },
4390
4395
  layouts.map((layout, index) => ({
@@ -4450,7 +4455,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4450
4455
  const slotModule = await routeManager3.loadRouteModule(slot.route.modulePath);
4451
4456
  const slotMetadata = _nullishCoalesce(navigationManifest.slots.find(
4452
4457
  (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)));
4458
+ ), () => ( _chunkEBSL5TW7cjs.getClientModuleMetadata.call(void 0, slot.route.modulePath, server.config.root)));
4454
4459
  const slotContext = await _chunkX333W5KVcjs.resolveFarmRouteContext.call(void 0, farmApp.getConfig(), {
4455
4460
  request: targetRequest,
4456
4461
  params: slot.params,
@@ -4496,15 +4501,15 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4496
4501
  );
4497
4502
  const projectRoot = server.config.root;
4498
4503
  const toUrlPath = (absolutePath) => _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, absolutePath, projectRoot);
4499
- const renderPlan = _chunkNEKO3HM2cjs.createFarmRouteRenderPlan.call(void 0, {
4504
+ const renderPlan = _chunk4B6YJ5DScjs.createFarmRouteRenderPlan.call(void 0, {
4500
4505
  pageShouldHydrate: shouldHydrate,
4501
4506
  layoutShouldHydrate: shouldHydrateLayout,
4502
4507
  islandStrategy: hydrationIslandStrategy,
4503
- rendering: _chunkHRH7OKBQcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4508
+ rendering: _chunkL3BSHASBcjs.resolveRouteRenderingConfig.call(void 0, routeModule)
4504
4509
  });
4505
4510
  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")),
4511
+ const layoutStartIndex = _chunk4B6YJ5DScjs.getSharedLayoutPrefixLength.call(void 0,
4512
+ _chunk4B6YJ5DScjs.parseFarmLayoutChainHeader.call(void 0, request.headers.get("x-farm-layout-chain")),
4508
4513
  destinationLayoutPatterns
4509
4514
  );
4510
4515
  const renderer = farmApp.getServerRenderer();
@@ -4586,7 +4591,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4586
4591
  {
4587
4592
  status: 200,
4588
4593
  headers: {
4589
- "Cache-Control": _chunkNEKO3HM2cjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4594
+ "Cache-Control": _chunk4B6YJ5DScjs.getFarmFragmentCacheControl.call(void 0, renderPlan),
4590
4595
  "X-Farm-Navigation": "html-fragment",
4591
4596
  Vary: "X-Farm-Layout-Chain",
4592
4597
  [_chunkNLBHLPEOcjs.FARM_DEPLOYMENT_ID_HEADER]: farmConfig.deploymentId
@@ -4635,7 +4640,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4635
4640
  const hasRuntimeAfterHook = _nullishCoalesce(_optionalChain([pm, 'optionalAccess', _339 => _339.hasRuntimeHook, 'call', _340 => _340("after")]), () => ( false));
4636
4641
  const pageBuiltInRouteLabel = (pathname2) => {
4637
4642
  const routePathname = _chunkD22BUQKWcjs.stripFarmBasePath.call(void 0, pathname2, farmConfig.basePath);
4638
- const mcpLabel = _chunkWCSBYQOTcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4643
+ const mcpLabel = _chunk22BTYPIXcjs.resolveFarmMCPRouteLabel.call(void 0, routePathname, apiServerBasePath);
4639
4644
  if (mcpLabel) return mcpLabel;
4640
4645
  if (farmAgentGeneratedPaths(farmConfig).includes(routePathname)) return routePathname;
4641
4646
  return routePathname === _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH && farmApp.getServerRenderer().getDefaultMCPServer() ? _chunkW53Z4WDIcjs.FARM_DEFAULT_MCP_PATH : null;
@@ -4644,7 +4649,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4644
4649
  const match = routeManager2.matchRoute(pathname2);
4645
4650
  return {
4646
4651
  kind: "page",
4647
- route: _chunkWCSBYQOTcjs.setFarmRouteLabel.call(void 0,
4652
+ route: _chunk22BTYPIXcjs.setFarmRouteLabel.call(void 0,
4648
4653
  {
4649
4654
  pathname: pathname2,
4650
4655
  pattern: _optionalChain([match, 'optionalAccess', _341 => _341.route, 'optionalAccess', _342 => _342.pattern]) || null,
@@ -4871,7 +4876,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4871
4876
  if (imageModule) return imageModule;
4872
4877
  }
4873
4878
  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);
4879
+ const renderer = _optionalChain([farmApp, 'optionalAccess', _367 => _367.getConfig, 'call', _368 => _368(), 'access', _369 => _369.renderer]) || _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, options.renderer);
4875
4880
  const root = _optionalChain([server, 'optionalAccess', _370 => _370.config, 'access', _371 => _371.root]) || options.root;
4876
4881
  if (isClientEnvironment(this, loadOptions)) {
4877
4882
  return generateProgrammaticClientRouteModuleForId(
@@ -4889,7 +4894,7 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4889
4894
  }
4890
4895
  if (isFarmClientVirtualId(id)) {
4891
4896
  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);
4897
+ const renderer = _optionalChain([resolvedConfig, 'optionalAccess', _374 => _374.renderer]) || _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, options.renderer);
4893
4898
  const integrations = _optionalChain([resolvedConfig, 'optionalAccess', _375 => _375.integrations]) || options.integrations;
4894
4899
  const root = _optionalChain([resolvedConfig, 'optionalAccess', _376 => _376.root]) || _optionalChain([server, 'optionalAccess', _377 => _377.config, 'access', _378 => _378.root]) || process.cwd();
4895
4900
  const docs = _optionalChain([resolvedConfig, 'optionalAccess', _379 => _379.docs]);
@@ -4908,10 +4913,10 @@ function farmPlugin(options = {}, initialPluginManager, deferredSetup) {
4908
4913
  const generatedDevtoolsClientRuntime = devtoolsClientRuntime ? devtoolsClientRuntime.generateFarmDevtoolsClientRuntime(devtools) : "";
4909
4914
  const generatedDevIndicatorsClientRuntime = farmApp ? _chunkL2GUEYHRcjs.generateFarmDevIndicatorsClientRuntime.call(void 0, farmApp.getConfig().devIndicators) : "";
4910
4915
  const integrationProviders = _chunkB3HQTGXScjs.getIntegrationProviders.call(void 0, integrations);
4911
- const isolatedHydrationMode = _chunkEFI6QWBQcjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4916
+ const isolatedHydrationMode = _chunkEBSL5TW7cjs.resolveFarmIsolatedClientHydrationMode.call(void 0,
4912
4917
  _optionalChain([resolvedConfig, 'optionalAccess', _385 => _385.experimental, 'optionalAccess', _386 => _386.isolatedClientHydration]),
4913
4918
  {
4914
- serverComponents: _chunkRE5E2G5Scjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4919
+ serverComponents: _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _387 => _387.experimental, 'optionalAccess', _388 => _388.serverComponents])) === "rsc",
4915
4920
  hasUnsupportedIntegrationProvider: integrationProviders.filter((provider) => provider.component || provider.type === "clerk").some((provider) => provider.supportsIsolatedHydration !== true)
4916
4921
  }
4917
4922
  );
@@ -4930,14 +4935,14 @@ ${generatedDevIndicatorsClientRuntime}`,
4930
4935
  _optionalChain([resolvedConfig, 'optionalAccess', _393 => _393.publicRuntimeConfig]) || options.publicRuntimeConfig,
4931
4936
  adapterOwnsDocsRuntime ? _chunkL2GUEYHRcjs.getFarmDocsAdapterUIModule.call(void 0, _optionalChain([docs, 'optionalAccess', _394 => _394.adapter])) : void 0,
4932
4937
  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,
4938
+ 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
4939
  _nullishCoalesce(_optionalChain([resolvedConfig, 'optionalAccess', _400 => _400.trailingSlash]), () => ( false)),
4935
4940
  _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]))
4941
+ _chunkOFVBMS6Icjs.generateClientCachePersistenceCode.call(void 0,
4942
+ _chunkOFVBMS6Icjs.resolveFarmClientCacheAdapterEntry.call(void 0, root, _optionalChain([resolvedConfig, 'optionalAccess', _402 => _402.cache]))
4938
4943
  ),
4939
4944
  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"
4945
+ _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([resolvedConfig, 'optionalAccess', _403 => _403.experimental, 'optionalAccess', _404 => _404.serverComponents])) === "islands"
4941
4946
  );
4942
4947
  }
4943
4948
  if (id === "/@farm/server") {
@@ -4956,11 +4961,11 @@ export const getManifest = () => ({
4956
4961
  });
4957
4962
  `;
4958
4963
  }
4959
- const globalStylesheetHref = _chunkJHRJ5V2Fcjs.resolveDevGlobalStylesheetHref.call(void 0,
4964
+ const globalStylesheetHref = _chunkOFVBMS6Icjs.resolveDevGlobalStylesheetHref.call(void 0,
4960
4965
  server.config.root,
4961
4966
  _optionalChain([farmApp, 'optionalAccess', _407 => _407.getConfig, 'call', _408 => _408(), 'access', _409 => _409.srcDir])
4962
4967
  );
4963
- const fullManifest = _chunkJHRJ5V2Fcjs.createFarmDevClientManifest.call(void 0,
4968
+ const fullManifest = _chunkOFVBMS6Icjs.createFarmDevClientManifest.call(void 0,
4964
4969
  routeManager.generateClientManifest(server.config.root),
4965
4970
  {
4966
4971
  sharedAssets: globalStylesheetHref ? [{ tag: "link", attrs: { rel: "stylesheet", href: globalStylesheetHref } }] : []
@@ -4982,45 +4987,45 @@ export { manifest };
4982
4987
  const runtimeModule = !isBuild && _optionalChain([transformOptions, 'optionalAccess', _411 => _411.ssr]) === true && isOutsideAppRoot(id) ? toFarmRuntimeModuleId : void 0;
4983
4988
  const actionConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _412 => _412.getConfig, 'call', _413 => _413()]), () => ( options));
4984
4989
  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)) {
4990
+ 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) && !_chunkEBSL5TW7cjs.hasUseClientDirective.call(void 0, code)) {
4986
4991
  const file = id.split("?", 1)[0];
4987
4992
  const projectRoot = actionConfig.root || _optionalChain([server, 'optionalAccess', _417 => _417.config, 'access', _418 => _418.root]) || process.cwd();
4988
4993
  const buildSnapshot = isBuild ? options.sourceSnapshot : void 0;
4989
4994
  const rewrite = () => {
4990
4995
  if (_optionalChain([transformOptions, 'optionalAccess', _419 => _419.ssr]) === true) {
4991
4996
  if (farmReactServerFiles.has(file)) {
4992
- for (const child of _chunkEFI6QWBQcjs.farmRelativeImportFiles.call(void 0, code, file))
4997
+ for (const child of _chunkEBSL5TW7cjs.farmRelativeImportFiles.call(void 0, code, file))
4993
4998
  farmReactServerFiles.add(child);
4994
4999
  }
4995
- const serverModule = farmReactServerFiles.has(file) || !_chunkEFI6QWBQcjs.getFarmClientReachableModules.call(void 0,
5000
+ const serverModule = farmReactServerFiles.has(file) || !_chunkEBSL5TW7cjs.getFarmClientReachableModules.call(void 0,
4996
5001
  path6.resolve(projectRoot, actionConfig.srcDir || "src"),
4997
5002
  projectRoot
4998
5003
  ).has(path6.resolve(file));
4999
- const reactServer = !serverModule ? null : _chunkEFI6QWBQcjs.rewriteFarmReactServerImports.call(void 0, {
5004
+ const reactServer = !serverModule ? null : _chunkEBSL5TW7cjs.rewriteFarmReactServerImports.call(void 0, {
5000
5005
  code,
5001
5006
  file,
5002
- reference: (specifier, exportName) => _chunkEFI6QWBQcjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5007
+ reference: (specifier, exportName) => _chunkEBSL5TW7cjs.ensureFarmPackageClientReference.call(void 0, projectRoot, specifier, exportName, file),
5003
5008
  onServerFile: (serverFile) => farmReactServerFiles.add(serverFile)
5004
5009
  });
5005
5010
  if (reactServer !== null) {
5006
5011
  code = reactServer;
5007
5012
  rewrotePackageImports = true;
5008
5013
  }
5009
- const internal = farmReactServerFiles.has(file) ? _chunkEFI6QWBQcjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5014
+ const internal = farmReactServerFiles.has(file) ? _chunkEBSL5TW7cjs.rewriteFarmReactServerClientModuleImports.call(void 0, {
5010
5015
  code,
5011
5016
  file,
5012
- reference: (clientFile) => _chunkEFI6QWBQcjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5017
+ reference: (clientFile) => _chunkEBSL5TW7cjs.ensureFarmInternalClientReference.call(void 0, projectRoot, clientFile)
5013
5018
  }) : null;
5014
5019
  if (internal !== null) {
5015
5020
  code = internal;
5016
5021
  rewrotePackageImports = true;
5017
5022
  }
5018
5023
  }
5019
- const rewritePackageImports = (source2) => _chunkEFI6QWBQcjs.rewriteFarmPackageClientImports.call(void 0, {
5024
+ const rewritePackageImports = (source2) => _chunkEBSL5TW7cjs.rewriteFarmPackageClientImports.call(void 0, {
5020
5025
  code: source2,
5021
5026
  file,
5022
5027
  root: projectRoot,
5023
- isClientPackage: (specifier) => _chunkEFI6QWBQcjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5028
+ isClientPackage: (specifier) => _chunkEBSL5TW7cjs.isFarmPackageClientBoundary.call(void 0, file, specifier, projectRoot)
5024
5029
  });
5025
5030
  const routeManager = _optionalChain([farmApp, 'optionalAccess', _420 => _420.getRouteManager, 'call', _421 => _421()]);
5026
5031
  const source = code;
@@ -5041,7 +5046,7 @@ export { manifest };
5041
5046
  }
5042
5047
  }
5043
5048
  };
5044
- if (buildSnapshot) _chunkEFI6QWBQcjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5049
+ if (buildSnapshot) _chunkEBSL5TW7cjs.withFarmSourceSnapshotOf.call(void 0, buildSnapshot, rewrite);
5045
5050
  else rewrite();
5046
5051
  }
5047
5052
  if (islandsServerFns() && !_chunkPIUTGRDIcjs.isFarmServerFnBoundaryId.call(void 0, id) && !id.includes("/node_modules/") && /\.[cm]?[jt]sx?(?:$|\?)/.test(id)) {
@@ -5070,8 +5075,8 @@ export { manifest };
5070
5075
  }
5071
5076
  if (!_optionalChain([transformOptions, 'optionalAccess', _428 => _428.ssr])) {
5072
5077
  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]);
5078
+ if (_chunkOFVBMS6Icjs.isFarmDocsClientConfigModule.call(void 0, id, docsConfigModule)) {
5079
+ const redacted = _chunkOFVBMS6Icjs.redactFarmDocsClientConfig.call(void 0, code, id.split("?")[0]);
5075
5080
  if (redacted !== null) return { code: redacted, map: null };
5076
5081
  }
5077
5082
  }
@@ -5080,9 +5085,9 @@ export { manifest };
5080
5085
  if ((_optionalChain([currentConfig, 'access', _435 => _435.experimental, 'optionalAccess', _436 => _436.serverActions]) !== true || !serverFnTransformActive) && !islandsServerFns()) {
5081
5086
  const violation = findClientServerFnViolation(code, id);
5082
5087
  if (violation) {
5083
- const locate = _chunkEFI6QWBQcjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5088
+ const locate = _chunkEBSL5TW7cjs.createFarmSourceLocator.call(void 0, code, () => this.getCombinedSourcemap());
5084
5089
  this.error(
5085
- _chunkEFI6QWBQcjs.formatFarmDiagnostic.call(void 0,
5090
+ _chunkEBSL5TW7cjs.formatFarmDiagnostic.call(void 0,
5086
5091
  createServerFnBoundaryDiagnostic(violation, id, locate(violation.start)),
5087
5092
  currentConfig.root
5088
5093
  )
@@ -5124,26 +5129,27 @@ export { manifest };
5124
5129
  transformed = true;
5125
5130
  }
5126
5131
  }
5127
- if (_chunkEFI6QWBQcjs.hasUseClientDirective.call(void 0, transformedCode)) {
5132
+ if (_chunkEBSL5TW7cjs.hasUseClientDirective.call(void 0, transformedCode)) {
5128
5133
  const clientBoundarySource = transformedCode;
5129
5134
  const moduleInfo = this.getModuleInfo(id);
5130
5135
  if (moduleInfo) {
5131
5136
  moduleInfo.isClientComponent = true;
5132
5137
  }
5133
- transformedCode = _chunkEFI6QWBQcjs.stripUseClientDirective.call(void 0, transformedCode);
5138
+ transformedCode = _chunkEBSL5TW7cjs.stripUseClientDirective.call(void 0, transformedCode);
5134
5139
  transformed = true;
5135
5140
  const currentConfig = _nullishCoalesce(_optionalChain([farmApp, 'optionalAccess', _444 => _444.getConfig, 'call', _445 => _445()]), () => ( options));
5136
5141
  let isolatedModuleReference = null;
5142
+ let rendererIslandModule = false;
5137
5143
  const root = currentConfig.root || _optionalChain([server, 'optionalAccess', _446 => _446.config, 'access', _447 => _447.root]) || process.cwd();
5138
5144
  const cleanId = id.split("?", 1)[0];
5139
5145
  const selectedIsolatedModules = _nullishCoalesce(options.isolatedClientBoundaryModules, () => ( _optionalChain([farmApp, 'optionalAccess', _448 => _448.getRouteManager, 'call', _449 => _449(), 'access', _450 => _450.getIsolatedClientBoundaryModules, 'call', _451 => _451(root)])));
5140
5146
  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))) {
5147
+ if (_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer)) && selectedForIsolatedHydration && (_chunkEBSL5TW7cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || // A generated client reference, whose marker comment compiled TSX no longer has.
5148
+ cleanId.replace(/\\/g, "/").includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5143
5149
  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;
5150
+ const islandsMode = _chunk3OKSEJ33cjs.resolveFarmServerComponentsMode.call(void 0, _optionalChain([currentConfig, 'access', _454 => _454.experimental, 'optionalAccess', _455 => _455.serverComponents])) === "islands";
5151
+ const explicitStrategy = _chunkEBSL5TW7cjs.getIslandStrategyExport.call(void 0, clientBoundarySource);
5152
+ const inference = islandsMode && explicitStrategy === null ? _chunkOFVBMS6Icjs.inferFarmIslandStrategy.call(void 0, cleanId, root) : null;
5147
5153
  if (inference) {
5148
5154
  for (const file of inference.files) {
5149
5155
  if (file !== path6.resolve(cleanId)) this.addWatchFile(file);
@@ -5166,6 +5172,24 @@ export { manifest };
5166
5172
  );
5167
5173
  }
5168
5174
  transformedCode = transformedBoundary;
5175
+ } else if (selectedForIsolatedHydration && _chunkMAPHNGTFcjs.usesFarmRendererIslands.call(void 0, currentConfig) && (_chunkEBSL5TW7cjs.isIsolatableClientBoundarySource.call(void 0, clientBoundarySource) || cleanId.replace(/\\/g, "/").includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY))) {
5176
+ rendererIslandModule = true;
5177
+ if (_optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) === true) {
5178
+ const renderer = _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, currentConfig.renderer);
5179
+ const transformedBoundary = transformIsolatedClientBoundaryModule({
5180
+ code: transformedCode,
5181
+ moduleReference: _chunk7U4XF76Rcjs.toViteModuleId.call(void 0, cleanId, root),
5182
+ islandStrategy: _nullishCoalesce(_chunkEBSL5TW7cjs.getIslandStrategyExport.call(void 0, clientBoundarySource), () => ( "load")),
5183
+ parse: (source) => this.parse(source),
5184
+ withIsland: renderer.server
5185
+ });
5186
+ if (!transformedBoundary) {
5187
+ this.error(
5188
+ `[Farm.js] Could not compile the island module ${cleanId} for renderer \`${renderer.name}\`. Set experimental.isolatedClientHydration = "off" to hydrate its routes whole.`
5189
+ );
5190
+ }
5191
+ transformedCode = transformedBoundary;
5192
+ }
5169
5193
  }
5170
5194
  if (!farmApp) {
5171
5195
  return {
@@ -5188,7 +5212,7 @@ export { manifest };
5188
5212
  );
5189
5213
  return;
5190
5214
  }` : "";
5191
- const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _458 => _458.ssr]) || reactRefreshActive || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5215
+ const hmrCode = _optionalChain([transformOptions, 'optionalAccess', _459 => _459.ssr]) || reactRefreshActive || rendererIslandModule || !shouldEmitFarmClientRootHmr(currentConfig.renderer) ? "" : `
5192
5216
  if (import.meta.hot) {
5193
5217
  import.meta.hot.accept((newModule) => {
5194
5218
  ${isolatedHmrUpdate}
@@ -5244,14 +5268,14 @@ if (import.meta.hot) {
5244
5268
  }
5245
5269
  _chunk7U4XF76Rcjs.logger.info(`Found ${ssgPages.length} SSG pages, ${ssrRoutes.length} SSR routes`);
5246
5270
  _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");
5271
+ const outDir = path6.join(_optionalChain([server, 'optionalAccess', _460 => _460.config, 'access', _461 => _461.root]) || process.cwd(), options.outDir || "dist");
5248
5272
  const clientDir = path6.join(outDir, "client");
5249
5273
  for (const page of ssgPages) {
5250
5274
  try {
5251
5275
  const staticRequest = new Request(new URL(page.urlPath, "http://farm.static"));
5252
5276
  await farmApp.getServerRenderer().runWithRequestContext(staticRequest, async () => {
5253
5277
  const mod = await routeManager.loadRouteModule(page.filePath);
5254
- if (!_optionalChain([mod, 'optionalAccess', _461 => _461.default])) return;
5278
+ if (!_optionalChain([mod, 'optionalAccess', _462 => _462.default])) return;
5255
5279
  const { layouts } = routeManager.matchRoute(page.urlPath);
5256
5280
  const layoutModules = await Promise.all(
5257
5281
  layouts.map((l) => routeManager.loadLayoutModule(l.modulePath))
@@ -5283,7 +5307,7 @@ if (import.meta.hot) {
5283
5307
  const i18nSnapshot = _chunkSXXSQVKKcjs.getFarmI18nClientSnapshot.call(void 0, );
5284
5308
  const i18nHead = renderFarmI18nStaticHead(page.urlPath, i18nSnapshot);
5285
5309
  const fullHtml = `<!DOCTYPE html>
5286
- <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _462 => _462.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5310
+ <html lang="${escapeFarmHtmlAttribute(_optionalChain([i18nSnapshot, 'optionalAccess', _463 => _463.locale]) || "en")}"${i18nSnapshot ? ` dir="${i18nSnapshot.direction}"` : ""}>
5287
5311
  <head>
5288
5312
  <meta charset="utf-8">
5289
5313
  <meta name="viewport" content="width=device-width, initial-scale=1">
@@ -5328,12 +5352,12 @@ if (import.meta.hot) {
5328
5352
  watchChange(id, change) {
5329
5353
  const watched = _chunk7U4XF76Rcjs.toPosixPath.call(void 0, id);
5330
5354
  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)]);
5355
+ _optionalChain([farmApp, 'optionalAccess', _464 => _464.getRouteManager, 'call', _465 => _465(), 'access', _466 => _466.noteSourceChange, 'call', _467 => _467(id, change.event)]);
5332
5356
  }
5333
- _chunkEFI6QWBQcjs.invalidateFarmClientReachableModules.call(void 0, );
5334
- _chunkEFI6QWBQcjs.invalidateFarmClientOnlyScan.call(void 0, );
5335
- _chunkJHRJ5V2Fcjs.invalidateFarmRouteRootInferences.call(void 0, );
5336
- _chunkEFI6QWBQcjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5357
+ _chunkEBSL5TW7cjs.invalidateFarmClientReachableModules.call(void 0, );
5358
+ _chunkEBSL5TW7cjs.invalidateFarmClientOnlyScan.call(void 0, );
5359
+ _chunkOFVBMS6Icjs.invalidateFarmRouteRootInferences.call(void 0, );
5360
+ _chunkEBSL5TW7cjs.dropLatestPackageClientBoundaryCache.call(void 0, );
5337
5361
  },
5338
5362
  async handleHotUpdate(ctx) {
5339
5363
  if (pendingClientSetup && !farmSetupContext.getStore()) await pendingClientSetup;
@@ -5358,7 +5382,7 @@ if (import.meta.hot) {
5358
5382
  server2.moduleGraph.invalidateModule(mod);
5359
5383
  }
5360
5384
  }
5361
- const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _467 => _467.getConfig, 'call', _468 => _468()]);
5385
+ const currentFarmConfig = _optionalChain([farmApp, 'optionalAccess', _468 => _468.getConfig, 'call', _469 => _469()]);
5362
5386
  const normalizedFile = file.replace(/\\/g, "/");
5363
5387
  const reloadAfterEdit = () => {
5364
5388
  for (const files of pendingRouteReloads) {
@@ -5366,10 +5390,10 @@ if (import.meta.hot) {
5366
5390
  }
5367
5391
  server2.ws.send({ type: "full-reload", path: "*" });
5368
5392
  };
5369
- if (normalizedFile.includes(_chunkEFI6QWBQcjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5393
+ if (normalizedFile.includes(_chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY) && normalizedFile.startsWith(
5370
5394
  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
5395
+ _chunk7U4XF76Rcjs.toPosixPath.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _470 => _470.root]) || options.root || server2.config.root),
5396
+ _chunkEBSL5TW7cjs.FARM_CLIENT_REFERENCE_DIRECTORY
5373
5397
  )
5374
5398
  ))
5375
5399
  return modules;
@@ -5377,7 +5401,7 @@ if (import.meta.hot) {
5377
5401
  (appDir) => normalizedFile.startsWith(`${_chunk7U4XF76Rcjs.toPosixPath.call(void 0, appDir)}/api/`)
5378
5402
  )) {
5379
5403
  for (const mod of modules) server2.moduleGraph.invalidateModule(mod);
5380
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _470 => _470(`updated ${file}`)]);
5404
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5381
5405
  reloadAfterEdit();
5382
5406
  return [];
5383
5407
  }
@@ -5387,7 +5411,7 @@ if (import.meta.hot) {
5387
5411
  for (const mod of modules) {
5388
5412
  server2.moduleGraph.invalidateModule(mod);
5389
5413
  }
5390
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _471 => _471(`updated ${file}`)]);
5414
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5391
5415
  reloadAfterEdit();
5392
5416
  return [];
5393
5417
  }
@@ -5397,22 +5421,22 @@ if (import.meta.hot) {
5397
5421
  for (const mod of modules) {
5398
5422
  server2.moduleGraph.invalidateModule(mod);
5399
5423
  }
5400
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _472 => _472(`updated ${file}`)]);
5424
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5401
5425
  reloadAfterEdit();
5402
5426
  return [];
5403
5427
  }
5404
5428
  if (apiRouteManager && _chunk25JGHAGHcjs.invalidateFarmDevDependents.call(void 0, server2, file, apiRouteManager.getSourceFiles()).length > 0) {
5405
- await _optionalChain([refreshRouteDiscovery, 'optionalCall', _473 => _473(`updated ${file}`)]);
5429
+ await _optionalChain([refreshRouteDiscovery, 'optionalCall', _474 => _474(`updated ${file}`)]);
5406
5430
  }
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()]);
5431
+ const isolatedHydrationMode = _optionalChain([currentFarmConfig, 'optionalAccess', _475 => _475.experimental, 'optionalAccess', _476 => _476.isolatedClientHydration]);
5432
+ const planRouteManager = _optionalChain([farmApp, 'optionalAccess', _477 => _477.getRouteManager, 'call', _478 => _478()]);
5409
5433
  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;
5434
+ const tracksAsyncOwnerIslands = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, _optionalChain([currentFarmConfig, 'optionalAccess', _479 => _479.renderer])) && planRouteManager !== void 0;
5411
5435
  let clientPlanCurrent = false;
5412
5436
  if (isHydrationPlanSource && (isolatedHydrationMode === "enabled" || isolatedHydrationMode === "analyze" || tracksAsyncOwnerIslands)) {
5413
5437
  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)])) {
5438
+ await _optionalChain([ctx, 'access', _480 => _480.read, 'optionalCall', _481 => _481()]);
5439
+ if (_optionalChain([routeManager, 'optionalAccess', _482 => _482.isEditPlanNeutral, 'call', _483 => _483(file)])) {
5416
5440
  clientPlanCurrent = true;
5417
5441
  } else if (routeManager) {
5418
5442
  routeManager.noteSourceChange(file, "update");
@@ -5456,7 +5480,7 @@ if (import.meta.hot) {
5456
5480
  }
5457
5481
  }
5458
5482
  }
5459
- const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _483 => _483.getRouteManager, 'call', _484 => _484(), 'access', _485 => _485.isRendererRouteModule, 'call', _486 => _486(normalizedFile)]) === true;
5483
+ const rendererRouteFile = _optionalChain([farmApp, 'optionalAccess', _484 => _484.getRouteManager, 'call', _485 => _485(), 'access', _486 => _486.isRendererRouteModule, 'call', _487 => _487(normalizedFile)]) === true;
5460
5484
  if (normalizedFile.includes("/app/") || rendererRouteFile) {
5461
5485
  if (normalizedFile.includes("middleware.")) {
5462
5486
  if (middlewareManager) {
@@ -5474,7 +5498,7 @@ if (import.meta.hot) {
5474
5498
  }
5475
5499
  return [];
5476
5500
  }
5477
- if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _487 => _487.getRouteManager, 'call', _488 => _488(), 'access', _489 => _489.invalidateClientManifest, 'call', _490 => _490()]);
5501
+ if (!clientPlanCurrent) _optionalChain([farmApp, 'optionalAccess', _488 => _488.getRouteManager, 'call', _489 => _489(), 'access', _490 => _490.invalidateClientManifest, 'call', _491 => _491()]);
5478
5502
  const manifestModule = server2.moduleGraph.getModuleById("/@farm/manifest");
5479
5503
  if (manifestModule) {
5480
5504
  server2.moduleGraph.invalidateModule(manifestModule);
@@ -5489,7 +5513,7 @@ if (import.meta.hot) {
5489
5513
  return [];
5490
5514
  }
5491
5515
  }
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) {
5516
+ 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
5517
  logUpdate("PAGE", `updated ${path6.basename(file)}`);
5494
5518
  reloadAfterEdit();
5495
5519
  return [];
@@ -5587,7 +5611,7 @@ function createPageDataMiddlewareResponse(res) {
5587
5611
  return (...args) => {
5588
5612
  if (captures(target.statusCode, target.getHeader("location"))) {
5589
5613
  const callback = args.find((arg) => typeof arg === "function");
5590
- _optionalChain([callback, 'optionalCall', _497 => _497()]);
5614
+ _optionalChain([callback, 'optionalCall', _498 => _498()]);
5591
5615
  return property === "write" ? true : response;
5592
5616
  }
5593
5617
  return target[property](...args);
@@ -5651,12 +5675,12 @@ function isFarmClientVirtualId(id) {
5651
5675
  }
5652
5676
  function isClientEnvironment(context, loadOptions) {
5653
5677
  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;
5678
+ if (_optionalChain([environment, 'optionalAccess', _499 => _499.config, 'optionalAccess', _500 => _500.consumer])) return environment.config.consumer === "client";
5679
+ if (_optionalChain([environment, 'optionalAccess', _501 => _501.name])) return environment.name === "client";
5680
+ return _optionalChain([loadOptions, 'optionalAccess', _502 => _502.ssr]) !== true;
5657
5681
  }
5658
5682
  function invalidateProgrammaticClientRouteModules(server) {
5659
- const graph = _optionalChain([server, 'access', _502 => _502.environments, 'optionalAccess', _503 => _503.client, 'optionalAccess', _504 => _504.moduleGraph]);
5683
+ const graph = _optionalChain([server, 'access', _503 => _503.environments, 'optionalAccess', _504 => _504.client, 'optionalAccess', _505 => _505.moduleGraph]);
5660
5684
  if (!graph) return;
5661
5685
  for (const [id, module] of graph.idToModuleMap) {
5662
5686
  if (_chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, id)) graph.invalidateModule(module);
@@ -5666,27 +5690,27 @@ function generateProgrammaticClientRouteModuleForId(moduleId, root, renderer, cl
5666
5690
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5667
5691
  const routesFile = resolveRealModuleFile(parsed.filePath, root);
5668
5692
  watchFile(routesFile);
5669
- return _chunkEFI6QWBQcjs.generateProgrammaticClientRouteModule.call(void 0, {
5693
+ return _chunkEBSL5TW7cjs.generateProgrammaticClientRouteModule.call(void 0, {
5670
5694
  kind: parsed.kind,
5671
5695
  routePath: parsed.routePath,
5672
5696
  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)
5697
+ route: parsed.kind === "api" ? void 0 : _optionalChain([clientRoutes, 'optionalAccess', _506 => _506.routes, 'access', _507 => _507.get, 'call', _508 => _508(
5698
+ _chunkEBSL5TW7cjs.programmaticClientRouteKey.call(void 0, routesFile, parsed.kind, parsed.routePath)
5675
5699
  )]),
5676
5700
  // 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,
5701
+ rendererClient: _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "react" : renderer.client,
5678
5702
  toImportSpecifier: (file) => toProgrammaticRouteImportSpecifier(file, root)
5679
5703
  });
5680
5704
  }
5681
5705
  function resolveRealModuleFile(filePath, root) {
5682
- const resolved = _nullishCoalesce(_chunkEFI6QWBQcjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5706
+ const resolved = _nullishCoalesce(_chunkEBSL5TW7cjs.resolveModuleSourcePath.call(void 0, filePath, root), () => ( filePath));
5683
5707
  try {
5684
5708
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, fs2.realpathSync(resolved));
5685
5709
  } catch (e29) {
5686
5710
  return _chunk7U4XF76Rcjs.toPosixPath.call(void 0, resolved);
5687
5711
  }
5688
5712
  }
5689
- function generateProgrammaticRouteModule(moduleId, root, renderer = _chunkNGTZHWBGcjs.REACT_RENDERER) {
5713
+ function generateProgrammaticRouteModule(moduleId, root, renderer = _chunk3OKSEJ33cjs.REACT_RENDERER) {
5690
5714
  const parsed = _chunkYUCU6XB4cjs.parseProgrammaticRouteModuleId.call(void 0, moduleId);
5691
5715
  if (!parsed) {
5692
5716
  return "";
@@ -5993,12 +6017,12 @@ async function parseRouteModuleProps(routeModule, input) {
5993
6017
  }
5994
6018
  const schemas = routeModule.__farmRouteSchemas;
5995
6019
  const params = parseRouteModuleSchema(
5996
- _optionalChain([schemas, 'optionalAccess', _508 => _508.params]),
6020
+ _optionalChain([schemas, 'optionalAccess', _509 => _509.params]),
5997
6021
  input.props.params,
5998
6022
  "params",
5999
6023
  input.routePath
6000
6024
  );
6001
- const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _509 => _509.search]), input.search, "search", input.routePath);
6025
+ const search = parseRouteModuleSchema(_optionalChain([schemas, 'optionalAccess', _510 => _510.search]), input.search, "search", input.routePath);
6002
6026
  return {
6003
6027
  ...input.props,
6004
6028
  params,
@@ -6017,8 +6041,8 @@ function parseRouteModuleSchema(schema, value, label, routePath) {
6017
6041
  throw new Error(`Invalid ${label} for route "${routePath}": ${message}`);
6018
6042
  }
6019
6043
  }
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,
6044
+ 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) {
6045
+ const providerClientCode = _chunkOFVBMS6Icjs.generateFarmIntegrationProviderClientCode.call(void 0,
6022
6046
  integrationProviders,
6023
6047
  root,
6024
6048
  _nullishCoalesce(renderer.componentExtensions, () => ( []))
@@ -6029,8 +6053,8 @@ function generateClientCode(integrationProviders = [], documentNavigationMatcher
6029
6053
  srcDir,
6030
6054
  publicRuntimeConfig
6031
6055
  );
6032
- const appSetupPath = _chunkNGTZHWBGcjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6033
- const rendererClientImports = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6056
+ const appSetupPath = _chunk3OKSEJ33cjs.resolveFarmRendererAppSetup.call(void 0, root, renderer);
6057
+ const rendererClientImports = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? `import React from 'react'
6034
6058
  import { hydrateRoot, createRoot } from 'react-dom/client'
6035
6059
  import { restorePagePosition } from '@farm.js/core/internal/client-runtime'` : (
6036
6060
  // Named exports only: a renderer's client module needs no default export. `React` is a
@@ -6044,14 +6068,46 @@ __farmConfigureApp(__farmAppSetup)` : `import * as __farmRendererClient from ${J
6044
6068
  import { hydrateRoot, createRoot } from ${JSON.stringify(renderer.client)}
6045
6069
  const React = { ...__farmRendererClient }`
6046
6070
  );
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'"}` : "";
6071
+ const rendererIslands = isolatedHydrationEnabled && !islandValues && !_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) && _chunk3OKSEJ33cjs.getFarmRendererCapabilities.call(void 0, renderer).islands;
6072
+ 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
6073
  const docsAdapterImportBlock = _chunkXJDB564Acjs.generateFarmDocsAdapterClientRuntime.call(void 0,
6049
6074
  docsAdapterUI,
6050
6075
  docsConfigModule,
6051
6076
  // 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
6077
+ _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? void 0 : renderer.client
6053
6078
  );
6054
- const isolatedHydrationRuntime = isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6079
+ const isolatedHydrationRuntime = rendererIslands ? `const farmIsolatedHydrationRuntime = createFarmRendererIslandRuntime({
6080
+ renderer: React,
6081
+ load: (reference) => import(/* @vite-ignore */ farmModuleUrl(reference)),
6082
+ schedule: scheduleFarmIslandHydration,
6083
+ });
6084
+ window.__FARM_ISOLATED_HYDRATION_RUNTIME__ = farmIsolatedHydrationRuntime;
6085
+ // A hydrating layout keeps a page that doesn't hydrate as server HTML in a plain element. The
6086
+ // renderer's root never renders the page's islands, so the runtime starts them after each render.
6087
+ const FarmServerPage = 'div';
6088
+ // Island modules reach the browser as written, so a client tree has nothing to mark.
6089
+ function wrapFarmIsolatedClientGraph(_React, element) { return element; }
6090
+
6091
+ function disposeFarmIsolatedClientBoundaries(scope) {
6092
+ farmIsolatedHydrationRuntime.dispose(scope);
6093
+ }
6094
+
6095
+ async function hydrateFarmIsolatedClientBoundaries(scope = document, signal) {
6096
+ await farmIsolatedHydrationRuntime.hydrate(scope, signal);
6097
+ }
6098
+
6099
+ // After a hydrating layout renders another page: release the islands whose markup it replaced,
6100
+ // and start the new page's.
6101
+ async function hydrateFarmLayoutPageIslands(container) {
6102
+ farmIsolatedHydrationRuntime.prune();
6103
+ await hydrateFarmIsolatedClientBoundaries(container);
6104
+ }
6105
+
6106
+ async function createFarmServerTreePageElement() { return null; }
6107
+ async function buildFarmTreeLayouts() { return true; }
6108
+ function getFarmTreeLayoutComponent() { return null; }
6109
+ let farmLastRouteState = null;
6110
+ function rerenderFarmTreeLayouts() {}` : isolatedHydrationEnabled ? `const farmIsolatedHydrationRuntime = createFarmIsolatedHydrationRuntime({
6055
6111
  ReactRuntime: React,
6056
6112
  hydrateRoot,
6057
6113
  load: (reference) => import(/* @vite-ignore */ farmModuleUrl(reference)),
@@ -6084,7 +6140,7 @@ async function createFarmServerTreePageElement(source, pathname) {
6084
6140
  return null;
6085
6141
  }
6086
6142
  }
6087
- ${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6143
+ ${islandValues ? `${_chunkOFVBMS6Icjs.FARM_SERVER_TREE_LAYOUT_CLIENT_SOURCE}
6088
6144
  let farmLastRouteState = null;
6089
6145
 
6090
6146
  // A hot update to a layout tree's client module renders the route again.
@@ -6925,7 +6981,7 @@ async function loadLayoutComponents(layouts = [], params = {}, source) {
6925
6981
  return loadedLayouts;
6926
6982
  }
6927
6983
 
6928
- ${_chunkJHRJ5V2Fcjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6984
+ ${_chunkOFVBMS6Icjs.FARM_LAYOUT_ELEMENT_CLIENT_SOURCE}
6929
6985
  function wrapWithLoadedLayouts(element, loadedLayouts, params) {
6930
6986
  let wrapped = element;
6931
6987
  for (let index = loadedLayouts.length - 1; index >= 0; index--) {
@@ -7004,7 +7060,7 @@ async function buildWrappedHydrationElement(PageComponent, pageProps, layouts =
7004
7060
 
7005
7061
  function hydrateFarmRoute(container, route) {
7006
7062
  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);"}
7063
+ ${_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
7064
  }
7009
7065
 
7010
7066
  function renderFarmRoute(root, route) {
@@ -7148,7 +7204,7 @@ async function tryHydrateImportedPage(
7148
7204
  wrap: wrapFarmClientRouteGraph,
7149
7205
  };
7150
7206
  } else if (useHydrate && container?.id === '__farm_page__') {
7151
- wrappedElement = wrapFarmClientRouteGraph(${_chunkNGTZHWBGcjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7207
+ wrappedElement = wrapFarmClientRouteGraph(${_chunk3OKSEJ33cjs.isReactRenderer.call(void 0, renderer) ? "restorePagePosition(React, container, pageElement)" : "pageElement"});
7152
7208
  } else {
7153
7209
  wrappedElement = await buildWrappedHydrationElement(
7154
7210
  currentPageComponent,
@@ -7225,7 +7281,7 @@ function readActiveLayoutPatterns() {
7225
7281
  );
7226
7282
  }
7227
7283
 
7228
- ${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7284
+ ${_chunkOFVBMS6Icjs.FARM_NAVIGATION_SCRIPT_SOURCE}
7229
7285
 
7230
7286
  function activateFragmentScripts(root) {
7231
7287
  for (const script of Array.from(root.querySelectorAll?.('script') || [])) {
@@ -7284,7 +7340,7 @@ function getLayoutShell(root, patterns, index, find) {
7284
7340
  return shell.innerHTML;
7285
7341
  }
7286
7342
 
7287
- ${islandValues ? _chunkJHRJ5V2Fcjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7343
+ ${islandValues ? _chunkOFVBMS6Icjs.FARM_REFRESH_FIELDS_SOURCE : ""}function replaceNavigationBoundary(
7288
7344
  container,
7289
7345
  fragment,
7290
7346
  currentPatterns,
@@ -7359,9 +7415,9 @@ ${islandValues ? `
7359
7415
  return nextTarget;
7360
7416
  }
7361
7417
 
7362
- ${islandValues ? `${_chunkJHRJ5V2Fcjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7418
+ ${islandValues ? `${_chunkOFVBMS6Icjs.FARM_NAVIGATION_STREAM_READER_SOURCE}
7363
7419
 
7364
- ${_chunkJHRJ5V2Fcjs.FARM_EARLY_NAVIGATION_SOURCE}
7420
+ ${_chunkOFVBMS6Icjs.FARM_EARLY_NAVIGATION_SOURCE}
7365
7421
 
7366
7422
  // Islands mode navigates as the production client does: it fetches the page itself, names the
7367
7423
  // layouts it shows by key (F-Layouts), and asks for flush markers (F-Stream), so the shell arrives
@@ -7680,6 +7736,7 @@ async function renderPage(pageData, info) {
7680
7736
  loadingModulePath: route.loadingModulePath,
7681
7737
  },
7682
7738
  );
7739
+ ${rendererIslands ? "await hydrateFarmLayoutPageIslands(container);" : ""}
7683
7740
  } else {
7684
7741
  ${isolatedHydrationEnabled ? "let isolatedHydrationScope = container;" : ""}
7685
7742
  ${islandValues ? "const keepValues = keepFarmIslandValues(container);" : ""}
@@ -7702,7 +7759,7 @@ async function renderPage(pageData, info) {
7702
7759
 
7703
7760
  const hydrationController = new AbortController();
7704
7761
  if (
7705
- shouldHydrate${isolatedHydrationEnabled ? " || (hasIsolatedClientBoundaries && !layoutShouldHydrate)" : ""}
7762
+ shouldHydrate${rendererIslands ? " || hasIsolatedClientBoundaries" : isolatedHydrationEnabled ? " || (hasIsolatedClientBoundaries && !layoutShouldHydrate)" : ""}
7706
7763
  ) {
7707
7764
  pendingPageHydrationController = hydrationController;
7708
7765
  }
@@ -7740,7 +7797,7 @@ async function renderPage(pageData, info) {
7740
7797
  });
7741
7798
  }
7742
7799
  }
7743
- ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries && !layoutShouldHydrate) {
7800
+ ${isolatedHydrationEnabled ? `if (hasIsolatedClientBoundaries${rendererIslands ? "" : " && !layoutShouldHydrate"}) {
7744
7801
  await hydrateFarmIsolatedClientBoundaries(
7745
7802
  isolatedHydrationScope,
7746
7803
  hydrationController.signal,
@@ -7959,8 +8016,7 @@ function farmIslandsOnlyDocument() {
7959
8016
  },
7960
8017
  });
7961
8018
  ${isolatedHydrationEnabled ? `const isolatedHydration =
7962
- hasIsolatedClientBoundaries &&
7963
- !layoutShouldHydrate
8019
+ hasIsolatedClientBoundaries${rendererIslands ? "" : " &&\n !layoutShouldHydrate"}
7964
8020
  ? hydrateFarmIsolatedClientBoundaries(rootContainer, hydrationController.signal)
7965
8021
  : Promise.resolve();
7966
8022
  await Promise.all([pageHydration, isolatedHydration]);` : "await pageHydration;"}
@@ -8068,7 +8124,7 @@ function generateClientManifest(bundle) {
8068
8124
  async function defineConfig(config = {}) {
8069
8125
  const tailwindVitePlugin = await _chunkDMSXZNQRcjs.loadTailwindVitePlugin.call(void 0, );
8070
8126
  const appRoot = path6.resolve(config.root || process.cwd());
8071
- if (_optionalChain([config, 'access', _510 => _510.extends, 'optionalAccess', _511 => _511.length])) {
8127
+ if (_optionalChain([config, 'access', _511 => _511.extends, 'optionalAccess', _512 => _512.length])) {
8072
8128
  const { config: layeredConfig } = await import("./layers-XLOMMQP7.cjs").then(
8073
8129
  ({ resolveFarmLayers }) => resolveFarmLayers(config, {
8074
8130
  root: appRoot,
@@ -8077,12 +8133,12 @@ async function defineConfig(config = {}) {
8077
8133
  );
8078
8134
  config = layeredConfig;
8079
8135
  }
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, {
8136
+ config.renderer = _chunk3OKSEJ33cjs.resolveFarmRenderer.call(void 0, config.renderer);
8137
+ config.images = _chunkOFVBMS6Icjs.resolveFarmImageProviderForRuntime.call(void 0, config.images, { root: appRoot, dev: true });
8138
+ const rendererVitePlugins = await _chunk3OKSEJ33cjs.loadFarmRendererVitePlugins.call(void 0, config.renderer, appRoot, {
8083
8139
  ssr: true
8084
8140
  });
8085
- const reactRefreshPlugins = _chunkNGTZHWBGcjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8141
+ const reactRefreshPlugins = _chunk3OKSEJ33cjs.isReactRenderer.call(void 0, config.renderer) ? await _chunkY2FEFQAYcjs.createFarmReactRefreshPlugins.call(void 0, ) : [];
8086
8142
  const nodeBuiltinStubs = {
8087
8143
  "node:string_decoder": "data:text/javascript,export class StringDecoder { write(buf) { return ''; } end() { return ''; } }; export default StringDecoder;",
8088
8144
  "node:buffer": "data:text/javascript,export const Buffer = { from: () => ({}), alloc: () => ({}), isBuffer: () => false }; export default { Buffer };",
@@ -8170,13 +8226,13 @@ async function defineConfig(config = {}) {
8170
8226
  if (!serverStarted) {
8171
8227
  serverStarted = true;
8172
8228
  const elapsed = Date.now() - startTime;
8173
- const address = _optionalChain([server, 'access', _512 => _512.httpServer, 'optionalAccess', _513 => _513.address, 'call', _514 => _514()]);
8229
+ const address = _optionalChain([server, 'access', _513 => _513.httpServer, 'optionalAccess', _514 => _514.address, 'call', _515 => _515()]);
8174
8230
  const resolvedPort = typeof address === "object" && address ? address.port : server.config.server.port || port || 3e3;
8175
8231
  const hostConfig = server.config.server.host;
8176
8232
  const isExposed = hostConfig === true || hostConfig === "0.0.0.0";
8177
8233
  console.log("");
8178
8234
  console.log(
8179
- ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunk3CZ4MJHWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8235
+ ` ${pc.bold(pc.green("Farm.js"))} ${pc.dim(`v${_chunkCVZY4TLWcjs.FARM_VERSION}`)} ${pc.dim(`ready in ${elapsed}ms`)}`
8180
8236
  );
8181
8237
  console.log("");
8182
8238
  console.log(
@@ -8210,7 +8266,7 @@ async function defineConfig(config = {}) {
8210
8266
  plugins: [
8211
8267
  // `farm dev --desktop`: only the desktop window gets an answer, as in the packaged app.
8212
8268
  _chunkY2FEFQAYcjs.farmDesktopDevGuardPlugin.call(void 0, config.basePath),
8213
- _chunkJHRJ5V2Fcjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8269
+ _chunkOFVBMS6Icjs.createFarmThemeCssPlugin.call(void 0, config.theme, config.basePath),
8214
8270
  tailwindVitePlugin,
8215
8271
  ...rendererVitePlugins,
8216
8272
  ...reactRefreshPlugins,
@@ -8220,14 +8276,14 @@ async function defineConfig(config = {}) {
8220
8276
  farmNavigationPlugin(config.renderer),
8221
8277
  farmIslandContainersPlugin(config),
8222
8278
  farmPlugin(config),
8223
- _chunkEFI6QWBQcjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8279
+ _chunkEBSL5TW7cjs.farmEnvironmentFunctionsPlugin.call(void 0, config),
8224
8280
  farmBrandingPlugin
8225
8281
  ],
8226
8282
  customLogger: farmLogger,
8227
8283
  clearScreen: false,
8228
8284
  optimizeDeps: {
8229
- ..._chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsConfig.call(void 0,
8230
- _chunkJHRJ5V2Fcjs.createFarmClientOptimizeDepsEntries.call(void 0,
8285
+ ..._chunkOFVBMS6Icjs.createFarmClientOptimizeDepsConfig.call(void 0,
8286
+ _chunkOFVBMS6Icjs.createFarmClientOptimizeDepsEntries.call(void 0,
8231
8287
  appRoot,
8232
8288
  _chunk52Q4OB4Acjs.getFarmAppDirectories.call(void 0, { ...config, root: appRoot })
8233
8289
  ),
@@ -8271,7 +8327,7 @@ async function defineConfig(config = {}) {
8271
8327
  // Stub out problematic server-only modules during dev mode
8272
8328
  alias: {
8273
8329
  ..._chunk52Q4OB4Acjs.getFarmLayerAliases.call(void 0, config.layers),
8274
- ..._chunkJHRJ5V2Fcjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8330
+ ..._chunkOFVBMS6Icjs.createFarmSourceAlias.call(void 0, appRoot, config.srcDir),
8275
8331
  // Nitro internals that should not be resolved in browser
8276
8332
  "supports-color": "data:text/javascript,export default false; export const supportsColor = false; export const stdout = false; export const stderr = false;",
8277
8333
  "@poppinss/dumper": "data:text/javascript,export default {};",