@absolutejs/absolute 0.20.0-beta.140 → 0.20.0-beta.141

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.
package/dist/build.js CHANGED
@@ -14090,6 +14090,109 @@ var init_pwa = __esm(() => {
14090
14090
  init_syncSchema();
14091
14091
  });
14092
14092
 
14093
+ // src/core/precompressed.ts
14094
+ import { readdir as readdir4, readFile as readFile6, stat as stat2, writeFile as writeFile6 } from "fs/promises";
14095
+ import { extname as extname10, join as join30, relative as relative14, resolve as resolve24, sep as sep3 } from "path";
14096
+ import { promisify } from "util";
14097
+ import { brotliCompress, constants, gzip } from "zlib";
14098
+ import { Elysia as Elysia2 } from "elysia";
14099
+ var COMPRESSIBLE_EXTENSIONS, MIN_COMPRESSIBLE_BYTES = 1024, MIN_SAVING_RATIO = 0.9, BROTLI_QUALITY = 9, GZIP_LEVEL = 9, brotliAsync, gzipAsync, ENCODINGS, listFiles = async (directory) => {
14100
+ const entries = await readdir4(directory, { withFileTypes: true }).catch(() => []);
14101
+ const nested = await Promise.all(entries.map((entry) => {
14102
+ const path = join30(directory, entry.name);
14103
+ return entry.isDirectory() ? listFiles(path) : Promise.resolve(entry.isFile() ? [path] : []);
14104
+ }));
14105
+ return nested.flat();
14106
+ }, isCompressible = (path) => COMPRESSIBLE_EXTENSIONS.has(extname10(path).toLowerCase()), acceptedEncodings = (header) => {
14107
+ const accepted = new Set((header ?? "").split(",").map((part) => part.trim().split(";")).filter(([, quality]) => !quality || !/^\s*q=0(\.0*)?\s*$/u.test(quality)).map(([name]) => name?.trim().toLowerCase()));
14108
+ return ENCODINGS.filter(({ encoding }) => accepted.has(encoding));
14109
+ }, assetCacheControl = (pathname) => isFingerprintedAsset(pathname) ? "public, max-age=31536000, immutable" : "public, max-age=0, must-revalidate", createPrecompressedPlugin = async (buildDir) => {
14110
+ const root = resolve24(buildDir);
14111
+ const copies = new Map;
14112
+ for (const path of await listFiles(root)) {
14113
+ const encoding = ENCODINGS.find(({ suffix }) => path.endsWith(suffix));
14114
+ if (!encoding)
14115
+ continue;
14116
+ const original = path.slice(0, -encoding.suffix.length);
14117
+ const pathname = `/${relative14(root, original).split(sep3).join("/")}`;
14118
+ const known = copies.get(pathname) ?? new Set;
14119
+ known.add(encoding.encoding);
14120
+ copies.set(pathname, known);
14121
+ }
14122
+ return new Elysia2({ name: "absolutejs-precompressed" }).request(({ request }) => {
14123
+ if (copies.size === 0)
14124
+ return;
14125
+ if (request.method !== "GET" && request.method !== "HEAD")
14126
+ return;
14127
+ const { pathname } = new URL(request.url);
14128
+ const available = copies.get(decodeURIComponent(pathname));
14129
+ if (!available)
14130
+ return;
14131
+ const chosen = acceptedEncodings(request.headers.get("accept-encoding")).find(({ encoding }) => available.has(encoding));
14132
+ if (!chosen)
14133
+ return;
14134
+ const original = Bun.file(join30(root, pathname));
14135
+ return new Response(Bun.file(`${join30(root, pathname)}${chosen.suffix}`), {
14136
+ headers: {
14137
+ "cache-control": assetCacheControl(pathname),
14138
+ "content-encoding": chosen.encoding,
14139
+ "content-type": original.type,
14140
+ vary: "Accept-Encoding"
14141
+ }
14142
+ });
14143
+ });
14144
+ }, isFingerprintedAsset = (pathname) => {
14145
+ if (pathname.startsWith("/.absolutejs/"))
14146
+ return true;
14147
+ const base = pathname.slice(pathname.lastIndexOf("/") + 1);
14148
+ const hash = base.match(/[.-]([0-9a-z]{6,12})\.[0-9a-z]+$/i)?.[1];
14149
+ return hash ? /[0-9]/.test(hash) && /[a-z]/i.test(hash) : false;
14150
+ }, writePrecompressedAssets = async (buildDir) => {
14151
+ const files = (await listFiles(buildDir)).filter(isCompressible);
14152
+ const written = await Promise.all(files.map(async (path) => {
14153
+ if ((await stat2(path)).size < MIN_COMPRESSIBLE_BYTES)
14154
+ return false;
14155
+ const content = await readFile6(path);
14156
+ const limit = content.byteLength * MIN_SAVING_RATIO;
14157
+ const [brotli, gzipped] = await Promise.all([
14158
+ brotliAsync(content, {
14159
+ params: {
14160
+ [constants.BROTLI_PARAM_QUALITY]: BROTLI_QUALITY,
14161
+ [constants.BROTLI_PARAM_SIZE_HINT]: content.byteLength
14162
+ }
14163
+ }),
14164
+ gzipAsync(content, { level: GZIP_LEVEL })
14165
+ ]);
14166
+ if (brotli.byteLength > limit)
14167
+ return false;
14168
+ await Promise.all([
14169
+ writeFile6(`${path}.br`, brotli),
14170
+ writeFile6(`${path}.gz`, gzipped)
14171
+ ]);
14172
+ return true;
14173
+ }));
14174
+ return written.filter(Boolean).length;
14175
+ };
14176
+ var init_precompressed = __esm(() => {
14177
+ COMPRESSIBLE_EXTENSIONS = new Set([
14178
+ ".css",
14179
+ ".html",
14180
+ ".js",
14181
+ ".json",
14182
+ ".mjs",
14183
+ ".svg",
14184
+ ".txt",
14185
+ ".webmanifest",
14186
+ ".xml"
14187
+ ]);
14188
+ brotliAsync = promisify(brotliCompress);
14189
+ gzipAsync = promisify(gzip);
14190
+ ENCODINGS = [
14191
+ { encoding: "br", suffix: ".br" },
14192
+ { encoding: "gzip", suffix: ".gz" }
14193
+ ];
14194
+ });
14195
+
14093
14196
  // src/dev/angular/hmrImportGenerator.ts
14094
14197
  import ts9 from "typescript";
