vite 7.0.0-beta.2 → 7.0.1

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.
@@ -165,15 +165,15 @@ function withTrailingSlash(path$13) {
165
165
  }
166
166
  const AsyncFunction$1 = async function() {}.constructor;
167
167
  function promiseWithResolvers() {
168
- let resolve$5;
168
+ let resolve$4;
169
169
  let reject;
170
170
  const promise = new Promise((_resolve, _reject) => {
171
- resolve$5 = _resolve;
171
+ resolve$4 = _resolve;
172
172
  reject = _reject;
173
173
  });
174
174
  return {
175
175
  promise,
176
- resolve: resolve$5,
176
+ resolve: resolve$4,
177
177
  reject
178
178
  };
179
179
  }
@@ -185,7 +185,7 @@ const semicolon = ";".charCodeAt(0);
185
185
  const chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
186
186
  const intToChar = new Uint8Array(64);
187
187
  const charToInt = new Uint8Array(128);
188
- for (let i$1 = 0; i$1 < chars$1.length; i$1++) {
188
+ for (let i$1 = 0; i$1 < 64; i$1++) {
189
189
  const c = chars$1.charCodeAt(i$1);
190
190
  intToChar[i$1] = c;
191
191
  charToInt[c] = i$1;
@@ -512,24 +512,22 @@ function resolve$3(input, base) {
512
512
  }
513
513
 
514
514
  //#endregion
515
- //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.25/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
516
- function resolve$4(input, base) {
517
- if (base && !base.endsWith("/")) base += "/";
518
- return resolve$3(input, base);
519
- }
520
- /**
521
- * Removes everything after the last "/", but leaves the slash.
522
- */
515
+ //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.26/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
523
516
  function stripFilename(path$13) {
524
517
  if (!path$13) return "";
525
518
  const index = path$13.lastIndexOf("/");
526
519
  return path$13.slice(0, index + 1);
527
520
  }
528
- const COLUMN$1 = 0;
529
- const SOURCES_INDEX$1 = 1;
530
- const SOURCE_LINE$1 = 2;
531
- const SOURCE_COLUMN$1 = 3;
532
- const NAMES_INDEX$1 = 4;
521
+ function resolver(mapUrl, sourceRoot) {
522
+ const from = stripFilename(mapUrl);
523
+ const prefix$1 = sourceRoot ? sourceRoot + "/" : "";
524
+ return (source) => resolve$3(prefix$1 + (source || ""), from);
525
+ }
526
+ var COLUMN$1 = 0;
527
+ var SOURCES_INDEX$1 = 1;
528
+ var SOURCE_LINE$1 = 2;
529
+ var SOURCE_COLUMN$1 = 3;
530
+ var NAMES_INDEX$1 = 4;
533
531
  function maybeSort(mappings, owned) {
534
532
  const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
535
533
  if (unsortedIndex === mappings.length) return mappings;
@@ -552,23 +550,7 @@ function sortSegments(line, owned) {
552
550
  function sortComparator(a, b) {
553
551
  return a[COLUMN$1] - b[COLUMN$1];
554
552
  }
555
- let found = false;
556
- /**
557
- * A binary search implementation that returns the index if a match is found.
558
- * If no match is found, then the left-index (the index associated with the item that comes just
559
- * before the desired index) is returned. To maintain proper sort order, a splice would happen at
560
- * the next index:
561
- *
562
- * ```js
563
- * const array = [1, 3];
564
- * const needle = 2;
565
- * const index = binarySearch(array, needle, (item, needle) => item - needle);
566
- *
567
- * assert.equal(index, 0);
568
- * array.splice(index + 1, 0, needle);
569
- * assert.deepEqual(array, [1, 2, 3]);
570
- * ```
571
- */
553
+ var found = false;
572
554
  function binarySearch(haystack, needle, low, high) {
573
555
  while (low <= high) {
574
556
  const mid = low + (high - low >> 1);
@@ -598,10 +580,6 @@ function memoizedState() {
598
580
  lastIndex: -1
599
581
  };
600
582
  }
601
- /**
602
- * This overly complicated beast is just to record the last tested line/column and the resulting
603
- * index, allowing us to skip a few tests if mappings are monotonically increasing.
604
- */
605
583
  function memoizedBinarySearch(haystack, needle, state, key) {
606
584
  const { lastKey, lastNeedle, lastIndex } = state;
607
585
  let low = 0;
@@ -618,15 +596,18 @@ function memoizedBinarySearch(haystack, needle, state, key) {
618
596
  state.lastNeedle = needle;
619
597
  return state.lastIndex = binarySearch(haystack, needle, low, high);
620
598
  }
621
- const LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
622
- const COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
623
- const LEAST_UPPER_BOUND = -1;
624
- const GREATEST_LOWER_BOUND = 1;
599
+ function parse$16(map$1) {
600
+ return typeof map$1 === "string" ? JSON.parse(map$1) : map$1;
601
+ }
602
+ var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
603
+ var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
604
+ var LEAST_UPPER_BOUND = -1;
605
+ var GREATEST_LOWER_BOUND = 1;
625
606
  var TraceMap = class {
626
607
  constructor(map$1, mapUrl) {
627
608
  const isString$1 = typeof map$1 === "string";
628
609
  if (!isString$1 && map$1._decodedMemo) return map$1;
629
- const parsed = isString$1 ? JSON.parse(map$1) : map$1;
610
+ const parsed = parse$16(map$1);
630
611
  const { version: version$2, file, names, sourceRoot, sources, sourcesContent } = parsed;
631
612
  this.version = version$2;
632
613
  this.file = file;
@@ -635,47 +616,33 @@ var TraceMap = class {
635
616
  this.sources = sources;
636
617
  this.sourcesContent = sourcesContent;
637
618
  this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
638
- const from = resolve$4(sourceRoot || "", stripFilename(mapUrl));
639
- this.resolvedSources = sources.map((s$2) => resolve$4(s$2 || "", from));
619
+ const resolve$4 = resolver(mapUrl, sourceRoot);
620
+ this.resolvedSources = sources.map(resolve$4);
640
621
  const { mappings } = parsed;
641
622
  if (typeof mappings === "string") {
642
623
  this._encoded = mappings;
643
624
  this._decoded = void 0;
644
- } else {
625
+ } else if (Array.isArray(mappings)) {
645
626
  this._encoded = void 0;
646
627
  this._decoded = maybeSort(mappings, isString$1);
647
- }
628
+ } else if (parsed.sections) throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
629
+ else throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
648
630
  this._decodedMemo = memoizedState();
649
631
  this._bySources = void 0;
650
632
  this._bySourceMemos = void 0;
651
633
  }
652
634
  };
653
- /**
654
- * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
655
- * with public access modifiers.
656
- */
657
635
  function cast$2(map$1) {
658
636
  return map$1;
659
637
  }
660
- /**
661
- * Returns the encoded (VLQ string) form of the SourceMap's mappings field.
662
- */
663
638
  function encodedMappings(map$1) {
664
- var _a;
665
- var _b;
666
- return (_a = (_b = cast$2(map$1))._encoded) !== null && _a !== void 0 ? _a : _b._encoded = encode$1(cast$2(map$1)._decoded);
639
+ var _a, _b;
640
+ return (_b = (_a = cast$2(map$1))._encoded) != null ? _b : _a._encoded = encode$1(cast$2(map$1)._decoded);
667
641
  }
668
- /**
669
- * Returns the decoded (array of lines of segments) form of the SourceMap's mappings field.
670
- */
671
642
  function decodedMappings(map$1) {
672
643
  var _a;
673
644
  return (_a = cast$2(map$1))._decoded || (_a._decoded = decode(cast$2(map$1)._encoded));
674
645
  }
675
- /**
676
- * A low-level API to find the segment associated with a generated line/column (think, from a
677
- * stack trace). Line and column here are 0-based, unlike `originalPositionFor`.
678
- */
679
646
  function traceSegment(map$1, line, column) {
680
647
  const decoded = decodedMappings(map$1);
681
648
  if (line >= decoded.length) return null;
@@ -683,11 +650,6 @@ function traceSegment(map$1, line, column) {
683
650
  const index = traceSegmentInternal(segments, cast$2(map$1)._decodedMemo, line, column, GREATEST_LOWER_BOUND);
684
651
  return index === -1 ? null : segments[index];
685
652
  }
686
- /**
687
- * A higher-level API to find the source/line/column associated with a generated line/column
688
- * (think, from a stack trace). Line is 1-based, but column is 0-based, due to legacy behavior in
689
- * `source-map` library.
690
- */
691
653
  function originalPositionFor(map$1, needle) {
692
654
  let { line, column, bias } = needle;
693
655
  line--;
@@ -703,17 +665,9 @@ function originalPositionFor(map$1, needle) {
703
665
  const { names, resolvedSources } = map$1;
704
666
  return OMapping(resolvedSources[segment[SOURCES_INDEX$1]], segment[SOURCE_LINE$1] + 1, segment[SOURCE_COLUMN$1], segment.length === 5 ? names[segment[NAMES_INDEX$1]] : null);
705
667
  }
706
- /**
707
- * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
708
- * a sourcemap, or to JSON.stringify.
709
- */
710
668
  function decodedMap(map$1) {
711
669
  return clone(map$1, decodedMappings(map$1));
712
670
  }
713
- /**
714
- * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
715
- * a sourcemap, or to JSON.stringify.
716
- */
717
671
  function encodedMap(map$1) {
718
672
  return clone(map$1, encodedMappings(map$1));
719
673
  }
@@ -1779,7 +1733,7 @@ function walk$2(ast, { enter, leave }) {
1779
1733
  }
1780
1734
 
1781
1735
  //#endregion
1782
- //#region ../../node_modules/.pnpm/@rollup+pluginutils@5.1.4_rollup@4.40.1/node_modules/@rollup/pluginutils/dist/es/index.js
1736
+ //#region ../../node_modules/.pnpm/@rollup+pluginutils@5.2.0_rollup@4.40.1/node_modules/@rollup/pluginutils/dist/es/index.js
1783
1737
  const extractors = {
1784
1738
  ArrayPattern(names, param) {
1785
1739
  for (const element of param.elements) if (element) extractors[element.type](names, element);
@@ -2025,7 +1979,7 @@ let pnp;
2025
1979
  if (process.versions.pnp) try {
2026
1980
  pnp = createRequire(
2027
1981
  /** #__KEEP__ */
2028
- new URL("../../../src/node/packages.ts", import.meta.url)
1982
+ import.meta.url
2029
1983
  )("pnpapi");
2030
1984
  } catch {}
2031
1985
  function invalidatePackageData(packageCache, pkgPath) {
@@ -2274,9 +2228,9 @@ function createIsBuiltin(builtins$1) {
2274
2228
  }
2275
2229
  const nodeLikeBuiltins = [
2276
2230
  ...nodeBuiltins,
2277
- new RegExp(`^${NODE_BUILTIN_NAMESPACE}`),
2278
- new RegExp(`^${NPM_BUILTIN_NAMESPACE}`),
2279
- new RegExp(`^${BUN_BUILTIN_NAMESPACE}`)
2231
+ /* @__PURE__ */ new RegExp(`^${NODE_BUILTIN_NAMESPACE}`),
2232
+ /* @__PURE__ */ new RegExp(`^${NPM_BUILTIN_NAMESPACE}`),
2233
+ /* @__PURE__ */ new RegExp(`^${BUN_BUILTIN_NAMESPACE}`)
2280
2234
  ];
2281
2235
  function isNodeLikeBuiltin(id) {
2282
2236
  return isBuiltin(nodeLikeBuiltins, id);
@@ -2299,11 +2253,11 @@ const bareImportRE = /^(?![a-zA-Z]:)[\w@](?!.*:\/\/)/;
2299
2253
  const deepImportRE = /^([^@][^/]*)\/|^(@[^/]+\/[^/]+)\//;
2300
2254
  const _require$1 = createRequire(
2301
2255
  /** #__KEEP__ */
2302
- new URL("../../../src/node/utils.ts", import.meta.url)
2256
+ import.meta.url
2303
2257
  );
2304
2258
  const _dirname = path.dirname(fileURLToPath(
2305
2259
  /** #__KEEP__ */
2306
- new URL("../../../src/node/utils.ts", import.meta.url)
2260
+ import.meta.url
2307
2261
  ));
2308
2262
  const rollupVersion = resolvePackageData("rollup", _dirname, true)?.data.version ?? "";
2309
2263
  const filter = process.env.VITE_DEBUG_FILTER;
@@ -2385,7 +2339,7 @@ const internalPrefixes = [
2385
2339
  CLIENT_PUBLIC_PATH,
2386
2340
  ENV_PUBLIC_PATH
2387
2341
  ];
2388
- const InternalPrefixRE = new RegExp(`^(?:${internalPrefixes.join("|")})`);
2342
+ const InternalPrefixRE = /* @__PURE__ */ new RegExp(`^(?:${internalPrefixes.join("|")})`);
2389
2343
  const trailingSeparatorRE = /[?&]$/;
2390
2344
  const isImportRequest = (url$6) => importQueryRE.test(url$6);
2391
2345
  const isInternalRequest = (url$6) => InternalPrefixRE.test(url$6);
@@ -2488,21 +2442,10 @@ function posToNumber(source, pos) {
2488
2442
  function numberToPos(source, offset$1) {
2489
2443
  if (typeof offset$1 !== "number") return offset$1;
2490
2444
  if (offset$1 > source.length) throw new Error(`offset is longer than source length! offset ${offset$1} > length ${source.length}`);
2491
- const lines = source.split(splitRE);
2492
- let counted = 0;
2493
- let line = 0;
2494
- let column = 0;
2495
- for (; line < lines.length; line++) {
2496
- const lineLength = lines[line].length + 1;
2497
- if (counted + lineLength >= offset$1) {
2498
- column = offset$1 - counted + 1;
2499
- break;
2500
- }
2501
- counted += lineLength;
2502
- }
2445
+ const lines = source.slice(0, offset$1).split(splitRE);
2503
2446
  return {
2504
- line: line + 1,
2505
- column
2447
+ line: lines.length,
2448
+ column: lines[lines.length - 1].length
2506
2449
  };
2507
2450
  }
2508
2451
  function generateCodeFrame(source, start = 0, end) {
@@ -2598,7 +2541,7 @@ async function recursiveReaddir(dir) {
2598
2541
  throw e$1;
2599
2542
  }
2600
2543
  if (dirents.some((dirent) => dirent.isSymbolicLink())) {
2601
- const err$2 = new Error("Symbolic links are not supported in recursiveReaddir");
2544
+ const err$2 = /* @__PURE__ */ new Error("Symbolic links are not supported in recursiveReaddir");
2602
2545
  err$2.code = ERR_SYMLINK_IN_RECURSIVE_READDIR;
2603
2546
  throw err$2;
2604
2547
  }
@@ -2849,7 +2792,7 @@ function getHash(text, length = 8) {
2849
2792
  const requireResolveFromRootWithFallback = (root, id) => {
2850
2793
  const found$1 = resolvePackageData(id, root) || resolvePackageData(id, _dirname);
2851
2794
  if (!found$1) {
2852
- const error$1 = new Error(`${JSON.stringify(id)} not found.`);
2795
+ const error$1 = /* @__PURE__ */ new Error(`${JSON.stringify(id)} not found.`);
2853
2796
  error$1.code = "MODULE_NOT_FOUND";
2854
2797
  throw error$1;
2855
2798
  }
@@ -4032,7 +3975,7 @@ var MagicString = class MagicString {
4032
3975
  return this.trimStart(charType).trimEnd(charType);
4033
3976
  }
4034
3977
  trimEndAborted(charType) {
4035
- const rx = new RegExp((charType || "\\s") + "+$");
3978
+ const rx = /* @__PURE__ */ new RegExp((charType || "\\s") + "+$");
4036
3979
  this.outro = this.outro.replace(rx, "");
4037
3980
  if (this.outro.length) return true;
4038
3981
  let chunk = this.lastChunk;
@@ -4055,7 +3998,7 @@ var MagicString = class MagicString {
4055
3998
  return this;
4056
3999
  }
4057
4000
  trimStartAborted(charType) {
4058
- const rx = new RegExp("^" + (charType || "\\s") + "+");
4001
+ const rx = /* @__PURE__ */ new RegExp("^" + (charType || "\\s") + "+");
4059
4002
  this.intro = this.intro.replace(rx, "");
4060
4003
  if (this.intro.length) return true;
4061
4004
  let chunk = this.firstChunk;
@@ -4171,14 +4114,14 @@ var require_is_reference = __commonJS({ "../../node_modules/.pnpm/is-reference@1
4171
4114
  } });
4172
4115
 
4173
4116
  //#endregion
4174
- //#region ../../node_modules/.pnpm/@rollup+plugin-commonjs@28.0.5_rollup@4.40.1/node_modules/@rollup/plugin-commonjs/dist/es/index.js
4117
+ //#region ../../node_modules/.pnpm/@rollup+plugin-commonjs@28.0.6_rollup@4.40.1/node_modules/@rollup/plugin-commonjs/dist/es/index.js
4175
4118
  var import_commondir = __toESM(require_commondir(), 1);
4176
4119
  var import_is_reference = __toESM(require_is_reference(), 1);
4177
- var version$1 = "28.0.5";
4120
+ var version$1 = "28.0.6";
4178
4121
  var peerDependencies = { rollup: "^2.68.0||^3.0.0||^4.0.0" };
4179
- function tryParse(parse$16, code, id) {
4122
+ function tryParse(parse$17, code, id) {
4180
4123
  try {
4181
- return parse$16(code, { allowReturnOutsideFunction: true });
4124
+ return parse$17(code, { allowReturnOutsideFunction: true });
4182
4125
  } catch (err$2) {
4183
4126
  err$2.message += ` in ${id}`;
4184
4127
  throw err$2;
@@ -4190,8 +4133,8 @@ function hasCjsKeywords(code, ignoreGlobal) {
4190
4133
  const firstpass = ignoreGlobal ? firstpassNoGlobal : firstpassGlobal;
4191
4134
  return firstpass.test(code);
4192
4135
  }
4193
- function analyzeTopLevelStatements(parse$16, code, id) {
4194
- const ast = tryParse(parse$16, code, id);
4136
+ function analyzeTopLevelStatements(parse$17, code, id) {
4137
+ const ast = tryParse(parse$17, code, id);
4195
4138
  let isEsModule = false;
4196
4139
  let hasDefaultExport = false;
4197
4140
  let hasNamedExports = false;
@@ -4634,7 +4577,7 @@ function getRequireResolver(extensions$1, detectCyclesAndConditional, currentlyR
4634
4577
  }
4635
4578
  const parentRequireSet = new Set((parentRequires || []).map(({ resolved: { id } }) => id));
4636
4579
  return (await Promise.all(Object.keys(resolvedSources).map((source) => resolvedSources[source]).filter(({ id, external }) => !(external || parentRequireSet.has(id))).map(async (resolved) => {
4637
- if (isWrappedId(resolved.id, ES_IMPORT_SUFFIX)) return await getTypeForImportedModule((await this.load({ id: resolved.id })).meta.commonjs.resolved, this.load) !== IS_WRAPPED_COMMONJS;
4580
+ if (isWrappedId(resolved.id, ES_IMPORT_SUFFIX)) return await getTypeForImportedModule((await this.load(resolved)).meta.commonjs.resolved, this.load) !== IS_WRAPPED_COMMONJS;
4638
4581
  return await getTypeForImportedModule(resolved, this.load) === IS_WRAPPED_COMMONJS;
4639
4582
  }))).some((shouldTransform) => shouldTransform);
4640
4583
  },
@@ -4980,8 +4923,8 @@ function getGenerateRequireName() {
4980
4923
  }
4981
4924
  const exportsPattern = /^(?:module\.)?exports(?:\.([a-zA-Z_$][a-zA-Z_$0-9]*))?$/;
4982
4925
  const functionType = /^(?:FunctionDeclaration|FunctionExpression|ArrowFunctionExpression)$/;
4983
- async function transformCommonjs(parse$16, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) {
4984
- const ast = astCache || tryParse(parse$16, code, id);
4926
+ async function transformCommonjs(parse$17, code, id, isEsModule, ignoreGlobal, ignoreRequire, ignoreDynamicRequires, getIgnoreTryCatchRequireStatementMode, sourceMap, isDynamicRequireModulesEnabled, dynamicRequireModules, commonDir, astCache, defaultIsModuleExports, needsRequireWrapper, resolveRequireSourcesAndUpdateMeta, isRequired, checkDynamicRequire, commonjsMeta) {
4927
+ const ast = astCache || tryParse(parse$17, code, id);
4985
4928
  const magicString = new MagicString(code);
4986
4929
  const uses = {
4987
4930
  module: false,
@@ -5374,7 +5317,7 @@ function commonjs(options$1 = {}) {
5374
5317
  return getUnknownRequireProxy(actualId, isEsmExternal(actualId) ? getRequireReturnsDefault(actualId) : true);
5375
5318
  }
5376
5319
  if (id.endsWith(ENTRY_SUFFIX)) {
5377
- const acutalId = id.slice(0, -ENTRY_SUFFIX.length);
5320
+ const acutalId = id.slice(0, -15);
5378
5321
  const { meta: { commonjs: commonjsMeta } } = this.getModuleInfo(acutalId);
5379
5322
  const shebang = commonjsMeta?.shebang ?? "";
5380
5323
  return getEntryProxy(acutalId, getDefaultIsModuleExports(acutalId), this.getModuleInfo, shebang);
@@ -5732,7 +5675,7 @@ function throttle(fn) {
5732
5675
  }
5733
5676
 
5734
5677
  //#endregion
5735
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/util.js
5678
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/util.js
5736
5679
  const POSIX_SEP_RE = new RegExp("\\" + path.posix.sep, "g");
5737
5680
  const NATIVE_SEP_RE = new RegExp("\\" + path.sep, "g");
5738
5681
  /** @type {Map<string,RegExp>}*/
@@ -5759,14 +5702,14 @@ const IS_POSIX = path.posix.sep === path.sep;
5759
5702
  * @returns {{resolve:(result:T)=>void, reject:(error:any)=>void, promise: Promise<T>}}
5760
5703
  */
5761
5704
  function makePromise() {
5762
- let resolve$5, reject;
5705
+ let resolve$4, reject;
5763
5706
  const promise = new Promise((res, rej) => {
5764
- resolve$5 = res;
5707
+ resolve$4 = res;
5765
5708
  reject = rej;
5766
5709
  });
5767
5710
  return {
5768
5711
  promise,
5769
- resolve: resolve$5,
5712
+ resolve: resolve$4,
5770
5713
  reject
5771
5714
  };
5772
5715
  }
@@ -5964,7 +5907,7 @@ function replaceTokens(result) {
5964
5907
  }
5965
5908
 
5966
5909
  //#endregion
5967
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/find.js
5910
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/find.js
5968
5911
  /**
5969
5912
  * find the closest tsconfig.json file
5970
5913
  *
@@ -5978,11 +5921,11 @@ async function find(filename, options$1) {
5978
5921
  const cache$1 = options$1?.cache;
5979
5922
  const configName = options$1?.configName ?? "tsconfig.json";
5980
5923
  if (cache$1?.hasConfigPath(dir, configName)) return cache$1.getConfigPath(dir, configName);
5981
- const { promise, resolve: resolve$5, reject } = makePromise();
5924
+ const { promise, resolve: resolve$4, reject } = makePromise();
5982
5925
  if (options$1?.root && !path.isAbsolute(options$1.root)) options$1.root = path.resolve(options$1.root);
5983
5926
  findUp(dir, {
5984
5927
  promise,
5985
- resolve: resolve$5,
5928
+ resolve: resolve$4,
5986
5929
  reject
5987
5930
  }, options$1);
5988
5931
  return promise;
@@ -5993,7 +5936,7 @@ async function find(filename, options$1) {
5993
5936
  * @param {{promise:Promise<string|null>,resolve:(result:string|null)=>void,reject:(err:any)=>void}} madePromise
5994
5937
  * @param {import('./public.d.ts').TSConfckFindOptions} [options] - options
5995
5938
  */
5996
- function findUp(dir, { resolve: resolve$5, reject, promise }, options$1) {
5939
+ function findUp(dir, { resolve: resolve$4, reject, promise }, options$1) {
5997
5940
  const { cache: cache$1, root, configName } = options$1 ?? {};
5998
5941
  if (cache$1) if (cache$1.hasConfigPath(dir, configName)) {
5999
5942
  let cached;
@@ -6003,19 +5946,19 @@ function findUp(dir, { resolve: resolve$5, reject, promise }, options$1) {
6003
5946
  reject(e$1);
6004
5947
  return;
6005
5948
  }
6006
- if (cached?.then) cached.then(resolve$5).catch(reject);
6007
- else resolve$5(cached);
5949
+ if (cached?.then) cached.then(resolve$4).catch(reject);
5950
+ else resolve$4(cached);
6008
5951
  } else cache$1.setConfigPath(dir, promise, configName);
6009
5952
  const tsconfig = path.join(dir, options$1?.configName ?? "tsconfig.json");
6010
5953
  fs.stat(tsconfig, (err$2, stats) => {
6011
- if (stats && (stats.isFile() || stats.isFIFO())) resolve$5(tsconfig);
5954
+ if (stats && (stats.isFile() || stats.isFIFO())) resolve$4(tsconfig);
6012
5955
  else if (err$2?.code !== "ENOENT") reject(err$2);
6013
5956
  else {
6014
5957
  let parent;
6015
- if (root === dir || (parent = path.dirname(dir)) === dir) resolve$5(null);
5958
+ if (root === dir || (parent = path.dirname(dir)) === dir) resolve$4(null);
6016
5959
  else findUp(parent, {
6017
5960
  promise,
6018
- resolve: resolve$5,
5961
+ resolve: resolve$4,
6019
5962
  reject
6020
5963
  }, options$1);
6021
5964
  }
@@ -6023,7 +5966,7 @@ function findUp(dir, { resolve: resolve$5, reject, promise }, options$1) {
6023
5966
  }
6024
5967
 
6025
5968
  //#endregion
6026
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/find-all.js
5969
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/find-all.js
6027
5970
  /**
6028
5971
  * @typedef WalkState
6029
5972
  * @interface
@@ -6036,7 +5979,7 @@ function findUp(dir, { resolve: resolve$5, reject, promise }, options$1) {
6036
5979
  const sep$2 = path.sep;
6037
5980
 
6038
5981
  //#endregion
6039
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/to-json.js
5982
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/to-json.js
6040
5983
  /**
6041
5984
  * convert content of tsconfig.json to regular json
6042
5985
  *
@@ -6166,7 +6109,7 @@ function stripBom(string) {
6166
6109
  }
6167
6110
 
6168
6111
  //#endregion
6169
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/parse.js
6112
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/parse.js
6170
6113
  const not_found_result = {
6171
6114
  tsconfigFile: null,
6172
6115
  tsconfig: {}
@@ -6183,12 +6126,12 @@ async function parse$14(filename, options$1) {
6183
6126
  /** @type {import('./cache.js').TSConfckCache} */
6184
6127
  const cache$1 = options$1?.cache;
6185
6128
  if (cache$1?.hasParseResult(filename)) return getParsedDeep(filename, cache$1, options$1);
6186
- const { resolve: resolve$5, reject, promise } = makePromise();
6129
+ const { resolve: resolve$4, reject, promise } = makePromise();
6187
6130
  cache$1?.setParseResult(filename, promise, true);
6188
6131
  try {
6189
6132
  let tsconfigFile = await resolveTSConfigJson(filename, cache$1) || await find(filename, options$1);
6190
6133
  if (!tsconfigFile) {
6191
- resolve$5(not_found_result);
6134
+ resolve$4(not_found_result);
6192
6135
  return promise;
6193
6136
  }
6194
6137
  let result;
@@ -6198,7 +6141,7 @@ async function parse$14(filename, options$1) {
6198
6141
  await Promise.all([parseExtends(result, cache$1), parseReferences(result, options$1)]);
6199
6142
  }
6200
6143
  replaceTokens(result);
6201
- resolve$5(resolveSolutionTSConfig(filename, result));
6144
+ resolve$4(resolveSolutionTSConfig(filename, result));
6202
6145
  } catch (e$1) {
6203
6146
  reject(e$1);
6204
6147
  }
@@ -6458,7 +6401,7 @@ function isJSConfig(configFileName) {
6458
6401
  }
6459
6402
 
6460
6403
  //#endregion
6461
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/parse-native.js
6404
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/parse-native.js
6462
6405
  /** @typedef TSDiagnosticError {
6463
6406
  code: number;
6464
6407
  category: number;
@@ -6467,7 +6410,7 @@ start?: number;
6467
6410
  } TSDiagnosticError */
6468
6411
 
6469
6412
  //#endregion
6470
- //#region ../../node_modules/.pnpm/tsconfck@3.1.6_typescript@5.7.3/node_modules/tsconfck/src/cache.js
6413
+ //#region ../../node_modules/.pnpm/tsconfck@3.1.6/node_modules/tsconfck/src/cache.js
6471
6414
  /** @template T */
6472
6415
  var TSConfckCache = class {
6473
6416
  /**
@@ -6868,15 +6811,15 @@ var Worker$1 = class {
6868
6811
  }
6869
6812
  async run(...args) {
6870
6813
  const worker = await this._getAvailableWorker();
6871
- return new Promise((resolve$5, reject) => {
6872
- worker.currentResolve = resolve$5;
6814
+ return new Promise((resolve$4, reject) => {
6815
+ worker.currentResolve = resolve$4;
6873
6816
  worker.currentReject = reject;
6874
6817
  worker.postMessage({ args });
6875
6818
  });
6876
6819
  }
6877
6820
  stop() {
6878
6821
  this._pool.forEach((w$1) => w$1.unref());
6879
- this._queue.forEach(([, reject]) => reject(new Error("Main worker pool stopped before a worker was available.")));
6822
+ this._queue.forEach(([, reject]) => reject(/* @__PURE__ */ new Error("Main worker pool stopped before a worker was available.")));
6880
6823
  this._pool = [];
6881
6824
  this._idlePool = [];
6882
6825
  this._queue = [];
@@ -6923,7 +6866,7 @@ var Worker$1 = class {
6923
6866
  const i$1 = this._pool.indexOf(worker);
6924
6867
  if (i$1 > -1) this._pool.splice(i$1, 1);
6925
6868
  if (code !== 0 && worker.currentReject) {
6926
- worker.currentReject(new Error(`Worker stopped with non-0 exit code ${code}`));
6869
+ worker.currentReject(/* @__PURE__ */ new Error(`Worker stopped with non-0 exit code ${code}`));
6927
6870
  worker.currentReject = null;
6928
6871
  parentFunctionResponder.close();
6929
6872
  }
@@ -6931,20 +6874,20 @@ var Worker$1 = class {
6931
6874
  this._pool.push(worker);
6932
6875
  return worker;
6933
6876
  }
6934
- let resolve$5;
6877
+ let resolve$4;
6935
6878
  let reject;
6936
6879
  const onWorkerAvailablePromise = new Promise((r$2, rj) => {
6937
- resolve$5 = r$2;
6880
+ resolve$4 = r$2;
6938
6881
  reject = rj;
6939
6882
  });
6940
- this._queue.push([resolve$5, reject]);
6883
+ this._queue.push([resolve$4, reject]);
6941
6884
  return onWorkerAvailablePromise;
6942
6885
  }
6943
6886
  /** @internal */
6944
6887
  _assignDoneWorker(worker) {
6945
6888
  if (this._queue.length) {
6946
- const [resolve$5] = this._queue.shift();
6947
- resolve$5(worker);
6889
+ const [resolve$4] = this._queue.shift();
6890
+ resolve$4(worker);
6948
6891
  return;
6949
6892
  }
6950
6893
  this._idlePool.push(worker);
@@ -7038,13 +6981,13 @@ function genWorkerCode(fn, isModule, parentFunctions) {
7038
6981
  lock.waitUnlock();
7039
6982
  const resArgs = receive(syncPort).message;
7040
6983
  if (resArgs.isAsync) {
7041
- let resolve$5, reject;
6984
+ let resolve$4, reject;
7042
6985
  const promise = new Promise((res, rej) => {
7043
- resolve$5 = res;
6986
+ resolve$4 = res;
7044
6987
  reject = rej;
7045
6988
  });
7046
6989
  resolvers.set(id, {
7047
- resolve: resolve$5,
6990
+ resolve: resolve$4,
7048
6991
  reject
7049
6992
  });
7050
6993
  return promise;
@@ -7055,9 +6998,9 @@ function genWorkerCode(fn, isModule, parentFunctions) {
7055
6998
  asyncPort.on("message", (args) => {
7056
6999
  const id2 = args.id;
7057
7000
  if (resolvers.has(id2)) {
7058
- const { resolve: resolve$5, reject } = resolvers.get(id2);
7001
+ const { resolve: resolve$4, reject } = resolvers.get(id2);
7059
7002
  resolvers.delete(id2);
7060
- if ("result" in args) resolve$5(args.result);
7003
+ if ("result" in args) resolve$4(args.result);
7061
7004
  else reject(args.error);
7062
7005
  }
7063
7006
  });
@@ -7166,7 +7109,7 @@ const loadTerserPath = (root) => {
7166
7109
  } catch (e$1) {
7167
7110
  if (e$1.code === "MODULE_NOT_FOUND") throw new Error("terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.");
7168
7111
  else {
7169
- const message = new Error(`terser failed to load:\n${e$1.message}`);
7112
+ const message = /* @__PURE__ */ new Error(`terser failed to load:\n${e$1.message}`);
7170
7113
  message.stack = e$1.stack + "\n" + message.stack;
7171
7114
  throw message;
7172
7115
  }
@@ -8085,7 +8028,7 @@ function parse(E$1, g = "@") {
8085
8028
  const I = E$1.length + 1, w$1 = (C.__heap_base.value || C.__heap_base) + 4 * I - C.memory.buffer.byteLength;
8086
8029
  w$1 > 0 && C.memory.grow(Math.ceil(w$1 / 65536));
8087
8030
  const K = C.sa(I - 1);
8088
- if ((A ? B : Q)(E$1, new Uint16Array(C.memory.buffer, K, I)), !C.parse()) throw Object.assign(new Error(`Parse error ${g}:${E$1.slice(0, C.e()).split("\n").length}:${C.e() - E$1.lastIndexOf("\n", C.e() - 1)}`), { idx: C.e() });
8031
+ if ((A ? B : Q)(E$1, new Uint16Array(C.memory.buffer, K, I)), !C.parse()) throw Object.assign(/* @__PURE__ */ new Error(`Parse error ${g}:${E$1.slice(0, C.e()).split("\n").length}:${C.e() - E$1.lastIndexOf("\n", C.e() - 1)}`), { idx: C.e() });
8089
8032
  const o$1 = [], D = [];
8090
8033
  for (; C.ri();) {
8091
8034
  const A$1 = C.is(), Q$1 = C.ie(), B$1 = C.it(), g$1 = C.ai(), I$1 = C.id(), w$2 = C.ss(), K$1 = C.se();
@@ -8718,8 +8661,8 @@ var require_src$1 = __commonJS({ "../../node_modules/.pnpm/lilconfig@3.1.3/node_
8718
8661
  } });
8719
8662
 
8720
8663
  //#endregion
8721
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/req.js
8722
- var require_req = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/req.js"(exports, module) {
8664
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/req.js
8665
+ var require_req = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/req.js"(exports, module) {
8723
8666
  const { createRequire: createRequire$2 } = require("node:module");
8724
8667
  const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = require("node:url");
8725
8668
  const TS_EXT_RE = /\.[mc]?ts$/;
@@ -8761,8 +8704,8 @@ var require_req = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0
8761
8704
  } });
8762
8705
 
8763
8706
  //#endregion
8764
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/options.js
8765
- var require_options = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/options.js"(exports, module) {
8707
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/options.js
8708
+ var require_options = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/options.js"(exports, module) {
8766
8709
  const req$2 = require_req();
8767
8710
  /**
8768
8711
  * Load Options
@@ -8796,8 +8739,8 @@ var require_options = __commonJS({ "../../node_modules/.pnpm/postcss-load-config
8796
8739
  } });
8797
8740
 
8798
8741
  //#endregion
8799
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/plugins.js
8800
- var require_plugins = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/plugins.js"(exports, module) {
8742
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/plugins.js
8743
+ var require_plugins = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/plugins.js"(exports, module) {
8801
8744
  const req$1 = require_req();
8802
8745
  /**
8803
8746
  * Plugin Loader
@@ -8851,8 +8794,8 @@ var require_plugins = __commonJS({ "../../node_modules/.pnpm/postcss-load-config
8851
8794
  } });
8852
8795
 
8853
8796
  //#endregion
8854
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/index.js
8855
- var require_src = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.5_tsx@4.20.3_yaml@2.8.0/node_modules/postcss-load-config/src/index.js"(exports, module) {
8797
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/index.js
8798
+ var require_src = __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_postcss@8.5.6/node_modules/postcss-load-config/src/index.js"(exports, module) {
8856
8799
  const { resolve: resolve$2 } = require("node:path");
8857
8800
  const config$1 = require_src$1();
8858
8801
  const loadOptions = require_options();
@@ -9630,12 +9573,12 @@ function esbuildDepPlugin(environment, qualified, external) {
9630
9573
  scan: true,
9631
9574
  packageCache: cjsPackageCache
9632
9575
  });
9633
- const resolve$5 = (id, importer, kind, resolveDir) => {
9576
+ const resolve$4 = (id, importer, kind, resolveDir) => {
9634
9577
  let _importer;
9635
9578
  if (resolveDir) _importer = normalizePath(path.join(resolveDir, "*"));
9636
9579
  else _importer = importer in qualified ? qualified[importer] : importer;
9637
- const resolver = kind.startsWith("require") ? _resolveRequire : _resolve;
9638
- return resolver(environment, id, _importer);
9580
+ const resolver$1 = kind.startsWith("require") ? _resolveRequire : _resolve;
9581
+ return resolver$1(environment, id, _importer);
9639
9582
  };
9640
9583
  const resolveResult = (id, resolved) => {
9641
9584
  if (resolved.startsWith(browserExternalId)) return {
@@ -9660,12 +9603,12 @@ function esbuildDepPlugin(environment, qualified, external) {
9660
9603
  esmPackageCache.clear();
9661
9604
  cjsPackageCache.clear();
9662
9605
  });
9663
- build$3.onResolve({ filter: new RegExp(`\\.(` + allExternalTypes.join("|") + `)(\\?.*)?$`) }, async ({ path: id, importer, kind }) => {
9606
+ build$3.onResolve({ filter: /* @__PURE__ */ new RegExp(`\\.(` + allExternalTypes.join("|") + `)(\\?.*)?$`) }, async ({ path: id, importer, kind }) => {
9664
9607
  if (id.startsWith(convertedExternalPrefix)) return {
9665
- path: id.slice(convertedExternalPrefix.length),
9608
+ path: id.slice(29),
9666
9609
  external: true
9667
9610
  };
9668
- const resolved = await resolve$5(id, importer, kind);
9611
+ const resolved = await resolve$4(id, importer, kind);
9669
9612
  if (resolved) {
9670
9613
  if (JS_TYPES_RE.test(resolved)) return {
9671
9614
  path: resolved,
@@ -9706,7 +9649,7 @@ function esbuildDepPlugin(environment, qualified, external) {
9706
9649
  const aliased = await _resolve(environment, id, void 0, true);
9707
9650
  if (aliased && (entry = resolveEntry(aliased))) return entry;
9708
9651
  }
9709
- const resolved = await resolve$5(id, importer, kind);
9652
+ const resolved = await resolve$4(id, importer, kind);
9710
9653
  if (resolved) return resolveResult(id, resolved);
9711
9654
  });
9712
9655
  build$3.onLoad({
@@ -9744,9 +9687,9 @@ function esbuildCjsExternalPlugin(externals, platform$2) {
9744
9687
  name: "cjs-external",
9745
9688
  setup(build$3) {
9746
9689
  const filter$1 = new RegExp(externals.map(matchesEntireLine).join("|"));
9747
- build$3.onResolve({ filter: new RegExp(`^${nonFacadePrefix}`) }, (args) => {
9690
+ build$3.onResolve({ filter: /* @__PURE__ */ new RegExp(`^${nonFacadePrefix}`) }, (args) => {
9748
9691
  return {
9749
- path: args.path.slice(nonFacadePrefix.length),
9692
+ path: args.path.slice(25),
9750
9693
  external: true
9751
9694
  };
9752
9695
  });
@@ -10431,7 +10374,7 @@ async function parseImportGlob(code, importer, root, resolveId, logger) {
10431
10374
  const tasks = matches$2.map(async (match, index) => {
10432
10375
  const start = match.index;
10433
10376
  const err$2 = (msg) => {
10434
- const e$1 = new Error(`Invalid glob import syntax: ${msg}`);
10377
+ const e$1 = /* @__PURE__ */ new Error(`Invalid glob import syntax: ${msg}`);
10435
10378
  e$1.pos = start;
10436
10379
  return e$1;
10437
10380
  };
@@ -10841,7 +10784,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10841
10784
  async function resolveId(id, importer) {
10842
10785
  return environment.pluginContainer.resolveId(id, importer && normalizePath(importer), { scan: true });
10843
10786
  }
10844
- const resolve$5 = async (id, importer) => {
10787
+ const resolve$4 = async (id, importer) => {
10845
10788
  const key = id + (importer && path.dirname(importer));
10846
10789
  if (seen$1.has(key)) return seen$1.get(key);
10847
10790
  const resolved = await resolveId(id, importer);
@@ -10865,7 +10808,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10865
10808
  let transpiledContents;
10866
10809
  if (loader$1 !== "js") transpiledContents = (await transform(contents, { loader: loader$1 })).code;
10867
10810
  else transpiledContents = contents;
10868
- const result = await transformGlobImport(transpiledContents, id, environment.config.root, resolve$5);
10811
+ const result = await transformGlobImport(transpiledContents, id, environment.config.root, resolve$4);
10869
10812
  return result?.s.toString() || transpiledContents;
10870
10813
  };
10871
10814
  return {
@@ -10893,7 +10836,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10893
10836
  return scripts[path$13];
10894
10837
  });
10895
10838
  build$3.onResolve({ filter: htmlTypesRE }, async ({ path: path$13, importer }) => {
10896
- const resolved = await resolve$5(path$13, importer);
10839
+ const resolved = await resolve$4(path$13, importer);
10897
10840
  if (!resolved) return;
10898
10841
  if (isInNodeModules(resolved) && isOptimizable(resolved, optimizeDepsOptions)) return;
10899
10842
  return {
@@ -10971,7 +10914,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10971
10914
  build$3.onResolve({ filter: /^[\w@][^:]/ }, async ({ path: id, importer }) => {
10972
10915
  if (moduleListContains(exclude, id)) return externalUnlessEntry({ path: id });
10973
10916
  if (depImports[id]) return externalUnlessEntry({ path: id });
10974
- const resolved = await resolve$5(id, importer);
10917
+ const resolved = await resolve$4(id, importer);
10975
10918
  if (resolved) {
10976
10919
  if (shouldExternalizeDep(resolved, id)) return externalUnlessEntry({ path: id });
10977
10920
  if (isInNodeModules(resolved) || include?.includes(id)) {
@@ -10996,10 +10939,10 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10996
10939
  };
10997
10940
  setupExternalize(CSS_LANGS_RE, isUnlessEntry);
10998
10941
  setupExternalize(/\.(json|json5|wasm)$/, isUnlessEntry);
10999
- setupExternalize(new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`), isUnlessEntry);
10942
+ setupExternalize(/* @__PURE__ */ new RegExp(`\\.(${KNOWN_ASSET_TYPES.join("|")})$`), isUnlessEntry);
11000
10943
  setupExternalize(SPECIAL_QUERY_RE, () => true);
11001
10944
  build$3.onResolve({ filter: /.*/ }, async ({ path: id, importer }) => {
11002
- const resolved = await resolve$5(id, importer);
10945
+ const resolved = await resolve$4(id, importer);
11003
10946
  if (resolved) {
11004
10947
  if (shouldExternalizeDep(resolved, id) || !isScannable(resolved, optimizeDepsOptions.extensions)) return externalUnlessEntry({ path: id });
11005
10948
  const namespace = htmlTypesRE.test(resolved) ? "html" : void 0;
@@ -11065,18 +11008,18 @@ function isScannable(id, extensions$1) {
11065
11008
  //#region src/node/optimizer/resolve.ts
11066
11009
  function createOptimizeDepsIncludeResolver(environment) {
11067
11010
  const topLevelConfig = environment.getTopLevelConfig();
11068
- const resolve$5 = createBackCompatIdResolver(topLevelConfig, {
11011
+ const resolve$4 = createBackCompatIdResolver(topLevelConfig, {
11069
11012
  asSrc: false,
11070
11013
  scan: true,
11071
11014
  packageCache: /* @__PURE__ */ new Map()
11072
11015
  });
11073
11016
  return async (id) => {
11074
11017
  const lastArrowIndex = id.lastIndexOf(">");
11075
- if (lastArrowIndex === -1) return await resolve$5(environment, id, void 0);
11018
+ if (lastArrowIndex === -1) return await resolve$4(environment, id, void 0);
11076
11019
  const nestedRoot = id.substring(0, lastArrowIndex).trim();
11077
11020
  const nestedPath = id.substring(lastArrowIndex + 1).trim();
11078
11021
  const basedir = nestedResolveBasedir(nestedRoot, topLevelConfig.root, topLevelConfig.resolve.preserveSymlinks);
11079
- return await resolve$5(environment, nestedPath, path.resolve(basedir, "package.json"));
11022
+ return await resolve$4(environment, nestedPath, path.resolve(basedir, "package.json"));
11080
11023
  };
11081
11024
  }
11082
11025
  /**
@@ -11483,11 +11426,11 @@ async function addManuallyIncludedOptimizeDeps(environment, deps) {
11483
11426
  i$1 += globIds.length - 1;
11484
11427
  }
11485
11428
  }
11486
- const resolve$5 = createOptimizeDepsIncludeResolver(environment);
11429
+ const resolve$4 = createOptimizeDepsIncludeResolver(environment);
11487
11430
  for (const id of includes) {
11488
11431
  const normalizedId = normalizeId(id);
11489
11432
  if (!deps[normalizedId]) {
11490
- const entry = await resolve$5(id);
11433
+ const entry = await resolve$4(id);
11491
11434
  if (entry) if (isOptimizable(entry, optimizeDeps$1)) deps[normalizedId] = entry;
11492
11435
  else unableToOptimize(id, "Cannot optimize dependency");
11493
11436
  else unableToOptimize(id, "Failed to resolve dependency");
@@ -11814,12 +11757,12 @@ function shouldExternalize(environment, id, importer) {
11814
11757
  }
11815
11758
  function createIsConfiguredAsExternal(environment) {
11816
11759
  const { config: config$2 } = environment;
11817
- const { root, resolve: resolve$5 } = config$2;
11818
- const { external, noExternal } = resolve$5;
11760
+ const { root, resolve: resolve$4 } = config$2;
11761
+ const { external, noExternal } = resolve$4;
11819
11762
  const noExternalFilter = typeof noExternal !== "boolean" && !(Array.isArray(noExternal) && noExternal.length === 0) && createFilter(void 0, noExternal, { resolve: false });
11820
- const targetConditions = resolve$5.externalConditions;
11763
+ const targetConditions = resolve$4.externalConditions;
11821
11764
  const resolveOptions = {
11822
- ...resolve$5,
11765
+ ...resolve$4,
11823
11766
  root,
11824
11767
  isProduction: false,
11825
11768
  isBuild: true,
@@ -11998,7 +11941,7 @@ function resolvePlugin(resolveOptions) {
11998
11941
  load: { handler(id) {
11999
11942
  if (id.startsWith(browserExternalId)) if (isProduction) return `export default {}`;
12000
11943
  else {
12001
- id = id.slice(browserExternalId.length + 1);
11944
+ id = id.slice(24);
12002
11945
  return `\
12003
11946
  export default new Proxy({}, {
12004
11947
  get(_, key) {
@@ -12226,7 +12169,7 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
12226
12169
  packageEntryFailure(id);
12227
12170
  }
12228
12171
  function packageEntryFailure(id, details) {
12229
- const err$2 = new Error(`Failed to resolve entry for package "${id}". The package may have incorrect main/module/exports specified in its package.json` + (details ? ": " + details : "."));
12172
+ const err$2 = /* @__PURE__ */ new Error(`Failed to resolve entry for package "${id}". The package may have incorrect main/module/exports specified in its package.json` + (details ? ": " + details : "."));
12230
12173
  err$2.code = ERR_RESOLVE_PACKAGE_ENTRY_FAIL;
12231
12174
  throw err$2;
12232
12175
  }
@@ -12407,27 +12350,27 @@ function optimizedDepsPlugin() {
12407
12350
  };
12408
12351
  }
12409
12352
  function throwProcessingError(id) {
12410
- const err$2 = new Error(`Something unexpected happened while optimizing "${id}". The current page should have reloaded by now`);
12353
+ const err$2 = /* @__PURE__ */ new Error(`Something unexpected happened while optimizing "${id}". The current page should have reloaded by now`);
12411
12354
  err$2.code = ERR_OPTIMIZE_DEPS_PROCESSING_ERROR;
12412
12355
  throw err$2;
12413
12356
  }
12414
12357
  function throwOutdatedRequest(id) {
12415
- const err$2 = new Error(`There is a new version of the pre-bundle for "${id}", a page reload is going to ask for it.`);
12358
+ const err$2 = /* @__PURE__ */ new Error(`There is a new version of the pre-bundle for "${id}", a page reload is going to ask for it.`);
12416
12359
  err$2.code = ERR_OUTDATED_OPTIMIZED_DEP;
12417
12360
  throw err$2;
12418
12361
  }
12419
12362
  function throwFileNotFoundInOptimizedDep(id) {
12420
- const err$2 = new Error(`The file does not exist at "${id}" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to \`optimizeDeps.exclude\`.`);
12363
+ const err$2 = /* @__PURE__ */ new Error(`The file does not exist at "${id}" which is in the optimize deps directory. The dependency might be incompatible with the dep optimizer. Try adding it to \`optimizeDeps.exclude\`.`);
12421
12364
  err$2.code = ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR;
12422
12365
  throw err$2;
12423
12366
  }
12424
12367
 
12425
12368
  //#endregion
12426
- //#region ../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json
12427
- var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json"(exports, module) {
12369
+ //#region ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
12370
+ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json"(exports, module) {
12428
12371
  module.exports = {
12429
12372
  "name": "dotenv",
12430
- "version": "16.5.0",
12373
+ "version": "16.6.1",
12431
12374
  "description": "Loads environment variables from .env file",
12432
12375
  "main": "lib/main.js",
12433
12376
  "types": "lib/main.d.ts",
@@ -12450,7 +12393,7 @@ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_
12450
12393
  "lint": "standard",
12451
12394
  "pretest": "npm run lint && npm run dts-check",
12452
12395
  "test": "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
12453
- "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=lcov",
12396
+ "test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
12454
12397
  "prerelease": "npm test",
12455
12398
  "release": "standard-version"
12456
12399
  },
@@ -12486,8 +12429,8 @@ var require_package = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_
12486
12429
  } });
12487
12430
 
12488
12431
  //#endregion
12489
- //#region ../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js
12490
- var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js"(exports, module) {
12432
+ //#region ../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js
12433
+ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js"(exports, module) {
12491
12434
  const fs$11 = require("fs");
12492
12435
  const path$10 = require("path");
12493
12436
  const os$3 = require("os");
@@ -12515,10 +12458,12 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12515
12458
  return obj;
12516
12459
  }
12517
12460
  function _parseVault(options$1) {
12461
+ options$1 = options$1 || {};
12518
12462
  const vaultPath = _vaultPath(options$1);
12519
- const result = DotenvModule.configDotenv({ path: vaultPath });
12463
+ options$1.path = vaultPath;
12464
+ const result = DotenvModule.configDotenv(options$1);
12520
12465
  if (!result.parsed) {
12521
- const err$2 = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
12466
+ const err$2 = /* @__PURE__ */ new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`);
12522
12467
  err$2.code = "MISSING_DATA";
12523
12468
  throw err$2;
12524
12469
  }
@@ -12541,6 +12486,9 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12541
12486
  function _debug(message) {
12542
12487
  console.log(`[dotenv@${version}][DEBUG] ${message}`);
12543
12488
  }
12489
+ function _log(message) {
12490
+ console.log(`[dotenv@${version}] ${message}`);
12491
+ }
12544
12492
  function _dotenvKey(options$1) {
12545
12493
  if (options$1 && options$1.DOTENV_KEY && options$1.DOTENV_KEY.length > 0) return options$1.DOTENV_KEY;
12546
12494
  if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) return process.env.DOTENV_KEY;
@@ -12552,7 +12500,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12552
12500
  uri = new URL(dotenvKey);
12553
12501
  } catch (error$1) {
12554
12502
  if (error$1.code === "ERR_INVALID_URL") {
12555
- const err$2 = new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
12503
+ const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development");
12556
12504
  err$2.code = "INVALID_DOTENV_KEY";
12557
12505
  throw err$2;
12558
12506
  }
@@ -12560,20 +12508,20 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12560
12508
  }
12561
12509
  const key = uri.password;
12562
12510
  if (!key) {
12563
- const err$2 = new Error("INVALID_DOTENV_KEY: Missing key part");
12511
+ const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing key part");
12564
12512
  err$2.code = "INVALID_DOTENV_KEY";
12565
12513
  throw err$2;
12566
12514
  }
12567
12515
  const environment = uri.searchParams.get("environment");
12568
12516
  if (!environment) {
12569
- const err$2 = new Error("INVALID_DOTENV_KEY: Missing environment part");
12517
+ const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: Missing environment part");
12570
12518
  err$2.code = "INVALID_DOTENV_KEY";
12571
12519
  throw err$2;
12572
12520
  }
12573
12521
  const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`;
12574
12522
  const ciphertext = result.parsed[environmentKey];
12575
12523
  if (!ciphertext) {
12576
- const err$2 = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
12524
+ const err$2 = /* @__PURE__ */ new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`);
12577
12525
  err$2.code = "NOT_FOUND_DOTENV_ENVIRONMENT";
12578
12526
  throw err$2;
12579
12527
  }
@@ -12596,7 +12544,8 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12596
12544
  }
12597
12545
  function _configVault(options$1) {
12598
12546
  const debug$19 = Boolean(options$1 && options$1.debug);
12599
- if (debug$19) _debug("Loading env from encrypted .env.vault");
12547
+ const quiet = options$1 && "quiet" in options$1 ? options$1.quiet : true;
12548
+ if (debug$19 || !quiet) _log("Loading env from encrypted .env.vault");
12600
12549
  const parsed = DotenvModule._parseVault(options$1);
12601
12550
  let processEnv = process.env;
12602
12551
  if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
@@ -12607,6 +12556,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12607
12556
  const dotenvPath = path$10.resolve(process.cwd(), ".env");
12608
12557
  let encoding = "utf8";
12609
12558
  const debug$19 = Boolean(options$1 && options$1.debug);
12559
+ const quiet = options$1 && "quiet" in options$1 ? options$1.quiet : true;
12610
12560
  if (options$1 && options$1.encoding) encoding = options$1.encoding;
12611
12561
  else if (debug$19) _debug("No encoding is specified. UTF-8 is used by default");
12612
12562
  let optionPaths = [dotenvPath];
@@ -12627,6 +12577,18 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12627
12577
  let processEnv = process.env;
12628
12578
  if (options$1 && options$1.processEnv != null) processEnv = options$1.processEnv;
12629
12579
  DotenvModule.populate(processEnv, parsedAll, options$1);
12580
+ if (debug$19 || !quiet) {
12581
+ const keysCount = Object.keys(parsedAll).length;
12582
+ const shortPaths = [];
12583
+ for (const filePath of optionPaths) try {
12584
+ const relative$3 = path$10.relative(process.cwd(), filePath);
12585
+ shortPaths.push(relative$3);
12586
+ } catch (e$1) {
12587
+ if (debug$19) _debug(`Failed to load ${filePath} ${e$1.message}`);
12588
+ lastError = e$1;
12589
+ }
12590
+ _log(`injecting env (${keysCount}) from ${shortPaths.join(",")}`);
12591
+ }
12630
12592
  if (lastError) return {
12631
12593
  parsed: parsedAll,
12632
12594
  error: lastError
@@ -12657,11 +12619,11 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12657
12619
  const invalidKeyLength = error$1.message === "Invalid key length";
12658
12620
  const decryptionFailed = error$1.message === "Unsupported state or unable to authenticate data";
12659
12621
  if (isRange || invalidKeyLength) {
12660
- const err$2 = new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
12622
+ const err$2 = /* @__PURE__ */ new Error("INVALID_DOTENV_KEY: It must be 64 characters long (or more)");
12661
12623
  err$2.code = "INVALID_DOTENV_KEY";
12662
12624
  throw err$2;
12663
12625
  } else if (decryptionFailed) {
12664
- const err$2 = new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
12626
+ const err$2 = /* @__PURE__ */ new Error("DECRYPTION_FAILED: Please check your DOTENV_KEY");
12665
12627
  err$2.code = "DECRYPTION_FAILED";
12666
12628
  throw err$2;
12667
12629
  } else throw error$1;
@@ -12671,7 +12633,7 @@ var require_main$1 = __commonJS({ "../../node_modules/.pnpm/dotenv@16.5.0/node_m
12671
12633
  const debug$19 = Boolean(options$1 && options$1.debug);
12672
12634
  const override = Boolean(options$1 && options$1.override);
12673
12635
  if (typeof parsed !== "object") {
12674
- const err$2 = new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
12636
+ const err$2 = /* @__PURE__ */ new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");
12675
12637
  err$2.code = "OBJECT_REQUIRED";
12676
12638
  throw err$2;
12677
12639
  }
@@ -12834,7 +12796,7 @@ function warnFutureDeprecation(config$2, type, extraMessage, stacktrace = true)
12834
12796
  const docs = `${docsURL}/changes/${deprecationCode[type].toLowerCase()}`;
12835
12797
  msg += import_picocolors$22.default.gray(`\n ${stacktrace ? "├" : "└"}─── `) + import_picocolors$22.default.underline(docs) + "\n";
12836
12798
  if (stacktrace) {
12837
- const stack = new Error().stack;
12799
+ const stack = (/* @__PURE__ */ new Error()).stack;
12838
12800
  if (stack) {
12839
12801
  let stacks = stack.split("\n").slice(3).filter((i$1) => !i$1.includes("/node_modules/vite/dist/"));
12840
12802
  if (stacks.length === 0) stacks.push("No stack trace found.");
@@ -13143,8 +13105,8 @@ var require_debug$1 = __commonJS({ "../../node_modules/.pnpm/debug@2.6.9/node_mo
13143
13105
  for (var i$1 = 0; i$1 < len; i$1++) {
13144
13106
  if (!split[i$1]) continue;
13145
13107
  namespaces = split[i$1].replace(/\*/g, ".*?");
13146
- if (namespaces[0] === "-") exports.skips.push(new RegExp("^" + namespaces.substr(1) + "$"));
13147
- else exports.names.push(new RegExp("^" + namespaces + "$"));
13108
+ if (namespaces[0] === "-") exports.skips.push(/* @__PURE__ */ new RegExp("^" + namespaces.substr(1) + "$"));
13109
+ else exports.names.push(/* @__PURE__ */ new RegExp("^" + namespaces + "$"));
13148
13110
  }
13149
13111
  }
13150
13112
  /**
@@ -14412,7 +14374,7 @@ var require_object_assign = __commonJS({ "../../node_modules/.pnpm/object-assign
14412
14374
  function shouldUseNative() {
14413
14375
  try {
14414
14376
  if (!Object.assign) return false;
14415
- var test1 = new String("abc");
14377
+ var test1 = /* @__PURE__ */ new String("abc");
14416
14378
  test1[5] = "de";
14417
14379
  if (Object.getOwnPropertyNames(test1)[0] === "5") return false;
14418
14380
  var test2 = {};
@@ -14902,7 +14864,7 @@ var require_readdirp = __commonJS({ "../../node_modules/.pnpm/readdirp@3.6.0/nod
14902
14864
  if (entryRealPathStats.isDirectory()) {
14903
14865
  const len = entryRealPath.length;
14904
14866
  if (full.startsWith(entryRealPath) && full.substr(len, 1) === sysPath$3.sep) {
14905
- const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
14867
+ const recursiveError = /* @__PURE__ */ new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
14906
14868
  recursiveError.code = RECURSIVE_ERROR_CODE;
14907
14869
  return this._onError(recursiveError);
14908
14870
  }
@@ -14944,9 +14906,9 @@ var require_readdirp = __commonJS({ "../../node_modules/.pnpm/readdirp@3.6.0/nod
14944
14906
  return new ReaddirpStream(options$1);
14945
14907
  };
14946
14908
  const readdirpPromise = (root, options$1 = {}) => {
14947
- return new Promise((resolve$5, reject) => {
14909
+ return new Promise((resolve$4, reject) => {
14948
14910
  const files = [];
14949
- readdirp$1(root, options$1).on("data", (entry) => files.push(entry)).on("end", () => resolve$5(files)).on("error", (error$1) => reject(error$1));
14911
+ readdirp$1(root, options$1).on("data", (entry) => files.push(entry)).on("end", () => resolve$4(files)).on("error", (error$1) => reject(error$1));
14950
14912
  });
14951
14913
  };
14952
14914
  readdirp$1.promise = readdirpPromise;
@@ -15603,7 +15565,7 @@ var require_fill_range = __commonJS({ "../../node_modules/.pnpm/fill-range@7.1.1
15603
15565
  return toRegexRange(start, end, options$1);
15604
15566
  };
15605
15567
  const rangeError = (...args) => {
15606
- return new RangeError("Invalid range arguments: " + util$1.inspect(...args));
15568
+ return /* @__PURE__ */ new RangeError("Invalid range arguments: " + util$1.inspect(...args));
15607
15569
  };
15608
15570
  const invalidRange = (start, end, options$1) => {
15609
15571
  if (options$1.strictRanges === true) throw rangeError([start, end]);
@@ -16976,13 +16938,13 @@ var require_nodefs_handler = __commonJS({ "../../node_modules/.pnpm/chokidar@3.6
16976
16938
  this._addToNodeFs(path$13, initialAdd, wh, depth + 1);
16977
16939
  }
16978
16940
  }).on(EV_ERROR$2, this._boundHandleError);
16979
- return new Promise((resolve$5) => stream$1.once(STR_END$2, () => {
16941
+ return new Promise((resolve$4) => stream$1.once(STR_END$2, () => {
16980
16942
  if (this.fsw.closed) {
16981
16943
  stream$1 = void 0;
16982
16944
  return;
16983
16945
  }
16984
16946
  const wasThrottled = throttler ? throttler.clear() : false;
16985
- resolve$5();
16947
+ resolve$4();
16986
16948
  previous.getChildren().filter((item) => {
16987
16949
  return item !== directory && !current.has(item) && (!wh.hasGlob || wh.filterPath({ fullPath: sysPath$2.resolve(directory, item) }));
16988
16950
  }).forEach((item) => {
@@ -18155,7 +18117,7 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.2/n
18155
18117
  "<\\&",
18156
18118
  "[&;()|<>]"
18157
18119
  ].join("|") + ")";
18158
- var controlRE = new RegExp("^" + CONTROL + "$");
18120
+ var controlRE = /* @__PURE__ */ new RegExp("^" + CONTROL + "$");
18159
18121
  var META = "|&;()<> \\t";
18160
18122
  var SINGLE_QUOTE = "\"((\\\\\"|[^\"])*?)\"";
18161
18123
  var DOUBLE_QUOTE = "'((\\\\'|[^'])*?)'";
@@ -18166,7 +18128,7 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.2/n
18166
18128
  var TOKEN = "";
18167
18129
  var mult = 4294967296;
18168
18130
  for (var i = 0; i < 4; i++) TOKEN += (mult * Math.random()).toString(16);
18169
- var startsWithToken = new RegExp("^" + TOKEN);
18131
+ var startsWithToken = /* @__PURE__ */ new RegExp("^" + TOKEN);
18170
18132
  function matchAll(s$2, r$2) {
18171
18133
  var origIndex = r$2.lastIndex;
18172
18134
  var matches$2 = [];
@@ -18266,7 +18228,7 @@ var require_parse$1 = __commonJS({ "../../node_modules/.pnpm/shell-quote@1.8.2/n
18266
18228
  return typeof arg === "undefined" ? prev : prev.concat(arg);
18267
18229
  }, []);
18268
18230
  }
18269
- module.exports = function parse$16(s$2, env$2, opts) {
18231
+ module.exports = function parse$17(s$2, env$2, opts) {
18270
18232
  var mapped = parseInternal(s$2, env$2, opts);
18271
18233
  if (typeof env$2 !== "function") return mapped;
18272
18234
  return mapped.reduce(function(acc, s$3) {
@@ -18697,11 +18659,11 @@ async function readFileIfExists(value$1) {
18697
18659
  }
18698
18660
  async function httpServerStart(httpServer, serverOptions) {
18699
18661
  let { port, strictPort, host, logger } = serverOptions;
18700
- return new Promise((resolve$5, reject) => {
18662
+ return new Promise((resolve$4, reject) => {
18701
18663
  const onError$1 = (e$1) => {
18702
18664
  if (e$1.code === "EADDRINUSE") if (strictPort) {
18703
18665
  httpServer.removeListener("error", onError$1);
18704
- reject(new Error(`Port ${port} is already in use`));
18666
+ reject(/* @__PURE__ */ new Error(`Port ${port} is already in use`));
18705
18667
  } else {
18706
18668
  logger.info(`Port ${port} is in use, trying another one...`);
18707
18669
  httpServer.listen(++port, host);
@@ -18714,7 +18676,7 @@ async function httpServerStart(httpServer, serverOptions) {
18714
18676
  httpServer.on("error", onError$1);
18715
18677
  httpServer.listen(port, host, () => {
18716
18678
  httpServer.removeListener("error", onError$1);
18717
- resolve$5(port);
18679
+ resolve$4(port);
18718
18680
  });
18719
18681
  });
18720
18682
  }
@@ -19796,14 +19758,14 @@ const baseOpen = async (options$1) => {
19796
19758
  if (platform === "darwin" && appArguments.length > 0) cliArguments.push("--args", ...appArguments);
19797
19759
  if (options$1.target) cliArguments.push(options$1.target);
19798
19760
  const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
19799
- if (options$1.wait) return new Promise((resolve$5, reject) => {
19761
+ if (options$1.wait) return new Promise((resolve$4, reject) => {
19800
19762
  subprocess.once("error", reject);
19801
19763
  subprocess.once("close", (exitCode) => {
19802
19764
  if (!options$1.allowNonzeroExitCode && exitCode > 0) {
19803
- reject(new Error(`Exited with code ${exitCode}`));
19765
+ reject(/* @__PURE__ */ new Error(`Exited with code ${exitCode}`));
19804
19766
  return;
19805
19767
  }
19806
- resolve$5(subprocess);
19768
+ resolve$4(subprocess);
19807
19769
  });
19808
19770
  });
19809
19771
  subprocess.unref();
@@ -19933,10 +19895,10 @@ var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modu
19933
19895
  }
19934
19896
  if (!cb) {
19935
19897
  if (typeof Promise !== "function") throw new TypeError("callback not provided");
19936
- return new Promise(function(resolve$5, reject) {
19898
+ return new Promise(function(resolve$4, reject) {
19937
19899
  isexe$1(path$13, options$1 || {}, function(er, is) {
19938
19900
  if (er) reject(er);
19939
- else resolve$5(is);
19901
+ else resolve$4(is);
19940
19902
  });
19941
19903
  });
19942
19904
  }
@@ -19967,7 +19929,7 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
19967
19929
  const path$4 = require("path");
19968
19930
  const COLON = isWindows$1 ? ";" : ":";
19969
19931
  const isexe = require_isexe();
19970
- const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
19932
+ const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
19971
19933
  const getPathInfo = (cmd, opt) => {
19972
19934
  const colon = opt.colon || COLON;
19973
19935
  const pathEnv = cmd.match(/\//) || isWindows$1 && cmd.match(/\\/) ? [""] : [...isWindows$1 ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
@@ -19990,21 +19952,21 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
19990
19952
  if (!opt) opt = {};
19991
19953
  const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt);
19992
19954
  const found$1 = [];
19993
- const step = (i$1) => new Promise((resolve$5, reject) => {
19994
- if (i$1 === pathEnv.length) return opt.all && found$1.length ? resolve$5(found$1) : reject(getNotFoundError(cmd));
19955
+ const step = (i$1) => new Promise((resolve$4, reject) => {
19956
+ if (i$1 === pathEnv.length) return opt.all && found$1.length ? resolve$4(found$1) : reject(getNotFoundError(cmd));
19995
19957
  const ppRaw = pathEnv[i$1];
19996
19958
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
19997
19959
  const pCmd = path$4.join(pathPart, cmd);
19998
19960
  const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
19999
- resolve$5(subStep(p$1, i$1, 0));
19961
+ resolve$4(subStep(p$1, i$1, 0));
20000
19962
  });
20001
- const subStep = (p$1, i$1, ii) => new Promise((resolve$5, reject) => {
20002
- if (ii === pathExt.length) return resolve$5(step(i$1 + 1));
19963
+ const subStep = (p$1, i$1, ii) => new Promise((resolve$4, reject) => {
19964
+ if (ii === pathExt.length) return resolve$4(step(i$1 + 1));
20003
19965
  const ext = pathExt[ii];
20004
19966
  isexe(p$1 + ext, { pathExt: pathExtExe }, (er, is) => {
20005
19967
  if (!er && is) if (opt.all) found$1.push(p$1 + ext);
20006
- else return resolve$5(p$1 + ext);
20007
- return resolve$5(subStep(p$1, i$1, ii + 1));
19968
+ else return resolve$4(p$1 + ext);
19969
+ return resolve$4(subStep(p$1, i$1, ii + 1));
20008
19970
  });
20009
19971
  });
20010
19972
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -20208,7 +20170,7 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
20208
20170
  var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
20209
20171
  const isWin = process.platform === "win32";
20210
20172
  function notFoundError(original, syscall) {
20211
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
20173
+ return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
20212
20174
  code: "ENOENT",
20213
20175
  errno: "ENOENT",
20214
20176
  syscall: `${syscall} ${original.command}`,
@@ -20334,10 +20296,10 @@ async function startBrowserProcess(browser, browserArgs, url$6, logger) {
20334
20296
  }
20335
20297
  }
20336
20298
  function execAsync(command, options$1) {
20337
- return new Promise((resolve$5, reject) => {
20299
+ return new Promise((resolve$4, reject) => {
20338
20300
  exec(command, options$1, (error$1, stdout) => {
20339
20301
  if (error$1) reject(error$1);
20340
- else resolve$5(stdout.toString());
20302
+ else resolve$4(stdout.toString());
20341
20303
  });
20342
20304
  });
20343
20305
  }
@@ -20498,8 +20460,8 @@ function createNoopWatcher(options$1) {
20498
20460
  }
20499
20461
 
20500
20462
  //#endregion
20501
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/constants.js
20502
- var require_constants$1 = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/constants.js"(exports, module) {
20463
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js
20464
+ var require_constants$1 = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js"(exports, module) {
20503
20465
  const BINARY_TYPES$2 = [
20504
20466
  "nodebuffer",
20505
20467
  "arraybuffer",
@@ -20521,8 +20483,8 @@ var require_constants$1 = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_
20521
20483
  } });
20522
20484
 
20523
20485
  //#endregion
20524
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/buffer-util.js
20525
- var require_buffer_util = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/buffer-util.js"(exports, module) {
20486
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/buffer-util.js
20487
+ var require_buffer_util = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/buffer-util.js"(exports, module) {
20526
20488
  const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = require_constants$1();
20527
20489
  const FastBuffer$2 = Buffer[Symbol.species];
20528
20490
  /**
@@ -20622,8 +20584,8 @@ var require_buffer_util = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_
20622
20584
  } });
20623
20585
 
20624
20586
  //#endregion
20625
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/limiter.js
20626
- var require_limiter = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/limiter.js"(exports, module) {
20587
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/limiter.js
20588
+ var require_limiter = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/limiter.js"(exports, module) {
20627
20589
  const kDone = Symbol("kDone");
20628
20590
  const kRun = Symbol("kRun");
20629
20591
  /**
@@ -20674,8 +20636,8 @@ var require_limiter = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modu
20674
20636
  } });
20675
20637
 
20676
20638
  //#endregion
20677
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/permessage-deflate.js
20678
- var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
20639
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js
20640
+ var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js"(exports, module) {
20679
20641
  const zlib$1 = require("zlib");
20680
20642
  const bufferUtil = require_buffer_util();
20681
20643
  const Limiter = require_limiter();
@@ -20781,7 +20743,7 @@ var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.
20781
20743
  const callback = this._deflate[kCallback];
20782
20744
  this._deflate.close();
20783
20745
  this._deflate = null;
20784
- if (callback) callback(new Error("The deflate stream was closed while data was being processed"));
20746
+ if (callback) callback(/* @__PURE__ */ new Error("The deflate stream was closed while data was being processed"));
20785
20747
  }
20786
20748
  }
20787
20749
  /**
@@ -20987,7 +20949,7 @@ var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.
20987
20949
  this[kBuffers].push(chunk);
20988
20950
  return;
20989
20951
  }
20990
- this[kError$1] = new RangeError("Max payload size exceeded");
20952
+ this[kError$1] = /* @__PURE__ */ new RangeError("Max payload size exceeded");
20991
20953
  this[kError$1].code = "WS_ERR_UNSUPPORTED_MESSAGE_LENGTH";
20992
20954
  this[kError$1][kStatusCode$2] = 1009;
20993
20955
  this.removeListener("data", inflateOnData);
@@ -21011,8 +20973,8 @@ var require_permessage_deflate = __commonJS({ "../../node_modules/.pnpm/ws@8.18.
21011
20973
  } });
21012
20974
 
21013
20975
  //#endregion
21014
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/validation.js
21015
- var require_validation = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/validation.js"(exports, module) {
20976
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js
20977
+ var require_validation = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js"(exports, module) {
21016
20978
  const { isUtf8 } = require("buffer");
21017
20979
  const { hasBlob } = require_constants$1();
21018
20980
  const tokenChars$2 = [
@@ -21208,8 +21170,8 @@ var require_validation = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_m
21208
21170
  } });
21209
21171
 
21210
21172
  //#endregion
21211
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/receiver.js
21212
- var require_receiver = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/receiver.js"(exports, module) {
21173
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js
21174
+ var require_receiver = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js"(exports, module) {
21213
21175
  const { Writable: Writable$1 } = require("stream");
21214
21176
  const PerMessageDeflate$3 = require_permessage_deflate();
21215
21177
  const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants$1();
@@ -21674,8 +21636,8 @@ var require_receiver = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mod
21674
21636
  } });
21675
21637
 
21676
21638
  //#endregion
21677
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/sender.js
21678
- var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/sender.js"(exports, module) {
21639
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js
21640
+ var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js"(exports, module) {
21679
21641
  const { Duplex: Duplex$3 } = require("stream");
21680
21642
  const { randomFillSync } = require("crypto");
21681
21643
  const PerMessageDeflate$2 = require_permessage_deflate();
@@ -22042,7 +22004,7 @@ var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modul
22042
22004
  this._state = GET_BLOB_DATA;
22043
22005
  blob.arrayBuffer().then((arrayBuffer) => {
22044
22006
  if (this._socket.destroyed) {
22045
- const err$2 = new Error("The socket was closed while the blob was being read");
22007
+ const err$2 = /* @__PURE__ */ new Error("The socket was closed while the blob was being read");
22046
22008
  process.nextTick(callCallbacks, this, err$2, cb);
22047
22009
  return;
22048
22010
  }
@@ -22090,7 +22052,7 @@ var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modul
22090
22052
  this._state = DEFLATING;
22091
22053
  perMessageDeflate.compress(data, options$1.fin, (_, buf) => {
22092
22054
  if (this._socket.destroyed) {
22093
- const err$2 = new Error("The socket was closed while data was being compressed");
22055
+ const err$2 = /* @__PURE__ */ new Error("The socket was closed while data was being compressed");
22094
22056
  callCallbacks(this, err$2, cb);
22095
22057
  return;
22096
22058
  }
@@ -22171,8 +22133,8 @@ var require_sender = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modul
22171
22133
  } });
22172
22134
 
22173
22135
  //#endregion
22174
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/event-target.js
22175
- var require_event_target = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/event-target.js"(exports, module) {
22136
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/event-target.js
22137
+ var require_event_target = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/event-target.js"(exports, module) {
22176
22138
  const { kForOnEventAttribute: kForOnEventAttribute$1, kListener: kListener$1 } = require_constants$1();
22177
22139
  const kCode = Symbol("kCode");
22178
22140
  const kData = Symbol("kData");
@@ -22391,8 +22353,8 @@ var require_event_target = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node
22391
22353
  } });
22392
22354
 
22393
22355
  //#endregion
22394
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/extension.js
22395
- var require_extension = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/extension.js"(exports, module) {
22356
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/extension.js
22357
+ var require_extension = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/extension.js"(exports, module) {
22396
22358
  const { tokenChars: tokenChars$1 } = require_validation();
22397
22359
  /**
22398
22360
  * Adds an offer to the map of extension offers or a parameter to the map of
@@ -22535,8 +22497,8 @@ var require_extension = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mo
22535
22497
  } });
22536
22498
 
22537
22499
  //#endregion
22538
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket.js
22539
- var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket.js"(exports, module) {
22500
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js
22501
+ var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js"(exports, module) {
22540
22502
  const EventEmitter$3 = require("events");
22541
22503
  const https$3 = require("https");
22542
22504
  const http$4 = require("http");
@@ -23177,7 +23139,7 @@ var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mo
23177
23139
  try {
23178
23140
  addr = new URL$3(location$1, address);
23179
23141
  } catch (e$1) {
23180
- const err$2 = new SyntaxError(`Invalid URL: ${location$1}`);
23142
+ const err$2 = /* @__PURE__ */ new SyntaxError(`Invalid URL: ${location$1}`);
23181
23143
  emitErrorAndClose(websocket, err$2);
23182
23144
  return;
23183
23145
  }
@@ -23325,7 +23287,7 @@ var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mo
23325
23287
  else websocket._bufferedAmount += length;
23326
23288
  }
23327
23289
  if (cb) {
23328
- const err$2 = new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
23290
+ const err$2 = /* @__PURE__ */ new Error(`WebSocket is not open: readyState ${websocket.readyState} (${readyStates[websocket.readyState]})`);
23329
23291
  process.nextTick(cb, err$2);
23330
23292
  }
23331
23293
  }
@@ -23508,8 +23470,8 @@ var require_websocket = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_mo
23508
23470
  } });
23509
23471
 
23510
23472
  //#endregion
23511
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/stream.js
23512
- var require_stream = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/stream.js"(exports, module) {
23473
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js
23474
+ var require_stream = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js"(exports, module) {
23513
23475
  const WebSocket$2 = require_websocket();
23514
23476
  const { Duplex: Duplex$1 } = require("stream");
23515
23477
  /**
@@ -23625,8 +23587,8 @@ var require_stream = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modul
23625
23587
  } });
23626
23588
 
23627
23589
  //#endregion
23628
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/subprotocol.js
23629
- var require_subprotocol = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/subprotocol.js"(exports, module) {
23590
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/subprotocol.js
23591
+ var require_subprotocol = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/subprotocol.js"(exports, module) {
23630
23592
  const { tokenChars } = require_validation();
23631
23593
  /**
23632
23594
  * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
@@ -23665,8 +23627,8 @@ var require_subprotocol = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_
23665
23627
  } });
23666
23628
 
23667
23629
  //#endregion
23668
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket-server.js
23669
- var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/lib/websocket-server.js"(exports, module) {
23630
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js
23631
+ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js"(exports, module) {
23670
23632
  const EventEmitter$2 = require("events");
23671
23633
  const http$3 = require("http");
23672
23634
  const { Duplex } = require("stream");
@@ -23791,7 +23753,7 @@ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/
23791
23753
  close(cb) {
23792
23754
  if (this._state === CLOSED) {
23793
23755
  if (cb) this.once("close", () => {
23794
- cb(new Error("The server is not running"));
23756
+ cb(/* @__PURE__ */ new Error("The server is not running"));
23795
23757
  });
23796
23758
  process.nextTick(emitClose, this);
23797
23759
  return;
@@ -23860,9 +23822,9 @@ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/
23860
23822
  abortHandshakeOrEmitwsClientError(this, req$4, socket, 400, message);
23861
23823
  return;
23862
23824
  }
23863
- if (version$2 !== 8 && version$2 !== 13) {
23825
+ if (version$2 !== 13 && version$2 !== 8) {
23864
23826
  const message = "Missing or invalid Sec-WebSocket-Version header";
23865
- abortHandshakeOrEmitwsClientError(this, req$4, socket, 400, message);
23827
+ abortHandshakeOrEmitwsClientError(this, req$4, socket, 400, message, { "Sec-WebSocket-Version": "13, 8" });
23866
23828
  return;
23867
23829
  }
23868
23830
  if (!this.shouldHandle(req$4)) {
@@ -24031,19 +23993,20 @@ var require_websocket_server = __commonJS({ "../../node_modules/.pnpm/ws@8.18.2/
24031
23993
  * @param {Duplex} socket The socket of the upgrade request
24032
23994
  * @param {Number} code The HTTP response status code
24033
23995
  * @param {String} message The HTTP response body
23996
+ * @param {Object} [headers] The HTTP response headers
24034
23997
  * @private
24035
23998
  */
24036
- function abortHandshakeOrEmitwsClientError(server, req$4, socket, code, message) {
23999
+ function abortHandshakeOrEmitwsClientError(server, req$4, socket, code, message, headers) {
24037
24000
  if (server.listenerCount("wsClientError")) {
24038
24001
  const err$2 = new Error(message);
24039
24002
  Error.captureStackTrace(err$2, abortHandshakeOrEmitwsClientError);
24040
24003
  server.emit("wsClientError", err$2, socket, req$4);
24041
- } else abortHandshake(socket, code, message);
24004
+ } else abortHandshake(socket, code, message, headers);
24042
24005
  }
24043
24006
  } });
24044
24007
 
24045
24008
  //#endregion
24046
- //#region ../../node_modules/.pnpm/ws@8.18.2/node_modules/ws/wrapper.mjs
24009
+ //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/wrapper.mjs
24047
24010
  var import_stream = __toESM(require_stream(), 1);
24048
24011
  var import_receiver = __toESM(require_receiver(), 1);
24049
24012
  var import_sender = __toESM(require_sender(), 1);
@@ -24166,7 +24129,7 @@ function createWebSocketServer(server, config$2, httpsOptions) {
24166
24129
  handleInvoke: async () => ({ error: {
24167
24130
  name: "TransportError",
24168
24131
  message: "handleInvoke not implemented",
24169
- stack: new Error().stack
24132
+ stack: (/* @__PURE__ */ new Error()).stack
24170
24133
  } }),
24171
24134
  listen: noop$2,
24172
24135
  send: noop$2
@@ -24310,7 +24273,7 @@ function createWebSocketServer(server, config$2, httpsOptions) {
24310
24273
  },
24311
24274
  close() {
24312
24275
  if (hmrServerWsListener && wsServer) wsServer.off("upgrade", hmrServerWsListener);
24313
- return new Promise((resolve$5, reject) => {
24276
+ return new Promise((resolve$4, reject) => {
24314
24277
  wss.clients.forEach((client) => {
24315
24278
  client.terminate();
24316
24279
  });
@@ -24318,9 +24281,9 @@ function createWebSocketServer(server, config$2, httpsOptions) {
24318
24281
  if (err$2) reject(err$2);
24319
24282
  else if (wsHttpServer) wsHttpServer.close((err$3) => {
24320
24283
  if (err$3) reject(err$3);
24321
- else resolve$5();
24284
+ else resolve$4();
24322
24285
  });
24323
- else resolve$5();
24286
+ else resolve$4();
24324
24287
  });
24325
24288
  });
24326
24289
  }
@@ -25536,7 +25499,7 @@ var require_http_proxy$2 = __commonJS({ "../../node_modules/.pnpm/http-proxy@1.1
25536
25499
  ["target", "forward"].forEach(function(e$1) {
25537
25500
  if (typeof requestOptions[e$1] === "string") requestOptions[e$1] = parse_url(requestOptions[e$1]);
25538
25501
  });
25539
- if (!requestOptions.target && !requestOptions.forward) return this.emit("error", new Error("Must provide a proper URL as target"));
25502
+ if (!requestOptions.target && !requestOptions.forward) return this.emit("error", /* @__PURE__ */ new Error("Must provide a proper URL as target"));
25540
25503
  for (var i$1 = 0; i$1 < passes.length; i$1++)
25541
25504
  /**
25542
25505
  * Call of passes functions
@@ -26160,7 +26123,7 @@ const sirvOptions = ({ config: config$2, getHeaders, disableFsServeCheck }) => {
26160
26123
  shouldServe: disableFsServeCheck ? void 0 : (filePath) => {
26161
26124
  const servingAccessResult = checkLoadingAccess(config$2, filePath);
26162
26125
  if (servingAccessResult === "denied") {
26163
- const error$1 = new Error("denied access");
26126
+ const error$1 = /* @__PURE__ */ new Error("denied access");
26164
26127
  error$1.code = ERR_DENIED_FILE;
26165
26128
  error$1.path = filePath;
26166
26129
  throw error$1;
@@ -26389,7 +26352,7 @@ async function loadAndTransform(environment, id, url$6, options$1, timestamp, mo
26389
26352
  const prettyUrl = debugLoad || debugTransform ? prettifyUrl(url$6, config$2.root) : "";
26390
26353
  const moduleGraph = environment.moduleGraph;
26391
26354
  if (options$1.allowId && !options$1.allowId(id)) {
26392
- const err$2 = new Error(`Denied ID ${id}`);
26355
+ const err$2 = /* @__PURE__ */ new Error(`Denied ID ${id}`);
26393
26356
  err$2.code = ERR_DENIED_ID;
26394
26357
  throw err$2;
26395
26358
  }
@@ -26435,7 +26398,7 @@ async function loadAndTransform(environment, id, url$6, options$1, timestamp, mo
26435
26398
  const msg = isPublicFile ? `This file is in ${publicDirName} and will be copied as-is during build without going through the plugin transforms, and therefore should not be imported from source code. It can only be referenced via HTML tags.` : `Does the file exist?`;
26436
26399
  const importerMod = moduleGraph.idToModuleMap.get(id)?.importers.values().next().value;
26437
26400
  const importer = importerMod?.file || importerMod?.url;
26438
- const err$2 = new Error(`Failed to load url ${url$6} (resolved id: ${id})${importer ? ` in ${importer}` : ""}. ${msg}`);
26401
+ const err$2 = /* @__PURE__ */ new Error(`Failed to load url ${url$6} (resolved id: ${id})${importer ? ` in ${importer}` : ""}. ${msg}`);
26439
26402
  err$2.code = isPublicFile ? ERR_LOAD_PUBLIC_URL : ERR_LOAD_URL;
26440
26403
  throw err$2;
26441
26404
  }
@@ -26739,8 +26702,8 @@ function traverseNodes(node, visitor) {
26739
26702
  if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
26740
26703
  }
26741
26704
  async function traverseHtml(html, filePath, visitor) {
26742
- const { parse: parse$16 } = await import("./dep-BO5GbxpL.js");
26743
- const ast = parse$16(html, {
26705
+ const { parse: parse$17 } = await import("./dep-BO5GbxpL.js");
26706
+ const ast = parse$17(html, {
26744
26707
  scriptingEnabled: false,
26745
26708
  sourceCodeLocationInfo: true,
26746
26709
  onParseError: (e$1) => {
@@ -26887,7 +26850,7 @@ function buildHtmlPlugin(config$2) {
26887
26850
  inlineModuleIndex++;
26888
26851
  if (url$6 && !isExcludedUrl(url$6) && !isPublicFile) {
26889
26852
  setModuleSideEffectPromises.push(this.resolve(url$6, id).then((resolved) => {
26890
- if (!resolved) return Promise.reject(new Error(`Failed to resolve ${url$6} from ${id}`));
26853
+ if (!resolved) return Promise.reject(/* @__PURE__ */ new Error(`Failed to resolve ${url$6} from ${id}`));
26891
26854
  const moduleInfo = this.getModuleInfo(resolved.id);
26892
26855
  if (moduleInfo) moduleInfo.moduleSideEffects = true;
26893
26856
  else if (!resolved.external) return this.load(resolved).then((mod) => {
@@ -28652,13 +28615,13 @@ function createServerCloseFn(server) {
28652
28615
  server.once("listening", () => {
28653
28616
  hasListened = true;
28654
28617
  });
28655
- return () => new Promise((resolve$5, reject) => {
28618
+ return () => new Promise((resolve$4, reject) => {
28656
28619
  openSockets.forEach((s$2) => s$2.destroy());
28657
28620
  if (hasListened) server.close((err$2) => {
28658
28621
  if (err$2) reject(err$2);
28659
- else resolve$5();
28622
+ else resolve$4();
28660
28623
  });
28661
- else resolve$5();
28624
+ else resolve$4();
28662
28625
  });
28663
28626
  }
28664
28627
  function resolvedAllowDir(root, dir) {
@@ -28801,7 +28764,7 @@ const normalizeHotChannel = (channel, enableHmr, normalizeClient = true) => {
28801
28764
  if (!invokeHandlers) return { error: {
28802
28765
  name: "TransportError",
28803
28766
  message: "invokeHandlers is not set",
28804
- stack: new Error().stack
28767
+ stack: (/* @__PURE__ */ new Error()).stack
28805
28768
  } };
28806
28769
  const data = payload.data;
28807
28770
  const { name, data: args } = data;
@@ -29290,7 +29253,7 @@ function normalizeHmrUrl(url$6) {
29290
29253
  return url$6;
29291
29254
  }
29292
29255
  function error(pos) {
29293
- const err$2 = new Error("import.meta.hot.accept() can only accept string literals or an Array of string literals.");
29256
+ const err$2 = /* @__PURE__ */ new Error("import.meta.hot.accept() can only accept string literals or an Array of string literals.");
29294
29257
  err$2.pos = pos;
29295
29258
  throw err$2;
29296
29259
  }
@@ -30741,7 +30704,7 @@ const dynamicImportHelper = (glob$1, path$13, segs) => {
30741
30704
  const v = glob$1[path$13];
30742
30705
  if (v) return typeof v === "function" ? v() : Promise.resolve(v);
30743
30706
  return new Promise((_, reject) => {
30744
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path$13 + (path$13.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : ""))));
30707
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + path$13 + (path$13.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : ""))));
30745
30708
  });
30746
30709
  };
30747
30710
  function parseDynamicImportPattern(strings) {
@@ -30766,9 +30729,9 @@ function parseDynamicImportPattern(strings) {
30766
30729
  rawPattern
30767
30730
  };
30768
30731
  }
30769
- async function transformDynamicImport(importSource, importer, resolve$5, root) {
30732
+ async function transformDynamicImport(importSource, importer, resolve$4, root) {
30770
30733
  if (importSource[1] !== "." && importSource[1] !== "/") {
30771
- const resolvedFileName = await resolve$5(importSource.slice(1, -1), importer);
30734
+ const resolvedFileName = await resolve$4(importSource.slice(1, -1), importer);
30772
30735
  if (!resolvedFileName) return null;
30773
30736
  const relativeFileName = normalizePath(posix.relative(posix.dirname(normalizePath(importer)), normalizePath(resolvedFileName)));
30774
30737
  importSource = "`" + (relativeFileName[0] === "." ? "" : "./") + relativeFileName + "`";
@@ -30789,7 +30752,7 @@ async function transformDynamicImport(importSource, importer, resolve$5, root) {
30789
30752
  };
30790
30753
  }
30791
30754
  function dynamicImportVarsPlugin(config$2) {
30792
- const resolve$5 = createBackCompatIdResolver(config$2, {
30755
+ const resolve$4 = createBackCompatIdResolver(config$2, {
30793
30756
  preferRelative: true,
30794
30757
  tryIndex: false,
30795
30758
  extensions: []
@@ -30826,7 +30789,7 @@ function dynamicImportVarsPlugin(config$2) {
30826
30789
  s$2 ||= new MagicString(source);
30827
30790
  let result;
30828
30791
  try {
30829
- result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$5(environment, id, importer$1), config$2.root);
30792
+ result = await transformDynamicImport(source.slice(start, end), importer, (id, importer$1) => resolve$4(environment, id, importer$1), config$2.root);
30830
30793
  } catch (error$1) {
30831
30794
  if (environment.config.build.dynamicImportVarsOptions.warnOnError) this.warn(error$1);
30832
30795
  else this.error(error$1);
@@ -30921,7 +30884,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
30921
30884
  async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
30922
30885
  const isBuild = config$2.command === "build";
30923
30886
  const isWorker = config$2.isWorker;
30924
- const buildPlugins = isBuild ? await (await import("./dep-DZ1Lk4oF.js")).resolveBuildPlugins(config$2) : {
30887
+ const buildPlugins = isBuild ? await (await import("./dep-BTLup-s1.js")).resolveBuildPlugins(config$2) : {
30925
30888
  pre: [],
30926
30889
  post: []
30927
30890
  };
@@ -31064,7 +31027,7 @@ const debugPluginTransform = createDebugger("vite:plugin-transform", { onlyWhenF
31064
31027
  const debugPluginContainerContext = createDebugger("vite:plugin-container-context");
31065
31028
  const ERR_CLOSED_SERVER = "ERR_CLOSED_SERVER";
31066
31029
  function throwClosedServerError() {
31067
- const err$2 = new Error("The server is being restarted or closed. Request is outdated");
31030
+ const err$2 = /* @__PURE__ */ new Error("The server is being restarted or closed. Request is outdated");
31068
31031
  err$2.code = ERR_CLOSED_SERVER;
31069
31032
  throw err$2;
31070
31033
  }
@@ -31685,11 +31648,11 @@ function createPluginContainer(environments) {
31685
31648
  */
31686
31649
  function createBackCompatIdResolver(config$2, options$1) {
31687
31650
  const compatResolve = config$2.createResolver(options$1);
31688
- let resolve$5;
31651
+ let resolve$4;
31689
31652
  return async (environment, id, importer, aliasOnly) => {
31690
31653
  if (environment.name === "client" || environment.name === "ssr") return compatResolve(id, importer, aliasOnly, environment.name === "ssr");
31691
- resolve$5 ??= createIdResolver(config$2, options$1);
31692
- return resolve$5(environment, id, importer, aliasOnly);
31654
+ resolve$4 ??= createIdResolver(config$2, options$1);
31655
+ return resolve$4(environment, id, importer, aliasOnly);
31693
31656
  };
31694
31657
  }
31695
31658
  /**
@@ -31699,7 +31662,7 @@ function createBackCompatIdResolver(config$2, options$1) {
31699
31662
  function createIdResolver(config$2, options$1) {
31700
31663
  const scan = options$1?.scan;
31701
31664
  const pluginContainerMap = /* @__PURE__ */ new Map();
31702
- async function resolve$5(environment, id, importer) {
31665
+ async function resolve$4(environment, id, importer) {
31703
31666
  let pluginContainer = pluginContainerMap.get(environment);
31704
31667
  if (!pluginContainer) {
31705
31668
  pluginContainer = await createEnvironmentPluginContainer(environment, [alias({ entries: environment.config.resolve.alias }), resolvePlugin({
@@ -31726,7 +31689,7 @@ function createIdResolver(config$2, options$1) {
31726
31689
  return await pluginContainer.resolveId(id, importer, { scan });
31727
31690
  }
31728
31691
  return async (environment, id, importer, aliasOnly) => {
31729
- const resolveFn = aliasOnly ? resolveAlias : resolve$5;
31692
+ const resolveFn = aliasOnly ? resolveAlias : resolve$4;
31730
31693
  const resolved = await resolveFn(environment, id, importer);
31731
31694
  return resolved?.id;
31732
31695
  };
@@ -31750,7 +31713,7 @@ function resolveCSSOptions(options$1) {
31750
31713
  }
31751
31714
  return resolved;
31752
31715
  }
31753
- const cssModuleRE = new RegExp(`\\.module${CSS_LANGS_RE.source}`);
31716
+ const cssModuleRE = /* @__PURE__ */ new RegExp(`\\.module${CSS_LANGS_RE.source}`);
31754
31717
  const directRequestRE = /[?&]direct\b/;
31755
31718
  const htmlProxyRE = /[?&]html-proxy\b/;
31756
31719
  const htmlProxyIndexRE = /&index=(\d+)/;
@@ -32216,7 +32179,7 @@ function createCSSResolvers(config$2) {
32216
32179
  },
32217
32180
  get sass() {
32218
32181
  if (!sassResolve) {
32219
- const resolver = createBackCompatIdResolver(config$2, {
32182
+ const resolver$1 = createBackCompatIdResolver(config$2, {
32220
32183
  extensions: [
32221
32184
  ".scss",
32222
32185
  ".sass",
@@ -32234,7 +32197,7 @@ function createCSSResolvers(config$2) {
32234
32197
  });
32235
32198
  sassResolve = async (...args) => {
32236
32199
  if (args[1].startsWith("file://")) args[1] = fileURLToPath(args[1], { windows: isWindows && !fileURLWithWindowsDriveRE.test(args[1]) ? false : void 0 });
32237
- return resolver(...args);
32200
+ return resolver$1(...args);
32238
32201
  };
32239
32202
  }
32240
32203
  return sassResolve;
@@ -32456,8 +32419,8 @@ function createCachedImport(imp) {
32456
32419
  return cached;
32457
32420
  };
32458
32421
  }
32459
- const importPostcssImport = createCachedImport(() => import("./dep-BYhaRSbV.js").then(__toDynamicImportESM(1)));
32460
- const importPostcssModules = createCachedImport(() => import("./dep-8cccGkwy.js").then(__toDynamicImportESM(1)));
32422
+ const importPostcssImport = createCachedImport(() => import("./dep-DcjhO6Jt.js").then(__toDynamicImportESM(1)));
32423
+ const importPostcssModules = createCachedImport(() => import("./dep-BpPEUsd2.js").then(__toDynamicImportESM(1)));
32461
32424
  const importPostcss = createCachedImport(() => import("postcss"));
32462
32425
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
32463
32426
  let alwaysFakeWorkerWorkerControllerCache;
@@ -32739,7 +32702,7 @@ function loadPreprocessorPath(lang, root) {
32739
32702
  const installCommand = getPackageManagerCommand("install");
32740
32703
  throw new Error(`Preprocessor dependency "${lang}" not found. Did you install it? Try \`${installCommand} -D ${lang}\`.`);
32741
32704
  } else {
32742
- const message = new Error(`Preprocessor dependency "${lang}" failed to load:\n${e$1.message}`);
32705
+ const message = /* @__PURE__ */ new Error(`Preprocessor dependency "${lang}" failed to load:\n${e$1.message}`);
32743
32706
  message.stack = e$1.stack + "\n" + message.stack;
32744
32707
  throw message;
32745
32708
  }
@@ -32770,7 +32733,7 @@ function loadSss(root) {
32770
32733
  const sssPath = loadPreprocessorPath(PostCssDialectLang.sss, root);
32771
32734
  cachedSss = createRequire(
32772
32735
  /** #__KEEP__ */
32773
- new URL("../../../src/node/plugins/css.ts", import.meta.url)
32736
+ import.meta.url
32774
32737
  )(sssPath);
32775
32738
  return cachedSss;
32776
32739
  }
@@ -32795,11 +32758,16 @@ const makeScssWorker = (environment, resolvers, _maxWorkers) => {
32795
32758
  if (!isQuoted && unquotedUrl[0] === "$") return true;
32796
32759
  return unquotedUrl.startsWith("#{");
32797
32760
  };
32798
- const internalImporter = {
32761
+ const createInternalImporter = (isForRelative) => ({
32799
32762
  async canonicalize(url$6, context) {
32800
- const importer = context.containingUrl ? fileURLToPath(context.containingUrl) : options$1.filename;
32801
- const resolved = await resolvers.sass(environment, url$6, cleanScssBugUrl(importer));
32802
- if (resolved && (resolved.endsWith(".css") || resolved.endsWith(".scss") || resolved.endsWith(".sass"))) return pathToFileURL(resolved);
32763
+ if (isForRelative) {
32764
+ const resolved = new URL(url$6, context.containingUrl ?? void 0);
32765
+ if (fs.existsSync(resolved)) return resolved;
32766
+ } else {
32767
+ const importer = context.containingUrl ? fileURLToPath(context.containingUrl) : options$1.filename;
32768
+ const resolved = await resolvers.sass(environment, url$6, cleanScssBugUrl(importer));
32769
+ if (resolved && (resolved.endsWith(".css") || resolved.endsWith(".scss") || resolved.endsWith(".sass"))) return pathToFileURL(resolved);
32770
+ }
32803
32771
  return null;
32804
32772
  },
32805
32773
  async load(canonicalUrl) {
@@ -32815,9 +32783,9 @@ const makeScssWorker = (environment, resolvers, _maxWorkers) => {
32815
32783
  sourceMapUrl: canonicalUrl
32816
32784
  };
32817
32785
  }
32818
- };
32819
- sassOptions.importers = [...sassOptions.importers ?? [], internalImporter];
32820
- sassOptions.importer ??= internalImporter;
32786
+ });
32787
+ sassOptions.importers = [...sassOptions.importers ?? [], createInternalImporter(false)];
32788
+ sassOptions.importer ??= createInternalImporter(true);
32821
32789
  const result = await compiler.compileStringAsync(data, sassOptions);
32822
32790
  return {
32823
32791
  css: result.css,
@@ -32879,7 +32847,7 @@ const scssProcessor = (maxWorkers) => {
32879
32847
  * relative url() inside \@imported sass and less files must be rebased to use
32880
32848
  * root file as base.
32881
32849
  */
32882
- async function rebaseUrls(environment, file, rootFile, resolver, ignoreUrl) {
32850
+ async function rebaseUrls(environment, file, rootFile, resolver$1, ignoreUrl) {
32883
32851
  file = path.resolve(file);
32884
32852
  const fileDir = path.dirname(file);
32885
32853
  const rootDir = path.dirname(rootFile);
@@ -32893,7 +32861,7 @@ async function rebaseUrls(environment, file, rootFile, resolver, ignoreUrl) {
32893
32861
  const rebaseFn = async (unquotedUrl, rawUrl) => {
32894
32862
  if (ignoreUrl?.(unquotedUrl, rawUrl)) return false;
32895
32863
  if (unquotedUrl[0] === "/") return unquotedUrl;
32896
- const absolute = await resolver(environment, unquotedUrl, file) || path.resolve(fileDir, unquotedUrl);
32864
+ const absolute = await resolver$1(environment, unquotedUrl, file) || path.resolve(fileDir, unquotedUrl);
32897
32865
  const relative$3 = path.relative(rootDir, absolute);
32898
32866
  return normalizePath(relative$3);
32899
32867
  };
@@ -33002,7 +32970,7 @@ const lessProcessor = (maxWorkers) => {
33002
32970
  result = await worker.run(lessPath, content, optionsWithoutAdditionalData);
33003
32971
  } catch (e$1) {
33004
32972
  const error$1 = e$1;
33005
- const normalizedError = new Error(`[less] ${error$1.message || error$1.type}`);
32973
+ const normalizedError = /* @__PURE__ */ new Error(`[less] ${error$1.message || error$1.type}`);
33006
32974
  normalizedError.loc = {
33007
32975
  file: error$1.filename || options$1.filename,
33008
32976
  line: error$1.line,
@@ -33077,7 +33045,7 @@ const stylProcessor = (maxWorkers) => {
33077
33045
  deps: [...deps, ...importsDeps]
33078
33046
  };
33079
33047
  } catch (e$1) {
33080
- const wrapped = new Error(`[stylus] ${e$1.message}`);
33048
+ const wrapped = /* @__PURE__ */ new Error(`[stylus] ${e$1.message}`);
33081
33049
  wrapped.name = e$1.name;
33082
33050
  wrapped.stack = e$1.stack;
33083
33051
  return {
@@ -33190,25 +33158,25 @@ async function compileLightningCSS(environment, id, src, deps, workerController,
33190
33158
  if (publicFile) return publicFile;
33191
33159
  const atImportResolvers = getAtImportResolvers(environment.getTopLevelConfig());
33192
33160
  const lang = CSS_LANGS_RE.exec(from)?.[1];
33193
- let resolver;
33161
+ let resolver$1;
33194
33162
  switch (lang) {
33195
33163
  case "css":
33196
33164
  case "sss":
33197
33165
  case "styl":
33198
33166
  case "stylus":
33199
33167
  case void 0:
33200
- resolver = atImportResolvers.css;
33168
+ resolver$1 = atImportResolvers.css;
33201
33169
  break;
33202
33170
  case "sass":
33203
33171
  case "scss":
33204
- resolver = atImportResolvers.sass;
33172
+ resolver$1 = atImportResolvers.sass;
33205
33173
  break;
33206
33174
  case "less":
33207
- resolver = atImportResolvers.less;
33175
+ resolver$1 = atImportResolvers.less;
33208
33176
  break;
33209
33177
  default: throw new Error(`Unknown lang: ${lang}`);
33210
33178
  }
33211
- const resolved = await resolver(environment, id$1, from);
33179
+ const resolved = await resolver$1(environment, id$1, from);
33212
33180
  if (resolved) {
33213
33181
  deps.add(resolved);
33214
33182
  return resolved;
@@ -33469,7 +33437,7 @@ function preload(baseModule, deps, importerUrl) {
33469
33437
  document.head.appendChild(link);
33470
33438
  if (isCss) return new Promise((res, rej) => {
33471
33439
  link.addEventListener("load", res);
33472
- link.addEventListener("error", () => rej(new Error(`Unable to preload CSS for ${dep}`)));
33440
+ link.addEventListener("error", () => rej(/* @__PURE__ */ new Error(`Unable to preload CSS for ${dep}`)));
33473
33441
  });
33474
33442
  }));
33475
33443
  }
@@ -34004,14 +33972,14 @@ async function buildEnvironment(environment) {
34004
33972
  const { logger } = environment;
34005
33973
  const ssr = environment.config.consumer === "server";
34006
33974
  logger.info(import_picocolors$4.default.cyan(`vite v${VERSION} ${import_picocolors$4.default.green(`building ${ssr ? `SSR bundle ` : ``}for ${environment.config.mode}...`)}`));
34007
- const resolve$5 = (p$1) => path.resolve(root, p$1);
34008
- const input = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$5(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$5) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file]) => [alias$2, resolve$5(file)]))) : typeof options$1.ssr === "string" ? resolve$5(options$1.ssr) : options$1.rollupOptions.input || resolve$5("index.html");
33975
+ const resolve$4 = (p$1) => path.resolve(root, p$1);
33976
+ const input = libOptions ? options$1.rollupOptions.input || (typeof libOptions.entry === "string" ? resolve$4(libOptions.entry) : Array.isArray(libOptions.entry) ? libOptions.entry.map(resolve$4) : Object.fromEntries(Object.entries(libOptions.entry).map(([alias$2, file]) => [alias$2, resolve$4(file)]))) : typeof options$1.ssr === "string" ? resolve$4(options$1.ssr) : options$1.rollupOptions.input || resolve$4("index.html");
34009
33977
  if (ssr && typeof input === "string" && input.endsWith(".html")) throw new Error("rollupOptions.input should not be an html file when building for SSR. Please specify a dedicated SSR entry.");
34010
33978
  if (options$1.cssCodeSplit === false) {
34011
33979
  const inputs = typeof input === "string" ? [input] : Array.isArray(input) ? input : Object.values(input);
34012
33980
  if (inputs.some((input$1) => input$1.endsWith(".css"))) throw new Error(`When "build.cssCodeSplit: false" is set, "rollupOptions.input" should not include CSS files.`);
34013
33981
  }
34014
- const outDir = resolve$5(options$1.outDir);
33982
+ const outDir = resolve$4(options$1.outDir);
34015
33983
  const plugins$1 = environment.plugins.map((p$1) => injectEnvironmentToHooks(environment, p$1));
34016
33984
  const rollupOptions = {
34017
33985
  preserveEntrySignatures: ssr ? "allow-extension" : libOptions ? "strict" : false,
@@ -34546,7 +34514,7 @@ async function fetchModule(environment, url$6, importer, options$1 = {}) {
34546
34514
  builtins: environment.config.resolve.builtins
34547
34515
  });
34548
34516
  if (!resolved) {
34549
- const err$2 = new Error(`Cannot find module '${url$6}' imported from '${importer}'`);
34517
+ const err$2 = /* @__PURE__ */ new Error(`Cannot find module '${url$6}' imported from '${importer}'`);
34550
34518
  err$2.code = "ERR_MODULE_NOT_FOUND";
34551
34519
  throw err$2;
34552
34520
  }
@@ -34672,7 +34640,7 @@ function createDepsOptimizer(environment) {
34672
34640
  }
34673
34641
  environment.waitForRequestsIdle().then(onCrawlEnd);
34674
34642
  if (noDiscovery) runOptimizer();
34675
- else depsOptimizer.scanProcessing = new Promise((resolve$5) => {
34643
+ else depsOptimizer.scanProcessing = new Promise((resolve$4) => {
34676
34644
  (async () => {
34677
34645
  try {
34678
34646
  debug$1?.(import_picocolors$3.default.green(`scanning for dependencies...`));
@@ -34699,7 +34667,7 @@ function createDepsOptimizer(environment) {
34699
34667
  } catch (e$1) {
34700
34668
  logger.error(e$1.stack || e$1.message);
34701
34669
  } finally {
34702
- resolve$5();
34670
+ resolve$4();
34703
34671
  depsOptimizer.scanProcessing = void 0;
34704
34672
  }
34705
34673
  })();
@@ -35891,13 +35859,13 @@ function resolveEnvironmentOptions(options$1, alias$2, preserveSymlinks, forceOp
35891
35859
  if (pathKey$1) logger.warnOnce(import_picocolors.default.yellow(`The \`define\` option contains an object with ${JSON.stringify(pathKey$1)} for "process.env" key. It looks like you may have passed the entire \`process.env\` object to \`define\`, which can unintentionally expose all environment variables. This poses a security risk and is discouraged.`));
35892
35860
  }
35893
35861
  }
35894
- const resolve$5 = resolveEnvironmentResolveOptions(options$1.resolve, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment);
35862
+ const resolve$4 = resolveEnvironmentResolveOptions(options$1.resolve, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment);
35895
35863
  return {
35896
35864
  define: options$1.define,
35897
- resolve: resolve$5,
35865
+ resolve: resolve$4,
35898
35866
  keepProcessEnv: options$1.keepProcessEnv ?? (isSsrTargetWebworkerEnvironment ? false : consumer === "server"),
35899
35867
  consumer,
35900
- optimizeDeps: resolveDepOptimizationOptions(options$1.optimizeDeps, resolve$5.preserveSymlinks, forceOptimizeDeps, consumer),
35868
+ optimizeDeps: resolveDepOptimizationOptions(options$1.optimizeDeps, resolve$4.preserveSymlinks, forceOptimizeDeps, consumer),
35901
35869
  dev: resolveDevEnvironmentOptions(options$1.dev, environmentName, consumer, preTransformRequests),
35902
35870
  build: resolveBuildEnvironmentOptions(options$1.build ?? {}, logger, consumer),
35903
35871
  plugins: void 0
@@ -35941,23 +35909,23 @@ const clientAlias = [{
35941
35909
  * alias and preserveSymlinks are not per-environment options, but they are
35942
35910
  * included in the resolved environment options for convenience.
35943
35911
  */
35944
- function resolveEnvironmentResolveOptions(resolve$5, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment) {
35912
+ function resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks, logger, consumer, isSsrTargetWebworkerEnvironment) {
35945
35913
  const resolvedResolve = mergeWithDefaults({
35946
35914
  ...configDefaults.resolve,
35947
35915
  mainFields: consumer === void 0 || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_MAIN_FIELDS : DEFAULT_SERVER_MAIN_FIELDS,
35948
35916
  conditions: consumer === void 0 || consumer === "client" || isSsrTargetWebworkerEnvironment ? DEFAULT_CLIENT_CONDITIONS : DEFAULT_SERVER_CONDITIONS.filter((c) => c !== "browser"),
35949
- builtins: resolve$5?.builtins ?? (consumer === "server" ? isSsrTargetWebworkerEnvironment && resolve$5?.noExternal === true ? [] : nodeLikeBuiltins : [])
35950
- }, resolve$5 ?? {});
35917
+ builtins: resolve$4?.builtins ?? (consumer === "server" ? isSsrTargetWebworkerEnvironment && resolve$4?.noExternal === true ? [] : nodeLikeBuiltins : [])
35918
+ }, resolve$4 ?? {});
35951
35919
  resolvedResolve.preserveSymlinks = preserveSymlinks;
35952
35920
  resolvedResolve.alias = alias$2;
35953
- if (resolve$5?.browserField === false && resolvedResolve.mainFields.includes("browser")) logger.warn(import_picocolors.default.yellow("`resolve.browserField` is set to false, but the option is removed in favour of the 'browser' string in `resolve.mainFields`. You may want to update `resolve.mainFields` to remove the 'browser' string and preserve the previous browser behaviour."));
35921
+ if (resolve$4?.browserField === false && resolvedResolve.mainFields.includes("browser")) logger.warn(import_picocolors.default.yellow("`resolve.browserField` is set to false, but the option is removed in favour of the 'browser' string in `resolve.mainFields`. You may want to update `resolve.mainFields` to remove the 'browser' string and preserve the previous browser behaviour."));
35954
35922
  return resolvedResolve;
35955
35923
  }
35956
- function resolveResolveOptions(resolve$5, logger) {
35957
- const alias$2 = normalizeAlias(mergeAlias(clientAlias, resolve$5?.alias || configDefaults.resolve.alias));
35958
- const preserveSymlinks = resolve$5?.preserveSymlinks ?? configDefaults.resolve.preserveSymlinks;
35924
+ function resolveResolveOptions(resolve$4, logger) {
35925
+ const alias$2 = normalizeAlias(mergeAlias(clientAlias, resolve$4?.alias || configDefaults.resolve.alias));
35926
+ const preserveSymlinks = resolve$4?.preserveSymlinks ?? configDefaults.resolve.preserveSymlinks;
35959
35927
  if (alias$2.some((a) => a.find === "/")) logger.warn(import_picocolors.default.yellow("`resolve.alias` contains an alias that maps `/`. This is not recommended as it can cause unexpected behavior when resolving paths."));
35960
- return resolveEnvironmentResolveOptions(resolve$5, alias$2, preserveSymlinks, logger, void 0);
35928
+ return resolveEnvironmentResolveOptions(resolve$4, alias$2, preserveSymlinks, logger, void 0);
35961
35929
  }
35962
35930
  function resolveDepOptimizationOptions(optimizeDeps$1, preserveSymlinks, forceOptimizeDeps, consumer) {
35963
35931
  return mergeWithDefaults({
@@ -36214,12 +36182,12 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36214
36182
  getSortedPlugins: void 0,
36215
36183
  getSortedPluginHooks: void 0,
36216
36184
  createResolver(options$1) {
36217
- const resolve$5 = createIdResolver(this, options$1);
36185
+ const resolve$4 = createIdResolver(this, options$1);
36218
36186
  const clientEnvironment = new PartialEnvironment("client", this);
36219
36187
  let ssrEnvironment;
36220
36188
  return async (id, importer, aliasOnly, ssr$1) => {
36221
36189
  if (ssr$1) ssrEnvironment ??= new PartialEnvironment("ssr", this);
36222
- return await resolve$5(ssr$1 ? ssrEnvironment : clientEnvironment, id, importer, aliasOnly);
36190
+ return await resolve$4(ssr$1 ? ssrEnvironment : clientEnvironment, id, importer, aliasOnly);
36223
36191
  };
36224
36192
  },
36225
36193
  fsDenyGlob: picomatch(server.fs.deny.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`), {
@@ -36329,8 +36297,8 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
36329
36297
  return null;
36330
36298
  }
36331
36299
  try {
36332
- const resolver = configLoader === "bundle" ? bundleAndLoadConfigFile : configLoader === "runner" ? runnerImportConfigFile : nativeImportConfigFile;
36333
- const { configExport, dependencies } = await resolver(resolvedPath);
36300
+ const resolver$1 = configLoader === "bundle" ? bundleAndLoadConfigFile : configLoader === "runner" ? runnerImportConfigFile : nativeImportConfigFile;
36301
+ const { configExport, dependencies } = await resolver$1(resolvedPath);
36334
36302
  debug?.(`config file loaded in ${getTime()}`);
36335
36303
  const config$2 = await (typeof configExport === "function" ? configExport(configEnv) : configExport);
36336
36304
  if (!isObject(config$2)) throw new Error(`config must export or return an object.`);
@@ -36463,7 +36431,7 @@ async function bundleConfigFile(fileName, isESM) {
36463
36431
  }
36464
36432
  const _require = createRequire(
36465
36433
  /** #__KEEP__ */
36466
- new URL("../../../src/node/config.ts", import.meta.url)
36434
+ import.meta.url
36467
36435
  );
36468
36436
  async function loadConfigFromBundledFile(fileName, bundledCode, isESM) {
36469
36437
  if (isESM) {