@vue/compiler-sfc 3.6.0-beta.5 → 3.6.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.6.0-beta.5
2
+ * @vue/compiler-sfc v3.6.0-beta.7
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -204,38 +204,38 @@ function genNormalScriptCssVarsCode(cssVars, bindings, id, isProd, defaultVar) {
204
204
  }
205
205
 
206
206
  //#endregion
207
- //#region \0@oxc-project+runtime@0.111.0/helpers/checkPrivateRedeclaration.js
207
+ //#region \0@oxc-project+runtime@0.114.0/helpers/checkPrivateRedeclaration.js
208
208
  function _checkPrivateRedeclaration(e, t) {
209
209
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
210
210
  }
211
211
 
212
212
  //#endregion
213
- //#region \0@oxc-project+runtime@0.111.0/helpers/classPrivateMethodInitSpec.js
213
+ //#region \0@oxc-project+runtime@0.114.0/helpers/classPrivateMethodInitSpec.js
214
214
  function _classPrivateMethodInitSpec(e, a) {
215
215
  _checkPrivateRedeclaration(e, a), a.add(e);
216
216
  }
217
217
 
218
218
  //#endregion
219
- //#region \0@oxc-project+runtime@0.111.0/helpers/classPrivateFieldInitSpec.js
219
+ //#region \0@oxc-project+runtime@0.114.0/helpers/classPrivateFieldInitSpec.js
220
220
  function _classPrivateFieldInitSpec(e, t, a) {
221
221
  _checkPrivateRedeclaration(e, t), t.set(e, a);
222
222
  }
223
223
 
224
224
  //#endregion
225
- //#region \0@oxc-project+runtime@0.111.0/helpers/assertClassBrand.js
225
+ //#region \0@oxc-project+runtime@0.114.0/helpers/assertClassBrand.js
226
226
  function _assertClassBrand(e, t, n) {
227
227
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
228
228
  throw new TypeError("Private element is not present on this object");
229
229
  }
230
230
 
231
231
  //#endregion
232
- //#region \0@oxc-project+runtime@0.111.0/helpers/classPrivateFieldGet2.js
232
+ //#region \0@oxc-project+runtime@0.114.0/helpers/classPrivateFieldGet2.js
233
233
  function _classPrivateFieldGet2(s, a) {
234
234
  return s.get(_assertClassBrand(s, a));
235
235
  }
236
236
 
237
237
  //#endregion
238
- //#region \0@oxc-project+runtime@0.111.0/helpers/classPrivateFieldSet2.js
238
+ //#region \0@oxc-project+runtime@0.114.0/helpers/classPrivateFieldSet2.js
239
239
  function _classPrivateFieldSet2(s, a, r) {
240
240
  return s.set(_assertClassBrand(s, a), r), r;
241
241
  }
@@ -3316,7 +3316,6 @@ const trimPlugin = () => {
3316
3316
  };
3317
3317
  };
3318
3318
  trimPlugin.postcss = true;
3319
- var pluginTrim_default = trimPlugin;
3320
3319
 
3321
3320
  //#endregion
3322
3321
  //#region node_modules/.pnpm/postcss-selector-parser@7.1.1/node_modules/postcss-selector-parser/dist/util/unesc.js
@@ -6553,7 +6552,6 @@ function extractAndWrapNodes(parentNode) {
6553
6552
  }
6554
6553
  }
6555
6554
  scopedPlugin.postcss = true;
6556
- var pluginScoped_default = scopedPlugin;
6557
6555
 
6558
6556
  //#endregion
6559
6557
  //#region node_modules/.pnpm/source-map@0.6.1/node_modules/source-map/lib/base64.js
@@ -11587,8 +11585,8 @@ function doCompileStyle(options) {
11587
11585
  id: shortId,
11588
11586
  isProd
11589
11587
  }));
11590
- if (trim) plugins.push(pluginTrim_default());
11591
- if (scoped) plugins.push(pluginScoped_default(longId));
11588
+ if (trim) plugins.push(trimPlugin());
11589
+ if (scoped) plugins.push(scopedPlugin(longId));
11592
11590
  let cssModules;
