@vue/compat 3.5.0-alpha.5 → 3.5.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -80
- package/dist/vue-compat.d.ts +2 -2
- package/dist/vue.cjs.js +586 -215
- package/dist/vue.cjs.prod.js +524 -189
- package/dist/vue.esm-browser.js +556 -210
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +556 -210
- package/dist/vue.global.js +545 -205
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +477 -180
- package/dist/vue.runtime.esm-browser.prod.js +2 -2
- package/dist/vue.runtime.esm-bundler.js +477 -180
- package/dist/vue.runtime.global.js +466 -175
- package/dist/vue.runtime.global.prod.js +2 -2
- package/package.json +3 -3
package/dist/vue.esm-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.5.0-
|
|
2
|
+
* @vue/compat v3.5.0-beta.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -61,9 +61,11 @@ const cacheStringFunction = (fn) => {
|
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
const camelizeRE = /-(\w)/g;
|
|
64
|
-
const camelize = cacheStringFunction(
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
const camelize = cacheStringFunction(
|
|
65
|
+
(str) => {
|
|
66
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
67
|
+
}
|
|
68
|
+
);
|
|
67
69
|
const hyphenateRE = /\B([A-Z])/g;
|
|
68
70
|
const hyphenate = cacheStringFunction(
|
|
69
71
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
@@ -71,10 +73,12 @@ const hyphenate = cacheStringFunction(
|
|
|
71
73
|
const capitalize = cacheStringFunction((str) => {
|
|
72
74
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
73
75
|
});
|
|
74
|
-
const toHandlerKey = cacheStringFunction(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const toHandlerKey = cacheStringFunction(
|
|
77
|
+
(str) => {
|
|
78
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
79
|
+
return s;
|
|
80
|
+
}
|
|
81
|
+
);
|
|
78
82
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
79
83
|
const invokeArrayFns = (fns, ...arg) => {
|
|
80
84
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -386,6 +390,7 @@ class EffectScope {
|
|
|
386
390
|
* @internal
|
|
387
391
|
*/
|
|
388
392
|
this.cleanups = [];
|
|
393
|
+
this._isPaused = false;
|
|
389
394
|
this.parent = activeEffectScope;
|
|
390
395
|
if (!detached && activeEffectScope) {
|
|
391
396
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
@@ -396,6 +401,37 @@ class EffectScope {
|
|
|
396
401
|
get active() {
|
|
397
402
|
return this._active;
|
|
398
403
|
}
|
|
404
|
+
pause() {
|
|
405
|
+
if (this._active) {
|
|
406
|
+
this._isPaused = true;
|
|
407
|
+
if (this.scopes) {
|
|
408
|
+
for (let i = 0, l = this.scopes.length; i < l; i++) {
|
|
409
|
+
this.scopes[i].pause();
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
for (let i = 0, l = this.effects.length; i < l; i++) {
|
|
413
|
+
this.effects[i].pause();
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Resumes the effect scope, including all child scopes and effects.
|
|
419
|
+
*/
|
|
420
|
+
resume() {
|
|
421
|
+
if (this._active) {
|
|
422
|
+
if (this._isPaused) {
|
|
423
|
+
this._isPaused = false;
|
|
424
|
+
if (this.scopes) {
|
|
425
|
+
for (let i = 0, l = this.scopes.length; i < l; i++) {
|
|
426
|
+
this.scopes[i].resume();
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
for (let i = 0, l = this.effects.length; i < l; i++) {
|
|
430
|
+
this.effects[i].resume();
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
}
|
|
399
435
|
run(fn) {
|
|
400
436
|
if (this._active) {
|
|
401
437
|
const currentEffectScope = activeEffectScope;
|
|
@@ -466,6 +502,7 @@ function onScopeDispose(fn, failSilently = false) {
|
|
|
466
502
|
}
|
|
467
503
|
|
|
468
504
|
let activeSub;
|
|
505
|
+
const pausedQueueEffects = /* @__PURE__ */ new WeakSet();
|
|
469
506
|
class ReactiveEffect {
|
|
470
507
|
constructor(fn) {
|
|
471
508
|
this.fn = fn;
|
|
@@ -494,6 +531,18 @@ class ReactiveEffect {
|
|
|
494
531
|
activeEffectScope.effects.push(this);
|
|
495
532
|
}
|
|
496
533
|
}
|
|
534
|
+
pause() {
|
|
535
|
+
this.flags |= 64;
|
|
536
|
+
}
|
|
537
|
+
resume() {
|
|
538
|
+
if (this.flags & 64) {
|
|
539
|
+
this.flags &= ~64;
|
|
540
|
+
if (pausedQueueEffects.has(this)) {
|
|
541
|
+
pausedQueueEffects.delete(this);
|
|
542
|
+
this.trigger();
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
497
546
|
/**
|
|
498
547
|
* @internal
|
|
499
548
|
*/
|
|
@@ -501,9 +550,6 @@ class ReactiveEffect {
|
|
|
501
550
|
if (this.flags & 2 && !(this.flags & 32)) {
|
|
502
551
|
return;
|
|
503
552
|
}
|
|
504
|
-
if (this.flags & 64) {
|
|
505
|
-
return this.trigger();
|
|
506
|
-
}
|
|
507
553
|
if (!(this.flags & 8)) {
|
|
508
554
|
this.flags |= 8;
|
|
509
555
|
this.nextEffect = batchedEffect;
|
|
@@ -547,7 +593,9 @@ class ReactiveEffect {
|
|
|
547
593
|
}
|
|
548
594
|
}
|
|
549
595
|
trigger() {
|
|
550
|
-
if (this.
|
|
596
|
+
if (this.flags & 64) {
|
|
597
|
+
pausedQueueEffects.add(this);
|
|
598
|
+
} else if (this.scheduler) {
|
|
551
599
|
this.scheduler();
|
|
552
600
|
} else {
|
|
553
601
|
this.runIfDirty();
|
|
@@ -575,6 +623,7 @@ function endBatch() {
|
|
|
575
623
|
batchDepth--;
|
|
576
624
|
return;
|
|
577
625
|
}
|
|
626
|
+
batchDepth--;
|
|
578
627
|
let error;
|
|
579
628
|
while (batchedEffect) {
|
|
580
629
|
let e = batchedEffect;
|
|
@@ -593,7 +642,6 @@ function endBatch() {
|
|
|
593
642
|
e = next;
|
|
594
643
|
}
|
|
595
644
|
}
|
|
596
|
-
batchDepth--;
|
|
597
645
|
if (error) throw error;
|
|
598
646
|
}
|
|
599
647
|
function prepareDeps(sub) {
|
|
@@ -867,9 +915,15 @@ function addSub(link) {
|
|
|
867
915
|
link.dep.subs = link;
|
|
868
916
|
}
|
|
869
917
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
870
|
-
const ITERATE_KEY = Symbol(
|
|
871
|
-
|
|
872
|
-
|
|
918
|
+
const ITERATE_KEY = Symbol(
|
|
919
|
+
"Object iterate"
|
|
920
|
+
);
|
|
921
|
+
const MAP_KEY_ITERATE_KEY = Symbol(
|
|
922
|
+
"Map keys iterate"
|
|
923
|
+
);
|
|
924
|
+
const ARRAY_ITERATE_KEY = Symbol(
|
|
925
|
+
"Array iterate"
|
|
926
|
+
);
|
|
873
927
|
function track(target, type, key) {
|
|
874
928
|
if (shouldTrack && activeSub) {
|
|
875
929
|
let depsMap = targetMap.get(target);
|
|
@@ -990,26 +1044,26 @@ const arrayInstrumentations = {
|
|
|
990
1044
|
});
|
|
991
1045
|
},
|
|
992
1046
|
every(fn, thisArg) {
|
|
993
|
-
return apply(this, "every", fn, thisArg);
|
|
1047
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
994
1048
|
},
|
|
995
1049
|
filter(fn, thisArg) {
|
|
996
|
-
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive));
|
|
1050
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
997
1051
|
},
|
|
998
1052
|
find(fn, thisArg) {
|
|
999
|
-
return apply(this, "find", fn, thisArg, toReactive);
|
|
1053
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
1000
1054
|
},
|
|
1001
1055
|
findIndex(fn, thisArg) {
|
|
1002
|
-
return apply(this, "findIndex", fn, thisArg);
|
|
1056
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
1003
1057
|
},
|
|
1004
1058
|
findLast(fn, thisArg) {
|
|
1005
|
-
return apply(this, "findLast", fn, thisArg, toReactive);
|
|
1059
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
1006
1060
|
},
|
|
1007
1061
|
findLastIndex(fn, thisArg) {
|
|
1008
|
-
return apply(this, "findLastIndex", fn, thisArg);
|
|
1062
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
1009
1063
|
},
|
|
1010
1064
|
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
1011
1065
|
forEach(fn, thisArg) {
|
|
1012
|
-
return apply(this, "forEach", fn, thisArg);
|
|
1066
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
1013
1067
|
},
|
|
1014
1068
|
includes(...args) {
|
|
1015
1069
|
return searchProxy(this, "includes", args);
|
|
@@ -1025,7 +1079,7 @@ const arrayInstrumentations = {
|
|
|
1025
1079
|
return searchProxy(this, "lastIndexOf", args);
|
|
1026
1080
|
},
|
|
1027
1081
|
map(fn, thisArg) {
|
|
1028
|
-
return apply(this, "map", fn, thisArg);
|
|
1082
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
1029
1083
|
},
|
|
1030
1084
|
pop() {
|
|
1031
1085
|
return noTracking(this, "pop");
|
|
@@ -1044,7 +1098,7 @@ const arrayInstrumentations = {
|
|
|
1044
1098
|
},
|
|
1045
1099
|
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
1046
1100
|
some(fn, thisArg) {
|
|
1047
|
-
return apply(this, "some", fn, thisArg);
|
|
1101
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
1048
1102
|
},
|
|
1049
1103
|
splice(...args) {
|
|
1050
1104
|
return noTracking(this, "splice", args);
|
|
@@ -1080,8 +1134,13 @@ function iterator(self, method, wrapValue) {
|
|
|
1080
1134
|
}
|
|
1081
1135
|
return iter;
|
|
1082
1136
|
}
|
|
1083
|
-
|
|
1137
|
+
const arrayProto = Array.prototype;
|
|
1138
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1084
1139
|
const arr = shallowReadArray(self);
|
|
1140
|
+
let methodFn;
|
|
1141
|
+
if ((methodFn = arr[method]) !== arrayProto[method]) {
|
|
1142
|
+
return methodFn.apply(arr, args);
|
|
1143
|
+
}
|
|
1085
1144
|
let needsWrap = false;
|
|
1086
1145
|
let wrappedFn = fn;
|
|
1087
1146
|
if (arr !== self) {
|
|
@@ -1096,7 +1155,7 @@ function apply(self, method, fn, thisArg, wrappedRetFn) {
|
|
|
1096
1155
|
};
|
|
1097
1156
|
}
|
|
1098
1157
|
}
|
|
1099
|
-
const result = arr
|
|
1158
|
+
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
1100
1159
|
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
1101
1160
|
}
|
|
1102
1161
|
function reduce(self, method, fn, args) {
|
|
@@ -1159,7 +1218,7 @@ class BaseReactiveHandler {
|
|
|
1159
1218
|
return isShallow2;
|
|
1160
1219
|
} else if (key === "__v_raw") {
|
|
1161
1220
|
if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
|
|
1162
|
-
// this means the
|
|
1221
|
+
// this means the receiver is a user proxy of the reactive proxy
|
|
1163
1222
|
Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
|
|
1164
1223
|
return target;
|
|
1165
1224
|
}
|
|
@@ -1283,9 +1342,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
|
1283
1342
|
}
|
|
1284
1343
|
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
1285
1344
|
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
1286
|
-
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
1287
|
-
true
|
|
1288
|
-
);
|
|
1345
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
|
|
1289
1346
|
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
1290
1347
|
|
|
1291
1348
|
const toShallow = (value) => value;
|
|
@@ -1780,13 +1837,14 @@ function proxyRefs(objectWithRefs) {
|
|
|
1780
1837
|
class CustomRefImpl {
|
|
1781
1838
|
constructor(factory) {
|
|
1782
1839
|
this["__v_isRef"] = true;
|
|
1840
|
+
this._value = void 0;
|
|
1783
1841
|
const dep = this.dep = new Dep();
|
|
1784
1842
|
const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
|
|
1785
1843
|
this._get = get;
|
|
1786
1844
|
this._set = set;
|
|
1787
1845
|
}
|
|
1788
1846
|
get value() {
|
|
1789
|
-
return this._get();
|
|
1847
|
+
return this._value = this._get();
|
|
1790
1848
|
}
|
|
1791
1849
|
set value(newVal) {
|
|
1792
1850
|
this._set(newVal);
|
|
@@ -1811,10 +1869,11 @@ class ObjectRefImpl {
|
|
|
1811
1869
|
this._key = _key;
|
|
1812
1870
|
this._defaultValue = _defaultValue;
|
|
1813
1871
|
this["__v_isRef"] = true;
|
|
1872
|
+
this._value = void 0;
|
|
1814
1873
|
}
|
|
1815
1874
|
get value() {
|
|
1816
1875
|
const val = this._object[this._key];
|
|
1817
|
-
return val === void 0 ? this._defaultValue : val;
|
|
1876
|
+
return this._value = val === void 0 ? this._defaultValue : val;
|
|
1818
1877
|
}
|
|
1819
1878
|
set value(newVal) {
|
|
1820
1879
|
this._object[this._key] = newVal;
|
|
@@ -1828,9 +1887,10 @@ class GetterRefImpl {
|
|
|
1828
1887
|
this._getter = _getter;
|
|
1829
1888
|
this["__v_isRef"] = true;
|
|
1830
1889
|
this["__v_isReadonly"] = true;
|
|
1890
|
+
this._value = void 0;
|
|
1831
1891
|
}
|
|
1832
1892
|
get value() {
|
|
1833
|
-
return this._getter();
|
|
1893
|
+
return this._value = this._getter();
|
|
1834
1894
|
}
|
|
1835
1895
|
}
|
|
1836
1896
|
function toRef(source, key, defaultValue) {
|
|
@@ -1864,7 +1924,8 @@ class ComputedRefImpl {
|
|
|
1864
1924
|
/**
|
|
1865
1925
|
* @internal
|
|
1866
1926
|
*/
|
|
1867
|
-
this
|
|
1927
|
+
this.__v_isRef = true;
|
|
1928
|
+
// TODO isolatedDeclarations "__v_isReadonly"
|
|
1868
1929
|
// A computed is also a subscriber that tracks other deps
|
|
1869
1930
|
/**
|
|
1870
1931
|
* @internal
|
|
@@ -2489,6 +2550,9 @@ function reload(id, newComp) {
|
|
|
2489
2550
|
"[HMR] Root or manually mounted instance modified. Full reload required."
|
|
2490
2551
|
);
|
|
2491
2552
|
}
|
|
2553
|
+
if (instance.root.ce && instance !== instance.root) {
|
|
2554
|
+
instance.root.ce._removeChildStyle(oldComp);
|
|
2555
|
+
}
|
|
2492
2556
|
}
|
|
2493
2557
|
queuePostFlushCb(() => {
|
|
2494
2558
|
hmrDirtyComponents.clear();
|
|
@@ -2568,9 +2632,7 @@ function devtoolsInitApp(app, version) {
|
|
|
2568
2632
|
function devtoolsUnmountApp(app) {
|
|
2569
2633
|
emit$2("app:unmount" /* APP_UNMOUNT */, app);
|
|
2570
2634
|
}
|
|
2571
|
-
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2572
|
-
"component:added" /* COMPONENT_ADDED */
|
|
2573
|
-
);
|
|
2635
|
+
const devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
|
|
2574
2636
|
const devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
|
|
2575
2637
|
const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
2576
2638
|
"component:removed" /* COMPONENT_REMOVED */
|
|
@@ -2594,12 +2656,8 @@ function createDevtoolsComponentHook(hook) {
|
|
|
2594
2656
|
);
|
|
2595
2657
|
};
|
|
2596
2658
|
}
|
|
2597
|
-
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
2598
|
-
|
|
2599
|
-
);
|
|
2600
|
-
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(
|
|
2601
|
-
"perf:end" /* PERFORMANCE_END */
|
|
2602
|
-
);
|
|
2659
|
+
const devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
|
|
2660
|
+
const devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
|
|
2603
2661
|
function createDevtoolsPerformanceHook(hook) {
|
|
2604
2662
|
return (component, type, time) => {
|
|
2605
2663
|
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -4033,6 +4091,7 @@ const logMismatchError = () => {
|
|
|
4033
4091
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
4034
4092
|
const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
|
|
4035
4093
|
const getContainerType = (container) => {
|
|
4094
|
+
if (container.nodeType !== 1) return void 0;
|
|
4036
4095
|
if (isSVGContainer(container)) return "svg";
|
|
4037
4096
|
if (isMathMLContainer(container)) return "mathml";
|
|
4038
4097
|
return void 0;
|
|
@@ -4308,6 +4367,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4308
4367
|
}
|
|
4309
4368
|
if (props) {
|
|
4310
4369
|
{
|
|
4370
|
+
const isCustomElement = el.tagName.includes("-");
|
|
4311
4371
|
for (const key in props) {
|
|
4312
4372
|
if (// #11189 skip if this node has directives that have created hooks
|
|
4313
4373
|
// as it could have mutated the DOM in any possible way
|
|
@@ -4315,7 +4375,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4315
4375
|
logMismatchError();
|
|
4316
4376
|
}
|
|
4317
4377
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
4318
|
-
key[0] === ".") {
|
|
4378
|
+
key[0] === "." || isCustomElement) {
|
|
4319
4379
|
patchProp(el, key, null, props[key], void 0, parentComponent);
|
|
4320
4380
|
}
|
|
4321
4381
|
}
|
|
@@ -4640,24 +4700,19 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4640
4700
|
}
|
|
4641
4701
|
}
|
|
4642
4702
|
|
|
4643
|
-
const hydrateOnIdle = () => (hydrate) => {
|
|
4644
|
-
const id = requestIdleCallback(hydrate);
|
|
4703
|
+
const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
|
|
4704
|
+
const id = requestIdleCallback(hydrate, { timeout });
|
|
4645
4705
|
return () => cancelIdleCallback(id);
|
|
4646
4706
|
};
|
|
4647
|
-
const hydrateOnVisible = (
|
|
4648
|
-
const ob = new IntersectionObserver(
|
|
4649
|
-
(entries)
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
|
|
4654
|
-
break;
|
|
4655
|
-
}
|
|
4656
|
-
},
|
|
4657
|
-
{
|
|
4658
|
-
rootMargin: isString(margin) ? margin : margin + "px"
|
|
4707
|
+
const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
4708
|
+
const ob = new IntersectionObserver((entries) => {
|
|
4709
|
+
for (const e of entries) {
|
|
4710
|
+
if (!e.isIntersecting) continue;
|
|
4711
|
+
ob.disconnect();
|
|
4712
|
+
hydrate();
|
|
4713
|
+
break;
|
|
4659
4714
|
}
|
|
4660
|
-
);
|
|
4715
|
+
}, opts);
|
|
4661
4716
|
forEach((el) => ob.observe(el));
|
|
4662
4717
|
return () => ob.disconnect();
|
|
4663
4718
|
};
|
|
@@ -4965,14 +5020,14 @@ const KeepAliveImpl = {
|
|
|
4965
5020
|
function pruneCache(filter) {
|
|
4966
5021
|
cache.forEach((vnode, key) => {
|
|
4967
5022
|
const name = getComponentName(vnode.type);
|
|
4968
|
-
if (name &&
|
|
5023
|
+
if (name && !filter(name)) {
|
|
4969
5024
|
pruneCacheEntry(key);
|
|
4970
5025
|
}
|
|
4971
5026
|
});
|
|
4972
5027
|
}
|
|
4973
5028
|
function pruneCacheEntry(key) {
|
|
4974
5029
|
const cached = cache.get(key);
|
|
4975
|
-
if (!current || !isSameVNodeType(cached, current)) {
|
|
5030
|
+
if (cached && (!current || !isSameVNodeType(cached, current))) {
|
|
4976
5031
|
unmount(cached);
|
|
4977
5032
|
} else if (current) {
|
|
4978
5033
|
resetShapeFlag(current);
|
|
@@ -5034,6 +5089,10 @@ const KeepAliveImpl = {
|
|
|
5034
5089
|
return rawVNode;
|
|
5035
5090
|
}
|
|
5036
5091
|
let vnode = getInnerChild(rawVNode);
|
|
5092
|
+
if (vnode.type === Comment) {
|
|
5093
|
+
current = null;
|
|
5094
|
+
return vnode;
|
|
5095
|
+
}
|
|
5037
5096
|
const comp = vnode.type;
|
|
5038
5097
|
const name = getComponentName(
|
|
5039
5098
|
isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp
|
|
@@ -5083,6 +5142,7 @@ function matches(pattern, name) {
|
|
|
5083
5142
|
} else if (isString(pattern)) {
|
|
5084
5143
|
return pattern.split(",").includes(name);
|
|
5085
5144
|
} else if (isRegExp(pattern)) {
|
|
5145
|
+
pattern.lastIndex = 0;
|
|
5086
5146
|
return pattern.test(name);
|
|
5087
5147
|
}
|
|
5088
5148
|
return false;
|
|
@@ -5166,17 +5226,19 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
5166
5226
|
};
|
|
5167
5227
|
const onBeforeMount = createHook("bm");
|
|
5168
5228
|
const onMounted = createHook("m");
|
|
5169
|
-
const onBeforeUpdate = createHook(
|
|
5229
|
+
const onBeforeUpdate = createHook(
|
|
5230
|
+
"bu"
|
|
5231
|
+
);
|
|
5170
5232
|
const onUpdated = createHook("u");
|
|
5171
|
-
const onBeforeUnmount = createHook(
|
|
5172
|
-
|
|
5173
|
-
const onServerPrefetch = createHook("sp");
|
|
5174
|
-
const onRenderTriggered = createHook(
|
|
5175
|
-
"rtg"
|
|
5233
|
+
const onBeforeUnmount = createHook(
|
|
5234
|
+
"bum"
|
|
5176
5235
|
);
|
|
5177
|
-
const
|
|
5178
|
-
|
|
5236
|
+
const onUnmounted = createHook("um");
|
|
5237
|
+
const onServerPrefetch = createHook(
|
|
5238
|
+
"sp"
|
|
5179
5239
|
);
|
|
5240
|
+
const onRenderTriggered = createHook("rtg");
|
|
5241
|
+
const onRenderTracked = createHook("rtc");
|
|
5180
5242
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
5181
5243
|
injectHook("ec", hook, target);
|
|
5182
5244
|
}
|
|
@@ -5590,9 +5652,14 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5590
5652
|
}
|
|
5591
5653
|
|
|
5592
5654
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5593
|
-
if (currentRenderingInstance.
|
|
5655
|
+
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
5594
5656
|
if (name !== "default") props.name = name;
|
|
5595
|
-
return
|
|
5657
|
+
return openBlock(), createBlock(
|
|
5658
|
+
Fragment,
|
|
5659
|
+
null,
|
|
5660
|
+
[createVNode("slot", props, fallback && fallback())],
|
|
5661
|
+
64
|
|
5662
|
+
);
|
|
5596
5663
|
}
|
|
5597
5664
|
let slot = slots[name];
|
|
5598
5665
|
if (slot && slot.length > 1) {
|
|
@@ -5894,6 +5961,7 @@ const publicPropertiesMap = (
|
|
|
5894
5961
|
$refs: (i) => shallowReadonly(i.refs) ,
|
|
5895
5962
|
$parent: (i) => getPublicInstance(i.parent),
|
|
5896
5963
|
$root: (i) => getPublicInstance(i.root),
|
|
5964
|
+
$host: (i) => i.ce,
|
|
5897
5965
|
$emit: (i) => i.emit,
|
|
5898
5966
|
$options: (i) => resolveMergedOptions(i) ,
|
|
5899
5967
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
@@ -6054,29 +6122,25 @@ const PublicInstanceProxyHandlers = {
|
|
|
6054
6122
|
return Reflect.ownKeys(target);
|
|
6055
6123
|
};
|
|
6056
6124
|
}
|
|
6057
|
-
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
6058
|
-
{
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
get(target, key) {
|
|
6062
|
-
if (key === Symbol.unscopables) {
|
|
6063
|
-
return;
|
|
6064
|
-
}
|
|
6065
|
-
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
6066
|
-
},
|
|
6067
|
-
has(_, key) {
|
|
6068
|
-
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
6069
|
-
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
6070
|
-
warn$1(
|
|
6071
|
-
`Property ${JSON.stringify(
|
|
6072
|
-
key
|
|
6073
|
-
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
6074
|
-
);
|
|
6075
|
-
}
|
|
6076
|
-
return has;
|
|
6125
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {
|
|
6126
|
+
get(target, key) {
|
|
6127
|
+
if (key === Symbol.unscopables) {
|
|
6128
|
+
return;
|
|
6077
6129
|
}
|
|
6130
|
+
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
6131
|
+
},
|
|
6132
|
+
has(_, key) {
|
|
6133
|
+
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
6134
|
+
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
6135
|
+
warn$1(
|
|
6136
|
+
`Property ${JSON.stringify(
|
|
6137
|
+
key
|
|
6138
|
+
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
6139
|
+
);
|
|
6140
|
+
}
|
|
6141
|
+
return has;
|
|
6078
6142
|
}
|
|
6079
|
-
);
|
|
6143
|
+
});
|
|
6080
6144
|
function createDevRenderContext(instance) {
|
|
6081
6145
|
const target = {};
|
|
6082
6146
|
Object.defineProperty(target, `_`, {
|
|
@@ -6763,7 +6827,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6763
6827
|
return vm;
|
|
6764
6828
|
}
|
|
6765
6829
|
}
|
|
6766
|
-
Vue.version = `2.6.14-compat:${"3.5.0-
|
|
6830
|
+
Vue.version = `2.6.14-compat:${"3.5.0-beta.2"}`;
|
|
6767
6831
|
Vue.config = singletonApp.config;
|
|
6768
6832
|
Vue.use = (plugin, ...options) => {
|
|
6769
6833
|
if (plugin && isFunction(plugin.install)) {
|
|
@@ -7036,7 +7100,7 @@ function installCompatMount(app, context, render) {
|
|
|
7036
7100
|
/* skip options */
|
|
7037
7101
|
);
|
|
7038
7102
|
}
|
|
7039
|
-
container.
|
|
7103
|
+
container.textContent = "";
|
|
7040
7104
|
render(vnode, container, namespace);
|
|
7041
7105
|
if (container instanceof Element) {
|
|
7042
7106
|
container.removeAttribute("v-cloak");
|
|
@@ -7248,7 +7312,7 @@ function createAppAPI(render, hydrate) {
|
|
|
7248
7312
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
7249
7313
|
);
|
|
7250
7314
|
}
|
|
7251
|
-
const vnode = createVNode(rootComponent, rootProps);
|
|
7315
|
+
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
7252
7316
|
vnode.appContext = context;
|
|
7253
7317
|
if (namespace === true) {
|
|
7254
7318
|
namespace = "svg";
|
|
@@ -7353,7 +7417,7 @@ function provide(key, value) {
|
|
|
7353
7417
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
7354
7418
|
const instance = currentInstance || currentRenderingInstance;
|
|
7355
7419
|
if (instance || currentApp) {
|
|
7356
|
-
const provides = instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides :
|
|
7420
|
+
const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
7357
7421
|
if (provides && key in provides) {
|
|
7358
7422
|
return provides[key];
|
|
7359
7423
|
} else if (arguments.length > 1) {
|
|
@@ -7627,6 +7691,9 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
7627
7691
|
} else {
|
|
7628
7692
|
value = defaultValue;
|
|
7629
7693
|
}
|
|
7694
|
+
if (instance.ce) {
|
|
7695
|
+
instance.ce._setProp(key, value);
|
|
7696
|
+
}
|
|
7630
7697
|
}
|
|
7631
7698
|
if (opt[0 /* shouldCast */]) {
|
|
7632
7699
|
if (isAbsent && !hasDefault) {
|
|
@@ -8629,8 +8696,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8629
8696
|
const componentUpdateFn = () => {
|
|
8630
8697
|
if (!instance.isMounted) {
|
|
8631
8698
|
let vnodeHook;
|
|
8632
|
-
const { el, props
|
|
8633
|
-
const { bm, m, parent } = instance;
|
|
8699
|
+
const { el, props } = initialVNode;
|
|
8700
|
+
const { bm, m, parent, root, type } = instance;
|
|
8634
8701
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
8635
8702
|
toggleRecurse(instance, false);
|
|
8636
8703
|
if (bm) {
|
|
@@ -8676,6 +8743,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8676
8743
|
hydrateSubTree();
|
|
8677
8744
|
}
|
|
8678
8745
|
} else {
|
|
8746
|
+
if (root.ce) {
|
|
8747
|
+
root.ce._injectChildStyle(type);
|
|
8748
|
+
}
|
|
8679
8749
|
{
|
|
8680
8750
|
startMeasure(instance, `render`);
|
|
8681
8751
|
}
|
|
@@ -9379,13 +9449,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9379
9449
|
namespace
|
|
9380
9450
|
);
|
|
9381
9451
|
}
|
|
9452
|
+
container._vnode = vnode;
|
|
9382
9453
|
if (!isFlushing) {
|
|
9383
9454
|
isFlushing = true;
|
|
9384
9455
|
flushPreFlushCbs();
|
|
9385
9456
|
flushPostFlushCbs();
|
|
9386
9457
|
isFlushing = false;
|
|
9387
9458
|
}
|
|
9388
|
-
container._vnode = vnode;
|
|
9389
9459
|
};
|
|
9390
9460
|
const internals = {
|
|
9391
9461
|
p: patch,
|
|
@@ -9559,14 +9629,9 @@ function doWatch(source, cb, {
|
|
|
9559
9629
|
const _cb = cb;
|
|
9560
9630
|
cb = (...args) => {
|
|
9561
9631
|
_cb(...args);
|
|
9562
|
-
|
|
9632
|
+
watchHandle();
|
|
9563
9633
|
};
|
|
9564
9634
|
}
|
|
9565
|
-
if (deep !== void 0 && typeof deep === "number") {
|
|
9566
|
-
warn$1(
|
|
9567
|
-
`watch() "deep" option with number value will be used as watch depth in future versions. Please use a boolean instead to avoid potential breakage.`
|
|
9568
|
-
);
|
|
9569
|
-
}
|
|
9570
9635
|
if (!cb) {
|
|
9571
9636
|
if (immediate !== void 0) {
|
|
9572
9637
|
warn$1(
|
|
@@ -9592,10 +9657,12 @@ function doWatch(source, cb, {
|
|
|
9592
9657
|
);
|
|
9593
9658
|
};
|
|
9594
9659
|
const instance = currentInstance;
|
|
9595
|
-
const reactiveGetter = (source2) =>
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9660
|
+
const reactiveGetter = (source2) => {
|
|
9661
|
+
if (deep) return source2;
|
|
9662
|
+
if (isShallow(source2) || deep === false || deep === 0)
|
|
9663
|
+
return traverse(source2, 1);
|
|
9664
|
+
return traverse(source2);
|
|
9665
|
+
};
|
|
9599
9666
|
let getter;
|
|
9600
9667
|
let forceTrigger = false;
|
|
9601
9668
|
let isMultiSource = false;
|
|
@@ -9651,7 +9718,8 @@ function doWatch(source, cb, {
|
|
|
9651
9718
|
}
|
|
9652
9719
|
if (cb && deep) {
|
|
9653
9720
|
const baseGetter = getter;
|
|
9654
|
-
|
|
9721
|
+
const depth = deep === true ? Infinity : deep;
|
|
9722
|
+
getter = () => traverse(baseGetter(), depth);
|
|
9655
9723
|
}
|
|
9656
9724
|
let cleanup;
|
|
9657
9725
|
let onCleanup = (fn) => {
|
|
@@ -9676,7 +9744,12 @@ function doWatch(source, cb, {
|
|
|
9676
9744
|
const ctx = useSSRContext();
|
|
9677
9745
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
9678
9746
|
} else {
|
|
9679
|
-
|
|
9747
|
+
const watchHandle2 = () => {
|
|
9748
|
+
};
|
|
9749
|
+
watchHandle2.stop = NOOP;
|
|
9750
|
+
watchHandle2.resume = NOOP;
|
|
9751
|
+
watchHandle2.pause = NOOP;
|
|
9752
|
+
return watchHandle2;
|
|
9680
9753
|
}
|
|
9681
9754
|
}
|
|
9682
9755
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -9706,7 +9779,6 @@ function doWatch(source, cb, {
|
|
|
9706
9779
|
const effect = new ReactiveEffect(getter);
|
|
9707
9780
|
let scheduler;
|
|
9708
9781
|
if (flush === "sync") {
|
|
9709
|
-
effect.flags |= 64;
|
|
9710
9782
|
scheduler = job;
|
|
9711
9783
|
} else if (flush === "post") {
|
|
9712
9784
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
@@ -9717,12 +9789,15 @@ function doWatch(source, cb, {
|
|
|
9717
9789
|
}
|
|
9718
9790
|
effect.scheduler = scheduler;
|
|
9719
9791
|
const scope = getCurrentScope();
|
|
9720
|
-
const
|
|
9792
|
+
const watchHandle = () => {
|
|
9721
9793
|
effect.stop();
|
|
9722
9794
|
if (scope) {
|
|
9723
9795
|
remove(scope.effects, effect);
|
|
9724
9796
|
}
|
|
9725
9797
|
};
|
|
9798
|
+
watchHandle.pause = effect.pause.bind(effect);
|
|
9799
|
+
watchHandle.resume = effect.resume.bind(effect);
|
|
9800
|
+
watchHandle.stop = watchHandle;
|
|
9726
9801
|
{
|
|
9727
9802
|
effect.onTrack = onTrack;
|
|
9728
9803
|
effect.onTrigger = onTrigger;
|
|
@@ -9741,8 +9816,8 @@ function doWatch(source, cb, {
|
|
|
9741
9816
|
} else {
|
|
9742
9817
|
effect.run();
|
|
9743
9818
|
}
|
|
9744
|
-
if (ssrCleanup) ssrCleanup.push(
|
|
9745
|
-
return
|
|
9819
|
+
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
9820
|
+
return watchHandle;
|
|
9746
9821
|
}
|
|
9747
9822
|
function instanceWatch(source, value, options) {
|
|
9748
9823
|
const publicThis = this.proxy;
|
|
@@ -9832,7 +9907,8 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9832
9907
|
return options.get ? options.get(localValue) : localValue;
|
|
9833
9908
|
},
|
|
9834
9909
|
set(value) {
|
|
9835
|
-
|
|
9910
|
+
const emittedValue = options.set ? options.set(value) : value;
|
|
9911
|
+
if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {
|
|
9836
9912
|
return;
|
|
9837
9913
|
}
|
|
9838
9914
|
const rawProps = i.vnode.props;
|
|
@@ -9841,7 +9917,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
9841
9917
|
localValue = value;
|
|
9842
9918
|
trigger();
|
|
9843
9919
|
}
|
|
9844
|
-
const emittedValue = options.set ? options.set(value) : value;
|
|
9845
9920
|
i.emit(`update:${name}`, emittedValue);
|
|
9846
9921
|
if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {
|
|
9847
9922
|
trigger();
|
|
@@ -9879,9 +9954,9 @@ function emit(instance, event, ...rawArgs) {
|
|
|
9879
9954
|
} = instance;
|
|
9880
9955
|
if (emitsOptions) {
|
|
9881
9956
|
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
9882
|
-
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
9957
|
+
if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {
|
|
9883
9958
|
warn$1(
|
|
9884
|
-
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
9959
|
+
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`
|
|
9885
9960
|
);
|
|
9886
9961
|
}
|
|
9887
9962
|
} else {
|
|
@@ -11812,11 +11887,16 @@ function useTemplateRef(key) {
|
|
|
11812
11887
|
const r = shallowRef(null);
|
|
11813
11888
|
if (i) {
|
|
11814
11889
|
const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11890
|
+
let desc;
|
|
11891
|
+
if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
|
|
11892
|
+
warn$1(`useTemplateRef('${key}') already exists.`);
|
|
11893
|
+
} else {
|
|
11894
|
+
Object.defineProperty(refs, key, {
|
|
11895
|
+
enumerable: true,
|
|
11896
|
+
get: () => r.value,
|
|
11897
|
+
set: (val) => r.value = val
|
|
11898
|
+
});
|
|
11899
|
+
}
|
|
11820
11900
|
} else {
|
|
11821
11901
|
warn$1(
|
|
11822
11902
|
`useTemplateRef() is called when there is no active component instance to be associated with.`
|
|
@@ -12050,7 +12130,7 @@ function isMemoSame(cached, memo) {
|
|
|
12050
12130
|
return true;
|
|
12051
12131
|
}
|
|
12052
12132
|
|
|
12053
|
-
const version = "3.5.0-
|
|
12133
|
+
const version = "3.5.0-beta.2";
|
|
12054
12134
|
const warn = warn$1 ;
|
|
12055
12135
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
12056
12136
|
const devtools = devtools$1 ;
|
|
@@ -12062,7 +12142,8 @@ const _ssrUtils = {
|
|
|
12062
12142
|
setCurrentRenderingInstance,
|
|
12063
12143
|
isVNode: isVNode,
|
|
12064
12144
|
normalizeVNode,
|
|
12065
|
-
getComponentPublicInstance
|
|
12145
|
+
getComponentPublicInstance,
|
|
12146
|
+
ensureValidVNode
|
|
12066
12147
|
};
|
|
12067
12148
|
const ssrUtils = _ssrUtils ;
|
|
12068
12149
|
const resolveFilter = resolveFilter$1 ;
|
|
@@ -12076,6 +12157,18 @@ const _compatUtils = {
|
|
|
12076
12157
|
const compatUtils = _compatUtils ;
|
|
12077
12158
|
const DeprecationTypes = DeprecationTypes$1 ;
|
|
12078
12159
|
|
|
12160
|
+
let policy = void 0;
|
|
12161
|
+
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
12162
|
+
if (tt) {
|
|
12163
|
+
try {
|
|
12164
|
+
policy = /* @__PURE__ */ tt.createPolicy("vue", {
|
|
12165
|
+
createHTML: (val) => val
|
|
12166
|
+
});
|
|
12167
|
+
} catch (e) {
|
|
12168
|
+
warn(`Error creating trusted types policy: ${e}`);
|
|
12169
|
+
}
|
|
12170
|
+
}
|
|
12171
|
+
const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
|
|
12079
12172
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
12080
12173
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
12081
12174
|
const doc = typeof document !== "undefined" ? document : null;
|
|
@@ -12123,7 +12216,9 @@ const nodeOps = {
|
|
|
12123
12216
|
if (start === end || !(start = start.nextSibling)) break;
|
|
12124
12217
|
}
|
|
12125
12218
|
} else {
|
|
12126
|
-
templateContainer.innerHTML =
|
|
12219
|
+
templateContainer.innerHTML = unsafeToTrustedHTML(
|
|
12220
|
+
namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
|
|
12221
|
+
);
|
|
12127
12222
|
const template = templateContainer.content;
|
|
12128
12223
|
if (namespace === "svg" || namespace === "mathml") {
|
|
12129
12224
|
const wrapper = template.firstChild;
|
|
@@ -12530,11 +12625,17 @@ function useCssVars(getter) {
|
|
|
12530
12625
|
}
|
|
12531
12626
|
const setVars = () => {
|
|
12532
12627
|
const vars = getter(instance.proxy);
|
|
12533
|
-
|
|
12628
|
+
if (instance.ce) {
|
|
12629
|
+
setVarsOnNode(instance.ce, vars);
|
|
12630
|
+
} else {
|
|
12631
|
+
setVarsOnVNode(instance.subTree, vars);
|
|
12632
|
+
}
|
|
12534
12633
|
updateTeleports(vars);
|
|
12535
12634
|
};
|
|
12536
|
-
|
|
12635
|
+
onBeforeMount(() => {
|
|
12537
12636
|
watchPostEffect(setVars);
|
|
12637
|
+
});
|
|
12638
|
+
onMounted(() => {
|
|
12538
12639
|
const ob = new MutationObserver(setVars);
|
|
12539
12640
|
ob.observe(instance.subTree.el.parentNode, { childList: true });
|
|
12540
12641
|
onUnmounted(() => ob.disconnect());
|
|
@@ -12931,16 +13032,24 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
12931
13032
|
if (isNativeOn(key) && isString(value)) {
|
|
12932
13033
|
return false;
|
|
12933
13034
|
}
|
|
12934
|
-
|
|
13035
|
+
if (key in el) {
|
|
13036
|
+
return true;
|
|
13037
|
+
}
|
|
13038
|
+
if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
|
|
13039
|
+
return true;
|
|
13040
|
+
}
|
|
13041
|
+
return false;
|
|
12935
13042
|
}
|
|
12936
13043
|
|
|
13044
|
+
const REMOVAL = {};
|
|
12937
13045
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
12938
13046
|
// @__NO_SIDE_EFFECTS__
|
|
12939
|
-
function defineCustomElement(options, extraOptions,
|
|
13047
|
+
function defineCustomElement(options, extraOptions, _createApp) {
|
|
12940
13048
|
const Comp = defineComponent(options, extraOptions);
|
|
13049
|
+
if (isPlainObject(Comp)) extend(Comp, extraOptions);
|
|
12941
13050
|
class VueCustomElement extends VueElement {
|
|
12942
13051
|
constructor(initialProps) {
|
|
12943
|
-
super(Comp, initialProps,
|
|
13052
|
+
super(Comp, initialProps, _createApp);
|
|
12944
13053
|
}
|
|
12945
13054
|
}
|
|
12946
13055
|
VueCustomElement.def = Comp;
|
|
@@ -12948,47 +13057,87 @@ function defineCustomElement(options, extraOptions, hydrate2) {
|
|
|
12948
13057
|
}
|
|
12949
13058
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
12950
13059
|
const defineSSRCustomElement = /* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
|
|
12951
|
-
return /* @__PURE__ */ defineCustomElement(options, extraOptions,
|
|
13060
|
+
return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
|
|
12952
13061
|
};
|
|
12953
13062
|
const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
|
|
12954
13063
|
};
|
|
12955
13064
|
class VueElement extends BaseClass {
|
|
12956
|
-
constructor(_def, _props = {},
|
|
13065
|
+
constructor(_def, _props = {}, _createApp = createApp) {
|
|
12957
13066
|
super();
|
|
12958
13067
|
this._def = _def;
|
|
12959
13068
|
this._props = _props;
|
|
13069
|
+
this._createApp = _createApp;
|
|
13070
|
+
this._isVueCE = true;
|
|
12960
13071
|
/**
|
|
12961
13072
|
* @internal
|
|
12962
13073
|
*/
|
|
12963
13074
|
this._instance = null;
|
|
13075
|
+
/**
|
|
13076
|
+
* @internal
|
|
13077
|
+
*/
|
|
13078
|
+
this._app = null;
|
|
13079
|
+
/**
|
|
13080
|
+
* @internal
|
|
13081
|
+
*/
|
|
13082
|
+
this._nonce = this._def.nonce;
|
|
12964
13083
|
this._connected = false;
|
|
12965
13084
|
this._resolved = false;
|
|
12966
13085
|
this._numberProps = null;
|
|
13086
|
+
this._styleChildren = /* @__PURE__ */ new WeakSet();
|
|
12967
13087
|
this._ob = null;
|
|
12968
|
-
if (this.shadowRoot &&
|
|
12969
|
-
|
|
13088
|
+
if (this.shadowRoot && _createApp !== createApp) {
|
|
13089
|
+
this._root = this.shadowRoot;
|
|
12970
13090
|
} else {
|
|
12971
13091
|
if (this.shadowRoot) {
|
|
12972
13092
|
warn(
|
|
12973
13093
|
`Custom element has pre-rendered declarative shadow root but is not defined as hydratable. Use \`defineSSRCustomElement\`.`
|
|
12974
13094
|
);
|
|
12975
13095
|
}
|
|
12976
|
-
|
|
12977
|
-
|
|
12978
|
-
this.
|
|
13096
|
+
if (_def.shadowRoot !== false) {
|
|
13097
|
+
this.attachShadow({ mode: "open" });
|
|
13098
|
+
this._root = this.shadowRoot;
|
|
13099
|
+
} else {
|
|
13100
|
+
this._root = this;
|
|
12979
13101
|
}
|
|
12980
13102
|
}
|
|
13103
|
+
if (!this._def.__asyncLoader) {
|
|
13104
|
+
this._resolveProps(this._def);
|
|
13105
|
+
}
|
|
12981
13106
|
}
|
|
12982
13107
|
connectedCallback() {
|
|
13108
|
+
if (!this.shadowRoot) {
|
|
13109
|
+
this._parseSlots();
|
|
13110
|
+
}
|
|
12983
13111
|
this._connected = true;
|
|
13112
|
+
let parent = this;
|
|
13113
|
+
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13114
|
+
if (parent instanceof VueElement) {
|
|
13115
|
+
this._parent = parent;
|
|
13116
|
+
break;
|
|
13117
|
+
}
|
|
13118
|
+
}
|
|
12984
13119
|
if (!this._instance) {
|
|
12985
13120
|
if (this._resolved) {
|
|
13121
|
+
this._setParent();
|
|
12986
13122
|
this._update();
|
|
12987
13123
|
} else {
|
|
12988
|
-
|
|
13124
|
+
if (parent && parent._pendingResolve) {
|
|
13125
|
+
this._pendingResolve = parent._pendingResolve.then(() => {
|
|
13126
|
+
this._pendingResolve = void 0;
|
|
13127
|
+
this._resolveDef();
|
|
13128
|
+
});
|
|
13129
|
+
} else {
|
|
13130
|
+
this._resolveDef();
|
|
13131
|
+
}
|
|
12989
13132
|
}
|
|
12990
13133
|
}
|
|
12991
13134
|
}
|
|
13135
|
+
_setParent(parent = this._parent) {
|
|
13136
|
+
if (parent) {
|
|
13137
|
+
this._instance.parent = parent._instance;
|
|
13138
|
+
this._instance.provides = parent._instance.provides;
|
|
13139
|
+
}
|
|
13140
|
+
}
|
|
12992
13141
|
disconnectedCallback() {
|
|
12993
13142
|
this._connected = false;
|
|
12994
13143
|
nextTick(() => {
|
|
@@ -12997,8 +13146,9 @@ class VueElement extends BaseClass {
|
|
|
12997
13146
|
this._ob.disconnect();
|
|
12998
13147
|
this._ob = null;
|
|
12999
13148
|
}
|
|
13000
|
-
|
|
13001
|
-
this._instance =
|
|
13149
|
+
this._app && this._app.unmount();
|
|
13150
|
+
this._instance.ce = void 0;
|
|
13151
|
+
this._app = this._instance = null;
|
|
13002
13152
|
}
|
|
13003
13153
|
});
|
|
13004
13154
|
}
|
|
@@ -13006,7 +13156,9 @@ class VueElement extends BaseClass {
|
|
|
13006
13156
|
* resolve inner component definition (handle possible async component)
|
|
13007
13157
|
*/
|
|
13008
13158
|
_resolveDef() {
|
|
13009
|
-
this.
|
|
13159
|
+
if (this._pendingResolve) {
|
|
13160
|
+
return;
|
|
13161
|
+
}
|
|
13010
13162
|
for (let i = 0; i < this.attributes.length; i++) {
|
|
13011
13163
|
this._setAttr(this.attributes[i].name);
|
|
13012
13164
|
}
|
|
@@ -13017,6 +13169,8 @@ class VueElement extends BaseClass {
|
|
|
13017
13169
|
});
|
|
13018
13170
|
this._ob.observe(this, { attributes: true });
|
|
13019
13171
|
const resolve = (def, isAsync = false) => {
|
|
13172
|
+
this._resolved = true;
|
|
13173
|
+
this._pendingResolve = void 0;
|
|
13020
13174
|
const { props, styles } = def;
|
|
13021
13175
|
let numberProps;
|
|
13022
13176
|
if (props && !isArray(props)) {
|
|
@@ -13034,22 +13188,53 @@ class VueElement extends BaseClass {
|
|
|
13034
13188
|
if (isAsync) {
|
|
13035
13189
|
this._resolveProps(def);
|
|
13036
13190
|
}
|
|
13037
|
-
this.
|
|
13038
|
-
|
|
13191
|
+
if (this.shadowRoot) {
|
|
13192
|
+
this._applyStyles(styles);
|
|
13193
|
+
} else if (styles) {
|
|
13194
|
+
warn(
|
|
13195
|
+
"Custom element style injection is not supported when using shadowRoot: false"
|
|
13196
|
+
);
|
|
13197
|
+
}
|
|
13198
|
+
this._mount(def);
|
|
13039
13199
|
};
|
|
13040
13200
|
const asyncDef = this._def.__asyncLoader;
|
|
13041
13201
|
if (asyncDef) {
|
|
13042
|
-
asyncDef().then(
|
|
13202
|
+
this._pendingResolve = asyncDef().then(
|
|
13203
|
+
(def) => resolve(this._def = def, true)
|
|
13204
|
+
);
|
|
13043
13205
|
} else {
|
|
13044
13206
|
resolve(this._def);
|
|
13045
13207
|
}
|
|
13046
13208
|
}
|
|
13209
|
+
_mount(def) {
|
|
13210
|
+
if (!def.name) {
|
|
13211
|
+
def.name = "VueElement";
|
|
13212
|
+
}
|
|
13213
|
+
this._app = this._createApp(def);
|
|
13214
|
+
if (def.configureApp) {
|
|
13215
|
+
def.configureApp(this._app);
|
|
13216
|
+
}
|
|
13217
|
+
this._app._ceVNode = this._createVNode();
|
|
13218
|
+
this._app.mount(this._root);
|
|
13219
|
+
const exposed = this._instance && this._instance.exposed;
|
|
13220
|
+
if (!exposed) return;
|
|
13221
|
+
for (const key in exposed) {
|
|
13222
|
+
if (!hasOwn(this, key)) {
|
|
13223
|
+
Object.defineProperty(this, key, {
|
|
13224
|
+
// unwrap ref to be consistent with public instance behavior
|
|
13225
|
+
get: () => unref(exposed[key])
|
|
13226
|
+
});
|
|
13227
|
+
} else {
|
|
13228
|
+
warn(`Exposed property "${key}" already exists on custom element.`);
|
|
13229
|
+
}
|
|
13230
|
+
}
|
|
13231
|
+
}
|
|
13047
13232
|
_resolveProps(def) {
|
|
13048
13233
|
const { props } = def;
|
|
13049
13234
|
const declaredPropKeys = isArray(props) ? props : Object.keys(props || {});
|
|
13050
13235
|
for (const key of Object.keys(this)) {
|
|
13051
13236
|
if (key[0] !== "_" && declaredPropKeys.includes(key)) {
|
|
13052
|
-
this._setProp(key, this[key]
|
|
13237
|
+
this._setProp(key, this[key]);
|
|
13053
13238
|
}
|
|
13054
13239
|
}
|
|
13055
13240
|
for (const key of declaredPropKeys.map(camelize)) {
|
|
@@ -13058,18 +13243,20 @@ class VueElement extends BaseClass {
|
|
|
13058
13243
|
return this._getProp(key);
|
|
13059
13244
|
},
|
|
13060
13245
|
set(val) {
|
|
13061
|
-
this._setProp(key, val);
|
|
13246
|
+
this._setProp(key, val, true, true);
|
|
13062
13247
|
}
|
|
13063
13248
|
});
|
|
13064
13249
|
}
|
|
13065
13250
|
}
|
|
13066
13251
|
_setAttr(key) {
|
|
13067
|
-
|
|
13252
|
+
if (key.startsWith("data-v-")) return;
|
|
13253
|
+
const has = this.hasAttribute(key);
|
|
13254
|
+
let value = has ? this.getAttribute(key) : REMOVAL;
|
|
13068
13255
|
const camelKey = camelize(key);
|
|
13069
|
-
if (this._numberProps && this._numberProps[camelKey]) {
|
|
13256
|
+
if (has && this._numberProps && this._numberProps[camelKey]) {
|
|
13070
13257
|
value = toNumber(value);
|
|
13071
13258
|
}
|
|
13072
|
-
this._setProp(camelKey, value, false);
|
|
13259
|
+
this._setProp(camelKey, value, false, true);
|
|
13073
13260
|
}
|
|
13074
13261
|
/**
|
|
13075
13262
|
* @internal
|
|
@@ -13080,9 +13267,13 @@ class VueElement extends BaseClass {
|
|
|
13080
13267
|
/**
|
|
13081
13268
|
* @internal
|
|
13082
13269
|
*/
|
|
13083
|
-
_setProp(key, val, shouldReflect = true, shouldUpdate =
|
|
13270
|
+
_setProp(key, val, shouldReflect = true, shouldUpdate = false) {
|
|
13084
13271
|
if (val !== this._props[key]) {
|
|
13085
|
-
|
|
13272
|
+
if (val === REMOVAL) {
|
|
13273
|
+
delete this._props[key];
|
|
13274
|
+
} else {
|
|
13275
|
+
this._props[key] = val;
|
|
13276
|
+
}
|
|
13086
13277
|
if (shouldUpdate && this._instance) {
|
|
13087
13278
|
this._update();
|
|
13088
13279
|
}
|
|
@@ -13098,18 +13289,23 @@ class VueElement extends BaseClass {
|
|
|
13098
13289
|
}
|
|
13099
13290
|
}
|
|
13100
13291
|
_update() {
|
|
13101
|
-
render(this._createVNode(), this.
|
|
13292
|
+
render(this._createVNode(), this._root);
|
|
13102
13293
|
}
|
|
13103
13294
|
_createVNode() {
|
|
13104
|
-
const
|
|
13295
|
+
const baseProps = {};
|
|
13296
|
+
if (!this.shadowRoot) {
|
|
13297
|
+
baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
13298
|
+
}
|
|
13299
|
+
const vnode = createVNode(this._def, extend(baseProps, this._props));
|
|
13105
13300
|
if (!this._instance) {
|
|
13106
13301
|
vnode.ce = (instance) => {
|
|
13107
13302
|
this._instance = instance;
|
|
13303
|
+
instance.ce = this;
|
|
13108
13304
|
instance.isCE = true;
|
|
13109
13305
|
{
|
|
13110
13306
|
instance.ceReload = (newStyles) => {
|
|
13111
13307
|
if (this._styles) {
|
|
13112
|
-
this._styles.forEach((s) => this.
|
|
13308
|
+
this._styles.forEach((s) => this._root.removeChild(s));
|
|
13113
13309
|
this._styles.length = 0;
|
|
13114
13310
|
}
|
|
13115
13311
|
this._applyStyles(newStyles);
|
|
@@ -13119,9 +13315,10 @@ class VueElement extends BaseClass {
|
|
|
13119
13315
|
}
|
|
13120
13316
|
const dispatch = (event, args) => {
|
|
13121
13317
|
this.dispatchEvent(
|
|
13122
|
-
new CustomEvent(
|
|
13123
|
-
|
|
13124
|
-
|
|
13318
|
+
new CustomEvent(
|
|
13319
|
+
event,
|
|
13320
|
+
isPlainObject(args[0]) ? extend({ detail: args }, args[0]) : { detail: args }
|
|
13321
|
+
)
|
|
13125
13322
|
);
|
|
13126
13323
|
};
|
|
13127
13324
|
instance.emit = (event, ...args) => {
|
|
@@ -13130,30 +13327,126 @@ class VueElement extends BaseClass {
|
|
|
13130
13327
|
dispatch(hyphenate(event), args);
|
|
13131
13328
|
}
|
|
13132
13329
|
};
|
|
13133
|
-
|
|
13134
|
-
while (parent = parent && (parent.parentNode || parent.host)) {
|
|
13135
|
-
if (parent instanceof VueElement) {
|
|
13136
|
-
instance.parent = parent._instance;
|
|
13137
|
-
instance.provides = parent._instance.provides;
|
|
13138
|
-
break;
|
|
13139
|
-
}
|
|
13140
|
-
}
|
|
13330
|
+
this._setParent();
|
|
13141
13331
|
};
|
|
13142
13332
|
}
|
|
13143
13333
|
return vnode;
|
|
13144
13334
|
}
|
|
13145
|
-
_applyStyles(styles) {
|
|
13146
|
-
if (styles)
|
|
13147
|
-
|
|
13148
|
-
|
|
13149
|
-
|
|
13150
|
-
|
|
13151
|
-
|
|
13335
|
+
_applyStyles(styles, owner) {
|
|
13336
|
+
if (!styles) return;
|
|
13337
|
+
if (owner) {
|
|
13338
|
+
if (owner === this._def || this._styleChildren.has(owner)) {
|
|
13339
|
+
return;
|
|
13340
|
+
}
|
|
13341
|
+
this._styleChildren.add(owner);
|
|
13342
|
+
}
|
|
13343
|
+
const nonce = this._nonce;
|
|
13344
|
+
for (let i = styles.length - 1; i >= 0; i--) {
|
|
13345
|
+
const s = document.createElement("style");
|
|
13346
|
+
if (nonce) s.setAttribute("nonce", nonce);
|
|
13347
|
+
s.textContent = styles[i];
|
|
13348
|
+
this.shadowRoot.prepend(s);
|
|
13349
|
+
{
|
|
13350
|
+
if (owner) {
|
|
13351
|
+
if (owner.__hmrId) {
|
|
13352
|
+
if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
|
|
13353
|
+
let entry = this._childStyles.get(owner.__hmrId);
|
|
13354
|
+
if (!entry) {
|
|
13355
|
+
this._childStyles.set(owner.__hmrId, entry = []);
|
|
13356
|
+
}
|
|
13357
|
+
entry.push(s);
|
|
13358
|
+
}
|
|
13359
|
+
} else {
|
|
13152
13360
|
(this._styles || (this._styles = [])).push(s);
|
|
13153
13361
|
}
|
|
13154
|
-
}
|
|
13362
|
+
}
|
|
13363
|
+
}
|
|
13364
|
+
}
|
|
13365
|
+
/**
|
|
13366
|
+
* Only called when shaddowRoot is false
|
|
13367
|
+
*/
|
|
13368
|
+
_parseSlots() {
|
|
13369
|
+
const slots = this._slots = {};
|
|
13370
|
+
let n;
|
|
13371
|
+
while (n = this.firstChild) {
|
|
13372
|
+
const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
|
|
13373
|
+
(slots[slotName] || (slots[slotName] = [])).push(n);
|
|
13374
|
+
this.removeChild(n);
|
|
13375
|
+
}
|
|
13376
|
+
}
|
|
13377
|
+
/**
|
|
13378
|
+
* Only called when shaddowRoot is false
|
|
13379
|
+
*/
|
|
13380
|
+
_renderSlots() {
|
|
13381
|
+
const outlets = this.querySelectorAll("slot");
|
|
13382
|
+
const scopeId = this._instance.type.__scopeId;
|
|
13383
|
+
for (let i = 0; i < outlets.length; i++) {
|
|
13384
|
+
const o = outlets[i];
|
|
13385
|
+
const slotName = o.getAttribute("name") || "default";
|
|
13386
|
+
const content = this._slots[slotName];
|
|
13387
|
+
const parent = o.parentNode;
|
|
13388
|
+
if (content) {
|
|
13389
|
+
for (const n of content) {
|
|
13390
|
+
if (scopeId && n.nodeType === 1) {
|
|
13391
|
+
const id = scopeId + "-s";
|
|
13392
|
+
const walker = document.createTreeWalker(n, 1);
|
|
13393
|
+
n.setAttribute(id, "");
|
|
13394
|
+
let child;
|
|
13395
|
+
while (child = walker.nextNode()) {
|
|
13396
|
+
child.setAttribute(id, "");
|
|
13397
|
+
}
|
|
13398
|
+
}
|
|
13399
|
+
parent.insertBefore(n, o);
|
|
13400
|
+
}
|
|
13401
|
+
} else {
|
|
13402
|
+
while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
13403
|
+
}
|
|
13404
|
+
parent.removeChild(o);
|
|
13405
|
+
}
|
|
13406
|
+
}
|
|
13407
|
+
/**
|
|
13408
|
+
* @internal
|
|
13409
|
+
*/
|
|
13410
|
+
_injectChildStyle(comp) {
|
|
13411
|
+
this._applyStyles(comp.styles, comp);
|
|
13412
|
+
}
|
|
13413
|
+
/**
|
|
13414
|
+
* @internal
|
|
13415
|
+
*/
|
|
13416
|
+
_removeChildStyle(comp) {
|
|
13417
|
+
{
|
|
13418
|
+
this._styleChildren.delete(comp);
|
|
13419
|
+
if (this._childStyles && comp.__hmrId) {
|
|
13420
|
+
const oldStyles = this._childStyles.get(comp.__hmrId);
|
|
13421
|
+
if (oldStyles) {
|
|
13422
|
+
oldStyles.forEach((s) => this._root.removeChild(s));
|
|
13423
|
+
oldStyles.length = 0;
|
|
13424
|
+
}
|
|
13425
|
+
}
|
|
13426
|
+
}
|
|
13427
|
+
}
|
|
13428
|
+
}
|
|
13429
|
+
function useHost(caller) {
|
|
13430
|
+
const instance = getCurrentInstance();
|
|
13431
|
+
const el = instance && instance.ce;
|
|
13432
|
+
if (el) {
|
|
13433
|
+
return el;
|
|
13434
|
+
} else {
|
|
13435
|
+
if (!instance) {
|
|
13436
|
+
warn(
|
|
13437
|
+
`${caller || "useHost"} called without an active component instance.`
|
|
13438
|
+
);
|
|
13439
|
+
} else {
|
|
13440
|
+
warn(
|
|
13441
|
+
`${caller || "useHost"} can only be used in components defined via defineCustomElement.`
|
|
13442
|
+
);
|
|
13155
13443
|
}
|
|
13156
13444
|
}
|
|
13445
|
+
return null;
|
|
13446
|
+
}
|
|
13447
|
+
function useShadowRoot() {
|
|
13448
|
+
const el = useHost("useShadowRoot") ;
|
|
13449
|
+
return el && el.shadowRoot;
|
|
13157
13450
|
}
|
|
13158
13451
|
|
|
13159
13452
|
function useCssModule(name = "$style") {
|
|
@@ -13712,7 +14005,7 @@ const createApp = (...args) => {
|
|
|
13712
14005
|
const component = app._component;
|
|
13713
14006
|
if (!isFunction(component) && !component.render && !component.template) {
|
|
13714
14007
|
component.template = container.innerHTML;
|
|
13715
|
-
{
|
|
14008
|
+
if (container.nodeType === 1) {
|
|
13716
14009
|
for (let i = 0; i < container.attributes.length; i++) {
|
|
13717
14010
|
const attr = container.attributes[i];
|
|
13718
14011
|
if (attr.name !== "v-cloak" && /^(v-|:|@)/.test(attr.name)) {
|
|
@@ -13725,7 +14018,9 @@ const createApp = (...args) => {
|
|
|
13725
14018
|
}
|
|
13726
14019
|
}
|
|
13727
14020
|
}
|
|
13728
|
-
container.
|
|
14021
|
+
if (container.nodeType === 1) {
|
|
14022
|
+
container.textContent = "";
|
|
14023
|
+
}
|
|
13729
14024
|
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
13730
14025
|
if (container instanceof Element) {
|
|
13731
14026
|
container.removeAttribute("v-cloak");
|
|
@@ -13959,9 +14254,11 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
13959
14254
|
useAttrs: useAttrs,
|
|
13960
14255
|
useCssModule: useCssModule,
|
|
13961
14256
|
useCssVars: useCssVars,
|
|
14257
|
+
useHost: useHost,
|
|
13962
14258
|
useId: useId,
|
|
13963
14259
|
useModel: useModel,
|
|
13964
14260
|
useSSRContext: useSSRContext,
|
|
14261
|
+
useShadowRoot: useShadowRoot,
|
|
13965
14262
|
useSlots: useSlots,
|
|
13966
14263
|
useTemplateRef: useTemplateRef,
|
|
13967
14264
|
useTransitionState: useTransitionState,
|
|
@@ -14023,36 +14320,70 @@ const FRAGMENT = Symbol(`Fragment` );
|
|
|
14023
14320
|
const TELEPORT = Symbol(`Teleport` );
|
|
14024
14321
|
const SUSPENSE = Symbol(`Suspense` );
|
|
14025
14322
|
const KEEP_ALIVE = Symbol(`KeepAlive` );
|
|
14026
|
-
const BASE_TRANSITION = Symbol(
|
|
14323
|
+
const BASE_TRANSITION = Symbol(
|
|
14324
|
+
`BaseTransition`
|
|
14325
|
+
);
|
|
14027
14326
|
const OPEN_BLOCK = Symbol(`openBlock` );
|
|
14028
14327
|
const CREATE_BLOCK = Symbol(`createBlock` );
|
|
14029
|
-
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
14328
|
+
const CREATE_ELEMENT_BLOCK = Symbol(
|
|
14329
|
+
`createElementBlock`
|
|
14330
|
+
);
|
|
14030
14331
|
const CREATE_VNODE = Symbol(`createVNode` );
|
|
14031
|
-
const CREATE_ELEMENT_VNODE = Symbol(
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
const
|
|
14035
|
-
|
|
14332
|
+
const CREATE_ELEMENT_VNODE = Symbol(
|
|
14333
|
+
`createElementVNode`
|
|
14334
|
+
);
|
|
14335
|
+
const CREATE_COMMENT = Symbol(
|
|
14336
|
+
`createCommentVNode`
|
|
14337
|
+
);
|
|
14338
|
+
const CREATE_TEXT = Symbol(
|
|
14339
|
+
`createTextVNode`
|
|
14340
|
+
);
|
|
14341
|
+
const CREATE_STATIC = Symbol(
|
|
14342
|
+
`createStaticVNode`
|
|
14343
|
+
);
|
|
14344
|
+
const RESOLVE_COMPONENT = Symbol(
|
|
14345
|
+
`resolveComponent`
|
|
14346
|
+
);
|
|
14036
14347
|
const RESOLVE_DYNAMIC_COMPONENT = Symbol(
|
|
14037
14348
|
`resolveDynamicComponent`
|
|
14038
14349
|
);
|
|
14039
|
-
const RESOLVE_DIRECTIVE = Symbol(
|
|
14040
|
-
|
|
14041
|
-
|
|
14350
|
+
const RESOLVE_DIRECTIVE = Symbol(
|
|
14351
|
+
`resolveDirective`
|
|
14352
|
+
);
|
|
14353
|
+
const RESOLVE_FILTER = Symbol(
|
|
14354
|
+
`resolveFilter`
|
|
14355
|
+
);
|
|
14356
|
+
const WITH_DIRECTIVES = Symbol(
|
|
14357
|
+
`withDirectives`
|
|
14358
|
+
);
|
|
14042
14359
|
const RENDER_LIST = Symbol(`renderList` );
|
|
14043
14360
|
const RENDER_SLOT = Symbol(`renderSlot` );
|
|
14044
14361
|
const CREATE_SLOTS = Symbol(`createSlots` );
|
|
14045
|
-
const TO_DISPLAY_STRING = Symbol(
|
|
14362
|
+
const TO_DISPLAY_STRING = Symbol(
|
|
14363
|
+
`toDisplayString`
|
|
14364
|
+
);
|
|
14046
14365
|
const MERGE_PROPS = Symbol(`mergeProps` );
|
|
14047
|
-
const NORMALIZE_CLASS = Symbol(
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
const
|
|
14366
|
+
const NORMALIZE_CLASS = Symbol(
|
|
14367
|
+
`normalizeClass`
|
|
14368
|
+
);
|
|
14369
|
+
const NORMALIZE_STYLE = Symbol(
|
|
14370
|
+
`normalizeStyle`
|
|
14371
|
+
);
|
|
14372
|
+
const NORMALIZE_PROPS = Symbol(
|
|
14373
|
+
`normalizeProps`
|
|
14374
|
+
);
|
|
14375
|
+
const GUARD_REACTIVE_PROPS = Symbol(
|
|
14376
|
+
`guardReactiveProps`
|
|
14377
|
+
);
|
|
14051
14378
|
const TO_HANDLERS = Symbol(`toHandlers` );
|
|
14052
14379
|
const CAMELIZE = Symbol(`camelize` );
|
|
14053
14380
|
const CAPITALIZE = Symbol(`capitalize` );
|
|
14054
|
-
const TO_HANDLER_KEY = Symbol(
|
|
14055
|
-
|
|
14381
|
+
const TO_HANDLER_KEY = Symbol(
|
|
14382
|
+
`toHandlerKey`
|
|
14383
|
+
);
|
|
14384
|
+
const SET_BLOCK_TRACKING = Symbol(
|
|
14385
|
+
`setBlockTracking`
|
|
14386
|
+
);
|
|
14056
14387
|
const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
|
|
14057
14388
|
const POP_SCOPE_ID = Symbol(`popScopeId` );
|
|
14058
14389
|
const WITH_CTX = Symbol(`withCtx` );
|
|
@@ -15221,8 +15552,9 @@ const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
|
|
|
15221
15552
|
const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
|
|
15222
15553
|
const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
|
|
15223
15554
|
const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
|
|
15224
|
-
const
|
|
15225
|
-
|
|
15555
|
+
const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
15556
|
+
const isMemberExpressionBrowser = (exp) => {
|
|
15557
|
+
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
15226
15558
|
let state = 0 /* inMemberExp */;
|
|
15227
15559
|
let stateStack = [];
|
|
15228
15560
|
let currentOpenBracketCount = 0;
|
|
@@ -15284,6 +15616,9 @@ const isMemberExpressionBrowser = (path) => {
|
|
|
15284
15616
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
15285
15617
|
};
|
|
15286
15618
|
const isMemberExpression = isMemberExpressionBrowser ;
|
|
15619
|
+
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
15620
|
+
const isFnExpressionBrowser = (exp) => fnExpRE.test(getExpSource(exp));
|
|
15621
|
+
const isFnExpression = isFnExpressionBrowser ;
|
|
15287
15622
|
function assert(condition, msg) {
|
|
15288
15623
|
if (!condition) {
|
|
15289
15624
|
throw new Error(msg || `unexpected compiler condition`);
|
|
@@ -18274,7 +18609,7 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
18274
18609
|
} else {
|
|
18275
18610
|
exp = isProp.exp;
|
|
18276
18611
|
if (!exp) {
|
|
18277
|
-
exp = createSimpleExpression(`is`, false, isProp.loc);
|
|
18612
|
+
exp = createSimpleExpression(`is`, false, isProp.arg.loc);
|
|
18278
18613
|
}
|
|
18279
18614
|
}
|
|
18280
18615
|
if (exp) {
|
|
@@ -18778,7 +19113,6 @@ function processSlotOutlet(node, context) {
|
|
|
18778
19113
|
};
|
|
18779
19114
|
}
|
|
18780
19115
|
|
|
18781
|
-
const fnExpRE = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
|
|
18782
19116
|
const transformOn$1 = (dir, node, context, augmentor) => {
|
|
18783
19117
|
const { loc, modifiers, arg } = dir;
|
|
18784
19118
|
if (!dir.exp && !modifiers.length) {
|
|
@@ -18822,8 +19156,8 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
18822
19156
|
}
|
|
18823
19157
|
let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
|
|
18824
19158
|
if (exp) {
|
|
18825
|
-
const isMemberExp = isMemberExpression(exp
|
|
18826
|
-
const isInlineStatement = !(isMemberExp ||
|
|
19159
|
+
const isMemberExp = isMemberExpression(exp);
|
|
19160
|
+
const isInlineStatement = !(isMemberExp || isFnExpression(exp));
|
|
18827
19161
|
const hasMultipleStatements = exp.content.includes(`;`);
|
|
18828
19162
|
{
|
|
18829
19163
|
validateBrowserExpression(
|
|
@@ -18971,7 +19305,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
18971
19305
|
return createTransformProps();
|
|
18972
19306
|
}
|
|
18973
19307
|
const maybeRef = false;
|
|
18974
|
-
if (!expString.trim() || !isMemberExpression(
|
|
19308
|
+
if (!expString.trim() || !isMemberExpression(exp) && !maybeRef) {
|
|
18975
19309
|
context.onError(
|
|
18976
19310
|
createCompilerError(42, exp.loc)
|
|
18977
19311
|
);
|
|
@@ -19247,15 +19581,27 @@ function baseCompile(source, options = {}) {
|
|
|
19247
19581
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
19248
19582
|
|
|
19249
19583
|
const V_MODEL_RADIO = Symbol(`vModelRadio` );
|
|
19250
|
-
const V_MODEL_CHECKBOX = Symbol(
|
|
19584
|
+
const V_MODEL_CHECKBOX = Symbol(
|
|
19585
|
+
`vModelCheckbox`
|
|
19586
|
+
);
|
|
19251
19587
|
const V_MODEL_TEXT = Symbol(`vModelText` );
|
|
19252
|
-
const V_MODEL_SELECT = Symbol(
|
|
19253
|
-
|
|
19254
|
-
|
|
19255
|
-
const
|
|
19588
|
+
const V_MODEL_SELECT = Symbol(
|
|
19589
|
+
`vModelSelect`
|
|
19590
|
+
);
|
|
19591
|
+
const V_MODEL_DYNAMIC = Symbol(
|
|
19592
|
+
`vModelDynamic`
|
|
19593
|
+
);
|
|
19594
|
+
const V_ON_WITH_MODIFIERS = Symbol(
|
|
19595
|
+
`vOnModifiersGuard`
|
|
19596
|
+
);
|
|
19597
|
+
const V_ON_WITH_KEYS = Symbol(
|
|
19598
|
+
`vOnKeysGuard`
|
|
19599
|
+
);
|
|
19256
19600
|
const V_SHOW = Symbol(`vShow` );
|
|
19257
19601
|
const TRANSITION = Symbol(`Transition` );
|
|
19258
|
-
const TRANSITION_GROUP = Symbol(
|
|
19602
|
+
const TRANSITION_GROUP = Symbol(
|
|
19603
|
+
`TransitionGroup`
|
|
19604
|
+
);
|
|
19259
19605
|
registerRuntimeHelpers({
|
|
19260
19606
|
[V_MODEL_RADIO]: `vModelRadio`,
|
|
19261
19607
|
[V_MODEL_CHECKBOX]: `vModelCheckbox`,
|
|
@@ -19939,6 +20285,6 @@ registerRuntimeCompiler(compileToFunction);
|
|
|
19939
20285
|
const Vue = createCompatVue();
|
|
19940
20286
|
Vue.compile = compileToFunction;
|
|
19941
20287
|
|
|
19942
|
-
const
|
|
20288
|
+
const configureCompat = Vue.configureCompat;
|
|
19943
20289
|
|
|
19944
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
20290
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|