@vue/server-renderer 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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/server-renderer v3.5.
|
|
2
|
+
* @vue/server-renderer v3.5.44
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -120,10 +120,10 @@ function normalizeStyle(value) {
|
|
|
120
120
|
}
|
|
121
121
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
122
122
|
const propertyDelimiterRE = /:([^]+)/;
|
|
123
|
-
const styleCommentRE =
|
|
123
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
124
124
|
function parseStringStyle(cssText) {
|
|
125
125
|
const ret = {};
|
|
126
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
126
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
127
127
|
if (item) {
|
|
128
128
|
const tmp = item.split(propertyDelimiterRE);
|
|
129
129
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -174,7 +174,7 @@ const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
|
174
174
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
175
175
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
176
176
|
|
|
177
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
177
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
178
178
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
179
179
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
180
180
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -257,22 +257,22 @@ function escapeHtmlComment(src) {
|
|
|
257
257
|
return src;
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
function looseCompareArrays(a, b) {
|
|
260
|
+
function looseCompareArrays(a, b, seen) {
|
|
261
261
|
if (a.length !== b.length) return false;
|
|
262
262
|
let equal = true;
|
|
263
263
|
for (let i = 0; equal && i < a.length; i++) {
|
|
264
|
-
equal = looseEqual(a[i], b[i]);
|
|
264
|
+
equal = looseEqual(a[i], b[i], seen);
|
|
265
265
|
}
|
|
266
266
|
return equal;
|
|
267
267
|
}
|
|
268
|
-
function looseCompareCollections(a, b) {
|
|
268
|
+
function looseCompareCollections(a, b, seen) {
|
|
269
269
|
if (a.size !== b.size) return false;
|
|
270
270
|
const candidates = Array.from(b);
|
|
271
271
|
const matched = new Uint8Array(candidates.length);
|
|
272
272
|
for (const item of a) {
|
|
273
273
|
let index = -1;
|
|
274
274
|
for (let i = 0; i < candidates.length; i++) {
|
|
275
|
-
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
275
|
+
if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
276
276
|
index = i;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
@@ -282,7 +282,47 @@ function looseCompareCollections(a, b) {
|
|
|
282
282
|
}
|
|
283
283
|
return true;
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function looseCompareObjects(a, b, seen) {
|
|
286
|
+
let aValidType = isMap(a);
|
|
287
|
+
let bValidType = isMap(b);
|
|
288
|
+
if (aValidType || bValidType) {
|
|
289
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
290
|
+
}
|
|
291
|
+
aValidType = isSet(a);
|
|
292
|
+
bValidType = isSet(b);
|
|
293
|
+
if (aValidType || bValidType) {
|
|
294
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
295
|
+
}
|
|
296
|
+
const aKeysCount = Object.keys(a).length;
|
|
297
|
+
const bKeysCount = Object.keys(b).length;
|
|
298
|
+
if (aKeysCount !== bKeysCount) {
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
for (const key in a) {
|
|
302
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
303
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
304
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
|
|
305
|
+
return false;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return String(a) === String(b);
|
|
309
|
+
}
|
|
310
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
311
|
+
if (!seen) {
|
|
312
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
313
|
+
}
|
|
314
|
+
const [seenA, seenB] = seen;
|
|
315
|
+
if (seenA.has(a) || seenB.has(b)) {
|
|
316
|
+
return seenA.get(a) === b && seenB.get(b) === a;
|
|
317
|
+
}
|
|
318
|
+
seenA.set(a, b);
|
|
319
|
+
seenB.set(b, a);
|
|
320
|
+
const equal = compare(a, b, seen);
|
|
321
|
+
seenA.delete(a);
|
|
322
|
+
seenB.delete(b);
|
|
323
|
+
return equal;
|
|
324
|
+
}
|
|
325
|
+
function looseEqual(a, b, seen) {
|
|
286
326
|
if (a === b) return true;
|
|
287
327
|
let aValidType = isDate(a);
|
|
288
328
|
let bValidType = isDate(b);
|
|
@@ -297,7 +337,7 @@ function looseEqual(a, b) {
|
|
|
297
337
|
aValidType = isArray(a);
|
|
298
338
|
bValidType = isArray(b);
|
|
299
339
|
if (aValidType || bValidType) {
|
|
300
|
-
return aValidType && bValidType ?
|
|
340
|
+
return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
301
341
|
}
|
|
302
342
|
aValidType = isObject(a);
|
|
303
343
|
bValidType = isObject(b);
|
|
@@ -305,28 +345,7 @@ function looseEqual(a, b) {
|
|
|
305
345
|
if (!aValidType || !bValidType) {
|
|
306
346
|
return false;
|
|
307
347
|
}
|
|
308
|
-
|
|
309
|
-
bValidType = isMap(b);
|
|
310
|
-
if (aValidType || bValidType) {
|
|
311
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
312
|
-
}
|
|
313
|
-
aValidType = isSet(a);
|
|
314
|
-
bValidType = isSet(b);
|
|
315
|
-
if (aValidType || bValidType) {
|
|
316
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
317
|
-
}
|
|
318
|
-
const aKeysCount = Object.keys(a).length;
|
|
319
|
-
const bKeysCount = Object.keys(b).length;
|
|
320
|
-
if (aKeysCount !== bKeysCount) {
|
|
321
|
-
return false;
|
|
322
|
-
}
|
|
323
|
-
for (const key in a) {
|
|
324
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
325
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
326
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
327
|
-
return false;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
348
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
330
349
|
}
|
|
331
350
|
return String(a) === String(b);
|
|
332
351
|
}
|
|
@@ -1090,7 +1109,9 @@ function reactiveReadArray(array) {
|
|
|
1090
1109
|
const raw = toRaw(array);
|
|
1091
1110
|
if (raw === array) return raw;
|
|
1092
1111
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1093
|
-
|
|
1112
|
+
if (isShallow(array)) return raw;
|
|
1113
|
+
if (!isReadonly(array)) return raw.map(toReactive);
|
|
1114
|
+
return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
1094
1115
|
}
|
|
1095
1116
|
function shallowReadArray(arr) {
|
|
1096
1117
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -1217,19 +1238,41 @@ const arrayInstrumentations = {
|
|
|
1217
1238
|
};
|
|
1218
1239
|
function iterator(self, method, wrapValue) {
|
|
1219
1240
|
const arr = shallowReadArray(self);
|
|
1220
|
-
const
|
|
1241
|
+
const methodFn = arr[method];
|
|
1242
|
+
const iter = methodFn.call(arr);
|
|
1221
1243
|
if (arr !== self && !isShallow(self)) {
|
|
1222
|
-
iter.
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
if (
|
|
1226
|
-
|
|
1244
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1245
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1246
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1247
|
+
if (methodFn !== arrayProto[method]) {
|
|
1248
|
+
Object.defineProperties(wrapped, {
|
|
1249
|
+
return: {
|
|
1250
|
+
get() {
|
|
1251
|
+
const fn = iter.return;
|
|
1252
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1253
|
+
}
|
|
1254
|
+
},
|
|
1255
|
+
throw: {
|
|
1256
|
+
get() {
|
|
1257
|
+
const fn = iter.throw;
|
|
1258
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
});
|
|
1227
1262
|
}
|
|
1228
|
-
return
|
|
1229
|
-
}
|
|
1263
|
+
return wrapped;
|
|
1264
|
+
}
|
|
1265
|
+
iter._next = iter.next;
|
|
1266
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1230
1267
|
}
|
|
1231
1268
|
return iter;
|
|
1232
1269
|
}
|
|
1270
|
+
function wrapResult(result, wrapValue) {
|
|
1271
|
+
if (!result.done) {
|
|
1272
|
+
result.value = wrapValue(result.value);
|
|
1273
|
+
}
|
|
1274
|
+
return result;
|
|
1275
|
+
}
|
|
1233
1276
|
const arrayProto = Array.prototype;
|
|
1234
1277
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1235
1278
|
const arr = shallowReadArray(self);
|
|
@@ -1652,6 +1695,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1652
1695
|
return !isReadonly2;
|
|
1653
1696
|
} else if (key === "__v_isReadonly") {
|
|
1654
1697
|
return isReadonly2;
|
|
1698
|
+
} else if (key === "__v_isShallow") {
|
|
1699
|
+
return shallow;
|
|
1655
1700
|
} else if (key === "__v_raw") {
|
|
1656
1701
|
return target;
|
|
1657
1702
|
}
|
|
@@ -2017,9 +2062,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2017
2062
|
if (once && cb) {
|
|
2018
2063
|
const _cb = cb;
|
|
2019
2064
|
cb = (...args) => {
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2065
|
+
try {
|
|
2066
|
+
return _cb(...args);
|
|
2067
|
+
} finally {
|
|
2068
|
+
watchHandle();
|
|
2069
|
+
}
|
|
2023
2070
|
};
|
|
2024
2071
|
}
|
|
2025
2072
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2030,12 +2077,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2030
2077
|
if (cb) {
|
|
2031
2078
|
const newValue = effect.run();
|
|
2032
2079
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2033
|
-
if (cleanup) {
|
|
2034
|
-
cleanup();
|
|
2035
|
-
}
|
|
2036
2080
|
const currentWatcher = activeWatcher;
|
|
2037
|
-
|
|
2081
|
+
pauseTracking();
|
|
2038
2082
|
try {
|
|
2083
|
+
if (cleanup) {
|
|
2084
|
+
cleanup();
|
|
2085
|
+
}
|
|
2086
|
+
activeWatcher = effect;
|
|
2039
2087
|
const args = [
|
|
2040
2088
|
newValue,
|
|
2041
2089
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2049,6 +2097,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2049
2097
|
);
|
|
2050
2098
|
} finally {
|
|
2051
2099
|
activeWatcher = currentWatcher;
|
|
2100
|
+
resetTracking();
|
|
2052
2101
|
}
|
|
2053
2102
|
}
|
|
2054
2103
|
} else {
|
|
@@ -2410,21 +2459,21 @@ function queuePostFlushCb(cb) {
|
|
|
2410
2459
|
}
|
|
2411
2460
|
queueFlush();
|
|
2412
2461
|
}
|
|
2413
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2462
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2414
2463
|
{
|
|
2415
2464
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2416
2465
|
}
|
|
2417
2466
|
for (; i < queue.length; i++) {
|
|
2418
2467
|
const cb = queue[i];
|
|
2419
2468
|
if (cb && cb.flags & 2) {
|
|
2420
|
-
if (instance && cb.id !== instance.uid) {
|
|
2469
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2421
2470
|
continue;
|
|
2422
2471
|
}
|
|
2423
2472
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
2424
2473
|
continue;
|
|
2425
2474
|
}
|
|
2426
2475
|
queue.splice(i, 1);
|
|
2427
|
-
i
|
|
2476
|
+
i = instance ? i - 1 : flushIndex;
|
|
2428
2477
|
if (cb.flags & 4) {
|
|
2429
2478
|
cb.flags &= -2;
|
|
2430
2479
|
}
|
|
@@ -2435,12 +2484,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2435
2484
|
}
|
|
2436
2485
|
}
|
|
2437
2486
|
}
|
|
2438
|
-
function flushPostFlushCbs(seen) {
|
|
2487
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2439
2488
|
if (pendingPostFlushCbs.length) {
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
)
|
|
2443
|
-
|
|
2489
|
+
let cbs = pendingPostFlushCbs;
|
|
2490
|
+
let kept = 0;
|
|
2491
|
+
if (skip) {
|
|
2492
|
+
cbs = [];
|
|
2493
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2494
|
+
const cb = pendingPostFlushCbs[i];
|
|
2495
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2496
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2497
|
+
} else {
|
|
2498
|
+
cbs.push(cb);
|
|
2499
|
+
}
|
|
2500
|
+
}
|
|
2501
|
+
}
|
|
2502
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2503
|
+
pendingPostFlushCbs.length = kept;
|
|
2444
2504
|
if (activePostFlushCbs) {
|
|
2445
2505
|
for (let i = 0; i < deduped.length; i++) {
|
|
2446
2506
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2466,6 +2526,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2466
2526
|
postFlushIndex = 0;
|
|
2467
2527
|
}
|
|
2468
2528
|
}
|
|
2529
|
+
let isFlushing = false;
|
|
2530
|
+
function flushOnAppMount(fn, minUid) {
|
|
2531
|
+
if (isFlushing) {
|
|
2532
|
+
fn();
|
|
2533
|
+
return;
|
|
2534
|
+
}
|
|
2535
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2536
|
+
fn();
|
|
2537
|
+
isFlushing = true;
|
|
2538
|
+
try {
|
|
2539
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2540
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2541
|
+
} finally {
|
|
2542
|
+
isFlushing = false;
|
|
2543
|
+
}
|
|
2544
|
+
}
|
|
2469
2545
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2470
2546
|
function flushJobs(seen) {
|
|
2471
2547
|
{
|
|
@@ -2909,6 +2985,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
2909
2985
|
let isPre = false;
|
|
2910
2986
|
if (flush === "post") {
|
|
2911
2987
|
baseWatchOptions.scheduler = (job) => {
|
|
2988
|
+
job.i = instance;
|
|
2912
2989
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
2913
2990
|
};
|
|
2914
2991
|
} else if (flush !== "sync") {
|
|
@@ -3025,6 +3102,24 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
3025
3102
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3026
3103
|
} else {
|
|
3027
3104
|
vnode.transition = hooks;
|
|
3105
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
3106
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
3107
|
+
if (child) {
|
|
3108
|
+
setTransitionHooks(child, hooks);
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
}
|
|
3112
|
+
}
|
|
3113
|
+
function getTransitionRoot(vnode) {
|
|
3114
|
+
if (vnode.component) {
|
|
3115
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
3116
|
+
}
|
|
3117
|
+
if (vnode.type === Fragment) {
|
|
3118
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3119
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
3120
|
+
}
|
|
3121
|
+
if (vnode.type !== Comment) {
|
|
3122
|
+
return vnode;
|
|
3028
3123
|
}
|
|
3029
3124
|
}
|
|
3030
3125
|
|
|
@@ -4571,7 +4666,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
4571
4666
|
}
|
|
4572
4667
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
4573
4668
|
const key = nextKeys[i];
|
|
4574
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
4669
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
4575
4670
|
return true;
|
|
4576
4671
|
}
|
|
4577
4672
|
}
|
|
@@ -5195,6 +5290,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5195
5290
|
optimized = false;
|
|
5196
5291
|
n2.dynamicChildren = null;
|
|
5197
5292
|
}
|
|
5293
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
5294
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
5295
|
+
n2.dynamicChildren = [];
|
|
5296
|
+
}
|
|
5297
|
+
n2.dynamicChildren.hasOnce = true;
|
|
5298
|
+
}
|
|
5198
5299
|
const { type, ref, shapeFlag } = n2;
|
|
5199
5300
|
switch (type) {
|
|
5200
5301
|
case Text:
|
|
@@ -5601,15 +5702,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5601
5702
|
for (let i = 0; i < newChildren.length; i++) {
|
|
5602
5703
|
const oldVNode = oldChildren[i];
|
|
5603
5704
|
const newVNode = newChildren[i];
|
|
5705
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
5604
5706
|
const container = (
|
|
5605
5707
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
5606
5708
|
// which will not have a mounted element
|
|
5607
|
-
|
|
5709
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
5608
5710
|
// of the Fragment itself so it can move its children.
|
|
5609
5711
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
5610
5712
|
// which also requires the correct parent container
|
|
5611
5713
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
5612
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
5714
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
5613
5715
|
// In other cases, the parent container is not actually used so we
|
|
5614
5716
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
5615
5717
|
fallbackContainer
|
|
@@ -5773,7 +5875,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5773
5875
|
}
|
|
5774
5876
|
if (isHmrUpdating) initialVNode.el = null;
|
|
5775
5877
|
if (instance.asyncDep) {
|
|
5776
|
-
parentSuspense && parentSuspense.registerDep(
|
|
5878
|
+
parentSuspense && parentSuspense.registerDep(
|
|
5879
|
+
instance,
|
|
5880
|
+
setupRenderEffect,
|
|
5881
|
+
optimized,
|
|
5882
|
+
namespace
|
|
5883
|
+
);
|
|
5777
5884
|
if (!initialVNode.el) {
|
|
5778
5885
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
5779
5886
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -5802,6 +5909,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5802
5909
|
{
|
|
5803
5910
|
pushWarningContext$1(n2);
|
|
5804
5911
|
}
|
|
5912
|
+
n2.el = n1.el;
|
|
5913
|
+
n2.placeholder = n1.placeholder;
|
|
5805
5914
|
updateComponentPreRender(instance, n2, optimized);
|
|
5806
5915
|
{
|
|
5807
5916
|
popWarningContext$1();
|
|
@@ -5813,6 +5922,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5813
5922
|
}
|
|
5814
5923
|
} else {
|
|
5815
5924
|
n2.el = n1.el;
|
|
5925
|
+
n2.placeholder = n1.placeholder;
|
|
5816
5926
|
instance.vnode = n2;
|
|
5817
5927
|
}
|
|
5818
5928
|
};
|
|
@@ -6361,7 +6471,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6361
6471
|
cacheIndex,
|
|
6362
6472
|
memo
|
|
6363
6473
|
} = vnode;
|
|
6364
|
-
if (patchFlag === -2) {
|
|
6474
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
6365
6475
|
optimized = false;
|
|
6366
6476
|
}
|
|
6367
6477
|
if (ref != null) {
|
|
@@ -6369,7 +6479,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6369
6479
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
6370
6480
|
resetTracking();
|
|
6371
6481
|
}
|
|
6372
|
-
if (cacheIndex != null) {
|
|
6482
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
6373
6483
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
6374
6484
|
}
|
|
6375
6485
|
if (shapeFlag & 256) {
|
|
@@ -6434,35 +6544,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6434
6544
|
};
|
|
6435
6545
|
const remove = (vnode) => {
|
|
6436
6546
|
const { type, el, anchor, transition } = vnode;
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
if (child.type === Comment) {
|
|
6441
|
-
hostRemove(child.el);
|
|
6442
|
-
} else {
|
|
6443
|
-
remove(child);
|
|
6444
|
-
}
|
|
6445
|
-
});
|
|
6446
|
-
} else {
|
|
6447
|
-
removeFragment(el, anchor);
|
|
6448
|
-
}
|
|
6547
|
+
const isFragment = type === Fragment;
|
|
6548
|
+
if (isFragment && !transition) {
|
|
6549
|
+
removeFragment(el, anchor);
|
|
6449
6550
|
return;
|
|
6450
6551
|
}
|
|
6451
6552
|
if (type === Static) {
|
|
6452
6553
|
removeStaticNode(vnode);
|
|
6554
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6555
|
+
transition.afterLeave();
|
|
6556
|
+
}
|
|
6453
6557
|
return;
|
|
6454
6558
|
}
|
|
6559
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
6455
6560
|
const performRemove = () => {
|
|
6456
|
-
|
|
6561
|
+
if (isFragment) {
|
|
6562
|
+
if (hostParentNode(el)) {
|
|
6563
|
+
removeFragment(el, anchor);
|
|
6564
|
+
}
|
|
6565
|
+
} else {
|
|
6566
|
+
hostRemove(el);
|
|
6567
|
+
}
|
|
6457
6568
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6458
6569
|
transition.afterLeave();
|
|
6459
6570
|
}
|
|
6460
6571
|
};
|
|
6461
|
-
if (
|
|
6572
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
6462
6573
|
const { leave, delayLeave } = transition;
|
|
6463
|
-
const
|
|
6574
|
+
const leavingEl = leavingNode.el;
|
|
6575
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
6464
6576
|
if (delayLeave) {
|
|
6465
|
-
delayLeave(
|
|
6577
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
6466
6578
|
} else {
|
|
6467
6579
|
performLeave();
|
|
6468
6580
|
}
|
|
@@ -6493,6 +6605,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6493
6605
|
if (job) {
|
|
6494
6606
|
job.flags |= 8;
|
|
6495
6607
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6608
|
+
} else if (instance.vnode.el && subTree) {
|
|
6609
|
+
subTree.transition = instance.vnode.transition;
|
|
6610
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6496
6611
|
}
|
|
6497
6612
|
if (um) {
|
|
6498
6613
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -6520,32 +6635,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6520
6635
|
const teleportEnd = el && el[TeleportEndKey];
|
|
6521
6636
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
6522
6637
|
};
|
|
6523
|
-
let isFlushing = false;
|
|
6524
6638
|
const render = (vnode, container, namespace) => {
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
if (
|
|
6528
|
-
|
|
6529
|
-
|
|
6639
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
6640
|
+
flushOnAppMount(() => {
|
|
6641
|
+
if (vnode == null) {
|
|
6642
|
+
if (container._vnode) {
|
|
6643
|
+
unmount(container._vnode, null, null, true);
|
|
6644
|
+
}
|
|
6645
|
+
} else {
|
|
6646
|
+
patch(
|
|
6647
|
+
container._vnode || null,
|
|
6648
|
+
vnode,
|
|
6649
|
+
container,
|
|
6650
|
+
null,
|
|
6651
|
+
null,
|
|
6652
|
+
null,
|
|
6653
|
+
namespace
|
|
6654
|
+
);
|
|
6530
6655
|
}
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
container._vnode || null,
|
|
6534
|
-
vnode,
|
|
6535
|
-
container,
|
|
6536
|
-
null,
|
|
6537
|
-
null,
|
|
6538
|
-
null,
|
|
6539
|
-
namespace
|
|
6540
|
-
);
|
|
6541
|
-
}
|
|
6542
|
-
container._vnode = vnode;
|
|
6543
|
-
if (!isFlushing) {
|
|
6544
|
-
isFlushing = true;
|
|
6545
|
-
flushPreFlushCbs(instance);
|
|
6546
|
-
flushPostFlushCbs();
|
|
6547
|
-
isFlushing = false;
|
|
6548
|
-
}
|
|
6656
|
+
container._vnode = vnode;
|
|
6657
|
+
}, minUid);
|
|
6549
6658
|
};
|
|
6550
6659
|
const internals = {
|
|
6551
6660
|
p: patch,
|
|
@@ -6919,7 +7028,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
6919
7028
|
el: vnode.el,
|
|
6920
7029
|
anchor: vnode.anchor,
|
|
6921
7030
|
ctx: vnode.ctx,
|
|
6922
|
-
ce: vnode.ce
|
|
7031
|
+
ce: vnode.ce,
|
|
7032
|
+
cacheIndex: vnode.cacheIndex
|
|
6923
7033
|
};
|
|
6924
7034
|
if (transition && cloneTransition) {
|
|
6925
7035
|
setTransitionHooks(
|
|
@@ -7044,6 +7154,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
7044
7154
|
|
|
7045
7155
|
const emptyAppContext = createAppContext();
|
|
7046
7156
|
let uid = 0;
|
|
7157
|
+
function getNextUid() {
|
|
7158
|
+
return uid;
|
|
7159
|
+
}
|
|
7047
7160
|
function createComponentInstance$1(vnode, parent, suspense) {
|
|
7048
7161
|
const type = vnode.type;
|
|
7049
7162
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -7447,7 +7560,7 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
7447
7560
|
return c;
|
|
7448
7561
|
};
|
|
7449
7562
|
|
|
7450
|
-
const version = "3.5.
|
|
7563
|
+
const version = "3.5.44";
|
|
7451
7564
|
const warn = warn$1 ;
|
|
7452
7565
|
const _ssrUtils = {
|
|
7453
7566
|
createComponentInstance: createComponentInstance$1,
|
|
@@ -7620,7 +7733,9 @@ function patchStyle(el, prev, next) {
|
|
|
7620
7733
|
}
|
|
7621
7734
|
}
|
|
7622
7735
|
if (vShowOriginalDisplay in el) {
|
|
7623
|
-
|
|
7736
|
+
if (!isCssString || prev !== next) {
|
|
7737
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
7738
|
+
}
|
|
7624
7739
|
if (el[vShowHidden]) {
|
|
7625
7740
|
style.display = "none";
|
|
7626
7741
|
}
|
|
@@ -8267,9 +8382,11 @@ function ssrRenderList(source, renderItem) {
|
|
|
8267
8382
|
}
|
|
8268
8383
|
} else if (typeof source === "number") {
|
|
8269
8384
|
if (!Number.isInteger(source) || source < 0) {
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8385
|
+
{
|
|
8386
|
+
warn(
|
|
8387
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
8388
|
+
);
|
|
8389
|
+
}
|
|
8273
8390
|
return;
|
|
8274
8391
|
}
|
|
8275
8392
|
for (let i = 0; i < source; i++) {
|
|
@@ -8395,23 +8512,28 @@ function renderComponentVNode(vnode, parentComponent = null, slotScopeId) {
|
|
|
8395
8512
|
popWarningContext();
|
|
8396
8513
|
const hasAsyncSetup = isPromise(res);
|
|
8397
8514
|
let prefetches = instance.sp;
|
|
8515
|
+
let p;
|
|
8398
8516
|
if (hasAsyncSetup || prefetches) {
|
|
8399
|
-
|
|
8517
|
+
p = Promise.resolve(res).then(() => {
|
|
8400
8518
|
if (hasAsyncSetup) prefetches = instance.sp;
|
|
8401
8519
|
if (prefetches) {
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8520
|
+
try {
|
|
8521
|
+
return Promise.all(
|
|
8522
|
+
prefetches.map((prefetch) => prefetch.call(instance.proxy))
|
|
8523
|
+
).catch(NOOP);
|
|
8524
|
+
} catch {
|
|
8525
|
+
}
|
|
8405
8526
|
}
|
|
8406
|
-
}).
|
|
8407
|
-
return p.then(() => renderComponentSubTree(instance, slotScopeId));
|
|
8527
|
+
}).then(() => renderComponentSubTree(instance, slotScopeId));
|
|
8408
8528
|
} else {
|
|
8409
8529
|
try {
|
|
8410
8530
|
return renderComponentSubTree(instance, slotScopeId);
|
|
8411
8531
|
} catch (err) {
|
|
8412
|
-
|
|
8532
|
+
p = Promise.reject(err);
|
|
8413
8533
|
}
|
|
8414
8534
|
}
|
|
8535
|
+
p.catch(NOOP);
|
|
8536
|
+
return p;
|
|
8415
8537
|
}
|
|
8416
8538
|
function renderComponentSubTree(instance, slotScopeId) {
|
|
8417
8539
|
pushWarningContext(instance.vnode);
|
|
@@ -8582,13 +8704,13 @@ function renderElementVNode(push, vnode, parentComponent, slotScopeId) {
|
|
|
8582
8704
|
if (!isVoidTag(tag)) {
|
|
8583
8705
|
let hasChildrenOverride = false;
|
|
8584
8706
|
if (props) {
|
|
8585
|
-
if (props.innerHTML) {
|
|
8707
|
+
if (props.innerHTML != null) {
|
|
8586
8708
|
hasChildrenOverride = true;
|
|
8587
|
-
push(props.innerHTML);
|
|
8588
|
-
} else if (props.textContent) {
|
|
8709
|
+
push(String(props.innerHTML));
|
|
8710
|
+
} else if (props.textContent != null) {
|
|
8589
8711
|
hasChildrenOverride = true;
|
|
8590
8712
|
push(escapeHtml(props.textContent));
|
|
8591
|
-
} else if (tag === "textarea" && props.value) {
|
|
8713
|
+
} else if (tag === "textarea" && props.value != null) {
|
|
8592
8714
|
hasChildrenOverride = true;
|
|
8593
8715
|
push(escapeHtml(props.value));
|
|
8594
8716
|
}
|
|
@@ -8704,16 +8826,51 @@ async function renderToString(input, context = {}) {
|
|
|
8704
8826
|
const vnode = createVNode(input._component, input._props);
|
|
8705
8827
|
vnode.appContext = input._context;
|
|
8706
8828
|
input.provide(ssrContextKey, context);
|
|
8707
|
-
|
|
8708
|
-
|
|
8709
|
-
|
|
8710
|
-
|
|
8711
|
-
|
|
8712
|
-
|
|
8713
|
-
|
|
8829
|
+
let buffer;
|
|
8830
|
+
let result;
|
|
8831
|
+
try {
|
|
8832
|
+
buffer = await renderComponentVNode(vnode);
|
|
8833
|
+
result = await unrollBuffer$1(buffer);
|
|
8834
|
+
await resolveTeleports(context);
|
|
8835
|
+
} catch (err) {
|
|
8836
|
+
cleanupFailedRender(buffer, context);
|
|
8837
|
+
throw err;
|
|
8714
8838
|
}
|
|
8839
|
+
stopWatchers(context);
|
|
8715
8840
|
return result;
|
|
8716
8841
|
}
|
|
8842
|
+
function stopWatchers(context, start = 0) {
|
|
8843
|
+
const handles = context.__watcherHandles;
|
|
8844
|
+
if (handles) {
|
|
8845
|
+
for (let i = start; i < handles.length; i++) {
|
|
8846
|
+
handles[i]();
|
|
8847
|
+
}
|
|
8848
|
+
}
|
|
8849
|
+
}
|
|
8850
|
+
function cleanupFailedRender(buffer, context) {
|
|
8851
|
+
const stopped = context.__watcherHandles ? context.__watcherHandles.length : 0;
|
|
8852
|
+
try {
|
|
8853
|
+
stopWatchers(context);
|
|
8854
|
+
} catch {
|
|
8855
|
+
}
|
|
8856
|
+
(async () => {
|
|
8857
|
+
if (buffer) await settleBuffer(buffer);
|
|
8858
|
+
for (const key in context.__teleportBuffers) {
|
|
8859
|
+
await settleBuffer(context.__teleportBuffers[key]);
|
|
8860
|
+
}
|
|
8861
|
+
stopWatchers(context, stopped);
|
|
8862
|
+
})().catch(NOOP);
|
|
8863
|
+
}
|
|
8864
|
+
async function settleBuffer(buffer) {
|
|
8865
|
+
if (!buffer.hasAsync) return;
|
|
8866
|
+
for (let item of buffer) {
|
|
8867
|
+
try {
|
|
8868
|
+
if (isPromise(item)) item = await item;
|
|
8869
|
+
if (!isString(item)) await settleBuffer(item);
|
|
8870
|
+
} catch {
|
|
8871
|
+
}
|
|
8872
|
+
}
|
|
8873
|
+
}
|
|
8717
8874
|
async function resolveTeleports(context) {
|
|
8718
8875
|
if (context.__teleportBuffers) {
|
|
8719
8876
|
context.teleports = context.teleports || {};
|
|
@@ -8764,13 +8921,17 @@ function renderToSimpleStream(input, context, stream) {
|
|
|
8764
8921
|
const vnode = createVNode(input._component, input._props);
|
|
8765
8922
|
vnode.appContext = input._context;
|
|
8766
8923
|
input.provide(ssrContextKey, context);
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8771
|
-
|
|
8924
|
+
let buffer;
|
|
8925
|
+
Promise.resolve(renderComponentVNode(vnode)).then((b) => unrollBuffer(buffer = b, stream)).then(() => resolveTeleports(context)).then(
|
|
8926
|
+
() => {
|
|
8927
|
+
stopWatchers(context);
|
|
8928
|
+
stream.push(null);
|
|
8929
|
+
},
|
|
8930
|
+
(error) => {
|
|
8931
|
+
cleanupFailedRender(buffer, context);
|
|
8932
|
+
throw error;
|
|
8772
8933
|
}
|
|
8773
|
-
|
|
8934
|
+
).catch((error) => {
|
|
8774
8935
|
stream.destroy(error);
|
|
8775
8936
|
});
|
|
8776
8937
|
return stream;
|