@vue/compat 3.5.42 → 3.5.44
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/dist/vue.cjs.js +348 -147
- package/dist/vue.cjs.prod.js +378 -135
- package/dist/vue.esm-browser.js +344 -144
- package/dist/vue.esm-browser.prod.js +9 -9
- package/dist/vue.esm-bundler.js +345 -145
- package/dist/vue.global.js +344 -144
- package/dist/vue.global.prod.js +10 -10
- package/dist/vue.runtime.esm-browser.js +337 -140
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +338 -141
- package/dist/vue.runtime.global.js +337 -140
- package/dist/vue.runtime.global.prod.js +4 -4
- package/package.json +4 -4
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.
|
|
2
|
+
* @vue/compat v3.5.44
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -145,10 +145,10 @@ function normalizeStyle(value) {
|
|
|
145
145
|
}
|
|
146
146
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
147
147
|
const propertyDelimiterRE = /:([^]+)/;
|
|
148
|
-
const styleCommentRE =
|
|
148
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
149
149
|
function parseStringStyle(cssText) {
|
|
150
150
|
const ret = {};
|
|
151
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
151
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
152
152
|
if (item) {
|
|
153
153
|
const tmp = item.split(propertyDelimiterRE);
|
|
154
154
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -210,7 +210,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
210
210
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
211
211
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
212
212
|
|
|
213
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
213
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
214
214
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
215
215
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
216
216
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -268,22 +268,22 @@ function escapeHtml(string) {
|
|
|
268
268
|
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
function looseCompareArrays(a, b) {
|
|
271
|
+
function looseCompareArrays(a, b, seen) {
|
|
272
272
|
if (a.length !== b.length) return false;
|
|
273
273
|
let equal = true;
|
|
274
274
|
for (let i = 0; equal && i < a.length; i++) {
|
|
275
|
-
equal = looseEqual(a[i], b[i]);
|
|
275
|
+
equal = looseEqual(a[i], b[i], seen);
|
|
276
276
|
}
|
|
277
277
|
return equal;
|
|
278
278
|
}
|
|
279
|
-
function looseCompareCollections(a, b) {
|
|
279
|
+
function looseCompareCollections(a, b, seen) {
|
|
280
280
|
if (a.size !== b.size) return false;
|
|
281
281
|
const candidates = Array.from(b);
|
|
282
282
|
const matched = new Uint8Array(candidates.length);
|
|
283
283
|
for (const item of a) {
|
|
284
284
|
let index = -1;
|
|
285
285
|
for (let i = 0; i < candidates.length; i++) {
|
|
286
|
-
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
286
|
+
if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
287
287
|
index = i;
|
|
288
288
|
break;
|
|
289
289
|
}
|
|
@@ -293,7 +293,47 @@ function looseCompareCollections(a, b) {
|
|
|
293
293
|
}
|
|
294
294
|
return true;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function looseCompareObjects(a, b, seen) {
|
|
297
|
+
let aValidType = isMap(a);
|
|
298
|
+
let bValidType = isMap(b);
|
|
299
|
+
if (aValidType || bValidType) {
|
|
300
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
301
|
+
}
|
|
302
|
+
aValidType = isSet(a);
|
|
303
|
+
bValidType = isSet(b);
|
|
304
|
+
if (aValidType || bValidType) {
|
|
305
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
306
|
+
}
|
|
307
|
+
const aKeysCount = Object.keys(a).length;
|
|
308
|
+
const bKeysCount = Object.keys(b).length;
|
|
309
|
+
if (aKeysCount !== bKeysCount) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
for (const key in a) {
|
|
313
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
314
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
315
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
return String(a) === String(b);
|
|
320
|
+
}
|
|
321
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
322
|
+
if (!seen) {
|
|
323
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
324
|
+
}
|
|
325
|
+
const [seenA, seenB] = seen;
|
|
326
|
+
if (seenA.has(a) || seenB.has(b)) {
|
|
327
|
+
return seenA.get(a) === b && seenB.get(b) === a;
|
|
328
|
+
}
|
|
329
|
+
seenA.set(a, b);
|
|
330
|
+
seenB.set(b, a);
|
|
331
|
+
const equal = compare(a, b, seen);
|
|
332
|
+
seenA.delete(a);
|
|
333
|
+
seenB.delete(b);
|
|
334
|
+
return equal;
|
|
335
|
+
}
|
|
336
|
+
function looseEqual(a, b, seen) {
|
|
297
337
|
if (a === b) return true;
|
|
298
338
|
let aValidType = isDate(a);
|
|
299
339
|
let bValidType = isDate(b);
|
|
@@ -308,7 +348,7 @@ function looseEqual(a, b) {
|
|
|
308
348
|
aValidType = isArray(a);
|
|
309
349
|
bValidType = isArray(b);
|
|
310
350
|
if (aValidType || bValidType) {
|
|
311
|
-
return aValidType && bValidType ?
|
|
351
|
+
return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
312
352
|
}
|
|
313
353
|
aValidType = isObject(a);
|
|
314
354
|
bValidType = isObject(b);
|
|
@@ -316,28 +356,7 @@ function looseEqual(a, b) {
|
|
|
316
356
|
if (!aValidType || !bValidType) {
|
|
317
357
|
return false;
|
|
318
358
|
}
|
|
319
|
-
|
|
320
|
-
bValidType = isMap(b);
|
|
321
|
-
if (aValidType || bValidType) {
|
|
322
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
323
|
-
}
|
|
324
|
-
aValidType = isSet(a);
|
|
325
|
-
bValidType = isSet(b);
|
|
326
|
-
if (aValidType || bValidType) {
|
|
327
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
328
|
-
}
|
|
329
|
-
const aKeysCount = Object.keys(a).length;
|
|
330
|
-
const bKeysCount = Object.keys(b).length;
|
|
331
|
-
if (aKeysCount !== bKeysCount) {
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
for (const key in a) {
|
|
335
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
336
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
337
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
338
|
-
return false;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
359
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
341
360
|
}
|
|
342
361
|
return String(a) === String(b);
|
|
343
362
|
}
|
|
@@ -1062,7 +1081,9 @@ function reactiveReadArray(array) {
|
|
|
1062
1081
|
const raw = toRaw(array);
|
|
1063
1082
|
if (raw === array) return raw;
|
|
1064
1083
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1065
|
-
|
|
1084
|
+
if (isShallow(array)) return raw;
|
|
1085
|
+
if (!isReadonly(array)) return raw.map(toReactive);
|
|
1086
|
+
return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
1066
1087
|
}
|
|
1067
1088
|
function shallowReadArray(arr) {
|
|
1068
1089
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -1189,19 +1210,41 @@ const arrayInstrumentations = {
|
|
|
1189
1210
|
};
|
|
1190
1211
|
function iterator(self, method, wrapValue) {
|
|
1191
1212
|
const arr = shallowReadArray(self);
|
|
1192
|
-
const
|
|
1213
|
+
const methodFn = arr[method];
|
|
1214
|
+
const iter = methodFn.call(arr);
|
|
1193
1215
|
if (arr !== self && !isShallow(self)) {
|
|
1194
|
-
iter.
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
if (
|
|
1198
|
-
|
|
1216
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1217
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1218
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1219
|
+
if (methodFn !== arrayProto[method]) {
|
|
1220
|
+
Object.defineProperties(wrapped, {
|
|
1221
|
+
return: {
|
|
1222
|
+
get() {
|
|
1223
|
+
const fn = iter.return;
|
|
1224
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1225
|
+
}
|
|
1226
|
+
},
|
|
1227
|
+
throw: {
|
|
1228
|
+
get() {
|
|
1229
|
+
const fn = iter.throw;
|
|
1230
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
});
|
|
1199
1234
|
}
|
|
1200
|
-
return
|
|
1201
|
-
}
|
|
1235
|
+
return wrapped;
|
|
1236
|
+
}
|
|
1237
|
+
iter._next = iter.next;
|
|
1238
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1202
1239
|
}
|
|
1203
1240
|
return iter;
|
|
1204
1241
|
}
|
|
1242
|
+
function wrapResult(result, wrapValue) {
|
|
1243
|
+
if (!result.done) {
|
|
1244
|
+
result.value = wrapValue(result.value);
|
|
1245
|
+
}
|
|
1246
|
+
return result;
|
|
1247
|
+
}
|
|
1205
1248
|
const arrayProto = Array.prototype;
|
|
1206
1249
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1207
1250
|
const arr = shallowReadArray(self);
|
|
@@ -1592,6 +1635,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1592
1635
|
return !isReadonly2;
|
|
1593
1636
|
} else if (key === "__v_isReadonly") {
|
|
1594
1637
|
return isReadonly2;
|
|
1638
|
+
} else if (key === "__v_isShallow") {
|
|
1639
|
+
return shallow;
|
|
1595
1640
|
} else if (key === "__v_raw") {
|
|
1596
1641
|
return target;
|
|
1597
1642
|
}
|
|
@@ -2079,9 +2124,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2079
2124
|
if (once && cb) {
|
|
2080
2125
|
const _cb = cb;
|
|
2081
2126
|
cb = (...args) => {
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2127
|
+
try {
|
|
2128
|
+
return _cb(...args);
|
|
2129
|
+
} finally {
|
|
2130
|
+
watchHandle();
|
|
2131
|
+
}
|
|
2085
2132
|
};
|
|
2086
2133
|
}
|
|
2087
2134
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2092,12 +2139,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2092
2139
|
if (cb) {
|
|
2093
2140
|
const newValue = effect.run();
|
|
2094
2141
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2095
|
-
if (cleanup) {
|
|
2096
|
-
cleanup();
|
|
2097
|
-
}
|
|
2098
2142
|
const currentWatcher = activeWatcher;
|
|
2099
|
-
|
|
2143
|
+
pauseTracking();
|
|
2100
2144
|
try {
|
|
2145
|
+
if (cleanup) {
|
|
2146
|
+
cleanup();
|
|
2147
|
+
}
|
|
2148
|
+
activeWatcher = effect;
|
|
2101
2149
|
const args = [
|
|
2102
2150
|
newValue,
|
|
2103
2151
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2111,6 +2159,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2111
2159
|
);
|
|
2112
2160
|
} finally {
|
|
2113
2161
|
activeWatcher = currentWatcher;
|
|
2162
|
+
resetTracking();
|
|
2114
2163
|
}
|
|
2115
2164
|
}
|
|
2116
2165
|
} else {
|
|
@@ -2378,15 +2427,15 @@ function queuePostFlushCb(cb) {
|
|
|
2378
2427
|
}
|
|
2379
2428
|
queueFlush();
|
|
2380
2429
|
}
|
|
2381
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2430
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2382
2431
|
for (; i < queue.length; i++) {
|
|
2383
2432
|
const cb = queue[i];
|
|
2384
2433
|
if (cb && cb.flags & 2) {
|
|
2385
|
-
if (instance && cb.id !== instance.uid) {
|
|
2434
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2386
2435
|
continue;
|
|
2387
2436
|
}
|
|
2388
2437
|
queue.splice(i, 1);
|
|
2389
|
-
i
|
|
2438
|
+
i = instance ? i - 1 : flushIndex;
|
|
2390
2439
|
if (cb.flags & 4) {
|
|
2391
2440
|
cb.flags &= -2;
|
|
2392
2441
|
}
|
|
@@ -2397,12 +2446,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2397
2446
|
}
|
|
2398
2447
|
}
|
|
2399
2448
|
}
|
|
2400
|
-
function flushPostFlushCbs(seen) {
|
|
2449
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2401
2450
|
if (pendingPostFlushCbs.length) {
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
)
|
|
2405
|
-
|
|
2451
|
+
let cbs = pendingPostFlushCbs;
|
|
2452
|
+
let kept = 0;
|
|
2453
|
+
if (skip) {
|
|
2454
|
+
cbs = [];
|
|
2455
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2456
|
+
const cb = pendingPostFlushCbs[i];
|
|
2457
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2458
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2459
|
+
} else {
|
|
2460
|
+
cbs.push(cb);
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2465
|
+
pendingPostFlushCbs.length = kept;
|
|
2406
2466
|
if (activePostFlushCbs) {
|
|
2407
2467
|
for (let i = 0; i < deduped.length; i++) {
|
|
2408
2468
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2422,6 +2482,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2422
2482
|
postFlushIndex = 0;
|
|
2423
2483
|
}
|
|
2424
2484
|
}
|
|
2485
|
+
let isFlushing = false;
|
|
2486
|
+
function flushOnAppMount(fn, minUid) {
|
|
2487
|
+
if (isFlushing) {
|
|
2488
|
+
fn();
|
|
2489
|
+
return;
|
|
2490
|
+
}
|
|
2491
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2492
|
+
fn();
|
|
2493
|
+
isFlushing = true;
|
|
2494
|
+
try {
|
|
2495
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2496
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2497
|
+
} finally {
|
|
2498
|
+
isFlushing = false;
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2425
2501
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2426
2502
|
function flushJobs(seen) {
|
|
2427
2503
|
try {
|
|
@@ -2837,6 +2913,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
2837
2913
|
let isPre = false;
|
|
2838
2914
|
if (flush === "post") {
|
|
2839
2915
|
baseWatchOptions.scheduler = (job) => {
|
|
2916
|
+
job.i = instance;
|
|
2840
2917
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
2841
2918
|
};
|
|
2842
2919
|
} else if (flush !== "sync") {
|
|
@@ -3115,7 +3192,11 @@ const TeleportImpl = {
|
|
|
3115
3192
|
};
|
|
3116
3193
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
3117
3194
|
if (moveType === 0) {
|
|
3195
|
+
if (vnode.targetStart) {
|
|
3196
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
3197
|
+
}
|
|
3118
3198
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3199
|
+
parentAnchor = vnode.targetAnchor;
|
|
3119
3200
|
}
|
|
3120
3201
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3121
3202
|
const isReorder = moveType === 2;
|
|
@@ -3284,10 +3365,6 @@ const BaseTransitionPropsValidators = {
|
|
|
3284
3365
|
onAfterAppear: TransitionHookValidator,
|
|
3285
3366
|
onAppearCancelled: TransitionHookValidator
|
|
3286
3367
|
};
|
|
3287
|
-
const recursiveGetSubtree = (instance) => {
|
|
3288
|
-
const subTree = instance.subTree;
|
|
3289
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
3290
|
-
};
|
|
3291
3368
|
const BaseTransitionImpl = {
|
|
3292
3369
|
name: `BaseTransition`,
|
|
3293
3370
|
props: BaseTransitionPropsValidators,
|
|
@@ -3325,7 +3402,7 @@ const BaseTransitionImpl = {
|
|
|
3325
3402
|
setTransitionHooks(innerChild, enterHooks);
|
|
3326
3403
|
}
|
|
3327
3404
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3328
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
3405
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
3329
3406
|
let leavingHooks = resolveTransitionHooks(
|
|
3330
3407
|
oldInnerChild,
|
|
3331
3408
|
rawProps,
|
|
@@ -3454,8 +3531,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3454
3531
|
);
|
|
3455
3532
|
}
|
|
3456
3533
|
const leavingVNode = leavingVNodesCache[key];
|
|
3457
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
3458
|
-
leavingVNode.el[leaveCbKey]
|
|
3534
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
3535
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
3536
|
+
if (!leavingCb) {
|
|
3537
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
3538
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
3539
|
+
}
|
|
3540
|
+
if (leavingCb) {
|
|
3541
|
+
leavingCb();
|
|
3542
|
+
}
|
|
3459
3543
|
}
|
|
3460
3544
|
callHook(hook, [el]);
|
|
3461
3545
|
},
|
|
@@ -3583,6 +3667,12 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
3583
3667
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3584
3668
|
} else {
|
|
3585
3669
|
vnode.transition = hooks;
|
|
3670
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
3671
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
3672
|
+
if (child) {
|
|
3673
|
+
setTransitionHooks(child, hooks);
|
|
3674
|
+
}
|
|
3675
|
+
}
|
|
3586
3676
|
}
|
|
3587
3677
|
}
|
|
3588
3678
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -3607,6 +3697,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3607
3697
|
}
|
|
3608
3698
|
return ret;
|
|
3609
3699
|
}
|
|
3700
|
+
function getTransitionRoot(vnode) {
|
|
3701
|
+
if (vnode.component) {
|
|
3702
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
3703
|
+
}
|
|
3704
|
+
if (vnode.type === Fragment) {
|
|
3705
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3706
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
3707
|
+
}
|
|
3708
|
+
if (vnode.type !== Comment) {
|
|
3709
|
+
return vnode;
|
|
3710
|
+
}
|
|
3711
|
+
}
|
|
3610
3712
|
|
|
3611
3713
|
// @__NO_SIDE_EFFECTS__
|
|
3612
3714
|
function defineComponent(options, extraOptions) {
|
|
@@ -3927,13 +4029,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3927
4029
|
getContainerType(container),
|
|
3928
4030
|
optimized
|
|
3929
4031
|
);
|
|
3930
|
-
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
4032
|
+
if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
|
|
3931
4033
|
let subTree;
|
|
3932
4034
|
if (isFragmentStart) {
|
|
3933
4035
|
subTree = createVNode(Static);
|
|
3934
4036
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
3935
4037
|
} else {
|
|
3936
|
-
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4038
|
+
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4039
|
+
node.nodeType === 8 ? Comment : "div"
|
|
4040
|
+
);
|
|
3937
4041
|
}
|
|
3938
4042
|
subTree.el = node;
|
|
3939
4043
|
vnode.component.subTree = subTree;
|
|
@@ -4299,14 +4403,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
4299
4403
|
break;
|
|
4300
4404
|
}
|
|
4301
4405
|
}, opts);
|
|
4302
|
-
|
|
4303
|
-
if (!(el instanceof Element)) return;
|
|
4406
|
+
const observe = (el) => {
|
|
4304
4407
|
if (elementIsVisibleInViewport(el)) {
|
|
4305
4408
|
hydrate();
|
|
4306
4409
|
ob.disconnect();
|
|
4307
4410
|
return false;
|
|
4308
4411
|
}
|
|
4412
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4413
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
4414
|
+
if (observe(el.children[i]) === false) return false;
|
|
4415
|
+
}
|
|
4416
|
+
}
|
|
4309
4417
|
ob.observe(el);
|
|
4418
|
+
};
|
|
4419
|
+
forEach((el) => {
|
|
4420
|
+
if (!(el instanceof Element)) return;
|
|
4421
|
+
return observe(el);
|
|
4310
4422
|
});
|
|
4311
4423
|
return () => ob.disconnect();
|
|
4312
4424
|
};
|
|
@@ -4638,6 +4750,7 @@ const KeepAliveImpl = {
|
|
|
4638
4750
|
unmount(cached);
|
|
4639
4751
|
} else if (current) {
|
|
4640
4752
|
resetShapeFlag(current);
|
|
4753
|
+
if (cached) resetShapeFlag(cached);
|
|
4641
4754
|
}
|
|
4642
4755
|
cache.delete(key);
|
|
4643
4756
|
keys.delete(key);
|
|
@@ -5202,7 +5315,9 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5202
5315
|
);
|
|
5203
5316
|
}
|
|
5204
5317
|
} else if (typeof source === "number") {
|
|
5205
|
-
{
|
|
5318
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
5319
|
+
ret = [];
|
|
5320
|
+
} else {
|
|
5206
5321
|
ret = new Array(source);
|
|
5207
5322
|
for (let i = 0; i < source; i++) {
|
|
5208
5323
|
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
@@ -5503,6 +5618,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5503
5618
|
$vnode: (i) => i.vnode,
|
|
5504
5619
|
// some private properties that are likely accessed...
|
|
5505
5620
|
_self: (i) => i.proxy,
|
|
5621
|
+
_setupProxy: (i) => i.setupState,
|
|
5506
5622
|
_uid: (i) => i.uid,
|
|
5507
5623
|
_data: (i) => i.data,
|
|
5508
5624
|
_isMounted: (i) => i.isMounted,
|
|
@@ -6218,7 +6334,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6218
6334
|
return vm;
|
|
6219
6335
|
}
|
|
6220
6336
|
}
|
|
6221
|
-
Vue.version = `2.6.14-compat:${"3.5.
|
|
6337
|
+
Vue.version = `2.6.14-compat:${"3.5.44"}`;
|
|
6222
6338
|
Vue.config = singletonApp.config;
|
|
6223
6339
|
Vue.use = (plugin, ...options) => {
|
|
6224
6340
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7113,7 +7229,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
7113
7229
|
}
|
|
7114
7230
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7115
7231
|
const key = nextKeys[i];
|
|
7116
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
7232
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
7117
7233
|
return true;
|
|
7118
7234
|
}
|
|
7119
7235
|
}
|
|
@@ -7613,6 +7729,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7613
7729
|
optimized = false;
|
|
7614
7730
|
n2.dynamicChildren = null;
|
|
7615
7731
|
}
|
|
7732
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
7733
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
7734
|
+
n2.dynamicChildren = [];
|
|
7735
|
+
}
|
|
7736
|
+
n2.dynamicChildren.hasOnce = true;
|
|
7737
|
+
}
|
|
7616
7738
|
const { type, ref, shapeFlag } = n2;
|
|
7617
7739
|
switch (type) {
|
|
7618
7740
|
case Text:
|
|
@@ -7982,15 +8104,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7982
8104
|
for (let i = 0; i < newChildren.length; i++) {
|
|
7983
8105
|
const oldVNode = oldChildren[i];
|
|
7984
8106
|
const newVNode = newChildren[i];
|
|
8107
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
7985
8108
|
const container = (
|
|
7986
8109
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
7987
8110
|
// which will not have a mounted element
|
|
7988
|
-
|
|
8111
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
7989
8112
|
// of the Fragment itself so it can move its children.
|
|
7990
8113
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
7991
8114
|
// which also requires the correct parent container
|
|
7992
8115
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
7993
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
8116
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
7994
8117
|
// In other cases, the parent container is not actually used so we
|
|
7995
8118
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
7996
8119
|
fallbackContainer
|
|
@@ -8144,7 +8267,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8144
8267
|
setupComponent(instance, false, optimized);
|
|
8145
8268
|
}
|
|
8146
8269
|
if (instance.asyncDep) {
|
|
8147
|
-
parentSuspense && parentSuspense.registerDep(
|
|
8270
|
+
parentSuspense && parentSuspense.registerDep(
|
|
8271
|
+
instance,
|
|
8272
|
+
setupRenderEffect,
|
|
8273
|
+
optimized,
|
|
8274
|
+
namespace
|
|
8275
|
+
);
|
|
8148
8276
|
if (!initialVNode.el) {
|
|
8149
8277
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
8150
8278
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -8166,6 +8294,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8166
8294
|
const instance = n2.component = n1.component;
|
|
8167
8295
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
8168
8296
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8297
|
+
n2.el = n1.el;
|
|
8298
|
+
n2.placeholder = n1.placeholder;
|
|
8169
8299
|
updateComponentPreRender(instance, n2, optimized);
|
|
8170
8300
|
return;
|
|
8171
8301
|
} else {
|
|
@@ -8174,6 +8304,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8174
8304
|
}
|
|
8175
8305
|
} else {
|
|
8176
8306
|
n2.el = n1.el;
|
|
8307
|
+
n2.placeholder = n1.placeholder;
|
|
8177
8308
|
instance.vnode = n2;
|
|
8178
8309
|
}
|
|
8179
8310
|
};
|
|
@@ -8719,7 +8850,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8719
8850
|
cacheIndex,
|
|
8720
8851
|
memo
|
|
8721
8852
|
} = vnode;
|
|
8722
|
-
if (patchFlag === -2) {
|
|
8853
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
8723
8854
|
optimized = false;
|
|
8724
8855
|
}
|
|
8725
8856
|
if (ref != null) {
|
|
@@ -8727,7 +8858,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8727
8858
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
8728
8859
|
resetTracking();
|
|
8729
8860
|
}
|
|
8730
|
-
if (cacheIndex != null) {
|
|
8861
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
8731
8862
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
8732
8863
|
}
|
|
8733
8864
|
if (shapeFlag & 256) {
|
|
@@ -8792,27 +8923,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8792
8923
|
};
|
|
8793
8924
|
const remove = (vnode) => {
|
|
8794
8925
|
const { type, el, anchor, transition } = vnode;
|
|
8795
|
-
|
|
8796
|
-
|
|
8797
|
-
|
|
8798
|
-
}
|
|
8926
|
+
const isFragment = type === Fragment;
|
|
8927
|
+
if (isFragment && !transition) {
|
|
8928
|
+
removeFragment(el, anchor);
|
|
8799
8929
|
return;
|
|
8800
8930
|
}
|
|
8801
8931
|
if (type === Static) {
|
|
8802
8932
|
removeStaticNode(vnode);
|
|
8933
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
8934
|
+
transition.afterLeave();
|
|
8935
|
+
}
|
|
8803
8936
|
return;
|
|
8804
8937
|
}
|
|
8938
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
8805
8939
|
const performRemove = () => {
|
|
8806
|
-
|
|
8940
|
+
if (isFragment) {
|
|
8941
|
+
if (hostParentNode(el)) {
|
|
8942
|
+
removeFragment(el, anchor);
|
|
8943
|
+
}
|
|
8944
|
+
} else {
|
|
8945
|
+
hostRemove(el);
|
|
8946
|
+
}
|
|
8807
8947
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
8808
8948
|
transition.afterLeave();
|
|
8809
8949
|
}
|
|
8810
8950
|
};
|
|
8811
|
-
if (
|
|
8951
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
8812
8952
|
const { leave, delayLeave } = transition;
|
|
8813
|
-
const
|
|
8953
|
+
const leavingEl = leavingNode.el;
|
|
8954
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
8814
8955
|
if (delayLeave) {
|
|
8815
|
-
delayLeave(
|
|
8956
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
8816
8957
|
} else {
|
|
8817
8958
|
performLeave();
|
|
8818
8959
|
}
|
|
@@ -8843,6 +8984,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8843
8984
|
if (job) {
|
|
8844
8985
|
job.flags |= 8;
|
|
8845
8986
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8987
|
+
} else if (instance.vnode.el && subTree) {
|
|
8988
|
+
subTree.transition = instance.vnode.transition;
|
|
8989
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8846
8990
|
}
|
|
8847
8991
|
if (um) {
|
|
8848
8992
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -8873,32 +9017,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8873
9017
|
const teleportEnd = el && el[TeleportEndKey];
|
|
8874
9018
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
8875
9019
|
};
|
|
8876
|
-
let isFlushing = false;
|
|
8877
9020
|
const render = (vnode, container, namespace) => {
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
if (
|
|
8881
|
-
|
|
8882
|
-
|
|
9021
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
9022
|
+
flushOnAppMount(() => {
|
|
9023
|
+
if (vnode == null) {
|
|
9024
|
+
if (container._vnode) {
|
|
9025
|
+
unmount(container._vnode, null, null, true);
|
|
9026
|
+
}
|
|
9027
|
+
} else {
|
|
9028
|
+
patch(
|
|
9029
|
+
container._vnode || null,
|
|
9030
|
+
vnode,
|
|
9031
|
+
container,
|
|
9032
|
+
null,
|
|
9033
|
+
null,
|
|
9034
|
+
null,
|
|
9035
|
+
namespace
|
|
9036
|
+
);
|
|
8883
9037
|
}
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
container._vnode || null,
|
|
8887
|
-
vnode,
|
|
8888
|
-
container,
|
|
8889
|
-
null,
|
|
8890
|
-
null,
|
|
8891
|
-
null,
|
|
8892
|
-
namespace
|
|
8893
|
-
);
|
|
8894
|
-
}
|
|
8895
|
-
container._vnode = vnode;
|
|
8896
|
-
if (!isFlushing) {
|
|
8897
|
-
isFlushing = true;
|
|
8898
|
-
flushPreFlushCbs(instance);
|
|
8899
|
-
flushPostFlushCbs();
|
|
8900
|
-
isFlushing = false;
|
|
8901
|
-
}
|
|
9038
|
+
container._vnode = vnode;
|
|
9039
|
+
}, minUid);
|
|
8902
9040
|
};
|
|
8903
9041
|
const internals = {
|
|
8904
9042
|
p: patch,
|
|
@@ -9057,7 +9195,7 @@ const SuspenseImpl = {
|
|
|
9057
9195
|
rendererInternals
|
|
9058
9196
|
);
|
|
9059
9197
|
} else {
|
|
9060
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
9198
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
9061
9199
|
n2.suspense = n1.suspense;
|
|
9062
9200
|
n2.suspense.vnode = n2;
|
|
9063
9201
|
n2.el = n1.el;
|
|
@@ -9143,10 +9281,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9143
9281
|
if (pendingBranch) {
|
|
9144
9282
|
suspense.pendingBranch = newBranch;
|
|
9145
9283
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
9284
|
+
suspense.deps++;
|
|
9146
9285
|
patch(
|
|
9147
9286
|
pendingBranch,
|
|
9148
9287
|
newBranch,
|
|
9149
|
-
|
|
9288
|
+
// a hydrating pending branch is adopted SSR DOM, already in place
|
|
9289
|
+
isHydrating ? container : suspense.hiddenContainer,
|
|
9150
9290
|
null,
|
|
9151
9291
|
parentComponent,
|
|
9152
9292
|
suspense,
|
|
@@ -9154,6 +9294,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9154
9294
|
slotScopeIds,
|
|
9155
9295
|
optimized
|
|
9156
9296
|
);
|
|
9297
|
+
suspense.deps--;
|
|
9157
9298
|
if (suspense.deps <= 0) {
|
|
9158
9299
|
suspense.resolve();
|
|
9159
9300
|
} else if (isInFallback) {
|
|
@@ -9397,6 +9538,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9397
9538
|
suspense.effects = [];
|
|
9398
9539
|
if (isSuspensible) {
|
|
9399
9540
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
9541
|
+
parentSuspenseId = void 0;
|
|
9400
9542
|
parentSuspense.deps--;
|
|
9401
9543
|
if (parentSuspense.deps === 0 && !sync) {
|
|
9402
9544
|
parentSuspense.resolve();
|
|
@@ -9457,7 +9599,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9457
9599
|
next() {
|
|
9458
9600
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
9459
9601
|
},
|
|
9460
|
-
|
|
9602
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
9603
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
9604
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
9605
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
9461
9606
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9462
9607
|
if (isInPendingSuspense) {
|
|
9463
9608
|
suspense.deps++;
|
|
@@ -9470,6 +9615,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9470
9615
|
return;
|
|
9471
9616
|
}
|
|
9472
9617
|
unsetCurrentInstance();
|
|
9618
|
+
if (!instance.scope.active) {
|
|
9619
|
+
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
9620
|
+
suspense.resolve();
|
|
9621
|
+
}
|
|
9622
|
+
return;
|
|
9623
|
+
}
|
|
9473
9624
|
instance.asyncResolved = true;
|
|
9474
9625
|
const { vnode: vnode2 } = instance;
|
|
9475
9626
|
handleSetupResult(instance, asyncSetupResult, false);
|
|
@@ -9488,7 +9639,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9488
9639
|
// consider the comment placeholder case.
|
|
9489
9640
|
hydratedEl ? null : next(instance.subTree),
|
|
9490
9641
|
suspense,
|
|
9491
|
-
|
|
9642
|
+
namespace2,
|
|
9492
9643
|
optimized2
|
|
9493
9644
|
);
|
|
9494
9645
|
if (placeholder) {
|
|
@@ -9903,7 +10054,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9903
10054
|
el: vnode.el,
|
|
9904
10055
|
anchor: vnode.anchor,
|
|
9905
10056
|
ctx: vnode.ctx,
|
|
9906
|
-
ce: vnode.ce
|
|
10057
|
+
ce: vnode.ce,
|
|
10058
|
+
cacheIndex: vnode.cacheIndex
|
|
9907
10059
|
};
|
|
9908
10060
|
if (transition && cloneTransition) {
|
|
9909
10061
|
setTransitionHooks(
|
|
@@ -10032,6 +10184,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
10032
10184
|
|
|
10033
10185
|
const emptyAppContext = createAppContext();
|
|
10034
10186
|
let uid = 0;
|
|
10187
|
+
function getNextUid() {
|
|
10188
|
+
return uid;
|
|
10189
|
+
}
|
|
10035
10190
|
function createComponentInstance(vnode, parent, suspense) {
|
|
10036
10191
|
const type = vnode.type;
|
|
10037
10192
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -10395,7 +10550,7 @@ function isMemoSame(cached, memo) {
|
|
|
10395
10550
|
return true;
|
|
10396
10551
|
}
|
|
10397
10552
|
|
|
10398
|
-
const version = "3.5.
|
|
10553
|
+
const version = "3.5.44";
|
|
10399
10554
|
const warn$1 = NOOP;
|
|
10400
10555
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10401
10556
|
const devtools = void 0;
|
|
@@ -10943,7 +11098,9 @@ function patchStyle(el, prev, next) {
|
|
|
10943
11098
|
}
|
|
10944
11099
|
}
|
|
10945
11100
|
if (vShowOriginalDisplay in el) {
|
|
10946
|
-
|
|
11101
|
+
if (!isCssString || prev !== next) {
|
|
11102
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
11103
|
+
}
|
|
10947
11104
|
if (el[vShowHidden]) {
|
|
10948
11105
|
style.display = "none";
|
|
10949
11106
|
}
|
|
@@ -11431,7 +11588,9 @@ class VueElement extends BaseClass {
|
|
|
11431
11588
|
if (this.shadowRoot) {
|
|
11432
11589
|
this._applyStyles(styles);
|
|
11433
11590
|
}
|
|
11434
|
-
this.
|
|
11591
|
+
if (this._connected) {
|
|
11592
|
+
this._mount(def);
|
|
11593
|
+
}
|
|
11435
11594
|
};
|
|
11436
11595
|
const asyncDef = this._def.__asyncLoader;
|
|
11437
11596
|
if (asyncDef) {
|
|
@@ -11741,6 +11900,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
11741
11900
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11742
11901
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
11743
11902
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
11903
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
11744
11904
|
const decorate = (t) => {
|
|
11745
11905
|
delete t.props.mode;
|
|
11746
11906
|
{
|
|
@@ -11759,21 +11919,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11759
11919
|
const state = useTransitionState();
|
|
11760
11920
|
let prevChildren;
|
|
11761
11921
|
let children;
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11922
|
+
let origins;
|
|
11923
|
+
let moves;
|
|
11924
|
+
const willMove = () => {
|
|
11925
|
+
if (moves === void 0) {
|
|
11926
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
11927
|
+
prevChildren[0].el,
|
|
11928
|
+
instance.vnode.el,
|
|
11929
|
+
resolveMoveClass(props)
|
|
11930
|
+
);
|
|
11765
11931
|
}
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
)) {
|
|
11932
|
+
return moves;
|
|
11933
|
+
};
|
|
11934
|
+
onUpdated(() => {
|
|
11935
|
+
pendingGroups.delete(instance);
|
|
11936
|
+
if (!willMove()) {
|
|
11772
11937
|
prevChildren = [];
|
|
11938
|
+
origins = void 0;
|
|
11773
11939
|
return;
|
|
11774
11940
|
}
|
|
11941
|
+
const moveClass = resolveMoveClass(props);
|
|
11775
11942
|
prevChildren.forEach(callPendingCbs);
|
|
11776
|
-
|
|
11943
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
11944
|
+
origins = void 0;
|
|
11945
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
11777
11946
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
11778
11947
|
forceReflow(instance.vnode.el);
|
|
11779
11948
|
movedChildren.forEach((c) => {
|
|
@@ -11806,6 +11975,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11806
11975
|
tag = "span";
|
|
11807
11976
|
}
|
|
11808
11977
|
prevChildren = [];
|
|
11978
|
+
moves = void 0;
|
|
11809
11979
|
if (children) {
|
|
11810
11980
|
for (let i = 0; i < children.length; i++) {
|
|
11811
11981
|
const child = children[i];
|
|
@@ -11835,6 +12005,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
11835
12005
|
);
|
|
11836
12006
|
}
|
|
11837
12007
|
}
|
|
12008
|
+
if (prevChildren.length) {
|
|
12009
|
+
origins = getOrigins(instance);
|
|
12010
|
+
pendingGroups.set(instance, willMove);
|
|
12011
|
+
}
|
|
11838
12012
|
return createVNode(tag, null, children);
|
|
11839
12013
|
};
|
|
11840
12014
|
}
|
|
@@ -11849,8 +12023,11 @@ function callPendingCbs(c) {
|
|
|
11849
12023
|
el[enterCbKey]();
|
|
11850
12024
|
}
|
|
11851
12025
|
}
|
|
11852
|
-
function
|
|
11853
|
-
|
|
12026
|
+
function resolveMoveClass(props) {
|
|
12027
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
12028
|
+
}
|
|
12029
|
+
function recordPosition(c, shift) {
|
|
12030
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
11854
12031
|
}
|
|
11855
12032
|
function applyTranslation(c) {
|
|
11856
12033
|
const oldPos = positionMap.get(c);
|
|
@@ -11874,13 +12051,41 @@ function applyTranslation(c) {
|
|
|
11874
12051
|
return c;
|
|
11875
12052
|
}
|
|
11876
12053
|
}
|
|
11877
|
-
function getPosition(el) {
|
|
12054
|
+
function getPosition(el, shift) {
|
|
11878
12055
|
const rect = el.getBoundingClientRect();
|
|
11879
12056
|
return {
|
|
11880
|
-
left: rect.left,
|
|
11881
|
-
top: rect.top
|
|
12057
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
12058
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
11882
12059
|
};
|
|
11883
12060
|
}
|
|
12061
|
+
function getOrigins(instance) {
|
|
12062
|
+
let origins;
|
|
12063
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
12064
|
+
const willMove = pendingGroups.get(group);
|
|
12065
|
+
if (willMove) {
|
|
12066
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
12067
|
+
if (item) {
|
|
12068
|
+
(origins || (origins = [])).push(
|
|
12069
|
+
extend$1(getPosition(item), { item, willMove })
|
|
12070
|
+
);
|
|
12071
|
+
}
|
|
12072
|
+
}
|
|
12073
|
+
}
|
|
12074
|
+
return origins;
|
|
12075
|
+
}
|
|
12076
|
+
function findItem(root, node) {
|
|
12077
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
12078
|
+
while (node && node.parentNode !== container) {
|
|
12079
|
+
node = node.parentNode;
|
|
12080
|
+
}
|
|
12081
|
+
if (node && node.nodeType === 1) {
|
|
12082
|
+
return node;
|
|
12083
|
+
}
|
|
12084
|
+
}
|
|
12085
|
+
function getOriginShift(origins, root) {
|
|
12086
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
12087
|
+
return origin && getPosition(origin.item, origin);
|
|
12088
|
+
}
|
|
11884
12089
|
function hasCSSTransform(el, root, moveClass) {
|
|
11885
12090
|
const clone = el.cloneNode();
|
|
11886
12091
|
const _vtc = el[vtcKey];
|
|
@@ -13786,7 +13991,8 @@ const errorMessages = {
|
|
|
13786
13991
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
13787
13992
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
13788
13993
|
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
13789
|
-
Use a v-bind binding combined with a v-on listener that emits update:x event instead
|
|
13994
|
+
Use a v-bind binding combined with a v-on listener that emits update:x event instead.
|
|
13995
|
+
For props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
|
|
13790
13996
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
13791
13997
|
[46]: `Error parsing JavaScript expression: `,
|
|
13792
13998
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -17131,7 +17337,7 @@ const transformFor = createStructuralDirectiveTransform(
|
|
|
17131
17337
|
createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
|
|
17132
17338
|
createCompoundExpression([
|
|
17133
17339
|
`if (_cached && _cached.el`,
|
|
17134
|
-
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
17340
|
+
...keyExp ? [` && _cached.key === (`, keyExp, `)`] : [],
|
|
17135
17341
|
` && ${context.helperString(
|
|
17136
17342
|
IS_MEMO_SAME
|
|
17137
17343
|
)}(_cached, _memo)) return _cached`
|
|
@@ -19166,6 +19372,41 @@ const transformShow = (dir, node, context) => {
|
|
|
19166
19372
|
};
|
|
19167
19373
|
};
|
|
19168
19374
|
|
|
19375
|
+
const transformTransition = (node, context) => {
|
|
19376
|
+
if (node.type === 1 && node.tagType === 1) {
|
|
19377
|
+
const component = context.isBuiltInComponent(node.tag);
|
|
19378
|
+
if (component === TRANSITION) {
|
|
19379
|
+
return () => {
|
|
19380
|
+
if (!node.children.length) {
|
|
19381
|
+
return;
|
|
19382
|
+
}
|
|
19383
|
+
hasMultipleChildren(node);
|
|
19384
|
+
const child = node.children[0];
|
|
19385
|
+
if (child.type === 1) {
|
|
19386
|
+
for (const p of child.props) {
|
|
19387
|
+
if (p.type === 7 && p.name === "show") {
|
|
19388
|
+
node.props.push({
|
|
19389
|
+
type: 6,
|
|
19390
|
+
name: "persisted",
|
|
19391
|
+
nameLoc: node.loc,
|
|
19392
|
+
value: void 0,
|
|
19393
|
+
loc: node.loc
|
|
19394
|
+
});
|
|
19395
|
+
}
|
|
19396
|
+
}
|
|
19397
|
+
}
|
|
19398
|
+
};
|
|
19399
|
+
}
|
|
19400
|
+
}
|
|
19401
|
+
};
|
|
19402
|
+
function hasMultipleChildren(node) {
|
|
19403
|
+
const children = node.children = node.children.filter(
|
|
19404
|
+
(c) => !isCommentOrWhitespace(c)
|
|
19405
|
+
);
|
|
19406
|
+
const child = children[0];
|
|
19407
|
+
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
19408
|
+
}
|
|
19409
|
+
|
|
19169
19410
|
const expReplaceRE = /__VUE_EXP_START__(.*?)__VUE_EXP_END__/g;
|
|
19170
19411
|
const stringifyStatic = (children, context, parent) => {
|
|
19171
19412
|
if (context.scopes.vSlot > 0) {
|
|
@@ -19323,8 +19564,9 @@ function stringifyNode(node, context) {
|
|
|
19323
19564
|
}
|
|
19324
19565
|
}
|
|
19325
19566
|
function stringifyElement(node, context) {
|
|
19567
|
+
var _a;
|
|
19326
19568
|
let res = `<${node.tag}`;
|
|
19327
|
-
let innerHTML =
|
|
19569
|
+
let innerHTML = void 0;
|
|
19328
19570
|
for (let i = 0; i < node.props.length; i++) {
|
|
19329
19571
|
const p = node.props[i];
|
|
19330
19572
|
if (p.type === 6) {
|
|
@@ -19358,7 +19600,7 @@ function stringifyElement(node, context) {
|
|
|
19358
19600
|
)}"`;
|
|
19359
19601
|
}
|
|
19360
19602
|
} else if (p.name === "html") {
|
|
19361
|
-
innerHTML = evaluateConstant(p.exp);
|
|
19603
|
+
innerHTML = (_a = evaluateConstant(p.exp)) != null ? _a : "";
|
|
19362
19604
|
} else if (p.name === "text") {
|
|
19363
19605
|
innerHTML = escapeHtml(
|
|
19364
19606
|
toDisplayString(evaluateConstant(p.exp))
|
|
@@ -19370,7 +19612,7 @@ function stringifyElement(node, context) {
|
|
|
19370
19612
|
res += ` ${context.scopeId}`;
|
|
19371
19613
|
}
|
|
19372
19614
|
res += `>`;
|
|
19373
|
-
if (innerHTML) {
|
|
19615
|
+
if (innerHTML !== void 0) {
|
|
19374
19616
|
res += innerHTML;
|
|
19375
19617
|
} else {
|
|
19376
19618
|
for (let i = 0; i < node.children.length; i++) {
|
|
@@ -19411,6 +19653,7 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
19411
19653
|
|
|
19412
19654
|
const DOMNodeTransforms = [
|
|
19413
19655
|
transformStyle,
|
|
19656
|
+
transformTransition,
|
|
19414
19657
|
...[]
|
|
19415
19658
|
];
|
|
19416
19659
|
const DOMDirectiveTransforms = {
|