@vue/compat 3.3.0-alpha.3 → 3.3.0-alpha.4
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 +491 -491
- package/dist/vue.cjs.prod.js +459 -459
- package/dist/vue.esm-browser.js +445 -445
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +446 -446
- package/dist/vue.global.js +445 -445
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +53 -53
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +54 -54
- package/dist/vue.runtime.global.js +53 -53
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.global.js
CHANGED
|
@@ -1468,7 +1468,7 @@ var Vue = (function () {
|
|
|
1468
1468
|
callWithErrorHandling(
|
|
1469
1469
|
appWarnHandler,
|
|
1470
1470
|
instance,
|
|
1471
|
-
|
|
1471
|
+
11,
|
|
1472
1472
|
[
|
|
1473
1473
|
msg + args.join(""),
|
|
1474
1474
|
instance && instance.proxy,
|
|
@@ -1581,21 +1581,21 @@ var Vue = (function () {
|
|
|
1581
1581
|
["ec"]: "errorCaptured hook",
|
|
1582
1582
|
["rtc"]: "renderTracked hook",
|
|
1583
1583
|
["rtg"]: "renderTriggered hook",
|
|
1584
|
-
[
|
|
1585
|
-
[
|
|
1586
|
-
[
|
|
1587
|
-
[
|
|
1588
|
-
[
|
|
1589
|
-
[
|
|
1590
|
-
[
|
|
1591
|
-
[
|
|
1592
|
-
[
|
|
1593
|
-
[
|
|
1594
|
-
[
|
|
1595
|
-
[
|
|
1596
|
-
[
|
|
1597
|
-
[
|
|
1598
|
-
[
|
|
1584
|
+
[0]: "setup function",
|
|
1585
|
+
[1]: "render function",
|
|
1586
|
+
[2]: "watcher getter",
|
|
1587
|
+
[3]: "watcher callback",
|
|
1588
|
+
[4]: "watcher cleanup function",
|
|
1589
|
+
[5]: "native event handler",
|
|
1590
|
+
[6]: "component event handler",
|
|
1591
|
+
[7]: "vnode hook",
|
|
1592
|
+
[8]: "directive hook",
|
|
1593
|
+
[9]: "transition hook",
|
|
1594
|
+
[10]: "app errorHandler",
|
|
1595
|
+
[11]: "app warnHandler",
|
|
1596
|
+
[12]: "ref function",
|
|
1597
|
+
[13]: "async component loader",
|
|
1598
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
|
|
1599
1599
|
};
|
|
1600
1600
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1601
1601
|
let res;
|
|
@@ -1644,7 +1644,7 @@ var Vue = (function () {
|
|
|
1644
1644
|
callWithErrorHandling(
|
|
1645
1645
|
appErrorHandler,
|
|
1646
1646
|
null,
|
|
1647
|
-
|
|
1647
|
+
10,
|
|
1648
1648
|
[err, exposedInstance, errorInfo]
|
|
1649
1649
|
);
|
|
1650
1650
|
return;
|
|
@@ -1797,7 +1797,7 @@ var Vue = (function () {
|
|
|
1797
1797
|
if (check(job)) {
|
|
1798
1798
|
continue;
|
|
1799
1799
|
}
|
|
1800
|
-
callWithErrorHandling(job, null,
|
|
1800
|
+
callWithErrorHandling(job, null, 14);
|
|
1801
1801
|
}
|
|
1802
1802
|
}
|
|
1803
1803
|
} finally {
|
|
@@ -2415,7 +2415,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2415
2415
|
callWithAsyncErrorHandling(
|
|
2416
2416
|
cbs.map((cb) => cb.bind(instance.proxy)),
|
|
2417
2417
|
instance,
|
|
2418
|
-
|
|
2418
|
+
6,
|
|
2419
2419
|
args
|
|
2420
2420
|
);
|
|
2421
2421
|
}
|
|
@@ -2477,7 +2477,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2477
2477
|
callWithErrorHandling(
|
|
2478
2478
|
modelHandler,
|
|
2479
2479
|
instance,
|
|
2480
|
-
|
|
2480
|
+
6,
|
|
2481
2481
|
args
|
|
2482
2482
|
);
|
|
2483
2483
|
}
|
|
@@ -2549,7 +2549,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2549
2549
|
callWithAsyncErrorHandling(
|
|
2550
2550
|
handler,
|
|
2551
2551
|
instance,
|
|
2552
|
-
|
|
2552
|
+
6,
|
|
2553
2553
|
args
|
|
2554
2554
|
);
|
|
2555
2555
|
}
|
|
@@ -2564,7 +2564,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2564
2564
|
callWithAsyncErrorHandling(
|
|
2565
2565
|
onceHandler,
|
|
2566
2566
|
instance,
|
|
2567
|
-
|
|
2567
|
+
6,
|
|
2568
2568
|
args
|
|
2569
2569
|
);
|
|
2570
2570
|
}
|
|
@@ -2748,7 +2748,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
2748
2748
|
}
|
|
2749
2749
|
} catch (err) {
|
|
2750
2750
|
blockStack.length = 0;
|
|
2751
|
-
handleError(err, instance,
|
|
2751
|
+
handleError(err, instance, 1);
|
|
2752
2752
|
result = createVNode(Comment);
|
|
2753
2753
|
}
|
|
2754
2754
|
let root = result;
|
|
@@ -3275,7 +3275,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3275
3275
|
if (delayEnter) {
|
|
3276
3276
|
activeBranch.transition.afterLeave = () => {
|
|
3277
3277
|
if (pendingId === suspense.pendingId) {
|
|
3278
|
-
move(pendingBranch, container2, anchor2,
|
|
3278
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
3279
3279
|
}
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
@@ -3285,7 +3285,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3285
3285
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
3286
3286
|
}
|
|
3287
3287
|
if (!delayEnter) {
|
|
3288
|
-
move(pendingBranch, container2, anchor2,
|
|
3288
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
3289
3289
|
}
|
|
3290
3290
|
}
|
|
3291
3291
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -3363,7 +3363,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3363
3363
|
}
|
|
3364
3364
|
const hydratedEl = instance.vnode.el;
|
|
3365
3365
|
instance.asyncDep.catch((err) => {
|
|
3366
|
-
handleError(err, instance,
|
|
3366
|
+
handleError(err, instance, 0);
|
|
3367
3367
|
}).then((asyncSetupResult) => {
|
|
3368
3368
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
3369
3369
|
return;
|
|
@@ -3607,14 +3607,14 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3607
3607
|
} else if (isReactive(s)) {
|
|
3608
3608
|
return traverse(s);
|
|
3609
3609
|
} else if (isFunction(s)) {
|
|
3610
|
-
return callWithErrorHandling(s, instance,
|
|
3610
|
+
return callWithErrorHandling(s, instance, 2);
|
|
3611
3611
|
} else {
|
|
3612
3612
|
warnInvalidSource(s);
|
|
3613
3613
|
}
|
|
3614
3614
|
});
|
|
3615
3615
|
} else if (isFunction(source)) {
|
|
3616
3616
|
if (cb) {
|
|
3617
|
-
getter = () => callWithErrorHandling(source, instance,
|
|
3617
|
+
getter = () => callWithErrorHandling(source, instance, 2);
|
|
3618
3618
|
} else {
|
|
3619
3619
|
getter = () => {
|
|
3620
3620
|
if (instance && instance.isUnmounted) {
|
|
@@ -3626,7 +3626,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3626
3626
|
return callWithAsyncErrorHandling(
|
|
3627
3627
|
source,
|
|
3628
3628
|
instance,
|
|
3629
|
-
|
|
3629
|
+
3,
|
|
3630
3630
|
[onCleanup]
|
|
3631
3631
|
);
|
|
3632
3632
|
};
|
|
@@ -3652,7 +3652,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3652
3652
|
let cleanup;
|
|
3653
3653
|
let onCleanup = (fn) => {
|
|
3654
3654
|
cleanup = effect.onStop = () => {
|
|
3655
|
-
callWithErrorHandling(fn, instance,
|
|
3655
|
+
callWithErrorHandling(fn, instance, 4);
|
|
3656
3656
|
};
|
|
3657
3657
|
};
|
|
3658
3658
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -3668,7 +3668,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3668
3668
|
if (cleanup) {
|
|
3669
3669
|
cleanup();
|
|
3670
3670
|
}
|
|
3671
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
3671
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
3672
3672
|
newValue,
|
|
3673
3673
|
// pass undefined as the old value when it's changed for the first time
|
|
3674
3674
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -3946,7 +3946,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
3946
3946
|
hook && callWithAsyncErrorHandling(
|
|
3947
3947
|
hook,
|
|
3948
3948
|
instance,
|
|
3949
|
-
|
|
3949
|
+
9,
|
|
3950
3950
|
args
|
|
3951
3951
|
);
|
|
3952
3952
|
};
|
|
@@ -4178,7 +4178,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4178
4178
|
handleError(
|
|
4179
4179
|
err,
|
|
4180
4180
|
instance,
|
|
4181
|
-
|
|
4181
|
+
13,
|
|
4182
4182
|
!errorComponent
|
|
4183
4183
|
/* do not throw in dev if user provided error component */
|
|
4184
4184
|
);
|
|
@@ -4277,7 +4277,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4277
4277
|
const storageContainer = createElement("div");
|
|
4278
4278
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
4279
4279
|
const instance2 = vnode.component;
|
|
4280
|
-
move(vnode, container, anchor,
|
|
4280
|
+
move(vnode, container, anchor, 0, parentSuspense);
|
|
4281
4281
|
patch(
|
|
4282
4282
|
instance2.vnode,
|
|
4283
4283
|
vnode,
|
|
@@ -4305,7 +4305,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4305
4305
|
};
|
|
4306
4306
|
sharedContext.deactivate = (vnode) => {
|
|
4307
4307
|
const instance2 = vnode.component;
|
|
4308
|
-
move(vnode, storageContainer, null,
|
|
4308
|
+
move(vnode, storageContainer, null, 1, parentSuspense);
|
|
4309
4309
|
queuePostRenderEffect(() => {
|
|
4310
4310
|
if (instance2.da) {
|
|
4311
4311
|
invokeArrayFns(instance2.da);
|
|
@@ -4663,7 +4663,7 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
|
|
|
4663
4663
|
}
|
|
4664
4664
|
if (hook) {
|
|
4665
4665
|
pauseTracking();
|
|
4666
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
4666
|
+
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
4667
4667
|
vnode.el,
|
|
4668
4668
|
binding,
|
|
4669
4669
|
vnode,
|
|
@@ -6646,7 +6646,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
6646
6646
|
return vm;
|
|
6647
6647
|
}
|
|
6648
6648
|
}
|
|
6649
|
-
Vue.version = `2.6.14-compat:${"3.3.0-alpha.
|
|
6649
|
+
Vue.version = `2.6.14-compat:${"3.3.0-alpha.4"}`;
|
|
6650
6650
|
Vue.config = singletonApp.config;
|
|
6651
6651
|
Vue.use = (p, ...options) => {
|
|
6652
6652
|
if (p && isFunction(p.install)) {
|
|
@@ -7227,7 +7227,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7227
7227
|
}
|
|
7228
7228
|
}
|
|
7229
7229
|
if (isFunction(ref)) {
|
|
7230
|
-
callWithErrorHandling(ref, owner,
|
|
7230
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
7231
7231
|
} else {
|
|
7232
7232
|
const _isString = isString(ref);
|
|
7233
7233
|
const _isRef = isRef(ref);
|
|
@@ -8900,7 +8900,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8900
8900
|
);
|
|
8901
8901
|
} else if (moved) {
|
|
8902
8902
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
8903
|
-
move(nextChild, container, anchor,
|
|
8903
|
+
move(nextChild, container, anchor, 2);
|
|
8904
8904
|
} else {
|
|
8905
8905
|
j--;
|
|
8906
8906
|
}
|
|
@@ -8934,9 +8934,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8934
8934
|
moveStaticNode(vnode, container, anchor);
|
|
8935
8935
|
return;
|
|
8936
8936
|
}
|
|
8937
|
-
const needTransition = moveType !==
|
|
8937
|
+
const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
|
|
8938
8938
|
if (needTransition) {
|
|
8939
|
-
if (moveType ===
|
|
8939
|
+
if (moveType === 0) {
|
|
8940
8940
|
transition.beforeEnter(el);
|
|
8941
8941
|
hostInsert(el, container, anchor);
|
|
8942
8942
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
@@ -9343,7 +9343,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9343
9343
|
container,
|
|
9344
9344
|
mainAnchor,
|
|
9345
9345
|
internals,
|
|
9346
|
-
|
|
9346
|
+
1
|
|
9347
9347
|
);
|
|
9348
9348
|
}
|
|
9349
9349
|
} else {
|
|
@@ -9358,7 +9358,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9358
9358
|
nextTarget,
|
|
9359
9359
|
null,
|
|
9360
9360
|
internals,
|
|
9361
|
-
|
|
9361
|
+
0
|
|
9362
9362
|
);
|
|
9363
9363
|
} else {
|
|
9364
9364
|
warn(
|
|
@@ -9373,7 +9373,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9373
9373
|
target,
|
|
9374
9374
|
targetAnchor,
|
|
9375
9375
|
internals,
|
|
9376
|
-
|
|
9376
|
+
1
|
|
9377
9377
|
);
|
|
9378
9378
|
}
|
|
9379
9379
|
}
|
|
@@ -9404,12 +9404,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9404
9404
|
move: moveTeleport,
|
|
9405
9405
|
hydrate: hydrateTeleport
|
|
9406
9406
|
};
|
|
9407
|
-
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType =
|
|
9408
|
-
if (moveType ===
|
|
9407
|
+
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
9408
|
+
if (moveType === 0) {
|
|
9409
9409
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
9410
9410
|
}
|
|
9411
9411
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
9412
|
-
const isReorder = moveType ===
|
|
9412
|
+
const isReorder = moveType === 2;
|
|
9413
9413
|
if (isReorder) {
|
|
9414
9414
|
insert(el, container, parentAnchor);
|
|
9415
9415
|
}
|
|
@@ -9420,7 +9420,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9420
9420
|
children[i],
|
|
9421
9421
|
container,
|
|
9422
9422
|
parentAnchor,
|
|
9423
|
-
|
|
9423
|
+
2
|
|
9424
9424
|
);
|
|
9425
9425
|
}
|
|
9426
9426
|
}
|
|
@@ -9909,7 +9909,7 @@ Component that was made reactive: `,
|
|
|
9909
9909
|
return ret;
|
|
9910
9910
|
}
|
|
9911
9911
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
9912
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
9912
|
+
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
9913
9913
|
vnode,
|
|
9914
9914
|
prevVNode
|
|
9915
9915
|
]);
|
|
@@ -10075,7 +10075,7 @@ Component that was made reactive: `,
|
|
|
10075
10075
|
const setupResult = callWithErrorHandling(
|
|
10076
10076
|
setup,
|
|
10077
10077
|
instance,
|
|
10078
|
-
|
|
10078
|
+
0,
|
|
10079
10079
|
[shallowReadonly(instance.props) , setupContext]
|
|
10080
10080
|
);
|
|
10081
10081
|
resetTracking();
|
|
@@ -10086,7 +10086,7 @@ Component that was made reactive: `,
|
|
|
10086
10086
|
return setupResult.then((resolvedResult) => {
|
|
10087
10087
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
10088
10088
|
}).catch((e) => {
|
|
10089
|
-
handleError(e, instance,
|
|
10089
|
+
handleError(e, instance, 0);
|
|
10090
10090
|
});
|
|
10091
10091
|
} else {
|
|
10092
10092
|
instance.asyncDep = setupResult;
|
|
@@ -10632,7 +10632,7 @@ Component that was made reactive: `,
|
|
|
10632
10632
|
return true;
|
|
10633
10633
|
}
|
|
10634
10634
|
|
|
10635
|
-
const version = "3.3.0-alpha.
|
|
10635
|
+
const version = "3.3.0-alpha.4";
|
|
10636
10636
|
const ssrUtils = null;
|
|
10637
10637
|
const resolveFilter = resolveFilter$1 ;
|
|
10638
10638
|
const _compatUtils = {
|
|
@@ -10964,7 +10964,7 @@ Component that was made reactive: `,
|
|
|
10964
10964
|
callWithAsyncErrorHandling(
|
|
10965
10965
|
patchStopImmediatePropagation(e, invoker.value),
|
|
10966
10966
|
instance,
|
|
10967
|
-
|
|
10967
|
+
5,
|
|
10968
10968
|
[e]
|
|
10969
10969
|
);
|
|
10970
10970
|
};
|
|
@@ -12430,63 +12430,63 @@ Make sure to use the production build (*.prod.js) when deploying for production.
|
|
|
12430
12430
|
}
|
|
12431
12431
|
const errorMessages = {
|
|
12432
12432
|
// parse errors
|
|
12433
|
-
[
|
|
12434
|
-
[
|
|
12435
|
-
[
|
|
12436
|
-
[
|
|
12437
|
-
[
|
|
12438
|
-
[
|
|
12439
|
-
[
|
|
12440
|
-
[
|
|
12441
|
-
[
|
|
12442
|
-
[
|
|
12443
|
-
[
|
|
12444
|
-
[
|
|
12445
|
-
[
|
|
12446
|
-
[
|
|
12447
|
-
[
|
|
12448
|
-
[
|
|
12449
|
-
[
|
|
12450
|
-
[
|
|
12451
|
-
[
|
|
12452
|
-
[
|
|
12453
|
-
[
|
|
12454
|
-
[
|
|
12455
|
-
[
|
|
12433
|
+
[0]: "Illegal comment.",
|
|
12434
|
+
[1]: "CDATA section is allowed only in XML context.",
|
|
12435
|
+
[2]: "Duplicate attribute.",
|
|
12436
|
+
[3]: "End tag cannot have attributes.",
|
|
12437
|
+
[4]: "Illegal '/' in tags.",
|
|
12438
|
+
[5]: "Unexpected EOF in tag.",
|
|
12439
|
+
[6]: "Unexpected EOF in CDATA section.",
|
|
12440
|
+
[7]: "Unexpected EOF in comment.",
|
|
12441
|
+
[8]: "Unexpected EOF in script.",
|
|
12442
|
+
[9]: "Unexpected EOF in tag.",
|
|
12443
|
+
[10]: "Incorrectly closed comment.",
|
|
12444
|
+
[11]: "Incorrectly opened comment.",
|
|
12445
|
+
[12]: "Illegal tag name. Use '<' to print '<'.",
|
|
12446
|
+
[13]: "Attribute value was expected.",
|
|
12447
|
+
[14]: "End tag name was expected.",
|
|
12448
|
+
[15]: "Whitespace was expected.",
|
|
12449
|
+
[16]: "Unexpected '<!--' in comment.",
|
|
12450
|
+
[17]: `Attribute name cannot contain U+0022 ("), U+0027 ('), and U+003C (<).`,
|
|
12451
|
+
[18]: "Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",
|
|
12452
|
+
[19]: "Attribute name cannot start with '='.",
|
|
12453
|
+
[21]: "'<?' is allowed only in XML context.",
|
|
12454
|
+
[20]: `Unexpected null character.`,
|
|
12455
|
+
[22]: "Illegal '/' in tags.",
|
|
12456
12456
|
// Vue-specific parse errors
|
|
12457
|
-
[
|
|
12458
|
-
[
|
|
12459
|
-
[
|
|
12460
|
-
[
|
|
12461
|
-
[
|
|
12457
|
+
[23]: "Invalid end tag.",
|
|
12458
|
+
[24]: "Element is missing end tag.",
|
|
12459
|
+
[25]: "Interpolation end sign was not found.",
|
|
12460
|
+
[27]: "End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",
|
|
12461
|
+
[26]: "Legal directive name was expected.",
|
|
12462
12462
|
// transform errors
|
|
12463
|
-
[
|
|
12464
|
-
[
|
|
12465
|
-
[
|
|
12466
|
-
[
|
|
12467
|
-
[
|
|
12468
|
-
[
|
|
12469
|
-
[
|
|
12470
|
-
[
|
|
12471
|
-
[
|
|
12472
|
-
[
|
|
12473
|
-
[
|
|
12474
|
-
[
|
|
12475
|
-
[
|
|
12476
|
-
[
|
|
12477
|
-
[
|
|
12478
|
-
[
|
|
12479
|
-
[
|
|
12463
|
+
[28]: `v-if/v-else-if is missing expression.`,
|
|
12464
|
+
[29]: `v-if/else branches must use unique keys.`,
|
|
12465
|
+
[30]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
|
|
12466
|
+
[31]: `v-for is missing expression.`,
|
|
12467
|
+
[32]: `v-for has invalid expression.`,
|
|
12468
|
+
[33]: `<template v-for> key should be placed on the <template> tag.`,
|
|
12469
|
+
[34]: `v-bind is missing expression.`,
|
|
12470
|
+
[35]: `v-on is missing expression.`,
|
|
12471
|
+
[36]: `Unexpected custom directive on <slot> outlet.`,
|
|
12472
|
+
[37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
|
|
12473
|
+
[38]: `Duplicate slot names found. `,
|
|
12474
|
+
[39]: `Extraneous children found when component already has explicitly named default slot. These children will be ignored.`,
|
|
12475
|
+
[40]: `v-slot can only be used on components or <template> tags.`,
|
|
12476
|
+
[41]: `v-model is missing expression.`,
|
|
12477
|
+
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
12478
|
+
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
12479
|
+
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
|
|
12480
12480
|
Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
12481
|
-
[
|
|
12482
|
-
[
|
|
12481
|
+
[45]: `Error parsing JavaScript expression: `,
|
|
12482
|
+
[46]: `<KeepAlive> expects exactly one child component.`,
|
|
12483
12483
|
// generic errors
|
|
12484
|
-
[
|
|
12485
|
-
[
|
|
12486
|
-
[
|
|
12487
|
-
[
|
|
12484
|
+
[47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
|
|
12485
|
+
[48]: `ES module mode is not supported in this build of compiler.`,
|
|
12486
|
+
[49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
|
|
12487
|
+
[50]: `"scopeId" option is only supported in module mode.`,
|
|
12488
12488
|
// just to fulfill types
|
|
12489
|
-
[
|
|
12489
|
+
[51]: ``
|
|
12490
12490
|
};
|
|
12491
12491
|
|
|
12492
12492
|
const FRAGMENT = Symbol(`Fragment` );
|
|
@@ -12584,7 +12584,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12584
12584
|
};
|
|
12585
12585
|
function createRoot(children, loc = locStub) {
|
|
12586
12586
|
return {
|
|
12587
|
-
type:
|
|
12587
|
+
type: 0,
|
|
12588
12588
|
children,
|
|
12589
12589
|
helpers: /* @__PURE__ */ new Set(),
|
|
12590
12590
|
components: [],
|
|
@@ -12610,7 +12610,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12610
12610
|
}
|
|
12611
12611
|
}
|
|
12612
12612
|
return {
|
|
12613
|
-
type:
|
|
12613
|
+
type: 13,
|
|
12614
12614
|
tag,
|
|
12615
12615
|
props,
|
|
12616
12616
|
children,
|
|
@@ -12625,21 +12625,21 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12625
12625
|
}
|
|
12626
12626
|
function createArrayExpression(elements, loc = locStub) {
|
|
12627
12627
|
return {
|
|
12628
|
-
type:
|
|
12628
|
+
type: 17,
|
|
12629
12629
|
loc,
|
|
12630
12630
|
elements
|
|
12631
12631
|
};
|
|
12632
12632
|
}
|
|
12633
12633
|
function createObjectExpression(properties, loc = locStub) {
|
|
12634
12634
|
return {
|
|
12635
|
-
type:
|
|
12635
|
+
type: 15,
|
|
12636
12636
|
loc,
|
|
12637
12637
|
properties
|
|
12638
12638
|
};
|
|
12639
12639
|
}
|
|
12640
12640
|
function createObjectProperty(key, value) {
|
|
12641
12641
|
return {
|
|
12642
|
-
type:
|
|
12642
|
+
type: 16,
|
|
12643
12643
|
loc: locStub,
|
|
12644
12644
|
key: isString(key) ? createSimpleExpression(key, true) : key,
|
|
12645
12645
|
value
|
|
@@ -12647,23 +12647,23 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12647
12647
|
}
|
|
12648
12648
|
function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0) {
|
|
12649
12649
|
return {
|
|
12650
|
-
type:
|
|
12650
|
+
type: 4,
|
|
12651
12651
|
loc,
|
|
12652
12652
|
content,
|
|
12653
12653
|
isStatic,
|
|
12654
|
-
constType: isStatic ?
|
|
12654
|
+
constType: isStatic ? 3 : constType
|
|
12655
12655
|
};
|
|
12656
12656
|
}
|
|
12657
12657
|
function createCompoundExpression(children, loc = locStub) {
|
|
12658
12658
|
return {
|
|
12659
|
-
type:
|
|
12659
|
+
type: 8,
|
|
12660
12660
|
loc,
|
|
12661
12661
|
children
|
|
12662
12662
|
};
|
|
12663
12663
|
}
|
|
12664
12664
|
function createCallExpression(callee, args = [], loc = locStub) {
|
|
12665
12665
|
return {
|
|
12666
|
-
type:
|
|
12666
|
+
type: 14,
|
|
12667
12667
|
loc,
|
|
12668
12668
|
callee,
|
|
12669
12669
|
arguments: args
|
|
@@ -12671,7 +12671,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12671
12671
|
}
|
|
12672
12672
|
function createFunctionExpression(params, returns = void 0, newline = false, isSlot = false, loc = locStub) {
|
|
12673
12673
|
return {
|
|
12674
|
-
type:
|
|
12674
|
+
type: 18,
|
|
12675
12675
|
params,
|
|
12676
12676
|
returns,
|
|
12677
12677
|
newline,
|
|
@@ -12681,7 +12681,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12681
12681
|
}
|
|
12682
12682
|
function createConditionalExpression(test, consequent, alternate, newline = true) {
|
|
12683
12683
|
return {
|
|
12684
|
-
type:
|
|
12684
|
+
type: 19,
|
|
12685
12685
|
test,
|
|
12686
12686
|
consequent,
|
|
12687
12687
|
alternate,
|
|
@@ -12691,7 +12691,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12691
12691
|
}
|
|
12692
12692
|
function createCacheExpression(index, value, isVNode = false) {
|
|
12693
12693
|
return {
|
|
12694
|
-
type:
|
|
12694
|
+
type: 20,
|
|
12695
12695
|
index,
|
|
12696
12696
|
value,
|
|
12697
12697
|
isVNode,
|
|
@@ -12700,13 +12700,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12700
12700
|
}
|
|
12701
12701
|
function createBlockStatement(body) {
|
|
12702
12702
|
return {
|
|
12703
|
-
type:
|
|
12703
|
+
type: 21,
|
|
12704
12704
|
body,
|
|
12705
12705
|
loc: locStub
|
|
12706
12706
|
};
|
|
12707
12707
|
}
|
|
12708
12708
|
|
|
12709
|
-
const isStaticExp = (p) => p.type ===
|
|
12709
|
+
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
12710
12710
|
const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
|
|
12711
12711
|
function isCoreComponent(tag) {
|
|
12712
12712
|
if (isBuiltInType(tag, "Teleport")) {
|
|
@@ -12832,7 +12832,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12832
12832
|
function findDir(node, name, allowEmpty = false) {
|
|
12833
12833
|
for (let i = 0; i < node.props.length; i++) {
|
|
12834
12834
|
const p = node.props[i];
|
|
12835
|
-
if (p.type ===
|
|
12835
|
+
if (p.type === 7 && (allowEmpty || p.exp) && (isString(name) ? p.name === name : name.test(p.name))) {
|
|
12836
12836
|
return p;
|
|
12837
12837
|
}
|
|
12838
12838
|
}
|
|
@@ -12840,7 +12840,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12840
12840
|
function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
|
|
12841
12841
|
for (let i = 0; i < node.props.length; i++) {
|
|
12842
12842
|
const p = node.props[i];
|
|
12843
|
-
if (p.type ===
|
|
12843
|
+
if (p.type === 6) {
|
|
12844
12844
|
if (dynamicOnly)
|
|
12845
12845
|
continue;
|
|
12846
12846
|
if (p.name === name && (p.value || allowEmpty)) {
|
|
@@ -12856,23 +12856,23 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12856
12856
|
}
|
|
12857
12857
|
function hasDynamicKeyVBind(node) {
|
|
12858
12858
|
return node.props.some(
|
|
12859
|
-
(p) => p.type ===
|
|
12860
|
-
p.arg.type !==
|
|
12859
|
+
(p) => p.type === 7 && p.name === "bind" && (!p.arg || // v-bind="obj"
|
|
12860
|
+
p.arg.type !== 4 || // v-bind:[_ctx.foo]
|
|
12861
12861
|
!p.arg.isStatic)
|
|
12862
12862
|
// v-bind:[foo]
|
|
12863
12863
|
);
|
|
12864
12864
|
}
|
|
12865
12865
|
function isText$1(node) {
|
|
12866
|
-
return node.type ===
|
|
12866
|
+
return node.type === 5 || node.type === 2;
|
|
12867
12867
|
}
|
|
12868
12868
|
function isVSlot(p) {
|
|
12869
|
-
return p.type ===
|
|
12869
|
+
return p.type === 7 && p.name === "slot";
|
|
12870
12870
|
}
|
|
12871
12871
|
function isTemplateNode(node) {
|
|
12872
|
-
return node.type ===
|
|
12872
|
+
return node.type === 1 && node.tagType === 3;
|
|
12873
12873
|
}
|
|
12874
12874
|
function isSlotOutlet(node) {
|
|
12875
|
-
return node.type ===
|
|
12875
|
+
return node.type === 1 && node.tagType === 2;
|
|
12876
12876
|
}
|
|
12877
12877
|
function getVNodeHelper(ssr, isComponent) {
|
|
12878
12878
|
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
@@ -12882,7 +12882,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12882
12882
|
}
|
|
12883
12883
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
12884
12884
|
function getUnnormalizedProps(props, callPath = []) {
|
|
12885
|
-
if (props && !isString(props) && props.type ===
|
|
12885
|
+
if (props && !isString(props) && props.type === 14) {
|
|
12886
12886
|
const callee = props.callee;
|
|
12887
12887
|
if (!isString(callee) && propsHelperSet.has(callee)) {
|
|
12888
12888
|
return getUnnormalizedProps(
|
|
@@ -12895,10 +12895,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12895
12895
|
}
|
|
12896
12896
|
function injectProp(node, prop, context) {
|
|
12897
12897
|
let propsWithInjection;
|
|
12898
|
-
let props = node.type ===
|
|
12898
|
+
let props = node.type === 13 ? node.props : node.arguments[2];
|
|
12899
12899
|
let callPath = [];
|
|
12900
12900
|
let parentCall;
|
|
12901
|
-
if (props && !isString(props) && props.type ===
|
|
12901
|
+
if (props && !isString(props) && props.type === 14) {
|
|
12902
12902
|
const ret = getUnnormalizedProps(props);
|
|
12903
12903
|
props = ret[0];
|
|
12904
12904
|
callPath = ret[1];
|
|
@@ -12906,9 +12906,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12906
12906
|
}
|
|
12907
12907
|
if (props == null || isString(props)) {
|
|
12908
12908
|
propsWithInjection = createObjectExpression([prop]);
|
|
12909
|
-
} else if (props.type ===
|
|
12909
|
+
} else if (props.type === 14) {
|
|
12910
12910
|
const first = props.arguments[0];
|
|
12911
|
-
if (!isString(first) && first.type ===
|
|
12911
|
+
if (!isString(first) && first.type === 15) {
|
|
12912
12912
|
if (!hasProp(prop, first)) {
|
|
12913
12913
|
first.properties.unshift(prop);
|
|
12914
12914
|
}
|
|
@@ -12923,7 +12923,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12923
12923
|
}
|
|
12924
12924
|
}
|
|
12925
12925
|
!propsWithInjection && (propsWithInjection = props);
|
|
12926
|
-
} else if (props.type ===
|
|
12926
|
+
} else if (props.type === 15) {
|
|
12927
12927
|
if (!hasProp(prop, props)) {
|
|
12928
12928
|
props.properties.unshift(prop);
|
|
12929
12929
|
}
|
|
@@ -12937,7 +12937,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12937
12937
|
parentCall = callPath[callPath.length - 2];
|
|
12938
12938
|
}
|
|
12939
12939
|
}
|
|
12940
|
-
if (node.type ===
|
|
12940
|
+
if (node.type === 13) {
|
|
12941
12941
|
if (parentCall) {
|
|
12942
12942
|
parentCall.arguments[0] = propsWithInjection;
|
|
12943
12943
|
} else {
|
|
@@ -12953,10 +12953,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12953
12953
|
}
|
|
12954
12954
|
function hasProp(prop, props) {
|
|
12955
12955
|
let result = false;
|
|
12956
|
-
if (prop.key.type ===
|
|
12956
|
+
if (prop.key.type === 4) {
|
|
12957
12957
|
const propKeyName = prop.key.content;
|
|
12958
12958
|
result = props.properties.some(
|
|
12959
|
-
(p) => p.key.type ===
|
|
12959
|
+
(p) => p.key.type === 4 && p.key.content === propKeyName
|
|
12960
12960
|
);
|
|
12961
12961
|
}
|
|
12962
12962
|
return result;
|
|
@@ -12967,7 +12967,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
12967
12967
|
})}`;
|
|
12968
12968
|
}
|
|
12969
12969
|
function getMemoedVNodeCall(node) {
|
|
12970
|
-
if (node.type ===
|
|
12970
|
+
if (node.type === 14 && node.callee === WITH_MEMO) {
|
|
12971
12971
|
return node.arguments[1].returns;
|
|
12972
12972
|
} else {
|
|
12973
12973
|
return node;
|
|
@@ -13064,8 +13064,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13064
13064
|
};
|
|
13065
13065
|
const defaultParserOptions = {
|
|
13066
13066
|
delimiters: [`{{`, `}}`],
|
|
13067
|
-
getNamespace: () =>
|
|
13068
|
-
getTextMode: () =>
|
|
13067
|
+
getNamespace: () => 0,
|
|
13068
|
+
getTextMode: () => 0,
|
|
13069
13069
|
isVoidTag: NO,
|
|
13070
13070
|
isPreTag: NO,
|
|
13071
13071
|
isCustomElement: NO,
|
|
@@ -13078,7 +13078,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13078
13078
|
const context = createParserContext(content, options);
|
|
13079
13079
|
const start = getCursor(context);
|
|
13080
13080
|
return createRoot(
|
|
13081
|
-
parseChildren(context,
|
|
13081
|
+
parseChildren(context, 0, []),
|
|
13082
13082
|
getSelection(context, start)
|
|
13083
13083
|
);
|
|
13084
13084
|
}
|
|
@@ -13102,48 +13102,48 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13102
13102
|
}
|
|
13103
13103
|
function parseChildren(context, mode, ancestors) {
|
|
13104
13104
|
const parent = last(ancestors);
|
|
13105
|
-
const ns = parent ? parent.ns :
|
|
13105
|
+
const ns = parent ? parent.ns : 0;
|
|
13106
13106
|
const nodes = [];
|
|
13107
13107
|
while (!isEnd(context, mode, ancestors)) {
|
|
13108
13108
|
const s = context.source;
|
|
13109
13109
|
let node = void 0;
|
|
13110
|
-
if (mode ===
|
|
13110
|
+
if (mode === 0 || mode === 1) {
|
|
13111
13111
|
if (!context.inVPre && startsWith(s, context.options.delimiters[0])) {
|
|
13112
13112
|
node = parseInterpolation(context, mode);
|
|
13113
|
-
} else if (mode ===
|
|
13113
|
+
} else if (mode === 0 && s[0] === "<") {
|
|
13114
13114
|
if (s.length === 1) {
|
|
13115
|
-
emitError(context,
|
|
13115
|
+
emitError(context, 5, 1);
|
|
13116
13116
|
} else if (s[1] === "!") {
|
|
13117
13117
|
if (startsWith(s, "<!--")) {
|
|
13118
13118
|
node = parseComment(context);
|
|
13119
13119
|
} else if (startsWith(s, "<!DOCTYPE")) {
|
|
13120
13120
|
node = parseBogusComment(context);
|
|
13121
13121
|
} else if (startsWith(s, "<![CDATA[")) {
|
|
13122
|
-
if (ns !==
|
|
13122
|
+
if (ns !== 0) {
|
|
13123
13123
|
node = parseCDATA(context, ancestors);
|
|
13124
13124
|
} else {
|
|
13125
|
-
emitError(context,
|
|
13125
|
+
emitError(context, 1);
|
|
13126
13126
|
node = parseBogusComment(context);
|
|
13127
13127
|
}
|
|
13128
13128
|
} else {
|
|
13129
|
-
emitError(context,
|
|
13129
|
+
emitError(context, 11);
|
|
13130
13130
|
node = parseBogusComment(context);
|
|
13131
13131
|
}
|
|
13132
13132
|
} else if (s[1] === "/") {
|
|
13133
13133
|
if (s.length === 2) {
|
|
13134
|
-
emitError(context,
|
|
13134
|
+
emitError(context, 5, 2);
|
|
13135
13135
|
} else if (s[2] === ">") {
|
|
13136
|
-
emitError(context,
|
|
13136
|
+
emitError(context, 14, 2);
|
|
13137
13137
|
advanceBy(context, 3);
|
|
13138
13138
|
continue;
|
|
13139
13139
|
} else if (/[a-z]/i.test(s[2])) {
|
|
13140
|
-
emitError(context,
|
|
13140
|
+
emitError(context, 23);
|
|
13141
13141
|
parseTag(context, TagType.End, parent);
|
|
13142
13142
|
continue;
|
|
13143
13143
|
} else {
|
|
13144
13144
|
emitError(
|
|
13145
13145
|
context,
|
|
13146
|
-
|
|
13146
|
+
12,
|
|
13147
13147
|
2
|
|
13148
13148
|
);
|
|
13149
13149
|
node = parseBogusComment(context);
|
|
@@ -13154,7 +13154,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13154
13154
|
"COMPILER_NATIVE_TEMPLATE",
|
|
13155
13155
|
context
|
|
13156
13156
|
) && node && node.tag === "template" && !node.props.some(
|
|
13157
|
-
(p) => p.type ===
|
|
13157
|
+
(p) => p.type === 7 && isSpecialTemplateDirective(p.name)
|
|
13158
13158
|
)) {
|
|
13159
13159
|
warnDeprecation(
|
|
13160
13160
|
"COMPILER_NATIVE_TEMPLATE",
|
|
@@ -13166,12 +13166,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13166
13166
|
} else if (s[1] === "?") {
|
|
13167
13167
|
emitError(
|
|
13168
13168
|
context,
|
|
13169
|
-
|
|
13169
|
+
21,
|
|
13170
13170
|
1
|
|
13171
13171
|
);
|
|
13172
13172
|
node = parseBogusComment(context);
|
|
13173
13173
|
} else {
|
|
13174
|
-
emitError(context,
|
|
13174
|
+
emitError(context, 12, 1);
|
|
13175
13175
|
}
|
|
13176
13176
|
}
|
|
13177
13177
|
}
|
|
@@ -13187,16 +13187,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13187
13187
|
}
|
|
13188
13188
|
}
|
|
13189
13189
|
let removedWhitespace = false;
|
|
13190
|
-
if (mode !==
|
|
13190
|
+
if (mode !== 2 && mode !== 1) {
|
|
13191
13191
|
const shouldCondense = context.options.whitespace !== "preserve";
|
|
13192
13192
|
for (let i = 0; i < nodes.length; i++) {
|
|
13193
13193
|
const node = nodes[i];
|
|
13194
|
-
if (node.type ===
|
|
13194
|
+
if (node.type === 2) {
|
|
13195
13195
|
if (!context.inPre) {
|
|
13196
13196
|
if (!/[^\t\r\n\f ]/.test(node.content)) {
|
|
13197
13197
|
const prev = nodes[i - 1];
|
|
13198
13198
|
const next = nodes[i + 1];
|
|
13199
|
-
if (!prev || !next || shouldCondense && (prev.type ===
|
|
13199
|
+
if (!prev || !next || shouldCondense && (prev.type === 3 && next.type === 3 || prev.type === 3 && next.type === 1 || prev.type === 1 && next.type === 3 || prev.type === 1 && next.type === 1 && /[\r\n]/.test(node.content))) {
|
|
13200
13200
|
removedWhitespace = true;
|
|
13201
13201
|
nodes[i] = null;
|
|
13202
13202
|
} else {
|
|
@@ -13208,14 +13208,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13208
13208
|
} else {
|
|
13209
13209
|
node.content = node.content.replace(/\r\n/g, "\n");
|
|
13210
13210
|
}
|
|
13211
|
-
} else if (node.type ===
|
|
13211
|
+
} else if (node.type === 3 && !context.options.comments) {
|
|
13212
13212
|
removedWhitespace = true;
|
|
13213
13213
|
nodes[i] = null;
|
|
13214
13214
|
}
|
|
13215
13215
|
}
|
|
13216
13216
|
if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
|
|
13217
13217
|
const first = nodes[0];
|
|
13218
|
-
if (first && first.type ===
|
|
13218
|
+
if (first && first.type === 2) {
|
|
13219
13219
|
first.content = first.content.replace(/^\r?\n/, "");
|
|
13220
13220
|
}
|
|
13221
13221
|
}
|
|
@@ -13223,9 +13223,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13223
13223
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
13224
13224
|
}
|
|
13225
13225
|
function pushNode(nodes, node) {
|
|
13226
|
-
if (node.type ===
|
|
13226
|
+
if (node.type === 2) {
|
|
13227
13227
|
const prev = last(nodes);
|
|
13228
|
-
if (prev && prev.type ===
|
|
13228
|
+
if (prev && prev.type === 2 && prev.loc.end.offset === node.loc.start.offset) {
|
|
13229
13229
|
prev.content += node.content;
|
|
13230
13230
|
prev.loc.end = node.loc.end;
|
|
13231
13231
|
prev.loc.source += node.loc.source;
|
|
@@ -13236,9 +13236,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13236
13236
|
}
|
|
13237
13237
|
function parseCDATA(context, ancestors) {
|
|
13238
13238
|
advanceBy(context, 9);
|
|
13239
|
-
const nodes = parseChildren(context,
|
|
13239
|
+
const nodes = parseChildren(context, 3, ancestors);
|
|
13240
13240
|
if (context.source.length === 0) {
|
|
13241
|
-
emitError(context,
|
|
13241
|
+
emitError(context, 6);
|
|
13242
13242
|
} else {
|
|
13243
13243
|
advanceBy(context, 3);
|
|
13244
13244
|
}
|
|
@@ -13251,13 +13251,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13251
13251
|
if (!match) {
|
|
13252
13252
|
content = context.source.slice(4);
|
|
13253
13253
|
advanceBy(context, context.source.length);
|
|
13254
|
-
emitError(context,
|
|
13254
|
+
emitError(context, 7);
|
|
13255
13255
|
} else {
|
|
13256
13256
|
if (match.index <= 3) {
|
|
13257
|
-
emitError(context,
|
|
13257
|
+
emitError(context, 0);
|
|
13258
13258
|
}
|
|
13259
13259
|
if (match[1]) {
|
|
13260
|
-
emitError(context,
|
|
13260
|
+
emitError(context, 10);
|
|
13261
13261
|
}
|
|
13262
13262
|
content = context.source.slice(4, match.index);
|
|
13263
13263
|
const s = context.source.slice(0, match.index);
|
|
@@ -13265,14 +13265,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13265
13265
|
while ((nestedIndex = s.indexOf("<!--", prevIndex)) !== -1) {
|
|
13266
13266
|
advanceBy(context, nestedIndex - prevIndex + 1);
|
|
13267
13267
|
if (nestedIndex + 4 < s.length) {
|
|
13268
|
-
emitError(context,
|
|
13268
|
+
emitError(context, 16);
|
|
13269
13269
|
}
|
|
13270
13270
|
prevIndex = nestedIndex + 1;
|
|
13271
13271
|
}
|
|
13272
13272
|
advanceBy(context, match.index + match[0].length - prevIndex + 1);
|
|
13273
13273
|
}
|
|
13274
13274
|
return {
|
|
13275
|
-
type:
|
|
13275
|
+
type: 3,
|
|
13276
13276
|
content,
|
|
13277
13277
|
loc: getSelection(context, start)
|
|
13278
13278
|
};
|
|
@@ -13290,7 +13290,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13290
13290
|
advanceBy(context, closeIndex + 1);
|
|
13291
13291
|
}
|
|
13292
13292
|
return {
|
|
13293
|
-
type:
|
|
13293
|
+
type: 3,
|
|
13294
13294
|
content,
|
|
13295
13295
|
loc: getSelection(context, start)
|
|
13296
13296
|
};
|
|
@@ -13317,7 +13317,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13317
13317
|
ancestors.pop();
|
|
13318
13318
|
{
|
|
13319
13319
|
const inlineTemplateProp = element.props.find(
|
|
13320
|
-
(p) => p.type ===
|
|
13320
|
+
(p) => p.type === 6 && p.name === "inline-template"
|
|
13321
13321
|
);
|
|
13322
13322
|
if (inlineTemplateProp && checkCompatEnabled(
|
|
13323
13323
|
"COMPILER_INLINE_TEMPLATE",
|
|
@@ -13326,7 +13326,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13326
13326
|
)) {
|
|
13327
13327
|
const loc = getSelection(context, element.loc.end);
|
|
13328
13328
|
inlineTemplateProp.value = {
|
|
13329
|
-
type:
|
|
13329
|
+
type: 2,
|
|
13330
13330
|
content: loc.source,
|
|
13331
13331
|
loc
|
|
13332
13332
|
};
|
|
@@ -13336,11 +13336,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13336
13336
|
if (startsWithEndTagOpen(context.source, element.tag)) {
|
|
13337
13337
|
parseTag(context, TagType.End, parent);
|
|
13338
13338
|
} else {
|
|
13339
|
-
emitError(context,
|
|
13339
|
+
emitError(context, 24, 0, element.loc.start);
|
|
13340
13340
|
if (context.source.length === 0 && element.tag.toLowerCase() === "script") {
|
|
13341
13341
|
const first = children[0];
|
|
13342
13342
|
if (first && startsWith(first.loc.source, "<!--")) {
|
|
13343
|
-
emitError(context,
|
|
13343
|
+
emitError(context, 8);
|
|
13344
13344
|
}
|
|
13345
13345
|
}
|
|
13346
13346
|
}
|
|
@@ -13374,7 +13374,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13374
13374
|
context.inPre = true;
|
|
13375
13375
|
}
|
|
13376
13376
|
let props = parseAttributes(context, type);
|
|
13377
|
-
if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type ===
|
|
13377
|
+
if (type === 0 /* Start */ && !context.inVPre && props.some((p) => p.type === 7 && p.name === "pre")) {
|
|
13378
13378
|
context.inVPre = true;
|
|
13379
13379
|
extend(context, cursor);
|
|
13380
13380
|
context.source = currentSource;
|
|
@@ -13382,11 +13382,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13382
13382
|
}
|
|
13383
13383
|
let isSelfClosing = false;
|
|
13384
13384
|
if (context.source.length === 0) {
|
|
13385
|
-
emitError(context,
|
|
13385
|
+
emitError(context, 9);
|
|
13386
13386
|
} else {
|
|
13387
13387
|
isSelfClosing = startsWith(context.source, "/>");
|
|
13388
13388
|
if (type === 1 /* End */ && isSelfClosing) {
|
|
13389
|
-
emitError(context,
|
|
13389
|
+
emitError(context, 4);
|
|
13390
13390
|
}
|
|
13391
13391
|
advanceBy(context, isSelfClosing ? 2 : 1);
|
|
13392
13392
|
}
|
|
@@ -13401,7 +13401,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13401
13401
|
let hasFor = false;
|
|
13402
13402
|
for (let i = 0; i < props.length; i++) {
|
|
13403
13403
|
const p = props[i];
|
|
13404
|
-
if (p.type ===
|
|
13404
|
+
if (p.type === 7) {
|
|
13405
13405
|
if (p.name === "if") {
|
|
13406
13406
|
hasIf = true;
|
|
13407
13407
|
} else if (p.name === "for") {
|
|
@@ -13418,22 +13418,22 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13418
13418
|
}
|
|
13419
13419
|
}
|
|
13420
13420
|
}
|
|
13421
|
-
let tagType =
|
|
13421
|
+
let tagType = 0;
|
|
13422
13422
|
if (!context.inVPre) {
|
|
13423
13423
|
if (tag === "slot") {
|
|
13424
|
-
tagType =
|
|
13424
|
+
tagType = 2;
|
|
13425
13425
|
} else if (tag === "template") {
|
|
13426
13426
|
if (props.some(
|
|
13427
|
-
(p) => p.type ===
|
|
13427
|
+
(p) => p.type === 7 && isSpecialTemplateDirective(p.name)
|
|
13428
13428
|
)) {
|
|
13429
|
-
tagType =
|
|
13429
|
+
tagType = 3;
|
|
13430
13430
|
}
|
|
13431
13431
|
} else if (isComponent(tag, props, context)) {
|
|
13432
|
-
tagType =
|
|
13432
|
+
tagType = 1;
|
|
13433
13433
|
}
|
|
13434
13434
|
}
|
|
13435
13435
|
return {
|
|
13436
|
-
type:
|
|
13436
|
+
type: 1,
|
|
13437
13437
|
ns,
|
|
13438
13438
|
tag,
|
|
13439
13439
|
tagType,
|
|
@@ -13455,7 +13455,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13455
13455
|
}
|
|
13456
13456
|
for (let i = 0; i < props.length; i++) {
|
|
13457
13457
|
const p = props[i];
|
|
13458
|
-
if (p.type ===
|
|
13458
|
+
if (p.type === 6) {
|
|
13459
13459
|
if (p.name === "is" && p.value) {
|
|
13460
13460
|
if (p.value.content.startsWith("vue:")) {
|
|
13461
13461
|
return true;
|
|
@@ -13488,23 +13488,23 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13488
13488
|
const attributeNames = /* @__PURE__ */ new Set();
|
|
13489
13489
|
while (context.source.length > 0 && !startsWith(context.source, ">") && !startsWith(context.source, "/>")) {
|
|
13490
13490
|
if (startsWith(context.source, "/")) {
|
|
13491
|
-
emitError(context,
|
|
13491
|
+
emitError(context, 22);
|
|
13492
13492
|
advanceBy(context, 1);
|
|
13493
13493
|
advanceSpaces(context);
|
|
13494
13494
|
continue;
|
|
13495
13495
|
}
|
|
13496
13496
|
if (type === 1 /* End */) {
|
|
13497
|
-
emitError(context,
|
|
13497
|
+
emitError(context, 3);
|
|
13498
13498
|
}
|
|
13499
13499
|
const attr = parseAttribute(context, attributeNames);
|
|
13500
|
-
if (attr.type ===
|
|
13500
|
+
if (attr.type === 6 && attr.value && attr.name === "class") {
|
|
13501
13501
|
attr.value.content = attr.value.content.replace(/\s+/g, " ").trim();
|
|
13502
13502
|
}
|
|
13503
13503
|
if (type === 0 /* Start */) {
|
|
13504
13504
|
props.push(attr);
|
|
13505
13505
|
}
|
|
13506
13506
|
if (/^[^\t\r\n\f />]/.test(context.source)) {
|
|
13507
|
-
emitError(context,
|
|
13507
|
+
emitError(context, 15);
|
|
13508
13508
|
}
|
|
13509
13509
|
advanceSpaces(context);
|
|
13510
13510
|
}
|
|
@@ -13515,11 +13515,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13515
13515
|
const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source);
|
|
13516
13516
|
const name = match[0];
|
|
13517
13517
|
if (nameSet.has(name)) {
|
|
13518
|
-
emitError(context,
|
|
13518
|
+
emitError(context, 2);
|
|
13519
13519
|
}
|
|
13520
13520
|
nameSet.add(name);
|
|
13521
13521
|
if (name[0] === "=") {
|
|
13522
|
-
emitError(context,
|
|
13522
|
+
emitError(context, 19);
|
|
13523
13523
|
}
|
|
13524
13524
|
{
|
|
13525
13525
|
const pattern = /["'<]/g;
|
|
@@ -13527,7 +13527,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13527
13527
|
while (m = pattern.exec(name)) {
|
|
13528
13528
|
emitError(
|
|
13529
13529
|
context,
|
|
13530
|
-
|
|
13530
|
+
17,
|
|
13531
13531
|
m.index
|
|
13532
13532
|
);
|
|
13533
13533
|
}
|
|
@@ -13540,7 +13540,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13540
13540
|
advanceSpaces(context);
|
|
13541
13541
|
value = parseAttributeValue(context);
|
|
13542
13542
|
if (!value) {
|
|
13543
|
-
emitError(context,
|
|
13543
|
+
emitError(context, 13);
|
|
13544
13544
|
}
|
|
13545
13545
|
}
|
|
13546
13546
|
const loc = getSelection(context, start);
|
|
@@ -13570,7 +13570,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13570
13570
|
if (!content.endsWith("]")) {
|
|
13571
13571
|
emitError(
|
|
13572
13572
|
context,
|
|
13573
|
-
|
|
13573
|
+
27
|
|
13574
13574
|
);
|
|
13575
13575
|
content = content.slice(1);
|
|
13576
13576
|
} else {
|
|
@@ -13580,10 +13580,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13580
13580
|
content += match2[3] || "";
|
|
13581
13581
|
}
|
|
13582
13582
|
arg = {
|
|
13583
|
-
type:
|
|
13583
|
+
type: 4,
|
|
13584
13584
|
content,
|
|
13585
13585
|
isStatic,
|
|
13586
|
-
constType: isStatic ?
|
|
13586
|
+
constType: isStatic ? 3 : 0,
|
|
13587
13587
|
loc: loc2
|
|
13588
13588
|
};
|
|
13589
13589
|
}
|
|
@@ -13616,10 +13616,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13616
13616
|
}
|
|
13617
13617
|
}
|
|
13618
13618
|
return {
|
|
13619
|
-
type:
|
|
13619
|
+
type: 7,
|
|
13620
13620
|
name: dirName,
|
|
13621
13621
|
exp: value && {
|
|
13622
|
-
type:
|
|
13622
|
+
type: 4,
|
|
13623
13623
|
content: value.content,
|
|
13624
13624
|
isStatic: false,
|
|
13625
13625
|
// Treat as non-constant by default. This can be potentially set to
|
|
@@ -13633,13 +13633,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13633
13633
|
};
|
|
13634
13634
|
}
|
|
13635
13635
|
if (!context.inVPre && startsWith(name, "v-")) {
|
|
13636
|
-
emitError(context,
|
|
13636
|
+
emitError(context, 26);
|
|
13637
13637
|
}
|
|
13638
13638
|
return {
|
|
13639
|
-
type:
|
|
13639
|
+
type: 6,
|
|
13640
13640
|
name,
|
|
13641
13641
|
value: value && {
|
|
13642
|
-
type:
|
|
13642
|
+
type: 2,
|
|
13643
13643
|
content: value.content,
|
|
13644
13644
|
loc: value.loc
|
|
13645
13645
|
},
|
|
@@ -13658,10 +13658,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13658
13658
|
content = parseTextData(
|
|
13659
13659
|
context,
|
|
13660
13660
|
context.source.length,
|
|
13661
|
-
|
|
13661
|
+
4
|
|
13662
13662
|
);
|
|
13663
13663
|
} else {
|
|
13664
|
-
content = parseTextData(context, endIndex,
|
|
13664
|
+
content = parseTextData(context, endIndex, 4);
|
|
13665
13665
|
advanceBy(context, 1);
|
|
13666
13666
|
}
|
|
13667
13667
|
} else {
|
|
@@ -13674,11 +13674,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13674
13674
|
while (m = unexpectedChars.exec(match[0])) {
|
|
13675
13675
|
emitError(
|
|
13676
13676
|
context,
|
|
13677
|
-
|
|
13677
|
+
18,
|
|
13678
13678
|
m.index
|
|
13679
13679
|
);
|
|
13680
13680
|
}
|
|
13681
|
-
content = parseTextData(context, match[0].length,
|
|
13681
|
+
content = parseTextData(context, match[0].length, 4);
|
|
13682
13682
|
}
|
|
13683
13683
|
return { content, isQuoted, loc: getSelection(context, start) };
|
|
13684
13684
|
}
|
|
@@ -13686,7 +13686,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13686
13686
|
const [open, close] = context.options.delimiters;
|
|
13687
13687
|
const closeIndex = context.source.indexOf(close, open.length);
|
|
13688
13688
|
if (closeIndex === -1) {
|
|
13689
|
-
emitError(context,
|
|
13689
|
+
emitError(context, 25);
|
|
13690
13690
|
return void 0;
|
|
13691
13691
|
}
|
|
13692
13692
|
const start = getCursor(context);
|
|
@@ -13705,9 +13705,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13705
13705
|
advancePositionWithMutation(innerEnd, rawContent, endOffset);
|
|
13706
13706
|
advanceBy(context, close.length);
|
|
13707
13707
|
return {
|
|
13708
|
-
type:
|
|
13708
|
+
type: 5,
|
|
13709
13709
|
content: {
|
|
13710
|
-
type:
|
|
13710
|
+
type: 4,
|
|
13711
13711
|
isStatic: false,
|
|
13712
13712
|
// Set `isConstant` to false by default and will decide in transformExpression
|
|
13713
13713
|
constType: 0,
|
|
@@ -13718,7 +13718,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13718
13718
|
};
|
|
13719
13719
|
}
|
|
13720
13720
|
function parseText(context, mode) {
|
|
13721
|
-
const endTokens = mode ===
|
|
13721
|
+
const endTokens = mode === 3 ? ["]]>"] : ["<", context.options.delimiters[0]];
|
|
13722
13722
|
let endIndex = context.source.length;
|
|
13723
13723
|
for (let i = 0; i < endTokens.length; i++) {
|
|
13724
13724
|
const index = context.source.indexOf(endTokens[i], 1);
|
|
@@ -13729,7 +13729,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13729
13729
|
const start = getCursor(context);
|
|
13730
13730
|
const content = parseTextData(context, endIndex, mode);
|
|
13731
13731
|
return {
|
|
13732
|
-
type:
|
|
13732
|
+
type: 2,
|
|
13733
13733
|
content,
|
|
13734
13734
|
loc: getSelection(context, start)
|
|
13735
13735
|
};
|
|
@@ -13737,12 +13737,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13737
13737
|
function parseTextData(context, length, mode) {
|
|
13738
13738
|
const rawText = context.source.slice(0, length);
|
|
13739
13739
|
advanceBy(context, length);
|
|
13740
|
-
if (mode ===
|
|
13740
|
+
if (mode === 2 || mode === 3 || !rawText.includes("&")) {
|
|
13741
13741
|
return rawText;
|
|
13742
13742
|
} else {
|
|
13743
13743
|
return context.options.decodeEntities(
|
|
13744
13744
|
rawText,
|
|
13745
|
-
mode ===
|
|
13745
|
+
mode === 4
|
|
13746
13746
|
);
|
|
13747
13747
|
}
|
|
13748
13748
|
}
|
|
@@ -13798,7 +13798,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13798
13798
|
function isEnd(context, mode, ancestors) {
|
|
13799
13799
|
const s = context.source;
|
|
13800
13800
|
switch (mode) {
|
|
13801
|
-
case
|
|
13801
|
+
case 0:
|
|
13802
13802
|
if (startsWith(s, "</")) {
|
|
13803
13803
|
for (let i = ancestors.length - 1; i >= 0; --i) {
|
|
13804
13804
|
if (startsWithEndTagOpen(s, ancestors[i].tag)) {
|
|
@@ -13807,15 +13807,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13807
13807
|
}
|
|
13808
13808
|
}
|
|
13809
13809
|
break;
|
|
13810
|
-
case
|
|
13811
|
-
case
|
|
13810
|
+
case 1:
|
|
13811
|
+
case 2: {
|
|
13812
13812
|
const parent = last(ancestors);
|
|
13813
13813
|
if (parent && startsWithEndTagOpen(s, parent.tag)) {
|
|
13814
13814
|
return true;
|
|
13815
13815
|
}
|
|
13816
13816
|
break;
|
|
13817
13817
|
}
|
|
13818
|
-
case
|
|
13818
|
+
case 3:
|
|
13819
13819
|
if (startsWith(s, "]]>")) {
|
|
13820
13820
|
return true;
|
|
13821
13821
|
}
|
|
@@ -13838,7 +13838,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13838
13838
|
}
|
|
13839
13839
|
function isSingleElementRoot(root, child) {
|
|
13840
13840
|
const { children } = root;
|
|
13841
|
-
return children.length === 1 && child.type ===
|
|
13841
|
+
return children.length === 1 && child.type === 1 && !isSlotOutlet(child);
|
|
13842
13842
|
}
|
|
13843
13843
|
function walk(node, context, doNotHoistNode = false) {
|
|
13844
13844
|
const { children } = node;
|
|
@@ -13846,10 +13846,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13846
13846
|
let hoistedCount = 0;
|
|
13847
13847
|
for (let i = 0; i < children.length; i++) {
|
|
13848
13848
|
const child = children[i];
|
|
13849
|
-
if (child.type ===
|
|
13849
|
+
if (child.type === 1 && child.tagType === 0) {
|
|
13850
13850
|
const constantType = doNotHoistNode ? 0 : getConstantType(child, context);
|
|
13851
13851
|
if (constantType > 0) {
|
|
13852
|
-
if (constantType >=
|
|
13852
|
+
if (constantType >= 2) {
|
|
13853
13853
|
child.codegenNode.patchFlag = -1 + (` /* HOISTED */` );
|
|
13854
13854
|
child.codegenNode = context.hoist(child.codegenNode);
|
|
13855
13855
|
hoistedCount++;
|
|
@@ -13857,9 +13857,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13857
13857
|
}
|
|
13858
13858
|
} else {
|
|
13859
13859
|
const codegenNode = child.codegenNode;
|
|
13860
|
-
if (codegenNode.type ===
|
|
13860
|
+
if (codegenNode.type === 13) {
|
|
13861
13861
|
const flag = getPatchFlag(codegenNode);
|
|
13862
|
-
if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >=
|
|
13862
|
+
if ((!flag || flag === 512 || flag === 1) && getGeneratedPropsConstantType(child, context) >= 2) {
|
|
13863
13863
|
const props = getNodeProps(child);
|
|
13864
13864
|
if (props) {
|
|
13865
13865
|
codegenNode.props = context.hoist(props);
|
|
@@ -13871,8 +13871,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13871
13871
|
}
|
|
13872
13872
|
}
|
|
13873
13873
|
}
|
|
13874
|
-
if (child.type ===
|
|
13875
|
-
const isComponent = child.tagType ===
|
|
13874
|
+
if (child.type === 1) {
|
|
13875
|
+
const isComponent = child.tagType === 1;
|
|
13876
13876
|
if (isComponent) {
|
|
13877
13877
|
context.scopes.vSlot++;
|
|
13878
13878
|
}
|
|
@@ -13880,9 +13880,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13880
13880
|
if (isComponent) {
|
|
13881
13881
|
context.scopes.vSlot--;
|
|
13882
13882
|
}
|
|
13883
|
-
} else if (child.type ===
|
|
13883
|
+
} else if (child.type === 11) {
|
|
13884
13884
|
walk(child, context, child.children.length === 1);
|
|
13885
|
-
} else if (child.type ===
|
|
13885
|
+
} else if (child.type === 9) {
|
|
13886
13886
|
for (let i2 = 0; i2 < child.branches.length; i2++) {
|
|
13887
13887
|
walk(
|
|
13888
13888
|
child.branches[i2],
|
|
@@ -13895,7 +13895,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13895
13895
|
if (hoistedCount && context.transformHoist) {
|
|
13896
13896
|
context.transformHoist(children, context, node);
|
|
13897
13897
|
}
|
|
13898
|
-
if (hoistedCount && hoistedCount === originalCount && node.type ===
|
|
13898
|
+
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray(node.codegenNode.children)) {
|
|
13899
13899
|
node.codegenNode.children = context.hoist(
|
|
13900
13900
|
createArrayExpression(node.codegenNode.children)
|
|
13901
13901
|
);
|
|
@@ -13904,8 +13904,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13904
13904
|
function getConstantType(node, context) {
|
|
13905
13905
|
const { constantCache } = context;
|
|
13906
13906
|
switch (node.type) {
|
|
13907
|
-
case
|
|
13908
|
-
if (node.tagType !==
|
|
13907
|
+
case 1:
|
|
13908
|
+
if (node.tagType !== 0) {
|
|
13909
13909
|
return 0;
|
|
13910
13910
|
}
|
|
13911
13911
|
const cached = constantCache.get(node);
|
|
@@ -13913,7 +13913,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13913
13913
|
return cached;
|
|
13914
13914
|
}
|
|
13915
13915
|
const codegenNode = node.codegenNode;
|
|
13916
|
-
if (codegenNode.type !==
|
|
13916
|
+
if (codegenNode.type !== 13) {
|
|
13917
13917
|
return 0;
|
|
13918
13918
|
}
|
|
13919
13919
|
if (codegenNode.isBlock && node.tag !== "svg" && node.tag !== "foreignObject") {
|
|
@@ -13921,7 +13921,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13921
13921
|
}
|
|
13922
13922
|
const flag = getPatchFlag(codegenNode);
|
|
13923
13923
|
if (!flag) {
|
|
13924
|
-
let returnType2 =
|
|
13924
|
+
let returnType2 = 3;
|
|
13925
13925
|
const generatedPropsType = getGeneratedPropsConstantType(node, context);
|
|
13926
13926
|
if (generatedPropsType === 0) {
|
|
13927
13927
|
constantCache.set(node, 0);
|
|
@@ -13940,10 +13940,10 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13940
13940
|
returnType2 = childType;
|
|
13941
13941
|
}
|
|
13942
13942
|
}
|
|
13943
|
-
if (returnType2 >
|
|
13943
|
+
if (returnType2 > 1) {
|
|
13944
13944
|
for (let i = 0; i < node.props.length; i++) {
|
|
13945
13945
|
const p = node.props[i];
|
|
13946
|
-
if (p.type ===
|
|
13946
|
+
if (p.type === 7 && p.name === "bind" && p.exp) {
|
|
13947
13947
|
const expType = getConstantType(p.exp, context);
|
|
13948
13948
|
if (expType === 0) {
|
|
13949
13949
|
constantCache.set(node, 0);
|
|
@@ -13958,7 +13958,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13958
13958
|
if (codegenNode.isBlock) {
|
|
13959
13959
|
for (let i = 0; i < node.props.length; i++) {
|
|
13960
13960
|
const p = node.props[i];
|
|
13961
|
-
if (p.type ===
|
|
13961
|
+
if (p.type === 7) {
|
|
13962
13962
|
constantCache.set(node, 0);
|
|
13963
13963
|
return 0;
|
|
13964
13964
|
}
|
|
@@ -13976,20 +13976,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
13976
13976
|
constantCache.set(node, 0);
|
|
13977
13977
|
return 0;
|
|
13978
13978
|
}
|
|
13979
|
-
case
|
|
13980
|
-
case
|
|
13981
|
-
return
|
|
13982
|
-
case
|
|
13983
|
-
case
|
|
13984
|
-
case
|
|
13979
|
+
case 2:
|
|
13980
|
+
case 3:
|
|
13981
|
+
return 3;
|
|
13982
|
+
case 9:
|
|
13983
|
+
case 11:
|
|
13984
|
+
case 10:
|
|
13985
13985
|
return 0;
|
|
13986
|
-
case
|
|
13987
|
-
case
|
|
13986
|
+
case 5:
|
|
13987
|
+
case 12:
|
|
13988
13988
|
return getConstantType(node.content, context);
|
|
13989
|
-
case
|
|
13989
|
+
case 4:
|
|
13990
13990
|
return node.constType;
|
|
13991
|
-
case
|
|
13992
|
-
let returnType =
|
|
13991
|
+
case 8:
|
|
13992
|
+
let returnType = 3;
|
|
13993
13993
|
for (let i = 0; i < node.children.length; i++) {
|
|
13994
13994
|
const child = node.children[i];
|
|
13995
13995
|
if (isString(child) || isSymbol(child)) {
|
|
@@ -14014,20 +14014,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14014
14014
|
GUARD_REACTIVE_PROPS
|
|
14015
14015
|
]);
|
|
14016
14016
|
function getConstantTypeOfHelperCall(value, context) {
|
|
14017
|
-
if (value.type ===
|
|
14017
|
+
if (value.type === 14 && !isString(value.callee) && allowHoistedHelperSet.has(value.callee)) {
|
|
14018
14018
|
const arg = value.arguments[0];
|
|
14019
|
-
if (arg.type ===
|
|
14019
|
+
if (arg.type === 4) {
|
|
14020
14020
|
return getConstantType(arg, context);
|
|
14021
|
-
} else if (arg.type ===
|
|
14021
|
+
} else if (arg.type === 14) {
|
|
14022
14022
|
return getConstantTypeOfHelperCall(arg, context);
|
|
14023
14023
|
}
|
|
14024
14024
|
}
|
|
14025
14025
|
return 0;
|
|
14026
14026
|
}
|
|
14027
14027
|
function getGeneratedPropsConstantType(node, context) {
|
|
14028
|
-
let returnType =
|
|
14028
|
+
let returnType = 3;
|
|
14029
14029
|
const props = getNodeProps(node);
|
|
14030
|
-
if (props && props.type ===
|
|
14030
|
+
if (props && props.type === 15) {
|
|
14031
14031
|
const { properties } = props;
|
|
14032
14032
|
for (let i = 0; i < properties.length; i++) {
|
|
14033
14033
|
const { key, value } = properties[i];
|
|
@@ -14039,9 +14039,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14039
14039
|
returnType = keyType;
|
|
14040
14040
|
}
|
|
14041
14041
|
let valueType;
|
|
14042
|
-
if (value.type ===
|
|
14042
|
+
if (value.type === 4) {
|
|
14043
14043
|
valueType = getConstantType(value, context);
|
|
14044
|
-
} else if (value.type ===
|
|
14044
|
+
} else if (value.type === 14) {
|
|
14045
14045
|
valueType = getConstantTypeOfHelperCall(value, context);
|
|
14046
14046
|
} else {
|
|
14047
14047
|
valueType = 0;
|
|
@@ -14058,7 +14058,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14058
14058
|
}
|
|
14059
14059
|
function getNodeProps(node) {
|
|
14060
14060
|
const codegenNode = node.codegenNode;
|
|
14061
|
-
if (codegenNode.type ===
|
|
14061
|
+
if (codegenNode.type === 13) {
|
|
14062
14062
|
return codegenNode.props;
|
|
14063
14063
|
}
|
|
14064
14064
|
}
|
|
@@ -14200,7 +14200,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14200
14200
|
`_hoisted_${context.hoists.length}`,
|
|
14201
14201
|
false,
|
|
14202
14202
|
exp.loc,
|
|
14203
|
-
|
|
14203
|
+
2
|
|
14204
14204
|
);
|
|
14205
14205
|
identifier.hoisted = exp;
|
|
14206
14206
|
return identifier;
|
|
@@ -14241,7 +14241,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14241
14241
|
const child = children[0];
|
|
14242
14242
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
14243
14243
|
const codegenNode = child.codegenNode;
|
|
14244
|
-
if (codegenNode.type ===
|
|
14244
|
+
if (codegenNode.type === 13) {
|
|
14245
14245
|
makeBlock(codegenNode, context);
|
|
14246
14246
|
}
|
|
14247
14247
|
root.codegenNode = codegenNode;
|
|
@@ -14251,7 +14251,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14251
14251
|
} else if (children.length > 1) {
|
|
14252
14252
|
let patchFlag = 64;
|
|
14253
14253
|
let patchFlagText = PatchFlagNames[64];
|
|
14254
|
-
if (children.filter((c) => c.type !==
|
|
14254
|
+
if (children.filter((c) => c.type !== 3).length === 1) {
|
|
14255
14255
|
patchFlag |= 2048;
|
|
14256
14256
|
patchFlagText += `, ${PatchFlagNames[2048]}`;
|
|
14257
14257
|
}
|
|
@@ -14305,25 +14305,25 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14305
14305
|
}
|
|
14306
14306
|
}
|
|
14307
14307
|
switch (node.type) {
|
|
14308
|
-
case
|
|
14308
|
+
case 3:
|
|
14309
14309
|
if (!context.ssr) {
|
|
14310
14310
|
context.helper(CREATE_COMMENT);
|
|
14311
14311
|
}
|
|
14312
14312
|
break;
|
|
14313
|
-
case
|
|
14313
|
+
case 5:
|
|
14314
14314
|
if (!context.ssr) {
|
|
14315
14315
|
context.helper(TO_DISPLAY_STRING);
|
|
14316
14316
|
}
|
|
14317
14317
|
break;
|
|
14318
|
-
case
|
|
14318
|
+
case 9:
|
|
14319
14319
|
for (let i2 = 0; i2 < node.branches.length; i2++) {
|
|
14320
14320
|
traverseNode(node.branches[i2], context);
|
|
14321
14321
|
}
|
|
14322
14322
|
break;
|
|
14323
|
-
case
|
|
14324
|
-
case
|
|
14325
|
-
case
|
|
14326
|
-
case
|
|
14323
|
+
case 10:
|
|
14324
|
+
case 11:
|
|
14325
|
+
case 1:
|
|
14326
|
+
case 0:
|
|
14327
14327
|
traverseChildren(node, context);
|
|
14328
14328
|
break;
|
|
14329
14329
|
}
|
|
@@ -14336,15 +14336,15 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14336
14336
|
function createStructuralDirectiveTransform(name, fn) {
|
|
14337
14337
|
const matches = isString(name) ? (n) => n === name : (n) => name.test(n);
|
|
14338
14338
|
return (node, context) => {
|
|
14339
|
-
if (node.type ===
|
|
14339
|
+
if (node.type === 1) {
|
|
14340
14340
|
const { props } = node;
|
|
14341
|
-
if (node.tagType ===
|
|
14341
|
+
if (node.tagType === 3 && props.some(isVSlot)) {
|
|
14342
14342
|
return;
|
|
14343
14343
|
}
|
|
14344
14344
|
const exitFns = [];
|
|
14345
14345
|
for (let i = 0; i < props.length; i++) {
|
|
14346
14346
|
const prop = props[i];
|
|
14347
|
-
if (prop.type ===
|
|
14347
|
+
if (prop.type === 7 && matches(prop.name)) {
|
|
14348
14348
|
props.splice(i, 1);
|
|
14349
14349
|
i--;
|
|
14350
14350
|
const onExit = fn(node, prop, context);
|
|
@@ -14579,7 +14579,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14579
14579
|
context.pure = false;
|
|
14580
14580
|
}
|
|
14581
14581
|
function isText(n) {
|
|
14582
|
-
return isString(n) || n.type ===
|
|
14582
|
+
return isString(n) || n.type === 4 || n.type === 2 || n.type === 5 || n.type === 8;
|
|
14583
14583
|
}
|
|
14584
14584
|
function genNodeListAsArray(nodes, context) {
|
|
14585
14585
|
const multilines = nodes.length > 3 || nodes.some((n) => isArray(n) || !isText(n));
|
|
@@ -14620,68 +14620,68 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14620
14620
|
return;
|
|
14621
14621
|
}
|
|
14622
14622
|
switch (node.type) {
|
|
14623
|
-
case
|
|
14624
|
-
case
|
|
14625
|
-
case
|
|
14623
|
+
case 1:
|
|
14624
|
+
case 9:
|
|
14625
|
+
case 11:
|
|
14626
14626
|
assert(
|
|
14627
14627
|
node.codegenNode != null,
|
|
14628
14628
|
`Codegen node is missing for element/if/for node. Apply appropriate transforms first.`
|
|
14629
14629
|
);
|
|
14630
14630
|
genNode(node.codegenNode, context);
|
|
14631
14631
|
break;
|
|
14632
|
-
case
|
|
14632
|
+
case 2:
|
|
14633
14633
|
genText(node, context);
|
|
14634
14634
|
break;
|
|
14635
|
-
case
|
|
14635
|
+
case 4:
|
|
14636
14636
|
genExpression(node, context);
|
|
14637
14637
|
break;
|
|
14638
|
-
case
|
|
14638
|
+
case 5:
|
|
14639
14639
|
genInterpolation(node, context);
|
|
14640
14640
|
break;
|
|
14641
|
-
case
|
|
14641
|
+
case 12:
|
|
14642
14642
|
genNode(node.codegenNode, context);
|
|
14643
14643
|
break;
|
|
14644
|
-
case
|
|
14644
|
+
case 8:
|
|
14645
14645
|
genCompoundExpression(node, context);
|
|
14646
14646
|
break;
|
|
14647
|
-
case
|
|
14647
|
+
case 3:
|
|
14648
14648
|
genComment(node, context);
|
|
14649
14649
|
break;
|
|
14650
|
-
case
|
|
14650
|
+
case 13:
|
|
14651
14651
|
genVNodeCall(node, context);
|
|
14652
14652
|
break;
|
|
14653
|
-
case
|
|
14653
|
+
case 14:
|
|
14654
14654
|
genCallExpression(node, context);
|
|
14655
14655
|
break;
|
|
14656
|
-
case
|
|
14656
|
+
case 15:
|
|
14657
14657
|
genObjectExpression(node, context);
|
|
14658
14658
|
break;
|
|
14659
|
-
case
|
|
14659
|
+
case 17:
|
|
14660
14660
|
genArrayExpression(node, context);
|
|
14661
14661
|
break;
|
|
14662
|
-
case
|
|
14662
|
+
case 18:
|
|
14663
14663
|
genFunctionExpression(node, context);
|
|
14664
14664
|
break;
|
|
14665
|
-
case
|
|
14665
|
+
case 19:
|
|
14666
14666
|
genConditionalExpression(node, context);
|
|
14667
14667
|
break;
|
|
14668
|
-
case
|
|
14668
|
+
case 20:
|
|
14669
14669
|
genCacheExpression(node, context);
|
|
14670
14670
|
break;
|
|
14671
|
-
case
|
|
14671
|
+
case 21:
|
|
14672
14672
|
genNodeList(node.body, context, true, false);
|
|
14673
14673
|
break;
|
|
14674
|
-
case
|
|
14674
|
+
case 22:
|
|
14675
14675
|
break;
|
|
14676
|
-
case
|
|
14676
|
+
case 23:
|
|
14677
14677
|
break;
|
|
14678
|
-
case
|
|
14678
|
+
case 24:
|
|
14679
14679
|
break;
|
|
14680
|
-
case
|
|
14680
|
+
case 25:
|
|
14681
14681
|
break;
|
|
14682
|
-
case
|
|
14682
|
+
case 26:
|
|
14683
14683
|
break;
|
|
14684
|
-
case
|
|
14684
|
+
case 10:
|
|
14685
14685
|
break;
|
|
14686
14686
|
default:
|
|
14687
14687
|
{
|
|
@@ -14718,7 +14718,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14718
14718
|
}
|
|
14719
14719
|
function genExpressionAsPropertyKey(node, context) {
|
|
14720
14720
|
const { push } = context;
|
|
14721
|
-
if (node.type ===
|
|
14721
|
+
if (node.type === 8) {
|
|
14722
14722
|
push(`[`);
|
|
14723
14723
|
genCompoundExpression(node, context);
|
|
14724
14724
|
push(`]`);
|
|
@@ -14799,7 +14799,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14799
14799
|
push(`{}`, node);
|
|
14800
14800
|
return;
|
|
14801
14801
|
}
|
|
14802
|
-
const multilines = properties.length > 1 || properties.some((p) => p.value.type !==
|
|
14802
|
+
const multilines = properties.length > 1 || properties.some((p) => p.value.type !== 4);
|
|
14803
14803
|
push(multilines ? `{` : `{ `);
|
|
14804
14804
|
multilines && indent();
|
|
14805
14805
|
for (let i = 0; i < properties.length; i++) {
|
|
@@ -14861,7 +14861,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14861
14861
|
function genConditionalExpression(node, context) {
|
|
14862
14862
|
const { test, consequent, alternate, newline: needNewline } = node;
|
|
14863
14863
|
const { push, indent, deindent, newline } = context;
|
|
14864
|
-
if (test.type ===
|
|
14864
|
+
if (test.type === 4) {
|
|
14865
14865
|
const needsParens = !isSimpleIdentifier(test.content);
|
|
14866
14866
|
needsParens && push(`(`);
|
|
14867
14867
|
genExpression(test, context);
|
|
@@ -14880,7 +14880,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14880
14880
|
needNewline && newline();
|
|
14881
14881
|
needNewline || push(` `);
|
|
14882
14882
|
push(`: `);
|
|
14883
|
-
const isNested = alternate.type ===
|
|
14883
|
+
const isNested = alternate.type === 19;
|
|
14884
14884
|
if (!isNested) {
|
|
14885
14885
|
context.indentLevel++;
|
|
14886
14886
|
}
|
|
@@ -14935,7 +14935,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14935
14935
|
}
|
|
14936
14936
|
context.onError(
|
|
14937
14937
|
createCompilerError(
|
|
14938
|
-
|
|
14938
|
+
45,
|
|
14939
14939
|
node.loc,
|
|
14940
14940
|
void 0,
|
|
14941
14941
|
message
|
|
@@ -14945,18 +14945,18 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14945
14945
|
}
|
|
14946
14946
|
|
|
14947
14947
|
const transformExpression = (node, context) => {
|
|
14948
|
-
if (node.type ===
|
|
14948
|
+
if (node.type === 5) {
|
|
14949
14949
|
node.content = processExpression(
|
|
14950
14950
|
node.content,
|
|
14951
14951
|
context
|
|
14952
14952
|
);
|
|
14953
|
-
} else if (node.type ===
|
|
14953
|
+
} else if (node.type === 1) {
|
|
14954
14954
|
for (let i = 0; i < node.props.length; i++) {
|
|
14955
14955
|
const dir = node.props[i];
|
|
14956
|
-
if (dir.type ===
|
|
14956
|
+
if (dir.type === 7 && dir.name !== "for") {
|
|
14957
14957
|
const exp = dir.exp;
|
|
14958
14958
|
const arg = dir.arg;
|
|
14959
|
-
if (exp && exp.type ===
|
|
14959
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg)) {
|
|
14960
14960
|
dir.exp = processExpression(
|
|
14961
14961
|
exp,
|
|
14962
14962
|
context,
|
|
@@ -14964,7 +14964,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14964
14964
|
dir.name === "slot"
|
|
14965
14965
|
);
|
|
14966
14966
|
}
|
|
14967
|
-
if (arg && arg.type ===
|
|
14967
|
+
if (arg && arg.type === 4 && !arg.isStatic) {
|
|
14968
14968
|
dir.arg = processExpression(arg, context);
|
|
14969
14969
|
}
|
|
14970
14970
|
}
|
|
@@ -14989,7 +14989,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
14989
14989
|
let key = 0;
|
|
14990
14990
|
while (i-- >= 0) {
|
|
14991
14991
|
const sibling = siblings[i];
|
|
14992
|
-
if (sibling && sibling.type ===
|
|
14992
|
+
if (sibling && sibling.type === 9) {
|
|
14993
14993
|
key += sibling.branches.length;
|
|
14994
14994
|
}
|
|
14995
14995
|
}
|
|
@@ -15016,7 +15016,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15016
15016
|
if (dir.name !== "else" && (!dir.exp || !dir.exp.content.trim())) {
|
|
15017
15017
|
const loc = dir.exp ? dir.exp.loc : node.loc;
|
|
15018
15018
|
context.onError(
|
|
15019
|
-
createCompilerError(
|
|
15019
|
+
createCompilerError(28, dir.loc)
|
|
15020
15020
|
);
|
|
15021
15021
|
dir.exp = createSimpleExpression(`true`, false, loc);
|
|
15022
15022
|
}
|
|
@@ -15026,7 +15026,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15026
15026
|
if (dir.name === "if") {
|
|
15027
15027
|
const branch = createIfBranch(node, dir);
|
|
15028
15028
|
const ifNode = {
|
|
15029
|
-
type:
|
|
15029
|
+
type: 9,
|
|
15030
15030
|
loc: node.loc,
|
|
15031
15031
|
branches: [branch]
|
|
15032
15032
|
};
|
|
@@ -15040,25 +15040,25 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15040
15040
|
let i = siblings.indexOf(node);
|
|
15041
15041
|
while (i-- >= -1) {
|
|
15042
15042
|
const sibling = siblings[i];
|
|
15043
|
-
if (sibling && sibling.type ===
|
|
15043
|
+
if (sibling && sibling.type === 3) {
|
|
15044
15044
|
context.removeNode(sibling);
|
|
15045
15045
|
comments.unshift(sibling);
|
|
15046
15046
|
continue;
|
|
15047
15047
|
}
|
|
15048
|
-
if (sibling && sibling.type ===
|
|
15048
|
+
if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
|
|
15049
15049
|
context.removeNode(sibling);
|
|
15050
15050
|
continue;
|
|
15051
15051
|
}
|
|
15052
|
-
if (sibling && sibling.type ===
|
|
15052
|
+
if (sibling && sibling.type === 9) {
|
|
15053
15053
|
if (dir.name === "else-if" && sibling.branches[sibling.branches.length - 1].condition === void 0) {
|
|
15054
15054
|
context.onError(
|
|
15055
|
-
createCompilerError(
|
|
15055
|
+
createCompilerError(30, node.loc)
|
|
15056
15056
|
);
|
|
15057
15057
|
}
|
|
15058
15058
|
context.removeNode();
|
|
15059
15059
|
const branch = createIfBranch(node, dir);
|
|
15060
15060
|
if (comments.length && // #3619 ignore comments if the v-if is direct child of <transition>
|
|
15061
|
-
!(context.parent && context.parent.type ===
|
|
15061
|
+
!(context.parent && context.parent.type === 1 && isBuiltInType(context.parent.tag, "transition"))) {
|
|
15062
15062
|
branch.children = [...comments, ...branch.children];
|
|
15063
15063
|
}
|
|
15064
15064
|
{
|
|
@@ -15068,7 +15068,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15068
15068
|
if (isSameKey(userKey, key)) {
|
|
15069
15069
|
context.onError(
|
|
15070
15070
|
createCompilerError(
|
|
15071
|
-
|
|
15071
|
+
29,
|
|
15072
15072
|
branch.userKey.loc
|
|
15073
15073
|
)
|
|
15074
15074
|
);
|
|
@@ -15084,7 +15084,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15084
15084
|
context.currentNode = null;
|
|
15085
15085
|
} else {
|
|
15086
15086
|
context.onError(
|
|
15087
|
-
createCompilerError(
|
|
15087
|
+
createCompilerError(30, node.loc)
|
|
15088
15088
|
);
|
|
15089
15089
|
}
|
|
15090
15090
|
break;
|
|
@@ -15092,9 +15092,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15092
15092
|
}
|
|
15093
15093
|
}
|
|
15094
15094
|
function createIfBranch(node, dir) {
|
|
15095
|
-
const isTemplateIf = node.tagType ===
|
|
15095
|
+
const isTemplateIf = node.tagType === 3;
|
|
15096
15096
|
return {
|
|
15097
|
-
type:
|
|
15097
|
+
type: 10,
|
|
15098
15098
|
loc: node.loc,
|
|
15099
15099
|
condition: dir.name === "else" ? void 0 : dir.exp,
|
|
15100
15100
|
children: isTemplateIf && !findDir(node, "for") ? node.children : [node],
|
|
@@ -15126,21 +15126,21 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15126
15126
|
`${keyIndex}`,
|
|
15127
15127
|
false,
|
|
15128
15128
|
locStub,
|
|
15129
|
-
|
|
15129
|
+
2
|
|
15130
15130
|
)
|
|
15131
15131
|
);
|
|
15132
15132
|
const { children } = branch;
|
|
15133
15133
|
const firstChild = children[0];
|
|
15134
|
-
const needFragmentWrapper = children.length !== 1 || firstChild.type !==
|
|
15134
|
+
const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1;
|
|
15135
15135
|
if (needFragmentWrapper) {
|
|
15136
|
-
if (children.length === 1 && firstChild.type ===
|
|
15136
|
+
if (children.length === 1 && firstChild.type === 11) {
|
|
15137
15137
|
const vnodeCall = firstChild.codegenNode;
|
|
15138
15138
|
injectProp(vnodeCall, keyProperty, context);
|
|
15139
15139
|
return vnodeCall;
|
|
15140
15140
|
} else {
|
|
15141
15141
|
let patchFlag = 64;
|
|
15142
15142
|
let patchFlagText = PatchFlagNames[64];
|
|
15143
|
-
if (!branch.isTemplateIf && children.filter((c) => c.type !==
|
|
15143
|
+
if (!branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) {
|
|
15144
15144
|
patchFlag |= 2048;
|
|
15145
15145
|
patchFlagText += `, ${PatchFlagNames[2048]}`;
|
|
15146
15146
|
}
|
|
@@ -15161,7 +15161,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15161
15161
|
} else {
|
|
15162
15162
|
const ret = firstChild.codegenNode;
|
|
15163
15163
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
15164
|
-
if (vnodeCall.type ===
|
|
15164
|
+
if (vnodeCall.type === 13) {
|
|
15165
15165
|
makeBlock(vnodeCall, context);
|
|
15166
15166
|
}
|
|
15167
15167
|
injectProp(vnodeCall, keyProperty, context);
|
|
@@ -15172,7 +15172,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15172
15172
|
if (!a || a.type !== b.type) {
|
|
15173
15173
|
return false;
|
|
15174
15174
|
}
|
|
15175
|
-
if (a.type ===
|
|
15175
|
+
if (a.type === 6) {
|
|
15176
15176
|
if (a.value.content !== b.value.content) {
|
|
15177
15177
|
return false;
|
|
15178
15178
|
}
|
|
@@ -15182,7 +15182,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15182
15182
|
if (exp.type !== branchExp.type) {
|
|
15183
15183
|
return false;
|
|
15184
15184
|
}
|
|
15185
|
-
if (exp.type !==
|
|
15185
|
+
if (exp.type !== 4 || exp.isStatic !== branchExp.isStatic || exp.content !== branchExp.content) {
|
|
15186
15186
|
return false;
|
|
15187
15187
|
}
|
|
15188
15188
|
}
|
|
@@ -15190,13 +15190,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15190
15190
|
}
|
|
15191
15191
|
function getParentCondition(node) {
|
|
15192
15192
|
while (true) {
|
|
15193
|
-
if (node.type ===
|
|
15194
|
-
if (node.alternate.type ===
|
|
15193
|
+
if (node.type === 19) {
|
|
15194
|
+
if (node.alternate.type === 19) {
|
|
15195
15195
|
node = node.alternate;
|
|
15196
15196
|
} else {
|
|
15197
15197
|
return node;
|
|
15198
15198
|
}
|
|
15199
|
-
} else if (node.type ===
|
|
15199
|
+
} else if (node.type === 20) {
|
|
15200
15200
|
node = node.value;
|
|
15201
15201
|
}
|
|
15202
15202
|
}
|
|
@@ -15213,9 +15213,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15213
15213
|
const isTemplate = isTemplateNode(node);
|
|
15214
15214
|
const memo = findDir(node, "memo");
|
|
15215
15215
|
const keyProp = findProp(node, `key`);
|
|
15216
|
-
const keyExp = keyProp && (keyProp.type ===
|
|
15216
|
+
const keyExp = keyProp && (keyProp.type === 6 ? createSimpleExpression(keyProp.value.content, true) : keyProp.exp);
|
|
15217
15217
|
const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
|
|
15218
|
-
const isStableFragment = forNode.source.type ===
|
|
15218
|
+
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
15219
15219
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
15220
15220
|
forNode.codegenNode = createVNodeCall(
|
|
15221
15221
|
context,
|
|
@@ -15235,12 +15235,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15235
15235
|
const { children } = forNode;
|
|
15236
15236
|
if (isTemplate) {
|
|
15237
15237
|
node.children.some((c) => {
|
|
15238
|
-
if (c.type ===
|
|
15238
|
+
if (c.type === 1) {
|
|
15239
15239
|
const key = findProp(c, "key");
|
|
15240
15240
|
if (key) {
|
|
15241
15241
|
context.onError(
|
|
15242
15242
|
createCompilerError(
|
|
15243
|
-
|
|
15243
|
+
33,
|
|
15244
15244
|
key.loc
|
|
15245
15245
|
)
|
|
15246
15246
|
);
|
|
@@ -15249,7 +15249,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15249
15249
|
}
|
|
15250
15250
|
});
|
|
15251
15251
|
}
|
|
15252
|
-
const needFragmentWrapper = children.length !== 1 || children[0].type !==
|
|
15252
|
+
const needFragmentWrapper = children.length !== 1 || children[0].type !== 1;
|
|
15253
15253
|
const slotOutlet = isSlotOutlet(node) ? node : isTemplate && node.children.length === 1 && isSlotOutlet(node.children[0]) ? node.children[0] : null;
|
|
15254
15254
|
if (slotOutlet) {
|
|
15255
15255
|
childBlock = slotOutlet.codegenNode;
|
|
@@ -15336,7 +15336,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15336
15336
|
function processFor(node, dir, context, processCodegen) {
|
|
15337
15337
|
if (!dir.exp) {
|
|
15338
15338
|
context.onError(
|
|
15339
|
-
createCompilerError(
|
|
15339
|
+
createCompilerError(31, dir.loc)
|
|
15340
15340
|
);
|
|
15341
15341
|
return;
|
|
15342
15342
|
}
|
|
@@ -15348,14 +15348,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15348
15348
|
);
|
|
15349
15349
|
if (!parseResult) {
|
|
15350
15350
|
context.onError(
|
|
15351
|
-
createCompilerError(
|
|
15351
|
+
createCompilerError(32, dir.loc)
|
|
15352
15352
|
);
|
|
15353
15353
|
return;
|
|
15354
15354
|
}
|
|
15355
15355
|
const { addIdentifiers, removeIdentifiers, scopes } = context;
|
|
15356
15356
|
const { source, value, key, index } = parseResult;
|
|
15357
15357
|
const forNode = {
|
|
15358
|
-
type:
|
|
15358
|
+
type: 11,
|
|
15359
15359
|
loc: dir.loc,
|
|
15360
15360
|
source,
|
|
15361
15361
|
valueAlias: value,
|
|
@@ -15468,7 +15468,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15468
15468
|
|
|
15469
15469
|
const defaultFallback = createSimpleExpression(`undefined`, false);
|
|
15470
15470
|
const trackSlotScopes = (node, context) => {
|
|
15471
|
-
if (node.type ===
|
|
15471
|
+
if (node.type === 1 && (node.tagType === 1 || node.tagType === 3)) {
|
|
15472
15472
|
const vSlot = findDir(node, "slot");
|
|
15473
15473
|
if (vSlot) {
|
|
15474
15474
|
vSlot.exp;
|
|
@@ -15514,14 +15514,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15514
15514
|
const slotElement = children[i];
|
|
15515
15515
|
let slotDir;
|
|
15516
15516
|
if (!isTemplateNode(slotElement) || !(slotDir = findDir(slotElement, "slot", true))) {
|
|
15517
|
-
if (slotElement.type !==
|
|
15517
|
+
if (slotElement.type !== 3) {
|
|
15518
15518
|
implicitDefaultChildren.push(slotElement);
|
|
15519
15519
|
}
|
|
15520
15520
|
continue;
|
|
15521
15521
|
}
|
|
15522
15522
|
if (onComponentSlot) {
|
|
15523
15523
|
context.onError(
|
|
15524
|
-
createCompilerError(
|
|
15524
|
+
createCompilerError(37, slotDir.loc)
|
|
15525
15525
|
);
|
|
15526
15526
|
break;
|
|
15527
15527
|
}
|
|
@@ -15561,7 +15561,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15561
15561
|
let prev;
|
|
15562
15562
|
while (j--) {
|
|
15563
15563
|
prev = children[j];
|
|
15564
|
-
if (prev.type !==
|
|
15564
|
+
if (prev.type !== 3) {
|
|
15565
15565
|
break;
|
|
15566
15566
|
}
|
|
15567
15567
|
}
|
|
@@ -15569,7 +15569,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15569
15569
|
children.splice(i, 1);
|
|
15570
15570
|
i--;
|
|
15571
15571
|
let conditional = dynamicSlots[dynamicSlots.length - 1];
|
|
15572
|
-
while (conditional.alternate.type ===
|
|
15572
|
+
while (conditional.alternate.type === 19) {
|
|
15573
15573
|
conditional = conditional.alternate;
|
|
15574
15574
|
}
|
|
15575
15575
|
conditional.alternate = vElse.exp ? createConditionalExpression(
|
|
@@ -15583,7 +15583,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15583
15583
|
) : buildDynamicSlot(slotName, slotFunction, conditionalBranchIndex++);
|
|
15584
15584
|
} else {
|
|
15585
15585
|
context.onError(
|
|
15586
|
-
createCompilerError(
|
|
15586
|
+
createCompilerError(30, vElse.loc)
|
|
15587
15587
|
);
|
|
15588
15588
|
}
|
|
15589
15589
|
} else if (vFor = findDir(slotElement, "for")) {
|
|
@@ -15603,7 +15603,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15603
15603
|
);
|
|
15604
15604
|
} else {
|
|
15605
15605
|
context.onError(
|
|
15606
|
-
createCompilerError(
|
|
15606
|
+
createCompilerError(32, vFor.loc)
|
|
15607
15607
|
);
|
|
15608
15608
|
}
|
|
15609
15609
|
} else {
|
|
@@ -15611,7 +15611,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15611
15611
|
if (seenSlotNames.has(staticSlotName)) {
|
|
15612
15612
|
context.onError(
|
|
15613
15613
|
createCompilerError(
|
|
15614
|
-
|
|
15614
|
+
38,
|
|
15615
15615
|
dirLoc
|
|
15616
15616
|
)
|
|
15617
15617
|
);
|
|
@@ -15642,7 +15642,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15642
15642
|
if (hasNamedDefaultSlot) {
|
|
15643
15643
|
context.onError(
|
|
15644
15644
|
createCompilerError(
|
|
15645
|
-
|
|
15645
|
+
39,
|
|
15646
15646
|
implicitDefaultChildren[0].loc
|
|
15647
15647
|
)
|
|
15648
15648
|
);
|
|
@@ -15695,17 +15695,17 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15695
15695
|
for (let i = 0; i < children.length; i++) {
|
|
15696
15696
|
const child = children[i];
|
|
15697
15697
|
switch (child.type) {
|
|
15698
|
-
case
|
|
15699
|
-
if (child.tagType ===
|
|
15698
|
+
case 1:
|
|
15699
|
+
if (child.tagType === 2 || hasForwardedSlots(child.children)) {
|
|
15700
15700
|
return true;
|
|
15701
15701
|
}
|
|
15702
15702
|
break;
|
|
15703
|
-
case
|
|
15703
|
+
case 9:
|
|
15704
15704
|
if (hasForwardedSlots(child.branches))
|
|
15705
15705
|
return true;
|
|
15706
15706
|
break;
|
|
15707
|
-
case
|
|
15708
|
-
case
|
|
15707
|
+
case 10:
|
|
15708
|
+
case 11:
|
|
15709
15709
|
if (hasForwardedSlots(child.children))
|
|
15710
15710
|
return true;
|
|
15711
15711
|
break;
|
|
@@ -15714,20 +15714,20 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15714
15714
|
return false;
|
|
15715
15715
|
}
|
|
15716
15716
|
function isNonWhitespaceContent(node) {
|
|
15717
|
-
if (node.type !==
|
|
15717
|
+
if (node.type !== 2 && node.type !== 12)
|
|
15718
15718
|
return true;
|
|
15719
|
-
return node.type ===
|
|
15719
|
+
return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
|
|
15720
15720
|
}
|
|
15721
15721
|
|
|
15722
15722
|
const directiveImportMap = /* @__PURE__ */ new WeakMap();
|
|
15723
15723
|
const transformElement = (node, context) => {
|
|
15724
15724
|
return function postTransformElement() {
|
|
15725
15725
|
node = context.currentNode;
|
|
15726
|
-
if (!(node.type ===
|
|
15726
|
+
if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) {
|
|
15727
15727
|
return;
|
|
15728
15728
|
}
|
|
15729
15729
|
const { tag, props } = node;
|
|
15730
|
-
const isComponent = node.tagType ===
|
|
15730
|
+
const isComponent = node.tagType === 1;
|
|
15731
15731
|
let vnodeTag = isComponent ? resolveComponentType(node, context) : `"${tag}"`;
|
|
15732
15732
|
const isDynamicComponent = isObject(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
|
|
15733
15733
|
let vnodeProps;
|
|
@@ -15770,7 +15770,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15770
15770
|
patchFlag |= 1024;
|
|
15771
15771
|
if (node.children.length > 1) {
|
|
15772
15772
|
context.onError(
|
|
15773
|
-
createCompilerError(
|
|
15773
|
+
createCompilerError(46, {
|
|
15774
15774
|
start: node.children[0].loc.start,
|
|
15775
15775
|
end: node.children[node.children.length - 1].loc.end,
|
|
15776
15776
|
source: ""
|
|
@@ -15790,11 +15790,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15790
15790
|
} else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
|
|
15791
15791
|
const child = node.children[0];
|
|
15792
15792
|
const type = child.type;
|
|
15793
|
-
const hasDynamicTextChild = type ===
|
|
15793
|
+
const hasDynamicTextChild = type === 5 || type === 8;
|
|
15794
15794
|
if (hasDynamicTextChild && getConstantType(child, context) === 0) {
|
|
15795
15795
|
patchFlag |= 1;
|
|
15796
15796
|
}
|
|
15797
|
-
if (hasDynamicTextChild || type ===
|
|
15797
|
+
if (hasDynamicTextChild || type === 2) {
|
|
15798
15798
|
vnodeChildren = child;
|
|
15799
15799
|
} else {
|
|
15800
15800
|
vnodeChildren = node.children;
|
|
@@ -15840,13 +15840,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15840
15840
|
"COMPILER_IS_ON_ELEMENT",
|
|
15841
15841
|
context
|
|
15842
15842
|
)) {
|
|
15843
|
-
const exp = isProp.type ===
|
|
15843
|
+
const exp = isProp.type === 6 ? isProp.value && createSimpleExpression(isProp.value.content, true) : isProp.exp;
|
|
15844
15844
|
if (exp) {
|
|
15845
15845
|
return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
|
|
15846
15846
|
exp
|
|
15847
15847
|
]);
|
|
15848
15848
|
}
|
|
15849
|
-
} else if (isProp.type ===
|
|
15849
|
+
} else if (isProp.type === 6 && isProp.value.content.startsWith("vue:")) {
|
|
15850
15850
|
tag = isProp.value.content.slice(4);
|
|
15851
15851
|
}
|
|
15852
15852
|
}
|
|
@@ -15905,7 +15905,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15905
15905
|
if (isEventHandler && isReservedProp(name)) {
|
|
15906
15906
|
hasVnodeHook = true;
|
|
15907
15907
|
}
|
|
15908
|
-
if (value.type ===
|
|
15908
|
+
if (value.type === 20 || (value.type === 4 || value.type === 8) && getConstantType(value, context) > 0) {
|
|
15909
15909
|
return;
|
|
15910
15910
|
}
|
|
15911
15911
|
if (name === "ref") {
|
|
@@ -15926,7 +15926,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15926
15926
|
};
|
|
15927
15927
|
for (let i = 0; i < props.length; i++) {
|
|
15928
15928
|
const prop = props[i];
|
|
15929
|
-
if (prop.type ===
|
|
15929
|
+
if (prop.type === 6) {
|
|
15930
15930
|
const { loc, name, value } = prop;
|
|
15931
15931
|
let isStatic = true;
|
|
15932
15932
|
if (name === "ref") {
|
|
@@ -15967,7 +15967,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
15967
15967
|
if (name === "slot") {
|
|
15968
15968
|
if (!isComponent) {
|
|
15969
15969
|
context.onError(
|
|
15970
|
-
createCompilerError(
|
|
15970
|
+
createCompilerError(40, loc)
|
|
15971
15971
|
);
|
|
15972
15972
|
}
|
|
15973
15973
|
continue;
|
|
@@ -16008,9 +16008,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16008
16008
|
{
|
|
16009
16009
|
{
|
|
16010
16010
|
const hasOverridableKeys = mergeArgs.some((arg2) => {
|
|
16011
|
-
if (arg2.type ===
|
|
16011
|
+
if (arg2.type === 15) {
|
|
16012
16012
|
return arg2.properties.some(({ key }) => {
|
|
16013
|
-
if (key.type !==
|
|
16013
|
+
if (key.type !== 4 || !key.isStatic) {
|
|
16014
16014
|
return true;
|
|
16015
16015
|
}
|
|
16016
16016
|
return key.content !== "class" && key.content !== "style" && !isOn(key.content);
|
|
@@ -16038,7 +16038,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16038
16038
|
mergeArgs.push(exp);
|
|
16039
16039
|
} else {
|
|
16040
16040
|
pushMergeArg({
|
|
16041
|
-
type:
|
|
16041
|
+
type: 14,
|
|
16042
16042
|
loc,
|
|
16043
16043
|
callee: context.helper(TO_HANDLERS),
|
|
16044
16044
|
arguments: isComponent ? [exp] : [exp, `true`]
|
|
@@ -16047,7 +16047,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16047
16047
|
} else {
|
|
16048
16048
|
context.onError(
|
|
16049
16049
|
createCompilerError(
|
|
16050
|
-
isVBind ?
|
|
16050
|
+
isVBind ? 34 : 35,
|
|
16051
16051
|
loc
|
|
16052
16052
|
)
|
|
16053
16053
|
);
|
|
@@ -16116,7 +16116,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16116
16116
|
}
|
|
16117
16117
|
if (!context.inSSR && propsExpression) {
|
|
16118
16118
|
switch (propsExpression.type) {
|
|
16119
|
-
case
|
|
16119
|
+
case 15:
|
|
16120
16120
|
let classKeyIndex = -1;
|
|
16121
16121
|
let styleKeyIndex = -1;
|
|
16122
16122
|
let hasDynamicKey = false;
|
|
@@ -16143,9 +16143,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16143
16143
|
}
|
|
16144
16144
|
if (styleProp && // the static style is compiled into an object,
|
|
16145
16145
|
// so use `hasStyleBinding` to ensure that it is a dynamic style binding
|
|
16146
|
-
(hasStyleBinding || styleProp.value.type ===
|
|
16146
|
+
(hasStyleBinding || styleProp.value.type === 4 && styleProp.value.content.trim()[0] === `[` || // v-bind:style and style both exist,
|
|
16147
16147
|
// v-bind:style with static literal object
|
|
16148
|
-
styleProp.value.type ===
|
|
16148
|
+
styleProp.value.type === 17)) {
|
|
16149
16149
|
styleProp.value = createCallExpression(
|
|
16150
16150
|
context.helper(NORMALIZE_STYLE),
|
|
16151
16151
|
[styleProp.value]
|
|
@@ -16158,7 +16158,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16158
16158
|
);
|
|
16159
16159
|
}
|
|
16160
16160
|
break;
|
|
16161
|
-
case
|
|
16161
|
+
case 14:
|
|
16162
16162
|
break;
|
|
16163
16163
|
default:
|
|
16164
16164
|
propsExpression = createCallExpression(
|
|
@@ -16185,7 +16185,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16185
16185
|
const deduped = [];
|
|
16186
16186
|
for (let i = 0; i < properties.length; i++) {
|
|
16187
16187
|
const prop = properties[i];
|
|
16188
|
-
if (prop.key.type ===
|
|
16188
|
+
if (prop.key.type === 8 || !prop.key.isStatic) {
|
|
16189
16189
|
deduped.push(prop);
|
|
16190
16190
|
continue;
|
|
16191
16191
|
}
|
|
@@ -16203,7 +16203,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16203
16203
|
return deduped;
|
|
16204
16204
|
}
|
|
16205
16205
|
function mergeAsArray(existing, incoming) {
|
|
16206
|
-
if (existing.value.type ===
|
|
16206
|
+
if (existing.value.type === 17) {
|
|
16207
16207
|
existing.value.elements.push(incoming.value);
|
|
16208
16208
|
} else {
|
|
16209
16209
|
existing.value = createArrayExpression(
|
|
@@ -16302,7 +16302,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16302
16302
|
const nonNameProps = [];
|
|
16303
16303
|
for (let i = 0; i < node.props.length; i++) {
|
|
16304
16304
|
const p = node.props[i];
|
|
16305
|
-
if (p.type ===
|
|
16305
|
+
if (p.type === 6) {
|
|
16306
16306
|
if (p.value) {
|
|
16307
16307
|
if (p.name === "name") {
|
|
16308
16308
|
slotName = JSON.stringify(p.value.content);
|
|
@@ -16335,7 +16335,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16335
16335
|
if (directives.length) {
|
|
16336
16336
|
context.onError(
|
|
16337
16337
|
createCompilerError(
|
|
16338
|
-
|
|
16338
|
+
36,
|
|
16339
16339
|
directives[0].loc
|
|
16340
16340
|
)
|
|
16341
16341
|
);
|
|
@@ -16351,16 +16351,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16351
16351
|
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
16352
16352
|
const { loc, modifiers, arg } = dir;
|
|
16353
16353
|
if (!dir.exp && !modifiers.length) {
|
|
16354
|
-
context.onError(createCompilerError(
|
|
16354
|
+
context.onError(createCompilerError(35, loc));
|
|
16355
16355
|
}
|
|
16356
16356
|
let eventName;
|
|
16357
|
-
if (arg.type ===
|
|
16357
|
+
if (arg.type === 4) {
|
|
16358
16358
|
if (arg.isStatic) {
|
|
16359
16359
|
let rawName = arg.content;
|
|
16360
16360
|
if (rawName.startsWith("vue:")) {
|
|
16361
16361
|
rawName = `vnode-${rawName.slice(4)}`;
|
|
16362
16362
|
}
|
|
16363
|
-
const eventString = node.tagType !==
|
|
16363
|
+
const eventString = node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? (
|
|
16364
16364
|
// for non-element and vnode lifecycle event listeners, auto convert
|
|
16365
16365
|
// it to camelCase. See issue #2249
|
|
16366
16366
|
toHandlerKey(camelize(rawName))
|
|
@@ -16428,14 +16428,14 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16428
16428
|
const transformBind = (dir, _node, context) => {
|
|
16429
16429
|
const { exp, modifiers, loc } = dir;
|
|
16430
16430
|
const arg = dir.arg;
|
|
16431
|
-
if (arg.type !==
|
|
16431
|
+
if (arg.type !== 4) {
|
|
16432
16432
|
arg.children.unshift(`(`);
|
|
16433
16433
|
arg.children.push(`) || ""`);
|
|
16434
16434
|
} else if (!arg.isStatic) {
|
|
16435
16435
|
arg.content = `${arg.content} || ""`;
|
|
16436
16436
|
}
|
|
16437
16437
|
if (modifiers.includes("camel")) {
|
|
16438
|
-
if (arg.type ===
|
|
16438
|
+
if (arg.type === 4) {
|
|
16439
16439
|
if (arg.isStatic) {
|
|
16440
16440
|
arg.content = camelize(arg.content);
|
|
16441
16441
|
} else {
|
|
@@ -16454,8 +16454,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16454
16454
|
injectPrefix(arg, "^");
|
|
16455
16455
|
}
|
|
16456
16456
|
}
|
|
16457
|
-
if (!exp || exp.type ===
|
|
16458
|
-
context.onError(createCompilerError(
|
|
16457
|
+
if (!exp || exp.type === 4 && !exp.content.trim()) {
|
|
16458
|
+
context.onError(createCompilerError(34, loc));
|
|
16459
16459
|
return {
|
|
16460
16460
|
props: [createObjectProperty(arg, createSimpleExpression("", true, loc))]
|
|
16461
16461
|
};
|
|
@@ -16465,7 +16465,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16465
16465
|
};
|
|
16466
16466
|
};
|
|
16467
16467
|
const injectPrefix = (arg, prefix) => {
|
|
16468
|
-
if (arg.type ===
|
|
16468
|
+
if (arg.type === 4) {
|
|
16469
16469
|
if (arg.isStatic) {
|
|
16470
16470
|
arg.content = prefix + arg.content;
|
|
16471
16471
|
} else {
|
|
@@ -16478,7 +16478,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16478
16478
|
};
|
|
16479
16479
|
|
|
16480
16480
|
const transformText = (node, context) => {
|
|
16481
|
-
if (node.type ===
|
|
16481
|
+
if (node.type === 0 || node.type === 1 || node.type === 11 || node.type === 10) {
|
|
16482
16482
|
return () => {
|
|
16483
16483
|
const children = node.children;
|
|
16484
16484
|
let currentContainer = void 0;
|
|
@@ -16510,13 +16510,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16510
16510
|
// as-is since the runtime has dedicated fast path for this by directly
|
|
16511
16511
|
// setting textContent of the element.
|
|
16512
16512
|
// for component root it's always normalized anyway.
|
|
16513
|
-
children.length === 1 && (node.type ===
|
|
16513
|
+
children.length === 1 && (node.type === 0 || node.type === 1 && node.tagType === 0 && // #3756
|
|
16514
16514
|
// custom directives can potentially add DOM elements arbitrarily,
|
|
16515
16515
|
// we need to avoid setting textContent of the element at runtime
|
|
16516
16516
|
// to avoid accidentally overwriting the DOM elements added
|
|
16517
16517
|
// by the user through custom directives.
|
|
16518
16518
|
!node.props.find(
|
|
16519
|
-
(p) => p.type ===
|
|
16519
|
+
(p) => p.type === 7 && !context.directiveTransforms[p.name]
|
|
16520
16520
|
) && // in compat mode, <template> tags with no special directives
|
|
16521
16521
|
// will be rendered as a fragment so its children must be
|
|
16522
16522
|
// converted into vnodes.
|
|
@@ -16525,9 +16525,9 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16525
16525
|
}
|
|
16526
16526
|
for (let i = 0; i < children.length; i++) {
|
|
16527
16527
|
const child = children[i];
|
|
16528
|
-
if (isText$1(child) || child.type ===
|
|
16528
|
+
if (isText$1(child) || child.type === 8) {
|
|
16529
16529
|
const callArgs = [];
|
|
16530
|
-
if (child.type !==
|
|
16530
|
+
if (child.type !== 2 || child.content !== " ") {
|
|
16531
16531
|
callArgs.push(child);
|
|
16532
16532
|
}
|
|
16533
16533
|
if (!context.ssr && getConstantType(child, context) === 0) {
|
|
@@ -16536,7 +16536,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16536
16536
|
);
|
|
16537
16537
|
}
|
|
16538
16538
|
children[i] = {
|
|
16539
|
-
type:
|
|
16539
|
+
type: 12,
|
|
16540
16540
|
content: child,
|
|
16541
16541
|
loc: child.loc,
|
|
16542
16542
|
codegenNode: createCallExpression(
|
|
@@ -16552,7 +16552,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16552
16552
|
|
|
16553
16553
|
const seen$1 = /* @__PURE__ */ new WeakSet();
|
|
16554
16554
|
const transformOnce = (node, context) => {
|
|
16555
|
-
if (node.type ===
|
|
16555
|
+
if (node.type === 1 && findDir(node, "once", true)) {
|
|
16556
16556
|
if (seen$1.has(node) || context.inVOnce) {
|
|
16557
16557
|
return;
|
|
16558
16558
|
}
|
|
@@ -16577,21 +16577,21 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16577
16577
|
const { exp, arg } = dir;
|
|
16578
16578
|
if (!exp) {
|
|
16579
16579
|
context.onError(
|
|
16580
|
-
createCompilerError(
|
|
16580
|
+
createCompilerError(41, dir.loc)
|
|
16581
16581
|
);
|
|
16582
16582
|
return createTransformProps();
|
|
16583
16583
|
}
|
|
16584
16584
|
const rawExp = exp.loc.source;
|
|
16585
|
-
const expString = exp.type ===
|
|
16585
|
+
const expString = exp.type === 4 ? exp.content : rawExp;
|
|
16586
16586
|
const bindingType = context.bindingMetadata[rawExp];
|
|
16587
16587
|
if (bindingType === "props" || bindingType === "props-aliased") {
|
|
16588
|
-
context.onError(createCompilerError(
|
|
16588
|
+
context.onError(createCompilerError(44, exp.loc));
|
|
16589
16589
|
return createTransformProps();
|
|
16590
16590
|
}
|
|
16591
16591
|
const maybeRef = false;
|
|
16592
16592
|
if (!expString.trim() || !isMemberExpression(expString) && !maybeRef) {
|
|
16593
16593
|
context.onError(
|
|
16594
|
-
createCompilerError(
|
|
16594
|
+
createCompilerError(42, exp.loc)
|
|
16595
16595
|
);
|
|
16596
16596
|
return createTransformProps();
|
|
16597
16597
|
}
|
|
@@ -16612,7 +16612,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16612
16612
|
// "onUpdate:modelValue": $event => (foo = $event)
|
|
16613
16613
|
createObjectProperty(eventName, assignmentExp)
|
|
16614
16614
|
];
|
|
16615
|
-
if (dir.modifiers.length && node.tagType ===
|
|
16615
|
+
if (dir.modifiers.length && node.tagType === 1) {
|
|
16616
16616
|
const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
16617
16617
|
const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
16618
16618
|
props.push(
|
|
@@ -16622,7 +16622,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16622
16622
|
`{ ${modifiers} }`,
|
|
16623
16623
|
false,
|
|
16624
16624
|
dir.loc,
|
|
16625
|
-
|
|
16625
|
+
2
|
|
16626
16626
|
)
|
|
16627
16627
|
)
|
|
16628
16628
|
);
|
|
@@ -16638,30 +16638,30 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16638
16638
|
if (!isCompatEnabled("COMPILER_FILTER", context)) {
|
|
16639
16639
|
return;
|
|
16640
16640
|
}
|
|
16641
|
-
if (node.type ===
|
|
16641
|
+
if (node.type === 5) {
|
|
16642
16642
|
rewriteFilter(node.content, context);
|
|
16643
16643
|
}
|
|
16644
|
-
if (node.type ===
|
|
16644
|
+
if (node.type === 1) {
|
|
16645
16645
|
node.props.forEach((prop) => {
|
|
16646
|
-
if (prop.type ===
|
|
16646
|
+
if (prop.type === 7 && prop.name !== "for" && prop.exp) {
|
|
16647
16647
|
rewriteFilter(prop.exp, context);
|
|
16648
16648
|
}
|
|
16649
16649
|
});
|
|
16650
16650
|
}
|
|
16651
16651
|
};
|
|
16652
16652
|
function rewriteFilter(node, context) {
|
|
16653
|
-
if (node.type ===
|
|
16653
|
+
if (node.type === 4) {
|
|
16654
16654
|
parseFilter(node, context);
|
|
16655
16655
|
} else {
|
|
16656
16656
|
for (let i = 0; i < node.children.length; i++) {
|
|
16657
16657
|
const child = node.children[i];
|
|
16658
16658
|
if (typeof child !== "object")
|
|
16659
16659
|
continue;
|
|
16660
|
-
if (child.type ===
|
|
16660
|
+
if (child.type === 4) {
|
|
16661
16661
|
parseFilter(child, context);
|
|
16662
|
-
} else if (child.type ===
|
|
16662
|
+
} else if (child.type === 8) {
|
|
16663
16663
|
rewriteFilter(node, context);
|
|
16664
|
-
} else if (child.type ===
|
|
16664
|
+
} else if (child.type === 5) {
|
|
16665
16665
|
rewriteFilter(child.content, context);
|
|
16666
16666
|
}
|
|
16667
16667
|
}
|
|
@@ -16782,7 +16782,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16782
16782
|
|
|
16783
16783
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
16784
16784
|
const transformMemo = (node, context) => {
|
|
16785
|
-
if (node.type ===
|
|
16785
|
+
if (node.type === 1) {
|
|
16786
16786
|
const dir = findDir(node, "memo");
|
|
16787
16787
|
if (!dir || seen.has(node)) {
|
|
16788
16788
|
return;
|
|
@@ -16790,8 +16790,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16790
16790
|
seen.add(node);
|
|
16791
16791
|
return () => {
|
|
16792
16792
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
16793
|
-
if (codegenNode && codegenNode.type ===
|
|
16794
|
-
if (node.tagType !==
|
|
16793
|
+
if (codegenNode && codegenNode.type === 13) {
|
|
16794
|
+
if (node.tagType !== 1) {
|
|
16795
16795
|
makeBlock(codegenNode, context);
|
|
16796
16796
|
}
|
|
16797
16797
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
@@ -16831,17 +16831,17 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16831
16831
|
const isModuleMode = options.mode === "module";
|
|
16832
16832
|
{
|
|
16833
16833
|
if (options.prefixIdentifiers === true) {
|
|
16834
|
-
onError(createCompilerError(
|
|
16834
|
+
onError(createCompilerError(47));
|
|
16835
16835
|
} else if (isModuleMode) {
|
|
16836
|
-
onError(createCompilerError(
|
|
16836
|
+
onError(createCompilerError(48));
|
|
16837
16837
|
}
|
|
16838
16838
|
}
|
|
16839
16839
|
const prefixIdentifiers = false;
|
|
16840
16840
|
if (options.cacheHandlers) {
|
|
16841
|
-
onError(createCompilerError(
|
|
16841
|
+
onError(createCompilerError(49));
|
|
16842
16842
|
}
|
|
16843
16843
|
if (options.scopeId && !isModuleMode) {
|
|
16844
|
-
onError(createCompilerError(
|
|
16844
|
+
onError(createCompilerError(50));
|
|
16845
16845
|
}
|
|
16846
16846
|
const ast = isString(template) ? baseParse(template, options) : template;
|
|
16847
16847
|
const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
|
|
@@ -16928,30 +16928,30 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16928
16928
|
// https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
|
|
16929
16929
|
getNamespace(tag, parent) {
|
|
16930
16930
|
let ns = parent ? parent.ns : 0;
|
|
16931
|
-
if (parent && ns ===
|
|
16931
|
+
if (parent && ns === 2) {
|
|
16932
16932
|
if (parent.tag === "annotation-xml") {
|
|
16933
16933
|
if (tag === "svg") {
|
|
16934
|
-
return
|
|
16934
|
+
return 1;
|
|
16935
16935
|
}
|
|
16936
16936
|
if (parent.props.some(
|
|
16937
|
-
(a) => a.type ===
|
|
16937
|
+
(a) => a.type === 6 && a.name === "encoding" && a.value != null && (a.value.content === "text/html" || a.value.content === "application/xhtml+xml")
|
|
16938
16938
|
)) {
|
|
16939
16939
|
ns = 0;
|
|
16940
16940
|
}
|
|
16941
16941
|
} else if (/^m(?:[ions]|text)$/.test(parent.tag) && tag !== "mglyph" && tag !== "malignmark") {
|
|
16942
16942
|
ns = 0;
|
|
16943
16943
|
}
|
|
16944
|
-
} else if (parent && ns ===
|
|
16944
|
+
} else if (parent && ns === 1) {
|
|
16945
16945
|
if (parent.tag === "foreignObject" || parent.tag === "desc" || parent.tag === "title") {
|
|
16946
16946
|
ns = 0;
|
|
16947
16947
|
}
|
|
16948
16948
|
}
|
|
16949
16949
|
if (ns === 0) {
|
|
16950
16950
|
if (tag === "svg") {
|
|
16951
|
-
return
|
|
16951
|
+
return 1;
|
|
16952
16952
|
}
|
|
16953
16953
|
if (tag === "math") {
|
|
16954
|
-
return
|
|
16954
|
+
return 2;
|
|
16955
16955
|
}
|
|
16956
16956
|
}
|
|
16957
16957
|
return ns;
|
|
@@ -16960,22 +16960,22 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16960
16960
|
getTextMode({ tag, ns }) {
|
|
16961
16961
|
if (ns === 0) {
|
|
16962
16962
|
if (tag === "textarea" || tag === "title") {
|
|
16963
|
-
return
|
|
16963
|
+
return 1;
|
|
16964
16964
|
}
|
|
16965
16965
|
if (isRawTextContainer(tag)) {
|
|
16966
|
-
return
|
|
16966
|
+
return 2;
|
|
16967
16967
|
}
|
|
16968
16968
|
}
|
|
16969
|
-
return
|
|
16969
|
+
return 0;
|
|
16970
16970
|
}
|
|
16971
16971
|
};
|
|
16972
16972
|
|
|
16973
16973
|
const transformStyle = (node) => {
|
|
16974
|
-
if (node.type ===
|
|
16974
|
+
if (node.type === 1) {
|
|
16975
16975
|
node.props.forEach((p, i) => {
|
|
16976
|
-
if (p.type ===
|
|
16976
|
+
if (p.type === 6 && p.name === "style" && p.value) {
|
|
16977
16977
|
node.props[i] = {
|
|
16978
|
-
type:
|
|
16978
|
+
type: 7,
|
|
16979
16979
|
name: `bind`,
|
|
16980
16980
|
arg: createSimpleExpression(`style`, true, p.loc),
|
|
16981
16981
|
exp: parseInlineCSS(p.value.content, p.loc),
|
|
@@ -16992,7 +16992,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
16992
16992
|
JSON.stringify(normalized),
|
|
16993
16993
|
false,
|
|
16994
16994
|
loc,
|
|
16995
|
-
|
|
16995
|
+
3
|
|
16996
16996
|
);
|
|
16997
16997
|
};
|
|
16998
16998
|
|
|
@@ -17005,16 +17005,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17005
17005
|
}
|
|
17006
17006
|
const DOMErrorMessages = {
|
|
17007
17007
|
[51]: `v-html is missing expression.`,
|
|
17008
|
-
[
|
|
17009
|
-
[
|
|
17010
|
-
[
|
|
17011
|
-
[
|
|
17012
|
-
[
|
|
17013
|
-
[
|
|
17014
|
-
[
|
|
17015
|
-
[
|
|
17016
|
-
[
|
|
17017
|
-
[
|
|
17008
|
+
[52]: `v-html will override element children.`,
|
|
17009
|
+
[53]: `v-text is missing expression.`,
|
|
17010
|
+
[54]: `v-text will override element children.`,
|
|
17011
|
+
[55]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
|
|
17012
|
+
[56]: `v-model argument is not supported on plain elements.`,
|
|
17013
|
+
[57]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
|
|
17014
|
+
[58]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
|
|
17015
|
+
[59]: `v-show is missing expression.`,
|
|
17016
|
+
[60]: `<Transition> expects exactly one child element or component.`,
|
|
17017
|
+
[61]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
|
|
17018
17018
|
};
|
|
17019
17019
|
|
|
17020
17020
|
const transformVHtml = (dir, node, context) => {
|
|
@@ -17026,7 +17026,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17026
17026
|
}
|
|
17027
17027
|
if (node.children.length) {
|
|
17028
17028
|
context.onError(
|
|
17029
|
-
createDOMCompilerError(
|
|
17029
|
+
createDOMCompilerError(52, loc)
|
|
17030
17030
|
);
|
|
17031
17031
|
node.children.length = 0;
|
|
17032
17032
|
}
|
|
@@ -17044,12 +17044,12 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17044
17044
|
const { exp, loc } = dir;
|
|
17045
17045
|
if (!exp) {
|
|
17046
17046
|
context.onError(
|
|
17047
|
-
createDOMCompilerError(
|
|
17047
|
+
createDOMCompilerError(53, loc)
|
|
17048
17048
|
);
|
|
17049
17049
|
}
|
|
17050
17050
|
if (node.children.length) {
|
|
17051
17051
|
context.onError(
|
|
17052
|
-
createDOMCompilerError(
|
|
17052
|
+
createDOMCompilerError(54, loc)
|
|
17053
17053
|
);
|
|
17054
17054
|
node.children.length = 0;
|
|
17055
17055
|
}
|
|
@@ -17069,13 +17069,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17069
17069
|
|
|
17070
17070
|
const transformModel = (dir, node, context) => {
|
|
17071
17071
|
const baseResult = transformModel$1(dir, node, context);
|
|
17072
|
-
if (!baseResult.props.length || node.tagType ===
|
|
17072
|
+
if (!baseResult.props.length || node.tagType === 1) {
|
|
17073
17073
|
return baseResult;
|
|
17074
17074
|
}
|
|
17075
17075
|
if (dir.arg) {
|
|
17076
17076
|
context.onError(
|
|
17077
17077
|
createDOMCompilerError(
|
|
17078
|
-
|
|
17078
|
+
56,
|
|
17079
17079
|
dir.arg.loc
|
|
17080
17080
|
)
|
|
17081
17081
|
);
|
|
@@ -17085,7 +17085,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17085
17085
|
if (value) {
|
|
17086
17086
|
context.onError(
|
|
17087
17087
|
createDOMCompilerError(
|
|
17088
|
-
|
|
17088
|
+
58,
|
|
17089
17089
|
value.loc
|
|
17090
17090
|
)
|
|
17091
17091
|
);
|
|
@@ -17099,7 +17099,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17099
17099
|
if (tag === "input" || isCustomElement) {
|
|
17100
17100
|
const type = findProp(node, `type`);
|
|
17101
17101
|
if (type) {
|
|
17102
|
-
if (type.type ===
|
|
17102
|
+
if (type.type === 7) {
|
|
17103
17103
|
directiveToUse = V_MODEL_DYNAMIC;
|
|
17104
17104
|
} else if (type.value) {
|
|
17105
17105
|
switch (type.value.content) {
|
|
@@ -17113,7 +17113,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17113
17113
|
isInvalidType = true;
|
|
17114
17114
|
context.onError(
|
|
17115
17115
|
createDOMCompilerError(
|
|
17116
|
-
|
|
17116
|
+
57,
|
|
17117
17117
|
dir.loc
|
|
17118
17118
|
)
|
|
17119
17119
|
);
|
|
@@ -17139,13 +17139,13 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17139
17139
|
} else {
|
|
17140
17140
|
context.onError(
|
|
17141
17141
|
createDOMCompilerError(
|
|
17142
|
-
|
|
17142
|
+
55,
|
|
17143
17143
|
dir.loc
|
|
17144
17144
|
)
|
|
17145
17145
|
);
|
|
17146
17146
|
}
|
|
17147
17147
|
baseResult.props = baseResult.props.filter(
|
|
17148
|
-
(p) => !(p.key.type ===
|
|
17148
|
+
(p) => !(p.key.type === 4 && p.key.content === "modelValue")
|
|
17149
17149
|
);
|
|
17150
17150
|
return baseResult;
|
|
17151
17151
|
};
|
|
@@ -17203,7 +17203,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17203
17203
|
};
|
|
17204
17204
|
const transformClick = (key, event) => {
|
|
17205
17205
|
const isStaticClick = isStaticExp(key) && key.content.toLowerCase() === "onclick";
|
|
17206
|
-
return isStaticClick ? createSimpleExpression(event, true) : key.type !==
|
|
17206
|
+
return isStaticClick ? createSimpleExpression(event, true) : key.type !== 4 ? createCompoundExpression([
|
|
17207
17207
|
`(`,
|
|
17208
17208
|
key,
|
|
17209
17209
|
`) === "onClick" ? "${event}" : (`,
|
|
@@ -17251,7 +17251,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17251
17251
|
const { exp, loc } = dir;
|
|
17252
17252
|
if (!exp) {
|
|
17253
17253
|
context.onError(
|
|
17254
|
-
createDOMCompilerError(
|
|
17254
|
+
createDOMCompilerError(59, loc)
|
|
17255
17255
|
);
|
|
17256
17256
|
}
|
|
17257
17257
|
return {
|
|
@@ -17261,7 +17261,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17261
17261
|
};
|
|
17262
17262
|
|
|
17263
17263
|
const transformTransition = (node, context) => {
|
|
17264
|
-
if (node.type ===
|
|
17264
|
+
if (node.type === 1 && node.tagType === 1) {
|
|
17265
17265
|
const component = context.isBuiltInComponent(node.tag);
|
|
17266
17266
|
if (component === TRANSITION) {
|
|
17267
17267
|
return () => {
|
|
@@ -17271,7 +17271,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17271
17271
|
if (hasMultipleChildren(node)) {
|
|
17272
17272
|
context.onError(
|
|
17273
17273
|
createDOMCompilerError(
|
|
17274
|
-
|
|
17274
|
+
60,
|
|
17275
17275
|
{
|
|
17276
17276
|
start: node.children[0].loc.start,
|
|
17277
17277
|
end: node.children[node.children.length - 1].loc.end,
|
|
@@ -17281,11 +17281,11 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17281
17281
|
);
|
|
17282
17282
|
}
|
|
17283
17283
|
const child = node.children[0];
|
|
17284
|
-
if (child.type ===
|
|
17284
|
+
if (child.type === 1) {
|
|
17285
17285
|
for (const p of child.props) {
|
|
17286
|
-
if (p.type ===
|
|
17286
|
+
if (p.type === 7 && p.name === "show") {
|
|
17287
17287
|
node.props.push({
|
|
17288
|
-
type:
|
|
17288
|
+
type: 6,
|
|
17289
17289
|
name: "persisted",
|
|
17290
17290
|
value: void 0,
|
|
17291
17291
|
loc: node.loc
|
|
@@ -17299,16 +17299,16 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
|
|
|
17299
17299
|
};
|
|
17300
17300
|
function hasMultipleChildren(node) {
|
|
17301
17301
|
const children = node.children = node.children.filter(
|
|
17302
|
-
(c) => c.type !==
|
|
17302
|
+
(c) => c.type !== 3 && !(c.type === 2 && !c.content.trim())
|
|
17303
17303
|
);
|
|
17304
17304
|
const child = children[0];
|
|
17305
|
-
return children.length !== 1 || child.type ===
|
|
17305
|
+
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
17306
17306
|
}
|
|
17307
17307
|
|
|
17308
17308
|
const ignoreSideEffectTags = (node, context) => {
|
|
17309
|
-
if (node.type ===
|
|
17309
|
+
if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
|
|
17310
17310
|
context.onError(
|
|
17311
|
-
createDOMCompilerError(
|
|
17311
|
+
createDOMCompilerError(61, node.loc)
|
|
17312
17312
|
);
|
|
17313
17313
|
context.removeNode();
|
|
17314
17314
|
}
|