@vue/compat 3.2.35 → 3.2.38

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.
@@ -641,7 +641,7 @@ var Vue = (function () {
641
641
  return;
642
642
  }
643
643
  let deps = [];
644
- if (type === "clear" /* CLEAR */) {
644
+ if (type === "clear" /* TriggerOpTypes.CLEAR */) {
645
645
  // collection being cleared
646
646
  // trigger all effects for target
647
647
  deps = [...depsMap.values()];
@@ -660,7 +660,7 @@ var Vue = (function () {
660
660
  }
661
661
  // also run for iteration key on ADD | DELETE | Map.SET
662
662
  switch (type) {
663
- case "add" /* ADD */:
663
+ case "add" /* TriggerOpTypes.ADD */:
664
664
  if (!isArray(target)) {
665
665
  deps.push(depsMap.get(ITERATE_KEY));
666
666
  if (isMap(target)) {
@@ -672,7 +672,7 @@ var Vue = (function () {
672
672
  deps.push(depsMap.get('length'));
673
673
  }
674
674
  break;
675
- case "delete" /* DELETE */:
675
+ case "delete" /* TriggerOpTypes.DELETE */:
676
676
  if (!isArray(target)) {
677
677
  deps.push(depsMap.get(ITERATE_KEY));
678
678
  if (isMap(target)) {
@@ -680,7 +680,7 @@ var Vue = (function () {
680
680
  }
681
681
  }
682
682
  break;
683
- case "set" /* SET */:
683
+ case "set" /* TriggerOpTypes.SET */:
684
684
  if (isMap(target)) {
685
685
  deps.push(depsMap.get(ITERATE_KEY));
686
686
  }
@@ -757,7 +757,7 @@ var Vue = (function () {
757
757
  instrumentations[key] = function (...args) {
758
758
  const arr = toRaw(this);
759
759
  for (let i = 0, l = this.length; i < l; i++) {
760
- track(arr, "get" /* GET */, i + '');
760
+ track(arr, "get" /* TrackOpTypes.GET */, i + '');
761
761
  }
762
762
  // we run the method using the original args first (which may be reactive)
763
763
  const res = arr[key](...args);
@@ -782,16 +782,16 @@ var Vue = (function () {
782
782
  }
783
783
  function createGetter(isReadonly = false, shallow = false) {
784
784
  return function get(target, key, receiver) {
785
- if (key === "__v_isReactive" /* IS_REACTIVE */) {
785
+ if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
786
786
  return !isReadonly;
787
787
  }
788
- else if (key === "__v_isReadonly" /* IS_READONLY */) {
788
+ else if (key === "__v_isReadonly" /* ReactiveFlags.IS_READONLY */) {
789
789
  return isReadonly;
790
790
  }
791
- else if (key === "__v_isShallow" /* IS_SHALLOW */) {
791
+ else if (key === "__v_isShallow" /* ReactiveFlags.IS_SHALLOW */) {
792
792
  return shallow;
793
793
  }
794
- else if (key === "__v_raw" /* RAW */ &&
794
+ else if (key === "__v_raw" /* ReactiveFlags.RAW */ &&
795
795
  receiver ===
796
796
  (isReadonly
797
797
  ? shallow
@@ -811,7 +811,7 @@ var Vue = (function () {
811
811
  return res;
812
812
  }
813
813
  if (!isReadonly) {
814
- track(target, "get" /* GET */, key);
814
+ track(target, "get" /* TrackOpTypes.GET */, key);
815
815
  }
816
816
  if (shallow) {
817
817
  return res;
@@ -837,10 +837,10 @@ var Vue = (function () {
837
837
  if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
838
838
  return false;
839
839
  }
840
- if (!shallow && !isReadonly(value)) {
841
- if (!isShallow(value)) {
842
- value = toRaw(value);
840
+ if (!shallow) {
841
+ if (!isShallow(value) && !isReadonly(value)) {
843
842
  oldValue = toRaw(oldValue);
843
+ value = toRaw(value);
844
844
  }
845
845
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
846
846
  oldValue.value = value;
@@ -854,10 +854,10 @@ var Vue = (function () {
854
854
  // don't trigger if target is something up in the prototype chain of original
855
855
  if (target === toRaw(receiver)) {
856
856
  if (!hadKey) {
857
- trigger(target, "add" /* ADD */, key, value);
857
+ trigger(target, "add" /* TriggerOpTypes.ADD */, key, value);
858
858
  }
859
859
  else if (hasChanged(value, oldValue)) {
860
- trigger(target, "set" /* SET */, key, value, oldValue);
860
+ trigger(target, "set" /* TriggerOpTypes.SET */, key, value, oldValue);
861
861
  }
862
862
  }
863
863
  return result;
@@ -868,19 +868,19 @@ var Vue = (function () {
868
868
  const oldValue = target[key];
869
869
  const result = Reflect.deleteProperty(target, key);
870
870
  if (result && hadKey) {
871
- trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
871
+ trigger(target, "delete" /* TriggerOpTypes.DELETE */, key, undefined, oldValue);
872
872
  }
873
873
  return result;
874
874
  }
875
875
  function has(target, key) {
876
876
  const result = Reflect.has(target, key);
877
877
  if (!isSymbol(key) || !builtInSymbols.has(key)) {
878
- track(target, "has" /* HAS */, key);
878
+ track(target, "has" /* TrackOpTypes.HAS */, key);
879
879
  }
880
880
  return result;
881
881
  }
882
882
  function ownKeys(target) {
883
- track(target, "iterate" /* ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);
883
+ track(target, "iterate" /* TrackOpTypes.ITERATE */, isArray(target) ? 'length' : ITERATE_KEY);
884
884
  return Reflect.ownKeys(target);
885
885
  }
886
886
  const mutableHandlers = {
@@ -921,14 +921,14 @@ var Vue = (function () {
921
921
  function get$1(target, key, isReadonly = false, isShallow = false) {
922
922
  // #1772: readonly(reactive(Map)) should return readonly + reactive version
923
923
  // of the value
924
- target = target["__v_raw" /* RAW */];
924
+ target = target["__v_raw" /* ReactiveFlags.RAW */];
925
925
  const rawTarget = toRaw(target);
926
926
  const rawKey = toRaw(key);
927
927
  if (!isReadonly) {
928
928
  if (key !== rawKey) {
929
- track(rawTarget, "get" /* GET */, key);
929
+ track(rawTarget, "get" /* TrackOpTypes.GET */, key);
930
930
  }
931
- track(rawTarget, "get" /* GET */, rawKey);
931
+ track(rawTarget, "get" /* TrackOpTypes.GET */, rawKey);
932
932
  }
933
933
  const { has } = getProto(rawTarget);
934
934
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
@@ -945,22 +945,22 @@ var Vue = (function () {
945
945
  }
946
946
  }
947
947
  function has$1(key, isReadonly = false) {
948
- const target = this["__v_raw" /* RAW */];
948
+ const target = this["__v_raw" /* ReactiveFlags.RAW */];
949
949
  const rawTarget = toRaw(target);
950
950
  const rawKey = toRaw(key);
951
951
  if (!isReadonly) {
952
952
  if (key !== rawKey) {
953
- track(rawTarget, "has" /* HAS */, key);
953
+ track(rawTarget, "has" /* TrackOpTypes.HAS */, key);
954
954
  }
955
- track(rawTarget, "has" /* HAS */, rawKey);
955
+ track(rawTarget, "has" /* TrackOpTypes.HAS */, rawKey);
956
956
  }
957
957
  return key === rawKey
958
958
  ? target.has(key)
959
959
  : target.has(key) || target.has(rawKey);
960
960
  }
961
961
  function size(target, isReadonly = false) {
962
- target = target["__v_raw" /* RAW */];
963
- !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY);
962
+ target = target["__v_raw" /* ReactiveFlags.RAW */];
963
+ !isReadonly && track(toRaw(target), "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
964
964
  return Reflect.get(target, 'size', target);
965
965
  }
966
966
  function add(value) {
@@ -970,7 +970,7 @@ var Vue = (function () {
970
970
  const hadKey = proto.has.call(target, value);
971
971
  if (!hadKey) {
972
972
  target.add(value);
973
- trigger(target, "add" /* ADD */, value, value);
973
+ trigger(target, "add" /* TriggerOpTypes.ADD */, value, value);
974
974
  }
975
975
  return this;
976
976
  }
@@ -989,10 +989,10 @@ var Vue = (function () {
989
989
  const oldValue = get.call(target, key);
990
990
  target.set(key, value);
991
991
  if (!hadKey) {
992
- trigger(target, "add" /* ADD */, key, value);
992
+ trigger(target, "add" /* TriggerOpTypes.ADD */, key, value);
993
993
  }
994
994
  else if (hasChanged(value, oldValue)) {
995
- trigger(target, "set" /* SET */, key, value, oldValue);
995
+ trigger(target, "set" /* TriggerOpTypes.SET */, key, value, oldValue);
996
996
  }
997
997
  return this;
998
998
  }
@@ -1011,7 +1011,7 @@ var Vue = (function () {
1011
1011
  // forward the operation before queueing reactions
1012
1012
  const result = target.delete(key);
1013
1013
  if (hadKey) {
1014
- trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
1014
+ trigger(target, "delete" /* TriggerOpTypes.DELETE */, key, undefined, oldValue);
1015
1015
  }
1016
1016
  return result;
1017
1017
  }
@@ -1025,17 +1025,17 @@ var Vue = (function () {
1025
1025
  // forward the operation before queueing reactions
1026
1026
  const result = target.clear();
1027
1027
  if (hadItems) {
1028
- trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget);
1028
+ trigger(target, "clear" /* TriggerOpTypes.CLEAR */, undefined, undefined, oldTarget);
1029
1029
  }
1030
1030
  return result;
1031
1031
  }
1032
1032
  function createForEach(isReadonly, isShallow) {
1033
1033
  return function forEach(callback, thisArg) {
1034
1034
  const observed = this;
1035
- const target = observed["__v_raw" /* RAW */];
1035
+ const target = observed["__v_raw" /* ReactiveFlags.RAW */];
1036
1036
  const rawTarget = toRaw(target);
1037
1037
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
1038
- !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY);
1038
+ !isReadonly && track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, ITERATE_KEY);
1039
1039
  return target.forEach((value, key) => {
1040
1040
  // important: make sure the callback is
1041
1041
  // 1. invoked with the reactive map as `this` and 3rd arg
@@ -1046,7 +1046,7 @@ var Vue = (function () {
1046
1046
  }
1047
1047
  function createIterableMethod(method, isReadonly, isShallow) {
1048
1048
  return function (...args) {
1049
- const target = this["__v_raw" /* RAW */];
1049
+ const target = this["__v_raw" /* ReactiveFlags.RAW */];
1050
1050
  const rawTarget = toRaw(target);
1051
1051
  const targetIsMap = isMap(rawTarget);
1052
1052
  const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);
@@ -1054,7 +1054,7 @@ var Vue = (function () {
1054
1054
  const innerIterator = target[method](...args);
1055
1055
  const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
1056
1056
  !isReadonly &&
1057
- track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
1057
+ track(rawTarget, "iterate" /* TrackOpTypes.ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
1058
1058
  // return a wrapped iterator which returns observed versions of the
1059
1059
  // values emitted from the real iterator
1060
1060
  return {
@@ -1081,7 +1081,7 @@ var Vue = (function () {
1081
1081
  const key = args[0] ? `on key "${args[0]}" ` : ``;
1082
1082
  console.warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
1083
1083
  }
1084
- return type === "delete" /* DELETE */ ? false : this;
1084
+ return type === "delete" /* TriggerOpTypes.DELETE */ ? false : this;
1085
1085
  };
1086
1086
  }
1087
1087
  function createInstrumentations() {
@@ -1123,10 +1123,10 @@ var Vue = (function () {
1123
1123
  has(key) {
1124
1124
  return has$1.call(this, key, true);
1125
1125
  },
1126
- add: createReadonlyMethod("add" /* ADD */),
1127
- set: createReadonlyMethod("set" /* SET */),
1128
- delete: createReadonlyMethod("delete" /* DELETE */),
1129
- clear: createReadonlyMethod("clear" /* CLEAR */),
1126
+ add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1127
+ set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
1128
+ delete: createReadonlyMethod("delete" /* TriggerOpTypes.DELETE */),
1129
+ clear: createReadonlyMethod("clear" /* TriggerOpTypes.CLEAR */),
1130
1130
  forEach: createForEach(true, false)
1131
1131
  };
1132
1132
  const shallowReadonlyInstrumentations = {
@@ -1139,10 +1139,10 @@ var Vue = (function () {
1139
1139
  has(key) {
1140
1140
  return has$1.call(this, key, true);
1141
1141
  },
1142
- add: createReadonlyMethod("add" /* ADD */),
1143
- set: createReadonlyMethod("set" /* SET */),
1144
- delete: createReadonlyMethod("delete" /* DELETE */),
1145
- clear: createReadonlyMethod("clear" /* CLEAR */),
1142
+ add: createReadonlyMethod("add" /* TriggerOpTypes.ADD */),
1143
+ set: createReadonlyMethod("set" /* TriggerOpTypes.SET */),
1144
+ delete: createReadonlyMethod("delete" /* TriggerOpTypes.DELETE */),
1145
+ clear: createReadonlyMethod("clear" /* TriggerOpTypes.CLEAR */),
1146
1146
  forEach: createForEach(true, true)
1147
1147
  };
1148
1148
  const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];
@@ -1169,13 +1169,13 @@ var Vue = (function () {
1169
1169
  ? readonlyInstrumentations
1170
1170
  : mutableInstrumentations;
1171
1171
  return (target, key, receiver) => {
1172
- if (key === "__v_isReactive" /* IS_REACTIVE */) {
1172
+ if (key === "__v_isReactive" /* ReactiveFlags.IS_REACTIVE */) {
1173
1173
  return !isReadonly;
1174
1174
  }
1175
- else if (key === "__v_isReadonly" /* IS_READONLY */) {
1175
+ else if (key === "__v_isReadonly" /* ReactiveFlags.IS_READONLY */) {
1176
1176
  return isReadonly;
1177
1177
  }
1178
- else if (key === "__v_raw" /* RAW */) {
1178
+ else if (key === "__v_raw" /* ReactiveFlags.RAW */) {
1179
1179
  return target;
1180
1180
  }
1181
1181
  return Reflect.get(hasOwn(instrumentations, key) && key in target
@@ -1215,19 +1215,19 @@ var Vue = (function () {
1215
1215
  switch (rawType) {
1216
1216
  case 'Object':
1217
1217
  case 'Array':
1218
- return 1 /* COMMON */;
1218
+ return 1 /* TargetType.COMMON */;
1219
1219
  case 'Map':
1220
1220
  case 'Set':
1221
1221
  case 'WeakMap':
1222
1222
  case 'WeakSet':
1223
- return 2 /* COLLECTION */;
1223
+ return 2 /* TargetType.COLLECTION */;
1224
1224
  default:
1225
- return 0 /* INVALID */;
1225
+ return 0 /* TargetType.INVALID */;
1226
1226
  }
1227
1227
  }
1228
1228
  function getTargetType(value) {
1229
- return value["__v_skip" /* SKIP */] || !Object.isExtensible(value)
1230
- ? 0 /* INVALID */
1229
+ return value["__v_skip" /* ReactiveFlags.SKIP */] || !Object.isExtensible(value)
1230
+ ? 0 /* TargetType.INVALID */
1231
1231
  : targetTypeMap(toRawType(value));
1232
1232
  }
1233
1233
  function reactive(target) {
@@ -1270,8 +1270,8 @@ var Vue = (function () {
1270
1270
  }
1271
1271
  // target is already a Proxy, return it.
1272
1272
  // exception: calling readonly() on a reactive object
1273
- if (target["__v_raw" /* RAW */] &&
1274
- !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) {
1273
+ if (target["__v_raw" /* ReactiveFlags.RAW */] &&
1274
+ !(isReadonly && target["__v_isReactive" /* ReactiveFlags.IS_REACTIVE */])) {
1275
1275
  return target;
1276
1276
  }
1277
1277
  // target already has corresponding Proxy
@@ -1281,34 +1281,34 @@ var Vue = (function () {
1281
1281
  }
1282
1282
  // only specific value types can be observed.
1283
1283
  const targetType = getTargetType(target);
1284
- if (targetType === 0 /* INVALID */) {
1284
+ if (targetType === 0 /* TargetType.INVALID */) {
1285
1285
  return target;
1286
1286
  }
1287
- const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);
1287
+ const proxy = new Proxy(target, targetType === 2 /* TargetType.COLLECTION */ ? collectionHandlers : baseHandlers);
1288
1288
  proxyMap.set(target, proxy);
1289
1289
  return proxy;
1290
1290
  }
1291
1291
  function isReactive(value) {
1292
1292
  if (isReadonly(value)) {
1293
- return isReactive(value["__v_raw" /* RAW */]);
1293
+ return isReactive(value["__v_raw" /* ReactiveFlags.RAW */]);
1294
1294
  }
1295
- return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);
1295
+ return !!(value && value["__v_isReactive" /* ReactiveFlags.IS_REACTIVE */]);
1296
1296
  }
1297
1297
  function isReadonly(value) {
1298
- return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
1298
+ return !!(value && value["__v_isReadonly" /* ReactiveFlags.IS_READONLY */]);
1299
1299
  }
1300
1300
  function isShallow(value) {
1301
- return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
1301
+ return !!(value && value["__v_isShallow" /* ReactiveFlags.IS_SHALLOW */]);
1302
1302
  }
1303
1303
  function isProxy(value) {
1304
1304
  return isReactive(value) || isReadonly(value);
1305
1305
  }
1306
1306
  function toRaw(observed) {
1307
- const raw = observed && observed["__v_raw" /* RAW */];
1307
+ const raw = observed && observed["__v_raw" /* ReactiveFlags.RAW */];
1308
1308
  return raw ? toRaw(raw) : observed;
1309
1309
  }
1310
1310
  function markRaw(value) {
1311
- def(value, "__v_skip" /* SKIP */, true);
1311
+ def(value, "__v_skip" /* ReactiveFlags.SKIP */, true);
1312
1312
  return value;
1313
1313
  }
1314
1314
  const toReactive = (value) => isObject(value) ? reactive(value) : value;
@@ -1320,7 +1320,7 @@ var Vue = (function () {
1320
1320
  {
1321
1321
  trackEffects(ref.dep || (ref.dep = createDep()), {
1322
1322
  target: ref,
1323
- type: "get" /* GET */,
1323
+ type: "get" /* TrackOpTypes.GET */,
1324
1324
  key: 'value'
1325
1325
  });
1326
1326
  }
@@ -1332,7 +1332,7 @@ var Vue = (function () {
1332
1332
  {
1333
1333
  triggerEffects(ref.dep, {
1334
1334
  target: ref,
1335
- type: "set" /* SET */,
1335
+ type: "set" /* TriggerOpTypes.SET */,
1336
1336
  key: 'value',
1337
1337
  newValue: newVal
1338
1338
  });
@@ -1367,10 +1367,11 @@ var Vue = (function () {
1367
1367
  return this._value;
1368
1368
  }
1369
1369
  set value(newVal) {
1370
- newVal = this.__v_isShallow ? newVal : toRaw(newVal);
1370
+ const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
1371
+ newVal = useDirectValue ? newVal : toRaw(newVal);
1371
1372
  if (hasChanged(newVal, this._rawValue)) {
1372
1373
  this._rawValue = newVal;
1373
- this._value = this.__v_isShallow ? newVal : toReactive(newVal);
1374
+ this._value = useDirectValue ? newVal : toReactive(newVal);
1374
1375
  triggerRefValue(this, newVal);
1375
1376
  }
1376
1377
  }
@@ -1449,11 +1450,13 @@ var Vue = (function () {
1449
1450
  : new ObjectRefImpl(object, key, defaultValue);
1450
1451
  }
1451
1452
 
1453
+ var _a;
1452
1454
  class ComputedRefImpl {
1453
1455
  constructor(getter, _setter, isReadonly, isSSR) {
1454
1456
  this._setter = _setter;
1455
1457
  this.dep = undefined;
1456
1458
  this.__v_isRef = true;
1459
+ this[_a] = false;
1457
1460
  this._dirty = true;
1458
1461
  this.effect = new ReactiveEffect(getter, () => {
1459
1462
  if (!this._dirty) {
@@ -1463,7 +1466,7 @@ var Vue = (function () {
1463
1466
  });
1464
1467
  this.effect.computed = this;
1465
1468
  this.effect.active = this._cacheable = !isSSR;
1466
- this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
1469
+ this["__v_isReadonly" /* ReactiveFlags.IS_READONLY */] = isReadonly;
1467
1470
  }
1468
1471
  get value() {
1469
1472
  // the computed ref may get wrapped by other proxies e.g. readonly() #3376
@@ -1479,6 +1482,7 @@ var Vue = (function () {
1479
1482
  this._setter(newValue);
1480
1483
  }
1481
1484
  }
1485
+ _a = "__v_isReadonly" /* ReactiveFlags.IS_READONLY */;
1482
1486
  function computed(getterOrOptions, debugOptions, isSSR = false) {
1483
1487
  let getter;
1484
1488
  let setter;
@@ -1517,7 +1521,7 @@ var Vue = (function () {
1517
1521
  const appWarnHandler = instance && instance.appContext.config.warnHandler;
1518
1522
  const trace = getComponentTrace();
1519
1523
  if (appWarnHandler) {
1520
- callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [
1524
+ callWithErrorHandling(appWarnHandler, instance, 11 /* ErrorCodes.APP_WARN_HANDLER */, [
1521
1525
  msg + args.join(''),
1522
1526
  instance && instance.proxy,
1523
1527
  trace
@@ -1617,35 +1621,35 @@ var Vue = (function () {
1617
1621
  }
1618
1622
 
1619
1623
  const ErrorTypeStrings = {
1620
- ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook',
1621
- ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook',
1622
- ["c" /* CREATED */]: 'created hook',
1623
- ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook',
1624
- ["m" /* MOUNTED */]: 'mounted hook',
1625
- ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook',
1626
- ["u" /* UPDATED */]: 'updated',
1627
- ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook',
1628
- ["um" /* UNMOUNTED */]: 'unmounted hook',
1629
- ["a" /* ACTIVATED */]: 'activated hook',
1630
- ["da" /* DEACTIVATED */]: 'deactivated hook',
1631
- ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook',
1632
- ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook',
1633
- ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook',
1634
- [0 /* SETUP_FUNCTION */]: 'setup function',
1635
- [1 /* RENDER_FUNCTION */]: 'render function',
1636
- [2 /* WATCH_GETTER */]: 'watcher getter',
1637
- [3 /* WATCH_CALLBACK */]: 'watcher callback',
1638
- [4 /* WATCH_CLEANUP */]: 'watcher cleanup function',
1639
- [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler',
1640
- [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler',
1641
- [7 /* VNODE_HOOK */]: 'vnode hook',
1642
- [8 /* DIRECTIVE_HOOK */]: 'directive hook',
1643
- [9 /* TRANSITION_HOOK */]: 'transition hook',
1644
- [10 /* APP_ERROR_HANDLER */]: 'app errorHandler',
1645
- [11 /* APP_WARN_HANDLER */]: 'app warnHandler',
1646
- [12 /* FUNCTION_REF */]: 'ref function',
1647
- [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
1648
- [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
1624
+ ["sp" /* LifecycleHooks.SERVER_PREFETCH */]: 'serverPrefetch hook',
1625
+ ["bc" /* LifecycleHooks.BEFORE_CREATE */]: 'beforeCreate hook',
1626
+ ["c" /* LifecycleHooks.CREATED */]: 'created hook',
1627
+ ["bm" /* LifecycleHooks.BEFORE_MOUNT */]: 'beforeMount hook',
1628
+ ["m" /* LifecycleHooks.MOUNTED */]: 'mounted hook',
1629
+ ["bu" /* LifecycleHooks.BEFORE_UPDATE */]: 'beforeUpdate hook',
1630
+ ["u" /* LifecycleHooks.UPDATED */]: 'updated',
1631
+ ["bum" /* LifecycleHooks.BEFORE_UNMOUNT */]: 'beforeUnmount hook',
1632
+ ["um" /* LifecycleHooks.UNMOUNTED */]: 'unmounted hook',
1633
+ ["a" /* LifecycleHooks.ACTIVATED */]: 'activated hook',
1634
+ ["da" /* LifecycleHooks.DEACTIVATED */]: 'deactivated hook',
1635
+ ["ec" /* LifecycleHooks.ERROR_CAPTURED */]: 'errorCaptured hook',
1636
+ ["rtc" /* LifecycleHooks.RENDER_TRACKED */]: 'renderTracked hook',
1637
+ ["rtg" /* LifecycleHooks.RENDER_TRIGGERED */]: 'renderTriggered hook',
1638
+ [0 /* ErrorCodes.SETUP_FUNCTION */]: 'setup function',
1639
+ [1 /* ErrorCodes.RENDER_FUNCTION */]: 'render function',
1640
+ [2 /* ErrorCodes.WATCH_GETTER */]: 'watcher getter',
1641
+ [3 /* ErrorCodes.WATCH_CALLBACK */]: 'watcher callback',
1642
+ [4 /* ErrorCodes.WATCH_CLEANUP */]: 'watcher cleanup function',
1643
+ [5 /* ErrorCodes.NATIVE_EVENT_HANDLER */]: 'native event handler',
1644
+ [6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */]: 'component event handler',
1645
+ [7 /* ErrorCodes.VNODE_HOOK */]: 'vnode hook',
1646
+ [8 /* ErrorCodes.DIRECTIVE_HOOK */]: 'directive hook',
1647
+ [9 /* ErrorCodes.TRANSITION_HOOK */]: 'transition hook',
1648
+ [10 /* ErrorCodes.APP_ERROR_HANDLER */]: 'app errorHandler',
1649
+ [11 /* ErrorCodes.APP_WARN_HANDLER */]: 'app warnHandler',
1650
+ [12 /* ErrorCodes.FUNCTION_REF */]: 'ref function',
1651
+ [13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */]: 'async component loader',
1652
+ [14 /* ErrorCodes.SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
1649
1653
  'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
1650
1654
  };
1651
1655
  function callWithErrorHandling(fn, instance, type, args) {
@@ -1696,7 +1700,7 @@ var Vue = (function () {
1696
1700
  // app-level handling
1697
1701
  const appErrorHandler = instance.appContext.config.errorHandler;
1698
1702
  if (appErrorHandler) {
1699
- callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);
1703
+ callWithErrorHandling(appErrorHandler, null, 10 /* ErrorCodes.APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);
1700
1704
  return;
1701
1705
  }
1702
1706
  }
@@ -1726,15 +1730,11 @@ var Vue = (function () {
1726
1730
  let isFlushPending = false;
1727
1731
  const queue = [];
1728
1732
  let flushIndex = 0;
1729
- const pendingPreFlushCbs = [];
1730
- let activePreFlushCbs = null;
1731
- let preFlushIndex = 0;
1732
1733
  const pendingPostFlushCbs = [];
1733
1734
  let activePostFlushCbs = null;
1734
1735
  let postFlushIndex = 0;
1735
1736
  const resolvedPromise = /*#__PURE__*/ Promise.resolve();
1736
1737
  let currentFlushPromise = null;
1737
- let currentPreFlushParentJob = null;
1738
1738
  const RECURSION_LIMIT = 100;
1739
1739
  function nextTick(fn) {
1740
1740
  const p = currentFlushPromise || resolvedPromise;
@@ -1762,9 +1762,8 @@ var Vue = (function () {
1762
1762
  // if the job is a watch() callback, the search will start with a +1 index to
1763
1763
  // allow it recursively trigger itself - it is the user's responsibility to
1764
1764
  // ensure it doesn't end up in an infinite loop.
1765
- if ((!queue.length ||
1766
- !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) &&
1767
- job !== currentPreFlushParentJob) {
1765
+ if (!queue.length ||
1766
+ !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) {
1768
1767
  if (job.id == null) {
1769
1768
  queue.push(job);
1770
1769
  }
@@ -1786,51 +1785,38 @@ var Vue = (function () {
1786
1785
  queue.splice(i, 1);
1787
1786
  }
1788
1787
  }
1789
- function queueCb(cb, activeQueue, pendingQueue, index) {
1788
+ function queuePostFlushCb(cb) {
1790
1789
  if (!isArray(cb)) {
1791
- if (!activeQueue ||
1792
- !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) {
1793
- pendingQueue.push(cb);
1790
+ if (!activePostFlushCbs ||
1791
+ !activePostFlushCbs.includes(cb, cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex)) {
1792
+ pendingPostFlushCbs.push(cb);
1794
1793
  }
1795
1794
  }
1796
1795
  else {
1797
1796
  // if cb is an array, it is a component lifecycle hook which can only be
1798
1797
  // triggered by a job, which is already deduped in the main queue, so
1799
1798
  // we can skip duplicate check here to improve perf
1800
- pendingQueue.push(...cb);
1799
+ pendingPostFlushCbs.push(...cb);
1801
1800
  }
1802
1801
  queueFlush();
1803
1802
  }
1804
- function queuePreFlushCb(cb) {
1805
- queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
1806
- }
1807
- function queuePostFlushCb(cb) {
1808
- queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
1809
- }
1810
- function flushPreFlushCbs(seen, parentJob = null) {
1811
- if (pendingPreFlushCbs.length) {
1812
- currentPreFlushParentJob = parentJob;
1813
- activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
1814
- pendingPreFlushCbs.length = 0;
1815
- {
1816
- seen = seen || new Map();
1817
- }
1818
- for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
1819
- if (checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) {
1803
+ function flushPreFlushCbs(seen, i = flushIndex) {
1804
+ {
1805
+ seen = seen || new Map();
1806
+ }
1807
+ for (; i < queue.length; i++) {
1808
+ const cb = queue[i];
1809
+ if (cb && cb.pre) {
1810
+ if (checkRecursiveUpdates(seen, cb)) {
1820
1811
  continue;
1821
1812
  }
1822
- activePreFlushCbs[preFlushIndex]();
1813
+ queue.splice(i, 1);
1814
+ i--;
1815
+ cb();
1823
1816
  }
1824
- activePreFlushCbs = null;
1825
- preFlushIndex = 0;
1826
- currentPreFlushParentJob = null;
1827
- // recursively flush until it drains
1828
- flushPreFlushCbs(seen, parentJob);
1829
1817
  }
1830
1818
  }
1831
1819
  function flushPostFlushCbs(seen) {
1832
- // flush any pre cbs queued during the flush (e.g. pre watchers)
1833
- flushPreFlushCbs();
1834
1820
  if (pendingPostFlushCbs.length) {
1835
1821
  const deduped = [...new Set(pendingPostFlushCbs)];
1836
1822
  pendingPostFlushCbs.length = 0;
@@ -1855,13 +1841,22 @@ var Vue = (function () {
1855
1841
  }
1856
1842
  }
1857
1843
  const getId = (job) => job.id == null ? Infinity : job.id;
1844
+ const comparator = (a, b) => {
1845
+ const diff = getId(a) - getId(b);
1846
+ if (diff === 0) {
1847
+ if (a.pre && !b.pre)
1848
+ return -1;
1849
+ if (b.pre && !a.pre)
1850
+ return 1;
1851
+ }
1852
+ return diff;
1853
+ };
1858
1854
  function flushJobs(seen) {
1859
1855
  isFlushPending = false;
1860
1856
  isFlushing = true;
1861
1857
  {
1862
1858
  seen = seen || new Map();
1863
1859
  }
1864
- flushPreFlushCbs(seen);
1865
1860
  // Sort queue before flush.
1866
1861
  // This ensures that:
1867
1862
  // 1. Components are updated from parent to child. (because parent is always
@@ -1869,7 +1864,7 @@ var Vue = (function () {
1869
1864
  // priority number)
1870
1865
  // 2. If a component is unmounted during a parent component's update,
1871
1866
  // its update can be skipped.
1872
- queue.sort((a, b) => getId(a) - getId(b));
1867
+ queue.sort(comparator);
1873
1868
  // conditional usage of checkRecursiveUpdate must be determined out of
1874
1869
  // try ... catch block since Rollup by default de-optimizes treeshaking
1875
1870
  // inside try-catch. This can leave all warning code unshaked. Although
@@ -1885,7 +1880,7 @@ var Vue = (function () {
1885
1880
  continue;
1886
1881
  }
1887
1882
  // console.log(`running:`, job.id)
1888
- callWithErrorHandling(job, null, 14 /* SCHEDULER */);
1883
+ callWithErrorHandling(job, null, 14 /* ErrorCodes.SCHEDULER */);
1889
1884
  }
1890
1885
  }
1891
1886
  }
@@ -1897,9 +1892,7 @@ var Vue = (function () {
1897
1892
  currentFlushPromise = null;
1898
1893
  // some postFlushCb queued jobs!
1899
1894
  // keep flushing until it drains.
1900
- if (queue.length ||
1901
- pendingPreFlushCbs.length ||
1902
- pendingPostFlushCbs.length) {
1895
+ if (queue.length || pendingPostFlushCbs.length) {
1903
1896
  flushJobs(seen);
1904
1897
  }
1905
1898
  }
@@ -2117,7 +2110,7 @@ var Vue = (function () {
2117
2110
  }
2118
2111
  }
2119
2112
  function devtoolsInitApp(app, version) {
2120
- emit("app:init" /* APP_INIT */, app, version, {
2113
+ emit("app:init" /* DevtoolsHooks.APP_INIT */, app, version, {
2121
2114
  Fragment,
2122
2115
  Text,
2123
2116
  Comment,
@@ -2125,88 +2118,88 @@ var Vue = (function () {
2125
2118
  });
2126
2119
  }
2127
2120
  function devtoolsUnmountApp(app) {
2128
- emit("app:unmount" /* APP_UNMOUNT */, app);
2121
+ emit("app:unmount" /* DevtoolsHooks.APP_UNMOUNT */, app);
2129
2122
  }
2130
- const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
2123
+ const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* DevtoolsHooks.COMPONENT_ADDED */);
2131
2124
  const devtoolsComponentUpdated =
2132
- /*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
2125
+ /*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* DevtoolsHooks.COMPONENT_UPDATED */);
2133
2126
  const devtoolsComponentRemoved =
2134
- /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */);
2127
+ /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* DevtoolsHooks.COMPONENT_REMOVED */);
2135
2128
  function createDevtoolsComponentHook(hook) {
2136
2129
  return (component) => {
2137
2130
  emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
2138
2131
  };
2139
2132
  }
2140
- const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
2141
- const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
2133
+ const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* DevtoolsHooks.PERFORMANCE_START */);
2134
+ const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* DevtoolsHooks.PERFORMANCE_END */);
2142
2135
  function createDevtoolsPerformanceHook(hook) {
2143
2136
  return (component, type, time) => {
2144
2137
  emit(hook, component.appContext.app, component.uid, component, type, time);
2145
2138
  };
2146
2139
  }
2147
2140
  function devtoolsComponentEmit(component, event, params) {
2148
- emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
2141
+ emit("component:emit" /* DevtoolsHooks.COMPONENT_EMIT */, component.appContext.app, component, event, params);
2149
2142
  }
2150
2143
 
2151
2144
  const deprecationData = {
2152
- ["GLOBAL_MOUNT" /* GLOBAL_MOUNT */]: {
2145
+ ["GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */]: {
2153
2146
  message: `The global app bootstrapping API has changed: vm.$mount() and the "el" ` +
2154
2147
  `option have been removed. Use createApp(RootComponent).mount() instead.`,
2155
2148
  link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#mounting-app-instance`
2156
2149
  },
2157
- ["GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */]: {
2150
+ ["GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */]: {
2158
2151
  message: `Vue detected directives on the mount container. ` +
2159
2152
  `In Vue 3, the container is no longer considered part of the template ` +
2160
2153
  `and will not be processed/replaced.`,
2161
2154
  link: `https://v3-migration.vuejs.org/breaking-changes/mount-changes.html`
2162
2155
  },
2163
- ["GLOBAL_EXTEND" /* GLOBAL_EXTEND */]: {
2156
+ ["GLOBAL_EXTEND" /* DeprecationTypes.GLOBAL_EXTEND */]: {
2164
2157
  message: `Vue.extend() has been removed in Vue 3. ` +
2165
2158
  `Use defineComponent() instead.`,
2166
2159
  link: `https://vuejs.org/api/general.html#definecomponent`
2167
2160
  },
2168
- ["GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */]: {
2161
+ ["GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */]: {
2169
2162
  message: `Vue.prototype is no longer available in Vue 3. ` +
2170
2163
  `Use app.config.globalProperties instead.`,
2171
2164
  link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#vue-prototype-replaced-by-config-globalproperties`
2172
2165
  },
2173
- ["GLOBAL_SET" /* GLOBAL_SET */]: {
2166
+ ["GLOBAL_SET" /* DeprecationTypes.GLOBAL_SET */]: {
2174
2167
  message: `Vue.set() has been removed as it is no longer needed in Vue 3. ` +
2175
2168
  `Simply use native JavaScript mutations.`
2176
2169
  },
2177
- ["GLOBAL_DELETE" /* GLOBAL_DELETE */]: {
2170
+ ["GLOBAL_DELETE" /* DeprecationTypes.GLOBAL_DELETE */]: {
2178
2171
  message: `Vue.delete() has been removed as it is no longer needed in Vue 3. ` +
2179
2172
  `Simply use native JavaScript mutations.`
2180
2173
  },
2181
- ["GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */]: {
2174
+ ["GLOBAL_OBSERVABLE" /* DeprecationTypes.GLOBAL_OBSERVABLE */]: {
2182
2175
  message: `Vue.observable() has been removed. ` +
2183
2176
  `Use \`import { reactive } from "vue"\` from Composition API instead.`,
2184
2177
  link: `https://vuejs.org/api/reactivity-core.html#reactive`
2185
2178
  },
2186
- ["GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */]: {
2179
+ ["GLOBAL_PRIVATE_UTIL" /* DeprecationTypes.GLOBAL_PRIVATE_UTIL */]: {
2187
2180
  message: `Vue.util has been removed. Please refactor to avoid its usage ` +
2188
2181
  `since it was an internal API even in Vue 2.`
2189
2182
  },
2190
- ["CONFIG_SILENT" /* CONFIG_SILENT */]: {
2183
+ ["CONFIG_SILENT" /* DeprecationTypes.CONFIG_SILENT */]: {
2191
2184
  message: `config.silent has been removed because it is not good practice to ` +
2192
2185
  `intentionally suppress warnings. You can use your browser console's ` +
2193
2186
  `filter features to focus on relevant messages.`
2194
2187
  },
2195
- ["CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */]: {
2188
+ ["CONFIG_DEVTOOLS" /* DeprecationTypes.CONFIG_DEVTOOLS */]: {
2196
2189
  message: `config.devtools has been removed. To enable devtools for ` +
2197
2190
  `production, configure the __VUE_PROD_DEVTOOLS__ compile-time flag.`,
2198
2191
  link: `https://github.com/vuejs/core/tree/main/packages/vue#bundler-build-feature-flags`
2199
2192
  },
2200
- ["CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */]: {
2193
+ ["CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */]: {
2201
2194
  message: `config.keyCodes has been removed. ` +
2202
2195
  `In Vue 3, you can directly use the kebab-case key names as v-on modifiers.`,
2203
2196
  link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
2204
2197
  },
2205
- ["CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */]: {
2198
+ ["CONFIG_PRODUCTION_TIP" /* DeprecationTypes.CONFIG_PRODUCTION_TIP */]: {
2206
2199
  message: `config.productionTip has been removed.`,
2207
2200
  link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-productiontip-removed`
2208
2201
  },
2209
- ["CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */]: {
2202
+ ["CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */]: {
2210
2203
  message: () => {
2211
2204
  let msg = `config.ignoredElements has been removed.`;
2212
2205
  if (isRuntimeOnly()) {
@@ -2219,35 +2212,35 @@ var Vue = (function () {
2219
2212
  },
2220
2213
  link: `https://v3-migration.vuejs.org/breaking-changes/global-api.html#config-ignoredelements-is-now-config-iscustomelement`
2221
2214
  },
2222
- ["CONFIG_WHITESPACE" /* CONFIG_WHITESPACE */]: {
2215
+ ["CONFIG_WHITESPACE" /* DeprecationTypes.CONFIG_WHITESPACE */]: {
2223
2216
  // this warning is only relevant in the full build when using runtime
2224
2217
  // compilation, so it's put in the runtime compatConfig list.
2225
2218
  message: `Vue 3 compiler's whitespace option will default to "condense" instead of ` +
2226
2219
  `"preserve". To suppress this warning, provide an explicit value for ` +
2227
2220
  `\`config.compilerOptions.whitespace\`.`
2228
2221
  },
2229
- ["CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */]: {
2222
+ ["CONFIG_OPTION_MERGE_STRATS" /* DeprecationTypes.CONFIG_OPTION_MERGE_STRATS */]: {
2230
2223
  message: `config.optionMergeStrategies no longer exposes internal strategies. ` +
2231
2224
  `Use custom merge functions instead.`
2232
2225
  },
2233
- ["INSTANCE_SET" /* INSTANCE_SET */]: {
2226
+ ["INSTANCE_SET" /* DeprecationTypes.INSTANCE_SET */]: {
2234
2227
  message: `vm.$set() has been removed as it is no longer needed in Vue 3. ` +
2235
2228
  `Simply use native JavaScript mutations.`
2236
2229
  },
2237
- ["INSTANCE_DELETE" /* INSTANCE_DELETE */]: {
2230
+ ["INSTANCE_DELETE" /* DeprecationTypes.INSTANCE_DELETE */]: {
2238
2231
  message: `vm.$delete() has been removed as it is no longer needed in Vue 3. ` +
2239
2232
  `Simply use native JavaScript mutations.`
2240
2233
  },
2241
- ["INSTANCE_DESTROY" /* INSTANCE_DESTROY */]: {
2234
+ ["INSTANCE_DESTROY" /* DeprecationTypes.INSTANCE_DESTROY */]: {
2242
2235
  message: `vm.$destroy() has been removed. Use app.unmount() instead.`,
2243
2236
  link: `https://vuejs.org/api/application.html#app-unmount`
2244
2237
  },
2245
- ["INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */]: {
2238
+ ["INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */]: {
2246
2239
  message: `vm.$on/$once/$off() have been removed. ` +
2247
2240
  `Use an external event emitter library instead.`,
2248
2241
  link: `https://v3-migration.vuejs.org/breaking-changes/events-api.html`
2249
2242
  },
2250
- ["INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */]: {
2243
+ ["INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */]: {
2251
2244
  message: event => `"${event}" lifecycle events are no longer supported. From templates, ` +
2252
2245
  `use the "vnode" prefix instead of "hook:". For example, @${event} ` +
2253
2246
  `should be changed to @vnode-${event.slice(5)}. ` +
@@ -2255,23 +2248,23 @@ var Vue = (function () {
2255
2248
  `hooks.`,
2256
2249
  link: `https://v3-migration.vuejs.org/breaking-changes/vnode-lifecycle-events.html`
2257
2250
  },
2258
- ["INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */]: {
2251
+ ["INSTANCE_CHILDREN" /* DeprecationTypes.INSTANCE_CHILDREN */]: {
2259
2252
  message: `vm.$children has been removed. Consider refactoring your logic ` +
2260
2253
  `to avoid relying on direct access to child components.`,
2261
2254
  link: `https://v3-migration.vuejs.org/breaking-changes/children.html`
2262
2255
  },
2263
- ["INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */]: {
2256
+ ["INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */]: {
2264
2257
  message: `vm.$listeners has been removed. In Vue 3, parent v-on listeners are ` +
2265
2258
  `included in vm.$attrs and it is no longer necessary to separately use ` +
2266
2259
  `v-on="$listeners" if you are already using v-bind="$attrs". ` +
2267
2260
  `(Note: the Vue 3 behavior only applies if this compat config is disabled)`,
2268
2261
  link: `https://v3-migration.vuejs.org/breaking-changes/listeners-removed.html`
2269
2262
  },
2270
- ["INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */]: {
2263
+ ["INSTANCE_SCOPED_SLOTS" /* DeprecationTypes.INSTANCE_SCOPED_SLOTS */]: {
2271
2264
  message: `vm.$scopedSlots has been removed. Use vm.$slots instead.`,
2272
2265
  link: `https://v3-migration.vuejs.org/breaking-changes/slots-unification.html`
2273
2266
  },
2274
- ["INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */]: {
2267
+ ["INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */]: {
2275
2268
  message: componentName => `Component <${componentName || 'Anonymous'}> has \`inheritAttrs: false\` but is ` +
2276
2269
  `relying on class/style fallthrough from parent. In Vue 3, class/style ` +
2277
2270
  `are now included in $attrs and will no longer fallthrough when ` +
@@ -2282,75 +2275,75 @@ var Vue = (function () {
2282
2275
  `them on root via :class="$attrs.class".`,
2283
2276
  link: `https://v3-migration.vuejs.org/breaking-changes/attrs-includes-class-style.html`
2284
2277
  },
2285
- ["OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */]: {
2278
+ ["OPTIONS_DATA_FN" /* DeprecationTypes.OPTIONS_DATA_FN */]: {
2286
2279
  message: `The "data" option can no longer be a plain object. ` +
2287
2280
  `Always use a function.`,
2288
2281
  link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html`
2289
2282
  },
2290
- ["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */]: {
2283
+ ["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */]: {
2291
2284
  message: (key) => `Detected conflicting key "${key}" when merging data option values. ` +
2292
2285
  `In Vue 3, data keys are merged shallowly and will override one another.`,
2293
2286
  link: `https://v3-migration.vuejs.org/breaking-changes/data-option.html#mixin-merge-behavior-change`
2294
2287
  },
2295
- ["OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */]: {
2288
+ ["OPTIONS_BEFORE_DESTROY" /* DeprecationTypes.OPTIONS_BEFORE_DESTROY */]: {
2296
2289
  message: `\`beforeDestroy\` has been renamed to \`beforeUnmount\`.`
2297
2290
  },
2298
- ["OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */]: {
2291
+ ["OPTIONS_DESTROYED" /* DeprecationTypes.OPTIONS_DESTROYED */]: {
2299
2292
  message: `\`destroyed\` has been renamed to \`unmounted\`.`
2300
2293
  },
2301
- ["WATCH_ARRAY" /* WATCH_ARRAY */]: {
2294
+ ["WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */]: {
2302
2295
  message: `"watch" option or vm.$watch on an array value will no longer ` +
2303
2296
  `trigger on array mutation unless the "deep" option is specified. ` +
2304
2297
  `If current usage is intended, you can disable the compat behavior and ` +
2305
2298
  `suppress this warning with:` +
2306
- `\n\n configureCompat({ ${"WATCH_ARRAY" /* WATCH_ARRAY */}: false })\n`,
2299
+ `\n\n configureCompat({ ${"WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */}: false })\n`,
2307
2300
  link: `https://v3-migration.vuejs.org/breaking-changes/watch.html`
2308
2301
  },
2309
- ["PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */]: {
2302
+ ["PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */]: {
2310
2303
  message: (key) => `props default value function no longer has access to "this". The compat ` +
2311
2304
  `build only offers access to this.$options.` +
2312
2305
  `(found in prop "${key}")`,
2313
2306
  link: `https://v3-migration.vuejs.org/breaking-changes/props-default-this.html`
2314
2307
  },
2315
- ["CUSTOM_DIR" /* CUSTOM_DIR */]: {
2308
+ ["CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */]: {
2316
2309
  message: (legacyHook, newHook) => `Custom directive hook "${legacyHook}" has been removed. ` +
2317
2310
  `Use "${newHook}" instead.`,
2318
2311
  link: `https://v3-migration.vuejs.org/breaking-changes/custom-directives.html`
2319
2312
  },
2320
- ["V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */]: {
2313
+ ["V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */]: {
2321
2314
  message: `Using keyCode as v-on modifier is no longer supported. ` +
2322
2315
  `Use kebab-case key name modifiers instead.`,
2323
2316
  link: `https://v3-migration.vuejs.org/breaking-changes/keycode-modifiers.html`
2324
2317
  },
2325
- ["ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */]: {
2318
+ ["ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */]: {
2326
2319
  message: (name) => `Attribute "${name}" with v-bind value \`false\` will render ` +
2327
2320
  `${name}="false" instead of removing it in Vue 3. To remove the attribute, ` +
2328
2321
  `use \`null\` or \`undefined\` instead. If the usage is intended, ` +
2329
2322
  `you can disable the compat behavior and suppress this warning with:` +
2330
- `\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */}: false })\n`,
2323
+ `\n\n configureCompat({ ${"ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */}: false })\n`,
2331
2324
  link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
2332
2325
  },
2333
- ["ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */]: {
2326
+ ["ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */]: {
2334
2327
  message: (name, value, coerced) => `Enumerated attribute "${name}" with v-bind value \`${value}\` will ` +
2335
2328
  `${value === null ? `be removed` : `render the value as-is`} instead of coercing the value to "${coerced}" in Vue 3. ` +
2336
2329
  `Always use explicit "true" or "false" values for enumerated attributes. ` +
2337
2330
  `If the usage is intended, ` +
2338
2331
  `you can disable the compat behavior and suppress this warning with:` +
2339
- `\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */}: false })\n`,
2332
+ `\n\n configureCompat({ ${"ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */}: false })\n`,
2340
2333
  link: `https://v3-migration.vuejs.org/breaking-changes/attribute-coercion.html`
2341
2334
  },
2342
- ["TRANSITION_CLASSES" /* TRANSITION_CLASSES */]: {
2335
+ ["TRANSITION_CLASSES" /* DeprecationTypes.TRANSITION_CLASSES */]: {
2343
2336
  message: `` // this feature cannot be runtime-detected
2344
2337
  },
2345
- ["TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */]: {
2338
+ ["TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */]: {
2346
2339
  message: `<TransitionGroup> no longer renders a root <span> element by ` +
2347
2340
  `default if no "tag" prop is specified. If you do not rely on the span ` +
2348
2341
  `for styling, you can disable the compat behavior and suppress this ` +
2349
2342
  `warning with:` +
2350
- `\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */}: false })\n`,
2343
+ `\n\n configureCompat({ ${"TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */}: false })\n`,
2351
2344
  link: `https://v3-migration.vuejs.org/breaking-changes/transition-group.html`
2352
2345
  },
2353
- ["COMPONENT_ASYNC" /* COMPONENT_ASYNC */]: {
2346
+ ["COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */]: {
2354
2347
  message: (comp) => {
2355
2348
  const name = getComponentName(comp);
2356
2349
  return (`Async component${name ? ` <${name}>` : `s`} should be explicitly created via \`defineAsyncComponent()\` ` +
@@ -2359,11 +2352,11 @@ var Vue = (function () {
2359
2352
  `usage and intend to use plain functions for functional components, ` +
2360
2353
  `you can disable the compat behavior and suppress this ` +
2361
2354
  `warning with:` +
2362
- `\n\n configureCompat({ ${"COMPONENT_ASYNC" /* COMPONENT_ASYNC */}: false })\n`);
2355
+ `\n\n configureCompat({ ${"COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */}: false })\n`);
2363
2356
  },
2364
2357
  link: `https://v3-migration.vuejs.org/breaking-changes/async-components.html`
2365
2358
  },
2366
- ["COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */]: {
2359
+ ["COMPONENT_FUNCTIONAL" /* DeprecationTypes.COMPONENT_FUNCTIONAL */]: {
2367
2360
  message: (comp) => {
2368
2361
  const name = getComponentName(comp);
2369
2362
  return (`Functional component${name ? ` <${name}>` : `s`} should be defined as a plain function in Vue 3. The "functional" ` +
@@ -2374,10 +2367,10 @@ var Vue = (function () {
2374
2367
  },
2375
2368
  link: `https://v3-migration.vuejs.org/breaking-changes/functional-components.html`
2376
2369
  },
2377
- ["COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */]: {
2370
+ ["COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */]: {
2378
2371
  message: (comp) => {
2379
2372
  const configMsg = `opt-in to ` +
2380
- `Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */}: false }\`.`;
2373
+ `Vue 3 behavior on a per-component basis with \`compatConfig: { ${"COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */}: false }\`.`;
2381
2374
  if (comp.props &&
2382
2375
  (isArray(comp.props)
2383
2376
  ? comp.props.includes('modelValue')
@@ -2391,20 +2384,20 @@ var Vue = (function () {
2391
2384
  },
2392
2385
  link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
2393
2386
  },
2394
- ["RENDER_FUNCTION" /* RENDER_FUNCTION */]: {
2387
+ ["RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */]: {
2395
2388
  message: `Vue 3's render function API has changed. ` +
2396
2389
  `You can opt-in to the new API with:` +
2397
- `\n\n configureCompat({ ${"RENDER_FUNCTION" /* RENDER_FUNCTION */}: false })\n` +
2390
+ `\n\n configureCompat({ ${"RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */}: false })\n` +
2398
2391
  `\n (This can also be done per-component via the "compatConfig" option.)`,
2399
2392
  link: `https://v3-migration.vuejs.org/breaking-changes/render-function-api.html`
2400
2393
  },
2401
- ["FILTERS" /* FILTERS */]: {
2394
+ ["FILTERS" /* DeprecationTypes.FILTERS */]: {
2402
2395
  message: `filters have been removed in Vue 3. ` +
2403
2396
  `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
2404
2397
  `Use method calls or computed properties instead.`,
2405
2398
  link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
2406
2399
  },
2407
- ["PRIVATE_APIS" /* PRIVATE_APIS */]: {
2400
+ ["PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */]: {
2408
2401
  message: name => `"${name}" is a Vue 2 private API that no longer exists in Vue 3. ` +
2409
2402
  `If you are seeing this warning only due to a dependency, you can ` +
2410
2403
  `suppress this warning via { PRIVATE_APIS: 'suppress-warning' }.`
@@ -2479,8 +2472,8 @@ var Vue = (function () {
2479
2472
  warnedInvalidKeys[key] = true;
2480
2473
  }
2481
2474
  }
2482
- if (instance && config["OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */] != null) {
2483
- warn$1(`Deprecation config "${"OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */}" can only be configured globally.`);
2475
+ if (instance && config["OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */] != null) {
2476
+ warn$1(`Deprecation config "${"OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */}" can only be configured globally.`);
2484
2477
  }
2485
2478
  }
2486
2479
  function getCompatConfigForKey(key, instance) {
@@ -2555,10 +2548,10 @@ var Vue = (function () {
2555
2548
  }
2556
2549
  else {
2557
2550
  if (event.startsWith('hook:')) {
2558
- assertCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance, event);
2551
+ assertCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance, event);
2559
2552
  }
2560
2553
  else {
2561
- assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */, instance);
2554
+ assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */, instance);
2562
2555
  }
2563
2556
  const events = getRegistry(instance);
2564
2557
  (events[event] || (events[event] = [])).push(fn);
@@ -2575,7 +2568,7 @@ var Vue = (function () {
2575
2568
  return instance.proxy;
2576
2569
  }
2577
2570
  function off(instance, event, fn) {
2578
- assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* INSTANCE_EVENT_EMITTER */, instance);
2571
+ assertCompatEnabled("INSTANCE_EVENT_EMITTER" /* DeprecationTypes.INSTANCE_EVENT_EMITTER */, instance);
2579
2572
  const vm = instance.proxy;
2580
2573
  // all
2581
2574
  if (!event) {
@@ -2603,7 +2596,7 @@ var Vue = (function () {
2603
2596
  function emit$1(instance, event, args) {
2604
2597
  const cbs = getRegistry(instance)[event];
2605
2598
  if (cbs) {
2606
- callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
2599
+ callWithAsyncErrorHandling(cbs.map(cb => cb.bind(instance.proxy)), instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
2607
2600
  }
2608
2601
  return instance.proxy;
2609
2602
  }
@@ -2613,8 +2606,8 @@ var Vue = (function () {
2613
2606
  function convertLegacyVModelProps(vnode) {
2614
2607
  const { type, shapeFlag, props, dynamicProps } = vnode;
2615
2608
  const comp = type;
2616
- if (shapeFlag & 6 /* COMPONENT */ && props && 'modelValue' in props) {
2617
- if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */,
2609
+ if (shapeFlag & 6 /* ShapeFlags.COMPONENT */ && props && 'modelValue' in props) {
2610
+ if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */,
2618
2611
  // this is a special case where we want to use the vnode component's
2619
2612
  // compat config instead of the current rendering instance (which is the
2620
2613
  // parent of the component that exposes v-model)
@@ -2623,7 +2616,7 @@ var Vue = (function () {
2623
2616
  }
2624
2617
  if (!warnedTypes.has(comp)) {
2625
2618
  pushWarningContext(vnode);
2626
- warnDeprecation("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, { type }, comp);
2619
+ warnDeprecation("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, { type }, comp);
2627
2620
  popWarningContext();
2628
2621
  warnedTypes.add(comp);
2629
2622
  }
@@ -2656,13 +2649,13 @@ var Vue = (function () {
2656
2649
  }
2657
2650
  }
2658
2651
  function compatModelEmit(instance, event, args) {
2659
- if (!isCompatEnabled("COMPONENT_V_MODEL" /* COMPONENT_V_MODEL */, instance)) {
2652
+ if (!isCompatEnabled("COMPONENT_V_MODEL" /* DeprecationTypes.COMPONENT_V_MODEL */, instance)) {
2660
2653
  return;
2661
2654
  }
2662
2655
  const props = instance.vnode.props;
2663
2656
  const modelHandler = props && props[compatModelEventPrefix + event];
2664
2657
  if (modelHandler) {
2665
- callWithErrorHandling(modelHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
2658
+ callWithErrorHandling(modelHandler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
2666
2659
  }
2667
2660
  }
2668
2661
 
@@ -2729,7 +2722,7 @@ var Vue = (function () {
2729
2722
  handler = props[(handlerName = toHandlerKey(hyphenate(event)))];
2730
2723
  }
2731
2724
  if (handler) {
2732
- callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
2725
+ callWithAsyncErrorHandling(handler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
2733
2726
  }
2734
2727
  const onceHandler = props[handlerName + `Once`];
2735
2728
  if (onceHandler) {
@@ -2740,7 +2733,7 @@ var Vue = (function () {
2740
2733
  return;
2741
2734
  }
2742
2735
  instance.emitted[handlerName] = true;
2743
- callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
2736
+ callWithAsyncErrorHandling(onceHandler, instance, 6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */, args);
2744
2737
  }
2745
2738
  {
2746
2739
  compatModelEmit(instance, event, args);
@@ -2776,7 +2769,9 @@ var Vue = (function () {
2776
2769
  }
2777
2770
  }
2778
2771
  if (!raw && !hasExtends) {
2779
- cache.set(comp, null);
2772
+ if (isObject(comp)) {
2773
+ cache.set(comp, null);
2774
+ }
2780
2775
  return null;
2781
2776
  }
2782
2777
  if (isArray(raw)) {
@@ -2785,7 +2780,9 @@ var Vue = (function () {
2785
2780
  else {
2786
2781
  extend(normalized, raw);
2787
2782
  }
2788
- cache.set(comp, normalized);
2783
+ if (isObject(comp)) {
2784
+ cache.set(comp, normalized);
2785
+ }
2789
2786
  return normalized;
2790
2787
  }
2791
2788
  // Check if an incoming prop key is a declared emit event listener.
@@ -2915,7 +2912,7 @@ var Vue = (function () {
2915
2912
  accessedAttrs = false;
2916
2913
  }
2917
2914
  try {
2918
- if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
2915
+ if (vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) {
2919
2916
  // withProxy is a proxy with a different `has` trap only for
2920
2917
  // runtime-compiled render functions using `with` block.
2921
2918
  const proxyToUse = withProxy || proxy;
@@ -2948,7 +2945,7 @@ var Vue = (function () {
2948
2945
  }
2949
2946
  catch (err) {
2950
2947
  blockStack.length = 0;
2951
- handleError(err, instance, 1 /* RENDER_FUNCTION */);
2948
+ handleError(err, instance, 1 /* ErrorCodes.RENDER_FUNCTION */);
2952
2949
  result = createVNode(Comment);
2953
2950
  }
2954
2951
  // attr merging
@@ -2957,14 +2954,14 @@ var Vue = (function () {
2957
2954
  let root = result;
2958
2955
  let setRoot = undefined;
2959
2956
  if (result.patchFlag > 0 &&
2960
- result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
2957
+ result.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */) {
2961
2958
  [root, setRoot] = getChildRoot(result);
2962
2959
  }
2963
2960
  if (fallthroughAttrs && inheritAttrs !== false) {
2964
2961
  const keys = Object.keys(fallthroughAttrs);
2965
2962
  const { shapeFlag } = root;
2966
2963
  if (keys.length) {
2967
- if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
2964
+ if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
2968
2965
  if (propsOptions && keys.some(isModelListener)) {
2969
2966
  // If a v-model listener (onUpdate:xxx) has a corresponding declared
2970
2967
  // prop, it indicates this component expects to handle v-model and
@@ -3009,13 +3006,13 @@ var Vue = (function () {
3009
3006
  }
3010
3007
  }
3011
3008
  }
3012
- if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
3013
- vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */ &&
3014
- root.shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
3009
+ if (isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance) &&
3010
+ vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ &&
3011
+ root.shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 6 /* ShapeFlags.COMPONENT */)) {
3015
3012
  const { class: cls, style } = vnode.props || {};
3016
3013
  if (cls || style) {
3017
3014
  if (inheritAttrs === false) {
3018
- warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
3015
+ warnDeprecation("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance, getComponentName(instance.type));
3019
3016
  }
3020
3017
  root = cloneVNode(root, {
3021
3018
  class: cls,
@@ -3119,7 +3116,7 @@ var Vue = (function () {
3119
3116
  return res;
3120
3117
  };
3121
3118
  const isElementRoot = (vnode) => {
3122
- return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
3119
+ return (vnode.shapeFlag & (6 /* ShapeFlags.COMPONENT */ | 1 /* ShapeFlags.ELEMENT */) ||
3123
3120
  vnode.type === Comment // potential v-if branch switch
3124
3121
  );
3125
3122
  };
@@ -3138,19 +3135,19 @@ var Vue = (function () {
3138
3135
  return true;
3139
3136
  }
3140
3137
  if (optimized && patchFlag >= 0) {
3141
- if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {
3138
+ if (patchFlag & 1024 /* PatchFlags.DYNAMIC_SLOTS */) {
3142
3139
  // slot content that references values that might have changed,
3143
3140
  // e.g. in a v-for
3144
3141
  return true;
3145
3142
  }
3146
- if (patchFlag & 16 /* FULL_PROPS */) {
3143
+ if (patchFlag & 16 /* PatchFlags.FULL_PROPS */) {
3147
3144
  if (!prevProps) {
3148
3145
  return !!nextProps;
3149
3146
  }
3150
3147
  // presence of this flag indicates props are always non-null
3151
3148
  return hasPropsChanged(prevProps, nextProps, emits);
3152
3149
  }
3153
- else if (patchFlag & 8 /* PROPS */) {
3150
+ else if (patchFlag & 8 /* PatchFlags.PROPS */) {
3154
3151
  const dynamicProps = nextVNode.dynamicProps;
3155
3152
  for (let i = 0; i < dynamicProps.length; i++) {
3156
3153
  const key = dynamicProps[i];
@@ -3408,7 +3405,7 @@ var Vue = (function () {
3408
3405
  if (delayEnter) {
3409
3406
  activeBranch.transition.afterLeave = () => {
3410
3407
  if (pendingId === suspense.pendingId) {
3411
- move(pendingBranch, container, anchor, 0 /* ENTER */);
3408
+ move(pendingBranch, container, anchor, 0 /* MoveType.ENTER */);
3412
3409
  }
3413
3410
  };
3414
3411
  }
@@ -3423,7 +3420,7 @@ var Vue = (function () {
3423
3420
  }
3424
3421
  if (!delayEnter) {
3425
3422
  // move content from off-dom container to actual container
3426
- move(pendingBranch, container, anchor, 0 /* ENTER */);
3423
+ move(pendingBranch, container, anchor, 0 /* MoveType.ENTER */);
3427
3424
  }
3428
3425
  }
3429
3426
  setActiveBranch(suspense, pendingBranch);
@@ -3497,7 +3494,7 @@ var Vue = (function () {
3497
3494
  const hydratedEl = instance.vnode.el;
3498
3495
  instance
3499
3496
  .asyncDep.catch(err => {
3500
- handleError(err, instance, 0 /* SETUP_FUNCTION */);
3497
+ handleError(err, instance, 0 /* ErrorCodes.SETUP_FUNCTION */);
3501
3498
  })
3502
3499
  .then(asyncSetupResult => {
3503
3500
  // retry when the setup() promise resolves.
@@ -3571,7 +3568,7 @@ var Vue = (function () {
3571
3568
  }
3572
3569
  function normalizeSuspenseChildren(vnode) {
3573
3570
  const { shapeFlag, children } = vnode;
3574
- const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;
3571
+ const isSlotChildren = shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */;
3575
3572
  vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
3576
3573
  vnode.ssFallback = isSlotChildren
3577
3574
  ? normalizeSuspenseSlot(children.fallback)
@@ -3742,7 +3739,7 @@ var Vue = (function () {
3742
3739
  return traverse(s);
3743
3740
  }
3744
3741
  else if (isFunction(s)) {
3745
- return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);
3742
+ return callWithErrorHandling(s, instance, 2 /* ErrorCodes.WATCH_GETTER */);
3746
3743
  }
3747
3744
  else {
3748
3745
  warnInvalidSource(s);
@@ -3752,7 +3749,7 @@ var Vue = (function () {
3752
3749
  else if (isFunction(source)) {
3753
3750
  if (cb) {
3754
3751
  // getter with cb
3755
- getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);
3752
+ getter = () => callWithErrorHandling(source, instance, 2 /* ErrorCodes.WATCH_GETTER */);
3756
3753
  }
3757
3754
  else {
3758
3755
  // no cb -> simple effect
@@ -3763,7 +3760,7 @@ var Vue = (function () {
3763
3760
  if (cleanup) {
3764
3761
  cleanup();
3765
3762
  }
3766
- return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]);
3763
+ return callWithAsyncErrorHandling(source, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [onCleanup]);
3767
3764
  };
3768
3765
  }
3769
3766
  }
@@ -3777,7 +3774,7 @@ var Vue = (function () {
3777
3774
  getter = () => {
3778
3775
  const val = baseGetter();
3779
3776
  if (isArray(val) &&
3780
- checkCompatEnabled("WATCH_ARRAY" /* WATCH_ARRAY */, instance)) {
3777
+ checkCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance)) {
3781
3778
  traverse(val);
3782
3779
  }
3783
3780
  return val;
@@ -3790,7 +3787,7 @@ var Vue = (function () {
3790
3787
  let cleanup;
3791
3788
  let onCleanup = (fn) => {
3792
3789
  cleanup = effect.onStop = () => {
3793
- callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);
3790
+ callWithErrorHandling(fn, instance, 4 /* ErrorCodes.WATCH_CLEANUP */);
3794
3791
  };
3795
3792
  };
3796
3793
  let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
@@ -3807,12 +3804,12 @@ var Vue = (function () {
3807
3804
  ? newValue.some((v, i) => hasChanged(v, oldValue[i]))
3808
3805
  : hasChanged(newValue, oldValue)) ||
3809
3806
  (isArray(newValue) &&
3810
- isCompatEnabled("WATCH_ARRAY" /* WATCH_ARRAY */, instance))) {
3807
+ isCompatEnabled("WATCH_ARRAY" /* DeprecationTypes.WATCH_ARRAY */, instance))) {
3811
3808
  // cleanup before running cb again
3812
3809
  if (cleanup) {
3813
3810
  cleanup();
3814
3811
  }
3815
- callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [
3812
+ callWithAsyncErrorHandling(cb, instance, 3 /* ErrorCodes.WATCH_CALLBACK */, [
3816
3813
  newValue,
3817
3814
  // pass undefined as the old value when it's changed for the first time
3818
3815
  oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
@@ -3838,7 +3835,10 @@ var Vue = (function () {
3838
3835
  }
3839
3836
  else {
3840
3837
  // default: 'pre'
3841
- scheduler = () => queuePreFlushCb(job);
3838
+ job.pre = true;
3839
+ if (instance)
3840
+ job.id = instance.uid;
3841
+ scheduler = () => queueJob(job);
3842
3842
  }
3843
3843
  const effect = new ReactiveEffect(getter, scheduler);
3844
3844
  {
@@ -3905,7 +3905,7 @@ var Vue = (function () {
3905
3905
  };
3906
3906
  }
3907
3907
  function traverse(value, seen) {
3908
- if (!isObject(value) || value["__v_skip" /* SKIP */]) {
3908
+ if (!isObject(value) || value["__v_skip" /* ReactiveFlags.SKIP */]) {
3909
3909
  return value;
3910
3910
  }
3911
3911
  seen = seen || new Set();
@@ -4092,7 +4092,7 @@ var Vue = (function () {
4092
4092
  const leavingVNodesCache = getLeavingNodesForType(state, vnode);
4093
4093
  const callHook = (hook, args) => {
4094
4094
  hook &&
4095
- callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);
4095
+ callWithAsyncErrorHandling(hook, instance, 9 /* ErrorCodes.TRANSITION_HOOK */, args);
4096
4096
  };
4097
4097
  const callAsyncHook = (hook, args) => {
4098
4098
  const done = args[1];
@@ -4228,10 +4228,10 @@ var Vue = (function () {
4228
4228
  : vnode;
4229
4229
  }
4230
4230
  function setTransitionHooks(vnode, hooks) {
4231
- if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {
4231
+ if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */ && vnode.component) {
4232
4232
  setTransitionHooks(vnode.component.subTree, hooks);
4233
4233
  }
4234
- else if (vnode.shapeFlag & 128 /* SUSPENSE */) {
4234
+ else if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
4235
4235
  vnode.ssContent.transition = hooks.clone(vnode.ssContent);
4236
4236
  vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
4237
4237
  }
@@ -4250,7 +4250,7 @@ var Vue = (function () {
4250
4250
  : String(parentKey) + String(child.key != null ? child.key : i);
4251
4251
  // handle fragment children case, e.g. v-for
4252
4252
  if (child.type === Fragment) {
4253
- if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
4253
+ if (child.patchFlag & 128 /* PatchFlags.KEYED_FRAGMENT */)
4254
4254
  keyedFragmentCount++;
4255
4255
  ret = ret.concat(getTransitionRawChildren(child.children, keepComment, key));
4256
4256
  }
@@ -4265,7 +4265,7 @@ var Vue = (function () {
4265
4265
  // these children to force full diffs to ensure correct behavior.
4266
4266
  if (keyedFragmentCount > 1) {
4267
4267
  for (let i = 0; i < ret.length; i++) {
4268
- ret[i].patchFlag = -2 /* BAIL */;
4268
+ ret[i].patchFlag = -2 /* PatchFlags.BAIL */;
4269
4269
  }
4270
4270
  }
4271
4271
  return ret;
@@ -4343,7 +4343,7 @@ var Vue = (function () {
4343
4343
  }
4344
4344
  const onError = (err) => {
4345
4345
  pendingRequest = null;
4346
- handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
4346
+ handleError(err, instance, 13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
4347
4347
  };
4348
4348
  // suspense-controlled or SSR.
4349
4349
  if ((suspensible && instance.suspense) ||
@@ -4445,7 +4445,7 @@ var Vue = (function () {
4445
4445
  const storageContainer = createElement('div');
4446
4446
  sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
4447
4447
  const instance = vnode.component;
4448
- move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);
4448
+ move(vnode, container, anchor, 0 /* MoveType.ENTER */, parentSuspense);
4449
4449
  // in case props have changed
4450
4450
  patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);
4451
4451
  queuePostRenderEffect(() => {
@@ -4465,7 +4465,7 @@ var Vue = (function () {
4465
4465
  };
4466
4466
  sharedContext.deactivate = (vnode) => {
4467
4467
  const instance = vnode.component;
4468
- move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);
4468
+ move(vnode, storageContainer, null, 1 /* MoveType.LEAVE */, parentSuspense);
4469
4469
  queuePostRenderEffect(() => {
4470
4470
  if (instance.da) {
4471
4471
  invokeArrayFns(instance.da);
@@ -4554,8 +4554,8 @@ var Vue = (function () {
4554
4554
  return children;
4555
4555
  }
4556
4556
  else if (!isVNode(rawVNode) ||
4557
- (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&
4558
- !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {
4557
+ (!(rawVNode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) &&
4558
+ !(rawVNode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */))) {
4559
4559
  current = null;
4560
4560
  return rawVNode;
4561
4561
  }
@@ -4577,7 +4577,7 @@ var Vue = (function () {
4577
4577
  // clone vnode if it's reused because we are going to mutate it
4578
4578
  if (vnode.el) {
4579
4579
  vnode = cloneVNode(vnode);
4580
- if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {
4580
+ if (rawVNode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
4581
4581
  rawVNode.ssContent = vnode;
4582
4582
  }
4583
4583
  }
@@ -4596,7 +4596,7 @@ var Vue = (function () {
4596
4596
  setTransitionHooks(vnode, vnode.transition);
4597
4597
  }
4598
4598
  // avoid vnode being mounted as fresh
4599
- vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;
4599
+ vnode.shapeFlag |= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4600
4600
  // make this key the freshest
4601
4601
  keys.delete(key);
4602
4602
  keys.add(key);
@@ -4609,7 +4609,7 @@ var Vue = (function () {
4609
4609
  }
4610
4610
  }
4611
4611
  // avoid vnode being unmounted
4612
- vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
4612
+ vnode.shapeFlag |= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4613
4613
  current = vnode;
4614
4614
  return isSuspense(rawVNode.type) ? rawVNode : vnode;
4615
4615
  };
@@ -4635,10 +4635,10 @@ var Vue = (function () {
4635
4635
  return false;
4636
4636
  }
4637
4637
  function onActivated(hook, target) {
4638
- registerKeepAliveHook(hook, "a" /* ACTIVATED */, target);
4638
+ registerKeepAliveHook(hook, "a" /* LifecycleHooks.ACTIVATED */, target);
4639
4639
  }
4640
4640
  function onDeactivated(hook, target) {
4641
- registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target);
4641
+ registerKeepAliveHook(hook, "da" /* LifecycleHooks.DEACTIVATED */, target);
4642
4642
  }
4643
4643
  function registerKeepAliveHook(hook, type, target = currentInstance) {
4644
4644
  // cache the deactivate branch check wrapper for injected hooks so the same
@@ -4682,16 +4682,16 @@ var Vue = (function () {
4682
4682
  }
4683
4683
  function resetShapeFlag(vnode) {
4684
4684
  let shapeFlag = vnode.shapeFlag;
4685
- if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
4686
- shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
4685
+ if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
4686
+ shapeFlag -= 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */;
4687
4687
  }
4688
- if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
4689
- shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;
4688
+ if (shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
4689
+ shapeFlag -= 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */;
4690
4690
  }
4691
4691
  vnode.shapeFlag = shapeFlag;
4692
4692
  }
4693
4693
  function getInnerChild(vnode) {
4694
- return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;
4694
+ return vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */ ? vnode.ssContent : vnode;
4695
4695
  }
4696
4696
 
4697
4697
  function injectHook(type, hook, target = currentInstance, prepend = false) {
@@ -4737,23 +4737,23 @@ var Vue = (function () {
4737
4737
  }
4738
4738
  const createHook = (lifecycle) => (hook, target = currentInstance) =>
4739
4739
  // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
4740
- (!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) &&
4740
+ (!isInSSRComponentSetup || lifecycle === "sp" /* LifecycleHooks.SERVER_PREFETCH */) &&
4741
4741
  injectHook(lifecycle, hook, target);
4742
- const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */);
4743
- const onMounted = createHook("m" /* MOUNTED */);
4744
- const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */);
4745
- const onUpdated = createHook("u" /* UPDATED */);
4746
- const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */);
4747
- const onUnmounted = createHook("um" /* UNMOUNTED */);
4748
- const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */);
4749
- const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */);
4750
- const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */);
4742
+ const onBeforeMount = createHook("bm" /* LifecycleHooks.BEFORE_MOUNT */);
4743
+ const onMounted = createHook("m" /* LifecycleHooks.MOUNTED */);
4744
+ const onBeforeUpdate = createHook("bu" /* LifecycleHooks.BEFORE_UPDATE */);
4745
+ const onUpdated = createHook("u" /* LifecycleHooks.UPDATED */);
4746
+ const onBeforeUnmount = createHook("bum" /* LifecycleHooks.BEFORE_UNMOUNT */);
4747
+ const onUnmounted = createHook("um" /* LifecycleHooks.UNMOUNTED */);
4748
+ const onServerPrefetch = createHook("sp" /* LifecycleHooks.SERVER_PREFETCH */);
4749
+ const onRenderTriggered = createHook("rtg" /* LifecycleHooks.RENDER_TRIGGERED */);
4750
+ const onRenderTracked = createHook("rtc" /* LifecycleHooks.RENDER_TRACKED */);
4751
4751
  function onErrorCaptured(hook, target = currentInstance) {
4752
- injectHook("ec" /* ERROR_CAPTURED */, hook, target);
4752
+ injectHook("ec" /* LifecycleHooks.ERROR_CAPTURED */, hook, target);
4753
4753
  }
4754
4754
 
4755
4755
  function getCompatChildren(instance) {
4756
- assertCompatEnabled("INSTANCE_CHILDREN" /* INSTANCE_CHILDREN */, instance);
4756
+ assertCompatEnabled("INSTANCE_CHILDREN" /* DeprecationTypes.INSTANCE_CHILDREN */, instance);
4757
4757
  const root = instance.subTree;
4758
4758
  const children = [];
4759
4759
  if (root) {
@@ -4765,7 +4765,7 @@ var Vue = (function () {
4765
4765
  if (vnode.component) {
4766
4766
  children.push(vnode.component.proxy);
4767
4767
  }
4768
- else if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
4768
+ else if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
4769
4769
  const vnodes = vnode.children;
4770
4770
  for (let i = 0; i < vnodes.length; i++) {
4771
4771
  walk(vnodes[i], children);
@@ -4774,7 +4774,7 @@ var Vue = (function () {
4774
4774
  }
4775
4775
 
4776
4776
  function getCompatListeners(instance) {
4777
- assertCompatEnabled("INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */, instance);
4777
+ assertCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance);
4778
4778
  const listeners = {};
4779
4779
  const rawProps = instance.vnode.props;
4780
4780
  if (!rawProps) {
@@ -4802,7 +4802,7 @@ var Vue = (function () {
4802
4802
  mappedName.forEach(mapped => {
4803
4803
  const mappedHook = dir[mapped];
4804
4804
  if (mappedHook) {
4805
- softAssertCompatEnabled("CUSTOM_DIR" /* CUSTOM_DIR */, instance, mapped, name);
4805
+ softAssertCompatEnabled("CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */, instance, mapped, name);
4806
4806
  hook.push(mappedHook);
4807
4807
  }
4808
4808
  });
@@ -4810,7 +4810,7 @@ var Vue = (function () {
4810
4810
  }
4811
4811
  else {
4812
4812
  if (dir[mappedName]) {
4813
- softAssertCompatEnabled("CUSTOM_DIR" /* CUSTOM_DIR */, instance, mappedName, name);
4813
+ softAssertCompatEnabled("CUSTOM_DIR" /* DeprecationTypes.CUSTOM_DIR */, instance, mappedName, name);
4814
4814
  }
4815
4815
  return dir[mappedName];
4816
4816
  }
@@ -4884,7 +4884,7 @@ var Vue = (function () {
4884
4884
  // disable tracking inside all lifecycle hooks
4885
4885
  // since they can potentially be called inside effects.
4886
4886
  pauseTracking();
4887
- callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [
4887
+ callWithAsyncErrorHandling(hook, instance, 8 /* ErrorCodes.DIRECTIVE_HOOK */, [
4888
4888
  vnode.el,
4889
4889
  binding,
4890
4890
  vnode,
@@ -4937,7 +4937,7 @@ var Vue = (function () {
4937
4937
  const Component = instance.type;
4938
4938
  // explicit self name has highest priority
4939
4939
  if (type === COMPONENTS) {
4940
- const selfName = getComponentName(Component);
4940
+ const selfName = getComponentName(Component, false /* do not include inferred name to avoid breaking existing code */);
4941
4941
  if (selfName &&
4942
4942
  (selfName === name ||
4943
4943
  selfName === camelize(name) ||
@@ -4991,7 +4991,7 @@ var Vue = (function () {
4991
4991
  return;
4992
4992
  }
4993
4993
  // v2 render function, try to provide compat
4994
- if (checkCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance)) {
4994
+ if (checkCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance)) {
4995
4995
  const wrapped = (Component.render = function compatRender() {
4996
4996
  // @ts-ignore
4997
4997
  return render.call(this, compatH);
@@ -5113,7 +5113,7 @@ var Vue = (function () {
5113
5113
  function convertLegacySlots(vnode) {
5114
5114
  const { props, children } = vnode;
5115
5115
  let slots;
5116
- if (vnode.shapeFlag & 6 /* COMPONENT */ && isArray(children)) {
5116
+ if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */ && isArray(children)) {
5117
5117
  slots = {};
5118
5118
  // check "slot" property on vnodes and turn them into v3 function slots
5119
5119
  for (let i = 0; i < children.length; i++) {
@@ -5152,8 +5152,8 @@ var Vue = (function () {
5152
5152
  }
5153
5153
  function defineLegacyVNodeProperties(vnode) {
5154
5154
  /* istanbul ignore if */
5155
- if (isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
5156
- isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
5155
+ if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, currentRenderingInstance, true /* enable for built-ins */) &&
5156
+ isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, currentRenderingInstance, true /* enable for built-ins */)) {
5157
5157
  const context = currentRenderingInstance;
5158
5158
  const getInstance = () => vnode.component && vnode.component.proxy;
5159
5159
  let componentOptions;
@@ -5167,7 +5167,7 @@ var Vue = (function () {
5167
5167
  context: { get: () => context && context.proxy },
5168
5168
  componentOptions: {
5169
5169
  get: () => {
5170
- if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
5170
+ if (vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */) {
5171
5171
  if (componentOptions) {
5172
5172
  return componentOptions;
5173
5173
  }
@@ -5287,7 +5287,13 @@ var Vue = (function () {
5287
5287
  }
5288
5288
  else if (slot) {
5289
5289
  // conditional single slot generated by <template v-if="..." #foo>
5290
- slots[slot.name] = slot.fn;
5290
+ slots[slot.name] = slot.key
5291
+ ? (...args) => {
5292
+ const res = slot.fn(...args);
5293
+ res.key = slot.key;
5294
+ return res;
5295
+ }
5296
+ : slot.fn;
5291
5297
  }
5292
5298
  }
5293
5299
  return slots;
@@ -5323,9 +5329,15 @@ var Vue = (function () {
5323
5329
  }
5324
5330
  openBlock();
5325
5331
  const validSlotContent = slot && ensureValidVNode(slot(props));
5326
- const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */
5327
- ? 64 /* STABLE_FRAGMENT */
5328
- : -2 /* BAIL */);
5332
+ const rendered = createBlock(Fragment, {
5333
+ key: props.key ||
5334
+ // slot content array of a dynamic conditional slot may have a branch
5335
+ // key attached in the `createSlots` helper, respect that
5336
+ (validSlotContent && validSlotContent.key) ||
5337
+ `_${name}`
5338
+ }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* SlotFlags.STABLE */
5339
+ ? 64 /* PatchFlags.STABLE_FRAGMENT */
5340
+ : -2 /* PatchFlags.BAIL */);
5329
5341
  if (!noSlotted && rendered.scopeId) {
5330
5342
  rendered.slotScopeIds = [rendered.scopeId + '-s'];
5331
5343
  }
@@ -5353,14 +5365,16 @@ var Vue = (function () {
5353
5365
  * For prefixing keys in v-on="obj" with "on"
5354
5366
  * @private
5355
5367
  */
5356
- function toHandlers(obj) {
5368
+ function toHandlers(obj, preserveCaseIfNecessary) {
5357
5369
  const ret = {};
5358
5370
  if (!isObject(obj)) {
5359
5371
  warn$1(`v-on with no argument expects an object value.`);
5360
5372
  return ret;
5361
5373
  }
5362
5374
  for (const key in obj) {
5363
- ret[toHandlerKey(key)] = obj[key];
5375
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key)
5376
+ ? `on:${key}`
5377
+ : toHandlerKey(key)] = obj[key];
5364
5378
  }
5365
5379
  return ret;
5366
5380
  }
@@ -5496,26 +5510,26 @@ var Vue = (function () {
5496
5510
  };
5497
5511
  extend(map, {
5498
5512
  $set: i => {
5499
- assertCompatEnabled("INSTANCE_SET" /* INSTANCE_SET */, i);
5513
+ assertCompatEnabled("INSTANCE_SET" /* DeprecationTypes.INSTANCE_SET */, i);
5500
5514
  return set;
5501
5515
  },
5502
5516
  $delete: i => {
5503
- assertCompatEnabled("INSTANCE_DELETE" /* INSTANCE_DELETE */, i);
5517
+ assertCompatEnabled("INSTANCE_DELETE" /* DeprecationTypes.INSTANCE_DELETE */, i);
5504
5518
  return del;
5505
5519
  },
5506
5520
  $mount: i => {
5507
- assertCompatEnabled("GLOBAL_MOUNT" /* GLOBAL_MOUNT */, null /* this warning is global */);
5521
+ assertCompatEnabled("GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */, null /* this warning is global */);
5508
5522
  // root mount override from ./global.ts in installCompatMount
5509
5523
  return i.ctx._compat_mount || NOOP;
5510
5524
  },
5511
5525
  $destroy: i => {
5512
- assertCompatEnabled("INSTANCE_DESTROY" /* INSTANCE_DESTROY */, i);
5526
+ assertCompatEnabled("INSTANCE_DESTROY" /* DeprecationTypes.INSTANCE_DESTROY */, i);
5513
5527
  // root destroy override from ./global.ts in installCompatMount
5514
5528
  return i.ctx._compat_destroy || NOOP;
5515
5529
  },
5516
5530
  // overrides existing accessor
5517
5531
  $slots: i => {
5518
- if (isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, i) &&
5532
+ if (isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, i) &&
5519
5533
  i.render &&
5520
5534
  i.render._compatWrapped) {
5521
5535
  return new Proxy(i.slots, legacySlotProxyHandlers);
@@ -5523,7 +5537,7 @@ var Vue = (function () {
5523
5537
  return shallowReadonly(i.slots) ;
5524
5538
  },
5525
5539
  $scopedSlots: i => {
5526
- assertCompatEnabled("INSTANCE_SCOPED_SLOTS" /* INSTANCE_SCOPED_SLOTS */, i);
5540
+ assertCompatEnabled("INSTANCE_SCOPED_SLOTS" /* DeprecationTypes.INSTANCE_SCOPED_SLOTS */, i);
5527
5541
  const res = {};
5528
5542
  for (const key in i.slots) {
5529
5543
  const fn = i.slots[key];
@@ -5540,7 +5554,7 @@ var Vue = (function () {
5540
5554
  $listeners: getCompatListeners
5541
5555
  });
5542
5556
  /* istanbul ignore if */
5543
- if (isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, null)) {
5557
+ if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, null)) {
5544
5558
  extend(map, {
5545
5559
  // needed by many libs / render fns
5546
5560
  $vnode: i => i.vnode,
@@ -5644,23 +5658,23 @@ var Vue = (function () {
5644
5658
  const n = accessCache[key];
5645
5659
  if (n !== undefined) {
5646
5660
  switch (n) {
5647
- case 1 /* SETUP */:
5661
+ case 1 /* AccessTypes.SETUP */:
5648
5662
  return setupState[key];
5649
- case 2 /* DATA */:
5663
+ case 2 /* AccessTypes.DATA */:
5650
5664
  return data[key];
5651
- case 4 /* CONTEXT */:
5665
+ case 4 /* AccessTypes.CONTEXT */:
5652
5666
  return ctx[key];
5653
- case 3 /* PROPS */:
5667
+ case 3 /* AccessTypes.PROPS */:
5654
5668
  return props[key];
5655
5669
  // default: just fallthrough
5656
5670
  }
5657
5671
  }
5658
5672
  else if (setupState !== EMPTY_OBJ && hasOwn(setupState, key)) {
5659
- accessCache[key] = 1 /* SETUP */;
5673
+ accessCache[key] = 1 /* AccessTypes.SETUP */;
5660
5674
  return setupState[key];
5661
5675
  }
5662
5676
  else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
5663
- accessCache[key] = 2 /* DATA */;
5677
+ accessCache[key] = 2 /* AccessTypes.DATA */;
5664
5678
  return data[key];
5665
5679
  }
5666
5680
  else if (
@@ -5668,15 +5682,15 @@ var Vue = (function () {
5668
5682
  // props
5669
5683
  (normalizedProps = instance.propsOptions[0]) &&
5670
5684
  hasOwn(normalizedProps, key)) {
5671
- accessCache[key] = 3 /* PROPS */;
5685
+ accessCache[key] = 3 /* AccessTypes.PROPS */;
5672
5686
  return props[key];
5673
5687
  }
5674
5688
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
5675
- accessCache[key] = 4 /* CONTEXT */;
5689
+ accessCache[key] = 4 /* AccessTypes.CONTEXT */;
5676
5690
  return ctx[key];
5677
5691
  }
5678
5692
  else if (shouldCacheAccess) {
5679
- accessCache[key] = 0 /* OTHER */;
5693
+ accessCache[key] = 0 /* AccessTypes.OTHER */;
5680
5694
  }
5681
5695
  }
5682
5696
  const publicGetter = publicPropertiesMap[key];
@@ -5684,7 +5698,7 @@ var Vue = (function () {
5684
5698
  // public $xxx properties
5685
5699
  if (publicGetter) {
5686
5700
  if (key === '$attrs') {
5687
- track(instance, "get" /* GET */, key);
5701
+ track(instance, "get" /* TrackOpTypes.GET */, key);
5688
5702
  markAttrsAccessed();
5689
5703
  }
5690
5704
  return publicGetter(instance);
@@ -5697,7 +5711,7 @@ var Vue = (function () {
5697
5711
  }
5698
5712
  else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
5699
5713
  // user may set custom properties to `this` that start with `$`
5700
- accessCache[key] = 4 /* CONTEXT */;
5714
+ accessCache[key] = 4 /* AccessTypes.CONTEXT */;
5701
5715
  return ctx[key];
5702
5716
  }
5703
5717
  else if (
@@ -5873,7 +5887,7 @@ var Vue = (function () {
5873
5887
  const toVal = to[key];
5874
5888
  const fromVal = from[key];
5875
5889
  if (key in to && isPlainObject(toVal) && isPlainObject(fromVal)) {
5876
- warnDeprecation("OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */, null, key);
5890
+ warnDeprecation("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null, key);
5877
5891
  deepMergeData(toVal, fromVal);
5878
5892
  }
5879
5893
  else {
@@ -5904,7 +5918,7 @@ var Vue = (function () {
5904
5918
  // call beforeCreate first before accessing other options since
5905
5919
  // the hook may mutate resolved options (#2791)
5906
5920
  if (options.beforeCreate) {
5907
- callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */);
5921
+ callHook(options.beforeCreate, instance, "bc" /* LifecycleHooks.BEFORE_CREATE */);
5908
5922
  }
5909
5923
  const {
5910
5924
  // state
@@ -5920,7 +5934,7 @@ var Vue = (function () {
5920
5934
  const [propsOptions] = instance.propsOptions;
5921
5935
  if (propsOptions) {
5922
5936
  for (const key in propsOptions) {
5923
- checkDuplicateProperties("Props" /* PROPS */, key);
5937
+ checkDuplicateProperties("Props" /* OptionTypes.PROPS */, key);
5924
5938
  }
5925
5939
  }
5926
5940
  }
@@ -5950,7 +5964,7 @@ var Vue = (function () {
5950
5964
  });
5951
5965
  }
5952
5966
  {
5953
- checkDuplicateProperties("Methods" /* METHODS */, key);
5967
+ checkDuplicateProperties("Methods" /* OptionTypes.METHODS */, key);
5954
5968
  }
5955
5969
  }
5956
5970
  else {
@@ -5977,7 +5991,7 @@ var Vue = (function () {
5977
5991
  instance.data = reactive(data);
5978
5992
  {
5979
5993
  for (const key in data) {
5980
- checkDuplicateProperties("Data" /* DATA */, key);
5994
+ checkDuplicateProperties("Data" /* OptionTypes.DATA */, key);
5981
5995
  // expose data on ctx during dev
5982
5996
  if (!isReservedPrefix(key[0])) {
5983
5997
  Object.defineProperty(ctx, key, {
@@ -6021,7 +6035,7 @@ var Vue = (function () {
6021
6035
  set: v => (c.value = v)
6022
6036
  });
6023
6037
  {
6024
- checkDuplicateProperties("Computed" /* COMPUTED */, key);
6038
+ checkDuplicateProperties("Computed" /* OptionTypes.COMPUTED */, key);
6025
6039
  }
6026
6040
  }
6027
6041
  }
@@ -6039,7 +6053,7 @@ var Vue = (function () {
6039
6053
  });
6040
6054
  }
6041
6055
  if (created) {
6042
- callHook(created, instance, "c" /* CREATED */);
6056
+ callHook(created, instance, "c" /* LifecycleHooks.CREATED */);
6043
6057
  }
6044
6058
  function registerLifecycleHook(register, hook) {
6045
6059
  if (isArray(hook)) {
@@ -6063,11 +6077,11 @@ var Vue = (function () {
6063
6077
  registerLifecycleHook(onServerPrefetch, serverPrefetch);
6064
6078
  {
6065
6079
  if (beforeDestroy &&
6066
- softAssertCompatEnabled("OPTIONS_BEFORE_DESTROY" /* OPTIONS_BEFORE_DESTROY */, instance)) {
6080
+ softAssertCompatEnabled("OPTIONS_BEFORE_DESTROY" /* DeprecationTypes.OPTIONS_BEFORE_DESTROY */, instance)) {
6067
6081
  registerLifecycleHook(onBeforeUnmount, beforeDestroy);
6068
6082
  }
6069
6083
  if (destroyed &&
6070
- softAssertCompatEnabled("OPTIONS_DESTROYED" /* OPTIONS_DESTROYED */, instance)) {
6084
+ softAssertCompatEnabled("OPTIONS_DESTROYED" /* DeprecationTypes.OPTIONS_DESTROYED */, instance)) {
6071
6085
  registerLifecycleHook(onUnmounted, destroyed);
6072
6086
  }
6073
6087
  }
@@ -6099,7 +6113,7 @@ var Vue = (function () {
6099
6113
  if (directives)
6100
6114
  instance.directives = directives;
6101
6115
  if (filters &&
6102
- isCompatEnabled("FILTERS" /* FILTERS */, instance)) {
6116
+ isCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, instance)) {
6103
6117
  instance.filters = filters;
6104
6118
  }
6105
6119
  }
@@ -6146,7 +6160,7 @@ var Vue = (function () {
6146
6160
  ctx[key] = injected;
6147
6161
  }
6148
6162
  {
6149
- checkDuplicateProperties("Inject" /* INJECT */, key);
6163
+ checkDuplicateProperties("Inject" /* OptionTypes.INJECT */, key);
6150
6164
  }
6151
6165
  }
6152
6166
  }
@@ -6206,7 +6220,7 @@ var Vue = (function () {
6206
6220
  resolved = cached;
6207
6221
  }
6208
6222
  else if (!globalMixins.length && !mixins && !extendsOptions) {
6209
- if (isCompatEnabled("PRIVATE_APIS" /* PRIVATE_APIS */, instance)) {
6223
+ if (isCompatEnabled("PRIVATE_APIS" /* DeprecationTypes.PRIVATE_APIS */, instance)) {
6210
6224
  resolved = extend({}, base);
6211
6225
  resolved.parent = instance.parent && instance.parent.proxy;
6212
6226
  resolved.propsData = instance.vnode.props;
@@ -6222,7 +6236,9 @@ var Vue = (function () {
6222
6236
  }
6223
6237
  mergeOptions(resolved, base, optionMergeStrategies);
6224
6238
  }
6225
- cache.set(base, resolved);
6239
+ if (isObject(base)) {
6240
+ cache.set(base, resolved);
6241
+ }
6226
6242
  return resolved;
6227
6243
  }
6228
6244
  function mergeOptions(to, from, strats, asMixin = false) {
@@ -6290,7 +6306,7 @@ var Vue = (function () {
6290
6306
  return from;
6291
6307
  }
6292
6308
  return function mergedDataFn() {
6293
- return (isCompatEnabled("OPTIONS_DATA_MERGE" /* OPTIONS_DATA_MERGE */, null)
6309
+ return (isCompatEnabled("OPTIONS_DATA_MERGE" /* DeprecationTypes.OPTIONS_DATA_MERGE */, null)
6294
6310
  ? deepMergeData
6295
6311
  : extend)(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
6296
6312
  };
@@ -6329,7 +6345,7 @@ var Vue = (function () {
6329
6345
  function createPropsDefaultThis(instance, rawProps, propKey) {
6330
6346
  return new Proxy({}, {
6331
6347
  get(_, key) {
6332
- warnDeprecation("PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */, null, propKey);
6348
+ warnDeprecation("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, null, propKey);
6333
6349
  // $options
6334
6350
  if (key === '$options') {
6335
6351
  return resolveMergedOptions(instance);
@@ -6359,11 +6375,11 @@ var Vue = (function () {
6359
6375
  return true;
6360
6376
  }
6361
6377
  if ((key === 'class' || key === 'style') &&
6362
- isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
6378
+ isCompatEnabled("INSTANCE_ATTRS_CLASS_STYLE" /* DeprecationTypes.INSTANCE_ATTRS_CLASS_STYLE */, instance)) {
6363
6379
  return true;
6364
6380
  }
6365
6381
  if (isOn(key) &&
6366
- isCompatEnabled("INSTANCE_LISTENERS" /* INSTANCE_LISTENERS */, instance)) {
6382
+ isCompatEnabled("INSTANCE_LISTENERS" /* DeprecationTypes.INSTANCE_LISTENERS */, instance)) {
6367
6383
  return true;
6368
6384
  }
6369
6385
  // vue-router
@@ -6406,6 +6422,13 @@ var Vue = (function () {
6406
6422
  }
6407
6423
  instance.attrs = attrs;
6408
6424
  }
6425
+ function isInHmrContext(instance) {
6426
+ while (instance) {
6427
+ if (instance.type.__hmrId)
6428
+ return true;
6429
+ instance = instance.parent;
6430
+ }
6431
+ }
6409
6432
  function updateProps(instance, rawProps, rawPrevProps, optimized) {
6410
6433
  const { props, attrs, vnode: { patchFlag } } = instance;
6411
6434
  const rawCurrentProps = toRaw(props);
@@ -6415,11 +6438,10 @@ var Vue = (function () {
6415
6438
  // always force full diff in dev
6416
6439
  // - #1942 if hmr is enabled with sfc component
6417
6440
  // - vite#872 non-sfc component used by sfc component
6418
- !((instance.type.__hmrId ||
6419
- (instance.parent && instance.parent.type.__hmrId))) &&
6441
+ !(isInHmrContext(instance)) &&
6420
6442
  (optimized || patchFlag > 0) &&
6421
- !(patchFlag & 16 /* FULL_PROPS */)) {
6422
- if (patchFlag & 8 /* PROPS */) {
6443
+ !(patchFlag & 16 /* PatchFlags.FULL_PROPS */)) {
6444
+ if (patchFlag & 8 /* PatchFlags.PROPS */) {
6423
6445
  // Compiler-generated props & no keys change, just set the updated
6424
6446
  // the props.
6425
6447
  const propsToUpdate = instance.vnode.dynamicProps;
@@ -6506,7 +6528,7 @@ var Vue = (function () {
6506
6528
  }
6507
6529
  // trigger updates for $attrs in case it's used in component slots
6508
6530
  if (hasAttrsChanged) {
6509
- trigger(instance, "set" /* SET */, '$attrs');
6531
+ trigger(instance, "set" /* TriggerOpTypes.SET */, '$attrs');
6510
6532
  }
6511
6533
  {
6512
6534
  validateProps(rawProps || {}, props, instance);
@@ -6524,7 +6546,7 @@ var Vue = (function () {
6524
6546
  }
6525
6547
  {
6526
6548
  if (key.startsWith('onHook:')) {
6527
- softAssertCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance, key.slice(2).toLowerCase());
6549
+ softAssertCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance, key.slice(2).toLowerCase());
6528
6550
  }
6529
6551
  if (key === 'inline-template') {
6530
6552
  continue;
@@ -6585,7 +6607,7 @@ var Vue = (function () {
6585
6607
  }
6586
6608
  else {
6587
6609
  setCurrentInstance(instance);
6588
- value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* PROPS_DEFAULT_THIS */, instance)
6610
+ value = propsDefaults[key] = defaultValue.call(isCompatEnabled("PROPS_DEFAULT_THIS" /* DeprecationTypes.PROPS_DEFAULT_THIS */, instance)
6589
6611
  ? createPropsDefaultThis(instance, props, key)
6590
6612
  : null, props);
6591
6613
  unsetCurrentInstance();
@@ -6596,11 +6618,11 @@ var Vue = (function () {
6596
6618
  }
6597
6619
  }
6598
6620
  // boolean casting
6599
- if (opt[0 /* shouldCast */]) {
6621
+ if (opt[0 /* BooleanFlags.shouldCast */]) {
6600
6622
  if (isAbsent && !hasDefault) {
6601
6623
  value = false;
6602
6624
  }
6603
- else if (opt[1 /* shouldCastTrue */] &&
6625
+ else if (opt[1 /* BooleanFlags.shouldCastTrue */] &&
6604
6626
  (value === '' || value === hyphenate(key))) {
6605
6627
  value = true;
6606
6628
  }
@@ -6641,7 +6663,9 @@ var Vue = (function () {
6641
6663
  }
6642
6664
  }
6643
6665
  if (!raw && !hasExtends) {
6644
- cache.set(comp, EMPTY_ARR);
6666
+ if (isObject(comp)) {
6667
+ cache.set(comp, EMPTY_ARR);
6668
+ }
6645
6669
  return EMPTY_ARR;
6646
6670
  }
6647
6671
  if (isArray(raw)) {
@@ -6668,8 +6692,8 @@ var Vue = (function () {
6668
6692
  if (prop) {
6669
6693
  const booleanIndex = getTypeIndex(Boolean, prop.type);
6670
6694
  const stringIndex = getTypeIndex(String, prop.type);
6671
- prop[0 /* shouldCast */] = booleanIndex > -1;
6672
- prop[1 /* shouldCastTrue */] =
6695
+ prop[0 /* BooleanFlags.shouldCast */] = booleanIndex > -1;
6696
+ prop[1 /* BooleanFlags.shouldCastTrue */] =
6673
6697
  stringIndex < 0 || booleanIndex < stringIndex;
6674
6698
  // if the prop needs boolean casting or default value
6675
6699
  if (booleanIndex > -1 || hasOwn(prop, 'default')) {
@@ -6680,7 +6704,9 @@ var Vue = (function () {
6680
6704
  }
6681
6705
  }
6682
6706
  const res = [normalized, needCastKeys];
6683
- cache.set(comp, res);
6707
+ if (isObject(comp)) {
6708
+ cache.set(comp, res);
6709
+ }
6684
6710
  return res;
6685
6711
  }
6686
6712
  function validatePropName(key) {
@@ -6871,7 +6897,7 @@ var Vue = (function () {
6871
6897
  slots[key] = normalizeSlot(key, value, ctx);
6872
6898
  }
6873
6899
  else if (value != null) {
6874
- if (!(isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance))) {
6900
+ if (!(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
6875
6901
  warn$1(`Non-function value encountered for slot "${key}". ` +
6876
6902
  `Prefer function slots for better performance.`);
6877
6903
  }
@@ -6882,7 +6908,7 @@ var Vue = (function () {
6882
6908
  };
6883
6909
  const normalizeVNodeSlots = (instance, children) => {
6884
6910
  if (!isKeepAlive(instance.vnode) &&
6885
- !(isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, instance))) {
6911
+ !(isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, instance))) {
6886
6912
  warn$1(`Non-function value encountered for default slot. ` +
6887
6913
  `Prefer function slots for better performance.`);
6888
6914
  }
@@ -6890,7 +6916,7 @@ var Vue = (function () {
6890
6916
  instance.slots.default = () => normalized;
6891
6917
  };
6892
6918
  const initSlots = (instance, children) => {
6893
- if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
6919
+ if (instance.vnode.shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */) {
6894
6920
  const type = children._;
6895
6921
  if (type) {
6896
6922
  // users can get the shallow readonly version of the slots object through `this.$slots`,
@@ -6915,7 +6941,7 @@ var Vue = (function () {
6915
6941
  const { vnode, slots } = instance;
6916
6942
  let needDeletionCheck = true;
6917
6943
  let deletionComparisonTarget = EMPTY_OBJ;
6918
- if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
6944
+ if (vnode.shapeFlag & 32 /* ShapeFlags.SLOTS_CHILDREN */) {
6919
6945
  const type = children._;
6920
6946
  if (type) {
6921
6947
  // compiled slots.
@@ -6924,7 +6950,7 @@ var Vue = (function () {
6924
6950
  // force update slots and mark instance for hmr as well
6925
6951
  extend(slots, children);
6926
6952
  }
6927
- else if (optimized && type === 1 /* STABLE */) {
6953
+ else if (optimized && type === 1 /* SlotFlags.STABLE */) {
6928
6954
  // compiled AND stable.
6929
6955
  // no need to update, and skip stale slots removal.
6930
6956
  needDeletionCheck = false;
@@ -6937,7 +6963,7 @@ var Vue = (function () {
6937
6963
  // when rendering the optimized slots by manually written render function,
6938
6964
  // we need to delete the `slots._` flag if necessary to make subsequent updates reliable,
6939
6965
  // i.e. let the `renderSlot` create the bailed Fragment
6940
- if (!optimized && type === 1 /* STABLE */) {
6966
+ if (!optimized && type === 1 /* SlotFlags.STABLE */) {
6941
6967
  delete slots._;
6942
6968
  }
6943
6969
  }
@@ -6966,11 +6992,11 @@ var Vue = (function () {
6966
6992
  // dev only
6967
6993
  function installLegacyConfigWarnings(config) {
6968
6994
  const legacyConfigOptions = {
6969
- silent: "CONFIG_SILENT" /* CONFIG_SILENT */,
6970
- devtools: "CONFIG_DEVTOOLS" /* CONFIG_DEVTOOLS */,
6971
- ignoredElements: "CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */,
6972
- keyCodes: "CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */,
6973
- productionTip: "CONFIG_PRODUCTION_TIP" /* CONFIG_PRODUCTION_TIP */
6995
+ silent: "CONFIG_SILENT" /* DeprecationTypes.CONFIG_SILENT */,
6996
+ devtools: "CONFIG_DEVTOOLS" /* DeprecationTypes.CONFIG_DEVTOOLS */,
6997
+ ignoredElements: "CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */,
6998
+ keyCodes: "CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */,
6999
+ productionTip: "CONFIG_PRODUCTION_TIP" /* DeprecationTypes.CONFIG_PRODUCTION_TIP */
6974
7000
  };
6975
7001
  Object.keys(legacyConfigOptions).forEach(key => {
6976
7002
  let val = config[key];
@@ -6995,7 +7021,7 @@ var Vue = (function () {
6995
7021
  return target[key];
6996
7022
  }
6997
7023
  if (key in internalOptionMergeStrats &&
6998
- softAssertCompatEnabled("CONFIG_OPTION_MERGE_STRATS" /* CONFIG_OPTION_MERGE_STRATS */, null)) {
7024
+ softAssertCompatEnabled("CONFIG_OPTION_MERGE_STRATS" /* DeprecationTypes.CONFIG_OPTION_MERGE_STRATS */, null)) {
6999
7025
  return internalOptionMergeStrats[key];
7000
7026
  }
7001
7027
  }
@@ -7013,11 +7039,11 @@ var Vue = (function () {
7013
7039
  return createCompatApp(options, Vue);
7014
7040
  });
7015
7041
  function createCompatApp(options = {}, Ctor) {
7016
- assertCompatEnabled("GLOBAL_MOUNT" /* GLOBAL_MOUNT */, null);
7042
+ assertCompatEnabled("GLOBAL_MOUNT" /* DeprecationTypes.GLOBAL_MOUNT */, null);
7017
7043
  const { data } = options;
7018
7044
  if (data &&
7019
7045
  !isFunction(data) &&
7020
- softAssertCompatEnabled("OPTIONS_DATA_FN" /* OPTIONS_DATA_FN */, null)) {
7046
+ softAssertCompatEnabled("OPTIONS_DATA_FN" /* DeprecationTypes.OPTIONS_DATA_FN */, null)) {
7021
7047
  options.data = () => data;
7022
7048
  }
7023
7049
  const app = createApp(options);
@@ -7032,7 +7058,7 @@ var Vue = (function () {
7032
7058
  return vm;
7033
7059
  }
7034
7060
  }
7035
- Vue.version = `2.6.14-compat:${"3.2.35"}`;
7061
+ Vue.version = `2.6.14-compat:${"3.2.38"}`;
7036
7062
  Vue.config = singletonApp.config;
7037
7063
  Vue.use = (p, ...options) => {
7038
7064
  if (p && isFunction(p.install)) {
@@ -7071,7 +7097,7 @@ var Vue = (function () {
7071
7097
  Vue.nextTick = nextTick;
7072
7098
  const extendCache = new WeakMap();
7073
7099
  function extendCtor(extendOptions = {}) {
7074
- assertCompatEnabled("GLOBAL_EXTEND" /* GLOBAL_EXTEND */, null);
7100
+ assertCompatEnabled("GLOBAL_EXTEND" /* DeprecationTypes.GLOBAL_EXTEND */, null);
7075
7101
  if (isFunction(extendOptions)) {
7076
7102
  extendOptions = extendOptions.options;
7077
7103
  }
@@ -7112,15 +7138,15 @@ var Vue = (function () {
7112
7138
  }
7113
7139
  Vue.extend = extendCtor.bind(Vue);
7114
7140
  Vue.set = (target, key, value) => {
7115
- assertCompatEnabled("GLOBAL_SET" /* GLOBAL_SET */, null);
7141
+ assertCompatEnabled("GLOBAL_SET" /* DeprecationTypes.GLOBAL_SET */, null);
7116
7142
  target[key] = value;
7117
7143
  };
7118
7144
  Vue.delete = (target, key) => {
7119
- assertCompatEnabled("GLOBAL_DELETE" /* GLOBAL_DELETE */, null);
7145
+ assertCompatEnabled("GLOBAL_DELETE" /* DeprecationTypes.GLOBAL_DELETE */, null);
7120
7146
  delete target[key];
7121
7147
  };
7122
7148
  Vue.observable = (target) => {
7123
- assertCompatEnabled("GLOBAL_OBSERVABLE" /* GLOBAL_OBSERVABLE */, null);
7149
+ assertCompatEnabled("GLOBAL_OBSERVABLE" /* DeprecationTypes.GLOBAL_OBSERVABLE */, null);
7124
7150
  return reactive(target);
7125
7151
  };
7126
7152
  Vue.filter = ((name, filter) => {
@@ -7141,7 +7167,7 @@ var Vue = (function () {
7141
7167
  };
7142
7168
  Object.defineProperty(Vue, 'util', {
7143
7169
  get() {
7144
- assertCompatEnabled("GLOBAL_PRIVATE_UTIL" /* GLOBAL_PRIVATE_UTIL */, null);
7170
+ assertCompatEnabled("GLOBAL_PRIVATE_UTIL" /* DeprecationTypes.GLOBAL_PRIVATE_UTIL */, null);
7145
7171
  return util;
7146
7172
  }
7147
7173
  });
@@ -7164,7 +7190,7 @@ var Vue = (function () {
7164
7190
  function installFilterMethod(app, context) {
7165
7191
  context.filters = {};
7166
7192
  app.filter = (name, filter) => {
7167
- assertCompatEnabled("FILTERS" /* FILTERS */, null);
7193
+ assertCompatEnabled("FILTERS" /* DeprecationTypes.FILTERS */, null);
7168
7194
  if (!filter) {
7169
7195
  return context.filters[name];
7170
7196
  }
@@ -7181,7 +7207,7 @@ var Vue = (function () {
7181
7207
  // so that app.use() can work with legacy plugins that extend prototypes
7182
7208
  prototype: {
7183
7209
  get() {
7184
- warnDeprecation("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
7210
+ warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
7185
7211
  return app.config.globalProperties;
7186
7212
  }
7187
7213
  },
@@ -7198,9 +7224,11 @@ var Vue = (function () {
7198
7224
  });
7199
7225
  }
7200
7226
  function applySingletonAppMutations(app) {
7201
- ['mixins', 'components', 'directives', 'filters', 'deopt'].forEach(key => {
7227
+ // copy over asset registries and deopt flag
7228
+ app._context.mixins = [...singletonApp._context.mixins];
7229
+ ['components', 'directives', 'filters'].forEach(key => {
7202
7230
  // @ts-ignore
7203
- app._context[key] = singletonApp._context[key];
7231
+ app._context[key] = Object.create(singletonApp._context[key]);
7204
7232
  });
7205
7233
  // copy over global config mutations
7206
7234
  isCopyingConfig = true;
@@ -7213,10 +7241,10 @@ var Vue = (function () {
7213
7241
  }
7214
7242
  const val = singletonApp.config[key];
7215
7243
  // @ts-ignore
7216
- app.config[key] = val;
7244
+ app.config[key] = isObject(val) ? Object.create(val) : val;
7217
7245
  // compat for runtime ignoredElements -> isCustomElement
7218
7246
  if (key === 'ignoredElements' &&
7219
- isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* CONFIG_IGNORED_ELEMENTS */, null) &&
7247
+ isCompatEnabled("CONFIG_IGNORED_ELEMENTS" /* DeprecationTypes.CONFIG_IGNORED_ELEMENTS */, null) &&
7220
7248
  !isRuntimeOnly() &&
7221
7249
  isArray(val)) {
7222
7250
  app.config.compilerOptions.isCustomElement = tag => {
@@ -7229,7 +7257,7 @@ var Vue = (function () {
7229
7257
  }
7230
7258
  function applySingletonPrototype(app, Ctor) {
7231
7259
  // copy prototype augmentations as config.globalProperties
7232
- const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
7260
+ const enabled = isCompatEnabled("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
7233
7261
  if (enabled) {
7234
7262
  app.config.globalProperties = Object.create(Ctor.prototype);
7235
7263
  }
@@ -7244,7 +7272,7 @@ var Vue = (function () {
7244
7272
  }
7245
7273
  }
7246
7274
  if (hasPrototypeAugmentations) {
7247
- warnDeprecation("GLOBAL_PROTOTYPE" /* GLOBAL_PROTOTYPE */, null);
7275
+ warnDeprecation("GLOBAL_PROTOTYPE" /* DeprecationTypes.GLOBAL_PROTOTYPE */, null);
7248
7276
  }
7249
7277
  }
7250
7278
  function installCompatMount(app, context, render) {
@@ -7314,7 +7342,7 @@ var Vue = (function () {
7314
7342
  for (let i = 0; i < container.attributes.length; i++) {
7315
7343
  const attr = container.attributes[i];
7316
7344
  if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
7317
- warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */, null);
7345
+ warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
7318
7346
  break;
7319
7347
  }
7320
7348
  }
@@ -7353,7 +7381,7 @@ var Vue = (function () {
7353
7381
  if (bum) {
7354
7382
  invokeArrayFns(bum);
7355
7383
  }
7356
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
7384
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7357
7385
  instance.emit('hook:beforeDestroy');
7358
7386
  }
7359
7387
  // stop effects
@@ -7364,7 +7392,7 @@ var Vue = (function () {
7364
7392
  if (um) {
7365
7393
  invokeArrayFns(um);
7366
7394
  }
7367
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
7395
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
7368
7396
  instance.emit('hook:destroyed');
7369
7397
  }
7370
7398
  }
@@ -7425,12 +7453,12 @@ var Vue = (function () {
7425
7453
  enumerable: true,
7426
7454
  configurable: true,
7427
7455
  get() {
7428
- track(obj, "get" /* GET */, key);
7456
+ track(obj, "get" /* TrackOpTypes.GET */, key);
7429
7457
  return val;
7430
7458
  },
7431
7459
  set(newVal) {
7432
7460
  val = isObject(newVal) ? reactive(newVal) : newVal;
7433
- trigger(obj, "set" /* SET */, key, newVal);
7461
+ trigger(obj, "set" /* TriggerOpTypes.SET */, key, newVal);
7434
7462
  }
7435
7463
  });
7436
7464
  }
@@ -7623,7 +7651,7 @@ var Vue = (function () {
7623
7651
  // because the template ref is forwarded to inner component
7624
7652
  return;
7625
7653
  }
7626
- const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
7654
+ const refValue = vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */
7627
7655
  ? getExposeProxy(vnode.component) || vnode.component.proxy
7628
7656
  : vnode.el;
7629
7657
  const value = isUnmount ? null : refValue;
@@ -7649,7 +7677,7 @@ var Vue = (function () {
7649
7677
  }
7650
7678
  }
7651
7679
  if (isFunction(ref)) {
7652
- callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
7680
+ callWithErrorHandling(ref, owner, 12 /* ErrorCodes.FUNCTION_REF */, [value, refs]);
7653
7681
  }
7654
7682
  else {
7655
7683
  const _isString = isString(ref);
@@ -7686,7 +7714,7 @@ var Vue = (function () {
7686
7714
  setupState[ref] = value;
7687
7715
  }
7688
7716
  }
7689
- else if (isRef(ref)) {
7717
+ else if (_isRef) {
7690
7718
  ref.value = value;
7691
7719
  if (rawRef.k)
7692
7720
  refs[rawRef.k] = value;
@@ -7711,7 +7739,7 @@ var Vue = (function () {
7711
7739
 
7712
7740
  let hasMismatch = false;
7713
7741
  const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
7714
- const isComment = (node) => node.nodeType === 8 /* COMMENT */;
7742
+ const isComment = (node) => node.nodeType === 8 /* DOMNodeTypes.COMMENT */;
7715
7743
  // Note: hydration is DOM-specific
7716
7744
  // But we have to place it in core due to tight coupling with core - splitting
7717
7745
  // it out creates a ton of unnecessary complexity.
@@ -7725,11 +7753,13 @@ var Vue = (function () {
7725
7753
  `Performing full mount instead.`);
7726
7754
  patch(null, vnode, container);
7727
7755
  flushPostFlushCbs();
7756
+ container._vnode = vnode;
7728
7757
  return;
7729
7758
  }
7730
7759
  hasMismatch = false;
7731
7760
  hydrateNode(container.firstChild, vnode, null, null, null);
7732
7761
  flushPostFlushCbs();
7762
+ container._vnode = vnode;
7733
7763
  if (hasMismatch && !false) {
7734
7764
  // this error should show up in production
7735
7765
  console.error(`Hydration completed but contains mismatches.`);
@@ -7741,14 +7771,14 @@ var Vue = (function () {
7741
7771
  const { type, ref, shapeFlag, patchFlag } = vnode;
7742
7772
  const domType = node.nodeType;
7743
7773
  vnode.el = node;
7744
- if (patchFlag === -2 /* BAIL */) {
7774
+ if (patchFlag === -2 /* PatchFlags.BAIL */) {
7745
7775
  optimized = false;
7746
7776
  vnode.dynamicChildren = null;
7747
7777
  }
7748
7778
  let nextNode = null;
7749
7779
  switch (type) {
7750
7780
  case Text:
7751
- if (domType !== 3 /* TEXT */) {
7781
+ if (domType !== 3 /* DOMNodeTypes.TEXT */) {
7752
7782
  // #5728 empty text node inside a slot can cause hydration failure
7753
7783
  // because the server rendered HTML won't contain a text node
7754
7784
  if (vnode.children === '') {
@@ -7771,7 +7801,7 @@ var Vue = (function () {
7771
7801
  }
7772
7802
  break;
7773
7803
  case Comment:
7774
- if (domType !== 8 /* COMMENT */ || isFragmentStart) {
7804
+ if (domType !== 8 /* DOMNodeTypes.COMMENT */ || isFragmentStart) {
7775
7805
  nextNode = onMismatch();
7776
7806
  }
7777
7807
  else {
@@ -7779,7 +7809,7 @@ var Vue = (function () {
7779
7809
  }
7780
7810
  break;
7781
7811
  case Static:
7782
- if (domType !== 1 /* ELEMENT */) {
7812
+ if (domType !== 1 /* DOMNodeTypes.ELEMENT */ && domType !== 3 /* DOMNodeTypes.TEXT */) {
7783
7813
  nextNode = onMismatch();
7784
7814
  }
7785
7815
  else {
@@ -7790,7 +7820,10 @@ var Vue = (function () {
7790
7820
  const needToAdoptContent = !vnode.children.length;
7791
7821
  for (let i = 0; i < vnode.staticCount; i++) {
7792
7822
  if (needToAdoptContent)
7793
- vnode.children += nextNode.outerHTML;
7823
+ vnode.children +=
7824
+ nextNode.nodeType === 1 /* DOMNodeTypes.ELEMENT */
7825
+ ? nextNode.outerHTML
7826
+ : nextNode.data;
7794
7827
  if (i === vnode.staticCount - 1) {
7795
7828
  vnode.anchor = nextNode;
7796
7829
  }
@@ -7808,8 +7841,8 @@ var Vue = (function () {
7808
7841
  }
7809
7842
  break;
7810
7843
  default:
7811
- if (shapeFlag & 1 /* ELEMENT */) {
7812
- if (domType !== 1 /* ELEMENT */ ||
7844
+ if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
7845
+ if (domType !== 1 /* DOMNodeTypes.ELEMENT */ ||
7813
7846
  vnode.type.toLowerCase() !==
7814
7847
  node.tagName.toLowerCase()) {
7815
7848
  nextNode = onMismatch();
@@ -7818,7 +7851,7 @@ var Vue = (function () {
7818
7851
  nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
7819
7852
  }
7820
7853
  }
7821
- else if (shapeFlag & 6 /* COMPONENT */) {
7854
+ else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
7822
7855
  // when setting up the render effect, if the initial vnode already
7823
7856
  // has .el set, the component will perform hydration instead of mount
7824
7857
  // on its sub-tree.
@@ -7857,15 +7890,15 @@ var Vue = (function () {
7857
7890
  vnode.component.subTree = subTree;
7858
7891
  }
7859
7892
  }
7860
- else if (shapeFlag & 64 /* TELEPORT */) {
7861
- if (domType !== 8 /* COMMENT */) {
7893
+ else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
7894
+ if (domType !== 8 /* DOMNodeTypes.COMMENT */) {
7862
7895
  nextNode = onMismatch();
7863
7896
  }
7864
7897
  else {
7865
7898
  nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
7866
7899
  }
7867
7900
  }
7868
- else if (shapeFlag & 128 /* SUSPENSE */) {
7901
+ else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
7869
7902
  nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
7870
7903
  }
7871
7904
  else {
@@ -7893,7 +7926,7 @@ var Vue = (function () {
7893
7926
  if (props) {
7894
7927
  if (forcePatchValue ||
7895
7928
  !optimized ||
7896
- patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
7929
+ patchFlag & (16 /* PatchFlags.FULL_PROPS */ | 32 /* PatchFlags.HYDRATE_EVENTS */)) {
7897
7930
  for (const key in props) {
7898
7931
  if ((forcePatchValue && key.endsWith('value')) ||
7899
7932
  (isOn(key) && !isReservedProp(key))) {
@@ -7922,7 +7955,7 @@ var Vue = (function () {
7922
7955
  }, parentSuspense);
7923
7956
  }
7924
7957
  // children
7925
- if (shapeFlag & 16 /* ARRAY_CHILDREN */ &&
7958
+ if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */ &&
7926
7959
  // skip if element has innerHTML / textContent
7927
7960
  !(props && (props.innerHTML || props.textContent))) {
7928
7961
  let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
@@ -7940,7 +7973,7 @@ var Vue = (function () {
7940
7973
  remove(cur);
7941
7974
  }
7942
7975
  }
7943
- else if (shapeFlag & 8 /* TEXT_CHILDREN */) {
7976
+ else if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
7944
7977
  if (el.textContent !== vnode.children) {
7945
7978
  hasMismatch = true;
7946
7979
  warn$1(`Hydration text content mismatch in <${vnode.type}>:\n` +
@@ -8003,7 +8036,7 @@ var Vue = (function () {
8003
8036
  };
8004
8037
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
8005
8038
  hasMismatch = true;
8006
- warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */
8039
+ warn$1(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* DOMNodeTypes.TEXT */
8007
8040
  ? `(text)`
8008
8041
  : isComment(node) && node.data === '['
8009
8042
  ? `(start of fragment)`
@@ -8134,7 +8167,7 @@ var Vue = (function () {
8134
8167
  unmount(n1, parentComponent, parentSuspense, true);
8135
8168
  n1 = null;
8136
8169
  }
8137
- if (n2.patchFlag === -2 /* BAIL */) {
8170
+ if (n2.patchFlag === -2 /* PatchFlags.BAIL */) {
8138
8171
  optimized = false;
8139
8172
  n2.dynamicChildren = null;
8140
8173
  }
@@ -8158,16 +8191,16 @@ var Vue = (function () {
8158
8191
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8159
8192
  break;
8160
8193
  default:
8161
- if (shapeFlag & 1 /* ELEMENT */) {
8194
+ if (shapeFlag & 1 /* ShapeFlags.ELEMENT */) {
8162
8195
  processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8163
8196
  }
8164
- else if (shapeFlag & 6 /* COMPONENT */) {
8197
+ else if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
8165
8198
  processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8166
8199
  }
8167
- else if (shapeFlag & 64 /* TELEPORT */) {
8200
+ else if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
8168
8201
  type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
8169
8202
  }
8170
- else if (shapeFlag & 128 /* SUSPENSE */) {
8203
+ else if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
8171
8204
  type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
8172
8205
  }
8173
8206
  else {
@@ -8253,10 +8286,10 @@ var Vue = (function () {
8253
8286
  el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props);
8254
8287
  // mount children first, since some props may rely on child content
8255
8288
  // being already rendered, e.g. `<select value>`
8256
- if (shapeFlag & 8 /* TEXT_CHILDREN */) {
8289
+ if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
8257
8290
  hostSetElementText(el, vnode.children);
8258
8291
  }
8259
- else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
8292
+ else if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
8260
8293
  mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized);
8261
8294
  }
8262
8295
  if (dirs) {
@@ -8332,7 +8365,7 @@ var Vue = (function () {
8332
8365
  if (parentComponent) {
8333
8366
  let subTree = parentComponent.subTree;
8334
8367
  if (subTree.patchFlag > 0 &&
8335
- subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
8368
+ subTree.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */) {
8336
8369
  subTree =
8337
8370
  filterSingleRoot(subTree.children) || subTree;
8338
8371
  }
@@ -8355,7 +8388,7 @@ var Vue = (function () {
8355
8388
  let { patchFlag, dynamicChildren, dirs } = n2;
8356
8389
  // #1426 take the old vnode's patch flag into account since user may clone a
8357
8390
  // compiler-generated vnode, which de-opts to FULL_PROPS
8358
- patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */;
8391
+ patchFlag |= n1.patchFlag & 16 /* PatchFlags.FULL_PROPS */;
8359
8392
  const oldProps = n1.props || EMPTY_OBJ;
8360
8393
  const newProps = n2.props || EMPTY_OBJ;
8361
8394
  let vnodeHook;
@@ -8390,21 +8423,21 @@ var Vue = (function () {
8390
8423
  // generated by the compiler and can take the fast path.
8391
8424
  // in this path old node and new node are guaranteed to have the same shape
8392
8425
  // (i.e. at the exact same position in the source template)
8393
- if (patchFlag & 16 /* FULL_PROPS */) {
8426
+ if (patchFlag & 16 /* PatchFlags.FULL_PROPS */) {
8394
8427
  // element props contain dynamic keys, full diff needed
8395
8428
  patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
8396
8429
  }
8397
8430
  else {
8398
8431
  // class
8399
8432
  // this flag is matched when the element has dynamic class bindings.
8400
- if (patchFlag & 2 /* CLASS */) {
8433
+ if (patchFlag & 2 /* PatchFlags.CLASS */) {
8401
8434
  if (oldProps.class !== newProps.class) {
8402
8435
  hostPatchProp(el, 'class', null, newProps.class, isSVG);
8403
8436
  }
8404
8437
  }
8405
8438
  // style
8406
8439
  // this flag is matched when the element has dynamic style bindings
8407
- if (patchFlag & 4 /* STYLE */) {
8440
+ if (patchFlag & 4 /* PatchFlags.STYLE */) {
8408
8441
  hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG);
8409
8442
  }
8410
8443
  // props
@@ -8413,7 +8446,7 @@ var Vue = (function () {
8413
8446
  // faster iteration.
8414
8447
  // Note dynamic keys like :[foo]="bar" will cause this optimization to
8415
8448
  // bail out and go through a full diff because we need to unset the old key
8416
- if (patchFlag & 8 /* PROPS */) {
8449
+ if (patchFlag & 8 /* PatchFlags.PROPS */) {
8417
8450
  // if the flag is present then dynamicProps must be non-null
8418
8451
  const propsToUpdate = n2.dynamicProps;
8419
8452
  for (let i = 0; i < propsToUpdate.length; i++) {
@@ -8429,7 +8462,7 @@ var Vue = (function () {
8429
8462
  }
8430
8463
  // text
8431
8464
  // This flag is matched when the element has only dynamic text children.
8432
- if (patchFlag & 1 /* TEXT */) {
8465
+ if (patchFlag & 1 /* PatchFlags.TEXT */) {
8433
8466
  if (n1.children !== n2.children) {
8434
8467
  hostSetElementText(el, n2.children);
8435
8468
  }
@@ -8463,7 +8496,7 @@ var Vue = (function () {
8463
8496
  // which also requires the correct parent container
8464
8497
  !isSameVNodeType(oldVNode, newVNode) ||
8465
8498
  // - In the case of a component, it could contain anything.
8466
- oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
8499
+ oldVNode.shapeFlag & (6 /* ShapeFlags.COMPONENT */ | 64 /* ShapeFlags.TELEPORT */))
8467
8500
  ? hostParentNode(oldVNode.el)
8468
8501
  : // In other cases, the parent container is not actually used so we
8469
8502
  // just pass the block element here to avoid a DOM parentNode call.
@@ -8501,7 +8534,7 @@ var Vue = (function () {
8501
8534
  const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));
8502
8535
  let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
8503
8536
  if (// #5523 dev root fragment may inherit directives
8504
- (isHmrUpdating || patchFlag & 2048 /* DEV_ROOT_FRAGMENT */)) {
8537
+ (isHmrUpdating || patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */)) {
8505
8538
  // HMR updated / Dev root fragment (w/ comments), force full diff
8506
8539
  patchFlag = 0;
8507
8540
  optimized = false;
@@ -8523,7 +8556,7 @@ var Vue = (function () {
8523
8556
  }
8524
8557
  else {
8525
8558
  if (patchFlag > 0 &&
8526
- patchFlag & 64 /* STABLE_FRAGMENT */ &&
8559
+ patchFlag & 64 /* PatchFlags.STABLE_FRAGMENT */ &&
8527
8560
  dynamicChildren &&
8528
8561
  // #2715 the previous fragment could've been a BAILed one as a result
8529
8562
  // of renderSlot() with no valid children
@@ -8556,7 +8589,7 @@ var Vue = (function () {
8556
8589
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8557
8590
  n2.slotScopeIds = slotScopeIds;
8558
8591
  if (n1 == null) {
8559
- if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
8592
+ if (n2.shapeFlag & 512 /* ShapeFlags.COMPONENT_KEPT_ALIVE */) {
8560
8593
  parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized);
8561
8594
  }
8562
8595
  else {
@@ -8661,7 +8694,7 @@ var Vue = (function () {
8661
8694
  (vnodeHook = props && props.onVnodeBeforeMount)) {
8662
8695
  invokeVNodeHook(vnodeHook, parent, initialVNode);
8663
8696
  }
8664
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
8697
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
8665
8698
  instance.emit('hook:beforeMount');
8666
8699
  }
8667
8700
  toggleRecurse(instance, true);
@@ -8722,18 +8755,18 @@ var Vue = (function () {
8722
8755
  const scopedInitialVNode = initialVNode;
8723
8756
  queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
8724
8757
  }
8725
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
8758
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
8726
8759
  queuePostRenderEffect(() => instance.emit('hook:mounted'), parentSuspense);
8727
8760
  }
8728
8761
  // activated hook for keep-alive roots.
8729
8762
  // #1742 activated hook must be accessed after first render
8730
8763
  // since the hook may be injected by a child keep-alive
8731
- if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */ ||
8764
+ if (initialVNode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */ ||
8732
8765
  (parent &&
8733
8766
  isAsyncWrapper(parent.vnode) &&
8734
- parent.vnode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */)) {
8767
+ parent.vnode.shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */)) {
8735
8768
  instance.a && queuePostRenderEffect(instance.a, parentSuspense);
8736
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
8769
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
8737
8770
  queuePostRenderEffect(() => instance.emit('hook:activated'), parentSuspense);
8738
8771
  }
8739
8772
  }
@@ -8771,7 +8804,7 @@ var Vue = (function () {
8771
8804
  if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
8772
8805
  invokeVNodeHook(vnodeHook, parent, next, vnode);
8773
8806
  }
8774
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
8807
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
8775
8808
  instance.emit('hook:beforeUpdate');
8776
8809
  }
8777
8810
  toggleRecurse(instance, true);
@@ -8811,7 +8844,7 @@ var Vue = (function () {
8811
8844
  if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
8812
8845
  queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
8813
8846
  }
8814
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
8847
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
8815
8848
  queuePostRenderEffect(() => instance.emit('hook:updated'), parentSuspense);
8816
8849
  }
8817
8850
  {
@@ -8851,7 +8884,7 @@ var Vue = (function () {
8851
8884
  pauseTracking();
8852
8885
  // props update may have triggered pre-flush watchers.
8853
8886
  // flush them before the render update.
8854
- flushPreFlushCbs(undefined, instance.update);
8887
+ flushPreFlushCbs();
8855
8888
  resetTracking();
8856
8889
  };
8857
8890
  const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
@@ -8861,22 +8894,22 @@ var Vue = (function () {
8861
8894
  const { patchFlag, shapeFlag } = n2;
8862
8895
  // fast path
8863
8896
  if (patchFlag > 0) {
8864
- if (patchFlag & 128 /* KEYED_FRAGMENT */) {
8897
+ if (patchFlag & 128 /* PatchFlags.KEYED_FRAGMENT */) {
8865
8898
  // this could be either fully-keyed or mixed (some keyed some not)
8866
8899
  // presence of patchFlag means children are guaranteed to be arrays
8867
8900
  patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8868
8901
  return;
8869
8902
  }
8870
- else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) {
8903
+ else if (patchFlag & 256 /* PatchFlags.UNKEYED_FRAGMENT */) {
8871
8904
  // unkeyed
8872
8905
  patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8873
8906
  return;
8874
8907
  }
8875
8908
  }
8876
8909
  // children has 3 possibilities: text, array or no children.
8877
- if (shapeFlag & 8 /* TEXT_CHILDREN */) {
8910
+ if (shapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
8878
8911
  // text children fast path
8879
- if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
8912
+ if (prevShapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
8880
8913
  unmountChildren(c1, parentComponent, parentSuspense);
8881
8914
  }
8882
8915
  if (c2 !== c1) {
@@ -8884,9 +8917,9 @@ var Vue = (function () {
8884
8917
  }
8885
8918
  }
8886
8919
  else {
8887
- if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
8920
+ if (prevShapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
8888
8921
  // prev children was array
8889
- if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
8922
+ if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
8890
8923
  // two arrays, cannot assume anything, do full diff
8891
8924
  patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8892
8925
  }
@@ -8898,11 +8931,11 @@ var Vue = (function () {
8898
8931
  else {
8899
8932
  // prev children was text OR null
8900
8933
  // new children is array OR null
8901
- if (prevShapeFlag & 8 /* TEXT_CHILDREN */) {
8934
+ if (prevShapeFlag & 8 /* ShapeFlags.TEXT_CHILDREN */) {
8902
8935
  hostSetElementText(container, '');
8903
8936
  }
8904
8937
  // mount new if array
8905
- if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
8938
+ if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
8906
8939
  mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
8907
8940
  }
8908
8941
  }
@@ -9093,7 +9126,7 @@ var Vue = (function () {
9093
9126
  // There is no stable subsequence (e.g. a reverse)
9094
9127
  // OR current node is not among the stable sequence
9095
9128
  if (j < 0 || i !== increasingNewIndexSequence[j]) {
9096
- move(nextChild, container, anchor, 2 /* REORDER */);
9129
+ move(nextChild, container, anchor, 2 /* MoveType.REORDER */);
9097
9130
  }
9098
9131
  else {
9099
9132
  j--;
@@ -9104,15 +9137,15 @@ var Vue = (function () {
9104
9137
  };
9105
9138
  const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
9106
9139
  const { el, type, transition, children, shapeFlag } = vnode;
9107
- if (shapeFlag & 6 /* COMPONENT */) {
9140
+ if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
9108
9141
  move(vnode.component.subTree, container, anchor, moveType);
9109
9142
  return;
9110
9143
  }
9111
- if (shapeFlag & 128 /* SUSPENSE */) {
9144
+ if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
9112
9145
  vnode.suspense.move(container, anchor, moveType);
9113
9146
  return;
9114
9147
  }
9115
- if (shapeFlag & 64 /* TELEPORT */) {
9148
+ if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
9116
9149
  type.move(vnode, container, anchor, internals);
9117
9150
  return;
9118
9151
  }
@@ -9129,11 +9162,11 @@ var Vue = (function () {
9129
9162
  return;
9130
9163
  }
9131
9164
  // single nodes
9132
- const needTransition = moveType !== 2 /* REORDER */ &&
9133
- shapeFlag & 1 /* ELEMENT */ &&
9165
+ const needTransition = moveType !== 2 /* MoveType.REORDER */ &&
9166
+ shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&
9134
9167
  transition;
9135
9168
  if (needTransition) {
9136
- if (moveType === 0 /* ENTER */) {
9169
+ if (moveType === 0 /* MoveType.ENTER */) {
9137
9170
  transition.beforeEnter(el);
9138
9171
  hostInsert(el, container, anchor);
9139
9172
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
@@ -9165,42 +9198,42 @@ var Vue = (function () {
9165
9198
  if (ref != null) {
9166
9199
  setRef(ref, null, parentSuspense, vnode, true);
9167
9200
  }
9168
- if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
9201
+ if (shapeFlag & 256 /* ShapeFlags.COMPONENT_SHOULD_KEEP_ALIVE */) {
9169
9202
  parentComponent.ctx.deactivate(vnode);
9170
9203
  return;
9171
9204
  }
9172
- const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
9205
+ const shouldInvokeDirs = shapeFlag & 1 /* ShapeFlags.ELEMENT */ && dirs;
9173
9206
  const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
9174
9207
  let vnodeHook;
9175
9208
  if (shouldInvokeVnodeHook &&
9176
9209
  (vnodeHook = props && props.onVnodeBeforeUnmount)) {
9177
9210
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
9178
9211
  }
9179
- if (shapeFlag & 6 /* COMPONENT */) {
9212
+ if (shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
9180
9213
  unmountComponent(vnode.component, parentSuspense, doRemove);
9181
9214
  }
9182
9215
  else {
9183
- if (shapeFlag & 128 /* SUSPENSE */) {
9216
+ if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
9184
9217
  vnode.suspense.unmount(parentSuspense, doRemove);
9185
9218
  return;
9186
9219
  }
9187
9220
  if (shouldInvokeDirs) {
9188
9221
  invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount');
9189
9222
  }
9190
- if (shapeFlag & 64 /* TELEPORT */) {
9223
+ if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
9191
9224
  vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove);
9192
9225
  }
9193
9226
  else if (dynamicChildren &&
9194
9227
  // #1153: fast path should not be taken for non-stable (v-for) fragments
9195
9228
  (type !== Fragment ||
9196
- (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) {
9229
+ (patchFlag > 0 && patchFlag & 64 /* PatchFlags.STABLE_FRAGMENT */))) {
9197
9230
  // fast path for block nodes: only need to unmount dynamic children.
9198
9231
  unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
9199
9232
  }
9200
9233
  else if ((type === Fragment &&
9201
9234
  patchFlag &
9202
- (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
9203
- (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
9235
+ (128 /* PatchFlags.KEYED_FRAGMENT */ | 256 /* PatchFlags.UNKEYED_FRAGMENT */)) ||
9236
+ (!optimized && shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */)) {
9204
9237
  unmountChildren(children, parentComponent, parentSuspense);
9205
9238
  }
9206
9239
  if (doRemove) {
@@ -9221,7 +9254,7 @@ var Vue = (function () {
9221
9254
  const { type, el, anchor, transition } = vnode;
9222
9255
  if (type === Fragment) {
9223
9256
  if (vnode.patchFlag > 0 &&
9224
- vnode.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */ &&
9257
+ vnode.patchFlag & 2048 /* PatchFlags.DEV_ROOT_FRAGMENT */ &&
9225
9258
  transition &&
9226
9259
  !transition.persisted) {
9227
9260
  vnode.children.forEach(child => {
@@ -9248,7 +9281,7 @@ var Vue = (function () {
9248
9281
  transition.afterLeave();
9249
9282
  }
9250
9283
  };
9251
- if (vnode.shapeFlag & 1 /* ELEMENT */ &&
9284
+ if (vnode.shapeFlag & 1 /* ShapeFlags.ELEMENT */ &&
9252
9285
  transition &&
9253
9286
  !transition.persisted) {
9254
9287
  const { leave, delayLeave } = transition;
@@ -9284,7 +9317,7 @@ var Vue = (function () {
9284
9317
  if (bum) {
9285
9318
  invokeArrayFns(bum);
9286
9319
  }
9287
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
9320
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
9288
9321
  instance.emit('hook:beforeDestroy');
9289
9322
  }
9290
9323
  // stop effects in component scope
@@ -9300,7 +9333,7 @@ var Vue = (function () {
9300
9333
  if (um) {
9301
9334
  queuePostRenderEffect(um, parentSuspense);
9302
9335
  }
9303
- if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* INSTANCE_EVENT_HOOKS */, instance)) {
9336
+ if (isCompatEnabled("INSTANCE_EVENT_HOOKS" /* DeprecationTypes.INSTANCE_EVENT_HOOKS */, instance)) {
9304
9337
  queuePostRenderEffect(() => instance.emit('hook:destroyed'), parentSuspense);
9305
9338
  }
9306
9339
  queuePostRenderEffect(() => {
@@ -9330,10 +9363,10 @@ var Vue = (function () {
9330
9363
  }
9331
9364
  };
9332
9365
  const getNextHostNode = vnode => {
9333
- if (vnode.shapeFlag & 6 /* COMPONENT */) {
9366
+ if (vnode.shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
9334
9367
  return getNextHostNode(vnode.component.subTree);
9335
9368
  }
9336
- if (vnode.shapeFlag & 128 /* SUSPENSE */) {
9369
+ if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
9337
9370
  return vnode.suspense.next();
9338
9371
  }
9339
9372
  return hostNextSibling((vnode.anchor || vnode.el));
@@ -9347,6 +9380,7 @@ var Vue = (function () {
9347
9380
  else {
9348
9381
  patch(container._vnode || null, vnode, container, null, null, null, isSVG);
9349
9382
  }
9383
+ flushPreFlushCbs();
9350
9384
  flushPostFlushCbs();
9351
9385
  container._vnode = vnode;
9352
9386
  };
@@ -9396,8 +9430,8 @@ var Vue = (function () {
9396
9430
  // guaranteed to be vnodes
9397
9431
  const c1 = ch1[i];
9398
9432
  let c2 = ch2[i];
9399
- if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) {
9400
- if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) {
9433
+ if (c2.shapeFlag & 1 /* ShapeFlags.ELEMENT */ && !c2.dynamicChildren) {
9434
+ if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* PatchFlags.HYDRATE_EVENTS */) {
9401
9435
  c2 = ch2[i] = cloneIfMounted(ch2[i]);
9402
9436
  c2.el = c1.el;
9403
9437
  }
@@ -9517,7 +9551,7 @@ var Vue = (function () {
9517
9551
  const mount = (container, anchor) => {
9518
9552
  // Teleport *always* has Array children. This is enforced in both the
9519
9553
  // compiler and vnode children normalization.
9520
- if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
9554
+ if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
9521
9555
  mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
9522
9556
  }
9523
9557
  };
@@ -9553,7 +9587,7 @@ var Vue = (function () {
9553
9587
  if (!wasDisabled) {
9554
9588
  // enabled -> disabled
9555
9589
  // move into main container
9556
- moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */);
9590
+ moveTeleport(n2, container, mainAnchor, internals, 1 /* TeleportMoveTypes.TOGGLE */);
9557
9591
  }
9558
9592
  }
9559
9593
  else {
@@ -9561,7 +9595,7 @@ var Vue = (function () {
9561
9595
  if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
9562
9596
  const nextTarget = (n2.target = resolveTarget(n2.props, querySelector));
9563
9597
  if (nextTarget) {
9564
- moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */);
9598
+ moveTeleport(n2, nextTarget, null, internals, 0 /* TeleportMoveTypes.TARGET_CHANGE */);
9565
9599
  }
9566
9600
  else {
9567
9601
  warn$1('Invalid Teleport target on update:', target, `(${typeof target})`);
@@ -9570,7 +9604,7 @@ var Vue = (function () {
9570
9604
  else if (wasDisabled) {
9571
9605
  // disabled -> enabled
9572
9606
  // move into teleport target
9573
- moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */);
9607
+ moveTeleport(n2, target, targetAnchor, internals, 1 /* TeleportMoveTypes.TOGGLE */);
9574
9608
  }
9575
9609
  }
9576
9610
  }
@@ -9583,7 +9617,7 @@ var Vue = (function () {
9583
9617
  // an unmounted teleport should always remove its children if not disabled
9584
9618
  if (doRemove || !isTeleportDisabled(props)) {
9585
9619
  hostRemove(anchor);
9586
- if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
9620
+ if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
9587
9621
  for (let i = 0; i < children.length; i++) {
9588
9622
  const child = children[i];
9589
9623
  unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren);
@@ -9594,13 +9628,13 @@ var Vue = (function () {
9594
9628
  move: moveTeleport,
9595
9629
  hydrate: hydrateTeleport
9596
9630
  };
9597
- function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) {
9631
+ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* TeleportMoveTypes.REORDER */) {
9598
9632
  // move target anchor if this is a target change.
9599
- if (moveType === 0 /* TARGET_CHANGE */) {
9633
+ if (moveType === 0 /* TeleportMoveTypes.TARGET_CHANGE */) {
9600
9634
  insert(vnode.targetAnchor, container, parentAnchor);
9601
9635
  }
9602
9636
  const { el, anchor, shapeFlag, children, props } = vnode;
9603
- const isReorder = moveType === 2 /* REORDER */;
9637
+ const isReorder = moveType === 2 /* TeleportMoveTypes.REORDER */;
9604
9638
  // move main view anchor if this is a re-order.
9605
9639
  if (isReorder) {
9606
9640
  insert(el, container, parentAnchor);
@@ -9610,9 +9644,9 @@ var Vue = (function () {
9610
9644
  // is not a reorder, or the teleport is disabled
9611
9645
  if (!isReorder || isTeleportDisabled(props)) {
9612
9646
  // Teleport has either Array children or no children.
9613
- if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
9647
+ if (shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
9614
9648
  for (let i = 0; i < children.length; i++) {
9615
- move(children[i], container, parentAnchor, 2 /* REORDER */);
9649
+ move(children[i], container, parentAnchor, 2 /* MoveType.REORDER */);
9616
9650
  }
9617
9651
  }
9618
9652
  }
@@ -9627,7 +9661,7 @@ var Vue = (function () {
9627
9661
  // if multiple teleports rendered to the same target element, we need to
9628
9662
  // pick up from where the last teleport finished instead of the first node
9629
9663
  const targetNode = target._lpa || target.firstChild;
9630
- if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
9664
+ if (vnode.shapeFlag & 16 /* ShapeFlags.ARRAY_CHILDREN */) {
9631
9665
  if (isTeleportDisabled(vnode.props)) {
9632
9666
  vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized);
9633
9667
  vnode.targetAnchor = targetNode;
@@ -9704,7 +9738,7 @@ var Vue = (function () {
9704
9738
  }
9705
9739
  // 2.x async component
9706
9740
  if (isFunction(comp) &&
9707
- checkCompatEnabled("COMPONENT_ASYNC" /* COMPONENT_ASYNC */, instance, comp)) {
9741
+ checkCompatEnabled("COMPONENT_ASYNC" /* DeprecationTypes.COMPONENT_ASYNC */, instance, comp)) {
9708
9742
  // since after disabling this, plain functions are still valid usage, do not
9709
9743
  // use softAssert here.
9710
9744
  return convertLegacyAsyncComponent(comp);
@@ -9712,7 +9746,7 @@ var Vue = (function () {
9712
9746
  // 2.x functional component
9713
9747
  if (isObject(comp) &&
9714
9748
  comp.functional &&
9715
- softAssertCompatEnabled("COMPONENT_FUNCTIONAL" /* COMPONENT_FUNCTIONAL */, instance, comp)) {
9749
+ softAssertCompatEnabled("COMPONENT_FUNCTIONAL" /* DeprecationTypes.COMPONENT_FUNCTIONAL */, instance, comp)) {
9716
9750
  return convertLegacyFunctionalComponent(comp);
9717
9751
  }
9718
9752
  return comp;
@@ -9809,7 +9843,7 @@ var Vue = (function () {
9809
9843
  return value ? value.__v_isVNode === true : false;
9810
9844
  }
9811
9845
  function isSameVNodeType(n1, n2) {
9812
- if (n2.shapeFlag & 6 /* COMPONENT */ &&
9846
+ if (n2.shapeFlag & 6 /* ShapeFlags.COMPONENT */ &&
9813
9847
  hmrDirtyComponents.has(n2.type)) {
9814
9848
  // HMR only: if the component has been hot-updated, force a reload.
9815
9849
  return false;
@@ -9840,7 +9874,7 @@ var Vue = (function () {
9840
9874
  : ref
9841
9875
  : null);
9842
9876
  };
9843
- function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
9877
+ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ShapeFlags.ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
9844
9878
  const vnode = {
9845
9879
  __v_isVNode: true,
9846
9880
  __v_skip: true,
@@ -9871,7 +9905,7 @@ var Vue = (function () {
9871
9905
  if (needFullChildrenNormalization) {
9872
9906
  normalizeChildren(vnode, children);
9873
9907
  // normalize suspense children
9874
- if (shapeFlag & 128 /* SUSPENSE */) {
9908
+ if (shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
9875
9909
  type.normalize(vnode);
9876
9910
  }
9877
9911
  }
@@ -9879,8 +9913,8 @@ var Vue = (function () {
9879
9913
  // compiled element vnode - if children is passed, only possible types are
9880
9914
  // string or Array.
9881
9915
  vnode.shapeFlag |= isString(children)
9882
- ? 8 /* TEXT_CHILDREN */
9883
- : 16 /* ARRAY_CHILDREN */;
9916
+ ? 8 /* ShapeFlags.TEXT_CHILDREN */
9917
+ : 16 /* ShapeFlags.ARRAY_CHILDREN */;
9884
9918
  }
9885
9919
  // validate key
9886
9920
  if (vnode.key !== vnode.key) {
@@ -9896,10 +9930,10 @@ var Vue = (function () {
9896
9930
  // component nodes also should always be patched, because even if the
9897
9931
  // component doesn't need to update, it needs to persist the instance on to
9898
9932
  // the next vnode so that it can be properly unmounted later.
9899
- (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) &&
9933
+ (vnode.patchFlag > 0 || shapeFlag & 6 /* ShapeFlags.COMPONENT */) &&
9900
9934
  // the EVENTS flag is only for hydration and if it is the only flag, the
9901
9935
  // vnode should not be considered dynamic due to handler caching.
9902
- vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) {
9936
+ vnode.patchFlag !== 32 /* PatchFlags.HYDRATE_EVENTS */) {
9903
9937
  currentBlock.push(vnode);
9904
9938
  }
9905
9939
  {
@@ -9925,14 +9959,14 @@ var Vue = (function () {
9925
9959
  normalizeChildren(cloned, children);
9926
9960
  }
9927
9961
  if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
9928
- if (cloned.shapeFlag & 6 /* COMPONENT */) {
9962
+ if (cloned.shapeFlag & 6 /* ShapeFlags.COMPONENT */) {
9929
9963
  currentBlock[currentBlock.indexOf(type)] = cloned;
9930
9964
  }
9931
9965
  else {
9932
9966
  currentBlock.push(cloned);
9933
9967
  }
9934
9968
  }
9935
- cloned.patchFlag |= -2 /* BAIL */;
9969
+ cloned.patchFlag |= -2 /* PatchFlags.BAIL */;
9936
9970
  return cloned;
9937
9971
  }
9938
9972
  // class component normalization.
@@ -9962,17 +9996,17 @@ var Vue = (function () {
9962
9996
  }
9963
9997
  // encode the vnode type information into a bitmap
9964
9998
  const shapeFlag = isString(type)
9965
- ? 1 /* ELEMENT */
9999
+ ? 1 /* ShapeFlags.ELEMENT */
9966
10000
  : isSuspense(type)
9967
- ? 128 /* SUSPENSE */
10001
+ ? 128 /* ShapeFlags.SUSPENSE */
9968
10002
  : isTeleport(type)
9969
- ? 64 /* TELEPORT */
10003
+ ? 64 /* ShapeFlags.TELEPORT */
9970
10004
  : isObject(type)
9971
- ? 4 /* STATEFUL_COMPONENT */
10005
+ ? 4 /* ShapeFlags.STATEFUL_COMPONENT */
9972
10006
  : isFunction(type)
9973
- ? 2 /* FUNCTIONAL_COMPONENT */
10007
+ ? 2 /* ShapeFlags.FUNCTIONAL_COMPONENT */
9974
10008
  : 0;
9975
- if (shapeFlag & 4 /* STATEFUL_COMPONENT */ && isProxy(type)) {
10009
+ if (shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */ && isProxy(type)) {
9976
10010
  type = toRaw(type);
9977
10011
  warn$1(`Vue received a Component which was made a reactive object. This can ` +
9978
10012
  `lead to unnecessary performance overhead, and should be avoided by ` +
@@ -10011,7 +10045,7 @@ var Vue = (function () {
10011
10045
  : ref,
10012
10046
  scopeId: vnode.scopeId,
10013
10047
  slotScopeIds: vnode.slotScopeIds,
10014
- children: patchFlag === -1 /* HOISTED */ && isArray(children)
10048
+ children: patchFlag === -1 /* PatchFlags.HOISTED */ && isArray(children)
10015
10049
  ? children.map(deepCloneVNode)
10016
10050
  : children,
10017
10051
  target: vnode.target,
@@ -10024,8 +10058,8 @@ var Vue = (function () {
10024
10058
  // fast paths only.
10025
10059
  patchFlag: extraProps && vnode.type !== Fragment
10026
10060
  ? patchFlag === -1 // hoisted node
10027
- ? 16 /* FULL_PROPS */
10028
- : patchFlag | 16 /* FULL_PROPS */
10061
+ ? 16 /* PatchFlags.FULL_PROPS */
10062
+ : patchFlag | 16 /* PatchFlags.FULL_PROPS */
10029
10063
  : patchFlag,
10030
10064
  dynamicProps: vnode.dynamicProps,
10031
10065
  dynamicChildren: vnode.dynamicChildren,
@@ -10118,10 +10152,10 @@ var Vue = (function () {
10118
10152
  children = null;
10119
10153
  }
10120
10154
  else if (isArray(children)) {
10121
- type = 16 /* ARRAY_CHILDREN */;
10155
+ type = 16 /* ShapeFlags.ARRAY_CHILDREN */;
10122
10156
  }
10123
10157
  else if (typeof children === 'object') {
10124
- if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
10158
+ if (shapeFlag & (1 /* ShapeFlags.ELEMENT */ | 64 /* ShapeFlags.TELEPORT */)) {
10125
10159
  // Normalize slot to plain children for plain element and Teleport
10126
10160
  const slot = children.default;
10127
10161
  if (slot) {
@@ -10133,37 +10167,37 @@ var Vue = (function () {
10133
10167
  return;
10134
10168
  }
10135
10169
  else {
10136
- type = 32 /* SLOTS_CHILDREN */;
10170
+ type = 32 /* ShapeFlags.SLOTS_CHILDREN */;
10137
10171
  const slotFlag = children._;
10138
10172
  if (!slotFlag && !(InternalObjectKey in children)) {
10139
10173
  children._ctx = currentRenderingInstance;
10140
10174
  }
10141
- else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) {
10175
+ else if (slotFlag === 3 /* SlotFlags.FORWARDED */ && currentRenderingInstance) {
10142
10176
  // a child component receives forwarded slots from the parent.
10143
10177
  // its slot type is determined by its parent's slot type.
10144
- if (currentRenderingInstance.slots._ === 1 /* STABLE */) {
10145
- children._ = 1 /* STABLE */;
10178
+ if (currentRenderingInstance.slots._ === 1 /* SlotFlags.STABLE */) {
10179
+ children._ = 1 /* SlotFlags.STABLE */;
10146
10180
  }
10147
10181
  else {
10148
- children._ = 2 /* DYNAMIC */;
10149
- vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */;
10182
+ children._ = 2 /* SlotFlags.DYNAMIC */;
10183
+ vnode.patchFlag |= 1024 /* PatchFlags.DYNAMIC_SLOTS */;
10150
10184
  }
10151
10185
  }
10152
10186
  }
10153
10187
  }
10154
10188
  else if (isFunction(children)) {
10155
10189
  children = { default: children, _ctx: currentRenderingInstance };
10156
- type = 32 /* SLOTS_CHILDREN */;
10190
+ type = 32 /* ShapeFlags.SLOTS_CHILDREN */;
10157
10191
  }
10158
10192
  else {
10159
10193
  children = String(children);
10160
10194
  // force teleport children to array so it can be moved around
10161
- if (shapeFlag & 64 /* TELEPORT */) {
10162
- type = 16 /* ARRAY_CHILDREN */;
10195
+ if (shapeFlag & 64 /* ShapeFlags.TELEPORT */) {
10196
+ type = 16 /* ShapeFlags.ARRAY_CHILDREN */;
10163
10197
  children = [createTextVNode(children)];
10164
10198
  }
10165
10199
  else {
10166
- type = 8 /* TEXT_CHILDREN */;
10200
+ type = 8 /* ShapeFlags.TEXT_CHILDREN */;
10167
10201
  }
10168
10202
  }
10169
10203
  vnode.children = children;
@@ -10201,7 +10235,7 @@ var Vue = (function () {
10201
10235
  return ret;
10202
10236
  }
10203
10237
  function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
10204
- callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
10238
+ callWithAsyncErrorHandling(hook, instance, 7 /* ErrorCodes.VNODE_HOOK */, [
10205
10239
  vnode,
10206
10240
  prevVNode
10207
10241
  ]);
@@ -10309,7 +10343,7 @@ var Vue = (function () {
10309
10343
  }
10310
10344
  }
10311
10345
  function isStatefulComponent(instance) {
10312
- return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */;
10346
+ return instance.vnode.shapeFlag & 4 /* ShapeFlags.STATEFUL_COMPONENT */;
10313
10347
  }
10314
10348
  let isInSSRComponentSetup = false;
10315
10349
  function setupComponent(instance, isSSR = false) {
@@ -10364,7 +10398,7 @@ var Vue = (function () {
10364
10398
  setup.length > 1 ? createSetupContext(instance) : null);
10365
10399
  setCurrentInstance(instance);
10366
10400
  pauseTracking();
10367
- const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]);
10401
+ const setupResult = callWithErrorHandling(setup, instance, 0 /* ErrorCodes.SETUP_FUNCTION */, [shallowReadonly(instance.props) , setupContext]);
10368
10402
  resetTracking();
10369
10403
  unsetCurrentInstance();
10370
10404
  if (isPromise(setupResult)) {
@@ -10376,7 +10410,7 @@ var Vue = (function () {
10376
10410
  handleSetupResult(instance, resolvedResult, isSSR);
10377
10411
  })
10378
10412
  .catch(e => {
10379
- handleError(e, instance, 0 /* SETUP_FUNCTION */);
10413
+ handleError(e, instance, 0 /* ErrorCodes.SETUP_FUNCTION */);
10380
10414
  });
10381
10415
  }
10382
10416
  else {
@@ -10474,6 +10508,7 @@ var Vue = (function () {
10474
10508
  // pass runtime compat config into the compiler
10475
10509
  finalCompilerOptions.compatConfig = Object.create(globalCompatConfig);
10476
10510
  if (Component.compatConfig) {
10511
+ // @ts-expect-error types are not compatible
10477
10512
  extend(finalCompilerOptions.compatConfig, Component.compatConfig);
10478
10513
  }
10479
10514
  }
@@ -10518,7 +10553,7 @@ var Vue = (function () {
10518
10553
  return new Proxy(instance.attrs, {
10519
10554
  get(target, key) {
10520
10555
  markAttrsAccessed();
10521
- track(instance, "get" /* GET */, '$attrs');
10556
+ track(instance, "get" /* TrackOpTypes.GET */, '$attrs');
10522
10557
  return target[key];
10523
10558
  },
10524
10559
  set() {
@@ -10574,10 +10609,10 @@ var Vue = (function () {
10574
10609
  }
10575
10610
  const classifyRE = /(?:^|[-_])(\w)/g;
10576
10611
  const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
10577
- function getComponentName(Component) {
10612
+ function getComponentName(Component, includeInferred = true) {
10578
10613
  return isFunction(Component)
10579
10614
  ? Component.displayName || Component.name
10580
- : Component.name;
10615
+ : Component.name || (includeInferred && Component.__name);
10581
10616
  }
10582
10617
  /* istanbul ignore next */
10583
10618
  function formatComponentName(instance, Component, isRoot = false) {
@@ -11016,9 +11051,9 @@ var Vue = (function () {
11016
11051
  }
11017
11052
 
11018
11053
  // Core API ------------------------------------------------------------------
11019
- const version = "3.2.35";
11054
+ const version = "3.2.38";
11020
11055
  /**
11021
- * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
11056
+ * SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
11022
11057
  * @internal
11023
11058
  */
11024
11059
  const ssrUtils = (null);
@@ -11266,14 +11301,14 @@ var Vue = (function () {
11266
11301
  ? 'true'
11267
11302
  : null;
11268
11303
  if (v2CocercedValue &&
11269
- compatUtils.softAssertCompatEnabled("ATTR_ENUMERATED_COERCION" /* ATTR_ENUMERATED_COERCION */, instance, key, value, v2CocercedValue)) {
11304
+ compatUtils.softAssertCompatEnabled("ATTR_ENUMERATED_COERCION" /* DeprecationTypes.ATTR_ENUMERATED_COERCION */, instance, key, value, v2CocercedValue)) {
11270
11305
  el.setAttribute(key, v2CocercedValue);
11271
11306
  return true;
11272
11307
  }
11273
11308
  }
11274
11309
  else if (value === false &&
11275
11310
  !isSpecialBooleanAttr(key) &&
11276
- compatUtils.softAssertCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, instance, key)) {
11311
+ compatUtils.softAssertCompatEnabled("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, instance, key)) {
11277
11312
  el.removeAttribute(key);
11278
11313
  return true;
11279
11314
  }
@@ -11335,10 +11370,10 @@ var Vue = (function () {
11335
11370
  }
11336
11371
  else {
11337
11372
  if (value === false &&
11338
- compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent)) {
11373
+ compatUtils.isCompatEnabled("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, parentComponent)) {
11339
11374
  const type = typeof el[key];
11340
11375
  if (type === 'string' || type === 'number') {
11341
- compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* ATTR_FALSE_VALUE */, parentComponent, key);
11376
+ compatUtils.warnDeprecation("ATTR_FALSE_VALUE" /* DeprecationTypes.ATTR_FALSE_VALUE */, parentComponent, key);
11342
11377
  value = type === 'number' ? 0 : '';
11343
11378
  needRemove = true;
11344
11379
  }
@@ -11372,7 +11407,7 @@ var Vue = (function () {
11372
11407
  // if the low-res timestamp which is bigger than the event timestamp
11373
11408
  // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
11374
11409
  // and we need to use the hi-res version for event listeners as well.
11375
- _getNow = () => performance.now();
11410
+ _getNow = performance.now.bind(performance);
11376
11411
  }
11377
11412
  // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
11378
11413
  // and does not fire microtasks in between event propagation, so safe to exclude.
@@ -11428,7 +11463,8 @@ var Vue = (function () {
11428
11463
  options[m[0].toLowerCase()] = true;
11429
11464
  }
11430
11465
  }
11431
- return [hyphenate(name.slice(2)), options];
11466
+ const event = name[2] === ':' ? name.slice(3) : hyphenate(name.slice(2));
11467
+ return [event, options];
11432
11468
  }
11433
11469
  function createInvoker(initialValue, instance) {
11434
11470
  const invoker = (e) => {
@@ -11440,7 +11476,7 @@ var Vue = (function () {
11440
11476
  // AFTER it was attached.
11441
11477
  const timeStamp = e.timeStamp || _getNow();
11442
11478
  if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {
11443
- callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]);
11479
+ callWithAsyncErrorHandling(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* ErrorCodes.NATIVE_EVENT_HANDLER */, [e]);
11444
11480
  }
11445
11481
  };
11446
11482
  invoker.value = initialValue;
@@ -11783,7 +11819,7 @@ var Vue = (function () {
11783
11819
  });
11784
11820
  }
11785
11821
  function setVarsOnVNode(vnode, vars) {
11786
- if (vnode.shapeFlag & 128 /* SUSPENSE */) {
11822
+ if (vnode.shapeFlag & 128 /* ShapeFlags.SUSPENSE */) {
11787
11823
  const suspense = vnode.suspense;
11788
11824
  vnode = suspense.activeBranch;
11789
11825
  if (suspense.pendingBranch && !suspense.isHydrating) {
@@ -11796,7 +11832,7 @@ var Vue = (function () {
11796
11832
  while (vnode.component) {
11797
11833
  vnode = vnode.component.subTree;
11798
11834
  }
11799
- if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
11835
+ if (vnode.shapeFlag & 1 /* ShapeFlags.ELEMENT */ && vnode.el) {
11800
11836
  setVarsOnNode(vnode.el, vars);
11801
11837
  }
11802
11838
  else if (vnode.type === Fragment) {
@@ -11885,7 +11921,7 @@ var Vue = (function () {
11885
11921
  }
11886
11922
  const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps;
11887
11923
  // legacy transition class compat
11888
- const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES" /* TRANSITION_CLASSES */, null);
11924
+ const legacyClassEnabled = compatUtils.isCompatEnabled("TRANSITION_CLASSES" /* DeprecationTypes.TRANSITION_CLASSES */, null);
11889
11925
  let legacyEnterFromClass;
11890
11926
  let legacyAppearFromClass;
11891
11927
  let legacyLeaveFromClass;
@@ -11910,9 +11946,8 @@ var Vue = (function () {
11910
11946
  removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
11911
11947
  done && done();
11912
11948
  };
11913
- let isLeaving = false;
11914
11949
  const finishLeave = (el, done) => {
11915
- isLeaving = false;
11950
+ el._isLeaving = false;
11916
11951
  removeTransitionClass(el, leaveFromClass);
11917
11952
  removeTransitionClass(el, leaveToClass);
11918
11953
  removeTransitionClass(el, leaveActiveClass);
@@ -11955,7 +11990,7 @@ var Vue = (function () {
11955
11990
  onEnter: makeEnterHook(false),
11956
11991
  onAppear: makeEnterHook(true),
11957
11992
  onLeave(el, done) {
11958
- isLeaving = true;
11993
+ el._isLeaving = true;
11959
11994
  const resolve = () => finishLeave(el, done);
11960
11995
  addTransitionClass(el, leaveFromClass);
11961
11996
  if (legacyClassEnabled) {
@@ -11965,7 +12000,7 @@ var Vue = (function () {
11965
12000
  forceReflow();
11966
12001
  addTransitionClass(el, leaveActiveClass);
11967
12002
  nextFrame(() => {
11968
- if (!isLeaving) {
12003
+ if (!el._isLeaving) {
11969
12004
  // cancelled
11970
12005
  return;
11971
12006
  }
@@ -12195,7 +12230,7 @@ var Vue = (function () {
12195
12230
  const cssTransitionProps = resolveTransitionProps(rawProps);
12196
12231
  let tag = rawProps.tag || Fragment;
12197
12232
  if (!rawProps.tag &&
12198
- compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT" /* TRANSITION_GROUP_ROOT */, instance.parent)) {
12233
+ compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT" /* DeprecationTypes.TRANSITION_GROUP_ROOT */, instance.parent)) {
12199
12234
  tag = 'span';
12200
12235
  }
12201
12236
  prevChildren = children;
@@ -12565,13 +12600,13 @@ var Vue = (function () {
12565
12600
  let instance = null;
12566
12601
  {
12567
12602
  instance = getCurrentInstance();
12568
- if (compatUtils.isCompatEnabled("CONFIG_KEY_CODES" /* CONFIG_KEY_CODES */, instance)) {
12603
+ if (compatUtils.isCompatEnabled("CONFIG_KEY_CODES" /* DeprecationTypes.CONFIG_KEY_CODES */, instance)) {
12569
12604
  if (instance) {
12570
12605
  globalKeyCodes = instance.appContext.config.keyCodes;
12571
12606
  }
12572
12607
  }
12573
12608
  if (modifiers.some(m => /^\d+$/.test(m))) {
12574
- compatUtils.warnDeprecation("V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */, instance);
12609
+ compatUtils.warnDeprecation("V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */, instance);
12575
12610
  }
12576
12611
  }
12577
12612
  return (event) => {
@@ -12584,7 +12619,7 @@ var Vue = (function () {
12584
12619
  }
12585
12620
  {
12586
12621
  const keyCode = String(event.keyCode);
12587
- if (compatUtils.isCompatEnabled("V_ON_KEYCODE_MODIFIER" /* V_ON_KEYCODE_MODIFIER */, instance) &&
12622
+ if (compatUtils.isCompatEnabled("V_ON_KEYCODE_MODIFIER" /* DeprecationTypes.V_ON_KEYCODE_MODIFIER */, instance) &&
12588
12623
  modifiers.some(mod => mod == keyCode)) {
12589
12624
  return fn(event);
12590
12625
  }
@@ -12693,7 +12728,7 @@ var Vue = (function () {
12693
12728
  for (let i = 0; i < container.attributes.length; i++) {
12694
12729
  const attr = container.attributes[i];
12695
12730
  if (attr.name !== 'v-cloak' && /^(v-|:|@)/.test(attr.name)) {
12696
- compatUtils.warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* GLOBAL_MOUNT_CONTAINER */, null);
12731
+ compatUtils.warnDeprecation("GLOBAL_MOUNT_CONTAINER" /* DeprecationTypes.GLOBAL_MOUNT_CONTAINER */, null);
12697
12732
  break;
12698
12733
  }
12699
12734
  }
@@ -12950,7 +12985,7 @@ var Vue = (function () {
12950
12985
  function wrappedCreateApp(...args) {
12951
12986
  // @ts-ignore
12952
12987
  const app = createApp(...args);
12953
- if (compatUtils.isCompatEnabled("RENDER_FUNCTION" /* RENDER_FUNCTION */, null)) {
12988
+ if (compatUtils.isCompatEnabled("RENDER_FUNCTION" /* DeprecationTypes.RENDER_FUNCTION */, null)) {
12954
12989
  // register built-in components so that they can be resolved via strings
12955
12990
  // in the legacy h() call. The __compat__ prefix is to ensure that v3 h()
12956
12991
  // doesn't get affected.