vite 7.1.2 → 7.1.4

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.

Potentially problematic release.


This version of vite might be problematic. Click here for more details.

@@ -1,6 +1,5 @@
1
- import { createRequire as ___createRequire } from 'module'; const require = ___createRequire(import.meta.url);
2
- import { __commonJS, __toDynamicImportESM, __toESM } from "./dep-Drtntmtt.js";
3
- import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, defaultAllowedOrigins, loopbackHosts, wildcardHosts } from "./dep-BDCsDwBr.js";
1
+ import { __commonJS, __require, __toDynamicImportESM, __toESM } from "./dep-lCKrEJQm.js";
2
+ import { CLIENT_DIR, CLIENT_ENTRY, CLIENT_PUBLIC_PATH, CSS_LANGS_RE, DEFAULT_ASSETS_INLINE_LIMIT, DEFAULT_ASSETS_RE, DEFAULT_CLIENT_CONDITIONS, DEFAULT_CLIENT_MAIN_FIELDS, DEFAULT_CONFIG_FILES, DEFAULT_DEV_PORT, DEFAULT_EXTERNAL_CONDITIONS, DEFAULT_PREVIEW_PORT, DEFAULT_SERVER_CONDITIONS, DEFAULT_SERVER_MAIN_FIELDS, DEP_VERSION_RE, DEV_PROD_CONDITION, ENV_ENTRY, ENV_PUBLIC_PATH, ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, FS_PREFIX, JS_TYPES_RE, KNOWN_ASSET_TYPES, LogLevels, METADATA_FILENAME, OPTIMIZABLE_ENTRY_RE, ROLLUP_HOOKS, SPECIAL_QUERY_RE, VERSION, VITE_PACKAGE_DIR, createLogger, defaultAllowedOrigins, loopbackHosts, printServerUrls, require_picocolors, wildcardHosts } from "./dep-SmwnYDP9.js";
4
3
  import { builtinModules, createRequire } from "node:module";
5
4
  import { parseAst, parseAstAsync } from "rollup/parseAst";
6
5
  import * as fs$1 from "node:fs";
@@ -36,75 +35,6 @@ import { ESModulesEvaluator, ModuleRunner, createNodeImportMeta } from "vite/mod
36
35
  import zlib from "zlib";
37
36
  import * as qs from "node:querystring";
38
37
 
39
- //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
40
- var require_picocolors = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js": ((exports, module) => {
41
- let p = process || {}, argv = p.argv || [], env$1 = p.env || {};
42
- let isColorSupported = !(!!env$1.NO_COLOR || argv.includes("--no-color")) && (!!env$1.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env$1.TERM !== "dumb" || !!env$1.CI);
43
- let formatter = (open$2, close$1, replace = open$2) => (input) => {
44
- let string = "" + input, index = string.indexOf(close$1, open$2.length);
45
- return ~index ? open$2 + replaceClose(string, close$1, replace, index) + close$1 : open$2 + string + close$1;
46
- };
47
- let replaceClose = (string, close$1, replace, index) => {
48
- let result = "", cursor = 0;
49
- do {
50
- result += string.substring(cursor, index) + replace;
51
- cursor = index + close$1.length;
52
- index = string.indexOf(close$1, cursor);
53
- } while (~index);
54
- return result + string.substring(cursor);
55
- };
56
- let createColors = (enabled$1 = isColorSupported) => {
57
- let f$1 = enabled$1 ? formatter : () => String;
58
- return {
59
- isColorSupported: enabled$1,
60
- reset: f$1("\x1B[0m", "\x1B[0m"),
61
- bold: f$1("\x1B[1m", "\x1B[22m", "\x1B[22m\x1B[1m"),
62
- dim: f$1("\x1B[2m", "\x1B[22m", "\x1B[22m\x1B[2m"),
63
- italic: f$1("\x1B[3m", "\x1B[23m"),
64
- underline: f$1("\x1B[4m", "\x1B[24m"),
65
- inverse: f$1("\x1B[7m", "\x1B[27m"),
66
- hidden: f$1("\x1B[8m", "\x1B[28m"),
67
- strikethrough: f$1("\x1B[9m", "\x1B[29m"),
68
- black: f$1("\x1B[30m", "\x1B[39m"),
69
- red: f$1("\x1B[31m", "\x1B[39m"),
70
- green: f$1("\x1B[32m", "\x1B[39m"),
71
- yellow: f$1("\x1B[33m", "\x1B[39m"),
72
- blue: f$1("\x1B[34m", "\x1B[39m"),
73
- magenta: f$1("\x1B[35m", "\x1B[39m"),
74
- cyan: f$1("\x1B[36m", "\x1B[39m"),
75
- white: f$1("\x1B[37m", "\x1B[39m"),
76
- gray: f$1("\x1B[90m", "\x1B[39m"),
77
- bgBlack: f$1("\x1B[40m", "\x1B[49m"),
78
- bgRed: f$1("\x1B[41m", "\x1B[49m"),
79
- bgGreen: f$1("\x1B[42m", "\x1B[49m"),
80
- bgYellow: f$1("\x1B[43m", "\x1B[49m"),
81
- bgBlue: f$1("\x1B[44m", "\x1B[49m"),
82
- bgMagenta: f$1("\x1B[45m", "\x1B[49m"),
83
- bgCyan: f$1("\x1B[46m", "\x1B[49m"),
84
- bgWhite: f$1("\x1B[47m", "\x1B[49m"),
85
- blackBright: f$1("\x1B[90m", "\x1B[39m"),
86
- redBright: f$1("\x1B[91m", "\x1B[39m"),
87
- greenBright: f$1("\x1B[92m", "\x1B[39m"),
88
- yellowBright: f$1("\x1B[93m", "\x1B[39m"),
89
- blueBright: f$1("\x1B[94m", "\x1B[39m"),
90
- magentaBright: f$1("\x1B[95m", "\x1B[39m"),
91
- cyanBright: f$1("\x1B[96m", "\x1B[39m"),
92
- whiteBright: f$1("\x1B[97m", "\x1B[39m"),
93
- bgBlackBright: f$1("\x1B[100m", "\x1B[49m"),
94
- bgRedBright: f$1("\x1B[101m", "\x1B[49m"),
95
- bgGreenBright: f$1("\x1B[102m", "\x1B[49m"),
96
- bgYellowBright: f$1("\x1B[103m", "\x1B[49m"),
97
- bgBlueBright: f$1("\x1B[104m", "\x1B[49m"),
98
- bgMagentaBright: f$1("\x1B[105m", "\x1B[49m"),
99
- bgCyanBright: f$1("\x1B[106m", "\x1B[49m"),
100
- bgWhiteBright: f$1("\x1B[107m", "\x1B[49m")
101
- };
102
- };
103
- module.exports = createColors();
104
- module.exports.createColors = createColors;
105
- }) });
106
-
107
- //#endregion
108
38
  //#region src/shared/constants.ts
109
39
  /**
110
40
  * Prefix for resolved Ids that are not valid browser import specifiers
@@ -145,8 +75,8 @@ function unwrapId(id) {
145
75
  return id.startsWith(VALID_ID_PREFIX) ? id.slice(VALID_ID_PREFIX.length).replace(NULL_BYTE_PLACEHOLDER, "\0") : id;
146
76
  }
147
77
  const windowsSlashRE = /\\/g;
148
- function slash(p$1) {
149
- return p$1.replace(windowsSlashRE, "/");
78
+ function slash(p) {
79
+ return p.replace(windowsSlashRE, "/");
150
80
  }
151
81
  const postfixRE = /[?#].*$/;
152
82
  function cleanUrl(url$3) {
@@ -180,15 +110,15 @@ function promiseWithResolvers() {
180
110
 
181
111
  //#endregion
182
112
  //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.0/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
183
- const comma = ",".charCodeAt(0);
184
- const semicolon = ";".charCodeAt(0);
185
- const chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
186
- const intToChar = new Uint8Array(64);
187
- const charToInt = new Uint8Array(128);
113
+ const comma$1 = ",".charCodeAt(0);
114
+ const semicolon$1 = ";".charCodeAt(0);
115
+ const chars$2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
116
+ const intToChar$1 = new Uint8Array(64);
117
+ const charToInt$1 = new Uint8Array(128);
188
118
  for (let i$1 = 0; i$1 < 64; i$1++) {
189
- const c = chars$1.charCodeAt(i$1);
190
- intToChar[i$1] = c;
191
- charToInt[c] = i$1;
119
+ const c = chars$2.charCodeAt(i$1);
120
+ intToChar$1[i$1] = c;
121
+ charToInt$1[c] = i$1;
192
122
  }
193
123
  function decodeInteger(reader, relative$3) {
194
124
  let value$1 = 0;
@@ -196,7 +126,7 @@ function decodeInteger(reader, relative$3) {
196
126
  let integer = 0;
197
127
  do {
198
128
  const c = reader.next();
199
- integer = charToInt[c];
129
+ integer = charToInt$1[c];
200
130
  value$1 |= (integer & 31) << shift;
201
131
  shift += 5;
202
132
  } while (integer & 32);
@@ -205,23 +135,23 @@ function decodeInteger(reader, relative$3) {
205
135
  if (shouldNegate) value$1 = -2147483648 | -value$1;
206
136
  return relative$3 + value$1;
207
137
  }
208
- function encodeInteger(builder, num, relative$3) {
138
+ function encodeInteger$1(builder, num, relative$3) {
209
139
  let delta = num - relative$3;
210
140
  delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
211
141
  do {
212
142
  let clamped = delta & 31;
213
143
  delta >>>= 5;
214
144
  if (delta > 0) clamped |= 32;
215
- builder.write(intToChar[clamped]);
145
+ builder.write(intToChar$1[clamped]);
216
146
  } while (delta > 0);
217
147
  return num;
218
148
  }
219
149
  function hasMoreVlq(reader, max) {
220
150
  if (reader.pos >= max) return false;
221
- return reader.peek() !== comma;
151
+ return reader.peek() !== comma$1;
222
152
  }
223
- const bufLength = 1024 * 16;
224
- const td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
153
+ const bufLength$1 = 1024 * 16;
154
+ const td$1 = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
225
155
  const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
226
156
  return out.toString();
227
157
  } } : { decode(buf) {
@@ -229,23 +159,23 @@ const td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder(
229
159
  for (let i$1 = 0; i$1 < buf.length; i$1++) out += String.fromCharCode(buf[i$1]);
230
160
  return out;
231
161
  } };
232
- var StringWriter = class {
162
+ var StringWriter$1 = class {
233
163
  constructor() {
234
164
  this.pos = 0;
235
165
  this.out = "";
236
- this.buffer = new Uint8Array(bufLength);
166
+ this.buffer = new Uint8Array(bufLength$1);
237
167
  }
238
168
  write(v) {
239
169
  const { buffer } = this;
240
170
  buffer[this.pos++] = v;
241
- if (this.pos === bufLength) {
242
- this.out += td.decode(buffer);
171
+ if (this.pos === bufLength$1) {
172
+ this.out += td$1.decode(buffer);
243
173
  this.pos = 0;
244
174
  }
245
175
  }
246
176
  flush() {
247
177
  const { buffer, out, pos } = this;
248
- return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
178
+ return pos > 0 ? out + td$1.decode(buffer.subarray(0, pos)) : out;
249
179
  }
250
180
  };
251
181
  var StringReader = class {
@@ -320,27 +250,27 @@ function sort(line) {
320
250
  function sortComparator$1(a, b) {
321
251
  return a[0] - b[0];
322
252
  }
323
- function encode$1(decoded) {
324
- const writer = new StringWriter();
253
+ function encode$2(decoded) {
254
+ const writer = new StringWriter$1();
325
255
  let sourcesIndex = 0;
326
256
  let sourceLine = 0;
327
257
  let sourceColumn = 0;
328
258
  let namesIndex = 0;
329
259
  for (let i$1 = 0; i$1 < decoded.length; i$1++) {
330
260
  const line = decoded[i$1];
331
- if (i$1 > 0) writer.write(semicolon);
261
+ if (i$1 > 0) writer.write(semicolon$1);
332
262
  if (line.length === 0) continue;
333
263
  let genColumn = 0;
334
264
  for (let j = 0; j < line.length; j++) {
335
265
  const segment = line[j];
336
- if (j > 0) writer.write(comma);
337
- genColumn = encodeInteger(writer, segment[0], genColumn);
266
+ if (j > 0) writer.write(comma$1);
267
+ genColumn = encodeInteger$1(writer, segment[0], genColumn);
338
268
  if (segment.length === 1) continue;
339
- sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
340
- sourceLine = encodeInteger(writer, segment[2], sourceLine);
341
- sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
269
+ sourcesIndex = encodeInteger$1(writer, segment[1], sourcesIndex);
270
+ sourceLine = encodeInteger$1(writer, segment[2], sourceLine);
271
+ sourceColumn = encodeInteger$1(writer, segment[3], sourceColumn);
342
272
  if (segment.length === 4) continue;
343
- namesIndex = encodeInteger(writer, segment[4], namesIndex);
273
+ namesIndex = encodeInteger$1(writer, segment[4], namesIndex);
344
274
  }
345
275
  }
346
276
  return writer.flush();
@@ -512,7 +442,7 @@ function resolve$3(input, base) {
512
442
  }
513
443
 
514
444
  //#endregion
515
- //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.29/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
445
+ //#region ../../node_modules/.pnpm/@jridgewell+trace-mapping@0.3.30/node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
516
446
  function stripFilename(path$13) {
517
447
  if (!path$13) return "";
518
448
  const index = path$13.lastIndexOf("/");
@@ -637,7 +567,7 @@ function cast$1(map$1) {
637
567
  }
638
568
  function encodedMappings(map$1) {
639
569
  var _a, _b;
640
- return (_b = (_a = cast$1(map$1))._encoded) != null ? _b : _a._encoded = encode$1(cast$1(map$1)._decoded);
570
+ return (_b = (_a = cast$1(map$1))._encoded) != null ? _b : _a._encoded = encode$2(cast$1(map$1)._decoded);
641
571
  }
642
572
  function decodedMappings(map$1) {
643
573
  var _a;
@@ -783,7 +713,7 @@ function toDecodedMap(map$1) {
783
713
  }
784
714
  function toEncodedMap(map$1) {
785
715
  const decoded = toDecodedMap(map$1);
786
- return Object.assign({}, decoded, { mappings: encode$1(decoded.mappings) });
716
+ return Object.assign({}, decoded, { mappings: encode$2(decoded.mappings) });
787
717
  }
788
718
  function addSegmentInternal(skipable, map$1, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
789
719
  const { _mappings: mappings, _sources: sources, _sourcesContent: sourcesContent, _names: names } = cast2(map$1);
@@ -848,7 +778,7 @@ function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIn
848
778
  }
849
779
 
850
780
  //#endregion
851
- //#region ../../node_modules/.pnpm/@jridgewell+remapping@2.3.4/node_modules/@jridgewell/remapping/dist/remapping.mjs
781
+ //#region ../../node_modules/.pnpm/@jridgewell+remapping@2.3.5/node_modules/@jridgewell/remapping/dist/remapping.mjs
852
782
  var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
853
783
  var EMPTY_SOURCES = [];
854
784
  function SegmentObject(source, line, column, name, content, ignore) {
@@ -1092,7 +1022,7 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
1092
1022
  * This is the common logic for both the Node.js and web browser
1093
1023
  * implementations of `debug()`.
1094
1024
  */
