@vue/compiler-sfc 3.5.40 → 3.5.41

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.5.40
2
+ * @vue/compiler-sfc v3.5.41
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1703,17 +1703,34 @@ function createCache(max = 500) {
1703
1703
  return new LRUCache({ max });
1704
1704
  }
1705
1705
 
1706
- function isImportUsed(local, sfc) {
1707
- return resolveTemplateUsedIdentifiers(sfc).has(local);
1706
+ function resolveTemplateAST(inAST, options) {
1707
+ if (!(inAST == null ? void 0 : inAST.transformed)) {
1708
+ return inAST;
1709
+ }
1710
+ const { compiler = CompilerDOM__namespace, compilerOptions, ssr, onError } = options;
1711
+ const newAST = (ssr ? CompilerDOM__namespace : compiler).parse(inAST.source, {
1712
+ prefixIdentifiers: true,
1713
+ ...compilerOptions,
1714
+ parseMode: "sfc",
1715
+ onError
1716
+ });
1717
+ const template = newAST.children.find(
1718
+ (node) => node.type === 1 && node.tag === "template"
1719
+ );
1720
+ return compilerCore.createRoot(template.children, inAST.source);
1721
+ }
1722
+
1723
+ function isImportUsed(local, sfc, options) {
1724
+ return resolveTemplateUsedIdentifiers(sfc, options).has(local);
1708
1725
  }
1709
1726
  const templateAnalysisCache = createCache();
1710
- function resolveTemplateVModelIdentifiers(sfc) {
1711
- return resolveTemplateAnalysisResult(sfc, false).vModelIds;
1727
+ function resolveTemplateVModelIdentifiers(sfc, options) {
1728
+ return resolveTemplateAnalysisResult(sfc, false, options).vModelIds;
1712
1729
  }
1713
- function resolveTemplateUsedIdentifiers(sfc) {
1714
- return resolveTemplateAnalysisResult(sfc).usedIds;
1730
+ function resolveTemplateUsedIdentifiers(sfc, options) {
1731
+ return resolveTemplateAnalysisResult(sfc, true, options).usedIds;
1715
1732
  }
1716
- function resolveTemplateAnalysisResult(sfc, collectUsedIds = true) {
1733
+ function resolveTemplateAnalysisResult(sfc, collectUsedIds = true, options) {
1717
1734
  const { content, ast } = sfc.template;
1718
1735
  const cached = templateAnalysisCache.get(content);
1719
1736
  if (cached && (!collectUsedIds || cached.usedIds)) {
@@ -1721,7 +1738,15 @@ function resolveTemplateAnalysisResult(sfc, collectUsedIds = true) {
1721
1738
  }
1722
1739
  const ids = collectUsedIds ? /* @__PURE__ */ new Set() : void 0;
1723
1740
  const vModelIds = /* @__PURE__ */ new Set();
1724
- ast.children.forEach(walk);
1741
+ const root = resolveTemplateAST(ast, {
1742
+ compiler: options == null ? void 0 : options.compiler,
1743
+ compilerOptions: options == null ? void 0 : options.compilerOptions,
1744
+ ssr: options == null ? void 0 : options.ssr,
1745
+ // ignore errors since they were already reported by the SFC parser
1746
+ onError: () => {
1747
+ }
1748
+ });
1749
+ root.children.forEach(walk);
1725
1750
  function walk(node) {
1726
1751
  var _a;
1727
1752
  switch (node.type) {
@@ -4299,18 +4324,12 @@ function doCompileTemplate({
4299
4324
  if (compiler !== defaultCompiler) {
4300
4325
  inAST = void 0;
4301
4326
  }
4302
- if (inAST == null ? void 0 : inAST.transformed) {
4303
- const newAST = (ssr ? CompilerDOM__namespace : compiler).parse(inAST.source, {
4304
- prefixIdentifiers: true,
4305
- ...compilerOptions,
4306
- parseMode: "sfc",
4307
- onError: (e) => errors.push(e)
4308
- });
4309
- const template = newAST.children.find(
4310
- (node) => node.type === 1 && node.tag === "template"
4311
- );
4312
- inAST = compilerCore.createRoot(template.children, inAST.source);
4313
- }
4327
+ inAST = resolveTemplateAST(inAST, {
4328
+ compiler,
4329
+ compilerOptions,
4330
+ ssr,
4331
+ onError: (e) => errors.push(e)
4332
+ });
4314
4333
  let { code, ast, preamble, map } = compiler.compile(inAST || source, {
4315
4334
  mode: "module",
4316
4335
  prefixIdentifiers: true,
@@ -20492,6 +20511,17 @@ const closePattern = /\\}/g;
20492
20511
  const commaPattern = /\\,/g;
20493
20512
  const periodPattern = /\\\./g;
20494
20513
  const EXPANSION_MAX = 100_000;
20514
+ // `EXPANSION_MAX` caps the *number* of expansions, but not their length. An
20515
+ // input like `'{a,b}'.repeat(1500)` stays under that count - its output is
20516
+ // truncated to 100k results - while making every result ~1500 characters
20517
+ // long. The result set, and the intermediate arrays built while combining
20518
+ // brace sets, then grow large enough to exhaust memory and crash the process
20519
+ // (CVE-2026-14257). `EXPANSION_MAX_LENGTH` bounds the total number of
20520
+ // characters the accumulator may hold at any point, so memory stays flat no
20521
+ // matter how many brace groups are chained. The limit sits well above any
20522
+ // realistic expansion (100k results hitting `EXPANSION_MAX` measure ~1M
20523
+ // characters) so legitimate input is unaffected.
20524
+ const EXPANSION_MAX_LENGTH = 4_000_000;
20495
20525
  function numeric(str) {
20496
20526
  return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
20497
20527
  }
@@ -20540,7 +20570,7 @@ function expand(str, options = {}) {
20540
20570
  if (!str) {
20541
20571
  return [];
20542
20572
  }
20543
- const { max = EXPANSION_MAX } = options;
20573
+ const { max = EXPANSION_MAX, maxLength = EXPANSION_MAX_LENGTH } = options;
20544
20574
  // I don't know why Bash 4.3 does this, but it does.
20545
20575
  // Anything starting with {} will have the first two bytes preserved
20546
20576
  // but *only* at the top level, so {},a}b will not expand to anything,
@@ -20550,7 +20580,7 @@ function expand(str, options = {}) {
20550
20580
  if (str.slice(0, 2) === '{}') {
20551
20581
  str = '\\{\\}' + str.slice(2);
20552
20582
  }
20553
- return expand_(escapeBraces(str), max, true).map(unescapeBraces);
20583
+ return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
20554
20584
  }
20555
20585
  function embrace(str) {
20556
20586
  return '{' + str + '}';
@@ -20564,22 +20594,117 @@ function lte(i, y) {
20564
20594
  function gte(i, y) {
20565
20595
  return i >= y;
20566
20596
  }
20567
- function expand_(str, max, isTop) {
20568
- /** @type {string[]} */
20569
- const expansions = [];
20570
- const m = balanced('{', '}', str);
20571
- if (!m)
20572
- return [str];
20573
- // no need to expand pre, since it is guaranteed to be free of brace-sets
20574
- const pre = m.pre;
20575
- const post = m.post.length ? expand_(m.post, max, false) : [''];
20576
- if (/\$$/.test(m.pre)) {
20577
- for (let k = 0; k < post.length && k < max; k++) {
20578
- const expansion = pre + '{' + m.body + '}' + post[k];
20579
- expansions.push(expansion);
20597
+ // Build `{ acc[a] + pre + values[v] }` for every combination, capping the
20598
+ // number of results at `max` and the total number of characters at `maxLength`.
20599
+ // This is the one place output grows, so bounding it here keeps the single
20600
+ // accumulator - and therefore memory - flat regardless of how many brace groups
20601
+ // are combined (CVE-2026-14257).
20602
+ function combine(acc, pre, values, max, maxLength, dropEmpties) {
20603
+ const out = [];
20604
+ let length = 0;
20605
+ for (let a = 0; a < acc.length; a++) {
20606
+ for (let v = 0; v < values.length; v++) {
20607
+ if (out.length >= max)
20608
+ return out;
20609
+ const expansion = acc[a] + pre + values[v];
20610
+ // Bash drops empty results at the top level. Skip them before they count
20611
+ // against `max`, so `max` bounds the number of *kept* results.
20612
+ if (dropEmpties && !expansion)
20613
+ continue;
20614
+ if (length + expansion.length > maxLength)
20615
+ return out;
20616
+ out.push(expansion);
20617
+ length += expansion.length;
20580
20618
  }
20581
20619
  }
20582
- else {
20620
+ return out;
20621
+ }
20622
+ // The expansion values of a single numeric (`1..5`) or alphabetic (`a..e..2`)
20623
+ // sequence body.
20624
+ function expandSequence(body, isAlphaSequence, max, maxLength) {
20625
+ const n = body.split(/\.\./);
20626
+ const N = [];
20627
+ // A sequence body always splits into two or three parts, but the compiler
20628
+ // can't know that.
20629
+ /* c8 ignore start */
20630
+ if (n[0] === undefined || n[1] === undefined) {
20631
+ return N;
20632
+ }
20633
+ /* c8 ignore stop */
20634
+ const x = numeric(n[0]);
20635
+ const y = numeric(n[1]);
20636
+ const width = Math.max(n[0].length, n[1].length);
20637
+ let incr = n.length === 3 && n[2] !== undefined ?
20638
+ Math.max(Math.abs(numeric(n[2])), 1)
20639
+ : 1;
20640
+ let test = lte;
20641
+ const reverse = y < x;
20642
+ if (reverse) {
20643
+ incr *= -1;
20644
+ test = gte;
20645
+ }
20646
+ const pad = n.some(isPadded);
20647
+ let length = 0;
20648
+ for (let i = x; test(i, y) && N.length < max; i += incr) {
20649
+ let c;
20650
+ if (isAlphaSequence) {
20651
+ c = String.fromCharCode(i);
20652
+ if (c === '\\') {
20653
+ c = '';
20654
+ }
20655
+ }
20656
+ else {
20657
+ c = String(i);
20658
+ if (pad) {
20659
+ const need = width - c.length;
20660
+ if (need > 0) {
20661
+ const z = new Array(need + 1).join('0');
20662
+ if (i < 0) {
20663
+ c = '-' + z + c.slice(1);
20664
+ }
20665
+ else {
20666
+ c = z + c;
20667
+ }
20668
+ }
20669
+ }
20670
+ }
20671
+ if (length + c.length > maxLength)
20672
+ break;
20673
+ N.push(c);
20674
+ length += c.length;
20675
+ }
20676
+ return N;
20677
+ }
20678
+ function expand_(str, max, maxLength, isTop) {
20679
+ // Consume the string's top-level brace groups left to right, threading a
20680
+ // running set of combined prefixes (`acc`). Expanding the tail iteratively -
20681
+ // rather than recursing on `m.post` once per group - keeps the native stack
20682
+ // depth constant, so deeply chained input (`'{a,b}'.repeat(3000)`) can no
20683
+ // longer overflow the stack, and leaves a single accumulator whose size
20684
+ // `maxLength` bounds directly (CVE-2026-14257).
20685
+ let acc = [''];
20686
+ // Bash drops empty results, but only when the *first* top-level group is a
20687
+ // comma set - a sequence like `{a..\}` may legitimately yield ''. The drop
20688
+ // is on the final strings, so it is applied to whichever `combine` produces
20689
+ // them (the one with no brace set left in the tail).
20690
+ let dropEmpties = false;
20691
+ let firstGroup = true;
20692
+ for (;;) {
20693
+ const m = balanced('{', '}', str);
20694
+ // No brace set left: the rest of the string is literal.
20695
+ if (!m) {
20696
+ return combine(acc, str, [''], max, maxLength, dropEmpties);
20697
+ }
20698
+ // no need to expand pre, since it is guaranteed to be free of brace-sets
20699
+ const pre = m.pre;
20700
+ if (/\$$/.test(pre)) {
20701
+ acc = combine(acc, pre + '{' + m.body + '}', [''], max, maxLength, dropEmpties && !m.post.length);
20702
+ firstGroup = false;
20703
+ if (!m.post.length)
20704
+ break;
20705
+ str = m.post;
20706
+ continue;
20707
+ }
20583
20708
  const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
20584
20709
  const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
20585
20710
  const isSequence = isNumericSequence || isAlphaSequence;
@@ -20588,87 +20713,69 @@ function expand_(str, max, isTop) {
20588
20713
  // {a},b}
20589
20714
  if (m.post.match(/,(?!,).*\}/)) {
20590
20715
  str = m.pre + '{' + m.body + escClose + m.post;
20591
- return expand_(str, max, true);
20716
+ isTop = true;
20717
+ continue;
20592
20718
  }
20593
- return [str];
20719
+ // Nothing here expands, so the whole remaining string is literal.
20720
+ return combine(acc, pre + '{' + m.body + '}' + m.post, [''], max, maxLength, dropEmpties);
20594
20721
  }
20595
- let n;
20722
+ if (firstGroup) {
20723
+ dropEmpties = isTop && !isSequence;
20724
+ firstGroup = false;
20725
+ }
20726
+ let values;
20596
20727
  if (isSequence) {
20597
- n = m.body.split(/\.\./);
20728
+ values = expandSequence(m.body, isAlphaSequence, max, maxLength);
20598
20729
  }
20599
20730
  else {
20600
- n = parseCommaParts(m.body);
20731
+ let n = parseCommaParts(m.body);
20601
20732
  if (n.length === 1 && n[0] !== undefined) {
20602
20733
  // x{{a,b}}y ==> x{a}y x{b}y
20603
- n = expand_(n[0], max, false).map(embrace);
20734
+ n = expand_(n[0], max, maxLength, false).map(embrace);
20604
20735
  //XXX is this necessary? Can't seem to hit it in tests.
20605
20736
  /* c8 ignore start */
20606
20737
  if (n.length === 1) {
20607
- return post.map(p => m.pre + n[0] + p);
20738
+ acc = combine(acc, pre + n[0], [''], max, maxLength, dropEmpties && !m.post.length);
20739
+ if (!m.post.length)
20740
+ break;
20741
+ str = m.post;
20742
+ continue;
20608
20743
  }
20609
20744
  /* c8 ignore stop */
20610
20745
  }
20611
- }
20612
- // at this point, n is the parts, and we know it's not a comma set
20613
- // with a single entry.
20614
- let N;
20615
- if (isSequence && n[0] !== undefined && n[1] !== undefined) {
20616
- const x = numeric(n[0]);
20617
- const y = numeric(n[1]);
20618
- const width = Math.max(n[0].length, n[1].length);
20619
- let incr = n.length === 3 && n[2] !== undefined ?
20620
- Math.max(Math.abs(numeric(n[2])), 1)
20621
- : 1;
20622
- let test = lte;
20623
- const reverse = y < x;
20624
- if (reverse) {
20625
- incr *= -1;
20626
- test = gte;
20627
- }
20628
- const pad = n.some(isPadded);
20629
- N = [];
20630
- for (let i = x; test(i, y); i += incr) {
20631
- let c;
20632
- if (isAlphaSequence) {
20633
- c = String.fromCharCode(i);
20634
- if (c === '\\') {
20635
- c = '';
20636
- }
20746
+ // Values that `combine` is going to drop as empty produce no result, so
20747
+ // they must not count against `max` - otherwise `{a,,b}` with `max: 2`
20748
+ // would stop at `['a', '']` and yield one result instead of two. Skipping
20749
+ // them outright keeps `values` bounded while leaving `max` a bound on
20750
+ // *kept* results.
20751
+ let dropsEmpties = dropEmpties && !m.post.length && !pre;
20752
+ for (let d = 0; dropsEmpties && d < acc.length; d++) {
20753
+ if (acc[d]) {
20754
+ dropsEmpties = false;
20637
20755
  }
20638
- else {
20639
- c = String(i);
20640
- if (pad) {
20641
- const need = width - c.length;
20642
- if (need > 0) {
20643
- const z = new Array(need + 1).join('0');
20644
- if (i < 0) {
20645
- c = '-' + z + c.slice(1);
20646
- }
20647
- else {
20648
- c = z + c;
20649
- }
20650
- }
20651
- }
20652
- }
20653
- N.push(c);
20654
20756
  }
20655
- }
20656
- else {
20657
- N = [];
20658
- for (let j = 0; j < n.length; j++) {
20659
- N.push.apply(N, expand_(n[j], max, false));
20660
- }
20661
- }
20662
- for (let j = 0; j < N.length; j++) {
20663
- for (let k = 0; k < post.length && expansions.length < max; k++) {
20664
- const expansion = pre + N[j] + post[k];
20665
- if (!isTop || isSequence || expansion) {
20666
- expansions.push(expansion);
20757
+ values = [];
20758
+ let valuesLength = 0;
20759
+ outer: for (let j = 0; j < n.length; j++) {
20760
+ const expanded = expand_(n[j], max, maxLength, false);
20761
+ for (let k = 0; k < expanded.length; k++) {
20762
+ const v = expanded[k];
20763
+ if (dropsEmpties && !v)
20764
+ continue;
20765
+ if (values.length >= max || valuesLength + v.length > maxLength) {
20766
+ break outer;
20767
+ }
20768
+ values.push(v);
20769
+ valuesLength += v.length;
20667
20770
  }
20668
20771
  }
20669
20772
  }
20773
+ acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
20774
+ if (!m.post.length)
20775
+ break;
20776
+ str = m.post;
20670
20777
  }
20671
- return expansions;
20778
+ return acc;
20672
20779
  }
20673
20780
 
20674
20781
  const MAX_PATTERN_LENGTH = 1024 * 64;
@@ -25337,7 +25444,7 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
25337
25444
  function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) {
25338
25445
  let isUsedInTemplate = needTemplateUsageCheck;
25339
25446
  if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) {
25340
- isUsedInTemplate = isImportUsed(local, sfc);
25447
+ isUsedInTemplate = isImportUsed(local, sfc, options.templateOptions);
25341
25448
  }
25342
25449
  ctx.userImports[local] = {
25343
25450
  isType,
@@ -25684,7 +25791,10 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
25684
25791
  ctx.bindingMetadata[key] = setupBindings[key];
25685
25792
  }
25686
25793
  if (sfc.template && !sfc.template.src && sfc.template.ast) {
25687
- const vModelIds = resolveTemplateVModelIdentifiers(sfc);
25794
+ const vModelIds = resolveTemplateVModelIdentifiers(
25795
+ sfc,
25796
+ options.templateOptions
25797
+ );
25688
25798
  if (vModelIds.size) {
25689
25799
  const toDemote = /* @__PURE__ */ new Set();
25690
25800
  for (const id of vModelIds) {
@@ -26151,7 +26261,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
26151
26261
  return generator.toJSON();
26152
26262
  }
26153
26263
 
26154
- const version = "3.5.40";
26264
+ const version = "3.5.41";
26155
26265
  const parseCache = parseCache$1;
26156
26266
  const errorMessages = {
26157
26267
  ...CompilerDOM.errorMessages,
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compiler-sfc v3.5.40
2
+ * @vue/compiler-sfc v3.5.41
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -216,8 +216,11 @@ const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
216
216
 
217
217
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
218
218
  const isBooleanAttr = /* @__PURE__ */ makeMap(
219
- specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
219
+ specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
220
220
  );
221
+ function includeBooleanAttr(value) {
222
+ return !!value || value === "";
223
+ }
221
224
  const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
222
225
  const attrValidationCache = {};
223
226
  function isSSRSafeAttrName(name) {
@@ -4764,6 +4767,7 @@ function requireLib () {
4764
4767
  SloppyFunctionAnnexB: "In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",
4765
4768
  SourcePhaseImportRequiresDefault: 'Only `import source x from "./module"` is valid.',
4766
4769
  StaticPrototype: "Classes may not have static property named prototype.",
4770
+ SuperCallNotNewExpression: "Cannot use new with super(...).",
4767
4771
  SuperNotAllowed: "`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",
4768
4772
  SuperPrivateField: "Private fields can't be accessed on super.",
4769
4773
  TrailingDecorator: "Decorators must be attached to a class element.",
@@ -4793,7 +4797,6 @@ function requireLib () {
4793
4797
  UnexpectedTokenUnaryExponentiation: "Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",
4794
4798
  UnexpectedUsingDeclaration: "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",
4795
4799
  UnexpectedVoidPattern: "Unexpected void binding.",
4796
- UnsupportedBind: "Binding should be performed on object property.",
4797
4800
  UnsupportedDecoratorExport: "A decorated export must export a class declaration.",
4798
4801
  UnsupportedDefaultExport: "Only expressions, functions or classes are allowed as the `default` export.",
4799
4802
  UnsupportedImport: "`import` can only be used in `import()` or `import.meta`.",
@@ -4861,6 +4864,10 @@ function requireLib () {
4861
4864
  PrimaryTopicNotAllowed: "Topic reference was used in a lexical context without topic binding.",
4862
4865
  PrimaryTopicRequiresSmartPipeline: 'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'
4863
4866
  });
4867
+ var FunctionBindErrors = {
4868
+ UnsupportedBind: "Binding should be performed on object property.",
4869
+ UnsupportedBindRHS: "The right-hand side of binding can not be super or import."
4870
+ };
4864
4871
  const _excluded = ["message"];
4865
4872
  function defineHidden(obj, key, value) {
4866
4873
  Object.defineProperty(obj, key, {
@@ -4951,7 +4958,7 @@ function requireLib () {
4951
4958
  }
4952
4959
  return ParseErrorConstructors;
4953
4960
  }
4954
- const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors));
4961
+ const Errors = Object.assign({}, ParseErrorEnum(ModuleErrors), ParseErrorEnum(StandardErrors), ParseErrorEnum(StrictModeErrors), ParseErrorEnum(ParseExpressionErrors), ParseErrorEnum`pipelineOperator`(PipelineOperatorErrors), ParseErrorEnum`functionBind`(FunctionBindErrors));
4955
4962
  function createDefaultOptions() {
4956
4963
  return {
4957
4964
  sourceType: "script",
@@ -15644,7 +15651,7 @@ function requireLib () {
15644
15651
  type
15645
15652
  } = this.state;
15646
15653
  if (!noCalls && type === 15) {
15647
- return this.parseBind(base, startLoc, noCalls, state);
15654
+ return this.parseBind(base, startLoc, state);
15648
15655
  } else if (tokenIsTemplate(type)) {
15649
15656
  return this.parseTaggedTemplateExpression(base, startLoc, state);
15650
15657
  }
@@ -15697,13 +15704,18 @@ function requireLib () {
15697
15704
  return this.finishNode(node, "MemberExpression");
15698
15705
  }
15699
15706
  }
15700
- parseBind(base, startLoc, noCalls, state) {
15707
+ parseBind(base, startLoc, state) {
15701
15708
  const node = this.startNodeAt(startLoc);
15702
15709
  node.object = base;
15703
15710
  this.next();
15704
- node.callee = this.parseNoCallExpr();
15711
+ const isImport = this.match(83);
15712
+ const callee = this.parseNoCallExpr();
15713
+ if (callee.type === "Super" || isImport && callee.type === "ImportExpression" || callee.type === "Import") {
15714
+ throw this.raise(Errors.UnsupportedBindRHS, callee);
15715
+ }
15716
+ node.callee = callee;
15705
15717
  state.stop = true;
15706
- return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, noCalls);
15718
+ return this.parseSubscripts(this.finishNode(node, "BindExpression"), startLoc, false);
15707
15719
  }
15708
15720
  parseCoverCallAndAsyncArrowHead(base, startLoc, state, optional) {
15709
15721
  const oldMaybeInArrowParameters = this.state.maybeInArrowParameters;
@@ -16299,9 +16311,12 @@ function requireLib () {
16299
16311
  const isImport = this.match(83);
16300
16312
  const callee = this.parseNoCallExpr();
16301
16313
  node.callee = callee;
16302
- if (isImport && (callee.type === "Import" || callee.type === "ImportExpression")) {
16314
+ if (isImport && callee.type === "ImportExpression" || callee.type === "Import") {
16303
16315
  this.raise(Errors.ImportCallNotNewExpression, callee);
16304
16316
  }
16317
+ if (callee.type === "Super") {
16318
+ this.raise(Errors.SuperCallNotNewExpression, callee);
16319
+ }
16305
16320
  }
16306
16321
  parseTemplateElement(isTagged) {
16307
16322
  const {
@@ -26058,6 +26073,7 @@ const transformFor = createStructuralDirectiveTransform(
26058
26073
  node.loc
26059
26074
  );
26060
26075
  return () => {
26076
+ var _a;
26061
26077
  let childBlock;
26062
26078
  const { children } = forNode;
26063
26079
  if (isTemplate) {
@@ -26101,7 +26117,8 @@ const transformFor = createStructuralDirectiveTransform(
26101
26117
  if (isTemplate && keyProperty) {
26102
26118
  injectProp(childBlock, keyProperty, context);
26103
26119
  }
26104
- if (childBlock.isBlock !== !isStableFragment) {
26120
+ const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
26121
+ if (childBlock.isBlock !== shouldUseBlock) {
26105
26122
  if (childBlock.isBlock) {
26106
26123
  removeHelper(OPEN_BLOCK);
26107
26124
  removeHelper(
@@ -26113,12 +26130,15 @@ const transformFor = createStructuralDirectiveTransform(
26113
26130
  );
26114
26131
  }
26115
26132
  }
26116
- childBlock.isBlock = !isStableFragment;
26133
+ childBlock.isBlock = shouldUseBlock;
26117
26134
  if (childBlock.isBlock) {
26118
26135
  helper(OPEN_BLOCK);
26119
26136
  helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
26120
26137
  } else {
26121
26138
  helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
26139
+ if (childBlock.needsPatch) {
26140
+ childBlock.patchFlag = ((_a = childBlock.patchFlag) != null ? _a : 0) | 512;
26141
+ }
26122
26142
  }
26123
26143
  }
26124
26144
  if (memo) {
@@ -26537,6 +26557,8 @@ const transformElement = (node, context) => {
26537
26557
  let vnodeDynamicProps;
26538
26558
  let dynamicPropNames;
26539
26559
  let vnodeDirectives;
26560
+ let needsPatch = false;
26561
+ let isBlockRequired = false;
26540
26562
  let shouldUseBlock = (
26541
26563
  // dynamic component may resolve to plain elements
26542
26564
  isDynamicComponent || vnodeTag === TELEPORT || vnodeTag === SUSPENSE || !isComponent && // <svg> and <foreignObject> must be forced into blocks so that block
@@ -26556,6 +26578,8 @@ const transformElement = (node, context) => {
26556
26578
  vnodeProps = propsBuildResult.props;
26557
26579
  patchFlag = propsBuildResult.patchFlag;
26558
26580
  dynamicPropNames = propsBuildResult.dynamicPropNames;
26581
+ needsPatch = propsBuildResult.needsPatch;
26582
+ isBlockRequired = propsBuildResult.isBlockRequired;
26559
26583
  const directives = propsBuildResult.directives;
26560
26584
  vnodeDirectives = directives && directives.length ? createArrayExpression(
26561
26585
  directives.map((dir) => buildDirectiveArgs(dir, context))
@@ -26606,7 +26630,7 @@ const transformElement = (node, context) => {
26606
26630
  if (dynamicPropNames && dynamicPropNames.length) {
26607
26631
  vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
26608
26632
  }
26609
- node.codegenNode = createVNodeCall(
26633
+ const vnodeCall = node.codegenNode = createVNodeCall(
26610
26634
  context,
26611
26635
  vnodeTag,
26612
26636
  vnodeProps,
@@ -26619,6 +26643,13 @@ const transformElement = (node, context) => {
26619
26643
  isComponent,
26620
26644
  node.loc
26621
26645
  );
26646
+ needsPatch = needsPatch && (patchFlag === 0 || patchFlag === 32);
26647
+ if (needsPatch) {
26648
+ vnodeCall.needsPatch = true;
26649
+ }
26650
+ if (isBlockRequired) {
26651
+ vnodeCall.isBlockRequired = true;
26652
+ }
26622
26653
  };
26623
26654
  };
26624
26655
  function resolveComponentType(node, context, ssr = false) {
@@ -26725,6 +26756,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
26725
26756
  const runtimeDirectives = [];
26726
26757
  const hasChildren = children.length > 0;
26727
26758
  let shouldUseBlock = false;
26759
+ let isBlockRequired = false;
26728
26760
  let patchFlag = 0;
26729
26761
  let hasRef = false;
26730
26762
  let hasClassBinding = false;
@@ -26766,19 +26798,20 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
26766
26798
  if (isEventHandler && isReservedProp(name)) {
26767
26799
  hasVnodeHook = true;
26768
26800
  }
26801
+ if (name === "ref") {
26802
+ hasRef = true;
26803
+ }
26769
26804
  if (isEventHandler && value.type === 14) {
26770
26805
  value = value.arguments[0];
26771
26806
  }
26772
26807
  if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
26773
26808
  return;
26774
26809
  }
26775
- if (name === "ref") {
26776
- hasRef = true;
26777
- } else if (name === "class") {
26810
+ if (name === "class") {
26778
26811
  hasClassBinding = true;
26779
26812
  } else if (name === "style") {
26780
26813
  hasStyleBinding = true;
26781
- } else if (name !== "key" && !dynamicPropNames.includes(name)) {
26814
+ } else if (name !== "ref" && name !== "key" && !dynamicPropNames.includes(name)) {
26782
26815
  dynamicPropNames.push(name);
26783
26816
  }
26784
26817
  if (isComponent && (name === "class" || name === "style") && !dynamicPropNames.includes(name)) {
@@ -26843,14 +26876,13 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
26843
26876
  if (isVOn && ssr) {
26844
26877
  continue;
26845
26878
  }
26846
- if (
26847
- // #938: elements with dynamic keys should be forced into blocks
26848
- isVBind && isStaticArgOf(arg, "key") || // inline before-update hooks need to force block so that it is invoked
26849
- // before children
26850
- isVOn && hasChildren && isStaticArgOf(arg, "vue:before-update")
26851
- ) {
26879
+ if (isVBind && isStaticArgOf(arg, "key")) {
26852
26880
  shouldUseBlock = true;
26853
26881
  }
26882
+ if (isVOn && hasChildren && arg && isStaticExp(arg) && camelize(arg.content) === "vue:beforeUpdate") {
26883
+ shouldUseBlock = true;
26884
+ isBlockRequired = true;
26885
+ }
26854
26886
  if (isVBind && isStaticArgOf(arg, "ref")) {
26855
26887
  pushRefVForMarker();
26856
26888
  }
@@ -26901,6 +26933,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
26901
26933
  runtimeDirectives.push(prop);
26902
26934
  if (hasChildren) {
26903
26935
  shouldUseBlock = true;
26936
+ isBlockRequired = true;
26904
26937
  }
26905
26938
  }
26906
26939
  }
@@ -26939,7 +26972,8 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
26939
26972
  patchFlag |= 32;
26940
26973
  }
26941
26974
  }
26942
- if (!shouldUseBlock && (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {
26975
+ const needsPatch = (patchFlag === 0 || patchFlag === 32) && (hasRef || hasVnodeHook || runtimeDirectives.length > 0);
26976
+ if (!shouldUseBlock && needsPatch) {
26943
26977
  patchFlag |= 512;
26944
26978
  }
26945
26979
  if (!context.inSSR && propsExpression) {
@@ -27005,7 +27039,9 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
27005
27039
  directives: runtimeDirectives,
27006
27040
  patchFlag,
27007
27041
  dynamicPropNames,
27008
- shouldUseBlock
27042
+ shouldUseBlock,
27043
+ needsPatch,
27044
+ isBlockRequired
27009
27045
  };
27010
27046
  }
27011
27047
  function dedupeProperties(properties) {
@@ -28268,12 +28304,15 @@ function stringifyElement(node, context) {
28268
28304
  res += ` ${p.arg.content}="__VUE_EXP_START__${exp.content}__VUE_EXP_END__"`;
28269
28305
  continue;
28270
28306
  }
28271
- if (isBooleanAttr(p.arg.content) && exp.content === "false") {
28307
+ if ((isBooleanAttr(p.arg.content) || p.arg.content === "hidden") && exp.content === "false") {
28272
28308
  continue;
28273
28309
  }
28274
28310
  let evaluated = evaluateConstant(exp);
28275
28311
  if (evaluated != null) {
28276
28312
  const arg = p.arg && p.arg.content;
28313
+ if (arg === "hidden" && typeof evaluated === "number" && !includeBooleanAttr(evaluated)) {
28314
+ continue;
28315
+ }
28277
28316
  if (arg === "class") {
28278
28317
  evaluated = normalizeClass(evaluated);
28279
28318
  } else if (arg === "style") {
@@ -29171,17 +29210,53 @@ function createCache(max = 500) {
29171
29210
  }
29172
29211
  }
29173
29212
 
29174
- function isImportUsed(local, sfc) {
29175
- return resolveTemplateUsedIdentifiers(sfc).has(local);
29213
+ var __defProp$b = Object.defineProperty;
29214
+ var __defProps$a = Object.defineProperties;
29215
+ var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
29216
+ var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
29217
+ var __hasOwnProp$b = Object.prototype.hasOwnProperty;
29218
+ var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
29219
+ var __defNormalProp$b = (obj, key, value) => key in obj ? __defProp$b(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
29220
+ var __spreadValues$b = (a, b) => {
29221
+ for (var prop in b || (b = {}))
29222
+ if (__hasOwnProp$b.call(b, prop))
29223
+ __defNormalProp$b(a, prop, b[prop]);
29224
+ if (__getOwnPropSymbols$b)
29225
+ for (var prop of __getOwnPropSymbols$b(b)) {
29226
+ if (__propIsEnum$b.call(b, prop))
29227
+ __defNormalProp$b(a, prop, b[prop]);
29228
+ }
29229
+ return a;
29230
+ };
29231
+ var __spreadProps$a = (a, b) => __defProps$a(a, __getOwnPropDescs$a(b));
29232
+ function resolveTemplateAST(inAST, options) {
29233
+ if (!(inAST == null ? void 0 : inAST.transformed)) {
29234
+ return inAST;
29235
+ }
29236
+ const { compiler = CompilerDOM, compilerOptions, ssr, onError } = options;
29237
+ const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$a(__spreadValues$b({
29238
+ prefixIdentifiers: true
29239
+ }, compilerOptions), {
29240
+ parseMode: "sfc",
29241
+ onError
29242
+ }));
29243
+ const template = newAST.children.find(
29244
+ (node) => node.type === 1 && node.tag === "template"
29245
+ );
29246
+ return createRoot(template.children, inAST.source);
29247
+ }
29248
+
29249
+ function isImportUsed(local, sfc, options) {
29250
+ return resolveTemplateUsedIdentifiers(sfc, options).has(local);
29176
29251
  }
29177
29252
  const templateAnalysisCache = createCache();
29178
- function resolveTemplateVModelIdentifiers(sfc) {
29179
- return resolveTemplateAnalysisResult(sfc, false).vModelIds;
29253
+ function resolveTemplateVModelIdentifiers(sfc, options) {
29254
+ return resolveTemplateAnalysisResult(sfc, false, options).vModelIds;
29180
29255
  }
29181
- function resolveTemplateUsedIdentifiers(sfc) {
29182
- return resolveTemplateAnalysisResult(sfc).usedIds;
29256
+ function resolveTemplateUsedIdentifiers(sfc, options) {
29257
+ return resolveTemplateAnalysisResult(sfc, true, options).usedIds;
29183
29258
  }
29184
- function resolveTemplateAnalysisResult(sfc, collectUsedIds = true) {
29259
+ function resolveTemplateAnalysisResult(sfc, collectUsedIds = true, options) {
29185
29260
  const { content, ast } = sfc.template;
29186
29261
  const cached = templateAnalysisCache.get(content);
29187
29262
  if (cached && (!collectUsedIds || cached.usedIds)) {
@@ -29189,7 +29264,15 @@ function resolveTemplateAnalysisResult(sfc, collectUsedIds = true) {
29189
29264
  }
29190
29265
  const ids = collectUsedIds ? /* @__PURE__ */ new Set() : void 0;
29191
29266
  const vModelIds = /* @__PURE__ */ new Set();
29192
- ast.children.forEach(walk);
29267
+ const root = resolveTemplateAST(ast, {
29268
+ compiler: options == null ? void 0 : options.compiler,
29269
+ compilerOptions: options == null ? void 0 : options.compilerOptions,
29270
+ ssr: options == null ? void 0 : options.ssr,
29271
+ // ignore errors since they were already reported by the SFC parser
29272
+ onError: () => {
29273
+ }
29274
+ });
29275
+ root.children.forEach(walk);
29193
29276
  function walk(node) {
29194
29277
  var _a;
29195
29278
  switch (node.type) {
@@ -32502,6 +32585,13 @@ const ssrTransformElement = (node, context) => {
32502
32585
  false
32503
32586
  )
32504
32587
  );
32588
+ } else if (attrName === "hidden") {
32589
+ openTag.push(
32590
+ createCallExpression(
32591
+ context.helper(SSR_RENDER_DYNAMIC_ATTR),
32592
+ [key, value]
32593
+ )
32594
+ );
32505
32595
  } else if (isSSRSafeAttrName(attrName)) {
32506
32596
  openTag.push(
32507
32597
  createCallExpression(context.helper(SSR_RENDER_ATTR), [
@@ -33609,18 +33699,12 @@ function doCompileTemplate({
33609
33699
  if (compiler !== defaultCompiler) {
33610
33700
  inAST = void 0;
33611
33701
  }
33612
- if (inAST == null ? void 0 : inAST.transformed) {
33613
- const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, __spreadProps$5(__spreadValues$6({
33614
- prefixIdentifiers: true
33615
- }, compilerOptions), {
33616
- parseMode: "sfc",
33617
- onError: (e) => errors.push(e)
33618
- }));
33619
- const template = newAST.children.find(
33620
- (node) => node.type === 1 && node.tag === "template"
33621
- );
33622
- inAST = createRoot(template.children, inAST.source);
33623
- }
33702
+ inAST = resolveTemplateAST(inAST, {
33703
+ compiler,
33704
+ compilerOptions,
33705
+ ssr,
33706
+ onError: (e) => errors.push(e)
33707
+ });
33624
33708
  let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$6({
33625
33709
  mode: "module",
33626
33710
  prefixIdentifiers: true,
@@ -34315,6 +34399,10 @@ function requireStringifier () {
34315
34399
  const STYLE_TAG = /(<)(\/?style\b)/gi;
34316
34400
  const COMMENT_OPEN = /(<)(!--)/g;
34317
34401
 
34402
+ // Characters that end an at-rule name, mirroring RE_AT_END in the tokenizer.
34403
+ // Params starting with anything else need a space to stay separate tokens.
34404
+ const AT_NAME_END = /[\t\n\f\r "#'()/;[\\\]{}]/;
34405
+
34318
34406
  function escapeHTMLInCSS(str) {
34319
34407
  if (typeof str !== 'string') return str
34320
34408
  if (!str.includes('<')) return str
@@ -34343,14 +34431,15 @@ function requireStringifier () {
34343
34431
  function atruleStart(str, node) {
34344
34432
  let name = '@' + node.name;
34345
34433
  let params = node.params ? str.rawValue(node, 'params') : '';
34434
+ let afterName = node.raws.afterName;
34346
34435
 
34347
- if (typeof node.raws.afterName !== 'undefined') {
34348
- name += node.raws.afterName;
34349
- } else if (params) {
34350
- name += ' ';
34436
+ if (typeof afterName === 'undefined') {
34437
+ afterName = params ? ' ' : '';
34438
+ } else if (afterName === '' && params && !AT_NAME_END.test(params[0])) {
34439
+ afterName = ' ';
34351
34440
  }
34352
34441
 
34353
- return name + params
34442
+ return name + afterName + params
34354
34443
  }
34355
34444
 
34356
34445
  function pushBody(str, stack, node) {
@@ -34364,10 +34453,24 @@ function requireStringifier () {
34364
34453
  let semicolon = str.raw(node, 'semicolon');
34365
34454
  let isDocument = node.type === 'document';
34366
34455
  for (let i = nodes.length - 1; i >= 0; i--) {
34456
+ let child = nodes[i];
34457
+ let childSemicolon = last !== i || semicolon;
34458
+ // A childless at-rule or a custom property declaration that still has
34459
+ // following siblings must be terminated. Without the semicolon those
34460
+ // trailing comments are folded into the at-rule's prelude or the custom
34461
+ // property's value and disappear when the output is re-parsed.
34462
+ if (
34463
+ !childSemicolon &&
34464
+ i < nodes.length - 1 &&
34465
+ ((child.type === 'atrule' && !child.nodes) ||
34466
+ (child.type === 'decl' && child.prop.startsWith('--')))
34467
+ ) {
34468
+ childSemicolon = true;
34469
+ }
34367
34470
  stack.push({
34368
34471
  document: isDocument,
34369
- node: nodes[i],
34370
- semicolon: last !== i || semicolon
34472
+ node: child,
34473
+ semicolon: childSemicolon
34371
34474
  });
34372
34475
  }
34373
34476
  }
@@ -35919,22 +36022,14 @@ var hasRequiredNonSecure;
35919
36022
  function requireNonSecure () {
35920
36023
  if (hasRequiredNonSecure) return nonSecure;
35921
36024
  hasRequiredNonSecure = 1;
35922
- // This alphabet uses `A-Za-z0-9_-` symbols.
35923
- // The order of characters is optimized for better gzip and brotli compression.
35924
- // References to the same file (works both for gzip and brotli):
35925
- // `'use`, `andom`, and `rict'`
35926
- // References to the brotli default dictionary:
35927
- // `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`
35928
36025
  let urlAlphabet =
35929
36026
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
35930
36027
 
35931
36028
  let customAlphabet = (alphabet, defaultSize = 21) => {
35932
36029
  return (size = defaultSize) => {
35933
36030
  let id = '';
35934
- // A compact alternative for `for (var i = 0; i < step; i++)`.
35935
36031
  let i = size | 0;
35936
- while (i--) {
35937
- // `| 0` is more compact and faster than `Math.floor()`.
36032
+ while (i-- > 0) {
35938
36033
  id += alphabet[(Math.random() * alphabet.length) | 0];
35939
36034
  }
35940
36035
  return id
@@ -35943,10 +36038,8 @@ function requireNonSecure () {
35943
36038
 
35944
36039
  let nanoid = (size = 21) => {
35945
36040
  let id = '';
35946
- // A compact alternative for `for (var i = 0; i < step; i++)`.
35947
36041
  let i = size | 0;
35948
- while (i--) {
35949
- // `| 0` is more compact and faster than `Math.floor()`.
36042
+ while (i-- > 0) {
35950
36043
  id += urlAlphabet[(Math.random() * 64) | 0];
35951
36044
  }
35952
36045
  return id
@@ -36051,19 +36144,13 @@ function requirePreviousMap () {
36051
36144
 
36052
36145
  loadFile(path, cssFile, trusted) {
36053
36146
  if (!trusted && !this.unsafeMap) {
36054
- if (!/\.map$/i.test(path)) {
36147
+ if (!/\.map$/i.test(path)) return undefined
36148
+ if (!cssFile) return undefined
36149
+
36150
+ let rel = relative(dirname(cssFile), path);
36151
+ if (rel === '..' || rel.startsWith('..' + sep) || isAbsolute(rel)) {
36055
36152
  return undefined
36056
36153
  }
36057
- if (cssFile) {
36058
- let relativePath = relative(dirname(cssFile), path);
36059
- if (
36060
- relativePath === '..' ||
36061
- relativePath.startsWith('..' + sep) ||
36062
- isAbsolute(relativePath)
36063
- ) {
36064
- return undefined
36065
- }
36066
- }
36067
36154
  }
36068
36155
  this.root = dirname(path);
36069
36156
  if (existsSync(path)) {
@@ -37793,12 +37880,22 @@ function requireWarning () {
37793
37880
  if (hasRequiredWarning) return warning;
37794
37881
  hasRequiredWarning = 1;
37795
37882
 
37883
+ let Container = /*@__PURE__*/ requireContainer$1();
37884
+ let { my } = /*@__PURE__*/ requireSymbols();
37885
+
37796
37886
  class Warning {
37797
37887
  constructor(text, opts = {}) {
37798
37888
  this.type = 'warning';
37799
37889
  this.text = text;
37800
37890
 
37801
37891
  if (opts.node && opts.node.source) {
37892
+ if (!opts.node[my]) {
37893
+ // The node comes from another PostCSS copy in node_modules, so it does
37894
+ // not have this copy’s methods. Container#normalize() rebuilds such
37895
+ // nodes on insert, but a node passed straight to Result#warn() never
37896
+ // goes through it.
37897
+ Container.rebuild(opts.node);
37898
+ }
37802
37899
  let range = opts.node.rangeBy(opts);
37803
37900
  this.line = range.start.line;
37804
37901
  this.column = range.start.column;
@@ -38675,7 +38772,7 @@ function requireProcessor$1 () {
38675
38772
 
38676
38773
  class Processor {
38677
38774
  constructor(plugins = []) {
38678
- this.version = '8.5.19';
38775
+ this.version = '8.5.23';
38679
38776
  this.plugins = this.normalize(plugins);
38680
38777
  }
38681
38778
 
@@ -50951,7 +51048,7 @@ Upgrade your vite or vue-loader version for compatibility with the latest experi
50951
51048
  function registerUserImport(source2, local, imported, isType, isFromSetup, needTemplateUsageCheck) {
50952
51049
  let isUsedInTemplate = needTemplateUsageCheck;
50953
51050
  if (needTemplateUsageCheck && ctx.isTS && sfc.template && !sfc.template.src && !sfc.template.lang) {
50954
- isUsedInTemplate = isImportUsed(local, sfc);
51051
+ isUsedInTemplate = isImportUsed(local, sfc, options.templateOptions);
50955
51052
  }
50956
51053
  ctx.userImports[local] = {
50957
51054
  isType,
@@ -51298,7 +51395,10 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
51298
51395
  ctx.bindingMetadata[key] = setupBindings[key];
51299
51396
  }
51300
51397
  if (sfc.template && !sfc.template.src && sfc.template.ast) {
51301
- const vModelIds = resolveTemplateVModelIdentifiers(sfc);
51398
+ const vModelIds = resolveTemplateVModelIdentifiers(
51399
+ sfc,
51400
+ options.templateOptions
51401
+ );
51302
51402
  if (vModelIds.size) {
51303
51403
  const toDemote = /* @__PURE__ */ new Set();
51304
51404
  for (const id of vModelIds) {
@@ -51776,7 +51876,7 @@ var __spreadValues = (a, b) => {
51776
51876
  }
51777
51877
  return a;
51778
51878
  };
51779
- const version = "3.5.40";
51879
+ const version = "3.5.41";
51780
51880
  const parseCache = parseCache$1;
51781
51881
  const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
51782
51882
  const walk = walk$2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/compiler-sfc",
3
- "version": "3.5.40",
3
+ "version": "3.5.41",
4
4
  "description": "@vue/compiler-sfc",
5
5
  "main": "dist/compiler-sfc.cjs.js",
6
6
  "module": "dist/compiler-sfc.esm-browser.js",
@@ -42,26 +42,26 @@
42
42
  },
43
43
  "homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
44
44
  "dependencies": {
45
- "@babel/parser": "^7.29.7",
45
+ "@babel/parser": "^7.29.8",
46
46
  "estree-walker": "^2.0.2",
47
47
  "magic-string": "^0.30.21",
48
48
  "postcss": "^8.5.19",
49
49
  "source-map-js": "^1.2.1",
50
- "@vue/compiler-core": "3.5.40",
51
- "@vue/compiler-ssr": "3.5.40",
52
- "@vue/compiler-dom": "3.5.40",
53
- "@vue/shared": "3.5.40"
50
+ "@vue/compiler-core": "3.5.41",
51
+ "@vue/shared": "3.5.41",
52
+ "@vue/compiler-dom": "3.5.41",
53
+ "@vue/compiler-ssr": "3.5.41"
54
54
  },
55
55
  "devDependencies": {
56
- "@babel/types": "^7.29.7",
56
+ "@babel/types": "^7.29.8",
57
57
  "@vue/consolidate": "^1.0.0",
58
58
  "hash-sum": "^2.0.0",
59
59
  "lru-cache": "10.1.0",
60
60
  "merge-source-map": "^1.1.0",
61
- "minimatch": "~10.2.5",
61
+ "minimatch": "~10.2.6",
62
62
  "postcss-modules": "^6.0.1",
63
63
  "postcss-selector-parser": "^7.1.4",
64
64
  "pug": "^3.0.4",
65
- "sass": "^1.101.0"
65
+ "sass": "^1.102.0"
66
66
  }
67
67
  }