11593
11591
  if (modules) {
11594
11592
  if (!options.isAsync) throw new Error("[@vue/compiler-sfc] `modules` option can only be used with compileStyleAsync().");
@@ -11841,7 +11839,7 @@ function resolveParserPlugins(lang, userPlugins, dts = false) {
11841
11839
  if (!userPlugins || !userPlugins.some((p) => p === "importAssertions" || p === "importAttributes" || (0, _vue_shared.isArray)(p) && p[0] === "importAttributes")) plugins.push("importAttributes");
11842
11840
  if (lang === "jsx" || lang === "tsx" || lang === "mtsx") plugins.push("jsx");
11843
11841
  else if (userPlugins) userPlugins = userPlugins.filter((p) => p !== "jsx");
11844
- if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "mtsx") {
11842
+ if (lang === "ts" || lang === "mts" || lang === "tsx" || lang === "cts" || lang === "mtsx") {
11845
11843
  plugins.push(["typescript", { dts }], "explicitResourceManagement");
11846
11844
  if (!userPlugins || !userPlugins.includes("decorators")) plugins.push("decorators-legacy");
11847
11845
  }
@@ -11948,7 +11946,7 @@ function processNormalScript(ctx, scopeId) {
11948
11946
  }
11949
11947
 
11950
11948
  //#endregion
11951
- //#region node_modules/.pnpm/@isaacs+balanced-match@4.0.1/node_modules/@isaacs/balanced-match/dist/esm/index.js
11949
+ //#region node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
11952
11950
  const balanced = (a, b, str) => {
11953
11951
  const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
11954
11952
  const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
@@ -11997,7 +11995,7 @@ const range = (a, b, str) => {
11997
11995
  };
11998
11996
 
11999
11997
  //#endregion
12000
- //#region node_modules/.pnpm/@isaacs+brace-expansion@5.0.0/node_modules/@isaacs/brace-expansion/dist/esm/index.js
11998
+ //#region node_modules/.pnpm/brace-expansion@5.0.3/node_modules/brace-expansion/dist/esm/index.js
12001
11999
  const escSlash = "\0SLASH" + Math.random() + "\0";
12002
12000
  const escOpen = "\0OPEN" + Math.random() + "\0";
12003
12001
  const escClose = "\0CLOSE" + Math.random() + "\0";
@@ -12013,6 +12011,7 @@ const openPattern = /\\{/g;
12013
12011
  const closePattern = /\\}/g;
12014
12012
  const commaPattern = /\\,/g;
12015
12013
  const periodPattern = /\\./g;
12014
+ const EXPANSION_MAX = 1e5;
12016
12015
  function numeric(str) {
12017
12016
  return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
12018
12017
  }
@@ -12043,10 +12042,11 @@ function parseCommaParts(str) {
12043
12042
  parts.push.apply(parts, p);
12044
12043
  return parts;
12045
12044
  }
12046
- function expand(str) {
12045
+ function expand(str, options = {}) {
12047
12046
  if (!str) return [];
12047
+ const { max = EXPANSION_MAX } = options;
12048
12048
  if (str.slice(0, 2) === "{}") str = "\\{\\}" + str.slice(2);
12049
- return expand_(escapeBraces(str), true).map(unescapeBraces);
12049
+ return expand_(escapeBraces(str), max, true).map(unescapeBraces);
12050
12050
  }
12051
12051
  function embrace(str) {
12052
12052
  return "{" + str + "}";
@@ -12060,14 +12060,14 @@ function lte(i, y) {
12060
12060
  function gte(i, y) {
12061
12061
  return i >= y;
12062
12062
  }
12063
- function expand_(str, isTop) {
12063
+ function expand_(str, max, isTop) {
12064
12064
  /** @type {string[]} */
12065
12065
  const expansions = [];
12066
12066
  const m = balanced("{", "}", str);
12067
12067
  if (!m) return [str];
12068
12068
  const pre = m.pre;
12069
- const post = m.post.length ? expand_(m.post, false) : [""];
12070
- if (/\$$/.test(m.pre)) for (let k = 0; k < post.length; k++) {
12069
+ const post = m.post.length ? expand_(m.post, max, false) : [""];
12070
+ if (/\$$/.test(m.pre)) for (let k = 0; k < post.length && k < max; k++) {
12071
12071
  const expansion = pre + "{" + m.body + "}" + post[k];
12072
12072
  expansions.push(expansion);
12073
12073
  }
@@ -12079,7 +12079,7 @@ function expand_(str, isTop) {
12079
12079
  if (!isSequence && !isOptions) {
12080
12080
  if (m.post.match(/,(?!,).*\}/)) {
12081
12081
  str = m.pre + "{" + m.body + escClose + m.post;
12082
- return expand_(str);
12082
+ return expand_(str, max, true);
12083
12083
  }
12084
12084
  return [str];
12085
12085
  }
@@ -12088,7 +12088,7 @@ function expand_(str, isTop) {
12088
12088
  else {
12089
12089
  n = parseCommaParts(m.body);
12090
12090
  if (n.length === 1 && n[0] !== void 0) {
12091
- n = expand_(n[0], false).map(embrace);
12091
+ n = expand_(n[0], max, false).map(embrace);
12092
12092
  /* c8 ignore start */
12093
12093
  if (n.length === 1) return post.map((p) => m.pre + n[0] + p);
12094
12094
  }
@@ -12126,9 +12126,9 @@ function expand_(str, isTop) {
12126
12126
  }
12127
12127
  } else {
12128
12128
  N = [];
12129
- for (let j = 0; j < n.length; j++) N.push.apply(N, expand_(n[j], false));
12129
+ for (let j = 0; j < n.length; j++) N.push.apply(N, expand_(n[j], max, false));
12130
12130
  }
12131
- for (let j = 0; j < N.length; j++) for (let k = 0; k < post.length; k++) {
12131
+ for (let j = 0; j < N.length; j++) for (let k = 0; k < post.length && expansions.length < max; k++) {
12132
12132
  const expansion = pre + N[j] + post[k];
12133
12133
  if (!isTop || isSequence || expansion) expansions.push(expansion);
12134
12134
  }
@@ -12137,7 +12137,7 @@ function expand_(str, isTop) {
12137
12137
  }
12138
12138
 
12139
12139
  //#endregion
12140
- //#region node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/assert-valid-pattern.js
12140
+ //#region node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/assert-valid-pattern.js
12141
12141
  const MAX_PATTERN_LENGTH = 1024 * 64;
12142
12142
  const assertValidPattern = (pattern) => {
12143
12143
  if (typeof pattern !== "string") throw new TypeError("invalid pattern");
@@ -12145,7 +12145,7 @@ const assertValidPattern = (pattern) => {
12145
12145
  };
12146
12146
 
12147
12147
  //#endregion
12148
- //#region node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/brace-expressions.js
12148
+ //#region node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/brace-expressions.js
12149
12149
  const posixClasses = {
12150
12150
  "[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
12151
12151
  "[:alpha:]": ["\\p{L}\\p{Nl}", true],
@@ -12267,7 +12267,7 @@ const parseClass = (glob, position) => {
12267
12267
  };
12268
12268
 
12269
12269
  //#endregion
12270
- //#region node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/unescape.js
12270
+ //#region node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/unescape.js
12271
12271
  /**
12272
12272
  * Un-escape a string that has been escaped with {@link escape}.
12273
12273
  *
@@ -12293,8 +12293,10 @@ const unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}
12293
12293
  };
12294
12294
 
12295
12295
  //#endregion
12296
- //#region node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/ast.js
12296
+ //#region node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/ast.js
12297
12297
  var _AST;
12298
+ let _Symbol$for;
12299
+ var _a;
12298
12300
  const types = new Set([
12299
12301
  "!",
12300
12302
  "?",
@@ -12303,6 +12305,53 @@ const types = new Set([
12303
12305
  "@"
12304
12306
  ]);
12305
12307
  const isExtglobType = (c) => types.has(c);
12308
+ const isExtglobAST = (c) => isExtglobType(c.type);
12309
+ const adoptionMap = new Map([
12310
+ ["!", ["@"]],
12311
+ ["?", ["?", "@"]],
12312
+ ["@", ["@"]],
12313
+ ["*", [
12314
+ "*",
12315
+ "+",
12316
+ "?",
12317
+ "@"
12318
+ ]],
12319
+ ["+", ["+", "@"]]
12320
+ ]);
12321
+ const adoptionWithSpaceMap = new Map([
12322
+ ["!", ["?"]],
12323
+ ["@", ["?"]],
12324
+ ["+", ["?", "*"]]
12325
+ ]);
12326
+ const adoptionAnyMap = new Map([
12327
+ ["!", ["?", "@"]],
12328
+ ["?", ["?", "@"]],
12329
+ ["@", ["?", "@"]],
12330
+ ["*", [
12331
+ "*",
12332
+ "+",
12333
+ "?",
12334
+ "@"
12335
+ ]],
12336
+ ["+", [
12337
+ "+",
12338
+ "@",
12339
+ "?",
12340
+ "*"
12341
+ ]]
12342
+ ]);
12343
+ const usurpMap = new Map([
12344
+ ["!", new Map([["!", "@"]])],
12345
+ ["?", new Map([["*", "*"], ["+", "*"]])],
12346
+ ["@", new Map([
12347
+ ["!", "!"],
12348
+ ["?", "?"],
12349
+ ["@", "@"],
12350
+ ["*", "*"],
12351
+ ["+", "+"]
12352
+ ])],
12353
+ ["+", new Map([["?", "*"], ["*", "*"]])]
12354
+ ]);
12306
12355
  const startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
12307
12356
  const startNoDot = "(?!\\.)";
12308
12357
  const addPatternStart = new Set(["[", "."]);
@@ -12312,6 +12361,7 @@ const regExpEscape$1 = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
12312
12361
  const qmark = "[^/]";
12313
12362
  const star$1 = qmark + "*?";
12314
12363
  const starNoEmpty = qmark + "+?";
12364
+ let ID = 0;
12315
12365
  var _root = /* @__PURE__ */ new WeakMap();
12316
12366
  var _hasMagic2 = /* @__PURE__ */ new WeakMap();
12317
12367
  var _uflag = /* @__PURE__ */ new WeakMap();
@@ -12324,7 +12374,25 @@ var _options = /* @__PURE__ */ new WeakMap();
12324
12374
  var _toString = /* @__PURE__ */ new WeakMap();
12325
12375
  var _emptyExt = /* @__PURE__ */ new WeakMap();
12326
12376
  var _AST_brand = /* @__PURE__ */ new WeakSet();
12377
+ _Symbol$for = Symbol.for("nodejs.util.inspect.custom");
12327
12378
  var AST = class AST {
12379
+ get depth() {
12380
+ var _this$parent$depth, _classPrivateFieldGet2$1;
12381
+ return ((_this$parent$depth = (_classPrivateFieldGet2$1 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet2$1 === void 0 ? void 0 : _classPrivateFieldGet2$1.depth) !== null && _this$parent$depth !== void 0 ? _this$parent$depth : -1) + 1;
12382
+ }
12383
+ [_Symbol$for]() {
12384
+ var _classPrivateFieldGet3;
12385
+ return {
12386
+ "@@type": "AST",
12387
+ id: this.id,
12388
+ type: this.type,
12389
+ root: _classPrivateFieldGet2(_root, this).id,
12390
+ parent: (_classPrivateFieldGet3 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.id,
12391
+ depth: this.depth,
12392
+ partsLength: _classPrivateFieldGet2(_parts, this).length,
12393
+ parts: _classPrivateFieldGet2(_parts, this)
12394
+ };
12395
+ }
12328
12396
  constructor(type, parent, options = {}) {
12329
12397
  _classPrivateMethodInitSpec(this, _AST_brand);
12330
12398
  _classPrivateFieldInitSpec(this, _root, void 0);
@@ -12338,6 +12406,7 @@ var AST = class AST {
12338
12406
  _classPrivateFieldInitSpec(this, _options, void 0);
12339
12407
  _classPrivateFieldInitSpec(this, _toString, void 0);
12340
12408
  _classPrivateFieldInitSpec(this, _emptyExt, false);
12409
+ this.id = ++ID;
12341
12410
  this.type = type;
12342
12411
  if (type) _classPrivateFieldSet2(_hasMagic2, this, true);
12343
12412
  _classPrivateFieldSet2(_parent, this, parent);
@@ -12366,36 +12435,36 @@ var AST = class AST {
12366
12435
  for (const p of parts) {
12367
12436
  if (p === "") continue;
12368
12437
  /* c8 ignore start */
12369
- if (typeof p !== "string" && !(p instanceof AST && _classPrivateFieldGet2(_parent, p) === this)) throw new Error("invalid part: " + p);
12438
+ if (typeof p !== "string" && !(p instanceof _a && _classPrivateFieldGet2(_parent, p) === this)) throw new Error("invalid part: " + p);
12370
12439
  /* c8 ignore stop */
12371
12440
  _classPrivateFieldGet2(_parts, this).push(p);
12372
12441
  }
12373
12442
  }
12374
12443
  toJSON() {
12375
- var _classPrivateFieldGet2$1;
12444
+ var _classPrivateFieldGet4;
12376
12445
  const ret = this.type === null ? _classPrivateFieldGet2(_parts, this).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ..._classPrivateFieldGet2(_parts, this).map((p) => p.toJSON())];
12377
12446
  if (this.isStart() && !this.type) ret.unshift([]);
12378
- if (this.isEnd() && (this === _classPrivateFieldGet2(_root, this) || _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((_classPrivateFieldGet2$1 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet2$1 === void 0 ? void 0 : _classPrivateFieldGet2$1.type) === "!")) ret.push({});
12447
+ if (this.isEnd() && (this === _classPrivateFieldGet2(_root, this) || _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((_classPrivateFieldGet4 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.type) === "!")) ret.push({});
12379
12448
  return ret;
12380
12449
  }
12381
12450
  isStart() {
12382
- var _classPrivateFieldGet3;
12451
+ var _classPrivateFieldGet5;
12383
12452
  if (_classPrivateFieldGet2(_root, this) === this) return true;
12384
- if (!((_classPrivateFieldGet3 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet3 === void 0 ? void 0 : _classPrivateFieldGet3.isStart())) return false;
12453
+ if (!((_classPrivateFieldGet5 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.isStart())) return false;
12385
12454
  if (_classPrivateFieldGet2(_parentIndex, this) === 0) return true;
12386
12455
  const p = _classPrivateFieldGet2(_parent, this);
12387
12456
  for (let i = 0; i < _classPrivateFieldGet2(_parentIndex, this); i++) {
12388
12457
  const pp = _classPrivateFieldGet2(_parts, p)[i];
12389
- if (!(pp instanceof AST && pp.type === "!")) return false;
12458
+ if (!(pp instanceof _a && pp.type === "!")) return false;
12390
12459
  }
12391
12460
  return true;
12392
12461
  }
12393
12462
  isEnd() {
12394
- var _classPrivateFieldGet4, _classPrivateFieldGet5, _classPrivateFieldGet6;
12463
+ var _classPrivateFieldGet6, _classPrivateFieldGet7, _classPrivateFieldGet8;
12395
12464
  if (_classPrivateFieldGet2(_root, this) === this) return true;
12396
- if (((_classPrivateFieldGet4 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet4 === void 0 ? void 0 : _classPrivateFieldGet4.type) === "!") return true;
12397
- if (!((_classPrivateFieldGet5 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet5 === void 0 ? void 0 : _classPrivateFieldGet5.isEnd())) return false;
12398
- if (!this.type) return (_classPrivateFieldGet6 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.isEnd();
12465
+ if (((_classPrivateFieldGet6 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet6 === void 0 ? void 0 : _classPrivateFieldGet6.type) === "!") return true;
12466
+ if (!((_classPrivateFieldGet7 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet7 === void 0 ? void 0 : _classPrivateFieldGet7.isEnd())) return false;
12467
+ if (!this.type) return (_classPrivateFieldGet8 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet8 === void 0 ? void 0 : _classPrivateFieldGet8.isEnd();
12399
12468
  /* c8 ignore start */
12400
12469
  const pl = _classPrivateFieldGet2(_parent, this) ? _classPrivateFieldGet2(_parts, _classPrivateFieldGet2(_parent, this)).length : 0;
12401
12470
  /* c8 ignore stop */
@@ -12406,13 +12475,13 @@ var AST = class AST {
12406
12475
  else this.push(part.clone(this));
12407
12476
  }
12408
12477
  clone(parent) {
12409
- const c = new AST(this.type, parent);
12478
+ const c = new _a(this.type, parent);
12410
12479
  for (const p of _classPrivateFieldGet2(_parts, this)) c.copyIn(p);
12411
12480
  return c;
12412
12481
  }
12413
12482
  static fromGlob(pattern, options = {}) {
12414
- const ast = new AST(null, void 0, options);
12415
- _parseAST.call(AST, pattern, ast, 0, options);
12483
+ const ast = new _a(null, void 0, options);
12484
+ _assertClassBrand(AST, _a, _parseAST).call(_a, pattern, ast, 0, options, 0);
12416
12485
  return ast;
12417
12486
  }
12418
12487
  toMMPattern() {
@@ -12433,12 +12502,15 @@ var AST = class AST {
12433
12502
  }
12434
12503
  toRegExpSource(allowDot) {
12435
12504
  const dot = allowDot !== null && allowDot !== void 0 ? allowDot : !!_classPrivateFieldGet2(_options, this).dot;
12436
- if (_classPrivateFieldGet2(_root, this) === this) _assertClassBrand(_AST_brand, this, _fillNegs).call(this);
12437
- if (!this.type) {
12438
- var _classPrivateFieldGet7;
12505
+ if (_classPrivateFieldGet2(_root, this) === this) {
12506
+ _assertClassBrand(_AST_brand, this, _flatten).call(this);
12507
+ _assertClassBrand(_AST_brand, this, _fillNegs).call(this);
12508
+ }
12509
+ if (!isExtglobAST(this)) {
12510
+ var _classPrivateFieldGet9;
12439
12511
  const noEmpty = this.isStart() && this.isEnd() && !_classPrivateFieldGet2(_parts, this).some((s) => typeof s !== "string");
12440
12512
  const src = _classPrivateFieldGet2(_parts, this).map((p) => {
12441
- const [re, _, hasMagic, uflag] = typeof p === "string" ? _parseGlob.call(AST, p, _classPrivateFieldGet2(_hasMagic2, this), noEmpty) : p.toRegExpSource(allowDot);
12513
+ const [re, _, hasMagic, uflag] = typeof p === "string" ? _assertClassBrand(AST, _a, _parseGlob).call(_a, p, _classPrivateFieldGet2(_hasMagic2, this), noEmpty) : p.toRegExpSource(allowDot);
12442
12514
  _classPrivateFieldSet2(_hasMagic2, this, _classPrivateFieldGet2(_hasMagic2, this) || hasMagic);
12443
12515
  _classPrivateFieldSet2(_uflag, this, _classPrivateFieldGet2(_uflag, this) || uflag);
12444
12516
  return re;
@@ -12455,7 +12527,7 @@ var AST = class AST {
12455
12527
  }
12456
12528
  }
12457
12529
  let end = "";
12458
- if (this.isEnd() && _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((_classPrivateFieldGet7 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet7 === void 0 ? void 0 : _classPrivateFieldGet7.type) === "!") end = "(?:$|\\/)";
12530
+ if (this.isEnd() && _classPrivateFieldGet2(_filledNegs, _classPrivateFieldGet2(_root, this)) && ((_classPrivateFieldGet9 = _classPrivateFieldGet2(_parent, this)) === null || _classPrivateFieldGet9 === void 0 ? void 0 : _classPrivateFieldGet9.type) === "!") end = "(?:$|\\/)";
12459
12531
  return [
12460
12532
  start + src + end,
12461
12533
  unescape(src),
@@ -12468,9 +12540,10 @@ var AST = class AST {
12468
12540
  let body = _assertClassBrand(_AST_brand, this, _partsToRegExp).call(this, dot);
12469
12541
  if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
12470
12542
  const s = this.toString();
12471
- _classPrivateFieldSet2(_parts, this, [s]);
12472
- this.type = null;
12473
- _classPrivateFieldSet2(_hasMagic2, this, void 0);
12543
+ const me = this;
12544
+ _classPrivateFieldSet2(_parts, me, [s]);
12545
+ me.type = null;
12546
+ _classPrivateFieldSet2(_hasMagic2, me, void 0);
12474
12547
  return [
12475
12548
  s,
12476
12549
  unescape(this.toString()),
@@ -12521,7 +12594,9 @@ function _fillNegs() {
12521
12594
  }
12522
12595
  return this;
12523
12596
  }
12524
- function _parseAST(str, ast, pos, opt) {
12597
+ function _parseAST(str, ast, pos, opt, extDepth) {
12598
+ var _opt$maxExtglobRecurs;
12599
+ const maxDepth = (_opt$maxExtglobRecurs = opt.maxExtglobRecursion) !== null && _opt$maxExtglobRecurs !== void 0 ? _opt$maxExtglobRecurs : 2;
12525
12600
  let escaping = false;
12526
12601
  let inBrace = false;
12527
12602
  let braceStart = -1;
@@ -12549,11 +12624,11 @@ function _parseAST(str, ast, pos, opt) {
12549
12624
  acc += c;
12550
12625
  continue;
12551
12626
  }
12552
- if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(") {
12627
+ if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(" && extDepth <= maxDepth) {
12553
12628
  ast.push(acc);
12554
12629
  acc = "";
12555
- const ext = new _AST(c, ast);
12556
- i = _parseAST.call(_AST, str, ext, i, opt);
12630
+ const ext = new _a(c, ast);
12631
+ i = _assertClassBrand(_AST, _a, _parseAST).call(_a, str, ext, i, opt, extDepth + 1);
12557
12632
  ast.push(ext);
12558
12633
  continue;
12559
12634
  }
@@ -12563,7 +12638,7 @@ function _parseAST(str, ast, pos, opt) {
12563
12638
  return i;
12564
12639
  }
12565
12640
  let i = pos + 1;
12566
- let part = new _AST(null, ast);
12641
+ let part = new _a(null, ast);
12567
12642
  const parts = [];
12568
12643
  let acc = "";
12569
12644
  while (i < str.length) {
@@ -12586,19 +12661,21 @@ function _parseAST(str, ast, pos, opt) {
12586
12661
  acc += c;
12587
12662
  continue;
12588
12663
  }
12589
- if (isExtglobType(c) && str.charAt(i) === "(") {
12664
+ /* c8 ignore stop */
12665
+ if (!opt.noext && isExtglobType(c) && str.charAt(i) === "(" && (extDepth <= maxDepth || ast && _assertClassBrand(_AST_brand, ast, _canAdoptType).call(ast, c))) {
12666
+ const depthAdd = ast && _assertClassBrand(_AST_brand, ast, _canAdoptType).call(ast, c) ? 0 : 1;
12590
12667
  part.push(acc);
12591
12668
  acc = "";
12592
- const ext = new _AST(c, part);
12669
+ const ext = new _a(c, part);
12593
12670
  part.push(ext);
12594
- i = _parseAST.call(_AST, str, ext, i, opt);
12671
+ i = _assertClassBrand(_AST, _a, _parseAST).call(_a, str, ext, i, opt, extDepth + depthAdd);
12595
12672
  continue;
12596
12673
  }
12597
12674
  if (c === "|") {
12598
12675
  part.push(acc);
12599
12676
  acc = "";
12600
12677
  parts.push(part);
12601
- part = new _AST(null, ast);
12678
+ part = new _a(null, ast);
12602
12679
  continue;
12603
12680
  }
12604
12681
  if (c === ")") {
@@ -12615,6 +12692,83 @@ function _parseAST(str, ast, pos, opt) {
12615
12692
  _classPrivateFieldSet2(_parts, ast, [str.substring(pos - 1)]);
12616
12693
  return i;
12617
12694
  }
12695
+ function _canAdoptWithSpace(child) {
12696
+ return _assertClassBrand(_AST_brand, this, _canAdopt).call(this, child, adoptionWithSpaceMap);
12697
+ }
12698
+ function _canAdopt(child, map = adoptionMap) {
12699
+ if (!child || typeof child !== "object" || child.type !== null || _classPrivateFieldGet2(_parts, child).length !== 1 || this.type === null) return false;
12700
+ const gc = _classPrivateFieldGet2(_parts, child)[0];
12701
+ if (!gc || typeof gc !== "object" || gc.type === null) return false;
12702
+ return _assertClassBrand(_AST_brand, this, _canAdoptType).call(this, gc.type, map);
12703
+ }
12704
+ function _canAdoptType(c, map = adoptionAnyMap) {
12705
+ var _map$get;
12706
+ return !!((_map$get = map.get(this.type)) === null || _map$get === void 0 ? void 0 : _map$get.includes(c));
12707
+ }
12708
+ function _adoptWithSpace(child, index) {
12709
+ const gc = _classPrivateFieldGet2(_parts, child)[0];
12710
+ const blank = new _a(null, gc, this.options);
12711
+ _classPrivateFieldGet2(_parts, blank).push("");
12712
+ gc.push(blank);
12713
+ _assertClassBrand(_AST_brand, this, _adopt).call(this, child, index);
12714
+ }
12715
+ function _adopt(child, index) {
12716
+ const gc = _classPrivateFieldGet2(_parts, child)[0];
12717
+ _classPrivateFieldGet2(_parts, this).splice(index, 1, ..._classPrivateFieldGet2(_parts, gc));
12718
+ for (const p of _classPrivateFieldGet2(_parts, gc)) if (typeof p === "object") _classPrivateFieldSet2(_parent, p, this);
12719
+ _classPrivateFieldSet2(_toString, this, void 0);
12720
+ }
12721
+ function _canUsurpType(c) {
12722
+ const m = usurpMap.get(this.type);
12723
+ return !!(m === null || m === void 0 ? void 0 : m.has(c));
12724
+ }
12725
+ function _canUsurp(child) {
12726
+ if (!child || typeof child !== "object" || child.type !== null || _classPrivateFieldGet2(_parts, child).length !== 1 || this.type === null || _classPrivateFieldGet2(_parts, this).length !== 1) return false;
12727
+ const gc = _classPrivateFieldGet2(_parts, child)[0];
12728
+ if (!gc || typeof gc !== "object" || gc.type === null) return false;
12729
+ return _assertClassBrand(_AST_brand, this, _canUsurpType).call(this, gc.type);
12730
+ }
12731
+ function _usurp(child) {
12732
+ const m = usurpMap.get(this.type);
12733
+ const gc = _classPrivateFieldGet2(_parts, child)[0];
12734
+ const nt = m === null || m === void 0 ? void 0 : m.get(gc.type);
12735
+ /* c8 ignore start - impossible */
12736
+ if (!nt) return false;
12737
+ /* c8 ignore stop */
12738
+ _classPrivateFieldSet2(_parts, this, _classPrivateFieldGet2(_parts, gc));
12739
+ for (const p of _classPrivateFieldGet2(_parts, this)) if (typeof p === "object") _classPrivateFieldSet2(_parent, p, this);
12740
+ this.type = nt;
12741
+ _classPrivateFieldSet2(_toString, this, void 0);
12742
+ _classPrivateFieldSet2(_emptyExt, this, false);
12743
+ }
12744
+ function _flatten() {
12745
+ if (!isExtglobAST(this)) {
12746
+ for (const p of _classPrivateFieldGet2(_parts, this)) if (typeof p === "object") _assertClassBrand(_AST_brand, p, _flatten).call(p);
12747
+ } else {
12748
+ let iterations = 0;
12749
+ let done = false;
12750
+ do {
12751
+ done = true;
12752
+ for (let i = 0; i < _classPrivateFieldGet2(_parts, this).length; i++) {
12753
+ const c = _classPrivateFieldGet2(_parts, this)[i];
12754
+ if (typeof c === "object") {
12755
+ _assertClassBrand(_AST_brand, c, _flatten).call(c);
12756
+ if (_assertClassBrand(_AST_brand, this, _canAdopt).call(this, c)) {
12757
+ done = false;
12758
+ _assertClassBrand(_AST_brand, this, _adopt).call(this, c, i);
12759
+ } else if (_assertClassBrand(_AST_brand, this, _canAdoptWithSpace).call(this, c)) {
12760
+ done = false;
12761
+ _assertClassBrand(_AST_brand, this, _adoptWithSpace).call(this, c, i);
12762
+ } else if (_assertClassBrand(_AST_brand, this, _canUsurp).call(this, c)) {
12763
+ done = false;
12764
+ _assertClassBrand(_AST_brand, this, _usurp).call(this, c);
12765
+ }
12766
+ }
12767
+ }
12768
+ } while (!done && ++iterations < 10);
12769
+ }
12770
+ _classPrivateFieldSet2(_toString, this, void 0);
12771
+ }
12618
12772
  function _partsToRegExp(dot) {
12619
12773
  return _classPrivateFieldGet2(_parts, this).map((p) => {
12620
12774
  /* c8 ignore start */
@@ -12629,6 +12783,7 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
12629
12783
  let escaping = false;
12630
12784
  let re = "";
12631
12785
  let uflag = false;
12786
+ let inStar = false;
12632
12787
  for (let i = 0; i < glob.length; i++) {
12633
12788
  const c = glob.charAt(i);
12634
12789
  if (escaping) {
@@ -12636,6 +12791,13 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
12636
12791
  re += (reSpecials.has(c) ? "\\" : "") + c;
12637
12792
  continue;
12638
12793
  }
12794
+ if (c === "*") {
12795
+ if (inStar) continue;
12796
+ inStar = true;
12797
+ re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star$1;
12798
+ hasMagic = true;
12799
+ continue;
12800
+ } else inStar = false;
12639
12801
  if (c === "\\") {
12640
12802
  if (i === glob.length - 1) re += "\\\\";
12641
12803
  else escaping = true;
@@ -12651,11 +12813,6 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
12651
12813
  continue;
12652
12814
  }
12653
12815
  }
12654
- if (c === "*") {
12655
- re += noEmpty && glob === "*" ? starNoEmpty : star$1;
12656
- hasMagic = true;
12657
- continue;
12658
- }
12659
12816
  if (c === "?") {
12660
12817
  re += qmark;
12661
12818
  hasMagic = true;
@@ -12670,9 +12827,10 @@ function _parseGlob(glob, hasMagic, noEmpty = false) {
12670
12827
  uflag
12671
12828
  ];
12672
12829
  }
12830
+ _a = AST;
12673
12831
 
12674
12832
  //#endregion
12675
- //#region node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/escape.js
12833
+ //#region node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/escape.js
12676
12834
  /**
12677
12835
  * Escape all magic characters in a glob pattern.
12678
12836
  *
@@ -12691,7 +12849,7 @@ const escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {})
12691
12849
  };
12692
12850
 
12693
12851
  //#endregion
12694
- //#region node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/dist/esm/index.js
12852
+ //#region node_modules/.pnpm/minimatch@10.2.3/node_modules/minimatch/dist/esm/index.js
12695
12853
  const minimatch = (p, pattern, options = {}) => {
12696
12854
  assertValidPattern(pattern);
12697
12855
  if (!options.nocomment && pattern.charAt(0) === "#") return false;
@@ -12800,7 +12958,7 @@ minimatch.defaults = defaults;
12800
12958
  const braceExpand = (pattern, options = {}) => {
12801
12959
  assertValidPattern(pattern);
12802
12960
  if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) return [pattern];
12803
- return expand(pattern);
12961
+ return expand(pattern, { max: options.braceExpandMax });
12804
12962
  };
12805
12963
  minimatch.braceExpand = braceExpand;
12806
12964
  const makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
@@ -12814,15 +12972,19 @@ const match = (list, pattern, options = {}) => {
12814
12972
  minimatch.match = match;
12815
12973
  const globMagic = /[?*]|[+@!]\(.*?\)|\[|\]/;
12816
12974
  const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
12975
+ var _Minimatch_brand = /* @__PURE__ */ new WeakSet();
12817
12976
  var Minimatch = class {
12818
12977
  constructor(pattern, options = {}) {
12978
+ var _options$maxGlobstarR;
12979
+ _classPrivateMethodInitSpec(this, _Minimatch_brand);
12819
12980
  assertValidPattern(pattern);
12820
12981
  options = options || {};
12821
12982
  this.options = options;
12983
+ this.maxGlobstarRecursion = (_options$maxGlobstarR = options.maxGlobstarRecursion) !== null && _options$maxGlobstarR !== void 0 ? _options$maxGlobstarR : 200;
12822
12984
  this.pattern = pattern;
12823
12985
  this.platform = options.platform || defaultPlatform;
12824
12986
  this.isWindows = this.platform === "win32";
12825
- this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false;
12987
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options["allowWindowsEscape"] === false;
12826
12988
  if (this.windowsPathsNoEscape) this.pattern = this.pattern.replace(/\\/g, "/");
12827
12989
  this.preserveMultipleSlashes = !!options.preserveMultipleSlashes;
12828
12990
  this.regexp = null;
@@ -13057,7 +13219,8 @@ var Minimatch = class {
13057
13219
  this.negate = negate;
13058
13220
  }
13059
13221
  matchOne(file, pattern, partial = false) {
13060
- const options = this.options;
13222
+ let fileStartIndex = 0;
13223
+ let patternStartIndex = 0;
13061
13224
  if (this.isWindows) {
13062
13225
  const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
13063
13226
  const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
@@ -13069,77 +13232,15 @@ var Minimatch = class {
13069
13232
  const [fd, pd] = [file[fdi], pattern[pdi]];
13070
13233
  if (fd.toLowerCase() === pd.toLowerCase()) {
13071
13234
  pattern[pdi] = fd;
13072
- if (pdi > fdi) pattern = pattern.slice(pdi);
13073
- else if (fdi > pdi) file = file.slice(fdi);
13235
+ patternStartIndex = pdi;
13236
+ fileStartIndex = fdi;
13074
13237
  }
13075
13238
  }
13076
13239
  }
13077
13240
  const { optimizationLevel = 1 } = this.options;
13078
13241
  if (optimizationLevel >= 2) file = this.levelTwoFileOptimize(file);
13079
- this.debug("matchOne", this, {
13080
- file,
13081
- pattern
13082
- });
13083
- this.debug("matchOne", file.length, pattern.length);
13084
- for (var fi = 0, pi = 0, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
13085
- this.debug("matchOne loop");
13086
- var p = pattern[pi];
13087
- var f = file[fi];
13088
- this.debug(pattern, p, f);
13089
- /* c8 ignore start */
13090
- if (p === false) return false;
13091
- /* c8 ignore stop */
13092
- if (p === GLOBSTAR) {
13093
- this.debug("GLOBSTAR", [
13094
- pattern,
13095
- p,
13096
- f
13097
- ]);
13098
- var fr = fi;
13099
- var pr = pi + 1;
13100
- if (pr === pl) {
13101
- this.debug("** at the end");
13102
- for (; fi < fl; fi++) if (file[fi] === "." || file[fi] === ".." || !options.dot && file[fi].charAt(0) === ".") return false;
13103
- return true;
13104
- }
13105
- while (fr < fl) {
13106
- var swallowee = file[fr];
13107
- this.debug("\nglobstar while", file, fr, pattern, pr, swallowee);
13108
- if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
13109
- this.debug("globstar found match!", fr, fl, swallowee);
13110
- return true;
13111
- } else {
13112
- if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
13113
- this.debug("dot detected!", file, fr, pattern, pr);
13114
- break;
13115
- }
13116
- this.debug("globstar swallow a segment, and continue");
13117
- fr++;
13118
- }
13119
- }
13120
- /* c8 ignore start */
13121
- if (partial) {
13122
- this.debug("\n>>> no match, partial?", file, fr, pattern, pr);
13123
- if (fr === fl) return true;
13124
- }
13125
- /* c8 ignore stop */
13126
- return false;
13127
- }
13128
- let hit;
13129
- if (typeof p === "string") {
13130
- hit = f === p;
13131
- this.debug("string match", p, f, hit);
13132
- } else {
13133
- hit = p.test(f);
13134
- this.debug("pattern match", p, f, hit);
13135
- }
13136
- if (!hit) return false;
13137
- }
13138
- if (fi === fl && pi === pl) return true;
13139
- else if (fi === fl) return partial;
13140
- else if (pi === pl) return fi === fl - 1 && file[fi] === "";
13141
- else throw new Error("wtf?");
13142
- /* c8 ignore stop */
13242
+ if (pattern.includes(GLOBSTAR)) return _assertClassBrand(_Minimatch_brand, this, _matchGlobstar).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
13243
+ return _assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file, pattern, partial, fileStartIndex, patternStartIndex);
13143
13244
  }
13144
13245
  braceExpand() {
13145
13246
  return braceExpand(this.pattern, this.options);
@@ -13241,6 +13342,109 @@ var Minimatch = class {
13241
13342
  return minimatch.defaults(def).Minimatch;
13242
13343
  }
13243
13344
  };
13345
+ function _matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
13346
+ const firstgs = pattern.indexOf(GLOBSTAR, patternIndex);
13347
+ const lastgs = pattern.lastIndexOf(GLOBSTAR);
13348
+ const [head, body, tail] = [
13349
+ pattern.slice(patternIndex, firstgs),
13350
+ pattern.slice(firstgs + 1, lastgs),
13351
+ pattern.slice(lastgs + 1)
13352
+ ];
13353
+ if (head.length) {
13354
+ const fileHead = file.slice(fileIndex, fileIndex + head.length);
13355
+ if (!_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, fileHead, head, partial, 0, 0)) return false;
13356
+ fileIndex += head.length;
13357
+ patternIndex += head.length;
13358
+ }
13359
+ let fileTailMatch = 0;
13360
+ if (tail.length) {
13361
+ if (tail.length + fileIndex > file.length) return false;
13362
+ let tailStart = file.length - tail.length;
13363
+ if (_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file, tail, partial, tailStart, 0)) fileTailMatch = tail.length;
13364
+ else {
13365
+ if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) return false;
13366
+ tailStart--;
13367
+ if (!_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file, tail, partial, tailStart, 0)) return false;
13368
+ fileTailMatch = tail.length + 1;
13369
+ }
13370
+ }
13371
+ if (!body.length) {
13372
+ let sawSome = !!fileTailMatch;
13373
+ for (let i = fileIndex; i < file.length - fileTailMatch; i++) {
13374
+ const f = String(file[i]);
13375
+ sawSome = true;
13376
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
13377
+ }
13378
+ return sawSome;
13379
+ }
13380
+ const bodySegments = [[[], 0]];
13381
+ let currentBody = bodySegments[0];
13382
+ let nonGsParts = 0;
13383
+ const nonGsPartsSums = [0];
13384
+ for (const b of body) if (b === GLOBSTAR) {
13385
+ nonGsPartsSums.push(nonGsParts);
13386
+ currentBody = [[], 0];
13387
+ bodySegments.push(currentBody);
13388
+ } else {
13389
+ currentBody[0].push(b);
13390
+ nonGsParts++;
13391
+ }
13392
+ let i = bodySegments.length - 1;
13393
+ const fileLength = file.length - fileTailMatch;
13394
+ for (const b of bodySegments) b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
13395
+ return !!_assertClassBrand(_Minimatch_brand, this, _matchGlobStarBodySections).call(this, file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
13396
+ }
13397
+ function _matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
13398
+ const bs = bodySegments[bodyIndex];
13399
+ if (!bs) {
13400
+ for (let i = fileIndex; i < file.length; i++) {
13401
+ sawTail = true;
13402
+ const f = file[i];
13403
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
13404
+ }
13405
+ return sawTail;
13406
+ }
13407
+ const [body, after] = bs;
13408
+ while (fileIndex <= after) {
13409
+ if (_assertClassBrand(_Minimatch_brand, this, _matchOne).call(this, file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0) && globStarDepth < this.maxGlobstarRecursion) {
13410
+ const sub = _assertClassBrand(_Minimatch_brand, this, _matchGlobStarBodySections).call(this, file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
13411
+ if (sub !== false) return sub;
13412
+ }
13413
+ const f = file[fileIndex];
13414
+ if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) return false;
13415
+ fileIndex++;
13416
+ }
13417
+ return null;
13418
+ }
13419
+ function _matchOne(file, pattern, partial, fileIndex, patternIndex) {
13420
+ let fi;
13421
+ let pi;
13422
+ let pl;
13423
+ let fl;
13424
+ for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
13425
+ this.debug("matchOne loop");
13426
+ let p = pattern[pi];
13427
+ let f = file[fi];
13428
+ this.debug(pattern, p, f);
13429
+ /* c8 ignore start */
13430
+ if (p === false || p === GLOBSTAR) return false;
13431
+ /* c8 ignore stop */
13432
+ let hit;
13433
+ if (typeof p === "string") {
13434
+ hit = f === p;
13435
+ this.debug("string match", p, f, hit);
13436
+ } else {
13437
+ hit = p.test(f);
13438
+ this.debug("pattern match", p, f, hit);
13439
+ }
13440
+ if (!hit) return false;
13441
+ }
13442
+ if (fi === fl && pi === pl) return true;
13443
+ else if (fi === fl) return partial;
13444
+ else if (pi === pl) return fi === fl - 1 && file[fi] === "";
13445
+ else throw new Error("wtf?");
13446
+ /* c8 ignore stop */
13447
+ }
13244
13448
  /* c8 ignore stop */
13245
13449
  minimatch.AST = AST;
13246
13450
  minimatch.Minimatch = Minimatch;
@@ -13648,11 +13852,17 @@ function importSourceToScope(ctx, node, scope, source) {
13648
13852
  } else return ctx.error(`Failed to resolve import source ${JSON.stringify(source)}.`, node, scope);
13649
13853
  }
13650
13854
  function resolveExt(filename, fs) {
13651
- filename = filename.replace(/\.js$/, "");
13855
+ let moduleType = "u";
13856
+ if (filename.endsWith(".mjs")) moduleType = "m";
13857
+ else if (filename.endsWith(".cjs")) moduleType = "c";
13858
+ filename = filename.replace(/\.[cm]?jsx?$/, "");
13652
13859
  const tryResolve = (filename) => {
13653
13860
  if (fs.fileExists(filename)) return filename;
13654
13861
  };
13655
- return tryResolve(filename) || tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
13862
+ const resolveTs = () => tryResolve(filename + `.ts`) || tryResolve(filename + `.tsx`) || tryResolve(filename + `.d.ts`);
13863
+ const resolveMts = () => tryResolve(filename + `.mts`) || tryResolve(filename + `.d.mts`);
13864
+ const resolveCts = () => tryResolve(filename + `.cts`) || tryResolve(filename + `.d.cts`);
13865
+ return tryResolve(filename) || (moduleType === "m" ? resolveMts() || resolveTs() : moduleType === "c" ? resolveCts() || resolveTs() : resolveTs() || resolveMts() || resolveCts()) || tryResolve(joinPaths(filename, `index.ts`)) || tryResolve(joinPaths(filename, `index.tsx`)) || tryResolve(joinPaths(filename, `index.d.ts`));
13656
13866
  }
13657
13867
  const tsConfigCache = createCache();
13658
13868
  const tsConfigRefMap = /* @__PURE__ */ new Map();
@@ -13736,8 +13946,8 @@ function fileToScope(ctx, filename, asGlobal = false) {
13736
13946
  }
13737
13947
  function parseFile(filename, content, fs, parserPlugins) {
13738
13948
  const ext = (0, path.extname)(filename);
13739
- if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".mtsx") return (0, _babel_parser.parse)(content, {
13740
- plugins: resolveParserPlugins(ext.slice(1), parserPlugins, /\.d\.m?ts$/.test(filename)),
13949
+ if (ext === ".ts" || ext === ".mts" || ext === ".tsx" || ext === ".cts" || ext === ".mtsx") return (0, _babel_parser.parse)(content, {
13950
+ plugins: resolveParserPlugins(ext.slice(1), parserPlugins, /\.d\.[cm]?ts$/.test(filename)),
13741
13951
  sourceType: "module"
13742
13952
  }).program.body;
13743
13953
  const isUnknownTypeSource = !/\.[cm]?[tj]sx?$/.test(filename);
@@ -14367,7 +14577,18 @@ function genRuntimePropFromType(ctx, { key, required, type, skipCheck }, hasStat
14367
14577
  return resolveObjectKey(node.key, node.computed) === key;
14368
14578
  });
14369
14579
  if (prop) if (prop.type === "ObjectProperty") defaultString = `default: ${ctx.getString(prop.value)}`;
14370
- else defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default() ${ctx.getString(prop.body)}`;
14580
+ else {
14581
+ let paramsString = "";
14582
+ if (prop.params.length) {
14583
+ const start = prop.params[0].start;
14584
+ const end = prop.params[prop.params.length - 1].end;
14585
+ paramsString = ctx.getString({
14586
+ start,
14587
+ end
14588
+ });
14589
+ }
14590
+ defaultString = `${prop.async ? "async " : ""}${prop.kind !== "method" ? `${prop.kind} ` : ""}default(${paramsString}) ${ctx.getString(prop.body)}`;
14591
+ }
14371
14592
  }
14372
14593
  const finalKey = getEscapedPropName(key);
14373
14594
  if (!ctx.options.isProd) return `${finalKey}: { ${concatStrings([
@@ -15228,7 +15449,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
15228
15449
 
15229
15450
  //#endregion
15230
15451
  //#region packages/compiler-sfc/src/index.ts
15231
- const version = "3.6.0-beta.5";
15452
+ const version = "3.6.0-beta.7";
15232
15453
  const parseCache = parseCache$1;
15233
15454
  const errorMessages = {
15234
15455
  ..._vue_compiler_dom.errorMessages,