1095
- function setup(env$2) {
1025
+ function setup(env$1) {
1096
1026
  createDebug$1.debug = createDebug$1;
1097
1027
  createDebug$1.default = createDebug$1;
1098
1028
  createDebug$1.coerce = coerce$1;
@@ -1101,8 +1031,8 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
1101
1031
  createDebug$1.enabled = enabled$1;
1102
1032
  createDebug$1.humanize = require_ms$1();
1103
1033
  createDebug$1.destroy = destroy$1;
1104
- Object.keys(env$2).forEach((key) => {
1105
- createDebug$1[key] = env$2[key];
1034
+ Object.keys(env$1).forEach((key) => {
1035
+ createDebug$1[key] = env$1[key];
1106
1036
  });
1107
1037
  /**
1108
1038
  * The currently active debug mode names, and names to skip.
@@ -1157,10 +1087,10 @@ var require_common$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/de
1157
1087
  args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format$3) => {
1158
1088
  if (match === "%%") return "%";
1159
1089
  index++;
1160
- const formatter$1 = createDebug$1.formatters[format$3];
1161
- if (typeof formatter$1 === "function") {
1090
+ const formatter = createDebug$1.formatters[format$3];
1091
+ if (typeof formatter === "function") {
1162
1092
  const val = args[index];
1163
- match = formatter$1.call(self$1, val);
1093
+ match = formatter.call(self$1, val);
1164
1094
  args.splice(index, 1);
1165
1095
  index--;
1166
1096
  }
@@ -1296,8 +1226,8 @@ var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
1296
1226
  /**
1297
1227
  * Module dependencies.
1298
1228
  */
1299
- const tty$1 = require("tty");
1300
- const util$2 = require("util");
1229
+ const tty$1 = __require("tty");
1230
+ const util$2 = __require("util");
1301
1231
  /**
1302
1232
  * This is the Node.js implementation of `debug()`.
1303
1233
  */
@@ -1320,7 +1250,7 @@ var require_node$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debu
1320
1250
  1
1321
1251
  ];
1322
1252
  try {
1323
- const supportsColor = require("supports-color");
1253
+ const supportsColor = __require("supports-color");
1324
1254
  if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) exports.colors = [
1325
1255
  20,
1326
1256
  21,
@@ -2100,7 +2030,7 @@ function traverseBetweenDirs(longerDir, shorterDir, cb) {
2100
2030
 
2101
2031
  //#endregion
2102
2032
  //#region src/node/utils.ts
2103
- var import_picocolors$34 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
2033
+ var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
2104
2034
  var import_node = /* @__PURE__ */ __toESM(require_node$1(), 1);
2105
2035
  const createFilter = createFilter$2;
2106
2036
  const replaceSlashOrColonRE = /[/:]/g;
@@ -2286,9 +2216,9 @@ async function asyncReplace(input, re, replacer) {
2286
2216
  function timeFrom(start, subtract = 0) {
2287
2217
  const time = performance$1.now() - start - subtract;
2288
2218
  const timeString = (time.toFixed(2) + `ms`).padEnd(5, " ");
2289
- if (time < 10) return import_picocolors$34.default.green(timeString);
2290
- else if (time < 50) return import_picocolors$34.default.yellow(timeString);
2291
- else return import_picocolors$34.default.red(timeString);
2219
+ if (time < 10) return import_picocolors$33.default.green(timeString);
2220
+ else if (time < 50) return import_picocolors$33.default.yellow(timeString);
2221
+ else return import_picocolors$33.default.red(timeString);
2292
2222
  }
2293
2223
  /**
2294
2224
  * pretty url for logging.
@@ -2298,8 +2228,8 @@ function prettifyUrl(url$3, root) {
2298
2228
  const isAbsoluteFile = url$3.startsWith(root);
2299
2229
  if (isAbsoluteFile || url$3.startsWith(FS_PREFIX)) {
2300
2230
  const file = path.posix.relative(root, isAbsoluteFile ? url$3 : fsPathFromId(url$3));
2301
- return import_picocolors$34.default.dim(file);
2302
- } else return import_picocolors$34.default.dim(url$3);
2231
+ return import_picocolors$33.default.dim(file);
2232
+ } else return import_picocolors$33.default.dim(url$3);
2303
2233
  }
2304
2234
  function isObject(value$1) {
2305
2235
  return Object.prototype.toString.call(value$1) === "[object Object]";
@@ -2356,6 +2286,8 @@ function numberToPos(source, offset$1) {
2356
2286
  column: lines[lines.length - 1].length
2357
2287
  };
2358
2288
  }
2289
+ const MAX_DISPLAY_LEN = 120;
2290
+ const ELLIPSIS = "...";
2359
2291
  function generateCodeFrame(source, start = 0, end) {
2360
2292
  start = Math.max(posToNumber(source, start), 0);
2361
2293
  end = Math.min(end !== void 0 ? posToNumber(source, end) : start, source.length);
@@ -2370,16 +2302,35 @@ function generateCodeFrame(source, start = 0, end) {
2370
2302
  for (let j = i$1 - range; j <= i$1 + range || end > count; j++) {
2371
2303
  if (j < 0 || j >= lines.length) continue;
2372
2304
  const line = j + 1;
2373
- res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${lines[j]}`);
2374
2305
  const lineLength = lines[j].length;
2306
+ const pad$2 = Math.max(start - (count - lineLength), 0);
2307
+ const underlineLength = Math.max(1, end > count ? lineLength - pad$2 : end - start);
2308
+ let displayLine = lines[j];
2309
+ let underlinePad = pad$2;
2310
+ if (lineLength > MAX_DISPLAY_LEN) {
2311
+ let startIdx = 0;
2312
+ if (j === i$1) {
2313
+ if (underlineLength > MAX_DISPLAY_LEN) startIdx = pad$2;
2314
+ else {
2315
+ const center = pad$2 + Math.floor(underlineLength / 2);
2316
+ startIdx = Math.max(0, center - Math.floor(MAX_DISPLAY_LEN / 2));
2317
+ }
2318
+ underlinePad = Math.max(0, pad$2 - startIdx) + (startIdx > 0 ? 3 : 0);
2319
+ }
2320
+ const prefix = startIdx > 0 ? ELLIPSIS : "";
2321
+ const suffix = lineLength - startIdx > MAX_DISPLAY_LEN ? ELLIPSIS : "";
2322
+ const sliceLen = MAX_DISPLAY_LEN - prefix.length - suffix.length;
2323
+ displayLine = prefix + displayLine.slice(startIdx, startIdx + sliceLen) + suffix;
2324
+ }
2325
+ res.push(`${line}${" ".repeat(lineNumberWidth - String(line).length)}| ${displayLine}`);
2375
2326
  if (j === i$1) {
2376
- const pad$2 = Math.max(start - (count - lineLength), 0);
2377
- const length = Math.max(1, end > count ? lineLength - pad$2 : end - start);
2378
- res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(pad$2) + "^".repeat(length));
2327
+ const underline = "^".repeat(Math.min(underlineLength, MAX_DISPLAY_LEN));
2328
+ res.push(`${" ".repeat(lineNumberWidth)}| ` + " ".repeat(underlinePad) + underline);
2379
2329
  } else if (j > i$1) {
2380
2330
  if (end > count) {
2381
2331
  const length = Math.max(Math.min(end - count, lineLength), 1);
2382
- res.push(`${" ".repeat(lineNumberWidth)}| ` + "^".repeat(length));
2332
+ const underline = "^".repeat(Math.min(length, MAX_DISPLAY_LEN));
2333
+ res.push(`${" ".repeat(lineNumberWidth)}| ` + underline);
2383
2334
  }
2384
2335
  count += lineLength + 1;
2385
2336
  }
@@ -2847,9 +2798,9 @@ const windowsDrivePathPrefixRE = /^[A-Za-z]:[/\\]/;
2847
2798
  * path.isAbsolute also returns true for drive relative paths on windows (e.g. /something)
2848
2799
  * this function returns false for them but true for absolute paths (e.g. C:/something)
2849
2800
  */
2850
- const isNonDriveRelativeAbsolutePath = (p$1) => {
2851
- if (!isWindows) return p$1[0] === "/";
2852
- return windowsDrivePathPrefixRE.test(p$1);
2801
+ const isNonDriveRelativeAbsolutePath = (p) => {
2802
+ if (!isWindows) return p[0] === "/";
2803
+ return windowsDrivePathPrefixRE.test(p);
2853
2804
  };
2854
2805
  /**
2855
2806
  * Determine if a file is being requested with the correct case, to ensure
@@ -3040,7 +2991,7 @@ function perEnvironmentPlugin(name, applyToEnvironment) {
3040
2991
  //#endregion
3041
2992
  //#region ../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js
3042
2993
  var require_commondir = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/commondir@1.0.1/node_modules/commondir/index.js": ((exports, module) => {
3043
- var path$12 = require("path");
2994
+ var path$12 = __require("path");
3044
2995
  module.exports = function(basedir, relfiles) {
3045
2996
  if (relfiles) var files = relfiles.map(function(r$2) {
3046
2997
  return path$12.resolve(basedir, r$2);
@@ -3057,7 +3008,84 @@ var require_commondir = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/c
3057
3008
  }) });
3058
3009
 
3059
3010
  //#endregion
3060
- //#region ../../node_modules/.pnpm/magic-string@0.30.17/node_modules/magic-string/dist/magic-string.es.mjs
3011
+ //#region ../../node_modules/.pnpm/@jridgewell+sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
3012
+ var comma = ",".charCodeAt(0);
3013
+ var semicolon = ";".charCodeAt(0);
3014
+ var chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
3015
+ var intToChar = new Uint8Array(64);
3016
+ var charToInt = new Uint8Array(128);
3017
+ for (let i$1 = 0; i$1 < chars$1.length; i$1++) {
3018
+ const c = chars$1.charCodeAt(i$1);
3019
+ intToChar[i$1] = c;
3020
+ charToInt[c] = i$1;
3021
+ }
3022
+ function encodeInteger(builder, num, relative$3) {
3023
+ let delta = num - relative$3;
3024
+ delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
3025
+ do {
3026
+ let clamped = delta & 31;
3027
+ delta >>>= 5;
3028
+ if (delta > 0) clamped |= 32;
3029
+ builder.write(intToChar[clamped]);
3030
+ } while (delta > 0);
3031
+ return num;
3032
+ }
3033
+ var bufLength = 1024 * 16;
3034
+ var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? { decode(buf) {
3035
+ const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
3036
+ return out.toString();
3037
+ } } : { decode(buf) {
3038
+ let out = "";
3039
+ for (let i$1 = 0; i$1 < buf.length; i$1++) out += String.fromCharCode(buf[i$1]);
3040
+ return out;
3041
+ } };
3042
+ var StringWriter = class {
3043
+ constructor() {
3044
+ this.pos = 0;
3045
+ this.out = "";
3046
+ this.buffer = new Uint8Array(bufLength);
3047
+ }
3048
+ write(v) {
3049
+ const { buffer } = this;
3050
+ buffer[this.pos++] = v;
3051
+ if (this.pos === bufLength) {
3052
+ this.out += td.decode(buffer);
3053
+ this.pos = 0;
3054
+ }
3055
+ }
3056
+ flush() {
3057
+ const { buffer, out, pos } = this;
3058
+ return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
3059
+ }
3060
+ };
3061
+ function encode$1(decoded) {
3062
+ const writer = new StringWriter();
3063
+ let sourcesIndex = 0;
3064
+ let sourceLine = 0;
3065
+ let sourceColumn = 0;
3066
+ let namesIndex = 0;
3067
+ for (let i$1 = 0; i$1 < decoded.length; i$1++) {
3068
+ const line = decoded[i$1];
3069
+ if (i$1 > 0) writer.write(semicolon);
3070
+ if (line.length === 0) continue;
3071
+ let genColumn = 0;
3072
+ for (let j = 0; j < line.length; j++) {
3073
+ const segment = line[j];
3074
+ if (j > 0) writer.write(comma);
3075
+ genColumn = encodeInteger(writer, segment[0], genColumn);
3076
+ if (segment.length === 1) continue;
3077
+ sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
3078
+ sourceLine = encodeInteger(writer, segment[2], sourceLine);
3079
+ sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
3080
+ if (segment.length === 4) continue;
3081
+ namesIndex = encodeInteger(writer, segment[4], namesIndex);
3082
+ }
3083
+ }
3084
+ return writer.flush();
3085
+ }
3086
+
3087
+ //#endregion
3088
+ //#region ../../node_modules/.pnpm/magic-string@0.30.18/node_modules/magic-string/dist/magic-string.es.mjs
3061
3089
  var BitSet = class BitSet {
3062
3090
  constructor(arg) {
3063
3091
  this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
@@ -3832,10 +3860,13 @@ var MagicString = class MagicString {
3832
3860
  _split(index) {
3833
3861
  if (this.byStart[index] || this.byEnd[index]) return;
3834
3862
  let chunk = this.lastSearchedChunk;
3863
+ let previousChunk = chunk;
3835
3864
  const searchForward = index > chunk.end;
3836
3865
  while (chunk) {
3837
3866
  if (chunk.contains(index)) return this._splitChunk(chunk, index);
3838
3867
  chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
3868
+ if (chunk === previousChunk) return;
3869
+ previousChunk = chunk;
3839
3870
  }
3840
3871
  }
3841
3872
  _splitChunk(chunk, index) {
@@ -4625,7 +4656,7 @@ function getDefinePropertyCallName(node, targetName) {
4625
4656
  if (target.type !== "MemberExpression" || target.object.name !== targetNames[0] || target.property.name !== targetNames[1]) return;
4626
4657
  }
4627
4658
  if (value$1.type !== "ObjectExpression" || !value$1.properties) return;
4628
- const valueProperty = value$1.properties.find((p$1) => p$1.key && p$1.key.name === "value");
4659
+ const valueProperty = value$1.properties.find((p) => p.key && p.key.name === "value");
4629
4660
  if (!valueProperty || !valueProperty.value) return;
4630
4661
  return {
4631
4662
  key: key.value,
@@ -5275,105 +5306,6 @@ function perEnvironmentState(initial) {
5275
5306
  };
5276
5307
  }
5277
5308
 
5278
- //#endregion
5279
- //#region src/node/logger.ts
5280
- var import_picocolors$33 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
5281
- const LogLevels = {
5282
- silent: 0,
5283
- error: 1,
5284
- warn: 2,
5285
- info: 3
5286
- };
5287
- let lastType;
5288
- let lastMsg;
5289
- let sameCount = 0;
5290
- function clearScreen() {
5291
- const repeatCount = process.stdout.rows - 2;
5292
- const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
5293
- console.log(blank);
5294
- readline.cursorTo(process.stdout, 0, 0);
5295
- readline.clearScreenDown(process.stdout);
5296
- }
5297
- let timeFormatter;
5298
- function getTimeFormatter() {
5299
- timeFormatter ??= new Intl.DateTimeFormat(void 0, {
5300
- hour: "numeric",
5301
- minute: "numeric",
5302
- second: "numeric"
5303
- });
5304
- return timeFormatter;
5305
- }
5306
- function createLogger(level = "info", options$1 = {}) {
5307
- if (options$1.customLogger) return options$1.customLogger;
5308
- const loggedErrors = /* @__PURE__ */ new WeakSet();
5309
- const { prefix = "[vite]", allowClearScreen = true, console: console$1 = globalThis.console } = options$1;
5310
- const thresh = LogLevels[level];
5311
- const canClearScreen = allowClearScreen && process.stdout.isTTY && !process.env.CI;
5312
- const clear = canClearScreen ? clearScreen : () => {};
5313
- function format$3(type, msg, options$2 = {}) {
5314
- if (options$2.timestamp) {
5315
- let tag = "";
5316
- if (type === "info") tag = import_picocolors$33.default.cyan(import_picocolors$33.default.bold(prefix));
5317
- else if (type === "warn") tag = import_picocolors$33.default.yellow(import_picocolors$33.default.bold(prefix));
5318
- else tag = import_picocolors$33.default.red(import_picocolors$33.default.bold(prefix));
5319
- const environment = options$2.environment ? options$2.environment + " " : "";
5320
- return `${import_picocolors$33.default.dim(getTimeFormatter().format(/* @__PURE__ */ new Date()))} ${tag} ${environment}${msg}`;
5321
- } else return msg;
5322
- }
5323
- function output(type, msg, options$2 = {}) {
5324
- if (thresh >= LogLevels[type]) {
5325
- const method = type === "info" ? "log" : type;
5326
- if (options$2.error) loggedErrors.add(options$2.error);
5327
- if (canClearScreen) if (type === lastType && msg === lastMsg) {
5328
- sameCount++;
5329
- clear();
5330
- console$1[method](format$3(type, msg, options$2), import_picocolors$33.default.yellow(`(x${sameCount + 1})`));
5331
- } else {
5332
- sameCount = 0;
5333
- lastMsg = msg;
5334
- lastType = type;
5335
- if (options$2.clear) clear();
5336
- console$1[method](format$3(type, msg, options$2));
5337
- }
5338
- else console$1[method](format$3(type, msg, options$2));
5339
- }
5340
- }
5341
- const warnedMessages = /* @__PURE__ */ new Set();
5342
- const logger = {
5343
- hasWarned: false,
5344
- info(msg, opts) {
5345
- output("info", msg, opts);
5346
- },
5347
- warn(msg, opts) {
5348
- logger.hasWarned = true;
5349
- output("warn", msg, opts);
5350
- },
5351
- warnOnce(msg, opts) {
5352
- if (warnedMessages.has(msg)) return;
5353
- logger.hasWarned = true;
5354
- output("warn", msg, opts);
5355
- warnedMessages.add(msg);
5356
- },
5357
- error(msg, opts) {
5358
- logger.hasWarned = true;
5359
- output("error", msg, opts);
5360
- },
5361
- clearScreen(type) {
5362
- if (thresh >= LogLevels[type]) clear();
5363
- },
5364
- hasErrorLogged(error$1) {
5365
- return loggedErrors.has(error$1);
5366
- }
5367
- };
5368
- return logger;
5369
- }
5370
- function printServerUrls(urls, optionsHost, info) {
5371
- const colorUrl = (url$3) => import_picocolors$33.default.cyan(url$3.replace(/:(\d+)\//, (_, port) => `:${import_picocolors$33.default.bold(port)}/`));
5372
- for (const url$3 of urls.local) info(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Local")}: ${colorUrl(url$3)}`);
5373
- for (const url$3 of urls.network) info(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Network")}: ${colorUrl(url$3)}`);
5374
- if (urls.network.length === 0 && optionsHost === void 0) info(import_picocolors$33.default.dim(` ${import_picocolors$33.default.green("➜")} ${import_picocolors$33.default.bold("Network")}: use `) + import_picocolors$33.default.bold("--host") + import_picocolors$33.default.dim(" to expose"));
5375
- }
5376
-
5377
5309
  //#endregion
5378
5310
  //#region src/node/plugins/reporter.ts
5379
5311
  var import_picocolors$32 = /* @__PURE__ */ __toESM(require_picocolors(), 1);
@@ -6686,7 +6618,7 @@ async function reloadOnTsconfigChange(server, changedFile) {
6686
6618
  }
6687
6619
 
6688
6620
  //#endregion
6689
- //#region ../../node_modules/.pnpm/artichokie@0.3.2/node_modules/artichokie/dist/index.js
6621
+ //#region ../../node_modules/.pnpm/artichokie@0.4.0/node_modules/artichokie/dist/index.js
6690
6622
  const AsyncFunction = async function() {}.constructor;
6691
6623
  const codeToDataUrl = (code) => `data:application/javascript,${encodeURIComponent(code + "\n//# sourceURL=[worker-eval(artichokie)]")}`;
6692
6624
  const viteSsrDynamicImport = "__vite_ssr_dynamic_import__";
@@ -6707,7 +6639,7 @@ var Worker$1 = class {
6707
6639
  _queue;
6708
6640
  constructor(fn, options$1 = {}) {
6709
6641
  this._isModule = options$1.type === "module";
6710
- this._code = genWorkerCode(fn, this._isModule, options$1.parentFunctions ?? {});
6642
+ this._code = genWorkerCode(fn, this._isModule, 5 * 1e3, options$1.parentFunctions ?? {});
6711
6643
  this._parentFunctions = options$1.parentFunctions ?? {};
6712
6644
  const defaultMax = Math.max(1, (os.availableParallelism?.() ?? os.cpus().length) - 1);
6713
6645
  this._max = options$1.max || defaultMax;
@@ -6861,15 +6793,27 @@ function createParentFunctionResponder(parentFunctions) {
6861
6793
  }
6862
6794
  };
6863
6795
  }
6864
- function genWorkerCode(fn, isModule, parentFunctions) {
6865
- const createLock = (lockState) => {
6796
+ function genWorkerCode(fn, isModule, waitTimeout, parentFunctions) {
6797
+ const createLock = (performance$2, lockState) => {
6866
6798
  return {
6867
6799
  lock: () => {
6868
6800
  Atomics.store(lockState, 0, 1);
6869
6801
  },
6870
6802
  waitUnlock: () => {
6871
- const status$1 = Atomics.wait(lockState, 0, 1, 10 * 1e3);
6872
- if (status$1 === "timed-out") throw new Error(status$1);
6803
+ let utilizationBefore;
6804
+ while (true) {
6805
+ const status$1 = Atomics.wait(lockState, 0, 1, waitTimeout);
6806
+ if (status$1 === "timed-out") {
6807
+ if (utilizationBefore === void 0) {
6808
+ utilizationBefore = performance$2.eventLoopUtilization();
6809
+ continue;
6810
+ }
6811
+ utilizationBefore = performance$2.eventLoopUtilization(utilizationBefore);
6812
+ if (utilizationBefore.utilization > .9) continue;
6813
+ throw new Error(status$1);
6814
+ }
6815
+ break;
6816
+ }
6873
6817
  }
6874
6818
  };
6875
6819
  };
@@ -6915,13 +6859,15 @@ function genWorkerCode(fn, isModule, parentFunctions) {
6915
6859
  const fnString = fn.toString().replaceAll(viteSsrDynamicImport, "import");
6916
6860
  return `
6917
6861
  ${isModule ? "import { parentPort, receiveMessageOnPort, workerData } from 'worker_threads'" : "const { parentPort, receiveMessageOnPort, workerData } = require('worker_threads')"}
6862
+ ${isModule ? "import { performance } from 'node:perf_hooks'" : "const { performance } = require('node:perf_hooks')"}
6918
6863
  const [parentFunctionSyncMessagePort, parentFunctionAsyncMessagePort, lockState] = workerData
6864
+ const waitTimeout = ${waitTimeout}
6919
6865
  const createLock = ${createLock.toString()}
6920
6866
  const parentFunctionRequester = (${createParentFunctionRequester.toString()})(
6921
6867
  parentFunctionSyncMessagePort,
6922
6868
  parentFunctionAsyncMessagePort,
6923
6869
  receiveMessageOnPort,
6924
- createLock(lockState)
6870
+ createLock(performance, lockState)
6925
6871
  )
6926
6872
 
6927
6873
  const doWorkPromise = (async () => {
@@ -7025,8 +6971,15 @@ const loadTerserPath = (root) => {
7025
6971
  function terserPlugin(config$2) {
7026
6972
  const { maxWorkers,...terserOptions } = config$2.build.terserOptions;
7027
6973
  const makeWorker = () => new WorkerWithFallback(() => async (terserPath$1, code, options$1) => {
7028
- const terser = require(terserPath$1);
7029
- return terser.minify(code, options$1);
6974
+ const terser = (await import(terserPath$1)).default;
6975
+ try {
6976
+ return await terser.minify(code, options$1);
6977
+ } catch (e$1) {
6978
+ throw {
6979
+ stack: e$1.stack,
6980
+ ...e$1
6981
+ };
6982
+ }
7030
6983
  }, {
7031
6984
  shouldUseFake(_terserPath, _code, options$1) {
7032
6985
  return !!(typeof options$1.mangle === "object" && (options$1.mangle.nth_identifier?.get || typeof options$1.mangle.properties === "object" && options$1.mangle.properties.nth_identifier?.get) || typeof options$1.format?.comments === "function" || typeof options$1.output?.comments === "function");
@@ -7039,22 +6992,32 @@ function terserPlugin(config$2) {
7039
6992
  applyToEnvironment(environment) {
7040
6993
  return !!environment.config.build.minify;
7041
6994
  },
7042
- async renderChunk(code, _chunk, outputOptions) {
6995
+ async renderChunk(code, chunk, outputOptions) {
7043
6996
  if (config$2.build.minify !== "terser" && !outputOptions.__vite_force_terser__) return null;
7044
6997
  if (config$2.build.lib && outputOptions.format === "es") return null;
7045
6998
  worker ||= makeWorker();
7046
- const terserPath$1 = loadTerserPath(config$2.root);
7047
- const res = await worker.run(terserPath$1, code, {
7048
- safari10: true,
7049
- ...terserOptions,
7050
- sourceMap: !!outputOptions.sourcemap,
7051
- module: outputOptions.format.startsWith("es"),
7052
- toplevel: outputOptions.format === "cjs"
7053
- });
7054
- return {
7055
- code: res.code,
7056
- map: res.map
7057
- };
6999
+ const terserPath$1 = pathToFileURL(loadTerserPath(config$2.root)).href;
7000
+ try {
7001
+ const res = await worker.run(terserPath$1, code, {
7002
+ safari10: true,
7003
+ ...terserOptions,
7004
+ sourceMap: !!outputOptions.sourcemap,
7005
+ module: outputOptions.format.startsWith("es"),
7006
+ toplevel: outputOptions.format === "cjs"
7007
+ });
7008
+ return {
7009
+ code: res.code,
7010
+ map: res.map
7011
+ };
7012
+ } catch (e$1) {
7013
+ if (e$1.line !== void 0 && e$1.col !== void 0) e$1.loc = {
7014
+ file: chunk.fileName,
7015
+ line: e$1.line,
7016
+ column: e$1.col
7017
+ };
7018
+ if (e$1.pos !== void 0) e$1.frame = generateCodeFrame(code, e$1.pos);
7019
+ throw e$1;
7020
+ }
7058
7021
  },
7059
7022
  closeBundle() {
7060
7023
  worker?.stop();
@@ -8146,7 +8109,7 @@ var require_convert_source_map = /* @__PURE__ */ __commonJS({ "../../node_module
8146
8109
  }) });
8147
8110
 
8148
8111
  //#endregion
8149
- //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.32/node_modules/@rolldown/pluginutils/dist/index.js
8112
+ //#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.34/node_modules/@rolldown/pluginutils/dist/index.js
8150
8113
  /**
8151
8114
  * Constructs a RegExp that matches the exact string specified.
8152
8115
  *
@@ -8275,10 +8238,10 @@ function createConvertSourceMapReadMap(originalFileName) {
8275
8238
  //#endregion
8276
8239
  //#region ../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js
8277
8240
  var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilconfig@3.1.3/node_modules/lilconfig/src/index.js": ((exports, module) => {
8278
- const path$11 = require("path");
8279
- const fs$11 = require("fs");
8280
- const os$4 = require("os");
8281
- const url$2 = require("url");
8241
+ const path$11 = __require("path");
8242
+ const fs$11 = __require("fs");
8243
+ const os$4 = __require("os");
8244
+ const url$2 = __require("url");
8282
8245
  const fsReadFileAsync = fs$11.promises.readFile;
8283
8246
  /** @type {(name: string, sync: boolean) => string[]} */
8284
8247
  function getDefaultSearchPlaces(name, sync$3) {
@@ -8307,12 +8270,12 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8307
8270
  * but it should be '/' actually.
8308
8271
  * And on Windows, this will never happen. ('C:\build' -> 'C:')
8309
8272
  */
8310
- function parentDir(p$1) {
8311
- return path$11.dirname(p$1) || path$11.sep;
8273
+ function parentDir(p) {
8274
+ return path$11.dirname(p) || path$11.sep;
8312
8275
  }
8313
8276
  /** @type {import('./index').LoaderSync} */
8314
8277
  const jsonLoader = (_, content) => JSON.parse(content);
8315
- const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : require;
8278
+ const requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
8316
8279
  /** @type {import('./index').LoadersSync} */
8317
8280
  const defaultLoadersSync = Object.freeze({
8318
8281
  ".js": requireFunc,
@@ -8416,7 +8379,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8416
8379
  if (cache$1) {
8417
8380
  const r$2 = searchCache.get(dir);
8418
8381
  if (r$2 !== void 0) {
8419
- for (const p$1 of visited) searchCache.set(p$1, r$2);
8382
+ for (const p of visited) searchCache.set(p, r$2);
8420
8383
  return r$2;
8421
8384
  }
8422
8385
  visited.add(dir);
@@ -8457,7 +8420,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8457
8420
  dir = parentDir(dir);
8458
8421
  }
8459
8422
  const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result);
8460
- if (cache$1) for (const p$1 of visited) searchCache.set(p$1, transformed);
8423
+ if (cache$1) for (const p of visited) searchCache.set(p, transformed);
8461
8424
  return transformed;
8462
8425
  },
8463
8426
  async load(filepath) {
@@ -8528,7 +8491,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8528
8491
  if (cache$1) {
8529
8492
  const r$2 = searchCache.get(dir);
8530
8493
  if (r$2 !== void 0) {
8531
- for (const p$1 of visited) searchCache.set(p$1, r$2);
8494
+ for (const p of visited) searchCache.set(p, r$2);
8532
8495
  return r$2;
8533
8496
  }
8534
8497
  visited.add(dir);
@@ -8569,7 +8532,7 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8569
8532
  dir = parentDir(dir);
8570
8533
  }
8571
8534
  const transformed = result.filepath === "" && result.config === null ? transform$2(null) : transform$2(result);
8572
- if (cache$1) for (const p$1 of visited) searchCache.set(p$1, transformed);
8535
+ if (cache$1) for (const p of visited) searchCache.set(p, transformed);
8573
8536
  return transformed;
8574
8537
  },
8575
8538
  load(filepath) {
@@ -8622,10 +8585,10 @@ var require_src$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/lilco
8622
8585
  }) });
8623
8586
 
8624
8587
  //#endregion
8625
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/req.js
8626
- var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/req.js": ((exports, module) => {
8627
- const { createRequire: createRequire$2 } = require("node:module");
8628
- const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = require("node:url");
8588
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/req.js
8589
+ var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/req.js": ((exports, module) => {
8590
+ const { createRequire: createRequire$2 } = __require("node:module");
8591
+ const { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1 } = __require("node:url");
8629
8592
  const TS_EXT_RE = /\.[mc]?ts$/;
8630
8593
  let tsx;
8631
8594
  let jiti;
@@ -8665,8 +8628,8 @@ var require_req = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss
8665
8628
  }) });
8666
8629
 
8667
8630
  //#endregion
8668
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/options.js
8669
- var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/options.js": ((exports, module) => {
8631
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/options.js
8632
+ var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/options.js": ((exports, module) => {
8670
8633
  const req$2 = require_req();
8671
8634
  /**
8672
8635
  * Load Options
@@ -8700,8 +8663,8 @@ var require_options = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
8700
8663
  }) });
8701
8664
 
8702
8665
  //#endregion
8703
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js
8704
- var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js": ((exports, module) => {
8666
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js
8667
+ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/plugins.js": ((exports, module) => {
8705
8668
  const req$1 = require_req();
8706
8669
  /**
8707
8670
  * Plugin Loader
@@ -8755,9 +8718,9 @@ var require_plugins = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pos
8755
8718
  }) });
8756
8719
 
8757
8720
  //#endregion
8758
- //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/index.js
8759
- var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.4.2_postcss@8.5.6_tsx@4.20.3_yaml@2.8.1/node_modules/postcss-load-config/src/index.js": ((exports, module) => {
8760
- const { resolve: resolve$2 } = require("node:path");
8721
+ //#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/index.js
8722
+ var require_src = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.5.1_postcss@8.5.6_tsx@4.20.5_yaml@2.8.1/node_modules/postcss-load-config/src/index.js": ((exports, module) => {
8723
+ const { resolve: resolve$2 } = __require("node:path");
8761
8724
  const config$1 = require_src$1();
8762
8725
  const loadOptions = require_options();
8763
8726
  const loadPlugins = require_plugins();
@@ -9116,13 +9079,13 @@ function stringifyQuery(query) {
9116
9079
  const protocolRelative = Symbol.for("ufo:protocolRelative");
9117
9080
 
9118
9081
  //#endregion
9119
- //#region ../../node_modules/.pnpm/mlly@1.7.4/node_modules/mlly/dist/index.mjs
9082
+ //#region ../../node_modules/.pnpm/mlly@1.8.0/node_modules/mlly/dist/index.mjs
9120
9083
  const BUILTIN_MODULES = new Set(builtinModules);
9121
9084
  function clearImports(imports) {
9122
- return (imports || "").replace(/(\/\/[^\n]*\n|\/\*.*\*\/)/g, "").replace(/\s+/g, " ");
9085
+ return (imports || "").replace(/\/\/[^\n]*\n|\/\*.*\*\//g, "").replace(/\s+/g, " ");
9123
9086
  }
9124
9087
  function getImportNames(cleanedImports) {
9125
- const topLevelImports = cleanedImports.replace(/{([^}]*)}/, "");
9088
+ const topLevelImports = cleanedImports.replace(/{[^}]*}/, "");
9126
9089
  const namespacedImport = topLevelImports.match(/\* as \s*(\S*)/)?.[1];
9127
9090
  const defaultImport = topLevelImports.split(",").find((index) => !/[*{}]/.test(index))?.trim() || void 0;
9128
9091
  return {
@@ -9467,9 +9430,9 @@ const { ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 } = codes$1;
9467
9430
  const { ERR_UNKNOWN_FILE_EXTENSION } = codes$1;
9468
9431
  const hasOwnProperty$2 = {}.hasOwnProperty;
9469
9432
  const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
9470
- const { ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST } = codes$1;
9433
+ const { ERR_INVALID_MODULE_SPECIFIER, ERR_INVALID_PACKAGE_CONFIG, ERR_INVALID_PACKAGE_TARGET, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, ERR_UNSUPPORTED_DIR_IMPORT, ERR_UNSUPPORTED_RESOLVE_REQUEST } = codes$1;
9471
9434
  const own = {}.hasOwnProperty;
9472
- const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*([\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;
9435
+ const ESM_STATIC_IMPORT_RE = /(?<=\s|^|;|\})import\s*(?:[\s"']*(?<imports>[\p{L}\p{M}\w\t\n\r $*,/{}@.]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^\s"](?=\s*")|(?<='\s*)[^']*[^\s'](?=\s*'))\s*["'][\s;]*/gmu;
9473
9436
  const TYPE_RE = /^\s*?type\s/;
9474
9437
  function parseStaticImport(matched) {
9475
9438
  const cleanedImports = clearImports(matched.imports);
@@ -9489,7 +9452,7 @@ function parseStaticImport(matched) {
9489
9452
  namedImports
9490
9453
  };
9491
9454
  }
9492
- const ESM_RE = /([\s;]|^)(import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
9455
+ const ESM_RE = /(?:[\s;]|^)(?:import[\s\w*,{}]*from|import\s*["'*{]|export\b\s*(?:[*{]|default|class|type|function|const|var|let|async function)|import\.meta\b)/m;
9493
9456
  const COMMENT_RE = /\/\*.+?\*\/|\/\/.*(?=[nr])/g;
9494
9457
  function hasESMSyntax(code, opts = {}) {
9495
9458
  if (opts.stripComments) code = code.replace(COMMENT_RE, "");
@@ -10529,7 +10492,7 @@ async function toAbsoluteGlob(glob$1, root, importer, resolveId, base) {
10529
10492
  }
10530
10493
  root = globSafePath(root);
10531
10494
  let dir;
10532
- if (base) if (base.startsWith("/")) dir = posix.join(root, base);
10495
+ if (base) if (base[0] === "/") dir = posix.join(root, base);
10533
10496
  else dir = posix.resolve(importer ? globSafePath(dirname$2(importer)) : root, base);
10534
10497
  else dir = importer ? globSafePath(dirname$2(importer)) : root;
10535
10498
  if (glob$1[0] === "/") return pre + posix.join(root, glob$1.slice(1));
@@ -10680,12 +10643,12 @@ async function computeEntries(environment) {
10680
10643
  const buildInput = environment.config.build.rollupOptions.input;
10681
10644
  if (explicitEntryPatterns) entries = await globEntries(explicitEntryPatterns, environment);
10682
10645
  else if (buildInput) {
10683
- const resolvePath = async (p$1) => {
10684
- const id = (await environment.pluginContainer.resolveId(p$1, path.join(process.cwd(), "*"), {
10646
+ const resolvePath = async (p) => {
10647
+ const id = (await environment.pluginContainer.resolveId(p, path.join(process.cwd(), "*"), {
10685
10648
  isEntry: true,
10686
10649
  scan: true
10687
10650
  }))?.id;
10688
- if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p$1)}.`);
10651
+ if (id === void 0) throw new Error(`failed to resolve rollupOptions.input value: ${JSON.stringify(p)}.`);
10689
10652
  return id;
10690
10653
  };
10691
10654
  if (typeof buildInput === "string") entries = [await resolvePath(buildInput)];
@@ -10819,10 +10782,10 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10819
10782
  namespace: "html"
10820
10783
  };
10821
10784
  });
10822
- const htmlTypeOnLoadCallback = async ({ path: p$1 }) => {
10823
- let raw = await fsp.readFile(p$1, "utf-8");
10785
+ const htmlTypeOnLoadCallback = async ({ path: p }) => {
10786
+ let raw = await fsp.readFile(p, "utf-8");
10824
10787
  raw = raw.replace(commentRE$1, "<!---->");
10825
- const isHtml = p$1.endsWith(".html");
10788
+ const isHtml = p.endsWith(".html");
10826
10789
  let js = "";
10827
10790
  let scriptId = 0;
10828
10791
  const matches$2 = raw.matchAll(scriptRE);
@@ -10835,29 +10798,29 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10835
10798
  if (type && !(type.includes("javascript") || type.includes("ecmascript") || type === "module")) continue;
10836
10799
  let loader$1 = "js";
10837
10800
  if (lang === "ts" || lang === "tsx" || lang === "jsx") loader$1 = lang;
10838
- else if (p$1.endsWith(".astro")) loader$1 = "ts";
10801
+ else if (p.endsWith(".astro")) loader$1 = "ts";
10839
10802
  const srcMatch = srcRE.exec(openTag);
10840
10803
  if (srcMatch) {
10841
10804
  const src = srcMatch[1] || srcMatch[2] || srcMatch[3];
10842
10805
  js += `import ${JSON.stringify(src)}\n`;
10843
10806
  } else if (content.trim()) {
10844
10807
  const contents = content + (loader$1.startsWith("ts") ? extractImportPaths(content) : "");
10845
- const key = `${p$1}?id=${scriptId++}`;
10808
+ const key = `${p}?id=${scriptId++}`;
10846
10809
  if (contents.includes("import.meta.glob")) scripts[key] = {
10847
10810
  loader: "js",
10848
- contents: await doTransformGlobImport(contents, p$1, loader$1),
10849
- resolveDir: normalizePath(path.dirname(p$1)),
10811
+ contents: await doTransformGlobImport(contents, p, loader$1),
10812
+ resolveDir: normalizePath(path.dirname(p)),
10850
10813
  pluginData: { htmlType: { loader: loader$1 } }
10851
10814
  };
10852
10815
  else scripts[key] = {
10853
10816
  loader: loader$1,
10854
10817
  contents,
10855
- resolveDir: normalizePath(path.dirname(p$1)),
10818
+ resolveDir: normalizePath(path.dirname(p)),
10856
10819
  pluginData: { htmlType: { loader: loader$1 } }
10857
10820
  };
10858
10821
  const virtualModulePath = JSON.stringify(virtualModulePrefix + key);
10859
10822
  let addedImport = false;
10860
- if (p$1.endsWith(".svelte")) {
10823
+ if (p.endsWith(".svelte")) {
10861
10824
  let isModule = svelteModuleRE.test(openTag);
10862
10825
  if (!isModule) {
10863
10826
  const contextMatch = svelteScriptModuleRE.exec(openTag);
@@ -10872,7 +10835,7 @@ function esbuildScanPlugin(environment, depImports, missing, entries) {
10872
10835
  if (!addedImport) js += `export * from ${virtualModulePath}\n`;
10873
10836
  }
10874
10837
  }
10875
- if (!p$1.endsWith(".vue") || !js.includes("export default")) js += "\nexport default {}";
10838
+ if (!p.endsWith(".vue") || !js.includes("export default")) js += "\nexport default {}";
10876
10839
  return {
10877
10840
  loader: "js",
10878
10841
  contents: js
@@ -11037,7 +11000,7 @@ function expandGlobIds(id, config$2) {
11037
11000
  }).filter(Boolean));
11038
11001
  } else possibleExportPaths.push(key.slice(2));
11039
11002
  const isMatch$1 = picomatch(pattern);
11040
- const matched = possibleExportPaths.filter((p$1) => isMatch$1(p$1)).map((match) => path.posix.join(pkgName, match));
11003
+ const matched = possibleExportPaths.filter((p) => isMatch$1(p)).map((match) => path.posix.join(pkgName, match));
11041
11004
  matched.unshift(pkgName);
11042
11005
  return matched;
11043
11006
  } else {
@@ -11622,13 +11585,13 @@ function getConfigHash(environment) {
11622
11585
  root: config$2.root,
11623
11586
  resolve: config$2.resolve,
11624
11587
  assetsInclude: config$2.assetsInclude,
11625
- plugins: config$2.plugins.map((p$1) => p$1.name),
11588
+ plugins: config$2.plugins.map((p) => p.name),
11626
11589
  optimizeDeps: {
11627
11590
  include: optimizeDeps$1.include ? unique(optimizeDeps$1.include).sort() : void 0,
11628
11591
  exclude: optimizeDeps$1.exclude ? unique(optimizeDeps$1.exclude).sort() : void 0,
11629
11592
  esbuildOptions: {
11630
11593
  ...optimizeDeps$1.esbuildOptions,
11631
- plugins: optimizeDeps$1.esbuildOptions?.plugins?.map((p$1) => p$1.name)
11594
+ plugins: optimizeDeps$1.esbuildOptions?.plugins?.map((p) => p.name)
11632
11595
  }
11633
11596
  }
11634
11597
  }, (_, value$1) => {
@@ -12310,7 +12273,7 @@ function optimizedDepsPlugin() {
12310
12273
  if (depsOptimizer?.isOptimizedDepFile(id)) {
12311
12274
  const metadata = depsOptimizer.metadata;
12312
12275
  const file = cleanUrl(id);
12313
- const versionMatch = DEP_VERSION_RE.exec(file);
12276
+ const versionMatch = DEP_VERSION_RE.exec(id);
12314
12277
  const browserHash = versionMatch ? versionMatch[1].split("=")[1] : void 0;
12315
12278
  const info = optimizedDepInfoFromFile(metadata, file);
12316
12279
  if (info) {
@@ -12330,8 +12293,7 @@ function optimizedDepsPlugin() {
12330
12293
  try {
12331
12294
  return await fsp.readFile(file, "utf-8");
12332
12295
  } catch {
12333
- const newMetadata = depsOptimizer.metadata;
12334
- if (optimizedDepInfoFromFile(newMetadata, file)) throwOutdatedRequest(id);
12296
+ if (browserHash) throwOutdatedRequest(id);
12335
12297
  throwFileNotFoundInOptimizedDep(id);
12336
12298
  }
12337
12299
  }
@@ -12420,10 +12382,10 @@ var require_package = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dot
12420
12382
  //#endregion
12421
12383
  //#region ../../node_modules/.pnpm/dotenv@17.2.1/node_modules/dotenv/lib/main.js
12422
12384
  var require_main$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv@17.2.1/node_modules/dotenv/lib/main.js": ((exports, module) => {
12423
- const fs$10 = require("fs");
12424
- const path$10 = require("path");
12425
- const os$3 = require("os");
12426
- const crypto$2 = require("crypto");
12385
+ const fs$10 = __require("fs");
12386
+ const path$10 = __require("path");
12387
+ const os$3 = __require("os");
12388
+ const crypto$2 = __require("crypto");
12427
12389
  const packageJson = require_package();
12428
12390
  const version = packageJson.version;
12429
12391
  const TIPS = [
@@ -12702,7 +12664,7 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
12702
12664
  return value$1.replace(/\\\$/g, "$");
12703
12665
  }
12704
12666
  function expandValue(value$1, processEnv, runningParsed) {
12705
- const env$2 = {
12667
+ const env$1 = {
12706
12668
  ...runningParsed,
12707
12669
  ...processEnv
12708
12670
  };
@@ -12722,11 +12684,11 @@ var require_main = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/dotenv
12722
12684
  let value$2;
12723
12685
  const key = r$2.shift();
12724
12686
  if ([":+", "+"].includes(splitter)) {
12725
- defaultValue = env$2[key] ? r$2.join(splitter) : "";
12687
+ defaultValue = env$1[key] ? r$2.join(splitter) : "";
12726
12688
  value$2 = null;
12727
12689
  } else {
12728
12690
  defaultValue = r$2.join(splitter);
12729
- value$2 = env$2[key];
12691
+ value$2 = env$1[key];
12730
12692
  }
12731
12693
  if (value$2) if (seen$1.has(value$2)) result = result.replace(template, defaultValue);
12732
12694
  else result = result.replace(template, value$2);
@@ -12770,7 +12732,7 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
12770
12732
  const getTime = () => `${(performance.now() - start).toFixed(2)}ms`;
12771
12733
  if (mode === "local") throw new Error("\"local\" cannot be used as a mode name because it conflicts with the .local postfix for .env files.");
12772
12734
  prefixes = arraify(prefixes);
12773
- const env$2 = {};
12735
+ const env$1 = {};
12774
12736
  const envFiles = getEnvFilesForMode(mode, envDir);
12775
12737
  debug$10?.(`loading env files: %O`, envFiles);
12776
12738
  const parsed = Object.fromEntries(envFiles.flatMap((filePath) => {
@@ -12786,10 +12748,10 @@ function loadEnv(mode, envDir, prefixes = "VITE_") {
12786
12748
  parsed,
12787
12749
  processEnv
12788
12750
  });
12789
- for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$2[key] = value$1;
12790
- for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$2[key] = process.env[key];
12791
- debug$10?.(`using resolved env: %O`, env$2);
12792
- return env$2;
12751
+ for (const [key, value$1] of Object.entries(parsed)) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = value$1;
12752
+ for (const key in process.env) if (prefixes.some((prefix) => key.startsWith(prefix))) env$1[key] = process.env[key];
12753
+ debug$10?.(`using resolved env: %O`, env$1);
12754
+ return env$1;
12793
12755
  }
12794
12756
  function resolveEnvPrefix({ envPrefix = "VITE_" }) {
12795
12757
  envPrefix = arraify(envPrefix);
@@ -13111,10 +13073,10 @@ var require_debug$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/deb
13111
13073
  args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format$3) {
13112
13074
  if (match === "%%") return match;
13113
13075
  index++;
13114
- var formatter$1 = exports.formatters[format$3];
13115
- if ("function" === typeof formatter$1) {
13076
+ var formatter = exports.formatters[format$3];
13077
+ if ("function" === typeof formatter) {
13116
13078
  var val = args[index];
13117
- match = formatter$1.call(self$1, val);
13079
+ match = formatter.call(self$1, val);
13118
13080
  args.splice(index, 1);
13119
13081
  index--;
13120
13082
  }
@@ -13191,8 +13153,8 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
13191
13153
  /**
13192
13154
  * Module dependencies.
13193
13155
  */
13194
- var tty = require("tty");
13195
- var util$1 = require("util");
13156
+ var tty = __require("tty");
13157
+ var util$1 = __require("util");
13196
13158
  /**
13197
13159
  * This is the Node.js implementation of `debug()`.
13198
13160
  *
@@ -13322,13 +13284,13 @@ var require_node = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/debug@
13322
13284
  if (stream$3._handle && stream$3._handle.unref) stream$3._handle.unref();
13323
13285
  break;
13324
13286
  case "FILE":
13325
- var fs$12 = require("fs");
13287
+ var fs$12 = __require("fs");
13326
13288
  stream$3 = new fs$12.SyncWriteStream(fd$1, { autoClose: false });
13327
13289
  stream$3._type = "fs";
13328
13290
  break;
13329
13291
  case "PIPE":
13330
13292
  case "TCP":
13331
- var net$2 = require("net");
13293
+ var net$2 = __require("net");
13332
13294
  stream$3 = new net$2.Socket({
13333
13295
  fd: fd$1,
13334
13296
  readable: false,
@@ -13676,7 +13638,7 @@ var require_parseurl = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pa
13676
13638
  * Module dependencies.
13677
13639
  * @private
13678
13640
  */
13679
- var url$1 = require("url");
13641
+ var url$1 = __require("url");
13680
13642
  var parse$10 = url$1.parse;
13681
13643
  var Url = url$1.Url;
13682
13644
  /**
@@ -14011,7 +13973,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
14011
13973
  */
14012
13974
  function finalhandler$1(req$4, res, options$1) {
14013
13975
  var opts = options$1 || {};
14014
- var env$2 = opts.env || process.env.NODE_ENV || "development";
13976
+ var env$1 = opts.env || process.env.NODE_ENV || "development";
14015
13977
  var onerror = opts.onerror;
14016
13978
  return function(err$2) {
14017
13979
  var headers;
@@ -14025,7 +13987,7 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
14025
13987
  status$1 = getErrorStatusCode(err$2);
14026
13988
  if (status$1 === void 0) status$1 = getResponseStatusCode(res);
14027
13989
  else headers = getErrorHeaders(err$2);
14028
- msg = getErrorMessage(err$2, status$1, env$2);
13990
+ msg = getErrorMessage(err$2, status$1, env$1);
14029
13991
  } else {
14030
13992
  status$1 = 404;
14031
13993
  msg = "Cannot " + req$4.method + " " + encodeUrl(getResourceName(req$4));
@@ -14066,9 +14028,9 @@ var require_finalhandler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
14066
14028
  * @return {string}
14067
14029
  * @private
14068
14030
  */
14069
- function getErrorMessage(err$2, status$1, env$2) {
14031
+ function getErrorMessage(err$2, status$1, env$1) {
14070
14032
  var msg;
14071
- if (env$2 !== "production") {
14033
+ if (env$1 !== "production") {
14072
14034
  msg = err$2.stack;
14073
14035
  if (!msg && typeof err$2.toString === "function") msg = err$2.toString();
14074
14036
  }
@@ -14207,9 +14169,9 @@ var require_connect = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/con
14207
14169
  * @private
14208
14170
  */
14209
14171
  var debug$8 = require_node()("connect:dispatcher");
14210
- var EventEmitter$4 = require("events").EventEmitter;
14172
+ var EventEmitter$4 = __require("events").EventEmitter;
14211
14173
  var finalhandler = require_finalhandler();
14212
- var http$6 = require("http");
14174
+ var http$6 = __require("http");
14213
14175
  var merge = require_utils_merge();
14214
14176
  var parseUrl$1 = require_parseurl();
14215
14177
  /**
@@ -14706,11 +14668,11 @@ var require_lib$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cors@
14706
14668
  //#endregion
14707
14669
  //#region ../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js
14708
14670
  var require_readdirp = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/readdirp@3.6.0/node_modules/readdirp/index.js": ((exports, module) => {
14709
- const fs$9 = require("fs");
14710
- const { Readable: Readable$1 } = require("stream");
14711
- const sysPath$3 = require("path");
14712
- const { promisify: promisify$4 } = require("util");
14713
- const picomatch$2 = require("picomatch");
14671
+ const fs$9 = __require("fs");
14672
+ const { Readable: Readable$1 } = __require("stream");
14673
+ const sysPath$3 = __require("path");
14674
+ const { promisify: promisify$4 } = __require("util");
14675
+ const picomatch$2 = __require("picomatch");
14714
14676
  const readdir$1 = promisify$4(fs$9.readdir);
14715
14677
  const stat$3 = promisify$4(fs$9.stat);
14716
14678
  const lstat$2 = promisify$4(fs$9.lstat);
@@ -14990,7 +14952,7 @@ var require_normalize_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
14990
14952
  //#region ../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js
14991
14953
  var require_anymatch = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/anymatch@3.1.3/node_modules/anymatch/index.js": ((exports, module) => {
14992
14954
  Object.defineProperty(exports, "__esModule", { value: true });
14993
- const picomatch$1 = require("picomatch");
14955
+ const picomatch$1 = __require("picomatch");
14994
14956
  const normalizePath$2 = require_normalize_path();
14995
14957
  /**
14996
14958
  * @typedef {(testString: string) => boolean} AnymatchFn
@@ -15182,8 +15144,8 @@ var require_is_glob = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-
15182
15144
  //#region ../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js
15183
15145
  var require_glob_parent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/glob-parent@5.1.2/node_modules/glob-parent/index.js": ((exports, module) => {
15184
15146
  var isGlob$1 = require_is_glob();
15185
- var pathPosixDirname = require("path").posix.dirname;
15186
- var isWin32 = require("os").platform() === "win32";
15147
+ var pathPosixDirname = __require("path").posix.dirname;
15148
+ var isWin32 = __require("os").platform() === "win32";
15187
15149
  var slash$1 = "/";
15188
15150
  var backslash = /\\/g;
15189
15151
  var enclosure = /[\{\[].*[\}\]]$/;
@@ -15533,7 +15495,7 @@ var require_to_regex_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
15533
15495
  //#endregion
15534
15496
  //#region ../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js
15535
15497
  var require_fill_range = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/fill-range@7.1.1/node_modules/fill-range/index.js": ((exports, module) => {
15536
- const util = require("util");
15498
+ const util = __require("util");
15537
15499
  const toRegexRange = require_to_regex_range();
15538
15500
  const isObject$1 = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
15539
15501
  const transform$1 = (toNumber) => {
@@ -15756,11 +15718,11 @@ var require_expand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/brac
15756
15718
  const rangeLimit = options$1.rangeLimit === void 0 ? 1e3 : options$1.rangeLimit;
15757
15719
  const walk$3 = (node, parent = {}) => {
15758
15720
  node.queue = [];
15759
- let p$1 = parent;
15721
+ let p = parent;
15760
15722
  let q = parent.queue;
15761
- while (p$1.type !== "brace" && p$1.type !== "root" && p$1.parent) {
15762
- p$1 = p$1.parent;
15763
- q = p$1.queue;
15723
+ while (p.type !== "brace" && p.type !== "root" && p.parent) {
15724
+ p = p.parent;
15725
+ q = p.queue;
15764
15726
  }
15765
15727
  if (node.invalid || node.dollar) {
15766
15728
  q.push(append(q.pop(), stringify$2(node, options$1)));
@@ -15812,7 +15774,7 @@ var require_expand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/brac
15812
15774
 
15813
15775
  //#endregion
15814
15776
  //#region ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js
15815
- var require_constants$3 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js": ((exports, module) => {
15777
+ var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js": ((exports, module) => {
15816
15778
  module.exports = {
15817
15779
  MAX_LENGTH: 1e4,
15818
15780
  CHAR_0: "0",
@@ -15869,7 +15831,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/bra
15869
15831
  /**
15870
15832
  * Constants
15871
15833
  */
15872
- const { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants$3();
15834
+ const { MAX_LENGTH, CHAR_BACKSLASH, CHAR_BACKTICK, CHAR_COMMA, CHAR_DOT, CHAR_LEFT_PARENTHESES, CHAR_RIGHT_PARENTHESES, CHAR_LEFT_CURLY_BRACE, CHAR_RIGHT_CURLY_BRACE, CHAR_LEFT_SQUARE_BRACKET, CHAR_RIGHT_SQUARE_BRACKET, CHAR_DOUBLE_QUOTE, CHAR_SINGLE_QUOTE, CHAR_NO_BREAK_SPACE, CHAR_ZERO_WIDTH_NOBREAK_SPACE } = require_constants$2();
15873
15835
  /**
15874
15836
  * parse
15875
15837
  */
@@ -16557,7 +16519,7 @@ var require_binary_extensions = /* @__PURE__ */ __commonJS({ "../../node_modules
16557
16519
  //#endregion
16558
16520
  //#region ../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js
16559
16521
  var require_is_binary_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/is-binary-path@2.1.0/node_modules/is-binary-path/index.js": ((exports, module) => {
16560
- const path$9 = require("path");
16522
+ const path$9 = __require("path");
16561
16523
  const binaryExtensions = require_binary_extensions();
16562
16524
  const extensions = new Set(binaryExtensions);
16563
16525
  module.exports = (filePath) => extensions.has(path$9.extname(filePath).slice(1).toLowerCase());
@@ -16565,10 +16527,10 @@ var require_is_binary_path = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
16565
16527
 
16566
16528
  //#endregion
16567
16529
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js
16568
- var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js": ((exports) => {
16569
- const { sep: sep$1 } = require("path");
16530
+ var require_constants$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/constants.js": ((exports) => {
16531
+ const { sep: sep$1 } = __require("path");
16570
16532
  const { platform: platform$1 } = process;
16571
- const os$2 = require("os");
16533
+ const os$2 = __require("os");
16572
16534
  exports.EV_ALL = "all";
16573
16535
  exports.EV_READY = "ready";
16574
16536
  exports.EV_ADD = "add";
@@ -16631,11 +16593,11 @@ var require_constants$2 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
16631
16593
  //#endregion
16632
16594
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/nodefs-handler.js
16633
16595
  var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/nodefs-handler.js": ((exports, module) => {
16634
- const fs$8 = require("fs");
16635
- const sysPath$2 = require("path");
16636
- const { promisify: promisify$3 } = require("util");
16596
+ const fs$8 = __require("fs");
16597
+ const sysPath$2 = __require("path");
16598
+ const { promisify: promisify$3 } = __require("util");
16637
16599
  const isBinaryPath = require_is_binary_path();
16638
- const { isWindows: isWindows$3, isLinux, EMPTY_FN: EMPTY_FN$2, EMPTY_STR: EMPTY_STR$1, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, EV_CHANGE: EV_CHANGE$2, EV_ADD: EV_ADD$2, EV_ADD_DIR: EV_ADD_DIR$2, EV_ERROR: EV_ERROR$2, STR_DATA: STR_DATA$1, STR_END: STR_END$2, BRACE_START: BRACE_START$1, STAR } = require_constants$2();
16600
+ const { isWindows: isWindows$3, isLinux, EMPTY_FN: EMPTY_FN$2, EMPTY_STR: EMPTY_STR$1, KEY_LISTENERS, KEY_ERR, KEY_RAW, HANDLER_KEYS, EV_CHANGE: EV_CHANGE$2, EV_ADD: EV_ADD$2, EV_ADD_DIR: EV_ADD_DIR$2, EV_ERROR: EV_ERROR$2, STR_DATA: STR_DATA$1, STR_END: STR_END$2, BRACE_START: BRACE_START$1, STAR } = require_constants$1();
16639
16601
  const THROTTLE_MODE_WATCH = "watch";
16640
16602
  const open$1 = promisify$3(fs$8.open);
16641
16603
  const stat$2 = promisify$3(fs$8.stat);
@@ -17095,12 +17057,12 @@ var require_nodefs_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
17095
17057
  //#endregion
17096
17058
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/fsevents-handler.js
17097
17059
  var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/lib/fsevents-handler.js": ((exports, module) => {
17098
- const fs$7 = require("fs");
17099
- const sysPath$1 = require("path");
17100
- const { promisify: promisify$2 } = require("util");
17060
+ const fs$7 = __require("fs");
17061
+ const sysPath$1 = __require("path");
17062
+ const { promisify: promisify$2 } = __require("util");
17101
17063
  let fsevents;
17102
17064
  try {
17103
- fsevents = require("fsevents");
17065
+ fsevents = __require("fsevents");
17104
17066
  } catch (error$1) {
17105
17067
  if (process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR) console.error(error$1);
17106
17068
  }
@@ -17112,7 +17074,7 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/
17112
17074
  if (maj$1 === 8 && min$1 < 16) fsevents = void 0;
17113
17075
  }
17114
17076
  }
17115
- const { EV_ADD: EV_ADD$1, EV_CHANGE: EV_CHANGE$1, EV_ADD_DIR: EV_ADD_DIR$1, EV_UNLINK: EV_UNLINK$1, EV_ERROR: EV_ERROR$1, STR_DATA, STR_END: STR_END$1, FSEVENT_CREATED, FSEVENT_MODIFIED, FSEVENT_DELETED, FSEVENT_MOVED, FSEVENT_UNKNOWN, FSEVENT_FLAG_MUST_SCAN_SUBDIRS, FSEVENT_TYPE_FILE, FSEVENT_TYPE_DIRECTORY, FSEVENT_TYPE_SYMLINK, ROOT_GLOBSTAR, DIR_SUFFIX, DOT_SLASH, FUNCTION_TYPE: FUNCTION_TYPE$1, EMPTY_FN: EMPTY_FN$1, IDENTITY_FN } = require_constants$2();
17077
+ const { EV_ADD: EV_ADD$1, EV_CHANGE: EV_CHANGE$1, EV_ADD_DIR: EV_ADD_DIR$1, EV_UNLINK: EV_UNLINK$1, EV_ERROR: EV_ERROR$1, STR_DATA, STR_END: STR_END$1, FSEVENT_CREATED, FSEVENT_MODIFIED, FSEVENT_DELETED, FSEVENT_MOVED, FSEVENT_UNKNOWN, FSEVENT_FLAG_MUST_SCAN_SUBDIRS, FSEVENT_TYPE_FILE, FSEVENT_TYPE_DIRECTORY, FSEVENT_TYPE_SYMLINK, ROOT_GLOBSTAR, DIR_SUFFIX, DOT_SLASH, FUNCTION_TYPE: FUNCTION_TYPE$1, EMPTY_FN: EMPTY_FN$1, IDENTITY_FN } = require_constants$1();
17116
17078
  const Depth = (value$1) => isNaN(value$1) ? {} : { depth: value$1 };
17117
17079
  const stat$1 = promisify$2(fs$7.stat);
17118
17080
  const lstat = promisify$2(fs$7.lstat);
@@ -17434,10 +17396,10 @@ var require_fsevents_handler = /* @__PURE__ */ __commonJS({ "../../node_modules/
17434
17396
  //#endregion
17435
17397
  //#region ../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/index.js
17436
17398
  var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/chokidar@3.6.0_patch_hash=8a4f9e2b397e6034b91a0508faae3cecb97f222313faa129d7cb0eb71e9d0e84/node_modules/chokidar/index.js": ((exports) => {
17437
- const { EventEmitter: EventEmitter$3 } = require("events");
17438
- const fs$6 = require("fs");
17439
- const sysPath = require("path");
17440
- const { promisify: promisify$1 } = require("util");
17399
+ const { EventEmitter: EventEmitter$3 } = __require("events");
17400
+ const fs$6 = __require("fs");
17401
+ const sysPath = __require("path");
17402
+ const { promisify: promisify$1 } = __require("util");
17441
17403
  const readdirp = require_readdirp();
17442
17404
  const anymatch = require_anymatch().default;
17443
17405
  const globParent = require_glob_parent();
@@ -17446,7 +17408,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
17446
17408
  const normalizePath$1 = require_normalize_path();
17447
17409
  const NodeFsHandler = require_nodefs_handler();
17448
17410
  const FsEventsHandler = require_fsevents_handler();
17449
- const { EV_ALL, EV_READY, EV_ADD, EV_CHANGE, EV_UNLINK, EV_ADD_DIR, EV_UNLINK_DIR, EV_RAW, EV_ERROR, STR_CLOSE, STR_END, BACK_SLASH_RE, DOUBLE_SLASH_RE, SLASH_OR_BACK_SLASH_RE, DOT_RE, REPLACER_RE, SLASH, SLASH_SLASH, BRACE_START, BANG, ONE_DOT, TWO_DOTS, GLOBSTAR, SLASH_GLOBSTAR, ANYMATCH_OPTS, STRING_TYPE, FUNCTION_TYPE, EMPTY_STR, EMPTY_FN, isWindows: isWindows$2, isMacos, isIBMi } = require_constants$2();
17411
+ const { EV_ALL, EV_READY, EV_ADD, EV_CHANGE, EV_UNLINK, EV_ADD_DIR, EV_UNLINK_DIR, EV_RAW, EV_ERROR, STR_CLOSE, STR_END, BACK_SLASH_RE, DOUBLE_SLASH_RE, SLASH_OR_BACK_SLASH_RE, DOT_RE, REPLACER_RE, SLASH, SLASH_SLASH, BRACE_START, BANG, ONE_DOT, TWO_DOTS, GLOBSTAR, SLASH_GLOBSTAR, ANYMATCH_OPTS, STRING_TYPE, FUNCTION_TYPE, EMPTY_STR, EMPTY_FN, isWindows: isWindows$2, isMacos, isIBMi } = require_constants$1();
17450
17412
  const stat = promisify$1(fs$6.stat);
17451
17413
  const readdir = promisify$1(fs$6.readdir);
17452
17414
  /**
@@ -17480,7 +17442,7 @@ var require_chokidar = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ch
17480
17442
  * @type {Array<String>}
17481
17443
  */
17482
17444
  const paths = flatten(arrify(paths_));
17483
- if (!paths.every((p$1) => typeof p$1 === STRING_TYPE)) throw new TypeError(`Non-string provided as watch path: ${paths}`);
17445
+ if (!paths.every((p) => typeof p === STRING_TYPE)) throw new TypeError(`Non-string provided as watch path: ${paths}`);
17484
17446
  return paths.map(normalizePathToUnix);
17485
17447
  };
17486
17448
  const toUnix = (string) => {
@@ -18181,21 +18143,21 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
18181
18143
  r$2.lastIndex = origIndex;
18182
18144
  return matches$2;
18183
18145
  }
18184
- function getVar(env$2, pre, key) {
18185
- var r$2 = typeof env$2 === "function" ? env$2(key) : env$2[key];
18146
+ function getVar(env$1, pre, key) {
18147
+ var r$2 = typeof env$1 === "function" ? env$1(key) : env$1[key];
18186
18148
  if (typeof r$2 === "undefined" && key != "") r$2 = "";
18187
18149
  else if (typeof r$2 === "undefined") r$2 = "$";
18188
18150
  if (typeof r$2 === "object") return pre + TOKEN + JSON.stringify(r$2) + TOKEN;
18189
18151
  return pre + r$2;
18190
18152
  }
18191
- function parseInternal(string, env$2, opts) {
18153
+ function parseInternal(string, env$1, opts) {
18192
18154
  if (!opts) opts = {};
18193
18155
  var BS = opts.escape || "\\";
18194
18156
  var BAREWORD = "(\\" + BS + "['\"" + META + "]|[^\\s'\"" + META + "])+";
18195
18157
  var chunker = new RegExp(["(" + CONTROL + ")", "(" + BAREWORD + "|" + SINGLE_QUOTE + "|" + DOUBLE_QUOTE + ")+"].join("|"), "g");
18196
18158
  var matches$2 = matchAll(string, chunker);
18197
18159
  if (matches$2.length === 0) return [];
18198
- if (!env$2) env$2 = {};
18160
+ if (!env$1) env$1 = {};
18199
18161
  var commented = false;
18200
18162
  return matches$2.map(function(match) {
18201
18163
  var s$2 = match[0];
@@ -18232,7 +18194,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
18232
18194
  i$1 += varend.index - 1;
18233
18195
  }
18234
18196
  }
18235
- return getVar(env$2, "", varname);
18197
+ return getVar(env$1, "", varname);
18236
18198
  }
18237
18199
  for (i$1 = 0; i$1 < s$2.length; i$1++) {
18238
18200
  var c = s$2.charAt(i$1);
@@ -18269,9 +18231,9 @@ var require_parse$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/she
18269
18231
  return typeof arg === "undefined" ? prev : prev.concat(arg);
18270
18232
  }, []);
18271
18233
  }
18272
- module.exports = function parse$17(s$2, env$2, opts) {
18273
- var mapped = parseInternal(s$2, env$2, opts);
18274
- if (typeof env$2 !== "function") return mapped;
18234
+ module.exports = function parse$17(s$2, env$1, opts) {
18235
+ var mapped = parseInternal(s$2, env$1, opts);
18236
+ if (typeof env$1 !== "function") return mapped;
18275
18237
  return mapped.reduce(function(acc, s$3) {
18276
18238
  if (typeof s$3 === "object") return acc.concat(s$3);
18277
18239
  var xs = s$3.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
@@ -18392,9 +18354,9 @@ var require_windows$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/l
18392
18354
  //#endregion
18393
18355
  //#region ../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/guess.js
18394
18356
  var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/guess.js": ((exports, module) => {
18395
- const path$8 = require("path");
18357
+ const path$8 = __require("path");
18396
18358
  const shellQuote = require_shell_quote();
18397
- const childProcess$2 = require("child_process");
18359
+ const childProcess$2 = __require("child_process");
18398
18360
  const COMMON_EDITORS_MACOS = require_macos();
18399
18361
  const COMMON_EDITORS_LINUX = require_linux();
18400
18362
  const COMMON_EDITORS_WIN = require_windows$1();
@@ -18455,7 +18417,7 @@ var require_guess = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launc
18455
18417
  //#endregion
18456
18418
  //#region ../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/get-args.js
18457
18419
  var require_get_args = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor@2.11.1/node_modules/launch-editor/get-args.js": ((exports, module) => {
18458
- const path$7 = require("path");
18420
+ const path$7 = __require("path");
18459
18421
  module.exports = function getArgumentsForPosition$1(editor, fileName, lineNumber, columnNumber = 1) {
18460
18422
  const editorBasename = path$7.basename(editor).replace(/\.(exe|cmd|bat)$/i, "");
18461
18423
  switch (editorBasename) {
@@ -18544,11 +18506,11 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
18544
18506
  *
18545
18507
  * Modified by Yuxi Evan You
18546
18508
  */
18547
- const fs$5 = require("fs");
18548
- const os$1 = require("os");
18549
- const path$6 = require("path");
18509
+ const fs$5 = __require("fs");
18510
+ const os$1 = __require("os");
18511
+ const path$6 = __require("path");
18550
18512
  const colors$22 = require_picocolors();
18551
- const childProcess$1 = require("child_process");
18513
+ const childProcess$1 = __require("child_process");
18552
18514
  const guessEditor = require_guess();
18553
18515
  const getArgumentsForPosition = require_get_args();
18554
18516
  function wrapErrorCallback(cb) {
@@ -18573,7 +18535,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
18573
18535
  }
18574
18536
  const positionRE = /:(\d+)(:(\d+))?$/;
18575
18537
  function parseFile(file) {
18576
- if (file.startsWith("file://")) file = require("url").fileURLToPath(file);
18538
+ if (file.startsWith("file://")) file = __require("url").fileURLToPath(file);
18577
18539
  const fileName = file.replace(positionRE, "");
18578
18540
  const match = file.match(positionRE);
18579
18541
  const lineNumber = match && match[1];
@@ -18637,7 +18599,7 @@ var require_launch_editor = /* @__PURE__ */ __commonJS({ "../../node_modules/.pn
18637
18599
  //#endregion
18638
18600
  //#region ../../node_modules/.pnpm/launch-editor-middleware@2.11.1/node_modules/launch-editor-middleware/index.js
18639
18601
  var require_launch_editor_middleware = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/launch-editor-middleware@2.11.1/node_modules/launch-editor-middleware/index.js": ((exports, module) => {
18640
- const path$5 = require("path");
18602
+ const path$5 = __require("path");
18641
18603
  const launch = require_launch_editor();
18642
18604
  module.exports = (specifiedEditor, srcRoot, onErrorCallback) => {
18643
18605
  if (typeof specifiedEditor === "function") {
@@ -19350,18 +19312,18 @@ function walk$1(root, { onIdentifier, onImportMeta, onDynamicImport, onStatement
19350
19312
  function isInScope(name, parents) {
19351
19313
  return parents.some((node) => scopeMap.get(node)?.has(name));
19352
19314
  }
19353
- function handlePattern(p$1, parentScope) {
19354
- if (p$1.type === "Identifier") setScope(parentScope, p$1.name);
19355
- else if (p$1.type === "RestElement") handlePattern(p$1.argument, parentScope);
19356
- else if (p$1.type === "ObjectPattern") p$1.properties.forEach((property) => {
19315
+ function handlePattern(p, parentScope) {
19316
+ if (p.type === "Identifier") setScope(parentScope, p.name);
19317
+ else if (p.type === "RestElement") handlePattern(p.argument, parentScope);
19318
+ else if (p.type === "ObjectPattern") p.properties.forEach((property) => {
19357
19319
  if (property.type === "RestElement") setScope(parentScope, property.argument.name);
19358
19320
  else handlePattern(property.value, parentScope);
19359
19321
  });
19360
- else if (p$1.type === "ArrayPattern") p$1.elements.forEach((element) => {
19322
+ else if (p.type === "ArrayPattern") p.elements.forEach((element) => {
19361
19323
  if (element) handlePattern(element, parentScope);
19362
19324
  });
19363
- else if (p$1.type === "AssignmentPattern") handlePattern(p$1.left, parentScope);
19364
- else setScope(parentScope, p$1.name);
19325
+ else if (p.type === "AssignmentPattern") handlePattern(p.left, parentScope);
19326
+ else setScope(parentScope, p.name);
19365
19327
  }
19366
19328
  walk(root, {
19367
19329
  enter(node, parent) {
@@ -19380,12 +19342,12 @@ function walk$1(root, { onIdentifier, onImportMeta, onDynamicImport, onStatement
19380
19342
  if (parentScope) setScope(parentScope, node.id.name);
19381
19343
  }
19382
19344
  if (node.type === "FunctionExpression" && node.id) setScope(node, node.id.name);
19383
- node.params.forEach((p$1) => {
19384
- if (p$1.type === "ObjectPattern" || p$1.type === "ArrayPattern") {
19385
- handlePattern(p$1, node);
19345
+ node.params.forEach((p) => {
19346
+ if (p.type === "ObjectPattern" || p.type === "ArrayPattern") {
19347
+ handlePattern(p, node);
19386
19348
  return;
19387
19349
  }
19388
- walk(p$1.type === "AssignmentPattern" ? p$1.left : p$1, { enter(child, parent$1) {
19350
+ walk(p.type === "AssignmentPattern" ? p.left : p, { enter(child, parent$1) {
19389
19351
  if (parent$1?.type === "AssignmentPattern" && parent$1.right === child) return this.skip();
19390
19352
  if (child.type !== "Identifier") return;
19391
19353
  if (isStaticPropertyKey(child, parent$1)) return;
@@ -19885,15 +19847,15 @@ var open_default = open;
19885
19847
  var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
19886
19848
  module.exports = isexe$3;
19887
19849
  isexe$3.sync = sync$2;
19888
- var fs$4 = require("fs");
19850
+ var fs$4 = __require("fs");
19889
19851
  function checkPathExt(path$13, options$1) {
19890
19852
  var pathext = options$1.pathExt !== void 0 ? options$1.pathExt : process.env.PATHEXT;
19891
19853
  if (!pathext) return true;
19892
19854
  pathext = pathext.split(";");
19893
19855
  if (pathext.indexOf("") !== -1) return true;
19894
19856
  for (var i$1 = 0; i$1 < pathext.length; i$1++) {
19895
- var p$1 = pathext[i$1].toLowerCase();
19896
- if (p$1 && path$13.substr(-p$1.length).toLowerCase() === p$1) return true;
19857
+ var p = pathext[i$1].toLowerCase();
19858
+ if (p && path$13.substr(-p.length).toLowerCase() === p) return true;
19897
19859
  }
19898
19860
  return false;
19899
19861
  }
@@ -19916,7 +19878,7 @@ var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ise
19916
19878
  var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
19917
19879
  module.exports = isexe$2;
19918
19880
  isexe$2.sync = sync$1;
19919
- var fs$3 = require("fs");
19881
+ var fs$3 = __require("fs");
19920
19882
  function isexe$2(path$13, options$1, cb) {
19921
19883
  fs$3.stat(path$13, function(er, stat$4) {
19922
19884
  cb(er, er ? false : checkStat(stat$4, options$1));
@@ -19946,7 +19908,7 @@ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@
19946
19908
  //#endregion
19947
19909
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
19948
19910
  var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
19949
- require("fs");
19911
+ __require("fs");
19950
19912
  var core;
19951
19913
  if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
19952
19914
  else core = require_mode();
@@ -19990,7 +19952,7 @@ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe
19990
19952
  //#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
19991
19953
  var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
19992
19954
  const isWindows$1 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
19993
- const path$4 = require("path");
19955
+ const path$4 = __require("path");
19994
19956
  const COLON = isWindows$1 ? ";" : ":";
19995
19957
  const isexe = require_isexe();
19996
19958
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -20021,16 +19983,16 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
20021
19983
  const ppRaw = pathEnv[i$1];
20022
19984
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
20023
19985
  const pCmd = path$4.join(pathPart, cmd);
20024
- const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
20025
- resolve$4(subStep(p$1, i$1, 0));
19986
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
19987
+ resolve$4(subStep(p, i$1, 0));
20026
19988
  });
20027
- const subStep = (p$1, i$1, ii) => new Promise((resolve$4, reject) => {
19989
+ const subStep = (p, i$1, ii) => new Promise((resolve$4, reject) => {
20028
19990
  if (ii === pathExt.length) return resolve$4(step(i$1 + 1));
20029
19991
  const ext = pathExt[ii];
20030
- isexe(p$1 + ext, { pathExt: pathExtExe }, (er, is) => {
20031
- if (!er && is) if (opt.all) found$1.push(p$1 + ext);
20032
- else return resolve$4(p$1 + ext);
20033
- return resolve$4(subStep(p$1, i$1, ii + 1));
19992
+ isexe(p + ext, { pathExt: pathExtExe }, (er, is) => {
19993
+ if (!er && is) if (opt.all) found$1.push(p + ext);
19994
+ else return resolve$4(p + ext);
19995
+ return resolve$4(subStep(p, i$1, ii + 1));
20034
19996
  });
20035
19997
  });
20036
19998
  return cb ? step(0).then((res) => cb(null, res), cb) : step(0);
@@ -20043,9 +20005,9 @@ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which
20043
20005
  const ppRaw = pathEnv[i$1];
20044
20006
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
20045
20007
  const pCmd = path$4.join(pathPart, cmd);
20046
- const p$1 = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
20008
+ const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
20047
20009
  for (let j = 0; j < pathExt.length; j++) {
20048
- const cur = p$1 + pathExt[j];
20010
+ const cur = p + pathExt[j];
20049
20011
  try {
20050
20012
  const is = isexe.sync(cur, { pathExt: pathExtExe });
20051
20013
  if (is) if (opt.all) found$1.push(cur);
@@ -20077,11 +20039,11 @@ var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pa
20077
20039
  //#endregion
20078
20040
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
20079
20041
  var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
20080
- const path$3 = require("path");
20042
+ const path$3 = __require("path");
20081
20043
  const which = require_which();
20082
20044
  const getPathKey = require_path_key();
20083
20045
  function resolveCommandAttempt(parsed, withoutPathExt) {
20084
- const env$2 = parsed.options.env || process.env;
20046
+ const env$1 = parsed.options.env || process.env;
20085
20047
  const cwd = process.cwd();
20086
20048
  const hasCustomCwd = parsed.options.cwd != null;
20087
20049
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
@@ -20091,7 +20053,7 @@ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.p
20091
20053
  let resolved;
20092
20054
  try {
20093
20055
  resolved = which.sync(parsed.command, {
20094
- path: env$2[getPathKey({ env: env$2 })],
20056
+ path: env$1[getPathKey({ env: env$1 })],
20095
20057
  pathExt: withoutPathExt ? path$3.delimiter : void 0
20096
20058
  });
20097
20059
  } catch (e$1) {} finally {
@@ -20150,7 +20112,7 @@ var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.
20150
20112
  //#endregion
20151
20113
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
20152
20114
  var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
20153
- const fs$2 = require("fs");
20115
+ const fs$2 = __require("fs");
20154
20116
  const shebangCommand = require_shebang_command();
20155
20117
  function readShebang$1(command) {
20156
20118
  const size = 150;
@@ -20169,7 +20131,7 @@ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
20169
20131
  //#endregion
20170
20132
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
20171
20133
  var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
20172
- const path$2 = require("path");
20134
+ const path$2 = __require("path");
20173
20135
  const resolveCommand = require_resolveCommand();
20174
20136
  const escape$1 = require_escape();
20175
20137
  const readShebang = require_readShebang();
@@ -20272,7 +20234,7 @@ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cros
20272
20234
  //#endregion
20273
20235
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
20274
20236
  var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
20275
- const cp = require("child_process");
20237
+ const cp = __require("child_process");
20276
20238
  const parse$5 = require_parse();
20277
20239
  const enoent = require_enoent();
20278
20240
  function spawn$1(command, args, options$1) {
@@ -20525,7 +20487,7 @@ function createNoopWatcher(options$1) {
20525
20487
 
20526
20488
  //#endregion
20527
20489
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js
20528
- var require_constants$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js": ((exports, module) => {
20490
+ var require_constants = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/constants.js": ((exports, module) => {
20529
20491
  const BINARY_TYPES$2 = [
20530
20492
  "nodebuffer",
20531
20493
  "arraybuffer",
@@ -20549,7 +20511,7 @@ var require_constants$1 = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
20549
20511
  //#endregion
20550
20512
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/buffer-util.js
20551
20513
  var require_buffer_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/buffer-util.js": ((exports, module) => {
20552
- const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = require_constants$1();
20514
+ const { EMPTY_BUFFER: EMPTY_BUFFER$3 } = require_constants();
20553
20515
  const FastBuffer$2 = Buffer[Symbol.species];
20554
20516
  /**
20555
20517
  * Merges an array of buffers into a new buffer.
@@ -20635,7 +20597,7 @@ var require_buffer_util = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
20635
20597
  };
20636
20598
  /* istanbul ignore else */
20637
20599
  if (!process.env.WS_NO_BUFFER_UTIL) try {
20638
- const bufferUtil$1 = require("bufferutil");
20600
+ const bufferUtil$1 = __require("bufferutil");
20639
20601
  module.exports.mask = function(source, mask, output, offset$1, length) {
20640
20602
  if (length < 48) _mask(source, mask, output, offset$1, length);
20641
20603
  else bufferUtil$1.mask(source, mask, output, offset$1, length);
@@ -20702,10 +20664,10 @@ var require_limiter = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@
20702
20664
  //#endregion
20703
20665
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js
20704
20666
  var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/permessage-deflate.js": ((exports, module) => {
20705
- const zlib$1 = require("zlib");
20667
+ const zlib$1 = __require("zlib");
20706
20668
  const bufferUtil = require_buffer_util();
20707
20669
  const Limiter = require_limiter();
20708
- const { kStatusCode: kStatusCode$2 } = require_constants$1();
20670
+ const { kStatusCode: kStatusCode$2 } = require_constants();
20709
20671
  const FastBuffer$1 = Buffer[Symbol.species];
20710
20672
  const TRAILER = Buffer.from([
20711
20673
  0,
@@ -21039,8 +21001,8 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJS({ "../../node_module
21039
21001
  //#endregion
21040
21002
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js
21041
21003
  var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/validation.js": ((exports, module) => {
21042
- const { isUtf8 } = require("buffer");
21043
- const { hasBlob } = require_constants$1();
21004
+ const { isUtf8 } = __require("buffer");
21005
+ const { hasBlob } = require_constants();
21044
21006
  const tokenChars$2 = [
21045
21007
  0,
21046
21008
  0,
@@ -21226,7 +21188,7 @@ var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
21226
21188
  return buf.length < 24 ? _isValidUTF8(buf) : isUtf8(buf);
21227
21189
  };
21228
21190
  else if (!process.env.WS_NO_UTF_8_VALIDATE) try {
21229
- const isValidUTF8$1 = require("utf-8-validate");
21191
+ const isValidUTF8$1 = __require("utf-8-validate");
21230
21192
  module.exports.isValidUTF8 = function(buf) {
21231
21193
  return buf.length < 32 ? _isValidUTF8(buf) : isValidUTF8$1(buf);
21232
21194
  };
@@ -21236,9 +21198,9 @@ var require_validation = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
21236
21198
  //#endregion
21237
21199
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js
21238
21200
  var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/receiver.js": ((exports, module) => {
21239
- const { Writable: Writable$1 } = require("stream");
21201
+ const { Writable: Writable$1 } = __require("stream");
21240
21202
  const PerMessageDeflate$3 = require_permessage_deflate();
21241
- const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants$1();
21203
+ const { BINARY_TYPES: BINARY_TYPES$1, EMPTY_BUFFER: EMPTY_BUFFER$2, kStatusCode: kStatusCode$1, kWebSocket: kWebSocket$3 } = require_constants();
21242
21204
  const { concat, toArrayBuffer, unmask } = require_buffer_util();
21243
21205
  const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = require_validation();
21244
21206
  const FastBuffer = Buffer[Symbol.species];
@@ -21702,10 +21664,10 @@ var require_receiver = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws
21702
21664
  //#endregion
21703
21665
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js
21704
21666
  var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/sender.js": ((exports, module) => {
21705
- const { Duplex: Duplex$3 } = require("stream");
21706
- const { randomFillSync } = require("crypto");
21667
+ const { Duplex: Duplex$3 } = __require("stream");
21668
+ const { randomFillSync } = __require("crypto");
21707
21669
  const PerMessageDeflate$2 = require_permessage_deflate();
21708
- const { EMPTY_BUFFER: EMPTY_BUFFER$1, kWebSocket: kWebSocket$2, NOOP: NOOP$2 } = require_constants$1();
21670
+ const { EMPTY_BUFFER: EMPTY_BUFFER$1, kWebSocket: kWebSocket$2, NOOP: NOOP$2 } = require_constants();
21709
21671
  const { isBlob: isBlob$1, isValidStatusCode } = require_validation();
21710
21672
  const { mask: applyMask, toBuffer: toBuffer$1 } = require_buffer_util();
21711
21673
  const kByteLength = Symbol("kByteLength");
@@ -22199,7 +22161,7 @@ var require_sender = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8
22199
22161
  //#endregion
22200
22162
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/event-target.js
22201
22163
  var require_event_target = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/event-target.js": ((exports, module) => {
22202
- const { kForOnEventAttribute: kForOnEventAttribute$1, kListener: kListener$1 } = require_constants$1();
22164
+ const { kForOnEventAttribute: kForOnEventAttribute$1, kListener: kListener$1 } = require_constants();
22203
22165
  const kCode = Symbol("kCode");
22204
22166
  const kData = Symbol("kData");
22205
22167
  const kError = Symbol("kError");
@@ -22563,19 +22525,19 @@ var require_extension = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
22563
22525
  //#endregion
22564
22526
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js
22565
22527
  var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket.js": ((exports, module) => {
22566
- const EventEmitter$2 = require("events");
22567
- const https$4 = require("https");
22568
- const http$5 = require("http");
22569
- const net$1 = require("net");
22570
- const tls = require("tls");
22571
- const { randomBytes, createHash: createHash$1 } = require("crypto");
22572
- const { Duplex: Duplex$2, Readable } = require("stream");
22573
- const { URL: URL$3 } = require("url");
22528
+ const EventEmitter$2 = __require("events");
22529
+ const https$4 = __require("https");
22530
+ const http$5 = __require("http");
22531
+ const net$1 = __require("net");
22532
+ const tls = __require("tls");
22533
+ const { randomBytes, createHash: createHash$1 } = __require("crypto");
22534
+ const { Duplex: Duplex$2, Readable } = __require("stream");
22535
+ const { URL: URL$3 } = __require("url");
22574
22536
  const PerMessageDeflate$1 = require_permessage_deflate();
22575
22537
  const Receiver$1 = require_receiver();
22576
22538
  const Sender$1 = require_sender();
22577
22539
  const { isBlob } = require_validation();
22578
- const { BINARY_TYPES, EMPTY_BUFFER, GUID: GUID$1, kForOnEventAttribute, kListener, kStatusCode, kWebSocket: kWebSocket$1, NOOP: NOOP$1 } = require_constants$1();
22540
+ const { BINARY_TYPES, EMPTY_BUFFER, GUID: GUID$1, kForOnEventAttribute, kListener, kStatusCode, kWebSocket: kWebSocket$1, NOOP: NOOP$1 } = require_constants();
22579
22541
  const { EventTarget: { addEventListener, removeEventListener } } = require_event_target();
22580
22542
  const { format: format$1, parse: parse$3 } = require_extension();
22581
22543
  const { toBuffer } = require_buffer_util();
@@ -23537,7 +23499,7 @@ var require_websocket = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/w
23537
23499
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js
23538
23500
  var require_stream = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/stream.js": ((exports, module) => {
23539
23501
  require_websocket();
23540
- const { Duplex: Duplex$1 } = require("stream");
23502
+ const { Duplex: Duplex$1 } = __require("stream");
23541
23503
  /**
23542
23504
  * Emits the `'close'` event on a stream.
23543
23505
  *
@@ -23693,15 +23655,15 @@ var require_subprotocol = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
23693
23655
  //#endregion
23694
23656
  //#region ../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js
23695
23657
  var require_websocket_server = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/ws@8.18.3/node_modules/ws/lib/websocket-server.js": ((exports, module) => {
23696
- const EventEmitter$1 = require("events");
23697
- const http$4 = require("http");
23698
- const { Duplex } = require("stream");
23699
- const { createHash } = require("crypto");
23658
+ const EventEmitter$1 = __require("events");
23659
+ const http$4 = __require("http");
23660
+ const { Duplex } = __require("stream");
23661
+ const { createHash } = __require("crypto");
23700
23662
  const extension = require_extension();
23701
23663
  const PerMessageDeflate = require_permessage_deflate();
23702
23664
  const subprotocol = require_subprotocol();
23703
23665
  const WebSocket$1 = require_websocket();
23704
- const { GUID, kWebSocket } = require_constants$1();
23666
+ const { GUID, kWebSocket } = require_constants();
23705
23667
  const keyRegex = /^[+/0-9A-Za-z]{22}==$/;
23706
23668
  const RUNNING = 0;
23707
23669
  const CLOSING = 1;
@@ -24409,8 +24371,8 @@ function baseMiddleware(rawBase, middlewareMode) {
24409
24371
  }
24410
24372
 
24411
24373
  //#endregion
24412
- //#region ../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/common.js
24413
- var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/common.js": ((exports) => {
24374
+ //#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/common.js
24375
+ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/common.js": ((exports) => {
24414
24376
  Object.defineProperty(exports, "__esModule", { value: true });
24415
24377
  exports.isSSL = void 0;
24416
24378
  exports.setupOutgoing = setupOutgoing;
@@ -24420,7 +24382,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24420
24382
  exports.urlJoin = urlJoin;
24421
24383
  exports.rewriteCookieProperty = rewriteCookieProperty;
24422
24384
  exports.toURL = toURL;
24423
- const tls_1 = require("tls");
24385
+ const node_tls_1 = __require("node:tls");
24424
24386
  const upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
24425
24387
  exports.isSSL = /^https|wss/;
24426
24388
  const HEADER_BLACKLIST = "trailer";
@@ -24449,7 +24411,10 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24449
24411
  delete outgoing.headers[header];
24450
24412
  break;
24451
24413
  }
24452
- if (options$1.auth) outgoing.auth = options$1.auth;
24414
+ if (options$1.auth) {
24415
+ delete outgoing.headers.authorization;
24416
+ outgoing.auth = options$1.auth;
24417
+ }
24453
24418
  if (options$1.ca) outgoing.ca = options$1.ca;
24454
24419
  if (target.protocol !== void 0 && exports.isSSL.test(target.protocol)) outgoing.rejectUnauthorized = typeof options$1.secure === "undefined" ? true : options$1.secure;
24455
24420
  outgoing.agent = options$1.agent || false;
@@ -24458,7 +24423,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24458
24423
  outgoing.headers = outgoing.headers || {};
24459
24424
  if (typeof outgoing.headers.connection !== "string" || !upgradeHeader.test(outgoing.headers.connection)) outgoing.headers.connection = "close";
24460
24425
  }
24461
- const targetPath = target && options$1.prependPath !== false && "pathname" in target ? getPath(target.pathname) : "/";
24426
+ const targetPath = target && options$1.prependPath !== false && "pathname" in target ? getPath(`${target.pathname}${target.search ?? ""}`) : "/";
24462
24427
  let outgoingPath = options$1.toProxy ? req$4.url : getPath(req$4.url);
24463
24428
  outgoingPath = !options$1.ignorePath ? outgoingPath : "";
24464
24429
  outgoing.path = urlJoin(targetPath, outgoingPath ?? "");
@@ -24477,7 +24442,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24477
24442
  }
24478
24443
  function hasEncryptedConnection(req$4) {
24479
24444
  const conn = req$4.connection;
24480
- return conn instanceof tls_1.TLSSocket && conn.encrypted || Boolean(conn.pair);
24445
+ return conn instanceof node_tls_1.TLSSocket && conn.encrypted || Boolean(conn.pair);
24481
24446
  }
24482
24447
  function urlJoin(...args) {
24483
24448
  const queryParams = [];
@@ -24517,6 +24482,7 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24517
24482
  return !!~host.indexOf(":");
24518
24483
  }
24519
24484
  function getPath(url$3) {
24485
+ if (url$3 === "" || url$3?.startsWith("?")) return url$3;
24520
24486
  const u = toURL(url$3);
24521
24487
  return `${u.pathname ?? ""}${u.search ?? ""}`;
24522
24488
  }
@@ -24543,8 +24509,8 @@ var require_common = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http
24543
24509
  }) });
24544
24510
 
24545
24511
  //#endregion
24546
- //#region ../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
24547
- var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js": ((exports) => {
24512
+ //#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
24513
+ var require_web_outgoing = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js": ((exports) => {
24548
24514
  var __createBinding$3 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
24549
24515
  if (k2 === void 0) k2 = k;
24550
24516
  var desc = Object.getOwnPropertyDescriptor(m$2, k);
@@ -24673,12 +24639,12 @@ var require_debug = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follo
24673
24639
  //#endregion
24674
24640
  //#region ../../node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.1/node_modules/follow-redirects/index.js
24675
24641
  var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/follow-redirects@1.15.9_debug@4.4.1/node_modules/follow-redirects/index.js": ((exports, module) => {
24676
- var url = require("url");
24642
+ var url = __require("url");
24677
24643
  var URL$2 = url.URL;
24678
- var http$3 = require("http");
24679
- var https$3 = require("https");
24680
- var Writable = require("stream").Writable;
24681
- var assert$1 = require("assert");
24644
+ var http$3 = __require("http");
24645
+ var https$3 = __require("https");
24646
+ var Writable = __require("stream").Writable;
24647
+ var assert$1 = __require("assert");
24682
24648
  var debug$6 = require_debug();
24683
24649
  // istanbul ignore next
24684
24650
  (function detectUnsupportedEnvironment() {
@@ -25104,8 +25070,8 @@ var require_follow_redirects = /* @__PURE__ */ __commonJS({ "../../node_modules/
25104
25070
  }) });
25105
25071
 
25106
25072
  //#endregion
25107
- //#region ../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
25108
- var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js": ((exports) => {
25073
+ //#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
25074
+ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js": ((exports) => {
25109
25075
  var __createBinding$2 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
25110
25076
  if (k2 === void 0) k2 = k;
25111
25077
  var desc = Object.getOwnPropertyDescriptor(m$2, k);
@@ -25153,8 +25119,8 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
25153
25119
  exports.timeout = timeout;
25154
25120
  exports.XHeaders = XHeaders$1;
25155
25121
  exports.stream = stream$1;
25156
- const http$2 = __importStar$2(require("http"));
25157
- const https$2 = __importStar$2(require("https"));
25122
+ const http$2 = __importStar$2(__require("node:http"));
25123
+ const https$2 = __importStar$2(__require("node:https"));
25158
25124
  const web_outgoing_1 = require_web_outgoing();
25159
25125
  const common$1 = __importStar$2(require_common());
25160
25126
  const followRedirects = __importStar$2(require_follow_redirects());
@@ -25250,8 +25216,8 @@ var require_web_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnp
25250
25216
  }) });
25251
25217
 
25252
25218
  //#endregion
25253
- //#region ../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
25254
- var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js": ((exports) => {
25219
+ //#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
25220
+ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js": ((exports) => {
25255
25221
  var __createBinding$1 = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
25256
25222
  if (k2 === void 0) k2 = k;
25257
25223
  var desc = Object.getOwnPropertyDescriptor(m$2, k);
@@ -25302,8 +25268,8 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
25302
25268
  exports.checkMethodAndHeader = checkMethodAndHeader;
25303
25269
  exports.XHeaders = XHeaders;
25304
25270
  exports.stream = stream;
25305
- const http$1 = __importStar$1(require("http"));
25306
- const https$1 = __importStar$1(require("https"));
25271
+ const http$1 = __importStar$1(__require("node:http"));
25272
+ const https$1 = __importStar$1(__require("node:https"));
25307
25273
  const common = __importStar$1(require_common());
25308
25274
  const debug_1$1 = __importDefault$1(require_node$1());
25309
25275
  const log$1 = (0, debug_1$1.default)("http-proxy-3:ws-incoming");
@@ -25357,7 +25323,7 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
25357
25323
  const proxySockets = [];
25358
25324
  socketCounter({ add: socket });
25359
25325
  const cleanUpProxySockets = () => {
25360
- for (const p$1 of proxySockets) p$1.end();
25326
+ for (const p of proxySockets) p.end();
25361
25327
  };
25362
25328
  socket.on("close", () => {
25363
25329
  socketCounter({ rm: socket });
@@ -25417,8 +25383,8 @@ var require_ws_incoming = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
25417
25383
  }) });
25418
25384
 
25419
25385
  //#endregion
25420
- //#region ../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/index.js
25421
- var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/http-proxy/index.js": ((exports) => {
25386
+ //#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.js
25387
+ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/http-proxy/index.js": ((exports) => {
25422
25388
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o$1, m$2, k, k2) {
25423
25389
  if (k2 === void 0) k2 = k;
25424
25390
  var desc = Object.getOwnPropertyDescriptor(m$2, k);
@@ -25465,15 +25431,15 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
25465
25431
  };
25466
25432
  Object.defineProperty(exports, "__esModule", { value: true });
25467
25433
  exports.ProxyServer = void 0;
25468
- const http = __importStar(require("http"));
25469
- const https = __importStar(require("https"));
25434
+ const http = __importStar(__require("node:http"));
25435
+ const https = __importStar(__require("node:https"));
25470
25436
  const web_incoming_1 = require_web_incoming();
25471
25437
  const ws_incoming_1$1 = require_ws_incoming();
25472
- const events_1 = require("events");
25438
+ const node_events_1 = __require("node:events");
25473
25439
  const debug_1 = __importDefault(require_node$1());
25474
25440
  const common_1 = require_common();
25475
25441
  const log = (0, debug_1.default)("http-proxy-3");
25476
- var ProxyServer = class ProxyServer extends events_1.EventEmitter {
25442
+ var ProxyServer = class ProxyServer extends node_events_1.EventEmitter {
25477
25443
  /**
25478
25444
  * Creates the proxy server with specified options.
25479
25445
  * @param options - Config object passed to the proxy
@@ -25541,7 +25507,10 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
25541
25507
  port,
25542
25508
  hostname
25543
25509
  });
25544
- this._server = this.options.ssl ? https.createServer(this.options.ssl, this.web) : http.createServer(this.web);
25510
+ const requestListener = (req$4, res) => {
25511
+ this.web(req$4, res);
25512
+ };
25513
+ this._server = this.options.ssl ? https.createServer(this.options.ssl, requestListener) : http.createServer(requestListener);
25545
25514
  if (this.options.ws) this._server.on("upgrade", (req$4, socket, head) => {
25546
25515
  this.ws(req$4, socket, head);
25547
25516
  });
@@ -25622,8 +25591,8 @@ var require_http_proxy = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/
25622
25591
  }) });
25623
25592
 
25624
25593
  //#endregion
25625
- //#region ../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/index.js
25626
- var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.20.10/node_modules/http-proxy-3/dist/lib/index.js": ((exports) => {
25594
+ //#region ../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/index.js
25595
+ var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/http-proxy-3@1.21.0/node_modules/http-proxy-3/dist/lib/index.js": ((exports) => {
25627
25596
  Object.defineProperty(exports, "__esModule", { value: true });
25628
25597
  exports.numOpenSockets = exports.ProxyServer = void 0;
25629
25598
  exports.createProxyServer = createProxyServer;
@@ -25838,8 +25807,8 @@ var require_etag = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/etag@1
25838
25807
  * Module dependencies.
25839
25808
  * @private
25840
25809
  */
25841
- var crypto$1 = require("crypto");
25842
- var Stats = require("fs").Stats;
25810
+ var crypto$1 = __require("crypto");
25811
+ var Stats = __require("fs").Stats;
25843
25812
  /**
25844
25813
  * Module variables.
25845
25814
  * @private
@@ -26742,7 +26711,7 @@ function traverseNodes(node, visitor) {
26742
26711
  if (nodeIsElement(node) || node.nodeName === "#document" || node.nodeName === "#document-fragment") node.childNodes.forEach((childNode) => traverseNodes(childNode, visitor));
26743
26712
  }
26744
26713
  async function traverseHtml(html, filePath, warn, visitor) {
26745
- const { parse: parse$17 } = await import("./dep-V5uAjiuB.js");
26714
+ const { parse: parse$17 } = await import("./dep-sDKrrA4S.js");
26746
26715
  const warnings = {};
26747
26716
  const ast = parse$17(html, {
26748
26717
  scriptingEnabled: false,
@@ -26760,16 +26729,16 @@ function getScriptInfo(node) {
26760
26729
  let isModule = false;
26761
26730
  let isAsync = false;
26762
26731
  let isIgnored = false;
26763
- for (const p$1 of node.attrs) {
26764
- if (p$1.prefix !== void 0) continue;
26765
- if (p$1.name === "src") {
26732
+ for (const p of node.attrs) {
26733
+ if (p.prefix !== void 0) continue;
26734
+ if (p.name === "src") {
26766
26735
  if (!src) {
26767
- src = p$1;
26736
+ src = p;
26768
26737
  srcSourceCodeLocation = node.sourceCodeLocation?.attrs["src"];
26769
26738
  }
26770
- } else if (p$1.name === "type" && p$1.value === "module") isModule = true;
26771
- else if (p$1.name === "async") isAsync = true;
26772
- else if (p$1.name === "vite-ignore") isIgnored = true;
26739
+ } else if (p.name === "type" && p.value === "module") isModule = true;
26740
+ else if (p.name === "async") isAsync = true;
26741
+ else if (p.name === "vite-ignore") isIgnored = true;
26773
26742
  }
26774
26743
  return {
26775
26744
  src,
@@ -26819,7 +26788,7 @@ function handleParseError(parserError, html, filePath, warnings) {
26819
26788
  case "unexpected-question-mark-instead-of-tag-name": return;
26820
26789
  }
26821
26790
  const parseError = formatParseError(parserError, filePath, html);
26822
- warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n${parseError.frame.length > 300 ? "[this code frame is omitted as the content was too long] " : parseError.frame}`;
26791
+ warnings[parseError.code] ??= `Unable to parse HTML; ${parseError.message}\n at ${parseError.loc.file}:${parseError.loc.line}:${parseError.loc.column}\n` + parseError.frame;
26823
26792
  }
26824
26793
  /**
26825
26794
  * Compiles index.html into an entry js module
@@ -27227,20 +27196,20 @@ function injectCspNonceMetaTagHook(config$2) {
27227
27196
  function htmlEnvHook(config$2) {
27228
27197
  const pattern = /%(\S+?)%/g;
27229
27198
  const envPrefix = resolveEnvPrefix({ envPrefix: config$2.envPrefix });
27230
- const env$2 = { ...config$2.env };
27199
+ const env$1 = { ...config$2.env };
27231
27200
  for (const key in config$2.define) if (key.startsWith(`import.meta.env.`)) {
27232
27201
  const val = config$2.define[key];
27233
27202
  if (typeof val === "string") try {
27234
27203
  const parsed = JSON.parse(val);
27235
- env$2[key.slice(16)] = typeof parsed === "string" ? parsed : val;
27204
+ env$1[key.slice(16)] = typeof parsed === "string" ? parsed : val;
27236
27205
  } catch {
27237
- env$2[key.slice(16)] = val;
27206
+ env$1[key.slice(16)] = val;
27238
27207
  }
27239
- else env$2[key.slice(16)] = JSON.stringify(val);
27208
+ else env$1[key.slice(16)] = JSON.stringify(val);
27240
27209
  }
27241
27210
  return (html, ctx) => {
27242
27211
  return html.replace(pattern, (text, key) => {
27243
- if (key in env$2) return env$2[key];
27212
+ if (key in env$1) return env$1[key];
27244
27213
  else {
27245
27214
  if (envPrefix.some((prefix) => key.startsWith(prefix))) {
27246
27215
  const relativeHtml = normalizePath(path.relative(config$2.root, ctx.filename));
@@ -27521,7 +27490,7 @@ function transformMiddleware(server) {
27521
27490
  }
27522
27491
  }
27523
27492
  const result = await environment.transformRequest(url$3, { allowId(id) {
27524
- return id.startsWith("\0") || !isServerAccessDeniedForTransform(server.config, id);
27493
+ return id[0] === "\0" || !isServerAccessDeniedForTransform(server.config, id);
27525
27494
  } });
27526
27495
  if (result) {
27527
27496
  const depsOptimizer = environment.depsOptimizer;
@@ -28416,8 +28385,8 @@ async function _createServer(inlineConfig = {}, options$1) {
28416
28385
  warnFutureDeprecation(config$2, "removeServerPluginContainer");
28417
28386
  return pluginContainer;
28418
28387
  },
28419
- set pluginContainer(p$1) {
28420
- pluginContainer = p$1;
28388
+ set pluginContainer(p) {
28389
+ pluginContainer = p;
28421
28390
  },
28422
28391
  get moduleGraph() {
28423
28392
  warnFutureDeprecation(config$2, "removeServerModuleGraph");
@@ -29547,7 +29516,7 @@ async function bundleWorkerEntry(config$2, id) {
29547
29516
  const bundle = await rollup({
29548
29517
  ...rollupOptions,
29549
29518
  input,
29550
- plugins: workerEnvironment.plugins.map((p$1) => injectEnvironmentToHooks(workerEnvironment, p$1)),
29519
+ plugins: workerEnvironment.plugins.map((p) => injectEnvironmentToHooks(workerEnvironment, p)),
29551
29520
  onLog(level, log$4) {
29552
29521
  onRollupLog(level, log$4, workerEnvironment);
29553
29522
  },
@@ -29952,13 +29921,13 @@ function importAnalysisPlugin(config$2) {
29952
29921
  const userDefineEnv = {};
29953
29922
  for (const key in config$2.env) importMetaEnvKeys[key] = JSON.stringify(config$2.env[key]);
29954
29923
  for (const key in config$2.define) if (key.startsWith("import.meta.env.")) userDefineEnv[key.slice(16)] = config$2.define[key];
29955
- const env$2 = `import.meta.env = ${serializeDefine({
29924
+ const env$1 = `import.meta.env = ${serializeDefine({
29956
29925
  ...importMetaEnvKeys,
29957
29926
  SSR: "__vite_ssr__",
29958
29927
  ...userDefineEnv
29959
29928
  })};`;
29960
- _ssrEnv = env$2.replace("__vite_ssr__", "true");
29961
- _env = env$2.replace("__vite_ssr__", "false");
29929
+ _ssrEnv = env$1.replace("__vite_ssr__", "true");
29930
+ _env = env$1.replace("__vite_ssr__", "false");
29962
29931
  }
29963
29932
  return ssr ? _ssrEnv : _env;
29964
29933
  }
@@ -30022,16 +29991,7 @@ function importAnalysisPlugin(config$2) {
30022
29991
  return this.error(`Failed to resolve import "${url$3}" from "${normalizePath(path.relative(process.cwd(), importerFile))}". Does the file exist?`, pos);
30023
29992
  }
30024
29993
  if (isExternalUrl(resolved.id)) return [resolved.id, resolved.id];
30025
- const isRelative$1 = url$3[0] === ".";
30026
- const isSelfImport = !isRelative$1 && cleanUrl(url$3) === cleanUrl(importer);
30027
29994
  url$3 = normalizeResolvedIdToUrl(environment, url$3, resolved);
30028
- if (environment.config.consumer === "client") {
30029
- if (isExplicitImportRequired(url$3)) url$3 = injectQuery(url$3, "import");
30030
- else if ((isRelative$1 || isSelfImport) && !DEP_VERSION_RE.test(url$3)) {
30031
- const versionMatch = DEP_VERSION_RE.exec(importer);
30032
- if (versionMatch) url$3 = injectQuery(url$3, versionMatch[1]);
30033
- }
30034
- }
30035
29995
  try {
30036
29996
  const depModule = await moduleGraph._ensureEntryFromUrl(unwrapId(url$3), canSkipImportAnalysis(url$3) || forceSkipImportAnalysis, resolved);
30037
29997
  if (environment.config.consumer === "client" && depModule.lastHMRTimestamp > 0) url$3 = injectQuery(url$3, `t=${depModule.lastHMRTimestamp}`);
@@ -30039,6 +29999,15 @@ function importAnalysisPlugin(config$2) {
30039
29999
  e$1.pos = pos;
30040
30000
  throw e$1;
30041
30001
  }
30002
+ if (environment.config.consumer === "client") {
30003
+ const isRelative$1 = url$3[0] === ".";
30004
+ const isSelfImport = !isRelative$1 && cleanUrl(url$3) === cleanUrl(importer);
30005
+ if (isExplicitImportRequired(url$3)) url$3 = injectQuery(url$3, "import");
30006
+ else if ((isRelative$1 || isSelfImport) && !DEP_VERSION_RE.test(url$3)) {
30007
+ const versionMatch = DEP_VERSION_RE.exec(importer);
30008
+ if (versionMatch) url$3 = injectQuery(url$3, versionMatch[1]);
30009
+ }
30010
+ }
30042
30011
  if (!ssr) url$3 = joinUrlSegments(base, url$3);
30043
30012
  return [url$3, resolved.id];
30044
30013
  };
@@ -30592,7 +30561,7 @@ function assetImportMetaUrlPlugin(config$2) {
30592
30561
  transform: {
30593
30562
  filter: {
30594
30563
  id: { exclude: [exactRegex(preloadHelperId), exactRegex(CLIENT_ENTRY)] },
30595
- code: /new\s+URL.+import\.meta\.url/
30564
+ code: /new\s+URL.+import\.meta\.url/s
30596
30565
  },
30597
30566
  async handler(code, id) {
30598
30567
  let s$2;
@@ -30613,7 +30582,7 @@ function assetImportMetaUrlPlugin(config$2) {
30613
30582
  const templateLiteral = ast.body[0].expression;
30614
30583
  if (templateLiteral.expressions.length) {
30615
30584
  const pattern = buildGlobPattern(templateLiteral);
30616
- if (pattern.startsWith("*")) continue;
30585
+ if (pattern[0] === "*") continue;
30617
30586
  const globOptions = {
30618
30587
  eager: true,
30619
30588
  import: "default",
@@ -30935,8 +30904,8 @@ function normalizeFilter(filter$1) {
30935
30904
  function createIdFilter(filter$1, cwd = process.cwd()) {
30936
30905
  if (!filter$1) return;
30937
30906
  const { exclude, include } = normalizeFilter(filter$1);
30938
- const excludeFilter = exclude?.map((p$1) => patternToIdFilter(p$1, cwd));
30939
- const includeFilter = include?.map((p$1) => patternToIdFilter(p$1, cwd));
30907
+ const excludeFilter = exclude?.map((p) => patternToIdFilter(p, cwd));
30908
+ const includeFilter = include?.map((p) => patternToIdFilter(p, cwd));
30940
30909
  return createFilter$1(excludeFilter, includeFilter);
30941
30910
  }
30942
30911
  function createCodeFilter(filter$1) {
@@ -30964,7 +30933,7 @@ function createFilterForTransform(idFilter, codeFilter, cwd) {
30964
30933
  async function resolvePlugins(config$2, prePlugins, normalPlugins, postPlugins) {
30965
30934
  const isBuild = config$2.command === "build";
30966
30935
  const isWorker = config$2.isWorker;
30967
- const buildPlugins = isBuild ? await (await import("./dep-BDbL9e7d.js")).resolveBuildPlugins(config$2) : {
30936
+ const buildPlugins = isBuild ? await (await import("./dep-BHlaQtHS.js")).resolveBuildPlugins(config$2) : {
30968
30937
  pre: [],
30969
30938
  post: []
30970
30939
  };
@@ -31025,7 +30994,7 @@ function createPluginHookUtils(plugins$1) {
31025
30994
  }
31026
30995
  function getSortedPluginHooks(hookName) {
31027
30996
  const plugins$2 = getSortedPlugins(hookName);
31028
- return plugins$2.map((p$1) => getHookHandler(p$1[hookName])).filter(Boolean);
30997
+ return plugins$2.map((p) => getHookHandler(p[hookName])).filter(Boolean);
31029
30998
  }
31030
30999
  return {
31031
31000
  getSortedPlugins,
@@ -32063,10 +32032,10 @@ function cssPostPlugin(config$2) {
32063
32032
  },
32064
32033
  async renderChunk(code, chunk, opts, meta) {
32065
32034
  let chunkCSS;
32066
- const renderedModules = new Proxy({}, { get(_target, p$1) {
32035
+ const renderedModules = new Proxy({}, { get(_target, p) {
32067
32036
  for (const name in meta.chunks) {
32068
32037
  const modules = meta.chunks[name].modules;
32069
- const module$1 = modules[p$1];
32038
+ const module$1 = modules[p];
32070
32039
  if (module$1) return module$1;
32071
32040
  }
32072
32041
  } });
@@ -32133,7 +32102,7 @@ function cssPostPlugin(config$2) {
32133
32102
  }
32134
32103
  }
32135
32104
  await urlEmitQueue.run(async () => Promise.all(urlEmitTasks.map(async (info) => {
32136
- info.content = await finalizeCss(info.content, true, config$2);
32105
+ info.content = await finalizeCss(info.content, config$2);
32137
32106
  })));
32138
32107
  if (urlEmitTasks.length > 0) {
32139
32108
  const toRelativeRuntime = createToImportMetaURLBasedRelativeRuntime(opts.format, config$2.isWorker);
@@ -32162,7 +32131,7 @@ function cssPostPlugin(config$2) {
32162
32131
  const originalFileName = getChunkOriginalFileName(chunk, config$2.root, opts.format);
32163
32132
  chunkCSS = resolveAssetUrlsInCss(chunkCSS, cssAssetName);
32164
32133
  chunkCSS = await codeSplitEmitQueue.run(async () => {
32165
- return finalizeCss(chunkCSS, true, config$2);
32134
+ return finalizeCss(chunkCSS, config$2);
32166
32135
  });
32167
32136
  const referenceId = this.emitFile({
32168
32137
  type: "asset",
@@ -32173,7 +32142,7 @@ function cssPostPlugin(config$2) {
32173
32142
  if (isEntry) cssEntriesMap.get(this.environment).add(referenceId);
32174
32143
  chunk.viteMetadata.importedCss.add(this.getFileName(referenceId));
32175
32144
  } else if (this.environment.config.consumer === "client") {
32176
- chunkCSS = await finalizeCss(chunkCSS, true, config$2);
32145
+ chunkCSS = await finalizeCss(chunkCSS, config$2);
32177
32146
  let cssString = JSON.stringify(chunkCSS);
32178
32147
  cssString = renderAssetUrlInJS(this, chunk, opts, cssString)?.toString() || cssString;
32179
32148
  const style = `__vite_style__`;
@@ -32227,7 +32196,7 @@ function cssPostPlugin(config$2) {
32227
32196
  for (const chunkName of dynamicImports) collect(bundle[chunkName]);
32228
32197
  if (extractedCss) {
32229
32198
  hasEmitted = true;
32230
- extractedCss = await finalizeCss(extractedCss, true, config$2);
32199
+ extractedCss = await finalizeCss(extractedCss, config$2);
32231
32200
  this.emitFile({
32232
32201
  name: getCssBundleName(),
32233
32202
  type: "asset",
@@ -32569,8 +32538,8 @@ function createCachedImport(imp) {
32569
32538
  return cached;
32570
32539
  };
32571
32540
  }
32572
- const importPostcssImport = createCachedImport(() => import("./dep-zLyvzoxR.js").then(__toDynamicImportESM(1)));
32573
- const importPostcssModules = createCachedImport(() => import("./dep-Du_AlPMa.js").then(__toDynamicImportESM(1)));
32541
+ const importPostcssImport = createCachedImport(() => import("./dep-DDbTn5rw.js").then(__toDynamicImportESM(1)));
32542
+ const importPostcssModules = createCachedImport(() => import("./dep-DCVhRpiz.js").then(__toDynamicImportESM(1)));
32574
32543
  const importPostcss = createCachedImport(() => import("postcss"));
32575
32544
  const preprocessorWorkerControllerCache = /* @__PURE__ */ new WeakMap();
32576
32545
  let alwaysFakeWorkerWorkerControllerCache;
@@ -32609,9 +32578,9 @@ function combineSourcemapsIfExists(filename, map1, map2) {
32609
32578
  }
32610
32579
  const viteHashUpdateMarker = "/*$vite$:1*/";
32611
32580
  const viteHashUpdateMarkerRE = /\/\*\$vite\$:\d+\*\//;
32612
- async function finalizeCss(css, minify, config$2) {
32581
+ async function finalizeCss(css, config$2) {
32613
32582
  if (css.includes("@import") || css.includes("@charset")) css = await hoistAtRules(css);
32614
- if (minify && config$2.build.cssMinify) css = await minifyCSS(css, config$2, false);
32583
+ if (config$2.build.cssMinify) css = await minifyCSS(css, config$2, false);
32615
32584
  css += viteHashUpdateMarker;
32616
32585
  return css;
32617
32586
  }
@@ -32939,7 +32908,8 @@ const makeScssWorker = (environment, resolvers, _maxWorkers) => {
32939
32908
  };
32940
32909
  },
32941
32910
  async stop() {
32942
- (await compilerPromise)?.dispose();
32911
+ const compiler = await compilerPromise;
32912
+ await compiler?.dispose();
32943
32913
  compilerPromise = void 0;
32944
32914
  }
32945
32915
  };
@@ -33035,9 +33005,8 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
33035
33005
  contents: "contents" in result ? result.contents : void 0
33036
33006
  };
33037
33007
  };
33038
- const worker = new WorkerWithFallback(() => {
33039
- const fsp$1 = require("node:fs/promises");
33040
- const path$13 = require("node:path");
33008
+ const worker = new WorkerWithFallback(async () => {
33009
+ const [fsp$1, path$13] = await Promise.all([import("node:fs/promises"), import("node:path")]);
33041
33010
  let ViteLessManager;
33042
33011
  const createViteLessPlugin = (less, rootFile) => {
33043
33012
  const { FileManager } = less;
@@ -33053,13 +33022,13 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
33053
33022
  supportsSync() {
33054
33023
  return false;
33055
33024
  }
33056
- async loadFile(filename, dir, opts, env$2) {
33025
+ async loadFile(filename, dir, opts, env$1) {
33057
33026
  const result = await viteLessResolve(filename, dir, this.rootFile, opts.mime);
33058
33027
  if (result) return {
33059
33028
  filename: path$13.resolve(result.resolved),
33060
33029
  contents: result.contents ?? await fsp$1.readFile(result.resolved, "utf-8")
33061
33030
  };
33062
- else return super.loadFile(filename, dir, opts, env$2);
33031
+ else return super.loadFile(filename, dir, opts, env$1);
33063
33032
  }
33064
33033
  };
33065
33034
  return {
@@ -33074,7 +33043,7 @@ const makeLessWorker = (environment, resolvers, maxWorkers) => {
33074
33043
  };
33075
33044
  };
33076
33045
  return async (lessPath, content, options$1) => {
33077
- const nodeLess = require(lessPath);
33046
+ const nodeLess = (await import(lessPath)).default;
33078
33047
  const viteResolverPlugin = createViteLessPlugin(nodeLess, options$1.filename);
33079
33048
  const result = await nodeLess.render(content, {
33080
33049
  paths: ["node_modules"],
@@ -33103,7 +33072,7 @@ const lessProcessor = (maxWorkers) => {
33103
33072
  worker?.stop();
33104
33073
  },
33105
33074
  async process(environment, source, root, options$1, resolvers) {
33106
- const lessPath = loadPreprocessorPath(PreprocessLang.less, root);
33075
+ const lessPath = pathToFileURL(loadPreprocessorPath(PreprocessLang.less, root)).href;
33107
33076
  worker ??= makeLessWorker(environment, resolvers, maxWorkers);
33108
33077
  const { content, map: additionalMap } = await getSource(source, options$1.filename, options$1.additionalData, options$1.enableSourcemap);
33109
33078
  let result;
@@ -33141,7 +33110,7 @@ const lessProcessor = (maxWorkers) => {
33141
33110
  const makeStylWorker = (maxWorkers) => {
33142
33111
  const worker = new WorkerWithFallback(() => {
33143
33112
  return async (stylusPath, content, root, options$1) => {
33144
- const nodeStylus = require(stylusPath);
33113
+ const nodeStylus = (await import(stylusPath)).default;
33145
33114
  const ref = nodeStylus(content, {
33146
33115
  paths: ["node_modules"],
33147
33116
  ...options$1
@@ -33173,7 +33142,7 @@ const stylProcessor = (maxWorkers) => {
33173
33142
  worker?.stop();
33174
33143
  },
33175
33144
  async process(_environment, source, root, options$1, _resolvers) {
33176
- const stylusPath = loadPreprocessorPath(PreprocessLang.stylus, root);
33145
+ const stylusPath = pathToFileURL(loadPreprocessorPath(PreprocessLang.stylus, root)).href;
33177
33146
  worker ??= makeStylWorker(maxWorkers);
33178
33147
  const { content, map: additionalMap } = await getSource(source, options$1.filename, options$1.additionalData, options$1.enableSourcemap, "\n");
33179
33148
  const importsDeps = (options$1.imports ?? []).map((dep) => path.resolve(dep));
@@ -33205,7 +33174,7 @@ const stylProcessor = (maxWorkers) => {
33205
33174
  function formatStylusSourceMap(mapBefore, root) {
33206
33175
  if (!mapBefore) return void 0;
33207
33176
  const map$1 = { ...mapBefore };
33208
- const resolveFromRoot = (p$1) => normalizePath(path.resolve(root, p$1));
33177
+ const resolveFromRoot = (p) => normalizePath(path.resolve(root, p));
33209
33178
  if (map$1.file) map$1.file = resolveFromRoot(map$1.file);
33210
33179
  map$1.sources = map$1.sources.map(resolveFromRoot);
33211
33180
  return map$1;
@@ -33553,7 +33522,7 @@ function preload(baseModule, deps, importerUrl) {
33553
33522
  const cspNonceMeta = document.querySelector("meta[property=csp-nonce]");
33554
33523
  const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
33555
33524
  function allSettled(promises$2) {
33556
- return Promise.all(promises$2.map((p$1) => Promise.resolve(p$1).then((value$1) => ({
33525
+ return Promise.all(promises$2.map((p) => Promise.resolve(p).then((value$1) => ({
33557
33526
  status: "fulfilled",
33558
33527
  value: value$1
33559
33528
  }), (reason) => ({
@@ -34174,7 +34143,7 @@ function resolveRollupOptions(environment) {
34174
34143
  const libOptions = options$1.lib;
34175
34144
  const { logger } = environment;
34176
34145
  const ssr = environment.config.consumer === "server";
34177
- const resolve$4 = (p$1) => path.resolve(root, p$1);
34146
+ const resolve$4 = (p) => path.resolve(root, p);
34178
34147
  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");
34179
34148
  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.");
34180
34149
  if (options$1.cssCodeSplit === false) {
@@ -34182,7 +34151,7 @@ function resolveRollupOptions(environment) {
34182
34151
  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.`);
34183
34152
  }
34184
34153
  const outDir = resolve$4(options$1.outDir);
34185
- const plugins$1 = environment.plugins.map((p$1) => injectEnvironmentToHooks(environment, p$1));
34154
+ const plugins$1 = environment.plugins.map((p) => injectEnvironmentToHooks(environment, p));
34186
34155
  const rollupOptions = {
34187
34156
  preserveEntrySignatures: ssr ? "allow-extension" : libOptions ? "strict" : false,
34188
34157
  cache: options$1.watch ? void 0 : false,
@@ -34238,11 +34207,15 @@ async function buildEnvironment(environment) {
34238
34207
  logger.info(import_picocolors$4.default.cyan(`\nwatching for file changes...`));
34239
34208
  const resolvedOutDirs = getResolvedOutDirs(root, options$1.outDir, options$1.rollupOptions.output);
34240
34209
  const emptyOutDir = resolveEmptyOutDir(options$1.emptyOutDir, root, resolvedOutDirs, logger);
34241
- const resolvedChokidarOptions = resolveChokidarOptions(options$1.watch.chokidar, resolvedOutDirs, emptyOutDir, environment.config.cacheDir);
34210
+ const resolvedChokidarOptions = resolveChokidarOptions({
34211
+ ...(rollupOptions.watch || {}).chokidar,
34212
+ ...options$1.watch.chokidar
34213
+ }, resolvedOutDirs, emptyOutDir, environment.config.cacheDir);
34242
34214
  const { watch: watch$1 } = await import("rollup");
34243
34215
  const watcher = watch$1({
34244
34216
  ...rollupOptions,
34245
34217
  watch: {
34218
+ ...rollupOptions.watch,
34246
34219
  ...options$1.watch,
34247
34220
  chokidar: resolvedChokidarOptions
34248
34221
  }
@@ -34620,8 +34593,8 @@ async function createBuilder(inlineConfig = {}, useLegacyBuilder = false) {
34620
34593
  watchMode: false
34621
34594
  }, config$2.logger);
34622
34595
  let configBuilderBuildAppCalled = false;
34623
- for (const p$1 of config$2.getSortedPlugins("buildApp")) {
34624
- const hook = p$1.buildApp;
34596
+ for (const p of config$2.getSortedPlugins("buildApp")) {
34597
+ const hook = p.buildApp;
34625
34598
  if (!configBuilderBuildAppCalled && typeof hook === "object" && hook.order === "post") {
34626
34599
  configBuilderBuildAppCalled = true;
34627
34600
  await configBuilder.buildApp(builder);
@@ -35732,10 +35705,10 @@ function build_default$1({ threshold = 1024, level = -1, brotli = false, gzip: g
35732
35705
  compress.on("data", (chunk) => write.call(res, chunk) || compress.pause());
35733
35706
  on.call(res, "drain", () => compress.resume());
35734
35707
  compress.on("end", () => end.call(res));
35735
- listeners.forEach((p$1) => compress.on.apply(compress, p$1));
35708
+ listeners.forEach((p) => compress.on.apply(compress, p));
35736
35709
  } else {
35737
35710
  pendingListeners = null;
35738
- listeners.forEach((p$1) => on.apply(res, p$1));
35711
+ listeners.forEach((p) => on.apply(res, p));
35739
35712
  }
35740
35713
  writeHead.call(res, pendingStatus || res.statusCode);
35741
35714
  }
@@ -36160,14 +36133,14 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36160
36133
  }
36161
36134
  mode = inlineConfig.mode || config$2.mode || mode;
36162
36135
  configEnv.mode = mode;
36163
- const filterPlugin = (p$1) => {
36164
- if (!p$1) return false;
36165
- else if (!p$1.apply) return true;
36166
- else if (typeof p$1.apply === "function") return p$1.apply({
36136
+ const filterPlugin = (p) => {
36137
+ if (!p) return false;
36138
+ else if (!p.apply) return true;
36139
+ else if (typeof p.apply === "function") return p.apply({
36167
36140
  ...config$2,
36168
36141
  mode
36169
36142
  }, configEnv);
36170
- else return p$1.apply === command;
36143
+ else return p.apply === command;
36171
36144
  };
36172
36145
  const rawPlugins = (await asyncFlatten(config$2.plugins || [])).filter(filterPlugin);
36173
36146
  const [prePlugins, normalPlugins, postPlugins] = sortUserPlugins(rawPlugins);
@@ -36421,7 +36394,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = "development",
36421
36394
  if (resolved.environments.ssr) resolved.environments.ssr.build.emitAssets = resolved.build.ssrEmitAssets || resolved.build.emitAssets;
36422
36395
  debug?.(`using resolved config: %O`, {
36423
36396
  ...resolved,
36424
- plugins: resolved.plugins.map((p$1) => p$1.name),
36397
+ plugins: resolved.plugins.map((p) => p.name),
36425
36398
  worker: {
36426
36399
  ...resolved.worker,
36427
36400
  plugins: `() => plugins`
@@ -36476,10 +36449,10 @@ function sortUserPlugins(plugins$1) {
36476
36449
  const prePlugins = [];
36477
36450
  const postPlugins = [];
36478
36451
  const normalPlugins = [];
36479
- if (plugins$1) plugins$1.flat().forEach((p$1) => {
36480
- if (p$1.enforce === "pre") prePlugins.push(p$1);
36481
- else if (p$1.enforce === "post") postPlugins.push(p$1);
36482
- else normalPlugins.push(p$1);
36452
+ if (plugins$1) plugins$1.flat().forEach((p) => {
36453
+ if (p.enforce === "pre") prePlugins.push(p);
36454
+ else if (p.enforce === "post") postPlugins.push(p);
36455
+ else normalPlugins.push(p);
36483
36456
  });
36484
36457
  return [
36485
36458
  prePlugins,
@@ -36680,8 +36653,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
36680
36653
  customLogger: config$2.customLogger
36681
36654
  });
36682
36655
  const context = new BasicMinimalPluginContext(basePluginContextMeta, tempLogger);
36683
- for (const p$1 of getSortedPluginsByHook("config", plugins$1)) {
36684
- const hook = p$1.config;
36656
+ for (const p of getSortedPluginsByHook("config", plugins$1)) {
36657
+ const hook = p.config;
36685
36658
  const handler = getHookHandler(hook);
36686
36659
  const res = await handler.call(context, conf, configEnv);
36687
36660
  if (res && res !== conf) conf = mergeConfig(conf, res);
@@ -36691,8 +36664,8 @@ async function runConfigHook(config$2, plugins$1, configEnv) {
36691
36664
  async function runConfigEnvironmentHook(environments, plugins$1, logger, configEnv, isSsrTargetWebworkerSet) {
36692
36665
  const context = new BasicMinimalPluginContext(basePluginContextMeta, logger);
36693
36666
  const environmentNames = Object.keys(environments);
36694
- for (const p$1 of getSortedPluginsByHook("configEnvironment", plugins$1)) {
36695
- const hook = p$1.configEnvironment;
36667
+ for (const p of getSortedPluginsByHook("configEnvironment", plugins$1)) {
36668
+ const hook = p.configEnvironment;
36696
36669
  const handler = getHookHandler(hook);
36697
36670
  for (const name of environmentNames) {
36698
36671
  const res = await handler.call(context, name, environments[name], {
@@ -36725,4 +36698,4 @@ function optimizeDepsDisabledBackwardCompatibility(resolved, optimizeDeps$1, opt
36725
36698
  }
36726
36699
 
36727
36700
  //#endregion
36728
- export { BuildEnvironment, DevEnvironment, _createServer, addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, build$1 as build, buildEnvironmentOptionsDefaults, buildErrorMessage, builderOptionsDefaults, cleanupDepsCacheStaleDirs, createBuilder, createFilter, createIdResolver, createIsOptimizedDepFile, createIsOptimizedDepUrl, createLogger, createRunnableDevEnvironment, createServer$2 as createServer, createServerCloseFn, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, createToImportMetaURLBasedRelativeRuntime, defineConfig, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, fetchModule, formatPostcssSourceMap, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, injectEnvironmentToHooks, isCSSRequest, isDepOptimizationDisabled, isFileLoadingAllowed, isFileServingAllowed, isRunnableDevEnvironment, loadCachedDepOptimizationMetadata, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, onRollupLog, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, require_picocolors, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveConfig, resolveEnvPrefix, resolveLibFilename, resolvePreviewOptions, resolveServerOptions, resolveUserExternal, restartServerWithUrls, rollupVersion, runOptimizeDeps, runnerImport, searchForWorkspaceRoot, send, serverConfigDefaults, sortUserPlugins, ssrTransform, toDiscoveredDependencies, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime, transformWithEsbuild };
36701
+ export { BuildEnvironment, DevEnvironment, _createServer, addManuallyIncludedOptimizeDeps, addOptimizedDepInfo, build$1 as build, buildEnvironmentOptionsDefaults, buildErrorMessage, builderOptionsDefaults, cleanupDepsCacheStaleDirs, configDefaults, createBuilder, createFilter, createIdResolver, createIsOptimizedDepFile, createIsOptimizedDepUrl, createRunnableDevEnvironment, createServer$2 as createServer, createServerCloseFn, createServerHotChannel, createServerModuleRunner, createServerModuleRunnerTransport, createToImportMetaURLBasedRelativeRuntime, defineConfig, depsFromOptimizedDepInfo, depsLogString, discoverProjectDependencies, extractExportsData, fetchModule, formatPostcssSourceMap, getDefaultEnvironmentOptions, getDepsCacheDir, getOptimizedDepPath, initDepsOptimizerMetadata, injectEnvironmentToHooks, isCSSRequest, isDepOptimizationDisabled, isFileLoadingAllowed, isFileServingAllowed, isResolvedConfig, isRunnableDevEnvironment, loadCachedDepOptimizationMetadata, loadConfigFromFile, loadEnv, mergeAlias, mergeConfig, normalizePath, onRollupLog, optimizeDeps, optimizeExplicitEnvironmentDeps, optimizedDepInfoFromFile, optimizedDepInfoFromId, optimizedDepNeedsInterop, perEnvironmentPlugin, perEnvironmentState, preprocessCSS, preview, resolveBaseUrl, resolveBuildEnvironmentOptions, resolveBuildOutputs, resolveBuildPlugins, resolveBuilderOptions, resolveConfig, resolveDevEnvironmentOptions, resolveEnvPrefix, resolveLibFilename, resolvePreviewOptions, resolveServerOptions, resolveUserExternal, restartServerWithUrls, rollupVersion, runOptimizeDeps, runnerImport, searchForWorkspaceRoot, send, serverConfigDefaults, sortUserPlugins, ssrTransform, toDiscoveredDependencies, toOutputFilePathInCss, toOutputFilePathInHtml, toOutputFilePathInJS, toOutputFilePathWithoutRuntime, transformWithEsbuild };