14095
14198
  var createHmrImportGenerator = (namespaceMap) => ({
@@ -14793,7 +14896,7 @@ var init_typescript_translator = __esm(() => {
14793
14896
 
14794
14897
  // src/dev/angular/fastHmrCompiler.ts
14795
14898
  import { existsSync as existsSync23, readFileSync as readFileSync17, statSync as statSync4 } from "fs";
14796
- import { dirname as dirname16, extname as extname10, relative as relative14, resolve as resolve24 } from "path";
14899
+ import { dirname as dirname16, extname as extname11, relative as relative15, resolve as resolve25 } from "path";
14797
14900
  import ts12 from "typescript";
14798
14901
  var fail = (reason, detail, location) => ({
14799
14902
  detail,
@@ -14905,7 +15008,7 @@ var fail = (reason, detail, location) => ({
14905
15008
  const decoratorName = findAngularDecoratorName(decorators);
14906
15009
  if (!decoratorName)
14907
15010
  continue;
14908
- const projectRel = relative14(process.cwd(), componentFilePath).replace(/\\/g, "/");
15011
+ const projectRel = relative15(process.cwd(), componentFilePath).replace(/\\/g, "/");
14909
15012
  const id = encodeURIComponent(`${projectRel}@${className}`);
14910
15013
  if (decoratorName === "Component") {
14911
15014
  const componentDecorator = decorators.find((d) => {
@@ -15106,7 +15209,7 @@ var fail = (reason, detail, location) => ({
15106
15209
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
15107
15210
  return true;
15108
15211
  }
15109
- const base = resolve24(componentDir, spec);
15212
+ const base = resolve25(componentDir, spec);
15110
15213
  const candidates = [
15111
15214
  `${base}.ts`,
15112
15215
  `${base}.tsx`,
@@ -15922,7 +16025,7 @@ var fail = (reason, detail, location) => ({
15922
16025
  return null;
15923
16026
  }, resolveDtsFromSpec = (spec, fromDir) => {
15924
16027
  const stripped = spec.replace(/\.[mc]?js$/, "");
15925
- const base = resolve24(fromDir, stripped);
16028
+ const base = resolve25(fromDir, stripped);
15926
16029
  const candidates = [
15927
16030
  `${base}.d.ts`,
15928
16031
  `${base}.d.mts`,
@@ -15946,7 +16049,7 @@ var fail = (reason, detail, location) => ({
15946
16049
  return null;
15947
16050
  }, resolveChildComponentInfo = (className, spec, componentDir, projectRoot) => {
15948
16051
  if (spec.startsWith(".") || spec.startsWith("/")) {
15949
- const base = resolve24(componentDir, spec);
16052
+ const base = resolve25(componentDir, spec);
15950
16053
  const candidates = [
15951
16054
  `${base}.ts`,
15952
16055
  `${base}.tsx`,
@@ -16165,13 +16268,13 @@ var fail = (reason, detail, location) => ({
16165
16268
  }
16166
16269
  if (!matches)
16167
16270
  continue;
16168
- const resolved = resolve24(componentDir, spec);
16271
+ const resolved = resolve25(componentDir, spec);
16169
16272
  for (const ext of TS_EXTENSIONS) {
16170
16273
  const candidate = resolved + ext;
16171
16274
  if (existsSync23(candidate))
16172
16275
  return candidate;
16173
16276
  }
16174
- const indexCandidate = resolve24(resolved, "index.ts");
16277
+ const indexCandidate = resolve25(resolved, "index.ts");
16175
16278
  if (existsSync23(indexCandidate))
16176
16279
  return indexCandidate;
16177
16280
  }
@@ -16409,10 +16512,10 @@ ${transpiled}
16409
16512
  }
16410
16513
  }${staticPatch}`;
16411
16514
  }, STYLE_PREPROCESSED_EXT, resolveAndReadStyleResource = (componentDir, url) => {
16412
- const abs = resolve24(componentDir, url);
16515
+ const abs = resolve25(componentDir, url);
16413
16516
  if (!existsSync23(abs))
16414
16517
  return null;
16415
- const ext = extname10(abs).toLowerCase();
16518
+ const ext = extname11(abs).toLowerCase();
16416
16519
  if (!STYLE_PREPROCESSED_EXT.has(ext) || ext === ".css") {
16417
16520
  return readFileSync17(abs, "utf8");
16418
16521
  }
@@ -16448,7 +16551,7 @@ ${block}
16448
16551
  const cached = projectOptionsCache.get(projectRoot);
16449
16552
  if (cached !== undefined)
16450
16553
  return cached;
16451
- const tsconfigPath = resolve24(projectRoot, "tsconfig.json");
16554
+ const tsconfigPath = resolve25(projectRoot, "tsconfig.json");
16452
16555
  const opts = {};
16453
16556
  if (existsSync23(tsconfigPath)) {
16454
16557
  try {
@@ -16494,7 +16597,7 @@ ${block}
16494
16597
  }
16495
16598
  const kind = params.kind ?? "component";
16496
16599
  if (kind !== "component") {
16497
- const entityId = encodeURIComponent(`${relative14(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
16600
+ const entityId = encodeURIComponent(`${relative15(projectRoot, componentFilePath).replace(/\\/g, "/")}@${className}`);
16498
16601
  const currentEntityFingerprint = extractEntityFingerprint(classNode, className, sourceFile);
16499
16602
  const cachedEntityFingerprint = entityFingerprintCache.get(entityId);
16500
16603
  if (cachedEntityFingerprint !== undefined && !entityFingerprintsEqual(cachedEntityFingerprint, currentEntityFingerprint)) {
@@ -16532,7 +16635,7 @@ ${block}
16532
16635
  templateText = decoratorMeta.template;
16533
16636
  templatePath = componentFilePath;
16534
16637
  } else if (decoratorMeta.templateUrl) {
16535
- const tplAbs = resolve24(componentDir, decoratorMeta.templateUrl);
16638
+ const tplAbs = resolve25(componentDir, decoratorMeta.templateUrl);
16536
16639
  if (!existsSync23(tplAbs)) {
16537
16640
  return fail("template-resource-not-found", `Template file not found: ${tplAbs}`, { file: componentFilePath });
16538
16641
  }
@@ -16578,7 +16681,7 @@ ${block}
16578
16681
  return fail("class-not-found", "anonymous class");
16579
16682
  const wrappedClass = new compiler.WrappedNodeExpr(className_);
16580
16683
  const { inputs, outputs, hasDecoratorIO, hasSignalIO } = extractInputsAndOutputs(classNode, compiler);
16581
- const projectRelPath = relative14(projectRoot, componentFilePath).replace(/\\/g, "/");
16684
+ const projectRelPath = relative15(projectRoot, componentFilePath).replace(/\\/g, "/");
16582
16685
  const fingerprintId = encodeURIComponent(`${projectRelPath}@${className}`);
16583
16686
  const currentFingerprint = extractFingerprint(classNode, className, decoratorMeta, inputs, outputs, sourceFile, componentDir);
16584
16687
  const cachedFingerprint = fingerprintCache.get(fingerprintId);
@@ -16857,7 +16960,7 @@ var init_fastHmrCompiler = __esm(() => {
16857
16960
 
16858
16961
  // src/build/scanVueSsrOnlyPages.ts
16859
16962
  import { readdirSync as readdirSync3, readFileSync as readFileSync18 } from "fs";
16860
- import { join as join30 } from "path";
16963
+ import { join as join31 } from "path";
16861
16964
  import ts13 from "typescript";
16862
16965
  var SKIP_DIRS2, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
16863
16966
  if (filePath.endsWith(".tsx"))
@@ -16890,9 +16993,9 @@ var SKIP_DIRS2, SOURCE_EXTENSIONS3, getScriptKind3 = (filePath) => {
16890
16993
  continue;
16891
16994
  if (entry.name.startsWith("."))
16892
16995
  continue;
16893
- stack.push(join30(dir, entry.name));
16996
+ stack.push(join31(dir, entry.name));
16894
16997
  } else if (entry.isFile() && hasSourceExtension2(entry.name)) {
16895
- out.push(join30(dir, entry.name));
16998
+ out.push(join31(dir, entry.name));
16896
16999
  }
16897
17000
  }
16898
17001
  }
@@ -17012,7 +17115,7 @@ var init_scanVueSsrOnlyPages = __esm(() => {
17012
17115
 
17013
17116
  // src/build/scanAngularHandlerCalls.ts
17014
17117
  import { readdirSync as readdirSync4, readFileSync as readFileSync19 } from "fs";
17015
- import { join as join31 } from "path";
17118
+ import { join as join32 } from "path";
17016
17119
  import ts14 from "typescript";
17017
17120
  var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS4, SERVER_ENTRY_COPY_PREFIX = ".absolutejs-hmr-", getScriptKind4 = (filePath) => {
17018
17121
  if (filePath.endsWith(".tsx"))
@@ -17045,9 +17148,9 @@ var ELYSIA_ROUTE_METHODS2, SKIP_DIRS3, SOURCE_EXTENSIONS4, SERVER_ENTRY_COPY_PRE
17045
17148
  continue;
17046
17149
  if (entry.name.startsWith("."))
17047
17150
  continue;
17048
- stack.push(join31(dir, entry.name));
17151
+ stack.push(join32(dir, entry.name));
17049
17152
  } else if (entry.isFile() && !entry.name.startsWith(SERVER_ENTRY_COPY_PREFIX) && hasSourceExtension3(entry.name)) {
17050
- out.push(join31(dir, entry.name));
17153
+ out.push(join32(dir, entry.name));
17051
17154
  }
17052
17155
  }
17053
17156
  }
@@ -17162,7 +17265,7 @@ var init_scanAngularHandlerCalls = __esm(() => {
17162
17265
 
17163
17266
  // src/build/scanAngularPageRoutes.ts
17164
17267
  import { readdirSync as readdirSync5, readFileSync as readFileSync20 } from "fs";
17165
- import { basename as basename12, join as join32 } from "path";
17268
+ import { basename as basename12, join as join33 } from "path";
17166
17269
  import ts15 from "typescript";
17167
17270
  var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
17168
17271
  const idx = filePath.lastIndexOf(".");
@@ -17202,9 +17305,9 @@ var SOURCE_EXTENSIONS5, SKIP_DIRS4, hasSourceExtension4 = (filePath) => {
17202
17305
  continue;
17203
17306
  if (entry.name.startsWith("."))
17204
17307
  continue;
17205
- stack.push(join32(dir, entry.name));
17308
+ stack.push(join33(dir, entry.name));
17206
17309
  } else if (entry.isFile() && isPageFile(entry.name)) {
17207
- out.push(join32(dir, entry.name));
17310
+ out.push(join33(dir, entry.name));
17208
17311
  }
17209
17312
  }
17210
17313
  }
@@ -17273,7 +17376,7 @@ var init_runAngularHandlerScan = __esm(() => {
17273
17376
 
17274
17377
  // src/build/parseAngularConfigImports.ts
17275
17378
  import { existsSync as existsSync24, readFileSync as readFileSync21 } from "fs";
17276
- import { dirname as dirname17, isAbsolute as isAbsolute6, join as join33 } from "path";
17379
+ import { dirname as dirname17, isAbsolute as isAbsolute6, join as join34 } from "path";
17277
17380
  import ts16 from "typescript";
17278
17381
  var findDefineConfigCall = (sf) => {
17279
17382
  let result = null;
@@ -17328,15 +17431,15 @@ var findDefineConfigCall = (sf) => {
17328
17431
  }, resolveConfigPath = (projectRoot) => {
17329
17432
  const envOverride = process.env.ABSOLUTE_CONFIG;
17330
17433
  if (envOverride) {
17331
- const resolved = isAbsolute6(envOverride) ? envOverride : join33(projectRoot, envOverride);
17434
+ const resolved = isAbsolute6(envOverride) ? envOverride : join34(projectRoot, envOverride);
17332
17435
  if (existsSync24(resolved))
17333
17436
  return resolved;
17334
17437
  }
17335
17438
  const candidates = [
17336
- join33(projectRoot, "absolute.config.ts"),
17337
- join33(projectRoot, "absolute.config.mts"),
17338
- join33(projectRoot, "absolute.config.js"),
17339
- join33(projectRoot, "absolute.config.mjs")
17439
+ join34(projectRoot, "absolute.config.ts"),
17440
+ join34(projectRoot, "absolute.config.mts"),
17441
+ join34(projectRoot, "absolute.config.js"),
17442
+ join34(projectRoot, "absolute.config.mjs")
17340
17443
  ];
17341
17444
  for (const candidate of candidates) {
17342
17445
  if (existsSync24(candidate))
@@ -17369,7 +17472,7 @@ var findDefineConfigCall = (sf) => {
17369
17472
  if (!importInfo)
17370
17473
  return null;
17371
17474
  const configDir = dirname17(configPath);
17372
- const absolutePath = importInfo.source.startsWith(".") ? join33(configDir, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute6(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
17475
+ const absolutePath = importInfo.source.startsWith(".") ? join34(configDir, importInfo.source).replace(/\.[cm]?[tj]sx?$/, "") : isAbsolute6(importInfo.source) ? importInfo.source.replace(/\.[cm]?[tj]sx?$/, "") : importInfo.source;
17373
17476
  return {
17374
17477
  absolutePath,
17375
17478
  bindingName: binding,
@@ -17508,28 +17611,28 @@ var init_renderToReadableStream = __esm(() => {
17508
17611
 
17509
17612
  // src/build/compileSvelte.ts
17510
17613
  import { existsSync as existsSync25 } from "fs";
17511
- import { mkdir as mkdir6, stat as stat2 } from "fs/promises";
17614
+ import { mkdir as mkdir6, stat as stat3 } from "fs/promises";
17512
17615
  import {
17513
17616
  dirname as dirname18,
17514
- join as join34,
17617
+ join as join35,
17515
17618
  basename as basename13,
17516
- extname as extname11,
17517
- resolve as resolve25,
17518
- relative as relative15,
17519
- sep as sep3
17619
+ extname as extname12,
17620
+ resolve as resolve26,
17621
+ relative as relative16,
17622
+ sep as sep4
17520
17623
  } from "path";
17521
17624
  import { env } from "process";
17522
17625
  var {write: write2, file, Transpiler: Transpiler2 } = globalThis.Bun;
17523
17626
  var resolveDevClientDir2 = () => {
17524
17627
  const projectRoot = process.cwd();
17525
- const fromSource = resolve25(import.meta.dir, "../dev/client");
17628
+ const fromSource = resolve26(import.meta.dir, "../dev/client");
17526
17629
  if (existsSync25(fromSource) && fromSource.startsWith(projectRoot)) {
17527
17630
  return fromSource;
17528
17631
  }
17529
- const fromNodeModules = resolve25(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
17632
+ const fromNodeModules = resolve26(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
17530
17633
  if (existsSync25(fromNodeModules))
17531
17634
  return fromNodeModules;
17532
- return resolve25(import.meta.dir, "./dev/client");
17635
+ return resolve26(import.meta.dir, "./dev/client");
17533
17636
  }, devClientDir2, hmrClientPath3, persistentCache, sourceHashCache, transpiler3, removeUnusedRequireHelper = (code) => {
17534
17637
  const helperStart = code.indexOf("var __require = /* @__PURE__ */");
17535
17638
  if (helperStart === -1) {
@@ -17548,7 +17651,7 @@ var resolveDevClientDir2 = () => {
17548
17651
  return /\b__require\b/.test(stripped) ? code : stripped;
17549
17652
  }, exists = async (path) => {
17550
17653
  try {
17551
- await stat2(path);
17654
+ await stat3(path);
17552
17655
  return true;
17553
17656
  } catch {
17554
17657
  return false;
@@ -17556,7 +17659,7 @@ var resolveDevClientDir2 = () => {
17556
17659
  }, resolveRelativeModule2 = async (spec, from) => {
17557
17660
  if (!spec.startsWith("."))
17558
17661
  return null;
17559
- const basePath = resolve25(dirname18(from), spec);
17662
+ const basePath = resolve26(dirname18(from), spec);
17560
17663
  const candidates = [
17561
17664
  basePath,
17562
17665
  `${basePath}.ts`,
@@ -17567,14 +17670,14 @@ var resolveDevClientDir2 = () => {
17567
17670
  `${basePath}.svelte`,
17568
17671
  `${basePath}.svelte.ts`,
17569
17672
  `${basePath}.svelte.js`,
17570
- join34(basePath, "index.ts"),
17571
- join34(basePath, "index.js"),
17572
- join34(basePath, "index.mjs"),
17573
- join34(basePath, "index.cjs"),
17574
- join34(basePath, "index.json"),
17575
- join34(basePath, "index.svelte"),
17576
- join34(basePath, "index.svelte.ts"),
17577
- join34(basePath, "index.svelte.js")
17673
+ join35(basePath, "index.ts"),
17674
+ join35(basePath, "index.js"),
17675
+ join35(basePath, "index.mjs"),
17676
+ join35(basePath, "index.cjs"),
17677
+ join35(basePath, "index.json"),
17678
+ join35(basePath, "index.svelte"),
17679
+ join35(basePath, "index.svelte.ts"),
17680
+ join35(basePath, "index.svelte.js")
17578
17681
  ];
17579
17682
  const checks = await Promise.all(candidates.map(exists));
17580
17683
  return candidates.find((_, index) => checks[index]) ?? null;
@@ -17583,7 +17686,7 @@ var resolveDevClientDir2 = () => {
17583
17686
  const resolved = resolvePackageImport(spec);
17584
17687
  return resolved && /\.svelte(\.(?:ts|js))?$/.test(resolved) ? resolved : null;
17585
17688
  }
17586
- const basePath = resolve25(dirname18(from), spec);
17689
+ const basePath = resolve26(dirname18(from), spec);
17587
17690
  const explicit = /\.(svelte|svelte\.(?:ts|js))$/.test(basePath);
17588
17691
  if (!explicit) {
17589
17692
  const extensions = [".svelte", ".svelte.ts", ".svelte.js"];
@@ -17604,8 +17707,8 @@ var resolveDevClientDir2 = () => {
17604
17707
  return jsPath;
17605
17708
  return null;
17606
17709
  }, addModuleRewrite = (rewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir) => {
17607
- const toServer = relative15(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
17608
- const toClient = relative15(clientOutputDir, resolvedModule).replace(/\\/g, "/");
17710
+ const toServer = relative16(ssrOutputDir, resolvedModule).replace(/\\/g, "/");
17711
+ const toClient = relative16(clientOutputDir, resolvedModule).replace(/\\/g, "/");
17609
17712
  rewrites.set(rawSpec, {
17610
17713
  client: toClient.startsWith(".") || toClient.startsWith("/") ? toClient : `./${toClient}`,
17611
17714
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -17613,9 +17716,9 @@ var resolveDevClientDir2 = () => {
17613
17716
  }, compileSvelte = async (entryPoints, svelteRoot, cache = new Map, isDev = false, stylePreprocessors) => {
17614
17717
  const { compile, compileModule, preprocess } = await import("svelte/compiler");
17615
17718
  const generatedDir = getFrameworkGeneratedDir("svelte");
17616
- const clientDir = join34(generatedDir, "client");
17617
- const indexDir = join34(generatedDir, "indexes");
17618
- const serverDir = join34(generatedDir, "server");
17719
+ const clientDir = join35(generatedDir, "client");
17720
+ const indexDir = join35(generatedDir, "indexes");
17721
+ const serverDir = join35(generatedDir, "server");
17619
17722
  await Promise.all([clientDir, indexDir, serverDir].map((dir) => mkdir6(dir, { recursive: true })));
17620
17723
  const dev = env.NODE_ENV !== "production";
17621
17724
  const build = async (src) => {
@@ -17643,8 +17746,8 @@ var resolveDevClientDir2 = () => {
17643
17746
  const preprocessedClient = isModule ? loweredClientSource.code : (await preprocess(loweredClientSource.code, svelteStylePreprocessor)).code;
17644
17747
  const transpiledServer = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedServer) : preprocessedServer;
17645
17748
  const transpiledClient = src.endsWith(".ts") || src.endsWith(".svelte.ts") ? transpiler3.transformSync(preprocessedClient) : preprocessedClient;
17646
- const rawRel = dirname18(relative15(svelteRoot, src)).replace(/\\/g, "/");
17647
- const relDir = rawRel.startsWith("..") ? `_ext/${relative15(process.cwd(), dirname18(src)).replace(/\\/g, "/")}` : rawRel;
17749
+ const rawRel = dirname18(relative16(svelteRoot, src)).replace(/\\/g, "/");
17750
+ const relDir = rawRel.startsWith("..") ? `_ext/${relative16(process.cwd(), dirname18(src)).replace(/\\/g, "/")}` : rawRel;
17648
17751
  const baseName = basename13(src).replace(/\.svelte(\.(ts|js))?$/, "");
17649
17752
  const importPaths = Array.from(transpiledServer.matchAll(/from\s+['"]([^'"]+)['"]/g)).map((match) => match[1]).filter((path) => path !== undefined);
17650
17753
  const resolvedModuleImports = await Promise.all(importPaths.map((importPath) => resolveRelativeModule2(importPath, src)));
@@ -17653,8 +17756,8 @@ var resolveDevClientDir2 = () => {
17653
17756
  const childBuilt = await Promise.all(childSources.map((child) => build(child)));
17654
17757
  const hasAwaitSlotFromChildren = childBuilt.some((child) => child.hasAwaitSlot);
17655
17758
  const externalRewrites = new Map;
17656
- const ssrOutputDir = dirname18(join34(serverDir, relDir, `${baseName}.js`));
17657
- const clientOutputDir = dirname18(join34(clientDir, relDir, `${baseName}.js`));
17759
+ const ssrOutputDir = dirname18(join35(serverDir, relDir, `${baseName}.js`));
17760
+ const clientOutputDir = dirname18(join35(clientDir, relDir, `${baseName}.js`));
17658
17761
  for (let idx = 0;idx < importPaths.length; idx++) {
17659
17762
  const rawSpec = importPaths[idx];
17660
17763
  if (!rawSpec)
@@ -17665,15 +17768,15 @@ var resolveDevClientDir2 = () => {
17665
17768
  addModuleRewrite(externalRewrites, rawSpec, resolvedModule, ssrOutputDir, clientOutputDir);
17666
17769
  if (!resolved)
17667
17770
  continue;
17668
- const childRel = relative15(svelteRoot, resolved).replace(/\\/g, "/");
17771
+ const childRel = relative16(svelteRoot, resolved).replace(/\\/g, "/");
17669
17772
  if (!childRel.startsWith(".."))
17670
17773
  continue;
17671
17774
  const childBuilt = cache.get(resolved);
17672
17775
  if (!childBuilt)
17673
17776
  continue;
17674
17777
  const origSpec = rawSpec.replace(/\.svelte(?:\.(?:ts|js))?$/, ".js");
17675
- const toServer = relative15(ssrOutputDir, childBuilt.ssr).replace(/\\/g, "/");
17676
- const toClient = relative15(clientOutputDir, childBuilt.client).replace(/\\/g, "/");
17778
+ const toServer = relative16(ssrOutputDir, childBuilt.ssr).replace(/\\/g, "/");
17779
+ const toClient = relative16(clientOutputDir, childBuilt.client).replace(/\\/g, "/");
17677
17780
  externalRewrites.set(origSpec, {
17678
17781
  client: toClient.startsWith(".") ? toClient : `./${toClient}`,
17679
17782
  server: toServer.startsWith(".") ? toServer : `./${toServer}`
@@ -17707,7 +17810,7 @@ var resolveDevClientDir2 = () => {
17707
17810
  }).js;
17708
17811
  let code = compiledJs.code.replace(/\.svelte(?:\.(?:ts|js))?(['"])/g, ".js$1");
17709
17812
  if (mode === "client" && isDev) {
17710
- const moduleKey = `/@src/${relative15(process.cwd(), src).replace(/\\/g, "/")}`;
17813
+ const moduleKey = `/@src/${relative16(process.cwd(), src).replace(/\\/g, "/")}`;
17711
17814
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
17712
17815
  if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
17713
17816
  var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleKey)}] = cb; };`);
@@ -17719,8 +17822,8 @@ var resolveDevClientDir2 = () => {
17719
17822
  code += islandMetadataExports;
17720
17823
  return { code, map: compiledJs.map };
17721
17824
  };
17722
- const ssrPath = join34(serverDir, relDir, `${baseName}.js`);
17723
- const clientPath = join34(clientDir, relDir, `${baseName}.js`);
17825
+ const ssrPath = join35(serverDir, relDir, `${baseName}.js`);
17826
+ const clientPath = join35(clientDir, relDir, `${baseName}.js`);
17724
17827
  await Promise.all([
17725
17828
  mkdir6(dirname18(ssrPath), { recursive: true }),
17726
17829
  mkdir6(dirname18(clientPath), { recursive: true })
@@ -17758,10 +17861,10 @@ var resolveDevClientDir2 = () => {
17758
17861
  const roots = await Promise.all(entryPoints.map(build));
17759
17862
  const componentRoots = roots.filter((root) => !root.isModule);
17760
17863
  await Promise.all(componentRoots.map(async ({ client, hasAwaitSlot }) => {
17761
- const relClientDir = dirname18(relative15(clientDir, client));
17762
- const name = basename13(client, extname11(client));
17763
- const indexPath = join34(indexDir, relClientDir, `${name}.js`);
17764
- const importRaw = relative15(dirname18(indexPath), client).split(sep3).join("/");
17864
+ const relClientDir = dirname18(relative16(clientDir, client));
17865
+ const name = basename13(client, extname12(client));
17866
+ const indexPath = join35(indexDir, relClientDir, `${name}.js`);
17867
+ const importRaw = relative16(dirname18(indexPath), client).split(sep4).join("/");
17765
17868
  const importPath = importRaw.startsWith(".") || importRaw.startsWith("/") ? importRaw : `./${importRaw}`;
17766
17869
  const hmrImports = isDev ? `window.__HMR_FRAMEWORK__ = "svelte";
17767
17870
  import "${hmrClientPath3}";
@@ -17862,8 +17965,8 @@ if (typeof window !== "undefined") {
17862
17965
  return {
17863
17966
  svelteClientPaths: roots.map(({ client }) => client),
17864
17967
  svelteIndexPaths: componentRoots.map(({ client }) => {
17865
- const rel = dirname18(relative15(clientDir, client));
17866
- return join34(indexDir, rel, basename13(client));
17968
+ const rel = dirname18(relative16(clientDir, client));
17969
+ return join35(indexDir, rel, basename13(client));
17867
17970
  }),
17868
17971
  svelteServerPaths: roots.map(({ ssr }) => ssr)
17869
17972
  };
@@ -17878,7 +17981,7 @@ var init_compileSvelte = __esm(() => {
17878
17981
  init_lowerAwaitSlotSyntax();
17879
17982
  init_renderToReadableStream();
17880
17983
  devClientDir2 = resolveDevClientDir2();
17881
- hmrClientPath3 = join34(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
17984
+ hmrClientPath3 = join35(devClientDir2, "hmrClient.ts").replace(/\\/g, "/");
17882
17985
  persistentCache = new Map;
17883
17986
  sourceHashCache = new Map;
17884
17987
  transpiler3 = new Transpiler2({ loader: "ts", target: "browser" });
@@ -18368,8 +18471,8 @@ var init_chainInlineSourcemaps = __esm(() => {
18368
18471
  // src/build/vueCompileCache.ts
18369
18472
  import { createHash as createHash3 } from "crypto";
18370
18473
  import { existsSync as existsSync26, readFileSync as readFileSync23 } from "fs";
18371
- import { mkdir as mkdir7, rename, writeFile as writeFile6 } from "fs/promises";
18372
- import { join as join35, resolve as resolve26 } from "path";
18474
+ import { mkdir as mkdir7, rename, writeFile as writeFile7 } from "fs/promises";
18475
+ import { join as join36, resolve as resolve27 } from "path";
18373
18476
  var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs", CACHE_FORMAT_VERSION = 2, FILE_NAME_HASH_LENGTH = 32, vueCompileCacheEnabled = () => process.env.ABSOLUTE_COMPILE_CACHE !== "0", hashContent = (content) => createHash3("sha256").update(content).digest("hex"), hashParts = (parts) => {
18374
18477
  const hash = createHash3("sha256");
18375
18478
  for (const part of parts) {
@@ -18379,8 +18482,8 @@ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs",
18379
18482
  return hash.digest("hex");
18380
18483
  }, readOwnPackageVersion = () => {
18381
18484
  const candidates = [
18382
- resolve26(import.meta.dir, "..", "..", "package.json"),
18383
- resolve26(import.meta.dir, "..", "package.json")
18485
+ resolve27(import.meta.dir, "..", "..", "package.json"),
18486
+ resolve27(import.meta.dir, "..", "package.json")
18384
18487
  ];
18385
18488
  for (const candidate of candidates) {
18386
18489
  try {
@@ -18395,7 +18498,7 @@ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs",
18395
18498
  }, cachedFrameworkVersion, frameworkVersionForCache = () => {
18396
18499
  cachedFrameworkVersion ??= readOwnPackageVersion();
18397
18500
  return cachedFrameworkVersion;
18398
- }, vueCompileCacheDir = (projectRoot = process.cwd()) => join35(projectRoot, ABSOLUTE_CACHE_DIR_NAME2, CACHE_DIR_NAME, "vue"), entryFileFor = (sourceFilePath, projectRoot) => join35(vueCompileCacheDir(projectRoot), `${hashContent(sourceFilePath).slice(0, FILE_NAME_HASH_LENGTH)}.json`), vueCompileCacheFingerprint = (parts) => {
18501
+ }, vueCompileCacheDir = (projectRoot = process.cwd()) => join36(projectRoot, ABSOLUTE_CACHE_DIR_NAME2, CACHE_DIR_NAME, "vue"), entryFileFor = (sourceFilePath, projectRoot) => join36(vueCompileCacheDir(projectRoot), `${hashContent(sourceFilePath).slice(0, FILE_NAME_HASH_LENGTH)}.json`), vueCompileCacheFingerprint = (parts) => {
18399
18502
  const frameworkVersion = frameworkVersionForCache();
18400
18503
  if (!frameworkVersion)
18401
18504
  return null;
@@ -18447,7 +18550,7 @@ var CACHE_DIR_NAME = "compile-cache", ABSOLUTE_CACHE_DIR_NAME2 = ".absolutejs",
18447
18550
  try {
18448
18551
  await mkdir7(vueCompileCacheDir(projectRoot), { recursive: true });
18449
18552
  const tempFile = `${entryFile}.${process.pid}.tmp`;
18450
- await writeFile6(tempFile, JSON.stringify(entry));
18553
+ await writeFile7(tempFile, JSON.stringify(entry));
18451
18554
  await rename(tempFile, entryFile);
18452
18555
  } catch {}
18453
18556
  };
@@ -18460,9 +18563,9 @@ __export(exports_emitTsHelpers, {
18460
18563
  });
18461
18564
  var {file: file2, Transpiler: Transpiler3, write: write3 } = globalThis.Bun;
18462
18565
  import { copyFileSync as copyFileSync2, existsSync as existsSync27, readdirSync as readdirSync6 } from "fs";
18463
- import { mkdir as mkdir8, rename as rename2, writeFile as writeFile7 } from "fs/promises";
18464
- import { dirname as dirname19, join as join36 } from "path";
18465
- var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 1, HASH_LENGTH = 24, transpiler4, cacheDir = () => join36(process.cwd(), ".absolutejs", "compile-cache", CACHE_DIR_NAME2), cacheKey2 = (sourcePath, sourceCode) => {
18566
+ import { mkdir as mkdir8, rename as rename2, writeFile as writeFile8 } from "fs/promises";
18567
+ import { dirname as dirname19, join as join37 } from "path";
18568
+ var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 1, HASH_LENGTH = 24, transpiler4, cacheDir = () => join37(process.cwd(), ".absolutejs", "compile-cache", CACHE_DIR_NAME2), cacheKey2 = (sourcePath, sourceCode) => {
18466
18569
  const frameworkVersion = frameworkVersionForCache();
18467
18570
  if (!frameworkVersion || !vueCompileCacheEnabled())
18468
18571
  return null;
@@ -18495,13 +18598,13 @@ var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 1, HASH_LENGTH = 24
18495
18598
  }, publishCacheEntry = async (directory, fileName, pathHash, content) => {
18496
18599
  try {
18497
18600
  await mkdir8(directory, { recursive: true });
18498
- const target = join36(directory, fileName);
18601
+ const target = join37(directory, fileName);
18499
18602
  const temporary = `${target}.${process.pid}.tmp`;
18500
- await writeFile7(temporary, content);
18603
+ await writeFile8(temporary, content);
18501
18604
  await rename2(temporary, target);
18502
18605
  const superseded = entriesForPath(directory, pathHash).filter((name) => name !== fileName);
18503
18606
  existingEntries?.set(pathHash, [fileName]);
18504
- await Promise.all(superseded.map((name) => Bun.file(join36(directory, name)).delete().catch(() => {
18607
+ await Promise.all(superseded.map((name) => Bun.file(join37(directory, name)).delete().catch(() => {
18505
18608
  return;
18506
18609
  })));
18507
18610
  } catch {}
@@ -18530,7 +18633,7 @@ var CACHE_DIR_NAME2 = "vue-helpers", CACHE_FORMAT_VERSION2 = 1, HASH_LENGTH = 24
18530
18633
  const key = cacheKey2(sourcePath, sourceCode);
18531
18634
  const directory = cacheDir();
18532
18635
  const fileName = key ? `${key.path}-${key.content}.js` : null;
18533
- const cachedPath = fileName ? join36(directory, fileName) : null;
18636
+ const cachedPath = fileName ? join37(directory, fileName) : null;
18534
18637
  if (cachedPath && existsSync27(cachedPath)) {
18535
18638
  await copyBoth(clientOutputPath, serverOutputPath, cachedPath);
18536
18639
  return;
@@ -18555,7 +18658,7 @@ var init_emitTsHelpers = __esm(() => {
18555
18658
 
18556
18659
  // src/build/compileVueSfc.ts
18557
18660
  import { existsSync as existsSync28, readFileSync as readFileSync24, realpathSync as realpathSync2 } from "fs";
18558
- import { dirname as dirname20, relative as relative16, resolve as resolve27 } from "path";
18661
+ import { dirname as dirname20, relative as relative17, resolve as resolve28 } from "path";
18559
18662
  var {Transpiler: Transpiler4 } = globalThis.Bun;
18560
18663
  var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set) => {
18561
18664
  const resolved = realpathSync2(cssFilePath);
@@ -18564,7 +18667,7 @@ var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set)
18564
18667
  visited.add(resolved);
18565
18668
  const importRegex = /@import\s+(?:url\(\s*)?(['"])(\.{1,2}\/[^'"]+)\1\s*\)?\s*;?/g;
18566
18669
  return cssContent.replace(importRegex, (match, _quote, relPath) => {
18567
- const importedPath = resolve27(dirname20(cssFilePath), relPath);
18670
+ const importedPath = resolve28(dirname20(cssFilePath), relPath);
18568
18671
  if (!isFile(importedPath))
18569
18672
  return match;
18570
18673
  const importedContent = readFileSync24(importedPath, "utf-8");
@@ -18577,15 +18680,15 @@ var transpiler5, inlineCssImports = (cssContent, cssFilePath, visited = new Set)
18577
18680
  return filePath.replace(/\.ts$/, ".js");
18578
18681
  if (isStylePath(filePath)) {
18579
18682
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
18580
- return resolve27(sourceDir, filePath);
18683
+ return resolve28(sourceDir, filePath);
18581
18684
  }
18582
18685
  return filePath;
18583
18686
  }
18584
18687
  if (sourceDir && (filePath.startsWith("./") || filePath.startsWith("../"))) {
18585
- const directTs = resolve27(sourceDir, `${filePath}.ts`);
18688
+ const directTs = resolve28(sourceDir, `${filePath}.ts`);
18586
18689
  if (existsSync28(directTs))
18587
18690
  return `${filePath}.js`;
18588
- const indexedTs = resolve27(sourceDir, filePath, "index.ts");
18691
+ const indexedTs = resolve28(sourceDir, filePath, "index.ts");
18589
18692
  if (existsSync28(indexedTs))
18590
18693
  return `${filePath}/index.js`;
18591
18694
  }
@@ -18728,7 +18831,7 @@ if (typeof __VUE_HMR_RUNTIME__ !== 'undefined') {
18728
18831
  let result = code;
18729
18832
  for (const [bareImport, paths] of packageImportRewrites) {
18730
18833
  const targetPath = mode === "server" ? paths.server : paths.client;
18731
- let rel = relative16(dirname20(outputPath), targetPath).replace(/\\/g, "/");
18834
+ let rel = relative17(dirname20(outputPath), targetPath).replace(/\\/g, "/");
18732
18835
  if (!rel.startsWith("."))
18733
18836
  rel = `./${rel}`;
18734
18837
  result = result.replaceAll(bareImport, rel);
@@ -18827,7 +18930,7 @@ var init_workerJobs = __esm(() => {
18827
18930
  // src/build/workerPool.ts
18828
18931
  import { existsSync as existsSync29, readFileSync as readFileSync25 } from "fs";
18829
18932
  import { availableParallelism, freemem } from "os";
18830
- import { dirname as dirname21, join as join37 } from "path";
18933
+ import { dirname as dirname21, join as join38 } from "path";
18831
18934
  import { pathToFileURL as pathToFileURL2 } from "url";
18832
18935
  var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_MEMORY_BUDGET_BYTES, DEFAULT_IDLE_TIMEOUT_MS = 2000, DEFAULT_MIN_BATCH = 4, PACKAGE_WALK_DEPTH = 6, PERCENT = 100, OWN_PACKAGE_NAME = "@absolutejs/absolute", parseWorkerOverride = (raw) => {
18833
18936
  if (raw === undefined || raw.trim() === "")
@@ -18844,7 +18947,7 @@ var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_
18844
18947
  const byMemory = Math.floor(freemem() / WORKER_MEMORY_BUDGET_BYTES);
18845
18948
  return Math.max(MIN_WORKERS, Math.min(byCpu, byMemory));
18846
18949
  }, isOwnPackageRoot = (dir) => {
18847
- const packageFile = join37(dir, "package.json");
18950
+ const packageFile = join38(dir, "package.json");
18848
18951
  if (!existsSync29(packageFile))
18849
18952
  return false;
18850
18953
  try {
@@ -18868,9 +18971,9 @@ var MIN_WORKERS = 2, MAX_DEFAULT_WORKERS = 8, MAX_OVERRIDE_WORKERS = 64, WORKER_
18868
18971
  const root = findOwnPackageRoot(fromDir);
18869
18972
  if (!root)
18870
18973
  return null;
18871
- const distEntry = join37(root, "dist", "build", "buildWorker.js");
18872
- const sourceEntry = join37(root, "src", "build", "buildWorker.ts");
18873
- const runningFromDist = fromDir.startsWith(join37(root, "dist"));
18974
+ const distEntry = join38(root, "dist", "build", "buildWorker.js");
18975
+ const sourceEntry = join38(root, "src", "build", "buildWorker.ts");
18976
+ const runningFromDist = fromDir.startsWith(join38(root, "dist"));
18874
18977
  const ordered = runningFromDist ? [distEntry, sourceEntry] : [sourceEntry, distEntry];
18875
18978
  return ordered.find((candidate) => existsSync29(candidate)) ?? null;
18876
18979
  }, formatPercent = (ratio) => `${Math.round(ratio * PERCENT)}%`, createBuildWorkerPool = (options = {}) => {
@@ -19156,21 +19259,21 @@ import {
19156
19259
  basename as basename14,
19157
19260
  dirname as dirname22,
19158
19261
  isAbsolute as isAbsolute7,
19159
- join as join38,
19160
- relative as relative17,
19161
- resolve as resolve28
19262
+ join as join39,
19263
+ relative as relative18,
19264
+ resolve as resolve29
19162
19265
  } from "path";
19163
19266
  var {file: file3, write: write4 } = globalThis.Bun;
19164
19267
  var resolveDevClientDir3 = () => {
19165
19268
  const projectRoot = process.cwd();
19166
- const fromSource = resolve28(import.meta.dir, "../dev/client");
19269
+ const fromSource = resolve29(import.meta.dir, "../dev/client");
19167
19270
  if (existsSync30(fromSource) && fromSource.startsWith(projectRoot)) {
19168
19271
  return fromSource;
19169
19272
  }
19170
- const fromNodeModules = resolve28(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
19273
+ const fromNodeModules = resolve29(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
19171
19274
  if (existsSync30(fromNodeModules))
19172
19275
  return fromNodeModules;
19173
- return resolve28(import.meta.dir, "./dev/client");
19276
+ return resolve29(import.meta.dir, "./dev/client");
19174
19277
  }, devClientDir3, hmrClientPath4, scriptCache, scriptSetupCache, templateCache, styleCache, persistentBuildCache, vueSourceHashCache, vueHmrMetadata, detectVueChangeType = (filePath, descriptor) => {
19175
19278
  const prevScript = scriptCache.get(filePath);
19176
19279
  const prevScriptSetup = scriptSetupCache.get(filePath);
@@ -19201,7 +19304,7 @@ var resolveDevClientDir3 = () => {
19201
19304
  return "template-only";
19202
19305
  }
19203
19306
  return "full";
19204
- }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative17(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), importScanner, IMPORT_PATTERNS, matchImports = (sourceCode) => IMPORT_PATTERNS.flatMap((pattern) => Array.from(sourceCode.matchAll(pattern), (match) => match[1])).filter((importPath) => importPath !== undefined), extractImports = (sourceCode) => {
19307
+ }, generateVueHmrId = (sourceFilePath, vueRootDir) => relative18(vueRootDir, sourceFilePath).replace(/\\/g, "/").replace(/\.vue$/, ""), importScanner, IMPORT_PATTERNS, matchImports = (sourceCode) => IMPORT_PATTERNS.flatMap((pattern) => Array.from(sourceCode.matchAll(pattern), (match) => match[1])).filter((importPath) => importPath !== undefined), extractImports = (sourceCode) => {
19205
19308
  let found;
19206
19309
  try {
19207
19310
  found = importScanner.scanImports(sourceCode).map(({ path }) => path);
@@ -19211,11 +19314,11 @@ var resolveDevClientDir3 = () => {
19211
19314
  return Array.from(new Set(found));
19212
19315
  }, resolveHelperTsPath = (sourceDir, helper) => {
19213
19316
  if (helper.endsWith(".ts"))
19214
- return resolve28(sourceDir, helper);
19215
- const direct = resolve28(sourceDir, `${helper}.ts`);
19317
+ return resolve29(sourceDir, helper);
19318
+ const direct = resolve29(sourceDir, `${helper}.ts`);
19216
19319
  if (existsSync30(direct))
19217
19320
  return direct;
19218
- const indexed = resolve28(sourceDir, helper, "index.ts");
19321
+ const indexed = resolve29(sourceDir, helper, "index.ts");
19219
19322
  if (existsSync30(indexed))
19220
19323
  return indexed;
19221
19324
  return direct;
@@ -19283,7 +19386,7 @@ var resolveDevClientDir3 = () => {
19283
19386
  ]);
19284
19387
  }, materialiseVueCompileCacheEntry = async (entry, cacheKey, isEntryPoint, outputDirs, fileBaseName) => {
19285
19388
  const { result } = entry;
19286
- const cssOutputFile = isEntryPoint && result.cssCodes.length > 0 ? join38(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`) : null;
19389
+ const cssOutputFile = isEntryPoint && result.cssCodes.length > 0 ? join39(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`) : null;
19287
19390
  trackWrite(writeVueOutputs({
19288
19391
  clientCode: entry.clientCode,
19289
19392
  clientPath: result.clientPath,
@@ -19375,12 +19478,12 @@ var resolveDevClientDir3 = () => {
19375
19478
  const childComponentPaths = importPaths.filter((path) => path.startsWith(".") && path.endsWith(".vue"));
19376
19479
  const packageComponentPaths = Array.from(resolvedPackageVueImports.entries());
19377
19480
  const helperModulePaths = importPaths.filter((path) => path.startsWith(".") && !path.endsWith(".vue") && !isStylePath(path));
19378
- const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute7(path)) && isStylePath(path)).map((path) => isAbsolute7(path) ? path : resolve28(dirname22(sourceFilePath), path));
19481
+ const stylePathsImported = importPaths.filter((path) => (path.startsWith(".") || isAbsolute7(path)) && isStylePath(path)).map((path) => isAbsolute7(path) ? path : resolve29(dirname22(sourceFilePath), path));
19379
19482
  for (const stylePath of stylePathsImported) {
19380
19483
  addStyleImporter(sourceFilePath, stylePath);
19381
19484
  }
19382
19485
  const childBuildResults = await Promise.all([
19383
- ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve28(dirname22(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
19486
+ ...childComponentPaths.map((relativeChildPath) => compileVueFile(resolve29(dirname22(sourceFilePath), relativeChildPath), outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors)),
19384
19487
  ...packageComponentPaths.map(([, absolutePath]) => compileVueFile(absolutePath, outputDirs, cacheMap, false, vueRootDir, compiler, runSfc, stylePreprocessors))
19385
19488
  ]);
19386
19489
  const cacheKeyStartedAt = performance.now();
@@ -19431,7 +19534,7 @@ var resolveDevClientDir3 = () => {
19431
19534
  ...localCss,
19432
19535
  ...childBuildResults.flatMap((result) => result.cssCodes)
19433
19536
  ];
19434
- const cssOutputFile = isEntryPoint && allCss.length ? join38(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`) : null;
19537
+ const cssOutputFile = isEntryPoint && allCss.length ? join39(outputDirs.css, `${toKebab(fileBaseName)}-compiled.css`) : null;
19435
19538
  const cssOutputPaths = cssOutputFile ? [cssOutputFile] : [];
19436
19539
  trackWrite(writeVueOutputs({
19437
19540
  clientCode: clientOutput,
@@ -19475,10 +19578,10 @@ var resolveDevClientDir3 = () => {
19475
19578
  const compilerLoadMs = performance.now() - compilerLoadStartedAt;
19476
19579
  vueCompileProfile.stageCompilerMs = compilerLoadMs;
19477
19580
  const generatedDir = getFrameworkGeneratedDir("vue");
19478
- const clientOutputDir = join38(generatedDir, "client");
19479
- const indexOutputDir = join38(generatedDir, "indexes");
19480
- const serverOutputDir = join38(generatedDir, "server");
19481
- const cssOutputDir = join38(generatedDir, "compiled");
19581
+ const clientOutputDir = join39(generatedDir, "client");
19582
+ const indexOutputDir = join39(generatedDir, "indexes");
19583
+ const serverOutputDir = join39(generatedDir, "server");
19584
+ const cssOutputDir = join39(generatedDir, "compiled");
19482
19585
  await Promise.all([
19483
19586
  mkdir9(clientOutputDir, { recursive: true }),
19484
19587
  mkdir9(indexOutputDir, { recursive: true }),
@@ -19488,7 +19591,7 @@ var resolveDevClientDir3 = () => {
19488
19591
  const buildCache = new Map;
19489
19592
  const allTsHelperPaths = new Set;
19490
19593
  const expandSpaRouteChildren = async (entries) => {
19491
- const expanded = new Set(entries.map((entry) => resolve28(entry)));
19594
+ const expanded = new Set(entries.map((entry) => resolve29(entry)));
19492
19595
  const queue = [...expanded];
19493
19596
  while (queue.length > 0) {
19494
19597
  const entryPath = queue.pop();
@@ -19505,7 +19608,7 @@ var resolveDevClientDir3 = () => {
19505
19608
  });
19506
19609
  const routes = parseVueSpaRoutes(descriptor.script?.content ?? "");
19507
19610
  for (const { importPath } of routes) {
19508
- const childPath = resolve28(dirname22(entryPath), importPath);
19611
+ const childPath = resolve29(dirname22(entryPath), importPath);
19509
19612
  if (expanded.has(childPath) || !existsSync30(childPath)) {
19510
19613
  continue;
19511
19614
  }
@@ -19520,7 +19623,7 @@ var resolveDevClientDir3 = () => {
19520
19623
  vueCompileProfile.stageExpandMs = performance.now() - stageStartedAt;
19521
19624
  stageStartedAt = performance.now();
19522
19625
  const compiledPages = await Promise.all(expandedEntryPoints.map(async (entryPath) => {
19523
- const resolvedEntryPath = resolve28(entryPath);
19626
+ const resolvedEntryPath = resolve29(entryPath);
19524
19627
  const result = await compileVueFile(resolvedEntryPath, {
19525
19628
  client: clientOutputDir,
19526
19629
  css: cssOutputDir,
@@ -19538,7 +19641,7 @@ var resolveDevClientDir3 = () => {
19538
19641
  };
19539
19642
  }
19540
19643
  const entryBaseName = basename14(entryPath, ".vue");
19541
- const indexOutputFile = join38(indexOutputDir, `${entryBaseName}.js`);
19644
+ const indexOutputFile = join39(indexOutputDir, `${entryBaseName}.js`);
19542
19645
  const clientOutputFile = result.clientPath;
19543
19646
  await mkdir9(dirname22(indexOutputFile), { recursive: true });
19544
19647
  const vueHmrImports = isDev ? [
@@ -19547,7 +19650,7 @@ var resolveDevClientDir3 = () => {
19547
19650
  ] : [];
19548
19651
  await write4(indexOutputFile, [
19549
19652
  ...vueHmrImports,
19550
- `import Comp, * as PageModule from "${relative17(dirname22(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
19653
+ `import Comp, * as PageModule from "${relative18(dirname22(indexOutputFile), clientOutputFile).replace(/\\/g, "/")}";`,
19551
19654
  'import { createSSRApp, createApp } from "vue";',
19552
19655
  'import { prepareBrowserTranslationHydration } from "@absolutejs/absolute/vue";',
19553
19656
  "",
@@ -19775,7 +19878,7 @@ var init_compileVue = __esm(() => {
19775
19878
  init_stylePreprocessor();
19776
19879
  init_vueCompileCache();
19777
19880
  devClientDir3 = resolveDevClientDir3();
19778
- hmrClientPath4 = join38(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
19881
+ hmrClientPath4 = join39(devClientDir3, "hmrClient.ts").replace(/\\/g, "/");
19779
19882
  scriptCache = new Map;
19780
19883
  scriptSetupCache = new Map;
19781
19884
  templateCache = new Map;
@@ -20284,7 +20387,7 @@ __export(exports_compileAngular, {
20284
20387
  invalidateAngularJitCache: () => invalidateAngularJitCache
20285
20388
  });
20286
20389
  import { existsSync as existsSync31, readFileSync as readFileSync26, promises as fs5 } from "fs";
20287
- import { join as join39, basename as basename15, sep as sep4, dirname as dirname23, resolve as resolve29, relative as relative18 } from "path";
20390
+ import { join as join40, basename as basename15, sep as sep5, dirname as dirname23, resolve as resolve30, relative as relative19 } from "path";
20288
20391
  var {Glob: Glob6 } = globalThis.Bun;
20289
20392
  import ts18 from "typescript";
20290
20393
  var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) => {
@@ -20300,10 +20403,10 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20300
20403
  return tracePhase ? tracePhase(`compile/angular/${name}`, fn, metadata) : await fn();
20301
20404
  }, readTsconfigPathAliases = () => {
20302
20405
  try {
20303
- const configPath = resolve29(process.cwd(), "tsconfig.json");
20406
+ const configPath = resolve30(process.cwd(), "tsconfig.json");
20304
20407
  const config = ts18.readConfigFile(configPath, ts18.sys.readFile).config;
20305
20408
  const compilerOptions = config?.compilerOptions ?? {};
20306
- const baseUrl = resolve29(process.cwd(), compilerOptions.baseUrl ?? ".");
20409
+ const baseUrl = resolve30(process.cwd(), compilerOptions.baseUrl ?? ".");
20307
20410
  const aliases = Object.entries(compilerOptions.paths ?? {}).map(([pattern, replacements]) => ({ pattern, replacements }));
20308
20411
  return { aliases, baseUrl };
20309
20412
  } catch {
@@ -20323,7 +20426,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20323
20426
  const wildcardValue = exactMatch ? "" : specifier.slice(prefix.length, specifier.length - suffix.length);
20324
20427
  for (const replacement of alias.replacements) {
20325
20428
  const candidate = replacement.replace("*", wildcardValue);
20326
- const resolved = resolveSourceFile(resolve29(baseUrl, candidate));
20429
+ const resolved = resolveSourceFile(resolve30(baseUrl, candidate));
20327
20430
  if (resolved)
20328
20431
  return resolved;
20329
20432
  }
@@ -20335,20 +20438,20 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20335
20438
  `${candidate}.tsx`,
20336
20439
  `${candidate}.js`,
20337
20440
  `${candidate}.jsx`,
20338
- join39(candidate, "index.ts"),
20339
- join39(candidate, "index.tsx"),
20340
- join39(candidate, "index.js"),
20341
- join39(candidate, "index.jsx")
20441
+ join40(candidate, "index.ts"),
20442
+ join40(candidate, "index.tsx"),
20443
+ join40(candidate, "index.js"),
20444
+ join40(candidate, "index.jsx")
20342
20445
  ];
20343
20446
  return candidates.find((file) => existsSync31(file));
20344
20447
  }, createLegacyAngularAnimationUsageResolver = (rootDir) => {
20345
- const baseDir = resolve29(rootDir);
20448
+ const baseDir = resolve30(rootDir);
20346
20449
  const tsconfigAliases = readTsconfigPathAliases();
20347
20450
  const transpiler = new Bun.Transpiler({ loader: "tsx" });
20348
20451
  const scanCache = new Map;
20349
20452
  const resolveLocalImport = (specifier, fromDir) => {
20350
20453
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
20351
- return resolveSourceFile(resolve29(fromDir, specifier));
20454
+ return resolveSourceFile(resolve30(fromDir, specifier));
20352
20455
  }
20353
20456
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
20354
20457
  if (aliased)
@@ -20357,7 +20460,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20357
20460
  const resolved = Bun.resolveSync(specifier, fromDir);
20358
20461
  if (resolved.includes("/node_modules/"))
20359
20462
  return;
20360
- const absolute = resolve29(resolved);
20463
+ const absolute = resolve30(resolved);
20361
20464
  if (!absolute.startsWith(baseDir))
20362
20465
  return;
20363
20466
  return resolveSourceFile(absolute);
@@ -20373,7 +20476,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20373
20476
  usesLegacyAnimations: false
20374
20477
  });
20375
20478
  }
20376
- const resolved = resolve29(actualPath);
20479
+ const resolved = resolve30(actualPath);
20377
20480
  const cached = scanCache.get(resolved);
20378
20481
  if (cached)
20379
20482
  return cached;
@@ -20402,7 +20505,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20402
20505
  const actualPath = resolveSourceFile(filePath);
20403
20506
  if (!actualPath)
20404
20507
  return false;
20405
- const resolved = resolve29(actualPath);
20508
+ const resolved = resolve30(actualPath);
20406
20509
  if (visited.has(resolved))
20407
20510
  return false;
20408
20511
  visited.add(resolved);
@@ -20420,14 +20523,14 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20420
20523
  return (entryPath) => visit(entryPath);
20421
20524
  }, resolveDevClientDir4 = () => {
20422
20525
  const projectRoot = process.cwd();
20423
- const fromSource = resolve29(import.meta.dir, "../dev/client");
20526
+ const fromSource = resolve30(import.meta.dir, "../dev/client");
20424
20527
  if (existsSync31(fromSource) && fromSource.startsWith(projectRoot)) {
20425
20528
  return fromSource;
20426
20529
  }
20427
- const fromNodeModules = resolve29(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
20530
+ const fromNodeModules = resolve30(projectRoot, "node_modules/@absolutejs/absolute/dist/dev/client");
20428
20531
  if (existsSync31(fromNodeModules))
20429
20532
  return fromNodeModules;
20430
- return resolve29(import.meta.dir, "./dev/client");
20533
+ return resolve30(import.meta.dir, "./dev/client");
20431
20534
  }, devClientDir4, hmrClientPath5, formatDiagnosticMessage = (diagnostic) => {
20432
20535
  try {
20433
20536
  return ts18.flattenDiagnosticMessageText(diagnostic.messageText, `
@@ -20470,11 +20573,11 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20470
20573
  if (hasJsLikeExtension(path))
20471
20574
  return `${path}${query}`;
20472
20575
  const importerDir = dirname23(importerOutputPath);
20473
- const fileCandidate = resolve29(importerDir, `${path}.js`);
20576
+ const fileCandidate = resolve30(importerDir, `${path}.js`);
20474
20577
  if (outputFiles?.has(fileCandidate) || existsSync31(fileCandidate)) {
20475
20578
  return `${path}.js${query}`;
20476
20579
  }
20477
- const indexCandidate = resolve29(importerDir, path, "index.js");
20580
+ const indexCandidate = resolve30(importerDir, path, "index.js");
20478
20581
  if (outputFiles?.has(indexCandidate) || existsSync31(indexCandidate)) {
20479
20582
  return `${path}/index.js${query}`;
20480
20583
  }
@@ -20502,18 +20605,18 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20502
20605
  }, resolveLocalTsImport = (fromFile, specifier) => {
20503
20606
  if (!isRelativeModuleSpecifier(specifier))
20504
20607
  return null;
20505
- const basePath = resolve29(dirname23(fromFile), specifier);
20608
+ const basePath = resolve30(dirname23(fromFile), specifier);
20506
20609
  const candidates = /\.[cm]?[tj]sx?$/.test(basePath) ? [basePath] : [
20507
20610
  `${basePath}.ts`,
20508
20611
  `${basePath}.tsx`,
20509
20612
  `${basePath}.mts`,
20510
20613
  `${basePath}.cts`,
20511
- join39(basePath, "index.ts"),
20512
- join39(basePath, "index.tsx"),
20513
- join39(basePath, "index.mts"),
20514
- join39(basePath, "index.cts")
20614
+ join40(basePath, "index.ts"),
20615
+ join40(basePath, "index.tsx"),
20616
+ join40(basePath, "index.mts"),
20617
+ join40(basePath, "index.cts")
20515
20618
  ];
20516
- return candidates.map((candidate) => resolve29(candidate)).find((candidate) => existsSync31(candidate) && !candidate.endsWith(".d.ts")) ?? null;
20619
+ return candidates.map((candidate) => resolve30(candidate)).find((candidate) => existsSync31(candidate) && !candidate.endsWith(".d.ts")) ?? null;
20517
20620
  }, readFileForAotTransform = async (fileName, readFile) => {
20518
20621
  const hostSource = readFile?.(fileName);
20519
20622
  if (typeof hostSource === "string")
@@ -20537,18 +20640,18 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20537
20640
  const paths = [];
20538
20641
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
20539
20642
  if (templateUrlMatch?.[1])
20540
- paths.push(join39(fileDir, templateUrlMatch[1]));
20643
+ paths.push(join40(fileDir, templateUrlMatch[1]));
20541
20644
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
20542
20645
  if (styleUrlMatch?.[1])
20543
- paths.push(join39(fileDir, styleUrlMatch[1]));
20646
+ paths.push(join40(fileDir, styleUrlMatch[1]));
20544
20647
  const styleUrlsMatch = findUncommentedMatch(source, /styleUrls\s*:\s*\[([^\]]+)\]/);
20545
20648
  const urlMatches = styleUrlsMatch?.[1]?.match(/['"]([^'"]+)['"]/g);
20546
20649
  if (urlMatches) {
20547
20650
  for (const urlMatch of urlMatches) {
20548
- paths.push(join39(fileDir, urlMatch.replace(/['"]/g, "")));
20651
+ paths.push(join40(fileDir, urlMatch.replace(/['"]/g, "")));
20549
20652
  }
20550
20653
  }
20551
- return paths.map((path) => resolve29(path));
20654
+ return paths.map((path) => resolve30(path));
20552
20655
  }, readResourceCacheFile = async (cachePath) => {
20553
20656
  try {
20554
20657
  const entry = JSON.parse(await fs5.readFile(cachePath, "utf-8"));
@@ -20579,7 +20682,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20579
20682
  safeStableStringify(stylePreprocessors ?? null)
20580
20683
  ].join("\x00");
20581
20684
  const cacheKey = Bun.hash(cacheInput).toString(BASE_36_RADIX);
20582
- return join39(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
20685
+ return join40(process.cwd(), ".absolutejs", "cache", "angular-resources", `${cacheKey}.json`);
20583
20686
  }, precomputeAotResourceTransforms = async (inputPaths, readFile, stylePreprocessors) => {
20584
20687
  const transformedSources = new Map;
20585
20688
  const visited = new Set;
@@ -20590,7 +20693,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20590
20693
  transformedFiles: 0
20591
20694
  };
20592
20695
  const transformFile = async (filePath) => {
20593
- const resolvedPath = resolve29(filePath);
20696
+ const resolvedPath = resolve30(filePath);
20594
20697
  if (visited.has(resolvedPath))
20595
20698
  return;
20596
20699
  visited.add(resolvedPath);
@@ -20625,7 +20728,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20625
20728
  return { stats, transformedSources };
20626
20729
  }, compileAngularFiles = async (inputPaths, outDir, stylePreprocessors) => {
20627
20730
  const islandMetadataByOutputPath = await traceAngularPhase("aot/island-metadata", () => new Map(inputPaths.map((inputPath) => {
20628
- const outputPath = resolve29(join39(outDir, relative18(process.cwd(), resolve29(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
20731
+ const outputPath = resolve30(join40(outDir, relative19(process.cwd(), resolve30(inputPath)).replace(/\.[cm]?[tj]sx?$/, ".js")));
20629
20732
  return [
20630
20733
  outputPath,
20631
20734
  buildIslandMetadataExports(readFileSync26(inputPath, "utf-8"))
@@ -20636,7 +20739,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20636
20739
  const tsLibDir = await traceAngularPhase("aot/resolve-typescript-lib", () => {
20637
20740
  const tsPath = __require.resolve("typescript");
20638
20741
  const tsRootDir = dirname23(tsPath);
20639
- return tsRootDir.endsWith("lib") ? tsRootDir : resolve29(tsRootDir, "lib");
20742
+ return tsRootDir.endsWith("lib") ? tsRootDir : resolve30(tsRootDir, "lib");
20640
20743
  });
20641
20744
  const config = await traceAngularPhase("aot/read-configuration", () => readConfiguration("./tsconfig.json"));
20642
20745
  const options = {
@@ -20672,13 +20775,13 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20672
20775
  const originalGetSourceFile = host.getSourceFile;
20673
20776
  host.getSourceFile = (fileName, languageVersion, onError) => {
20674
20777
  if (fileName.startsWith("lib.") && fileName.endsWith(".d.ts") && tsLibDir) {
20675
- const resolvedPath = join39(tsLibDir, fileName);
20778
+ const resolvedPath = join40(tsLibDir, fileName);
20676
20779
  return originalGetSourceFile?.call(host, resolvedPath, languageVersion, onError);
20677
20780
  }
20678
20781
  return originalGetSourceFile?.call(host, fileName, languageVersion, onError);
20679
20782
  };
20680
20783
  const emitted = {};
20681
- const resolvedOutDir = resolve29(outDir);
20784
+ const resolvedOutDir = resolve30(outDir);
20682
20785
  host.writeFile = (fileName, text) => {
20683
20786
  const relativePath = resolveRelativePath(fileName, resolvedOutDir, outDir);
20684
20787
  emitted[relativePath] = text;
@@ -20700,12 +20803,12 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20700
20803
  if (!fileName.endsWith(".ts") || fileName.endsWith(".d.ts")) {
20701
20804
  return source;
20702
20805
  }
20703
- const resolvedPath = resolve29(fileName);
20806
+ const resolvedPath = resolve30(fileName);
20704
20807
  return transformedSources.get(resolvedPath) ?? source;
20705
20808
  };
20706
20809
  const originalGetSourceFileForCompile = host.getSourceFile;
20707
20810
  host.getSourceFile = (fileName, languageVersion, onError) => {
20708
- const source = transformedSources.get(resolve29(fileName));
20811
+ const source = transformedSources.get(resolve30(fileName));
20709
20812
  if (source) {
20710
20813
  return ts18.createSourceFile(fileName, source, languageVersion, true);
20711
20814
  }
@@ -20727,9 +20830,9 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20727
20830
  const entries = await traceAngularPhase("aot/postprocess-emitted-js", () => {
20728
20831
  const rawEntries = Object.entries(emitted).filter(([fileName]) => fileName.endsWith(".js")).map(([fileName, content]) => ({
20729
20832
  content,
20730
- target: join39(outDir, fileName)
20833
+ target: join40(outDir, fileName)
20731
20834
  }));
20732
- const outputFiles = new Set(rawEntries.map(({ target }) => resolve29(target)));
20835
+ const outputFiles = new Set(rawEntries.map(({ target }) => resolve30(target)));
20733
20836
  return rawEntries.map(({ content, target }) => {
20734
20837
  let processedContent = content.replace(/from\s+(['"])(\.\.?\/[^'"]+)(\1)/g, (match, quote, path) => {
20735
20838
  const rewritten = rewriteRelativeJsSpecifier(target, path, outputFiles);
@@ -20744,7 +20847,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20744
20847
  return cleaned ? `import { ${cleaned}, InternalInjectFlags } from '@angular/core'` : `import { InternalInjectFlags } from '@angular/core'`;
20745
20848
  });
20746
20849
  processedContent = processedContent.replace(/\b(?<!Internal)InjectFlags\b/g, "InternalInjectFlags");
20747
- processedContent += islandMetadataByOutputPath.get(resolve29(target)) ?? "";
20850
+ processedContent += islandMetadataByOutputPath.get(resolve30(target)) ?? "";
20748
20851
  return { content: processedContent, target };
20749
20852
  });
20750
20853
  });
@@ -20754,7 +20857,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20754
20857
  })), { outputs: entries.length });
20755
20858
  return await traceAngularPhase("aot/collect-output-paths", () => entries.map(({ target }) => target), { outputs: entries.length });
20756
20859
  }, jitContentCache, invalidateAngularJitCache = (filePath) => {
20757
- jitContentCache.delete(resolve29(filePath));
20860
+ jitContentCache.delete(resolve30(filePath));
20758
20861
  }, wrapperOutputCache, escapeTemplateContent = (content) => content.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$\{/g, "\\${"), findUncommentedMatch = (source, pattern) => {
20759
20862
  const re = new RegExp(pattern.source, pattern.flags.includes("g") ? pattern.flags : pattern.flags + "g");
20760
20863
  let match;
@@ -20767,7 +20870,7 @@ var atomicWriteSequence = 0, writeTextFileAtomically = async (path, content) =>
20767
20870
  }
20768
20871
  return null;
20769
20872
  }, resolveAngularDeferImportSpecifier = () => {
20770
- const sourceEntry = resolve29(import.meta.dir, "../angular/components/index.ts");
20873
+ const sourceEntry = resolve30(import.meta.dir, "../angular/components/index.ts");
20771
20874
  if (existsSync31(sourceEntry)) {
20772
20875
  return sourceEntry.replace(/\\/g, "/");
20773
20876
  }
@@ -20904,7 +21007,7 @@ ${fields}
20904
21007
  }, inlineTemplateAndLowerDefer = async (source, fileDir) => {
20905
21008
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
20906
21009
  if (templateUrlMatch?.[1]) {
20907
- const templatePath = join39(fileDir, templateUrlMatch[1]);
21010
+ const templatePath = join40(fileDir, templateUrlMatch[1]);
20908
21011
  if (!existsSync31(templatePath)) {
20909
21012
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
20910
21013
  }
@@ -20935,7 +21038,7 @@ ${fields}
20935
21038
  }, inlineTemplateAndLowerDeferSync = (source, fileDir) => {
20936
21039
  const templateUrlMatch = findUncommentedMatch(source, /templateUrl\s*:\s*['"]([^'"]+)['"]/);
20937
21040
  if (templateUrlMatch?.[1]) {
20938
- const templatePath = join39(fileDir, templateUrlMatch[1]);
21041
+ const templatePath = join40(fileDir, templateUrlMatch[1]);
20939
21042
  if (!existsSync31(templatePath)) {
20940
21043
  throw new Error(`Unable to inline Angular templateUrl "${templateUrlMatch[1]}": file not found at ${templatePath}`);
20941
21044
  }
@@ -20972,7 +21075,7 @@ ${fields}
20972
21075
  return source;
20973
21076
  const stylePromises = urlMatches.map((urlMatch) => {
20974
21077
  const styleUrl = urlMatch.replace(/['"]/g, "");
20975
- return readAndEscapeFile(join39(fileDir, styleUrl), stylePreprocessors);
21078
+ return readAndEscapeFile(join40(fileDir, styleUrl), stylePreprocessors);
20976
21079
  });
20977
21080
  const results = await Promise.all(stylePromises);
20978
21081
  const inlinedStyles = results.filter(Boolean).map((escaped) => `\`${escaped}\``);
@@ -20983,7 +21086,7 @@ ${fields}
20983
21086
  const styleUrlMatch = findUncommentedMatch(source, /styleUrl\s*:\s*['"]([^'"]+)['"]/);
20984
21087
  if (!styleUrlMatch?.[1])
20985
21088
  return source;
20986
- const escaped = await readAndEscapeFile(join39(fileDir, styleUrlMatch[1]), stylePreprocessors);
21089
+ const escaped = await readAndEscapeFile(join40(fileDir, styleUrlMatch[1]), stylePreprocessors);
20987
21090
  if (!escaped)
20988
21091
  return source;
20989
21092
  return source.slice(0, styleUrlMatch.index) + `styles: [\`${escaped}\`]` + source.slice(styleUrlMatch.index + styleUrlMatch[0].length);
@@ -21057,10 +21160,10 @@ ${fields}
21057
21160
  return "";
21058
21161
  }
21059
21162
  }, compileAngularFileJIT = async (inputPath, outDir, rootDir, stylePreprocessors, cacheBuster) => {
21060
- const entryPath = resolve29(inputPath);
21163
+ const entryPath = resolve30(inputPath);
21061
21164
  const allOutputs = [];
21062
21165
  const visited = new Set;
21063
- const baseDir = resolve29(rootDir ?? process.cwd());
21166
+ const baseDir = resolve30(rootDir ?? process.cwd());
21064
21167
  let usesLegacyAnimations = false;
21065
21168
  const angularTranspiler = new Bun.Transpiler({
21066
21169
  loader: "ts",
@@ -21079,16 +21182,16 @@ ${fields}
21079
21182
  `${candidate}.js`,
21080
21183
  `${candidate}.jsx`,
21081
21184
  `${candidate}.json`,
21082
- join39(candidate, "index.ts"),
21083
- join39(candidate, "index.tsx"),
21084
- join39(candidate, "index.js"),
21085
- join39(candidate, "index.jsx")
21185
+ join40(candidate, "index.ts"),
21186
+ join40(candidate, "index.tsx"),
21187
+ join40(candidate, "index.js"),
21188
+ join40(candidate, "index.jsx")
21086
21189
  ];
21087
21190
  return candidates.find((file) => existsSync31(file));
21088
21191
  };
21089
21192
  const resolveLocalImport = (specifier, fromDir) => {
21090
21193
  if (specifier.startsWith(".") || specifier.startsWith("/")) {
21091
- return resolveSourceFile(resolve29(fromDir, specifier));
21194
+ return resolveSourceFile(resolve30(fromDir, specifier));
21092
21195
  }
21093
21196
  const aliased = matchTsconfigAlias(specifier, tsconfigAliases.aliases, tsconfigAliases.baseUrl, resolveSourceFile);
21094
21197
  if (aliased)
@@ -21097,7 +21200,7 @@ ${fields}
21097
21200
  const resolved = Bun.resolveSync(specifier, fromDir);
21098
21201
  if (resolved.includes("/node_modules/"))
21099
21202
  return;
21100
- const absolute = resolve29(resolved);
21203
+ const absolute = resolve30(resolved);
21101
21204
  if (!absolute.startsWith(baseDir))
21102
21205
  return;
21103
21206
  return resolveSourceFile(absolute);
@@ -21108,11 +21211,11 @@ ${fields}
21108
21211
  const toOutputPath = (sourcePath) => {
21109
21212
  const inputDir = dirname23(sourcePath);
21110
21213
  const fileBase = basename15(sourcePath).replace(/\.[cm]?[tj]sx?$/, ".js");
21111
- if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep4}`)) {
21112
- return join39(inputDir, fileBase);
21214
+ if (inputDir === outDir || inputDir.startsWith(`${outDir}${sep5}`)) {
21215
+ return join40(inputDir, fileBase);
21113
21216
  }
21114
21217
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
21115
- return join39(outDir, relativeDir, fileBase);
21218
+ return join40(outDir, relativeDir, fileBase);
21116
21219
  };
21117
21220
  const withCacheBuster = (specifier) => {
21118
21221
  if (!cacheBuster)
@@ -21149,21 +21252,21 @@ ${fields}
21149
21252
  return `${prefix}${dots}`;
21150
21253
  return `${prefix}../${dots}`;
21151
21254
  });
21152
- if (resolve29(actualPath) === entryPath) {
21255
+ if (resolve30(actualPath) === entryPath) {
21153
21256
  processedContent += buildIslandMetadataExports(sourceCode);
21154
21257
  }
21155
21258
  return processedContent;
21156
21259
  };
21157
21260
  const transpileFile = async (filePath) => {
21158
- const resolved = resolve29(filePath);
21261
+ const resolved = resolve30(filePath);
21159
21262
  if (visited.has(resolved))
21160
21263
  return;
21161
21264
  visited.add(resolved);
21162
21265
  if (resolved.endsWith(".json") && existsSync31(resolved)) {
21163
21266
  const inputDir = dirname23(resolved);
21164
21267
  const relativeDir = inputDir.startsWith(baseDir) ? inputDir.substring(baseDir.length + 1) : inputDir;
21165
- const targetDir = join39(outDir, relativeDir);
21166
- const targetPath = join39(targetDir, basename15(resolved));
21268
+ const targetDir = join40(outDir, relativeDir);
21269
+ const targetPath = join40(targetDir, basename15(resolved));
21167
21270
  await fs5.mkdir(targetDir, { recursive: true });
21168
21271
  await fs5.copyFile(resolved, targetPath);
21169
21272
  allOutputs.push(targetPath);
@@ -21181,7 +21284,7 @@ ${fields}
21181
21284
  const fileBase = basename15(actualPath).replace(/\.[cm]?[tj]sx?$/, ".js");
21182
21285
  const targetPath = toOutputPath(actualPath);
21183
21286
  const targetDir = dirname23(targetPath);
21184
- const relativeDir = relative18(outDir, targetDir).replace(/\\/g, "/");
21287
+ const relativeDir = relative19(outDir, targetDir).replace(/\\/g, "/");
21185
21288
  const localImports = [];
21186
21289
  const importRewrites = new Map;
21187
21290
  const fromRegex = /(?:from|import)\s+['"]([^'".][^'"]*|\.\.?\/[^'"]+)['"]/g;
@@ -21202,12 +21305,12 @@ ${fields}
21202
21305
  const resolved = resolveLocalImport(specifier, inputDir);
21203
21306
  if (!resolved)
21204
21307
  return null;
21205
- const relativeImport = relative18(targetDir, toOutputPath(resolved)).replace(/\\/g, "/").replace(/\.js$/, "");
21308
+ const relativeImport = relative19(targetDir, toOutputPath(resolved)).replace(/\\/g, "/").replace(/\.js$/, "");
21206
21309
  const relativeRewrite = relativeImport.startsWith(".") ? relativeImport : `./${relativeImport}`;
21207
21310
  importRewrites.set(specifier, relativeRewrite);
21208
21311
  return resolved;
21209
21312
  }).filter((path) => Boolean(path));
21210
- const isEntry = resolve29(actualPath) === resolve29(entryPath);
21313
+ const isEntry = resolve30(actualPath) === resolve30(entryPath);
21211
21314
  const contentHash = Bun.hash(sourceCode).toString(BASE_36_RADIX);
21212
21315
  const cacheKey = actualPath;
21213
21316
  const shouldWriteFile = cacheBuster && isEntry ? true : jitContentCache.get(cacheKey) !== contentHash || !existsSync31(targetPath);
@@ -21242,13 +21345,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21242
21345
  return { clientPaths: [...emptyPaths], serverPaths: [...emptyPaths] };
21243
21346
  }
21244
21347
  const compiledRoot = compiledParent;
21245
- const indexesDir = join39(compiledParent, "indexes");
21348
+ const indexesDir = join40(compiledParent, "indexes");
21246
21349
  await traceAngularPhase("setup/create-indexes-dir", () => fs5.mkdir(indexesDir, { recursive: true }));
21247
- const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve29(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
21350
+ const aotOutputs = hmr ? [] : await traceAngularPhase("aot/compile-files", () => compileAngularFiles(entryPoints.map((entry) => resolve30(entry)), compiledRoot, stylePreprocessors), { entries: entryPoints.length });
21248
21351
  if (!hmr) {
21249
21352
  await traceAngularPhase("aot/copy-json-resources", async () => {
21250
21353
  const cwd = process.cwd();
21251
- const angularSrcDir = resolve29(outRoot);
21354
+ const angularSrcDir = resolve30(outRoot);
21252
21355
  if (!existsSync31(angularSrcDir))
21253
21356
  return;
21254
21357
  const jsonGlob = new Glob6("**/*.json");
@@ -21256,9 +21359,9 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21256
21359
  absolute: false,
21257
21360
  cwd: angularSrcDir
21258
21361
  })) {
21259
- const sourcePath = join39(angularSrcDir, rel);
21260
- const cwdRel = relative18(cwd, sourcePath);
21261
- const targetPath = join39(compiledRoot, cwdRel);
21362
+ const sourcePath = join40(angularSrcDir, rel);
21363
+ const cwdRel = relative19(cwd, sourcePath);
21364
+ const targetPath = join40(compiledRoot, cwdRel);
21262
21365
  await fs5.mkdir(dirname23(targetPath), { recursive: true });
21263
21366
  await fs5.copyFile(sourcePath, targetPath);
21264
21367
  }
@@ -21266,8 +21369,8 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21266
21369
  }
21267
21370
  const usesLegacyAngularAnimations = await traceAngularPhase("setup/legacy-animation-resolver", () => createLegacyAngularAnimationUsageResolver(outRoot));
21268
21371
  const compileTasks = entryPoints.map(async (entry) => {
21269
- const resolvedEntry = resolve29(entry);
21270
- const relativeEntry = relative18(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
21372
+ const resolvedEntry = resolve30(entry);
21373
+ const relativeEntry = relative19(outRoot, resolvedEntry).replace(/\.[tj]s$/, ".js");
21271
21374
  const compileEntry = () => compileAngularFileJIT(resolvedEntry, compiledRoot, outRoot, stylePreprocessors);
21272
21375
  let outputs = hmr ? await traceAngularPhase("jit/compile-entry", compileEntry, {
21273
21376
  entry: resolvedEntry
@@ -21275,21 +21378,21 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21275
21378
  const fileBase = basename15(resolvedEntry).replace(/\.[tj]s$/, "");
21276
21379
  const jsName = `${fileBase}.js`;
21277
21380
  const compiledFallbackPaths = [
21278
- join39(compiledRoot, relativeEntry),
21279
- join39(compiledRoot, "pages", jsName),
21280
- join39(compiledRoot, jsName)
21281
- ].map((file) => resolve29(file));
21381
+ join40(compiledRoot, relativeEntry),
21382
+ join40(compiledRoot, "pages", jsName),
21383
+ join40(compiledRoot, jsName)
21384
+ ].map((file) => resolve30(file));
21282
21385
  const resolveRawServerFile = (candidatePaths) => {
21283
21386
  const normalizedCandidates = [
21284
- ...candidatePaths.map((file) => resolve29(file)),
21387
+ ...candidatePaths.map((file) => resolve30(file)),
21285
21388
  ...compiledFallbackPaths
21286
21389
  ];
21287
- let candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep4}${relativeEntry}`));
21390
+ let candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep5}${relativeEntry}`));
21288
21391
  if (!candidate) {
21289
- candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep4}pages${sep4}${jsName}`));
21392
+ candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep5}pages${sep5}${jsName}`));
21290
21393
  }
21291
21394
  if (!candidate) {
21292
- candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep4}${jsName}`));
21395
+ candidate = normalizedCandidates.find((file) => existsSync31(file) && file.endsWith(`${sep5}${jsName}`));
21293
21396
  }
21294
21397
  if (!candidate) {
21295
21398
  candidate = normalizedCandidates.find((file) => existsSync31(file));
@@ -21339,7 +21442,7 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21339
21442
  })() : "no-providers";
21340
21443
  const serverContentHash = `${Bun.hash(original).toString(BASE_36_RADIX)}.${Bun.hash(providersHashInput).toString(BASE_36_RADIX)}`;
21341
21444
  const cachedWrapper = wrapperOutputCache.get(resolvedEntry);
21342
- const clientFile = join39(indexesDir, jsName);
21445
+ const clientFile = join40(indexesDir, jsName);
21343
21446
  if (hmr && cachedWrapper && cachedWrapper.serverHash === serverContentHash && existsSync31(clientFile) && (usesLegacyAnimations || !original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__")) && (!usesLegacyAnimations || original.includes("__ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__"))) {
21344
21447
  return {
21345
21448
  clientPath: clientFile,
@@ -21371,13 +21474,13 @@ export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
21371
21474
  const fragments = [];
21372
21475
  if (providersInjection.appProvidersSource) {
21373
21476
  const compiledAppProvidersPath = (() => {
21374
- const angularDirAbs = resolve29(outRoot);
21375
- const appSourceAbs = resolve29(providersInjection.appProvidersSource);
21376
- const rel = relative18(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
21377
- return join39(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
21477
+ const angularDirAbs = resolve30(outRoot);
21478
+ const appSourceAbs = resolve30(providersInjection.appProvidersSource);
21479
+ const rel = relative19(angularDirAbs, appSourceAbs).replace(/\\/g, "/");
21480
+ return join40(compiledParent, rel).replace(/\.[cm]?[tj]sx?$/, ".js");
21378
21481
  })();
21379
21482
  const appProvidersSpec = (() => {
21380
- const rel = relative18(dirname23(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
21483
+ const rel = relative19(dirname23(rawServerFile), compiledAppProvidersPath).replace(/\\/g, "/");
21381
21484
  return rel.startsWith(".") ? rel : `./${rel}`;
21382
21485
  })();
21383
21486
  importLines.push(`import { appProviders as __abs_globalProviders } from "${appProvidersSpec}";`);
@@ -21402,7 +21505,7 @@ export const providers = [${fragments.join(", ")}];
21402
21505
  }
21403
21506
  }
21404
21507
  await traceAngularPhase("wrapper/write-server-output", () => writeTextFileAtomically(rawServerFile, rewritten), { entry: resolvedEntry });
21405
- const relativePath = relative18(indexesDir, rawServerFile).replace(/\\/g, "/");
21508
+ const relativePath = relative19(indexesDir, rawServerFile).replace(/\\/g, "/");
21406
21509
  const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
21407
21510
  const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
21408
21511
  import "${hmrClientPath5}";
@@ -21635,7 +21738,7 @@ var init_compileAngular = __esm(() => {
21635
21738
  init_stylePreprocessor();
21636
21739
  init_generatedDir();
21637
21740
  devClientDir4 = resolveDevClientDir4();
21638
- hmrClientPath5 = join39(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
21741
+ hmrClientPath5 = join40(devClientDir4, "hmrClient.ts").replace(/\\/g, "/");
21639
21742
  jitContentCache = new Map;
21640
21743
  wrapperOutputCache = new Map;
21641
21744
  PROVIDERS_INJECTION_BLOCK_RE = /\n\/\* __ABS_PROVIDERS_INJECTION_START \*\/[\s\S]*?\/\* __ABS_PROVIDERS_INJECTION_END \*\/\n?/;
@@ -21643,7 +21746,7 @@ var init_compileAngular = __esm(() => {
21643
21746
 
21644
21747
  // node_modules/content-tag/pkg/node/content_tag.cjs
21645
21748
  var require_content_tag = __commonJS(function(exports, module) {
21646
- var __dirname = "/home/alexkahn/abs/absolutejs/node_modules/content-tag/pkg/node";
21749
+ var __dirname = "/home/alexkahn/abs/absolutejs-head/node_modules/content-tag/pkg/node";
21647
21750
  var imports = {};
21648
21751
  imports["__wbindgen_placeholder__"] = exports;
21649
21752
  var wasm;
@@ -22078,7 +22181,7 @@ var require_node = __commonJS(function(exports, module) {
22078
22181
  // src/build/compileEmber.ts
22079
22182
  import { existsSync as existsSync32 } from "fs";
22080
22183
  import { mkdir as mkdir10, rm as rm5 } from "fs/promises";
22081
- import { basename as basename16, dirname as dirname24, extname as extname12, join as join40, resolve as resolve30 } from "path";
22184
+ import { basename as basename16, dirname as dirname24, extname as extname13, join as join41, resolve as resolve31 } from "path";
22082
22185
  var {build: bunBuild2, Transpiler: Transpiler5, write: write5, file: file4 } = globalThis.Bun;
22083
22186
  var cachedPreprocessor = null, getPreprocessor = async () => {
22084
22187
  if (cachedPreprocessor)
@@ -22087,7 +22190,7 @@ var cachedPreprocessor = null, getPreprocessor = async () => {
22087
22190
  cachedPreprocessor = new module.Preprocessor;
22088
22191
  return cachedPreprocessor;
22089
22192
  }, transpiler6, isTemplateTagFile = (entry) => {
22090
- const ext = extname12(entry);
22193
+ const ext = extname13(entry);
22091
22194
  return ext === ".gjs" || ext === ".gts";
22092
22195
  }, rewriteTemplateEvalToScope = (source) => {
22093
22196
  const importedNames = new Set;
@@ -22174,7 +22277,7 @@ export const importSync = (specifier) => {
22174
22277
  const originalImporter = stagedSourceMap.get(args.importer);
22175
22278
  if (!originalImporter)
22176
22279
  return;
22177
- const candidateBase = resolve30(dirname24(originalImporter), args.path);
22280
+ const candidateBase = resolve31(dirname24(originalImporter), args.path);
22178
22281
  const extensionsToTry = ["", ".gts", ".gjs", ".ts", ".js"];
22179
22282
  for (const ext of extensionsToTry) {
22180
22283
  const candidate = candidateBase + ext;
@@ -22197,7 +22300,7 @@ export const importSync = (specifier) => {
22197
22300
  build.onResolve({ filter: /^@(?:ember|glimmer|simple-dom)\// }, (args) => {
22198
22301
  if (standalonePackages.has(args.path))
22199
22302
  return;
22200
- const internal = join40(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
22303
+ const internal = join41(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
22201
22304
  if (existsSync32(internal))
22202
22305
  return { path: internal };
22203
22306
  return;
@@ -22233,7 +22336,7 @@ export const renderToHTML = (props = {}) => {
22233
22336
  export { PageComponent };
22234
22337
  export default PageComponent;
22235
22338
  `, compileEmberFile = async (entry, compiledRoot, cwd = process.cwd()) => {
22236
- const resolvedEntry = resolve30(entry);
22339
+ const resolvedEntry = resolve31(entry);
22237
22340
  const source = await file4(resolvedEntry).text();
22238
22341
  let preprocessed = source;
22239
22342
  if (isTemplateTagFile(resolvedEntry)) {
@@ -22245,16 +22348,16 @@ export default PageComponent;
22245
22348
  }
22246
22349
  const transpiled = transpiler6.transformSync(preprocessed);
22247
22350
  const baseName = basename16(resolvedEntry).replace(/\.(gjs|gts|ts|js)$/, "");
22248
- const tmpDir = join40(compiledRoot, "_tmp");
22249
- const serverDir = join40(compiledRoot, "server");
22250
- const clientDir = join40(compiledRoot, "client");
22351
+ const tmpDir = join41(compiledRoot, "_tmp");
22352
+ const serverDir = join41(compiledRoot, "server");
22353
+ const clientDir = join41(compiledRoot, "client");
22251
22354
  await Promise.all([
22252
22355
  mkdir10(tmpDir, { recursive: true }),
22253
22356
  mkdir10(serverDir, { recursive: true }),
22254
22357
  mkdir10(clientDir, { recursive: true })
22255
22358
  ]);
22256
- const tmpPagePath = resolve30(join40(tmpDir, `${baseName}.module.js`));
22257
- const tmpHarnessPath = resolve30(join40(tmpDir, `${baseName}.harness.js`));
22359
+ const tmpPagePath = resolve31(join41(tmpDir, `${baseName}.module.js`));
22360
+ const tmpHarnessPath = resolve31(join41(tmpDir, `${baseName}.harness.js`));
22258
22361
  await Promise.all([
22259
22362
  write5(tmpPagePath, transpiled),
22260
22363
  write5(tmpHarnessPath, generateServerHarness(tmpPagePath))
@@ -22262,7 +22365,7 @@ export default PageComponent;
22262
22365
  const stagedSourceMap = new Map([
22263
22366
  [tmpPagePath, resolvedEntry]
22264
22367
  ]);
22265
- const serverPath = join40(serverDir, `${baseName}.js`);
22368
+ const serverPath = join41(serverDir, `${baseName}.js`);
22266
22369
  const buildResult = await bunBuild2({
22267
22370
  entrypoints: [tmpHarnessPath],
22268
22371
  format: "esm",
@@ -22279,7 +22382,7 @@ export default PageComponent;
22279
22382
  console.warn(`\u26A0\uFE0F Ember server build for ${baseName} had errors:`, buildResult.logs);
22280
22383
  }
22281
22384
  await rm5(tmpDir, { force: true, recursive: true });
22282
- const clientPath = join40(clientDir, `${baseName}.js`);
22385
+ const clientPath = join41(clientDir, `${baseName}.js`);
22283
22386
  await write5(clientPath, transpiled);
22284
22387
  return { clientPath, serverPath };
22285
22388
  }, compileEmber = async (entries, emberDir, cwd = process.cwd(), _hmr = false) => {
@@ -22312,24 +22415,24 @@ var init_compileEmber = __esm(() => {
22312
22415
 
22313
22416
  // src/build/buildReactVendor.ts
22314
22417
  import { existsSync as existsSync33, mkdirSync as mkdirSync8 } from "fs";
22315
- import { join as join41, resolve as resolve31 } from "path";
22418
+ import { join as join42, resolve as resolve32 } from "path";
22316
22419
  import { rm as rm6 } from "fs/promises";
22317
22420
  var {build: bunBuild3 } = globalThis.Bun;
22318
22421
  var resolveJsxDevRuntimeCompatPath = () => {
22319
22422
  const candidates = [
22320
- resolve31(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
22321
- resolve31(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
22322
- resolve31(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
22323
- resolve31(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
22324
- resolve31(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
22325
- resolve31(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
22423
+ resolve32(import.meta.dir, "react", "jsxDevRuntimeCompat.js"),
22424
+ resolve32(import.meta.dir, "src", "react", "jsxDevRuntimeCompat.ts"),
22425
+ resolve32(import.meta.dir, "..", "react", "jsxDevRuntimeCompat.js"),
22426
+ resolve32(import.meta.dir, "..", "src", "react", "jsxDevRuntimeCompat.ts"),
22427
+ resolve32(import.meta.dir, "..", "..", "dist", "react", "jsxDevRuntimeCompat.js"),
22428
+ resolve32(import.meta.dir, "..", "..", "src", "react", "jsxDevRuntimeCompat.ts")
22326
22429
  ];
22327
22430
  for (const candidate of candidates) {
22328
22431
  if (existsSync33(candidate)) {
22329
22432
  return candidate.replace(/\\/g, "/");
22330
22433
  }
22331
22434
  }
22332
- return (candidates[0] ?? resolve31(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
22435
+ return (candidates[0] ?? resolve32(import.meta.dir, "react", "jsxDevRuntimeCompat.js")).replace(/\\/g, "/");
22333
22436
  }, jsxDevRuntimeCompatPath, jsxRuntimeCompatPath, reactSpecifiers, toSafeFileName = (specifier) => specifier.replace(/\//g, "_"), computeVendorPaths = () => {
22334
22437
  const paths = {};
22335
22438
  for (const specifier of reactSpecifiers) {
@@ -22362,14 +22465,14 @@ var resolveJsxDevRuntimeCompatPath = () => {
22362
22465
  `)}
22363
22466
  `;
22364
22467
  }, buildReactVendor = async (buildDir, { production = false } = {}) => {
22365
- const vendorDir = join41(buildDir, "react", "vendor");
22468
+ const vendorDir = join42(buildDir, "react", "vendor");
22366
22469
  mkdirSync8(vendorDir, { recursive: true });
22367
- const tmpDir = join41(buildDir, "_vendor_tmp");
22470
+ const tmpDir = join42(buildDir, "_vendor_tmp");
22368
22471
  mkdirSync8(tmpDir, { recursive: true });
22369
22472
  const specifiers = reactSpecifiers;
22370
22473
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
22371
22474
  const safeName = toSafeFileName(specifier);
22372
- const entryPath = join41(tmpDir, `${safeName}.ts`);
22475
+ const entryPath = join42(tmpDir, `${safeName}.ts`);
22373
22476
  const source = await generateEntrySource(specifier);
22374
22477
  await Bun.write(entryPath, source);
22375
22478
  return entryPath;
@@ -22429,7 +22532,7 @@ var init_vendorEntrySource = __esm(() => {
22429
22532
 
22430
22533
  // src/build/buildAngularVendor.ts
22431
22534
  import { mkdirSync as mkdirSync9 } from "fs";
22432
- import { join as join42 } from "path";
22535
+ import { join as join43 } from "path";
22433
22536
  import { rm as rm7 } from "fs/promises";
22434
22537
  var {build: bunBuild4, Glob: Glob7 } = globalThis.Bun;
22435
22538
  var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => jitMode ? [...REQUIRED_ANGULAR_SPECIFIERS_BASE, "@angular/compiler"] : REQUIRED_ANGULAR_SPECIFIERS_BASE, SERVER_ONLY_ANGULAR_SPECIFIERS, BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES, isBuildOnlyAngularSpecifier = (spec) => BUILD_ONLY_ANGULAR_SPECIFIER_PREFIXES.some((prefix) => spec === prefix || spec.startsWith(`${prefix}/`)), SCAN_SKIP_DIRS, isResolvable = (specifier) => {
@@ -22526,14 +22629,14 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
22526
22629
  await collectTransitiveAngularSpecs([...angular, ...transitiveRoots], angular);
22527
22630
  return Array.from(angular).filter(isResolvable);
22528
22631
  }, buildAngularVendor = async (buildDir, directories = [], linkerJitMode = false, depVendorSpecifiers = []) => {
22529
- const vendorDir = join42(buildDir, "angular", "vendor");
22632
+ const vendorDir = join43(buildDir, "angular", "vendor");
22530
22633
  mkdirSync9(vendorDir, { recursive: true });
22531
- const tmpDir = join42(buildDir, "_angular_vendor_tmp");
22634
+ const tmpDir = join43(buildDir, "_angular_vendor_tmp");
22532
22635
  mkdirSync9(tmpDir, { recursive: true });
22533
22636
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
22534
22637
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
22535
22638
  const safeName = toSafeFileName2(specifier);
22536
- const entryPath = join42(tmpDir, `${safeName}.ts`);
22639
+ const entryPath = join43(tmpDir, `${safeName}.ts`);
22537
22640
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
22538
22641
  return entryPath;
22539
22642
  }));
@@ -22564,9 +22667,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
22564
22667
  const specifiers = await resolveAngularSpecifiers(directories, linkerJitMode);
22565
22668
  return computeAngularVendorPaths(specifiers);
22566
22669
  }, buildAngularServerVendor = async (buildDir, directories = [], linkerJitMode = false) => {
22567
- const vendorDir = join42(buildDir, "angular", "vendor", "server");
22670
+ const vendorDir = join43(buildDir, "angular", "vendor", "server");
22568
22671
  mkdirSync9(vendorDir, { recursive: true });
22569
- const tmpDir = join42(buildDir, "_angular_server_vendor_tmp");
22672
+ const tmpDir = join43(buildDir, "_angular_server_vendor_tmp");
22570
22673
  mkdirSync9(tmpDir, { recursive: true });
22571
22674
  const browserSpecs = await resolveAngularSpecifiers(directories, linkerJitMode);
22572
22675
  const allSpecs = new Set(browserSpecs);
@@ -22577,7 +22680,7 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
22577
22680
  const specifiers = Array.from(allSpecs);
22578
22681
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
22579
22682
  const safeName = toSafeFileName2(specifier);
22580
- const entryPath = join42(tmpDir, `${safeName}.ts`);
22683
+ const entryPath = join43(tmpDir, `${safeName}.ts`);
22581
22684
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
22582
22685
  return entryPath;
22583
22686
  }));
@@ -22599,9 +22702,9 @@ var REQUIRED_ANGULAR_SPECIFIERS_BASE, requiredAngularSpecifiers = (jitMode) => j
22599
22702
  return specifiers;
22600
22703
  }, computeAngularServerVendorPaths = (buildDir, specifiers) => {
22601
22704
  const paths = {};
22602
- const vendorDir = join42(buildDir, "angular", "vendor", "server");
22705
+ const vendorDir = join43(buildDir, "angular", "vendor", "server");
22603
22706
  for (const specifier of specifiers) {
22604
- paths[specifier] = join42(vendorDir, `${toSafeFileName2(specifier)}.js`);
22707
+ paths[specifier] = join43(vendorDir, `${toSafeFileName2(specifier)}.js`);
22605
22708
  }
22606
22709
  return paths;
22607
22710
  }, computeAngularServerVendorPathsAsync = async (buildDir, directories = [], linkerJitMode = true) => {
@@ -22652,17 +22755,17 @@ var init_buildAngularVendor = __esm(() => {
22652
22755
 
22653
22756
  // src/build/buildVueVendor.ts
22654
22757
  import { mkdirSync as mkdirSync10 } from "fs";
22655
- import { join as join43 } from "path";
22758
+ import { join as join44 } from "path";
22656
22759
  import { rm as rm8 } from "fs/promises";
22657
22760
  var {build: bunBuild5 } = globalThis.Bun;
22658
22761
  var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"), buildVueVendor = async (buildDir) => {
22659
- const vendorDir = join43(buildDir, "vue", "vendor");
22762
+ const vendorDir = join44(buildDir, "vue", "vendor");
22660
22763
  mkdirSync10(vendorDir, { recursive: true });
22661
- const tmpDir = join43(buildDir, "_vue_vendor_tmp");
22764
+ const tmpDir = join44(buildDir, "_vue_vendor_tmp");
22662
22765
  mkdirSync10(tmpDir, { recursive: true });
22663
22766
  const entrypoints = await Promise.all(vueSpecifiers.map(async (specifier) => {
22664
22767
  const safeName = toSafeFileName3(specifier);
22665
- const entryPath = join43(tmpDir, `${safeName}.ts`);
22768
+ const entryPath = join44(tmpDir, `${safeName}.ts`);
22666
22769
  await Bun.write(entryPath, `export * from '${specifier}';
22667
22770
  `);
22668
22771
  return entryPath;
@@ -22690,7 +22793,7 @@ var vueSpecifiers, toSafeFileName3 = (specifier) => specifier.replace(/\//g, "_"
22690
22793
  const { readFileSync, writeFileSync, readdirSync } = await import("fs");
22691
22794
  const files = readdirSync(vendorDir).filter((f) => f.endsWith(".js"));
22692
22795
  for (const file of files) {
22693
- const filePath = join43(vendorDir, file);
22796
+ const filePath = join44(vendorDir, file);
22694
22797
  const content = readFileSync(filePath, "utf-8");
22695
22798
  if (!content.includes("__VUE_HMR_RUNTIME__"))
22696
22799
  continue;
@@ -22712,7 +22815,7 @@ var init_buildVueVendor = __esm(() => {
22712
22815
 
22713
22816
  // src/build/buildSvelteVendor.ts
22714
22817
  import { mkdirSync as mkdirSync11 } from "fs";
22715
- import { join as join44 } from "path";
22818
+ import { join as join45 } from "path";
22716
22819
  import { rm as rm9 } from "fs/promises";
22717
22820
  var {build: bunBuild6 } = globalThis.Bun;
22718
22821
  var svelteSpecifiers, isResolvable2 = (specifier) => {
@@ -22726,13 +22829,13 @@ var svelteSpecifiers, isResolvable2 = (specifier) => {
22726
22829
  const specifiers = resolveVendorSpecifiers();
22727
22830
  if (specifiers.length === 0)
22728
22831
  return;
22729
- const vendorDir = join44(buildDir, "svelte", "vendor");
22832
+ const vendorDir = join45(buildDir, "svelte", "vendor");
22730
22833
  mkdirSync11(vendorDir, { recursive: true });
22731
- const tmpDir = join44(buildDir, "_svelte_vendor_tmp");
22834
+ const tmpDir = join45(buildDir, "_svelte_vendor_tmp");
22732
22835
  mkdirSync11(tmpDir, { recursive: true });
22733
22836
  const entrypoints = await Promise.all(specifiers.map(async (specifier) => {
22734
22837
  const safeName = toSafeFileName4(specifier);
22735
- const entryPath = join44(tmpDir, `${safeName}.ts`);
22838
+ const entryPath = join45(tmpDir, `${safeName}.ts`);
22736
22839
  await Bun.write(entryPath, `export * from '${specifier}';
22737
22840
  `);
22738
22841
  return entryPath;
@@ -22783,7 +22886,7 @@ import {
22783
22886
  statSync as statSync5,
22784
22887
  writeFileSync as writeFileSync9
22785
22888
  } from "fs";
22786
- import { basename as basename17, dirname as dirname25, extname as extname13, join as join45, relative as relative19, resolve as resolve32 } from "path";
22889
+ import { basename as basename17, dirname as dirname25, extname as extname14, join as join46, relative as relative20, resolve as resolve33 } from "path";
22787
22890
  import { cwd, env as env2, exit } from "process";
22788
22891
  var {build: bunBuild7, Glob: Glob8 } = globalThis.Bun;
22789
22892
  var isBuildTraceEnabled = () => {
@@ -22917,8 +23020,8 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
22917
23020
  mkdirSync12(htmxDestDir, { recursive: true });
22918
23021
  const glob = new Glob8("htmx*.min.js");
22919
23022
  for (const relPath of glob.scanSync({ cwd: htmxDir })) {
22920
- const src = join45(htmxDir, relPath);
22921
- const dest = join45(htmxDestDir, "htmx.min.js");
23023
+ const src = join46(htmxDir, relPath);
23024
+ const dest = join46(htmxDestDir, "htmx.min.js");
22922
23025
  copyFileSync3(src, dest);
22923
23026
  return;
22924
23027
  }
@@ -22932,8 +23035,8 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
22932
23035
  if (globalThis.__absoluteVersion)
22933
23036
  return;
22934
23037
  const candidates = [
22935
- resolve32(import.meta.dir, "..", "..", "package.json"),
22936
- resolve32(import.meta.dir, "..", "package.json")
23038
+ resolve33(import.meta.dir, "..", "..", "package.json"),
23039
+ resolve33(import.meta.dir, "..", "package.json")
22937
23040
  ];
22938
23041
  const resolveCandidate = async (remaining) => {
22939
23042
  const [candidate, ...rest] = remaining;
@@ -22949,7 +23052,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
22949
23052
  };
22950
23053
  await resolveCandidate(candidates);
22951
23054
  }, SKIP_DIRS5, addWorkerPathIfExists = (file, relPath, workerPaths) => {
22952
- const absPath = resolve32(file, "..", relPath);
23055
+ const absPath = resolve33(file, "..", relPath);
22953
23056
  try {
22954
23057
  statSync5(absPath);
22955
23058
  workerPaths.add(absPath);
@@ -23002,7 +23105,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23002
23105
  const out = [];
23003
23106
  const directories = [];
23004
23107
  for (const entry of entries) {
23005
- const full = join45(dir, entry.name);
23108
+ const full = join46(dir, entry.name);
23006
23109
  if (entry.isDirectory()) {
23007
23110
  directories.push(full);
23008
23111
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -23028,7 +23131,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23028
23131
  vuePagesPath
23029
23132
  }) => {
23030
23133
  const { readdirSync: readDir } = await import("fs");
23031
- const devIndexDir = join45(buildPath, "_src_indexes");
23134
+ const devIndexDir = join46(buildPath, "_src_indexes");
23032
23135
  mkdirSync12(devIndexDir, { recursive: true });
23033
23136
  if (reactIndexesPath && reactPagesPath) {
23034
23137
  copyReactDevIndexes(reactIndexesPath, reactPagesPath, devIndexDir, readDir);
@@ -23044,42 +23147,42 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23044
23147
  return;
23045
23148
  }
23046
23149
  const indexFiles = readDir(reactIndexesPath).filter((file) => file.endsWith(".tsx"));
23047
- const pagesRel = relative19(process.cwd(), resolve32(reactPagesPath)).replace(/\\/g, "/");
23150
+ const pagesRel = relative20(process.cwd(), resolve33(reactPagesPath)).replace(/\\/g, "/");
23048
23151
  for (const file of indexFiles) {
23049
- let content = readFileSync27(join45(reactIndexesPath, file), "utf-8");
23152
+ let content = readFileSync27(join46(reactIndexesPath, file), "utf-8");
23050
23153
  content = content.replace(/from\s*['"]([^'"]*\/pages\/([^'"]+))['"]/g, (_match, _fullPath, componentName) => `from '/@src/${pagesRel}/${componentName}'`);
23051
- writeFileSync9(join45(devIndexDir, file), content);
23154
+ writeFileSync9(join46(devIndexDir, file), content);
23052
23155
  }
23053
23156
  }, copySvelteDevIndexes = (svelteDir, sveltePagesPath, svelteEntries, devIndexDir) => {
23054
- const svelteIndexDir = join45(getFrameworkGeneratedDir("svelte"), "indexes");
23055
- const sveltePageEntries = svelteEntries.filter((file) => resolve32(file).startsWith(resolve32(sveltePagesPath)));
23157
+ const svelteIndexDir = join46(getFrameworkGeneratedDir("svelte"), "indexes");
23158
+ const sveltePageEntries = svelteEntries.filter((file) => resolve33(file).startsWith(resolve33(sveltePagesPath)));
23056
23159
  for (const entry of sveltePageEntries) {
23057
23160
  const name = basename17(entry).replace(/\.svelte(\.(ts|js))?$/, "");
23058
- const indexFile = join45(svelteIndexDir, "pages", `${name}.js`);
23161
+ const indexFile = join46(svelteIndexDir, "pages", `${name}.js`);
23059
23162
  if (!existsSync34(indexFile))
23060
23163
  continue;
23061
23164
  let content = readFileSync27(indexFile, "utf-8");
23062
- const srcRel = relative19(process.cwd(), resolve32(entry)).replace(/\\/g, "/");
23165
+ const srcRel = relative20(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
23063
23166
  content = content.replace(/import\s+Component\s+from\s+['"]([^'"]+)['"]/, `import Component from "/@src/${srcRel}"`);
23064
- writeFileSync9(join45(devIndexDir, `${name}.svelte.js`), content);
23167
+ writeFileSync9(join46(devIndexDir, `${name}.svelte.js`), content);
23065
23168
  }
23066
23169
  }, copyVueDevIndexes = (vueDir, vuePagesPath, vueEntries, devIndexDir) => {
23067
- const vueIndexDir = join45(getFrameworkGeneratedDir("vue"), "indexes");
23068
- const vuePageEntries = vueEntries.filter((file) => resolve32(file).startsWith(resolve32(vuePagesPath)));
23170
+ const vueIndexDir = join46(getFrameworkGeneratedDir("vue"), "indexes");
23171
+ const vuePageEntries = vueEntries.filter((file) => resolve33(file).startsWith(resolve33(vuePagesPath)));
23069
23172
  for (const entry of vuePageEntries) {
23070
23173
  const name = basename17(entry, ".vue");
23071
- const indexFile = join45(vueIndexDir, `${name}.js`);
23174
+ const indexFile = join46(vueIndexDir, `${name}.js`);
23072
23175
  if (!existsSync34(indexFile))
23073
23176
  continue;
23074
23177
  let content = readFileSync27(indexFile, "utf-8");
23075
- const srcRel = relative19(process.cwd(), resolve32(entry)).replace(/\\/g, "/");
23178
+ const srcRel = relative20(process.cwd(), resolve33(entry)).replace(/\\/g, "/");
23076
23179
  content = content.replace(/import\s+Comp(?:\s*,\s*\*\s+as\s+\w+)?\s+from\s+['"]([^'"]+)['"]/, (match) => match.replace(/from\s+['"][^'"]+['"]/, `from "/@src/${srcRel}"`));
23077
- writeFileSync9(join45(devIndexDir, `${name}.vue.js`), content);
23180
+ writeFileSync9(join46(devIndexDir, `${name}.vue.js`), content);
23078
23181
  }
23079
23182
  }, buildDevUrlFileMap = (urlReferencedFiles, projectRoot) => {
23080
23183
  const urlFileMap = new Map;
23081
23184
  for (const srcPath of urlReferencedFiles) {
23082
- const rel = relative19(projectRoot, srcPath).replace(/\\/g, "/");
23185
+ const rel = relative20(projectRoot, srcPath).replace(/\\/g, "/");
23083
23186
  const name = basename17(srcPath);
23084
23187
  const mtime = Math.round(statSync5(srcPath).mtimeMs);
23085
23188
  const url = `/@src/${rel}?v=${mtime}`;
@@ -23094,7 +23197,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23094
23197
  const output = nonReactClientOutputs.find((artifact) => basename17(artifact.path).startsWith(`${srcBase}.`));
23095
23198
  if (!output)
23096
23199
  continue;
23097
- urlFileMap.set(basename17(srcPath), `/${relative19(buildPath, output.path).replace(/\\/g, "/")}`);
23200
+ urlFileMap.set(basename17(srcPath), `/${relative20(buildPath, output.path).replace(/\\/g, "/")}`);
23098
23201
  }
23099
23202
  return urlFileMap;
23100
23203
  }, buildUrlFileMap = (urlReferencedFiles, hmr, projectRoot, buildPath, nonReactClientOutputs) => {
@@ -23235,10 +23338,10 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23235
23338
  restoreTracePhase();
23236
23339
  return;
23237
23340
  }
23238
- const traceDir = join45(buildPath, ".absolute-trace");
23341
+ const traceDir = join46(buildPath, ".absolute-trace");
23239
23342
  const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
23240
23343
  mkdirSync12(traceDir, { recursive: true });
23241
- writeFileSync9(join45(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
23344
+ writeFileSync9(join46(traceDir, `build-trace-${timestamp}.json`), JSON.stringify({
23242
23345
  events: traceEvents,
23243
23346
  frameworks: traceFrameworkNames,
23244
23347
  generatedAt: new Date().toISOString(),
@@ -23269,16 +23372,16 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23269
23372
  const stylesPath = typeof stylesConfig === "string" ? stylesConfig : stylesConfig?.path;
23270
23373
  const stylesIgnore = typeof stylesConfig === "object" ? stylesConfig.ignore : undefined;
23271
23374
  const stylesDir = stylesPath && validateSafePath(stylesPath, projectRoot);
23272
- const reactIndexesPath = reactDir && join45(getFrameworkGeneratedDir("react"), "indexes");
23273
- const reactPagesPath = reactDir && join45(reactDir, "pages");
23274
- const htmlPagesPath = htmlDir && join45(htmlDir, "pages");
23275
- const htmlScriptsPath = htmlDir && join45(htmlDir, "scripts");
23276
- const sveltePagesPath = svelteDir && join45(svelteDir, "pages");
23277
- const vuePagesPath = vueDir && join45(vueDir, "pages");
23278
- const htmxPagesPath = htmxDir && join45(htmxDir, "pages");
23279
- const htmxScriptsPath = htmxDir && join45(htmxDir, "scripts");
23280
- const angularPagesPath = angularDir && join45(angularDir, "pages");
23281
- const emberPagesPath = emberDir && join45(emberDir, "pages");
23375
+ const reactIndexesPath = reactDir && join46(getFrameworkGeneratedDir("react"), "indexes");
23376
+ const reactPagesPath = reactDir && join46(reactDir, "pages");
23377
+ const htmlPagesPath = htmlDir && join46(htmlDir, "pages");
23378
+ const htmlScriptsPath = htmlDir && join46(htmlDir, "scripts");
23379
+ const sveltePagesPath = svelteDir && join46(svelteDir, "pages");
23380
+ const vuePagesPath = vueDir && join46(vueDir, "pages");
23381
+ const htmxPagesPath = htmxDir && join46(htmxDir, "pages");
23382
+ const htmxScriptsPath = htmxDir && join46(htmxDir, "scripts");
23383
+ const angularPagesPath = angularDir && join46(angularDir, "pages");
23384
+ const emberPagesPath = emberDir && join46(emberDir, "pages");
23282
23385
  const frontends = [
23283
23386
  reactDir,
23284
23387
  htmlDir,
@@ -23339,8 +23442,8 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23339
23442
  const [firstEntry] = serverDirMap;
23340
23443
  if (!firstEntry)
23341
23444
  throw new Error("Expected at least one server directory entry");
23342
- serverRoot = join45(firstEntry.dir, firstEntry.subdir);
23343
- serverOutDir = join45(buildPath, basename17(firstEntry.dir));
23445
+ serverRoot = join46(firstEntry.dir, firstEntry.subdir);
23446
+ serverOutDir = join46(buildPath, basename17(firstEntry.dir));
23344
23447
  } else if (serverDirMap.length > 1) {
23345
23448
  serverRoot = commonAncestor(serverDirMap.map((entry) => entry.dir), projectRoot);
23346
23449
  serverOutDir = buildPath;
@@ -23359,13 +23462,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23359
23462
  const filterToIncrementalEntries = (entryPoints, mapToSource) => {
23360
23463
  if (!isIncremental || !incrementalFiles)
23361
23464
  return entryPoints;
23362
- const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve32(f)));
23465
+ const normalizedIncremental = new Set(incrementalFiles.map((f) => resolve33(f)));
23363
23466
  const matchingEntries = [];
23364
23467
  for (const entry of entryPoints) {
23365
23468
  const sourceFile = mapToSource(entry);
23366
23469
  if (!sourceFile)
23367
23470
  continue;
23368
- if (!normalizedIncremental.has(resolve32(sourceFile)))
23471
+ if (!normalizedIncremental.has(resolve33(sourceFile)))
23369
23472
  continue;
23370
23473
  matchingEntries.push(entry);
23371
23474
  }
@@ -23375,7 +23478,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23375
23478
  await tracePhase("react/index-generation", () => generateReactIndexFiles(reactPagesPath, reactIndexesPath, hmr));
23376
23479
  }
23377
23480
  if (assetsPath && (!isIncremental || normalizedIncrementalFiles?.some((f) => f.includes("/assets/")))) {
23378
- await tracePhase("assets/copy", () => cpSync(assetsPath, join45(buildPath, "assets"), {
23481
+ await tracePhase("assets/copy", () => cpSync(assetsPath, join46(buildPath, "assets"), {
23379
23482
  force: true,
23380
23483
  recursive: true
23381
23484
  }));
@@ -23489,11 +23592,11 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23489
23592
  }
23490
23593
  }
23491
23594
  if (htmlDefaults.error || htmlDefaults.notFound || htmlDefaults.loading || Object.keys(htmlPages).length > 0) {
23492
- const htmlConventionsOutDir = join45(buildPath, "conventions", "html");
23595
+ const htmlConventionsOutDir = join46(buildPath, "conventions", "html");
23493
23596
  mkdirSync12(htmlConventionsOutDir, { recursive: true });
23494
23597
  const htmlPathRemap = new Map;
23495
23598
  for (const sourcePath of htmlConventionSources) {
23496
- const dest = join45(htmlConventionsOutDir, basename17(sourcePath));
23599
+ const dest = join46(htmlConventionsOutDir, basename17(sourcePath));
23497
23600
  cpSync(sourcePath, dest, { force: true });
23498
23601
  htmlPathRemap.set(sourcePath, dest);
23499
23602
  }
@@ -23541,13 +23644,13 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23541
23644
  return scoped;
23542
23645
  return scoped.filter((entry) => {
23543
23646
  const source = mapToSource(entry);
23544
- return source !== null && deferPageEntries.except.has(resolve32(source));
23647
+ return source !== null && deferPageEntries.except.has(resolve33(source));
23545
23648
  });
23546
23649
  };
23547
23650
  const mapReactIndexToPage = (entry) => {
23548
- if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve32(reactIndexesPath))) {
23651
+ if (reactIndexesPath && reactPagesPath && entry.startsWith(resolve33(reactIndexesPath))) {
23549
23652
  const pageName = basename17(entry, ".tsx");
23550
- return join45(reactPagesPath, `${pageName}.tsx`);
23653
+ return join46(reactPagesPath, `${pageName}.tsx`);
23551
23654
  }
23552
23655
  return null;
23553
23656
  };
@@ -23587,7 +23690,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23587
23690
  for (const entry of vueEntries) {
23588
23691
  const name = basename17(entry, ".vue");
23589
23692
  if (ssrOnlyPageNames.has(name)) {
23590
- resolved.add(resolve32(entry));
23693
+ resolved.add(resolve33(entry));
23591
23694
  }
23592
23695
  }
23593
23696
  return resolved;
@@ -23700,7 +23803,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23700
23803
  const clientPath = islandSvelteClientPaths[idx];
23701
23804
  if (!sourcePath || !clientPath)
23702
23805
  continue;
23703
- islandSvelteClientPathMap.set(resolve32(sourcePath), clientPath);
23806
+ islandSvelteClientPathMap.set(resolve33(sourcePath), clientPath);
23704
23807
  }
23705
23808
  const islandVueClientPathMap = new Map;
23706
23809
  for (let idx = 0;idx < islandVueSources.length; idx++) {
@@ -23708,7 +23811,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23708
23811
  const clientPath = islandVueClientPaths[idx];
23709
23812
  if (!sourcePath || !clientPath)
23710
23813
  continue;
23711
- islandVueClientPathMap.set(resolve32(sourcePath), clientPath);
23814
+ islandVueClientPathMap.set(resolve33(sourcePath), clientPath);
23712
23815
  }
23713
23816
  const islandAngularClientPathMap = new Map;
23714
23817
  for (let idx = 0;idx < islandAngularSources.length; idx++) {
@@ -23716,7 +23819,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23716
23819
  const clientPath = islandAngularClientPaths[idx];
23717
23820
  if (!sourcePath || !clientPath)
23718
23821
  continue;
23719
- islandAngularClientPathMap.set(resolve32(sourcePath), clientPath);
23822
+ islandAngularClientPathMap.set(resolve33(sourcePath), clientPath);
23720
23823
  }
23721
23824
  const reactConventionSources = collectConventionSourceFiles(conventionsMap.react);
23722
23825
  const svelteConventionSources = collectConventionSourceFiles(conventionsMap.svelte);
@@ -23727,7 +23830,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23727
23830
  const compileReactConventions = async () => {
23728
23831
  if (reactConventionSources.length === 0)
23729
23832
  return emptyStringArray;
23730
- const destDir = join45(buildPath, "conventions", "react");
23833
+ const destDir = join46(buildPath, "conventions", "react");
23731
23834
  rmSync2(destDir, { force: true, recursive: true });
23732
23835
  mkdirSync12(destDir, { recursive: true });
23733
23836
  const destPaths = await Promise.all(reactConventionSources.map(async (source, idx) => {
@@ -23771,7 +23874,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23771
23874
  angularConventionSources.length > 0 && angularDir ? tracePhase("compile/convention-angular", () => Promise.resolve().then(() => (init_compileAngular(), {})).then((mod) => compileAngular(angularConventionSources, angularDir, hmr, styleTransformConfig))) : { serverPaths: emptyStringArray }
23772
23875
  ]);
23773
23876
  const bundleConventionFiles = async (framework, compiledPaths) => {
23774
- const destDir = join45(buildPath, "conventions", framework);
23877
+ const destDir = join46(buildPath, "conventions", framework);
23775
23878
  rmSync2(destDir, { force: true, recursive: true });
23776
23879
  mkdirSync12(destDir, { recursive: true });
23777
23880
  const destPaths = await Promise.all(compiledPaths.map(async (compiledPath, idx) => {
@@ -23846,7 +23949,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23846
23949
  }
23847
23950
  })) : {
23848
23951
  entries: [],
23849
- generatedRoot: join45(buildPath, "_island_entries")
23952
+ generatedRoot: join46(buildPath, "_island_entries")
23850
23953
  };
23851
23954
  const islandClientEntryPoints = islandEntryResult.entries.map((entry) => entry.entryPath);
23852
23955
  if (!deferPageEntries && serverEntryPoints.length === 0 && reactClientEntryPoints.length === 0 && nonReactClientEntryPoints.length === 0 && urlReferencedFiles.length === 0 && islandClientEntryPoints.length === 0 && htmxDir === undefined && htmlDir === undefined) {
@@ -23882,7 +23985,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23882
23985
  return {};
23883
23986
  }
23884
23987
  if (hmr && reactIndexesPath && reactClientEntryPoints.length > 0) {
23885
- const refreshEntry = join45(reactIndexesPath, "_refresh.tsx");
23988
+ const refreshEntry = join46(reactIndexesPath, "_refresh.tsx");
23886
23989
  if (!reactClientEntryPoints.includes(refreshEntry))
23887
23990
  reactClientEntryPoints.push(refreshEntry);
23888
23991
  }
@@ -23994,19 +24097,19 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
23994
24097
  throw: false
23995
24098
  }, resolveBunBuildOverride(bunBuildConfig, "reactClient")) : undefined;
23996
24099
  if (reactDir && reactClientEntryPoints.length > 0) {
23997
- rmSync2(join45(buildPath, "react", "generated", "indexes"), {
24100
+ rmSync2(join46(buildPath, "react", "generated", "indexes"), {
23998
24101
  force: true,
23999
24102
  recursive: true
24000
24103
  });
24001
24104
  }
24002
24105
  if (angularDir && angularClientPaths.length > 0) {
24003
- rmSync2(join45(buildPath, "angular", "indexes"), {
24106
+ rmSync2(join46(buildPath, "angular", "indexes"), {
24004
24107
  force: true,
24005
24108
  recursive: true
24006
24109
  });
24007
24110
  }
24008
24111
  if (islandClientEntryPoints.length > 0) {
24009
- rmSync2(join45(buildPath, "islands"), {
24112
+ rmSync2(join46(buildPath, "islands"), {
24010
24113
  force: true,
24011
24114
  recursive: true
24012
24115
  });
@@ -24121,7 +24224,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24121
24224
  globalCssEntries.length > 0 ? tracePhase("bun/global-css", () => bunBuild7(mergeBunBuildConfig({
24122
24225
  entrypoints: globalCssEntries,
24123
24226
  naming: `[dir]/[name].[hash].[ext]`,
24124
- outdir: stylesDir ? join45(buildPath, basename17(stylesDir)) : buildPath,
24227
+ outdir: stylesDir ? join46(buildPath, basename17(stylesDir)) : buildPath,
24125
24228
  plugins: [stylePreprocessorPlugin],
24126
24229
  root: stylesDir || clientRoot,
24127
24230
  target: "browser",
@@ -24130,7 +24233,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24130
24233
  vueCssPaths.length > 0 ? tracePhase("bun/vue-css", () => bunBuild7(mergeBunBuildConfig({
24131
24234
  entrypoints: vueCssPaths,
24132
24235
  naming: `[name].[hash].[ext]`,
24133
- outdir: join45(buildPath, assetsPath ? basename17(assetsPath) : "assets", "css"),
24236
+ outdir: join46(buildPath, assetsPath ? basename17(assetsPath) : "assets", "css"),
24134
24237
  target: "browser",
24135
24238
  throw: false
24136
24239
  }, resolveBunBuildOverride(bunBuildConfig, "vueCss")))) : undefined
@@ -24152,15 +24255,15 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24152
24255
  }
24153
24256
  if (!isDev && resolveClientSourcemap(sourcemaps, isDev) === "external") {
24154
24257
  await Promise.resolve().then(() => init_chainInlineSourcemaps());
24155
- const sourcemapDir = join45(projectRoot, "sourcemaps");
24258
+ const sourcemapDir = join46(projectRoot, "sourcemaps");
24156
24259
  mkdirSync12(sourcemapDir, { recursive: true });
24157
24260
  const mapFiles = readdirSync7(buildPath, {
24158
24261
  encoding: "utf8",
24159
24262
  recursive: true
24160
- }).filter((entry) => entry.endsWith(".js.map") && !entry.includes("node_modules")).map((entry) => join45(buildPath, entry));
24263
+ }).filter((entry) => entry.endsWith(".js.map") && !entry.includes("node_modules")).map((entry) => join46(buildPath, entry));
24161
24264
  for (const mapPath of mapFiles) {
24162
24265
  chainExternalSourcemap(mapPath);
24163
- renameSync(mapPath, join45(sourcemapDir, basename17(mapPath)));
24266
+ renameSync(mapPath, join46(sourcemapDir, basename17(mapPath)));
24164
24267
  const jsPath = mapPath.slice(0, -4);
24165
24268
  try {
24166
24269
  const javascript = readFileSync27(jsPath, "utf-8").replace(/\n?\/\/# sourceMappingURL=[^\n]*\s*$/, `
@@ -24168,7 +24271,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24168
24271
  writeFileSync9(jsPath, javascript);
24169
24272
  } catch {}
24170
24273
  }
24171
- console.info(`[absolute] sourcemaps: chained + privatized ${mapFiles.length} client maps \u2192 ${relative19(projectRoot, sourcemapDir)}/`);
24274
+ console.info(`[absolute] sourcemaps: chained + privatized ${mapFiles.length} client maps \u2192 ${relative20(projectRoot, sourcemapDir)}/`);
24172
24275
  }
24173
24276
  if (serverResult && !serverResult.success && serverLogs.length > 0) {
24174
24277
  handlePassFailure(serverLogs, "server", "Server");
@@ -24225,7 +24328,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24225
24328
  };
24226
24329
  await tracePhase("postprocess/client-rewrite", rewriteClientGroups, clientRewriteStats);
24227
24330
  if (!hmr) {
24228
- const reactVendorDir = join45(buildPath, "react", "vendor");
24331
+ const reactVendorDir = join46(buildPath, "react", "vendor");
24229
24332
  const vendorChunkPaths = existsSync34(reactVendorDir) ? [
24230
24333
  ...new Glob8("**/*.js").scanSync({
24231
24334
  absolute: true,
@@ -24245,7 +24348,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24245
24348
  const fileDir = dirname25(artifact.path);
24246
24349
  const relativePaths = {};
24247
24350
  for (const [specifier, absolute] of Object.entries(angularServerVendorPaths)) {
24248
- const rel = relative19(fileDir, absolute);
24351
+ const rel = relative20(fileDir, absolute);
24249
24352
  relativePaths[specifier] = rel.startsWith(".") ? rel : `./${rel}`;
24250
24353
  }
24251
24354
  return relativePaths;
@@ -24301,7 +24404,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24301
24404
  ], buildPath)
24302
24405
  };
24303
24406
  for (const artifact of serverOutputs) {
24304
- if (extname13(artifact.path) !== ".js")
24407
+ if (extname14(artifact.path) !== ".js")
24305
24408
  continue;
24306
24409
  const fileWithHash = basename17(artifact.path);
24307
24410
  const [baseName] = fileWithHash.split(`.${artifact.hash}.`);
@@ -24321,7 +24424,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24321
24424
  };
24322
24425
  const cssByName = new Map;
24323
24426
  for (const artifact of cssOutputs) {
24324
- if (extname13(artifact.path) !== ".css")
24427
+ if (extname14(artifact.path) !== ".css")
24325
24428
  continue;
24326
24429
  const cssName = stripHash(basename17(artifact.path), artifact.hash);
24327
24430
  if (cssName)
@@ -24331,7 +24434,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24331
24434
  const siblingCssPaths = [];
24332
24435
  const serverJsByPascalName = new Map;
24333
24436
  await Promise.all(serverOutputs.map(async (artifact) => {
24334
- if (extname13(artifact.path) !== ".js")
24437
+ if (extname14(artifact.path) !== ".js")
24335
24438
  return;
24336
24439
  const pascalName = stripHash(basename17(artifact.path), artifact.hash);
24337
24440
  if (!pascalName)
@@ -24358,7 +24461,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24358
24461
  if (skipAngularClientBundle) {
24359
24462
  for (const clientPath of angularClientPaths) {
24360
24463
  const fileBase = basename17(clientPath, ".js");
24361
- const relFromCwd = relative19(projectRoot, clientPath).replace(/\\/g, "/");
24464
+ const relFromCwd = relative20(projectRoot, clientPath).replace(/\\/g, "/");
24362
24465
  manifest[`${toPascal(fileBase)}Index`] = `/@src/${relFromCwd}`;
24363
24466
  }
24364
24467
  }
@@ -24381,7 +24484,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24381
24484
  const processHtmlPages = async () => {
24382
24485
  if (!(htmlDir && htmlPagesPath))
24383
24486
  return;
24384
- const outputHtmlPages = isSingle ? join45(buildPath, "pages") : join45(buildPath, basename17(htmlDir), "pages");
24487
+ const outputHtmlPages = isSingle ? join46(buildPath, "pages") : join46(buildPath, basename17(htmlDir), "pages");
24385
24488
  mkdirSync12(outputHtmlPages, { recursive: true });
24386
24489
  cpSync(htmlPagesPath, outputHtmlPages, {
24387
24490
  force: true,
@@ -24408,14 +24511,14 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24408
24511
  const processHtmxPages = async () => {
24409
24512
  if (!(htmxDir && htmxPagesPath))
24410
24513
  return;
24411
- const outputHtmxPages = isSingle ? join45(buildPath, "pages") : join45(buildPath, basename17(htmxDir), "pages");
24514
+ const outputHtmxPages = isSingle ? join46(buildPath, "pages") : join46(buildPath, basename17(htmxDir), "pages");
24412
24515
  mkdirSync12(outputHtmxPages, { recursive: true });
24413
24516
  cpSync(htmxPagesPath, outputHtmxPages, {
24414
24517
  force: true,
24415
24518
  recursive: true
24416
24519
  });
24417
24520
  if (shouldCopyHtmx) {
24418
- const htmxDestDir = isSingle ? buildPath : join45(buildPath, basename17(htmxDir));
24521
+ const htmxDestDir = isSingle ? buildPath : join46(buildPath, basename17(htmxDir));
24419
24522
  copyHtmxVendor(htmxDir, htmxDestDir);
24420
24523
  }
24421
24524
  await updateAssetPaths(manifest, outputHtmxPages);
@@ -24504,7 +24607,7 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24504
24607
  }))
24505
24608
  ];
24506
24609
  setSpaRouteManifest(spaRouteHosts);
24507
- writeFileSync9(join45(buildPath, "spa-routes.json"), JSON.stringify(spaRouteHosts, null, "\t"));
24610
+ writeFileSync9(join46(buildPath, "spa-routes.json"), JSON.stringify(spaRouteHosts, null, "\t"));
24508
24611
  if (isIncremental) {
24509
24612
  writeBuildTrace(buildPath);
24510
24613
  return {
@@ -24515,9 +24618,9 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24515
24618
  tailwindChanged: tailwindResult?.cssChanged ?? false
24516
24619
  };
24517
24620
  }
24518
- writeFileSync9(join45(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
24621
+ writeFileSync9(join46(buildPath, "manifest.json"), JSON.stringify(manifest, null, "\t"));
24519
24622
  if (Object.keys(conventionsMap).length > 0) {
24520
- writeFileSync9(join45(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
24623
+ writeFileSync9(join46(buildPath, "conventions.json"), JSON.stringify(conventionsMap, null, "\t"));
24521
24624
  }
24522
24625
  writeBuildTrace(buildPath);
24523
24626
  if (mode === "production") {
@@ -24538,6 +24641,9 @@ ${offenders.map((o) => ` \u2022 ${o}`).join(`
24538
24641
  console.warn("[sitemap] Build-time generation failed:", err);
24539
24642
  }
24540
24643
  }
24644
+ if (mode === "production") {
24645
+ await tracePhase("compress/assets", () => writePrecompressedAssets(buildPath));
24646
+ }
24541
24647
  if (tailwind && mode === "production") {
24542
24648
  disposeTailwindCompiler(tailwind.input);
24543
24649
  }
@@ -24596,6 +24702,7 @@ var init_build = __esm(() => {
24596
24702
  init_validateSafePath();
24597
24703
  init_spaRouteManifest();
24598
24704
  init_pwa();
24705
+ init_precompressed();
24599
24706
  REACT_VENDOR_SPECIFIERS = [
24600
24707
  "react-dom/client",
24601
24708
  "react-refresh/runtime",
@@ -24637,7 +24744,7 @@ var init_build = __esm(() => {
24637
24744
 
24638
24745
  // src/build/buildEmberVendor.ts
24639
24746
  import { mkdirSync as mkdirSync13, existsSync as existsSync35 } from "fs";
24640
- import { join as join46 } from "path";
24747
+ import { join as join47 } from "path";
24641
24748
  import { rm as rm10 } from "fs/promises";
24642
24749
  var {build: bunBuild8 } = globalThis.Bun;
24643
24750
  var toSafeFileName5 = (specifier) => specifier.replace(/^@/, "").replace(/\//g, "_"), generateMacrosShim = () => `// Generated shim for @embroider/macros \u2014 provides minimal runtime
@@ -24689,7 +24796,7 @@ export const importSync = (specifier) => {
24689
24796
  if (standaloneSpecifiers.has(specifier)) {
24690
24797
  return { resolveTo: specifier, specifier };
24691
24798
  }
24692
- const emberInternalPath = join46(cwd, "node_modules/ember-source/dist/packages", specifier, "index.js");
24799
+ const emberInternalPath = join47(cwd, "node_modules/ember-source/dist/packages", specifier, "index.js");
24693
24800
  if (!existsSync35(emberInternalPath)) {
24694
24801
  throw new Error(`Ember vendor build: cannot find ${specifier} at ${emberInternalPath}. ` + `Is ember-source installed and at least 6.12?`);
24695
24802
  }
@@ -24721,7 +24828,7 @@ export const importSync = (specifier) => {
24721
24828
  if (standalonePackages.has(args.path)) {
24722
24829
  return;
24723
24830
  }
24724
- const internal = join46(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
24831
+ const internal = join47(cwd, "node_modules/ember-source/dist/packages", args.path, "index.js");
24725
24832
  if (existsSync35(internal)) {
24726
24833
  return { path: internal };
24727
24834
  }
@@ -24729,16 +24836,16 @@ export const importSync = (specifier) => {
24729
24836
  });
24730
24837
  }
24731
24838
  }), buildEmberVendor = async (buildDir, cwd = process.cwd()) => {
24732
- const vendorDir = join46(buildDir, "ember", "vendor");
24839
+ const vendorDir = join47(buildDir, "ember", "vendor");
24733
24840
  mkdirSync13(vendorDir, { recursive: true });
24734
- const tmpDir = join46(buildDir, "_ember_vendor_tmp");
24841
+ const tmpDir = join47(buildDir, "_ember_vendor_tmp");
24735
24842
  mkdirSync13(tmpDir, { recursive: true });
24736
- const macrosShimPath = join46(tmpDir, "embroider_macros_shim.js");
24843
+ const macrosShimPath = join47(tmpDir, "embroider_macros_shim.js");
24737
24844
  await Bun.write(macrosShimPath, generateMacrosShim());
24738
24845
  const resolutions = REQUIRED_EMBER_SPECIFIERS.map((specifier) => resolveEmberSpecifier(specifier, cwd));
24739
24846
  const entrypoints = await Promise.all(resolutions.map(async (resolution) => {
24740
24847
  const safeName = toSafeFileName5(resolution.specifier);
24741
- const entryPath = join46(tmpDir, `${safeName}.js`);
24848
+ const entryPath = join47(tmpDir, `${safeName}.js`);
24742
24849
  const source = resolution.specifier === "@embroider/macros" ? `export * from ${JSON.stringify(macrosShimPath)};
24743
24850
  ` : generateVendorEntrySource2(resolution);
24744
24851
  await Bun.write(entryPath, source);
@@ -24887,7 +24994,7 @@ var stripStringsAndComments = (source) => {
24887
24994
  // src/dev/dependencyGraph.ts
24888
24995
  import { existsSync as existsSync36, readFileSync as readFileSync28 } from "fs";
24889
24996
  var {Glob: Glob9 } = globalThis.Bun;
24890
- import { resolve as resolve33 } from "path";
24997
+ import { resolve as resolve34 } from "path";
24891
24998
  var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath) => {
24892
24999
  const lower = filePath.toLowerCase();
24893
25000
  if (lower.endsWith(".ts") || lower.endsWith(".tsx") || lower.endsWith(".jsx"))
@@ -24901,8 +25008,8 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
24901
25008
  if (!importPath.startsWith(".") && !importPath.startsWith("/")) {
24902
25009
  return null;
24903
25010
  }
24904
- const fromDir = resolve33(fromFile, "..");
24905
- const normalized = resolve33(fromDir, importPath);
25011
+ const fromDir = resolve34(fromFile, "..");
25012
+ const normalized = resolve34(fromDir, importPath);
24906
25013
  const extensions = [
24907
25014
  ".ts",
24908
25015
  ".tsx",
@@ -24932,7 +25039,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
24932
25039
  dependents.delete(normalizedPath);
24933
25040
  }
24934
25041
  }, addFileToGraph = (graph, filePath) => {
24935
- const normalizedPath = resolve33(filePath);
25042
+ const normalizedPath = resolve34(filePath);
24936
25043
  if (!existsSync36(normalizedPath))
24937
25044
  return;
24938
25045
  const dependencies = extractDependencies(normalizedPath);
@@ -24959,10 +25066,10 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
24959
25066
  }, IGNORED_SEGMENTS, buildInitialDependencyGraph = (graph, directories) => {
24960
25067
  const processedFiles = new Set;
24961
25068
  const glob = new Glob9("**/*.{ts,tsx,js,jsx,vue,svelte,html,htm}");
24962
- const resolvedDirs = directories.map((dir) => resolve33(dir)).filter((dir) => existsSync36(dir));
25069
+ const resolvedDirs = directories.map((dir) => resolve34(dir)).filter((dir) => existsSync36(dir));
24963
25070
  const allFiles = resolvedDirs.flatMap((dir) => Array.from(glob.scanSync({ absolute: true, cwd: dir })));
24964
25071
  for (const file of allFiles) {
24965
- const fullPath = resolve33(file);
25072
+ const fullPath = resolve34(file);
24966
25073
  if (IGNORED_SEGMENTS.some((seg) => fullPath.includes(seg)))
24967
25074
  continue;
24968
25075
  if (processedFiles.has(fullPath))
@@ -25075,7 +25182,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25075
25182
  return [];
25076
25183
  }
25077
25184
  }, getAffectedFiles = (graph, changedFile) => {
25078
- const normalizedPath = resolve33(changedFile);
25185
+ const normalizedPath = resolve34(changedFile);
25079
25186
  const affected = new Set;
25080
25187
  const toProcess = [normalizedPath];
25081
25188
  const processNode = (current) => {
@@ -25106,7 +25213,7 @@ var emptyDependencyGraph, tsTranspiler, jsTranspiler, loaderForFile = (filePath)
25106
25213
  }, removeDependentsForFile = (graph, normalizedPath) => {
25107
25214
  graph.dependents.delete(normalizedPath);
25108
25215
  }, removeFileFromGraph = (graph, filePath) => {
25109
- const normalizedPath = resolve33(filePath);
25216
+ const normalizedPath = resolve34(filePath);
25110
25217
  removeDepsForFile(graph, normalizedPath);
25111
25218
  removeDependentsForFile(graph, normalizedPath);
25112
25219
  };
@@ -25149,12 +25256,12 @@ var globalVersionCounter = 0, createModuleVersionTracker = () => new Map, getNex
25149
25256
  };
25150
25257
 
25151
25258
  // src/dev/configResolver.ts
25152
- import { resolve as resolve34 } from "path";
25259
+ import { resolve as resolve35 } from "path";
25153
25260
  var resolveBuildPaths = (config) => {
25154
25261
  const cwd = process.cwd();
25155
25262
  const normalize = (path) => path.replace(/\\/g, "/");
25156
- const withDefault = (value, fallback) => normalize(resolve34(cwd, value ?? fallback));
25157
- const optional = (value) => value ? normalize(resolve34(cwd, value)) : undefined;
25263
+ const withDefault = (value, fallback) => normalize(resolve35(cwd, value ?? fallback));
25264
+ const optional = (value) => value ? normalize(resolve35(cwd, value)) : undefined;
25158
25265
  return {
25159
25266
  angularDir: optional(config.angularDirectory),
25160
25267
  assetsDir: optional(config.assetsDirectory),
@@ -25214,7 +25321,7 @@ var init_clientManager = __esm(() => {
25214
25321
 
25215
25322
  // src/dev/pathUtils.ts
25216
25323
  import { existsSync as existsSync37, readdirSync as readdirSync8, readFileSync as readFileSync29 } from "fs";
25217
- import { dirname as dirname26, resolve as resolve35 } from "path";
25324
+ import { dirname as dirname26, resolve as resolve36 } from "path";
25218
25325
  var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25219
25326
  if (shouldIgnorePath(filePath, resolved)) {
25220
25327
  return "ignored";
@@ -25290,7 +25397,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25290
25397
  return "unknown";
25291
25398
  }, collectAngularResourceDirs = (angularDir) => {
25292
25399
  const out = new Set;
25293
- const angularRoot = resolve35(angularDir);
25400
+ const angularRoot = resolve36(angularDir);
25294
25401
  const angularRootNormalized = normalizePath(angularRoot);
25295
25402
  const walk = (dir) => {
25296
25403
  let entries;
@@ -25303,7 +25410,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25303
25410
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
25304
25411
  continue;
25305
25412
  }
25306
- const full = resolve35(dir, entry.name);
25413
+ const full = resolve36(dir, entry.name);
25307
25414
  if (entry.isDirectory()) {
25308
25415
  walk(full);
25309
25416
  continue;
@@ -25344,7 +25451,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25344
25451
  }
25345
25452
  const componentDir = dirname26(full);
25346
25453
  for (const ref of refs) {
25347
- const refAbs = normalizePath(resolve35(componentDir, ref));
25454
+ const refAbs = normalizePath(resolve36(componentDir, ref));
25348
25455
  const refDir = normalizePath(dirname26(refAbs));
25349
25456
  if (refDir === angularRootNormalized || refDir.startsWith(`${angularRootNormalized}/`)) {
25350
25457
  continue;
@@ -25361,7 +25468,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25361
25468
  const push = (path) => {
25362
25469
  if (!path)
25363
25470
  return;
25364
- const abs = normalizePath(resolve35(cwd, path));
25471
+ const abs = normalizePath(resolve36(cwd, path));
25365
25472
  if (!roots.includes(abs))
25366
25473
  roots.push(abs);
25367
25474
  };
@@ -25386,7 +25493,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25386
25493
  push(cfg.assetsDir);
25387
25494
  push(cfg.stylesDir);
25388
25495
  for (const candidate of ["src", "db", "assets", "styles"]) {
25389
- const abs = normalizePath(resolve35(cwd, candidate));
25496
+ const abs = normalizePath(resolve36(cwd, candidate));
25390
25497
  if (existsSync37(abs) && !roots.includes(abs))
25391
25498
  roots.push(abs);
25392
25499
  }
@@ -25397,7 +25504,7 @@ var STYLE_EXTENSION_PATTERN2, detectFramework = (filePath, resolved) => {
25397
25504
  continue;
25398
25505
  if (entry.name.startsWith("."))
25399
25506
  continue;
25400
- const abs = normalizePath(resolve35(cwd, entry.name));
25507
+ const abs = normalizePath(resolve36(cwd, entry.name));
25401
25508
  if (roots.includes(abs))
25402
25509
  continue;
25403
25510
  if (shouldIgnorePath(abs, resolved))
@@ -25480,8 +25587,8 @@ var init_pathUtils = __esm(() => {
25480
25587
 
25481
25588
  // src/dev/devPrescan.ts
25482
25589
  import { existsSync as existsSync38, readdirSync as readdirSync9, rmSync as rmSync3 } from "fs";
25483
- import { mkdir as mkdir11, readFile as readFile6, rename as rename3, writeFile as writeFile8 } from "fs/promises";
25484
- import { join as join47 } from "path";
25590
+ import { mkdir as mkdir11, readFile as readFile7, rename as rename3, writeFile as writeFile9 } from "fs/promises";
25591
+ import { join as join48 } from "path";
25485
25592
  var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2000, collectConfigVendorSourceDirs = (config) => Array.from(new Set([
25486
25593
  config.reactDirectory,
25487
25594
  config.svelteDirectory,
@@ -25495,7 +25602,7 @@ var PRESCAN_DIR, PAYLOAD_VERSION = 1, POLL_INTERVAL_MS = 10, DEFAULT_WAIT_MS = 2
25495
25602
  if (!existsSync38(path))
25496
25603
  return;
25497
25604
  try {
25498
- const parsed = JSON.parse(await readFile6(path, "utf8"));
25605
+ const parsed = JSON.parse(await readFile7(path, "utf8"));
25499
25606
  if (!isPayload(parsed))
25500
25607
  return;
25501
25608
  return parsed.ok ? parsed : null;
@@ -25539,7 +25646,7 @@ var init_devPrescan = __esm(() => {
25539
25646
  init_configResolver();
25540
25647
  init_dependencyGraph();
25541
25648
  init_pathUtils();
25542
- PRESCAN_DIR = join47(".absolutejs", "dev-prescan");
25649
+ PRESCAN_DIR = join48(".absolutejs", "dev-prescan");
25543
25650
  });
25544
25651
 
25545
25652
  // src/dev/serverEntryCopies.ts
@@ -25549,7 +25656,7 @@ var init_serverEntryCopies = () => {};
25549
25656
  // src/dev/fileWatcher.ts
25550
25657
  import { watch } from "fs";
25551
25658
  import { existsSync as existsSync39, readdirSync as readdirSync10, statSync as statSync6 } from "fs";
25552
- import { dirname as dirname27, join as join48, resolve as resolve36 } from "path";
25659
+ import { dirname as dirname27, join as join49, resolve as resolve37 } from "path";
25553
25660
  var safeRemoveFromGraph = (graph, fullPath) => {
25554
25661
  try {
25555
25662
  removeFileFromGraph(graph, fullPath);
@@ -25581,7 +25688,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25581
25688
  for (const name of entries) {
25582
25689
  if (shouldSkipFilename(name, isStylesDir))
25583
25690
  continue;
25584
- const child = join48(eventDir, name).replace(/\\/g, "/");
25691
+ const child = join49(eventDir, name).replace(/\\/g, "/");
25585
25692
  let st;
25586
25693
  try {
25587
25694
  st = statSync6(child);
@@ -25602,7 +25709,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25602
25709
  return;
25603
25710
  if (shouldSkipFilename(filename, isStylesDir)) {
25604
25711
  if (event === "rename") {
25605
- const eventDir = dirname27(join48(absolutePath, filename)).replace(/\\/g, "/");
25712
+ const eventDir = dirname27(join49(absolutePath, filename)).replace(/\\/g, "/");
25606
25713
  atomicRecoveryScan(eventDir);
25607
25714
  for (const delay of [25, 100]) {
25608
25715
  const timer = setTimeout(() => atomicRecoveryScan(eventDir), delay);
@@ -25611,7 +25718,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25611
25718
  }
25612
25719
  return;
25613
25720
  }
25614
- const fullPath = join48(absolutePath, filename).replace(/\\/g, "/");
25721
+ const fullPath = join49(absolutePath, filename).replace(/\\/g, "/");
25615
25722
  if (shouldIgnorePath(fullPath, state.resolvedPaths)) {
25616
25723
  return;
25617
25724
  }
@@ -25629,7 +25736,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25629
25736
  }, addFileWatchers = (state, paths, onFileChange) => {
25630
25737
  const stylesDir = state.resolvedPaths?.stylesDir;
25631
25738
  paths.forEach((path) => {
25632
- const absolutePath = resolve36(path).replace(/\\/g, "/");
25739
+ const absolutePath = resolve37(path).replace(/\\/g, "/");
25633
25740
  if (!existsSync39(absolutePath)) {
25634
25741
  return;
25635
25742
  }
@@ -25640,7 +25747,7 @@ var safeRemoveFromGraph = (graph, fullPath) => {
25640
25747
  const watchPaths = getWatchPaths(config, state.resolvedPaths);
25641
25748
  const stylesDir = state.resolvedPaths?.stylesDir;
25642
25749
  watchPaths.forEach((path) => {
25643
- const absolutePath = resolve36(path).replace(/\\/g, "/");
25750
+ const absolutePath = resolve37(path).replace(/\\/g, "/");
25644
25751
  if (!existsSync39(absolutePath)) {
25645
25752
  return;
25646
25753
  }
@@ -25660,13 +25767,13 @@ var init_fileWatcher = __esm(() => {
25660
25767
  });
25661
25768
 
25662
25769
  // src/dev/assetStore.ts
25663
- import { resolve as resolve37 } from "path";
25664
- import { readdir as readdir4, unlink } from "fs/promises";
25770
+ import { resolve as resolve38 } from "path";
25771
+ import { readdir as readdir5, unlink } from "fs/promises";
25665
25772
  var mimeTypes, getMimeType = (filePath) => {
25666
25773
  const ext = filePath.slice(filePath.lastIndexOf("."));
25667
25774
  return mimeTypes[ext] ?? "application/octet-stream";
25668
25775
  }, HASHED_FILE_RE, stripHash = (webPath) => webPath.replace(/\.[a-z0-9]{8}(\.(js|css|mjs))$/, "$1"), processWalkEntry = (entry, dir, liveByIdentity, walkAndClean) => {
25669
- const fullPath = resolve37(dir, entry.name);
25776
+ const fullPath = resolve38(dir, entry.name);
25670
25777
  if (entry.isDirectory()) {
25671
25778
  return walkAndClean(fullPath);
25672
25779
  }
@@ -25682,10 +25789,10 @@ var mimeTypes, getMimeType = (filePath) => {
25682
25789
  }, cleanStaleAssets = async (store, manifest, buildDir) => {
25683
25790
  const liveByIdentity = new Map;
25684
25791
  for (const webPath of store.keys()) {
25685
- const diskPath = resolve37(buildDir, webPath.slice(1));
25792
+ const diskPath = resolve38(buildDir, webPath.slice(1));
25686
25793
  liveByIdentity.set(stripHash(diskPath), diskPath);
25687
25794
  }
25688
- const absBuildDir = resolve37(buildDir);
25795
+ const absBuildDir = resolve38(buildDir);
25689
25796
  Object.values(manifest).forEach((val) => {
25690
25797
  if (!HASHED_FILE_RE.test(val))
25691
25798
  return;
@@ -25695,7 +25802,7 @@ var mimeTypes, getMimeType = (filePath) => {
25695
25802
  });
25696
25803
  try {
25697
25804
  const walkAndClean = async (dir) => {
25698
- const entries = await readdir4(dir, { withFileTypes: true });
25805
+ const entries = await readdir5(dir, { withFileTypes: true });
25699
25806
  const tasks = entries.map((entry) => processWalkEntry(entry, dir, liveByIdentity, walkAndClean)).filter((task) => task !== null);
25700
25807
  await Promise.all(tasks);
25701
25808
  };
@@ -25705,13 +25812,13 @@ var mimeTypes, getMimeType = (filePath) => {
25705
25812
  }, evictMissingChunks = async (store, buildDir) => {
25706
25813
  const chunkKeys = [...store.keys()].filter((webPath) => webPath.includes("/chunk-"));
25707
25814
  await Promise.all(chunkKeys.map(async (webPath) => {
25708
- const onDisk = await Bun.file(resolve37(buildDir, webPath.slice(1))).exists().catch(() => false);
25815
+ const onDisk = await Bun.file(resolve38(buildDir, webPath.slice(1))).exists().catch(() => false);
25709
25816
  if (!onDisk)
25710
25817
  store.delete(webPath);
25711
25818
  }));
25712
25819
  }, lookupAsset = (store, path) => store.get(path), processScanEntry = (entry, dir, prefix, store, scanDir) => {
25713
25820
  if (entry.isDirectory()) {
25714
- return scanDir(resolve37(dir, entry.name), `${prefix}${entry.name}/`);
25821
+ return scanDir(resolve38(dir, entry.name), `${prefix}${entry.name}/`);
25715
25822
  }
25716
25823
  if (!entry.name.startsWith("chunk-")) {
25717
25824
  return null;
@@ -25720,7 +25827,7 @@ var mimeTypes, getMimeType = (filePath) => {
25720
25827
  if (store.has(webPath)) {
25721
25828
  return null;
25722
25829
  }
25723
- return Bun.file(resolve37(dir, entry.name)).bytes().then((bytes) => {
25830
+ return Bun.file(resolve38(dir, entry.name)).bytes().then((bytes) => {
25724
25831
  store.set(webPath, bytes);
25725
25832
  return;
25726
25833
  }).catch(() => {});
@@ -25742,14 +25849,14 @@ var mimeTypes, getMimeType = (filePath) => {
25742
25849
  for (const webPath of newIdentities.values()) {
25743
25850
  if (store.has(webPath))
25744
25851
  continue;
25745
- loadPromises.push(Bun.file(resolve37(buildDir, webPath.slice(1))).bytes().then((bytes) => {
25852
+ loadPromises.push(Bun.file(resolve38(buildDir, webPath.slice(1))).bytes().then((bytes) => {
25746
25853
  store.set(webPath, bytes);
25747
25854
  return;
25748
25855
  }).catch(() => {}));
25749
25856
  }
25750
25857
  try {
25751
25858
  const scanDir = async (dir, prefix) => {
25752
- const entries = await readdir4(dir, { withFileTypes: true });
25859
+ const entries = await readdir5(dir, { withFileTypes: true });
25753
25860
  const subTasks = entries.map((entry) => processScanEntry(entry, dir, prefix, store, scanDir)).filter((task) => task !== null);
25754
25861
  await Promise.all(subTasks);
25755
25862
  };
@@ -25809,7 +25916,7 @@ var init_restartScope = __esm(() => {
25809
25916
 
25810
25917
  // src/islands/pageMetadata.ts
25811
25918
  import { readFileSync as readFileSync30 } from "fs";
25812
- import { dirname as dirname28, resolve as resolve38 } from "path";
25919
+ import { dirname as dirname28, resolve as resolve39 } from "path";
25813
25920
  var pagePatterns, getPageDirs = (config) => [
25814
25921
  { dir: config.angularDirectory, framework: "angular" },
25815
25922
  { dir: config.emberDirectory, framework: "ember" },
@@ -25829,15 +25936,15 @@ var pagePatterns, getPageDirs = (config) => [
25829
25936
  const source = definition.buildReference?.source;
25830
25937
  if (!source)
25831
25938
  continue;
25832
- const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve38(dirname28(buildInfo.resolvedRegistryPath), source);
25833
- lookup.set(`${definition.framework}:${definition.component}`, resolve38(resolvedSource));
25939
+ const resolvedSource = source.startsWith("file://") ? new URL(source).pathname : resolve39(dirname28(buildInfo.resolvedRegistryPath), source);
25940
+ lookup.set(`${definition.framework}:${definition.component}`, resolve39(resolvedSource));
25834
25941
  }
25835
25942
  return lookup;
25836
25943
  }, getCurrentPageIslandMetadata = () => globalThis.__absolutePageIslandMetadata ?? new Map, metadataUsesSource = (metadata, target) => metadata.islands.some((usage) => {
25837
25944
  const candidate = usage.source;
25838
- return candidate ? resolve38(candidate) === target : false;
25945
+ return candidate ? resolve39(candidate) === target : false;
25839
25946
  }), getPagesUsingIslandSource = (sourcePath) => {
25840
- const target = resolve38(sourcePath);
25947
+ const target = resolve39(sourcePath);
25841
25948
  return [...getCurrentPageIslandMetadata().values()].filter((metadata) => metadataUsesSource(metadata, target)).map((metadata) => metadata.pagePath);
25842
25949
  }, resolveIslandUsages = (islands, islandSourceLookup) => islands.map((usage) => {
25843
25950
  const sourcePath = islandSourceLookup.get(`${usage.framework}:${usage.component}`);
@@ -25849,13 +25956,13 @@ var pagePatterns, getPageDirs = (config) => [
25849
25956
  const pattern = pagePatterns[entry.framework];
25850
25957
  if (!pattern)
25851
25958
  return;
25852
- const files = await scanEntryPoints(resolve38(entry.dir), pattern);
25959
+ const files = await scanEntryPoints(resolve39(entry.dir), pattern);
25853
25960
  for (const filePath of files) {
25854
25961
  const source = readFileSync30(filePath, "utf-8");
25855
25962
  const islands = extractIslandUsagesFromSource(source);
25856
- pageMetadata.set(resolve38(filePath), {
25963
+ pageMetadata.set(resolve39(filePath), {
25857
25964
  islands: resolveIslandUsages(islands, islandSourceLookup),
25858
- pagePath: resolve38(filePath)
25965
+ pagePath: resolve39(filePath)
25859
25966
  });
25860
25967
  }
25861
25968
  }, loadPageIslandMetadata = async (config) => {
@@ -25973,9 +26080,9 @@ var init_transformCache = __esm(() => {
25973
26080
  });
25974
26081
 
25975
26082
  // src/dev/reactComponentClassifier.ts
25976
- import { resolve as resolve39 } from "path";
26083
+ import { resolve as resolve40 } from "path";
25977
26084
  var classifyComponent = (filePath) => {
25978
- const normalizedPath = resolve39(filePath);
26085
+ const normalizedPath = resolve40(filePath);
25979
26086
  if (normalizedPath.includes("/react/pages/")) {
25980
26087
  return "server";
25981
26088
  }
@@ -25987,7 +26094,7 @@ var classifyComponent = (filePath) => {
25987
26094
  var init_reactComponentClassifier = () => {};
25988
26095
 
25989
26096
  // src/dev/moduleMapper.ts
25990
- import { basename as basename18, resolve as resolve40 } from "path";
26097
+ import { basename as basename18, resolve as resolve41 } from "path";
25991
26098
  var buildModulePaths = (moduleKeys, manifest) => {
25992
26099
  const modulePaths = {};
25993
26100
  moduleKeys.forEach((key) => {
@@ -25997,7 +26104,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
25997
26104
  });
25998
26105
  return modulePaths;
25999
26106
  }, processChangedFile = (sourceFile, framework, manifest, resolvedPaths, processedFiles) => {
26000
- const normalizedFile = resolve40(sourceFile);
26107
+ const normalizedFile = resolve41(sourceFile);
26001
26108
  const normalizedPath = normalizedFile.replace(/\\/g, "/");
26002
26109
  if (processedFiles.has(normalizedFile)) {
26003
26110
  return null;
@@ -26033,7 +26140,7 @@ var buildModulePaths = (moduleKeys, manifest) => {
26033
26140
  });
26034
26141
  return grouped;
26035
26142
  }, mapSourceFileToManifestKeys = (sourceFile, framework, resolvedPaths) => {
26036
- const normalizedFile = resolve40(sourceFile);
26143
+ const normalizedFile = resolve41(sourceFile);
26037
26144
  const fileName = basename18(normalizedFile);
26038
26145
  const baseName = fileName.replace(/\.(tsx?|jsx?|vue|svelte|css|html)$/, "");
26039
26146
  const pascalName = toPascal(baseName);
@@ -26088,14 +26195,14 @@ var init_moduleMapper = __esm(() => {
26088
26195
  });
26089
26196
 
26090
26197
  // src/utils/spaRouteCss.ts
26091
- import { readFile as readFile7 } from "fs/promises";
26092
- import { dirname as dirname29, isAbsolute as isAbsolute8, resolve as resolve41 } from "path";
26198
+ import { readFile as readFile8 } from "fs/promises";
26199
+ import { dirname as dirname29, isAbsolute as isAbsolute8, resolve as resolve42 } from "path";
26093
26200
  var sideManifestCache, readSideManifest = async (sideManifestPath) => {
26094
26201
  const cached = sideManifestCache.get(sideManifestPath);
26095
26202
  if (cached !== undefined)
26096
26203
  return cached;
26097
26204
  try {
26098
- const raw = await readFile7(sideManifestPath, "utf-8");
26205
+ const raw = await readFile8(sideManifestPath, "utf-8");
26099
26206
  const parsed = JSON.parse(raw);
26100
26207
  const routes = Array.isArray(parsed) ? parsed : [];
26101
26208
  sideManifestCache.set(sideManifestPath, routes);
@@ -26127,12 +26234,12 @@ var sideManifestCache, readSideManifest = async (sideManifestPath) => {
26127
26234
  }, readChildCss = async (cssPath, sideManifestPath) => {
26128
26235
  if (!cssPath)
26129
26236
  return "";
26130
- const resolvedCssPath = isAbsolute8(cssPath) ? cssPath : resolve41(dirname29(sideManifestPath), cssPath);
26237
+ const resolvedCssPath = isAbsolute8(cssPath) ? cssPath : resolve42(dirname29(sideManifestPath), cssPath);
26131
26238
  const cached = childCssCache.get(resolvedCssPath);
26132
26239
  if (cached !== undefined)
26133
26240
  return cached;
26134
26241
  try {
26135
- const css = await readFile7(resolvedCssPath, "utf-8");
26242
+ const css = await readFile8(resolvedCssPath, "utf-8");
26136
26243
  childCssCache.set(resolvedCssPath, css);
26137
26244
  return css;
26138
26245
  } catch {
@@ -26211,7 +26318,7 @@ __export(exports_resolveOwningComponents, {
26211
26318
  resolveOwningComponents: () => resolveOwningComponents
26212
26319
  });
26213
26320
  import { readdirSync as readdirSync11, readFileSync as readFileSync32, statSync as statSync8 } from "fs";
26214
- import { dirname as dirname30, extname as extname14, join as join49, resolve as resolve42 } from "path";
26321
+ import { dirname as dirname30, extname as extname15, join as join50, resolve as resolve43 } from "path";
26215
26322
  import ts19 from "typescript";
26216
26323
  var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || file.endsWith(".tsx"), walkAngularSourceFiles = (root) => {
26217
26324
  const out = [];
@@ -26226,7 +26333,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26226
26333
  if (entry.name.startsWith(".") || entry.name === "node_modules") {
26227
26334
  continue;
26228
26335
  }
26229
- const full = join49(dir, entry.name);
26336
+ const full = join50(dir, entry.name);
26230
26337
  if (entry.isDirectory()) {
26231
26338
  visit(full);
26232
26339
  } else if (entry.isFile() && isAngularSourceFile(entry.name)) {
@@ -26324,11 +26431,11 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26324
26431
  };
26325
26432
  visit(sourceFile);
26326
26433
  return out;
26327
- }, safeNormalize = (path) => resolve42(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
26434
+ }, safeNormalize = (path) => resolve43(path).replace(/\\/g, "/"), resolveOwningComponents = (params) => {
26328
26435
  const { changedFilePath, userAngularRoot } = params;
26329
26436
  const changedAbs = safeNormalize(changedFilePath);
26330
26437
  const out = [];
26331
- const ext = extname14(changedAbs).toLowerCase();
26438
+ const ext = extname15(changedAbs).toLowerCase();
26332
26439
  if (ext === ".ts" || ext === ".tsx") {
26333
26440
  const classes = parseDecoratedClasses(changedAbs);
26334
26441
  for (const cls of classes) {
@@ -26393,7 +26500,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26393
26500
  if (!spec.startsWith(".") && !spec.startsWith("/")) {
26394
26501
  return null;
26395
26502
  }
26396
- const base = resolve42(childDir, spec);
26503
+ const base = resolve43(childDir, spec);
26397
26504
  const candidates = [
26398
26505
  `${base}.ts`,
26399
26506
  `${base}.tsx`,
@@ -26431,7 +26538,7 @@ var ENTITY_DECORATORS, isAngularSourceFile = (file) => file.endsWith(".ts") || f
26431
26538
  };
26432
26539
  if (cls.kind === "component") {
26433
26540
  for (const url of [...cls.templateUrls, ...cls.styleUrls]) {
26434
- const abs = safeNormalize(resolve42(componentDir, url));
26541
+ const abs = safeNormalize(resolve43(componentDir, url));
26435
26542
  const existing = resource.get(abs);
26436
26543
  if (existing)
26437
26544
  existing.push(entity);
@@ -26699,7 +26806,7 @@ var init_webSocket = __esm(() => {
26699
26806
  });
26700
26807
 
26701
26808
  // src/utils/loadConfig.ts
26702
- import { resolve as resolve43 } from "path";
26809
+ import { resolve as resolve44 } from "path";
26703
26810
  var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" && value !== null, isCommandService = (service) => service.kind === "command" || Array.isArray(service.command), isServiceCandidate = (value) => isObject2(value) && (typeof value.entry === "string" || Array.isArray(value.command)), isWorkspaceConfig = (config) => {
26704
26811
  if (!isObject2(config)) {
26705
26812
  return false;
@@ -26750,7 +26857,7 @@ var RESERVED_TOP_LEVEL_KEYS, isObject2 = (value) => typeof value === "object" &&
26750
26857
  }
26751
26858
  return config;
26752
26859
  }, loadRawConfig = async (configPath) => {
26753
- const resolved = resolve43(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26860
+ const resolved = resolve44(configPath ?? process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
26754
26861
  const mod = await import(resolved);
26755
26862
  const config = mod.default ?? mod.config;
26756
26863
  if (!config) {
@@ -26877,9 +26984,9 @@ var init_hotResources = __esm(() => {
26877
26984
 
26878
26985
  // src/plugins/openApiPlugin.ts
26879
26986
  import { existsSync as existsSync40, readFileSync as readFileSync33 } from "fs";
26880
- import { join as join50 } from "path";
26987
+ import { join as join51 } from "path";
26881
26988
  var FALLBACK_NAME = "AbsoluteJS API", FALLBACK_VERSION = "1.0.0", projectInfo = (cwd) => {
26882
- const path = join50(cwd, "package.json");
26989
+ const path = join51(cwd, "package.json");
26883
26990
  if (!existsSync40(path)) {
26884
26991
  return { name: FALLBACK_NAME, version: FALLBACK_VERSION };
26885
26992
  }
@@ -26934,9 +27041,9 @@ var init_openApiPlugin = () => {};
26934
27041
 
26935
27042
  // src/plugins/telemetryPlugin.ts
26936
27043
  import { existsSync as existsSync41, readFileSync as readFileSync34 } from "fs";
26937
- import { join as join51 } from "path";
27044
+ import { join as join52 } from "path";
26938
27045
  var OTEL_PACKAGE = "@elysia/opentelemetry", readPackageName = (cwd) => {
26939
- const path = join51(cwd, "package.json");
27046
+ const path = join52(cwd, "package.json");
26940
27047
  if (!existsSync41(path))
26941
27048
  return null;
26942
27049
  try {
@@ -27252,7 +27359,7 @@ ${error ?? "The dev-server terminal has the build output."}`,
27252
27359
 
27253
27360
  // src/core/requestContext.ts
27254
27361
  import { AsyncLocalStorage as AsyncLocalStorage3 } from "async_hooks";
27255
- import { Elysia as Elysia2 } from "elysia";
27362
+ import { Elysia as Elysia3 } from "elysia";
27256
27363
  var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) => typeof value === "object" && value !== null && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function", getRequestStorage = () => {
27257
27364
  const value = Reflect.get(globalThis, REQUEST_STORAGE_KEY);
27258
27365
  return isAbsoluteRequestStorage(value) ? value : undefined;
@@ -27324,7 +27431,7 @@ var REQUEST_STORAGE_KEY, PAGE_WARMER_KEY, isAbsoluteRequestStorage = (value) =>
27324
27431
  var init_requestContext = __esm(() => {
27325
27432
  REQUEST_STORAGE_KEY = Symbol.for("absolutejs.requestAsyncLocalStorage");
27326
27433
  PAGE_WARMER_KEY = Symbol.for("absolutejs.devPageWarmer");
27327
- absoluteRequestContext = new Elysia2({
27434
+ absoluteRequestContext = new Elysia3({
27328
27435
  name: "absolutejs-request-context"
27329
27436
  }).request(({ request }) => {
27330
27437
  ensureRequestStorage().enterWith({ request });
@@ -27333,7 +27440,7 @@ var init_requestContext = __esm(() => {
27333
27440
  });
27334
27441
 
27335
27442
  // src/core/loadIslandRegistry.ts
27336
- import { resolve as resolve44 } from "path";
27443
+ import { resolve as resolve45 } from "path";
27337
27444
  var isRecord6 = (value) => typeof value === "object" && value !== null, resolveRegistryExport2 = (mod) => {
27338
27445
  if (isRecord6(mod.islandRegistry))
27339
27446
  return mod.islandRegistry;
@@ -27341,7 +27448,7 @@ var isRecord6 = (value) => typeof value === "object" && value !== null, resolveR
27341
27448
  return mod.default;
27342
27449
  throw new Error("Island registry module must export `islandRegistry` or a default registry object.");
27343
27450
  }, isRegistryModuleExport = (value) => isRecord6(value), isIslandRegistryInput = (value) => isRecord6(value), loadIslandRegistry = async (registryPath) => {
27344
- const resolvedRegistryPath = resolve44(registryPath);
27451
+ const resolvedRegistryPath = resolve45(registryPath);
27345
27452
  const buildInfo = await loadIslandRegistryBuildInfo(resolvedRegistryPath);
27346
27453
  if (buildInfo.definitions.length > 0) {
27347
27454
  return buildInfo.registry;
@@ -27549,11 +27656,11 @@ __export(exports_config, {
27549
27656
  normalizeAbsoluteMobileConfig: () => normalizeAbsoluteMobileConfig
27550
27657
  });
27551
27658
  import { readFileSync as readFileSync35 } from "fs";
27552
- import { resolve as resolve45 } from "path";
27659
+ import { resolve as resolve46 } from "path";
27553
27660
  import { createHash as createHash4, createPublicKey, X509Certificate } from "crypto";
27554
27661
  var APP_ID_PATTERN, SCHEME_PATTERN, APPLE_APP_ID_PREFIX_PATTERN, CERTIFICATE_FINGERPRINT_PATTERN, UPDATE_NAME_PATTERN, RELEASE_TARGET_PATTERN, UPDATE_PUBLIC_KEY_PATTERN, ENVIRONMENT_NAME_PATTERN, COLOR_PATTERN, DEFAULT_UPDATE_BOOT_TIMEOUT_MS = 20000, DEFAULT_UPDATE_HEALTH_FAILURE_RATE = 0.2, DEFAULT_UPDATE_HEALTH_MINIMUM_REPORTS = 20, DEFAULT_UPDATE_ROLLOUT_FAILURE_RATE = 0.05, DEFAULT_UPDATE_ROLLOUT_OBSERVATION_MINUTES = 60, MINUTE_MS, DEFAULT_UPDATE_ROLLOUT_STAGES, MINIMUM_UPDATE_BOOT_TIMEOUT_MS = 5000, MAXIMUM_UPDATE_BOOT_TIMEOUT_MS = 120000, HOSTNAME_PATTERN, EXPO_RESERVED_ROUTE_PREFIXES, resolveProjectPath = (projectRoot, value, field) => {
27555
- const root = resolve45(projectRoot);
27556
- const path = resolve45(root, value);
27662
+ const root = resolve46(projectRoot);
27663
+ const path = resolve46(root, value);
27557
27664
  if (path !== root && !path.startsWith(`${root}/`)) {
27558
27665
  throw new TypeError(`${field} must remain inside the project root.`);
27559
27666
  }
@@ -28067,13 +28174,13 @@ __export(exports_associationFiles, {
28067
28174
  import {
28068
28175
  access,
28069
28176
  mkdir as mkdir12,
28070
- readFile as readFile8,
28177
+ readFile as readFile9,
28071
28178
  rename as rename4,
28072
28179
  rm as rm11,
28073
- writeFile as writeFile9
28180
+ writeFile as writeFile10
28074
28181
  } from "fs/promises";
28075
- import { resolve as resolve46 } from "path";
28076
- import { Elysia as Elysia3 } from "elysia";
28182
+ import { resolve as resolve47 } from "path";
28183
+ import { Elysia as Elysia4 } from "elysia";
28077
28184
  var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_OK = 200, VERIFY_TIMEOUT_MS = 1e4, ANDROID_ASSOCIATION_PATH = "/.well-known/assetlinks.json", APPLE_ASSOCIATION_PATH = "/.well-known/apple-app-site-association", missingIdentity = (field, platform) => new TypeError(`${field} is required to publish ${platform} deep-link association files.`), createAppleDocument = (config, requireAll) => {
28078
28185
  if (!config.platforms.includes("ios"))
28079
28186
  return;
@@ -28124,7 +28231,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28124
28231
  return documents;
28125
28232
  }, jsonResponse = (value) => new Response(`${JSON.stringify(value)}
28126
28233
  `, { headers: JSON_HEADERS }), createAbsoluteMobileAssociationPlugin = (mobile, projectRoot, options = {}) => {
28127
- const plugin = new Elysia3({ name: "absolutejs-mobile-associations" });
28234
+ const plugin = new Elysia4({ name: "absolutejs-mobile-associations" });
28128
28235
  if (!mobile)
28129
28236
  return plugin;
28130
28237
  const config = normalizeAbsoluteMobileConfig(mobile, projectRoot);
@@ -28139,7 +28246,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28139
28246
  }, writeAtomic = async (path, source) => {
28140
28247
  let current;
28141
28248
  try {
28142
- current = await readFile8(path, "utf8");
28249
+ current = await readFile9(path, "utf8");
28143
28250
  } catch (error) {
28144
28251
  if (!(error instanceof Error) || !("code" in error) || error.code !== "ENOENT") {
28145
28252
  throw error;
@@ -28148,7 +28255,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28148
28255
  if (current === source)
28149
28256
  return false;
28150
28257
  const temporary = `${path}.${crypto.randomUUID()}.tmp`;
28151
- await writeFile9(temporary, source, { flag: "wx" });
28258
+ await writeFile10(temporary, source, { flag: "wx" });
28152
28259
  await rename4(temporary, path);
28153
28260
  return true;
28154
28261
  }, exists2 = async (path) => {
@@ -28159,10 +28266,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28159
28266
  return false;
28160
28267
  }
28161
28268
  }, assertOwnedOutput = async (root) => {
28162
- const path = resolve46(root, OWNERSHIP_FILE);
28269
+ const path = resolve47(root, OWNERSHIP_FILE);
28163
28270
  let ownership;
28164
28271
  try {
28165
- ownership = JSON.parse(await readFile8(path, "utf8"));
28272
+ ownership = JSON.parse(await readFile9(path, "utf8"));
28166
28273
  } catch {
28167
28274
  throw new TypeError(`Association output ${root} already exists and is not owned by AbsoluteJS.`);
28168
28275
  }
@@ -28186,10 +28293,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28186
28293
  if (hasCurrent)
28187
28294
  await rm11(backup, { force: true, recursive: true });
28188
28295
  }, materializeHost = async (root, host, files) => {
28189
- const directory = resolve46(root, host, ".well-known");
28296
+ const directory = resolve47(root, host, ".well-known");
28190
28297
  await mkdir12(directory, { recursive: true });
28191
28298
  return Promise.all(files.map(async ([name, document2]) => {
28192
- const path = resolve46(directory, name);
28299
+ const path = resolve47(directory, name);
28193
28300
  await writeAtomic(path, `${JSON.stringify(document2, null, 2)}
28194
28301
  `);
28195
28302
  return path;
@@ -28212,7 +28319,7 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28212
28319
  });
28213
28320
  return endpoints;
28214
28321
  }), materializeAbsoluteMobileAssociationFiles = async (config, outputDirectory) => {
28215
- const root = resolve46(outputDirectory);
28322
+ const root = resolve47(outputDirectory);
28216
28323
  const temporary = `${root}.${crypto.randomUUID()}.tmp`;
28217
28324
  const documents = createAbsoluteMobileAssociationDocuments(config, {
28218
28325
  requireAll: true
@@ -28226,10 +28333,10 @@ var JSON_HEADERS, OWNERSHIP_FILE = ".absolutejs-mobile-associations.json", HTTP_
28226
28333
  await mkdir12(temporary, { recursive: true });
28227
28334
  try {
28228
28335
  const temporaryPaths = (await Promise.all(config.deepLinkHosts.map((host) => materializeHost(temporary, host, files)))).flat();
28229
- await writeAtomic(resolve46(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
28336
+ await writeAtomic(resolve47(temporary, OWNERSHIP_FILE), `${JSON.stringify({ format: 1, hosts: config.deepLinkHosts }, null, 2)}
28230
28337
  `);
28231
28338
  await publishGeneratedDirectory(temporary, root);
28232
- const written = temporaryPaths.map((path) => resolve46(root, path.slice(temporary.length + 1)));
28339
+ const written = temporaryPaths.map((path) => resolve47(root, path.slice(temporary.length + 1)));
28233
28340
  return { root, written };
28234
28341
  } catch (error) {
28235
28342
  await rm11(temporary, { force: true, recursive: true });
@@ -28280,7 +28387,7 @@ __export(exports_mobilePreview, {
28280
28387
  absoluteMobilePreviewDocument: () => absoluteMobilePreviewDocument,
28281
28388
  createAbsoluteMobilePreviewPlugin: () => createAbsoluteMobilePreviewPlugin
28282
28389
  });
28283
- import { Elysia as Elysia4 } from "elysia";
28390
+ import { Elysia as Elysia5 } from "elysia";
28284
28391
  var ABSOLUTE_MOBILE_PREVIEW_PATH = "/__absolute/mobile-preview", escapeHtml2 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;"), isRecord7 = (value) => typeof value === "object" && value !== null, normalizeEntry2 = (entry) => {
28285
28392
  const parsed = new URL(entry ?? "/", "https://absolute.invalid");
28286
28393
  return `${parsed.pathname}${parsed.search}${parsed.hash}`;
@@ -28320,8 +28427,8 @@ var ABSOLUTE_MOBILE_PREVIEW_PATH = "/__absolute/mobile-preview", escapeHtml2 = (
28320
28427
  </html>`;
28321
28428
  }, createAbsoluteMobilePreviewPlugin = (mobile) => {
28322
28429
  if (!mobile)
28323
- return new Elysia4({ name: "absolutejs-mobile-preview-disabled" });
28324
- return new Elysia4({ name: "absolutejs-mobile-preview" }).get(ABSOLUTE_MOBILE_PREVIEW_PATH, () => new Response(absoluteMobilePreviewDocument(mobile), {
28430
+ return new Elysia5({ name: "absolutejs-mobile-preview-disabled" });
28431
+ return new Elysia5({ name: "absolutejs-mobile-preview" }).get(ABSOLUTE_MOBILE_PREVIEW_PATH, () => new Response(absoluteMobilePreviewDocument(mobile), {
28325
28432
  headers: {
28326
28433
  "Cache-Control": "no-store",
28327
28434
  "Content-Security-Policy": "default-src 'self'; script-src 'unsafe-inline' 'self'; style-src 'unsafe-inline'; frame-src 'self'; img-src 'self' data: blob:; connect-src 'self' ws: wss:",
@@ -28350,10 +28457,10 @@ var init_mobilePreview = __esm(() => {
28350
28457
 
28351
28458
  // src/mobile/nativeAuth.ts
28352
28459
  import { readFileSync as readFileSync36 } from "fs";
28353
- import { join as join52 } from "path";
28460
+ import { join as join53 } from "path";
28354
28461
  var ABSOLUTE_AUTH_PACKAGE = "@absolutejs/auth", ABSOLUTE_EXPO_AUTH_CORE_VERSION = "0.76.3", ABSOLUTE_EXPO_AUTH_PACKAGE = "@absolutejs/auth-expo", ABSOLUTE_EXPO_AUTH_VERSION = "0.0.6", ABSOLUTE_EXPO_SYNC_CORE_VERSION = "2.31.0", ABSOLUTE_EXPO_SYNC_PACKAGE = "@absolutejs/sync-expo", ABSOLUTE_EXPO_SYNC_VERSION = "0.0.4", ABSOLUTE_NATIVE_AUTH_CLIENTS_ENV = "ABSOLUTE_AUTH_NATIVE_CLIENTS", ABSOLUTE_NATIVE_AUTH_SCOPES, ABSOLUTE_SYNC_PACKAGE = "@absolutejs/sync", readPackageManifest = (projectRoot) => {
28355
28462
  try {
28356
- return JSON.parse(readFileSync36(join52(projectRoot, "package.json"), "utf8"));
28463
+ return JSON.parse(readFileSync36(join53(projectRoot, "package.json"), "utf8"));
28357
28464
  } catch {
28358
28465
  return;
28359
28466
  }
@@ -28393,8 +28500,8 @@ var init_nativeAuth = __esm(() => {
28393
28500
  });
28394
28501
 
28395
28502
  // src/mobile/devDeviceAdapter.ts
28396
- import { access as access2, mkdtemp, rm as rm12, writeFile as writeFile10 } from "fs/promises";
28397
- import { join as join53 } from "path";
28503
+ import { access as access2, mkdtemp, rm as rm12, writeFile as writeFile11 } from "fs/promises";
28504
+ import { join as join54 } from "path";
28398
28505
  import { tmpdir } from "os";
28399
28506
  var absoluteNativeDevAdapterSource = (projectRoot, mobile, resolveModule = (specifier) => specifier, expoAdapterModule = "@absolutejs/absolute/mobile/expo-devices", expoAuthModule = "@absolutejs/absolute/mobile/expo-auth", expoSyncModule = "@absolutejs/absolute/mobile/expo-sync") => {
28400
28507
  if ((mobile.engine ?? "capacitor") === "expo") {
@@ -28432,7 +28539,7 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
28432
28539
  `);
28433
28540
  }, expoAdapterPath = async () => {
28434
28541
  const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
28435
- const path = join53(import.meta.dir, `shellExpoDevices.${extension}`);
28542
+ const path = join54(import.meta.dir, `shellExpoDevices.${extension}`);
28436
28543
  try {
28437
28544
  await access2(path);
28438
28545
  return path;
@@ -28446,7 +28553,7 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
28446
28553
  throw new TypeError("The AbsoluteJS Expo development adapter is missing.");
28447
28554
  }, expoAuthPath = async () => {
28448
28555
  const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
28449
- const path = join53(import.meta.dir, `shellExpoAuth.${extension}`);
28556
+ const path = join54(import.meta.dir, `shellExpoAuth.${extension}`);
28450
28557
  try {
28451
28558
  await access2(path);
28452
28559
  return path;
@@ -28460,7 +28567,7 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
28460
28567
  throw new TypeError("The AbsoluteJS Expo Auth development adapter is missing.");
28461
28568
  }, expoSyncPath = async () => {
28462
28569
  const candidates = await Promise.all(["ts", "js"].map(async (extension) => {
28463
- const path = join53(import.meta.dir, `shellExpoSync.${extension}`);
28570
+ const path = join54(import.meta.dir, `shellExpoSync.${extension}`);
28464
28571
  try {
28465
28572
  await access2(path);
28466
28573
  return path;
@@ -28473,10 +28580,10 @@ ${auth ? `void createAbsoluteExpoShellAuth(${JSON.stringify(auth)}).then(auth =>
28473
28580
  return path;
28474
28581
  throw new TypeError("The AbsoluteJS Expo Sync development adapter is missing.");
28475
28582
  }, buildAbsoluteNativeDevAdapter = async (projectRoot, mobile) => {
28476
- const temporaryDirectory = await mkdtemp(join53(tmpdir(), "absolutejs-native-dev-adapter-"));
28477
- const entry = join53(temporaryDirectory, "entry.ts");
28583
+ const temporaryDirectory = await mkdtemp(join54(tmpdir(), "absolutejs-native-dev-adapter-"));
28584
+ const entry = join54(temporaryDirectory, "entry.ts");
28478
28585
  try {
28479
- await writeFile10(entry, absoluteNativeDevAdapterSource(projectRoot, mobile, (specifier) => Bun.resolveSync(specifier, projectRoot), await expoAdapterPath(), await expoAuthPath(), await expoSyncPath()));
28586
+ await writeFile11(entry, absoluteNativeDevAdapterSource(projectRoot, mobile, (specifier) => Bun.resolveSync(specifier, projectRoot), await expoAdapterPath(), await expoAuthPath(), await expoSyncPath()));
28480
28587
  const result = await Bun.build({
28481
28588
  entrypoints: [entry],
28482
28589
  format: "esm",
@@ -28500,11 +28607,11 @@ var init_devDeviceAdapter = __esm(() => {
28500
28607
 
28501
28608
  // src/mobile/mobilePreviewClientBundle.ts
28502
28609
  import { access as access3 } from "fs/promises";
28503
- import { join as join54 } from "path";
28610
+ import { join as join55 } from "path";
28504
28611
  var PREVIEW_CLIENT_FILE = "mobilePreviewClient.ts", fileExists = (path) => access3(path).then(() => true, () => false), resolveAbsoluteMobilePreviewClientEntry = async () => {
28505
28612
  const candidates = [
28506
- join54(import.meta.dir, PREVIEW_CLIENT_FILE),
28507
- join54(import.meta.dir, "mobile", PREVIEW_CLIENT_FILE)
28613
+ join55(import.meta.dir, PREVIEW_CLIENT_FILE),
28614
+ join55(import.meta.dir, "mobile", PREVIEW_CLIENT_FILE)
28508
28615
  ];
28509
28616
  const present = await Promise.all(candidates.map(fileExists));
28510
28617
  const entry = candidates.find((_candidate, index) => present[index]);
@@ -29018,14 +29125,14 @@ import {
29018
29125
  X509Certificate as X509Certificate3
29019
29126
  } from "crypto";
29020
29127
  import { access as access4, mkdir as mkdir13 } from "fs/promises";
29021
- import { dirname as dirname31, isAbsolute as isAbsolute9, relative as relative20, resolve as resolve47, sep as sep5 } from "path";
29128
+ import { dirname as dirname31, isAbsolute as isAbsolute9, relative as relative21, resolve as resolve48, sep as sep6 } from "path";
29022
29129
  import { pathToFileURL as pathToFileURL3 } from "url";
29023
- import { Elysia as Elysia5 } from "elysia";
29130
+ import { Elysia as Elysia6 } from "elysia";
29024
29131
  var ABSOLUTE_MOBILE_UPDATE_SERVER_FORMAT = 1, DEFAULT_MOBILE_UPDATE_REGISTRY_MODULE = "mobile.update.ts", object4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), projectPath = (projectRoot, requested) => {
29025
- const root = resolve47(projectRoot);
29026
- const path = resolve47(root, requested);
29027
- const projectRelative = relative20(root, path);
29028
- if (projectRelative === ".." || projectRelative.startsWith(`..${sep5}`) || isAbsolute9(projectRelative))
29132
+ const root = resolve48(projectRoot);
29133
+ const path = resolve48(root, requested);
29134
+ const projectRelative = relative21(root, path);
29135
+ if (projectRelative === ".." || projectRelative.startsWith(`..${sep6}`) || isAbsolute9(projectRelative))
29029
29136
  throw new TypeError("mobile.updates.server.registry must remain inside the project.");
29030
29137
  return path;
29031
29138
  }, isRegistry2 = (value) => object4(value) && [
@@ -29117,7 +29224,7 @@ var ABSOLUTE_MOBILE_UPDATE_SERVER_FORMAT = 1, DEFAULT_MOBILE_UPDATE_REGISTRY_MOD
29117
29224
  }, createAbsoluteMobileUpdateServerPlugin = async (config, projectRoot, options = {}) => {
29118
29225
  const { updates, updateServer: server } = config;
29119
29226
  if (!updates || !server?.autoMount)
29120
- return new Elysia5({ name: "absolutejs-mobile-updates-disabled" });
29227
+ return new Elysia6({ name: "absolutejs-mobile-updates-disabled" });
29121
29228
  const module = await loadAbsoluteMobileUpdateServerModule(projectRoot, server.registryModule);
29122
29229
  if (options.production) {
29123
29230
  await verifyDurableModule(module);
@@ -29136,7 +29243,7 @@ var ABSOLUTE_MOBILE_UPDATE_SERVER_FORMAT = 1, DEFAULT_MOBILE_UPDATE_REGISTRY_MOD
29136
29243
  registry: module.registry,
29137
29244
  route
29138
29245
  });
29139
- return new Elysia5({ name: "absolutejs-mobile-updates" }).all(`${route}/*`, ({ request }) => handler(request));
29246
+ return new Elysia6({ name: "absolutejs-mobile-updates" }).all(`${route}/*`, ({ request }) => handler(request));
29140
29247
  }, inspectAbsoluteMobileUpdateServer = async (config, projectRoot) => {
29141
29248
  if (!config.updates)
29142
29249
  return;
@@ -29294,10 +29401,10 @@ var init_bridgeInternals = __esm(() => {
29294
29401
  });
29295
29402
 
29296
29403
  // src/dev/angular/hmrCompiler.ts
29297
- import { dirname as dirname32, relative as relative21, resolve as resolve48 } from "path";
29404
+ import { dirname as dirname32, relative as relative22, resolve as resolve49 } from "path";
29298
29405
  import { performance as performance2 } from "perf_hooks";
29299
29406
  var encodeHmrComponentId = (absoluteFilePath, className) => {
29300
- const projectRel = relative21(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
29407
+ const projectRel = relative22(process.cwd(), absoluteFilePath).replace(/\\/g, "/");
29301
29408
  return `${projectRel}@${className}`;
29302
29409
  }, getApplyMetadataModule = async (encodedId) => {
29303
29410
  const decoded = decodeURIComponent(encodedId);
@@ -29306,8 +29413,8 @@ var encodeHmrComponentId = (absoluteFilePath, className) => {
29306
29413
  return null;
29307
29414
  const filePathRel = decoded.slice(0, separatorIndex);
29308
29415
  const className = decoded.slice(separatorIndex + 1);
29309
- const componentFilePath = resolve48(process.cwd(), filePathRel);
29310
- const projectRelPath = relative21(process.cwd(), componentFilePath).replace(/\\/g, "/");
29416
+ const componentFilePath = resolve49(process.cwd(), filePathRel);
29417
+ const projectRelPath = relative22(process.cwd(), componentFilePath).replace(/\\/g, "/");
29311
29418
  const cacheKey = encodeURIComponent(`${projectRelPath}@${className}`);
29312
29419
  await Promise.resolve().then(() => init_fastHmrCompiler());
29313
29420
  const cached = takePendingModule(cacheKey);
@@ -29335,7 +29442,7 @@ var init_hmrCompiler = __esm(() => {
29335
29442
  });
29336
29443
 
29337
29444
  // src/plugins/hmr.ts
29338
- import Elysia6 from "elysia";
29445
+ import Elysia7 from "elysia";
29339
29446
  import { websocket } from "elysia/websocket";
29340
29447
  var STORE_KEY = "__elysiaStore", restoredStores, getGlobalValue = (key) => Reflect.get(globalThis, key), restoreStore = (store) => {
29341
29448
  if (!store || typeof store !== "object")
@@ -29431,7 +29538,7 @@ var STORE_KEY = "__elysiaStore", restoredStores, getGlobalValue = (key) => Refle
29431
29538
  return candidate;
29432
29539
  }
29433
29540
  return null;
29434
- }, hmr = (hmrState, manifest, moduleServerHandler) => new Elysia6({ name: "absolutejs-hmr" }).use(websocket({
29541
+ }, hmr = (hmrState, manifest, moduleServerHandler) => new Elysia7({ name: "absolutejs-hmr" }).use(websocket({
29435
29542
  idleTimeout: DEFAULT_WEBSOCKET_IDLE_TIMEOUT_SECONDS,
29436
29543
  sendPings: true
29437
29544
  })).request(async ({ request, store }) => {
@@ -29512,12 +29619,12 @@ var init_hmr = __esm(() => {
29512
29619
 
29513
29620
  // src/plugins/devtoolsJson.ts
29514
29621
  import { existsSync as existsSync42, mkdirSync as mkdirSync14, readFileSync as readFileSync37, writeFileSync as writeFileSync10 } from "fs";
29515
- import { dirname as dirname33, join as join55, resolve as resolve49 } from "path";
29516
- import { Elysia as Elysia7 } from "elysia";
29622
+ import { dirname as dirname33, join as join56, resolve as resolve50 } from "path";
29623
+ import { Elysia as Elysia8 } from "elysia";
29517
29624
  var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_KEY = "__absoluteDevtoolsWorkspaceUuid", getGlobalUuid = () => Reflect.get(globalThis, UUID_CACHE_KEY), setGlobalUuid = (uuid) => {
29518
29625
  Reflect.set(globalThis, UUID_CACHE_KEY, uuid);
29519
29626
  return uuid;
29520
- }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve49(uuidCachePath ?? join55(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
29627
+ }, isUuidV4 = (value) => /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value), resolveDevtoolsUuidCachePath = (buildDir, uuidCachePath) => resolve50(uuidCachePath ?? join56(buildDir, ".absolute", "chrome-devtools-workspace-uuid")), readCachedUuid = (cachePath) => {
29521
29628
  if (!existsSync42(cachePath))
29522
29629
  return null;
29523
29630
  try {
@@ -29543,10 +29650,10 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
29543
29650
  writeFileSync10(cachePath, uuid, "utf-8");
29544
29651
  return setGlobalUuid(uuid);
29545
29652
  }, devtoolsJson = (buildDir, options = {}) => {
29546
- const rootPath = resolve49(options.projectRoot ?? process.cwd());
29653
+ const rootPath = resolve50(options.projectRoot ?? process.cwd());
29547
29654
  const root = options.normalizeForWindowsContainer === false ? rootPath : normalizeDevtoolsWorkspaceRoot(rootPath);
29548
29655
  const uuid = getOrCreateUuid(buildDir, options);
29549
- return new Elysia7({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
29656
+ return new Elysia8({ name: "absolute-devtools-json" }).get(ENDPOINT, () => ({
29550
29657
  workspace: {
29551
29658
  root,
29552
29659
  uuid
@@ -29556,11 +29663,11 @@ var ENDPOINT = "/.well-known/appspecific/com.chrome.devtools.json", UUID_CACHE_K
29556
29663
  if (process.env.WSL_DISTRO_NAME) {
29557
29664
  const distro = process.env.WSL_DISTRO_NAME;
29558
29665
  const withoutLeadingSlash = root.replace(/^\//, "");
29559
- return join55("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
29666
+ return join56("\\\\wsl.localhost", distro, withoutLeadingSlash).replace(/\//g, "\\");
29560
29667
  }
29561
29668
  if (process.env.DOCKER_DESKTOP && !root.startsWith("\\\\")) {
29562
29669
  const withoutLeadingSlash = root.replace(/^\//, "");
29563
- return join55("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
29670
+ return join56("\\\\wsl.localhost", "docker-desktop-data", withoutLeadingSlash).replace(/\//g, "\\");
29564
29671
  }
29565
29672
  return root;
29566
29673
  };
@@ -29568,8 +29675,8 @@ var init_devtoolsJson = () => {};
29568
29675
 
29569
29676
  // src/plugins/imageOptimizer.ts
29570
29677
  import { existsSync as existsSync43 } from "fs";
29571
- import { resolve as resolve50 } from "path";
29572
- import { Elysia as Elysia8 } from "elysia";
29678
+ import { resolve as resolve51 } from "path";
29679
+ import { Elysia as Elysia9 } from "elysia";
29573
29680
  var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avifInProgress, safeResolve = (path, baseDir) => {
29574
29681
  try {
29575
29682
  const resolved = validateSafePath(path, baseDir);
@@ -29581,7 +29688,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
29581
29688
  }
29582
29689
  }, resolveLocalImage = (url, buildDir) => {
29583
29690
  const cleanPath = url.startsWith("/") ? url.slice(1) : url;
29584
- return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve50(process.cwd()));
29691
+ return safeResolve(cleanPath, buildDir) ?? safeResolve(cleanPath, resolve51(process.cwd()));
29585
29692
  }, parseQueryParams = (query, allowedSizes, defaultQuality) => {
29586
29693
  const url = typeof query["url"] === "string" ? query["url"] : undefined;
29587
29694
  const wParam = typeof query["w"] === "string" ? query["w"] : undefined;
@@ -29682,7 +29789,7 @@ var DEFAULT_CACHE_TTL_SECONDS = 60, MS_PER_SECOND = 1000, MAX_QUALITY = 100, avi
29682
29789
  }
29683
29790
  });
29684
29791
  }, imageOptimizer = (config, buildDir) => {
29685
- const plugin = new Elysia8({ name: "image-optimizer" });
29792
+ const plugin = new Elysia9({ name: "image-optimizer" });
29686
29793
  if (!config && config !== undefined)
29687
29794
  return plugin;
29688
29795
  if (config?.unoptimized)
@@ -29779,7 +29886,7 @@ var init_imageOptimizer = __esm(() => {
29779
29886
  });
29780
29887
 
29781
29888
  // src/dev/requestInspector.ts
29782
- import { Elysia as Elysia9 } from "elysia";
29889
+ import { Elysia as Elysia10 } from "elysia";
29783
29890
  var RING_MAX = 200, DEFAULT_STATUS = 200, ASSET_EXTENSION, requestLog = () => {
29784
29891
  globalThis.__absoluteRequestLog ??= [];
29785
29892
  return globalThis.__absoluteRequestLog;
@@ -29815,7 +29922,7 @@ var RING_MAX = 200, DEFAULT_STATUS = 200, ASSET_EXTENSION, requestLog = () => {
29815
29922
  var init_requestInspector = __esm(() => {
29816
29923
  ASSET_EXTENSION = /\.(?:avif|css|gif|ico|jpe?g|js|json|map|mjs|otf|png|svg|ttf|txt|wasm|webp|woff2?)$/i;
29817
29924
  pending = new WeakMap;
29818
- requestInspector = new Elysia9({
29925
+ requestInspector = new Elysia10({
29819
29926
  name: "absolute-request-inspector"
29820
29927
  }).get("/__absolute/requests", () => requestLog()).request(({ request }) => {
29821
29928
  noteDevRequestStart();
@@ -30078,13 +30185,13 @@ import { createHash as createHash7 } from "crypto";
30078
30185
  import {
30079
30186
  mkdir as mkdir14,
30080
30187
  mkdtemp as mkdtemp2,
30081
- readFile as readFile9,
30082
- readdir as readdir5,
30188
+ readFile as readFile10,
30189
+ readdir as readdir6,
30083
30190
  rename as rename5,
30084
30191
  rm as rm13,
30085
- writeFile as writeFile11
30192
+ writeFile as writeFile12
30086
30193
  } from "fs/promises";
30087
- import { join as join56, resolve as resolvePath } from "path";
30194
+ import { join as join57, resolve as resolvePath } from "path";
30088
30195
  import { pathToFileURL as pathToFileURL4 } from "url";
30089
30196
  var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE = "artifact.json", RELEASE_ID_PATTERN, DEFAULT_BLOB_PREFIX = "absolutejs/mobile-compatibility", hashBlob = async (blob) => {
30090
30197
  const bytes = new Uint8Array(await blob.arrayBuffer());
@@ -30099,7 +30206,7 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
30099
30206
  }
30100
30207
  return releaseId;
30101
30208
  }, readStoredArtifact = async (releaseDirectory) => {
30102
- const serialized = await readFile9(join56(releaseDirectory, ARTIFACT_FILE), "utf8");
30209
+ const serialized = await readFile10(join57(releaseDirectory, ARTIFACT_FILE), "utf8");
30103
30210
  const parsed = JSON.parse(serialized);
30104
30211
  return parseAbsoluteMobileCompatibilityArtifact(parsed);
30105
30212
  }, validateStoredIdentity = (artifact, appId, releaseId) => {
@@ -30194,8 +30301,8 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
30194
30301
  }, createAbsoluteMobileFileArtifactStore = (options) => {
30195
30302
  const root = resolvePath(options.root);
30196
30303
  const maxProducerBytes = options.maxProducerBytes ?? DEFAULT_MAX_PRODUCER_BYTES;
30197
- const appDirectory = (appId) => join56(root, appDirectoryName(appId));
30198
- const releaseDirectory = (appId, releaseId) => join56(appDirectory(appId), requireReleaseId(releaseId));
30304
+ const appDirectory = (appId) => join57(root, appDirectoryName(appId));
30305
+ const releaseDirectory = (appId, releaseId) => join57(appDirectory(appId), requireReleaseId(releaseId));
30199
30306
  const acceptExistingRelease = async (error, artifact) => {
30200
30307
  if (!errorHasCode(error, "EEXIST") && !errorHasCode(error, "ENOTEMPTY")) {
30201
30308
  return false;
@@ -30213,7 +30320,7 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
30213
30320
  list: async (appId) => {
30214
30321
  let entries;
30215
30322
  try {
30216
- entries = await readdir5(appDirectory(appId), {
30323
+ entries = await readdir6(appDirectory(appId), {
30217
30324
  withFileTypes: true
30218
30325
  });
30219
30326
  } catch (error) {
@@ -30236,7 +30343,7 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
30236
30343
  }
30237
30344
  return {
30238
30345
  artifact,
30239
- producer: Bun.file(join56(directory, artifact.producer.module))
30346
+ producer: Bun.file(join57(directory, artifact.producer.module))
30240
30347
  };
30241
30348
  },
30242
30349
  write: async (release) => {
@@ -30244,16 +30351,16 @@ var DEFAULT_MAX_PRODUCER_BYTES = 134217728, SHA_2562 = "sha256", ARTIFACT_FILE =
30244
30351
  const validated = await verifyAbsoluteMobileCompatibilityProducer({ artifact: validatedArtifact, producer: release.producer }, maxProducerBytes);
30245
30352
  const parent = appDirectory(validated.artifact.appId);
30246
30353
  await mkdir14(parent, { recursive: true });
30247
- const staging = await mkdtemp2(join56(parent, ".stage-"));
30248
- const producerPath = join56(staging, validated.artifact.producer.module);
30354
+ const staging = await mkdtemp2(join57(parent, ".stage-"));
30355
+ const producerPath = join57(staging, validated.artifact.producer.module);
30249
30356
  try {
30250
30357
  await mkdir14(resolvePath(producerPath, ".."), {
30251
30358
  recursive: true
30252
30359
  });
30253
30360
  await Promise.all([
30254
- writeFile11(join56(staging, ARTIFACT_FILE), `${JSON.stringify(validated.artifact, null, "\t")}
30361
+ writeFile12(join57(staging, ARTIFACT_FILE), `${JSON.stringify(validated.artifact, null, "\t")}
30255
30362
  `),
30256
- writeFile11(producerPath, new Uint8Array(await validated.producer.arrayBuffer()))
30363
+ writeFile12(producerPath, new Uint8Array(await validated.producer.arrayBuffer()))
30257
30364
  ]);
30258
30365
  await rename5(staging, releaseDirectory(validated.artifact.appId, validated.artifact.releaseId));
30259
30366
  } catch (error) {
@@ -30303,12 +30410,12 @@ import {
30303
30410
  access as access5,
30304
30411
  mkdir as mkdir15,
30305
30412
  mkdtemp as mkdtemp3,
30306
- readFile as readFile10,
30413
+ readFile as readFile11,
30307
30414
  rename as rename6,
30308
30415
  rm as rm14,
30309
- writeFile as writeFile12
30416
+ writeFile as writeFile13
30310
30417
  } from "fs/promises";
30311
- import { dirname as dirname34, join as join57, resolve as resolvePath2 } from "path";
30418
+ import { dirname as dirname34, join as join58, resolve as resolvePath2 } from "path";
30312
30419
  import { pathToFileURL as pathToFileURL5 } from "url";
30313
30420
  var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "current.json", BUNDLES_DIRECTORY = "bundles", ARTIFACT_FILE2 = "artifact.json", BUNDLE_ID_PATTERN, isRecord9 = (value) => typeof value === "object" && value !== null && !Array.isArray(value), errorHasCode2 = (error, code) => typeof error === "object" && error !== null && Reflect.get(error, "code") === code, bundleIdFor = (currentReleaseId, releases) => {
30314
30421
  const identity = JSON.stringify({
@@ -30339,16 +30446,16 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
30339
30446
  releases
30340
30447
  };
30341
30448
  }, writeRelease = async (root, release) => {
30342
- const directory = join57(root, release.artifact.releaseId);
30343
- const producerPath = join57(directory, release.artifact.producer.module);
30449
+ const directory = join58(root, release.artifact.releaseId);
30450
+ const producerPath = join58(directory, release.artifact.producer.module);
30344
30451
  await mkdir15(dirname34(producerPath), { recursive: true });
30345
30452
  await Promise.all([
30346
- writeFile12(join57(directory, ARTIFACT_FILE2), `${JSON.stringify(release.artifact, null, "\t")}
30453
+ writeFile13(join58(directory, ARTIFACT_FILE2), `${JSON.stringify(release.artifact, null, "\t")}
30347
30454
  `),
30348
- writeFile12(producerPath, new Uint8Array(await release.producer.arrayBuffer()))
30455
+ writeFile13(producerPath, new Uint8Array(await release.producer.arrayBuffer()))
30349
30456
  ]);
30350
30457
  }, installImmutableBundle = async (bundlesRoot, bundleId, releases) => {
30351
- const destination = join57(bundlesRoot, bundleId);
30458
+ const destination = join58(bundlesRoot, bundleId);
30352
30459
  try {
30353
30460
  await access5(destination);
30354
30461
  return destination;
@@ -30356,7 +30463,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
30356
30463
  if (!errorHasCode2(error, "ENOENT"))
30357
30464
  throw error;
30358
30465
  }
30359
- const staging = await mkdtemp3(join57(bundlesRoot, ".stage-"));
30466
+ const staging = await mkdtemp3(join58(bundlesRoot, ".stage-"));
30360
30467
  try {
30361
30468
  await Promise.all(releases.map((release) => writeRelease(staging, release)));
30362
30469
  await rename6(staging, destination);
@@ -30387,15 +30494,15 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
30387
30494
  };
30388
30495
  }, loadAbsoluteMobileMaterializedBundle = async (root) => {
30389
30496
  const resolvedRoot = resolvePath2(root);
30390
- const serialized = await readFile10(join57(resolvedRoot, CURRENT_BUNDLE_FILE), "utf8");
30497
+ const serialized = await readFile11(join58(resolvedRoot, CURRENT_BUNDLE_FILE), "utf8");
30391
30498
  const parsed = JSON.parse(serialized);
30392
30499
  const index = parseBundleIndex(parsed);
30393
- const bundleRoot = join57(resolvedRoot, BUNDLES_DIRECTORY, index.bundleId);
30500
+ const bundleRoot = join58(resolvedRoot, BUNDLES_DIRECTORY, index.bundleId);
30394
30501
  return {
30395
30502
  artifacts: index.releases,
30396
30503
  currentReleaseId: index.currentReleaseId,
30397
30504
  loadProducer: async (artifact) => {
30398
- const modulePath = join57(bundleRoot, artifact.releaseId, artifact.producer.module);
30505
+ const modulePath = join58(bundleRoot, artifact.releaseId, artifact.producer.module);
30399
30506
  await verifyAbsoluteMobileCompatibilityProducer({
30400
30507
  artifact,
30401
30508
  producer: Bun.file(modulePath)
@@ -30421,7 +30528,7 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
30421
30528
  return release;
30422
30529
  });
30423
30530
  const root = resolvePath2(input.root);
30424
- const bundlesRoot = join57(root, BUNDLES_DIRECTORY);
30531
+ const bundlesRoot = join58(root, BUNDLES_DIRECTORY);
30425
30532
  await mkdir15(bundlesRoot, { recursive: true });
30426
30533
  const bundleId = bundleIdFor(input.currentReleaseId, artifacts);
30427
30534
  await installImmutableBundle(bundlesRoot, bundleId, orderedReleases);
@@ -30431,21 +30538,21 @@ var ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT = 1, CURRENT_BUNDLE_FILE = "curre
30431
30538
  format: ABSOLUTE_MOBILE_MATERIALIZED_BUNDLE_FORMAT,
30432
30539
  releases: artifacts
30433
30540
  };
30434
- const pointerPath = join57(root, CURRENT_BUNDLE_FILE);
30435
- const temporaryPointerPath = join57(root, `.current-${crypto.randomUUID()}.json`);
30436
- await writeFile12(temporaryPointerPath, `${JSON.stringify(index, null, "\t")}
30541
+ const pointerPath = join58(root, CURRENT_BUNDLE_FILE);
30542
+ const temporaryPointerPath = join58(root, `.current-${crypto.randomUUID()}.json`);
30543
+ await writeFile13(temporaryPointerPath, `${JSON.stringify(index, null, "\t")}
30437
30544
  `, { flag: "wx" });
30438
30545
  await rename6(temporaryPointerPath, pointerPath);
30439
30546
  return index;
30440
30547
  }, readAbsoluteMobileMaterializedReleases = async (root) => {
30441
30548
  const resolvedRoot = resolvePath2(root);
30442
30549
  try {
30443
- const serialized = await readFile10(join57(resolvedRoot, CURRENT_BUNDLE_FILE), "utf8");
30550
+ const serialized = await readFile11(join58(resolvedRoot, CURRENT_BUNDLE_FILE), "utf8");
30444
30551
  const parsed = JSON.parse(serialized);
30445
30552
  const index = parseBundleIndex(parsed);
30446
- const bundleRoot = join57(resolvedRoot, BUNDLES_DIRECTORY, index.bundleId);
30553
+ const bundleRoot = join58(resolvedRoot, BUNDLES_DIRECTORY, index.bundleId);
30447
30554
  return Promise.all(index.releases.map(async (artifact) => {
30448
- const producer = Bun.file(join57(bundleRoot, artifact.releaseId, artifact.producer.module));
30555
+ const producer = Bun.file(join58(bundleRoot, artifact.releaseId, artifact.producer.module));
30449
30556
  await verifyAbsoluteMobileCompatibilityProducer({
30450
30557
  artifact,
30451
30558
  producer
@@ -30853,7 +30960,7 @@ var exports_compatibilityDispatcher = {};
30853
30960
  __export(exports_compatibilityDispatcher, {
30854
30961
  createAbsoluteMobileCompatibilityDispatcher: () => createAbsoluteMobileCompatibilityDispatcher
30855
30962
  });
30856
- import { Elysia as Elysia10 } from "elysia";
30963
+ import { Elysia as Elysia11 } from "elysia";
30857
30964
  var MOBILE_WEBVIEW_ORIGINS, MOBILE_REQUEST_HEADER_NAMES, MOBILE_CORS_ALLOW_HEADERS, MOBILE_CORS_METHODS, mobileWebViewOrigin = (request) => {
30858
30965
  const origin = request.headers.get("origin");
30859
30966
  return origin && MOBILE_WEBVIEW_ORIGINS.has(origin) ? origin : undefined;
@@ -30908,7 +31015,7 @@ var MOBILE_WEBVIEW_ORIGINS, MOBILE_REQUEST_HEADER_NAMES, MOBILE_CORS_ALLOW_HEADE
30908
31015
  throw new TypeError("currentReleaseId must identify a retained compatibility artifact.");
30909
31016
  }
30910
31017
  const resolveProducer = createProducerResolver(options.loadProducer);
30911
- return new Elysia10({ name: "absolutejs-mobile-compatibility-dispatcher" }).request(async ({ request }) => {
31018
+ return new Elysia11({ name: "absolutejs-mobile-compatibility-dispatcher" }).request(async ({ request }) => {
30912
31019
  if (getCurrentAbsoluteMobileProducerContext())
30913
31020
  return;
30914
31021
  const preflight = mobilePreflightResponse(request);
@@ -30980,7 +31087,7 @@ var init_compatibilityDispatcher = __esm(() => {
30980
31087
 
30981
31088
  // src/core/prerender.ts
30982
31089
  import { mkdirSync as mkdirSync15, readFileSync as readFileSync38 } from "fs";
30983
- import { join as join58 } from "path";
31090
+ import { join as join59 } from "path";
30984
31091
  var DEFAULT_FETCH_TIMEOUT_MS = 1e4, PRERENDER_BYPASS_HEADER = "X-Absolute-Prerender-Bypass", routeToFilename = (route) => route === "/" ? "index.html" : `${route.slice(1).replace(/\//g, "-")}.html`, writeTimestamp = async (htmlPath) => {
30985
31092
  const metaPath = htmlPath.replace(/\.html$/, ".meta");
30986
31093
  await Bun.write(metaPath, String(Date.now()));
@@ -31004,7 +31111,7 @@ var DEFAULT_FETCH_TIMEOUT_MS = 1e4, PRERENDER_BYPASS_HEADER = "X-Absolute-Preren
31004
31111
  if (!isCompleteHtml(html))
31005
31112
  return false;
31006
31113
  const fileName = routeToFilename(route);
31007
- const filePath = join58(prerenderDir, fileName);
31114
+ const filePath = join59(prerenderDir, fileName);
31008
31115
  await Bun.write(filePath, html);
31009
31116
  await writeTimestamp(filePath);
31010
31117
  return true;
@@ -31024,8 +31131,8 @@ var init_prerender = () => {};
31024
31131
  // src/core/prepare.ts
31025
31132
  import { createHash as createHash9 } from "crypto";
31026
31133
  import { existsSync as existsSync44, readdirSync as readdirSync12, readFileSync as readFileSync39 } from "fs";
31027
- import { basename as basename19, join as join59, relative as relative22, resolve as resolvePath3 } from "path";
31028
- import { Elysia as Elysia11, NotFound } from "elysia";
31134
+ import { basename as basename19, join as join60, relative as relative23, resolve as resolvePath3 } from "path";
31135
+ import { Elysia as Elysia12, NotFound } from "elysia";
31029
31136
  var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_PLUGIN_RETRY_DELAY_MS = 50, waitForStaticPluginRetry = () => new Promise((resolve) => {
31030
31137
  setTimeout(resolve, STATIC_PLUGIN_RETRY_DELAY_MS);
31031
31138
  }), retryStaticPlugin = async (createStaticPlugin, options) => {
@@ -31033,7 +31140,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31033
31140
  return await createStaticPlugin(options);
31034
31141
  } catch (error) {
31035
31142
  logWarn(`Static asset routes were skipped this cycle \u2014 a build file was unavailable mid-rebuild: ${error instanceof Error ? error.message : String(error)}`);
31036
- return new Elysia11({ name: "absolutejs-static-fallback" });
31143
+ return new Elysia12({ name: "absolutejs-static-fallback" });
31037
31144
  }
31038
31145
  }, mountStaticPlugin = async (createStaticPlugin, options) => {
31039
31146
  try {
@@ -31044,7 +31151,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31044
31151
  }
31045
31152
  }, MOBILE_DEV_MODULE_HEADERS, NATIVE_DEVICE_ADAPTER_PATH = "/__absolute/native-device-adapter.js", MOBILE_PREVIEW_CLIENT_PATH = "/__absolute/mobile-preview-client.js", loadMobileDevPlugin = async (mobile) => {
31046
31153
  if (!mobile)
31047
- return new Elysia11({ name: "absolutejs-mobile-disabled" });
31154
+ return new Elysia12({ name: "absolutejs-mobile-disabled" });
31048
31155
  const [
31049
31156
  { createAbsoluteMobileAssociationPlugin },
31050
31157
  { createAbsoluteMobilePreviewPlugin }
@@ -31055,14 +31162,14 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31055
31162
  let nativeDevAdapterBundle;
31056
31163
  const getNativeDevAdapterBundle = () => nativeDevAdapterBundle ??= Promise.resolve().then(() => (init_devDeviceAdapter(), {})).then(({}) => buildAbsoluteNativeDevAdapter(process.cwd(), mobile));
31057
31164
  const getMobilePreviewClientBundle = () => Promise.resolve().then(() => (init_mobilePreviewClientBundle(), {})).then(({}) => getAbsoluteMobilePreviewClientBundle());
31058
- return new Elysia11({ name: "absolutejs-mobile-dev" }).use(createAbsoluteMobileAssociationPlugin(mobile, process.cwd())).use(createAbsoluteMobilePreviewPlugin(mobile)).get(NATIVE_DEVICE_ADAPTER_PATH, async () => new Response(await getNativeDevAdapterBundle(), {
31165
+ return new Elysia12({ name: "absolutejs-mobile-dev" }).use(createAbsoluteMobileAssociationPlugin(mobile, process.cwd())).use(createAbsoluteMobilePreviewPlugin(mobile)).get(NATIVE_DEVICE_ADAPTER_PATH, async () => new Response(await getNativeDevAdapterBundle(), {
31059
31166
  headers: MOBILE_DEV_MODULE_HEADERS
31060
31167
  })).get(MOBILE_PREVIEW_CLIENT_PATH, async () => new Response(await getMobilePreviewClientBundle(), {
31061
31168
  headers: MOBILE_DEV_MODULE_HEADERS
31062
31169
  }));
31063
31170
  }, loadMobileAssociationPlugin = async (mobile) => {
31064
31171
  if (!mobile) {
31065
- return new Elysia11({ name: "absolutejs-mobile-associations-disabled" });
31172
+ return new Elysia12({ name: "absolutejs-mobile-associations-disabled" });
31066
31173
  }
31067
31174
  await Promise.resolve().then(() => init_associationFiles());
31068
31175
  return createAbsoluteMobileAssociationPlugin(mobile, process.cwd(), {
@@ -31070,7 +31177,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31070
31177
  });
31071
31178
  }, loadMobileUpdatePlugin = async (mobile, production) => {
31072
31179
  if (!mobile?.updates)
31073
- return new Elysia11({ name: "absolutejs-mobile-updates-unconfigured" });
31180
+ return new Elysia12({ name: "absolutejs-mobile-updates-unconfigured" });
31074
31181
  const [
31075
31182
  { normalizeAbsoluteMobileConfig },
31076
31183
  { createAbsoluteMobileUpdateServerPlugin }
@@ -31113,7 +31220,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31113
31220
  return files;
31114
31221
  }, PREWARM_MAX_PAUSE_MS = 60000, toWarmTasks = function* (files, warmCache, srcUrlPrefix) {
31115
31222
  for (const file of files) {
31116
- const rel = relative22(process.cwd(), file).replace(/\\/g, "/");
31223
+ const rel = relative23(process.cwd(), file).replace(/\\/g, "/");
31117
31224
  yield () => warmCache(`${srcUrlPrefix}${rel}`);
31118
31225
  }
31119
31226
  }, builtPageSources = () => {
@@ -31154,7 +31261,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31154
31261
  const srcPath = resolvePath3(devIndexDir, fileName);
31155
31262
  if (!existsSync44(srcPath))
31156
31263
  continue;
31157
- const rel = relative22(process.cwd(), srcPath).replace(/\\/g, "/");
31264
+ const rel = relative23(process.cwd(), srcPath).replace(/\\/g, "/");
31158
31265
  manifest[key] = `${SRC_URL_PREFIX}${rel}`;
31159
31266
  }
31160
31267
  }, ICON_HASH_LENGTH = 8, registerIconVersioning = (buildDir) => {
@@ -31166,7 +31273,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31166
31273
  if (cached !== undefined)
31167
31274
  return cached;
31168
31275
  const path = href.split("?")[0] ?? href;
31169
- const filePath = join59(buildDir, path);
31276
+ const filePath = join60(buildDir, path);
31170
31277
  let versioned = href;
31171
31278
  if (existsSync44(filePath)) {
31172
31279
  const hash = createHash9("sha256").update(readFileSync39(filePath)).digest("hex").slice(0, ICON_HASH_LENGTH);
@@ -31264,7 +31371,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31264
31371
  const { serverTiming } = await import("@elysia/server-timing");
31265
31372
  const mobileDevPlugin = await loadMobileDevPlugin(config.mobile);
31266
31373
  const mobileUpdatePlugin = await loadMobileUpdatePlugin(config.mobile, false);
31267
- const absolutejs = new Elysia11({ name: "absolutejs-runtime" }).use(requestInspector).use(absoluteRequestContext).use(serverTiming()).use(devtoolsJson(buildDir, {
31374
+ const absolutejs = new Elysia12({ name: "absolutejs-runtime" }).use(requestInspector).use(absoluteRequestContext).use(serverTiming()).use(devtoolsJson(buildDir, {
31268
31375
  normalizeForWindowsContainer: config.dev?.devtools?.normalizeForWindowsContainer,
31269
31376
  projectRoot: config.dev?.devtools?.projectRoot,
31270
31377
  uuid: config.dev?.devtools?.uuid,
@@ -31302,13 +31409,13 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31302
31409
  continue;
31303
31410
  const name = basename19(entry, ".html");
31304
31411
  const route = name === "index" ? "/" : `/${name}`;
31305
- map.set(route, join59(prerenderDir, entry));
31412
+ map.set(route, join60(prerenderDir, entry));
31306
31413
  }
31307
31414
  return map;
31308
31415
  }, loadMobileCompatibilityPlugin = async (buildDir) => {
31309
- const root = join59(buildDir, ".absolutejs", "mobile-compatibility");
31310
- if (!existsSync44(join59(root, "current.json"))) {
31311
- return new Elysia11({ name: "absolutejs-mobile-compatibility-empty" });
31416
+ const root = join60(buildDir, ".absolutejs", "mobile-compatibility");
31417
+ if (!existsSync44(join60(root, "current.json"))) {
31418
+ return new Elysia12({ name: "absolutejs-mobile-compatibility-empty" });
31312
31419
  }
31313
31420
  const [
31314
31421
  { loadAbsoluteMobileMaterializedBundle },
@@ -31319,12 +31426,12 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31319
31426
  ]);
31320
31427
  const options = await loadAbsoluteMobileMaterializedBundle(root);
31321
31428
  return createAbsoluteMobileCompatibilityDispatcher(options);
31322
- }, createNotFoundPlugin = () => new Elysia11({ name: "absolutejs-not-found" }).error("global", NotFound, async () => {
31429
+ }, createNotFoundPlugin = () => new Elysia12({ name: "absolutejs-not-found" }).error("global", NotFound, async () => {
31323
31430
  const response = await renderFirstNotFound();
31324
31431
  if (response)
31325
31432
  return response;
31326
31433
  return;
31327
- }), createBuildErrorRecoveryPlugin = () => new Elysia11({ name: "absolutejs-build-error-recovery" }).error("global", async ({ error }) => {
31434
+ }), createBuildErrorRecoveryPlugin = () => new Elysia12({ name: "absolutejs-build-error-recovery" }).error("global", async ({ error }) => {
31328
31435
  const message = error instanceof Error ? error.message : String(error);
31329
31436
  const assetMatch = /^Asset "(.+)" not found in manifest\.$/.exec(message);
31330
31437
  if (!assetMatch)
@@ -31371,12 +31478,12 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31371
31478
  setCurrentPageIslandMetadata(await loadPageIslandMetadata(config));
31372
31479
  recordStep("load production manifest and island metadata", stepStartedAt);
31373
31480
  stepStartedAt = performance.now();
31374
- const conventionsPath = join59(buildDir, "conventions.json");
31481
+ const conventionsPath = join60(buildDir, "conventions.json");
31375
31482
  if (existsSync44(conventionsPath)) {
31376
31483
  const conventions = JSON.parse(readFileSync39(conventionsPath, "utf-8"));
31377
31484
  setConventions(conventions);
31378
31485
  }
31379
- const spaRoutesPath = join59(buildDir, "spa-routes.json");
31486
+ const spaRoutesPath = join60(buildDir, "spa-routes.json");
31380
31487
  if (existsSync44(spaRoutesPath)) {
31381
31488
  setSpaRouteManifest(JSON.parse(readFileSync39(spaRoutesPath, "utf-8")));
31382
31489
  }
@@ -31389,12 +31496,12 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31389
31496
  prefix: "",
31390
31497
  staticLimit: MAX_STATIC_ROUTE_COUNT
31391
31498
  });
31392
- const generatedAssetsRoot = join59(buildDir, ".absolutejs");
31393
- const generatedAssetsPlugin = new Elysia11({
31499
+ const generatedAssetsRoot = join60(buildDir, ".absolutejs");
31500
+ const generatedAssetsPlugin = new Elysia12({
31394
31501
  name: "absolutejs-generated-assets"
31395
31502
  }).get("/.absolutejs/*", async ({ params, set }) => {
31396
31503
  const requestedPath = resolvePath3(generatedAssetsRoot, params["*"]);
31397
- if (relative22(generatedAssetsRoot, requestedPath).startsWith("..")) {
31504
+ if (relative23(generatedAssetsRoot, requestedPath).startsWith("..")) {
31398
31505
  set.status = 404;
31399
31506
  return "Not Found";
31400
31507
  }
@@ -31406,15 +31513,9 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31406
31513
  set.headers["cache-control"] = "public, max-age=31536000, immutable";
31407
31514
  return file;
31408
31515
  });
31516
+ const precompressedFiles = await createPrecompressedPlugin(buildDir);
31409
31517
  recordStep("create static plugin", stepStartedAt);
31410
- const isFingerprintedAsset = (pathname) => {
31411
- if (pathname.startsWith("/.absolutejs/"))
31412
- return true;
31413
- const base = pathname.slice(pathname.lastIndexOf("/") + 1);
31414
- const hash = base.match(/[.-]([0-9a-z]{6,12})\.[0-9a-z]+$/i)?.[1];
31415
- return hash ? /[0-9]/.test(hash) && /[a-z]/i.test(hash) : false;
31416
- };
31417
- const assetCachePlugin = new Elysia11({
31518
+ const assetCachePlugin = new Elysia12({
31418
31519
  name: "absolutejs-asset-cache"
31419
31520
  }).afterHandle("global", ({ request, responseValue }) => {
31420
31521
  if (!(responseValue instanceof Response))
@@ -31424,10 +31525,10 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31424
31525
  const { pathname } = new URL(request.url);
31425
31526
  if (pathname.endsWith("/") || !/\.[0-9a-z]+$/i.test(pathname))
31426
31527
  return;
31427
- responseValue.headers.set("cache-control", isFingerprintedAsset(pathname) ? "public, max-age=31536000, immutable" : "public, max-age=0, must-revalidate");
31528
+ responseValue.headers.set("cache-control", assetCacheControl(pathname));
31428
31529
  });
31429
31530
  stepStartedAt = performance.now();
31430
- const prerenderDir = join59(buildDir, "_prerendered");
31531
+ const prerenderDir = join60(buildDir, "_prerendered");
31431
31532
  const prerenderMap = loadPrerenderMap(prerenderDir);
31432
31533
  const mobileCompatibilityPlugin = await loadMobileCompatibilityPlugin(buildDir);
31433
31534
  const mobileAssociationPlugin = await loadMobileAssociationPlugin(config.mobile);
@@ -31438,7 +31539,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31438
31539
  const revalidateMs = config.static?.revalidate ? config.static.revalidate * MS_PER_SECOND2 : 0;
31439
31540
  const port = Number(process.env.PORT) || DEFAULT_PORT2;
31440
31541
  const rerendering = new Set;
31441
- const prerenderPlugin = new Elysia11({
31542
+ const prerenderPlugin = new Elysia12({
31442
31543
  name: "prerendered-pages"
31443
31544
  }).request(({ request }) => {
31444
31545
  const url = new URL(request.url);
@@ -31461,7 +31562,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31461
31562
  });
31462
31563
  stepStartedAt = performance.now();
31463
31564
  await Promise.resolve().then(() => init_imageOptimizer());
31464
- const absolutejs = new Elysia11({ name: "absolutejs-runtime" }).use(absoluteRequestContext).use(mobileAssociationPlugin).use(mobileCompatibilityPlugin).use(mobileUpdatePlugin).use(assetCachePlugin).use(imageOptimizer(config.images, buildDir)).use(prerenderPlugin).use(staticFiles).use(generatedAssetsPlugin).use(createNotFoundPlugin());
31565
+ const absolutejs = new Elysia12({ name: "absolutejs-runtime" }).use(absoluteRequestContext).use(mobileAssociationPlugin).use(mobileCompatibilityPlugin).use(mobileUpdatePlugin).use(assetCachePlugin).use(imageOptimizer(config.images, buildDir)).use(prerenderPlugin).use(precompressedFiles).use(staticFiles).use(generatedAssetsPlugin).use(createNotFoundPlugin());
31465
31566
  await withOpenApi(absolutejs, config, process.cwd(), false);
31466
31567
  await withTelemetry(absolutejs, config, process.cwd());
31467
31568
  recordStep("assemble production runtime", stepStartedAt);
@@ -31470,7 +31571,7 @@ var MS_PER_SECOND2 = 1000, DEFAULT_PORT2 = 3000, MAX_STATIC_ROUTE_COUNT, STATIC_
31470
31571
  }
31471
31572
  stepStartedAt = performance.now();
31472
31573
  await Promise.resolve().then(() => init_imageOptimizer());
31473
- const absolutejs = new Elysia11({ name: "absolutejs-runtime" }).use(absoluteRequestContext).use(mobileAssociationPlugin).use(mobileCompatibilityPlugin).use(mobileUpdatePlugin).use(assetCachePlugin).use(imageOptimizer(config.images, buildDir)).use(staticFiles).use(generatedAssetsPlugin).use(createNotFoundPlugin());
31574
+ const absolutejs = new Elysia12({ name: "absolutejs-runtime" }).use(absoluteRequestContext).use(mobileAssociationPlugin).use(mobileCompatibilityPlugin).use(mobileUpdatePlugin).use(assetCachePlugin).use(imageOptimizer(config.images, buildDir)).use(precompressedFiles).use(staticFiles).use(generatedAssetsPlugin).use(createNotFoundPlugin());
31474
31575
  await withOpenApi(absolutejs, config, process.cwd(), false);
31475
31576
  await withTelemetry(absolutejs, config, process.cwd());
31476
31577
  recordStep("assemble production runtime", stepStartedAt);
@@ -31527,6 +31628,7 @@ var init_prepare = __esm(() => {
31527
31628
  init_bootTimeline();
31528
31629
  init_logger();
31529
31630
  init_bootLifecycle();
31631
+ init_precompressed();
31530
31632
  init_idleScheduler();
31531
31633
  MAX_STATIC_ROUTE_COUNT = Number.MAX_SAFE_INTEGER;
31532
31634
  MOBILE_DEV_MODULE_HEADERS = {
@@ -31553,7 +31655,7 @@ __export(exports_moduleServer, {
31553
31655
  warnIfReactFastRefreshUnsupported: () => warnIfReactFastRefreshUnsupported
31554
31656
  });
31555
31657
  import { existsSync as existsSync45, readFileSync as readFileSync40, realpathSync as realpathSync4, statSync as statSync9 } from "fs";
31556
- import { basename as basename20, dirname as dirname35, extname as extname15, join as join60, resolve as resolve51, relative as relative23 } from "path";
31658
+ import { basename as basename20, dirname as dirname35, extname as extname16, join as join61, resolve as resolve52, relative as relative24 } from "path";
31557
31659
  var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfig, tsTranspiler2, tsxTranspiler, TRANSPILABLE, ALL_EXPORTS_RE, STRING_CONTENTS_RE, preserveTypeExports = (originalSource, transpiled, valueExports) => {
31558
31660
  const codeOnly = originalSource.replace(STRING_CONTENTS_RE, '""');
31559
31661
  const allExports = [];
@@ -31573,10 +31675,10 @@ var SRC_PREFIX = "/@src/", BROWSER_DEFINE, jsTranspiler2, legacyDecoratorTsconfi
31573
31675
  ${stubs}
31574
31676
  `;
31575
31677
  }, resolveRelativeExtension = (srcPath, projectRoot, extensions) => {
31576
- const directHit = extensions.find((ext) => existsSync45(resolve51(projectRoot, srcPath + ext)));
31678
+ const directHit = extensions.find((ext) => existsSync45(resolve52(projectRoot, srcPath + ext)));
31577
31679
  if (directHit)
31578
31680
  return srcPath + directHit;
31579
- const indexHit = extensions.find((ext) => existsSync45(resolve51(projectRoot, srcPath, `index${ext}`)));
31681
+ const indexHit = extensions.find((ext) => existsSync45(resolve52(projectRoot, srcPath, `index${ext}`)));
31580
31682
  if (indexHit)
31581
31683
  return `${srcPath}/index${indexHit}`;
31582
31684
  return srcPath;
@@ -31605,7 +31707,7 @@ ${stubs}
31605
31707
  return invalidationVersion > 0 ? `${mtime}.${invalidationVersion}` : `${mtime}`;
31606
31708
  }, srcUrl = (relPath, projectRoot) => {
31607
31709
  const base = `${SRC_PREFIX}${relPath.replace(/\\/g, "/")}`;
31608
- const absPath = resolve51(projectRoot, relPath);
31710
+ const absPath = resolve52(projectRoot, relPath);
31609
31711
  const cached = mtimeCache.get(absPath);
31610
31712
  if (cached !== undefined)
31611
31713
  return `${base}?v=${buildVersion(cached, absPath)}`;
@@ -31617,12 +31719,12 @@ ${stubs}
31617
31719
  return base;
31618
31720
  }
31619
31721
  }, resolveRelativeImport = (relPath, fileDir, projectRoot, extensions) => {
31620
- const absPath = resolve51(fileDir, relPath);
31621
- const rel = relative23(projectRoot, absPath);
31622
- const extension = extname15(rel);
31722
+ const absPath = resolve52(fileDir, relPath);
31723
+ const rel = relative24(projectRoot, absPath);
31724
+ const extension = extname16(rel);
31623
31725
  let srcPath = RESOLVED_MODULE_EXTENSIONS.has(extension) ? rel : resolveRelativeExtension(rel, projectRoot, extensions);
31624
- if (extname15(srcPath) === ".svelte") {
31625
- srcPath = relative23(projectRoot, resolveSvelteModulePath(resolve51(projectRoot, srcPath)));
31726
+ if (extname16(srcPath) === ".svelte") {
31727
+ srcPath = relative24(projectRoot, resolveSvelteModulePath(resolve52(projectRoot, srcPath)));
31626
31728
  }
31627
31729
  return srcUrl(srcPath, projectRoot);
31628
31730
  }, NODE_BUILTIN_RE, resolveAbsoluteSpecifier = (specifier, projectRoot) => {
@@ -31634,27 +31736,27 @@ ${stubs}
31634
31736
  "import"
31635
31737
  ]);
31636
31738
  if (fromExports)
31637
- return relative23(projectRoot, fromExports);
31739
+ return relative24(projectRoot, fromExports);
31638
31740
  try {
31639
31741
  const isScoped = specifier.startsWith("@");
31640
31742
  const parts = specifier.split("/");
31641
31743
  const packageName = isScoped ? `${parts[0]}/${parts[1]}` : parts[0];
31642
31744
  const subpath = isScoped ? parts.slice(2).join("/") : parts.slice(1).join("/");
31643
31745
  if (!subpath) {
31644
- const pkgDir = resolve51(projectRoot, "node_modules", packageName ?? "");
31645
- const pkgJsonPath = join60(pkgDir, "package.json");
31746
+ const pkgDir = resolve52(projectRoot, "node_modules", packageName ?? "");
31747
+ const pkgJsonPath = join61(pkgDir, "package.json");
31646
31748
  if (existsSync45(pkgJsonPath)) {
31647
31749
  const pkg = JSON.parse(readFileSync40(pkgJsonPath, "utf-8"));
31648
31750
  const esmEntry = typeof pkg.module === "string" && pkg.module || typeof pkg.browser === "string" && pkg.browser;
31649
31751
  if (esmEntry) {
31650
- const resolved = resolve51(pkgDir, esmEntry);
31752
+ const resolved = resolve52(pkgDir, esmEntry);
31651
31753
  if (existsSync45(resolved))
31652
- return relative23(projectRoot, resolved);
31754
+ return relative24(projectRoot, resolved);
31653
31755
  }
31654
31756
  }
31655
31757
  }
31656
31758
  } catch {}
31657
- return relative23(projectRoot, Bun.resolveSync(specifier, projectRoot));
31759
+ return relative24(projectRoot, Bun.resolveSync(specifier, projectRoot));
31658
31760
  } catch {
31659
31761
  return;
31660
31762
  }
@@ -31693,22 +31795,22 @@ ${stubs}
31693
31795
  result = result.replace(/(import\s*["'])(\.\.?\/[^"']+)(["']\s*;?)/g, (_match, prefix, relPath, suffix) => isRealImport(relPath) ? `${prefix}${resolveRelativeImport(relPath, fileDir, projectRoot, SIDE_EFFECT_EXTENSIONS)}${suffix}` : _match);
31694
31796
  const rewriteAbsoluteToSrc = (_match, prefix, absPath, _ext, suffix) => {
31695
31797
  if (absPath.startsWith(projectRoot)) {
31696
- const rel = relative23(projectRoot, absPath).replace(/\\/g, "/");
31798
+ const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
31697
31799
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
31698
31800
  }
31699
- const rel = relative23(projectRoot, absPath).replace(/\\/g, "/");
31801
+ const rel = relative24(projectRoot, absPath).replace(/\\/g, "/");
31700
31802
  return `${prefix}${srcUrl(rel, projectRoot)}${suffix}`;
31701
31803
  };
31702
31804
  result = result.replace(/((?:from|import)\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["'])/g, rewriteAbsoluteToSrc);
31703
31805
  result = result.replace(/(import\s*\(\s*["'])(\/[^"']+\.(tsx?|jsx?|ts))(["']\s*\))/g, rewriteAbsoluteToSrc);
31704
31806
  result = result.replace(/new\s+URL\(\s*["'](\.\.?\/[^"']+)["']\s*,\s*import\.meta\.url\s*\)/g, (_match, relPath) => {
31705
- const absPath = resolve51(fileDir, relPath);
31706
- const rel = relative23(projectRoot, absPath);
31807
+ const absPath = resolve52(fileDir, relPath);
31808
+ const rel = relative24(projectRoot, absPath);
31707
31809
  return `new URL('${srcUrl(rel, projectRoot)}', import.meta.url)`;
31708
31810
  });
31709
31811
  result = result.replace(/import\.meta\.resolve\(\s*["'](\.\.?\/[^"']+)["']\s*\)/g, (_match, relPath) => {
31710
- const absPath = resolve51(fileDir, relPath);
31711
- const rel = relative23(projectRoot, absPath);
31812
+ const absPath = resolve52(fileDir, relPath);
31813
+ const rel = relative24(projectRoot, absPath);
31712
31814
  return `'${srcUrl(rel, projectRoot)}'`;
31713
31815
  });
31714
31816
  return result;
@@ -31764,13 +31866,13 @@ ${code}`;
31764
31866
  transpiled = `var $RefreshReg$ = window.$RefreshReg$ || function(){};
31765
31867
  ` + `var $RefreshSig$ = window.$RefreshSig$ || function(){ return function(t){ return t; }; };
31766
31868
  ${transpiled}`;
31767
- const relPath = relative23(projectRoot, filePath).replace(/\\/g, "/");
31869
+ const relPath = relative24(projectRoot, filePath).replace(/\\/g, "/");
31768
31870
  transpiled = transpiled.replace(/\binput\.tsx:/g, `${relPath}:`);
31769
31871
  transpiled += buildIslandMetadataExports(raw);
31770
31872
  return rewriteImports(transpiled, filePath, projectRoot, rewriter);
31771
31873
  }, transformPlainFile = (filePath, projectRoot, rewriter, vueDir) => {
31772
31874
  const raw = readFileSync40(filePath, "utf-8");
31773
- const ext = extname15(filePath);
31875
+ const ext = extname16(filePath);
31774
31876
  const isTS = ext === ".ts" || ext === ".tsx";
31775
31877
  const isTSX = ext === ".tsx" || ext === ".jsx";
31776
31878
  let transpiler = jsTranspiler2;
@@ -31925,11 +32027,11 @@ ${code}`;
31925
32027
  if (compiled.css?.code) {
31926
32028
  const cssPath = `${filePath}.css`;
31927
32029
  svelteExternalCss.set(cssPath, compiled.css.code);
31928
- const cssUrl = srcUrl(relative23(projectRoot, cssPath), projectRoot);
32030
+ const cssUrl = srcUrl(relative24(projectRoot, cssPath), projectRoot);
31929
32031
  code = `import "${cssUrl}";
31930
32032
  ${code}`;
31931
32033
  }
31932
- const moduleUrl = `${SRC_PREFIX}${relative23(projectRoot, filePath).replace(/\\/g, "/")}`;
32034
+ const moduleUrl = `${SRC_PREFIX}${relative24(projectRoot, filePath).replace(/\\/g, "/")}`;
31933
32035
  code = code.replace(/if\s*\(import\.meta\.hot\)\s*\{/, `if (typeof window !== "undefined") {
31934
32036
  ` + ` if (!window.__SVELTE_HMR_ACCEPT__) window.__SVELTE_HMR_ACCEPT__ = {};
31935
32037
  ` + ` var __hmr_accept = function(cb) { window.__SVELTE_HMR_ACCEPT__[${JSON.stringify(moduleUrl)}] = cb; };`);
@@ -32029,8 +32131,8 @@ ${code}`;
32029
32131
  code = injectVueHmr(code, filePath, projectRoot, vueDir);
32030
32132
  return rewriteImports(code, filePath, projectRoot, rewriter);
32031
32133
  }, injectVueHmr = (code, filePath, projectRoot, vueDir) => {
32032
- const hmrBase = vueDir ? resolve51(vueDir) : projectRoot;
32033
- const hmrId = relative23(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
32134
+ const hmrBase = vueDir ? resolve52(vueDir) : projectRoot;
32135
+ const hmrId = relative24(hmrBase, filePath).replace(/\\/g, "/").replace(/\.vue$/, "");
32034
32136
  let result = code.replace(/export\s+default\s+/, "var __hmr_comp__ = ");
32035
32137
  result += [
32036
32138
  "",
@@ -32190,8 +32292,8 @@ export default {};
32190
32292
  const escaped = virtualCss.replace(/\\/g, "\\\\").replace(/`/g, "\\`").replace(/\$/g, "\\$");
32191
32293
  return jsResponse(`var s=document.createElement('style');s.textContent=\`${escaped}\`;s.dataset.svelteHmr=${JSON.stringify(cssCheckPath)};var p=document.querySelector('style[data-svelte-hmr="${cssCheckPath}"]');if(p)p.remove();document.head.appendChild(s);`);
32192
32294
  }, resolveSourcePath2 = (relPath, projectRoot) => {
32193
- const filePath = resolve51(projectRoot, relPath);
32194
- const ext = extname15(filePath);
32295
+ const filePath = resolve52(projectRoot, relPath);
32296
+ const ext = extname16(filePath);
32195
32297
  if (ext === ".svelte")
32196
32298
  return { ext, filePath: resolveSvelteModulePath(filePath) };
32197
32299
  if (ext)
@@ -32227,14 +32329,14 @@ export default {};
32227
32329
  const absoluteCandidate = `/${tail.replace(/^\/+/, "")}`;
32228
32330
  const candidates = [
32229
32331
  absoluteCandidate,
32230
- resolve51(projectRoot, tail)
32332
+ resolve52(projectRoot, tail)
32231
32333
  ];
32232
32334
  try {
32233
32335
  await Promise.resolve().then(() => init_loadConfig());
32234
32336
  const cfg = await loadConfig();
32235
- const angularDir = cfg.angularDirectory && resolve51(projectRoot, cfg.angularDirectory);
32337
+ const angularDir = cfg.angularDirectory && resolve52(projectRoot, cfg.angularDirectory);
32236
32338
  if (angularDir)
32237
- candidates.push(resolve51(angularDir, tail));
32339
+ candidates.push(resolve52(angularDir, tail));
32238
32340
  } catch {}
32239
32341
  for (const candidate of candidates) {
32240
32342
  if (await fileExists(candidate)) {
@@ -32265,7 +32367,7 @@ export default {};
32265
32367
  if (!TRANSPILABLE.has(ext))
32266
32368
  return;
32267
32369
  const stat = statSync9(filePath);
32268
- const resolvedVueDir = vueDir ? resolve51(vueDir) : undefined;
32370
+ const resolvedVueDir = vueDir ? resolve52(vueDir) : undefined;
32269
32371
  let content = REACT_EXTENSIONS.has(ext) ? transformReactFile(filePath, projectRoot, rewriter) : transformPlainFile(filePath, projectRoot, rewriter, resolvedVueDir);
32270
32372
  const isAngularGeneratedJs = ext === ".js" && filePath.replace(/\\/g, "/").includes("/.absolutejs/generated/angular/");
32271
32373
  if (isAngularGeneratedJs) {
@@ -32321,7 +32423,7 @@ export default {};
32321
32423
  const ownMessage = source && typeof source === "object" ? Reflect.get(source, "message") : undefined;
32322
32424
  const message = typeof ownMessage === "string" ? ownMessage : String(source);
32323
32425
  return { message, ...readPosition(first) };
32324
- }, getTransformError = (filePath) => transformErrors.get(resolve51(filePath)), transformErrorResponse = (err) => {
32426
+ }, getTransformError = (filePath) => transformErrors.get(resolve52(filePath)), transformErrorResponse = (err) => {
32325
32427
  const errMsg = err instanceof Error ? err.message : String(err);
32326
32428
  return new Response(`console.error('[ModuleServer] Transform error:', ${JSON.stringify(errMsg)});`, {
32327
32429
  headers: { "Content-Type": "application/javascript" },
@@ -32344,16 +32446,16 @@ export default {};
32344
32446
  const relPath = pathname.slice(SRC_PREFIX.length);
32345
32447
  if (relPath === "bun:wrap" || relPath.startsWith("bun:wrap?"))
32346
32448
  return handleBunWrapRequest();
32347
- const virtualCssResponse = handleVirtualSvelteCss(resolve51(projectRoot, relPath));
32449
+ const virtualCssResponse = handleVirtualSvelteCss(resolve52(projectRoot, relPath));
32348
32450
  if (virtualCssResponse)
32349
32451
  return virtualCssResponse;
32350
32452
  const { filePath, ext } = resolveSourcePath2(relPath, projectRoot);
32351
32453
  try {
32352
32454
  const response = await transformAndCache(filePath, ext, projectRoot, rewriter, frameworkDirs?.vue, stylePreprocessors);
32353
- transformErrors.delete(resolve51(filePath));
32455
+ transformErrors.delete(resolve52(filePath));
32354
32456
  return response;
32355
32457
  } catch (err) {
32356
- transformErrors.set(resolve51(filePath), describeTransformError(err));
32458
+ transformErrors.set(resolve52(filePath), describeTransformError(err));
32357
32459
  return transformErrorResponse(err);
32358
32460
  }
32359
32461
  };
@@ -32363,11 +32465,11 @@ export default {};
32363
32465
  SRC_IMPORT_RE.lastIndex = 0;
32364
32466
  while ((match = SRC_IMPORT_RE.exec(content)) !== null) {
32365
32467
  if (match[1])
32366
- files.push(resolve51(projectRoot, match[1]));
32468
+ files.push(resolve52(projectRoot, match[1]));
32367
32469
  }
32368
32470
  return files;
32369
32471
  }, SRC_URL_PREFIX2, invalidateModule = (filePath) => {
32370
- const resolved = resolve51(filePath);
32472
+ const resolved = resolve52(filePath);
32371
32473
  transformErrors.delete(resolved);
32372
32474
  invalidate(filePath);
32373
32475
  if (resolved !== filePath)
@@ -32433,7 +32535,7 @@ export default {};
32433
32535
  return false;
32434
32536
  }
32435
32537
  await Promise.resolve().then(() => init_prepare());
32436
- patchManifestIndexes(cached.manifest, resolve51(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
32538
+ patchManifestIndexes(cached.manifest, resolve52(state.resolvedPaths.buildDir, "_src_indexes"), SRC_PREFIX);
32437
32539
  logPageBuild(entry.source, entry.framework, Math.round(durationMs));
32438
32540
  logStartupTimingBlock("AbsoluteJS on-demand page build", [
32439
32541
  { durationMs, label: entry.name }
@@ -32692,11 +32794,11 @@ var exports_simpleHTMLHMR = {};
32692
32794
  __export(exports_simpleHTMLHMR, {
32693
32795
  handleHTMLUpdate: () => handleHTMLUpdate
32694
32796
  });
32695
- import { resolve as resolve52 } from "path";
32797
+ import { resolve as resolve53 } from "path";
32696
32798
  var handleHTMLUpdate = async (htmlFilePath) => {
32697
32799
  let htmlContent;
32698
32800
  try {
32699
- const resolvedPath = resolve52(htmlFilePath);
32801
+ const resolvedPath = resolve53(htmlFilePath);
32700
32802
  const file = Bun.file(resolvedPath);
32701
32803
  if (!await file.exists()) {
32702
32804
  return null;
@@ -32722,11 +32824,11 @@ var exports_simpleHTMXHMR = {};
32722
32824
  __export(exports_simpleHTMXHMR, {
32723
32825
  handleHTMXUpdate: () => handleHTMXUpdate
32724
32826
  });
32725
- import { resolve as resolve53 } from "path";
32827
+ import { resolve as resolve54 } from "path";
32726
32828
  var handleHTMXUpdate = async (htmxFilePath) => {
32727
32829
  let htmlContent;
32728
32830
  try {
32729
- const resolvedPath = resolve53(htmxFilePath);
32831
+ const resolvedPath = resolve54(htmxFilePath);
32730
32832
  const file = Bun.file(resolvedPath);
32731
32833
  if (!await file.exists()) {
32732
32834
  return null;
@@ -32749,9 +32851,9 @@ var init_simpleHTMXHMR = () => {};
32749
32851
 
32750
32852
  // src/dev/backendGraph.ts
32751
32853
  import { readFileSync as readFileSync41, realpathSync as realpathSync5, statSync as statSync10 } from "fs";
32752
- import { dirname as dirname36, extname as extname16, resolve as resolve54 } from "path";
32854
+ import { dirname as dirname36, extname as extname17, resolve as resolve55 } from "path";
32753
32855
  var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (path) => {
32754
- const loader = LOADERS[extname16(path)] ?? "ts";
32856
+ const loader = LOADERS[extname17(path)] ?? "ts";
32755
32857
  const existing = transpilers.get(loader);
32756
32858
  if (existing)
32757
32859
  return existing;
@@ -32764,7 +32866,7 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
32764
32866
  } catch {
32765
32867
  return path;
32766
32868
  }
32767
- }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve54(path).startsWith(resolve54(root)), resolveImport = (specifier, fromFile) => {
32869
+ }, isProjectModule = (path, root = process.cwd()) => SOURCE_FILE.test(path) && !VENDORED.test(path) && resolve55(path).startsWith(resolve55(root)), resolveImport = (specifier, fromFile) => {
32768
32870
  try {
32769
32871
  return realPath2(Bun.resolveSync(specifier, dirname36(fromFile)));
32770
32872
  } catch {
@@ -32789,14 +32891,14 @@ var SOURCE_FILE, VENDORED, LOADERS, fileCache, transpilers, transpilerFor = (pat
32789
32891
  fileCache.set(path, { imports, mtimeMs });
32790
32892
  return imports;
32791
32893
  }, importersOf = (target, entry, loaded = loadedProjectModules(entry)) => {
32792
- const goal = realPath2(resolve54(target));
32894
+ const goal = realPath2(resolve55(target));
32793
32895
  const importers = [];
32794
32896
  for (const file of loaded)
32795
32897
  if (readImports(file).includes(goal))
32796
32898
  importers.push(file);
32797
32899
  return importers;
32798
32900
  }, loadedProjectModules = (entry, loaded = Object.keys(__require.cache), root = process.cwd()) => {
32799
- const entryPath = realPath2(resolve54(entry));
32901
+ const entryPath = realPath2(resolve55(entry));
32800
32902
  const modules = new Set([entryPath]);
32801
32903
  for (const path of loaded) {
32802
32904
  if (isAbsoluteServerEntryCopyPath(path))
@@ -32825,9 +32927,9 @@ var init_backendGraph = __esm(() => {
32825
32927
  });
32826
32928
 
32827
32929
  // src/dev/hot/analyze.ts
32828
- import { dirname as dirname37, extname as extname17 } from "path";
32930
+ import { dirname as dirname37, extname as extname18 } from "path";
32829
32931
  var ANALYZER_VERSION = 1, hashText = (text) => Bun.hash(text).toString(36), scriptKindFor = (tsc, path) => {
32830
- switch (extname17(path)) {
32932
+ switch (extname18(path)) {
32831
32933
  case ".tsx":
32832
32934
  return tsc.ScriptKind.TSX;
32833
32935
  case ".jsx":
@@ -33582,7 +33684,7 @@ var init_runtime = __esm(() => {
33582
33684
 
33583
33685
  // src/dev/hot/plugin.ts
33584
33686
  import { mkdirSync as mkdirSync16, readFileSync as readFileSync42, realpathSync as realpathSync6, writeFileSync as writeFileSync11 } from "fs";
33585
- import { extname as extname18, join as join61, relative as relative24, resolve as resolve55, sep as sep6 } from "path";
33687
+ import { extname as extname19, join as join62, relative as relative25, resolve as resolve56, sep as sep7 } from "path";
33586
33688
  var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33587
33689
  try {
33588
33690
  return realpathSync6(path);
@@ -33599,11 +33701,11 @@ var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33599
33701
  const file = realPath3(path);
33600
33702
  if (!SOURCE.test(file))
33601
33703
  return false;
33602
- if (!file.startsWith(`${state.root}${sep6}`))
33704
+ if (!file.startsWith(`${state.root}${sep7}`))
33603
33705
  return false;
33604
- if (file.startsWith(`${ABSOLUTE_ROOT}${sep6}src${sep6}`))
33706
+ if (file.startsWith(`${ABSOLUTE_ROOT}${sep7}src${sep7}`))
33605
33707
  return false;
33606
- if (file.startsWith(`${ABSOLUTE_ROOT}${sep6}dist${sep6}`))
33708
+ if (file.startsWith(`${ABSOLUTE_ROOT}${sep7}dist${sep7}`))
33607
33709
  return false;
33608
33710
  if (GENERATED.test(file.slice(state.root.length)))
33609
33711
  return false;
@@ -33613,7 +33715,7 @@ var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33613
33715
  return false;
33614
33716
  if (isAbsoluteServerEntryCopyPath(file))
33615
33717
  return false;
33616
- return !state.excludedDirs.some((dir) => file === dir || file.startsWith(`${dir}${sep6}`));
33718
+ return !state.excludedDirs.some((dir) => file === dir || file.startsWith(`${dir}${sep7}`));
33617
33719
  }, isAnalysis = (value) => {
33618
33720
  if (typeof value !== "object" || value === null)
33619
33721
  return false;
@@ -33621,7 +33723,7 @@ var SOURCE, TEST_FILE, GENERATED, ABSOLUTE_ROOT, realPath3 = (path) => {
33621
33723
  if (status === false)
33622
33724
  return typeof Reflect.get(value, "reason") === "string";
33623
33725
  return status === true && typeof Reflect.get(value, "code") === "string" && typeof Reflect.get(value, "exports") === "object" && Array.isArray(Reflect.get(value, "reexports")) && Array.isArray(Reflect.get(value, "plan"));
33624
- }, cachePath = (cacheDir, key) => join61(cacheDir, `${key}.json`), readCached = (key) => {
33726
+ }, cachePath = (cacheDir, key) => join62(cacheDir, `${key}.json`), readCached = (key) => {
33625
33727
  const state = shared.installed;
33626
33728
  if (!state)
33627
33729
  return;
@@ -33660,7 +33762,7 @@ var init_plugin = __esm(() => {
33660
33762
  SOURCE = /\.(?:[cm]?[jt]sx?)$/;
33661
33763
  TEST_FILE = /(?:\.(?:spec|test)\.[cm]?[jt]sx?$)|(?:[\\/]__tests__[\\/])/;
33662
33764
  GENERATED = /(?:^|[\\/])(?:build|generated|compiled|indexes|\.absolutejs|node_modules|dist)(?:[\\/]|$)/;
33663
- ABSOLUTE_ROOT = resolve55(import.meta.dir, "..", "..", "..");
33765
+ ABSOLUTE_ROOT = resolve56(import.meta.dir, "..", "..", "..");
33664
33766
  shared = globalThis.__absoluteHotPlugin ??= {
33665
33767
  analyses: new Map,
33666
33768
  installed: undefined
@@ -33670,7 +33772,7 @@ var init_plugin = __esm(() => {
33670
33772
 
33671
33773
  // src/dev/hot/reload.ts
33672
33774
  import { readFileSync as readFileSync43, realpathSync as realpathSync7 } from "fs";
33673
- import { relative as relative25 } from "path";
33775
+ import { relative as relative26 } from "path";
33674
33776
  var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
33675
33777
  try {
33676
33778
  return realpathSync7(path);
@@ -33708,7 +33810,7 @@ var MAX_PROPAGATION_STEPS = 500, realPath4 = (path) => {
33708
33810
  if (typeof namespace !== "object" || namespace === null)
33709
33811
  throw new Error(`${path} did not evaluate to a module`);
33710
33812
  return Object.fromEntries(Object.entries(namespace));
33711
- }, display = (path) => relative25(process.cwd(), path) || path, SLOW_UPDATE_MS = 500, SLOWEST_SHOWN = 3, statementLabel = (id) => {
33813
+ }, display = (path) => relative26(process.cwd(), path) || path, SLOW_UPDATE_MS = 500, SLOWEST_SHOWN = 3, statementLabel = (id) => {
33712
33814
  const name = id.slice(id.indexOf(":") + 1);
33713
33815
  return /^\d+$/.test(name) ? `statement #${name}` : name;
33714
33816
  }, slowestStatements = (modules) => modules.flatMap((module) => [...moduleRecord(module)?.lastTimings ?? []].map(([id, duration]) => ({
@@ -33841,10 +33943,10 @@ import {
33841
33943
  basename as basename21,
33842
33944
  dirname as dirname38,
33843
33945
  isAbsolute as isAbsolute10,
33844
- join as join62,
33845
- relative as relative26,
33946
+ join as join63,
33947
+ relative as relative27,
33846
33948
  resolve as resolvePath4,
33847
- sep as sep7
33949
+ sep as sep8
33848
33950
  } from "path";
33849
33951
  var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSsrCssCaches = () => {
33850
33952
  clearSpaRouteCssCaches();
@@ -33968,8 +34070,8 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
33968
34070
  const relJs = `${rel.slice(0, -ext[0].length)}.js`;
33969
34071
  const generatedDir = getFrameworkGeneratedDir(framework, cwd);
33970
34072
  for (const candidate of [
33971
- join62(generatedDir, relJs),
33972
- `${join62(generatedDir, relJs)}.map`
34073
+ join63(generatedDir, relJs),
34074
+ `${join63(generatedDir, relJs)}.map`
33973
34075
  ]) {
33974
34076
  try {
33975
34077
  rmSync4(candidate, { force: true });
@@ -34214,7 +34316,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34214
34316
  const webPath = urlPrefix ? `/${urlPrefix}/${relFromDir}` : `/${relFromDir}`;
34215
34317
  state.assetStore.set(webPath, new Uint8Array(bytes));
34216
34318
  state.fileHashes.set(absSource, currentHash);
34217
- logHmrUpdate(relative26(process.cwd(), filePath));
34319
+ logHmrUpdate(relative27(process.cwd(), filePath));
34218
34320
  broadcastToClients(state, {
34219
34321
  data: {
34220
34322
  framework: urlPrefix || "public",
@@ -34236,7 +34338,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34236
34338
  applyBackendEdit(resolvePath4(filePath)).catch((error) => console.error("[hmr] server update for a React file failed:", error));
34237
34339
  if (framework === "unknown") {
34238
34340
  invalidate(resolvePath4(filePath));
34239
- const relPath = relative26(process.cwd(), filePath);
34341
+ const relPath = relative27(process.cwd(), filePath);
34240
34342
  logHmrUpdate(relPath);
34241
34343
  let hasFrontendDependent = false;
34242
34344
  let hasAngularDependent = false;
@@ -34797,7 +34899,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34797
34899
  const angularDirAbs = resolvePath4(angularDir);
34798
34900
  const filesUnderAngular = Array.from(editedFiles).filter((file) => {
34799
34901
  const abs = resolvePath4(file);
34800
- return abs === angularDirAbs || abs.startsWith(angularDirAbs + sep7);
34902
+ return abs === angularDirAbs || abs.startsWith(angularDirAbs + sep8);
34801
34903
  });
34802
34904
  if (filesUnderAngular.length === 0)
34803
34905
  return;
@@ -34840,7 +34942,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34840
34942
  try {
34841
34943
  await Promise.resolve().then(() => init_moduleServer());
34842
34944
  for (const tsFile of tsFilesToRefresh) {
34843
- const rel = relative26(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
34945
+ const rel = relative27(angularDirAbs, tsFile).replace(/\\/g, "/").replace(/\.[tj]sx?$/, ".js");
34844
34946
  const compiledFile = resolvePath4(compiledRoot, rel);
34845
34947
  invalidateModule(compiledFile);
34846
34948
  }
@@ -34893,7 +34995,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34893
34995
  const entries = await readdir(dir, { withFileTypes: true });
34894
34996
  const files = [];
34895
34997
  for (const entry of entries) {
34896
- const full = join62(dir, entry.name);
34998
+ const full = join63(dir, entry.name);
34897
34999
  if (entry.isDirectory()) {
34898
35000
  files.push(...await walk(full));
34899
35001
  } else if (entry.isFile() && entry.name.endsWith(".ts") && !entry.name.endsWith(".d.ts")) {
@@ -34995,7 +35097,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
34995
35097
  }, getModuleUrl = async (pageFile) => {
34996
35098
  await Promise.resolve().then(() => init_moduleServer());
34997
35099
  invalidateModule(pageFile);
34998
- const rel = relative26(process.cwd(), pageFile).replace(/\\/g, "/");
35100
+ const rel = relative27(process.cwd(), pageFile).replace(/\\/g, "/");
34999
35101
  const url = `${SRC_URL_PREFIX2}${rel}`;
35000
35102
  await warmCache(url);
35001
35103
  return url;
@@ -35086,7 +35188,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35086
35188
  const primaryFile = reactFiles.find((file) => isImportableModule(file) && !isReactPagePath(file)) ?? primaryTarget;
35087
35189
  if (pageModuleUrl) {
35088
35190
  const serverDuration = Date.now() - startTime;
35089
- state.lastHmrPath = relative26(process.cwd(), primaryFile).replace(/\\/g, "/");
35191
+ state.lastHmrPath = relative27(process.cwd(), primaryFile).replace(/\\/g, "/");
35090
35192
  state.lastHmrFramework = "react";
35091
35193
  broadcastToClients(state, {
35092
35194
  data: {
@@ -35528,7 +35630,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35528
35630
  } = await compileVue(vueFiles, vueDir, true, getStyleTransformConfig(state.config));
35529
35631
  const serverEntries = [...vueServerPaths];
35530
35632
  const clientEntries = [...vueIndexPaths, ...vueClientPaths];
35531
- const cssOutDir = join62(buildDir, state.resolvedPaths.assetsDir ? basename21(state.resolvedPaths.assetsDir) : "assets", "css");
35633
+ const cssOutDir = join63(buildDir, state.resolvedPaths.assetsDir ? basename21(state.resolvedPaths.assetsDir) : "assets", "css");
35532
35634
  const { serverRoot, serverOutDir } = await computeServerOutPaths(state.resolvedPaths, "vue");
35533
35635
  const serverExternals = await getServerBundleExternals();
35534
35636
  const serverExternalsPlugins = await getServerBundleExternalsPlugins(state.config);
@@ -35712,7 +35814,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35712
35814
  const duration = Date.now() - startTime;
35713
35815
  const [primary] = emberFiles;
35714
35816
  if (primary) {
35715
- state.lastHmrPath = relative26(process.cwd(), primary).replace(/\\/g, "/");
35817
+ state.lastHmrPath = relative27(process.cwd(), primary).replace(/\\/g, "/");
35716
35818
  state.lastHmrFramework = "ember";
35717
35819
  logHmrUpdate(primary, "ember", duration);
35718
35820
  }
@@ -35978,7 +36080,7 @@ var moduleServerPromise, getModuleServer = () => moduleServerPromise, clearDevSs
35978
36080
  const baseName = fileName.replace(/\.vue$/, "");
35979
36081
  const pascalName = toPascal(baseName);
35980
36082
  const vueRoot = config.vueDirectory;
35981
- const hmrId = vueRoot ? relative26(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
36083
+ const hmrId = vueRoot ? relative27(vueRoot, vuePagePath).replace(/\\/g, "/").replace(/\.vue$/, "") : baseName;
35982
36084
  const cssKey = `${pascalName}CSS`;
35983
36085
  const cssUrl = manifest[cssKey] || null;
35984
36086
  await Promise.resolve().then(() => init_compileVue());
@@ -36641,7 +36743,7 @@ var init_rebuildTrigger = __esm(() => {
36641
36743
  // src/build/buildDepVendor.ts
36642
36744
  import { mkdirSync as mkdirSync17 } from "fs";
36643
36745
  import { isBuiltin as isBuiltin2 } from "module";
36644
- import { join as join63 } from "path";
36746
+ import { join as join64 } from "path";
36645
36747
  import { rm as rm15 } from "fs/promises";
36646
36748
  var {build: bunBuild9, Glob: Glob10 } = globalThis.Bun;
36647
36749
  var toSafeFileName6 = (specifier) => {
@@ -36799,7 +36901,7 @@ var toSafeFileName6 = (specifier) => {
36799
36901
  }), buildDepVendorPass = async (specifiers, vendorDir, tmpDir) => {
36800
36902
  const entries = await Promise.all(specifiers.map(async (specifier) => {
36801
36903
  const safeName = toSafeFileName6(specifier);
36802
- const entryPath = join63(tmpDir, `${safeName}.ts`);
36904
+ const entryPath = join64(tmpDir, `${safeName}.ts`);
36803
36905
  await Bun.write(entryPath, await generateVendorEntrySource(specifier));
36804
36906
  return { entryPath, specifier };
36805
36907
  }));
@@ -36890,9 +36992,9 @@ var toSafeFileName6 = (specifier) => {
36890
36992
  const { dep: initialSpecs, framework: frameworkRoots } = await scanBareImports(directories, files);
36891
36993
  if (initialSpecs.length === 0 && frameworkRoots.length === 0)
36892
36994
  return {};
36893
- const vendorDir = join63(buildDir, "vendor");
36995
+ const vendorDir = join64(buildDir, "vendor");
36894
36996
  mkdirSync17(vendorDir, { recursive: true });
36895
- const tmpDir = join63(buildDir, "_dep_vendor_tmp");
36997
+ const tmpDir = join64(buildDir, "_dep_vendor_tmp");
36896
36998
  mkdirSync17(tmpDir, { recursive: true });
36897
36999
  const allSpecs = new Set(initialSpecs);
36898
37000
  const alreadyScanned = new Set;
@@ -36983,8 +37085,8 @@ import {
36983
37085
  readdirSync as readdirSync14,
36984
37086
  readFileSync as readFileSync44
36985
37087
  } from "fs";
36986
- import { mkdir as mkdir16, readFile as readFile11, rename as rename7, rm as rm16, writeFile as writeFile13 } from "fs/promises";
36987
- import { basename as basename22, join as join64, resolve as resolve56 } from "path";
37088
+ import { mkdir as mkdir16, readFile as readFile12, rename as rename7, rm as rm16, writeFile as writeFile14 } from "fs/promises";
37089
+ import { basename as basename22, join as join65, resolve as resolve57 } from "path";
36988
37090
  var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeVendorCacheKey = (inputs) => {
36989
37091
  const hash = createHash11("sha256");
36990
37092
  hash.update(String(CACHE_FORMAT_VERSION3));
@@ -37004,14 +37106,14 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37004
37106
  }
37005
37107
  for (const dir of inputs.vendorDirs) {
37006
37108
  hash.update("\x00v");
37007
- hash.update(basename22(resolve56(dir, "..")));
37109
+ hash.update(basename22(resolve57(dir, "..")));
37008
37110
  }
37009
37111
  return hash.digest("hex").slice(0, KEY_LENGTH);
37010
37112
  }, readLockfileHash = (projectRoot = process.cwd()) => {
37011
37113
  const hash = createHash11("sha256");
37012
37114
  let found = false;
37013
37115
  for (const name of LOCKFILES) {
37014
- const path = join64(projectRoot, name);
37116
+ const path = join65(projectRoot, name);
37015
37117
  if (!existsSync47(path))
37016
37118
  continue;
37017
37119
  found = true;
@@ -37022,8 +37124,8 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37022
37124
  }, vendorCacheEnabled = () => process.env.ABSOLUTE_DEV_VENDOR_CACHE !== "0", copyTree = (fromDir, toDir) => {
37023
37125
  mkdirSync18(toDir, { recursive: true });
37024
37126
  for (const entry of readdirSync14(fromDir, { withFileTypes: true })) {
37025
- const source = join64(fromDir, entry.name);
37026
- const destination = join64(toDir, entry.name);
37127
+ const source = join65(fromDir, entry.name);
37128
+ const destination = join65(toDir, entry.name);
37027
37129
  if (entry.isDirectory())
37028
37130
  copyTree(source, destination);
37029
37131
  else
@@ -37031,7 +37133,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37031
37133
  }
37032
37134
  }, copySlotsInto = (cacheDir, vendorDirs) => {
37033
37135
  for (const [index, dir] of vendorDirs.entries()) {
37034
- const source = join64(cacheDir, slotName(index, dir));
37136
+ const source = join65(cacheDir, slotName(index, dir));
37035
37137
  if (!existsSync47(source)) {
37036
37138
  throw new Error(`missing cached vendor dir ${source}`);
37037
37139
  }
@@ -37041,15 +37143,15 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37041
37143
  for (const [index, dir] of vendorDirs.entries()) {
37042
37144
  if (!existsSync47(dir))
37043
37145
  continue;
37044
- copyTree(dir, join64(stagingDir, slotName(index, dir)));
37146
+ copyTree(dir, join65(stagingDir, slotName(index, dir)));
37045
37147
  }
37046
- }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve56(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve56(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
37148
+ }, isVendorCachePayload = (value) => typeof value === "object" && value !== null && typeof Reflect.get(value, "depPaths") === "object", cacheDirFor = (key, projectRoot) => resolve57(projectRoot, CACHE_ROOT2, key), slotName = (index, dir) => `${index}-${basename22(resolve57(dir, ".."))}`, restoreVendorCache = async (key, vendorDirs, projectRoot = process.cwd()) => {
37047
37149
  const cacheDir = cacheDirFor(key, projectRoot);
37048
- const payloadPath = join64(cacheDir, "payload.json");
37150
+ const payloadPath = join65(cacheDir, "payload.json");
37049
37151
  if (!existsSync47(payloadPath))
37050
37152
  return null;
37051
37153
  try {
37052
- const payload = JSON.parse(await readFile11(payloadPath, "utf8"));
37154
+ const payload = JSON.parse(await readFile12(payloadPath, "utf8"));
37053
37155
  if (!isVendorCachePayload(payload))
37054
37156
  return null;
37055
37157
  copySlotsInto(cacheDir, vendorDirs);
@@ -37059,14 +37161,14 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37059
37161
  }
37060
37162
  }, saveVendorCache = async (key, vendorDirs, payload, projectRoot = process.cwd()) => {
37061
37163
  const cacheDir = cacheDirFor(key, projectRoot);
37062
- if (existsSync47(join64(cacheDir, "payload.json")))
37164
+ if (existsSync47(join65(cacheDir, "payload.json")))
37063
37165
  return;
37064
37166
  const stagingDir = `${cacheDir}.${process.pid}.tmp`;
37065
37167
  try {
37066
37168
  await rm16(stagingDir, { force: true, recursive: true });
37067
37169
  await mkdir16(stagingDir, { recursive: true });
37068
37170
  copySlotsFrom(stagingDir, vendorDirs);
37069
- await writeFile13(join64(stagingDir, "payload.json"), JSON.stringify(payload));
37171
+ await writeFile14(join65(stagingDir, "payload.json"), JSON.stringify(payload));
37070
37172
  await rm16(cacheDir, { force: true, recursive: true });
37071
37173
  await rename7(stagingDir, cacheDir);
37072
37174
  } catch {
@@ -37076,7 +37178,7 @@ var CACHE_ROOT2, CACHE_FORMAT_VERSION3 = 1, KEY_LENGTH = 32, LOCKFILES, computeV
37076
37178
  }
37077
37179
  };
37078
37180
  var init_vendorCache = __esm(() => {
37079
- CACHE_ROOT2 = join64(".absolutejs", "vendor-cache");
37181
+ CACHE_ROOT2 = join65(".absolutejs", "vendor-cache");
37080
37182
  LOCKFILES = [
37081
37183
  "bun.lock",
37082
37184
  "bun.lockb",
@@ -37087,10 +37189,10 @@ var init_vendorCache = __esm(() => {
37087
37189
  });
37088
37190
 
37089
37191
  // src/core/devBuild.ts
37090
- import { readdir as readdir6 } from "fs/promises";
37192
+ import { readdir as readdir7 } from "fs/promises";
37091
37193
  import { existsSync as existsSync48, statSync as statSync12 } from "fs";
37092
- import { resolve as resolve57 } from "path";
37093
- var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.dir, "../dev/client"), collectDepVendorSourceDirs = (config) => {
37194
+ import { resolve as resolve58 } from "path";
37195
+ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve58(import.meta.dir, "../dev/client"), collectDepVendorSourceDirs = (config) => {
37094
37196
  const configuredDirs = [
37095
37197
  ...collectConfigVendorSourceDirs(config),
37096
37198
  devClientVendorSourceDir()
@@ -37113,7 +37215,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.d
37113
37215
  return Object.keys(config).length > 0 ? config : null;
37114
37216
  }, reloadConfig = async () => {
37115
37217
  try {
37116
- const configPath = resolve57(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
37218
+ const configPath = resolve58(process.env.ABSOLUTE_CONFIG ?? "absolute.config.ts");
37117
37219
  const source = await Bun.file(configPath).text();
37118
37220
  return parseDirectoryConfig(source);
37119
37221
  } catch {
@@ -37228,7 +37330,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.d
37228
37330
  });
37229
37331
  }
37230
37332
  }, handleCachedReload = async () => {
37231
- const serverMtime = statSync12(resolve57(Bun.main)).mtimeMs;
37333
+ const serverMtime = statSync12(resolve58(Bun.main)).mtimeMs;
37232
37334
  const lastMtime = globalThis.__hmrServerMtime;
37233
37335
  globalThis.__hmrServerMtime = serverMtime;
37234
37336
  const cached = globalThis.__hmrDevResult;
@@ -37269,8 +37371,8 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.d
37269
37371
  return true;
37270
37372
  }, resolveAbsoluteVersion2 = async () => {
37271
37373
  const candidates = [
37272
- resolve57(import.meta.dir, "..", "..", "package.json"),
37273
- resolve57(import.meta.dir, "..", "package.json")
37374
+ resolve58(import.meta.dir, "..", "..", "package.json"),
37375
+ resolve58(import.meta.dir, "..", "package.json")
37274
37376
  ];
37275
37377
  const [candidate, ...remaining] = candidates;
37276
37378
  if (!candidate) {
@@ -37293,10 +37395,10 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.d
37293
37395
  await resolveAbsoluteVersionFromCandidates(remaining);
37294
37396
  }, loadVendorFiles = async (assetStore, vendorDir, framework) => {
37295
37397
  const emptyStringArray = [];
37296
- const entries = await readdir6(vendorDir).catch(() => emptyStringArray);
37398
+ const entries = await readdir7(vendorDir).catch(() => emptyStringArray);
37297
37399
  await Promise.all(entries.filter((entry) => entry.endsWith(".js")).map(async (entry) => {
37298
37400
  const webPath = `/${framework}/vendor/${entry}`;
37299
- const bytes = await Bun.file(resolve57(vendorDir, entry)).bytes();
37401
+ const bytes = await Bun.file(resolve58(vendorDir, entry)).bytes();
37300
37402
  assetStore.set(webPath, bytes);
37301
37403
  }));
37302
37404
  }, devBuild = async (config) => {
@@ -37482,11 +37584,11 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.d
37482
37584
  }
37483
37585
  stepStartedAt = performance.now();
37484
37586
  setBootPhase("build vendor bundles");
37485
- const reactVendorDir = resolve57(state.resolvedPaths.buildDir, "react", "vendor");
37486
- const angularVendorDir = resolve57(state.resolvedPaths.buildDir, "angular", "vendor");
37487
- const svelteVendorDir = resolve57(state.resolvedPaths.buildDir, "svelte", "vendor");
37488
- const vueVendorDir = resolve57(state.resolvedPaths.buildDir, "vue", "vendor");
37489
- const depVendorDir = resolve57(state.resolvedPaths.buildDir, "vendor");
37587
+ const reactVendorDir = resolve58(state.resolvedPaths.buildDir, "react", "vendor");
37588
+ const angularVendorDir = resolve58(state.resolvedPaths.buildDir, "angular", "vendor");
37589
+ const svelteVendorDir = resolve58(state.resolvedPaths.buildDir, "svelte", "vendor");
37590
+ const vueVendorDir = resolve58(state.resolvedPaths.buildDir, "vue", "vendor");
37591
+ const depVendorDir = resolve58(state.resolvedPaths.buildDir, "vendor");
37490
37592
  await Promise.resolve().then(() => init_buildDepVendor());
37491
37593
  const activeVendorDirs = [
37492
37594
  config.reactDirectory ? reactVendorDir : null,
@@ -37603,7 +37705,7 @@ var FRAMEWORK_DIR_KEYS, devClientVendorSourceDir = () => resolve57(import.meta.d
37603
37705
  manifest
37604
37706
  };
37605
37707
  globalThis.__hmrDevResult = result;
37606
- globalThis.__hmrServerMtime = statSync12(resolve57(Bun.main)).mtimeMs;
37708
+ globalThis.__hmrServerMtime = statSync12(resolve58(Bun.main)).mtimeMs;
37607
37709
  return result;
37608
37710
  };
37609
37711
  var init_devBuild = __esm(() => {
@@ -37644,5 +37746,5 @@ export {
37644
37746
  devBuild
37645
37747
  };
37646
37748
 
37647
- //# debugId=FA2E655602E07F4664756E2164756E21
37749
+ //# debugId=89225562C225BB0F64756E2164756E21
37648
37750
  //# sourceMappingURL=build.js.map