@vue/reactivity 3.4.15 → 3.4.16
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/reactivity.cjs.js +40 -39
- package/dist/reactivity.cjs.prod.js +38 -37
- package/dist/reactivity.esm-browser.js +40 -39
- package/dist/reactivity.esm-browser.prod.js +2 -2
- package/dist/reactivity.esm-bundler.js +40 -39
- package/dist/reactivity.global.js +40 -39
- package/dist/reactivity.global.prod.js +2 -2
- package/package.json +2 -2
package/dist/reactivity.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -124,7 +124,7 @@ class ReactiveEffect {
|
|
|
124
124
|
/**
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
127
|
-
this._dirtyLevel =
|
|
127
|
+
this._dirtyLevel = 4;
|
|
128
128
|
/**
|
|
129
129
|
* @internal
|
|
130
130
|
*/
|
|
@@ -144,26 +144,27 @@ class ReactiveEffect {
|
|
|
144
144
|
recordEffectScope(this, scope);
|
|
145
145
|
}
|
|
146
146
|
get dirty() {
|
|
147
|
-
if (this._dirtyLevel ===
|
|
147
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
148
|
+
this._dirtyLevel = 1;
|
|
148
149
|
pauseTracking();
|
|
149
150
|
for (let i = 0; i < this._depsLength; i++) {
|
|
150
151
|
const dep = this.deps[i];
|
|
151
152
|
if (dep.computed) {
|
|
152
153
|
triggerComputed(dep.computed);
|
|
153
|
-
if (this._dirtyLevel >=
|
|
154
|
+
if (this._dirtyLevel >= 4) {
|
|
154
155
|
break;
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
158
|
}
|
|
158
|
-
if (this._dirtyLevel
|
|
159
|
+
if (this._dirtyLevel === 1) {
|
|
159
160
|
this._dirtyLevel = 0;
|
|
160
161
|
}
|
|
161
162
|
resetTracking();
|
|
162
163
|
}
|
|
163
|
-
return this._dirtyLevel >=
|
|
164
|
+
return this._dirtyLevel >= 4;
|
|
164
165
|
}
|
|
165
166
|
set dirty(v) {
|
|
166
|
-
this._dirtyLevel = v ?
|
|
167
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
167
168
|
}
|
|
168
169
|
run() {
|
|
169
170
|
this._dirtyLevel = 0;
|
|
@@ -203,7 +204,7 @@ function preCleanupEffect(effect2) {
|
|
|
203
204
|
effect2._depsLength = 0;
|
|
204
205
|
}
|
|
205
206
|
function postCleanupEffect(effect2) {
|
|
206
|
-
if (effect2.deps
|
|
207
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
207
208
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
208
209
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
209
210
|
}
|
|
@@ -290,29 +291,26 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
290
291
|
var _a;
|
|
291
292
|
pauseScheduling();
|
|
292
293
|
for (const effect2 of dep.keys()) {
|
|
293
|
-
|
|
294
|
-
|
|
294
|
+
let tracking;
|
|
295
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
296
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
295
297
|
effect2._dirtyLevel = dirtyLevel;
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
298
|
+
}
|
|
299
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
300
|
+
{
|
|
301
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, shared.extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
302
|
+
}
|
|
303
|
+
effect2.trigger();
|
|
304
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
305
|
+
effect2._shouldSchedule = false;
|
|
306
|
+
if (effect2.scheduler) {
|
|
307
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
300
308
|
}
|
|
301
|
-
effect2.trigger();
|
|
302
309
|
}
|
|
303
310
|
}
|
|
304
311
|
}
|
|
305
|
-
scheduleEffects(dep);
|
|
306
312
|
resetScheduling();
|
|
307
313
|
}
|
|
308
|
-
function scheduleEffects(dep) {
|
|
309
|
-
for (const effect2 of dep.keys()) {
|
|
310
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
311
|
-
effect2._shouldSchedule = false;
|
|
312
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
314
|
|
|
317
315
|
const createDep = (cleanup, computed) => {
|
|
318
316
|
const dep = /* @__PURE__ */ new Map();
|
|
@@ -395,7 +393,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
395
393
|
if (dep) {
|
|
396
394
|
triggerEffects(
|
|
397
395
|
dep,
|
|
398
|
-
|
|
396
|
+
4,
|
|
399
397
|
{
|
|
400
398
|
target,
|
|
401
399
|
type,
|
|
@@ -980,7 +978,9 @@ function toRaw(observed) {
|
|
|
980
978
|
return raw ? toRaw(raw) : observed;
|
|
981
979
|
}
|
|
982
980
|
function markRaw(value) {
|
|
983
|
-
|
|
981
|
+
if (Object.isExtensible(value)) {
|
|
982
|
+
shared.def(value, "__v_skip", true);
|
|
983
|
+
}
|
|
984
984
|
return value;
|
|
985
985
|
}
|
|
986
986
|
const toReactive = (value) => shared.isObject(value) ? reactive(value) : value;
|
|
@@ -994,8 +994,10 @@ class ComputedRefImpl {
|
|
|
994
994
|
this["__v_isReadonly"] = false;
|
|
995
995
|
this.effect = new ReactiveEffect(
|
|
996
996
|
() => getter(this._value),
|
|
997
|
-
() => triggerRefValue(
|
|
998
|
-
|
|
997
|
+
() => triggerRefValue(
|
|
998
|
+
this,
|
|
999
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1000
|
+
)
|
|
999
1001
|
);
|
|
1000
1002
|
this.effect.computed = this;
|
|
1001
1003
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1003,14 +1005,12 @@ class ComputedRefImpl {
|
|
|
1003
1005
|
}
|
|
1004
1006
|
get value() {
|
|
1005
1007
|
const self = toRaw(this);
|
|
1006
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1007
|
-
|
|
1008
|
-
triggerRefValue(self, 2);
|
|
1009
|
-
}
|
|
1008
|
+
if ((!self._cacheable || self.effect.dirty) && shared.hasChanged(self._value, self._value = self.effect.run())) {
|
|
1009
|
+
triggerRefValue(self, 4);
|
|
1010
1010
|
}
|
|
1011
1011
|
trackRefValue(self);
|
|
1012
|
-
if (self.effect._dirtyLevel >=
|
|
1013
|
-
triggerRefValue(self,
|
|
1012
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1013
|
+
triggerRefValue(self, 2);
|
|
1014
1014
|
}
|
|
1015
1015
|
return self._value;
|
|
1016
1016
|
}
|
|
@@ -1048,14 +1048,15 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
|
|
1050
1050
|
function trackRefValue(ref2) {
|
|
1051
|
+
var _a;
|
|
1051
1052
|
if (shouldTrack && activeEffect) {
|
|
1052
1053
|
ref2 = toRaw(ref2);
|
|
1053
1054
|
trackEffect(
|
|
1054
1055
|
activeEffect,
|
|
1055
|
-
ref2.dep
|
|
1056
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1056
1057
|
() => ref2.dep = void 0,
|
|
1057
1058
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1058
|
-
)
|
|
1059
|
+
),
|
|
1059
1060
|
{
|
|
1060
1061
|
target: ref2,
|
|
1061
1062
|
type: "get",
|
|
@@ -1064,7 +1065,7 @@ function trackRefValue(ref2) {
|
|
|
1064
1065
|
);
|
|
1065
1066
|
}
|
|
1066
1067
|
}
|
|
1067
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1068
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1068
1069
|
ref2 = toRaw(ref2);
|
|
1069
1070
|
const dep = ref2.dep;
|
|
1070
1071
|
if (dep) {
|
|
@@ -1113,12 +1114,12 @@ class RefImpl {
|
|
|
1113
1114
|
if (shared.hasChanged(newVal, this._rawValue)) {
|
|
1114
1115
|
this._rawValue = newVal;
|
|
1115
1116
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1116
|
-
triggerRefValue(this,
|
|
1117
|
+
triggerRefValue(this, 4, newVal);
|
|
1117
1118
|
}
|
|
1118
1119
|
}
|
|
1119
1120
|
}
|
|
1120
1121
|
function triggerRef(ref2) {
|
|
1121
|
-
triggerRefValue(ref2,
|
|
1122
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1122
1123
|
}
|
|
1123
1124
|
function unref(ref2) {
|
|
1124
1125
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -114,7 +114,7 @@ class ReactiveEffect {
|
|
|
114
114
|
/**
|
|
115
115
|
* @internal
|
|
116
116
|
*/
|
|
117
|
-
this._dirtyLevel =
|
|
117
|
+
this._dirtyLevel = 4;
|
|
118
118
|
/**
|
|
119
119
|
* @internal
|
|
120
120
|
*/
|
|
@@ -134,26 +134,27 @@ class ReactiveEffect {
|
|
|
134
134
|
recordEffectScope(this, scope);
|
|
135
135
|
}
|
|
136
136
|
get dirty() {
|
|
137
|
-
if (this._dirtyLevel ===
|
|
137
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
138
|
+
this._dirtyLevel = 1;
|
|
138
139
|
pauseTracking();
|
|
139
140
|
for (let i = 0; i < this._depsLength; i++) {
|
|
140
141
|
const dep = this.deps[i];
|
|
141
142
|
if (dep.computed) {
|
|
142
143
|
triggerComputed(dep.computed);
|
|
143
|
-
if (this._dirtyLevel >=
|
|
144
|
+
if (this._dirtyLevel >= 4) {
|
|
144
145
|
break;
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
148
|
}
|
|
148
|
-
if (this._dirtyLevel
|
|
149
|
+
if (this._dirtyLevel === 1) {
|
|
149
150
|
this._dirtyLevel = 0;
|
|
150
151
|
}
|
|
151
152
|
resetTracking();
|
|
152
153
|
}
|
|
153
|
-
return this._dirtyLevel >=
|
|
154
|
+
return this._dirtyLevel >= 4;
|
|
154
155
|
}
|
|
155
156
|
set dirty(v) {
|
|
156
|
-
this._dirtyLevel = v ?
|
|
157
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
157
158
|
}
|
|
158
159
|
run() {
|
|
159
160
|
this._dirtyLevel = 0;
|
|
@@ -193,7 +194,7 @@ function preCleanupEffect(effect2) {
|
|
|
193
194
|
effect2._depsLength = 0;
|
|
194
195
|
}
|
|
195
196
|
function postCleanupEffect(effect2) {
|
|
196
|
-
if (effect2.deps
|
|
197
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
197
198
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
198
199
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
199
200
|
}
|
|
@@ -275,26 +276,23 @@ const queueEffectSchedulers = [];
|
|
|
275
276
|
function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
276
277
|
pauseScheduling();
|
|
277
278
|
for (const effect2 of dep.keys()) {
|
|
278
|
-
|
|
279
|
-
|
|
279
|
+
let tracking;
|
|
280
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
281
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
280
282
|
effect2._dirtyLevel = dirtyLevel;
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
283
|
+
}
|
|
284
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
285
|
+
effect2.trigger();
|
|
286
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
287
|
+
effect2._shouldSchedule = false;
|
|
288
|
+
if (effect2.scheduler) {
|
|
289
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
290
|
+
}
|
|
284
291
|
}
|
|
285
292
|
}
|
|
286
293
|
}
|
|
287
|
-
scheduleEffects(dep);
|
|
288
294
|
resetScheduling();
|
|
289
295
|
}
|
|
290
|
-
function scheduleEffects(dep) {
|
|
291
|
-
for (const effect2 of dep.keys()) {
|
|
292
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
293
|
-
effect2._shouldSchedule = false;
|
|
294
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
296
|
|
|
299
297
|
const createDep = (cleanup, computed) => {
|
|
300
298
|
const dep = /* @__PURE__ */ new Map();
|
|
@@ -371,7 +369,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
371
369
|
if (dep) {
|
|
372
370
|
triggerEffects(
|
|
373
371
|
dep,
|
|
374
|
-
|
|
372
|
+
4);
|
|
375
373
|
}
|
|
376
374
|
}
|
|
377
375
|
resetScheduling();
|
|
@@ -911,7 +909,9 @@ function toRaw(observed) {
|
|
|
911
909
|
return raw ? toRaw(raw) : observed;
|
|
912
910
|
}
|
|
913
911
|
function markRaw(value) {
|
|
914
|
-
|
|
912
|
+
if (Object.isExtensible(value)) {
|
|
913
|
+
shared.def(value, "__v_skip", true);
|
|
914
|
+
}
|
|
915
915
|
return value;
|
|
916
916
|
}
|
|
917
917
|
const toReactive = (value) => shared.isObject(value) ? reactive(value) : value;
|
|
@@ -925,8 +925,10 @@ class ComputedRefImpl {
|
|
|
925
925
|
this["__v_isReadonly"] = false;
|
|
926
926
|
this.effect = new ReactiveEffect(
|
|
927
927
|
() => getter(this._value),
|
|
928
|
-
() => triggerRefValue(
|
|
929
|
-
|
|
928
|
+
() => triggerRefValue(
|
|
929
|
+
this,
|
|
930
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
931
|
+
)
|
|
930
932
|
);
|
|
931
933
|
this.effect.computed = this;
|
|
932
934
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -934,14 +936,12 @@ class ComputedRefImpl {
|
|
|
934
936
|
}
|
|
935
937
|
get value() {
|
|
936
938
|
const self = toRaw(this);
|
|
937
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
938
|
-
|
|
939
|
-
triggerRefValue(self, 2);
|
|
940
|
-
}
|
|
939
|
+
if ((!self._cacheable || self.effect.dirty) && shared.hasChanged(self._value, self._value = self.effect.run())) {
|
|
940
|
+
triggerRefValue(self, 4);
|
|
941
941
|
}
|
|
942
942
|
trackRefValue(self);
|
|
943
|
-
if (self.effect._dirtyLevel >=
|
|
944
|
-
triggerRefValue(self,
|
|
943
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
944
|
+
triggerRefValue(self, 2);
|
|
945
945
|
}
|
|
946
946
|
return self._value;
|
|
947
947
|
}
|
|
@@ -973,17 +973,18 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
function trackRefValue(ref2) {
|
|
976
|
+
var _a;
|
|
976
977
|
if (shouldTrack && activeEffect) {
|
|
977
978
|
ref2 = toRaw(ref2);
|
|
978
979
|
trackEffect(
|
|
979
980
|
activeEffect,
|
|
980
|
-
ref2.dep
|
|
981
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
981
982
|
() => ref2.dep = void 0,
|
|
982
983
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
983
|
-
))
|
|
984
|
+
));
|
|
984
985
|
}
|
|
985
986
|
}
|
|
986
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
987
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
987
988
|
ref2 = toRaw(ref2);
|
|
988
989
|
const dep = ref2.dep;
|
|
989
990
|
if (dep) {
|
|
@@ -1025,12 +1026,12 @@ class RefImpl {
|
|
|
1025
1026
|
if (shared.hasChanged(newVal, this._rawValue)) {
|
|
1026
1027
|
this._rawValue = newVal;
|
|
1027
1028
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1028
|
-
triggerRefValue(this,
|
|
1029
|
+
triggerRefValue(this, 4);
|
|
1029
1030
|
}
|
|
1030
1031
|
}
|
|
1031
1032
|
}
|
|
1032
1033
|
function triggerRef(ref2) {
|
|
1033
|
-
triggerRefValue(ref2,
|
|
1034
|
+
triggerRefValue(ref2, 4);
|
|
1034
1035
|
}
|
|
1035
1036
|
function unref(ref2) {
|
|
1036
1037
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -159,7 +159,7 @@ class ReactiveEffect {
|
|
|
159
159
|
/**
|
|
160
160
|
* @internal
|
|
161
161
|
*/
|
|
162
|
-
this._dirtyLevel =
|
|
162
|
+
this._dirtyLevel = 4;
|
|
163
163
|
/**
|
|
164
164
|
* @internal
|
|
165
165
|
*/
|
|
@@ -179,26 +179,27 @@ class ReactiveEffect {
|
|
|
179
179
|
recordEffectScope(this, scope);
|
|
180
180
|
}
|
|
181
181
|
get dirty() {
|
|
182
|
-
if (this._dirtyLevel ===
|
|
182
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
183
|
+
this._dirtyLevel = 1;
|
|
183
184
|
pauseTracking();
|
|
184
185
|
for (let i = 0; i < this._depsLength; i++) {
|
|
185
186
|
const dep = this.deps[i];
|
|
186
187
|
if (dep.computed) {
|
|
187
188
|
triggerComputed(dep.computed);
|
|
188
|
-
if (this._dirtyLevel >=
|
|
189
|
+
if (this._dirtyLevel >= 4) {
|
|
189
190
|
break;
|
|
190
191
|
}
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
|
-
if (this._dirtyLevel
|
|
194
|
+
if (this._dirtyLevel === 1) {
|
|
194
195
|
this._dirtyLevel = 0;
|
|
195
196
|
}
|
|
196
197
|
resetTracking();
|
|
197
198
|
}
|
|
198
|
-
return this._dirtyLevel >=
|
|
199
|
+
return this._dirtyLevel >= 4;
|
|
199
200
|
}
|
|
200
201
|
set dirty(v) {
|
|
201
|
-
this._dirtyLevel = v ?
|
|
202
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
202
203
|
}
|
|
203
204
|
run() {
|
|
204
205
|
this._dirtyLevel = 0;
|
|
@@ -238,7 +239,7 @@ function preCleanupEffect(effect2) {
|
|
|
238
239
|
effect2._depsLength = 0;
|
|
239
240
|
}
|
|
240
241
|
function postCleanupEffect(effect2) {
|
|
241
|
-
if (effect2.deps
|
|
242
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
242
243
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
243
244
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
244
245
|
}
|
|
@@ -325,29 +326,26 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
325
326
|
var _a;
|
|
326
327
|
pauseScheduling();
|
|
327
328
|
for (const effect2 of dep.keys()) {
|
|
328
|
-
|
|
329
|
-
|
|
329
|
+
let tracking;
|
|
330
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
331
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
330
332
|
effect2._dirtyLevel = dirtyLevel;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
}
|
|
334
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
335
|
+
{
|
|
336
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
337
|
+
}
|
|
338
|
+
effect2.trigger();
|
|
339
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
340
|
+
effect2._shouldSchedule = false;
|
|
341
|
+
if (effect2.scheduler) {
|
|
342
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
335
343
|
}
|
|
336
|
-
effect2.trigger();
|
|
337
344
|
}
|
|
338
345
|
}
|
|
339
346
|
}
|
|
340
|
-
scheduleEffects(dep);
|
|
341
347
|
resetScheduling();
|
|
342
348
|
}
|
|
343
|
-
function scheduleEffects(dep) {
|
|
344
|
-
for (const effect2 of dep.keys()) {
|
|
345
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
346
|
-
effect2._shouldSchedule = false;
|
|
347
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
349
|
|
|
352
350
|
const createDep = (cleanup, computed) => {
|
|
353
351
|
const dep = /* @__PURE__ */ new Map();
|
|
@@ -430,7 +428,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
430
428
|
if (dep) {
|
|
431
429
|
triggerEffects(
|
|
432
430
|
dep,
|
|
433
|
-
|
|
431
|
+
4,
|
|
434
432
|
{
|
|
435
433
|
target,
|
|
436
434
|
type,
|
|
@@ -1015,7 +1013,9 @@ function toRaw(observed) {
|
|
|
1015
1013
|
return raw ? toRaw(raw) : observed;
|
|
1016
1014
|
}
|
|
1017
1015
|
function markRaw(value) {
|
|
1018
|
-
|
|
1016
|
+
if (Object.isExtensible(value)) {
|
|
1017
|
+
def(value, "__v_skip", true);
|
|
1018
|
+
}
|
|
1019
1019
|
return value;
|
|
1020
1020
|
}
|
|
1021
1021
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1029,8 +1029,10 @@ class ComputedRefImpl {
|
|
|
1029
1029
|
this["__v_isReadonly"] = false;
|
|
1030
1030
|
this.effect = new ReactiveEffect(
|
|
1031
1031
|
() => getter(this._value),
|
|
1032
|
-
() => triggerRefValue(
|
|
1033
|
-
|
|
1032
|
+
() => triggerRefValue(
|
|
1033
|
+
this,
|
|
1034
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1035
|
+
)
|
|
1034
1036
|
);
|
|
1035
1037
|
this.effect.computed = this;
|
|
1036
1038
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1038,14 +1040,12 @@ class ComputedRefImpl {
|
|
|
1038
1040
|
}
|
|
1039
1041
|
get value() {
|
|
1040
1042
|
const self = toRaw(this);
|
|
1041
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1042
|
-
|
|
1043
|
-
triggerRefValue(self, 2);
|
|
1044
|
-
}
|
|
1043
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1044
|
+
triggerRefValue(self, 4);
|
|
1045
1045
|
}
|
|
1046
1046
|
trackRefValue(self);
|
|
1047
|
-
if (self.effect._dirtyLevel >=
|
|
1048
|
-
triggerRefValue(self,
|
|
1047
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1048
|
+
triggerRefValue(self, 2);
|
|
1049
1049
|
}
|
|
1050
1050
|
return self._value;
|
|
1051
1051
|
}
|
|
@@ -1083,14 +1083,15 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1083
1083
|
}
|
|
1084
1084
|
|
|
1085
1085
|
function trackRefValue(ref2) {
|
|
1086
|
+
var _a;
|
|
1086
1087
|
if (shouldTrack && activeEffect) {
|
|
1087
1088
|
ref2 = toRaw(ref2);
|
|
1088
1089
|
trackEffect(
|
|
1089
1090
|
activeEffect,
|
|
1090
|
-
ref2.dep
|
|
1091
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1091
1092
|
() => ref2.dep = void 0,
|
|
1092
1093
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1093
|
-
)
|
|
1094
|
+
),
|
|
1094
1095
|
{
|
|
1095
1096
|
target: ref2,
|
|
1096
1097
|
type: "get",
|
|
@@ -1099,7 +1100,7 @@ function trackRefValue(ref2) {
|
|
|
1099
1100
|
);
|
|
1100
1101
|
}
|
|
1101
1102
|
}
|
|
1102
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1103
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1103
1104
|
ref2 = toRaw(ref2);
|
|
1104
1105
|
const dep = ref2.dep;
|
|
1105
1106
|
if (dep) {
|
|
@@ -1148,12 +1149,12 @@ class RefImpl {
|
|
|
1148
1149
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1149
1150
|
this._rawValue = newVal;
|
|
1150
1151
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1151
|
-
triggerRefValue(this,
|
|
1152
|
+
triggerRefValue(this, 4, newVal);
|
|
1152
1153
|
}
|
|
1153
1154
|
}
|
|
1154
1155
|
}
|
|
1155
1156
|
function triggerRef(ref2) {
|
|
1156
|
-
triggerRefValue(ref2,
|
|
1157
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1157
1158
|
}
|
|
1158
1159
|
function unref(ref2) {
|
|
1159
1160
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
function t(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const e=()=>{},s=Object.assign,n=Object.prototype.hasOwnProperty,i=(t,e)=>n.call(t,e),r=Array.isArray,c=t=>"[object Map]"===l(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,a=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,l=t=>h.call(t),_=t=>l(t).slice(8,-1),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function R(){return p}function b(t){p&&p.cleanups.push(t)}class S{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){A();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(k(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),W()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=I,e=v;try{return I=!0,v=this,this._runnings++,L(this),this.fn()}finally{E(this),this._runnings--,v=e,I=t}}stop(){var t;this.active&&(L(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function k(t){return t.value}function L(t){t._trackId++,t._depsLength=0}function E(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)O(t.deps[e],t);t.deps.length=t._depsLength}}function O(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}function m(t,n){t.effect instanceof S&&(t=t.effect.fn);const i=new S(t,e,(()=>{i.dirty&&i.run()}));n&&(s(i,n),n.scope&&w(i,n.scope)),n&&n.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r}function j(t){t.effect.stop()}let I=!0,x=0;const P=[];function A(){P.push(I),I=!1}function M(){P.push(I),I=!0}function W(){const t=P.pop();I=void 0===t||t}function z(){x++}function V(){for(x--;!x&&T.length;)T.shift()()}function N(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&O(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const T=[];function D(t,e,s){z();for(const n of t.keys())if(n._dirtyLevel<e&&t.get(n)===n._trackId){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}C(t),V()}function C(t){for(const e of t.keys())e.scheduler&&e._shouldSchedule&&(!e._runnings||e.allowRecurse)&&t.get(e)===e._trackId&&(e._shouldSchedule=!1,T.push(e.scheduler))}const K=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},H=new WeakMap,G=Symbol(""),Y=Symbol("");function q(t,e,s){if(I&&v){let e=H.get(t);e||H.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=K((()=>e.delete(s)))),N(v,n)}}function B(t,e,s,n,i,o){const a=H.get(t);if(!a)return;let h=[];if("clear"===e)h=[...a.values()];else if("length"===s&&r(t)){const t=Number(n);a.forEach(((e,s)=>{("length"===s||!u(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(a.get(s)),e){case"add":r(t)?f(s)&&h.push(a.get("length")):(h.push(a.get(G)),c(t)&&h.push(a.get(Y)));break;case"delete":r(t)||(h.push(a.get(G)),c(t)&&h.push(a.get(Y)));break;case"set":c(t)&&h.push(a.get(G))}z();for(const r of h)r&&D(r,2);V()}const F=t("__proto__,__v_isRef,__isVue"),J=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),Q=U();function U(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Ct(this);for(let e=0,i=this.length;e<i;e++)q(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Ct)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=Ct(this)[e].apply(this,t);return V(),W(),s}})),t}function X(t){const e=Ct(this);return q(e,0,t),e.hasOwnProperty(t)}class Z{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return c;if("__v_raw"===e)return s===(n?c?xt:It:c?jt:mt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(Q,e))return Reflect.get(Q,e,s);if("hasOwnProperty"===e)return X}const h=Reflect.get(t,e,s);return(u(e)?J.has(e):F(e))?h:(n||q(t,0,e),c?h:Jt(h)?o&&f(e)?h:h.value:a(h)?n?Mt(h):Pt(h):h)}}class $ extends Z{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Nt(c);if(Tt(s)||Nt(s)||(c=Ct(c),s=Ct(s)),!r(t)&&Jt(c)&&!Jt(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Ct(n)&&(o?d(s,c)&&B(t,"set",e,s):B(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&B(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&J.has(e)||q(t,0,e),s}ownKeys(t){return q(t,0,r(t)?"length":G),Reflect.ownKeys(t)}}class tt extends Z{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const et=new $,st=new tt,nt=new $(!0),it=new tt(!0),rt=t=>t,ct=t=>Reflect.getPrototypeOf(t);function ot(t,e,s=!1,n=!1){const i=Ct(t=t.__v_raw),r=Ct(e);s||(d(e,r)&&q(i,0,e),q(i,0,r));const{has:c}=ct(i),o=n?rt:s?Gt:Ht;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function ut(t,e=!1){const s=this.__v_raw,n=Ct(s),i=Ct(t);return e||(d(t,i)&&q(n,0,t),q(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function at(t,e=!1){return t=t.__v_raw,!e&&q(Ct(t),0,G),Reflect.get(t,"size",t)}function ht(t){t=Ct(t);const e=Ct(this);return ct(e).has.call(e,t)||(e.add(t),B(e,"add",t,t)),this}function lt(t,e){e=Ct(e);const s=Ct(this),{has:n,get:i}=ct(s);let r=n.call(s,t);r||(t=Ct(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&B(s,"set",t,e):B(s,"add",t,e),this}function _t(t){const e=Ct(this),{has:s,get:n}=ct(e);let i=s.call(e,t);i||(t=Ct(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&B(e,"delete",t,void 0),r}function ft(){const t=Ct(this),e=0!==t.size,s=t.clear();return e&&B(t,"clear",void 0,void 0),s}function dt(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Ct(r),o=e?rt:t?Gt:Ht;return!t&&q(c,0,G),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function pt(t,e,s){return function(...n){const i=this.__v_raw,r=Ct(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,a="keys"===t&&o,h=i[t](...n),l=s?rt:e?Gt:Ht;return!e&&q(r,0,a?Y:G),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[l(t[0]),l(t[1])]:l(t),done:e}},[Symbol.iterator](){return this}}}}function vt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function gt(){const t={get(t){return ot(this,t)},get size(){return at(this)},has:ut,add:ht,set:lt,delete:_t,clear:ft,forEach:dt(!1,!1)},e={get(t){return ot(this,t,!1,!0)},get size(){return at(this)},has:ut,add:ht,set:lt,delete:_t,clear:ft,forEach:dt(!1,!0)},s={get(t){return ot(this,t,!0)},get size(){return at(this,!0)},has(t){return ut.call(this,t,!0)},add:vt("add"),set:vt("set"),delete:vt("delete"),clear:vt("clear"),forEach:dt(!0,!1)},n={get(t){return ot(this,t,!0,!0)},get size(){return at(this,!0)},has(t){return ut.call(this,t,!0)},add:vt("add"),set:vt("set"),delete:vt("delete"),clear:vt("clear"),forEach:dt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=pt(i,!1,!1),s[i]=pt(i,!0,!1),e[i]=pt(i,!1,!0),n[i]=pt(i,!0,!0)})),[t,s,e,n]}const[yt,wt,Rt,bt]=gt();function St(t,e){const s=e?t?bt:Rt:t?wt:yt;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const kt={get:St(!1,!1)},Lt={get:St(!1,!0)},Et={get:St(!0,!1)},Ot={get:St(!0,!0)},mt=new WeakMap,jt=new WeakMap,It=new WeakMap,xt=new WeakMap;function Pt(t){return Nt(t)?t:zt(t,!1,et,kt,mt)}function At(t){return zt(t,!1,nt,Lt,jt)}function Mt(t){return zt(t,!0,st,Et,It)}function Wt(t){return zt(t,!0,it,Ot,xt)}function zt(t,e,s,n,i){if(!a(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function Vt(t){return Nt(t)?Vt(t.__v_raw):!(!t||!t.__v_isReactive)}function Nt(t){return!(!t||!t.__v_isReadonly)}function Tt(t){return!(!t||!t.__v_isShallow)}function Dt(t){return Vt(t)||Nt(t)}function Ct(t){const e=t&&t.__v_raw;return e?Ct(e):t}function Kt(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Ht=t=>a(t)?Pt(t):t,Gt=t=>a(t)?Mt(t):t;class Yt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new S((()=>t(this._value)),(()=>Ft(this,1)),(()=>this.dep&&C(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Ct(this);return t._cacheable&&!t.effect.dirty||d(t._value,t._value=t.effect.run())&&Ft(t,2),Bt(t),t.effect._dirtyLevel>=1&&Ft(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function qt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Yt(i,r,c||!r,n)}function Bt(t){I&&v&&(t=Ct(t),N(v,t.dep||(t.dep=K((()=>t.dep=void 0),t instanceof Yt?t:void 0))))}function Ft(t,e=2,s){const n=(t=Ct(t)).dep;n&&D(n,e)}function Jt(t){return!(!t||!0!==t.__v_isRef)}function Qt(t){return Xt(t,!1)}function Ut(t){return Xt(t,!0)}function Xt(t,e){return Jt(t)?t:new Zt(t,e)}class Zt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Ct(t),this._value=e?t:Ht(t)}get value(){return Bt(this),this._value}set value(t){const e=this.__v_isShallow||Tt(t)||Nt(t);t=e?t:Ct(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Ht(t),Ft(this,2))}}function $t(t){Ft(t,2)}function te(t){return Jt(t)?t.value:t}function ee(t){return o(t)?t():te(t)}const se={get:(t,e,s)=>te(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Jt(i)&&!Jt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function ne(t){return Vt(t)?t:new Proxy(t,se)}class ie{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Bt(this)),(()=>Ft(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function re(t){return new ie(t)}function ce(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=he(t,s);return e}class oe{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Ct(this._object),e=this._key,null==(s=H.get(t))?void 0:s.get(e);var t,e,s}}class ue{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ae(t,e,s){return Jt(t)?t:o(t)?new ue(t):a(t)&&arguments.length>1?he(t,e,s):Qt(t)}function he(t,e,s){const n=t[e];return Jt(n)?n:new oe(t,e,s)}const le=qt,_e={GET:"get",HAS:"has",ITERATE:"iterate"},fe={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},de={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,G as ITERATE_KEY,S as ReactiveEffect,de as ReactiveFlags,_e as TrackOpTypes,fe as TriggerOpTypes,qt as computed,re as customRef,le as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Dt as isProxy,Vt as isReactive,Nt as isReadonly,Jt as isRef,Tt as isShallow,Kt as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,ne as proxyRefs,Pt as reactive,Mt as readonly,Qt as ref,V as resetScheduling,W as resetTracking,At as shallowReactive,Wt as shallowReadonly,Ut as shallowRef,j as stop,Ct as toRaw,ae as toRef,ce as toRefs,ee as toValue,q as track,B as trigger,$t as triggerRef,te as unref};
|
|
6
|
+
function t(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const e=()=>{},s=Object.assign,n=Object.prototype.hasOwnProperty,i=(t,e)=>n.call(t,e),r=Array.isArray,c=t=>"[object Map]"===a(t),o=t=>"function"==typeof t,u=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,a=t=>h.call(t),_=t=>a(t).slice(8,-1),f=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,d=(t,e)=>!Object.is(t,e);let p,v;class g{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=p,!t&&p&&(this.index=(p.scopes||(p.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=p;try{return p=this,t()}finally{p=e}}}on(){p=this}off(){p=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function y(t){return new g(t)}function w(t,e=p){e&&e.active&&e.effects.push(t)}function R(){return p}function b(t){p&&p.cleanups.push(t)}class L{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,A();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(S(e.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),W()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=x,e=v;try{return x=!0,v=this,this._runnings++,k(this),this.fn()}finally{E(this),this._runnings--,v=e,x=t}}stop(){var t;this.active&&(k(this),E(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function S(t){return t.value}function k(t){t._trackId++,t._depsLength=0}function E(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)O(t.deps[e],t);t.deps.length=t._depsLength}}function O(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}function m(t,n){t.effect instanceof L&&(t=t.effect.fn);const i=new L(t,e,(()=>{i.dirty&&i.run()}));n&&(s(i,n),n.scope&&w(i,n.scope)),n&&n.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r}function j(t){t.effect.stop()}let x=!0,I=0;const P=[];function A(){P.push(x),x=!1}function M(){P.push(x),x=!0}function W(){const t=P.pop();x=void 0===t||t}function z(){I++}function V(){for(I--;!I&&T.length;)T.shift()()}function N(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&O(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const T=[];function D(t,e,s){z();for(const n of t.keys()){let s;n._dirtyLevel<e&&(null!=s?s:s=t.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=e),n._shouldSchedule&&(null!=s?s:s=t.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&T.push(n.scheduler)))}V()}const C=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},K=new WeakMap,H=Symbol(""),G=Symbol("");function Y(t,e,s){if(x&&v){let e=K.get(t);e||K.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=C((()=>e.delete(s)))),N(v,n)}}function q(t,e,s,n,i,o){const l=K.get(t);if(!l)return;let h=[];if("clear"===e)h=[...l.values()];else if("length"===s&&r(t)){const t=Number(n);l.forEach(((e,s)=>{("length"===s||!u(s)&&s>=t)&&h.push(e)}))}else switch(void 0!==s&&h.push(l.get(s)),e){case"add":r(t)?f(s)&&h.push(l.get("length")):(h.push(l.get(H)),c(t)&&h.push(l.get(G)));break;case"delete":r(t)||(h.push(l.get(H)),c(t)&&h.push(l.get(G)));break;case"set":c(t)&&h.push(l.get(H))}z();for(const r of h)r&&D(r,4);V()}const B=t("__proto__,__v_isRef,__isVue"),F=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(u)),J=Q();function Q(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Dt(this);for(let e=0,i=this.length;e<i;e++)Y(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Dt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){A(),z();const s=Dt(this)[e].apply(this,t);return V(),W(),s}})),t}function U(t){const e=Dt(this);return Y(e,0,t),e.hasOwnProperty(t)}class X{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,c=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return c;if("__v_raw"===e)return s===(n?c?xt:jt:c?mt:Ot).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=r(t);if(!n){if(o&&i(J,e))return Reflect.get(J,e,s);if("hasOwnProperty"===e)return U}const h=Reflect.get(t,e,s);return(u(e)?F.has(e):B(e))?h:(n||Y(t,0,e),c?h:Ft(h)?o&&f(e)?h:h.value:l(h)?n?At(h):It(h):h)}}class Z extends X{constructor(t=!1){super(!1,t)}set(t,e,s,n){let c=t[e];if(!this._shallow){const e=Vt(c);if(Nt(s)||Vt(s)||(c=Dt(c),s=Dt(s)),!r(t)&&Ft(c)&&!Ft(s))return!e&&(c.value=s,!0)}const o=r(t)&&f(e)?Number(e)<t.length:i(t,e),u=Reflect.set(t,e,s,n);return t===Dt(n)&&(o?d(s,c)&&q(t,"set",e,s):q(t,"add",e,s)),u}deleteProperty(t,e){const s=i(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&q(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return u(e)&&F.has(e)||Y(t,0,e),s}ownKeys(t){return Y(t,0,r(t)?"length":H),Reflect.ownKeys(t)}}class $ extends X{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const tt=new Z,et=new $,st=new Z(!0),nt=new $(!0),it=t=>t,rt=t=>Reflect.getPrototypeOf(t);function ct(t,e,s=!1,n=!1){const i=Dt(t=t.__v_raw),r=Dt(e);s||(d(e,r)&&Y(i,0,e),Y(i,0,r));const{has:c}=rt(i),o=n?it:s?Ht:Kt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function ot(t,e=!1){const s=this.__v_raw,n=Dt(s),i=Dt(t);return e||(d(t,i)&&Y(n,0,t),Y(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function ut(t,e=!1){return t=t.__v_raw,!e&&Y(Dt(t),0,H),Reflect.get(t,"size",t)}function lt(t){t=Dt(t);const e=Dt(this);return rt(e).has.call(e,t)||(e.add(t),q(e,"add",t,t)),this}function ht(t,e){e=Dt(e);const s=Dt(this),{has:n,get:i}=rt(s);let r=n.call(s,t);r||(t=Dt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?d(e,c)&&q(s,"set",t,e):q(s,"add",t,e),this}function at(t){const e=Dt(this),{has:s,get:n}=rt(e);let i=s.call(e,t);i||(t=Dt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&q(e,"delete",t,void 0),r}function _t(){const t=Dt(this),e=0!==t.size,s=t.clear();return e&&q(t,"clear",void 0,void 0),s}function ft(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Dt(r),o=e?it:t?Ht:Kt;return!t&&Y(c,0,H),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function dt(t,e,s){return function(...n){const i=this.__v_raw,r=Dt(i),o=c(r),u="entries"===t||t===Symbol.iterator&&o,l="keys"===t&&o,h=i[t](...n),a=s?it:e?Ht:Kt;return!e&&Y(r,0,l?G:H),{next(){const{value:t,done:e}=h.next();return e?{value:t,done:e}:{value:u?[a(t[0]),a(t[1])]:a(t),done:e}},[Symbol.iterator](){return this}}}}function pt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function vt(){const t={get(t){return ct(this,t)},get size(){return ut(this)},has:ot,add:lt,set:ht,delete:at,clear:_t,forEach:ft(!1,!1)},e={get(t){return ct(this,t,!1,!0)},get size(){return ut(this)},has:ot,add:lt,set:ht,delete:at,clear:_t,forEach:ft(!1,!0)},s={get(t){return ct(this,t,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:ft(!0,!1)},n={get(t){return ct(this,t,!0,!0)},get size(){return ut(this,!0)},has(t){return ot.call(this,t,!0)},add:pt("add"),set:pt("set"),delete:pt("delete"),clear:pt("clear"),forEach:ft(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=dt(i,!1,!1),s[i]=dt(i,!0,!1),e[i]=dt(i,!1,!0),n[i]=dt(i,!0,!0)})),[t,s,e,n]}const[gt,yt,wt,Rt]=vt();function bt(t,e){const s=e?t?Rt:wt:t?yt:gt;return(e,n,r)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(i(s,n)&&n in e?s:e,n,r)}const Lt={get:bt(!1,!1)},St={get:bt(!1,!0)},kt={get:bt(!0,!1)},Et={get:bt(!0,!0)},Ot=new WeakMap,mt=new WeakMap,jt=new WeakMap,xt=new WeakMap;function It(t){return Vt(t)?t:Wt(t,!1,tt,Lt,Ot)}function Pt(t){return Wt(t,!1,st,St,mt)}function At(t){return Wt(t,!0,et,kt,jt)}function Mt(t){return Wt(t,!0,nt,Et,xt)}function Wt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function zt(t){return Vt(t)?zt(t.__v_raw):!(!t||!t.__v_isReactive)}function Vt(t){return!(!t||!t.__v_isReadonly)}function Nt(t){return!(!t||!t.__v_isShallow)}function Tt(t){return zt(t)||Vt(t)}function Dt(t){const e=t&&t.__v_raw;return e?Dt(e):t}function Ct(t){return Object.isExtensible(t)&&((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t}const Kt=t=>l(t)?It(t):t,Ht=t=>l(t)?At(t):t;class Gt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new L((()=>t(this._value)),(()=>Bt(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Dt(this);return t._cacheable&&!t.effect.dirty||!d(t._value,t._value=t.effect.run())||Bt(t,4),qt(t),t.effect._dirtyLevel>=2&&Bt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Yt(t,s,n=!1){let i,r;const c=o(t);c?(i=t,r=e):(i=t.get,r=t.set);return new Gt(i,r,c||!r,n)}function qt(t){var e;x&&v&&(t=Dt(t),N(v,null!=(e=t.dep)?e:t.dep=C((()=>t.dep=void 0),t instanceof Gt?t:void 0)))}function Bt(t,e=4,s){const n=(t=Dt(t)).dep;n&&D(n,e)}function Ft(t){return!(!t||!0!==t.__v_isRef)}function Jt(t){return Ut(t,!1)}function Qt(t){return Ut(t,!0)}function Ut(t,e){return Ft(t)?t:new Xt(t,e)}class Xt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Dt(t),this._value=e?t:Kt(t)}get value(){return qt(this),this._value}set value(t){const e=this.__v_isShallow||Nt(t)||Vt(t);t=e?t:Dt(t),d(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Kt(t),Bt(this,4))}}function Zt(t){Bt(t,4)}function $t(t){return Ft(t)?t.value:t}function te(t){return o(t)?t():$t(t)}const ee={get:(t,e,s)=>$t(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ft(i)&&!Ft(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};function se(t){return zt(t)?t:new Proxy(t,ee)}class ne{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>qt(this)),(()=>Bt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function ie(t){return new ne(t)}function re(t){const e=r(t)?new Array(t.length):{};for(const s in t)e[s]=le(t,s);return e}class ce{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Dt(this._object),e=this._key,null==(s=K.get(t))?void 0:s.get(e);var t,e,s}}class oe{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function ue(t,e,s){return Ft(t)?t:o(t)?new oe(t):l(t)&&arguments.length>1?le(t,e,s):Jt(t)}function le(t,e,s){const n=t[e];return Ft(n)?n:new ce(t,e,s)}const he=Yt,ae={GET:"get",HAS:"has",ITERATE:"iterate"},_e={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},fe={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"};export{g as EffectScope,H as ITERATE_KEY,L as ReactiveEffect,fe as ReactiveFlags,ae as TrackOpTypes,_e as TriggerOpTypes,Yt as computed,ie as customRef,he as deferredComputed,m as effect,y as effectScope,M as enableTracking,R as getCurrentScope,Tt as isProxy,zt as isReactive,Vt as isReadonly,Ft as isRef,Nt as isShallow,Ct as markRaw,b as onScopeDispose,z as pauseScheduling,A as pauseTracking,se as proxyRefs,It as reactive,At as readonly,Jt as ref,V as resetScheduling,W as resetTracking,Pt as shallowReactive,Mt as shallowReadonly,Qt as shallowRef,j as stop,Dt as toRaw,ue as toRef,re as toRefs,te as toValue,Y as track,q as trigger,Zt as triggerRef,$t as unref};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -120,7 +120,7 @@ class ReactiveEffect {
|
|
|
120
120
|
/**
|
|
121
121
|
* @internal
|
|
122
122
|
*/
|
|
123
|
-
this._dirtyLevel =
|
|
123
|
+
this._dirtyLevel = 4;
|
|
124
124
|
/**
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
@@ -140,26 +140,27 @@ class ReactiveEffect {
|
|
|
140
140
|
recordEffectScope(this, scope);
|
|
141
141
|
}
|
|
142
142
|
get dirty() {
|
|
143
|
-
if (this._dirtyLevel ===
|
|
143
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
144
|
+
this._dirtyLevel = 1;
|
|
144
145
|
pauseTracking();
|
|
145
146
|
for (let i = 0; i < this._depsLength; i++) {
|
|
146
147
|
const dep = this.deps[i];
|
|
147
148
|
if (dep.computed) {
|
|
148
149
|
triggerComputed(dep.computed);
|
|
149
|
-
if (this._dirtyLevel >=
|
|
150
|
+
if (this._dirtyLevel >= 4) {
|
|
150
151
|
break;
|
|
151
152
|
}
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
|
-
if (this._dirtyLevel
|
|
155
|
+
if (this._dirtyLevel === 1) {
|
|
155
156
|
this._dirtyLevel = 0;
|
|
156
157
|
}
|
|
157
158
|
resetTracking();
|
|
158
159
|
}
|
|
159
|
-
return this._dirtyLevel >=
|
|
160
|
+
return this._dirtyLevel >= 4;
|
|
160
161
|
}
|
|
161
162
|
set dirty(v) {
|
|
162
|
-
this._dirtyLevel = v ?
|
|
163
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
163
164
|
}
|
|
164
165
|
run() {
|
|
165
166
|
this._dirtyLevel = 0;
|
|
@@ -199,7 +200,7 @@ function preCleanupEffect(effect2) {
|
|
|
199
200
|
effect2._depsLength = 0;
|
|
200
201
|
}
|
|
201
202
|
function postCleanupEffect(effect2) {
|
|
202
|
-
if (effect2.deps
|
|
203
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
203
204
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
204
205
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
205
206
|
}
|
|
@@ -286,29 +287,26 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
286
287
|
var _a;
|
|
287
288
|
pauseScheduling();
|
|
288
289
|
for (const effect2 of dep.keys()) {
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
let tracking;
|
|
291
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
292
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
291
293
|
effect2._dirtyLevel = dirtyLevel;
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
294
|
+
}
|
|
295
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
296
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
297
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
298
|
+
}
|
|
299
|
+
effect2.trigger();
|
|
300
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
301
|
+
effect2._shouldSchedule = false;
|
|
302
|
+
if (effect2.scheduler) {
|
|
303
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
296
304
|
}
|
|
297
|
-
effect2.trigger();
|
|
298
305
|
}
|
|
299
306
|
}
|
|
300
307
|
}
|
|
301
|
-
scheduleEffects(dep);
|
|
302
308
|
resetScheduling();
|
|
303
309
|
}
|
|
304
|
-
function scheduleEffects(dep) {
|
|
305
|
-
for (const effect2 of dep.keys()) {
|
|
306
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
307
|
-
effect2._shouldSchedule = false;
|
|
308
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
310
|
|
|
313
311
|
const createDep = (cleanup, computed) => {
|
|
314
312
|
const dep = /* @__PURE__ */ new Map();
|
|
@@ -391,7 +389,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
391
389
|
if (dep) {
|
|
392
390
|
triggerEffects(
|
|
393
391
|
dep,
|
|
394
|
-
|
|
392
|
+
4,
|
|
395
393
|
!!(process.env.NODE_ENV !== "production") ? {
|
|
396
394
|
target,
|
|
397
395
|
type,
|
|
@@ -976,7 +974,9 @@ function toRaw(observed) {
|
|
|
976
974
|
return raw ? toRaw(raw) : observed;
|
|
977
975
|
}
|
|
978
976
|
function markRaw(value) {
|
|
979
|
-
|
|
977
|
+
if (Object.isExtensible(value)) {
|
|
978
|
+
def(value, "__v_skip", true);
|
|
979
|
+
}
|
|
980
980
|
return value;
|
|
981
981
|
}
|
|
982
982
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -990,8 +990,10 @@ class ComputedRefImpl {
|
|
|
990
990
|
this["__v_isReadonly"] = false;
|
|
991
991
|
this.effect = new ReactiveEffect(
|
|
992
992
|
() => getter(this._value),
|
|
993
|
-
() => triggerRefValue(
|
|
994
|
-
|
|
993
|
+
() => triggerRefValue(
|
|
994
|
+
this,
|
|
995
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
996
|
+
)
|
|
995
997
|
);
|
|
996
998
|
this.effect.computed = this;
|
|
997
999
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -999,14 +1001,12 @@ class ComputedRefImpl {
|
|
|
999
1001
|
}
|
|
1000
1002
|
get value() {
|
|
1001
1003
|
const self = toRaw(this);
|
|
1002
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1003
|
-
|
|
1004
|
-
triggerRefValue(self, 2);
|
|
1005
|
-
}
|
|
1004
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1005
|
+
triggerRefValue(self, 4);
|
|
1006
1006
|
}
|
|
1007
1007
|
trackRefValue(self);
|
|
1008
|
-
if (self.effect._dirtyLevel >=
|
|
1009
|
-
triggerRefValue(self,
|
|
1008
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1009
|
+
triggerRefValue(self, 2);
|
|
1010
1010
|
}
|
|
1011
1011
|
return self._value;
|
|
1012
1012
|
}
|
|
@@ -1044,14 +1044,15 @@ function computed(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
|
|
1046
1046
|
function trackRefValue(ref2) {
|
|
1047
|
+
var _a;
|
|
1047
1048
|
if (shouldTrack && activeEffect) {
|
|
1048
1049
|
ref2 = toRaw(ref2);
|
|
1049
1050
|
trackEffect(
|
|
1050
1051
|
activeEffect,
|
|
1051
|
-
ref2.dep
|
|
1052
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1052
1053
|
() => ref2.dep = void 0,
|
|
1053
1054
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1054
|
-
)
|
|
1055
|
+
),
|
|
1055
1056
|
!!(process.env.NODE_ENV !== "production") ? {
|
|
1056
1057
|
target: ref2,
|
|
1057
1058
|
type: "get",
|
|
@@ -1060,7 +1061,7 @@ function trackRefValue(ref2) {
|
|
|
1060
1061
|
);
|
|
1061
1062
|
}
|
|
1062
1063
|
}
|
|
1063
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1064
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1064
1065
|
ref2 = toRaw(ref2);
|
|
1065
1066
|
const dep = ref2.dep;
|
|
1066
1067
|
if (dep) {
|
|
@@ -1109,12 +1110,12 @@ class RefImpl {
|
|
|
1109
1110
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1110
1111
|
this._rawValue = newVal;
|
|
1111
1112
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1112
|
-
triggerRefValue(this,
|
|
1113
|
+
triggerRefValue(this, 4, newVal);
|
|
1113
1114
|
}
|
|
1114
1115
|
}
|
|
1115
1116
|
}
|
|
1116
1117
|
function triggerRef(ref2) {
|
|
1117
|
-
triggerRefValue(ref2,
|
|
1118
|
+
triggerRefValue(ref2, 4, !!(process.env.NODE_ENV !== "production") ? ref2.value : void 0);
|
|
1118
1119
|
}
|
|
1119
1120
|
function unref(ref2) {
|
|
1120
1121
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -162,7 +162,7 @@ var VueReactivity = (function (exports) {
|
|
|
162
162
|
/**
|
|
163
163
|
* @internal
|
|
164
164
|
*/
|
|
165
|
-
this._dirtyLevel =
|
|
165
|
+
this._dirtyLevel = 4;
|
|
166
166
|
/**
|
|
167
167
|
* @internal
|
|
168
168
|
*/
|
|
@@ -182,26 +182,27 @@ var VueReactivity = (function (exports) {
|
|
|
182
182
|
recordEffectScope(this, scope);
|
|
183
183
|
}
|
|
184
184
|
get dirty() {
|
|
185
|
-
if (this._dirtyLevel ===
|
|
185
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
186
|
+
this._dirtyLevel = 1;
|
|
186
187
|
pauseTracking();
|
|
187
188
|
for (let i = 0; i < this._depsLength; i++) {
|
|
188
189
|
const dep = this.deps[i];
|
|
189
190
|
if (dep.computed) {
|
|
190
191
|
triggerComputed(dep.computed);
|
|
191
|
-
if (this._dirtyLevel >=
|
|
192
|
+
if (this._dirtyLevel >= 4) {
|
|
192
193
|
break;
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
if (this._dirtyLevel
|
|
197
|
+
if (this._dirtyLevel === 1) {
|
|
197
198
|
this._dirtyLevel = 0;
|
|
198
199
|
}
|
|
199
200
|
resetTracking();
|
|
200
201
|
}
|
|
201
|
-
return this._dirtyLevel >=
|
|
202
|
+
return this._dirtyLevel >= 4;
|
|
202
203
|
}
|
|
203
204
|
set dirty(v) {
|
|
204
|
-
this._dirtyLevel = v ?
|
|
205
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
205
206
|
}
|
|
206
207
|
run() {
|
|
207
208
|
this._dirtyLevel = 0;
|
|
@@ -241,7 +242,7 @@ var VueReactivity = (function (exports) {
|
|
|
241
242
|
effect2._depsLength = 0;
|
|
242
243
|
}
|
|
243
244
|
function postCleanupEffect(effect2) {
|
|
244
|
-
if (effect2.deps
|
|
245
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
245
246
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
246
247
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
247
248
|
}
|
|
@@ -328,29 +329,26 @@ var VueReactivity = (function (exports) {
|
|
|
328
329
|
var _a;
|
|
329
330
|
pauseScheduling();
|
|
330
331
|
for (const effect2 of dep.keys()) {
|
|
331
|
-
|
|
332
|
-
|
|
332
|
+
let tracking;
|
|
333
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
334
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
333
335
|
effect2._dirtyLevel = dirtyLevel;
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
}
|
|
337
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
338
|
+
{
|
|
339
|
+
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
340
|
+
}
|
|
341
|
+
effect2.trigger();
|
|
342
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
343
|
+
effect2._shouldSchedule = false;
|
|
344
|
+
if (effect2.scheduler) {
|
|
345
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
338
346
|
}
|
|
339
|
-
effect2.trigger();
|
|
340
347
|
}
|
|
341
348
|
}
|
|
342
349
|
}
|
|
343
|
-
scheduleEffects(dep);
|
|
344
350
|
resetScheduling();
|
|
345
351
|
}
|
|
346
|
-
function scheduleEffects(dep) {
|
|
347
|
-
for (const effect2 of dep.keys()) {
|
|
348
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
349
|
-
effect2._shouldSchedule = false;
|
|
350
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
352
|
|
|
355
353
|
const createDep = (cleanup, computed) => {
|
|
356
354
|
const dep = /* @__PURE__ */ new Map();
|
|
@@ -433,7 +431,7 @@ var VueReactivity = (function (exports) {
|
|
|
433
431
|
if (dep) {
|
|
434
432
|
triggerEffects(
|
|
435
433
|
dep,
|
|
436
|
-
|
|
434
|
+
4,
|
|
437
435
|
{
|
|
438
436
|
target,
|
|
439
437
|
type,
|
|
@@ -1018,7 +1016,9 @@ var VueReactivity = (function (exports) {
|
|
|
1018
1016
|
return raw ? toRaw(raw) : observed;
|
|
1019
1017
|
}
|
|
1020
1018
|
function markRaw(value) {
|
|
1021
|
-
|
|
1019
|
+
if (Object.isExtensible(value)) {
|
|
1020
|
+
def(value, "__v_skip", true);
|
|
1021
|
+
}
|
|
1022
1022
|
return value;
|
|
1023
1023
|
}
|
|
1024
1024
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1032,8 +1032,10 @@ var VueReactivity = (function (exports) {
|
|
|
1032
1032
|
this["__v_isReadonly"] = false;
|
|
1033
1033
|
this.effect = new ReactiveEffect(
|
|
1034
1034
|
() => getter(this._value),
|
|
1035
|
-
() => triggerRefValue(
|
|
1036
|
-
|
|
1035
|
+
() => triggerRefValue(
|
|
1036
|
+
this,
|
|
1037
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1038
|
+
)
|
|
1037
1039
|
);
|
|
1038
1040
|
this.effect.computed = this;
|
|
1039
1041
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1041,14 +1043,12 @@ var VueReactivity = (function (exports) {
|
|
|
1041
1043
|
}
|
|
1042
1044
|
get value() {
|
|
1043
1045
|
const self = toRaw(this);
|
|
1044
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1045
|
-
|
|
1046
|
-
triggerRefValue(self, 2);
|
|
1047
|
-
}
|
|
1046
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1047
|
+
triggerRefValue(self, 4);
|
|
1048
1048
|
}
|
|
1049
1049
|
trackRefValue(self);
|
|
1050
|
-
if (self.effect._dirtyLevel >=
|
|
1051
|
-
triggerRefValue(self,
|
|
1050
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1051
|
+
triggerRefValue(self, 2);
|
|
1052
1052
|
}
|
|
1053
1053
|
return self._value;
|
|
1054
1054
|
}
|
|
@@ -1086,14 +1086,15 @@ var VueReactivity = (function (exports) {
|
|
|
1086
1086
|
}
|
|
1087
1087
|
|
|
1088
1088
|
function trackRefValue(ref2) {
|
|
1089
|
+
var _a;
|
|
1089
1090
|
if (shouldTrack && activeEffect) {
|
|
1090
1091
|
ref2 = toRaw(ref2);
|
|
1091
1092
|
trackEffect(
|
|
1092
1093
|
activeEffect,
|
|
1093
|
-
ref2.dep
|
|
1094
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1094
1095
|
() => ref2.dep = void 0,
|
|
1095
1096
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1096
|
-
)
|
|
1097
|
+
),
|
|
1097
1098
|
{
|
|
1098
1099
|
target: ref2,
|
|
1099
1100
|
type: "get",
|
|
@@ -1102,7 +1103,7 @@ var VueReactivity = (function (exports) {
|
|
|
1102
1103
|
);
|
|
1103
1104
|
}
|
|
1104
1105
|
}
|
|
1105
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1106
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1106
1107
|
ref2 = toRaw(ref2);
|
|
1107
1108
|
const dep = ref2.dep;
|
|
1108
1109
|
if (dep) {
|
|
@@ -1151,12 +1152,12 @@ var VueReactivity = (function (exports) {
|
|
|
1151
1152
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1152
1153
|
this._rawValue = newVal;
|
|
1153
1154
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1154
|
-
triggerRefValue(this,
|
|
1155
|
+
triggerRefValue(this, 4, newVal);
|
|
1155
1156
|
}
|
|
1156
1157
|
}
|
|
1157
1158
|
}
|
|
1158
1159
|
function triggerRef(ref2) {
|
|
1159
|
-
triggerRefValue(ref2,
|
|
1160
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1160
1161
|
}
|
|
1161
1162
|
function unref(ref2) {
|
|
1162
1163
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/reactivity v3.4.
|
|
2
|
+
* @vue/reactivity v3.4.16
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
var VueReactivity=function(t){"use strict";function e(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,f=t=>h.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=2,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(1===this._dirtyLevel){j();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(b(e.computed),this._dirtyLevel>=2))break}this._dirtyLevel<2&&(this._dirtyLevel=0),I()}return this._dirtyLevel>=2}set dirty(t){this._dirtyLevel=t?2:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=E,e=g;try{return E=!0,g=this,this._runnings++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,E=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps&&t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)L(t.deps[e],t);t.deps.length=t._depsLength}}function L(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let E=!0,m=0;const O=[];function j(){O.push(E),E=!1}function I(){const t=O.pop();E=void 0===t||t}function x(){m++}function P(){for(m--;!m&&A.length;)A.shift()()}function T(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&L(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(t,e,s){x();for(const n of t.keys())if(n._dirtyLevel<e&&t.get(n)===n._trackId){const t=n._dirtyLevel;n._dirtyLevel=e,0===t&&(n._shouldSchedule=!0,n.trigger())}V(t),P()}function V(t){for(const e of t.keys())e.scheduler&&e._shouldSchedule&&(!e._runnings||e.allowRecurse)&&t.get(e)===e._trackId&&(e._shouldSchedule=!1,A.push(e.scheduler))}const W=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},z=new WeakMap,N=Symbol(""),C=Symbol("");function D(t,e,s){if(E&&g){let e=z.get(t);e||z.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=W((()=>e.delete(s)))),T(g,n)}}function K(t,e,s,n,i,r){const u=z.get(t);if(!u)return;let l=[];if("clear"===e)l=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&l.push(e)}))}else switch(void 0!==s&&l.push(u.get(s)),e){case"add":c(t)?d(s)&&l.push(u.get("length")):(l.push(u.get(N)),o(t)&&l.push(u.get(C)));break;case"delete":c(t)||(l.push(u.get(N)),o(t)&&l.push(u.get(C)));break;case"set":o(t)&&l.push(u.get(N))}x();for(const c of l)c&&M(c,2);P()}const H=e("__proto__,__v_isRef,__isVue"),Y=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),F=G();function G(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Tt(this);for(let e=0,i=this.length;e<i;e++)D(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Tt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),x();const s=Tt(this)[e].apply(this,t);return P(),I(),s}})),t}function q(t){const e=Tt(this);return D(e,0,t),e.hasOwnProperty(t)}class B{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,i=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?Et:Lt:i?kt:St).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&r(F,e))return Reflect.get(F,e,s);if("hasOwnProperty"===e)return q}const u=Reflect.get(t,e,s);return(a(e)?Y.has(e):H(e))?u:(n||D(t,0,e),i?u:Ct(u)?o&&d(e)?u:u.value:l(u)?n?Ot(u):mt(u):u)}}class J extends B{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._shallow){const e=xt(i);if(Pt(s)||xt(s)||(i=Tt(i),s=Tt(s)),!c(t)&&Ct(i)&&!Ct(s))return!e&&(i.value=s,!0)}const o=c(t)&&d(e)?Number(e)<t.length:r(t,e),u=Reflect.set(t,e,s,n);return t===Tt(n)&&(o?p(s,i)&&K(t,"set",e,s):K(t,"add",e,s)),u}deleteProperty(t,e){const s=r(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&K(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&Y.has(e)||D(t,0,e),s}ownKeys(t){return D(t,0,c(t)?"length":N),Reflect.ownKeys(t)}}class Q extends B{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const U=new J,X=new Q,Z=new J(!0),$=new Q(!0),tt=t=>t,et=t=>Reflect.getPrototypeOf(t);function st(t,e,s=!1,n=!1){const i=Tt(t=t.__v_raw),r=Tt(e);s||(p(e,r)&&D(i,0,e),D(i,0,r));const{has:c}=et(i),o=n?tt:s?Mt:At;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function nt(t,e=!1){const s=this.__v_raw,n=Tt(s),i=Tt(t);return e||(p(t,i)&&D(n,0,t),D(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function it(t,e=!1){return t=t.__v_raw,!e&&D(Tt(t),0,N),Reflect.get(t,"size",t)}function rt(t){t=Tt(t);const e=Tt(this);return et(e).has.call(e,t)||(e.add(t),K(e,"add",t,t)),this}function ct(t,e){e=Tt(e);const s=Tt(this),{has:n,get:i}=et(s);let r=n.call(s,t);r||(t=Tt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?p(e,c)&&K(s,"set",t,e):K(s,"add",t,e),this}function ot(t){const e=Tt(this),{has:s,get:n}=et(e);let i=s.call(e,t);i||(t=Tt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&K(e,"delete",t,void 0),r}function ut(){const t=Tt(this),e=0!==t.size,s=t.clear();return e&&K(t,"clear",void 0,void 0),s}function at(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Tt(r),o=e?tt:t?Mt:At;return!t&&D(c,0,N),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function lt(t,e,s){return function(...n){const i=this.__v_raw,r=Tt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...n),h=s?tt:e?Mt:At;return!e&&D(r,0,a?C:N),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function ht(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ft(){const t={get(t){return st(this,t)},get size(){return it(this)},has:nt,add:rt,set:ct,delete:ot,clear:ut,forEach:at(!1,!1)},e={get(t){return st(this,t,!1,!0)},get size(){return it(this)},has:nt,add:rt,set:ct,delete:ot,clear:ut,forEach:at(!1,!0)},s={get(t){return st(this,t,!0)},get size(){return it(this,!0)},has(t){return nt.call(this,t,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:at(!0,!1)},n={get(t){return st(this,t,!0,!0)},get size(){return it(this,!0)},has(t){return nt.call(this,t,!0)},add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear"),forEach:at(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=lt(i,!1,!1),s[i]=lt(i,!0,!1),e[i]=lt(i,!1,!0),n[i]=lt(i,!0,!0)})),[t,s,e,n]}const[_t,dt,pt,vt]=ft();function gt(t,e){const s=e?t?vt:pt:t?dt:_t;return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(r(s,n)&&n in e?s:e,n,i)}const yt={get:gt(!1,!1)},wt={get:gt(!1,!0)},Rt={get:gt(!0,!1)},bt={get:gt(!0,!0)},St=new WeakMap,kt=new WeakMap,Lt=new WeakMap,Et=new WeakMap;function mt(t){return xt(t)?t:jt(t,!1,U,yt,St)}function Ot(t){return jt(t,!0,X,Rt,Lt)}function jt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function It(t){return xt(t)?It(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function Pt(t){return!(!t||!t.__v_isShallow)}function Tt(t){const e=t&&t.__v_raw;return e?Tt(e):t}const At=t=>l(t)?mt(t):t,Mt=t=>l(t)?Ot(t):t;class Vt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R((()=>t(this._value)),(()=>Nt(this,1)),(()=>this.dep&&V(this.dep))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Tt(this);return t._cacheable&&!t.effect.dirty||p(t._value,t._value=t.effect.run())&&Nt(t,2),zt(t),t.effect._dirtyLevel>=1&&Nt(t,1),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Wt(t,e,n=!1){let i,r;const c=u(t);c?(i=t,r=s):(i=t.get,r=t.set);return new Vt(i,r,c||!r,n)}function zt(t){E&&g&&(t=Tt(t),T(g,t.dep||(t.dep=W((()=>t.dep=void 0),t instanceof Vt?t:void 0))))}function Nt(t,e=2,s){const n=(t=Tt(t)).dep;n&&M(n,e)}function Ct(t){return!(!t||!0!==t.__v_isRef)}function Dt(t){return Kt(t,!1)}function Kt(t,e){return Ct(t)?t:new Ht(t,e)}class Ht{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Tt(t),this._value=e?t:At(t)}get value(){return zt(this),this._value}set value(t){const e=this.__v_isShallow||Pt(t)||xt(t);t=e?t:Tt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:At(t),Nt(this,2))}}function Yt(t){return Ct(t)?t.value:t}const Ft={get:(t,e,s)=>Yt(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Ct(i)&&!Ct(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Gt{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>zt(this)),(()=>Nt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class qt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Tt(this._object),e=this._key,null==(s=z.get(t))?void 0:s.get(e);var t,e,s}}class Bt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Jt(t,e,s){const n=t[e];return Ct(n)?n:new qt(t,e,s)}const Qt=Wt;return t.EffectScope=y,t.ITERATE_KEY=N,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Wt,t.customRef=function(t){return new Gt(t)},t.deferredComputed=Qt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const i=new R(t,s,(()=>{i.dirty&&i.run()}));e&&(n(i,e),e.scope&&w(i,e.scope)),e&&e.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){O.push(E),E=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return It(t)||xt(t)},t.isReactive=It,t.isReadonly=xt,t.isRef=Ct,t.isShallow=Pt,t.markRaw=function(t){return((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=x,t.pauseTracking=j,t.proxyRefs=function(t){return It(t)?t:new Proxy(t,Ft)},t.reactive=mt,t.readonly=Ot,t.ref=Dt,t.resetScheduling=P,t.resetTracking=I,t.shallowReactive=function(t){return jt(t,!1,Z,wt,kt)},t.shallowReadonly=function(t){return jt(t,!0,$,bt,Et)},t.shallowRef=function(t){return Kt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Tt,t.toRef=function(t,e,s){return Ct(t)?t:u(t)?new Bt(t):l(t)&&arguments.length>1?Jt(t,e,s):Dt(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Jt(t,s);return e},t.toValue=function(t){return u(t)?t():Yt(t)},t.track=D,t.trigger=K,t.triggerRef=function(t){Nt(t,2)},t.unref=Yt,t}({});
|
|
6
|
+
var VueReactivity=function(t){"use strict";function e(t,e){const s=new Set(t.split(","));return e?t=>s.has(t.toLowerCase()):t=>s.has(t)}const s=()=>{},n=Object.assign,i=Object.prototype.hasOwnProperty,r=(t,e)=>i.call(t,e),c=Array.isArray,o=t=>"[object Map]"===f(t),u=t=>"function"==typeof t,a=t=>"symbol"==typeof t,l=t=>null!==t&&"object"==typeof t,h=Object.prototype.toString,f=t=>h.call(t),_=t=>f(t).slice(8,-1),d=t=>"string"==typeof t&&"NaN"!==t&&"-"!==t[0]&&""+parseInt(t,10)===t,p=(t,e)=>!Object.is(t,e);let v,g;class y{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this.parent=v,!t&&v&&(this.index=(v.scopes||(v.scopes=[])).push(this)-1)}get active(){return this._active}run(t){if(this._active){const e=v;try{return v=this,t()}finally{v=e}}}on(){v=this}off(){v=this.parent}stop(t){if(this._active){let e,s;for(e=0,s=this.effects.length;e<s;e++)this.effects[e].stop();for(e=0,s=this.cleanups.length;e<s;e++)this.cleanups[e]();if(this.scopes)for(e=0,s=this.scopes.length;e<s;e++)this.scopes[e].stop(!0);if(!this.detached&&this.parent&&!t){const t=this.parent.scopes.pop();t&&t!==this&&(this.parent.scopes[this.index]=t,t.index=this.index)}this.parent=void 0,this._active=!1}}}function w(t,e=v){e&&e.active&&e.effects.push(t)}class R{constructor(t,e,s,n){this.fn=t,this.trigger=e,this.scheduler=s,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,w(this,n)}get dirty(){if(2===this._dirtyLevel||3===this._dirtyLevel){this._dirtyLevel=1,j();for(let t=0;t<this._depsLength;t++){const e=this.deps[t];if(e.computed&&(b(e.computed),this._dirtyLevel>=4))break}1===this._dirtyLevel&&(this._dirtyLevel=0),x()}return this._dirtyLevel>=4}set dirty(t){this._dirtyLevel=t?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let t=E,e=g;try{return E=!0,g=this,this._runnings++,S(this),this.fn()}finally{k(this),this._runnings--,g=e,E=t}}stop(){var t;this.active&&(S(this),k(this),null==(t=this.onStop)||t.call(this),this.active=!1)}}function b(t){return t.value}function S(t){t._trackId++,t._depsLength=0}function k(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)L(t.deps[e],t);t.deps.length=t._depsLength}}function L(t,e){const s=t.get(e);void 0!==s&&e._trackId!==s&&(t.delete(e),0===t.size&&t.cleanup())}let E=!0,O=0;const m=[];function j(){m.push(E),E=!1}function x(){const t=m.pop();E=void 0===t||t}function I(){O++}function P(){for(O--;!O&&A.length;)A.shift()()}function T(t,e,s){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const s=t.deps[t._depsLength];s!==e?(s&&L(s,t),t.deps[t._depsLength++]=e):t._depsLength++}}const A=[];function M(t,e,s){I();for(const n of t.keys()){let s;n._dirtyLevel<e&&(null!=s?s:s=t.get(n)===n._trackId)&&(n._shouldSchedule||(n._shouldSchedule=0===n._dirtyLevel),n._dirtyLevel=e),n._shouldSchedule&&(null!=s?s:s=t.get(n)===n._trackId)&&(n.trigger(),n._runnings&&!n.allowRecurse||2===n._dirtyLevel||(n._shouldSchedule=!1,n.scheduler&&A.push(n.scheduler)))}P()}const V=(t,e)=>{const s=new Map;return s.cleanup=t,s.computed=e,s},W=new WeakMap,z=Symbol(""),N=Symbol("");function C(t,e,s){if(E&&g){let e=W.get(t);e||W.set(t,e=new Map);let n=e.get(s);n||e.set(s,n=V((()=>e.delete(s)))),T(g,n)}}function D(t,e,s,n,i,r){const u=W.get(t);if(!u)return;let l=[];if("clear"===e)l=[...u.values()];else if("length"===s&&c(t)){const t=Number(n);u.forEach(((e,s)=>{("length"===s||!a(s)&&s>=t)&&l.push(e)}))}else switch(void 0!==s&&l.push(u.get(s)),e){case"add":c(t)?d(s)&&l.push(u.get("length")):(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"delete":c(t)||(l.push(u.get(z)),o(t)&&l.push(u.get(N)));break;case"set":o(t)&&l.push(u.get(z))}I();for(const c of l)c&&M(c,4);P()}const K=e("__proto__,__v_isRef,__isVue"),H=new Set(Object.getOwnPropertyNames(Symbol).filter((t=>"arguments"!==t&&"caller"!==t)).map((t=>Symbol[t])).filter(a)),Y=F();function F(){const t={};return["includes","indexOf","lastIndexOf"].forEach((e=>{t[e]=function(...t){const s=Pt(this);for(let e=0,i=this.length;e<i;e++)C(s,0,e+"");const n=s[e](...t);return-1===n||!1===n?s[e](...t.map(Pt)):n}})),["push","pop","shift","unshift","splice"].forEach((e=>{t[e]=function(...t){j(),I();const s=Pt(this)[e].apply(this,t);return P(),x(),s}})),t}function G(t){const e=Pt(this);return C(e,0,t),e.hasOwnProperty(t)}class q{constructor(t=!1,e=!1){this._isReadonly=t,this._shallow=e}get(t,e,s){const n=this._isReadonly,i=this._shallow;if("__v_isReactive"===e)return!n;if("__v_isReadonly"===e)return n;if("__v_isShallow"===e)return i;if("__v_raw"===e)return s===(n?i?Lt:kt:i?St:bt).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=c(t);if(!n){if(o&&r(Y,e))return Reflect.get(Y,e,s);if("hasOwnProperty"===e)return G}const u=Reflect.get(t,e,s);return(a(e)?H.has(e):K(e))?u:(n||C(t,0,e),i?u:Nt(u)?o&&d(e)?u:u.value:l(u)?n?Ot(u):Et(u):u)}}class B extends q{constructor(t=!1){super(!1,t)}set(t,e,s,n){let i=t[e];if(!this._shallow){const e=xt(i);if(It(s)||xt(s)||(i=Pt(i),s=Pt(s)),!c(t)&&Nt(i)&&!Nt(s))return!e&&(i.value=s,!0)}const o=c(t)&&d(e)?Number(e)<t.length:r(t,e),u=Reflect.set(t,e,s,n);return t===Pt(n)&&(o?p(s,i)&&D(t,"set",e,s):D(t,"add",e,s)),u}deleteProperty(t,e){const s=r(t,e),n=Reflect.deleteProperty(t,e);return n&&s&&D(t,"delete",e,void 0),n}has(t,e){const s=Reflect.has(t,e);return a(e)&&H.has(e)||C(t,0,e),s}ownKeys(t){return C(t,0,c(t)?"length":z),Reflect.ownKeys(t)}}class J extends q{constructor(t=!1){super(!0,t)}set(t,e){return!0}deleteProperty(t,e){return!0}}const Q=new B,U=new J,X=new B(!0),Z=new J(!0),$=t=>t,tt=t=>Reflect.getPrototypeOf(t);function et(t,e,s=!1,n=!1){const i=Pt(t=t.__v_raw),r=Pt(e);s||(p(e,r)&&C(i,0,e),C(i,0,r));const{has:c}=tt(i),o=n?$:s?At:Tt;return c.call(i,e)?o(t.get(e)):c.call(i,r)?o(t.get(r)):void(t!==i&&t.get(e))}function st(t,e=!1){const s=this.__v_raw,n=Pt(s),i=Pt(t);return e||(p(t,i)&&C(n,0,t),C(n,0,i)),t===i?s.has(t):s.has(t)||s.has(i)}function nt(t,e=!1){return t=t.__v_raw,!e&&C(Pt(t),0,z),Reflect.get(t,"size",t)}function it(t){t=Pt(t);const e=Pt(this);return tt(e).has.call(e,t)||(e.add(t),D(e,"add",t,t)),this}function rt(t,e){e=Pt(e);const s=Pt(this),{has:n,get:i}=tt(s);let r=n.call(s,t);r||(t=Pt(t),r=n.call(s,t));const c=i.call(s,t);return s.set(t,e),r?p(e,c)&&D(s,"set",t,e):D(s,"add",t,e),this}function ct(t){const e=Pt(this),{has:s,get:n}=tt(e);let i=s.call(e,t);i||(t=Pt(t),i=s.call(e,t)),n&&n.call(e,t);const r=e.delete(t);return i&&D(e,"delete",t,void 0),r}function ot(){const t=Pt(this),e=0!==t.size,s=t.clear();return e&&D(t,"clear",void 0,void 0),s}function ut(t,e){return function(s,n){const i=this,r=i.__v_raw,c=Pt(r),o=e?$:t?At:Tt;return!t&&C(c,0,z),r.forEach(((t,e)=>s.call(n,o(t),o(e),i)))}}function at(t,e,s){return function(...n){const i=this.__v_raw,r=Pt(i),c=o(r),u="entries"===t||t===Symbol.iterator&&c,a="keys"===t&&c,l=i[t](...n),h=s?$:e?At:Tt;return!e&&C(r,0,a?N:z),{next(){const{value:t,done:e}=l.next();return e?{value:t,done:e}:{value:u?[h(t[0]),h(t[1])]:h(t),done:e}},[Symbol.iterator](){return this}}}}function lt(t){return function(...e){return"delete"!==t&&("clear"===t?void 0:this)}}function ht(){const t={get(t){return et(this,t)},get size(){return nt(this)},has:st,add:it,set:rt,delete:ct,clear:ot,forEach:ut(!1,!1)},e={get(t){return et(this,t,!1,!0)},get size(){return nt(this)},has:st,add:it,set:rt,delete:ct,clear:ot,forEach:ut(!1,!0)},s={get(t){return et(this,t,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!1)},n={get(t){return et(this,t,!0,!0)},get size(){return nt(this,!0)},has(t){return st.call(this,t,!0)},add:lt("add"),set:lt("set"),delete:lt("delete"),clear:lt("clear"),forEach:ut(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((i=>{t[i]=at(i,!1,!1),s[i]=at(i,!0,!1),e[i]=at(i,!1,!0),n[i]=at(i,!0,!0)})),[t,s,e,n]}const[ft,_t,dt,pt]=ht();function vt(t,e){const s=e?t?pt:dt:t?_t:ft;return(e,n,i)=>"__v_isReactive"===n?!t:"__v_isReadonly"===n?t:"__v_raw"===n?e:Reflect.get(r(s,n)&&n in e?s:e,n,i)}const gt={get:vt(!1,!1)},yt={get:vt(!1,!0)},wt={get:vt(!0,!1)},Rt={get:vt(!0,!0)},bt=new WeakMap,St=new WeakMap,kt=new WeakMap,Lt=new WeakMap;function Et(t){return xt(t)?t:mt(t,!1,Q,gt,bt)}function Ot(t){return mt(t,!0,U,wt,kt)}function mt(t,e,s,n,i){if(!l(t))return t;if(t.__v_raw&&(!e||!t.__v_isReactive))return t;const r=i.get(t);if(r)return r;const c=(o=t).__v_skip||!Object.isExtensible(o)?0:function(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(_(o));var o;if(0===c)return t;const u=new Proxy(t,2===c?n:s);return i.set(t,u),u}function jt(t){return xt(t)?jt(t.__v_raw):!(!t||!t.__v_isReactive)}function xt(t){return!(!t||!t.__v_isReadonly)}function It(t){return!(!t||!t.__v_isShallow)}function Pt(t){const e=t&&t.__v_raw;return e?Pt(e):t}const Tt=t=>l(t)?Et(t):t,At=t=>l(t)?Ot(t):t;class Mt{constructor(t,e,s,n){this._setter=e,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new R((()=>t(this._value)),(()=>zt(this,2===this.effect._dirtyLevel?2:3))),this.effect.computed=this,this.effect.active=this._cacheable=!n,this.__v_isReadonly=s}get value(){const t=Pt(this);return t._cacheable&&!t.effect.dirty||!p(t._value,t._value=t.effect.run())||zt(t,4),Wt(t),t.effect._dirtyLevel>=2&&zt(t,2),t._value}set value(t){this._setter(t)}get _dirty(){return this.effect.dirty}set _dirty(t){this.effect.dirty=t}}function Vt(t,e,n=!1){let i,r;const c=u(t);c?(i=t,r=s):(i=t.get,r=t.set);return new Mt(i,r,c||!r,n)}function Wt(t){var e;E&&g&&(t=Pt(t),T(g,null!=(e=t.dep)?e:t.dep=V((()=>t.dep=void 0),t instanceof Mt?t:void 0)))}function zt(t,e=4,s){const n=(t=Pt(t)).dep;n&&M(n,e)}function Nt(t){return!(!t||!0!==t.__v_isRef)}function Ct(t){return Dt(t,!1)}function Dt(t,e){return Nt(t)?t:new Kt(t,e)}class Kt{constructor(t,e){this.__v_isShallow=e,this.dep=void 0,this.__v_isRef=!0,this._rawValue=e?t:Pt(t),this._value=e?t:Tt(t)}get value(){return Wt(this),this._value}set value(t){const e=this.__v_isShallow||It(t)||xt(t);t=e?t:Pt(t),p(t,this._rawValue)&&(this._rawValue=t,this._value=e?t:Tt(t),zt(this,4))}}function Ht(t){return Nt(t)?t.value:t}const Yt={get:(t,e,s)=>Ht(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const i=t[e];return Nt(i)&&!Nt(s)?(i.value=s,!0):Reflect.set(t,e,s,n)}};class Ft{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:e,set:s}=t((()=>Wt(this)),(()=>zt(this)));this._get=e,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}class Gt{constructor(t,e,s){this._object=t,this._key=e,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return void 0===t?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return t=Pt(this._object),e=this._key,null==(s=W.get(t))?void 0:s.get(e);var t,e,s}}class qt{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Bt(t,e,s){const n=t[e];return Nt(n)?n:new Gt(t,e,s)}const Jt=Vt;return t.EffectScope=y,t.ITERATE_KEY=z,t.ReactiveEffect=R,t.ReactiveFlags={SKIP:"__v_skip",IS_REACTIVE:"__v_isReactive",IS_READONLY:"__v_isReadonly",IS_SHALLOW:"__v_isShallow",RAW:"__v_raw"},t.TrackOpTypes={GET:"get",HAS:"has",ITERATE:"iterate"},t.TriggerOpTypes={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},t.computed=Vt,t.customRef=function(t){return new Ft(t)},t.deferredComputed=Jt,t.effect=function(t,e){t.effect instanceof R&&(t=t.effect.fn);const i=new R(t,s,(()=>{i.dirty&&i.run()}));e&&(n(i,e),e.scope&&w(i,e.scope)),e&&e.lazy||i.run();const r=i.run.bind(i);return r.effect=i,r},t.effectScope=function(t){return new y(t)},t.enableTracking=function(){m.push(E),E=!0},t.getCurrentScope=function(){return v},t.isProxy=function(t){return jt(t)||xt(t)},t.isReactive=jt,t.isReadonly=xt,t.isRef=Nt,t.isShallow=It,t.markRaw=function(t){return Object.isExtensible(t)&&((t,e,s)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:s})})(t,"__v_skip",!0),t},t.onScopeDispose=function(t){v&&v.cleanups.push(t)},t.pauseScheduling=I,t.pauseTracking=j,t.proxyRefs=function(t){return jt(t)?t:new Proxy(t,Yt)},t.reactive=Et,t.readonly=Ot,t.ref=Ct,t.resetScheduling=P,t.resetTracking=x,t.shallowReactive=function(t){return mt(t,!1,X,yt,St)},t.shallowReadonly=function(t){return mt(t,!0,Z,Rt,Lt)},t.shallowRef=function(t){return Dt(t,!0)},t.stop=function(t){t.effect.stop()},t.toRaw=Pt,t.toRef=function(t,e,s){return Nt(t)?t:u(t)?new qt(t):l(t)&&arguments.length>1?Bt(t,e,s):Ct(t)},t.toRefs=function(t){const e=c(t)?new Array(t.length):{};for(const s in t)e[s]=Bt(t,s);return e},t.toValue=function(t){return u(t)?t():Ht(t)},t.track=C,t.trigger=D,t.triggerRef=function(t){zt(t,4)},t.unref=Ht,t}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/reactivity",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.16",
|
|
4
4
|
"description": "@vue/reactivity",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/reactivity.esm-bundler.js",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/reactivity#readme",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@vue/shared": "3.4.
|
|
53
|
+
"@vue/shared": "3.4.16"
|
|
54
54
|
}
|
|
55
55
|
}
|