@vtj/materials 0.8.160 → 0.8.162

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 v3.5.11
2
+ * vue v3.5.12
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -766,16 +766,16 @@ var Vue = (function (exports) {
766
766
  nextSub.prevSub = prevSub;
767
767
  link.nextSub = void 0;
768
768
  }
769
- if (dep.subs === link) {
770
- dep.subs = prevSub;
771
- }
772
769
  if (dep.subsHead === link) {
773
770
  dep.subsHead = nextSub;
774
771
  }
775
- if (!dep.subs && dep.computed) {
776
- dep.computed.flags &= ~4;
777
- for (let l = dep.computed.deps; l; l = l.nextDep) {
778
- removeSub(l, true);
772
+ if (dep.subs === link) {
773
+ dep.subs = prevSub;
774
+ if (!prevSub && dep.computed) {
775
+ dep.computed.flags &= ~4;
776
+ for (let l = dep.computed.deps; l; l = l.nextDep) {
777
+ removeSub(l, true);
778
+ }
779
779
  }
780
780
  }
781
781
  if (!soft && !--dep.sc && dep.map) {
@@ -1035,7 +1035,7 @@ var Vue = (function (exports) {
1035
1035
  }
1036
1036
  });
1037
1037
  } else {
1038
- if (key !== void 0) {
1038
+ if (key !== void 0 || depsMap.has(void 0)) {
1039
1039
  run(depsMap.get(key));
1040
1040
  }
1041
1041
  if (isArrayIndex) {
@@ -1410,117 +1410,6 @@ var Vue = (function (exports) {
1410
1410
 
1411
1411
  const toShallow = (value) => value;
1412
1412
  const getProto = (v) => Reflect.getPrototypeOf(v);
1413
- function get(target, key, isReadonly2 = false, isShallow2 = false) {
1414
- target = target["__v_raw"];
1415
- const rawTarget = toRaw(target);
1416
- const rawKey = toRaw(key);
1417
- if (!isReadonly2) {
1418
- if (hasChanged(key, rawKey)) {
1419
- track(rawTarget, "get", key);
1420
- }
1421
- track(rawTarget, "get", rawKey);
1422
- }
1423
- const { has: has2 } = getProto(rawTarget);
1424
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1425
- if (has2.call(rawTarget, key)) {
1426
- return wrap(target.get(key));
1427
- } else if (has2.call(rawTarget, rawKey)) {
1428
- return wrap(target.get(rawKey));
1429
- } else if (target !== rawTarget) {
1430
- target.get(key);
1431
- }
1432
- }
1433
- function has(key, isReadonly2 = false) {
1434
- const target = this["__v_raw"];
1435
- const rawTarget = toRaw(target);
1436
- const rawKey = toRaw(key);
1437
- if (!isReadonly2) {
1438
- if (hasChanged(key, rawKey)) {
1439
- track(rawTarget, "has", key);
1440
- }
1441
- track(rawTarget, "has", rawKey);
1442
- }
1443
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1444
- }
1445
- function size(target, isReadonly2 = false) {
1446
- target = target["__v_raw"];
1447
- !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
1448
- return Reflect.get(target, "size", target);
1449
- }
1450
- function add(value, _isShallow = false) {
1451
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1452
- value = toRaw(value);
1453
- }
1454
- const target = toRaw(this);
1455
- const proto = getProto(target);
1456
- const hadKey = proto.has.call(target, value);
1457
- if (!hadKey) {
1458
- target.add(value);
1459
- trigger(target, "add", value, value);
1460
- }
1461
- return this;
1462
- }
1463
- function set(key, value, _isShallow = false) {
1464
- if (!_isShallow && !isShallow(value) && !isReadonly(value)) {
1465
- value = toRaw(value);
1466
- }
1467
- const target = toRaw(this);
1468
- const { has: has2, get: get2 } = getProto(target);
1469
- let hadKey = has2.call(target, key);
1470
- if (!hadKey) {
1471
- key = toRaw(key);
1472
- hadKey = has2.call(target, key);
1473
- } else {
1474
- checkIdentityKeys(target, has2, key);
1475
- }
1476
- const oldValue = get2.call(target, key);
1477
- target.set(key, value);
1478
- if (!hadKey) {
1479
- trigger(target, "add", key, value);
1480
- } else if (hasChanged(value, oldValue)) {
1481
- trigger(target, "set", key, value, oldValue);
1482
- }
1483
- return this;
1484
- }
1485
- function deleteEntry(key) {
1486
- const target = toRaw(this);
1487
- const { has: has2, get: get2 } = getProto(target);
1488
- let hadKey = has2.call(target, key);
1489
- if (!hadKey) {
1490
- key = toRaw(key);
1491
- hadKey = has2.call(target, key);
1492
- } else {
1493
- checkIdentityKeys(target, has2, key);
1494
- }
1495
- const oldValue = get2 ? get2.call(target, key) : void 0;
1496
- const result = target.delete(key);
1497
- if (hadKey) {
1498
- trigger(target, "delete", key, void 0, oldValue);
1499
- }
1500
- return result;
1501
- }
1502
- function clear() {
1503
- const target = toRaw(this);
1504
- const hadItems = target.size !== 0;
1505
- const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1506
- const result = target.clear();
1507
- if (hadItems) {
1508
- trigger(target, "clear", void 0, void 0, oldTarget);
1509
- }
1510
- return result;
1511
- }
1512
- function createForEach(isReadonly2, isShallow2) {
1513
- return function forEach(callback, thisArg) {
1514
- const observed = this;
1515
- const target = observed["__v_raw"];
1516
- const rawTarget = toRaw(target);
1517
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1518
- !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY);
1519
- return target.forEach((value, key) => {
1520
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1521
- });
1522
- };
1523
- }
1524
1413
  function createIterableMethod(method, isReadonly2, isShallow2) {
1525
1414
  return function(...args) {
1526
1415
  const target = this["__v_raw"];
@@ -1563,71 +1452,134 @@ var Vue = (function (exports) {
1563
1452
  return type === "delete" ? false : type === "clear" ? void 0 : this;
1564
1453
  };
1565
1454
  }
1566
- function createInstrumentations() {
1567
- const mutableInstrumentations2 = {
1568
- get(key) {
1569
- return get(this, key);
1570
- },
1571
- get size() {
1572
- return size(this);
1573
- },
1574
- has,
1575
- add,
1576
- set,
1577
- delete: deleteEntry,
1578
- clear,
1579
- forEach: createForEach(false, false)
1580
- };
1581
- const shallowInstrumentations2 = {
1455
+ function createInstrumentations(readonly, shallow) {
1456
+ const instrumentations = {
1582
1457
  get(key) {
1583
- return get(this, key, false, true);
1584
- },
1585
- get size() {
1586
- return size(this);
1587
- },
1588
- has,
1589
- add(value) {
1590
- return add.call(this, value, true);
1591
- },
1592
- set(key, value) {
1593
- return set.call(this, key, value, true);
1594
- },
1595
- delete: deleteEntry,
1596
- clear,
1597
- forEach: createForEach(false, true)
1598
- };
1599
- const readonlyInstrumentations2 = {
1600
- get(key) {
1601
- return get(this, key, true);
1602
- },
1603
- get size() {
1604
- return size(this, true);
1605
- },
1606
- has(key) {
1607
- return has.call(this, key, true);
1608
- },
1609
- add: createReadonlyMethod("add"),
1610
- set: createReadonlyMethod("set"),
1611
- delete: createReadonlyMethod("delete"),
1612
- clear: createReadonlyMethod("clear"),
1613
- forEach: createForEach(true, false)
1614
- };
1615
- const shallowReadonlyInstrumentations2 = {
1616
- get(key) {
1617
- return get(this, key, true, true);
1458
+ const target = this["__v_raw"];
1459
+ const rawTarget = toRaw(target);
1460
+ const rawKey = toRaw(key);
1461
+ if (!readonly) {
1462
+ if (hasChanged(key, rawKey)) {
1463
+ track(rawTarget, "get", key);
1464
+ }
1465
+ track(rawTarget, "get", rawKey);
1466
+ }
1467
+ const { has } = getProto(rawTarget);
1468
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1469
+ if (has.call(rawTarget, key)) {
1470
+ return wrap(target.get(key));
1471
+ } else if (has.call(rawTarget, rawKey)) {
1472
+ return wrap(target.get(rawKey));
1473
+ } else if (target !== rawTarget) {
1474
+ target.get(key);
1475
+ }
1618
1476
  },
1619
1477
  get size() {
1620
- return size(this, true);
1478
+ const target = this["__v_raw"];
1479
+ !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1480
+ return Reflect.get(target, "size", target);
1621
1481
  },
1622
1482
  has(key) {
1623
- return has.call(this, key, true);
1483
+ const target = this["__v_raw"];
1484
+ const rawTarget = toRaw(target);
1485
+ const rawKey = toRaw(key);
1486
+ if (!readonly) {
1487
+ if (hasChanged(key, rawKey)) {
1488
+ track(rawTarget, "has", key);
1489
+ }
1490
+ track(rawTarget, "has", rawKey);
1491
+ }
1492
+ return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1624
1493
  },
1625
- add: createReadonlyMethod("add"),
1626
- set: createReadonlyMethod("set"),
1627
- delete: createReadonlyMethod("delete"),
1628
- clear: createReadonlyMethod("clear"),
1629
- forEach: createForEach(true, true)
1494
+ forEach(callback, thisArg) {
1495
+ const observed = this;
1496
+ const target = observed["__v_raw"];
1497
+ const rawTarget = toRaw(target);
1498
+ const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1499
+ !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1500
+ return target.forEach((value, key) => {
1501
+ return callback.call(thisArg, wrap(value), wrap(key), observed);
1502
+ });
1503
+ }
1630
1504
  };
1505
+ extend(
1506
+ instrumentations,
1507
+ readonly ? {
1508
+ add: createReadonlyMethod("add"),
1509
+ set: createReadonlyMethod("set"),
1510
+ delete: createReadonlyMethod("delete"),
1511
+ clear: createReadonlyMethod("clear")
1512
+ } : {
1513
+ add(value) {
1514
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1515
+ value = toRaw(value);
1516
+ }
1517
+ const target = toRaw(this);
1518
+ const proto = getProto(target);
1519
+ const hadKey = proto.has.call(target, value);
1520
+ if (!hadKey) {
1521
+ target.add(value);
1522
+ trigger(target, "add", value, value);
1523
+ }
1524
+ return this;
1525
+ },
1526
+ set(key, value) {
1527
+ if (!shallow && !isShallow(value) && !isReadonly(value)) {
1528
+ value = toRaw(value);
1529
+ }
1530
+ const target = toRaw(this);
1531
+ const { has, get } = getProto(target);
1532
+ let hadKey = has.call(target, key);
1533
+ if (!hadKey) {
1534
+ key = toRaw(key);
1535
+ hadKey = has.call(target, key);
1536
+ } else {
1537
+ checkIdentityKeys(target, has, key);
1538
+ }
1539
+ const oldValue = get.call(target, key);
1540
+ target.set(key, value);
1541
+ if (!hadKey) {
1542
+ trigger(target, "add", key, value);
1543
+ } else if (hasChanged(value, oldValue)) {
1544
+ trigger(target, "set", key, value, oldValue);
1545
+ }
1546
+ return this;
1547
+ },
1548
+ delete(key) {
1549
+ const target = toRaw(this);
1550
+ const { has, get } = getProto(target);
1551
+ let hadKey = has.call(target, key);
1552
+ if (!hadKey) {
1553
+ key = toRaw(key);
1554
+ hadKey = has.call(target, key);
1555
+ } else {
1556
+ checkIdentityKeys(target, has, key);
1557
+ }
1558
+ const oldValue = get ? get.call(target, key) : void 0;
1559
+ const result = target.delete(key);
1560
+ if (hadKey) {
1561
+ trigger(target, "delete", key, void 0, oldValue);
1562
+ }
1563
+ return result;
1564
+ },
1565
+ clear() {
1566
+ const target = toRaw(this);
1567
+ const hadItems = target.size !== 0;
1568
+ const oldTarget = isMap(target) ? new Map(target) : new Set(target) ;
1569
+ const result = target.clear();
1570
+ if (hadItems) {
1571
+ trigger(
1572
+ target,
1573
+ "clear",
1574
+ void 0,
1575
+ void 0,
1576
+ oldTarget
1577
+ );
1578
+ }
1579
+ return result;
1580
+ }
1581
+ }
1582
+ );
1631
1583
  const iteratorMethods = [
1632
1584
  "keys",
1633
1585
  "values",
@@ -1635,30 +1587,12 @@ var Vue = (function (exports) {
1635
1587
  Symbol.iterator
1636
1588
  ];
1637
1589
  iteratorMethods.forEach((method) => {
1638
- mutableInstrumentations2[method] = createIterableMethod(method, false, false);
1639
- readonlyInstrumentations2[method] = createIterableMethod(method, true, false);
1640
- shallowInstrumentations2[method] = createIterableMethod(method, false, true);
1641
- shallowReadonlyInstrumentations2[method] = createIterableMethod(
1642
- method,
1643
- true,
1644
- true
1645
- );
1590
+ instrumentations[method] = createIterableMethod(method, readonly, shallow);
1646
1591
  });
1647
- return [
1648
- mutableInstrumentations2,
1649
- readonlyInstrumentations2,
1650
- shallowInstrumentations2,
1651
- shallowReadonlyInstrumentations2
1652
- ];
1592
+ return instrumentations;
1653
1593
  }
1654
- const [
1655
- mutableInstrumentations,
1656
- readonlyInstrumentations,
1657
- shallowInstrumentations,
1658
- shallowReadonlyInstrumentations
1659
- ] = /* @__PURE__ */ createInstrumentations();
1660
1594
  function createInstrumentationGetter(isReadonly2, shallow) {
1661
- const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations;
1595
+ const instrumentations = createInstrumentations(isReadonly2, shallow);
1662
1596
  return (target, key, receiver) => {
1663
1597
  if (key === "__v_isReactive") {
1664
1598
  return !isReadonly2;
@@ -1686,9 +1620,9 @@ var Vue = (function (exports) {
1686
1620
  const shallowReadonlyCollectionHandlers = {
1687
1621
  get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1688
1622
  };
1689
- function checkIdentityKeys(target, has2, key) {
1623
+ function checkIdentityKeys(target, has, key) {
1690
1624
  const rawKey = toRaw(key);
1691
- if (rawKey !== key && has2.call(target, rawKey)) {
1625
+ if (rawKey !== key && has.call(target, rawKey)) {
1692
1626
  const type = toRawType(target);
1693
1627
  warn$2(
1694
1628
  `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`
@@ -3114,7 +3048,7 @@ var Vue = (function (exports) {
3114
3048
  }
3115
3049
  if (!disabled) {
3116
3050
  mount(target, targetAnchor);
3117
- updateCssVars(n2);
3051
+ updateCssVars(n2, false);
3118
3052
  }
3119
3053
  } else if (!disabled) {
3120
3054
  warn$1(
@@ -3126,7 +3060,7 @@ var Vue = (function (exports) {
3126
3060
  };
3127
3061
  if (disabled) {
3128
3062
  mount(container, mainAnchor);
3129
- updateCssVars(n2);
3063
+ updateCssVars(n2, true);
3130
3064
  }
3131
3065
  if (isTeleportDeferred(n2.props)) {
3132
3066
  queuePostRenderEffect(mountToTarget, parentSuspense);
@@ -3216,7 +3150,7 @@ var Vue = (function (exports) {
3216
3150
  );
3217
3151
  }
3218
3152
  }
3219
- updateCssVars(n2);
3153
+ updateCssVars(n2, disabled);
3220
3154
  }
3221
3155
  },
3222
3156
  remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
@@ -3284,9 +3218,10 @@ var Vue = (function (exports) {
3284
3218
  querySelector
3285
3219
  );
3286
3220
  if (target) {
3221
+ const disabled = isTeleportDisabled(vnode.props);
3287
3222
  const targetNode = target._lpa || target.firstChild;
3288
3223
  if (vnode.shapeFlag & 16) {
3289
- if (isTeleportDisabled(vnode.props)) {
3224
+ if (disabled) {
3290
3225
  vnode.anchor = hydrateChildren(
3291
3226
  nextSibling(node),
3292
3227
  vnode,
@@ -3327,16 +3262,23 @@ var Vue = (function (exports) {
3327
3262
  );
3328
3263
  }
3329
3264
  }
3330
- updateCssVars(vnode);
3265
+ updateCssVars(vnode, disabled);
3331
3266
  }
3332
3267
  return vnode.anchor && nextSibling(vnode.anchor);
3333
3268
  }
3334
3269
  const Teleport = TeleportImpl;
3335
- function updateCssVars(vnode) {
3270
+ function updateCssVars(vnode, isDisabled) {
3336
3271
  const ctx = vnode.ctx;
3337
3272
  if (ctx && ctx.ut) {
3338
- let node = vnode.targetStart;
3339
- while (node && node !== vnode.targetAnchor) {
3273
+ let node, anchor;
3274
+ if (isDisabled) {
3275
+ node = vnode.el;
3276
+ anchor = vnode.anchor;
3277
+ } else {
3278
+ node = vnode.targetStart;
3279
+ anchor = vnode.targetAnchor;
3280
+ }
3281
+ while (node && node !== anchor) {
3340
3282
  if (node.nodeType === 1) node.setAttribute("data-v-owner", ctx.uid);
3341
3283
  node = node.nextSibling;
3342
3284
  }
@@ -3786,8 +3728,15 @@ var Vue = (function (exports) {
3786
3728
  const setupState = owner.setupState;
3787
3729
  const rawSetupState = toRaw(setupState);
3788
3730
  const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
3789
- if (knownTemplateRefs.has(rawSetupState[key])) {
3790
- return false;
3731
+ {
3732
+ if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {
3733
+ warn$1(
3734
+ `Template ref "${key}" used on a non-ref value. It will not work in the production build.`
3735
+ );
3736
+ }
3737
+ if (knownTemplateRefs.has(rawSetupState[key])) {
3738
+ return false;
3739
+ }
3791
3740
  }
3792
3741
  return hasOwn(rawSetupState, key);
3793
3742
  };
@@ -4084,7 +4033,11 @@ var Vue = (function (exports) {
4084
4033
  }
4085
4034
  let needCallTransitionHooks = false;
4086
4035
  if (isTemplateNode(el)) {
4087
- needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4036
+ needCallTransitionHooks = needTransition(
4037
+ null,
4038
+ // no need check parentSuspense in hydration
4039
+ transition
4040
+ ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
4088
4041
  const content = el.content.firstChild;
4089
4042
  if (needCallTransitionHooks) {
4090
4043
  transition.beforeEnter(content);
@@ -4477,6 +4430,8 @@ Server rendered element contains fewer child nodes than client vdom.`
4477
4430
  }
4478
4431
  }
4479
4432
 
4433
+ const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
4434
+ const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
4480
4435
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
4481
4436
  const id = requestIdleCallback(hydrate, { timeout });
4482
4437
  return () => cancelIdleCallback(id);
@@ -5173,12 +5128,13 @@ If this is a native custom element, make sure to exclude it from component resol
5173
5128
  }
5174
5129
  openBlock();
5175
5130
  const validSlotContent = slot && ensureValidVNode(slot(props));
5131
+ const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
5132
+ // key attached in the `createSlots` helper, respect that
5133
+ validSlotContent && validSlotContent.key;
5176
5134
  const rendered = createBlock(
5177
5135
  Fragment,
5178
5136
  {
5179
- key: (props.key || // slot content array of a dynamic conditional slot may have a branch
5180
- // key attached in the `createSlots` helper, respect that
5181
- validSlotContent && validSlotContent.key || `_${name}`) + // #7256 force differentiate fallback content from actual content
5137
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
5182
5138
  (!validSlotContent && fallback ? "_fb" : "")
5183
5139
  },
5184
5140
  validSlotContent || (fallback ? fallback() : []),
@@ -6533,6 +6489,7 @@ If you want to remount the same app, move your app creation logic into a factory
6533
6489
  function validateProps(rawProps, props, instance) {
6534
6490
  const resolvedValues = toRaw(props);
6535
6491
  const options = instance.propsOptions[0];
6492
+ const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));
6536
6493
  for (const key in options) {
6537
6494
  let opt = options[key];
6538
6495
  if (opt == null) continue;
@@ -6541,7 +6498,7 @@ If you want to remount the same app, move your app creation logic into a factory
6541
6498
  resolvedValues[key],
6542
6499
  opt,
6543
6500
  shallowReadonly(resolvedValues) ,
6544
- !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
6501
+ !camelizePropsKey.includes(key)
6545
6502
  );
6546
6503
  }
6547
6504
  }
@@ -8379,19 +8336,19 @@ If you want to remount the same app, move your app creation logic into a factory
8379
8336
  warn$1(`useModel() called without active instance.`);
8380
8337
  return ref();
8381
8338
  }
8382
- if (!i.propsOptions[0][name]) {
8339
+ const camelizedName = camelize(name);
8340
+ if (!i.propsOptions[0][camelizedName]) {
8383
8341
  warn$1(`useModel() called with prop "${name}" which is not declared.`);
8384
8342
  return ref();
8385
8343
  }
8386
- const camelizedName = camelize(name);
8387
8344
  const hyphenatedName = hyphenate(name);
8388
- const modifiers = getModelModifiers(props, name);
8345
+ const modifiers = getModelModifiers(props, camelizedName);
8389
8346
  const res = customRef((track, trigger) => {
8390
8347
  let localValue;
8391
8348
  let prevSetValue = EMPTY_OBJ;
8392
8349
  let prevEmittedValue;
8393
8350
  watchSyncEffect(() => {
8394
- const propValue = props[name];
8351
+ const propValue = props[camelizedName];
8395
8352
  if (hasChanged(localValue, propValue)) {
8396
8353
  localValue = propValue;
8397
8354
  trigger();
@@ -10006,9 +9963,9 @@ Component that was made reactive: `,
10006
9963
  }
10007
9964
  const { setup } = Component;
10008
9965
  if (setup) {
9966
+ pauseTracking();
10009
9967
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
10010
9968
  const reset = setCurrentInstance(instance);
10011
- pauseTracking();
10012
9969
  const setupResult = callWithErrorHandling(
10013
9970
  setup,
10014
9971
  instance,
@@ -10018,10 +9975,13 @@ Component that was made reactive: `,
10018
9975
  setupContext
10019
9976
  ]
10020
9977
  );
9978
+ const isAsyncSetup = isPromise(setupResult);
10021
9979
  resetTracking();
10022
9980
  reset();
10023
- if (isPromise(setupResult)) {
10024
- if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
9981
+ if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {
9982
+ markAsyncBoundary(instance);
9983
+ }
9984
+ if (isAsyncSetup) {
10025
9985
  setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
10026
9986
  if (isSSR) {
10027
9987
  return setupResult.then((resolvedResult) => {
@@ -10482,7 +10442,7 @@ Component that was made reactive: `,
10482
10442
  return true;
10483
10443
  }
10484
10444
 
10485
- const version = "3.5.11";
10445
+ const version = "3.5.12";
10486
10446
  const warn = warn$1 ;
10487
10447
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
10488
10448
  const devtools = devtools$1 ;
@@ -11096,7 +11056,7 @@ Component that was made reactive: `,
11096
11056
  }
11097
11057
  }
11098
11058
 
11099
- function patchDOMProp(el, key, value, parentComponent) {
11059
+ function patchDOMProp(el, key, value, parentComponent, attrName) {
11100
11060
  if (key === "innerHTML" || key === "textContent") {
11101
11061
  if (value != null) {
11102
11062
  el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
@@ -11144,7 +11104,7 @@ Component that was made reactive: `,
11144
11104
  );
11145
11105
  }
11146
11106
  }
11147
- needRemove && el.removeAttribute(key);
11107
+ needRemove && el.removeAttribute(attrName || key);
11148
11108
  }
11149
11109
 
11150
11110
  function addEventListener(el, event, handler, options) {
@@ -11254,7 +11214,7 @@ Expected function or array of functions, received type ${typeof value}.`
11254
11214
  // #11081 force set props for possible async custom element
11255
11215
  el._isVueCE && (/[A-Z]/.test(key) || !isString(nextValue))
11256
11216
  ) {
11257
- patchDOMProp(el, camelize(key), nextValue);
11217
+ patchDOMProp(el, camelize(key), nextValue, parentComponent, key);
11258
11218
  } else {
11259
11219
  if (key === "true-value") {
11260
11220
  el._trueValue = nextValue;
@@ -11960,7 +11920,7 @@ Expected function or array of functions, received type ${typeof value}.`
11960
11920
  setChecked(el, binding, vnode);
11961
11921
  }
11962
11922
  };
11963
- function setChecked(el, { value }, vnode) {
11923
+ function setChecked(el, { value, oldValue }, vnode) {
11964
11924
  el._modelValue = value;
11965
11925
  let checked;
11966
11926
  if (isArray(value)) {
@@ -11968,6 +11928,7 @@ Expected function or array of functions, received type ${typeof value}.`
11968
11928
  } else if (isSet(value)) {
11969
11929
  checked = value.has(vnode.props.value);
11970
11930
  } else {
11931
+ if (value === oldValue) return;
11971
11932
  checked = looseEqual(value, getCheckboxValue(el, true));
11972
11933
  }
11973
11934
  if (el.checked !== checked) {
@@ -14246,6 +14207,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
14246
14207
  source: end == null ? end : getSlice(start, end)
14247
14208
  };
14248
14209
  }
14210
+ function cloneLoc(loc) {
14211
+ return getLoc(loc.start.offset, loc.end.offset);
14212
+ }
14249
14213
  function setLocEnd(loc, end) {
14250
14214
  loc.end = tokenizer.getPos(end);
14251
14215
  loc.source = getSlice(loc.start.offset, end);
@@ -15590,7 +15554,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15590
15554
  const branch = createIfBranch(node, dir);
15591
15555
  const ifNode = {
15592
15556
  type: 9,
15593
- loc: node.loc,
15557
+ loc: cloneLoc(node.loc),
15594
15558
  branches: [branch]
15595
15559
  };
15596
15560
  context.replaceNode(ifNode);