vite 4.0.2 → 4.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

@@ -53,6 +53,7 @@ function getDefaultExportFromCjs (x) {
53
53
  }
54
54
 
55
55
  function getAugmentedNamespace(n) {
56
+ if (n.__esModule) return n;
56
57
  var f = n.default;
57
58
  if (typeof f == "function") {
58
59
  var a = function a () {
@@ -79,7 +80,11 @@ function getAugmentedNamespace(n) {
79
80
  return a;
80
81
  }
81
82
 
82
- var picocolors = {exports: {}};
83
+ var picocolorsExports = {};
84
+ var picocolors = {
85
+ get exports(){ return picocolorsExports; },
86
+ set exports(v){ picocolorsExports = v; },
87
+ };
83
88
 
84
89
  let tty = require$$0$3;
85
90
 
@@ -138,7 +143,7 @@ let createColors = (enabled = isColorSupported) => ({
138
143
  });
139
144
 
140
145
  picocolors.exports = createColors();
141
- picocolors.exports.createColors = createColors;
146
+ picocolorsExports.createColors = createColors;
142
147
 
143
148
  function matches$1(pattern, importee) {
144
149
  if (pattern instanceof RegExp) {
@@ -420,7 +425,11 @@ function walk$3(ast, { enter, leave }) {
420
425
  return instance.visit(ast, null);
421
426
  }
422
427
 
423
- var picomatch$5 = {exports: {}};
428
+ var picomatchExports = {};
429
+ var picomatch$5 = {
430
+ get exports(){ return picomatchExports; },
431
+ set exports(v){ picomatchExports = v; },
432
+ };
424
433
 
425
434
  var utils$k = {};
426
435
 
@@ -2146,7 +2155,7 @@ const scan$1 = scan_1;
2146
2155
  const parse$g = parse_1$3;
2147
2156
  const utils$h = utils$k;
2148
2157
  const constants$4 = constants$6;
2149
- const isObject$4 = val => val && typeof val === 'object' && !Array.isArray(val);
2158
+ const isObject$3 = val => val && typeof val === 'object' && !Array.isArray(val);
2150
2159
 
2151
2160
  /**
2152
2161
  * Creates a matcher function from one or more glob patterns. The
@@ -2183,7 +2192,7 @@ const picomatch$4 = (glob, options, returnState = false) => {
2183
2192
  return arrayMatcher;
2184
2193
  }
2185
2194
 
2186
- const isState = isObject$4(glob) && glob.tokens && glob.input;
2195
+ const isState = isObject$3(glob) && glob.tokens && glob.input;
2187
2196
 
2188
2197
  if (glob === '' || (typeof glob !== 'string' && !isState)) {
2189
2198
  throw new TypeError('Expected pattern to be a non-empty string');
@@ -2487,7 +2496,7 @@ var picomatch_1 = picomatch$4;
2487
2496
  module.exports = picomatch_1;
2488
2497
  } (picomatch$5));
2489
2498
 
2490
- var picomatch$3 = /*@__PURE__*/getDefaultExportFromCjs(picomatch$5.exports);
2499
+ var picomatch$3 = /*@__PURE__*/getDefaultExportFromCjs(picomatchExports);
2491
2500
 
2492
2501
  const extractors = {
2493
2502
  ArrayPattern(names, param) {
@@ -4361,14 +4370,22 @@ let Minimatch$1 = class Minimatch {
4361
4370
 
4362
4371
  minimatch$1.Minimatch = Minimatch$1;
4363
4372
 
4364
- var inherits = {exports: {}};
4373
+ var inheritsExports = {};
4374
+ var inherits = {
4375
+ get exports(){ return inheritsExports; },
4376
+ set exports(v){ inheritsExports = v; },
4377
+ };
4365
4378
 
4366
- var inherits_browser = {exports: {}};
4379
+ var inherits_browserExports = {};
4380
+ var inherits_browser = {
4381
+ get exports(){ return inherits_browserExports; },
4382
+ set exports(v){ inherits_browserExports = v; },
4383
+ };
4367
4384
 
4368
4385
  var hasRequiredInherits_browser;
4369
4386
 
4370
4387
  function requireInherits_browser () {
4371
- if (hasRequiredInherits_browser) return inherits_browser.exports;
4388
+ if (hasRequiredInherits_browser) return inherits_browserExports;
4372
4389
  hasRequiredInherits_browser = 1;
4373
4390
  if (typeof Object.create === 'function') {
4374
4391
  // implementation from standard node.js 'util' module
@@ -4397,7 +4414,7 @@ function requireInherits_browser () {
4397
4414
  }
4398
4415
  };
4399
4416
  }
4400
- return inherits_browser.exports;
4417
+ return inherits_browserExports;
4401
4418
  }
4402
4419
 
4403
4420
  (function (module) {
@@ -5178,11 +5195,15 @@ function wrappy$2 (fn, cb) {
5178
5195
  }
5179
5196
  }
5180
5197
 
5181
- var once$2 = {exports: {}};
5198
+ var onceExports = {};
5199
+ var once$2 = {
5200
+ get exports(){ return onceExports; },
5201
+ set exports(v){ onceExports = v; },
5202
+ };
5182
5203
 
5183
5204
  var wrappy$1 = wrappy_1;
5184
5205
  once$2.exports = wrappy$1(once$1);
5185
- once$2.exports.strict = wrappy$1(onceStrict);
5206
+ onceExports.strict = wrappy$1(onceStrict);
5186
5207
 
5187
5208
  once$1.proto = once$1(function () {
5188
5209
  Object.defineProperty(Function.prototype, 'once', {
@@ -5225,7 +5246,7 @@ function onceStrict (fn) {
5225
5246
 
5226
5247
  var wrappy = wrappy_1;
5227
5248
  var reqs = Object.create(null);
5228
- var once = once$2.exports;
5249
+ var once = onceExports;
5229
5250
 
5230
5251
  var inflight_1 = wrappy(inflight);
5231
5252
 
@@ -5328,7 +5349,7 @@ function requireGlob () {
5328
5349
 
5329
5350
  var rp = fs_realpath;
5330
5351
  var minimatch = minimatch_1;
5331
- var inherits$1 = inherits.exports;
5352
+ var inherits = inheritsExports;
5332
5353
  var EE = require$$0$5.EventEmitter;
5333
5354
  var path = require$$0$4;
5334
5355
  var assert = assert$1;
@@ -5341,7 +5362,7 @@ function requireGlob () {
5341
5362
  var childrenIgnored = common.childrenIgnored;
5342
5363
  var isIgnored = common.isIgnored;
5343
5364
 
5344
- var once = once$2.exports;
5365
+ var once = onceExports;
5345
5366
 
5346
5367
  function glob (pattern, options, cb) {
5347
5368
  if (typeof options === 'function') cb = options, options = {};
@@ -5397,7 +5418,7 @@ function requireGlob () {
5397
5418
  };
5398
5419
 
5399
5420
  glob.Glob = Glob;
5400
- inherits$1(Glob, EE);
5421
+ inherits(Glob, EE);
5401
5422
  function Glob (pattern, options, cb) {
5402
5423
  if (typeof options === 'function') {
5403
5424
  cb = options;
@@ -6073,62 +6094,173 @@ function requireGlob () {
6073
6094
  }
6074
6095
 
6075
6096
  var globExports = requireGlob();
6097
+ var glob = /*@__PURE__*/getDefaultExportFromCjs(globExports);
6076
6098
 
6077
- var chars$2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
6078
- function encode$2(decoded) {
6079
- var sourceFileIndex = 0; // second field
6080
- var sourceCodeLine = 0; // third field
6081
- var sourceCodeColumn = 0; // fourth field
6082
- var nameIndex = 0; // fifth field
6083
- var mappings = '';
6084
- for (var i = 0; i < decoded.length; i++) {
6085
- var line = decoded[i];
6086
- if (i > 0)
6087
- mappings += ';';
6099
+ const comma = ','.charCodeAt(0);
6100
+ const semicolon = ';'.charCodeAt(0);
6101
+ const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
6102
+ const intToChar = new Uint8Array(64); // 64 possible chars.
6103
+ const charToInt = new Uint8Array(128); // z is 122 in ASCII
6104
+ for (let i = 0; i < chars$1.length; i++) {
6105
+ const c = chars$1.charCodeAt(i);
6106
+ intToChar[i] = c;
6107
+ charToInt[c] = i;
6108
+ }
6109
+ // Provide a fallback for older environments.
6110
+ const td = typeof TextDecoder !== 'undefined'
6111
+ ? /* #__PURE__ */ new TextDecoder()
6112
+ : typeof Buffer !== 'undefined'
6113
+ ? {
6114
+ decode(buf) {
6115
+ const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
6116
+ return out.toString();
6117
+ },
6118
+ }
6119
+ : {
6120
+ decode(buf) {
6121
+ let out = '';
6122
+ for (let i = 0; i < buf.length; i++) {
6123
+ out += String.fromCharCode(buf[i]);
6124
+ }
6125
+ return out;
6126
+ },
6127
+ };
6128
+ function decode(mappings) {
6129
+ const state = new Int32Array(5);
6130
+ const decoded = [];
6131
+ let index = 0;
6132
+ do {
6133
+ const semi = indexOf(mappings, index);
6134
+ const line = [];
6135
+ let sorted = true;
6136
+ let lastCol = 0;
6137
+ state[0] = 0;
6138
+ for (let i = index; i < semi; i++) {
6139
+ let seg;
6140
+ i = decodeInteger(mappings, i, state, 0); // genColumn
6141
+ const col = state[0];
6142
+ if (col < lastCol)
6143
+ sorted = false;
6144
+ lastCol = col;
6145
+ if (hasMoreVlq(mappings, i, semi)) {
6146
+ i = decodeInteger(mappings, i, state, 1); // sourcesIndex
6147
+ i = decodeInteger(mappings, i, state, 2); // sourceLine
6148
+ i = decodeInteger(mappings, i, state, 3); // sourceColumn
6149
+ if (hasMoreVlq(mappings, i, semi)) {
6150
+ i = decodeInteger(mappings, i, state, 4); // namesIndex
6151
+ seg = [col, state[1], state[2], state[3], state[4]];
6152
+ }
6153
+ else {
6154
+ seg = [col, state[1], state[2], state[3]];
6155
+ }
6156
+ }
6157
+ else {
6158
+ seg = [col];
6159
+ }
6160
+ line.push(seg);
6161
+ }
6162
+ if (!sorted)
6163
+ sort(line);
6164
+ decoded.push(line);
6165
+ index = semi + 1;
6166
+ } while (index <= mappings.length);
6167
+ return decoded;
6168
+ }
6169
+ function indexOf(mappings, index) {
6170
+ const idx = mappings.indexOf(';', index);
6171
+ return idx === -1 ? mappings.length : idx;
6172
+ }
6173
+ function decodeInteger(mappings, pos, state, j) {
6174
+ let value = 0;
6175
+ let shift = 0;
6176
+ let integer = 0;
6177
+ do {
6178
+ const c = mappings.charCodeAt(pos++);
6179
+ integer = charToInt[c];
6180
+ value |= (integer & 31) << shift;
6181
+ shift += 5;
6182
+ } while (integer & 32);
6183
+ const shouldNegate = value & 1;
6184
+ value >>>= 1;
6185
+ if (shouldNegate) {
6186
+ value = -0x80000000 | -value;
6187
+ }
6188
+ state[j] += value;
6189
+ return pos;
6190
+ }
6191
+ function hasMoreVlq(mappings, i, length) {
6192
+ if (i >= length)
6193
+ return false;
6194
+ return mappings.charCodeAt(i) !== comma;
6195
+ }
6196
+ function sort(line) {
6197
+ line.sort(sortComparator$1);
6198
+ }
6199
+ function sortComparator$1(a, b) {
6200
+ return a[0] - b[0];
6201
+ }
6202
+ function encode$1(decoded) {
6203
+ const state = new Int32Array(5);
6204
+ const bufLength = 1024 * 16;
6205
+ const subLength = bufLength - 36;
6206
+ const buf = new Uint8Array(bufLength);
6207
+ const sub = buf.subarray(0, subLength);
6208
+ let pos = 0;
6209
+ let out = '';
6210
+ for (let i = 0; i < decoded.length; i++) {
6211
+ const line = decoded[i];
6212
+ if (i > 0) {
6213
+ if (pos === bufLength) {
6214
+ out += td.decode(buf);
6215
+ pos = 0;
6216
+ }
6217
+ buf[pos++] = semicolon;
6218
+ }
6088
6219
  if (line.length === 0)
6089
6220
  continue;
6090
- var generatedCodeColumn = 0; // first field
6091
- var lineMappings = [];
6092
- for (var _i = 0, line_1 = line; _i < line_1.length; _i++) {
6093
- var segment = line_1[_i];
6094
- var segmentMappings = encodeInteger$1(segment[0] - generatedCodeColumn);
6095
- generatedCodeColumn = segment[0];
6096
- if (segment.length > 1) {
6097
- segmentMappings +=
6098
- encodeInteger$1(segment[1] - sourceFileIndex) +
6099
- encodeInteger$1(segment[2] - sourceCodeLine) +
6100
- encodeInteger$1(segment[3] - sourceCodeColumn);
6101
- sourceFileIndex = segment[1];
6102
- sourceCodeLine = segment[2];
6103
- sourceCodeColumn = segment[3];
6104
- }
6105
- if (segment.length === 5) {
6106
- segmentMappings += encodeInteger$1(segment[4] - nameIndex);
6107
- nameIndex = segment[4];
6108
- }
6109
- lineMappings.push(segmentMappings);
6110
- }
6111
- mappings += lineMappings.join(',');
6221
+ state[0] = 0;
6222
+ for (let j = 0; j < line.length; j++) {
6223
+ const segment = line[j];
6224
+ // We can push up to 5 ints, each int can take at most 7 chars, and we
6225
+ // may push a comma.
6226
+ if (pos > subLength) {
6227
+ out += td.decode(sub);
6228
+ buf.copyWithin(0, subLength, pos);
6229
+ pos -= subLength;
6230
+ }
6231
+ if (j > 0)
6232
+ buf[pos++] = comma;
6233
+ pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
6234
+ if (segment.length === 1)
6235
+ continue;
6236
+ pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
6237
+ pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
6238
+ pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
6239
+ if (segment.length === 4)
6240
+ continue;
6241
+ pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
6242
+ }
6112
6243
  }
6113
- return mappings;
6244
+ return out + td.decode(buf.subarray(0, pos));
6114
6245
  }
6115
- function encodeInteger$1(num) {
6116
- var result = '';
6246
+ function encodeInteger(buf, pos, state, segment, j) {
6247
+ const next = segment[j];
6248
+ let num = next - state[j];
6249
+ state[j] = next;
6117
6250
  num = num < 0 ? (-num << 1) | 1 : num << 1;
6118
6251
  do {
6119
- var clamped = num & 31;
6252
+ let clamped = num & 0b011111;
6120
6253
  num >>>= 5;
6121
- if (num > 0) {
6122
- clamped |= 32;
6123
- }
6124
- result += chars$2[clamped];
6254
+ if (num > 0)
6255
+ clamped |= 0b100000;
6256
+ buf[pos++] = intToChar[clamped];
6125
6257
  } while (num > 0);
6126
- return result;
6258
+ return pos;
6127
6259
  }
6128
6260
 
6129
- let BitSet$1 = class BitSet {
6261
+ class BitSet {
6130
6262
  constructor(arg) {
6131
- this.bits = arg instanceof BitSet$1 ? arg.bits.slice() : [];
6263
+ this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
6132
6264
  }
6133
6265
 
6134
6266
  add(n) {
@@ -6138,9 +6270,9 @@ let BitSet$1 = class BitSet {
6138
6270
  has(n) {
6139
6271
  return !!(this.bits[n >> 5] & (1 << (n & 31)));
6140
6272
  }
6141
- };
6273
+ }
6142
6274
 
6143
- let Chunk$1 = class Chunk {
6275
+ class Chunk {
6144
6276
  constructor(start, end, content) {
6145
6277
  this.start = start;
6146
6278
  this.end = end;
@@ -6168,7 +6300,7 @@ let Chunk$1 = class Chunk {
6168
6300
  }
6169
6301
 
6170
6302
  clone() {
6171
- const chunk = new Chunk$1(this.start, this.end, this.original);
6303
+ const chunk = new Chunk(this.start, this.end, this.original);
6172
6304
 
6173
6305
  chunk.intro = this.intro;
6174
6306
  chunk.outro = this.outro;
@@ -6228,7 +6360,7 @@ let Chunk$1 = class Chunk {
6228
6360
 
6229
6361
  this.original = originalBefore;
6230
6362
 
6231
- const newChunk = new Chunk$1(index, this.end, originalAfter);
6363
+ const newChunk = new Chunk(index, this.end, originalAfter);
6232
6364
  newChunk.outro = this.outro;
6233
6365
  this.outro = '';
6234
6366
 
@@ -6292,9 +6424,9 @@ let Chunk$1 = class Chunk {
6292
6424
  if (this.outro.length) return true;
6293
6425
  }
6294
6426
  }
6295
- };
6427
+ }
6296
6428
 
6297
- function getBtoa$1 () {
6429
+ function getBtoa () {
6298
6430
  if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
6299
6431
  return (str) => window.btoa(unescape(encodeURIComponent(str)));
6300
6432
  } else if (typeof Buffer === 'function') {
@@ -6306,16 +6438,16 @@ function getBtoa$1 () {
6306
6438
  }
6307
6439
  }
6308
6440
 
6309
- const btoa$2 = /*#__PURE__*/ getBtoa$1();
6441
+ const btoa$1 = /*#__PURE__*/ getBtoa();
6310
6442
 
6311
- let SourceMap$2 = class SourceMap {
6443
+ let SourceMap$1 = class SourceMap {
6312
6444
  constructor(properties) {
6313
6445
  this.version = 3;
6314
6446
  this.file = properties.file;
6315
6447
  this.sources = properties.sources;
6316
6448
  this.sourcesContent = properties.sourcesContent;
6317
6449
  this.names = properties.names;
6318
- this.mappings = encode$2(properties.mappings);
6450
+ this.mappings = encode$1(properties.mappings);
6319
6451
  }
6320
6452
 
6321
6453
  toString() {
@@ -6323,11 +6455,11 @@ let SourceMap$2 = class SourceMap {
6323
6455
  }
6324
6456
 
6325
6457
  toUrl() {
6326
- return 'data:application/json;charset=utf-8;base64,' + btoa$2(this.toString());
6458
+ return 'data:application/json;charset=utf-8;base64,' + btoa$1(this.toString());
6327
6459
  }
6328
6460
  };
6329
6461
 
6330
- function guessIndent$1(code) {
6462
+ function guessIndent(code) {
6331
6463
  const lines = code.split('\n');
6332
6464
 
6333
6465
  const tabbed = lines.filter((line) => /^\t+/.test(line));
@@ -6353,7 +6485,7 @@ function guessIndent$1(code) {
6353
6485
  return new Array(min + 1).join(' ');
6354
6486
  }
6355
6487
 
6356
- function getRelativePath$1(from, to) {
6488
+ function getRelativePath(from, to) {
6357
6489
  const fromParts = from.split(/[/\\]/);
6358
6490
  const toParts = to.split(/[/\\]/);
6359
6491
 
@@ -6372,13 +6504,13 @@ function getRelativePath$1(from, to) {
6372
6504
  return fromParts.concat(toParts).join('/');
6373
6505
  }
6374
6506
 
6375
- const toString$3 = Object.prototype.toString;
6507
+ const toString$2 = Object.prototype.toString;
6376
6508
 
6377
- function isObject$3(thing) {
6378
- return toString$3.call(thing) === '[object Object]';
6509
+ function isObject$2(thing) {
6510
+ return toString$2.call(thing) === '[object Object]';
6379
6511
  }
6380
6512
 
6381
- function getLocator$1(source) {
6513
+ function getLocator(source) {
6382
6514
  const originalLines = source.split('\n');
6383
6515
  const lineOffsets = [];
6384
6516
 
@@ -6404,7 +6536,7 @@ function getLocator$1(source) {
6404
6536
  };
6405
6537
  }
6406
6538
 
6407
- let Mappings$1 = class Mappings {
6539
+ class Mappings {
6408
6540
  constructor(hires) {
6409
6541
  this.hires = hires;
6410
6542
  this.generatedCodeLine = 0;
@@ -6472,19 +6604,19 @@ let Mappings$1 = class Mappings {
6472
6604
 
6473
6605
  this.generatedCodeColumn += lines[lines.length - 1].length;
6474
6606
  }
6475
- };
6607
+ }
6476
6608
 
6477
- const n$1 = '\n';
6609
+ const n = '\n';
6478
6610
 
6479
- const warned$1 = {
6611
+ const warned = {
6480
6612
  insertLeft: false,
6481
6613
  insertRight: false,
6482
6614
  storeName: false,
6483
6615
  };
6484
6616
 
6485
- let MagicString$1 = class MagicString {
6617
+ class MagicString {
6486
6618
  constructor(string, options = {}) {
6487
- const chunk = new Chunk$1(0, string.length, string);
6619
+ const chunk = new Chunk(0, string.length, string);
6488
6620
 
6489
6621
  Object.defineProperties(this, {
6490
6622
  original: { writable: true, value: string },
@@ -6497,7 +6629,7 @@ let MagicString$1 = class MagicString {
6497
6629
  byEnd: { writable: true, value: {} },
6498
6630
  filename: { writable: true, value: options.filename },
6499
6631
  indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
6500
- sourcemapLocations: { writable: true, value: new BitSet$1() },
6632
+ sourcemapLocations: { writable: true, value: new BitSet() },
6501
6633
  storedNames: { writable: true, value: {} },
6502
6634
  indentStr: { writable: true, value: undefined },
6503
6635
  });
@@ -6548,7 +6680,7 @@ let MagicString$1 = class MagicString {
6548
6680
  }
6549
6681
 
6550
6682
  clone() {
6551
- const cloned = new MagicString$1(this.original, { filename: this.filename });
6683
+ const cloned = new MagicString(this.original, { filename: this.filename });
6552
6684
 
6553
6685
  let originalChunk = this.firstChunk;
6554
6686
  let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
@@ -6576,7 +6708,7 @@ let MagicString$1 = class MagicString {
6576
6708
  cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
6577
6709
  }
6578
6710
 
6579
- cloned.sourcemapLocations = new BitSet$1(this.sourcemapLocations);
6711
+ cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
6580
6712
 
6581
6713
  cloned.intro = this.intro;
6582
6714
  cloned.outro = this.outro;
@@ -6589,9 +6721,9 @@ let MagicString$1 = class MagicString {
6589
6721
 
6590
6722
  const sourceIndex = 0;
6591
6723
  const names = Object.keys(this.storedNames);
6592
- const mappings = new Mappings$1(options.hires);
6724
+ const mappings = new Mappings(options.hires);
6593
6725
 
6594
- const locate = getLocator$1(this.original);
6726
+ const locate = getLocator(this.original);
6595
6727
 
6596
6728
  if (this.intro) {
6597
6729
  mappings.advance(this.intro);
@@ -6618,7 +6750,7 @@ let MagicString$1 = class MagicString {
6618
6750
 
6619
6751
  return {
6620
6752
  file: options.file ? options.file.split(/[/\\]/).pop() : null,
6621
- sources: [options.source ? getRelativePath$1(options.file || '', options.source) : null],
6753
+ sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
6622
6754
  sourcesContent: options.includeContent ? [this.original] : [null],
6623
6755
  names,
6624
6756
  mappings: mappings.raw,
@@ -6626,12 +6758,12 @@ let MagicString$1 = class MagicString {
6626
6758
  }
6627
6759
 
6628
6760
  generateMap(options) {
6629
- return new SourceMap$2(this.generateDecodedMap(options));
6761
+ return new SourceMap$1(this.generateDecodedMap(options));
6630
6762
  }
6631
6763
 
6632
6764
  _ensureindentStr() {
6633
6765
  if (this.indentStr === undefined) {
6634
- this.indentStr = guessIndent$1(this.original);
6766
+ this.indentStr = guessIndent(this.original);
6635
6767
  }
6636
6768
  }
6637
6769
 
@@ -6648,7 +6780,7 @@ let MagicString$1 = class MagicString {
6648
6780
  indent(indentStr, options) {
6649
6781
  const pattern = /^[^\r\n]/gm;
6650
6782
 
6651
- if (isObject$3(indentStr)) {
6783
+ if (isObject$2(indentStr)) {
6652
6784
  options = indentStr;
6653
6785
  indentStr = undefined;
6654
6786
  }
@@ -6740,22 +6872,22 @@ let MagicString$1 = class MagicString {
6740
6872
  }
6741
6873
 
6742
6874
  insertLeft(index, content) {
6743
- if (!warned$1.insertLeft) {
6875
+ if (!warned.insertLeft) {
6744
6876
  console.warn(
6745
6877
  'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'
6746
6878
  ); // eslint-disable-line no-console
6747
- warned$1.insertLeft = true;
6879
+ warned.insertLeft = true;
6748
6880
  }
6749
6881
 
6750
6882
  return this.appendLeft(index, content);
6751
6883
  }
6752
6884
 
6753
6885
  insertRight(index, content) {
6754
- if (!warned$1.insertRight) {
6886
+ if (!warned.insertRight) {
6755
6887
  console.warn(
6756
6888
  'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'
6757
6889
  ); // eslint-disable-line no-console
6758
- warned$1.insertRight = true;
6890
+ warned.insertRight = true;
6759
6891
  }
6760
6892
 
6761
6893
  return this.prependRight(index, content);
@@ -6819,11 +6951,11 @@ let MagicString$1 = class MagicString {
6819
6951
  this._split(end);
6820
6952
 
6821
6953
  if (options === true) {
6822
- if (!warned$1.storeName) {
6954
+ if (!warned.storeName) {
6823
6955
  console.warn(
6824
6956
  'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'
6825
6957
  ); // eslint-disable-line no-console
6826
- warned$1.storeName = true;
6958
+ warned.storeName = true;
6827
6959
  }
6828
6960
 
6829
6961
  options = { storeName: true };
@@ -6856,7 +6988,7 @@ let MagicString$1 = class MagicString {
6856
6988
  first.edit(content, storeName, !overwrite);
6857
6989
  } else {
6858
6990
  // must be inserting at the end
6859
- const newChunk = new Chunk$1(start, end, '').edit(content, storeName);
6991
+ const newChunk = new Chunk(start, end, '').edit(content, storeName);
6860
6992
 
6861
6993
  // TODO last chunk in the array may not be the last chunk, if it's moved...
6862
6994
  last.next = newChunk;
@@ -6939,30 +7071,30 @@ let MagicString$1 = class MagicString {
6939
7071
  }
6940
7072
 
6941
7073
  lastLine() {
6942
- let lineIndex = this.outro.lastIndexOf(n$1);
7074
+ let lineIndex = this.outro.lastIndexOf(n);
6943
7075
  if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
6944
7076
  let lineStr = this.outro;
6945
7077
  let chunk = this.lastChunk;
6946
7078
  do {
6947
7079
  if (chunk.outro.length > 0) {
6948
- lineIndex = chunk.outro.lastIndexOf(n$1);
7080
+ lineIndex = chunk.outro.lastIndexOf(n);
6949
7081
  if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
6950
7082
  lineStr = chunk.outro + lineStr;
6951
7083
  }
6952
7084
 
6953
7085
  if (chunk.content.length > 0) {
6954
- lineIndex = chunk.content.lastIndexOf(n$1);
7086
+ lineIndex = chunk.content.lastIndexOf(n);
6955
7087
  if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
6956
7088
  lineStr = chunk.content + lineStr;
6957
7089
  }
6958
7090
 
6959
7091
  if (chunk.intro.length > 0) {
6960
- lineIndex = chunk.intro.lastIndexOf(n$1);
7092
+ lineIndex = chunk.intro.lastIndexOf(n);
6961
7093
  if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
6962
7094
  lineStr = chunk.intro + lineStr;
6963
7095
  }
6964
7096
  } while ((chunk = chunk.previous));
6965
- lineIndex = this.intro.lastIndexOf(n$1);
7097
+ lineIndex = this.intro.lastIndexOf(n);
6966
7098
  if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
6967
7099
  return this.intro + lineStr;
6968
7100
  }
@@ -7041,7 +7173,7 @@ let MagicString$1 = class MagicString {
7041
7173
  _splitChunk(chunk, index) {
7042
7174
  if (chunk.edited && chunk.content.length) {
7043
7175
  // zero-length edited chunks are a special case (overlapping replacements)
7044
- const loc = getLocator$1(this.original)(index);
7176
+ const loc = getLocator(this.original)(index);
7045
7177
  throw new Error(
7046
7178
  `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`
7047
7179
  );
@@ -7263,7 +7395,7 @@ let MagicString$1 = class MagicString {
7263
7395
 
7264
7396
  return this._replaceRegexp(searchValue, replacement);
7265
7397
  }
7266
- };
7398
+ }
7267
7399
 
7268
7400
  function isReference(node, parent) {
7269
7401
  if (node.type === 'MemberExpression') {
@@ -7295,7 +7427,7 @@ function isReference(node, parent) {
7295
7427
  return false;
7296
7428
  }
7297
7429
 
7298
- var version$3 = "23.0.4";
7430
+ var version$3 = "24.0.0";
7299
7431
  var peerDependencies = {
7300
7432
  rollup: "^2.68.0||^3.0.0"
7301
7433
  };
@@ -7460,7 +7592,7 @@ function getDynamicRequireModules(patterns, dynamicRequireRoot) {
7460
7592
  isNegated
7461
7593
  ? dynamicRequireModules.delete(targetPath)
7462
7594
  : dynamicRequireModules.set(targetPath, resolvedPath);
7463
- for (const path of globExports.sync(isNegated ? pattern.substr(1) : pattern)) {
7595
+ for (const path of glob.sync(isNegated ? pattern.substr(1) : pattern)) {
7464
7596
  const resolvedPath = resolve$4(path);
7465
7597
  const requirePath = normalizePathSlashes(resolvedPath);
7466
7598
  if (isDirectory(resolvedPath)) {
@@ -7644,6 +7776,7 @@ export function getDefaultExportFromNamespaceIfNotNamed (n) {
7644
7776
  }
7645
7777
 
7646
7778
  export function getAugmentedNamespace(n) {
7779
+ if (n.__esModule) return n;
7647
7780
  var f = n.default;
7648
7781
  if (typeof f == "function") {
7649
7782
  var a = function a () {
@@ -7740,7 +7873,7 @@ function getEsImportProxy(id, defaultIsModuleExports) {
7740
7873
  `import { __require as ${requireModule} } from ${JSON.stringify(id)};\n` +
7741
7874
  `var ${exportsName} = ${requireModule}();\n` +
7742
7875
  `export { ${exportsName} as __moduleExports };`;
7743
- if (defaultIsModuleExports) {
7876
+ if (defaultIsModuleExports === true) {
7744
7877
  code += `\nexport { ${exportsName} as default };`;
7745
7878
  } else {
7746
7879
  code += `export default /*@__PURE__*/getDefaultExportFromCjs(${exportsName});`;
@@ -8727,7 +8860,7 @@ async function transformCommonjs(
8727
8860
  commonjsMeta
8728
8861
  ) {
8729
8862
  const ast = astCache || tryParse(parse, code, id);
8730
- const magicString = new MagicString$1(code);
8863
+ const magicString = new MagicString(code);
8731
8864
  const uses = {
8732
8865
  module: false,
8733
8866
  exports: false,
@@ -9448,10 +9581,15 @@ function commonjs(options = {}) {
9448
9581
  }
9449
9582
 
9450
9583
  if (isWrappedId(id, MODULE_SUFFIX)) {
9451
- const name = getName(unwrapId$1(id, MODULE_SUFFIX));
9584
+ const module = getName(unwrapId$1(id, MODULE_SUFFIX));
9585
+ const moduleExports = `${module}Exports`;
9452
9586
  return {
9453
- code: `var ${name} = {exports: {}}; export {${name} as __module}`,
9454
- syntheticNamedExports: '__module',
9587
+ code: `var ${moduleExports} = {};
9588
+ var ${module} = {
9589
+ get exports(){ return ${moduleExports}; },
9590
+ set exports(v){ ${moduleExports} = v; },
9591
+ };
9592
+ export {${module} as __module, ${moduleExports} as exports}`,
9455
9593
  meta: { commonjs: { isCommonJS: false } }
9456
9594
  };
9457
9595
  }
@@ -9516,168 +9654,6 @@ function commonjs(options = {}) {
9516
9654
  };
9517
9655
  }
9518
9656
 
9519
- const comma = ','.charCodeAt(0);
9520
- const semicolon = ';'.charCodeAt(0);
9521
- const chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
9522
- const intToChar = new Uint8Array(64); // 64 possible chars.
9523
- const charToInt = new Uint8Array(128); // z is 122 in ASCII
9524
- for (let i = 0; i < chars$1.length; i++) {
9525
- const c = chars$1.charCodeAt(i);
9526
- intToChar[i] = c;
9527
- charToInt[c] = i;
9528
- }
9529
- // Provide a fallback for older environments.
9530
- const td = typeof TextDecoder !== 'undefined'
9531
- ? /* #__PURE__ */ new TextDecoder()
9532
- : typeof Buffer !== 'undefined'
9533
- ? {
9534
- decode(buf) {
9535
- const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
9536
- return out.toString();
9537
- },
9538
- }
9539
- : {
9540
- decode(buf) {
9541
- let out = '';
9542
- for (let i = 0; i < buf.length; i++) {
9543
- out += String.fromCharCode(buf[i]);
9544
- }
9545
- return out;
9546
- },
9547
- };
9548
- function decode(mappings) {
9549
- const state = new Int32Array(5);
9550
- const decoded = [];
9551
- let index = 0;
9552
- do {
9553
- const semi = indexOf(mappings, index);
9554
- const line = [];
9555
- let sorted = true;
9556
- let lastCol = 0;
9557
- state[0] = 0;
9558
- for (let i = index; i < semi; i++) {
9559
- let seg;
9560
- i = decodeInteger(mappings, i, state, 0); // genColumn
9561
- const col = state[0];
9562
- if (col < lastCol)
9563
- sorted = false;
9564
- lastCol = col;
9565
- if (hasMoreVlq(mappings, i, semi)) {
9566
- i = decodeInteger(mappings, i, state, 1); // sourcesIndex
9567
- i = decodeInteger(mappings, i, state, 2); // sourceLine
9568
- i = decodeInteger(mappings, i, state, 3); // sourceColumn
9569
- if (hasMoreVlq(mappings, i, semi)) {
9570
- i = decodeInteger(mappings, i, state, 4); // namesIndex
9571
- seg = [col, state[1], state[2], state[3], state[4]];
9572
- }
9573
- else {
9574
- seg = [col, state[1], state[2], state[3]];
9575
- }
9576
- }
9577
- else {
9578
- seg = [col];
9579
- }
9580
- line.push(seg);
9581
- }
9582
- if (!sorted)
9583
- sort(line);
9584
- decoded.push(line);
9585
- index = semi + 1;
9586
- } while (index <= mappings.length);
9587
- return decoded;
9588
- }
9589
- function indexOf(mappings, index) {
9590
- const idx = mappings.indexOf(';', index);
9591
- return idx === -1 ? mappings.length : idx;
9592
- }
9593
- function decodeInteger(mappings, pos, state, j) {
9594
- let value = 0;
9595
- let shift = 0;
9596
- let integer = 0;
9597
- do {
9598
- const c = mappings.charCodeAt(pos++);
9599
- integer = charToInt[c];
9600
- value |= (integer & 31) << shift;
9601
- shift += 5;
9602
- } while (integer & 32);
9603
- const shouldNegate = value & 1;
9604
- value >>>= 1;
9605
- if (shouldNegate) {
9606
- value = -0x80000000 | -value;
9607
- }
9608
- state[j] += value;
9609
- return pos;
9610
- }
9611
- function hasMoreVlq(mappings, i, length) {
9612
- if (i >= length)
9613
- return false;
9614
- return mappings.charCodeAt(i) !== comma;
9615
- }
9616
- function sort(line) {
9617
- line.sort(sortComparator$1);
9618
- }
9619
- function sortComparator$1(a, b) {
9620
- return a[0] - b[0];
9621
- }
9622
- function encode$1(decoded) {
9623
- const state = new Int32Array(5);
9624
- const bufLength = 1024 * 16;
9625
- const subLength = bufLength - 36;
9626
- const buf = new Uint8Array(bufLength);
9627
- const sub = buf.subarray(0, subLength);
9628
- let pos = 0;
9629
- let out = '';
9630
- for (let i = 0; i < decoded.length; i++) {
9631
- const line = decoded[i];
9632
- if (i > 0) {
9633
- if (pos === bufLength) {
9634
- out += td.decode(buf);
9635
- pos = 0;
9636
- }
9637
- buf[pos++] = semicolon;
9638
- }
9639
- if (line.length === 0)
9640
- continue;
9641
- state[0] = 0;
9642
- for (let j = 0; j < line.length; j++) {
9643
- const segment = line[j];
9644
- // We can push up to 5 ints, each int can take at most 7 chars, and we
9645
- // may push a comma.
9646
- if (pos > subLength) {
9647
- out += td.decode(sub);
9648
- buf.copyWithin(0, subLength, pos);
9649
- pos -= subLength;
9650
- }
9651
- if (j > 0)
9652
- buf[pos++] = comma;
9653
- pos = encodeInteger(buf, pos, state, segment, 0); // genColumn
9654
- if (segment.length === 1)
9655
- continue;
9656
- pos = encodeInteger(buf, pos, state, segment, 1); // sourcesIndex
9657
- pos = encodeInteger(buf, pos, state, segment, 2); // sourceLine
9658
- pos = encodeInteger(buf, pos, state, segment, 3); // sourceColumn
9659
- if (segment.length === 4)
9660
- continue;
9661
- pos = encodeInteger(buf, pos, state, segment, 4); // namesIndex
9662
- }
9663
- }
9664
- return out + td.decode(buf.subarray(0, pos));
9665
- }
9666
- function encodeInteger(buf, pos, state, segment, j) {
9667
- const next = segment[j];
9668
- let num = next - state[j];
9669
- state[j] = next;
9670
- num = num < 0 ? (-num << 1) | 1 : num << 1;
9671
- do {
9672
- let clamped = num & 0b011111;
9673
- num >>>= 5;
9674
- if (num > 0)
9675
- clamped |= 0b100000;
9676
- buf[pos++] = intToChar[clamped];
9677
- } while (num > 0);
9678
- return pos;
9679
- }
9680
-
9681
9657
  // Matches the scheme of a URL, eg "http://"
9682
9658
  const schemeRegex = /^[\w+.-]+:\/\//;
9683
9659
  /**
@@ -10482,7 +10458,7 @@ function build$2(map, loader, importer, importerDepth) {
10482
10458
  * A SourceMap v3 compatible sourcemap, which only includes fields that were
10483
10459
  * provided to it.
10484
10460
  */
10485
- let SourceMap$1 = class SourceMap {
10461
+ class SourceMap {
10486
10462
  constructor(map, options) {
10487
10463
  const out = options.decodedMappings ? decodedMap(map) : encodedMap(map);
10488
10464
  this.version = out.version; // SourceMap spec says this should be first.
@@ -10498,7 +10474,7 @@ let SourceMap$1 = class SourceMap {
10498
10474
  toString() {
10499
10475
  return JSON.stringify(this);
10500
10476
  }
10501
- };
10477
+ }
10502
10478
 
10503
10479
  /**
10504
10480
  * Traces through all the mappings in the root sourcemap, through the sources
@@ -10518,12 +10494,20 @@ let SourceMap$1 = class SourceMap {
10518
10494
  function remapping(input, loader, options) {
10519
10495
  const opts = typeof options === 'object' ? options : { excludeContent: !!options, decodedMappings: false };
10520
10496
  const tree = buildSourceMapTree(input, loader);
10521
- return new SourceMap$1(traceMappings(tree), opts);
10497
+ return new SourceMap(traceMappings(tree), opts);
10522
10498
  }
10523
10499
 
10524
- var src$2 = {exports: {}};
10500
+ var srcExports$1 = {};
10501
+ var src$2 = {
10502
+ get exports(){ return srcExports$1; },
10503
+ set exports(v){ srcExports$1 = v; },
10504
+ };
10525
10505
 
10526
- var browser$2 = {exports: {}};
10506
+ var browserExports$1 = {};
10507
+ var browser$2 = {
10508
+ get exports(){ return browserExports$1; },
10509
+ set exports(v){ browserExports$1 = v; },
10510
+ };
10527
10511
 
10528
10512
  /**
10529
10513
  * Helpers.
@@ -10983,7 +10967,7 @@ function requireCommon () {
10983
10967
  var hasRequiredBrowser$1;
10984
10968
 
10985
10969
  function requireBrowser$1 () {
10986
- if (hasRequiredBrowser$1) return browser$2.exports;
10970
+ if (hasRequiredBrowser$1) return browserExports$1;
10987
10971
  hasRequiredBrowser$1 = 1;
10988
10972
  (function (module, exports) {
10989
10973
  /**
@@ -11253,11 +11237,15 @@ function requireBrowser$1 () {
11253
11237
  return '[UnexpectedJSONParseError]: ' + error.message;
11254
11238
  }
11255
11239
  };
11256
- } (browser$2, browser$2.exports));
11257
- return browser$2.exports;
11240
+ } (browser$2, browserExports$1));
11241
+ return browserExports$1;
11258
11242
  }
11259
11243
 
11260
- var node$1 = {exports: {}};
11244
+ var nodeExports$1 = {};
11245
+ var node$1 = {
11246
+ get exports(){ return nodeExports$1; },
11247
+ set exports(v){ nodeExports$1 = v; },
11248
+ };
11261
11249
 
11262
11250
  /**
11263
11251
  * Module dependencies.
@@ -11266,7 +11254,7 @@ var node$1 = {exports: {}};
11266
11254
  var hasRequiredNode$1;
11267
11255
 
11268
11256
  function requireNode$1 () {
11269
- if (hasRequiredNode$1) return node$1.exports;
11257
+ if (hasRequiredNode$1) return nodeExports$1;
11270
11258
  hasRequiredNode$1 = 1;
11271
11259
  (function (module, exports) {
11272
11260
  const tty = require$$0$3;
@@ -11528,8 +11516,8 @@ function requireNode$1 () {
11528
11516
  this.inspectOpts.colors = this.useColors;
11529
11517
  return util.inspect(v, this.inspectOpts);
11530
11518
  };
11531
- } (node$1, node$1.exports));
11532
- return node$1.exports;
11519
+ } (node$1, nodeExports$1));
11520
+ return nodeExports$1;
11533
11521
  }
11534
11522
 
11535
11523
  /**
@@ -11545,7 +11533,7 @@ function requireNode$1 () {
11545
11533
  }
11546
11534
  } (src$2));
11547
11535
 
11548
- var _debug = /*@__PURE__*/getDefaultExportFromCjs(src$2.exports);
11536
+ var _debug = /*@__PURE__*/getDefaultExportFromCjs(srcExports$1);
11549
11537
 
11550
11538
  const createFilter = createFilter$1;
11551
11539
  function slash$1(p) {
@@ -11774,13 +11762,13 @@ function timeFrom(start, subtract = 0) {
11774
11762
  const time = performance.now() - start - subtract;
11775
11763
  const timeString = (time.toFixed(2) + `ms`).padEnd(5, ' ');
11776
11764
  if (time < 10) {
11777
- return picocolors.exports.green(timeString);
11765
+ return picocolorsExports.green(timeString);
11778
11766
  }
11779
11767
  else if (time < 50) {
11780
- return picocolors.exports.yellow(timeString);
11768
+ return picocolorsExports.yellow(timeString);
11781
11769
  }
11782
11770
  else {
11783
- return picocolors.exports.red(timeString);
11771
+ return picocolorsExports.red(timeString);
11784
11772
  }
11785
11773
  }
11786
11774
  /**
@@ -11799,15 +11787,15 @@ function prettifyUrl(url, root) {
11799
11787
  if (file.startsWith('@')) {
11800
11788
  file = `${file}/${seg[npmIndex + 2]}`;
11801
11789
  }
11802
- file = `npm: ${picocolors.exports.dim(file)}${isSourceMap ? ` (source map)` : ``}`;
11790
+ file = `npm: ${picocolorsExports.dim(file)}${isSourceMap ? ` (source map)` : ``}`;
11803
11791
  }
11804
- return picocolors.exports.dim(file);
11792
+ return picocolorsExports.dim(file);
11805
11793
  }
11806
11794
  else {
11807
- return picocolors.exports.dim(url);
11795
+ return picocolorsExports.dim(url);
11808
11796
  }
11809
11797
  }
11810
- function isObject$2(value) {
11798
+ function isObject$1(value) {
11811
11799
  return Object.prototype.toString.call(value) === '[object Object]';
11812
11800
  }
11813
11801
  function isDefined(value) {
@@ -12331,7 +12319,7 @@ function mergeConfigRecursively(defaults, overrides, rootPath) {
12331
12319
  merged[key] = [...arraify(existing ?? []), ...arraify(value ?? [])];
12332
12320
  continue;
12333
12321
  }
12334
- if (isObject$2(existing) && isObject$2(value)) {
12322
+ if (isObject$1(existing) && isObject$1(value)) {
12335
12323
  merged[key] = mergeConfigRecursively(existing, value, rootPath ? `${rootPath}.${key}` : key);
12336
12324
  continue;
12337
12325
  }
@@ -12347,7 +12335,7 @@ function mergeAlias(a, b) {
12347
12335
  return b;
12348
12336
  if (!b)
12349
12337
  return a;
12350
- if (isObject$2(a) && isObject$2(b)) {
12338
+ if (isObject$1(a) && isObject$1(b)) {
12351
12339
  return { ...a, ...b };
12352
12340
  }
12353
12341
  // the order is flipped because the alias is resolved from top-down,
@@ -12508,11 +12496,11 @@ function createLogger(level = 'info', options = {}) {
12508
12496
  const format = () => {
12509
12497
  if (options.timestamp) {
12510
12498
  const tag = type === 'info'
12511
- ? picocolors.exports.cyan(picocolors.exports.bold(prefix))
12499
+ ? picocolorsExports.cyan(picocolorsExports.bold(prefix))
12512
12500
  : type === 'warn'
12513
- ? picocolors.exports.yellow(picocolors.exports.bold(prefix))
12514
- : picocolors.exports.red(picocolors.exports.bold(prefix));
12515
- return `${picocolors.exports.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
12501
+ ? picocolorsExports.yellow(picocolorsExports.bold(prefix))
12502
+ : picocolorsExports.red(picocolorsExports.bold(prefix));
12503
+ return `${picocolorsExports.dim(new Date().toLocaleTimeString())} ${tag} ${msg}`;
12516
12504
  }
12517
12505
  else {
12518
12506
  return msg;
@@ -12525,7 +12513,7 @@ function createLogger(level = 'info', options = {}) {
12525
12513
  if (type === lastType && msg === lastMsg) {
12526
12514
  sameCount++;
12527
12515
  clear();
12528
- console[method](format(), picocolors.exports.yellow(`(x${sameCount + 1})`));
12516
+ console[method](format(), picocolorsExports.yellow(`(x${sameCount + 1})`));
12529
12517
  }
12530
12518
  else {
12531
12519
  sameCount = 0;
@@ -12575,24 +12563,24 @@ function createLogger(level = 'info', options = {}) {
12575
12563
  return logger;
12576
12564
  }
12577
12565
  function printServerUrls(urls, optionsHost, info) {
12578
- const colorUrl = (url) => picocolors.exports.cyan(url.replace(/:(\d+)\//, (_, port) => `:${picocolors.exports.bold(port)}/`));
12566
+ const colorUrl = (url) => picocolorsExports.cyan(url.replace(/:(\d+)\//, (_, port) => `:${picocolorsExports.bold(port)}/`));
12579
12567
  for (const url of urls.local) {
12580
- info(` ${picocolors.exports.green('➜')} ${picocolors.exports.bold('Local')}: ${colorUrl(url)}`);
12568
+ info(` ${picocolorsExports.green('➜')} ${picocolorsExports.bold('Local')}: ${colorUrl(url)}`);
12581
12569
  }
12582
12570
  for (const url of urls.network) {
12583
- info(` ${picocolors.exports.green('➜')} ${picocolors.exports.bold('Network')}: ${colorUrl(url)}`);
12571
+ info(` ${picocolorsExports.green('➜')} ${picocolorsExports.bold('Network')}: ${colorUrl(url)}`);
12584
12572
  }
12585
12573
  if (urls.network.length === 0 && optionsHost === undefined) {
12586
- info(picocolors.exports.dim(` ${picocolors.exports.green('➜')} ${picocolors.exports.bold('Network')}: use `) +
12587
- picocolors.exports.bold('--host') +
12588
- picocolors.exports.dim(' to expose'));
12574
+ info(picocolorsExports.dim(` ${picocolorsExports.green('➜')} ${picocolorsExports.bold('Network')}: use `) +
12575
+ picocolorsExports.bold('--host') +
12576
+ picocolorsExports.dim(' to expose'));
12589
12577
  }
12590
12578
  }
12591
12579
 
12592
12580
  const groups = [
12593
- { name: 'Assets', color: picocolors.exports.green },
12594
- { name: 'CSS', color: picocolors.exports.magenta },
12595
- { name: 'JS', color: picocolors.exports.cyan },
12581
+ { name: 'Assets', color: picocolorsExports.green },
12582
+ { name: 'CSS', color: picocolorsExports.magenta },
12583
+ { name: 'JS', color: picocolorsExports.cyan },
12596
12584
  ];
12597
12585
  function buildReporterPlugin(config) {
12598
12586
  const compress = promisify$4(gzip);
@@ -12626,7 +12614,7 @@ function buildReporterPlugin(config) {
12626
12614
  return compressed.length;
12627
12615
  }
12628
12616
  const logTransform = throttle((id) => {
12629
- writeLine(`transforming (${transformedCount}) ${picocolors.exports.dim(path$o.relative(config.root, id))}`);
12617
+ writeLine(`transforming (${transformedCount}) ${picocolorsExports.dim(path$o.relative(config.root, id))}`);
12630
12618
  });
12631
12619
  return {
12632
12620
  name: 'vite:reporter',
@@ -12653,7 +12641,7 @@ function buildReporterPlugin(config) {
12653
12641
  process.stdout.clearLine(0);
12654
12642
  process.stdout.cursorTo(0);
12655
12643
  }
12656
- config.logger.info(`${picocolors.exports.green(`✓`)} ${transformedCount} modules transformed.`);
12644
+ config.logger.info(`${picocolorsExports.green(`✓`)} ${transformedCount} modules transformed.`);
12657
12645
  }
12658
12646
  },
12659
12647
  renderStart() {
@@ -12739,20 +12727,20 @@ function buildReporterPlugin(config) {
12739
12727
  const isLarge = group.name === 'JS' && entry.size / 1000 > chunkLimit;
12740
12728
  if (isLarge)
12741
12729
  hasLargeChunks = true;
12742
- const sizeColor = isLarge ? picocolors.exports.yellow : picocolors.exports.dim;
12743
- let log = picocolors.exports.dim(relativeOutDir + '/');
12730
+ const sizeColor = isLarge ? picocolorsExports.yellow : picocolorsExports.dim;
12731
+ let log = picocolorsExports.dim(relativeOutDir + '/');
12744
12732
  log += entry.name.startsWith(assetsDir)
12745
- ? picocolors.exports.dim(assetsDir) +
12733
+ ? picocolorsExports.dim(assetsDir) +
12746
12734
  group.color(entry.name
12747
12735
  .slice(assetsDir.length)
12748
12736
  .padEnd(longest + 2 - assetsDir.length))
12749
12737
  : group.color(entry.name.padEnd(longest + 2));
12750
- log += picocolors.exports.bold(sizeColor(displaySize(entry.size).padStart(sizePad)));
12738
+ log += picocolorsExports.bold(sizeColor(displaySize(entry.size).padStart(sizePad)));
12751
12739
  if (entry.compressedSize) {
12752
- log += picocolors.exports.dim(` │ gzip: ${displaySize(entry.compressedSize).padStart(compressPad)}`);
12740
+ log += picocolorsExports.dim(` │ gzip: ${displaySize(entry.compressedSize).padStart(compressPad)}`);
12753
12741
  }
12754
12742
  if (entry.mapSize) {
12755
- log += picocolors.exports.dim(` │ map: ${displaySize(entry.mapSize).padStart(mapPad)}`);
12743
+ log += picocolorsExports.dim(` │ map: ${displaySize(entry.mapSize).padStart(mapPad)}`);
12756
12744
  }
12757
12745
  config.logger.info(log);
12758
12746
  }
@@ -12767,7 +12755,7 @@ function buildReporterPlugin(config) {
12767
12755
  config.build.minify &&
12768
12756
  !config.build.lib &&
12769
12757
  !config.build.ssr) {
12770
- config.logger.warn(picocolors.exports.yellow(`\n(!) Some chunks are larger than ${chunkLimit} kBs after minification. Consider:\n` +
12758
+ config.logger.warn(picocolorsExports.yellow(`\n(!) Some chunks are larger than ${chunkLimit} kBs after minification. Consider:\n` +
12771
12759
  `- Using dynamic import() to code-split the application\n` +
12772
12760
  `- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks\n` +
12773
12761
  `- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.`));
@@ -13643,7 +13631,7 @@ function resolveEsbuildTranspileOptions(config, format) {
13643
13631
  }
13644
13632
  }
13645
13633
  function prettifyMessage(m, code) {
13646
- let res = picocolors.exports.yellow(m.text);
13634
+ let res = picocolorsExports.yellow(m.text);
13647
13635
  if (m.location) {
13648
13636
  const lines = code.split(/\r?\n/g);
13649
13637
  const line = Number(m.location.line);
@@ -13664,7 +13652,7 @@ const tsconfckParseOptions = {
13664
13652
  };
13665
13653
  async function initTSConfck(config) {
13666
13654
  const workspaceRoot = searchForWorkspaceRoot(config.root);
13667
- debug$f(`init tsconfck (root: ${picocolors.exports.cyan(workspaceRoot)})`);
13655
+ debug$f(`init tsconfck (root: ${picocolorsExports.cyan(workspaceRoot)})`);
13668
13656
  tsconfckParseOptions.cache.clear();
13669
13657
  tsconfckParseOptions.root = workspaceRoot;
13670
13658
  tsconfckParseOptions.tsConfigPaths = new Set([
@@ -13809,1625 +13797,486 @@ parentPort.on('message', async (args) => {
13809
13797
  const res = await doWork(...args)
13810
13798
  parentPort.postMessage(res)
13811
13799
  })
13812
- `;
13813
- }
13814
-
13815
- let terserPath;
13816
- const loadTerserPath = (root) => {
13817
- if (terserPath)
13818
- return terserPath;
13819
- try {
13820
- terserPath = requireResolveFromRootWithFallback(root, 'terser');
13821
- }
13822
- catch (e) {
13823
- if (e.code === 'MODULE_NOT_FOUND') {
13824
- throw new Error('terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.');
13825
- }
13826
- else {
13827
- const message = new Error(`terser failed to load:\n${e.message}`);
13828
- message.stack = e.stack + '\n' + message.stack;
13829
- throw message;
13830
- }
13831
- }
13832
- return terserPath;
13833
- };
13834
- function terserPlugin(config) {
13835
- const makeWorker = () => new Worker_1(async (terserPath, code, options) => {
13836
- // test fails when using `import`. maybe related: https://github.com/nodejs/node/issues/43205
13837
- // eslint-disable-next-line no-restricted-globals -- this function runs inside cjs
13838
- const terser = require(terserPath);
13839
- return terser.minify(code, options);
13840
- });
13841
- let worker;
13842
- return {
13843
- name: 'vite:terser',
13844
- async renderChunk(code, _chunk, outputOptions) {
13845
- // This plugin is included for any non-false value of config.build.minify,
13846
- // so that normal chunks can use the preferred minifier, and legacy chunks
13847
- // can use terser.
13848
- if (config.build.minify !== 'terser' &&
13849
- // @ts-expect-error injected by @vitejs/plugin-legacy
13850
- !outputOptions.__vite_force_terser__) {
13851
- return null;
13852
- }
13853
- // Do not minify ES lib output since that would remove pure annotations
13854
- // and break tree-shaking.
13855
- if (config.build.lib && outputOptions.format === 'es') {
13856
- return null;
13857
- }
13858
- // Lazy load worker.
13859
- worker || (worker = makeWorker());
13860
- const terserPath = loadTerserPath(config.root);
13861
- const res = await worker.run(terserPath, code, {
13862
- safari10: true,
13863
- ...config.build.terserOptions,
13864
- sourceMap: !!outputOptions.sourcemap,
13865
- module: outputOptions.format.startsWith('es'),
13866
- toplevel: outputOptions.format === 'cjs',
13867
- });
13868
- return {
13869
- code: res.code,
13870
- map: res.map,
13871
- };
13872
- },
13873
- closeBundle() {
13874
- worker?.stop();
13875
- },
13876
- };
13877
- }
13878
-
13879
- const mimes$1 = {
13880
- "ez": "application/andrew-inset",
13881
- "aw": "application/applixware",
13882
- "atom": "application/atom+xml",
13883
- "atomcat": "application/atomcat+xml",
13884
- "atomdeleted": "application/atomdeleted+xml",
13885
- "atomsvc": "application/atomsvc+xml",
13886
- "dwd": "application/atsc-dwd+xml",
13887
- "held": "application/atsc-held+xml",
13888
- "rsat": "application/atsc-rsat+xml",
13889
- "bdoc": "application/bdoc",
13890
- "xcs": "application/calendar+xml",
13891
- "ccxml": "application/ccxml+xml",
13892
- "cdfx": "application/cdfx+xml",
13893
- "cdmia": "application/cdmi-capability",
13894
- "cdmic": "application/cdmi-container",
13895
- "cdmid": "application/cdmi-domain",
13896
- "cdmio": "application/cdmi-object",
13897
- "cdmiq": "application/cdmi-queue",
13898
- "cu": "application/cu-seeme",
13899
- "mpd": "application/dash+xml",
13900
- "davmount": "application/davmount+xml",
13901
- "dbk": "application/docbook+xml",
13902
- "dssc": "application/dssc+der",
13903
- "xdssc": "application/dssc+xml",
13904
- "es": "application/ecmascript",
13905
- "ecma": "application/ecmascript",
13906
- "emma": "application/emma+xml",
13907
- "emotionml": "application/emotionml+xml",
13908
- "epub": "application/epub+zip",
13909
- "exi": "application/exi",
13910
- "fdt": "application/fdt+xml",
13911
- "pfr": "application/font-tdpfr",
13912
- "geojson": "application/geo+json",
13913
- "gml": "application/gml+xml",
13914
- "gpx": "application/gpx+xml",
13915
- "gxf": "application/gxf",
13916
- "gz": "application/gzip",
13917
- "hjson": "application/hjson",
13918
- "stk": "application/hyperstudio",
13919
- "ink": "application/inkml+xml",
13920
- "inkml": "application/inkml+xml",
13921
- "ipfix": "application/ipfix",
13922
- "its": "application/its+xml",
13923
- "jar": "application/java-archive",
13924
- "war": "application/java-archive",
13925
- "ear": "application/java-archive",
13926
- "ser": "application/java-serialized-object",
13927
- "class": "application/java-vm",
13928
- "js": "application/javascript",
13929
- "mjs": "application/javascript",
13930
- "json": "application/json",
13931
- "map": "application/json",
13932
- "json5": "application/json5",
13933
- "jsonml": "application/jsonml+json",
13934
- "jsonld": "application/ld+json",
13935
- "lgr": "application/lgr+xml",
13936
- "lostxml": "application/lost+xml",
13937
- "hqx": "application/mac-binhex40",
13938
- "cpt": "application/mac-compactpro",
13939
- "mads": "application/mads+xml",
13940
- "webmanifest": "application/manifest+json",
13941
- "mrc": "application/marc",
13942
- "mrcx": "application/marcxml+xml",
13943
- "ma": "application/mathematica",
13944
- "nb": "application/mathematica",
13945
- "mb": "application/mathematica",
13946
- "mathml": "application/mathml+xml",
13947
- "mbox": "application/mbox",
13948
- "mscml": "application/mediaservercontrol+xml",
13949
- "metalink": "application/metalink+xml",
13950
- "meta4": "application/metalink4+xml",
13951
- "mets": "application/mets+xml",
13952
- "maei": "application/mmt-aei+xml",
13953
- "musd": "application/mmt-usd+xml",
13954
- "mods": "application/mods+xml",
13955
- "m21": "application/mp21",
13956
- "mp21": "application/mp21",
13957
- "mp4s": "application/mp4",
13958
- "m4p": "application/mp4",
13959
- "doc": "application/msword",
13960
- "dot": "application/msword",
13961
- "mxf": "application/mxf",
13962
- "nq": "application/n-quads",
13963
- "nt": "application/n-triples",
13964
- "cjs": "application/node",
13965
- "bin": "application/octet-stream",
13966
- "dms": "application/octet-stream",
13967
- "lrf": "application/octet-stream",
13968
- "mar": "application/octet-stream",
13969
- "so": "application/octet-stream",
13970
- "dist": "application/octet-stream",
13971
- "distz": "application/octet-stream",
13972
- "pkg": "application/octet-stream",
13973
- "bpk": "application/octet-stream",
13974
- "dump": "application/octet-stream",
13975
- "elc": "application/octet-stream",
13976
- "deploy": "application/octet-stream",
13977
- "exe": "application/octet-stream",
13978
- "dll": "application/octet-stream",
13979
- "deb": "application/octet-stream",
13980
- "dmg": "application/octet-stream",
13981
- "iso": "application/octet-stream",
13982
- "img": "application/octet-stream",
13983
- "msi": "application/octet-stream",
13984
- "msp": "application/octet-stream",
13985
- "msm": "application/octet-stream",
13986
- "buffer": "application/octet-stream",
13987
- "oda": "application/oda",
13988
- "opf": "application/oebps-package+xml",
13989
- "ogx": "application/ogg",
13990
- "omdoc": "application/omdoc+xml",
13991
- "onetoc": "application/onenote",
13992
- "onetoc2": "application/onenote",
13993
- "onetmp": "application/onenote",
13994
- "onepkg": "application/onenote",
13995
- "oxps": "application/oxps",
13996
- "relo": "application/p2p-overlay+xml",
13997
- "xer": "application/patch-ops-error+xml",
13998
- "pdf": "application/pdf",
13999
- "pgp": "application/pgp-encrypted",
14000
- "asc": "application/pgp-signature",
14001
- "sig": "application/pgp-signature",
14002
- "prf": "application/pics-rules",
14003
- "p10": "application/pkcs10",
14004
- "p7m": "application/pkcs7-mime",
14005
- "p7c": "application/pkcs7-mime",
14006
- "p7s": "application/pkcs7-signature",
14007
- "p8": "application/pkcs8",
14008
- "ac": "application/pkix-attr-cert",
14009
- "cer": "application/pkix-cert",
14010
- "crl": "application/pkix-crl",
14011
- "pkipath": "application/pkix-pkipath",
14012
- "pki": "application/pkixcmp",
14013
- "pls": "application/pls+xml",
14014
- "ai": "application/postscript",
14015
- "eps": "application/postscript",
14016
- "ps": "application/postscript",
14017
- "provx": "application/provenance+xml",
14018
- "cww": "application/prs.cww",
14019
- "pskcxml": "application/pskc+xml",
14020
- "raml": "application/raml+yaml",
14021
- "rdf": "application/rdf+xml",
14022
- "owl": "application/rdf+xml",
14023
- "rif": "application/reginfo+xml",
14024
- "rnc": "application/relax-ng-compact-syntax",
14025
- "rl": "application/resource-lists+xml",
14026
- "rld": "application/resource-lists-diff+xml",
14027
- "rs": "application/rls-services+xml",
14028
- "rapd": "application/route-apd+xml",
14029
- "sls": "application/route-s-tsid+xml",
14030
- "rusd": "application/route-usd+xml",
14031
- "gbr": "application/rpki-ghostbusters",
14032
- "mft": "application/rpki-manifest",
14033
- "roa": "application/rpki-roa",
14034
- "rsd": "application/rsd+xml",
14035
- "rss": "application/rss+xml",
14036
- "rtf": "application/rtf",
14037
- "sbml": "application/sbml+xml",
14038
- "scq": "application/scvp-cv-request",
14039
- "scs": "application/scvp-cv-response",
14040
- "spq": "application/scvp-vp-request",
14041
- "spp": "application/scvp-vp-response",
14042
- "sdp": "application/sdp",
14043
- "senmlx": "application/senml+xml",
14044
- "sensmlx": "application/sensml+xml",
14045
- "setpay": "application/set-payment-initiation",
14046
- "setreg": "application/set-registration-initiation",
14047
- "shf": "application/shf+xml",
14048
- "siv": "application/sieve",
14049
- "sieve": "application/sieve",
14050
- "smi": "application/smil+xml",
14051
- "smil": "application/smil+xml",
14052
- "rq": "application/sparql-query",
14053
- "srx": "application/sparql-results+xml",
14054
- "gram": "application/srgs",
14055
- "grxml": "application/srgs+xml",
14056
- "sru": "application/sru+xml",
14057
- "ssdl": "application/ssdl+xml",
14058
- "ssml": "application/ssml+xml",
14059
- "swidtag": "application/swid+xml",
14060
- "tei": "application/tei+xml",
14061
- "teicorpus": "application/tei+xml",
14062
- "tfi": "application/thraud+xml",
14063
- "tsd": "application/timestamped-data",
14064
- "toml": "application/toml",
14065
- "trig": "application/trig",
14066
- "ttml": "application/ttml+xml",
14067
- "ubj": "application/ubjson",
14068
- "rsheet": "application/urc-ressheet+xml",
14069
- "td": "application/urc-targetdesc+xml",
14070
- "vxml": "application/voicexml+xml",
14071
- "wasm": "application/wasm",
14072
- "wgt": "application/widget",
14073
- "hlp": "application/winhlp",
14074
- "wsdl": "application/wsdl+xml",
14075
- "wspolicy": "application/wspolicy+xml",
14076
- "xaml": "application/xaml+xml",
14077
- "xav": "application/xcap-att+xml",
14078
- "xca": "application/xcap-caps+xml",
14079
- "xdf": "application/xcap-diff+xml",
14080
- "xel": "application/xcap-el+xml",
14081
- "xns": "application/xcap-ns+xml",
14082
- "xenc": "application/xenc+xml",
14083
- "xhtml": "application/xhtml+xml",
14084
- "xht": "application/xhtml+xml",
14085
- "xlf": "application/xliff+xml",
14086
- "xml": "application/xml",
14087
- "xsl": "application/xml",
14088
- "xsd": "application/xml",
14089
- "rng": "application/xml",
14090
- "dtd": "application/xml-dtd",
14091
- "xop": "application/xop+xml",
14092
- "xpl": "application/xproc+xml",
14093
- "xslt": "application/xml",
14094
- "xspf": "application/xspf+xml",
14095
- "mxml": "application/xv+xml",
14096
- "xhvml": "application/xv+xml",
14097
- "xvml": "application/xv+xml",
14098
- "xvm": "application/xv+xml",
14099
- "yang": "application/yang",
14100
- "yin": "application/yin+xml",
14101
- "zip": "application/zip",
14102
- "3gpp": "video/3gpp",
14103
- "adp": "audio/adpcm",
14104
- "amr": "audio/amr",
14105
- "au": "audio/basic",
14106
- "snd": "audio/basic",
14107
- "mid": "audio/midi",
14108
- "midi": "audio/midi",
14109
- "kar": "audio/midi",
14110
- "rmi": "audio/midi",
14111
- "mxmf": "audio/mobile-xmf",
14112
- "mp3": "audio/mpeg",
14113
- "m4a": "audio/mp4",
14114
- "mp4a": "audio/mp4",
14115
- "mpga": "audio/mpeg",
14116
- "mp2": "audio/mpeg",
14117
- "mp2a": "audio/mpeg",
14118
- "m2a": "audio/mpeg",
14119
- "m3a": "audio/mpeg",
14120
- "oga": "audio/ogg",
14121
- "ogg": "audio/ogg",
14122
- "spx": "audio/ogg",
14123
- "opus": "audio/ogg",
14124
- "s3m": "audio/s3m",
14125
- "sil": "audio/silk",
14126
- "wav": "audio/wav",
14127
- "weba": "audio/webm",
14128
- "xm": "audio/xm",
14129
- "ttc": "font/collection",
14130
- "otf": "font/otf",
14131
- "ttf": "font/ttf",
14132
- "woff": "font/woff",
14133
- "woff2": "font/woff2",
14134
- "exr": "image/aces",
14135
- "apng": "image/apng",
14136
- "avif": "image/avif",
14137
- "bmp": "image/bmp",
14138
- "cgm": "image/cgm",
14139
- "drle": "image/dicom-rle",
14140
- "emf": "image/emf",
14141
- "fits": "image/fits",
14142
- "g3": "image/g3fax",
14143
- "gif": "image/gif",
14144
- "heic": "image/heic",
14145
- "heics": "image/heic-sequence",
14146
- "heif": "image/heif",
14147
- "heifs": "image/heif-sequence",
14148
- "hej2": "image/hej2k",
14149
- "hsj2": "image/hsj2",
14150
- "ief": "image/ief",
14151
- "jls": "image/jls",
14152
- "jp2": "image/jp2",
14153
- "jpg2": "image/jp2",
14154
- "jpeg": "image/jpeg",
14155
- "jpg": "image/jpeg",
14156
- "jpe": "image/jpeg",
14157
- "jph": "image/jph",
14158
- "jhc": "image/jphc",
14159
- "jpm": "image/jpm",
14160
- "jpx": "image/jpx",
14161
- "jpf": "image/jpx",
14162
- "jxr": "image/jxr",
14163
- "jxra": "image/jxra",
14164
- "jxrs": "image/jxrs",
14165
- "jxs": "image/jxs",
14166
- "jxsc": "image/jxsc",
14167
- "jxsi": "image/jxsi",
14168
- "jxss": "image/jxss",
14169
- "ktx": "image/ktx",
14170
- "ktx2": "image/ktx2",
14171
- "png": "image/png",
14172
- "btif": "image/prs.btif",
14173
- "pti": "image/prs.pti",
14174
- "sgi": "image/sgi",
14175
- "svg": "image/svg+xml",
14176
- "svgz": "image/svg+xml",
14177
- "t38": "image/t38",
14178
- "tif": "image/tiff",
14179
- "tiff": "image/tiff",
14180
- "tfx": "image/tiff-fx",
14181
- "webp": "image/webp",
14182
- "wmf": "image/wmf",
14183
- "disposition-notification": "message/disposition-notification",
14184
- "u8msg": "message/global",
14185
- "u8dsn": "message/global-delivery-status",
14186
- "u8mdn": "message/global-disposition-notification",
14187
- "u8hdr": "message/global-headers",
14188
- "eml": "message/rfc822",
14189
- "mime": "message/rfc822",
14190
- "3mf": "model/3mf",
14191
- "gltf": "model/gltf+json",
14192
- "glb": "model/gltf-binary",
14193
- "igs": "model/iges",
14194
- "iges": "model/iges",
14195
- "msh": "model/mesh",
14196
- "mesh": "model/mesh",
14197
- "silo": "model/mesh",
14198
- "mtl": "model/mtl",
14199
- "obj": "model/obj",
14200
- "stpz": "model/step+zip",
14201
- "stpxz": "model/step-xml+zip",
14202
- "stl": "model/stl",
14203
- "wrl": "model/vrml",
14204
- "vrml": "model/vrml",
14205
- "x3db": "model/x3d+fastinfoset",
14206
- "x3dbz": "model/x3d+binary",
14207
- "x3dv": "model/x3d-vrml",
14208
- "x3dvz": "model/x3d+vrml",
14209
- "x3d": "model/x3d+xml",
14210
- "x3dz": "model/x3d+xml",
14211
- "appcache": "text/cache-manifest",
14212
- "manifest": "text/cache-manifest",
14213
- "ics": "text/calendar",
14214
- "ifb": "text/calendar",
14215
- "coffee": "text/coffeescript",
14216
- "litcoffee": "text/coffeescript",
14217
- "css": "text/css",
14218
- "csv": "text/csv",
14219
- "html": "text/html",
14220
- "htm": "text/html",
14221
- "shtml": "text/html",
14222
- "jade": "text/jade",
14223
- "jsx": "text/jsx",
14224
- "less": "text/less",
14225
- "markdown": "text/markdown",
14226
- "md": "text/markdown",
14227
- "mml": "text/mathml",
14228
- "mdx": "text/mdx",
14229
- "n3": "text/n3",
14230
- "txt": "text/plain",
14231
- "text": "text/plain",
14232
- "conf": "text/plain",
14233
- "def": "text/plain",
14234
- "list": "text/plain",
14235
- "log": "text/plain",
14236
- "in": "text/plain",
14237
- "ini": "text/plain",
14238
- "dsc": "text/prs.lines.tag",
14239
- "rtx": "text/richtext",
14240
- "sgml": "text/sgml",
14241
- "sgm": "text/sgml",
14242
- "shex": "text/shex",
14243
- "slim": "text/slim",
14244
- "slm": "text/slim",
14245
- "spdx": "text/spdx",
14246
- "stylus": "text/stylus",
14247
- "styl": "text/stylus",
14248
- "tsv": "text/tab-separated-values",
14249
- "t": "text/troff",
14250
- "tr": "text/troff",
14251
- "roff": "text/troff",
14252
- "man": "text/troff",
14253
- "me": "text/troff",
14254
- "ms": "text/troff",
14255
- "ttl": "text/turtle",
14256
- "uri": "text/uri-list",
14257
- "uris": "text/uri-list",
14258
- "urls": "text/uri-list",
14259
- "vcard": "text/vcard",
14260
- "vtt": "text/vtt",
14261
- "yaml": "text/yaml",
14262
- "yml": "text/yaml",
14263
- "3gp": "video/3gpp",
14264
- "3g2": "video/3gpp2",
14265
- "h261": "video/h261",
14266
- "h263": "video/h263",
14267
- "h264": "video/h264",
14268
- "m4s": "video/iso.segment",
14269
- "jpgv": "video/jpeg",
14270
- "jpgm": "image/jpm",
14271
- "mj2": "video/mj2",
14272
- "mjp2": "video/mj2",
14273
- "ts": "video/mp2t",
14274
- "mp4": "video/mp4",
14275
- "mp4v": "video/mp4",
14276
- "mpg4": "video/mp4",
14277
- "mpeg": "video/mpeg",
14278
- "mpg": "video/mpeg",
14279
- "mpe": "video/mpeg",
14280
- "m1v": "video/mpeg",
14281
- "m2v": "video/mpeg",
14282
- "ogv": "video/ogg",
14283
- "qt": "video/quicktime",
14284
- "mov": "video/quicktime",
14285
- "webm": "video/webm"
14286
- };
14287
-
14288
- function lookup(extn) {
14289
- let tmp = ('' + extn).trim().toLowerCase();
14290
- let idx = tmp.lastIndexOf('.');
14291
- return mimes$1[!~idx ? tmp : tmp.substring(++idx)];
14292
- }
14293
-
14294
- class BitSet {
14295
- constructor(arg) {
14296
- this.bits = arg instanceof BitSet ? arg.bits.slice() : [];
14297
- }
14298
-
14299
- add(n) {
14300
- this.bits[n >> 5] |= 1 << (n & 31);
14301
- }
14302
-
14303
- has(n) {
14304
- return !!(this.bits[n >> 5] & (1 << (n & 31)));
14305
- }
14306
- }
14307
-
14308
- class Chunk {
14309
- constructor(start, end, content) {
14310
- this.start = start;
14311
- this.end = end;
14312
- this.original = content;
14313
-
14314
- this.intro = '';
14315
- this.outro = '';
14316
-
14317
- this.content = content;
14318
- this.storeName = false;
14319
- this.edited = false;
14320
-
14321
- {
14322
- this.previous = null;
14323
- this.next = null;
14324
- }
14325
- }
14326
-
14327
- appendLeft(content) {
14328
- this.outro += content;
14329
- }
14330
-
14331
- appendRight(content) {
14332
- this.intro = this.intro + content;
14333
- }
14334
-
14335
- clone() {
14336
- const chunk = new Chunk(this.start, this.end, this.original);
14337
-
14338
- chunk.intro = this.intro;
14339
- chunk.outro = this.outro;
14340
- chunk.content = this.content;
14341
- chunk.storeName = this.storeName;
14342
- chunk.edited = this.edited;
14343
-
14344
- return chunk;
14345
- }
14346
-
14347
- contains(index) {
14348
- return this.start < index && index < this.end;
14349
- }
14350
-
14351
- eachNext(fn) {
14352
- let chunk = this;
14353
- while (chunk) {
14354
- fn(chunk);
14355
- chunk = chunk.next;
14356
- }
14357
- }
14358
-
14359
- eachPrevious(fn) {
14360
- let chunk = this;
14361
- while (chunk) {
14362
- fn(chunk);
14363
- chunk = chunk.previous;
14364
- }
14365
- }
14366
-
14367
- edit(content, storeName, contentOnly) {
14368
- this.content = content;
14369
- if (!contentOnly) {
14370
- this.intro = '';
14371
- this.outro = '';
14372
- }
14373
- this.storeName = storeName;
14374
-
14375
- this.edited = true;
14376
-
14377
- return this;
14378
- }
14379
-
14380
- prependLeft(content) {
14381
- this.outro = content + this.outro;
14382
- }
14383
-
14384
- prependRight(content) {
14385
- this.intro = content + this.intro;
14386
- }
14387
-
14388
- split(index) {
14389
- const sliceIndex = index - this.start;
14390
-
14391
- const originalBefore = this.original.slice(0, sliceIndex);
14392
- const originalAfter = this.original.slice(sliceIndex);
14393
-
14394
- this.original = originalBefore;
14395
-
14396
- const newChunk = new Chunk(index, this.end, originalAfter);
14397
- newChunk.outro = this.outro;
14398
- this.outro = '';
14399
-
14400
- this.end = index;
14401
-
14402
- if (this.edited) {
14403
- // TODO is this block necessary?...
14404
- newChunk.edit('', false);
14405
- this.content = '';
14406
- } else {
14407
- this.content = originalBefore;
14408
- }
14409
-
14410
- newChunk.next = this.next;
14411
- if (newChunk.next) newChunk.next.previous = newChunk;
14412
- newChunk.previous = this;
14413
- this.next = newChunk;
14414
-
14415
- return newChunk;
14416
- }
14417
-
14418
- toString() {
14419
- return this.intro + this.content + this.outro;
14420
- }
14421
-
14422
- trimEnd(rx) {
14423
- this.outro = this.outro.replace(rx, '');
14424
- if (this.outro.length) return true;
14425
-
14426
- const trimmed = this.content.replace(rx, '');
14427
-
14428
- if (trimmed.length) {
14429
- if (trimmed !== this.content) {
14430
- this.split(this.start + trimmed.length).edit('', undefined, true);
14431
- }
14432
- return true;
14433
- } else {
14434
- this.edit('', undefined, true);
14435
-
14436
- this.intro = this.intro.replace(rx, '');
14437
- if (this.intro.length) return true;
14438
- }
14439
- }
14440
-
14441
- trimStart(rx) {
14442
- this.intro = this.intro.replace(rx, '');
14443
- if (this.intro.length) return true;
14444
-
14445
- const trimmed = this.content.replace(rx, '');
14446
-
14447
- if (trimmed.length) {
14448
- if (trimmed !== this.content) {
14449
- this.split(this.end - trimmed.length);
14450
- this.edit('', undefined, true);
14451
- }
14452
- return true;
14453
- } else {
14454
- this.edit('', undefined, true);
14455
-
14456
- this.outro = this.outro.replace(rx, '');
14457
- if (this.outro.length) return true;
14458
- }
14459
- }
14460
- }
14461
-
14462
- function getBtoa () {
14463
- if (typeof window !== 'undefined' && typeof window.btoa === 'function') {
14464
- return (str) => window.btoa(unescape(encodeURIComponent(str)));
14465
- } else if (typeof Buffer === 'function') {
14466
- return (str) => Buffer.from(str, 'utf-8').toString('base64');
14467
- } else {
14468
- return () => {
14469
- throw new Error('Unsupported environment: `window.btoa` or `Buffer` should be supported.');
14470
- };
14471
- }
14472
- }
14473
-
14474
- const btoa$1 = /*#__PURE__*/ getBtoa();
14475
-
14476
- class SourceMap {
14477
- constructor(properties) {
14478
- this.version = 3;
14479
- this.file = properties.file;
14480
- this.sources = properties.sources;
14481
- this.sourcesContent = properties.sourcesContent;
14482
- this.names = properties.names;
14483
- this.mappings = encode$1(properties.mappings);
14484
- }
14485
-
14486
- toString() {
14487
- return JSON.stringify(this);
14488
- }
14489
-
14490
- toUrl() {
14491
- return 'data:application/json;charset=utf-8;base64,' + btoa$1(this.toString());
14492
- }
14493
- }
14494
-
14495
- function guessIndent(code) {
14496
- const lines = code.split('\n');
14497
-
14498
- const tabbed = lines.filter((line) => /^\t+/.test(line));
14499
- const spaced = lines.filter((line) => /^ {2,}/.test(line));
14500
-
14501
- if (tabbed.length === 0 && spaced.length === 0) {
14502
- return null;
14503
- }
14504
-
14505
- // More lines tabbed than spaced? Assume tabs, and
14506
- // default to tabs in the case of a tie (or nothing
14507
- // to go on)
14508
- if (tabbed.length >= spaced.length) {
14509
- return '\t';
14510
- }
14511
-
14512
- // Otherwise, we need to guess the multiple
14513
- const min = spaced.reduce((previous, current) => {
14514
- const numSpaces = /^ +/.exec(current)[0].length;
14515
- return Math.min(numSpaces, previous);
14516
- }, Infinity);
14517
-
14518
- return new Array(min + 1).join(' ');
14519
- }
14520
-
14521
- function getRelativePath(from, to) {
14522
- const fromParts = from.split(/[/\\]/);
14523
- const toParts = to.split(/[/\\]/);
14524
-
14525
- fromParts.pop(); // get dirname
14526
-
14527
- while (fromParts[0] === toParts[0]) {
14528
- fromParts.shift();
14529
- toParts.shift();
14530
- }
14531
-
14532
- if (fromParts.length) {
14533
- let i = fromParts.length;
14534
- while (i--) fromParts[i] = '..';
14535
- }
14536
-
14537
- return fromParts.concat(toParts).join('/');
14538
- }
14539
-
14540
- const toString$2 = Object.prototype.toString;
14541
-
14542
- function isObject$1(thing) {
14543
- return toString$2.call(thing) === '[object Object]';
14544
- }
14545
-
14546
- function getLocator(source) {
14547
- const originalLines = source.split('\n');
14548
- const lineOffsets = [];
14549
-
14550
- for (let i = 0, pos = 0; i < originalLines.length; i++) {
14551
- lineOffsets.push(pos);
14552
- pos += originalLines[i].length + 1;
14553
- }
14554
-
14555
- return function locate(index) {
14556
- let i = 0;
14557
- let j = lineOffsets.length;
14558
- while (i < j) {
14559
- const m = (i + j) >> 1;
14560
- if (index < lineOffsets[m]) {
14561
- j = m;
14562
- } else {
14563
- i = m + 1;
14564
- }
14565
- }
14566
- const line = i - 1;
14567
- const column = index - lineOffsets[line];
14568
- return { line, column };
14569
- };
14570
- }
14571
-
14572
- class Mappings {
14573
- constructor(hires) {
14574
- this.hires = hires;
14575
- this.generatedCodeLine = 0;
14576
- this.generatedCodeColumn = 0;
14577
- this.raw = [];
14578
- this.rawSegments = this.raw[this.generatedCodeLine] = [];
14579
- this.pending = null;
14580
- }
14581
-
14582
- addEdit(sourceIndex, content, loc, nameIndex) {
14583
- if (content.length) {
14584
- const segment = [this.generatedCodeColumn, sourceIndex, loc.line, loc.column];
14585
- if (nameIndex >= 0) {
14586
- segment.push(nameIndex);
14587
- }
14588
- this.rawSegments.push(segment);
14589
- } else if (this.pending) {
14590
- this.rawSegments.push(this.pending);
14591
- }
14592
-
14593
- this.advance(content);
14594
- this.pending = null;
14595
- }
14596
-
14597
- addUneditedChunk(sourceIndex, chunk, original, loc, sourcemapLocations) {
14598
- let originalCharIndex = chunk.start;
14599
- let first = true;
14600
-
14601
- while (originalCharIndex < chunk.end) {
14602
- if (this.hires || first || sourcemapLocations.has(originalCharIndex)) {
14603
- this.rawSegments.push([this.generatedCodeColumn, sourceIndex, loc.line, loc.column]);
14604
- }
14605
-
14606
- if (original[originalCharIndex] === '\n') {
14607
- loc.line += 1;
14608
- loc.column = 0;
14609
- this.generatedCodeLine += 1;
14610
- this.raw[this.generatedCodeLine] = this.rawSegments = [];
14611
- this.generatedCodeColumn = 0;
14612
- first = true;
14613
- } else {
14614
- loc.column += 1;
14615
- this.generatedCodeColumn += 1;
14616
- first = false;
14617
- }
14618
-
14619
- originalCharIndex += 1;
14620
- }
14621
-
14622
- this.pending = null;
14623
- }
14624
-
14625
- advance(str) {
14626
- if (!str) return;
14627
-
14628
- const lines = str.split('\n');
14629
-
14630
- if (lines.length > 1) {
14631
- for (let i = 0; i < lines.length - 1; i++) {
14632
- this.generatedCodeLine++;
14633
- this.raw[this.generatedCodeLine] = this.rawSegments = [];
14634
- }
14635
- this.generatedCodeColumn = 0;
14636
- }
14637
-
14638
- this.generatedCodeColumn += lines[lines.length - 1].length;
14639
- }
14640
- }
14641
-
14642
- const n = '\n';
14643
-
14644
- const warned = {
14645
- insertLeft: false,
14646
- insertRight: false,
14647
- storeName: false,
14648
- };
14649
-
14650
- class MagicString {
14651
- constructor(string, options = {}) {
14652
- const chunk = new Chunk(0, string.length, string);
14653
-
14654
- Object.defineProperties(this, {
14655
- original: { writable: true, value: string },
14656
- outro: { writable: true, value: '' },
14657
- intro: { writable: true, value: '' },
14658
- firstChunk: { writable: true, value: chunk },
14659
- lastChunk: { writable: true, value: chunk },
14660
- lastSearchedChunk: { writable: true, value: chunk },
14661
- byStart: { writable: true, value: {} },
14662
- byEnd: { writable: true, value: {} },
14663
- filename: { writable: true, value: options.filename },
14664
- indentExclusionRanges: { writable: true, value: options.indentExclusionRanges },
14665
- sourcemapLocations: { writable: true, value: new BitSet() },
14666
- storedNames: { writable: true, value: {} },
14667
- indentStr: { writable: true, value: undefined },
14668
- });
14669
-
14670
- this.byStart[0] = chunk;
14671
- this.byEnd[string.length] = chunk;
14672
- }
14673
-
14674
- addSourcemapLocation(char) {
14675
- this.sourcemapLocations.add(char);
14676
- }
14677
-
14678
- append(content) {
14679
- if (typeof content !== 'string') throw new TypeError('outro content must be a string');
14680
-
14681
- this.outro += content;
14682
- return this;
14683
- }
14684
-
14685
- appendLeft(index, content) {
14686
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
14687
-
14688
- this._split(index);
14689
-
14690
- const chunk = this.byEnd[index];
14691
-
14692
- if (chunk) {
14693
- chunk.appendLeft(content);
14694
- } else {
14695
- this.intro += content;
14696
- }
14697
- return this;
14698
- }
14699
-
14700
- appendRight(index, content) {
14701
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
14702
-
14703
- this._split(index);
14704
-
14705
- const chunk = this.byStart[index];
14706
-
14707
- if (chunk) {
14708
- chunk.appendRight(content);
14709
- } else {
14710
- this.outro += content;
14711
- }
14712
- return this;
14713
- }
14714
-
14715
- clone() {
14716
- const cloned = new MagicString(this.original, { filename: this.filename });
14717
-
14718
- let originalChunk = this.firstChunk;
14719
- let clonedChunk = (cloned.firstChunk = cloned.lastSearchedChunk = originalChunk.clone());
14720
-
14721
- while (originalChunk) {
14722
- cloned.byStart[clonedChunk.start] = clonedChunk;
14723
- cloned.byEnd[clonedChunk.end] = clonedChunk;
14724
-
14725
- const nextOriginalChunk = originalChunk.next;
14726
- const nextClonedChunk = nextOriginalChunk && nextOriginalChunk.clone();
14727
-
14728
- if (nextClonedChunk) {
14729
- clonedChunk.next = nextClonedChunk;
14730
- nextClonedChunk.previous = clonedChunk;
14731
-
14732
- clonedChunk = nextClonedChunk;
14733
- }
14734
-
14735
- originalChunk = nextOriginalChunk;
14736
- }
14737
-
14738
- cloned.lastChunk = clonedChunk;
14739
-
14740
- if (this.indentExclusionRanges) {
14741
- cloned.indentExclusionRanges = this.indentExclusionRanges.slice();
14742
- }
14743
-
14744
- cloned.sourcemapLocations = new BitSet(this.sourcemapLocations);
14745
-
14746
- cloned.intro = this.intro;
14747
- cloned.outro = this.outro;
14748
-
14749
- return cloned;
14750
- }
14751
-
14752
- generateDecodedMap(options) {
14753
- options = options || {};
14754
-
14755
- const sourceIndex = 0;
14756
- const names = Object.keys(this.storedNames);
14757
- const mappings = new Mappings(options.hires);
14758
-
14759
- const locate = getLocator(this.original);
14760
-
14761
- if (this.intro) {
14762
- mappings.advance(this.intro);
14763
- }
14764
-
14765
- this.firstChunk.eachNext((chunk) => {
14766
- const loc = locate(chunk.start);
14767
-
14768
- if (chunk.intro.length) mappings.advance(chunk.intro);
14769
-
14770
- if (chunk.edited) {
14771
- mappings.addEdit(
14772
- sourceIndex,
14773
- chunk.content,
14774
- loc,
14775
- chunk.storeName ? names.indexOf(chunk.original) : -1
14776
- );
14777
- } else {
14778
- mappings.addUneditedChunk(sourceIndex, chunk, this.original, loc, this.sourcemapLocations);
14779
- }
14780
-
14781
- if (chunk.outro.length) mappings.advance(chunk.outro);
14782
- });
14783
-
14784
- return {
14785
- file: options.file ? options.file.split(/[/\\]/).pop() : null,
14786
- sources: [options.source ? getRelativePath(options.file || '', options.source) : null],
14787
- sourcesContent: options.includeContent ? [this.original] : [null],
14788
- names,
14789
- mappings: mappings.raw,
14790
- };
14791
- }
14792
-
14793
- generateMap(options) {
14794
- return new SourceMap(this.generateDecodedMap(options));
14795
- }
14796
-
14797
- _ensureindentStr() {
14798
- if (this.indentStr === undefined) {
14799
- this.indentStr = guessIndent(this.original);
14800
- }
14801
- }
14802
-
14803
- _getRawIndentString() {
14804
- this._ensureindentStr();
14805
- return this.indentStr;
14806
- }
14807
-
14808
- getIndentString() {
14809
- this._ensureindentStr();
14810
- return this.indentStr === null ? '\t' : this.indentStr;
14811
- }
14812
-
14813
- indent(indentStr, options) {
14814
- const pattern = /^[^\r\n]/gm;
14815
-
14816
- if (isObject$1(indentStr)) {
14817
- options = indentStr;
14818
- indentStr = undefined;
14819
- }
14820
-
14821
- if (indentStr === undefined) {
14822
- this._ensureindentStr();
14823
- indentStr = this.indentStr || '\t';
14824
- }
14825
-
14826
- if (indentStr === '') return this; // noop
14827
-
14828
- options = options || {};
14829
-
14830
- // Process exclusion ranges
14831
- const isExcluded = {};
14832
-
14833
- if (options.exclude) {
14834
- const exclusions =
14835
- typeof options.exclude[0] === 'number' ? [options.exclude] : options.exclude;
14836
- exclusions.forEach((exclusion) => {
14837
- for (let i = exclusion[0]; i < exclusion[1]; i += 1) {
14838
- isExcluded[i] = true;
14839
- }
14840
- });
14841
- }
14842
-
14843
- let shouldIndentNextCharacter = options.indentStart !== false;
14844
- const replacer = (match) => {
14845
- if (shouldIndentNextCharacter) return `${indentStr}${match}`;
14846
- shouldIndentNextCharacter = true;
14847
- return match;
14848
- };
14849
-
14850
- this.intro = this.intro.replace(pattern, replacer);
14851
-
14852
- let charIndex = 0;
14853
- let chunk = this.firstChunk;
14854
-
14855
- while (chunk) {
14856
- const end = chunk.end;
14857
-
14858
- if (chunk.edited) {
14859
- if (!isExcluded[charIndex]) {
14860
- chunk.content = chunk.content.replace(pattern, replacer);
14861
-
14862
- if (chunk.content.length) {
14863
- shouldIndentNextCharacter = chunk.content[chunk.content.length - 1] === '\n';
14864
- }
14865
- }
14866
- } else {
14867
- charIndex = chunk.start;
14868
-
14869
- while (charIndex < end) {
14870
- if (!isExcluded[charIndex]) {
14871
- const char = this.original[charIndex];
14872
-
14873
- if (char === '\n') {
14874
- shouldIndentNextCharacter = true;
14875
- } else if (char !== '\r' && shouldIndentNextCharacter) {
14876
- shouldIndentNextCharacter = false;
14877
-
14878
- if (charIndex === chunk.start) {
14879
- chunk.prependRight(indentStr);
14880
- } else {
14881
- this._splitChunk(chunk, charIndex);
14882
- chunk = chunk.next;
14883
- chunk.prependRight(indentStr);
14884
- }
14885
- }
14886
- }
14887
-
14888
- charIndex += 1;
14889
- }
14890
- }
14891
-
14892
- charIndex = chunk.end;
14893
- chunk = chunk.next;
14894
- }
14895
-
14896
- this.outro = this.outro.replace(pattern, replacer);
14897
-
14898
- return this;
14899
- }
14900
-
14901
- insert() {
14902
- throw new Error(
14903
- 'magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)'
14904
- );
14905
- }
14906
-
14907
- insertLeft(index, content) {
14908
- if (!warned.insertLeft) {
14909
- console.warn(
14910
- 'magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead'
14911
- ); // eslint-disable-line no-console
14912
- warned.insertLeft = true;
14913
- }
14914
-
14915
- return this.appendLeft(index, content);
14916
- }
14917
-
14918
- insertRight(index, content) {
14919
- if (!warned.insertRight) {
14920
- console.warn(
14921
- 'magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead'
14922
- ); // eslint-disable-line no-console
14923
- warned.insertRight = true;
14924
- }
14925
-
14926
- return this.prependRight(index, content);
14927
- }
14928
-
14929
- move(start, end, index) {
14930
- if (index >= start && index <= end) throw new Error('Cannot move a selection inside itself');
14931
-
14932
- this._split(start);
14933
- this._split(end);
14934
- this._split(index);
14935
-
14936
- const first = this.byStart[start];
14937
- const last = this.byEnd[end];
14938
-
14939
- const oldLeft = first.previous;
14940
- const oldRight = last.next;
14941
-
14942
- const newRight = this.byStart[index];
14943
- if (!newRight && last === this.lastChunk) return this;
14944
- const newLeft = newRight ? newRight.previous : this.lastChunk;
14945
-
14946
- if (oldLeft) oldLeft.next = oldRight;
14947
- if (oldRight) oldRight.previous = oldLeft;
14948
-
14949
- if (newLeft) newLeft.next = first;
14950
- if (newRight) newRight.previous = last;
14951
-
14952
- if (!first.previous) this.firstChunk = last.next;
14953
- if (!last.next) {
14954
- this.lastChunk = first.previous;
14955
- this.lastChunk.next = null;
14956
- }
14957
-
14958
- first.previous = newLeft;
14959
- last.next = newRight || null;
14960
-
14961
- if (!newLeft) this.firstChunk = first;
14962
- if (!newRight) this.lastChunk = last;
14963
- return this;
14964
- }
14965
-
14966
- overwrite(start, end, content, options) {
14967
- options = options || {};
14968
- return this.update(start, end, content, { ...options, overwrite: !options.contentOnly });
14969
- }
14970
-
14971
- update(start, end, content, options) {
14972
- if (typeof content !== 'string') throw new TypeError('replacement content must be a string');
14973
-
14974
- while (start < 0) start += this.original.length;
14975
- while (end < 0) end += this.original.length;
14976
-
14977
- if (end > this.original.length) throw new Error('end is out of bounds');
14978
- if (start === end)
14979
- throw new Error(
14980
- 'Cannot overwrite a zero-length range – use appendLeft or prependRight instead'
14981
- );
14982
-
14983
- this._split(start);
14984
- this._split(end);
14985
-
14986
- if (options === true) {
14987
- if (!warned.storeName) {
14988
- console.warn(
14989
- 'The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string'
14990
- ); // eslint-disable-line no-console
14991
- warned.storeName = true;
14992
- }
14993
-
14994
- options = { storeName: true };
14995
- }
14996
- const storeName = options !== undefined ? options.storeName : false;
14997
- const overwrite = options !== undefined ? options.overwrite : false;
14998
-
14999
- if (storeName) {
15000
- const original = this.original.slice(start, end);
15001
- Object.defineProperty(this.storedNames, original, {
15002
- writable: true,
15003
- value: true,
15004
- enumerable: true,
15005
- });
15006
- }
15007
-
15008
- const first = this.byStart[start];
15009
- const last = this.byEnd[end];
15010
-
15011
- if (first) {
15012
- let chunk = first;
15013
- while (chunk !== last) {
15014
- if (chunk.next !== this.byStart[chunk.end]) {
15015
- throw new Error('Cannot overwrite across a split point');
15016
- }
15017
- chunk = chunk.next;
15018
- chunk.edit('', false);
15019
- }
15020
-
15021
- first.edit(content, storeName, !overwrite);
15022
- } else {
15023
- // must be inserting at the end
15024
- const newChunk = new Chunk(start, end, '').edit(content, storeName);
15025
-
15026
- // TODO last chunk in the array may not be the last chunk, if it's moved...
15027
- last.next = newChunk;
15028
- newChunk.previous = last;
15029
- }
15030
- return this;
15031
- }
15032
-
15033
- prepend(content) {
15034
- if (typeof content !== 'string') throw new TypeError('outro content must be a string');
15035
-
15036
- this.intro = content + this.intro;
15037
- return this;
15038
- }
15039
-
15040
- prependLeft(index, content) {
15041
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
15042
-
15043
- this._split(index);
15044
-
15045
- const chunk = this.byEnd[index];
15046
-
15047
- if (chunk) {
15048
- chunk.prependLeft(content);
15049
- } else {
15050
- this.intro = content + this.intro;
15051
- }
15052
- return this;
15053
- }
15054
-
15055
- prependRight(index, content) {
15056
- if (typeof content !== 'string') throw new TypeError('inserted content must be a string');
15057
-
15058
- this._split(index);
15059
-
15060
- const chunk = this.byStart[index];
15061
-
15062
- if (chunk) {
15063
- chunk.prependRight(content);
15064
- } else {
15065
- this.outro = content + this.outro;
15066
- }
15067
- return this;
15068
- }
15069
-
15070
- remove(start, end) {
15071
- while (start < 0) start += this.original.length;
15072
- while (end < 0) end += this.original.length;
15073
-
15074
- if (start === end) return this;
15075
-
15076
- if (start < 0 || end > this.original.length) throw new Error('Character is out of bounds');
15077
- if (start > end) throw new Error('end must be greater than start');
15078
-
15079
- this._split(start);
15080
- this._split(end);
15081
-
15082
- let chunk = this.byStart[start];
15083
-
15084
- while (chunk) {
15085
- chunk.intro = '';
15086
- chunk.outro = '';
15087
- chunk.edit('');
15088
-
15089
- chunk = end > chunk.end ? this.byStart[chunk.end] : null;
15090
- }
15091
- return this;
15092
- }
15093
-
15094
- lastChar() {
15095
- if (this.outro.length) return this.outro[this.outro.length - 1];
15096
- let chunk = this.lastChunk;
15097
- do {
15098
- if (chunk.outro.length) return chunk.outro[chunk.outro.length - 1];
15099
- if (chunk.content.length) return chunk.content[chunk.content.length - 1];
15100
- if (chunk.intro.length) return chunk.intro[chunk.intro.length - 1];
15101
- } while ((chunk = chunk.previous));
15102
- if (this.intro.length) return this.intro[this.intro.length - 1];
15103
- return '';
15104
- }
15105
-
15106
- lastLine() {
15107
- let lineIndex = this.outro.lastIndexOf(n);
15108
- if (lineIndex !== -1) return this.outro.substr(lineIndex + 1);
15109
- let lineStr = this.outro;
15110
- let chunk = this.lastChunk;
15111
- do {
15112
- if (chunk.outro.length > 0) {
15113
- lineIndex = chunk.outro.lastIndexOf(n);
15114
- if (lineIndex !== -1) return chunk.outro.substr(lineIndex + 1) + lineStr;
15115
- lineStr = chunk.outro + lineStr;
15116
- }
15117
-
15118
- if (chunk.content.length > 0) {
15119
- lineIndex = chunk.content.lastIndexOf(n);
15120
- if (lineIndex !== -1) return chunk.content.substr(lineIndex + 1) + lineStr;
15121
- lineStr = chunk.content + lineStr;
15122
- }
15123
-
15124
- if (chunk.intro.length > 0) {
15125
- lineIndex = chunk.intro.lastIndexOf(n);
15126
- if (lineIndex !== -1) return chunk.intro.substr(lineIndex + 1) + lineStr;
15127
- lineStr = chunk.intro + lineStr;
15128
- }
15129
- } while ((chunk = chunk.previous));
15130
- lineIndex = this.intro.lastIndexOf(n);
15131
- if (lineIndex !== -1) return this.intro.substr(lineIndex + 1) + lineStr;
15132
- return this.intro + lineStr;
15133
- }
15134
-
15135
- slice(start = 0, end = this.original.length) {
15136
- while (start < 0) start += this.original.length;
15137
- while (end < 0) end += this.original.length;
15138
-
15139
- let result = '';
15140
-
15141
- // find start chunk
15142
- let chunk = this.firstChunk;
15143
- while (chunk && (chunk.start > start || chunk.end <= start)) {
15144
- // found end chunk before start
15145
- if (chunk.start < end && chunk.end >= end) {
15146
- return result;
15147
- }
15148
-
15149
- chunk = chunk.next;
15150
- }
15151
-
15152
- if (chunk && chunk.edited && chunk.start !== start)
15153
- throw new Error(`Cannot use replaced character ${start} as slice start anchor.`);
15154
-
15155
- const startChunk = chunk;
15156
- while (chunk) {
15157
- if (chunk.intro && (startChunk !== chunk || chunk.start === start)) {
15158
- result += chunk.intro;
15159
- }
15160
-
15161
- const containsEnd = chunk.start < end && chunk.end >= end;
15162
- if (containsEnd && chunk.edited && chunk.end !== end)
15163
- throw new Error(`Cannot use replaced character ${end} as slice end anchor.`);
15164
-
15165
- const sliceStart = startChunk === chunk ? start - chunk.start : 0;
15166
- const sliceEnd = containsEnd ? chunk.content.length + end - chunk.end : chunk.content.length;
15167
-
15168
- result += chunk.content.slice(sliceStart, sliceEnd);
15169
-
15170
- if (chunk.outro && (!containsEnd || chunk.end === end)) {
15171
- result += chunk.outro;
15172
- }
15173
-
15174
- if (containsEnd) {
15175
- break;
15176
- }
15177
-
15178
- chunk = chunk.next;
15179
- }
15180
-
15181
- return result;
15182
- }
15183
-
15184
- // TODO deprecate this? not really very useful
15185
- snip(start, end) {
15186
- const clone = this.clone();
15187
- clone.remove(0, start);
15188
- clone.remove(end, clone.original.length);
15189
-
15190
- return clone;
15191
- }
15192
-
15193
- _split(index) {
15194
- if (this.byStart[index] || this.byEnd[index]) return;
15195
-
15196
- let chunk = this.lastSearchedChunk;
15197
- const searchForward = index > chunk.end;
15198
-
15199
- while (chunk) {
15200
- if (chunk.contains(index)) return this._splitChunk(chunk, index);
15201
-
15202
- chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
15203
- }
15204
- }
15205
-
15206
- _splitChunk(chunk, index) {
15207
- if (chunk.edited && chunk.content.length) {
15208
- // zero-length edited chunks are a special case (overlapping replacements)
15209
- const loc = getLocator(this.original)(index);
15210
- throw new Error(
15211
- `Cannot split a chunk that has already been edited (${loc.line}:${loc.column} – "${chunk.original}")`
15212
- );
15213
- }
15214
-
15215
- const newChunk = chunk.split(index);
15216
-
15217
- this.byEnd[index] = chunk;
15218
- this.byStart[index] = newChunk;
15219
- this.byEnd[newChunk.end] = newChunk;
15220
-
15221
- if (chunk === this.lastChunk) this.lastChunk = newChunk;
15222
-
15223
- this.lastSearchedChunk = chunk;
15224
- return true;
15225
- }
15226
-
15227
- toString() {
15228
- let str = this.intro;
15229
-
15230
- let chunk = this.firstChunk;
15231
- while (chunk) {
15232
- str += chunk.toString();
15233
- chunk = chunk.next;
15234
- }
15235
-
15236
- return str + this.outro;
15237
- }
15238
-
15239
- isEmpty() {
15240
- let chunk = this.firstChunk;
15241
- do {
15242
- if (
15243
- (chunk.intro.length && chunk.intro.trim()) ||
15244
- (chunk.content.length && chunk.content.trim()) ||
15245
- (chunk.outro.length && chunk.outro.trim())
15246
- )
15247
- return false;
15248
- } while ((chunk = chunk.next));
15249
- return true;
15250
- }
15251
-
15252
- length() {
15253
- let chunk = this.firstChunk;
15254
- let length = 0;
15255
- do {
15256
- length += chunk.intro.length + chunk.content.length + chunk.outro.length;
15257
- } while ((chunk = chunk.next));
15258
- return length;
15259
- }
15260
-
15261
- trimLines() {
15262
- return this.trim('[\\r\\n]');
15263
- }
15264
-
15265
- trim(charType) {
15266
- return this.trimStart(charType).trimEnd(charType);
15267
- }
15268
-
15269
- trimEndAborted(charType) {
15270
- const rx = new RegExp((charType || '\\s') + '+$');
15271
-
15272
- this.outro = this.outro.replace(rx, '');
15273
- if (this.outro.length) return true;
15274
-
15275
- let chunk = this.lastChunk;
15276
-
15277
- do {
15278
- const end = chunk.end;
15279
- const aborted = chunk.trimEnd(rx);
15280
-
15281
- // if chunk was trimmed, we have a new lastChunk
15282
- if (chunk.end !== end) {
15283
- if (this.lastChunk === chunk) {
15284
- this.lastChunk = chunk.next;
15285
- }
15286
-
15287
- this.byEnd[chunk.end] = chunk;
15288
- this.byStart[chunk.next.start] = chunk.next;
15289
- this.byEnd[chunk.next.end] = chunk.next;
15290
- }
15291
-
15292
- if (aborted) return true;
15293
- chunk = chunk.previous;
15294
- } while (chunk);
15295
-
15296
- return false;
15297
- }
15298
-
15299
- trimEnd(charType) {
15300
- this.trimEndAborted(charType);
15301
- return this;
15302
- }
15303
- trimStartAborted(charType) {
15304
- const rx = new RegExp('^' + (charType || '\\s') + '+');
15305
-
15306
- this.intro = this.intro.replace(rx, '');
15307
- if (this.intro.length) return true;
15308
-
15309
- let chunk = this.firstChunk;
15310
-
15311
- do {
15312
- const end = chunk.end;
15313
- const aborted = chunk.trimStart(rx);
15314
-
15315
- if (chunk.end !== end) {
15316
- // special case...
15317
- if (chunk === this.lastChunk) this.lastChunk = chunk.next;
15318
-
15319
- this.byEnd[chunk.end] = chunk;
15320
- this.byStart[chunk.next.start] = chunk.next;
15321
- this.byEnd[chunk.next.end] = chunk.next;
15322
- }
15323
-
15324
- if (aborted) return true;
15325
- chunk = chunk.next;
15326
- } while (chunk);
15327
-
15328
- return false;
15329
- }
15330
-
15331
- trimStart(charType) {
15332
- this.trimStartAborted(charType);
15333
- return this;
15334
- }
15335
-
15336
- hasChanged() {
15337
- return this.original !== this.toString();
15338
- }
15339
-
15340
- _replaceRegexp(searchValue, replacement) {
15341
- function getReplacement(match, str) {
15342
- if (typeof replacement === 'string') {
15343
- return replacement.replace(/\$(\$|&|\d+)/g, (_, i) => {
15344
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#specifying_a_string_as_a_parameter
15345
- if (i === '$') return '$';
15346
- if (i === '&') return match[0];
15347
- const num = +i;
15348
- if (num < match.length) return match[+i];
15349
- return `$${i}`;
15350
- });
15351
- } else {
15352
- return replacement(...match, match.index, str, match.groups);
15353
- }
15354
- }
15355
- function matchAll(re, str) {
15356
- let match;
15357
- const matches = [];
15358
- while ((match = re.exec(str))) {
15359
- matches.push(match);
15360
- }
15361
- return matches;
15362
- }
15363
- if (searchValue.global) {
15364
- const matches = matchAll(searchValue, this.original);
15365
- matches.forEach((match) => {
15366
- if (match.index != null)
15367
- this.overwrite(
15368
- match.index,
15369
- match.index + match[0].length,
15370
- getReplacement(match, this.original)
15371
- );
15372
- });
15373
- } else {
15374
- const match = this.original.match(searchValue);
15375
- if (match && match.index != null)
15376
- this.overwrite(
15377
- match.index,
15378
- match.index + match[0].length,
15379
- getReplacement(match, this.original)
15380
- );
15381
- }
15382
- return this;
15383
- }
15384
-
15385
- _replaceString(string, replacement) {
15386
- const { original } = this;
15387
- const index = original.indexOf(string);
15388
-
15389
- if (index !== -1) {
15390
- this.overwrite(index, index + string.length, replacement);
15391
- }
15392
-
15393
- return this;
15394
- }
15395
-
15396
- replace(searchValue, replacement) {
15397
- if (typeof searchValue === 'string') {
15398
- return this._replaceString(searchValue, replacement);
15399
- }
15400
-
15401
- return this._replaceRegexp(searchValue, replacement);
15402
- }
15403
-
15404
- _replaceAllString(string, replacement) {
15405
- const { original } = this;
15406
- const stringLength = string.length;
15407
- for (
15408
- let index = original.indexOf(string);
15409
- index !== -1;
15410
- index = original.indexOf(string, index + stringLength)
15411
- ) {
15412
- this.overwrite(index, index + stringLength, replacement);
15413
- }
15414
-
15415
- return this;
15416
- }
13800
+ `;
13801
+ }
15417
13802
 
15418
- replaceAll(searchValue, replacement) {
15419
- if (typeof searchValue === 'string') {
15420
- return this._replaceAllString(searchValue, replacement);
15421
- }
13803
+ let terserPath;
13804
+ const loadTerserPath = (root) => {
13805
+ if (terserPath)
13806
+ return terserPath;
13807
+ try {
13808
+ terserPath = requireResolveFromRootWithFallback(root, 'terser');
13809
+ }
13810
+ catch (e) {
13811
+ if (e.code === 'MODULE_NOT_FOUND') {
13812
+ throw new Error('terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.');
13813
+ }
13814
+ else {
13815
+ const message = new Error(`terser failed to load:\n${e.message}`);
13816
+ message.stack = e.stack + '\n' + message.stack;
13817
+ throw message;
13818
+ }
13819
+ }
13820
+ return terserPath;
13821
+ };
13822
+ function terserPlugin(config) {
13823
+ const makeWorker = () => new Worker_1(async (terserPath, code, options) => {
13824
+ // test fails when using `import`. maybe related: https://github.com/nodejs/node/issues/43205
13825
+ // eslint-disable-next-line no-restricted-globals -- this function runs inside cjs
13826
+ const terser = require(terserPath);
13827
+ return terser.minify(code, options);
13828
+ });
13829
+ let worker;
13830
+ return {
13831
+ name: 'vite:terser',
13832
+ async renderChunk(code, _chunk, outputOptions) {
13833
+ // This plugin is included for any non-false value of config.build.minify,
13834
+ // so that normal chunks can use the preferred minifier, and legacy chunks
13835
+ // can use terser.
13836
+ if (config.build.minify !== 'terser' &&
13837
+ // @ts-expect-error injected by @vitejs/plugin-legacy
13838
+ !outputOptions.__vite_force_terser__) {
13839
+ return null;
13840
+ }
13841
+ // Do not minify ES lib output since that would remove pure annotations
13842
+ // and break tree-shaking.
13843
+ if (config.build.lib && outputOptions.format === 'es') {
13844
+ return null;
13845
+ }
13846
+ // Lazy load worker.
13847
+ worker || (worker = makeWorker());
13848
+ const terserPath = loadTerserPath(config.root);
13849
+ const res = await worker.run(terserPath, code, {
13850
+ safari10: true,
13851
+ ...config.build.terserOptions,
13852
+ sourceMap: !!outputOptions.sourcemap,
13853
+ module: outputOptions.format.startsWith('es'),
13854
+ toplevel: outputOptions.format === 'cjs',
13855
+ });
13856
+ return {
13857
+ code: res.code,
13858
+ map: res.map,
13859
+ };
13860
+ },
13861
+ closeBundle() {
13862
+ worker?.stop();
13863
+ },
13864
+ };
13865
+ }
15422
13866
 
15423
- if (!searchValue.global) {
15424
- throw new TypeError(
15425
- 'MagicString.prototype.replaceAll called with a non-global RegExp argument'
15426
- );
15427
- }
13867
+ const mimes$1 = {
13868
+ "ez": "application/andrew-inset",
13869
+ "aw": "application/applixware",
13870
+ "atom": "application/atom+xml",
13871
+ "atomcat": "application/atomcat+xml",
13872
+ "atomdeleted": "application/atomdeleted+xml",
13873
+ "atomsvc": "application/atomsvc+xml",
13874
+ "dwd": "application/atsc-dwd+xml",
13875
+ "held": "application/atsc-held+xml",
13876
+ "rsat": "application/atsc-rsat+xml",
13877
+ "bdoc": "application/bdoc",
13878
+ "xcs": "application/calendar+xml",
13879
+ "ccxml": "application/ccxml+xml",
13880
+ "cdfx": "application/cdfx+xml",
13881
+ "cdmia": "application/cdmi-capability",
13882
+ "cdmic": "application/cdmi-container",
13883
+ "cdmid": "application/cdmi-domain",
13884
+ "cdmio": "application/cdmi-object",
13885
+ "cdmiq": "application/cdmi-queue",
13886
+ "cu": "application/cu-seeme",
13887
+ "mpd": "application/dash+xml",
13888
+ "davmount": "application/davmount+xml",
13889
+ "dbk": "application/docbook+xml",
13890
+ "dssc": "application/dssc+der",
13891
+ "xdssc": "application/dssc+xml",
13892
+ "es": "application/ecmascript",
13893
+ "ecma": "application/ecmascript",
13894
+ "emma": "application/emma+xml",
13895
+ "emotionml": "application/emotionml+xml",
13896
+ "epub": "application/epub+zip",
13897
+ "exi": "application/exi",
13898
+ "fdt": "application/fdt+xml",
13899
+ "pfr": "application/font-tdpfr",
13900
+ "geojson": "application/geo+json",
13901
+ "gml": "application/gml+xml",
13902
+ "gpx": "application/gpx+xml",
13903
+ "gxf": "application/gxf",
13904
+ "gz": "application/gzip",
13905
+ "hjson": "application/hjson",
13906
+ "stk": "application/hyperstudio",
13907
+ "ink": "application/inkml+xml",
13908
+ "inkml": "application/inkml+xml",
13909
+ "ipfix": "application/ipfix",
13910
+ "its": "application/its+xml",
13911
+ "jar": "application/java-archive",
13912
+ "war": "application/java-archive",
13913
+ "ear": "application/java-archive",
13914
+ "ser": "application/java-serialized-object",
13915
+ "class": "application/java-vm",
13916
+ "js": "application/javascript",
13917
+ "mjs": "application/javascript",
13918
+ "json": "application/json",
13919
+ "map": "application/json",
13920
+ "json5": "application/json5",
13921
+ "jsonml": "application/jsonml+json",
13922
+ "jsonld": "application/ld+json",
13923
+ "lgr": "application/lgr+xml",
13924
+ "lostxml": "application/lost+xml",
13925
+ "hqx": "application/mac-binhex40",
13926
+ "cpt": "application/mac-compactpro",
13927
+ "mads": "application/mads+xml",
13928
+ "webmanifest": "application/manifest+json",
13929
+ "mrc": "application/marc",
13930
+ "mrcx": "application/marcxml+xml",
13931
+ "ma": "application/mathematica",
13932
+ "nb": "application/mathematica",
13933
+ "mb": "application/mathematica",
13934
+ "mathml": "application/mathml+xml",
13935
+ "mbox": "application/mbox",
13936
+ "mscml": "application/mediaservercontrol+xml",
13937
+ "metalink": "application/metalink+xml",
13938
+ "meta4": "application/metalink4+xml",
13939
+ "mets": "application/mets+xml",
13940
+ "maei": "application/mmt-aei+xml",
13941
+ "musd": "application/mmt-usd+xml",
13942
+ "mods": "application/mods+xml",
13943
+ "m21": "application/mp21",
13944
+ "mp21": "application/mp21",
13945
+ "mp4s": "application/mp4",
13946
+ "m4p": "application/mp4",
13947
+ "doc": "application/msword",
13948
+ "dot": "application/msword",
13949
+ "mxf": "application/mxf",
13950
+ "nq": "application/n-quads",
13951
+ "nt": "application/n-triples",
13952
+ "cjs": "application/node",
13953
+ "bin": "application/octet-stream",
13954
+ "dms": "application/octet-stream",
13955
+ "lrf": "application/octet-stream",
13956
+ "mar": "application/octet-stream",
13957
+ "so": "application/octet-stream",
13958
+ "dist": "application/octet-stream",
13959
+ "distz": "application/octet-stream",
13960
+ "pkg": "application/octet-stream",
13961
+ "bpk": "application/octet-stream",
13962
+ "dump": "application/octet-stream",
13963
+ "elc": "application/octet-stream",
13964
+ "deploy": "application/octet-stream",
13965
+ "exe": "application/octet-stream",
13966
+ "dll": "application/octet-stream",
13967
+ "deb": "application/octet-stream",
13968
+ "dmg": "application/octet-stream",
13969
+ "iso": "application/octet-stream",
13970
+ "img": "application/octet-stream",
13971
+ "msi": "application/octet-stream",
13972
+ "msp": "application/octet-stream",
13973
+ "msm": "application/octet-stream",
13974
+ "buffer": "application/octet-stream",
13975
+ "oda": "application/oda",
13976
+ "opf": "application/oebps-package+xml",
13977
+ "ogx": "application/ogg",
13978
+ "omdoc": "application/omdoc+xml",
13979
+ "onetoc": "application/onenote",
13980
+ "onetoc2": "application/onenote",
13981
+ "onetmp": "application/onenote",
13982
+ "onepkg": "application/onenote",
13983
+ "oxps": "application/oxps",
13984
+ "relo": "application/p2p-overlay+xml",
13985
+ "xer": "application/patch-ops-error+xml",
13986
+ "pdf": "application/pdf",
13987
+ "pgp": "application/pgp-encrypted",
13988
+ "asc": "application/pgp-signature",
13989
+ "sig": "application/pgp-signature",
13990
+ "prf": "application/pics-rules",
13991
+ "p10": "application/pkcs10",
13992
+ "p7m": "application/pkcs7-mime",
13993
+ "p7c": "application/pkcs7-mime",
13994
+ "p7s": "application/pkcs7-signature",
13995
+ "p8": "application/pkcs8",
13996
+ "ac": "application/pkix-attr-cert",
13997
+ "cer": "application/pkix-cert",
13998
+ "crl": "application/pkix-crl",
13999
+ "pkipath": "application/pkix-pkipath",
14000
+ "pki": "application/pkixcmp",
14001
+ "pls": "application/pls+xml",
14002
+ "ai": "application/postscript",
14003
+ "eps": "application/postscript",
14004
+ "ps": "application/postscript",
14005
+ "provx": "application/provenance+xml",
14006
+ "cww": "application/prs.cww",
14007
+ "pskcxml": "application/pskc+xml",
14008
+ "raml": "application/raml+yaml",
14009
+ "rdf": "application/rdf+xml",
14010
+ "owl": "application/rdf+xml",
14011
+ "rif": "application/reginfo+xml",
14012
+ "rnc": "application/relax-ng-compact-syntax",
14013
+ "rl": "application/resource-lists+xml",
14014
+ "rld": "application/resource-lists-diff+xml",
14015
+ "rs": "application/rls-services+xml",
14016
+ "rapd": "application/route-apd+xml",
14017
+ "sls": "application/route-s-tsid+xml",
14018
+ "rusd": "application/route-usd+xml",
14019
+ "gbr": "application/rpki-ghostbusters",
14020
+ "mft": "application/rpki-manifest",
14021
+ "roa": "application/rpki-roa",
14022
+ "rsd": "application/rsd+xml",
14023
+ "rss": "application/rss+xml",
14024
+ "rtf": "application/rtf",
14025
+ "sbml": "application/sbml+xml",
14026
+ "scq": "application/scvp-cv-request",
14027
+ "scs": "application/scvp-cv-response",
14028
+ "spq": "application/scvp-vp-request",
14029
+ "spp": "application/scvp-vp-response",
14030
+ "sdp": "application/sdp",
14031
+ "senmlx": "application/senml+xml",
14032
+ "sensmlx": "application/sensml+xml",
14033
+ "setpay": "application/set-payment-initiation",
14034
+ "setreg": "application/set-registration-initiation",
14035
+ "shf": "application/shf+xml",
14036
+ "siv": "application/sieve",
14037
+ "sieve": "application/sieve",
14038
+ "smi": "application/smil+xml",
14039
+ "smil": "application/smil+xml",
14040
+ "rq": "application/sparql-query",
14041
+ "srx": "application/sparql-results+xml",
14042
+ "gram": "application/srgs",
14043
+ "grxml": "application/srgs+xml",
14044
+ "sru": "application/sru+xml",
14045
+ "ssdl": "application/ssdl+xml",
14046
+ "ssml": "application/ssml+xml",
14047
+ "swidtag": "application/swid+xml",
14048
+ "tei": "application/tei+xml",
14049
+ "teicorpus": "application/tei+xml",
14050
+ "tfi": "application/thraud+xml",
14051
+ "tsd": "application/timestamped-data",
14052
+ "toml": "application/toml",
14053
+ "trig": "application/trig",
14054
+ "ttml": "application/ttml+xml",
14055
+ "ubj": "application/ubjson",
14056
+ "rsheet": "application/urc-ressheet+xml",
14057
+ "td": "application/urc-targetdesc+xml",
14058
+ "vxml": "application/voicexml+xml",
14059
+ "wasm": "application/wasm",
14060
+ "wgt": "application/widget",
14061
+ "hlp": "application/winhlp",
14062
+ "wsdl": "application/wsdl+xml",
14063
+ "wspolicy": "application/wspolicy+xml",
14064
+ "xaml": "application/xaml+xml",
14065
+ "xav": "application/xcap-att+xml",
14066
+ "xca": "application/xcap-caps+xml",
14067
+ "xdf": "application/xcap-diff+xml",
14068
+ "xel": "application/xcap-el+xml",
14069
+ "xns": "application/xcap-ns+xml",
14070
+ "xenc": "application/xenc+xml",
14071
+ "xhtml": "application/xhtml+xml",
14072
+ "xht": "application/xhtml+xml",
14073
+ "xlf": "application/xliff+xml",
14074
+ "xml": "application/xml",
14075
+ "xsl": "application/xml",
14076
+ "xsd": "application/xml",
14077
+ "rng": "application/xml",
14078
+ "dtd": "application/xml-dtd",
14079
+ "xop": "application/xop+xml",
14080
+ "xpl": "application/xproc+xml",
14081
+ "xslt": "application/xml",
14082
+ "xspf": "application/xspf+xml",
14083
+ "mxml": "application/xv+xml",
14084
+ "xhvml": "application/xv+xml",
14085
+ "xvml": "application/xv+xml",
14086
+ "xvm": "application/xv+xml",
14087
+ "yang": "application/yang",
14088
+ "yin": "application/yin+xml",
14089
+ "zip": "application/zip",
14090
+ "3gpp": "video/3gpp",
14091
+ "adp": "audio/adpcm",
14092
+ "amr": "audio/amr",
14093
+ "au": "audio/basic",
14094
+ "snd": "audio/basic",
14095
+ "mid": "audio/midi",
14096
+ "midi": "audio/midi",
14097
+ "kar": "audio/midi",
14098
+ "rmi": "audio/midi",
14099
+ "mxmf": "audio/mobile-xmf",
14100
+ "mp3": "audio/mpeg",
14101
+ "m4a": "audio/mp4",
14102
+ "mp4a": "audio/mp4",
14103
+ "mpga": "audio/mpeg",
14104
+ "mp2": "audio/mpeg",
14105
+ "mp2a": "audio/mpeg",
14106
+ "m2a": "audio/mpeg",
14107
+ "m3a": "audio/mpeg",
14108
+ "oga": "audio/ogg",
14109
+ "ogg": "audio/ogg",
14110
+ "spx": "audio/ogg",
14111
+ "opus": "audio/ogg",
14112
+ "s3m": "audio/s3m",
14113
+ "sil": "audio/silk",
14114
+ "wav": "audio/wav",
14115
+ "weba": "audio/webm",
14116
+ "xm": "audio/xm",
14117
+ "ttc": "font/collection",
14118
+ "otf": "font/otf",
14119
+ "ttf": "font/ttf",
14120
+ "woff": "font/woff",
14121
+ "woff2": "font/woff2",
14122
+ "exr": "image/aces",
14123
+ "apng": "image/apng",
14124
+ "avif": "image/avif",
14125
+ "bmp": "image/bmp",
14126
+ "cgm": "image/cgm",
14127
+ "drle": "image/dicom-rle",
14128
+ "emf": "image/emf",
14129
+ "fits": "image/fits",
14130
+ "g3": "image/g3fax",
14131
+ "gif": "image/gif",
14132
+ "heic": "image/heic",
14133
+ "heics": "image/heic-sequence",
14134
+ "heif": "image/heif",
14135
+ "heifs": "image/heif-sequence",
14136
+ "hej2": "image/hej2k",
14137
+ "hsj2": "image/hsj2",
14138
+ "ief": "image/ief",
14139
+ "jls": "image/jls",
14140
+ "jp2": "image/jp2",
14141
+ "jpg2": "image/jp2",
14142
+ "jpeg": "image/jpeg",
14143
+ "jpg": "image/jpeg",
14144
+ "jpe": "image/jpeg",
14145
+ "jph": "image/jph",
14146
+ "jhc": "image/jphc",
14147
+ "jpm": "image/jpm",
14148
+ "jpx": "image/jpx",
14149
+ "jpf": "image/jpx",
14150
+ "jxr": "image/jxr",
14151
+ "jxra": "image/jxra",
14152
+ "jxrs": "image/jxrs",
14153
+ "jxs": "image/jxs",
14154
+ "jxsc": "image/jxsc",
14155
+ "jxsi": "image/jxsi",
14156
+ "jxss": "image/jxss",
14157
+ "ktx": "image/ktx",
14158
+ "ktx2": "image/ktx2",
14159
+ "png": "image/png",
14160
+ "btif": "image/prs.btif",
14161
+ "pti": "image/prs.pti",
14162
+ "sgi": "image/sgi",
14163
+ "svg": "image/svg+xml",
14164
+ "svgz": "image/svg+xml",
14165
+ "t38": "image/t38",
14166
+ "tif": "image/tiff",
14167
+ "tiff": "image/tiff",
14168
+ "tfx": "image/tiff-fx",
14169
+ "webp": "image/webp",
14170
+ "wmf": "image/wmf",
14171
+ "disposition-notification": "message/disposition-notification",
14172
+ "u8msg": "message/global",
14173
+ "u8dsn": "message/global-delivery-status",
14174
+ "u8mdn": "message/global-disposition-notification",
14175
+ "u8hdr": "message/global-headers",
14176
+ "eml": "message/rfc822",
14177
+ "mime": "message/rfc822",
14178
+ "3mf": "model/3mf",
14179
+ "gltf": "model/gltf+json",
14180
+ "glb": "model/gltf-binary",
14181
+ "igs": "model/iges",
14182
+ "iges": "model/iges",
14183
+ "msh": "model/mesh",
14184
+ "mesh": "model/mesh",
14185
+ "silo": "model/mesh",
14186
+ "mtl": "model/mtl",
14187
+ "obj": "model/obj",
14188
+ "stpz": "model/step+zip",
14189
+ "stpxz": "model/step-xml+zip",
14190
+ "stl": "model/stl",
14191
+ "wrl": "model/vrml",
14192
+ "vrml": "model/vrml",
14193
+ "x3db": "model/x3d+fastinfoset",
14194
+ "x3dbz": "model/x3d+binary",
14195
+ "x3dv": "model/x3d-vrml",
14196
+ "x3dvz": "model/x3d+vrml",
14197
+ "x3d": "model/x3d+xml",
14198
+ "x3dz": "model/x3d+xml",
14199
+ "appcache": "text/cache-manifest",
14200
+ "manifest": "text/cache-manifest",
14201
+ "ics": "text/calendar",
14202
+ "ifb": "text/calendar",
14203
+ "coffee": "text/coffeescript",
14204
+ "litcoffee": "text/coffeescript",
14205
+ "css": "text/css",
14206
+ "csv": "text/csv",
14207
+ "html": "text/html",
14208
+ "htm": "text/html",
14209
+ "shtml": "text/html",
14210
+ "jade": "text/jade",
14211
+ "jsx": "text/jsx",
14212
+ "less": "text/less",
14213
+ "markdown": "text/markdown",
14214
+ "md": "text/markdown",
14215
+ "mml": "text/mathml",
14216
+ "mdx": "text/mdx",
14217
+ "n3": "text/n3",
14218
+ "txt": "text/plain",
14219
+ "text": "text/plain",
14220
+ "conf": "text/plain",
14221
+ "def": "text/plain",
14222
+ "list": "text/plain",
14223
+ "log": "text/plain",
14224
+ "in": "text/plain",
14225
+ "ini": "text/plain",
14226
+ "dsc": "text/prs.lines.tag",
14227
+ "rtx": "text/richtext",
14228
+ "sgml": "text/sgml",
14229
+ "sgm": "text/sgml",
14230
+ "shex": "text/shex",
14231
+ "slim": "text/slim",
14232
+ "slm": "text/slim",
14233
+ "spdx": "text/spdx",
14234
+ "stylus": "text/stylus",
14235
+ "styl": "text/stylus",
14236
+ "tsv": "text/tab-separated-values",
14237
+ "t": "text/troff",
14238
+ "tr": "text/troff",
14239
+ "roff": "text/troff",
14240
+ "man": "text/troff",
14241
+ "me": "text/troff",
14242
+ "ms": "text/troff",
14243
+ "ttl": "text/turtle",
14244
+ "uri": "text/uri-list",
14245
+ "uris": "text/uri-list",
14246
+ "urls": "text/uri-list",
14247
+ "vcard": "text/vcard",
14248
+ "vtt": "text/vtt",
14249
+ "yaml": "text/yaml",
14250
+ "yml": "text/yaml",
14251
+ "3gp": "video/3gpp",
14252
+ "3g2": "video/3gpp2",
14253
+ "h261": "video/h261",
14254
+ "h263": "video/h263",
14255
+ "h264": "video/h264",
14256
+ "m4s": "video/iso.segment",
14257
+ "jpgv": "video/jpeg",
14258
+ "jpgm": "image/jpm",
14259
+ "mj2": "video/mj2",
14260
+ "mjp2": "video/mj2",
14261
+ "ts": "video/mp2t",
14262
+ "mp4": "video/mp4",
14263
+ "mp4v": "video/mp4",
14264
+ "mpg4": "video/mp4",
14265
+ "mpeg": "video/mpeg",
14266
+ "mpg": "video/mpeg",
14267
+ "mpe": "video/mpeg",
14268
+ "m1v": "video/mpeg",
14269
+ "m2v": "video/mpeg",
14270
+ "ogv": "video/ogg",
14271
+ "qt": "video/quicktime",
14272
+ "mov": "video/quicktime",
14273
+ "webm": "video/webm"
14274
+ };
15428
14275
 
15429
- return this._replaceRegexp(searchValue, replacement);
15430
- }
14276
+ function lookup(extn) {
14277
+ let tmp = ('' + extn).trim().toLowerCase();
14278
+ let idx = tmp.lastIndexOf('.');
14279
+ return mimes$1[!~idx ? tmp : tmp.substring(++idx)];
15431
14280
  }
15432
14281
 
15433
14282
  const assetUrlRE = /__VITE_ASSET__([a-z\d]+)__(?:\$_(.*?)__)?/g;
@@ -15639,7 +14488,7 @@ async function fileToBuiltUrl(id, config, pluginContext, skipPublicCheck = false
15639
14488
  content.length < Number(config.build.assetsInlineLimit) &&
15640
14489
  !isGitLfsPlaceholder(content))) {
15641
14490
  if (config.build.lib && isGitLfsPlaceholder(content)) {
15642
- config.logger.warn(picocolors.exports.yellow(`Inlined file ${id} was not downloaded via Git LFS`));
14491
+ config.logger.warn(picocolorsExports.yellow(`Inlined file ${id} was not downloaded via Git LFS`));
15643
14492
  }
15644
14493
  const mimeType = lookup(file) ?? 'application/octet-stream';
15645
14494
  // base64 inlined as a string
@@ -22374,7 +21223,7 @@ function resolvePlugin(resolveOptions) {
22374
21223
  if (asSrc && id.startsWith(FS_PREFIX)) {
22375
21224
  const fsPath = fsPathFromId(id);
22376
21225
  res = tryFsResolve(fsPath, options);
22377
- isDebug$4 && debug$c(`[@fs] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(res)}`);
21226
+ isDebug$4 && debug$c(`[@fs] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22378
21227
  // always return here even if res doesn't exist since /@fs/ is explicit
22379
21228
  // if the file doesn't exist it should be a 404
22380
21229
  return ensureVersionQuery(res || fsPath);
@@ -22384,7 +21233,7 @@ function resolvePlugin(resolveOptions) {
22384
21233
  if (asSrc && id.startsWith('/')) {
22385
21234
  const fsPath = path$o.resolve(root, id.slice(1));
22386
21235
  if ((res = tryFsResolve(fsPath, options))) {
22387
- isDebug$4 && debug$c(`[url] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(res)}`);
21236
+ isDebug$4 && debug$c(`[url] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22388
21237
  return ensureVersionQuery(res);
22389
21238
  }
22390
21239
  }
@@ -22414,7 +21263,7 @@ function resolvePlugin(resolveOptions) {
22414
21263
  if ((res = tryFsResolve(fsPath, options))) {
22415
21264
  res = ensureVersionQuery(res);
22416
21265
  isDebug$4 &&
22417
- debug$c(`[relative] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(res)}`);
21266
+ debug$c(`[relative] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22418
21267
  const pkg = importer != null && idToPkgMap.get(importer);
22419
21268
  if (pkg) {
22420
21269
  idToPkgMap.set(res, pkg);
@@ -22432,14 +21281,14 @@ function resolvePlugin(resolveOptions) {
22432
21281
  const fsPath = path$o.resolve(basedir, id);
22433
21282
  if ((res = tryFsResolve(fsPath, options))) {
22434
21283
  isDebug$4 &&
22435
- debug$c(`[drive-relative] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(res)}`);
21284
+ debug$c(`[drive-relative] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22436
21285
  return ensureVersionQuery(res);
22437
21286
  }
22438
21287
  }
22439
21288
  // absolute fs paths
22440
21289
  if (isNonDriveRelativeAbsolutePath(id) &&
22441
21290
  (res = tryFsResolve(id, options))) {
22442
- isDebug$4 && debug$c(`[fs] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(res)}`);
21291
+ isDebug$4 && debug$c(`[fs] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
22443
21292
  return ensureVersionQuery(res);
22444
21293
  }
22445
21294
  // external
@@ -22492,7 +21341,7 @@ function resolvePlugin(resolveOptions) {
22492
21341
  else {
22493
21342
  if (!asSrc) {
22494
21343
  debug$c(`externalized node built-in "${id}" to empty module. ` +
22495
- `(imported by: ${picocolors.exports.white(picocolors.exports.dim(importer))})`);
21344
+ `(imported by: ${picocolorsExports.white(picocolorsExports.dim(importer))})`);
22496
21345
  }
22497
21346
  return isProduction
22498
21347
  ? browserExternalId
@@ -22500,7 +21349,7 @@ function resolvePlugin(resolveOptions) {
22500
21349
  }
22501
21350
  }
22502
21351
  }
22503
- isDebug$4 && debug$c(`[fallthrough] ${picocolors.exports.dim(id)}`);
21352
+ isDebug$4 && debug$c(`[fallthrough] ${picocolorsExports.dim(id)}`);
22504
21353
  },
22505
21354
  load(id) {
22506
21355
  if (id.startsWith(browserExternalId)) {
@@ -22744,7 +21593,7 @@ function tryNodeResolve(id, importer, options, targetWeb, depsOptimizer, ssr, ex
22744
21593
  if (!pkg?.data.exports && path$o.extname(id) !== resolvedExt) {
22745
21594
  resolvedId = resolved.id.slice(resolved.id.indexOf(id));
22746
21595
  isDebug$4 &&
22747
- debug$c(`[processResult] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(resolvedId)}`);
21596
+ debug$c(`[processResult] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(resolvedId)}`);
22748
21597
  }
22749
21598
  }
22750
21599
  return { ...resolved, id: resolvedId, external: true };
@@ -22895,7 +21744,7 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
22895
21744
  // https://github.com/defunctzombie/package-browser-field-spec
22896
21745
  const browserEntry = typeof data.browser === 'string'
22897
21746
  ? data.browser
22898
- : isObject$2(data.browser) && data.browser['.'];
21747
+ : isObject$1(data.browser) && data.browser['.'];
22899
21748
  if (browserEntry) {
22900
21749
  // check if the package also has a "module" field.
22901
21750
  if (!options.isRequire &&
@@ -22951,14 +21800,14 @@ function resolvePackageEntry(id, { dir, data, setResolvedCache, getResolvedCache
22951
21800
  }
22952
21801
  // resolve object browser field in package.json
22953
21802
  const { browser: browserField } = data;
22954
- if (targetWeb && options.browserField && isObject$2(browserField)) {
21803
+ if (targetWeb && options.browserField && isObject$1(browserField)) {
22955
21804
  entry = mapWithBrowserField(entry, browserField) || entry;
22956
21805
  }
22957
21806
  const entryPointPath = path$o.join(dir, entry);
22958
21807
  const resolvedEntryPoint = tryFsResolve(entryPointPath, options);
22959
21808
  if (resolvedEntryPoint) {
22960
21809
  isDebug$4 &&
22961
- debug$c(`[package entry] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(resolvedEntryPoint)}`);
21810
+ debug$c(`[package entry] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(resolvedEntryPoint)}`);
22962
21811
  setResolvedCache('.', resolvedEntryPoint, targetWeb);
22963
21812
  return resolvedEntryPoint;
22964
21813
  }
@@ -23013,7 +21862,7 @@ function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolv
23013
21862
  const { exports: exportsField, browser: browserField } = data;
23014
21863
  // map relative based on exports data
23015
21864
  if (exportsField) {
23016
- if (isObject$2(exportsField) && !Array.isArray(exportsField)) {
21865
+ if (isObject$1(exportsField) && !Array.isArray(exportsField)) {
23017
21866
  // resolve without postfix (see #7098)
23018
21867
  const { file, postfix } = splitFileAndPostfix(relativeId);
23019
21868
  const exportsId = resolveExports(data, file, options, targetWeb);
@@ -23033,7 +21882,7 @@ function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolv
23033
21882
  `${path$o.join(dir, 'package.json')}.`);
23034
21883
  }
23035
21884
  }
23036
- else if (targetWeb && options.browserField && isObject$2(browserField)) {
21885
+ else if (targetWeb && options.browserField && isObject$1(browserField)) {
23037
21886
  // resolve without postfix (see #7098)
23038
21887
  const { file, postfix } = splitFileAndPostfix(relativeId);
23039
21888
  const mapped = mapWithBrowserField(file, browserField);
@@ -23049,7 +21898,7 @@ function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolv
23049
21898
  targetWeb);
23050
21899
  if (resolved) {
23051
21900
  isDebug$4 &&
23052
- debug$c(`[node/deep-import] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(resolved)}`);
21901
+ debug$c(`[node/deep-import] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(resolved)}`);
23053
21902
  setResolvedCache(id, resolved, targetWeb);
23054
21903
  return resolved;
23055
21904
  }
@@ -23058,14 +21907,14 @@ function resolveDeepImport(id, { webResolvedImports, setResolvedCache, getResolv
23058
21907
  function tryResolveBrowserMapping(id, importer, options, isFilePath, externalize) {
23059
21908
  let res;
23060
21909
  const pkg = importer && (idToPkgMap.get(importer) || resolvePkg(importer, options));
23061
- if (pkg && isObject$2(pkg.data.browser)) {
21910
+ if (pkg && isObject$1(pkg.data.browser)) {
23062
21911
  const mapId = isFilePath ? './' + slash$1(path$o.relative(pkg.dir, id)) : id;
23063
21912
  const browserMappedPath = mapWithBrowserField(mapId, pkg.data.browser);
23064
21913
  if (browserMappedPath) {
23065
21914
  const fsPath = path$o.join(pkg.dir, browserMappedPath);
23066
21915
  if ((res = tryFsResolve(fsPath, options))) {
23067
21916
  isDebug$4 &&
23068
- debug$c(`[browser mapped] ${picocolors.exports.cyan(id)} -> ${picocolors.exports.dim(res)}`);
21917
+ debug$c(`[browser mapped] ${picocolorsExports.cyan(id)} -> ${picocolorsExports.dim(res)}`);
23069
21918
  idToPkgMap.set(res, pkg);
23070
21919
  const result = {
23071
21920
  id: res,
@@ -25112,7 +23961,7 @@ var braces_1 = braces$2;
25112
23961
 
25113
23962
  const util = require$$0$6;
25114
23963
  const braces$1 = braces_1;
25115
- const picomatch$2 = picomatch$5.exports;
23964
+ const picomatch$2 = picomatchExports;
25116
23965
  const utils$b = utils$k;
25117
23966
  const isEmptyString = val => val === '' || val === './';
25118
23967
 
@@ -26546,7 +25395,11 @@ function getSettings$1(settingsOrOptions = {}) {
26546
25395
  return new settings_1$2.default(settingsOrOptions);
26547
25396
  }
26548
25397
 
26549
- var queue = {exports: {}};
25398
+ var queueExports = {};
25399
+ var queue = {
25400
+ get exports(){ return queueExports; },
25401
+ set exports(v){ queueExports = v; },
25402
+ };
26550
25403
 
26551
25404
  function reusify$1 (Constructor) {
26552
25405
  var head = new Constructor();
@@ -26860,7 +25713,7 @@ function queueAsPromised (context, worker, concurrency) {
26860
25713
  }
26861
25714
 
26862
25715
  queue.exports = fastqueue;
26863
- queue.exports.promise = queueAsPromised;
25716
+ queueExports.promise = queueAsPromised;
26864
25717
 
26865
25718
  var common$7 = {};
26866
25719
 
@@ -26911,7 +25764,7 @@ reader$1.default = Reader$1;
26911
25764
  Object.defineProperty(async$4, "__esModule", { value: true });
26912
25765
  const events_1 = require$$0$5;
26913
25766
  const fsScandir$2 = out$2;
26914
- const fastq = queue.exports;
25767
+ const fastq = queueExports;
26915
25768
  const common$5 = common$7;
26916
25769
  const reader_1$4 = reader$1;
26917
25770
  class AsyncReader extends reader_1$4.default {
@@ -28268,7 +27121,7 @@ function optimizedDepsPlugin(config) {
28268
27121
  }
28269
27122
  }
28270
27123
  }
28271
- isDebug$3 && debug$a(`load ${picocolors.exports.cyan(file)}`);
27124
+ isDebug$3 && debug$a(`load ${picocolorsExports.cyan(file)}`);
28272
27125
  // Load the file from the cache instead of waiting for other plugin
28273
27126
  // load hooks to avoid race conditions, once processing is resolved,
28274
27127
  // we are sure that the file has been properly save to disk
@@ -28327,7 +27180,7 @@ function optimizedDepsBuildPlugin(config) {
28327
27180
  // throwProcessingError(id)
28328
27181
  return;
28329
27182
  }
28330
- isDebug$3 && debug$a(`load ${picocolors.exports.cyan(file)}`);
27183
+ isDebug$3 && debug$a(`load ${picocolorsExports.cyan(file)}`);
28331
27184
  }
28332
27185
  else {
28333
27186
  // TODO: error
@@ -36871,7 +35724,7 @@ function preImportMapHook(config) {
36871
35724
  return;
36872
35725
  if (moduleScriptIndex < importMapIndex) {
36873
35726
  const relativeHtml = normalizePath$3(path$o.relative(config.root, ctx.filename));
36874
- config.logger.warnOnce(picocolors.exports.yellow(picocolors.exports.bold(`(!) <script type="importmap"> should come before <script type="module"> in /${relativeHtml}`)));
35727
+ config.logger.warnOnce(picocolorsExports.yellow(picocolorsExports.bold(`(!) <script type="importmap"> should come before <script type="module"> in /${relativeHtml}`)));
36875
35728
  }
36876
35729
  };
36877
35730
  }
@@ -37623,7 +36476,7 @@ async function compileCSS(id, code, config, urlReplacer) {
37623
36476
  }
37624
36477
  const postcssPlugins = postcssConfig && postcssConfig.plugins ? postcssConfig.plugins.slice() : [];
37625
36478
  if (needInlineImport) {
37626
- postcssPlugins.unshift((await import('./dep-a1fa0d33.js').then(function (n) { return n.i; })).default({
36479
+ postcssPlugins.unshift((await import('./dep-53dc1ef4.js').then(function (n) { return n.i; })).default({
37627
36480
  async resolve(id, basedir) {
37628
36481
  const publicFile = checkPublicFile(id, config);
37629
36482
  if (publicFile) {
@@ -37647,7 +36500,7 @@ async function compileCSS(id, code, config, urlReplacer) {
37647
36500
  }));
37648
36501
  }
37649
36502
  if (isModule) {
37650
- postcssPlugins.unshift((await import('./dep-e4585742.js').then(function (n) { return n.i; })).default({
36503
+ postcssPlugins.unshift((await import('./dep-80491704.js').then(function (n) { return n.i; })).default({
37651
36504
  ...modulesOptions,
37652
36505
  localsConvention: modulesOptions?.localsConvention,
37653
36506
  getJSON(cssFileName, _modules, outputFileName) {
@@ -37723,7 +36576,7 @@ async function compileCSS(id, code, config, urlReplacer) {
37723
36576
  column: message.column,
37724
36577
  })}`;
37725
36578
  }
37726
- config.logger.warn(picocolors.exports.yellow(msg));
36579
+ config.logger.warn(picocolorsExports.yellow(msg));
37727
36580
  }
37728
36581
  }
37729
36582
  }
@@ -37811,7 +36664,7 @@ async function resolvePostcssConfig(config, dialect = 'css') {
37811
36664
  }
37812
36665
  // inline postcss config via vite config
37813
36666
  const inlineOptions = config.css?.postcss;
37814
- if (isObject$2(inlineOptions)) {
36667
+ if (isObject$1(inlineOptions)) {
37815
36668
  const options = { ...inlineOptions };
37816
36669
  delete options.plugins;
37817
36670
  result = {
@@ -37966,7 +36819,7 @@ async function minifyCSS(css, config) {
37966
36819
  });
37967
36820
  if (warnings.length) {
37968
36821
  const msgs = await formatMessages(warnings, { kind: 'warning' });
37969
- config.logger.warn(picocolors.exports.yellow(`warnings when minifying css:\n${msgs.join('\n')}`));
36822
+ config.logger.warn(picocolorsExports.yellow(`warnings when minifying css:\n${msgs.join('\n')}`));
37970
36823
  }
37971
36824
  return code;
37972
36825
  }
@@ -39113,17 +37966,17 @@ async function handleHMRUpdate(file, server) {
39113
37966
  (fileName === '.env' || fileName.startsWith('.env.'));
39114
37967
  if (isConfig || isConfigDependency || isEnv) {
39115
37968
  // auto restart server
39116
- debugHmr(`[config change] ${picocolors.exports.dim(shortFile)}`);
39117
- config.logger.info(picocolors.exports.green(`${path$o.relative(process.cwd(), file)} changed, restarting server...`), { clear: true, timestamp: true });
37969
+ debugHmr(`[config change] ${picocolorsExports.dim(shortFile)}`);
37970
+ config.logger.info(picocolorsExports.green(`${path$o.relative(process.cwd(), file)} changed, restarting server...`), { clear: true, timestamp: true });
39118
37971
  try {
39119
37972
  await server.restart();
39120
37973
  }
39121
37974
  catch (e) {
39122
- config.logger.error(picocolors.exports.red(e));
37975
+ config.logger.error(picocolorsExports.red(e));
39123
37976
  }
39124
37977
  return;
39125
37978
  }
39126
- debugHmr(`[file change] ${picocolors.exports.dim(shortFile)}`);
37979
+ debugHmr(`[file change] ${picocolorsExports.dim(shortFile)}`);
39127
37980
  // (dev only) the client itself cannot be hot updated.
39128
37981
  if (file.startsWith(normalizedClientDir)) {
39129
37982
  ws.send({
@@ -39151,7 +38004,7 @@ async function handleHMRUpdate(file, server) {
39151
38004
  if (!hmrContext.modules.length) {
39152
38005
  // html file cannot be hot updated
39153
38006
  if (file.endsWith('.html')) {
39154
- config.logger.info(picocolors.exports.green(`page reload `) + picocolors.exports.dim(shortFile), {
38007
+ config.logger.info(picocolorsExports.green(`page reload `) + picocolorsExports.dim(shortFile), {
39155
38008
  clear: true,
39156
38009
  timestamp: true,
39157
38010
  });
@@ -39164,7 +38017,7 @@ async function handleHMRUpdate(file, server) {
39164
38017
  }
39165
38018
  else {
39166
38019
  // loaded but not in the module graph, probably not js
39167
- debugHmr(`[no modules matched] ${picocolors.exports.dim(shortFile)}`);
38020
+ debugHmr(`[no modules matched] ${picocolorsExports.dim(shortFile)}`);
39168
38021
  }
39169
38022
  return;
39170
38023
  }
@@ -39196,7 +38049,7 @@ function updateModules(file, modules, timestamp, { config, ws }, afterInvalidati
39196
38049
  })));
39197
38050
  }
39198
38051
  if (needFullReload) {
39199
- config.logger.info(picocolors.exports.green(`page reload `) + picocolors.exports.dim(file), {
38052
+ config.logger.info(picocolorsExports.green(`page reload `) + picocolorsExports.dim(file), {
39200
38053
  clear: !afterInvalidation,
39201
38054
  timestamp: true,
39202
38055
  });
@@ -39206,11 +38059,11 @@ function updateModules(file, modules, timestamp, { config, ws }, afterInvalidati
39206
38059
  return;
39207
38060
  }
39208
38061
  if (updates.length === 0) {
39209
- debugHmr(picocolors.exports.yellow(`no update happened `) + picocolors.exports.dim(file));
38062
+ debugHmr(picocolorsExports.yellow(`no update happened `) + picocolorsExports.dim(file));
39210
38063
  return;
39211
38064
  }
39212
- config.logger.info(picocolors.exports.green(`hmr update `) +
39213
- picocolors.exports.dim([...new Set(updates.map((u) => u.path))].join(', ')), { clear: !afterInvalidation, timestamp: true });
38065
+ config.logger.info(picocolorsExports.green(`hmr update `) +
38066
+ picocolorsExports.dim([...new Set(updates.map((u) => u.path))].join(', ')), { clear: !afterInvalidation, timestamp: true });
39214
38067
  ws.send({
39215
38068
  type: 'update',
39216
38069
  updates,
@@ -39236,7 +38089,7 @@ function propagateUpdate(node, boundaries, currentChain = [node]) {
39236
38089
  // if the imports of `node` have not been analyzed, then `node` has not
39237
38090
  // been loaded in the browser and we should stop propagation.
39238
38091
  if (node.id && node.isSelfAccepting === undefined) {
39239
- debugHmr(`[propagate update] stop propagation because not analyzed: ${picocolors.exports.dim(node.id)}`);
38092
+ debugHmr(`[propagate update] stop propagation because not analyzed: ${picocolorsExports.dim(node.id)}`);
39240
38093
  return false;
39241
38094
  }
39242
38095
  if (node.isSelfAccepting) {
@@ -39325,7 +38178,7 @@ function handlePrunedModules(mods, { ws }) {
39325
38178
  const t = Date.now();
39326
38179
  mods.forEach((mod) => {
39327
38180
  mod.lastHMRTimestamp = t;
39328
- debugHmr(`[dispose] ${picocolors.exports.dim(mod.file)}`);
38181
+ debugHmr(`[dispose] ${picocolorsExports.dim(mod.file)}`);
39329
38182
  });
39330
38183
  ws.send({
39331
38184
  type: 'prune',
@@ -40407,7 +39260,7 @@ async function loadAndTransform(id, url, server, options, timestamp) {
40407
39260
  }
40408
39261
  else {
40409
39262
  isDebug$2 && debugLoad(`${timeFrom(loadStart)} [plugin] ${prettyUrl}`);
40410
- if (isObject$2(loadResult)) {
39263
+ if (isObject$1(loadResult)) {
40411
39264
  code = loadResult.code;
40412
39265
  map = loadResult.map;
40413
39266
  }
@@ -40437,10 +39290,10 @@ async function loadAndTransform(id, url, server, options, timestamp) {
40437
39290
  });
40438
39291
  const originalCode = code;
40439
39292
  if (transformResult == null ||
40440
- (isObject$2(transformResult) && transformResult.code == null)) {
39293
+ (isObject$1(transformResult) && transformResult.code == null)) {
40441
39294
  // no transform applied, keep code as-is
40442
39295
  isDebug$2 &&
40443
- debugTransform(timeFrom(transformStart) + picocolors.exports.dim(` [skipped] ${prettyUrl}`));
39296
+ debugTransform(timeFrom(transformStart) + picocolorsExports.dim(` [skipped] ${prettyUrl}`));
40444
39297
  }
40445
39298
  else {
40446
39299
  isDebug$2 && debugTransform(`${timeFrom(transformStart)} ${prettyUrl}`);
@@ -40574,7 +39427,7 @@ function importAnalysisPlugin(config) {
40574
39427
  const ssr = options?.ssr === true;
40575
39428
  const prettyImporter = prettifyUrl(importer, root);
40576
39429
  if (canSkipImportAnalysis(importer)) {
40577
- isDebug$1 && debug$9(picocolors.exports.dim(`[skipped] ${prettyImporter}`));
39430
+ isDebug$1 && debug$9(picocolorsExports.dim(`[skipped] ${prettyImporter}`));
40578
39431
  return null;
40579
39432
  }
40580
39433
  const start = performance.now();
@@ -40612,7 +39465,7 @@ function importAnalysisPlugin(config) {
40612
39465
  if (!imports.length && !this._addedImports) {
40613
39466
  importerModule.isSelfAccepting = false;
40614
39467
  isDebug$1 &&
40615
- debug$9(`${timeFrom(start)} ${picocolors.exports.dim(`[no imports] ${prettyImporter}`)}`);
39468
+ debug$9(`${timeFrom(start)} ${picocolorsExports.dim(`[no imports] ${prettyImporter}`)}`);
40616
39469
  return source;
40617
39470
  }
40618
39471
  let hasHMR = false;
@@ -40803,11 +39656,11 @@ function importAnalysisPlugin(config) {
40803
39656
  ) {
40804
39657
  const newImport = sourceExp + specifier + `?inline` + source.slice(end, expEnd);
40805
39658
  this.warn(`\n` +
40806
- picocolors.exports.cyan(importerModule.file) +
39659
+ picocolorsExports.cyan(importerModule.file) +
40807
39660
  `\n` +
40808
- picocolors.exports.reset(generateCodeFrame(source, start)) +
39661
+ picocolorsExports.reset(generateCodeFrame(source, start)) +
40809
39662
  `\n` +
40810
- picocolors.exports.yellow(`Default and named imports from CSS files are deprecated. ` +
39663
+ picocolorsExports.yellow(`Default and named imports from CSS files are deprecated. ` +
40811
39664
  `Use the ?inline query instead. ` +
40812
39665
  `For example: ${newImport}`));
40813
39666
  }
@@ -40829,7 +39682,7 @@ function importAnalysisPlugin(config) {
40829
39682
  // optimize info for them, but they don't need es interop. If the request isn't
40830
39683
  // a dynamic import, then it is an internal Vite error
40831
39684
  if (!file.match(optimizedDepDynamicRE$1)) {
40832
- config.logger.error(picocolors.exports.red(`Vite Error, ${url} optimized info should be defined`));
39685
+ config.logger.error(picocolorsExports.red(`Vite Error, ${url} optimized info should be defined`));
40833
39686
  }
40834
39687
  }
40835
39688
  else if (needsInterop) {
@@ -40875,11 +39728,11 @@ function importAnalysisPlugin(config) {
40875
39728
  source.slice(dynamicIndex + 1, end));
40876
39729
  if (!hasViteIgnore) {
40877
39730
  this.warn(`\n` +
40878
- picocolors.exports.cyan(importerModule.file) +
39731
+ picocolorsExports.cyan(importerModule.file) +
40879
39732
  `\n` +
40880
- picocolors.exports.reset(generateCodeFrame(source, start)) +
40881
- picocolors.exports.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\n` +
40882
- `See ${picocolors.exports.blue(`https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations`)} ` +
39733
+ picocolorsExports.reset(generateCodeFrame(source, start)) +
39734
+ picocolorsExports.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\n` +
39735
+ `See ${picocolorsExports.blue(`https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations`)} ` +
40883
39736
  `for supported dynamic import formats. ` +
40884
39737
  `If this is intended to be left as-is, you can use the ` +
40885
39738
  `/* @vite-ignore */ comment inside the import() call to suppress this warning.\n`));
@@ -40965,7 +39818,7 @@ function importAnalysisPlugin(config) {
40965
39818
  }
40966
39819
  }
40967
39820
  isDebug$1 &&
40968
- debug$9(`${timeFrom(start)} ${picocolors.exports.dim(`[${importedUrls.size} imports rewritten] ${prettyImporter}`)}`);
39821
+ debug$9(`${timeFrom(start)} ${picocolorsExports.dim(`[${importedUrls.size} imports rewritten] ${prettyImporter}`)}`);
40969
39822
  // pre-transform known direct imports
40970
39823
  // These requests will also be registered in transformRequest to be awaited
40971
39824
  // by the deps optimizer
@@ -41113,7 +39966,7 @@ function clientInjectionsPlugin(config) {
41113
39966
  const devBase = config.base;
41114
39967
  const serverHost = `${resolvedServerHostname}:${resolvedServerPort}${devBase}`;
41115
39968
  let hmrConfig = config.server.hmr;
41116
- hmrConfig = isObject$2(hmrConfig) ? hmrConfig : undefined;
39969
+ hmrConfig = isObject$1(hmrConfig) ? hmrConfig : undefined;
41117
39970
  const host = hmrConfig?.host || null;
41118
39971
  const protocol = hmrConfig?.protocol || null;
41119
39972
  const timeout = hmrConfig?.timeout || 30000;
@@ -41364,13 +40217,14 @@ function definePlugin(config) {
41364
40217
  ...config.env,
41365
40218
  SSR: !!config.build.ssr,
41366
40219
  };
40220
+ // set here to allow override with config.define
40221
+ importMetaKeys['import.meta.hot'] = `false`;
41367
40222
  for (const key in env) {
41368
40223
  importMetaKeys[`import.meta.env.${key}`] = JSON.stringify(env[key]);
41369
40224
  }
41370
40225
  Object.assign(importMetaFallbackKeys, {
41371
40226
  'import.meta.env.': `({}).`,
41372
40227
  'import.meta.env': JSON.stringify(config.env),
41373
- 'import.meta.hot': `false`,
41374
40228
  });
41375
40229
  }
41376
40230
  function generatePattern(ssr) {
@@ -42126,12 +40980,12 @@ function prepareError(err) {
42126
40980
  }
42127
40981
  function buildErrorMessage(err, args = [], includeStack = true) {
42128
40982
  if (err.plugin)
42129
- args.push(` Plugin: ${picocolors.exports.magenta(err.plugin)}`);
40983
+ args.push(` Plugin: ${picocolorsExports.magenta(err.plugin)}`);
42130
40984
  const loc = err.loc ? `:${err.loc.line}:${err.loc.column}` : '';
42131
40985
  if (err.id)
42132
- args.push(` File: ${picocolors.exports.cyan(err.id)}${loc}`);
40986
+ args.push(` File: ${picocolorsExports.cyan(err.id)}${loc}`);
42133
40987
  if (err.frame)
42134
- args.push(picocolors.exports.yellow(pad$1(err.frame)));
40988
+ args.push(picocolorsExports.yellow(pad$1(err.frame)));
42135
40989
  if (includeStack && err.stack)
42136
40990
  args.push(pad$1(cleanStack(err.stack)));
42137
40991
  return args.join('\n');
@@ -42144,7 +40998,7 @@ function cleanStack(stack) {
42144
40998
  }
42145
40999
  function logError(server, err) {
42146
41000
  const msg = buildErrorMessage(err, [
42147
- picocolors.exports.red(`Internal server error: ${err.message}`),
41001
+ picocolorsExports.red(`Internal server error: ${err.message}`),
42148
41002
  ]);
42149
41003
  server.config.logger.error(msg, {
42150
41004
  clear: true,
@@ -42217,8 +41071,8 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42217
41071
  },
42218
41072
  };
42219
41073
  function warnIncompatibleMethod(method, plugin) {
42220
- logger.warn(picocolors.exports.cyan(`[plugin:${plugin}] `) +
42221
- picocolors.exports.yellow(`context method ${picocolors.exports.bold(`${method}()`)} is not supported in serve mode. This plugin is likely not vite-compatible.`));
41074
+ logger.warn(picocolorsExports.cyan(`[plugin:${plugin}] `) +
41075
+ picocolorsExports.yellow(`context method ${picocolorsExports.bold(`${method}()`)} is not supported in serve mode. This plugin is likely not vite-compatible.`));
42222
41076
  }
42223
41077
  // parallel, ignores returns
42224
41078
  async function hookParallel(hookName, context, args) {
@@ -42339,7 +41193,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42339
41193
  }
42340
41194
  warn(e, position) {
42341
41195
  const err = formatError(e, position, this);
42342
- const msg = buildErrorMessage(err, [picocolors.exports.yellow(`warning: ${err.message}`)], false);
41196
+ const msg = buildErrorMessage(err, [picocolorsExports.yellow(`warning: ${err.message}`)], false);
42343
41197
  logger.warn(msg, {
42344
41198
  clear: true,
42345
41199
  timestamp: true,
@@ -42377,7 +41231,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42377
41231
  errLocation = numberToPos(ctx._activeCode, pos);
42378
41232
  }
42379
41233
  catch (err2) {
42380
- logger.error(picocolors.exports.red(`Error in error handler:\n${err2.stack || err2.message}\n`),
41234
+ logger.error(picocolorsExports.red(`Error in error handler:\n${err2.stack || err2.message}\n`),
42381
41235
  // print extra newline to separate the two errors
42382
41236
  { error: err2 });
42383
41237
  throw err;
@@ -42576,7 +41430,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42576
41430
  // avoid spamming
42577
41431
  if (!seenResolves[key]) {
42578
41432
  seenResolves[key] = true;
42579
- debugResolve(`${timeFrom(resolveStart)} ${picocolors.exports.cyan(rawId)} -> ${picocolors.exports.dim(id)}`);
41433
+ debugResolve(`${timeFrom(resolveStart)} ${picocolorsExports.cyan(rawId)} -> ${picocolorsExports.dim(id)}`);
42580
41434
  }
42581
41435
  }
42582
41436
  if (id) {
@@ -42598,7 +41452,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42598
41452
  const handler = 'handler' in plugin.load ? plugin.load.handler : plugin.load;
42599
41453
  const result = await handler.call(ctx, id, { ssr });
42600
41454
  if (result != null) {
42601
- if (isObject$2(result)) {
41455
+ if (isObject$1(result)) {
42602
41456
  updateModuleInfo(id, result);
42603
41457
  }
42604
41458
  return result;
@@ -42632,7 +41486,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
42632
41486
  continue;
42633
41487
  isDebug &&
42634
41488
  debugPluginTransform(timeFrom(start), plugin.name, prettifyUrl(id, root));
42635
- if (isObject$2(result)) {
41489
+ if (isObject$1(result)) {
42636
41490
  if (result.code !== undefined) {
42637
41491
  code = result.code;
42638
41492
  if (result.map) {
@@ -42694,7 +41548,7 @@ async function scanImports(config) {
42694
41548
  else if (Array.isArray(buildInput)) {
42695
41549
  entries = buildInput.map(resolvePath);
42696
41550
  }
42697
- else if (isObject$2(buildInput)) {
41551
+ else if (isObject$1(buildInput)) {
42698
41552
  entries = Object.values(buildInput).map(resolvePath);
42699
41553
  }
42700
41554
  else {
@@ -42709,7 +41563,7 @@ async function scanImports(config) {
42709
41563
  entries = entries.filter((entry) => isScannable(entry) && fs$l.existsSync(entry));
42710
41564
  if (!entries.length) {
42711
41565
  if (!explicitEntryPatterns && !config.optimizeDeps.include) {
42712
- config.logger.warn(picocolors.exports.yellow('(!) Could not auto-determine entry point from rollupOptions or html files ' +
41566
+ config.logger.warn(picocolorsExports.yellow('(!) Could not auto-determine entry point from rollupOptions or html files ' +
42713
41567
  'and there are no explicit optimizeDeps.include patterns. ' +
42714
41568
  'Skipping dependency pre-bundling.'));
42715
41569
  }
@@ -43161,7 +42015,7 @@ async function createDepsOptimizer(config, server) {
43161
42015
  let newDepsToLogHandle;
43162
42016
  const logNewlyDiscoveredDeps = () => {
43163
42017
  if (newDepsToLog.length) {
43164
- config.logger.info(picocolors.exports.green(`✨ new dependencies optimized: ${depsLogString(newDepsToLog)}`), {
42018
+ config.logger.info(picocolorsExports.green(`✨ new dependencies optimized: ${depsLogString(newDepsToLog)}`), {
43165
42019
  timestamp: true,
43166
42020
  });
43167
42021
  newDepsToLog = [];
@@ -43210,9 +42064,9 @@ async function createDepsOptimizer(config, server) {
43210
42064
  // Ensure server listen is called before the scanner
43211
42065
  setTimeout(async () => {
43212
42066
  try {
43213
- debuggerViteDeps(picocolors.exports.green(`scanning for dependencies...`));
42067
+ debuggerViteDeps(picocolorsExports.green(`scanning for dependencies...`));
43214
42068
  const deps = await discoverProjectDependencies(config);
43215
- debuggerViteDeps(picocolors.exports.green(Object.keys(deps).length > 0
42069
+ debuggerViteDeps(picocolorsExports.green(Object.keys(deps).length > 0
43216
42070
  ? `dependencies found by scanner: ${depsLogString(Object.keys(deps))}`
43217
42071
  : `no dependencies found by scanner`));
43218
42072
  // Add these dependencies to the discovered list, as these are currently
@@ -43361,7 +42215,7 @@ async function createDepsOptimizer(config, server) {
43361
42215
  }, 2 * debounceMs);
43362
42216
  }
43363
42217
  else {
43364
- debuggerViteDeps(picocolors.exports.green(`✨ ${!isRerun
42218
+ debuggerViteDeps(picocolorsExports.green(`✨ ${!isRerun
43365
42219
  ? `dependencies optimized`
43366
42220
  : `optimized dependencies unchanged`}`));
43367
42221
  }
@@ -43373,7 +42227,7 @@ async function createDepsOptimizer(config, server) {
43373
42227
  // We don't resolve the processing promise, as they will be resolved
43374
42228
  // once a rerun is committed
43375
42229
  processingResult.cancel();
43376
- debuggerViteDeps(picocolors.exports.green(`✨ delaying reload as new dependencies have been found...`));
42230
+ debuggerViteDeps(picocolorsExports.green(`✨ delaying reload as new dependencies have been found...`));
43377
42231
  }
43378
42232
  else {
43379
42233
  await commitProcessing();
@@ -43383,11 +42237,11 @@ async function createDepsOptimizer(config, server) {
43383
42237
  newDepsToLogHandle = undefined;
43384
42238
  logNewlyDiscoveredDeps();
43385
42239
  }
43386
- logger.info(picocolors.exports.green(`✨ optimized dependencies changed. reloading`), {
42240
+ logger.info(picocolorsExports.green(`✨ optimized dependencies changed. reloading`), {
43387
42241
  timestamp: true,
43388
42242
  });
43389
42243
  if (needsInteropMismatch.length > 0) {
43390
- config.logger.warn(`Mixed ESM and CJS detected in ${picocolors.exports.yellow(needsInteropMismatch.join(', '))}, add ${needsInteropMismatch.length === 1 ? 'it' : 'them'} to optimizeDeps.needsInterop to speed up cold start`, {
42244
+ config.logger.warn(`Mixed ESM and CJS detected in ${picocolorsExports.yellow(needsInteropMismatch.join(', '))}, add ${needsInteropMismatch.length === 1 ? 'it' : 'them'} to optimizeDeps.needsInterop to speed up cold start`, {
43391
42245
  timestamp: true,
43392
42246
  });
43393
42247
  }
@@ -43396,7 +42250,7 @@ async function createDepsOptimizer(config, server) {
43396
42250
  }
43397
42251
  }
43398
42252
  catch (e) {
43399
- logger.error(picocolors.exports.red(`error while updating dependencies:\n${e.stack}`), { timestamp: true, error: e });
42253
+ logger.error(picocolorsExports.red(`error while updating dependencies:\n${e.stack}`), { timestamp: true, error: e });
43400
42254
  resolveEnqueuedProcessingPromises();
43401
42255
  // Reset missing deps, let the server rediscover the dependencies
43402
42256
  metadata.discovered = {};
@@ -43423,7 +42277,7 @@ async function createDepsOptimizer(config, server) {
43423
42277
  // optimizeDeps processing is finished
43424
42278
  const deps = Object.keys(metadata.discovered);
43425
42279
  const depsString = depsLogString(deps);
43426
- debuggerViteDeps(picocolors.exports.green(`new dependencies found: ${depsString}`));
42280
+ debuggerViteDeps(picocolorsExports.green(`new dependencies found: ${depsString}`));
43427
42281
  runOptimizer();
43428
42282
  }
43429
42283
  function getDiscoveredBrowserHash(hash, deps, missing) {
@@ -43496,7 +42350,7 @@ async function createDepsOptimizer(config, server) {
43496
42350
  }, timeout);
43497
42351
  }
43498
42352
  async function onCrawlEnd() {
43499
- debuggerViteDeps(picocolors.exports.green(`✨ static imports crawl ended`));
42353
+ debuggerViteDeps(picocolorsExports.green(`✨ static imports crawl ended`));
43500
42354
  if (firstRunCalled) {
43501
42355
  return;
43502
42356
  }
@@ -43510,7 +42364,7 @@ async function createDepsOptimizer(config, server) {
43510
42364
  postScanOptimizationResult = undefined;
43511
42365
  const scanDeps = Object.keys(result.metadata.optimized);
43512
42366
  if (scanDeps.length === 0 && crawlDeps.length === 0) {
43513
- debuggerViteDeps(picocolors.exports.green(`✨ no dependencies found by the scanner or crawling static imports`));
42367
+ debuggerViteDeps(picocolorsExports.green(`✨ no dependencies found by the scanner or crawling static imports`));
43514
42368
  result.cancel();
43515
42369
  firstRunCalled = true;
43516
42370
  return;
@@ -43528,20 +42382,20 @@ async function createDepsOptimizer(config, server) {
43528
42382
  }
43529
42383
  }
43530
42384
  if (scannerMissedDeps) {
43531
- debuggerViteDeps(picocolors.exports.yellow(`✨ new dependencies were found while crawling that weren't detected by the scanner`));
42385
+ debuggerViteDeps(picocolorsExports.yellow(`✨ new dependencies were found while crawling that weren't detected by the scanner`));
43532
42386
  }
43533
- debuggerViteDeps(picocolors.exports.green(`✨ re-running optimizer`));
42387
+ debuggerViteDeps(picocolorsExports.green(`✨ re-running optimizer`));
43534
42388
  debouncedProcessing(0);
43535
42389
  }
43536
42390
  else {
43537
- debuggerViteDeps(picocolors.exports.green(`✨ using post-scan optimizer result, the scanner found every used dependency`));
42391
+ debuggerViteDeps(picocolorsExports.green(`✨ using post-scan optimizer result, the scanner found every used dependency`));
43538
42392
  startNextDiscoveredBatch();
43539
42393
  runOptimizer(result);
43540
42394
  }
43541
42395
  }
43542
42396
  else {
43543
42397
  if (crawlDeps.length === 0) {
43544
- debuggerViteDeps(picocolors.exports.green(`✨ no dependencies found while crawling the static imports`));
42398
+ debuggerViteDeps(picocolorsExports.green(`✨ no dependencies found while crawling the static imports`));
43545
42399
  firstRunCalled = true;
43546
42400
  }
43547
42401
  else {
@@ -43652,7 +42506,7 @@ function findInteropMismatches(discovered, optimized) {
43652
42506
  // This only happens when a discovered dependency has mixed ESM and CJS syntax
43653
42507
  // and it hasn't been manually added to optimizeDeps.needsInterop
43654
42508
  needsInteropMismatch.push(dep);
43655
- debuggerViteDeps(picocolors.exports.cyan(`✨ needsInterop mismatch detected for ${dep}`));
42509
+ debuggerViteDeps(picocolorsExports.cyan(`✨ needsInterop mismatch detected for ${dep}`));
43656
42510
  }
43657
42511
  }
43658
42512
  }
@@ -43677,7 +42531,7 @@ async function optimizeDeps(config, force = config.optimizeDeps.force, asCommand
43677
42531
  }
43678
42532
  const deps = await discoverProjectDependencies(config);
43679
42533
  const depsString = depsLogString(Object.keys(deps));
43680
- log(picocolors.exports.green(`Optimizing dependencies:\n ${depsString}`));
42534
+ log(picocolorsExports.green(`Optimizing dependencies:\n ${depsString}`));
43681
42535
  await addManuallyIncludedOptimizeDeps(deps, config, ssr);
43682
42536
  const depsInfo = toDiscoveredDependencies(config, deps, ssr);
43683
42537
  const result = await runOptimizeDeps(config, depsInfo);
@@ -43768,7 +42622,7 @@ async function discoverProjectDependencies(config) {
43768
42622
  const missingIds = Object.keys(missing);
43769
42623
  if (missingIds.length) {
43770
42624
  throw new Error(`The following dependencies are imported but could not be resolved:\n\n ${missingIds
43771
- .map((id) => `${picocolors.exports.cyan(id)} ${picocolors.exports.white(picocolors.exports.dim(`(imported by ${missing[id]})`))}`)
42625
+ .map((id) => `${picocolorsExports.cyan(id)} ${picocolorsExports.white(picocolorsExports.dim(`(imported by ${missing[id]})`))}`)
43772
42626
  .join(`\n `)}\n\nAre they installed?`);
43773
42627
  }
43774
42628
  return deps;
@@ -43790,14 +42644,14 @@ function toDiscoveredDependencies(config, deps, ssr, timestamp) {
43790
42644
  }
43791
42645
  function depsLogString(qualifiedIds) {
43792
42646
  if (isDebugEnabled) {
43793
- return picocolors.exports.yellow(qualifiedIds.join(`, `));
42647
+ return picocolorsExports.yellow(qualifiedIds.join(`, `));
43794
42648
  }
43795
42649
  else {
43796
42650
  const total = qualifiedIds.length;
43797
42651
  const maxListed = 5;
43798
42652
  const listed = Math.min(total, maxListed);
43799
42653
  const extra = Math.max(0, total - maxListed);
43800
- return picocolors.exports.yellow(qualifiedIds.slice(0, listed).join(`, `) +
42654
+ return picocolorsExports.yellow(qualifiedIds.slice(0, listed).join(`, `) +
43801
42655
  (extra > 0 ? `, ...and ${extra} more` : ``));
43802
42656
  }
43803
42657
  }
@@ -43989,7 +42843,7 @@ async function addManuallyIncludedOptimizeDeps(deps, config, ssr, extra = [], fi
43989
42843
  if (optimizeDepsInclude.length || extra.length) {
43990
42844
  const unableToOptimize = (id, msg) => {
43991
42845
  if (optimizeDepsInclude.includes(id)) {
43992
- logger.warn(`${msg}: ${picocolors.exports.cyan(id)}, present in '${ssr ? 'ssr.' : ''}optimizeDeps.include'`);
42846
+ logger.warn(`${msg}: ${picocolorsExports.cyan(id)}, present in '${ssr ? 'ssr.' : ''}optimizeDeps.include'`);
43993
42847
  }
43994
42848
  };
43995
42849
  const resolve = config.createResolver({
@@ -44575,7 +43429,7 @@ function buildImportAnalysisPlugin(config) {
44575
43429
  // optimize info for them, but they don't need es interop. If the request isn't
44576
43430
  // a dynamic import, then it is an internal Vite error
44577
43431
  if (!file.match(optimizedDepDynamicRE)) {
44578
- config.logger.error(picocolors.exports.red(`Vite Error, ${url} optimized info should be defined`));
43432
+ config.logger.error(picocolorsExports.red(`Vite Error, ${url} optimized info should be defined`));
44579
43433
  }
44580
43434
  }
44581
43435
  else if (needsInterop) {
@@ -45022,7 +43876,11 @@ function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
45022
43876
  return searchForWorkspaceRoot(dir, root);
45023
43877
  }
45024
43878
 
45025
- var main$1 = {exports: {}};
43879
+ var mainExports = {};
43880
+ var main$1 = {
43881
+ get exports(){ return mainExports; },
43882
+ set exports(v){ mainExports = v; },
43883
+ };
45026
43884
 
45027
43885
  var name = "dotenv";
45028
43886
  var version$1 = "16.0.3";
@@ -45207,8 +44065,8 @@ const DotenvModule = {
45207
44065
  parse: parse$8
45208
44066
  };
45209
44067
 
45210
- main$1.exports.config = DotenvModule.config;
45211
- var parse_1$1 = main$1.exports.parse = DotenvModule.parse;
44068
+ mainExports.config = DotenvModule.config;
44069
+ var parse_1$1 = mainExports.parse = DotenvModule.parse;
45212
44070
  main$1.exports = DotenvModule;
45213
44071
 
45214
44072
  function _interpolate (envValue, environment, config) {
@@ -45475,7 +44333,7 @@ async function doBuild(inlineConfig = {}) {
45475
44333
  const options = config.build;
45476
44334
  const ssr = !!options.ssr;
45477
44335
  const libOptions = options.lib;
45478
- config.logger.info(picocolors.exports.cyan(`vite v${VERSION$1} ${picocolors.exports.green(`building ${ssr ? `SSR bundle ` : ``}for ${config.mode}...`)}`));
44336
+ config.logger.info(picocolorsExports.cyan(`vite v${VERSION$1} ${picocolorsExports.green(`building ${ssr ? `SSR bundle ` : ``}for ${config.mode}...`)}`));
45479
44337
  const resolve = (p) => path$o.resolve(config.root, p);
45480
44338
  const input = libOptions
45481
44339
  ? options.rollupOptions?.input ||
@@ -45524,12 +44382,12 @@ async function doBuild(inlineConfig = {}) {
45524
44382
  },
45525
44383
  };
45526
44384
  const outputBuildError = (e) => {
45527
- let msg = picocolors.exports.red((e.plugin ? `[${e.plugin}] ` : '') + e.message);
44385
+ let msg = picocolorsExports.red((e.plugin ? `[${e.plugin}] ` : '') + e.message);
45528
44386
  if (e.id) {
45529
- msg += `\nfile: ${picocolors.exports.cyan(e.id + (e.loc ? `:${e.loc.line}:${e.loc.column}` : ''))}`;
44387
+ msg += `\nfile: ${picocolorsExports.cyan(e.id + (e.loc ? `:${e.loc.line}:${e.loc.column}` : ''))}`;
45530
44388
  }
45531
44389
  if (e.frame) {
45532
- msg += `\n` + picocolors.exports.yellow(e.frame);
44390
+ msg += `\n` + picocolorsExports.yellow(e.frame);
45533
44391
  }
45534
44392
  config.logger.error(msg, { error: e });
45535
44393
  };
@@ -45591,7 +44449,7 @@ async function doBuild(inlineConfig = {}) {
45591
44449
  const outDirs = normalizedOutputs.map(({ dir }) => resolve(dir));
45592
44450
  // watch file changes with rollup
45593
44451
  if (config.build.watch) {
45594
- config.logger.info(picocolors.exports.cyan(`\nwatching for file changes...`));
44452
+ config.logger.info(picocolorsExports.cyan(`\nwatching for file changes...`));
45595
44453
  const resolvedChokidarOptions = resolveChokidarOptions(config, config.build.watch.chokidar);
45596
44454
  const { watch } = await import('rollup');
45597
44455
  const watcher = watch({
@@ -45604,14 +44462,14 @@ async function doBuild(inlineConfig = {}) {
45604
44462
  });
45605
44463
  watcher.on('event', (event) => {
45606
44464
  if (event.code === 'BUNDLE_START') {
45607
- config.logger.info(picocolors.exports.cyan(`\nbuild started...`));
44465
+ config.logger.info(picocolorsExports.cyan(`\nbuild started...`));
45608
44466
  if (options.write) {
45609
44467
  prepareOutDir(outDirs, options.emptyOutDir, config);
45610
44468
  }
45611
44469
  }
45612
44470
  else if (event.code === 'BUNDLE_END') {
45613
44471
  event.result.close();
45614
- config.logger.info(picocolors.exports.cyan(`built in ${event.duration}ms.`));
44472
+ config.logger.info(picocolorsExports.cyan(`built in ${event.duration}ms.`));
45615
44473
  }
45616
44474
  else if (event.code === 'ERROR') {
45617
44475
  outputBuildError(event.error);
@@ -45648,7 +44506,7 @@ function prepareOutDir(outDirs, emptyOutDir, config) {
45648
44506
  if (fs$l.existsSync(outDir) &&
45649
44507
  !normalizePath$3(outDir).startsWith(config.root + '/')) {
45650
44508
  // warn if outDir is outside of root
45651
- config.logger.warn(picocolors.exports.yellow(`\n${picocolors.exports.bold(`(!)`)} outDir ${picocolors.exports.white(picocolors.exports.dim(outDir))} is not inside project root and will not be emptied.\n` +
44509
+ config.logger.warn(picocolorsExports.yellow(`\n${picocolorsExports.bold(`(!)`)} outDir ${picocolorsExports.white(picocolorsExports.dim(outDir))} is not inside project root and will not be emptied.\n` +
45652
44510
  `Use --emptyOutDir to override.\n`));
45653
44511
  outside = true;
45654
44512
  break;
@@ -45728,7 +44586,7 @@ function resolveBuildOutputs(outputs, libOptions, logger) {
45728
44586
  }
45729
44587
  // By this point, we know "outputs" is an Array.
45730
44588
  if (libOptions.formats) {
45731
- logger.warn(picocolors.exports.yellow('"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.'));
44589
+ logger.warn(picocolorsExports.yellow('"build.lib.formats" will be ignored because "build.rollupOptions.output" is already an array format.'));
45732
44590
  }
45733
44591
  outputs.forEach((output) => {
45734
44592
  if (['umd', 'iife'].includes(output.format) && !output.name) {
@@ -45765,7 +44623,7 @@ function onRollupWarning(warning, warn, config) {
45765
44623
  userOnWarn(warning, warn);
45766
44624
  }
45767
44625
  else if (warning.code === 'PLUGIN_WARNING') {
45768
- config.logger.warn(`${picocolors.exports.bold(picocolors.exports.yellow(`[plugin:${warning.plugin}]`))} ${picocolors.exports.yellow(warning.message)}`);
44626
+ config.logger.warn(`${picocolorsExports.bold(picocolorsExports.yellow(`[plugin:${warning.plugin}]`))} ${picocolorsExports.yellow(warning.message)}`);
45769
44627
  }
45770
44628
  else {
45771
44629
  warn(warning);
@@ -45986,11 +44844,23 @@ var build$1 = {
45986
44844
  toOutputFilePathInHtml: toOutputFilePathInHtml
45987
44845
  };
45988
44846
 
45989
- var src = {exports: {}};
44847
+ var srcExports = {};
44848
+ var src = {
44849
+ get exports(){ return srcExports; },
44850
+ set exports(v){ srcExports = v; },
44851
+ };
45990
44852
 
45991
- var browser = {exports: {}};
44853
+ var browserExports = {};
44854
+ var browser = {
44855
+ get exports(){ return browserExports; },
44856
+ set exports(v){ browserExports = v; },
44857
+ };
45992
44858
 
45993
- var debug$6 = {exports: {}};
44859
+ var debugExports = {};
44860
+ var debug$6 = {
44861
+ get exports(){ return debugExports; },
44862
+ set exports(v){ debugExports = v; },
44863
+ };
45994
44864
 
45995
44865
  /**
45996
44866
  * Helpers.
@@ -46156,7 +45026,7 @@ function requireMs () {
46156
45026
  var hasRequiredDebug;
46157
45027
 
46158
45028
  function requireDebug () {
46159
- if (hasRequiredDebug) return debug$6.exports;
45029
+ if (hasRequiredDebug) return debugExports;
46160
45030
  hasRequiredDebug = 1;
46161
45031
  (function (module, exports) {
46162
45032
  /**
@@ -46360,8 +45230,8 @@ function requireDebug () {
46360
45230
  if (val instanceof Error) return val.stack || val.message;
46361
45231
  return val;
46362
45232
  }
46363
- } (debug$6, debug$6.exports));
46364
- return debug$6.exports;
45233
+ } (debug$6, debugExports));
45234
+ return debugExports;
46365
45235
  }
46366
45236
 
46367
45237
  /**
@@ -46373,7 +45243,7 @@ function requireDebug () {
46373
45243
  var hasRequiredBrowser;
46374
45244
 
46375
45245
  function requireBrowser () {
46376
- if (hasRequiredBrowser) return browser.exports;
45246
+ if (hasRequiredBrowser) return browserExports;
46377
45247
  hasRequiredBrowser = 1;
46378
45248
  (function (module, exports) {
46379
45249
  exports = module.exports = requireDebug();
@@ -46555,11 +45425,15 @@ function requireBrowser () {
46555
45425
  return window.localStorage;
46556
45426
  } catch (e) {}
46557
45427
  }
46558
- } (browser, browser.exports));
46559
- return browser.exports;
45428
+ } (browser, browserExports));
45429
+ return browserExports;
46560
45430
  }
46561
45431
 
46562
- var node = {exports: {}};
45432
+ var nodeExports = {};
45433
+ var node = {
45434
+ get exports(){ return nodeExports; },
45435
+ set exports(v){ nodeExports = v; },
45436
+ };
46563
45437
 
46564
45438
  /**
46565
45439
  * Module dependencies.
@@ -46568,7 +45442,7 @@ var node = {exports: {}};
46568
45442
  var hasRequiredNode;
46569
45443
 
46570
45444
  function requireNode () {
46571
- if (hasRequiredNode) return node.exports;
45445
+ if (hasRequiredNode) return nodeExports;
46572
45446
  hasRequiredNode = 1;
46573
45447
  (function (module, exports) {
46574
45448
  var tty = require$$0$3;
@@ -46815,8 +45689,8 @@ function requireNode () {
46815
45689
  */
46816
45690
 
46817
45691
  exports.enable(load());
46818
- } (node, node.exports));
46819
- return node.exports;
45692
+ } (node, nodeExports));
45693
+ return nodeExports;
46820
45694
  }
46821
45695
 
46822
45696
  /**
@@ -46968,7 +45842,11 @@ function escapeHtml$1(string) {
46968
45842
  : html;
46969
45843
  }
46970
45844
 
46971
- var onFinished$2 = {exports: {}};
45845
+ var onFinishedExports = {};
45846
+ var onFinished$2 = {
45847
+ get exports(){ return onFinishedExports; },
45848
+ set exports(v){ onFinishedExports = v; },
45849
+ };
46972
45850
 
46973
45851
  /*!
46974
45852
  * ee-first
@@ -47077,7 +45955,7 @@ function listener(event, done) {
47077
45955
  */
47078
45956
 
47079
45957
  onFinished$2.exports = onFinished$1;
47080
- onFinished$2.exports.isFinished = isFinished$1;
45958
+ onFinishedExports.isFinished = isFinished$1;
47081
45959
 
47082
45960
  /**
47083
45961
  * Module dependencies.
@@ -47259,7 +46137,11 @@ function patchAssignSocket(res, callback) {
47259
46137
  };
47260
46138
  }
47261
46139
 
47262
- var parseurl$1 = {exports: {}};
46140
+ var parseurlExports = {};
46141
+ var parseurl$1 = {
46142
+ get exports(){ return parseurlExports; },
46143
+ set exports(v){ parseurlExports = v; },
46144
+ };
47263
46145
 
47264
46146
  /*!
47265
46147
  * parseurl
@@ -47283,7 +46165,7 @@ var Url = url$3.Url;
47283
46165
  */
47284
46166
 
47285
46167
  parseurl$1.exports = parseurl;
47286
- parseurl$1.exports.original = originalurl;
46168
+ parseurlExports.original = originalurl;
47287
46169
 
47288
46170
  /**
47289
46171
  * Parse the `req` url with memoization.
@@ -47674,11 +46556,11 @@ function unpipe$1(stream) {
47674
46556
  * @private
47675
46557
  */
47676
46558
 
47677
- var debug$5 = src.exports('finalhandler');
46559
+ var debug$5 = srcExports('finalhandler');
47678
46560
  var encodeUrl = encodeurl;
47679
46561
  var escapeHtml = escapeHtml_1;
47680
- var onFinished = onFinished$2.exports;
47681
- var parseUrl$1 = parseurl$1.exports;
46562
+ var onFinished = onFinishedExports;
46563
+ var parseUrl$1 = parseurlExports;
47682
46564
  var statuses = statuses$1;
47683
46565
  var unpipe = unpipe_1;
47684
46566
 
@@ -47993,7 +46875,11 @@ function setHeaders (res, headers) {
47993
46875
  }
47994
46876
  }
47995
46877
 
47996
- var utilsMerge = {exports: {}};
46878
+ var utilsMergeExports = {};
46879
+ var utilsMerge = {
46880
+ get exports(){ return utilsMergeExports; },
46881
+ set exports(v){ utilsMergeExports = v; },
46882
+ };
47997
46883
 
47998
46884
  /**
47999
46885
  * Merge object b with object a.
@@ -48034,12 +46920,12 @@ var utilsMerge = {exports: {}};
48034
46920
  * @private
48035
46921
  */
48036
46922
 
48037
- var debug$4 = src.exports('connect:dispatcher');
46923
+ var debug$4 = srcExports('connect:dispatcher');
48038
46924
  var EventEmitter$3 = require$$0$5.EventEmitter;
48039
46925
  var finalhandler = finalhandler_1;
48040
46926
  var http$4 = require$$1$1;
48041
- var merge = utilsMerge.exports;
48042
- var parseUrl = parseurl$1.exports;
46927
+ var merge = utilsMergeExports;
46928
+ var parseUrl = parseurlExports;
48043
46929
 
48044
46930
  /**
48045
46931
  * Module exports.
@@ -48299,7 +47185,11 @@ function getProtohost(url) {
48299
47185
  : undefined;
48300
47186
  }
48301
47187
 
48302
- var lib$1 = {exports: {}};
47188
+ var libExports$1 = {};
47189
+ var lib$1 = {
47190
+ get exports(){ return libExports$1; },
47191
+ set exports(v){ libExports$1 = v; },
47192
+ };
48303
47193
 
48304
47194
  /*
48305
47195
  object-assign
@@ -48390,7 +47280,11 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
48390
47280
  return to;
48391
47281
  };
48392
47282
 
48393
- var vary$1 = {exports: {}};
47283
+ var varyExports = {};
47284
+ var vary$1 = {
47285
+ get exports(){ return varyExports; },
47286
+ set exports(v){ varyExports = v; },
47287
+ };
48394
47288
 
48395
47289
  /*!
48396
47290
  * vary
@@ -48403,7 +47297,7 @@ var vary$1 = {exports: {}};
48403
47297
  */
48404
47298
 
48405
47299
  vary$1.exports = vary;
48406
- vary$1.exports.append = append;
47300
+ varyExports.append = append;
48407
47301
 
48408
47302
  /**
48409
47303
  * RegExp to match field-name in RFC 7230 sec 3.2
@@ -48543,7 +47437,7 @@ function vary (res, field) {
48543
47437
  (function () {
48544
47438
 
48545
47439
  var assign = objectAssign;
48546
- var vary = vary$1.exports;
47440
+ var vary = varyExports;
48547
47441
 
48548
47442
  var defaults = {
48549
47443
  origin: '*',
@@ -48783,7 +47677,7 @@ const fs$8 = require$$0__default;
48783
47677
  const { Readable } = require$$0$7;
48784
47678
  const sysPath$3 = require$$0$4;
48785
47679
  const { promisify: promisify$3 } = require$$0$6;
48786
- const picomatch$1 = picomatch$5.exports;
47680
+ const picomatch$1 = picomatchExports;
48787
47681
 
48788
47682
  const readdir$1 = promisify$3(fs$8.readdir);
48789
47683
  const stat$3 = promisify$3(fs$8.stat);
@@ -49065,7 +47959,11 @@ readdirp$1.default = readdirp$1;
49065
47959
 
49066
47960
  var readdirp_1 = readdirp$1;
49067
47961
 
49068
- var anymatch$2 = {exports: {}};
47962
+ var anymatchExports = {};
47963
+ var anymatch$2 = {
47964
+ get exports(){ return anymatchExports; },
47965
+ set exports(v){ anymatchExports = v; },
47966
+ };
49069
47967
 
49070
47968
  /*!
49071
47969
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
@@ -49103,9 +48001,9 @@ var normalizePath$2 = function(path, stripTrailing) {
49103
48001
  return prefix + segs.join('/');
49104
48002
  };
49105
48003
 
49106
- Object.defineProperty(anymatch$2.exports, "__esModule", { value: true });
48004
+ Object.defineProperty(anymatchExports, "__esModule", { value: true });
49107
48005
 
49108
- const picomatch = picomatch$5.exports;
48006
+ const picomatch = picomatchExports;
49109
48007
  const normalizePath$1 = normalizePath$2;
49110
48008
 
49111
48009
  /**
@@ -49206,7 +48104,11 @@ const anymatch$1 = (matchers, testString, options = DEFAULT_OPTIONS) => {
49206
48104
  anymatch$1.default = anymatch$1;
49207
48105
  anymatch$2.exports = anymatch$1;
49208
48106
 
49209
- var binaryExtensions$1 = {exports: {}};
48107
+ var binaryExtensionsExports = {};
48108
+ var binaryExtensions$1 = {
48109
+ get exports(){ return binaryExtensionsExports; },
48110
+ set exports(v){ binaryExtensionsExports = v; },
48111
+ };
49210
48112
 
49211
48113
  var require$$0 = [
49212
48114
  "3dm",
@@ -49474,7 +48376,7 @@ var require$$0 = [
49474
48376
  } (binaryExtensions$1));
49475
48377
 
49476
48378
  const path$8 = require$$0$4;
49477
- const binaryExtensions = binaryExtensions$1.exports;
48379
+ const binaryExtensions = binaryExtensionsExports;
49478
48380
 
49479
48381
  const extensions = new Set(binaryExtensions);
49480
48382
 
@@ -50192,7 +49094,11 @@ async _addToNodeFs(path, initialAdd, priorWh, depth, target) {
50192
49094
 
50193
49095
  var nodefsHandler = NodeFsHandler$1;
50194
49096
 
50195
- var fseventsHandler = {exports: {}};
49097
+ var fseventsHandlerExports = {};
49098
+ var fseventsHandler = {
49099
+ get exports(){ return fseventsHandlerExports; },
49100
+ set exports(v){ fseventsHandlerExports = v; },
49101
+ };
50196
49102
 
50197
49103
  const fs$6 = require$$0__default;
50198
49104
  const sysPath$1 = require$$0$4;
@@ -50715,21 +49621,21 @@ async _addToFsEvents(path, transform, forceAdd, priorDepth) {
50715
49621
  };
50716
49622
 
50717
49623
  fseventsHandler.exports = FsEventsHandler$1;
50718
- fseventsHandler.exports.canUse = canUse;
49624
+ fseventsHandlerExports.canUse = canUse;
50719
49625
 
50720
49626
  const { EventEmitter: EventEmitter$2 } = require$$0$5;
50721
49627
  const fs$5 = require$$0__default;
50722
49628
  const sysPath = require$$0$4;
50723
49629
  const { promisify } = require$$0$6;
50724
49630
  const readdirp = readdirp_1;
50725
- const anymatch = anymatch$2.exports.default;
49631
+ const anymatch = anymatchExports.default;
50726
49632
  const globParent = globParent$2;
50727
49633
  const isGlob = isGlob$2;
50728
49634
  const braces = braces_1;
50729
49635
  const normalizePath = normalizePath$2;
50730
49636
 
50731
49637
  const NodeFsHandler = nodefsHandler;
50732
- const FsEventsHandler = fseventsHandler.exports;
49638
+ const FsEventsHandler = fseventsHandlerExports;
50733
49639
  const {
50734
49640
  EV_ALL,
50735
49641
  EV_READY,
@@ -52169,7 +51075,7 @@ var getArgs = function getArgumentsForPosition (
52169
51075
  const fs$4 = require$$0__default;
52170
51076
  const os$1 = require$$2;
52171
51077
  const path$5 = require$$0$4;
52172
- const colors = picocolors.exports;
51078
+ const colors = picocolorsExports;
52173
51079
  const childProcess$1 = require$$2$1;
52174
51080
 
52175
51081
  const guessEditor = guess;
@@ -52350,7 +51256,7 @@ async function resolveHttpServer({ proxy }, app, httpsOptions) {
52350
51256
  async function resolveHttpsConfig(https) {
52351
51257
  if (!https)
52352
51258
  return undefined;
52353
- const httpsOption = isObject$2(https) ? { ...https } : {};
51259
+ const httpsOption = isObject$1(https) ? { ...https } : {};
52354
51260
  const { ca, cert, key, pfx } = httpsOption;
52355
51261
  Object.assign(httpsOption, {
52356
51262
  ca: readFileIfExists(ca),
@@ -52402,7 +51308,7 @@ function setClientErrorHandler(server, logger) {
52402
51308
  let msg = '400 Bad Request';
52403
51309
  if (err.code === 'HPE_HEADER_OVERFLOW') {
52404
51310
  msg = '431 Request Header Fields Too Large';
52405
- logger.warn(picocolors.exports.yellow('Server responded with status code 431. ' +
51311
+ logger.warn(picocolorsExports.yellow('Server responded with status code 431. ' +
52406
51312
  'See https://vitejs.dev/guide/troubleshooting.html#_431-request-header-fields-too-large.'));
52407
51313
  }
52408
51314
  if (err.code === 'ECONNRESET' || !socket.writable) {
@@ -53230,6 +52136,7 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
53230
52136
  mainFields: ['main'],
53231
52137
  browserField: true,
53232
52138
  conditions: [],
52139
+ overrideConditions: ['production', 'development'],
53233
52140
  extensions: ['.js', '.cjs', '.json'],
53234
52141
  dedupe,
53235
52142
  preserveSymlinks,
@@ -53358,7 +52265,11 @@ function isPrimitive(value) {
53358
52265
  return !value || (typeof value !== 'object' && typeof value !== 'function');
53359
52266
  }
53360
52267
 
53361
- var isWsl$2 = {exports: {}};
52268
+ var isWslExports = {};
52269
+ var isWsl$2 = {
52270
+ get exports(){ return isWslExports; },
52271
+ set exports(v){ isWslExports = v; },
52272
+ };
53362
52273
 
53363
52274
  const fs$3 = require$$0__default;
53364
52275
 
@@ -53442,7 +52353,7 @@ var defineLazyProp = (object, propertyName, fn) => {
53442
52353
  const path$3 = require$$0$4;
53443
52354
  const childProcess = require$$2$1;
53444
52355
  const {promises: fs$1, constants: fsConstants} = require$$0__default;
53445
- const isWsl = isWsl$2.exports;
52356
+ const isWsl = isWslExports;
53446
52357
  const isDocker = isDocker_1;
53447
52358
  const defineLazyProperty = defineLazyProp;
53448
52359
 
@@ -53755,7 +52666,11 @@ open.openApp = openApp;
53755
52666
 
53756
52667
  var open_1 = open;
53757
52668
 
53758
- var crossSpawn = {exports: {}};
52669
+ var crossSpawnExports = {};
52670
+ var crossSpawn = {
52671
+ get exports(){ return crossSpawnExports; },
52672
+ set exports(v){ crossSpawnExports = v; },
52673
+ };
53759
52674
 
53760
52675
  var windows;
53761
52676
  var hasRequiredWindows;
@@ -54041,7 +52956,11 @@ const whichSync = (cmd, opt) => {
54041
52956
  var which_1 = which$1;
54042
52957
  which$1.sync = whichSync;
54043
52958
 
54044
- var pathKey$1 = {exports: {}};
52959
+ var pathKeyExports = {};
52960
+ var pathKey$1 = {
52961
+ get exports(){ return pathKeyExports; },
52962
+ set exports(v){ pathKeyExports = v; },
52963
+ };
54045
52964
 
54046
52965
  const pathKey = (options = {}) => {
54047
52966
  const environment = options.env || process.env;
@@ -54056,11 +52975,11 @@ const pathKey = (options = {}) => {
54056
52975
 
54057
52976
  pathKey$1.exports = pathKey;
54058
52977
  // TODO: Remove this for the next major release
54059
- pathKey$1.exports.default = pathKey;
52978
+ pathKeyExports.default = pathKey;
54060
52979
 
54061
52980
  const path$1 = require$$0$4;
54062
52981
  const which = which_1;
54063
- const getPathKey = pathKey$1.exports;
52982
+ const getPathKey = pathKeyExports;
54064
52983
 
54065
52984
  function resolveCommandAttempt(parsed, withoutPathExt) {
54066
52985
  const env = parsed.options.env || process.env;
@@ -54378,11 +53297,11 @@ function spawnSync(command, args, options) {
54378
53297
  }
54379
53298
 
54380
53299
  crossSpawn.exports = spawn;
54381
- crossSpawn.exports.spawn = spawn;
54382
- crossSpawn.exports.sync = spawnSync;
53300
+ crossSpawnExports.spawn = spawn;
53301
+ crossSpawnExports.sync = spawnSync;
54383
53302
 
54384
- crossSpawn.exports._parse = parse$3;
54385
- crossSpawn.exports._enoent = enoent;
53303
+ crossSpawnExports._parse = parse$3;
53304
+ crossSpawnExports._enoent = enoent;
54386
53305
 
54387
53306
  /**
54388
53307
  * The following is modified based on source found in
@@ -54411,12 +53330,12 @@ function openBrowser(url, opt, logger) {
54411
53330
  }
54412
53331
  function executeNodeScript(scriptPath, url, logger) {
54413
53332
  const extraArgs = process.argv.slice(2);
54414
- const child = crossSpawn.exports(process.execPath, [scriptPath, ...extraArgs, url], {
53333
+ const child = crossSpawnExports(process.execPath, [scriptPath, ...extraArgs, url], {
54415
53334
  stdio: 'inherit',
54416
53335
  });
54417
53336
  child.on('close', (code) => {
54418
53337
  if (code !== 0) {
54419
- logger.error(picocolors.exports.red(`\nThe script specified as BROWSER environment variable failed.\n\n${picocolors.exports.cyan(scriptPath)} exited with code ${code}.`), { error: null });
53338
+ logger.error(picocolorsExports.red(`\nThe script specified as BROWSER environment variable failed.\n\n${picocolorsExports.cyan(scriptPath)} exited with code ${code}.`), { error: null });
54420
53339
  }
54421
53340
  });
54422
53341
  return true;
@@ -54484,10 +53403,10 @@ function bindShortcuts(server, opts) {
54484
53403
  }
54485
53404
  server._shortcutsOptions = opts;
54486
53405
  if (opts.print) {
54487
- server.config.logger.info(picocolors.exports.dim(picocolors.exports.green(' ➜')) +
54488
- picocolors.exports.dim(' press ') +
54489
- picocolors.exports.bold('h') +
54490
- picocolors.exports.dim(' to show help'));
53406
+ server.config.logger.info(picocolorsExports.dim(picocolorsExports.green(' ➜')) +
53407
+ picocolorsExports.dim(' press ') +
53408
+ picocolorsExports.bold('h') +
53409
+ picocolorsExports.dim(' to show help'));
54491
53410
  }
54492
53411
  const shortcuts = (opts.customShortcuts ?? [])
54493
53412
  .filter(isDefined)
@@ -54504,10 +53423,10 @@ function bindShortcuts(server, opts) {
54504
53423
  if (input === 'h') {
54505
53424
  server.config.logger.info([
54506
53425
  '',
54507
- picocolors.exports.bold(' Shortcuts'),
54508
- ...shortcuts.map((shortcut) => picocolors.exports.dim(' press ') +
54509
- picocolors.exports.bold(shortcut.key) +
54510
- picocolors.exports.dim(` to ${shortcut.description}`)),
53426
+ picocolorsExports.bold(' Shortcuts'),
53427
+ ...shortcuts.map((shortcut) => picocolorsExports.dim(' press ') +
53428
+ picocolorsExports.bold(shortcut.key) +
53429
+ picocolorsExports.dim(` to ${shortcut.description}`)),
54511
53430
  ].join('\n'));
54512
53431
  }
54513
53432
  const shortcut = shortcuts.find((shortcut) => shortcut.key === input);
@@ -54560,7 +53479,11 @@ const BASE_SHORTCUTS = [
54560
53479
  },
54561
53480
  ];
54562
53481
 
54563
- var bufferUtil$1 = {exports: {}};
53482
+ var bufferUtilExports = {};
53483
+ var bufferUtil$1 = {
53484
+ get exports(){ return bufferUtilExports; },
53485
+ set exports(v){ bufferUtilExports = v; },
53486
+ };
54564
53487
 
54565
53488
  var constants = {
54566
53489
  BINARY_TYPES: ['nodebuffer', 'arraybuffer', 'fragments'],
@@ -54685,12 +53608,12 @@ if (!process.env.WS_NO_BUFFER_UTIL) {
54685
53608
  try {
54686
53609
  const bufferUtil = require('bufferutil');
54687
53610
 
54688
- bufferUtil$1.exports.mask = function (source, mask, output, offset, length) {
53611
+ bufferUtilExports.mask = function (source, mask, output, offset, length) {
54689
53612
  if (length < 48) _mask(source, mask, output, offset, length);
54690
53613
  else bufferUtil.mask(source, mask, output, offset, length);
54691
53614
  };
54692
53615
 
54693
- bufferUtil$1.exports.unmask = function (buffer, mask) {
53616
+ bufferUtilExports.unmask = function (buffer, mask) {
54694
53617
  if (buffer.length < 32) _unmask(buffer, mask);
54695
53618
  else bufferUtil.unmask(buffer, mask);
54696
53619
  };
@@ -54755,7 +53678,7 @@ var limiter = Limiter$1;
54755
53678
 
54756
53679
  const zlib = require$$0$a;
54757
53680
 
54758
- const bufferUtil = bufferUtil$1.exports;
53681
+ const bufferUtil = bufferUtilExports;
54759
53682
  const Limiter = limiter;
54760
53683
  const { kStatusCode: kStatusCode$2 } = constants;
54761
53684
 
@@ -55263,7 +54186,11 @@ function inflateOnError(err) {
55263
54186
  this[kCallback](err);
55264
54187
  }
55265
54188
 
55266
- var validation = {exports: {}};
54189
+ var validationExports = {};
54190
+ var validation = {
54191
+ get exports(){ return validationExports; },
54192
+ set exports(v){ validationExports = v; },
54193
+ };
55267
54194
 
55268
54195
  //
55269
54196
  // Allowed token characters:
@@ -55381,7 +54308,7 @@ if (!process.env.WS_NO_UTF_8_VALIDATE) {
55381
54308
  try {
55382
54309
  const isValidUTF8 = require('utf-8-validate');
55383
54310
 
55384
- validation.exports.isValidUTF8 = function (buf) {
54311
+ validationExports.isValidUTF8 = function (buf) {
55385
54312
  return buf.length < 150 ? _isValidUTF8(buf) : isValidUTF8(buf);
55386
54313
  };
55387
54314
  } catch (e) {
@@ -55398,8 +54325,8 @@ const {
55398
54325
  kStatusCode: kStatusCode$1,
55399
54326
  kWebSocket: kWebSocket$2
55400
54327
  } = constants;
55401
- const { concat, toArrayBuffer, unmask } = bufferUtil$1.exports;
55402
- const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validation.exports;
54328
+ const { concat, toArrayBuffer, unmask } = bufferUtilExports;
54329
+ const { isValidStatusCode: isValidStatusCode$1, isValidUTF8 } = validationExports;
55403
54330
 
55404
54331
  const GET_INFO = 0;
55405
54332
  const GET_PAYLOAD_LENGTH_16 = 1;
@@ -56011,8 +54938,8 @@ const { randomFillSync } = require$$5;
56011
54938
 
56012
54939
  const PerMessageDeflate$2 = permessageDeflate;
56013
54940
  const { EMPTY_BUFFER: EMPTY_BUFFER$1 } = constants;
56014
- const { isValidStatusCode } = validation.exports;
56015
- const { mask: applyMask, toBuffer: toBuffer$1 } = bufferUtil$1.exports;
54941
+ const { isValidStatusCode } = validationExports;
54942
+ const { mask: applyMask, toBuffer: toBuffer$1 } = bufferUtilExports;
56016
54943
 
56017
54944
  const kByteLength = Symbol('kByteLength');
56018
54945
  const maskBuffer = Buffer.alloc(4);
@@ -56771,7 +55698,7 @@ function callListener(listener, thisArg, event) {
56771
55698
  }
56772
55699
  }
56773
55700
 
56774
- const { tokenChars: tokenChars$1 } = validation.exports;
55701
+ const { tokenChars: tokenChars$1 } = validationExports;
56775
55702
 
56776
55703
  /**
56777
55704
  * Adds an offer to the map of extension offers or a parameter to the map of
@@ -57000,7 +55927,7 @@ const {
57000
55927
  EventTarget: { addEventListener, removeEventListener }
57001
55928
  } = eventTarget;
57002
55929
  const { format, parse: parse$1 } = extension$1;
57003
- const { toBuffer } = bufferUtil$1.exports;
55930
+ const { toBuffer } = bufferUtilExports;
57004
55931
 
57005
55932
  const closeTimeout = 30 * 1000;
57006
55933
  const kAborted = Symbol('kAborted');
@@ -58276,7 +57203,7 @@ function socketOnError$1() {
58276
57203
  }
58277
57204
  }
58278
57205
 
58279
- const { tokenChars } = validation.exports;
57206
+ const { tokenChars } = validationExports;
58280
57207
 
58281
57208
  /**
58282
57209
  * Parses the `Sec-WebSocket-Protocol` header into a set of subprotocol names.
@@ -58879,7 +57806,7 @@ const wsServerEvents = [
58879
57806
  function createWebSocketServer(server, config, httpsOptions) {
58880
57807
  let wss;
58881
57808
  let httpsServer = undefined;
58882
- const hmr = isObject$2(config.server.hmr) && config.server.hmr;
57809
+ const hmr = isObject$1(config.server.hmr) && config.server.hmr;
58883
57810
  const hmrServer = hmr && hmr.server;
58884
57811
  const hmrPort = hmr && hmr.port;
58885
57812
  // TODO: the main server port may not have been chosen yet as it may use the next available
@@ -58953,10 +57880,10 @@ function createWebSocketServer(server, config, httpsOptions) {
58953
57880
  });
58954
57881
  wss.on('error', (e) => {
58955
57882
  if (e.code === 'EADDRINUSE') {
58956
- config.logger.error(picocolors.exports.red(`WebSocket server error: Port is already in use`), { error: e });
57883
+ config.logger.error(picocolorsExports.red(`WebSocket server error: Port is already in use`), { error: e });
58957
57884
  }
58958
57885
  else {
58959
- config.logger.error(picocolors.exports.red(`WebSocket server error:\n${e.stack || e.message}`), { error: e });
57886
+ config.logger.error(picocolorsExports.red(`WebSocket server error:\n${e.stack || e.message}`), { error: e });
58960
57887
  }
58961
57888
  });
58962
57889
  // Provide a wrapper to the ws client so we can send messages in JSON format
@@ -59104,11 +58031,23 @@ function baseMiddleware({ config, }) {
59104
58031
  };
59105
58032
  }
59106
58033
 
59107
- var httpProxy$3 = {exports: {}};
58034
+ var httpProxyExports$1 = {};
58035
+ var httpProxy$3 = {
58036
+ get exports(){ return httpProxyExports$1; },
58037
+ set exports(v){ httpProxyExports$1 = v; },
58038
+ };
59108
58039
 
59109
- var httpProxy$2 = {exports: {}};
58040
+ var httpProxyExports = {};
58041
+ var httpProxy$2 = {
58042
+ get exports(){ return httpProxyExports; },
58043
+ set exports(v){ httpProxyExports = v; },
58044
+ };
59110
58045
 
59111
- var eventemitter3 = {exports: {}};
58046
+ var eventemitter3Exports = {};
58047
+ var eventemitter3 = {
58048
+ get exports(){ return eventemitter3Exports; },
58049
+ set exports(v){ eventemitter3Exports = v; },
58050
+ };
59112
58051
 
59113
58052
  (function (module) {
59114
58053
 
@@ -59885,7 +58824,11 @@ var webOutgoing = { // <--
59885
58824
 
59886
58825
  };
59887
58826
 
59888
- var followRedirects$1 = {exports: {}};
58827
+ var followRedirectsExports = {};
58828
+ var followRedirects$1 = {
58829
+ get exports(){ return followRedirectsExports; },
58830
+ set exports(v){ followRedirectsExports = v; },
58831
+ };
59889
58832
 
59890
58833
  var debug$3;
59891
58834
 
@@ -60495,13 +59438,13 @@ function isSubdomain(subdomain, domain) {
60495
59438
 
60496
59439
  // Exports
60497
59440
  followRedirects$1.exports = wrap({ http: http$1, https: https$1 });
60498
- followRedirects$1.exports.wrap = wrap;
59441
+ followRedirectsExports.wrap = wrap;
60499
59442
 
60500
59443
  var httpNative = require$$1$1,
60501
59444
  httpsNative = require$$1$2,
60502
59445
  web_o = webOutgoing,
60503
59446
  common$1 = common$3,
60504
- followRedirects = followRedirects$1.exports;
59447
+ followRedirects = followRedirectsExports;
60505
59448
 
60506
59449
  web_o = Object.keys(web_o).map(function(pass) {
60507
59450
  return web_o[pass];
@@ -60859,7 +59802,7 @@ var wsIncoming = {
60859
59802
  var httpProxy = module.exports,
60860
59803
  extend = require$$0$6._extend,
60861
59804
  parse_url = require$$0$9.parse,
60862
- EE3 = eventemitter3.exports,
59805
+ EE3 = eventemitter3Exports,
60863
59806
  http = require$$1$1,
60864
59807
  https = require$$1$2,
60865
59808
  web = webIncoming,
@@ -61043,7 +59986,7 @@ var wsIncoming = {
61043
59986
  } (httpProxy$2));
61044
59987
 
61045
59988
  // Use explicit /index.js to help browserify negociation in require '/lib/http-proxy' (!)
61046
- var ProxyServer = httpProxy$2.exports.Server;
59989
+ var ProxyServer = httpProxyExports.Server;
61047
59990
 
61048
59991
 
61049
59992
  /**
@@ -61124,7 +60067,7 @@ var httpProxy$1 = ProxyServer;
61124
60067
  module.exports = httpProxy$1;
61125
60068
  } (httpProxy$3));
61126
60069
 
61127
- var httpProxy = /*@__PURE__*/getDefaultExportFromCjs(httpProxy$3.exports);
60070
+ var httpProxy = /*@__PURE__*/getDefaultExportFromCjs(httpProxyExports$1);
61128
60071
 
61129
60072
  const debug$1 = createDebugger('vite:proxy');
61130
60073
  function proxyMiddleware(httpServer, options, config) {
@@ -61143,7 +60086,7 @@ function proxyMiddleware(httpServer, options, config) {
61143
60086
  // When it is ws proxy, res is net.Socket
61144
60087
  const res = originalRes;
61145
60088
  if ('req' in res) {
61146
- config.logger.error(`${picocolors.exports.red(`http proxy error at ${originalRes.req.url}:`)}\n${err.stack}`, {
60089
+ config.logger.error(`${picocolorsExports.red(`http proxy error at ${originalRes.req.url}:`)}\n${err.stack}`, {
61147
60090
  timestamp: true,
61148
60091
  error: err,
61149
60092
  });
@@ -61156,7 +60099,7 @@ function proxyMiddleware(httpServer, options, config) {
61156
60099
  }
61157
60100
  }
61158
60101
  else {
61159
- config.logger.error(`${picocolors.exports.red(`ws proxy error:`)}\n${err.stack}`, {
60102
+ config.logger.error(`${picocolorsExports.red(`ws proxy error:`)}\n${err.stack}`, {
61160
60103
  timestamp: true,
61161
60104
  error: err,
61162
60105
  });
@@ -61225,7 +60168,11 @@ function doesProxyContextMatchUrl(context, url) {
61225
60168
  url.startsWith(context));
61226
60169
  }
61227
60170
 
61228
- var lib = {exports: {}};
60171
+ var libExports = {};
60172
+ var lib = {
60173
+ get exports(){ return libExports; },
60174
+ set exports(v){ libExports = v; },
60175
+ };
61229
60176
 
61230
60177
  (function (module, exports) {
61231
60178
 
@@ -61350,7 +60297,7 @@ var lib = {exports: {}};
61350
60297
  }
61351
60298
  } (lib));
61352
60299
 
61353
- var history = lib.exports;
60300
+ var history = libExports;
61354
60301
 
61355
60302
  function htmlFallbackMiddleware(root, spaFallback) {
61356
60303
  const historyHtmlFallbackMiddleware = history({
@@ -61454,14 +60401,14 @@ function transformMiddleware(server) {
61454
60401
  const rawUrl = removeImportQuery(url);
61455
60402
  warning =
61456
60403
  'Assets in public cannot be imported from JavaScript.\n' +
61457
- `Instead of ${picocolors.exports.cyan(rawUrl)}, put the file in the src directory, and use ${picocolors.exports.cyan(rawUrl.replace(publicPath, '/src/'))} instead.`;
60404
+ `Instead of ${picocolorsExports.cyan(rawUrl)}, put the file in the src directory, and use ${picocolorsExports.cyan(rawUrl.replace(publicPath, '/src/'))} instead.`;
61458
60405
  }
61459
60406
  else {
61460
60407
  warning =
61461
60408
  `files in the public directory are served at the root path.\n` +
61462
- `Instead of ${picocolors.exports.cyan(url)}, use ${picocolors.exports.cyan(url.replace(publicPath, '/'))}.`;
60409
+ `Instead of ${picocolorsExports.cyan(url)}, use ${picocolorsExports.cyan(url.replace(publicPath, '/'))}.`;
61463
60410
  }
61464
- logger.warn(picocolors.exports.yellow(warning));
60411
+ logger.warn(picocolorsExports.yellow(warning));
61465
60412
  }
61466
60413
  }
61467
60414
  if (isJSRequest(url) ||
@@ -62093,8 +61040,8 @@ async function createServer(inlineConfig = {}) {
62093
61040
  ws.on('vite:invalidate', async ({ path, message }) => {
62094
61041
  const mod = moduleGraph.urlToModuleMap.get(path);
62095
61042
  if (mod && mod.isSelfAccepting && mod.lastHMRTimestamp > 0) {
62096
- config.logger.info(picocolors.exports.yellow(`hmr invalidate `) +
62097
- picocolors.exports.dim(path) +
61043
+ config.logger.info(picocolorsExports.yellow(`hmr invalidate `) +
61044
+ picocolorsExports.dim(path) +
62098
61045
  (message ? ` ${message}` : ''), { timestamp: true });
62099
61046
  const file = getShortName(mod.file, config.root);
62100
61047
  updateModules(file, [...mod.importers], mod.lastHMRTimestamp, server, true);
@@ -62119,7 +61066,7 @@ async function createServer(inlineConfig = {}) {
62119
61066
  // cors (enabled by default)
62120
61067
  const { cors } = serverConfig;
62121
61068
  if (cors !== false) {
62122
- middlewares.use(lib$1.exports(typeof cors === 'boolean' ? {} : cors));
61069
+ middlewares.use(libExports$1(typeof cors === 'boolean' ? {} : cors));
62123
61070
  }
62124
61071
  // proxy
62125
61072
  const { proxy } = serverConfig;
@@ -62283,7 +61230,7 @@ function resolveServerOptions(root, raw, logger) {
62283
61230
  };
62284
61231
  if (server.origin?.endsWith('/')) {
62285
61232
  server.origin = server.origin.slice(0, -1);
62286
- logger.warn(picocolors.exports.yellow(`${picocolors.exports.bold('(!)')} server.origin should not end with "/". Using "${server.origin}" instead.`));
61233
+ logger.warn(picocolorsExports.yellow(`${picocolorsExports.bold('(!)')} server.origin should not end with "/". Using "${server.origin}" instead.`));
62287
61234
  }
62288
61235
  return server;
62289
61236
  }
@@ -62494,7 +61441,7 @@ async function preview(inlineConfig = {}) {
62494
61441
  // cors
62495
61442
  const { cors } = config.preview;
62496
61443
  if (cors !== false) {
62497
- app.use(lib$1.exports(typeof cors === 'boolean' ? {} : cors));
61444
+ app.use(libExports$1(typeof cors === 'boolean' ? {} : cors));
62498
61445
  }
62499
61446
  // proxy
62500
61447
  const { proxy } = config.preview;
@@ -62867,16 +61814,16 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
62867
61814
  ]);
62868
61815
  // validate config
62869
61816
  if (middlewareMode === 'ssr') {
62870
- logger.warn(picocolors.exports.yellow(`Setting server.middlewareMode to 'ssr' is deprecated, set server.middlewareMode to \`true\`${config.appType === 'custom' ? '' : ` and appType to 'custom'`} instead`));
61817
+ logger.warn(picocolorsExports.yellow(`Setting server.middlewareMode to 'ssr' is deprecated, set server.middlewareMode to \`true\`${config.appType === 'custom' ? '' : ` and appType to 'custom'`} instead`));
62871
61818
  }
62872
61819
  if (middlewareMode === 'html') {
62873
- logger.warn(picocolors.exports.yellow(`Setting server.middlewareMode to 'html' is deprecated, set server.middlewareMode to \`true\` instead`));
61820
+ logger.warn(picocolorsExports.yellow(`Setting server.middlewareMode to 'html' is deprecated, set server.middlewareMode to \`true\` instead`));
62874
61821
  }
62875
61822
  if (config.server?.force &&
62876
61823
  !isBuild &&
62877
61824
  config.optimizeDeps?.force === undefined) {
62878
61825
  resolved.optimizeDeps.force = true;
62879
- logger.warn(picocolors.exports.yellow(`server.force is deprecated, use optimizeDeps.force instead`));
61826
+ logger.warn(picocolorsExports.yellow(`server.force is deprecated, use optimizeDeps.force instead`));
62880
61827
  }
62881
61828
  if (process.env.DEBUG) {
62882
61829
  debug(`using resolved config: %O`, {
@@ -62889,7 +61836,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
62889
61836
  });
62890
61837
  }
62891
61838
  if (config.build?.terserOptions && config.build.minify !== 'terser') {
62892
- logger.warn(picocolors.exports.yellow(`build.terserOptions is specified but build.minify is not set to use Terser. ` +
61839
+ logger.warn(picocolorsExports.yellow(`build.terserOptions is specified but build.minify is not set to use Terser. ` +
62893
61840
  `Note Vite now defaults to use esbuild for minification. If you still ` +
62894
61841
  `prefer Terser, set build.minify to "terser".`));
62895
61842
  }
@@ -62903,7 +61850,7 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development',
62903
61850
  const firstAssetFileNames = assetFileNamesList[0];
62904
61851
  const hasDifferentReference = assetFileNamesList.some((assetFileNames) => assetFileNames !== firstAssetFileNames);
62905
61852
  if (hasDifferentReference) {
62906
- resolved.logger.warn(picocolors.exports.yellow(`
61853
+ resolved.logger.warn(picocolorsExports.yellow(`
62907
61854
  assetFileNames isn't equal for every build.rollupOptions.output. A single pattern across all outputs is supported by Vite.
62908
61855
  `));
62909
61856
  }
@@ -62917,7 +61864,7 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter
62917
61864
  */
62918
61865
  function resolveBaseUrl(base = '/', isBuild, logger) {
62919
61866
  if (base.startsWith('.')) {
62920
- logger.warn(picocolors.exports.yellow(picocolors.exports.bold(`(!) invalid "base" option: ${base}. The value can only be an absolute ` +
61867
+ logger.warn(picocolorsExports.yellow(picocolorsExports.bold(`(!) invalid "base" option: ${base}. The value can only be an absolute ` +
62921
61868
  `URL, ./, or an empty string.`)));
62922
61869
  return '/';
62923
61870
  }
@@ -62925,7 +61872,7 @@ function resolveBaseUrl(base = '/', isBuild, logger) {
62925
61872
  const isExternal = isExternalUrl(base);
62926
61873
  // no leading slash warn
62927
61874
  if (!isExternal && !base.startsWith('/')) {
62928
- logger.warn(picocolors.exports.yellow(picocolors.exports.bold(`(!) "base" option should start with a slash.`)));
61875
+ logger.warn(picocolorsExports.yellow(picocolorsExports.bold(`(!) "base" option should start with a slash.`)));
62929
61876
  }
62930
61877
  // parse base when command is serve or base is not External URL
62931
61878
  if (!isBuild || !isExternal) {
@@ -62998,7 +61945,7 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
62998
61945
  const config = await (typeof userConfig === 'function'
62999
61946
  ? userConfig(configEnv)
63000
61947
  : userConfig);
63001
- if (!isObject$2(config)) {
61948
+ if (!isObject$1(config)) {
63002
61949
  throw new Error(`config must export or return an object.`);
63003
61950
  }
63004
61951
  return {
@@ -63008,7 +61955,7 @@ async function loadConfigFromFile(configEnv, configFile, configRoot = process.cw
63008
61955
  };
63009
61956
  }
63010
61957
  catch (e) {
63011
- createLogger(logLevel).error(picocolors.exports.red(`failed to load config from ${resolvedPath}`), { error: e });
61958
+ createLogger(logLevel).error(picocolorsExports.red(`failed to load config from ${resolvedPath}`), { error: e });
63012
61959
  throw e;
63013
61960
  }
63014
61961
  }
@@ -63165,4 +62112,4 @@ function isDepsOptimizerEnabled(config, ssr) {
63165
62112
  (command === 'serve' && disabled === 'dev'));
63166
62113
  }
63167
62114
 
63168
- export { picocolors as A, bindShortcuts as B, commonjsGlobal as C, index$1 as D, build$1 as E, index as F, preview$1 as G, preprocessCSS as a, build as b, createServer as c, resolvePackageData as d, buildErrorMessage as e, formatPostcssSourceMap as f, defineConfig as g, resolveConfig as h, resolveBaseUrl as i, getDepOptimizationConfig as j, isDepsOptimizerEnabled as k, loadConfigFromFile as l, mergeConfig as m, normalizePath$3 as n, optimizeDeps as o, preview as p, mergeAlias as q, resolvePackageEntry as r, sortUserPlugins as s, transformWithEsbuild as t, createFilter as u, send$1 as v, createLogger as w, searchForWorkspaceRoot as x, loadEnv as y, resolveEnvPrefix as z };
62115
+ export { picocolorsExports as A, bindShortcuts as B, commonjsGlobal as C, index$1 as D, build$1 as E, index as F, preview$1 as G, preprocessCSS as a, build as b, createServer as c, resolvePackageData as d, buildErrorMessage as e, formatPostcssSourceMap as f, defineConfig as g, resolveConfig as h, resolveBaseUrl as i, getDepOptimizationConfig as j, isDepsOptimizerEnabled as k, loadConfigFromFile as l, mergeConfig as m, normalizePath$3 as n, optimizeDeps as o, preview as p, mergeAlias as q, resolvePackageEntry as r, sortUserPlugins as s, transformWithEsbuild as t, createFilter as u, send$1 as v, createLogger as w, searchForWorkspaceRoot as x, loadEnv as y, resolveEnvPrefix as z };