@qwik.dev/core 2.0.0-beta.1 → 2.0.0-beta.3

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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @license
3
- * @qwik.dev/core/optimizer 2.0.0-beta.1-dev+495e8d9
3
+ * @qwik.dev/core/optimizer 2.0.0-beta.3-dev+aa098fc
4
4
  * Copyright QwikDev. All Rights Reserved.
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
@@ -51,7 +51,7 @@ var require_utils = __commonJS({
51
51
  var decoder = new TextDecoder;
52
52
  var toUTF8String = (input, start = 0, end = input.length) => decoder.decode(input.slice(start, end));
53
53
  exports.toUTF8String = toUTF8String;
54
- var toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce(((memo, i) => memo + ("0" + i.toString(16)).slice(-2)), "");
54
+ var toHexString = (input, start = 0, end = input.length) => input.slice(start, end).reduce((memo, i) => memo + ("0" + i.toString(16)).slice(-2), "");
55
55
  exports.toHexString = toHexString;
56
56
  var readInt16LE = (input, offset = 0) => {
57
57
  const val = input[offset] + 256 * input[offset + 1];
@@ -1282,7 +1282,7 @@ var QWIK_BINDING_MAP = {
1282
1282
  };
1283
1283
 
1284
1284
  var versions = {
1285
- qwik: "2.0.0-beta.1-dev+495e8d9"
1285
+ qwik: "2.0.0-beta.3-dev+aa098fc"
1286
1286
  };
1287
1287
 
1288
1288
  async function getSystem() {
@@ -1338,11 +1338,11 @@ async function loadPlatformBinding(sys) {
1338
1338
  const wasmPath = sys.path.join(__dirname2, "..", "bindings", "qwik_wasm_bg.wasm");
1339
1339
  const mod = await sys.dynamicImport("../bindings/qwik.wasm.mjs");
1340
1340
  const fs = await sys.dynamicImport("node:fs");
1341
- return new Promise(((resolve, reject) => {
1342
- fs.readFile(wasmPath, ((err, buf) => {
1341
+ return new Promise((resolve, reject) => {
1342
+ fs.readFile(wasmPath, (err, buf) => {
1343
1343
  null != err ? reject(err) : resolve(buf);
1344
- }));
1345
- })).then((buf => WebAssembly.compile(buf))).then((wasm => mod.default(wasm))).then((() => mod));
1344
+ });
1345
+ }).then(buf => WebAssembly.compile(buf)).then(wasm => mod.default(wasm)).then(() => mod);
1346
1346
  }
1347
1347
  {
1348
1348
  const module = await sys.dynamicImport("../bindings/qwik.wasm.mjs");
@@ -1400,9 +1400,9 @@ var convertOptions = opts => {
1400
1400
  stripCtxName: void 0,
1401
1401
  isServer: void 0
1402
1402
  };
1403
- Object.entries(opts).forEach((([key, value]) => {
1403
+ Object.entries(opts).forEach(([key, value]) => {
1404
1404
  null != value && (output[key] = value);
1405
- }));
1405
+ });
1406
1406
  output.entryStrategy = opts.entryStrategy?.type ?? "smart";
1407
1407
  output.manualChunks = opts.entryStrategy?.manual ?? void 0;
1408
1408
  return output;
@@ -1421,7 +1421,7 @@ var extraSymbols = new Set([ "_run", "_task" ]);
1421
1421
 
1422
1422
  function prioritizeSymbolNames(manifest) {
1423
1423
  const symbols = manifest.symbols;
1424
- return Object.keys(symbols).sort(((symbolNameA, symbolNameB) => {
1424
+ return Object.keys(symbols).sort((symbolNameA, symbolNameB) => {
1425
1425
  const a = symbols[symbolNameA];
1426
1426
  const b = symbols[symbolNameB];
1427
1427
  if ("eventHandler" === a.ctxKind && "eventHandler" !== b.ctxKind) {
@@ -1480,12 +1480,12 @@ function prioritizeSymbolNames(manifest) {
1480
1480
  return 1;
1481
1481
  }
1482
1482
  return 0;
1483
- }));
1483
+ });
1484
1484
  }
1485
1485
 
1486
- var EVENT_PRIORITY = (() => [ "click", "dblclick", "contextmenu", "auxclick", "pointerdown", "pointerup", "pointermove", "pointerover", "pointerenter", "pointerleave", "pointerout", "pointercancel", "gotpointercapture", "lostpointercapture", "touchstart", "touchend", "touchmove", "touchcancel", "mousedown", "mouseup", "mousemove", "mouseenter", "mouseleave", "mouseover", "mouseout", "wheel", "gesturestart", "gesturechange", "gestureend", "keydown", "keyup", "keypress", "input", "change", "search", "invalid", "beforeinput", "select", "focusin", "focusout", "focus", "blur", "submit", "reset", "scroll" ].map((n => `on${n.toLowerCase()}$`)))();
1486
+ var EVENT_PRIORITY = (() => [ "click", "dblclick", "contextmenu", "auxclick", "pointerdown", "pointerup", "pointermove", "pointerover", "pointerenter", "pointerleave", "pointerout", "pointercancel", "gotpointercapture", "lostpointercapture", "touchstart", "touchend", "touchmove", "touchcancel", "mousedown", "mouseup", "mousemove", "mouseenter", "mouseleave", "mouseover", "mouseout", "wheel", "gesturestart", "gesturechange", "gestureend", "keydown", "keyup", "keypress", "input", "change", "search", "invalid", "beforeinput", "select", "focusin", "focusout", "focus", "blur", "submit", "reset", "scroll" ].map(n => `on${n.toLowerCase()}$`))();
1487
1487
 
1488
- var FUNCTION_PRIORITY = (() => [ "useTask$", "useVisibleTask$", "component$", "useStyles$", "useStylesScoped$" ].map((n => n.toLowerCase())))();
1488
+ var FUNCTION_PRIORITY = (() => [ "useTask$", "useVisibleTask$", "component$", "useStyles$", "useStylesScoped$" ].map(n => n.toLowerCase()))();
1489
1489
 
1490
1490
  function sortBundleNames(manifest) {
1491
1491
  return Object.keys(manifest.bundles).sort(sortAlphabetical);
@@ -1597,14 +1597,14 @@ function computeTotals(graph) {
1597
1597
  idx.has(v) || strongConnect(v);
1598
1598
  }
1599
1599
  const sccIndex = new Map;
1600
- sccList.forEach(((comp, i) => {
1600
+ sccList.forEach((comp, i) => {
1601
1601
  for (const v of comp) {
1602
1602
  sccIndex.set(v, i);
1603
1603
  }
1604
- }));
1604
+ });
1605
1605
  const sccDAG = Array.from({
1606
1606
  length: sccList.length
1607
- }, (() => new Set));
1607
+ }, () => new Set);
1608
1608
  for (const v of Object.keys(graph)) {
1609
1609
  const i = sccIndex.get(v);
1610
1610
  for (const w of graph[v].imports || []) {
@@ -1681,7 +1681,7 @@ function generateManifestFromBundles(path, segments, injections, outputBundles,
1681
1681
  return canonPath(bundle.fileName);
1682
1682
  };
1683
1683
  let qwikHandlersName;
1684
- const qrlNames = new Set(segments.map((h => h.name)));
1684
+ const qrlNames = new Set(segments.map(h => h.name));
1685
1685
  for (const outputBundle of Object.values(outputBundles)) {
1686
1686
  if ("asset" === outputBundle.type) {
1687
1687
  outputBundle.fileName.endsWith("js.map") || (manifest.assets[outputBundle.fileName] = {
@@ -1699,18 +1699,18 @@ function generateManifestFromBundles(path, segments, injections, outputBundles,
1699
1699
  for (const symbol of outputBundle.exports) {
1700
1700
  qrlNames.has(symbol) && (manifest.mapping[symbol] && 1 === outputBundle.exports.length || (manifest.mapping[symbol] = bundleFileName));
1701
1701
  }
1702
- const bundleImports = outputBundle.imports.filter((i => outputBundle.code.includes(path.basename(i)))).map((i => getBundleName(i))).filter(Boolean);
1702
+ const bundleImports = outputBundle.imports.filter(i => outputBundle.code.includes(path.basename(i))).map(i => getBundleName(i)).filter(Boolean);
1703
1703
  bundleImports.length > 0 && (bundle.imports = bundleImports);
1704
- const bundleDynamicImports = outputBundle.dynamicImports.filter((i => outputBundle.code.includes(path.basename(i)))).map((i => getBundleName(i))).filter(Boolean);
1704
+ const bundleDynamicImports = outputBundle.dynamicImports.filter(i => outputBundle.code.includes(path.basename(i))).map(i => getBundleName(i)).filter(Boolean);
1705
1705
  bundleDynamicImports.length > 0 && (bundle.dynamicImports = bundleDynamicImports);
1706
1706
  const ids = outputBundle.moduleIds || Object.keys(outputBundle.modules);
1707
- const modulePaths = ids.filter((m => !m.startsWith("\0"))).map((m => path.relative(opts.rootDir, m)));
1707
+ const modulePaths = ids.filter(m => !m.startsWith("\0")).map(m => path.relative(opts.rootDir, m));
1708
1708
  if (modulePaths.length > 0) {
1709
1709
  bundle.origins = modulePaths;
1710
- modulePaths.some((m => /[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js$/.test(m))) && (manifest.preloader = bundleFileName);
1711
- modulePaths.some((m => /[/\\](core|qwik)[/\\]dist[/\\]core(.min|.prod)?\.[cm]js$/.test(m))) && (manifest.core = bundleFileName);
1712
- modulePaths.some((m => /[/\\](core|qwik)[/\\](dist[/\\])?qwikloader(\.debug)?\.[^/]*js$/.test(m))) && (manifest.qwikLoader = bundleFileName);
1713
- modulePaths.some((m => /[/\\](core|qwik)[/\\]handlers\.[cm]js$/.test(m))) && (qwikHandlersName = bundleFileName);
1710
+ modulePaths.some(m => /[/\\](core|qwik)[/\\]dist[/\\]preloader\.[cm]js$/.test(m)) && (manifest.preloader = bundleFileName);
1711
+ modulePaths.some(m => /[/\\](core|qwik)[/\\]dist[/\\]core(.min|.prod)?\.[cm]js$/.test(m)) && (manifest.core = bundleFileName);
1712
+ modulePaths.some(m => /[/\\](core|qwik)[/\\](dist[/\\])?qwikloader(\.debug)?\.[^/]*js$/.test(m)) && (manifest.qwikLoader = bundleFileName);
1713
+ modulePaths.some(m => /[/\\](core|qwik)[/\\]handlers\.[cm]js$/.test(m)) && (qwikHandlersName = bundleFileName);
1714
1714
  }
1715
1715
  manifest.bundles[bundleFileName] = bundle;
1716
1716
  }
@@ -1803,8 +1803,8 @@ function convertManifestToBundleGraph(manifest, bundleGraphAdders) {
1803
1803
  }
1804
1804
  for (const bundleName of Object.keys(graph)) {
1805
1805
  const bundle = graph[bundleName];
1806
- const imports = bundle.imports?.filter((dep => graph[dep])) || [];
1807
- const dynamicImports = bundle.dynamicImports?.filter((dep => graph[dep] && (graph[dep].symbols || graph[dep].origins?.some((o => !o.includes("node_modules")))))) || [];
1806
+ const imports = bundle.imports?.filter(dep => graph[dep]) || [];
1807
+ const dynamicImports = bundle.dynamicImports?.filter(dep => graph[dep] && (graph[dep].symbols || graph[dep].origins?.some(o => !o.includes("node_modules")))) || [];
1808
1808
  graph[bundleName] = {
1809
1809
  ...bundle,
1810
1810
  imports: imports,
@@ -1851,7 +1851,7 @@ function convertManifestToBundleGraph(manifest, bundleGraphAdders) {
1851
1851
  probability += .08 * (dep.interactivity || 0);
1852
1852
  if (bundle.origins && dep.origins) {
1853
1853
  for (const origin of bundle.origins) {
1854
- if (dep.origins.some((o => o.startsWith(origin)))) {
1854
+ if (dep.origins.some(o => o.startsWith(origin))) {
1855
1855
  probability += .25;
1856
1856
  break;
1857
1857
  }
@@ -1862,7 +1862,7 @@ function convertManifestToBundleGraph(manifest, bundleGraphAdders) {
1862
1862
  depProbability.set(depName, Math.min(probability, .99));
1863
1863
  }
1864
1864
  if (dynDeps.size > 0) {
1865
- const sorted = Array.from(dynDeps).sort(((a, b) => depProbability.get(b) - depProbability.get(a)));
1865
+ const sorted = Array.from(dynDeps).sort((a, b) => depProbability.get(b) - depProbability.get(a));
1866
1866
  let lastProbability = -1;
1867
1867
  for (const depName of sorted) {
1868
1868
  if (depProbability.get(depName) !== lastProbability) {
@@ -1935,7 +1935,7 @@ async function createLinter(sys, rootDir, tsconfigFileNames) {
1935
1935
  const report = await eslint.lintText(code, {
1936
1936
  filePath: filePath
1937
1937
  });
1938
- report.forEach((file => {
1938
+ report.forEach(file => {
1939
1939
  for (const message of file.messages) {
1940
1940
  if (null != message.ruleId && !message.ruleId.startsWith("qwik/")) {
1941
1941
  continue;
@@ -1943,7 +1943,7 @@ async function createLinter(sys, rootDir, tsconfigFileNames) {
1943
1943
  const err = createRollupError(file.filePath, message);
1944
1944
  ctx.warn(err);
1945
1945
  }
1946
- }));
1946
+ });
1947
1947
  } catch (err) {
1948
1948
  console.warn(err);
1949
1949
  }
@@ -1993,7 +1993,7 @@ async function formatError(sys, e) {
1993
1993
  var findLocation = e => {
1994
1994
  const stack = e.stack;
1995
1995
  if ("string" === typeof stack) {
1996
- const lines = stack.split("\n").filter((l => !l.includes("/node_modules/") && !l.includes("(node:")));
1996
+ const lines = stack.split("\n").filter(l => !l.includes("/node_modules/") && !l.includes("(node:"));
1997
1997
  for (let i = 1; i < lines.length; i++) {
1998
1998
  const line = lines[i].replace("file:///", "/");
1999
1999
  if (/^\s+at/.test(line)) {
@@ -2223,9 +2223,9 @@ function createQwikPlugin(optimizerOptions = {}) {
2223
2223
  opts.srcDir || (opts.srcDir = srcDir);
2224
2224
  }
2225
2225
  Array.isArray(updatedOpts.tsconfigFileNames) && updatedOpts.tsconfigFileNames.length > 0 && (opts.tsconfigFileNames = updatedOpts.tsconfigFileNames);
2226
- Array.isArray(opts.srcInputs) ? opts.srcInputs.forEach((i => {
2226
+ Array.isArray(opts.srcInputs) ? opts.srcInputs.forEach(i => {
2227
2227
  i.path = normalizePath(path.resolve(opts.rootDir, i.path));
2228
- })) : "string" === typeof opts.srcDir && (opts.srcDir = normalizePath(path.resolve(opts.rootDir, normalizePath(opts.srcDir))));
2228
+ }) : "string" === typeof opts.srcDir && (opts.srcDir = normalizePath(path.resolve(opts.rootDir, normalizePath(opts.srcDir))));
2229
2229
  if (!updatedOpts.csr) {
2230
2230
  if (Array.isArray(updatedOpts.input)) {
2231
2231
  opts.input = [ ...updatedOpts.input ];
@@ -2255,12 +2255,12 @@ function createQwikPlugin(optimizerOptions = {}) {
2255
2255
  } else {
2256
2256
  opts.input || (opts.input = []);
2257
2257
  }
2258
- Array.isArray(opts.input) && (opts.input = opts.input.reduce(((inputs, i) => {
2258
+ Array.isArray(opts.input) && (opts.input = opts.input.reduce((inputs, i) => {
2259
2259
  let input = i;
2260
2260
  i.startsWith("@") || i.startsWith("~") || i.startsWith("#") || (input = normalizePath(path.resolve(opts.rootDir, i)));
2261
2261
  inputs.includes(input) || inputs.push(input);
2262
2262
  return inputs;
2263
- }), []));
2263
+ }, []));
2264
2264
  "string" === typeof updatedOpts.outDir ? opts.outDir = normalizePath(path.resolve(opts.rootDir, normalizePath(updatedOpts.outDir))) : opts.outDir || ("ssr" === opts.target ? opts.outDir = normalizePath(path.resolve(opts.rootDir, SSR_OUT_DIR)) : "lib" === opts.target ? opts.outDir = normalizePath(path.resolve(opts.rootDir, LIB_OUT_DIR)) : opts.outDir = normalizePath(path.resolve(opts.rootDir, CLIENT_OUT_DIR)));
2265
2265
  }
2266
2266
  "function" === typeof updatedOpts.manifestOutput && (opts.manifestOutput = updatedOpts.manifestOutput);
@@ -2321,13 +2321,13 @@ function createQwikPlugin(optimizerOptions = {}) {
2321
2321
  }
2322
2322
  const path = getPath();
2323
2323
  if (Array.isArray(opts.srcInputs)) {
2324
- optimizer.sys.getInputFiles = async rootDir => opts.srcInputs.map((i => {
2324
+ optimizer.sys.getInputFiles = async rootDir => opts.srcInputs.map(i => {
2325
2325
  const relInput = {
2326
2326
  path: normalizePath(path.relative(rootDir, i.path)),
2327
2327
  code: i.code
2328
2328
  };
2329
2329
  return relInput;
2330
- }));
2330
+ });
2331
2331
  debug(`buildStart() opts.srcInputs (${opts.srcInputs.length} files)`);
2332
2332
  }
2333
2333
  debug("transformedOutputs.clear()");
@@ -2535,12 +2535,12 @@ function createQwikPlugin(optimizerOptions = {}) {
2535
2535
  const strip = "client" === opts.target || "ssr" === opts.target;
2536
2536
  debug(`transform(${count})`, `Transforming ${id2} (for: ${isServer ? "server" : "client"}${strip ? ", strip" : ""})`);
2537
2537
  const mode = "lib" === opts.target ? "lib" : "development" === opts.buildMode ? "dev" : "prod";
2538
- "lib" !== mode && (code = code.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, ((_, feature) => {
2538
+ "lib" !== mode && (code = code.replaceAll(/__EXPERIMENTAL__\.(\w+)/g, (_, feature) => {
2539
2539
  if (opts.experimental?.[feature]) {
2540
2540
  return "true";
2541
2541
  }
2542
2542
  return "false";
2543
- })));
2543
+ }));
2544
2544
  let filePath = base;
2545
2545
  opts.srcDir && (filePath = path.relative(opts.srcDir, pathId));
2546
2546
  filePath = normalizePath(filePath);
@@ -2582,7 +2582,7 @@ function createQwikPlugin(optimizerOptions = {}) {
2582
2582
  const now = Date.now();
2583
2583
  const newOutput = await optimizer2.transformModules(transformOpts2);
2584
2584
  debug(`transform(${count})`, `done in ${Date.now() - now}ms`);
2585
- const module = newOutput.modules.find((mod => !isAdditionalFile(mod)));
2585
+ const module = newOutput.modules.find(mod => !isAdditionalFile(mod));
2586
2586
  diagnosticsCallback(newOutput.diagnostics, optimizer2, srcDir);
2587
2587
  isServer ? 0 === newOutput.diagnostics.length && linter && linter.lint(ctx, code, id2) : clientResults.set(id2, newOutput);
2588
2588
  const deps = new Set;
@@ -2636,17 +2636,17 @@ function createQwikPlugin(optimizerOptions = {}) {
2636
2636
  const buildPath = path.resolve(opts.rootDir, opts.outDir, "build");
2637
2637
  const canonPath = p => path.relative(buildPath, path.resolve(opts.rootDir, opts.outDir, p));
2638
2638
  outputAnalyzer.canonPath = canonPath;
2639
- const segments = Array.from(clientResults.values()).flatMap((r => r.modules)).map((mod => mod.segment)).filter((h => !!h));
2639
+ const segments = Array.from(clientResults.values()).flatMap(r => r.modules).map(mod => mod.segment).filter(h => !!h);
2640
2640
  const manifest = generateManifestFromBundles(path, segments, injections, rollupBundle, opts, debug, canonPath);
2641
2641
  extra && Object.assign(manifest, extra);
2642
2642
  for (const symbol of Object.values(manifest.symbols)) {
2643
2643
  symbol.origin && (symbol.origin = normalizePath(symbol.origin));
2644
2644
  }
2645
2645
  for (const bundle of Object.values(manifest.bundles)) {
2646
- bundle.origins && (bundle.origins = bundle.origins.map((abs => {
2646
+ bundle.origins && (bundle.origins = bundle.origins.map(abs => {
2647
2647
  const relPath = path.relative(opts.rootDir, abs);
2648
2648
  return normalizePath(relPath);
2649
- })).sort());
2649
+ }).sort());
2650
2650
  }
2651
2651
  manifest.manifestHash = hashCode(JSON.stringify(manifest));
2652
2652
  return manifest;
@@ -2654,7 +2654,7 @@ function createQwikPlugin(optimizerOptions = {}) {
2654
2654
  return outputAnalyzer;
2655
2655
  };
2656
2656
  const getOptions = () => opts;
2657
- const getTransformedOutputs = () => Array.from(clientTransformedOutputs.values()).map((t => t[0]));
2657
+ const getTransformedOutputs = () => Array.from(clientTransformedOutputs.values()).map(t => t[0]);
2658
2658
  const debug = (...str) => {
2659
2659
  opts.debug && console.debug(`[QWIK PLUGIN: ${id}]`, ...str);
2660
2660
  };
@@ -2885,12 +2885,12 @@ function qwikRollup(qwikRollupOpts = {}) {
2885
2885
  },
2886
2886
  outputOptions: rollupOutputOpts => normalizeRollupOutputOptionsObject(qwikPlugin, rollupOutputOpts, false),
2887
2887
  async buildStart() {
2888
- qwikPlugin.onDiagnostics(((diagnostics, optimizer, srcDir) => {
2889
- diagnostics.forEach((d => {
2888
+ qwikPlugin.onDiagnostics((diagnostics, optimizer, srcDir) => {
2889
+ diagnostics.forEach(d => {
2890
2890
  const id = qwikPlugin.normalizePath(optimizer.sys.path.join(srcDir, d.file));
2891
2891
  "error" === d.category ? this.error(createRollupError2(id, d)) : this.warn(createRollupError2(id, d));
2892
- }));
2893
- }));
2892
+ });
2893
+ });
2894
2894
  await qwikPlugin.buildStart(this);
2895
2895
  },
2896
2896
  resolveId(id, importer) {
@@ -2922,10 +2922,10 @@ function qwikRollup(qwikRollupOpts = {}) {
2922
2922
  function normalizeRollupOutputOptions(qwikPlugin, rollupOutputOpts, useAssetsDir, outDir) {
2923
2923
  if (Array.isArray(rollupOutputOpts)) {
2924
2924
  rollupOutputOpts.length || rollupOutputOpts.push({});
2925
- return rollupOutputOpts.map((outputOptsObj => ({
2925
+ return rollupOutputOpts.map(outputOptsObj => ({
2926
2926
  ...normalizeRollupOutputOptionsObject(qwikPlugin, outputOptsObj, useAssetsDir),
2927
2927
  dir: outDir || outputOptsObj.dir
2928
- })));
2928
+ }));
2929
2929
  }
2930
2930
  return {
2931
2931
  ...normalizeRollupOutputOptionsObject(qwikPlugin, rollupOutputOpts, useAssetsDir),
@@ -2947,10 +2947,10 @@ function normalizeRollupOutputOptionsObject(qwikPlugin, rollupOutputOptsObj, use
2947
2947
  }
2948
2948
  let fileName;
2949
2949
  fileName = "production" !== opts.buildMode || opts.debug ? chunkInfo => {
2950
- if (chunkInfo.moduleIds?.some((id => id.endsWith("core.prod.mjs")))) {
2950
+ if (chunkInfo.moduleIds?.some(id => id.endsWith("core.prod.mjs"))) {
2951
2951
  return "build/core.js";
2952
2952
  }
2953
- if (chunkInfo.moduleIds?.some((id => id.endsWith("qwik-router/lib/index.qwik.mjs")))) {
2953
+ if (chunkInfo.moduleIds?.some(id => id.endsWith("qwik-router/lib/index.qwik.mjs"))) {
2954
2954
  return "build/qwik-router.js";
2955
2955
  }
2956
2956
  const path = optimizer.sys.path;
@@ -2992,7 +2992,7 @@ function createRollupError2(id, diagnostic) {
2992
2992
  return err;
2993
2993
  }
2994
2994
 
2995
- var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]);let r;const s=(t,e)=>Array.from(t.querySelectorAll(e)),i=t=>{const e=[];return o.forEach((n=>e.push(...s(n,t)))),e},a=t=>{v(t),s(t,"[q\\\\:shadowroot]").forEach((t=>{const e=t.shadowRoot;e&&a(e)}))},c=t=>t&&"function"==typeof t.then;let l=!0;const f=(t,e,n=e.type)=>{let o=l;i("[on"+t+"\\\\:"+n+"]").forEach((r=>{o=!0,b(r,t,e,n)})),o||window[t.slice(1)].removeEventListener(n,"-window"===t?d:_)},p=e=>{if(void 0===e._qwikjson_){let n=(e===t.documentElement?t.body:e).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){e._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},u=(t,e)=>new CustomEvent(t,{detail:e}),b=async(e,n,o,r=o.type)=>{const s="on"+n+":"+r;e.hasAttribute("preventdefault:"+r)&&o.preventDefault(),e.hasAttribute("stoppropagation:"+r)&&o.stopPropagation();const i=e._qc_,a=i&&i.li.filter((t=>t[0]===s));if(a&&a.length>0){for(const t of a){const n=t[1].getFn([e,o],(()=>e.isConnected))(o,e),r=o.cancelBubble;c(n)&&await n,r&&o.stopPropagation()}return}const l=e.getAttribute(s),f=e.qDispatchEvent;if(f)return f(o,n);if(l){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),r=n.getAttribute("q:base"),s=n.getAttribute("q:version")||"unknown",i=n.getAttribute("q:manifest-hash")||"dev",a=new URL(r,t.baseURI);for(const f of l.split("\\n")){const l=new URL(f,a),u=l.href,b=l.hash.replace(/^#?([^?[|]*).*$/,"$1")||"default",h=performance.now();let _,d,w;const m=f.startsWith("#"),y={qBase:r,qManifest:i,qVersion:s,href:u,symbol:b,element:e,reqTime:h};if(m){const e=n.getAttribute("q:instance");_=(t["qFuncs_"+e]||[])[Number.parseInt(b)],_||(d="sync",w=Error("sym:"+b))}else{q("qsymbol",y);const t=l.href.split("#")[0];try{const e=import(t);p(n),_=(await e)[b],_||(d="no-symbol",w=Error(`${b} not in ${t}`))}catch(t){d||(d="async"),w=t}}if(!_){q("qerror",{importError:d,error:w,...y}),console.error(w);break}const v=t.__q_context__;if(e.isConnected)try{t.__q_context__=[e,o,l];const n=_(o,e);c(n)&&await n}catch(t){q("qerror",{error:t,...y})}finally{t.__q_context__=v}}}},q=(e,n)=>{t.dispatchEvent(u(e,n))},h=t=>t.replace(/([A-Z])/g,(t=>"-"+t.toLowerCase())),_=async t=>{let e=h(t.type),n=t.target;for(f("-document",t,e);n&&n.getAttribute;){const o=b(n,"",t,e);let r=t.cancelBubble;c(o)&&await o,r||(r=r||t.cancelBubble||n.hasAttribute("stoppropagation:"+t.type)),n=t.bubbles&&!0!==r?n.parentElement:null}},d=t=>{f("-window",t,h(t.type))},w=()=>{var s;const c=t.readyState;if(!r&&("interactive"==c||"complete"==c)&&(o.forEach(a),r=1,q("qinit"),(null!=(s=e.requestIdleCallback)?s:e.setTimeout).bind(e)((()=>q("qidle"))),n.has("qvisible"))){const t=i("[on\\\\:qvisible]"),e=new IntersectionObserver((t=>{for(const n of t)n.isIntersecting&&(e.unobserve(n.target),b(n.target,"",u("qvisible",n)))}));t.forEach((t=>e.observe(t)))}},m=(t,e,n,o=!1)=>{t.addEventListener(e,n,{capture:o,passive:!1})};let y;const v=(...t)=>{l=!0,clearTimeout(y),y=setTimeout((()=>l=!1),2e4);for(const r of t)"string"==typeof r?n.has(r)||(o.forEach((t=>m(t,r,_,!0))),m(e,r,d,!0),n.add(r)):o.has(r)||(n.forEach((t=>m(r,t,_,!0))),o.add(r))};if(!("__q_context__"in t)){t.__q_context__=0;const r=e.qwikevents;r&&(Array.isArray(r)?v(...r):v("click","input")),e.qwikevents={events:n,roots:o,push:v},m(t,"readystatechange",w),w()}';
2995
+ var QWIK_LOADER_DEFAULT_MINIFIED = 'const t=document,e=window,n=new Set,o=new Set([t]);let r;const s=(t,e)=>Array.from(t.querySelectorAll(e)),i=t=>{const e=[];return o.forEach(n=>e.push(...s(n,t))),e},a=t=>{v(t),s(t,"[q\\\\:shadowroot]").forEach(t=>{const e=t.shadowRoot;e&&a(e)})},c=t=>t&&"function"==typeof t.then;let l=!0;const f=(t,e,n=e.type)=>{let o=l;i("[on"+t+"\\\\:"+n+"]").forEach(r=>{o=!0,b(r,t,e,n)}),o||window[t.slice(1)].removeEventListener(n,"-window"===t?d:_)},p=e=>{if(void 0===e._qwikjson_){let n=(e===t.documentElement?t.body:e).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n.getAttribute("type")){e._qwikjson_=JSON.parse(n.textContent.replace(/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},u=(t,e)=>new CustomEvent(t,{detail:e}),b=async(e,n,o,r=o.type)=>{const s="on"+n+":"+r;e.hasAttribute("preventdefault:"+r)&&o.preventDefault(),e.hasAttribute("stoppropagation:"+r)&&o.stopPropagation();const i=e._qc_,a=i&&i.li.filter(t=>t[0]===s);if(a&&a.length>0){for(const t of a){const n=t[1].getFn([e,o],()=>e.isConnected)(o,e),r=o.cancelBubble;c(n)&&await n,r&&o.stopPropagation()}return}const l=e.getAttribute(s),f=e.qDispatchEvent;if(f)return f(o,n);if(l){const n=e.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),r=n.getAttribute("q:base"),s=n.getAttribute("q:version")||"unknown",i=n.getAttribute("q:manifest-hash")||"dev",a=new URL(r,t.baseURI);for(const f of l.split("\\n")){const l=new URL(f,a),u=l.href,b=l.hash.replace(/^#?([^?[|]*).*$/,"$1")||"default",h=performance.now();let _,d,w;const m=f.startsWith("#"),y={qBase:r,qManifest:i,qVersion:s,href:u,symbol:b,element:e,reqTime:h};if(m){const e=n.getAttribute("q:instance");_=(t["qFuncs_"+e]||[])[Number.parseInt(b)],_||(d="sync",w=Error("sym:"+b))}else{q("qsymbol",y);const t=l.href.split("#")[0];try{const e=import(t);p(n),_=(await e)[b],_||(d="no-symbol",w=Error(`${b} not in ${t}`))}catch(t){d||(d="async"),w=t}}if(!_){q("qerror",{importError:d,error:w,...y}),console.error(w);break}const v=t.__q_context__;if(e.isConnected)try{t.__q_context__=[e,o,l];const n=_(o,e);c(n)&&await n}catch(t){q("qerror",{error:t,...y})}finally{t.__q_context__=v}}}},q=(e,n)=>{t.dispatchEvent(u(e,n))},h=t=>t.replace(/([A-Z])/g,t=>"-"+t.toLowerCase()),_=async t=>{let e=h(t.type),n=t.target;for(f("-document",t,e);n&&n.getAttribute;){const o=b(n,"",t,e);let r=t.cancelBubble;c(o)&&await o,r||(r=r||t.cancelBubble||n.hasAttribute("stoppropagation:"+t.type)),n=t.bubbles&&!0!==r?n.parentElement:null}},d=t=>{f("-window",t,h(t.type))},w=()=>{var s;const c=t.readyState;if(!r&&("interactive"==c||"complete"==c)&&(o.forEach(a),r=1,q("qinit"),(null!=(s=e.requestIdleCallback)?s:e.setTimeout).bind(e)(()=>q("qidle")),n.has("qvisible"))){const t=i("[on\\\\:qvisible]"),e=new IntersectionObserver(t=>{for(const n of t)n.isIntersecting&&(e.unobserve(n.target),b(n.target,"",u("qvisible",n)))});t.forEach(t=>e.observe(t))}},m=(t,e,n,o=!1)=>{t.addEventListener(e,n,{capture:o,passive:!1})};let y;const v=(...t)=>{l=!0,clearTimeout(y),y=setTimeout(()=>l=!1,2e4);for(const r of t)"string"==typeof r?n.has(r)||(o.forEach(t=>m(t,r,_,!0)),m(e,r,d,!0),n.add(r)):o.has(r)||(n.forEach(t=>m(r,t,_,!0)),o.add(r))};if(!("__q_context__"in t)){t.__q_context__=0;const r=e.qwikevents;r&&(Array.isArray(r)?v(...r):v("click","input")),e.qwikevents={events:n,roots:o,push:v},m(t,"readystatechange",w),w()}';
2996
2996
 
2997
2997
  var QWIK_LOADER_DEFAULT_DEBUG = 'const doc = document;\nconst win = window;\nconst events = /* @__PURE__ */ new Set();\nconst roots = /* @__PURE__ */ new Set([doc]);\nlet hasInitialized;\nconst nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\nconst querySelectorAll = (query) => {\n const elements = [];\n roots.forEach((root) => elements.push(...nativeQuerySelectorAll(root, query)));\n return elements;\n};\nconst findShadowRoots = (fragment) => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent) => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n });\n};\nconst isPromise = (promise) => promise && typeof promise.then === "function";\nlet doNotClean = true;\nconst broadcast = (infix, ev, type = ev.type) => {\n let found = doNotClean;\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el) => {\n found = true;\n dispatch(el, infix, ev, type);\n });\n if (!found) {\n window[infix.slice(1)].removeEventListener(\n type,\n infix === "-window" ? processWindowEvent : processDocumentEvent\n );\n }\n};\nconst resolveContainer = (containerEl) => {\n if (containerEl._qwikjson_ === void 0) {\n const parentJSON = containerEl === doc.documentElement ? doc.body : containerEl;\n let script = parentJSON.lastElementChild;\n while (script) {\n if (script.tagName === "SCRIPT" && script.getAttribute("type") === "qwik/json") {\n containerEl._qwikjson_ = JSON.parse(\n script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1")\n );\n break;\n }\n script = script.previousElementSibling;\n }\n }\n};\nconst createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail\n});\nconst dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n if (element.hasAttribute("preventdefault:" + eventName)) {\n ev.preventDefault();\n }\n if (element.hasAttribute("stoppropagation:" + eventName)) {\n ev.stopPropagation();\n }\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li) => li[0] === attrName);\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([element, ev], () => element.isConnected)(ev, element);\n const cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n if (cancelBubble) {\n ev.stopPropagation();\n }\n }\n return;\n }\n const attrValue = element.getAttribute(attrName);\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n if (attrValue) {\n const container = element.closest(\n "[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"\n );\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase,\n qManifest,\n qVersion,\n href,\n symbol,\n element,\n reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sym:" + symbol);\n }\n } else {\n emitEvent("qsymbol", eventData);\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri\n );\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", {\n importError,\n error,\n ...eventData\n });\n console.error(error);\n break;\n }\n const previousCtx = doc.__q_context__;\n if (element.isConnected) {\n try {\n doc.__q_context__ = [element, ev, url];\n const results = handler(ev, element);\n if (isPromise(results)) {\n await results;\n }\n } catch (error2) {\n emitEvent("qerror", { error: error2, ...eventData });\n } finally {\n doc.__q_context__ = previousCtx;\n }\n }\n }\n }\n};\nconst emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n};\nconst camelToKebab = (str) => str.replace(/([A-Z])/g, (a) => "-" + a.toLowerCase());\nconst processDocumentEvent = async (ev) => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n if (isPromise(results)) {\n await results;\n }\n cancelBubble || (cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type));\n element = ev.bubbles && cancelBubble !== true ? element.parentElement : null;\n }\n};\nconst processWindowEvent = (ev) => {\n broadcast("-window", ev, camelToKebab(ev.type));\n};\nconst processReadyStateChange = () => {\n var _a;\n const readyState = doc.readyState;\n if (!hasInitialized && (readyState == "interactive" || readyState == "complete")) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n const riC = (_a = win.requestIdleCallback) != null ? _a : win.setTimeout;\n riC.bind(win)(() => emitEvent("qidle"));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n });\n results.forEach((el) => observer.observe(el));\n }\n }\n};\nconst addEventListener = (el, eventName, handler, capture = false) => {\n el.addEventListener(eventName, handler, { capture, passive: false });\n};\nlet cleanTimer;\nconst processEventOrNode = (...eventNames) => {\n doNotClean = true;\n clearTimeout(cleanTimer);\n cleanTimer = setTimeout(() => doNotClean = false, 2e4);\n for (const eventNameOrNode of eventNames) {\n if (typeof eventNameOrNode === "string") {\n if (!events.has(eventNameOrNode)) {\n roots.forEach(\n (root) => addEventListener(root, eventNameOrNode, processDocumentEvent, true)\n );\n addEventListener(win, eventNameOrNode, processWindowEvent, true);\n events.add(eventNameOrNode);\n }\n } else {\n if (!roots.has(eventNameOrNode)) {\n events.forEach(\n (eventName) => addEventListener(eventNameOrNode, eventName, processDocumentEvent, true)\n );\n roots.add(eventNameOrNode);\n }\n }\n }\n};\nif (!("__q_context__" in doc)) {\n doc.__q_context__ = 0;\n const qwikevents = win.qwikevents;\n if (qwikevents) {\n if (Array.isArray(qwikevents)) {\n processEventOrNode(...qwikevents);\n } else {\n processEventOrNode("click", "input");\n }\n }\n win.qwikevents = {\n events,\n roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n}';
2998
2998
 
@@ -3069,7 +3069,7 @@ function detector(buffer) {
3069
3069
  if (type && types[type].validate(buffer)) {
3070
3070
  return type;
3071
3071
  }
3072
- return keys.find((key => types[key].validate(buffer)));
3072
+ return keys.find(key => types[key].validate(buffer));
3073
3073
  }
3074
3074
 
3075
3075
  function lookup(buffer) {
@@ -3234,7 +3234,7 @@ function imgImportName(value) {
3234
3234
  }
3235
3235
 
3236
3236
  function toPascalCase(string) {
3237
- return `${string}`.toLowerCase().replace(new RegExp(/[-_]+/, "g"), " ").replace(new RegExp(/[^\w\s]/, "g"), "").replace(new RegExp(/\s+(.)(\w*)/, "g"), (($1, $2, $3) => `${$2.toUpperCase() + $3}`)).replace(new RegExp(/\w/), (s => s.toUpperCase()));
3237
+ return `${string}`.toLowerCase().replace(new RegExp(/[-_]+/, "g"), " ").replace(new RegExp(/[^\w\s]/, "g"), "").replace(new RegExp(/\s+(.)(\w*)/, "g"), ($1, $2, $3) => `${$2.toUpperCase() + $3}`).replace(new RegExp(/\w/), s => s.toUpperCase());
3238
3238
  }
3239
3239
 
3240
3240
  var FORCE_COLOR;
@@ -3327,7 +3327,7 @@ var image_size_runtime_default = "<style>\n [data-qwik-cls] {\n outline: 2px
3327
3327
 
3328
3328
  var perf_warning_default = "<script>\n if (!window.__qwikViteLog) {\n window.__qwikViteLog = true;\n console.debug(\n '%c⭐️ Qwik Dev SSR Mode',\n 'background: #0c75d2; color: white; padding: 2px 3px; border-radius: 2px; font-size: 0.8em;',\n \"App is running in SSR development mode!\\n - Additional JS is loaded by Vite for debugging and live reloading\\n - Rendering performance might not be optimal\\n - Delayed interactivity because prefetching is disabled\\n - Vite dev bundles do not represent production output\\n\\nProduction build can be tested running 'npm run preview'\"\n );\n }\n<\/script>\n";
3329
3329
 
3330
- var VITE_ERROR_OVERLAY_STYLES = "\nvite-error-overlay {\n --color-bright: rgba(255, 255, 255, 0.8);\n --color-yellow: rgba(255,246,85,0.8);\n --qwik-dark-blue: #006ce9;\n --qwik-light-blue: #3ec2f7;\n --qwik-light-purple: #ac7ff4;\n --qwik-dark-purple: #713fc2;\n --yellow: #fff; /* override vite yellow */\n --purple: var(--color-bright); /* override vite purple */\n --red: var(--qwik-light-blue); /* override vite red */\n\n --vertical-box-spacing: 15px;\n --box-padding: 20px;\n --box-margin: 0 0 var(--vertical-box-spacing) 0;\n --box-background: rgba(0, 0, 0, 0.5);\n --box-border-radius: 8px;\n}\n\nvite-error-overlay::part(backdrop) {\n background: rgb(2 11 17 / 60%);\n backdrop-filter: blur(20px) brightness(0.4) saturate(3);\n}\n\nvite-error-overlay::part(window) {\n background: transparent;\n border: none;\n box-shadow: none;\n box-sizing: border-box;\n margin: 50px auto;\n max-width: 1200px;\n padding: var(--box-padding);\n width: 90%;\n}\n\nvite-error-overlay::part(message) {\n display: flex;\n flex-direction: column;\n font-size: 1.6rem;\n line-height: 1.7;\n margin-bottom: 30px;\n}\n\nvite-error-overlay::part(plugin) {\n font-size: 0.8rem;\n font-weight: 100;\n}\n\nvite-error-overlay::part(file),\nvite-error-overlay::part(frame),\nvite-error-overlay::part(stack),\nvite-error-overlay::part(tip) {\n background: var(--box-background);\n border-left: 5px solid transparent;\n border-radius: var(--box-border-radius);\n margin: var(--box-margin);\n min-height: 50px;\n padding: var(--box-padding);\n position: relative;\n}\n\nvite-error-overlay::part(file) {\n border-left-color: rgb(25 182 246);\n color: var(--color-bright);\n}\n\nvite-error-overlay::part(frame) {\n border-left-color: var(--color-yellow);\n color: var(--color-yellow);\n}\n\nvite-error-overlay::part(stack) {\n border-left-color: #FF5722;\n}\n\n\nvite-error-overlay::part(tip) {\n border-top: none;\n border-left-color: rgb(172, 127, 244);\n}\n\nvite-error-overlay::part(file):before,\nvite-error-overlay::part(frame):before,\nvite-error-overlay::part(stack):before {\n border-bottom: 1px solid #222;\n color: var(--color-bright);\n display: block;\n margin-bottom: 15px;\n padding-bottom: 5px;\n padding-left: 30px; /* space for icon */\n font-size: .8rem;\n}\n\nvite-error-overlay::part(file):before {\n content: 'File';\n}\n\nvite-error-overlay::part(frame):before {\n content: 'Frame';\n}\n\nvite-error-overlay::part(stack):before {\n content: 'Stack Trace';\n}\n\nvite-error-overlay::part(file):after,\nvite-error-overlay::part(frame):after,\nvite-error-overlay::part(stack):after {\n content: '';\n display: block;\n height: 20px;\n position: absolute;\n left: var(--box-padding);\n top: var(--box-padding);\n width: 20px;\n}\n\nvite-error-overlay::part(file):after {\n background-image: url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");\n}\n\nvite-error-overlay::part(frame):after {\n background-image: url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E\");\n}\n\nvite-error-overlay::part(stack):after {\n background-image: url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E\");\n}\n\nvite-error-overlay::part(tip):before {\n content: \"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.\";\n display: block;\n margin-bottom: 1em;\n}\n";
3330
+ var VITE_ERROR_OVERLAY_STYLES = "\nvite-error-overlay {\n --color-bright: rgba(255, 255, 255, 0.8);\n --color-yellow: rgba(255,246,85,0.8);\n --qwik-dark-blue: #006ce9;\n --qwik-light-blue: #3ec2f7;\n --qwik-light-purple: #ac7ff4;\n --qwik-dark-purple: #713fc2;\n --yellow: #fff; /* override vite yellow */\n --purple: var(--color-bright); /* override vite purple */\n --red: var(--qwik-light-blue); /* override vite red */\n\n --vertical-box-spacing: 15px;\n --box-padding: 20px;\n --box-margin: 0 0 var(--vertical-box-spacing) 0;\n --box-background: rgba(0, 0, 0, 0.5);\n --box-border-radius: 8px;\n}\n\nvite-error-overlay::part(backdrop) {\n background: rgb(2 11 17 / 60%);\n}\n\nvite-error-overlay::part(window) {\n background: transparent;\n border: none;\n box-shadow: none;\n box-sizing: border-box;\n margin: 50px auto;\n max-width: 1200px;\n padding: var(--box-padding);\n width: 90%;\n}\n\nvite-error-overlay::part(message) {\n display: flex;\n flex-direction: column;\n font-size: 1.6rem;\n line-height: 1.7;\n margin-bottom: 30px;\n}\n\nvite-error-overlay::part(plugin) {\n font-size: 0.8rem;\n font-weight: 100;\n}\n\nvite-error-overlay::part(file),\nvite-error-overlay::part(frame),\nvite-error-overlay::part(stack),\nvite-error-overlay::part(tip) {\n background: var(--box-background);\n border-left: 5px solid transparent;\n border-radius: var(--box-border-radius);\n margin: var(--box-margin);\n min-height: 50px;\n padding: var(--box-padding);\n position: relative;\n}\n\nvite-error-overlay::part(file) {\n border-left-color: rgb(25 182 246);\n color: var(--color-bright);\n}\n\nvite-error-overlay::part(frame) {\n border-left-color: var(--color-yellow);\n color: var(--color-yellow);\n}\n\nvite-error-overlay::part(stack) {\n border-left-color: #FF5722;\n}\n\n\nvite-error-overlay::part(tip) {\n border-top: none;\n border-left-color: rgb(172, 127, 244);\n}\n\nvite-error-overlay::part(file):before,\nvite-error-overlay::part(frame):before,\nvite-error-overlay::part(stack):before {\n border-bottom: 1px solid #222;\n color: var(--color-bright);\n display: block;\n margin-bottom: 15px;\n padding-bottom: 5px;\n padding-left: 30px; /* space for icon */\n font-size: .8rem;\n}\n\nvite-error-overlay::part(file):before {\n content: 'File';\n}\n\nvite-error-overlay::part(frame):before {\n content: 'Frame';\n}\n\nvite-error-overlay::part(stack):before {\n content: 'Stack Trace';\n}\n\nvite-error-overlay::part(file):after,\nvite-error-overlay::part(frame):after,\nvite-error-overlay::part(stack):after {\n content: '';\n display: block;\n height: 20px;\n position: absolute;\n left: var(--box-padding);\n top: var(--box-padding);\n width: 20px;\n}\n\nvite-error-overlay::part(file):after {\n background-image: url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'%3E%3Ctitle%3EFile-Generic%3C/title%3E%3Cg id='Page-1' stroke='none' stroke-width='1' fill='none' fill-rule='evenodd'%3E%3Cg id='File-Generic'%3E%3Crect id='Rectangle' fill-rule='nonzero' x='0' y='0' width='24' height='24'%3E%3C/rect%3E%3Cpath d='M4 5 C4 3.89543 4.89543 3 6 3 L15.1716 3 C15.702 3 16.2107 3.21071 16.5858 3.58579 L19.4142 6.41421 C19.7893 6.78929 20 7.29799 20 7.82843 L20 19 C20 20.1046 19.1046 21 18 21 L6 21 C4.89543 21 4 20.1046 4 19 L4 5 Z' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3Cpath d='M15 4 L15 6 C15 7.10457 15.8954 8 17 8 L19 8' id='Path' stroke='rgba(255,255,255,0.7)' stroke-width='1' stroke-linecap='round'%3E%3C/path%3E%3C/g%3E%3C/g%3E%3C/svg%3E\");\n}\n\nvite-error-overlay::part(frame):after {\n background-image: url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.6602 2.84952H19.1516C20.2555 2.84952 21.1504 3.74444 21.1504 4.84839V8.3398' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M2.84949 8.33981L2.84949 4.8484C2.84949 3.74446 3.74441 2.84953 4.84836 2.84953L8.33977 2.84953' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M21.1505 15.6602L21.1505 19.1516C21.1505 20.2555 20.2556 21.1505 19.1516 21.1505L15.6602 21.1505' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3Cpath d='M8.33984 21.1505L4.84843 21.1505C3.74449 21.1505 2.84956 20.2555 2.84956 19.1516L2.84956 15.6602' stroke='rgba(255,255,255,0.7)' stroke-width='1.69904' stroke-linecap='round'/%3E%3C/svg%3E\");\n}\n\nvite-error-overlay::part(stack):after {\n background-image: url(\"data:image/svg+xml,%3Csvg width='20px' height='20px' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14.78 20H9.78C7.98 20 4.58 19.09 4.58 15.64C4.58 12.19 7.98 11.28 9.78 11.28H14.22C14.37 11.28 17.92 11.23 17.92 8.42C17.92 5.61 14.37 5.56 14.22 5.56H9.22C9.02109 5.56 8.83032 5.48098 8.68967 5.34033C8.54902 5.19968 8.47 5.00891 8.47 4.81C8.47 4.61109 8.54902 4.42032 8.68967 4.27967C8.83032 4.13902 9.02109 4.06 9.22 4.06H14.22C16.02 4.06 19.42 4.97 19.42 8.42C19.42 11.87 16.02 12.78 14.22 12.78H9.78C9.63 12.78 6.08 12.83 6.08 15.64C6.08 18.45 9.63 18.5 9.78 18.5H14.78C14.9789 18.5 15.1697 18.579 15.3103 18.7197C15.451 18.8603 15.53 19.0511 15.53 19.25C15.53 19.4489 15.451 19.6397 15.3103 19.7803C15.1697 19.921 14.9789 20 14.78 20Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M6.44 8.31C5.74314 8.30407 5.06363 8.09202 4.48708 7.70056C3.91054 7.30909 3.46276 6.75573 3.20018 6.11021C2.93759 5.46469 2.87195 4.75589 3.01153 4.07312C3.1511 3.39036 3.48965 2.76418 3.9845 2.2735C4.47935 1.78281 5.10837 1.44958 5.79229 1.31579C6.47622 1.182 7.18444 1.25363 7.82771 1.52167C8.47099 1.78971 9.02054 2.24215 9.40711 2.82199C9.79368 3.40182 9.99998 4.08311 10 4.78C10 5.2461 9.90773 5.70759 9.72846 6.13783C9.54919 6.56808 9.28648 6.95856 8.95551 7.28675C8.62453 7.61494 8.23184 7.87433 7.80009 8.04995C7.36834 8.22558 6.90609 8.31396 6.44 8.31ZM6.44 2.75C6.04444 2.75 5.65776 2.86729 5.32886 3.08706C4.99996 3.30682 4.74362 3.61918 4.59224 3.98463C4.44087 4.35008 4.40126 4.75221 4.47843 5.14018C4.5556 5.52814 4.74609 5.8845 5.02579 6.16421C5.3055 6.44391 5.66186 6.6344 6.04982 6.71157C6.43779 6.78874 6.83992 6.74913 7.20537 6.59776C7.57082 6.44638 7.88318 6.19003 8.10294 5.86114C8.32271 5.53224 8.44 5.14556 8.44 4.75C8.44 4.48735 8.38827 4.22728 8.28776 3.98463C8.18725 3.74198 8.03993 3.5215 7.85422 3.33578C7.6685 3.15007 7.44802 3.00275 7.20537 2.90224C6.96272 2.80173 6.70265 2.75 6.44 2.75Z' fill='rgba(255,255,255,0.7)'/%3E%3Cpath d='M17.56 22.75C16.8614 22.752 16.1779 22.5466 15.5961 22.1599C15.0143 21.7733 14.5603 21.2227 14.2916 20.5778C14.0229 19.933 13.9515 19.2229 14.0866 18.5375C14.2217 17.8521 14.5571 17.2221 15.0504 16.7275C15.5437 16.2328 16.1726 15.8956 16.8577 15.7586C17.5427 15.6215 18.253 15.6909 18.8986 15.9577C19.5442 16.2246 20.0961 16.6771 20.4844 17.2578C20.8727 17.8385 21.08 18.5214 21.08 19.22C21.08 20.1545 20.7095 21.0508 20.0496 21.7125C19.3898 22.3743 18.4945 22.7473 17.56 22.75ZM17.56 17.19C17.1644 17.19 16.7778 17.3073 16.4489 17.5271C16.12 17.7468 15.8636 18.0592 15.7122 18.4246C15.5609 18.7901 15.5213 19.1922 15.5984 19.5802C15.6756 19.9681 15.8661 20.3245 16.1458 20.6042C16.4255 20.8839 16.7819 21.0744 17.1698 21.1516C17.5578 21.2287 17.9599 21.1891 18.3254 21.0377C18.6908 20.8864 19.0032 20.63 19.2229 20.3011C19.4427 19.9722 19.56 19.5856 19.56 19.19C19.56 18.6596 19.3493 18.1508 18.9742 17.7758C18.5991 17.4007 18.0904 17.19 17.56 17.19Z' fill='rgba(255,255,255,0.7)'/%3E%3C/svg%3E\");\n}\n\nvite-error-overlay::part(tip):before {\n content: \"Not sure how to solve this? Visit https://qwik.dev or connect with the community on Discord.\";\n display: block;\n margin-bottom: 1em;\n}\n";
3331
3331
 
3332
3332
  var SYNC_QRL = "<sync>";
3333
3333
 
@@ -3370,9 +3370,9 @@ async function configureDevServer(base, server, opts, sys, path, isClientDevOnly
3370
3370
  if (!devSsrServer) {
3371
3371
  return;
3372
3372
  }
3373
- const hasQwikRouter = server.config.plugins?.some((plugin => "vite-plugin-qwik-router" === plugin.name));
3373
+ const hasQwikRouter = server.config.plugins?.some(plugin => "vite-plugin-qwik-router" === plugin.name);
3374
3374
  const cssImportedByCSS = new Set;
3375
- server.middlewares.use((async (req, res, next) => {
3375
+ server.middlewares.use(async (req, res, next) => {
3376
3376
  try {
3377
3377
  const {ORIGIN: ORIGIN} = process.env;
3378
3378
  const domain = ORIGIN ?? getOrigin(req);
@@ -3417,25 +3417,25 @@ async function configureDevServer(base, server, opts, sys, path, isClientDevOnly
3417
3417
  const added = new Set;
3418
3418
  const CSS_EXTENSIONS = [ ".css", ".scss", ".sass", ".less", ".styl", ".stylus" ];
3419
3419
  const JS_EXTENSIONS = /\.[mc]?[tj]sx?$/;
3420
- Array.from(server.moduleGraph.fileToModulesMap.entries()).forEach((entry => {
3421
- entry[1].forEach((v => {
3420
+ Array.from(server.moduleGraph.fileToModulesMap.entries()).forEach(entry => {
3421
+ entry[1].forEach(v => {
3422
3422
  const segment = v.info?.meta?.segment;
3423
3423
  let url2 = v.url;
3424
3424
  v.lastHMRTimestamp && (url2 += `?t=${v.lastHMRTimestamp}`);
3425
3425
  segment && (manifest.mapping[segment.name] = relativeURL(url2, opts.rootDir));
3426
3426
  const {pathId: pathId, query: query} = parseId(v.url);
3427
- if ("" === query && CSS_EXTENSIONS.some((ext => pathId.endsWith(ext)))) {
3427
+ if ("" === query && CSS_EXTENSIONS.some(ext => pathId.endsWith(ext))) {
3428
3428
  const isEntryCSS = 0 === v.importers.size;
3429
- const hasCSSImporter = Array.from(v.importers).some((importer => {
3429
+ const hasCSSImporter = Array.from(v.importers).some(importer => {
3430
3430
  const importerPath = importer.url || importer.file;
3431
- const isCSS = importerPath && CSS_EXTENSIONS.some((ext => importerPath.endsWith(ext)));
3431
+ const isCSS = importerPath && CSS_EXTENSIONS.some(ext => importerPath.endsWith(ext));
3432
3432
  isCSS && v.url && cssImportedByCSS.add(v.url);
3433
3433
  return isCSS;
3434
- }));
3435
- const hasJSImporter = Array.from(v.importers).some((importer => {
3434
+ });
3435
+ const hasJSImporter = Array.from(v.importers).some(importer => {
3436
3436
  const importerPath = importer.url || importer.file;
3437
3437
  return importerPath && JS_EXTENSIONS.test(importerPath);
3438
- }));
3438
+ });
3439
3439
  if ((isEntryCSS || hasJSImporter) && !hasCSSImporter && !cssImportedByCSS.has(v.url) && !added.has(v.url)) {
3440
3440
  added.add(v.url);
3441
3441
  manifest.injections.push({
@@ -3448,8 +3448,8 @@ async function configureDevServer(base, server, opts, sys, path, isClientDevOnly
3448
3448
  });
3449
3449
  }
3450
3450
  }
3451
- }));
3452
- }));
3451
+ });
3452
+ });
3453
3453
  const renderOpts = {
3454
3454
  debug: true,
3455
3455
  locale: serverData.locale,
@@ -3469,28 +3469,28 @@ async function configureDevServer(base, server, opts, sys, path, isClientDevOnly
3469
3469
  res.writeHead(status);
3470
3470
  const result = await render(renderOpts);
3471
3471
  "html" in result && res.write(result.html);
3472
- Array.from(server.moduleGraph.fileToModulesMap.entries()).forEach((entry => {
3473
- entry[1].forEach((v => {
3472
+ Array.from(server.moduleGraph.fileToModulesMap.entries()).forEach(entry => {
3473
+ entry[1].forEach(v => {
3474
3474
  const {pathId: pathId, query: query} = parseId(v.url);
3475
- if (!added.has(v.url) && "" === query && CSS_EXTENSIONS.some((ext => pathId.endsWith(ext)))) {
3475
+ if (!added.has(v.url) && "" === query && CSS_EXTENSIONS.some(ext => pathId.endsWith(ext))) {
3476
3476
  const isEntryCSS = 0 === v.importers.size;
3477
- const hasCSSImporter = Array.from(v.importers).some((importer => {
3477
+ const hasCSSImporter = Array.from(v.importers).some(importer => {
3478
3478
  const importerPath = importer.url || importer.file;
3479
- const isCSS = importerPath && CSS_EXTENSIONS.some((ext => importerPath.endsWith(ext)));
3479
+ const isCSS = importerPath && CSS_EXTENSIONS.some(ext => importerPath.endsWith(ext));
3480
3480
  isCSS && v.url && cssImportedByCSS.add(v.url);
3481
3481
  return isCSS;
3482
- }));
3483
- const hasJSImporter = Array.from(v.importers).some((importer => {
3482
+ });
3483
+ const hasJSImporter = Array.from(v.importers).some(importer => {
3484
3484
  const importerPath = importer.url || importer.file;
3485
3485
  return importerPath && JS_EXTENSIONS.test(importerPath);
3486
- }));
3486
+ });
3487
3487
  if ((isEntryCSS || hasJSImporter) && !hasCSSImporter && !cssImportedByCSS.has(v.url)) {
3488
3488
  res.write(`<link rel="stylesheet" href="${base}${v.url.slice(1)}">`);
3489
3489
  added.add(v.url);
3490
3490
  }
3491
3491
  }
3492
- }));
3493
- }));
3492
+ });
3493
+ });
3494
3494
  res.write(END_SSR_SCRIPT(opts, opts.srcDir ? opts.srcDir : path.join(opts.rootDir, "src")));
3495
3495
  res.end();
3496
3496
  } else {
@@ -3508,21 +3508,21 @@ async function configureDevServer(base, server, opts, sys, path, isClientDevOnly
3508
3508
  } finally {
3509
3509
  "function" === typeof res._qwikRenderResolve && res._qwikRenderResolve();
3510
3510
  }
3511
- }));
3512
- server.middlewares.use((function(err, _req, res, next) {
3511
+ });
3512
+ server.middlewares.use(function(err, _req, res, next) {
3513
3513
  res.writableEnded || res.write(`<style>${VITE_ERROR_OVERLAY_STYLES}</style>`);
3514
3514
  return next(err);
3515
- }));
3516
- setTimeout((() => {
3515
+ });
3516
+ setTimeout(() => {
3517
3517
  console.log(`\n 🚧 ${magenta("Please note that development mode is slower than production.")}`);
3518
- }), 1e3);
3518
+ }, 1e3);
3519
3519
  }
3520
3520
 
3521
3521
  async function configurePreviewServer(middlewares, ssrOutDir, sys, path) {
3522
3522
  const fs = await sys.dynamicImport("node:fs");
3523
3523
  const url = await sys.dynamicImport("node:url");
3524
- const entryPreviewPaths = [ "mjs", "cjs", "js" ].map((ext => path.join(ssrOutDir, `entry.preview.${ext}`)));
3525
- const entryPreviewModulePath = entryPreviewPaths.find((p => fs.existsSync(p)));
3524
+ const entryPreviewPaths = [ "mjs", "cjs", "js" ].map(ext => path.join(ssrOutDir, `entry.preview.${ext}`));
3525
+ const entryPreviewModulePath = entryPreviewPaths.find(p => fs.existsSync(p));
3526
3526
  if (!entryPreviewModulePath) {
3527
3527
  return invalidPreviewMessage(middlewares, `Unable to find output "${ssrOutDir}/entry.preview" module.\n\nPlease ensure "src/entry.preview.tsx" has been built before the "preview" command.`);
3528
3528
  }
@@ -3551,12 +3551,12 @@ async function configurePreviewServer(middlewares, ssrOutDir, sys, path) {
3551
3551
 
3552
3552
  function invalidPreviewMessage(middlewares, msg) {
3553
3553
  console.log(`\n❌ ${msg}\n`);
3554
- middlewares.use(((_, res) => {
3554
+ middlewares.use((_, res) => {
3555
3555
  res.writeHead(400, {
3556
3556
  "Content-Type": "text/plain"
3557
3557
  });
3558
3558
  res.end(msg);
3559
- }));
3559
+ });
3560
3560
  }
3561
3561
 
3562
3562
  var CYPRESS_DEV_SERVER_PATH = "/__cypress/src";
@@ -3595,7 +3595,7 @@ var shouldSsrRender = (req, url) => {
3595
3595
  return false;
3596
3596
  }
3597
3597
  const acceptHeader = req.headers.accept || "";
3598
- const accepts = acceptHeader.split(",").map((accept => accept.split(";")[0]));
3598
+ const accepts = acceptHeader.split(",").map(accept => accept.split(";")[0]);
3599
3599
  if (1 == accepts.length && accepts.includes("*/*")) {
3600
3600
  return true;
3601
3601
  }
@@ -3718,7 +3718,7 @@ function qwikVite(qwikViteOpts = {}) {
3718
3718
  } else {
3719
3719
  "object" === typeof viteConfig.build?.lib && (pluginOpts.input = viteConfig.build?.lib.entry);
3720
3720
  }
3721
- if ("node" === sys.env) {
3721
+ if ("node" === sys.env || "bun" === sys.env) {
3722
3722
  const fs = await sys.dynamicImport("node:fs");
3723
3723
  try {
3724
3724
  const rootDir2 = pluginOpts.rootDir ?? sys.cwd();
@@ -3754,7 +3754,7 @@ function qwikVite(qwikViteOpts = {}) {
3754
3754
  clientDevInput = qwikPlugin.normalizePath(clientDevInput);
3755
3755
  }
3756
3756
  const vendorRoots = shouldFindVendors ? await findQwikRoots(sys, sys.cwd()) : [];
3757
- const vendorIds = vendorRoots.map((v => v.id));
3757
+ const vendorIds = vendorRoots.map(v => v.id);
3758
3758
  const isDevelopment = "development" === buildMode;
3759
3759
  const qDevKey = "globalThis.qDev";
3760
3760
  const qTestKey = "globalThis.qTest";
@@ -3863,12 +3863,12 @@ function qwikVite(qwikViteOpts = {}) {
3863
3863
  async buildStart() {
3864
3864
  const resolver = this.resolve.bind(this);
3865
3865
  await qwikPlugin.validateSource(resolver);
3866
- qwikPlugin.onDiagnostics(((diagnostics, optimizer, srcDir2) => {
3867
- diagnostics.forEach((d => {
3866
+ qwikPlugin.onDiagnostics((diagnostics, optimizer, srcDir2) => {
3867
+ diagnostics.forEach(d => {
3868
3868
  const id = qwikPlugin.normalizePath(optimizer.sys.path.join(srcDir2, d.file));
3869
3869
  "error" === d.category ? this.error(createRollupError2(id, d)) : this.warn(createRollupError2(id, d));
3870
- }));
3871
- }));
3870
+ });
3871
+ });
3872
3872
  await qwikPlugin.buildStart(this);
3873
3873
  },
3874
3874
  resolveId(id, importer, resolveIdOpts) {
@@ -3918,7 +3918,7 @@ function qwikVite(qwikViteOpts = {}) {
3918
3918
  for (const [fileName, b] of Object.entries(rollupBundle)) {
3919
3919
  if ("asset" === b.type) {
3920
3920
  const baseFilename = basePathname + fileName;
3921
- if (STYLING.some((ext => fileName.endsWith(ext)))) {
3921
+ if (STYLING.some(ext => fileName.endsWith(ext))) {
3922
3922
  "string" === typeof b.source && b.source.length < opts.inlineStylesUpToBytes ? injections.push({
3923
3923
  tag: "style",
3924
3924
  location: "head",
@@ -3935,7 +3935,7 @@ function qwikVite(qwikViteOpts = {}) {
3935
3935
  }
3936
3936
  });
3937
3937
  } else {
3938
- const selectedFont = FONTS.find((ext => fileName.endsWith(ext)));
3938
+ const selectedFont = FONTS.find(ext => fileName.endsWith(ext));
3939
3939
  selectedFont && !disableFontPreload && injections.unshift({
3940
3940
  tag: "link",
3941
3941
  location: "head",
@@ -3957,7 +3957,7 @@ function qwikVite(qwikViteOpts = {}) {
3957
3957
  }
3958
3958
  });
3959
3959
  const sys = qwikPlugin.getSys();
3960
- if (tmpClientManifestPath && "node" === sys.env) {
3960
+ if (tmpClientManifestPath && ("node" === sys.env || "bun" === sys.env)) {
3961
3961
  const fs = await sys.dynamicImport("node:fs");
3962
3962
  await fs.promises.writeFile(tmpClientManifestPath, clientManifestStr);
3963
3963
  }
@@ -3968,7 +3968,7 @@ function qwikVite(qwikViteOpts = {}) {
3968
3968
  const opts = qwikPlugin.getOptions();
3969
3969
  if ("ssr" === opts.target) {
3970
3970
  const sys = qwikPlugin.getSys();
3971
- if ("node" === sys.env) {
3971
+ if ("node" === sys.env || "bun" === sys.env) {
3972
3972
  const outputs = Object.keys(rollupBundle);
3973
3973
  const patchModuleFormat = async bundeName => {
3974
3974
  try {
@@ -3979,7 +3979,7 @@ function qwikVite(qwikViteOpts = {}) {
3979
3979
  const extlessName = sys.path.basename(bundleFileName, ext);
3980
3980
  const js = `${extlessName}.js`;
3981
3981
  const moduleName = extlessName + ext;
3982
- const hasJsScript = outputs.some((f => sys.path.basename(f) === js));
3982
+ const hasJsScript = outputs.some(f => sys.path.basename(f) === js);
3983
3983
  if (!hasJsScript) {
3984
3984
  const bundleOutDir = sys.path.dirname(bundeName);
3985
3985
  const fs = await sys.dynamicImport("node:fs");
@@ -4010,7 +4010,7 @@ function qwikVite(qwikViteOpts = {}) {
4010
4010
  const path = qwikPlugin.getPath();
4011
4011
  await configureDevServer(basePathname, server, opts, sys, path, isClientDevOnly, clientDevInput, devSsrServer);
4012
4012
  };
4013
- const isNEW = true === globalThis.__qwikRouterNew || true === globalThis.__qwikCityNew;
4013
+ const isNEW = true === globalThis.__qwikRouterNew || true === globalThis.__qwikCityNew || server.config.build.lib;
4014
4014
  return isNEW ? plugin : plugin();
4015
4015
  }
4016
4016
  },
@@ -4028,7 +4028,7 @@ function qwikVite(qwikViteOpts = {}) {
4028
4028
  onLog(level, log) {
4029
4029
  if ("vite-plugin-qwik" == log.plugin) {
4030
4030
  const color = LOG_COLOR[level] || ANSI_COLOR.White;
4031
- const frames = (log.frame || "").split("\n").map((line => (line.match(/^\s*\^\s*$/) ? ANSI_COLOR.BrightWhite : ANSI_COLOR.BrightBlack) + line));
4031
+ const frames = (log.frame || "").split("\n").map(line => (line.match(/^\s*\^\s*$/) ? ANSI_COLOR.BrightWhite : ANSI_COLOR.BrightBlack) + line);
4032
4032
  console[level](`${color}%s\n${ANSI_COLOR.BrightWhite}%s\n%s${ANSI_COLOR.RESET}`, `[${log.plugin}](${level}): ${log.message}\n`, ` ${log?.loc?.file}:${log?.loc?.line}:${log?.loc?.column}\n`, ` ${frames.join("\n ")}\n`);
4033
4033
  return false;
4034
4034
  }
@@ -4093,7 +4093,7 @@ async function findDepPkgJsonPath(sys, dep, parent) {
4093
4093
 
4094
4094
  var findQwikRoots = async (sys, packageJsonDir) => {
4095
4095
  const paths = new Map;
4096
- if ("node" === sys.env) {
4096
+ if ("node" === sys.env || "bun" === sys.env) {
4097
4097
  const fs = await sys.dynamicImport("node:fs");
4098
4098
  let prevPackageJsonDir;
4099
4099
  do {
@@ -4109,7 +4109,7 @@ var findQwikRoots = async (sys, packageJsonDir) => {
4109
4109
  "object" === typeof dependencies && packages.push(...Object.keys(dependencies));
4110
4110
  "object" === typeof devDependencies && packages.push(...Object.keys(devDependencies));
4111
4111
  const basedir = sys.cwd();
4112
- await Promise.all(packages.map((async id => {
4112
+ await Promise.all(packages.map(async id => {
4113
4113
  const pkgJsonPath = await findDepPkgJsonPath(sys, id, basedir);
4114
4114
  if (pkgJsonPath) {
4115
4115
  const pkgJsonContent = await fs.promises.readFile(pkgJsonPath, "utf-8");
@@ -4123,7 +4123,7 @@ var findQwikRoots = async (sys, packageJsonDir) => {
4123
4123
  paths.set(await fs.promises.realpath(sys.path.resolve(sys.path.dirname(pkgJsonPath), p)), id);
4124
4124
  }
4125
4125
  }
4126
- })));
4126
+ }));
4127
4127
  } catch (e) {
4128
4128
  console.error(e);
4129
4129
  }
@@ -4132,10 +4132,10 @@ var findQwikRoots = async (sys, packageJsonDir) => {
4132
4132
  packageJsonDir = sys.path.dirname(packageJsonDir);
4133
4133
  } while (packageJsonDir !== prevPackageJsonDir);
4134
4134
  }
4135
- return Array.from(paths).map((([path, id]) => ({
4135
+ return Array.from(paths).map(([path, id]) => ({
4136
4136
  path: path,
4137
4137
  id: id
4138
- })));
4138
+ }));
4139
4139
  };
4140
4140
 
4141
4141
  var VITE_CLIENT_MODULE = "@qwik.dev/core/vite-client";