@vue/compat 3.5.43 → 3.5.45
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.
- package/README.md +2 -2
- package/dist/vue.cjs.js +581 -232
- package/dist/vue.cjs.prod.js +589 -216
- package/dist/vue.esm-browser.js +570 -222
- package/dist/vue.esm-browser.prod.js +10 -10
- package/dist/vue.esm-bundler.js +572 -224
- package/dist/vue.global.js +570 -222
- package/dist/vue.global.prod.js +10 -10
- package/dist/vue.runtime.esm-browser.js +558 -217
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +560 -219
- package/dist/vue.runtime.global.js +558 -217
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +4 -4
package/dist/vue.esm-bundler.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.45
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -61,24 +61,20 @@ const cacheStringFunction = (fn) => {
|
|
|
61
61
|
});
|
|
62
62
|
};
|
|
63
63
|
const camelizeRE = /-\w/g;
|
|
64
|
-
const camelize = cacheStringFunction(
|
|
65
|
-
(
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
);
|
|
64
|
+
const camelize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
65
|
+
return str.replace(camelizeRE, (c) => c.slice(1).toUpperCase());
|
|
66
|
+
});
|
|
69
67
|
const hyphenateRE = /\B([A-Z])/g;
|
|
70
|
-
const hyphenate = cacheStringFunction(
|
|
68
|
+
const hyphenate = /* @__PURE__ */ cacheStringFunction(
|
|
71
69
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
72
70
|
);
|
|
73
|
-
const capitalize = cacheStringFunction((str) => {
|
|
71
|
+
const capitalize = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
74
72
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
75
73
|
});
|
|
76
|
-
const toHandlerKey = cacheStringFunction(
|
|
77
|
-
(str)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
);
|
|
74
|
+
const toHandlerKey = /* @__PURE__ */ cacheStringFunction((str) => {
|
|
75
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
76
|
+
return s;
|
|
77
|
+
});
|
|
82
78
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
83
79
|
const invokeArrayFns = (fns, ...arg) => {
|
|
84
80
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -264,7 +260,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
264
260
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
265
261
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
266
262
|
|
|
267
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
263
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,disablepictureinpicture,disableremoteplayback,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
268
264
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
269
265
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
270
266
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -608,7 +604,11 @@ function getCurrentScope() {
|
|
|
608
604
|
}
|
|
609
605
|
function onScopeDispose(fn, failSilently = false) {
|
|
610
606
|
if (activeEffectScope) {
|
|
611
|
-
activeEffectScope.
|
|
607
|
+
if (activeEffectScope.active) {
|
|
608
|
+
activeEffectScope.cleanups.push(fn);
|
|
609
|
+
} else {
|
|
610
|
+
fn();
|
|
611
|
+
}
|
|
612
612
|
} else if (!!(process.env.NODE_ENV !== "production") && !failSilently) {
|
|
613
613
|
warn$2(
|
|
614
614
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
@@ -1316,19 +1316,41 @@ const arrayInstrumentations = {
|
|
|
1316
1316
|
};
|
|
1317
1317
|
function iterator(self, method, wrapValue) {
|
|
1318
1318
|
const arr = shallowReadArray(self);
|
|
1319
|
-
const
|
|
1319
|
+
const methodFn = arr[method];
|
|
1320
|
+
const iter = methodFn.call(arr);
|
|
1320
1321
|
if (arr !== self && !isShallow(self)) {
|
|
1321
|
-
iter.
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
if (
|
|
1325
|
-
|
|
1322
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1323
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1324
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1325
|
+
if (methodFn !== arrayProto[method]) {
|
|
1326
|
+
Object.defineProperties(wrapped, {
|
|
1327
|
+
return: {
|
|
1328
|
+
get() {
|
|
1329
|
+
const fn = iter.return;
|
|
1330
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1331
|
+
}
|
|
1332
|
+
},
|
|
1333
|
+
throw: {
|
|
1334
|
+
get() {
|
|
1335
|
+
const fn = iter.throw;
|
|
1336
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1337
|
+
}
|
|
1338
|
+
}
|
|
1339
|
+
});
|
|
1326
1340
|
}
|
|
1327
|
-
return
|
|
1328
|
-
}
|
|
1341
|
+
return wrapped;
|
|
1342
|
+
}
|
|
1343
|
+
iter._next = iter.next;
|
|
1344
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1329
1345
|
}
|
|
1330
1346
|
return iter;
|
|
1331
1347
|
}
|
|
1348
|
+
function wrapResult(result, wrapValue) {
|
|
1349
|
+
if (!result.done) {
|
|
1350
|
+
result.value = wrapValue(result.value);
|
|
1351
|
+
}
|
|
1352
|
+
return result;
|
|
1353
|
+
}
|
|
1332
1354
|
const arrayProto = Array.prototype;
|
|
1333
1355
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1334
1356
|
const arr = shallowReadArray(self);
|
|
@@ -1397,7 +1419,7 @@ function noTracking(self, method, args = []) {
|
|
|
1397
1419
|
}
|
|
1398
1420
|
|
|
1399
1421
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1400
|
-
const builtInSymbols = new Set(
|
|
1422
|
+
const builtInSymbols = /* @__PURE__ */ new Set(
|
|
1401
1423
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
1402
1424
|
);
|
|
1403
1425
|
function hasOwnProperty(key) {
|
|
@@ -1751,6 +1773,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1751
1773
|
return !isReadonly2;
|
|
1752
1774
|
} else if (key === "__v_isReadonly") {
|
|
1753
1775
|
return isReadonly2;
|
|
1776
|
+
} else if (key === "__v_isShallow") {
|
|
1777
|
+
return shallow;
|
|
1754
1778
|
} else if (key === "__v_raw") {
|
|
1755
1779
|
return target;
|
|
1756
1780
|
}
|
|
@@ -2302,9 +2326,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2302
2326
|
if (once && cb) {
|
|
2303
2327
|
const _cb = cb;
|
|
2304
2328
|
cb = (...args) => {
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2329
|
+
try {
|
|
2330
|
+
return _cb(...args);
|
|
2331
|
+
} finally {
|
|
2332
|
+
watchHandle();
|
|
2333
|
+
}
|
|
2308
2334
|
};
|
|
2309
2335
|
}
|
|
2310
2336
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2315,12 +2341,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2315
2341
|
if (cb) {
|
|
2316
2342
|
const newValue = effect.run();
|
|
2317
2343
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2318
|
-
if (cleanup) {
|
|
2319
|
-
cleanup();
|
|
2320
|
-
}
|
|
2321
2344
|
const currentWatcher = activeWatcher;
|
|
2322
|
-
|
|
2345
|
+
pauseTracking();
|
|
2323
2346
|
try {
|
|
2347
|
+
if (cleanup) {
|
|
2348
|
+
cleanup();
|
|
2349
|
+
}
|
|
2350
|
+
activeWatcher = effect;
|
|
2324
2351
|
const args = [
|
|
2325
2352
|
newValue,
|
|
2326
2353
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2334,6 +2361,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2334
2361
|
);
|
|
2335
2362
|
} finally {
|
|
2336
2363
|
activeWatcher = currentWatcher;
|
|
2364
|
+
resetTracking();
|
|
2337
2365
|
}
|
|
2338
2366
|
}
|
|
2339
2367
|
} else {
|
|
@@ -2608,7 +2636,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2608
2636
|
const res = callWithErrorHandling(fn, instance, type, args);
|
|
2609
2637
|
if (res && isPromise(res)) {
|
|
2610
2638
|
res.catch((err) => {
|
|
2611
|
-
handleError(err, instance, type);
|
|
2639
|
+
handleError(err, instance, type, void 0, true);
|
|
2612
2640
|
});
|
|
2613
2641
|
}
|
|
2614
2642
|
return res;
|
|
@@ -2625,7 +2653,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
2625
2653
|
);
|
|
2626
2654
|
}
|
|
2627
2655
|
}
|
|
2628
|
-
function handleError(err, instance, type, throwInDev = true) {
|
|
2656
|
+
function handleError(err, instance, type, throwInDev = true, isAsyncError = false) {
|
|
2629
2657
|
const contextVNode = instance ? instance.vnode : null;
|
|
2630
2658
|
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
2631
2659
|
if (instance) {
|
|
@@ -2634,7 +2662,9 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
2634
2662
|
const errorInfo = !!(process.env.NODE_ENV !== "production") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;
|
|
2635
2663
|
while (cur) {
|
|
2636
2664
|
const errorCapturedHooks = cur.ec;
|
|
2637
|
-
if (errorCapturedHooks
|
|
2665
|
+
if (errorCapturedHooks && !cur.isUnmounted && // Async failures may outlive stopped scopes whose unmount effects
|
|
2666
|
+
// are deferred or discarded by Suspense.
|
|
2667
|
+
(!isAsyncError || cur.scope.active)) {
|
|
2638
2668
|
for (let i = 0; i < errorCapturedHooks.length; i++) {
|
|
2639
2669
|
if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
|
|
2640
2670
|
return;
|
|
@@ -2739,21 +2769,21 @@ function queuePostFlushCb(cb) {
|
|
|
2739
2769
|
}
|
|
2740
2770
|
queueFlush();
|
|
2741
2771
|
}
|
|
2742
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2772
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2743
2773
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2744
2774
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2745
2775
|
}
|
|
2746
2776
|
for (; i < queue.length; i++) {
|
|
2747
2777
|
const cb = queue[i];
|
|
2748
2778
|
if (cb && cb.flags & 2) {
|
|
2749
|
-
if (instance && cb.id !== instance.uid) {
|
|
2779
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2750
2780
|
continue;
|
|
2751
2781
|
}
|
|
2752
2782
|
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
|
|
2753
2783
|
continue;
|
|
2754
2784
|
}
|
|
2755
2785
|
queue.splice(i, 1);
|
|
2756
|
-
i
|
|
2786
|
+
i = instance ? i - 1 : flushIndex;
|
|
2757
2787
|
if (cb.flags & 4) {
|
|
2758
2788
|
cb.flags &= -2;
|
|
2759
2789
|
}
|
|
@@ -2764,12 +2794,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2764
2794
|
}
|
|
2765
2795
|
}
|
|
2766
2796
|
}
|
|
2767
|
-
function flushPostFlushCbs(seen) {
|
|
2797
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2768
2798
|
if (pendingPostFlushCbs.length) {
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
)
|
|
2772
|
-
|
|
2799
|
+
let cbs = pendingPostFlushCbs;
|
|
2800
|
+
let kept = 0;
|
|
2801
|
+
if (skip) {
|
|
2802
|
+
cbs = [];
|
|
2803
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2804
|
+
const cb = pendingPostFlushCbs[i];
|
|
2805
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2806
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2807
|
+
} else {
|
|
2808
|
+
cbs.push(cb);
|
|
2809
|
+
}
|
|
2810
|
+
}
|
|
2811
|
+
}
|
|
2812
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2813
|
+
pendingPostFlushCbs.length = kept;
|
|
2773
2814
|
if (activePostFlushCbs) {
|
|
2774
2815
|
for (let i = 0; i < deduped.length; i++) {
|
|
2775
2816
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2795,6 +2836,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2795
2836
|
postFlushIndex = 0;
|
|
2796
2837
|
}
|
|
2797
2838
|
}
|
|
2839
|
+
let isFlushing = false;
|
|
2840
|
+
function flushOnAppMount(fn, minUid) {
|
|
2841
|
+
if (isFlushing) {
|
|
2842
|
+
fn();
|
|
2843
|
+
return;
|
|
2844
|
+
}
|
|
2845
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2846
|
+
fn();
|
|
2847
|
+
isFlushing = true;
|
|
2848
|
+
try {
|
|
2849
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2850
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2851
|
+
} finally {
|
|
2852
|
+
isFlushing = false;
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2798
2855
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2799
2856
|
function flushJobs(seen) {
|
|
2800
2857
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -2939,14 +2996,32 @@ function reload(id, newComp) {
|
|
|
2939
2996
|
instance.ceReload(newComp.styles);
|
|
2940
2997
|
dirtyInstances.delete(instance);
|
|
2941
2998
|
} else if (instance.parent) {
|
|
2942
|
-
|
|
2943
|
-
if (!
|
|
2944
|
-
|
|
2999
|
+
const update = () => {
|
|
3000
|
+
if (!instance.scope.active) return;
|
|
3001
|
+
const pending = instance.asyncDep && !instance.asyncResolved ? instance : locateUnresolvedAsyncRoot(instance.parent);
|
|
3002
|
+
if (pending) {
|
|
3003
|
+
pending.asyncDep.catch(NOOP).then(() => {
|
|
3004
|
+
if (instance.scope.active && (pending.asyncResolved || !pending.scope.active)) {
|
|
3005
|
+
queueJob(update);
|
|
3006
|
+
}
|
|
3007
|
+
});
|
|
3008
|
+
return;
|
|
3009
|
+
}
|
|
3010
|
+
dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
3011
|
+
if (!dirtyInstances) {
|
|
3012
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
3013
|
+
}
|
|
3014
|
+
dirtyInstances.add(instance);
|
|
3015
|
+
isHmrUpdating = true;
|
|
3016
|
+
try {
|
|
2945
3017
|
instance.parent.update();
|
|
3018
|
+
} finally {
|
|
2946
3019
|
isHmrUpdating = false;
|
|
2947
3020
|
dirtyInstances.delete(instance);
|
|
3021
|
+
queuePostFlushCb(() => hmrDirtyComponents.clear());
|
|
2948
3022
|
}
|
|
2949
|
-
}
|
|
3023
|
+
};
|
|
3024
|
+
queueJob(update);
|
|
2950
3025
|
} else if (instance.appContext.reload) {
|
|
2951
3026
|
instance.appContext.reload();
|
|
2952
3027
|
} else if (typeof window !== "undefined") {
|
|
@@ -3631,12 +3706,31 @@ function withDirectives(vnode, directives) {
|
|
|
3631
3706
|
return vnode;
|
|
3632
3707
|
}
|
|
3633
3708
|
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
3634
|
-
|
|
3709
|
+
let hookVNode = vnode;
|
|
3710
|
+
if (name === "beforeMount") {
|
|
3711
|
+
vnode._mount = vnode;
|
|
3712
|
+
} else if (name === "beforeUpdate") {
|
|
3713
|
+
const mount = prevVNode && prevVNode._mount;
|
|
3714
|
+
if (mount) {
|
|
3715
|
+
mount._latest = vnode;
|
|
3716
|
+
vnode._mount = mount;
|
|
3717
|
+
}
|
|
3718
|
+
} else if (name === "mounted") {
|
|
3719
|
+
const latest = vnode._latest;
|
|
3720
|
+
vnode._mount = vnode._latest = void 0;
|
|
3721
|
+
if (latest) {
|
|
3722
|
+
hookVNode = latest;
|
|
3723
|
+
latest._mount = void 0;
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3726
|
+
const bindings = hookVNode.dirs;
|
|
3635
3727
|
const oldBindings = prevVNode && prevVNode.dirs;
|
|
3636
3728
|
for (let i = 0; i < bindings.length; i++) {
|
|
3637
|
-
|
|
3729
|
+
let binding = bindings[i];
|
|
3638
3730
|
if (oldBindings) {
|
|
3639
3731
|
binding.oldValue = oldBindings[i].value;
|
|
3732
|
+
} else if (name === "mounted" && binding.oldValue !== void 0) {
|
|
3733
|
+
binding = extend({}, binding, { oldValue: void 0 });
|
|
3640
3734
|
}
|
|
3641
3735
|
let hook = binding.dir[name];
|
|
3642
3736
|
if (!hook) {
|
|
@@ -3647,7 +3741,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
3647
3741
|
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
3648
3742
|
vnode.el,
|
|
3649
3743
|
binding,
|
|
3650
|
-
|
|
3744
|
+
hookVNode,
|
|
3651
3745
|
prevVNode
|
|
3652
3746
|
]);
|
|
3653
3747
|
resetTracking();
|
|
@@ -3768,6 +3862,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
3768
3862
|
let isPre = false;
|
|
3769
3863
|
if (flush === "post") {
|
|
3770
3864
|
baseWatchOptions.scheduler = (job) => {
|
|
3865
|
+
job.i = instance;
|
|
3771
3866
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3772
3867
|
};
|
|
3773
3868
|
} else if (flush !== "sync") {
|
|
@@ -4069,7 +4164,11 @@ const TeleportImpl = {
|
|
|
4069
4164
|
};
|
|
4070
4165
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
4071
4166
|
if (moveType === 0) {
|
|
4167
|
+
if (vnode.targetStart) {
|
|
4168
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
4169
|
+
}
|
|
4072
4170
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
4171
|
+
parentAnchor = vnode.targetAnchor;
|
|
4073
4172
|
}
|
|
4074
4173
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
4075
4174
|
const isReorder = moveType === 2;
|
|
@@ -4238,10 +4337,6 @@ const BaseTransitionPropsValidators = {
|
|
|
4238
4337
|
onAfterAppear: TransitionHookValidator,
|
|
4239
4338
|
onAppearCancelled: TransitionHookValidator
|
|
4240
4339
|
};
|
|
4241
|
-
const recursiveGetSubtree = (instance) => {
|
|
4242
|
-
const subTree = instance.subTree;
|
|
4243
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
4244
|
-
};
|
|
4245
4340
|
const BaseTransitionImpl = {
|
|
4246
4341
|
name: `BaseTransition`,
|
|
4247
4342
|
props: BaseTransitionPropsValidators,
|
|
@@ -4270,19 +4365,17 @@ const BaseTransitionImpl = {
|
|
|
4270
4365
|
if (!innerChild) {
|
|
4271
4366
|
return emptyPlaceholder(child);
|
|
4272
4367
|
}
|
|
4273
|
-
|
|
4368
|
+
const enterHooks = resolveTransitionHooks(
|
|
4274
4369
|
innerChild,
|
|
4275
4370
|
rawProps,
|
|
4276
4371
|
state,
|
|
4277
|
-
instance
|
|
4278
|
-
// #11061, ensure enterHooks is fresh after clone
|
|
4279
|
-
(hooks) => enterHooks = hooks
|
|
4372
|
+
instance
|
|
4280
4373
|
);
|
|
4281
4374
|
if (innerChild.type !== Comment) {
|
|
4282
4375
|
setTransitionHooks(innerChild, enterHooks);
|
|
4283
4376
|
}
|
|
4284
4377
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
4285
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
4378
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
4286
4379
|
let leavingHooks = resolveTransitionHooks(
|
|
4287
4380
|
oldInnerChild,
|
|
4288
4381
|
rawProps,
|
|
@@ -4295,7 +4388,17 @@ const BaseTransitionImpl = {
|
|
|
4295
4388
|
leavingHooks.afterLeave = () => {
|
|
4296
4389
|
state.isLeaving = false;
|
|
4297
4390
|
if (!(instance.job.flags & 8)) {
|
|
4298
|
-
instance.
|
|
4391
|
+
if (instance.effect.flags & 2) {
|
|
4392
|
+
const job = () => {
|
|
4393
|
+
if (!(instance.job.flags & 8)) {
|
|
4394
|
+
instance.update();
|
|
4395
|
+
}
|
|
4396
|
+
};
|
|
4397
|
+
job.i = instance;
|
|
4398
|
+
queueJob(job);
|
|
4399
|
+
} else {
|
|
4400
|
+
instance.update();
|
|
4401
|
+
}
|
|
4299
4402
|
}
|
|
4300
4403
|
delete leavingHooks.afterLeave;
|
|
4301
4404
|
oldInnerChild = void 0;
|
|
@@ -4363,7 +4466,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
4363
4466
|
}
|
|
4364
4467
|
return leavingVNodesCache;
|
|
4365
4468
|
}
|
|
4366
|
-
function resolveTransitionHooks(vnode, props, state, instance
|
|
4469
|
+
function resolveTransitionHooks(vnode, props, state, instance) {
|
|
4367
4470
|
const {
|
|
4368
4471
|
appear,
|
|
4369
4472
|
mode,
|
|
@@ -4419,8 +4522,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4419
4522
|
);
|
|
4420
4523
|
}
|
|
4421
4524
|
const leavingVNode = leavingVNodesCache[key];
|
|
4422
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4423
|
-
leavingVNode.el[leaveCbKey]
|
|
4525
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4526
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4527
|
+
if (!leavingCb) {
|
|
4528
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4529
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4530
|
+
}
|
|
4531
|
+
if (leavingCb) {
|
|
4532
|
+
leavingCb();
|
|
4533
|
+
}
|
|
4424
4534
|
}
|
|
4425
4535
|
callHook(hook, [el]);
|
|
4426
4536
|
},
|
|
@@ -4495,15 +4605,21 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
4495
4605
|
}
|
|
4496
4606
|
},
|
|
4497
4607
|
clone(vnode2) {
|
|
4498
|
-
const
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4608
|
+
const cloned = resolveTransitionHooks(vnode2, props, state, instance);
|
|
4609
|
+
cloned.afterLeave = () => {
|
|
4610
|
+
if (hooks.afterLeave) hooks.afterLeave();
|
|
4611
|
+
};
|
|
4612
|
+
cloned.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
4613
|
+
if (hooks.delayLeave) {
|
|
4614
|
+
hooks.delayLeave(el, earlyRemove, delayedLeave);
|
|
4615
|
+
} else {
|
|
4616
|
+
delayedLeave();
|
|
4617
|
+
}
|
|
4618
|
+
};
|
|
4619
|
+
cloned.delayedLeave = () => {
|
|
4620
|
+
if (hooks.delayedLeave) hooks.delayedLeave();
|
|
4621
|
+
};
|
|
4622
|
+
return cloned;
|
|
4507
4623
|
}
|
|
4508
4624
|
};
|
|
4509
4625
|
return hooks;
|
|
@@ -4544,10 +4660,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4544
4660
|
hooks
|
|
4545
4661
|
);
|
|
4546
4662
|
} else if (vnode.shapeFlag & 128) {
|
|
4547
|
-
|
|
4548
|
-
|
|
4663
|
+
const suspense = vnode.suspense;
|
|
4664
|
+
if (suspense) {
|
|
4665
|
+
const branch = suspense.isHydrating ? suspense.pendingBranch : suspense.activeBranch;
|
|
4666
|
+
if (branch) {
|
|
4667
|
+
setTransitionHooks(branch, hooks.clone(branch));
|
|
4668
|
+
}
|
|
4669
|
+
} else {
|
|
4670
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4671
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4672
|
+
}
|
|
4549
4673
|
} else {
|
|
4550
4674
|
vnode.transition = hooks;
|
|
4675
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4676
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4677
|
+
if (child) {
|
|
4678
|
+
setTransitionHooks(child, hooks);
|
|
4679
|
+
}
|
|
4680
|
+
}
|
|
4551
4681
|
}
|
|
4552
4682
|
}
|
|
4553
4683
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4572,6 +4702,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4572
4702
|
}
|
|
4573
4703
|
return ret;
|
|
4574
4704
|
}
|
|
4705
|
+
function getTransitionRoot(vnode) {
|
|
4706
|
+
if (vnode.component) {
|
|
4707
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
4708
|
+
}
|
|
4709
|
+
if (vnode.type === Fragment) {
|
|
4710
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4711
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4712
|
+
}
|
|
4713
|
+
if (vnode.type !== Comment) {
|
|
4714
|
+
return vnode;
|
|
4715
|
+
}
|
|
4716
|
+
}
|
|
4575
4717
|
|
|
4576
4718
|
// @__NO_SIDE_EFFECTS__
|
|
4577
4719
|
function defineComponent(options, extraOptions) {
|
|
@@ -5240,7 +5382,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5240
5382
|
getContainerType(container),
|
|
5241
5383
|
slotScopeIds
|
|
5242
5384
|
);
|
|
5243
|
-
if (parentComponent) {
|
|
5385
|
+
if (parentComponent && parentComponent.vnode.el === node) {
|
|
5244
5386
|
parentComponent.vnode.el = vnode.el;
|
|
5245
5387
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
5246
5388
|
}
|
|
@@ -5489,14 +5631,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
5489
5631
|
break;
|
|
5490
5632
|
}
|
|
5491
5633
|
}, opts);
|
|
5492
|
-
|
|
5493
|
-
if (!(el instanceof Element)) return;
|
|
5634
|
+
const observe = (el) => {
|
|
5494
5635
|
if (elementIsVisibleInViewport(el)) {
|
|
5495
5636
|
hydrate();
|
|
5496
5637
|
ob.disconnect();
|
|
5497
5638
|
return false;
|
|
5498
5639
|
}
|
|
5640
|
+
if (getComputedStyle(el).display === "contents") {
|
|
5641
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
5642
|
+
if (observe(el.children[i]) === false) return false;
|
|
5643
|
+
}
|
|
5644
|
+
}
|
|
5499
5645
|
ob.observe(el);
|
|
5646
|
+
};
|
|
5647
|
+
forEach((el) => {
|
|
5648
|
+
if (!(el instanceof Element)) return;
|
|
5649
|
+
return observe(el);
|
|
5500
5650
|
});
|
|
5501
5651
|
return () => ob.disconnect();
|
|
5502
5652
|
};
|
|
@@ -5666,7 +5816,8 @@ function defineAsyncComponent(source) {
|
|
|
5666
5816
|
err,
|
|
5667
5817
|
instance,
|
|
5668
5818
|
13,
|
|
5669
|
-
!errorComponent
|
|
5819
|
+
!errorComponent,
|
|
5820
|
+
true
|
|
5670
5821
|
);
|
|
5671
5822
|
};
|
|
5672
5823
|
if (suspensible && instance.suspense || isInSSRComponentSetup) {
|
|
@@ -5684,7 +5835,7 @@ function defineAsyncComponent(source) {
|
|
|
5684
5835
|
const delayed = ref(!!delay);
|
|
5685
5836
|
let timeoutTimer;
|
|
5686
5837
|
let delayTimer;
|
|
5687
|
-
|
|
5838
|
+
onScopeDispose(() => {
|
|
5688
5839
|
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
5689
5840
|
if (delayTimer != null) clearTimeout(delayTimer);
|
|
5690
5841
|
});
|
|
@@ -5812,6 +5963,12 @@ const KeepAliveImpl = {
|
|
|
5812
5963
|
}
|
|
5813
5964
|
};
|
|
5814
5965
|
sharedContext.deactivate = (vnode) => {
|
|
5966
|
+
const cached = cache.get(
|
|
5967
|
+
vnode.key == null ? vnode.type : vnode.key
|
|
5968
|
+
);
|
|
5969
|
+
if (!cached || cached.component !== vnode.component) {
|
|
5970
|
+
return false;
|
|
5971
|
+
}
|
|
5815
5972
|
const instance2 = vnode.component;
|
|
5816
5973
|
invalidateMount(instance2.m);
|
|
5817
5974
|
invalidateMount(instance2.a);
|
|
@@ -5832,6 +5989,7 @@ const KeepAliveImpl = {
|
|
|
5832
5989
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
5833
5990
|
instance2.__keepAliveStorageContainer = storageContainer;
|
|
5834
5991
|
}
|
|
5992
|
+
return true;
|
|
5835
5993
|
};
|
|
5836
5994
|
function unmount(vnode) {
|
|
5837
5995
|
resetShapeFlag(vnode);
|
|
@@ -5853,6 +6011,7 @@ const KeepAliveImpl = {
|
|
|
5853
6011
|
unmount(cached);
|
|
5854
6012
|
} else if (current) {
|
|
5855
6013
|
resetShapeFlag(current);
|
|
6014
|
+
if (cached) resetShapeFlag(cached);
|
|
5856
6015
|
}
|
|
5857
6016
|
cache.delete(key);
|
|
5858
6017
|
keys.delete(key);
|
|
@@ -5870,12 +6029,17 @@ const KeepAliveImpl = {
|
|
|
5870
6029
|
const cacheSubtree = () => {
|
|
5871
6030
|
if (pendingCacheKey != null) {
|
|
5872
6031
|
if (isSuspense(instance.subTree.type)) {
|
|
5873
|
-
|
|
6032
|
+
const cacheInnerChild = () => {
|
|
5874
6033
|
const vnode = getInnerChild(instance.subTree);
|
|
5875
6034
|
if (vnode.component) {
|
|
5876
6035
|
cache.set(pendingCacheKey, vnode);
|
|
5877
6036
|
}
|
|
5878
|
-
}
|
|
6037
|
+
};
|
|
6038
|
+
if (instance.subTree.suspense.pendingBranch) {
|
|
6039
|
+
queuePostRenderEffect(cacheInnerChild, instance.subTree.suspense);
|
|
6040
|
+
} else {
|
|
6041
|
+
cacheInnerChild();
|
|
6042
|
+
}
|
|
5879
6043
|
} else {
|
|
5880
6044
|
cache.set(pendingCacheKey, getInnerChild(instance.subTree));
|
|
5881
6045
|
}
|
|
@@ -6010,9 +6174,12 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
|
6010
6174
|
true
|
|
6011
6175
|
/* prepend */
|
|
6012
6176
|
);
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6177
|
+
const removal = injectHook(
|
|
6178
|
+
"um",
|
|
6179
|
+
() => remove(keepAliveRoot[type], injected),
|
|
6180
|
+
target
|
|
6181
|
+
);
|
|
6182
|
+
removal.flags = 16;
|
|
6016
6183
|
}
|
|
6017
6184
|
function resetShapeFlag(vnode) {
|
|
6018
6185
|
vnode.shapeFlag &= -257;
|
|
@@ -6434,10 +6601,12 @@ function renderList(source, renderItem, cache, index) {
|
|
|
6434
6601
|
);
|
|
6435
6602
|
}
|
|
6436
6603
|
} else if (typeof source === "number") {
|
|
6437
|
-
if (
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6604
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
6605
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6606
|
+
warn$1(
|
|
6607
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
6608
|
+
);
|
|
6609
|
+
}
|
|
6441
6610
|
ret = [];
|
|
6442
6611
|
} else {
|
|
6443
6612
|
ret = new Array(source);
|
|
@@ -6756,6 +6925,7 @@ function installCompatInstanceProperties(map) {
|
|
|
6756
6925
|
$vnode: (i) => i.vnode,
|
|
6757
6926
|
// some private properties that are likely accessed...
|
|
6758
6927
|
_self: (i) => i.proxy,
|
|
6928
|
+
_setupProxy: (i) => i.setupState,
|
|
6759
6929
|
_uid: (i) => i.uid,
|
|
6760
6930
|
_data: (i) => i.data,
|
|
6761
6931
|
_isMounted: (i) => i.isMounted,
|
|
@@ -7745,7 +7915,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
7745
7915
|
return vm;
|
|
7746
7916
|
}
|
|
7747
7917
|
}
|
|
7748
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
7918
|
+
Vue.version = `2.6.14-compat:${"3.5.45"}`;
|
|
7749
7919
|
Vue.config = singletonApp.config;
|
|
7750
7920
|
Vue.use = (plugin, ...options) => {
|
|
7751
7921
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -8904,7 +9074,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
8904
9074
|
}
|
|
8905
9075
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
8906
9076
|
const key = nextKeys[i];
|
|
8907
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
9077
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
8908
9078
|
return true;
|
|
8909
9079
|
}
|
|
8910
9080
|
}
|
|
@@ -9883,6 +10053,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9883
10053
|
const needCallTransitionHooks = needTransition(parentSuspense, transition);
|
|
9884
10054
|
if (needCallTransitionHooks) {
|
|
9885
10055
|
transition.beforeEnter(el);
|
|
10056
|
+
} else if (transition && !transition.persisted) {
|
|
10057
|
+
el[deferredEnterKey] = true;
|
|
9886
10058
|
}
|
|
9887
10059
|
hostInsert(el, container, anchor);
|
|
9888
10060
|
if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {
|
|
@@ -10042,15 +10214,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10042
10214
|
for (let i = 0; i < newChildren.length; i++) {
|
|
10043
10215
|
const oldVNode = oldChildren[i];
|
|
10044
10216
|
const newVNode = newChildren[i];
|
|
10217
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
10045
10218
|
const container = (
|
|
10046
10219
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
10047
10220
|
// which will not have a mounted element
|
|
10048
|
-
|
|
10221
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
10049
10222
|
// of the Fragment itself so it can move its children.
|
|
10050
10223
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
10051
10224
|
// which also requires the correct parent container
|
|
10052
10225
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
10053
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
10226
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
10054
10227
|
// In other cases, the parent container is not actually used so we
|
|
10055
10228
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
10056
10229
|
fallbackContainer
|
|
@@ -10226,7 +10399,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10226
10399
|
}
|
|
10227
10400
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
|
|
10228
10401
|
if (instance.asyncDep) {
|
|
10229
|
-
parentSuspense && parentSuspense.registerDep(
|
|
10402
|
+
parentSuspense && parentSuspense.registerDep(
|
|
10403
|
+
instance,
|
|
10404
|
+
setupRenderEffect,
|
|
10405
|
+
optimized,
|
|
10406
|
+
namespace
|
|
10407
|
+
);
|
|
10230
10408
|
if (!initialVNode.el) {
|
|
10231
10409
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
10232
10410
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -10256,6 +10434,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10256
10434
|
pushWarningContext(n2);
|
|
10257
10435
|
}
|
|
10258
10436
|
n2.el = n1.el;
|
|
10437
|
+
n2.placeholder = n1.placeholder;
|
|
10259
10438
|
updateComponentPreRender(instance, n2, optimized);
|
|
10260
10439
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10261
10440
|
popWarningContext();
|
|
@@ -10267,6 +10446,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10267
10446
|
}
|
|
10268
10447
|
} else {
|
|
10269
10448
|
n2.el = n1.el;
|
|
10449
|
+
n2.placeholder = n1.placeholder;
|
|
10270
10450
|
instance.vnode = n2;
|
|
10271
10451
|
}
|
|
10272
10452
|
};
|
|
@@ -10384,16 +10564,23 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10384
10564
|
} else {
|
|
10385
10565
|
let { next, bu, u, parent, vnode } = instance;
|
|
10386
10566
|
{
|
|
10387
|
-
const
|
|
10388
|
-
if (
|
|
10567
|
+
const unresolvedAsyncRoot = locateUnresolvedAsyncRoot(instance);
|
|
10568
|
+
if (unresolvedAsyncRoot) {
|
|
10389
10569
|
if (next) {
|
|
10390
10570
|
next.el = vnode.el;
|
|
10391
10571
|
updateComponentPreRender(instance, next, optimized);
|
|
10392
10572
|
}
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
if (
|
|
10396
|
-
|
|
10573
|
+
unresolvedAsyncRoot.asyncDep.then(() => {
|
|
10574
|
+
const retry = () => {
|
|
10575
|
+
if (instance.job.flags & 8) return;
|
|
10576
|
+
if (parentSuspense && parentSuspense.pendingBranch) {
|
|
10577
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10578
|
+
} else {
|
|
10579
|
+
update();
|
|
10580
|
+
}
|
|
10581
|
+
};
|
|
10582
|
+
retry.flags = 16 | 32;
|
|
10583
|
+
queuePostRenderEffect(retry, parentSuspense);
|
|
10397
10584
|
});
|
|
10398
10585
|
return;
|
|
10399
10586
|
}
|
|
@@ -10435,8 +10622,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10435
10622
|
patch(
|
|
10436
10623
|
prevTree,
|
|
10437
10624
|
nextTree,
|
|
10438
|
-
// parent may have changed if it's in a teleport
|
|
10439
|
-
|
|
10625
|
+
// parent may have changed if it's in a teleport. a root that is a
|
|
10626
|
+
// pending async component only has its placeholder comment
|
|
10627
|
+
hostParentNode(
|
|
10628
|
+
prevTree.el || resolveAsyncComponentPlaceholder(prevTree)
|
|
10629
|
+
),
|
|
10440
10630
|
// anchor may have changed if it's in a fragment
|
|
10441
10631
|
getNextHostNode(prevTree),
|
|
10442
10632
|
instance,
|
|
@@ -10882,8 +11072,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10882
11072
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
10883
11073
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
10884
11074
|
}
|
|
10885
|
-
if (shapeFlag & 256) {
|
|
10886
|
-
parentComponent.ctx.deactivate(vnode);
|
|
11075
|
+
if (shapeFlag & 256 && parentComponent.ctx.deactivate(vnode)) {
|
|
10887
11076
|
return;
|
|
10888
11077
|
}
|
|
10889
11078
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
@@ -10944,18 +11133,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10944
11133
|
};
|
|
10945
11134
|
const remove = (vnode) => {
|
|
10946
11135
|
const { type, el, anchor, transition } = vnode;
|
|
10947
|
-
|
|
10948
|
-
|
|
10949
|
-
|
|
10950
|
-
if (child.type === Comment) {
|
|
10951
|
-
hostRemove(child.el);
|
|
10952
|
-
} else {
|
|
10953
|
-
remove(child);
|
|
10954
|
-
}
|
|
10955
|
-
});
|
|
10956
|
-
} else {
|
|
10957
|
-
removeFragment(el, anchor);
|
|
10958
|
-
}
|
|
11136
|
+
const isFragment = type === Fragment;
|
|
11137
|
+
if (isFragment && !transition) {
|
|
11138
|
+
removeFragment(el, anchor);
|
|
10959
11139
|
return;
|
|
10960
11140
|
}
|
|
10961
11141
|
if (type === Static) {
|
|
@@ -10965,17 +11145,25 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
10965
11145
|
}
|
|
10966
11146
|
return;
|
|
10967
11147
|
}
|
|
11148
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
10968
11149
|
const performRemove = () => {
|
|
10969
|
-
|
|
11150
|
+
if (isFragment) {
|
|
11151
|
+
if (hostParentNode(el)) {
|
|
11152
|
+
removeFragment(el, anchor);
|
|
11153
|
+
}
|
|
11154
|
+
} else {
|
|
11155
|
+
hostRemove(el);
|
|
11156
|
+
}
|
|
10970
11157
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
10971
11158
|
transition.afterLeave();
|
|
10972
11159
|
}
|
|
10973
11160
|
};
|
|
10974
|
-
if (
|
|
11161
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
10975
11162
|
const { leave, delayLeave } = transition;
|
|
10976
|
-
const
|
|
11163
|
+
const leavingEl = leavingNode.el;
|
|
11164
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
10977
11165
|
if (delayLeave) {
|
|
10978
|
-
delayLeave(
|
|
11166
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
10979
11167
|
} else {
|
|
10980
11168
|
performLeave();
|
|
10981
11169
|
}
|
|
@@ -11009,7 +11197,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
11009
11197
|
if (job) {
|
|
11010
11198
|
job.flags |= 8;
|
|
11011
11199
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
11012
|
-
} else if (
|
|
11200
|
+
} else if (subTree) {
|
|
11013
11201
|
subTree.transition = instance.vnode.transition;
|
|
11014
11202
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
11015
11203
|
}
|
|
@@ -11022,9 +11210,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
11022
11210
|
parentSuspense
|
|
11023
11211
|
);
|
|
11024
11212
|
}
|
|
11025
|
-
|
|
11213
|
+
const markUnmounted = () => {
|
|
11026
11214
|
instance.isUnmounted = true;
|
|
11027
|
-
}
|
|
11215
|
+
};
|
|
11216
|
+
markUnmounted.flags = 16;
|
|
11217
|
+
queuePostRenderEffect(markUnmounted, parentSuspense);
|
|
11028
11218
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
11029
11219
|
devtoolsComponentRemoved(instance);
|
|
11030
11220
|
}
|
|
@@ -11045,32 +11235,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
11045
11235
|
const teleportEnd = el && el[TeleportEndKey];
|
|
11046
11236
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
11047
11237
|
};
|
|
11048
|
-
let isFlushing = false;
|
|
11049
11238
|
const render = (vnode, container, namespace) => {
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
if (
|
|
11053
|
-
|
|
11054
|
-
|
|
11239
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
11240
|
+
flushOnAppMount(() => {
|
|
11241
|
+
if (vnode == null) {
|
|
11242
|
+
if (container._vnode) {
|
|
11243
|
+
unmount(container._vnode, null, null, true);
|
|
11244
|
+
}
|
|
11245
|
+
} else {
|
|
11246
|
+
patch(
|
|
11247
|
+
container._vnode || null,
|
|
11248
|
+
vnode,
|
|
11249
|
+
container,
|
|
11250
|
+
null,
|
|
11251
|
+
null,
|
|
11252
|
+
null,
|
|
11253
|
+
namespace
|
|
11254
|
+
);
|
|
11055
11255
|
}
|
|
11056
|
-
|
|
11057
|
-
|
|
11058
|
-
container._vnode || null,
|
|
11059
|
-
vnode,
|
|
11060
|
-
container,
|
|
11061
|
-
null,
|
|
11062
|
-
null,
|
|
11063
|
-
null,
|
|
11064
|
-
namespace
|
|
11065
|
-
);
|
|
11066
|
-
}
|
|
11067
|
-
container._vnode = vnode;
|
|
11068
|
-
if (!isFlushing) {
|
|
11069
|
-
isFlushing = true;
|
|
11070
|
-
flushPreFlushCbs(instance);
|
|
11071
|
-
flushPostFlushCbs();
|
|
11072
|
-
isFlushing = false;
|
|
11073
|
-
}
|
|
11256
|
+
container._vnode = vnode;
|
|
11257
|
+
}, minUid);
|
|
11074
11258
|
};
|
|
11075
11259
|
const internals = {
|
|
11076
11260
|
p: patch,
|
|
@@ -11182,13 +11366,13 @@ function getSequence(arr) {
|
|
|
11182
11366
|
}
|
|
11183
11367
|
return result;
|
|
11184
11368
|
}
|
|
11185
|
-
function
|
|
11369
|
+
function locateUnresolvedAsyncRoot(instance) {
|
|
11186
11370
|
const subComponent = instance.subTree.component;
|
|
11187
11371
|
if (subComponent) {
|
|
11188
11372
|
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
11189
11373
|
return subComponent;
|
|
11190
11374
|
} else {
|
|
11191
|
-
return
|
|
11375
|
+
return locateUnresolvedAsyncRoot(subComponent);
|
|
11192
11376
|
}
|
|
11193
11377
|
}
|
|
11194
11378
|
}
|
|
@@ -11206,11 +11390,16 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
11206
11390
|
if (instance) {
|
|
11207
11391
|
return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
11208
11392
|
}
|
|
11393
|
+
const suspense = anchorVnode.suspense;
|
|
11394
|
+
if (suspense && suspense.activeBranch) {
|
|
11395
|
+
return resolveAsyncComponentPlaceholder(suspense.activeBranch);
|
|
11396
|
+
}
|
|
11209
11397
|
return null;
|
|
11210
11398
|
}
|
|
11211
11399
|
|
|
11212
11400
|
const isSuspense = (type) => type.__isSuspense;
|
|
11213
11401
|
let suspenseId = 0;
|
|
11402
|
+
const deferredEnterKey = /* @__PURE__ */ Symbol("_deferredEnter");
|
|
11214
11403
|
const SuspenseImpl = {
|
|
11215
11404
|
name: "Suspense",
|
|
11216
11405
|
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
@@ -11232,11 +11421,22 @@ const SuspenseImpl = {
|
|
|
11232
11421
|
rendererInternals
|
|
11233
11422
|
);
|
|
11234
11423
|
} else {
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11424
|
+
const suspense = n1.suspense;
|
|
11425
|
+
if (parentSuspense && parentSuspense.deps > 0 && !parentSuspense.isHydrating) {
|
|
11426
|
+
const owner = suspense.parentComponent;
|
|
11427
|
+
const retained = !!owner && owner.suspense === parentSuspense && owner.suspenseId !== parentSuspense.pendingId;
|
|
11428
|
+
if (retained ? (
|
|
11429
|
+
// deps can outlive the pending branch: skip only while it exists
|
|
11430
|
+
parentSuspense.pendingBranch && !isSameVNodeType(
|
|
11431
|
+
n2.ssContent,
|
|
11432
|
+
suspense.pendingBranch || suspense.activeBranch
|
|
11433
|
+
)
|
|
11434
|
+
) : !suspense.isInFallback) {
|
|
11435
|
+
n2.suspense = suspense;
|
|
11436
|
+
suspense.vnode = n2;
|
|
11437
|
+
n2.el = n1.el;
|
|
11438
|
+
return;
|
|
11439
|
+
}
|
|
11240
11440
|
}
|
|
11241
11441
|
patchSuspense(
|
|
11242
11442
|
n1,
|
|
@@ -11261,6 +11461,38 @@ function triggerEvent(vnode, name) {
|
|
|
11261
11461
|
eventListener();
|
|
11262
11462
|
}
|
|
11263
11463
|
}
|
|
11464
|
+
function enterDeferred(branch) {
|
|
11465
|
+
const enters = [];
|
|
11466
|
+
collectDeferredEnters(branch, enters, true);
|
|
11467
|
+
if (enters.length) {
|
|
11468
|
+
queuePostFlushCb(enters);
|
|
11469
|
+
}
|
|
11470
|
+
}
|
|
11471
|
+
function collectDeferredEnters(vnode, enters, isRoot) {
|
|
11472
|
+
const { el, transition, children, shapeFlag } = vnode;
|
|
11473
|
+
if (shapeFlag & 6) {
|
|
11474
|
+
collectDeferredEnters(vnode.component.subTree, enters, isRoot);
|
|
11475
|
+
return;
|
|
11476
|
+
}
|
|
11477
|
+
if (shapeFlag & (128 | 64)) {
|
|
11478
|
+
return;
|
|
11479
|
+
}
|
|
11480
|
+
if (shapeFlag & 1) {
|
|
11481
|
+
if (!isRoot && el && el[deferredEnterKey]) {
|
|
11482
|
+
el[deferredEnterKey] = void 0;
|
|
11483
|
+
if (transition && !transition.persisted) {
|
|
11484
|
+
transition.beforeEnter(el);
|
|
11485
|
+
enters.push(() => transition.enter(el));
|
|
11486
|
+
}
|
|
11487
|
+
}
|
|
11488
|
+
isRoot = false;
|
|
11489
|
+
}
|
|
11490
|
+
if (shapeFlag & 16) {
|
|
11491
|
+
for (let i = 0; i < children.length; i++) {
|
|
11492
|
+
collectDeferredEnters(children[i], enters, isRoot);
|
|
11493
|
+
}
|
|
11494
|
+
}
|
|
11495
|
+
}
|
|
11264
11496
|
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
11265
11497
|
const {
|
|
11266
11498
|
p: patch,
|
|
@@ -11360,7 +11592,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11360
11592
|
unmount(pendingBranch, parentComponent, suspense);
|
|
11361
11593
|
}
|
|
11362
11594
|
suspense.deps = 0;
|
|
11363
|
-
suspense
|
|
11595
|
+
discardEffects(suspense);
|
|
11364
11596
|
suspense.hiddenContainer = createElement("div");
|
|
11365
11597
|
if (isInFallback) {
|
|
11366
11598
|
patch(
|
|
@@ -11438,11 +11670,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11438
11670
|
} else {
|
|
11439
11671
|
triggerEvent(n2, "onPending");
|
|
11440
11672
|
suspense.pendingBranch = newBranch;
|
|
11441
|
-
|
|
11442
|
-
suspense.pendingId = newBranch.component.suspenseId;
|
|
11443
|
-
} else {
|
|
11444
|
-
suspense.pendingId = suspenseId++;
|
|
11445
|
-
}
|
|
11673
|
+
suspense.pendingId = suspenseId++;
|
|
11446
11674
|
patch(
|
|
11447
11675
|
null,
|
|
11448
11676
|
newBranch,
|
|
@@ -11457,12 +11685,11 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
11457
11685
|
if (suspense.deps <= 0) {
|
|
11458
11686
|
suspense.resolve();
|
|
11459
11687
|
} else {
|
|
11460
|
-
const { timeout
|
|
11688
|
+
const { timeout } = suspense;
|
|
11461
11689
|
if (timeout > 0) {
|
|
11462
|
-
setTimeout(() => {
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
}
|
|
11690
|
+
suspense.timeoutTimer = setTimeout(() => {
|
|
11691
|
+
suspense.timeoutTimer = void 0;
|
|
11692
|
+
suspense.fallback(suspense.vnode.ssFallback);
|
|
11466
11693
|
}, timeout);
|
|
11467
11694
|
} else if (timeout === 0) {
|
|
11468
11695
|
suspense.fallback(newFallback);
|
|
@@ -11509,6 +11736,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11509
11736
|
deps: 0,
|
|
11510
11737
|
pendingId: suspenseId++,
|
|
11511
11738
|
timeout: typeof timeout === "number" ? timeout : -1,
|
|
11739
|
+
timeoutTimer: void 0,
|
|
11512
11740
|
activeBranch: null,
|
|
11513
11741
|
isFallbackMountPending: false,
|
|
11514
11742
|
pendingBranch: null,
|
|
@@ -11547,7 +11775,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11547
11775
|
let hasUpdatedAnchor = false;
|
|
11548
11776
|
if (delayEnter) {
|
|
11549
11777
|
activeBranch.transition.afterLeave = () => {
|
|
11550
|
-
if (pendingId === suspense.pendingId) {
|
|
11778
|
+
if (pendingId === suspense.pendingId && !suspense.isUnmounted) {
|
|
11779
|
+
enterDeferred(pendingBranch);
|
|
11551
11780
|
move(
|
|
11552
11781
|
pendingBranch,
|
|
11553
11782
|
container2,
|
|
@@ -11562,7 +11791,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11562
11791
|
};
|
|
11563
11792
|
}
|
|
11564
11793
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
11565
|
-
if (parentNode(
|
|
11794
|
+
if (parentNode(
|
|
11795
|
+
activeBranch.el || resolveAsyncComponentPlaceholder(activeBranch)
|
|
11796
|
+
) === container2) {
|
|
11566
11797
|
anchor = next(activeBranch);
|
|
11567
11798
|
hasUpdatedAnchor = true;
|
|
11568
11799
|
}
|
|
@@ -11572,13 +11803,26 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11572
11803
|
}
|
|
11573
11804
|
}
|
|
11574
11805
|
if (!delayEnter) {
|
|
11806
|
+
enterDeferred(pendingBranch);
|
|
11575
11807
|
move(pendingBranch, container2, anchor, 0);
|
|
11576
11808
|
}
|
|
11577
11809
|
}
|
|
11810
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11811
|
+
suspense.timeoutTimer = void 0;
|
|
11578
11812
|
suspense.isFallbackMountPending = false;
|
|
11579
11813
|
setActiveBranch(suspense, pendingBranch);
|
|
11580
11814
|
suspense.pendingBranch = null;
|
|
11581
11815
|
suspense.isInFallback = false;
|
|
11816
|
+
let kept = 0;
|
|
11817
|
+
for (let i = 0; i < effects.length; i++) {
|
|
11818
|
+
const effect = effects[i];
|
|
11819
|
+
if (effect.flags & 32) {
|
|
11820
|
+
queuePostFlushCb(effect);
|
|
11821
|
+
} else {
|
|
11822
|
+
effects[kept++] = effect;
|
|
11823
|
+
}
|
|
11824
|
+
}
|
|
11825
|
+
effects.length = kept;
|
|
11582
11826
|
let parent = suspense.parent;
|
|
11583
11827
|
let hasUnresolvedAncestor = false;
|
|
11584
11828
|
while (parent) {
|
|
@@ -11607,7 +11851,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11607
11851
|
triggerEvent(vnode2, "onResolve");
|
|
11608
11852
|
},
|
|
11609
11853
|
fallback(fallbackVNode) {
|
|
11610
|
-
if (!suspense.pendingBranch) {
|
|
11854
|
+
if (suspense.isUnmounted || !suspense.pendingBranch) {
|
|
11611
11855
|
return;
|
|
11612
11856
|
}
|
|
11613
11857
|
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
@@ -11615,7 +11859,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11615
11859
|
const anchor2 = next(activeBranch);
|
|
11616
11860
|
const mountFallback = () => {
|
|
11617
11861
|
suspense.isFallbackMountPending = false;
|
|
11618
|
-
if (!suspense.isInFallback) {
|
|
11862
|
+
if (suspense.isUnmounted || !suspense.isInFallback) {
|
|
11619
11863
|
return;
|
|
11620
11864
|
}
|
|
11621
11865
|
const latestFallback = suspense.vnode.ssFallback;
|
|
@@ -11658,25 +11902,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11658
11902
|
next() {
|
|
11659
11903
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
11660
11904
|
},
|
|
11661
|
-
|
|
11905
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
11906
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
11907
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
11908
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
11662
11909
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
11663
11910
|
if (isInPendingSuspense) {
|
|
11664
11911
|
suspense.deps++;
|
|
11665
11912
|
}
|
|
11666
11913
|
const hydratedEl = instance.vnode.el;
|
|
11667
|
-
|
|
11668
|
-
handleError(err, instance, 0);
|
|
11669
|
-
}).then((asyncSetupResult) => {
|
|
11670
|
-
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
11671
|
-
return;
|
|
11672
|
-
}
|
|
11673
|
-
unsetCurrentInstance();
|
|
11674
|
-
if (hydratedEl && !instance.scope.active) {
|
|
11675
|
-
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
11676
|
-
suspense.resolve();
|
|
11677
|
-
}
|
|
11678
|
-
return;
|
|
11679
|
-
}
|
|
11914
|
+
const render = (asyncSetupResult) => {
|
|
11680
11915
|
instance.asyncResolved = true;
|
|
11681
11916
|
const { vnode: vnode2 } = instance;
|
|
11682
11917
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -11698,7 +11933,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11698
11933
|
// consider the comment placeholder case.
|
|
11699
11934
|
hydratedEl ? null : next(instance.subTree),
|
|
11700
11935
|
suspense,
|
|
11701
|
-
|
|
11936
|
+
namespace2,
|
|
11702
11937
|
optimized2
|
|
11703
11938
|
);
|
|
11704
11939
|
if (placeholder) {
|
|
@@ -11709,13 +11944,57 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11709
11944
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
11710
11945
|
popWarningContext();
|
|
11711
11946
|
}
|
|
11712
|
-
|
|
11947
|
+
};
|
|
11948
|
+
instance.asyncDep.catch((err) => {
|
|
11949
|
+
handleError(err, instance, 0, false, true);
|
|
11950
|
+
return () => null;
|
|
11951
|
+
}).then((asyncSetupResult) => {
|
|
11952
|
+
if (instance.isUnmounted || suspense.isUnmounted) {
|
|
11953
|
+
return;
|
|
11954
|
+
}
|
|
11955
|
+
const isPendingDep = isInPendingSuspense && suspense.pendingId === instance.suspenseId;
|
|
11956
|
+
unsetCurrentInstance();
|
|
11957
|
+
if (!instance.scope.active) {
|
|
11958
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11959
|
+
suspense.resolve();
|
|
11960
|
+
}
|
|
11961
|
+
return;
|
|
11962
|
+
}
|
|
11963
|
+
if (!isPendingDep && suspense.pendingBranch) {
|
|
11964
|
+
const job = () => {
|
|
11965
|
+
if (instance.isUnmounted || suspense.isUnmounted || !instance.scope.active) {
|
|
11966
|
+
return;
|
|
11967
|
+
}
|
|
11968
|
+
if (suspense.pendingBranch) {
|
|
11969
|
+
queueEffectWithSuspense(job, suspense);
|
|
11970
|
+
} else {
|
|
11971
|
+
render(asyncSetupResult);
|
|
11972
|
+
}
|
|
11973
|
+
};
|
|
11974
|
+
job.flags = 16 | 32;
|
|
11975
|
+
queueEffectWithSuspense(job, suspense);
|
|
11976
|
+
return;
|
|
11977
|
+
}
|
|
11978
|
+
render(asyncSetupResult);
|
|
11979
|
+
if (isPendingDep && --suspense.deps === 0) {
|
|
11713
11980
|
suspense.resolve();
|
|
11714
11981
|
}
|
|
11715
11982
|
});
|
|
11716
11983
|
},
|
|
11717
11984
|
unmount(parentSuspense2, doRemove) {
|
|
11718
11985
|
suspense.isUnmounted = true;
|
|
11986
|
+
clearTimeout(suspense.timeoutTimer);
|
|
11987
|
+
suspense.timeoutTimer = void 0;
|
|
11988
|
+
if (parentSuspenseId !== void 0) {
|
|
11989
|
+
const parent = suspense.parent;
|
|
11990
|
+
const pendingId = parentSuspenseId;
|
|
11991
|
+
parentSuspenseId = void 0;
|
|
11992
|
+
queuePostFlushCb(() => {
|
|
11993
|
+
if (parent.pendingId === pendingId && !parent.isUnmounted && --parent.deps === 0) {
|
|
11994
|
+
parent.resolve();
|
|
11995
|
+
}
|
|
11996
|
+
});
|
|
11997
|
+
}
|
|
11719
11998
|
if (suspense.activeBranch) {
|
|
11720
11999
|
unmount(
|
|
11721
12000
|
suspense.activeBranch,
|
|
@@ -11725,12 +12004,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
11725
12004
|
);
|
|
11726
12005
|
}
|
|
11727
12006
|
if (suspense.pendingBranch) {
|
|
11728
|
-
unmount(
|
|
11729
|
-
|
|
11730
|
-
parentComponent,
|
|
11731
|
-
parentSuspense2,
|
|
11732
|
-
doRemove
|
|
11733
|
-
);
|
|
12007
|
+
unmount(suspense.pendingBranch, parentComponent, suspense, doRemove);
|
|
12008
|
+
discardEffects(suspense);
|
|
11734
12009
|
}
|
|
11735
12010
|
}
|
|
11736
12011
|
};
|
|
@@ -11800,6 +12075,16 @@ function normalizeSuspenseSlot(s) {
|
|
|
11800
12075
|
}
|
|
11801
12076
|
return s;
|
|
11802
12077
|
}
|
|
12078
|
+
function discardEffects(suspense) {
|
|
12079
|
+
const { effects } = suspense;
|
|
12080
|
+
for (let i = 0; i < effects.length; i++) {
|
|
12081
|
+
const effect = effects[i];
|
|
12082
|
+
if (effect.flags & 16) {
|
|
12083
|
+
queuePostFlushCb(effect);
|
|
12084
|
+
}
|
|
12085
|
+
}
|
|
12086
|
+
effects.length = 0;
|
|
12087
|
+
}
|
|
11803
12088
|
function queueEffectWithSuspense(fn, suspense) {
|
|
11804
12089
|
if (suspense && suspense.pendingBranch) {
|
|
11805
12090
|
if (isArray(fn)) {
|
|
@@ -12115,7 +12400,8 @@ Component that was made reactive: `,
|
|
|
12115
12400
|
}
|
|
12116
12401
|
function guardReactiveProps(props) {
|
|
12117
12402
|
if (!props) return null;
|
|
12118
|
-
|
|
12403
|
+
if (isProxy(props)) return extend({}, props);
|
|
12404
|
+
return isInternalObject(props) ? extend({}, props[rawAttrsKey] || props) : props;
|
|
12119
12405
|
}
|
|
12120
12406
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
12121
12407
|
const { props, ref, patchFlag, children, transition } = vnode;
|
|
@@ -12297,8 +12583,11 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
12297
12583
|
]);
|
|
12298
12584
|
}
|
|
12299
12585
|
|
|
12300
|
-
const emptyAppContext = createAppContext();
|
|
12586
|
+
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
12301
12587
|
let uid = 0;
|
|
12588
|
+
function getNextUid() {
|
|
12589
|
+
return uid;
|
|
12590
|
+
}
|
|
12302
12591
|
function createComponentInstance(vnode, parent, suspense) {
|
|
12303
12592
|
const type = vnode.type;
|
|
12304
12593
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -12509,7 +12798,8 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
12509
12798
|
setInSSRSetupState(false);
|
|
12510
12799
|
}
|
|
12511
12800
|
}).catch((e) => {
|
|
12512
|
-
handleError(e, instance, 0);
|
|
12801
|
+
handleError(e, instance, 0, void 0, true);
|
|
12802
|
+
instance.ssrRender = (_, push) => push("<!---->");
|
|
12513
12803
|
});
|
|
12514
12804
|
} else {
|
|
12515
12805
|
instance.asyncDep = setupResult;
|
|
@@ -12629,11 +12919,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
12629
12919
|
}
|
|
12630
12920
|
}
|
|
12631
12921
|
}
|
|
12922
|
+
const rawAttrsKey = /* @__PURE__ */ Symbol();
|
|
12632
12923
|
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
12633
12924
|
get(target, key) {
|
|
12634
12925
|
markAttrsAccessed();
|
|
12635
12926
|
track(target, "get", "");
|
|
12636
|
-
return target[key];
|
|
12927
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12637
12928
|
},
|
|
12638
12929
|
set() {
|
|
12639
12930
|
warn$1(`setupContext.attrs is readonly.`);
|
|
@@ -12646,7 +12937,7 @@ const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
|
12646
12937
|
} : {
|
|
12647
12938
|
get(target, key) {
|
|
12648
12939
|
track(target, "get", "");
|
|
12649
|
-
return target[key];
|
|
12940
|
+
return key === rawAttrsKey ? target : target[key];
|
|
12650
12941
|
}
|
|
12651
12942
|
};
|
|
12652
12943
|
function getSlotsProxy(instance) {
|
|
@@ -12997,7 +13288,7 @@ function isMemoSame(cached, memo) {
|
|
|
12997
13288
|
return true;
|
|
12998
13289
|
}
|
|
12999
13290
|
|
|
13000
|
-
const version = "3.5.
|
|
13291
|
+
const version = "3.5.45";
|
|
13001
13292
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
13002
13293
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
13003
13294
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
|
@@ -13617,7 +13908,9 @@ function patchStyle(el, prev, next) {
|
|
|
13617
13908
|
}
|
|
13618
13909
|
}
|
|
13619
13910
|
if (vShowOriginalDisplay in el) {
|
|
13620
|
-
|
|
13911
|
+
if (!isCssString || prev !== next) {
|
|
13912
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
13913
|
+
}
|
|
13621
13914
|
if (el[vShowHidden]) {
|
|
13622
13915
|
style.display = "none";
|
|
13623
13916
|
}
|
|
@@ -14143,7 +14436,9 @@ class VueElement extends BaseClass {
|
|
|
14143
14436
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
14144
14437
|
);
|
|
14145
14438
|
}
|
|
14146
|
-
this.
|
|
14439
|
+
if (this._connected) {
|
|
14440
|
+
this._mount(def);
|
|
14441
|
+
}
|
|
14147
14442
|
};
|
|
14148
14443
|
const asyncDef = this._def.__asyncLoader;
|
|
14149
14444
|
if (asyncDef) {
|
|
@@ -14513,6 +14808,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
14513
14808
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
14514
14809
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
14515
14810
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
14811
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
14516
14812
|
const decorate = (t) => {
|
|
14517
14813
|
delete t.props.mode;
|
|
14518
14814
|
{
|
|
@@ -14531,21 +14827,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14531
14827
|
const state = useTransitionState();
|
|
14532
14828
|
let prevChildren;
|
|
14533
14829
|
let children;
|
|
14534
|
-
|
|
14535
|
-
|
|
14536
|
-
|
|
14830
|
+
let origins;
|
|
14831
|
+
let moves;
|
|
14832
|
+
const willMove = () => {
|
|
14833
|
+
if (moves === void 0) {
|
|
14834
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
14835
|
+
prevChildren[0].el,
|
|
14836
|
+
instance.vnode.el,
|
|
14837
|
+
resolveMoveClass(props)
|
|
14838
|
+
);
|
|
14537
14839
|
}
|
|
14538
|
-
|
|
14539
|
-
|
|
14540
|
-
|
|
14541
|
-
|
|
14542
|
-
|
|
14543
|
-
)) {
|
|
14840
|
+
return moves;
|
|
14841
|
+
};
|
|
14842
|
+
onUpdated(() => {
|
|
14843
|
+
pendingGroups.delete(instance);
|
|
14844
|
+
if (!willMove()) {
|
|
14544
14845
|
prevChildren = [];
|
|
14846
|
+
origins = void 0;
|
|
14545
14847
|
return;
|
|
14546
14848
|
}
|
|
14849
|
+
const moveClass = resolveMoveClass(props);
|
|
14547
14850
|
prevChildren.forEach(callPendingCbs);
|
|
14548
|
-
|
|
14851
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
14852
|
+
origins = void 0;
|
|
14853
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
14549
14854
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
14550
14855
|
forceReflow(instance.vnode.el);
|
|
14551
14856
|
movedChildren.forEach((c) => {
|
|
@@ -14578,6 +14883,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14578
14883
|
tag = "span";
|
|
14579
14884
|
}
|
|
14580
14885
|
prevChildren = [];
|
|
14886
|
+
moves = void 0;
|
|
14581
14887
|
if (children) {
|
|
14582
14888
|
for (let i = 0; i < children.length; i++) {
|
|
14583
14889
|
const child = children[i];
|
|
@@ -14609,6 +14915,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
14609
14915
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
14610
14916
|
}
|
|
14611
14917
|
}
|
|
14918
|
+
if (prevChildren.length) {
|
|
14919
|
+
origins = getOrigins(instance);
|
|
14920
|
+
pendingGroups.set(instance, willMove);
|
|
14921
|
+
}
|
|
14612
14922
|
return createVNode(tag, null, children);
|
|
14613
14923
|
};
|
|
14614
14924
|
}
|
|
@@ -14623,8 +14933,11 @@ function callPendingCbs(c) {
|
|
|
14623
14933
|
el[enterCbKey]();
|
|
14624
14934
|
}
|
|
14625
14935
|
}
|
|
14626
|
-
function
|
|
14627
|
-
|
|
14936
|
+
function resolveMoveClass(props) {
|
|
14937
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
14938
|
+
}
|
|
14939
|
+
function recordPosition(c, shift) {
|
|
14940
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
14628
14941
|
}
|
|
14629
14942
|
function applyTranslation(c) {
|
|
14630
14943
|
const oldPos = positionMap.get(c);
|
|
@@ -14648,13 +14961,41 @@ function applyTranslation(c) {
|
|
|
14648
14961
|
return c;
|
|
14649
14962
|
}
|
|
14650
14963
|
}
|
|
14651
|
-
function getPosition(el) {
|
|
14964
|
+
function getPosition(el, shift) {
|
|
14652
14965
|
const rect = el.getBoundingClientRect();
|
|
14653
14966
|
return {
|
|
14654
|
-
left: rect.left,
|
|
14655
|
-
top: rect.top
|
|
14967
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
14968
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
14656
14969
|
};
|
|
14657
14970
|
}
|
|
14971
|
+
function getOrigins(instance) {
|
|
14972
|
+
let origins;
|
|
14973
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
14974
|
+
const willMove = pendingGroups.get(group);
|
|
14975
|
+
if (willMove) {
|
|
14976
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
14977
|
+
if (item) {
|
|
14978
|
+
(origins || (origins = [])).push(
|
|
14979
|
+
extend(getPosition(item), { item, willMove })
|
|
14980
|
+
);
|
|
14981
|
+
}
|
|
14982
|
+
}
|
|
14983
|
+
}
|
|
14984
|
+
return origins;
|
|
14985
|
+
}
|
|
14986
|
+
function findItem(root, node) {
|
|
14987
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
14988
|
+
while (node && node.parentNode !== container) {
|
|
14989
|
+
node = node.parentNode;
|
|
14990
|
+
}
|
|
14991
|
+
if (node && node.nodeType === 1) {
|
|
14992
|
+
return node;
|
|
14993
|
+
}
|
|
14994
|
+
}
|
|
14995
|
+
function getOriginShift(origins, root) {
|
|
14996
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
14997
|
+
return origin && getPosition(origin.item, origin);
|
|
14998
|
+
}
|
|
14658
14999
|
function hasCSSTransform(el, root, moveClass) {
|
|
14659
15000
|
const clone = el.cloneNode();
|
|
14660
15001
|
const _vtc = el[vtcKey];
|
|
@@ -14849,18 +15190,18 @@ const vModelSelect = {
|
|
|
14849
15190
|
},
|
|
14850
15191
|
// set value in mounted & updated because <select> relies on its children
|
|
14851
15192
|
// <option>s.
|
|
14852
|
-
mounted(el, { value }) {
|
|
14853
|
-
setSelected(el, value);
|
|
15193
|
+
mounted(el, { value, modifiers: { number } }) {
|
|
15194
|
+
setSelected(el, value, number);
|
|
14854
15195
|
},
|
|
14855
15196
|
beforeUpdate(el, { value }, vnode) {
|
|
14856
15197
|
el._modelValue = value;
|
|
14857
15198
|
el[assignKey] = getModelAssigner(vnode);
|
|
14858
15199
|
},
|
|
14859
|
-
updated(el, { value }) {
|
|
15200
|
+
updated(el, { value, modifiers: { number } }) {
|
|
14860
15201
|
const pending = el._pendingValue;
|
|
14861
15202
|
el._pendingValue = void 0;
|
|
14862
15203
|
if (!pending || pending[0] !== el.multiple || !isSameSelectValue(value, pending[1], pending[0])) {
|
|
14863
|
-
setSelected(el, value);
|
|
15204
|
+
setSelected(el, value, number);
|
|
14864
15205
|
}
|
|
14865
15206
|
}
|
|
14866
15207
|
};
|
|
@@ -14876,7 +15217,7 @@ function isSameSelectValue(value, assignedValue, multiple) {
|
|
|
14876
15217
|
}
|
|
14877
15218
|
return false;
|
|
14878
15219
|
}
|
|
14879
|
-
function setSelected(el, value) {
|
|
15220
|
+
function setSelected(el, value, number = false) {
|
|
14880
15221
|
const isMultiple = el.multiple;
|
|
14881
15222
|
const isArrayValue = isArray(value);
|
|
14882
15223
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -14897,7 +15238,7 @@ function setSelected(el, value) {
|
|
|
14897
15238
|
option.selected = looseIndexOf(value, optionValue) > -1;
|
|
14898
15239
|
}
|
|
14899
15240
|
} else {
|
|
14900
|
-
option.selected = value.has(optionValue);
|
|
15241
|
+
option.selected = value.has(optionValue) || number && typeof optionValue === "string" && value.has(looseToNumber(optionValue));
|
|
14901
15242
|
}
|
|
14902
15243
|
} else if (looseEqual(getValue(option), value)) {
|
|
14903
15244
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
@@ -16631,7 +16972,8 @@ const errorMessages = {
|
|
|
16631
16972
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
16632
16973
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
16633
16974
|
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
16634
|
-
Use a v-bind binding combined with a v-on listener that emits update:x event instead
|
|
16975
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.
|
|
16976
|
+
For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
|
|
16635
16977
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
16636
16978
|
[46]: `Error parsing JavaScript expression: `,
|
|
16637
16979
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -17575,7 +17917,11 @@ function getLoc(start, end) {
|
|
|
17575
17917
|
};
|
|
17576
17918
|
}
|
|
17577
17919
|
function cloneLoc(loc) {
|
|
17578
|
-
return
|
|
17920
|
+
return {
|
|
17921
|
+
start: extend({}, loc.start),
|
|
17922
|
+
end: extend({}, loc.end),
|
|
17923
|
+
source: loc.source
|
|
17924
|
+
};
|
|
17579
17925
|
}
|
|
17580
17926
|
function setLocEnd(loc, end) {
|
|
17581
17927
|
loc.end = tokenizer.getPos(end);
|
|
@@ -19225,7 +19571,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
19225
19571
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
19226
19572
|
createCompoundExpression([
|
|
19227
19573
|
`if (_cached && _cached.el`,
|
|
19228
|
-
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
19574
|
+
...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
|
|
19229
19575
|
` && ${context.helperString(
|
|
19230
19576
|
IS_MEMO_SAME
|
|
19231
19577
|
)}(_cached, _memo)) return _cached`
|
|
@@ -21164,7 +21510,8 @@ const transformTransition = (node, context) => {
|
|
|
21164
21510
|
if (!node.children.length) {
|
|
21165
21511
|
return;
|
|
21166
21512
|
}
|
|
21167
|
-
|
|
21513
|
+
const multipleChildren = hasMultipleChildren(node);
|
|
21514
|
+
if (!!(process.env.NODE_ENV !== "production") && multipleChildren) {
|
|
21168
21515
|
context.onError(
|
|
21169
21516
|
createDOMCompilerError(
|
|
21170
21517
|
63,
|
|
@@ -21391,7 +21738,8 @@ const validateHtmlNesting = (node, context) => {
|
|
|
21391
21738
|
|
|
21392
21739
|
const DOMNodeTransforms = [
|
|
21393
21740
|
transformStyle,
|
|
21394
|
-
|
|
21741
|
+
transformTransition,
|
|
21742
|
+
...!!(process.env.NODE_ENV !== "production") ? [validateHtmlNesting] : []
|
|
21395
21743
|
];
|
|
21396
21744
|
const DOMDirectiveTransforms = {
|
|
21397
21745
|
cloak: noopDirectiveTransform,
|