@valaxyjs/devtools 0.18.7 → 0.18.9
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/client/assets/{index-BrXoePMX.js → index-BH8rSQQ2.js} +1160 -1327
- package/dist/client/assets/{index-BihflHSk.css → index-DIHmqMB6.css} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +7 -7
- package/src/client/components.d.ts +47 -47
- package/dist/client/assets/_plugin-vue_export-helper-DgDhiqFL.js +0 -11
- package/dist/client/assets/about-DwWwcIBI.js +0 -12
- package/dist/client/assets/categories-CuWZw3k9.js +0 -12
- package/dist/client/assets/index-BRTQkmk7.js +0 -4525
- package/dist/client/assets/index-DF84L4of.css +0 -61
- package/dist/client/assets/tags-BDSDogY-.js +0 -12
|
@@ -1,51 +1,44 @@
|
|
|
1
|
-
const __vite__fileDeps=["./index-BRTQkmk7.js","./_plugin-vue_export-helper-DgDhiqFL.js","./index-DF84L4of.css","./about-DwWwcIBI.js","./categories-CuWZw3k9.js","./tags-BDSDogY-.js"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
|
|
2
1
|
true&&(function polyfill() {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
}).observe(document, { childList: true, subtree: true });
|
|
21
|
-
function getFetchOpts(link) {
|
|
22
|
-
const fetchOpts = {};
|
|
23
|
-
if (link.integrity)
|
|
24
|
-
fetchOpts.integrity = link.integrity;
|
|
25
|
-
if (link.referrerPolicy)
|
|
26
|
-
fetchOpts.referrerPolicy = link.referrerPolicy;
|
|
27
|
-
if (link.crossOrigin === 'use-credentials')
|
|
28
|
-
fetchOpts.credentials = 'include';
|
|
29
|
-
else if (link.crossOrigin === 'anonymous')
|
|
30
|
-
fetchOpts.credentials = 'omit';
|
|
31
|
-
else
|
|
32
|
-
fetchOpts.credentials = 'same-origin';
|
|
33
|
-
return fetchOpts;
|
|
34
|
-
}
|
|
35
|
-
function processPreload(link) {
|
|
36
|
-
if (link.ep)
|
|
37
|
-
// ep marker = processed
|
|
38
|
-
return;
|
|
39
|
-
link.ep = true;
|
|
40
|
-
// prepopulate the load record
|
|
41
|
-
const fetchOpts = getFetchOpts(link);
|
|
42
|
-
fetch(link.href, fetchOpts);
|
|
2
|
+
const relList = document.createElement("link").relList;
|
|
3
|
+
if (relList && relList.supports && relList.supports("modulepreload")) {
|
|
4
|
+
return;
|
|
5
|
+
}
|
|
6
|
+
for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
|
|
7
|
+
processPreload(link);
|
|
8
|
+
}
|
|
9
|
+
new MutationObserver((mutations) => {
|
|
10
|
+
for (const mutation of mutations) {
|
|
11
|
+
if (mutation.type !== "childList") {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
for (const node of mutation.addedNodes) {
|
|
15
|
+
if (node.tagName === "LINK" && node.rel === "modulepreload")
|
|
16
|
+
processPreload(node);
|
|
17
|
+
}
|
|
43
18
|
}
|
|
19
|
+
}).observe(document, { childList: true, subtree: true });
|
|
20
|
+
function getFetchOpts(link) {
|
|
21
|
+
const fetchOpts = {};
|
|
22
|
+
if (link.integrity) fetchOpts.integrity = link.integrity;
|
|
23
|
+
if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
|
|
24
|
+
if (link.crossOrigin === "use-credentials")
|
|
25
|
+
fetchOpts.credentials = "include";
|
|
26
|
+
else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
|
|
27
|
+
else fetchOpts.credentials = "same-origin";
|
|
28
|
+
return fetchOpts;
|
|
29
|
+
}
|
|
30
|
+
function processPreload(link) {
|
|
31
|
+
if (link.ep)
|
|
32
|
+
return;
|
|
33
|
+
link.ep = true;
|
|
34
|
+
const fetchOpts = getFetchOpts(link);
|
|
35
|
+
fetch(link.href, fetchOpts);
|
|
36
|
+
}
|
|
44
37
|
}());
|
|
45
38
|
/* Injected with object hook! */
|
|
46
39
|
|
|
47
40
|
/**
|
|
48
|
-
* @vue/shared v3.4.
|
|
41
|
+
* @vue/shared v3.4.30
|
|
49
42
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
50
43
|
* @license MIT
|
|
51
44
|
**/
|
|
@@ -116,9 +109,9 @@ const toHandlerKey = cacheStringFunction((str) => {
|
|
|
116
109
|
return s;
|
|
117
110
|
});
|
|
118
111
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
119
|
-
const invokeArrayFns = (fns, arg) => {
|
|
112
|
+
const invokeArrayFns = (fns, ...arg) => {
|
|
120
113
|
for (let i = 0; i < fns.length; i++) {
|
|
121
|
-
fns[i](arg);
|
|
114
|
+
fns[i](...arg);
|
|
122
115
|
}
|
|
123
116
|
};
|
|
124
117
|
const def = (obj, key, value, writable = false) => {
|
|
@@ -192,46 +185,11 @@ const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
|
192
185
|
function includeBooleanAttr(value) {
|
|
193
186
|
return !!value || value === "";
|
|
194
187
|
}
|
|
195
|
-
const toDisplayString = (val) => {
|
|
196
|
-
return isString(val) ? val : val == null ? "" : isArray$1(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
197
|
-
};
|
|
198
|
-
const replacer = (_key, val) => {
|
|
199
|
-
if (val && val.__v_isRef) {
|
|
200
|
-
return replacer(_key, val.value);
|
|
201
|
-
} else if (isMap(val)) {
|
|
202
|
-
return {
|
|
203
|
-
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
204
|
-
(entries, [key, val2], i) => {
|
|
205
|
-
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
206
|
-
return entries;
|
|
207
|
-
},
|
|
208
|
-
{}
|
|
209
|
-
)
|
|
210
|
-
};
|
|
211
|
-
} else if (isSet(val)) {
|
|
212
|
-
return {
|
|
213
|
-
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
|
214
|
-
};
|
|
215
|
-
} else if (isSymbol(val)) {
|
|
216
|
-
return stringifySymbol(val);
|
|
217
|
-
} else if (isObject(val) && !isArray$1(val) && !isPlainObject(val)) {
|
|
218
|
-
return String(val);
|
|
219
|
-
}
|
|
220
|
-
return val;
|
|
221
|
-
};
|
|
222
|
-
const stringifySymbol = (v, i = "") => {
|
|
223
|
-
var _a;
|
|
224
|
-
return (
|
|
225
|
-
// Symbol.description in es2019+ so we need to cast here to pass
|
|
226
|
-
// the lib: es2016 check
|
|
227
|
-
isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v
|
|
228
|
-
);
|
|
229
|
-
};
|
|
230
188
|
|
|
231
189
|
/* Injected with object hook! */
|
|
232
190
|
|
|
233
191
|
/**
|
|
234
|
-
* @vue/reactivity v3.4.
|
|
192
|
+
* @vue/reactivity v3.4.30
|
|
235
193
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
236
194
|
* @license MIT
|
|
237
195
|
**/
|
|
@@ -319,7 +277,7 @@ class ReactiveEffect {
|
|
|
319
277
|
this.scheduler = scheduler;
|
|
320
278
|
this.active = true;
|
|
321
279
|
this.deps = [];
|
|
322
|
-
this._dirtyLevel =
|
|
280
|
+
this._dirtyLevel = 5;
|
|
323
281
|
this._trackId = 0;
|
|
324
282
|
this._runnings = 0;
|
|
325
283
|
this._shouldSchedule = false;
|
|
@@ -327,14 +285,20 @@ class ReactiveEffect {
|
|
|
327
285
|
recordEffectScope(this, scope);
|
|
328
286
|
}
|
|
329
287
|
get dirty() {
|
|
330
|
-
if (this._dirtyLevel === 2
|
|
288
|
+
if (this._dirtyLevel === 2)
|
|
289
|
+
return false;
|
|
290
|
+
if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
|
|
331
291
|
this._dirtyLevel = 1;
|
|
332
292
|
pauseTracking();
|
|
333
293
|
for (let i = 0; i < this._depsLength; i++) {
|
|
334
294
|
const dep = this.deps[i];
|
|
335
295
|
if (dep.computed) {
|
|
296
|
+
if (dep.computed.effect._dirtyLevel === 2) {
|
|
297
|
+
resetTracking();
|
|
298
|
+
return true;
|
|
299
|
+
}
|
|
336
300
|
triggerComputed(dep.computed);
|
|
337
|
-
if (this._dirtyLevel >=
|
|
301
|
+
if (this._dirtyLevel >= 5) {
|
|
338
302
|
break;
|
|
339
303
|
}
|
|
340
304
|
}
|
|
@@ -344,10 +308,10 @@ class ReactiveEffect {
|
|
|
344
308
|
}
|
|
345
309
|
resetTracking();
|
|
346
310
|
}
|
|
347
|
-
return this._dirtyLevel >=
|
|
311
|
+
return this._dirtyLevel >= 5;
|
|
348
312
|
}
|
|
349
313
|
set dirty(v) {
|
|
350
|
-
this._dirtyLevel = v ?
|
|
314
|
+
this._dirtyLevel = v ? 5 : 0;
|
|
351
315
|
}
|
|
352
316
|
run() {
|
|
353
317
|
this._dirtyLevel = 0;
|
|
@@ -441,13 +405,22 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
441
405
|
pauseScheduling();
|
|
442
406
|
for (const effect2 of dep.keys()) {
|
|
443
407
|
let tracking;
|
|
408
|
+
if (!dep.computed && effect2.computed) {
|
|
409
|
+
if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
410
|
+
effect2._dirtyLevel = 2;
|
|
411
|
+
continue;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
444
414
|
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
445
415
|
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
416
|
+
if (effect2.computed && effect2._dirtyLevel === 2) {
|
|
417
|
+
effect2._shouldSchedule = true;
|
|
418
|
+
}
|
|
446
419
|
effect2._dirtyLevel = dirtyLevel;
|
|
447
420
|
}
|
|
448
421
|
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
449
422
|
effect2.trigger();
|
|
450
|
-
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !==
|
|
423
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) {
|
|
451
424
|
effect2._shouldSchedule = false;
|
|
452
425
|
if (effect2.scheduler) {
|
|
453
426
|
queueEffectSchedulers.push(effect2.scheduler);
|
|
@@ -531,7 +504,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
531
504
|
if (dep) {
|
|
532
505
|
triggerEffects(
|
|
533
506
|
dep,
|
|
534
|
-
|
|
507
|
+
5);
|
|
535
508
|
}
|
|
536
509
|
}
|
|
537
510
|
resetScheduling();
|
|
@@ -570,8 +543,7 @@ function createArrayInstrumentations() {
|
|
|
570
543
|
return instrumentations;
|
|
571
544
|
}
|
|
572
545
|
function hasOwnProperty(key) {
|
|
573
|
-
if (!isSymbol(key))
|
|
574
|
-
key = String(key);
|
|
546
|
+
if (!isSymbol(key)) key = String(key);
|
|
575
547
|
const obj = toRaw(this);
|
|
576
548
|
track(obj, "has", key);
|
|
577
549
|
return obj.hasOwnProperty(key);
|
|
@@ -1077,7 +1049,7 @@ class ComputedRefImpl {
|
|
|
1077
1049
|
() => getter(this._value),
|
|
1078
1050
|
() => triggerRefValue(
|
|
1079
1051
|
this,
|
|
1080
|
-
this.effect._dirtyLevel ===
|
|
1052
|
+
this.effect._dirtyLevel === 3 ? 3 : 4
|
|
1081
1053
|
)
|
|
1082
1054
|
);
|
|
1083
1055
|
this.effect.computed = this;
|
|
@@ -1086,12 +1058,15 @@ class ComputedRefImpl {
|
|
|
1086
1058
|
}
|
|
1087
1059
|
get value() {
|
|
1088
1060
|
const self = toRaw(this);
|
|
1061
|
+
const lastDirtyLevel = self.effect._dirtyLevel;
|
|
1089
1062
|
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1090
|
-
|
|
1063
|
+
if (lastDirtyLevel !== 3) {
|
|
1064
|
+
triggerRefValue(self, 5);
|
|
1065
|
+
}
|
|
1091
1066
|
}
|
|
1092
1067
|
trackRefValue(self);
|
|
1093
1068
|
if (self.effect._dirtyLevel >= 2) {
|
|
1094
|
-
triggerRefValue(self,
|
|
1069
|
+
triggerRefValue(self, 3);
|
|
1095
1070
|
}
|
|
1096
1071
|
return self._value;
|
|
1097
1072
|
}
|
|
@@ -1133,7 +1108,7 @@ function trackRefValue(ref2) {
|
|
|
1133
1108
|
));
|
|
1134
1109
|
}
|
|
1135
1110
|
}
|
|
1136
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1111
|
+
function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) {
|
|
1137
1112
|
ref2 = toRaw(ref2);
|
|
1138
1113
|
const dep = ref2.dep;
|
|
1139
1114
|
if (dep) {
|
|
@@ -1173,9 +1148,10 @@ class RefImpl {
|
|
|
1173
1148
|
const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal);
|
|
1174
1149
|
newVal = useDirectValue ? newVal : toRaw(newVal);
|
|
1175
1150
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1151
|
+
this._rawValue;
|
|
1176
1152
|
this._rawValue = newVal;
|
|
1177
1153
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1178
|
-
triggerRefValue(this,
|
|
1154
|
+
triggerRefValue(this, 5);
|
|
1179
1155
|
}
|
|
1180
1156
|
}
|
|
1181
1157
|
}
|
|
@@ -1201,7 +1177,7 @@ function proxyRefs(objectWithRefs) {
|
|
|
1201
1177
|
/* Injected with object hook! */
|
|
1202
1178
|
|
|
1203
1179
|
/**
|
|
1204
|
-
* @vue/runtime-core v3.4.
|
|
1180
|
+
* @vue/runtime-core v3.4.30
|
|
1205
1181
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1206
1182
|
* @license MIT
|
|
1207
1183
|
**/
|
|
@@ -1217,6 +1193,7 @@ function warn$1(msg, ...args) {
|
|
|
1217
1193
|
instance,
|
|
1218
1194
|
11,
|
|
1219
1195
|
[
|
|
1196
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
1220
1197
|
msg + args.map((a) => {
|
|
1221
1198
|
var _a, _b;
|
|
1222
1199
|
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
@@ -1381,7 +1358,7 @@ function nextTick(fn) {
|
|
|
1381
1358
|
const p = currentFlushPromise || resolvedPromise;
|
|
1382
1359
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
1383
1360
|
}
|
|
1384
|
-
function findInsertionIndex(id) {
|
|
1361
|
+
function findInsertionIndex$1(id) {
|
|
1385
1362
|
let start = flushIndex + 1;
|
|
1386
1363
|
let end = queue.length;
|
|
1387
1364
|
while (start < end) {
|
|
@@ -1404,7 +1381,7 @@ function queueJob(job) {
|
|
|
1404
1381
|
if (job.id == null) {
|
|
1405
1382
|
queue.push(job);
|
|
1406
1383
|
} else {
|
|
1407
|
-
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
1384
|
+
queue.splice(findInsertionIndex$1(job.id), 0, job);
|
|
1408
1385
|
}
|
|
1409
1386
|
queueFlush();
|
|
1410
1387
|
}
|
|
@@ -1459,7 +1436,8 @@ function flushPostFlushCbs(seen) {
|
|
|
1459
1436
|
}
|
|
1460
1437
|
activePostFlushCbs = deduped;
|
|
1461
1438
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1462
|
-
activePostFlushCbs[postFlushIndex]
|
|
1439
|
+
const cb = activePostFlushCbs[postFlushIndex];
|
|
1440
|
+
if (cb.active !== false) cb();
|
|
1463
1441
|
}
|
|
1464
1442
|
activePostFlushCbs = null;
|
|
1465
1443
|
postFlushIndex = 0;
|
|
@@ -1469,10 +1447,8 @@ const getId = (job) => job.id == null ? Infinity : job.id;
|
|
|
1469
1447
|
const comparator = (a, b) => {
|
|
1470
1448
|
const diff = getId(a) - getId(b);
|
|
1471
1449
|
if (diff === 0) {
|
|
1472
|
-
if (a.pre && !b.pre)
|
|
1473
|
-
|
|
1474
|
-
if (b.pre && !a.pre)
|
|
1475
|
-
return 1;
|
|
1450
|
+
if (a.pre && !b.pre) return -1;
|
|
1451
|
+
if (b.pre && !a.pre) return 1;
|
|
1476
1452
|
}
|
|
1477
1453
|
return diff;
|
|
1478
1454
|
};
|
|
@@ -1500,8 +1476,7 @@ function flushJobs(seen) {
|
|
|
1500
1476
|
}
|
|
1501
1477
|
}
|
|
1502
1478
|
function emit(instance, event, ...rawArgs) {
|
|
1503
|
-
if (instance.isUnmounted)
|
|
1504
|
-
return;
|
|
1479
|
+
if (instance.isUnmounted) return;
|
|
1505
1480
|
const props = instance.vnode.props || EMPTY_OBJ;
|
|
1506
1481
|
let args = rawArgs;
|
|
1507
1482
|
const isModelListener2 = event.startsWith("update:");
|
|
@@ -1605,8 +1580,7 @@ function setCurrentRenderingInstance(instance) {
|
|
|
1605
1580
|
return prev;
|
|
1606
1581
|
}
|
|
1607
1582
|
function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
1608
|
-
if (!ctx)
|
|
1609
|
-
return fn;
|
|
1583
|
+
if (!ctx) return fn;
|
|
1610
1584
|
if (fn._n) {
|
|
1611
1585
|
return fn;
|
|
1612
1586
|
}
|
|
@@ -1868,817 +1842,483 @@ function queueEffectWithSuspense(fn, suspense) {
|
|
|
1868
1842
|
queuePostFlushCb(fn);
|
|
1869
1843
|
}
|
|
1870
1844
|
}
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
const
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
}
|
|
1882
|
-
function doWatch(source, cb, {
|
|
1883
|
-
immediate,
|
|
1884
|
-
deep,
|
|
1885
|
-
flush,
|
|
1886
|
-
once,
|
|
1887
|
-
onTrack,
|
|
1888
|
-
onTrigger
|
|
1889
|
-
} = EMPTY_OBJ) {
|
|
1890
|
-
if (cb && once) {
|
|
1891
|
-
const _cb = cb;
|
|
1892
|
-
cb = (...args) => {
|
|
1893
|
-
_cb(...args);
|
|
1894
|
-
unwatch();
|
|
1895
|
-
};
|
|
1896
|
-
}
|
|
1897
|
-
const instance = currentInstance;
|
|
1898
|
-
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
1899
|
-
// for deep: false, only traverse root-level properties
|
|
1900
|
-
traverse(source2, deep === false ? 1 : void 0)
|
|
1901
|
-
);
|
|
1902
|
-
let getter;
|
|
1903
|
-
let forceTrigger = false;
|
|
1904
|
-
let isMultiSource = false;
|
|
1905
|
-
if (isRef(source)) {
|
|
1906
|
-
getter = () => source.value;
|
|
1907
|
-
forceTrigger = isShallow(source);
|
|
1908
|
-
} else if (isReactive(source)) {
|
|
1909
|
-
getter = () => reactiveGetter(source);
|
|
1910
|
-
forceTrigger = true;
|
|
1911
|
-
} else if (isArray$1(source)) {
|
|
1912
|
-
isMultiSource = true;
|
|
1913
|
-
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
|
|
1914
|
-
getter = () => source.map((s) => {
|
|
1915
|
-
if (isRef(s)) {
|
|
1916
|
-
return s.value;
|
|
1917
|
-
} else if (isReactive(s)) {
|
|
1918
|
-
return reactiveGetter(s);
|
|
1919
|
-
} else if (isFunction(s)) {
|
|
1920
|
-
return callWithErrorHandling(s, instance, 2);
|
|
1921
|
-
} else ;
|
|
1845
|
+
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
1846
|
+
if (target) {
|
|
1847
|
+
const hooks = target[type] || (target[type] = []);
|
|
1848
|
+
const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
|
|
1849
|
+
pauseTracking();
|
|
1850
|
+
const reset = setCurrentInstance(target);
|
|
1851
|
+
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
1852
|
+
reset();
|
|
1853
|
+
resetTracking();
|
|
1854
|
+
return res;
|
|
1922
1855
|
});
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1856
|
+
if (prepend) {
|
|
1857
|
+
hooks.unshift(wrappedHook);
|
|
1926
1858
|
} else {
|
|
1927
|
-
|
|
1928
|
-
if (cleanup) {
|
|
1929
|
-
cleanup();
|
|
1930
|
-
}
|
|
1931
|
-
return callWithAsyncErrorHandling(
|
|
1932
|
-
source,
|
|
1933
|
-
instance,
|
|
1934
|
-
3,
|
|
1935
|
-
[onCleanup]
|
|
1936
|
-
);
|
|
1937
|
-
};
|
|
1859
|
+
hooks.push(wrappedHook);
|
|
1938
1860
|
}
|
|
1939
|
-
|
|
1940
|
-
getter = NOOP;
|
|
1861
|
+
return wrappedHook;
|
|
1941
1862
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1863
|
+
}
|
|
1864
|
+
const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
1865
|
+
if (!isInSSRComponentSetup || lifecycle === "sp") {
|
|
1866
|
+
injectHook(lifecycle, (...args) => hook(...args), target);
|
|
1945
1867
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1868
|
+
};
|
|
1869
|
+
const onBeforeMount = createHook("bm");
|
|
1870
|
+
const onMounted = createHook("m");
|
|
1871
|
+
const onBeforeUpdate = createHook("bu");
|
|
1872
|
+
const onUpdated = createHook("u");
|
|
1873
|
+
const onBeforeUnmount = createHook("bum");
|
|
1874
|
+
const onUnmounted = createHook("um");
|
|
1875
|
+
const onServerPrefetch = createHook("sp");
|
|
1876
|
+
const onRenderTriggered = createHook(
|
|
1877
|
+
"rtg"
|
|
1878
|
+
);
|
|
1879
|
+
const onRenderTracked = createHook(
|
|
1880
|
+
"rtc"
|
|
1881
|
+
);
|
|
1882
|
+
function onErrorCaptured(hook, target = currentInstance) {
|
|
1883
|
+
injectHook("ec", hook, target);
|
|
1884
|
+
}
|
|
1885
|
+
function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
1886
|
+
const bindings = vnode.dirs;
|
|
1887
|
+
const oldBindings = prevVNode && prevVNode.dirs;
|
|
1888
|
+
for (let i = 0; i < bindings.length; i++) {
|
|
1889
|
+
const binding = bindings[i];
|
|
1890
|
+
if (oldBindings) {
|
|
1891
|
+
binding.oldValue = oldBindings[i].value;
|
|
1964
1892
|
}
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1893
|
+
let hook = binding.dir[name];
|
|
1894
|
+
if (hook) {
|
|
1895
|
+
pauseTracking();
|
|
1896
|
+
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
1897
|
+
vnode.el,
|
|
1898
|
+
binding,
|
|
1899
|
+
vnode,
|
|
1900
|
+
prevVNode
|
|
1901
|
+
]);
|
|
1902
|
+
resetTracking();
|
|
1970
1903
|
}
|
|
1971
1904
|
}
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1905
|
+
}
|
|
1906
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
1907
|
+
// @__NO_SIDE_EFFECTS__
|
|
1908
|
+
function defineComponent(options, extraOptions) {
|
|
1909
|
+
return isFunction(options) ? (
|
|
1910
|
+
// #8326: extend call and options.name access are considered side-effects
|
|
1911
|
+
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
1912
|
+
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
|
|
1913
|
+
) : options;
|
|
1914
|
+
}
|
|
1915
|
+
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
1916
|
+
const getPublicInstance = (i) => {
|
|
1917
|
+
if (!i) return null;
|
|
1918
|
+
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
1919
|
+
return getPublicInstance(i.parent);
|
|
1920
|
+
};
|
|
1921
|
+
const publicPropertiesMap = (
|
|
1922
|
+
// Move PURE marker to new line to workaround compiler discarding it
|
|
1923
|
+
// due to type annotation
|
|
1924
|
+
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
|
1925
|
+
$: (i) => i,
|
|
1926
|
+
$el: (i) => i.vnode.el,
|
|
1927
|
+
$data: (i) => i.data,
|
|
1928
|
+
$props: (i) => i.props,
|
|
1929
|
+
$attrs: (i) => i.attrs,
|
|
1930
|
+
$slots: (i) => i.slots,
|
|
1931
|
+
$refs: (i) => i.refs,
|
|
1932
|
+
$parent: (i) => getPublicInstance(i.parent),
|
|
1933
|
+
$root: (i) => getPublicInstance(i.root),
|
|
1934
|
+
$emit: (i) => i.emit,
|
|
1935
|
+
$options: (i) => resolveMergedOptions(i) ,
|
|
1936
|
+
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
1937
|
+
i.effect.dirty = true;
|
|
1938
|
+
queueJob(i.update);
|
|
1939
|
+
}),
|
|
1940
|
+
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
1941
|
+
$watch: (i) => instanceWatch.bind(i)
|
|
1942
|
+
})
|
|
1943
|
+
);
|
|
1944
|
+
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
1945
|
+
const PublicInstanceProxyHandlers = {
|
|
1946
|
+
get({ _: instance }, key) {
|
|
1947
|
+
if (key === "__v_skip") {
|
|
1948
|
+
return true;
|
|
1976
1949
|
}
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1950
|
+
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
1951
|
+
let normalizedProps;
|
|
1952
|
+
if (key[0] !== "$") {
|
|
1953
|
+
const n = accessCache[key];
|
|
1954
|
+
if (n !== void 0) {
|
|
1955
|
+
switch (n) {
|
|
1956
|
+
case 1:
|
|
1957
|
+
return setupState[key];
|
|
1958
|
+
case 2:
|
|
1959
|
+
return data[key];
|
|
1960
|
+
case 4:
|
|
1961
|
+
return ctx[key];
|
|
1962
|
+
case 3:
|
|
1963
|
+
return props[key];
|
|
1982
1964
|
}
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
]
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
job.pre = true;
|
|
2003
|
-
if (instance)
|
|
2004
|
-
job.id = instance.uid;
|
|
2005
|
-
scheduler = () => queueJob(job);
|
|
2006
|
-
}
|
|
2007
|
-
const effect2 = new ReactiveEffect(getter, NOOP, scheduler);
|
|
2008
|
-
const scope = getCurrentScope();
|
|
2009
|
-
const unwatch = () => {
|
|
2010
|
-
effect2.stop();
|
|
2011
|
-
if (scope) {
|
|
2012
|
-
remove(scope.effects, effect2);
|
|
1965
|
+
} else if (hasSetupBinding(setupState, key)) {
|
|
1966
|
+
accessCache[key] = 1;
|
|
1967
|
+
return setupState[key];
|
|
1968
|
+
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
1969
|
+
accessCache[key] = 2;
|
|
1970
|
+
return data[key];
|
|
1971
|
+
} else if (
|
|
1972
|
+
// only cache other properties when instance has declared (thus stable)
|
|
1973
|
+
// props
|
|
1974
|
+
(normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
|
|
1975
|
+
) {
|
|
1976
|
+
accessCache[key] = 3;
|
|
1977
|
+
return props[key];
|
|
1978
|
+
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
1979
|
+
accessCache[key] = 4;
|
|
1980
|
+
return ctx[key];
|
|
1981
|
+
} else if (shouldCacheAccess) {
|
|
1982
|
+
accessCache[key] = 0;
|
|
1983
|
+
}
|
|
2013
1984
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
if (
|
|
2017
|
-
|
|
1985
|
+
const publicGetter = publicPropertiesMap[key];
|
|
1986
|
+
let cssModule, globalProperties;
|
|
1987
|
+
if (publicGetter) {
|
|
1988
|
+
if (key === "$attrs") {
|
|
1989
|
+
track(instance.attrs, "get", "");
|
|
1990
|
+
}
|
|
1991
|
+
return publicGetter(instance);
|
|
1992
|
+
} else if (
|
|
1993
|
+
// css module (injected by vue-loader)
|
|
1994
|
+
(cssModule = type.__cssModules) && (cssModule = cssModule[key])
|
|
1995
|
+
) {
|
|
1996
|
+
return cssModule;
|
|
1997
|
+
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
1998
|
+
accessCache[key] = 4;
|
|
1999
|
+
return ctx[key];
|
|
2000
|
+
} else if (
|
|
2001
|
+
// global properties
|
|
2002
|
+
globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
|
|
2003
|
+
) {
|
|
2004
|
+
{
|
|
2005
|
+
return globalProperties[key];
|
|
2006
|
+
}
|
|
2007
|
+
} else ;
|
|
2008
|
+
},
|
|
2009
|
+
set({ _: instance }, key, value) {
|
|
2010
|
+
const { data, setupState, ctx } = instance;
|
|
2011
|
+
if (hasSetupBinding(setupState, key)) {
|
|
2012
|
+
setupState[key] = value;
|
|
2013
|
+
return true;
|
|
2014
|
+
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
2015
|
+
data[key] = value;
|
|
2016
|
+
return true;
|
|
2017
|
+
} else if (hasOwn(instance.props, key)) {
|
|
2018
|
+
return false;
|
|
2019
|
+
}
|
|
2020
|
+
if (key[0] === "$" && key.slice(1) in instance) {
|
|
2021
|
+
return false;
|
|
2018
2022
|
} else {
|
|
2019
|
-
|
|
2023
|
+
{
|
|
2024
|
+
ctx[key] = value;
|
|
2025
|
+
}
|
|
2020
2026
|
}
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
}
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2034
|
-
const publicThis = this.proxy;
|
|
2035
|
-
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
2036
|
-
let cb;
|
|
2037
|
-
if (isFunction(value)) {
|
|
2038
|
-
cb = value;
|
|
2039
|
-
} else {
|
|
2040
|
-
cb = value.handler;
|
|
2041
|
-
options = value;
|
|
2042
|
-
}
|
|
2043
|
-
const reset = setCurrentInstance(this);
|
|
2044
|
-
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
2045
|
-
reset();
|
|
2046
|
-
return res;
|
|
2047
|
-
}
|
|
2048
|
-
function createPathGetter(ctx, path) {
|
|
2049
|
-
const segments = path.split(".");
|
|
2050
|
-
return () => {
|
|
2051
|
-
let cur = ctx;
|
|
2052
|
-
for (let i = 0; i < segments.length && cur; i++) {
|
|
2053
|
-
cur = cur[segments[i]];
|
|
2027
|
+
return true;
|
|
2028
|
+
},
|
|
2029
|
+
has({
|
|
2030
|
+
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
2031
|
+
}, key) {
|
|
2032
|
+
let normalizedProps;
|
|
2033
|
+
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
2034
|
+
},
|
|
2035
|
+
defineProperty(target, key, descriptor) {
|
|
2036
|
+
if (descriptor.get != null) {
|
|
2037
|
+
target._.accessCache[key] = 0;
|
|
2038
|
+
} else if (hasOwn(descriptor, "value")) {
|
|
2039
|
+
this.set(target, key, descriptor.value, null);
|
|
2054
2040
|
}
|
|
2055
|
-
return
|
|
2056
|
-
}
|
|
2041
|
+
return Reflect.defineProperty(target, key, descriptor);
|
|
2042
|
+
}
|
|
2043
|
+
};
|
|
2044
|
+
function normalizePropsOrEmits(props) {
|
|
2045
|
+
return isArray$1(props) ? props.reduce(
|
|
2046
|
+
(normalized, p) => (normalized[p] = null, normalized),
|
|
2047
|
+
{}
|
|
2048
|
+
) : props;
|
|
2057
2049
|
}
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2050
|
+
let shouldCacheAccess = true;
|
|
2051
|
+
function applyOptions(instance) {
|
|
2052
|
+
const options = resolveMergedOptions(instance);
|
|
2053
|
+
const publicThis = instance.proxy;
|
|
2054
|
+
const ctx = instance.ctx;
|
|
2055
|
+
shouldCacheAccess = false;
|
|
2056
|
+
if (options.beforeCreate) {
|
|
2057
|
+
callHook(options.beforeCreate, instance, "bc");
|
|
2061
2058
|
}
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2059
|
+
const {
|
|
2060
|
+
// state
|
|
2061
|
+
data: dataOptions,
|
|
2062
|
+
computed: computedOptions,
|
|
2063
|
+
methods,
|
|
2064
|
+
watch: watchOptions,
|
|
2065
|
+
provide: provideOptions,
|
|
2066
|
+
inject: injectOptions,
|
|
2067
|
+
// lifecycle
|
|
2068
|
+
created,
|
|
2069
|
+
beforeMount,
|
|
2070
|
+
mounted,
|
|
2071
|
+
beforeUpdate,
|
|
2072
|
+
updated,
|
|
2073
|
+
activated,
|
|
2074
|
+
deactivated,
|
|
2075
|
+
beforeDestroy,
|
|
2076
|
+
beforeUnmount,
|
|
2077
|
+
destroyed,
|
|
2078
|
+
unmounted,
|
|
2079
|
+
render,
|
|
2080
|
+
renderTracked,
|
|
2081
|
+
renderTriggered,
|
|
2082
|
+
errorCaptured,
|
|
2083
|
+
serverPrefetch,
|
|
2084
|
+
// public API
|
|
2085
|
+
expose,
|
|
2086
|
+
inheritAttrs,
|
|
2087
|
+
// assets
|
|
2088
|
+
components,
|
|
2089
|
+
directives,
|
|
2090
|
+
filters
|
|
2091
|
+
} = options;
|
|
2092
|
+
const checkDuplicateProperties = null;
|
|
2093
|
+
if (injectOptions) {
|
|
2094
|
+
resolveInjections(injectOptions, ctx, checkDuplicateProperties);
|
|
2065
2095
|
}
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2096
|
+
if (methods) {
|
|
2097
|
+
for (const key in methods) {
|
|
2098
|
+
const methodHandler = methods[key];
|
|
2099
|
+
if (isFunction(methodHandler)) {
|
|
2100
|
+
{
|
|
2101
|
+
ctx[key] = methodHandler.bind(publicThis);
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2073
2104
|
}
|
|
2074
|
-
}
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
for (const key in value) {
|
|
2080
|
-
traverse(value[key], depth, seen);
|
|
2105
|
+
}
|
|
2106
|
+
if (dataOptions) {
|
|
2107
|
+
const data = dataOptions.call(publicThis, publicThis);
|
|
2108
|
+
if (!isObject(data)) ; else {
|
|
2109
|
+
instance.data = reactive(data);
|
|
2081
2110
|
}
|
|
2082
2111
|
}
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2112
|
+
shouldCacheAccess = true;
|
|
2113
|
+
if (computedOptions) {
|
|
2114
|
+
for (const key in computedOptions) {
|
|
2115
|
+
const opt = computedOptions[key];
|
|
2116
|
+
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
2117
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
|
|
2118
|
+
const c = computed({
|
|
2119
|
+
get,
|
|
2120
|
+
set
|
|
2121
|
+
});
|
|
2122
|
+
Object.defineProperty(ctx, key, {
|
|
2123
|
+
enumerable: true,
|
|
2124
|
+
configurable: true,
|
|
2125
|
+
get: () => c.value,
|
|
2126
|
+
set: (v) => c.value = v
|
|
2127
|
+
});
|
|
2092
2128
|
}
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
vnode.el,
|
|
2098
|
-
binding,
|
|
2099
|
-
vnode,
|
|
2100
|
-
prevVNode
|
|
2101
|
-
]);
|
|
2102
|
-
resetTracking();
|
|
2129
|
+
}
|
|
2130
|
+
if (watchOptions) {
|
|
2131
|
+
for (const key in watchOptions) {
|
|
2132
|
+
createWatcher(watchOptions[key], ctx, publicThis, key);
|
|
2103
2133
|
}
|
|
2104
2134
|
}
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
}
|
|
2120
|
-
function onDeactivated(hook, target) {
|
|
2121
|
-
registerKeepAliveHook(hook, "da", target);
|
|
2122
|
-
}
|
|
2123
|
-
function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
2124
|
-
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
2125
|
-
let current = target;
|
|
2126
|
-
while (current) {
|
|
2127
|
-
if (current.isDeactivated) {
|
|
2128
|
-
return;
|
|
2129
|
-
}
|
|
2130
|
-
current = current.parent;
|
|
2135
|
+
if (provideOptions) {
|
|
2136
|
+
const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
|
|
2137
|
+
Reflect.ownKeys(provides).forEach((key) => {
|
|
2138
|
+
provide(key, provides[key]);
|
|
2139
|
+
});
|
|
2140
|
+
}
|
|
2141
|
+
if (created) {
|
|
2142
|
+
callHook(created, instance, "c");
|
|
2143
|
+
}
|
|
2144
|
+
function registerLifecycleHook(register, hook) {
|
|
2145
|
+
if (isArray$1(hook)) {
|
|
2146
|
+
hook.forEach((_hook) => register(_hook.bind(publicThis)));
|
|
2147
|
+
} else if (hook) {
|
|
2148
|
+
register(hook.bind(publicThis));
|
|
2131
2149
|
}
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2150
|
+
}
|
|
2151
|
+
registerLifecycleHook(onBeforeMount, beforeMount);
|
|
2152
|
+
registerLifecycleHook(onMounted, mounted);
|
|
2153
|
+
registerLifecycleHook(onBeforeUpdate, beforeUpdate);
|
|
2154
|
+
registerLifecycleHook(onUpdated, updated);
|
|
2155
|
+
registerLifecycleHook(onActivated, activated);
|
|
2156
|
+
registerLifecycleHook(onDeactivated, deactivated);
|
|
2157
|
+
registerLifecycleHook(onErrorCaptured, errorCaptured);
|
|
2158
|
+
registerLifecycleHook(onRenderTracked, renderTracked);
|
|
2159
|
+
registerLifecycleHook(onRenderTriggered, renderTriggered);
|
|
2160
|
+
registerLifecycleHook(onBeforeUnmount, beforeUnmount);
|
|
2161
|
+
registerLifecycleHook(onUnmounted, unmounted);
|
|
2162
|
+
registerLifecycleHook(onServerPrefetch, serverPrefetch);
|
|
2163
|
+
if (isArray$1(expose)) {
|
|
2164
|
+
if (expose.length) {
|
|
2165
|
+
const exposed = instance.exposed || (instance.exposed = {});
|
|
2166
|
+
expose.forEach((key) => {
|
|
2167
|
+
Object.defineProperty(exposed, key, {
|
|
2168
|
+
get: () => publicThis[key],
|
|
2169
|
+
set: (val) => publicThis[key] = val
|
|
2170
|
+
});
|
|
2171
|
+
});
|
|
2172
|
+
} else if (!instance.exposed) {
|
|
2173
|
+
instance.exposed = {};
|
|
2142
2174
|
}
|
|
2143
2175
|
}
|
|
2176
|
+
if (render && instance.render === NOOP) {
|
|
2177
|
+
instance.render = render;
|
|
2178
|
+
}
|
|
2179
|
+
if (inheritAttrs != null) {
|
|
2180
|
+
instance.inheritAttrs = inheritAttrs;
|
|
2181
|
+
}
|
|
2182
|
+
if (components) instance.components = components;
|
|
2183
|
+
if (directives) instance.directives = directives;
|
|
2144
2184
|
}
|
|
2145
|
-
function
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
if (target.isUnmounted) {
|
|
2162
|
-
return;
|
|
2185
|
+
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
|
|
2186
|
+
if (isArray$1(injectOptions)) {
|
|
2187
|
+
injectOptions = normalizeInject(injectOptions);
|
|
2188
|
+
}
|
|
2189
|
+
for (const key in injectOptions) {
|
|
2190
|
+
const opt = injectOptions[key];
|
|
2191
|
+
let injected;
|
|
2192
|
+
if (isObject(opt)) {
|
|
2193
|
+
if ("default" in opt) {
|
|
2194
|
+
injected = inject(
|
|
2195
|
+
opt.from || key,
|
|
2196
|
+
opt.default,
|
|
2197
|
+
true
|
|
2198
|
+
);
|
|
2199
|
+
} else {
|
|
2200
|
+
injected = inject(opt.from || key);
|
|
2163
2201
|
}
|
|
2164
|
-
pauseTracking();
|
|
2165
|
-
const reset = setCurrentInstance(target);
|
|
2166
|
-
const res = callWithAsyncErrorHandling(hook, target, type, args);
|
|
2167
|
-
reset();
|
|
2168
|
-
resetTracking();
|
|
2169
|
-
return res;
|
|
2170
|
-
});
|
|
2171
|
-
if (prepend) {
|
|
2172
|
-
hooks.unshift(wrappedHook);
|
|
2173
2202
|
} else {
|
|
2174
|
-
|
|
2203
|
+
injected = inject(opt);
|
|
2204
|
+
}
|
|
2205
|
+
if (isRef(injected)) {
|
|
2206
|
+
Object.defineProperty(ctx, key, {
|
|
2207
|
+
enumerable: true,
|
|
2208
|
+
configurable: true,
|
|
2209
|
+
get: () => injected.value,
|
|
2210
|
+
set: (v) => injected.value = v
|
|
2211
|
+
});
|
|
2212
|
+
} else {
|
|
2213
|
+
ctx[key] = injected;
|
|
2175
2214
|
}
|
|
2176
|
-
return wrappedHook;
|
|
2177
2215
|
}
|
|
2178
2216
|
}
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
const onBeforeUpdate = createHook("bu");
|
|
2186
|
-
const onUpdated = createHook("u");
|
|
2187
|
-
const onBeforeUnmount = createHook("bum");
|
|
2188
|
-
const onUnmounted = createHook("um");
|
|
2189
|
-
const onServerPrefetch = createHook("sp");
|
|
2190
|
-
const onRenderTriggered = createHook(
|
|
2191
|
-
"rtg"
|
|
2192
|
-
);
|
|
2193
|
-
const onRenderTracked = createHook(
|
|
2194
|
-
"rtc"
|
|
2195
|
-
);
|
|
2196
|
-
function onErrorCaptured(hook, target = currentInstance) {
|
|
2197
|
-
injectHook("ec", hook, target);
|
|
2217
|
+
function callHook(hook, instance, type) {
|
|
2218
|
+
callWithAsyncErrorHandling(
|
|
2219
|
+
isArray$1(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
|
|
2220
|
+
instance,
|
|
2221
|
+
type
|
|
2222
|
+
);
|
|
2198
2223
|
}
|
|
2199
|
-
function
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
}
|
|
2212
|
-
} else if (isObject(source)) {
|
|
2213
|
-
if (source[Symbol.iterator]) {
|
|
2214
|
-
ret = Array.from(
|
|
2215
|
-
source,
|
|
2216
|
-
(item, i) => renderItem(item, i, void 0, cached )
|
|
2217
|
-
);
|
|
2224
|
+
function createWatcher(raw, ctx, publicThis, key) {
|
|
2225
|
+
const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
2226
|
+
if (isString(raw)) {
|
|
2227
|
+
const handler = ctx[raw];
|
|
2228
|
+
if (isFunction(handler)) {
|
|
2229
|
+
watch(getter, handler);
|
|
2230
|
+
}
|
|
2231
|
+
} else if (isFunction(raw)) {
|
|
2232
|
+
watch(getter, raw.bind(publicThis));
|
|
2233
|
+
} else if (isObject(raw)) {
|
|
2234
|
+
if (isArray$1(raw)) {
|
|
2235
|
+
raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
2218
2236
|
} else {
|
|
2219
|
-
const
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
const key = keys[i];
|
|
2223
|
-
ret[i] = renderItem(source[key], key, i, cached );
|
|
2237
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
2238
|
+
if (isFunction(handler)) {
|
|
2239
|
+
watch(getter, handler, raw);
|
|
2224
2240
|
}
|
|
2225
2241
|
}
|
|
2242
|
+
} else ;
|
|
2243
|
+
}
|
|
2244
|
+
function resolveMergedOptions(instance) {
|
|
2245
|
+
const base = instance.type;
|
|
2246
|
+
const { mixins, extends: extendsOptions } = base;
|
|
2247
|
+
const {
|
|
2248
|
+
mixins: globalMixins,
|
|
2249
|
+
optionsCache: cache,
|
|
2250
|
+
config: { optionMergeStrategies }
|
|
2251
|
+
} = instance.appContext;
|
|
2252
|
+
const cached = cache.get(base);
|
|
2253
|
+
let resolved;
|
|
2254
|
+
if (cached) {
|
|
2255
|
+
resolved = cached;
|
|
2256
|
+
} else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
2257
|
+
{
|
|
2258
|
+
resolved = base;
|
|
2259
|
+
}
|
|
2226
2260
|
} else {
|
|
2227
|
-
|
|
2261
|
+
resolved = {};
|
|
2262
|
+
if (globalMixins.length) {
|
|
2263
|
+
globalMixins.forEach(
|
|
2264
|
+
(m) => mergeOptions$1(resolved, m, optionMergeStrategies, true)
|
|
2265
|
+
);
|
|
2266
|
+
}
|
|
2267
|
+
mergeOptions$1(resolved, base, optionMergeStrategies);
|
|
2228
2268
|
}
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
2232
|
-
if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
|
|
2233
|
-
if (name !== "default")
|
|
2234
|
-
props.name = name;
|
|
2235
|
-
return createVNode("slot", props, fallback );
|
|
2269
|
+
if (isObject(base)) {
|
|
2270
|
+
cache.set(base, resolved);
|
|
2236
2271
|
}
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2272
|
+
return resolved;
|
|
2273
|
+
}
|
|
2274
|
+
function mergeOptions$1(to, from, strats, asMixin = false) {
|
|
2275
|
+
const { mixins, extends: extendsOptions } = from;
|
|
2276
|
+
if (extendsOptions) {
|
|
2277
|
+
mergeOptions$1(to, extendsOptions, strats, true);
|
|
2240
2278
|
}
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
{
|
|
2246
|
-
key: props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
2247
|
-
// key attached in the `createSlots` helper, respect that
|
|
2248
|
-
validSlotContent && validSlotContent.key || `_${name}`
|
|
2249
|
-
},
|
|
2250
|
-
validSlotContent || ([]),
|
|
2251
|
-
validSlotContent && slots._ === 1 ? 64 : -2
|
|
2252
|
-
);
|
|
2253
|
-
if (rendered.scopeId) {
|
|
2254
|
-
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
2279
|
+
if (mixins) {
|
|
2280
|
+
mixins.forEach(
|
|
2281
|
+
(m) => mergeOptions$1(to, m, strats, true)
|
|
2282
|
+
);
|
|
2255
2283
|
}
|
|
2256
|
-
|
|
2257
|
-
|
|
2284
|
+
for (const key in from) {
|
|
2285
|
+
if (asMixin && key === "expose") ; else {
|
|
2286
|
+
const strat = internalOptionMergeStrats[key] || strats && strats[key];
|
|
2287
|
+
to[key] = strat ? strat(to[key], from[key]) : from[key];
|
|
2288
|
+
}
|
|
2258
2289
|
}
|
|
2259
|
-
return
|
|
2260
|
-
}
|
|
2261
|
-
function ensureValidVNode(vnodes) {
|
|
2262
|
-
return vnodes.some((child) => {
|
|
2263
|
-
if (!isVNode(child))
|
|
2264
|
-
return true;
|
|
2265
|
-
if (child.type === Comment)
|
|
2266
|
-
return false;
|
|
2267
|
-
if (child.type === Fragment && !ensureValidVNode(child.children))
|
|
2268
|
-
return false;
|
|
2269
|
-
return true;
|
|
2270
|
-
}) ? vnodes : null;
|
|
2290
|
+
return to;
|
|
2271
2291
|
}
|
|
2272
|
-
const
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
2303
|
-
const PublicInstanceProxyHandlers = {
|
|
2304
|
-
get({ _: instance }, key) {
|
|
2305
|
-
if (key === "__v_skip") {
|
|
2306
|
-
return true;
|
|
2307
|
-
}
|
|
2308
|
-
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
2309
|
-
let normalizedProps;
|
|
2310
|
-
if (key[0] !== "$") {
|
|
2311
|
-
const n = accessCache[key];
|
|
2312
|
-
if (n !== void 0) {
|
|
2313
|
-
switch (n) {
|
|
2314
|
-
case 1:
|
|
2315
|
-
return setupState[key];
|
|
2316
|
-
case 2:
|
|
2317
|
-
return data[key];
|
|
2318
|
-
case 4:
|
|
2319
|
-
return ctx[key];
|
|
2320
|
-
case 3:
|
|
2321
|
-
return props[key];
|
|
2322
|
-
}
|
|
2323
|
-
} else if (hasSetupBinding(setupState, key)) {
|
|
2324
|
-
accessCache[key] = 1;
|
|
2325
|
-
return setupState[key];
|
|
2326
|
-
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
2327
|
-
accessCache[key] = 2;
|
|
2328
|
-
return data[key];
|
|
2329
|
-
} else if (
|
|
2330
|
-
// only cache other properties when instance has declared (thus stable)
|
|
2331
|
-
// props
|
|
2332
|
-
(normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)
|
|
2333
|
-
) {
|
|
2334
|
-
accessCache[key] = 3;
|
|
2335
|
-
return props[key];
|
|
2336
|
-
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
2337
|
-
accessCache[key] = 4;
|
|
2338
|
-
return ctx[key];
|
|
2339
|
-
} else if (shouldCacheAccess) {
|
|
2340
|
-
accessCache[key] = 0;
|
|
2341
|
-
}
|
|
2342
|
-
}
|
|
2343
|
-
const publicGetter = publicPropertiesMap[key];
|
|
2344
|
-
let cssModule, globalProperties;
|
|
2345
|
-
if (publicGetter) {
|
|
2346
|
-
if (key === "$attrs") {
|
|
2347
|
-
track(instance.attrs, "get", "");
|
|
2348
|
-
}
|
|
2349
|
-
return publicGetter(instance);
|
|
2350
|
-
} else if (
|
|
2351
|
-
// css module (injected by vue-loader)
|
|
2352
|
-
(cssModule = type.__cssModules) && (cssModule = cssModule[key])
|
|
2353
|
-
) {
|
|
2354
|
-
return cssModule;
|
|
2355
|
-
} else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
|
|
2356
|
-
accessCache[key] = 4;
|
|
2357
|
-
return ctx[key];
|
|
2358
|
-
} else if (
|
|
2359
|
-
// global properties
|
|
2360
|
-
globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)
|
|
2361
|
-
) {
|
|
2362
|
-
{
|
|
2363
|
-
return globalProperties[key];
|
|
2364
|
-
}
|
|
2365
|
-
} else ;
|
|
2366
|
-
},
|
|
2367
|
-
set({ _: instance }, key, value) {
|
|
2368
|
-
const { data, setupState, ctx } = instance;
|
|
2369
|
-
if (hasSetupBinding(setupState, key)) {
|
|
2370
|
-
setupState[key] = value;
|
|
2371
|
-
return true;
|
|
2372
|
-
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
2373
|
-
data[key] = value;
|
|
2374
|
-
return true;
|
|
2375
|
-
} else if (hasOwn(instance.props, key)) {
|
|
2376
|
-
return false;
|
|
2377
|
-
}
|
|
2378
|
-
if (key[0] === "$" && key.slice(1) in instance) {
|
|
2379
|
-
return false;
|
|
2380
|
-
} else {
|
|
2381
|
-
{
|
|
2382
|
-
ctx[key] = value;
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
return true;
|
|
2386
|
-
},
|
|
2387
|
-
has({
|
|
2388
|
-
_: { data, setupState, accessCache, ctx, appContext, propsOptions }
|
|
2389
|
-
}, key) {
|
|
2390
|
-
let normalizedProps;
|
|
2391
|
-
return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
|
|
2392
|
-
},
|
|
2393
|
-
defineProperty(target, key, descriptor) {
|
|
2394
|
-
if (descriptor.get != null) {
|
|
2395
|
-
target._.accessCache[key] = 0;
|
|
2396
|
-
} else if (hasOwn(descriptor, "value")) {
|
|
2397
|
-
this.set(target, key, descriptor.value, null);
|
|
2398
|
-
}
|
|
2399
|
-
return Reflect.defineProperty(target, key, descriptor);
|
|
2400
|
-
}
|
|
2401
|
-
};
|
|
2402
|
-
function normalizePropsOrEmits(props) {
|
|
2403
|
-
return isArray$1(props) ? props.reduce(
|
|
2404
|
-
(normalized, p) => (normalized[p] = null, normalized),
|
|
2405
|
-
{}
|
|
2406
|
-
) : props;
|
|
2407
|
-
}
|
|
2408
|
-
let shouldCacheAccess = true;
|
|
2409
|
-
function applyOptions(instance) {
|
|
2410
|
-
const options = resolveMergedOptions(instance);
|
|
2411
|
-
const publicThis = instance.proxy;
|
|
2412
|
-
const ctx = instance.ctx;
|
|
2413
|
-
shouldCacheAccess = false;
|
|
2414
|
-
if (options.beforeCreate) {
|
|
2415
|
-
callHook(options.beforeCreate, instance, "bc");
|
|
2416
|
-
}
|
|
2417
|
-
const {
|
|
2418
|
-
// state
|
|
2419
|
-
data: dataOptions,
|
|
2420
|
-
computed: computedOptions,
|
|
2421
|
-
methods,
|
|
2422
|
-
watch: watchOptions,
|
|
2423
|
-
provide: provideOptions,
|
|
2424
|
-
inject: injectOptions,
|
|
2425
|
-
// lifecycle
|
|
2426
|
-
created,
|
|
2427
|
-
beforeMount,
|
|
2428
|
-
mounted,
|
|
2429
|
-
beforeUpdate,
|
|
2430
|
-
updated,
|
|
2431
|
-
activated,
|
|
2432
|
-
deactivated,
|
|
2433
|
-
beforeDestroy,
|
|
2434
|
-
beforeUnmount,
|
|
2435
|
-
destroyed,
|
|
2436
|
-
unmounted,
|
|
2437
|
-
render,
|
|
2438
|
-
renderTracked,
|
|
2439
|
-
renderTriggered,
|
|
2440
|
-
errorCaptured,
|
|
2441
|
-
serverPrefetch,
|
|
2442
|
-
// public API
|
|
2443
|
-
expose,
|
|
2444
|
-
inheritAttrs,
|
|
2445
|
-
// assets
|
|
2446
|
-
components,
|
|
2447
|
-
directives,
|
|
2448
|
-
filters
|
|
2449
|
-
} = options;
|
|
2450
|
-
const checkDuplicateProperties = null;
|
|
2451
|
-
if (injectOptions) {
|
|
2452
|
-
resolveInjections(injectOptions, ctx, checkDuplicateProperties);
|
|
2453
|
-
}
|
|
2454
|
-
if (methods) {
|
|
2455
|
-
for (const key in methods) {
|
|
2456
|
-
const methodHandler = methods[key];
|
|
2457
|
-
if (isFunction(methodHandler)) {
|
|
2458
|
-
{
|
|
2459
|
-
ctx[key] = methodHandler.bind(publicThis);
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
if (dataOptions) {
|
|
2465
|
-
const data = dataOptions.call(publicThis, publicThis);
|
|
2466
|
-
if (!isObject(data)) ; else {
|
|
2467
|
-
instance.data = reactive(data);
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
shouldCacheAccess = true;
|
|
2471
|
-
if (computedOptions) {
|
|
2472
|
-
for (const key in computedOptions) {
|
|
2473
|
-
const opt = computedOptions[key];
|
|
2474
|
-
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
2475
|
-
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : NOOP;
|
|
2476
|
-
const c = computed({
|
|
2477
|
-
get,
|
|
2478
|
-
set
|
|
2479
|
-
});
|
|
2480
|
-
Object.defineProperty(ctx, key, {
|
|
2481
|
-
enumerable: true,
|
|
2482
|
-
configurable: true,
|
|
2483
|
-
get: () => c.value,
|
|
2484
|
-
set: (v) => c.value = v
|
|
2485
|
-
});
|
|
2486
|
-
}
|
|
2487
|
-
}
|
|
2488
|
-
if (watchOptions) {
|
|
2489
|
-
for (const key in watchOptions) {
|
|
2490
|
-
createWatcher(watchOptions[key], ctx, publicThis, key);
|
|
2491
|
-
}
|
|
2492
|
-
}
|
|
2493
|
-
if (provideOptions) {
|
|
2494
|
-
const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;
|
|
2495
|
-
Reflect.ownKeys(provides).forEach((key) => {
|
|
2496
|
-
provide(key, provides[key]);
|
|
2497
|
-
});
|
|
2498
|
-
}
|
|
2499
|
-
if (created) {
|
|
2500
|
-
callHook(created, instance, "c");
|
|
2501
|
-
}
|
|
2502
|
-
function registerLifecycleHook(register, hook) {
|
|
2503
|
-
if (isArray$1(hook)) {
|
|
2504
|
-
hook.forEach((_hook) => register(_hook.bind(publicThis)));
|
|
2505
|
-
} else if (hook) {
|
|
2506
|
-
register(hook.bind(publicThis));
|
|
2507
|
-
}
|
|
2508
|
-
}
|
|
2509
|
-
registerLifecycleHook(onBeforeMount, beforeMount);
|
|
2510
|
-
registerLifecycleHook(onMounted, mounted);
|
|
2511
|
-
registerLifecycleHook(onBeforeUpdate, beforeUpdate);
|
|
2512
|
-
registerLifecycleHook(onUpdated, updated);
|
|
2513
|
-
registerLifecycleHook(onActivated, activated);
|
|
2514
|
-
registerLifecycleHook(onDeactivated, deactivated);
|
|
2515
|
-
registerLifecycleHook(onErrorCaptured, errorCaptured);
|
|
2516
|
-
registerLifecycleHook(onRenderTracked, renderTracked);
|
|
2517
|
-
registerLifecycleHook(onRenderTriggered, renderTriggered);
|
|
2518
|
-
registerLifecycleHook(onBeforeUnmount, beforeUnmount);
|
|
2519
|
-
registerLifecycleHook(onUnmounted, unmounted);
|
|
2520
|
-
registerLifecycleHook(onServerPrefetch, serverPrefetch);
|
|
2521
|
-
if (isArray$1(expose)) {
|
|
2522
|
-
if (expose.length) {
|
|
2523
|
-
const exposed = instance.exposed || (instance.exposed = {});
|
|
2524
|
-
expose.forEach((key) => {
|
|
2525
|
-
Object.defineProperty(exposed, key, {
|
|
2526
|
-
get: () => publicThis[key],
|
|
2527
|
-
set: (val) => publicThis[key] = val
|
|
2528
|
-
});
|
|
2529
|
-
});
|
|
2530
|
-
} else if (!instance.exposed) {
|
|
2531
|
-
instance.exposed = {};
|
|
2532
|
-
}
|
|
2533
|
-
}
|
|
2534
|
-
if (render && instance.render === NOOP) {
|
|
2535
|
-
instance.render = render;
|
|
2536
|
-
}
|
|
2537
|
-
if (inheritAttrs != null) {
|
|
2538
|
-
instance.inheritAttrs = inheritAttrs;
|
|
2539
|
-
}
|
|
2540
|
-
if (components)
|
|
2541
|
-
instance.components = components;
|
|
2542
|
-
if (directives)
|
|
2543
|
-
instance.directives = directives;
|
|
2544
|
-
}
|
|
2545
|
-
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
|
|
2546
|
-
if (isArray$1(injectOptions)) {
|
|
2547
|
-
injectOptions = normalizeInject(injectOptions);
|
|
2548
|
-
}
|
|
2549
|
-
for (const key in injectOptions) {
|
|
2550
|
-
const opt = injectOptions[key];
|
|
2551
|
-
let injected;
|
|
2552
|
-
if (isObject(opt)) {
|
|
2553
|
-
if ("default" in opt) {
|
|
2554
|
-
injected = inject(
|
|
2555
|
-
opt.from || key,
|
|
2556
|
-
opt.default,
|
|
2557
|
-
true
|
|
2558
|
-
);
|
|
2559
|
-
} else {
|
|
2560
|
-
injected = inject(opt.from || key);
|
|
2561
|
-
}
|
|
2562
|
-
} else {
|
|
2563
|
-
injected = inject(opt);
|
|
2564
|
-
}
|
|
2565
|
-
if (isRef(injected)) {
|
|
2566
|
-
Object.defineProperty(ctx, key, {
|
|
2567
|
-
enumerable: true,
|
|
2568
|
-
configurable: true,
|
|
2569
|
-
get: () => injected.value,
|
|
2570
|
-
set: (v) => injected.value = v
|
|
2571
|
-
});
|
|
2572
|
-
} else {
|
|
2573
|
-
ctx[key] = injected;
|
|
2574
|
-
}
|
|
2575
|
-
}
|
|
2576
|
-
}
|
|
2577
|
-
function callHook(hook, instance, type) {
|
|
2578
|
-
callWithAsyncErrorHandling(
|
|
2579
|
-
isArray$1(hook) ? hook.map((h2) => h2.bind(instance.proxy)) : hook.bind(instance.proxy),
|
|
2580
|
-
instance,
|
|
2581
|
-
type
|
|
2582
|
-
);
|
|
2583
|
-
}
|
|
2584
|
-
function createWatcher(raw, ctx, publicThis, key) {
|
|
2585
|
-
const getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
2586
|
-
if (isString(raw)) {
|
|
2587
|
-
const handler = ctx[raw];
|
|
2588
|
-
if (isFunction(handler)) {
|
|
2589
|
-
watch(getter, handler);
|
|
2590
|
-
}
|
|
2591
|
-
} else if (isFunction(raw)) {
|
|
2592
|
-
watch(getter, raw.bind(publicThis));
|
|
2593
|
-
} else if (isObject(raw)) {
|
|
2594
|
-
if (isArray$1(raw)) {
|
|
2595
|
-
raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
2596
|
-
} else {
|
|
2597
|
-
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
2598
|
-
if (isFunction(handler)) {
|
|
2599
|
-
watch(getter, handler, raw);
|
|
2600
|
-
}
|
|
2601
|
-
}
|
|
2602
|
-
} else ;
|
|
2603
|
-
}
|
|
2604
|
-
function resolveMergedOptions(instance) {
|
|
2605
|
-
const base = instance.type;
|
|
2606
|
-
const { mixins, extends: extendsOptions } = base;
|
|
2607
|
-
const {
|
|
2608
|
-
mixins: globalMixins,
|
|
2609
|
-
optionsCache: cache,
|
|
2610
|
-
config: { optionMergeStrategies }
|
|
2611
|
-
} = instance.appContext;
|
|
2612
|
-
const cached = cache.get(base);
|
|
2613
|
-
let resolved;
|
|
2614
|
-
if (cached) {
|
|
2615
|
-
resolved = cached;
|
|
2616
|
-
} else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
2617
|
-
{
|
|
2618
|
-
resolved = base;
|
|
2619
|
-
}
|
|
2620
|
-
} else {
|
|
2621
|
-
resolved = {};
|
|
2622
|
-
if (globalMixins.length) {
|
|
2623
|
-
globalMixins.forEach(
|
|
2624
|
-
(m) => mergeOptions$1(resolved, m, optionMergeStrategies, true)
|
|
2625
|
-
);
|
|
2626
|
-
}
|
|
2627
|
-
mergeOptions$1(resolved, base, optionMergeStrategies);
|
|
2628
|
-
}
|
|
2629
|
-
if (isObject(base)) {
|
|
2630
|
-
cache.set(base, resolved);
|
|
2631
|
-
}
|
|
2632
|
-
return resolved;
|
|
2633
|
-
}
|
|
2634
|
-
function mergeOptions$1(to, from, strats, asMixin = false) {
|
|
2635
|
-
const { mixins, extends: extendsOptions } = from;
|
|
2636
|
-
if (extendsOptions) {
|
|
2637
|
-
mergeOptions$1(to, extendsOptions, strats, true);
|
|
2638
|
-
}
|
|
2639
|
-
if (mixins) {
|
|
2640
|
-
mixins.forEach(
|
|
2641
|
-
(m) => mergeOptions$1(to, m, strats, true)
|
|
2642
|
-
);
|
|
2643
|
-
}
|
|
2644
|
-
for (const key in from) {
|
|
2645
|
-
if (asMixin && key === "expose") ; else {
|
|
2646
|
-
const strat = internalOptionMergeStrats[key] || strats && strats[key];
|
|
2647
|
-
to[key] = strat ? strat(to[key], from[key]) : from[key];
|
|
2648
|
-
}
|
|
2649
|
-
}
|
|
2650
|
-
return to;
|
|
2651
|
-
}
|
|
2652
|
-
const internalOptionMergeStrats = {
|
|
2653
|
-
data: mergeDataFn,
|
|
2654
|
-
props: mergeEmitsOrPropsOptions,
|
|
2655
|
-
emits: mergeEmitsOrPropsOptions,
|
|
2656
|
-
// objects
|
|
2657
|
-
methods: mergeObjectOptions,
|
|
2658
|
-
computed: mergeObjectOptions,
|
|
2659
|
-
// lifecycle
|
|
2660
|
-
beforeCreate: mergeAsArray,
|
|
2661
|
-
created: mergeAsArray,
|
|
2662
|
-
beforeMount: mergeAsArray,
|
|
2663
|
-
mounted: mergeAsArray,
|
|
2664
|
-
beforeUpdate: mergeAsArray,
|
|
2665
|
-
updated: mergeAsArray,
|
|
2666
|
-
beforeDestroy: mergeAsArray,
|
|
2667
|
-
beforeUnmount: mergeAsArray,
|
|
2668
|
-
destroyed: mergeAsArray,
|
|
2669
|
-
unmounted: mergeAsArray,
|
|
2670
|
-
activated: mergeAsArray,
|
|
2671
|
-
deactivated: mergeAsArray,
|
|
2672
|
-
errorCaptured: mergeAsArray,
|
|
2673
|
-
serverPrefetch: mergeAsArray,
|
|
2674
|
-
// assets
|
|
2675
|
-
components: mergeObjectOptions,
|
|
2676
|
-
directives: mergeObjectOptions,
|
|
2677
|
-
// watch
|
|
2678
|
-
watch: mergeWatchOptions,
|
|
2679
|
-
// provide / inject
|
|
2680
|
-
provide: mergeDataFn,
|
|
2681
|
-
inject: mergeInject
|
|
2292
|
+
const internalOptionMergeStrats = {
|
|
2293
|
+
data: mergeDataFn,
|
|
2294
|
+
props: mergeEmitsOrPropsOptions,
|
|
2295
|
+
emits: mergeEmitsOrPropsOptions,
|
|
2296
|
+
// objects
|
|
2297
|
+
methods: mergeObjectOptions,
|
|
2298
|
+
computed: mergeObjectOptions,
|
|
2299
|
+
// lifecycle
|
|
2300
|
+
beforeCreate: mergeAsArray,
|
|
2301
|
+
created: mergeAsArray,
|
|
2302
|
+
beforeMount: mergeAsArray,
|
|
2303
|
+
mounted: mergeAsArray,
|
|
2304
|
+
beforeUpdate: mergeAsArray,
|
|
2305
|
+
updated: mergeAsArray,
|
|
2306
|
+
beforeDestroy: mergeAsArray,
|
|
2307
|
+
beforeUnmount: mergeAsArray,
|
|
2308
|
+
destroyed: mergeAsArray,
|
|
2309
|
+
unmounted: mergeAsArray,
|
|
2310
|
+
activated: mergeAsArray,
|
|
2311
|
+
deactivated: mergeAsArray,
|
|
2312
|
+
errorCaptured: mergeAsArray,
|
|
2313
|
+
serverPrefetch: mergeAsArray,
|
|
2314
|
+
// assets
|
|
2315
|
+
components: mergeObjectOptions,
|
|
2316
|
+
directives: mergeObjectOptions,
|
|
2317
|
+
// watch
|
|
2318
|
+
watch: mergeWatchOptions,
|
|
2319
|
+
// provide / inject
|
|
2320
|
+
provide: mergeDataFn,
|
|
2321
|
+
inject: mergeInject
|
|
2682
2322
|
};
|
|
2683
2323
|
function mergeDataFn(to, from) {
|
|
2684
2324
|
if (!from) {
|
|
@@ -2728,10 +2368,8 @@ function mergeEmitsOrPropsOptions(to, from) {
|
|
|
2728
2368
|
}
|
|
2729
2369
|
}
|
|
2730
2370
|
function mergeWatchOptions(to, from) {
|
|
2731
|
-
if (!to)
|
|
2732
|
-
|
|
2733
|
-
if (!from)
|
|
2734
|
-
return to;
|
|
2371
|
+
if (!to) return from;
|
|
2372
|
+
if (!from) return to;
|
|
2735
2373
|
const merged = extend(/* @__PURE__ */ Object.create(null), to);
|
|
2736
2374
|
for (const key in from) {
|
|
2737
2375
|
merged[key] = mergeAsArray(to[key], from[key]);
|
|
@@ -2833,7 +2471,7 @@ function createAppAPI(render, hydrate) {
|
|
|
2833
2471
|
isMounted = true;
|
|
2834
2472
|
app._container = rootContainer;
|
|
2835
2473
|
rootContainer.__vue_app__ = app;
|
|
2836
|
-
return
|
|
2474
|
+
return getComponentPublicInstance(vnode.component);
|
|
2837
2475
|
}
|
|
2838
2476
|
},
|
|
2839
2477
|
unmount() {
|
|
@@ -3089,8 +2727,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
3089
2727
|
hasExtends = true;
|
|
3090
2728
|
const [props, keys] = normalizePropsOptions(raw2, appContext, true);
|
|
3091
2729
|
extend(normalized, props);
|
|
3092
|
-
if (keys)
|
|
3093
|
-
needCastKeys.push(...keys);
|
|
2730
|
+
if (keys) needCastKeys.push(...keys);
|
|
3094
2731
|
};
|
|
3095
2732
|
if (!asMixin && appContext.mixins.length) {
|
|
3096
2733
|
appContext.mixins.forEach(extendProps);
|
|
@@ -3190,8 +2827,7 @@ const normalizeSlot$1 = (key, rawSlot, ctx) => {
|
|
|
3190
2827
|
const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
3191
2828
|
const ctx = rawSlots._ctx;
|
|
3192
2829
|
for (const key in rawSlots) {
|
|
3193
|
-
if (isInternalKey(key))
|
|
3194
|
-
continue;
|
|
2830
|
+
if (isInternalKey(key)) continue;
|
|
3195
2831
|
const value = rawSlots[key];
|
|
3196
2832
|
if (isFunction(value)) {
|
|
3197
2833
|
slots[key] = normalizeSlot$1(key, value, ctx);
|
|
@@ -3267,7 +2903,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3267
2903
|
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
3268
2904
|
return;
|
|
3269
2905
|
}
|
|
3270
|
-
const refValue = vnode.shapeFlag & 4 ?
|
|
2906
|
+
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
3271
2907
|
const value = isUnmount ? null : refValue;
|
|
3272
2908
|
const { i: owner, r: ref3 } = rawRef;
|
|
3273
2909
|
const oldRef = oldRawRef && oldRawRef.r;
|
|
@@ -3303,8 +2939,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3303
2939
|
}
|
|
3304
2940
|
} else {
|
|
3305
2941
|
ref3.value = [refValue];
|
|
3306
|
-
if (rawRef.k)
|
|
3307
|
-
refs[rawRef.k] = ref3.value;
|
|
2942
|
+
if (rawRef.k) refs[rawRef.k] = ref3.value;
|
|
3308
2943
|
}
|
|
3309
2944
|
} else if (!existing.includes(refValue)) {
|
|
3310
2945
|
existing.push(refValue);
|
|
@@ -3317,8 +2952,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3317
2952
|
}
|
|
3318
2953
|
} else if (_isRef) {
|
|
3319
2954
|
ref3.value = value;
|
|
3320
|
-
if (rawRef.k)
|
|
3321
|
-
refs[rawRef.k] = value;
|
|
2955
|
+
if (rawRef.k) refs[rawRef.k] = value;
|
|
3322
2956
|
} else ;
|
|
3323
2957
|
};
|
|
3324
2958
|
if (value) {
|
|
@@ -3789,8 +3423,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3789
3423
|
}
|
|
3790
3424
|
}
|
|
3791
3425
|
for (const key in newProps) {
|
|
3792
|
-
if (isReservedProp(key))
|
|
3793
|
-
continue;
|
|
3426
|
+
if (isReservedProp(key)) continue;
|
|
3794
3427
|
const next = newProps[key];
|
|
3795
3428
|
const prev = oldProps[key];
|
|
3796
3429
|
if (next !== prev && key !== "value") {
|
|
@@ -3917,7 +3550,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3917
3550
|
setupComponent(instance);
|
|
3918
3551
|
}
|
|
3919
3552
|
if (instance.asyncDep) {
|
|
3920
|
-
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
|
|
3553
|
+
parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
|
|
3921
3554
|
if (!initialVNode.el) {
|
|
3922
3555
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
3923
3556
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -4312,8 +3945,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4312
3945
|
let moved = false;
|
|
4313
3946
|
let maxNewIndexSoFar = 0;
|
|
4314
3947
|
const newIndexToOldIndexMap = new Array(toBePatched);
|
|
4315
|
-
for (i = 0; i < toBePatched; i++)
|
|
4316
|
-
newIndexToOldIndexMap[i] = 0;
|
|
3948
|
+
for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;
|
|
4317
3949
|
for (i = s1; i <= e1; i++) {
|
|
4318
3950
|
const prevChild = c1[i];
|
|
4319
3951
|
if (patched >= toBePatched) {
|
|
@@ -4397,307 +4029,588 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4397
4029
|
return;
|
|
4398
4030
|
}
|
|
4399
4031
|
if (type === Fragment) {
|
|
4400
|
-
hostInsert(el, container, anchor);
|
|
4401
|
-
for (let i = 0; i < children.length; i++) {
|
|
4402
|
-
move(children[i], container, anchor, moveType);
|
|
4032
|
+
hostInsert(el, container, anchor);
|
|
4033
|
+
for (let i = 0; i < children.length; i++) {
|
|
4034
|
+
move(children[i], container, anchor, moveType);
|
|
4035
|
+
}
|
|
4036
|
+
hostInsert(vnode.anchor, container, anchor);
|
|
4037
|
+
return;
|
|
4038
|
+
}
|
|
4039
|
+
if (type === Static) {
|
|
4040
|
+
moveStaticNode(vnode, container, anchor);
|
|
4041
|
+
return;
|
|
4042
|
+
}
|
|
4043
|
+
const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;
|
|
4044
|
+
if (needTransition2) {
|
|
4045
|
+
if (moveType === 0) {
|
|
4046
|
+
transition.beforeEnter(el);
|
|
4047
|
+
hostInsert(el, container, anchor);
|
|
4048
|
+
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
4049
|
+
} else {
|
|
4050
|
+
const { leave, delayLeave, afterLeave } = transition;
|
|
4051
|
+
const remove22 = () => hostInsert(el, container, anchor);
|
|
4052
|
+
const performLeave = () => {
|
|
4053
|
+
leave(el, () => {
|
|
4054
|
+
remove22();
|
|
4055
|
+
afterLeave && afterLeave();
|
|
4056
|
+
});
|
|
4057
|
+
};
|
|
4058
|
+
if (delayLeave) {
|
|
4059
|
+
delayLeave(el, remove22, performLeave);
|
|
4060
|
+
} else {
|
|
4061
|
+
performLeave();
|
|
4062
|
+
}
|
|
4063
|
+
}
|
|
4064
|
+
} else {
|
|
4065
|
+
hostInsert(el, container, anchor);
|
|
4066
|
+
}
|
|
4067
|
+
};
|
|
4068
|
+
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
4069
|
+
const {
|
|
4070
|
+
type,
|
|
4071
|
+
props,
|
|
4072
|
+
ref: ref3,
|
|
4073
|
+
children,
|
|
4074
|
+
dynamicChildren,
|
|
4075
|
+
shapeFlag,
|
|
4076
|
+
patchFlag,
|
|
4077
|
+
dirs,
|
|
4078
|
+
memoIndex
|
|
4079
|
+
} = vnode;
|
|
4080
|
+
if (patchFlag === -2) {
|
|
4081
|
+
optimized = false;
|
|
4082
|
+
}
|
|
4083
|
+
if (ref3 != null) {
|
|
4084
|
+
setRef(ref3, null, parentSuspense, vnode, true);
|
|
4085
|
+
}
|
|
4086
|
+
if (memoIndex != null) {
|
|
4087
|
+
parentComponent.renderCache[memoIndex] = void 0;
|
|
4088
|
+
}
|
|
4089
|
+
if (shapeFlag & 256) {
|
|
4090
|
+
parentComponent.ctx.deactivate(vnode);
|
|
4091
|
+
return;
|
|
4092
|
+
}
|
|
4093
|
+
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
4094
|
+
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4095
|
+
let vnodeHook;
|
|
4096
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
4097
|
+
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4098
|
+
}
|
|
4099
|
+
if (shapeFlag & 6) {
|
|
4100
|
+
unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
4101
|
+
} else {
|
|
4102
|
+
if (shapeFlag & 128) {
|
|
4103
|
+
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
4104
|
+
return;
|
|
4105
|
+
}
|
|
4106
|
+
if (shouldInvokeDirs) {
|
|
4107
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4108
|
+
}
|
|
4109
|
+
if (shapeFlag & 64) {
|
|
4110
|
+
vnode.type.remove(
|
|
4111
|
+
vnode,
|
|
4112
|
+
parentComponent,
|
|
4113
|
+
parentSuspense,
|
|
4114
|
+
internals,
|
|
4115
|
+
doRemove
|
|
4116
|
+
);
|
|
4117
|
+
} else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
4118
|
+
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
4119
|
+
unmountChildren(
|
|
4120
|
+
dynamicChildren,
|
|
4121
|
+
parentComponent,
|
|
4122
|
+
parentSuspense,
|
|
4123
|
+
false,
|
|
4124
|
+
true
|
|
4125
|
+
);
|
|
4126
|
+
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
4127
|
+
unmountChildren(children, parentComponent, parentSuspense);
|
|
4128
|
+
}
|
|
4129
|
+
if (doRemove) {
|
|
4130
|
+
remove2(vnode);
|
|
4131
|
+
}
|
|
4132
|
+
}
|
|
4133
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
|
|
4134
|
+
queuePostRenderEffect(() => {
|
|
4135
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4136
|
+
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4137
|
+
}, parentSuspense);
|
|
4138
|
+
}
|
|
4139
|
+
};
|
|
4140
|
+
const remove2 = (vnode) => {
|
|
4141
|
+
const { type, el, anchor, transition } = vnode;
|
|
4142
|
+
if (type === Fragment) {
|
|
4143
|
+
{
|
|
4144
|
+
removeFragment(el, anchor);
|
|
4403
4145
|
}
|
|
4404
|
-
hostInsert(vnode.anchor, container, anchor);
|
|
4405
4146
|
return;
|
|
4406
4147
|
}
|
|
4407
4148
|
if (type === Static) {
|
|
4408
|
-
|
|
4149
|
+
removeStaticNode(vnode);
|
|
4409
4150
|
return;
|
|
4410
4151
|
}
|
|
4411
|
-
const
|
|
4412
|
-
|
|
4413
|
-
if (
|
|
4414
|
-
transition.
|
|
4415
|
-
|
|
4416
|
-
|
|
4152
|
+
const performRemove = () => {
|
|
4153
|
+
hostRemove(el);
|
|
4154
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
4155
|
+
transition.afterLeave();
|
|
4156
|
+
}
|
|
4157
|
+
};
|
|
4158
|
+
if (vnode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
4159
|
+
const { leave, delayLeave } = transition;
|
|
4160
|
+
const performLeave = () => leave(el, performRemove);
|
|
4161
|
+
if (delayLeave) {
|
|
4162
|
+
delayLeave(vnode.el, performRemove, performLeave);
|
|
4417
4163
|
} else {
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4164
|
+
performLeave();
|
|
4165
|
+
}
|
|
4166
|
+
} else {
|
|
4167
|
+
performRemove();
|
|
4168
|
+
}
|
|
4169
|
+
};
|
|
4170
|
+
const removeFragment = (cur, end) => {
|
|
4171
|
+
let next;
|
|
4172
|
+
while (cur !== end) {
|
|
4173
|
+
next = hostNextSibling(cur);
|
|
4174
|
+
hostRemove(cur);
|
|
4175
|
+
cur = next;
|
|
4176
|
+
}
|
|
4177
|
+
hostRemove(end);
|
|
4178
|
+
};
|
|
4179
|
+
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
4180
|
+
const { bum, scope, update, subTree, um, m, a } = instance;
|
|
4181
|
+
invalidateMount(m);
|
|
4182
|
+
invalidateMount(a);
|
|
4183
|
+
if (bum) {
|
|
4184
|
+
invokeArrayFns(bum);
|
|
4185
|
+
}
|
|
4186
|
+
scope.stop();
|
|
4187
|
+
if (update) {
|
|
4188
|
+
update.active = false;
|
|
4189
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
4190
|
+
}
|
|
4191
|
+
if (um) {
|
|
4192
|
+
queuePostRenderEffect(um, parentSuspense);
|
|
4193
|
+
}
|
|
4194
|
+
queuePostRenderEffect(() => {
|
|
4195
|
+
instance.isUnmounted = true;
|
|
4196
|
+
}, parentSuspense);
|
|
4197
|
+
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
4198
|
+
parentSuspense.deps--;
|
|
4199
|
+
if (parentSuspense.deps === 0) {
|
|
4200
|
+
parentSuspense.resolve();
|
|
4201
|
+
}
|
|
4202
|
+
}
|
|
4203
|
+
};
|
|
4204
|
+
const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
|
|
4205
|
+
for (let i = start; i < children.length; i++) {
|
|
4206
|
+
unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
|
|
4207
|
+
}
|
|
4208
|
+
};
|
|
4209
|
+
const getNextHostNode = (vnode) => {
|
|
4210
|
+
if (vnode.shapeFlag & 6) {
|
|
4211
|
+
return getNextHostNode(vnode.component.subTree);
|
|
4212
|
+
}
|
|
4213
|
+
if (vnode.shapeFlag & 128) {
|
|
4214
|
+
return vnode.suspense.next();
|
|
4215
|
+
}
|
|
4216
|
+
return hostNextSibling(vnode.anchor || vnode.el);
|
|
4217
|
+
};
|
|
4218
|
+
let isFlushing2 = false;
|
|
4219
|
+
const render = (vnode, container, namespace) => {
|
|
4220
|
+
if (vnode == null) {
|
|
4221
|
+
if (container._vnode) {
|
|
4222
|
+
unmount(container._vnode, null, null, true);
|
|
4223
|
+
}
|
|
4224
|
+
} else {
|
|
4225
|
+
patch(
|
|
4226
|
+
container._vnode || null,
|
|
4227
|
+
vnode,
|
|
4228
|
+
container,
|
|
4229
|
+
null,
|
|
4230
|
+
null,
|
|
4231
|
+
null,
|
|
4232
|
+
namespace
|
|
4233
|
+
);
|
|
4234
|
+
}
|
|
4235
|
+
if (!isFlushing2) {
|
|
4236
|
+
isFlushing2 = true;
|
|
4237
|
+
flushPreFlushCbs();
|
|
4238
|
+
flushPostFlushCbs();
|
|
4239
|
+
isFlushing2 = false;
|
|
4240
|
+
}
|
|
4241
|
+
container._vnode = vnode;
|
|
4242
|
+
};
|
|
4243
|
+
const internals = {
|
|
4244
|
+
p: patch,
|
|
4245
|
+
um: unmount,
|
|
4246
|
+
m: move,
|
|
4247
|
+
r: remove2,
|
|
4248
|
+
mt: mountComponent,
|
|
4249
|
+
mc: mountChildren,
|
|
4250
|
+
pc: patchChildren,
|
|
4251
|
+
pbc: patchBlockChildren,
|
|
4252
|
+
n: getNextHostNode,
|
|
4253
|
+
o: options
|
|
4254
|
+
};
|
|
4255
|
+
let hydrate;
|
|
4256
|
+
let hydrateNode;
|
|
4257
|
+
return {
|
|
4258
|
+
render,
|
|
4259
|
+
hydrate,
|
|
4260
|
+
createApp: createAppAPI(render, hydrate)
|
|
4261
|
+
};
|
|
4262
|
+
}
|
|
4263
|
+
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
4264
|
+
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
4265
|
+
}
|
|
4266
|
+
function toggleRecurse({ effect: effect2, update }, allowed) {
|
|
4267
|
+
effect2.allowRecurse = update.allowRecurse = allowed;
|
|
4268
|
+
}
|
|
4269
|
+
function needTransition(parentSuspense, transition) {
|
|
4270
|
+
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
4271
|
+
}
|
|
4272
|
+
function traverseStaticChildren(n1, n2, shallow = false) {
|
|
4273
|
+
const ch1 = n1.children;
|
|
4274
|
+
const ch2 = n2.children;
|
|
4275
|
+
if (isArray$1(ch1) && isArray$1(ch2)) {
|
|
4276
|
+
for (let i = 0; i < ch1.length; i++) {
|
|
4277
|
+
const c1 = ch1[i];
|
|
4278
|
+
let c2 = ch2[i];
|
|
4279
|
+
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
4280
|
+
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
4281
|
+
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
4282
|
+
c2.el = c1.el;
|
|
4283
|
+
}
|
|
4284
|
+
if (!shallow && c2.patchFlag !== -2)
|
|
4285
|
+
traverseStaticChildren(c1, c2);
|
|
4286
|
+
}
|
|
4287
|
+
if (c2.type === Text) {
|
|
4288
|
+
c2.el = c1.el;
|
|
4289
|
+
}
|
|
4290
|
+
}
|
|
4291
|
+
}
|
|
4292
|
+
}
|
|
4293
|
+
function getSequence(arr) {
|
|
4294
|
+
const p = arr.slice();
|
|
4295
|
+
const result = [0];
|
|
4296
|
+
let i, j, u, v, c;
|
|
4297
|
+
const len = arr.length;
|
|
4298
|
+
for (i = 0; i < len; i++) {
|
|
4299
|
+
const arrI = arr[i];
|
|
4300
|
+
if (arrI !== 0) {
|
|
4301
|
+
j = result[result.length - 1];
|
|
4302
|
+
if (arr[j] < arrI) {
|
|
4303
|
+
p[i] = j;
|
|
4304
|
+
result.push(i);
|
|
4305
|
+
continue;
|
|
4306
|
+
}
|
|
4307
|
+
u = 0;
|
|
4308
|
+
v = result.length - 1;
|
|
4309
|
+
while (u < v) {
|
|
4310
|
+
c = u + v >> 1;
|
|
4311
|
+
if (arr[result[c]] < arrI) {
|
|
4312
|
+
u = c + 1;
|
|
4428
4313
|
} else {
|
|
4429
|
-
|
|
4314
|
+
v = c;
|
|
4315
|
+
}
|
|
4316
|
+
}
|
|
4317
|
+
if (arrI < arr[result[u]]) {
|
|
4318
|
+
if (u > 0) {
|
|
4319
|
+
p[i] = result[u - 1];
|
|
4430
4320
|
}
|
|
4321
|
+
result[u] = i;
|
|
4431
4322
|
}
|
|
4323
|
+
}
|
|
4324
|
+
}
|
|
4325
|
+
u = result.length;
|
|
4326
|
+
v = result[u - 1];
|
|
4327
|
+
while (u-- > 0) {
|
|
4328
|
+
result[u] = v;
|
|
4329
|
+
v = p[v];
|
|
4330
|
+
}
|
|
4331
|
+
return result;
|
|
4332
|
+
}
|
|
4333
|
+
function locateNonHydratedAsyncRoot(instance) {
|
|
4334
|
+
const subComponent = instance.subTree.component;
|
|
4335
|
+
if (subComponent) {
|
|
4336
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) {
|
|
4337
|
+
return subComponent;
|
|
4338
|
+
} else {
|
|
4339
|
+
return locateNonHydratedAsyncRoot(subComponent);
|
|
4340
|
+
}
|
|
4341
|
+
}
|
|
4342
|
+
}
|
|
4343
|
+
function invalidateMount(hooks) {
|
|
4344
|
+
if (hooks) {
|
|
4345
|
+
for (let i = 0; i < hooks.length; i++) hooks[i].active = false;
|
|
4346
|
+
}
|
|
4347
|
+
}
|
|
4348
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
4349
|
+
const useSSRContext = () => {
|
|
4350
|
+
{
|
|
4351
|
+
const ctx = inject(ssrContextKey);
|
|
4352
|
+
return ctx;
|
|
4353
|
+
}
|
|
4354
|
+
};
|
|
4355
|
+
const INITIAL_WATCHER_VALUE = {};
|
|
4356
|
+
function watch(source, cb, options) {
|
|
4357
|
+
return doWatch(source, cb, options);
|
|
4358
|
+
}
|
|
4359
|
+
function doWatch(source, cb, {
|
|
4360
|
+
immediate,
|
|
4361
|
+
deep,
|
|
4362
|
+
flush,
|
|
4363
|
+
once,
|
|
4364
|
+
onTrack,
|
|
4365
|
+
onTrigger
|
|
4366
|
+
} = EMPTY_OBJ) {
|
|
4367
|
+
if (cb && once) {
|
|
4368
|
+
const _cb = cb;
|
|
4369
|
+
cb = (...args) => {
|
|
4370
|
+
_cb(...args);
|
|
4371
|
+
unwatch();
|
|
4372
|
+
};
|
|
4373
|
+
}
|
|
4374
|
+
const instance = currentInstance;
|
|
4375
|
+
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
4376
|
+
// for deep: false, only traverse root-level properties
|
|
4377
|
+
traverse(source2, deep === false ? 1 : void 0)
|
|
4378
|
+
);
|
|
4379
|
+
let getter;
|
|
4380
|
+
let forceTrigger = false;
|
|
4381
|
+
let isMultiSource = false;
|
|
4382
|
+
if (isRef(source)) {
|
|
4383
|
+
getter = () => source.value;
|
|
4384
|
+
forceTrigger = isShallow(source);
|
|
4385
|
+
} else if (isReactive(source)) {
|
|
4386
|
+
getter = () => reactiveGetter(source);
|
|
4387
|
+
forceTrigger = true;
|
|
4388
|
+
} else if (isArray$1(source)) {
|
|
4389
|
+
isMultiSource = true;
|
|
4390
|
+
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
|
|
4391
|
+
getter = () => source.map((s) => {
|
|
4392
|
+
if (isRef(s)) {
|
|
4393
|
+
return s.value;
|
|
4394
|
+
} else if (isReactive(s)) {
|
|
4395
|
+
return reactiveGetter(s);
|
|
4396
|
+
} else if (isFunction(s)) {
|
|
4397
|
+
return callWithErrorHandling(s, instance, 2);
|
|
4398
|
+
} else ;
|
|
4399
|
+
});
|
|
4400
|
+
} else if (isFunction(source)) {
|
|
4401
|
+
if (cb) {
|
|
4402
|
+
getter = () => callWithErrorHandling(source, instance, 2);
|
|
4432
4403
|
} else {
|
|
4433
|
-
|
|
4404
|
+
getter = () => {
|
|
4405
|
+
if (cleanup) {
|
|
4406
|
+
cleanup();
|
|
4407
|
+
}
|
|
4408
|
+
return callWithAsyncErrorHandling(
|
|
4409
|
+
source,
|
|
4410
|
+
instance,
|
|
4411
|
+
3,
|
|
4412
|
+
[onCleanup]
|
|
4413
|
+
);
|
|
4414
|
+
};
|
|
4434
4415
|
}
|
|
4416
|
+
} else {
|
|
4417
|
+
getter = NOOP;
|
|
4418
|
+
}
|
|
4419
|
+
if (cb && deep) {
|
|
4420
|
+
const baseGetter = getter;
|
|
4421
|
+
getter = () => traverse(baseGetter());
|
|
4422
|
+
}
|
|
4423
|
+
let cleanup;
|
|
4424
|
+
let onCleanup = (fn) => {
|
|
4425
|
+
cleanup = effect2.onStop = () => {
|
|
4426
|
+
callWithErrorHandling(fn, instance, 4);
|
|
4427
|
+
cleanup = effect2.onStop = void 0;
|
|
4428
|
+
};
|
|
4435
4429
|
};
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
if (ref3 != null) {
|
|
4448
|
-
setRef(ref3, null, parentSuspense, vnode, true);
|
|
4449
|
-
}
|
|
4450
|
-
if (shapeFlag & 256) {
|
|
4451
|
-
parentComponent.ctx.deactivate(vnode);
|
|
4452
|
-
return;
|
|
4453
|
-
}
|
|
4454
|
-
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
4455
|
-
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4456
|
-
let vnodeHook;
|
|
4457
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {
|
|
4458
|
-
invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4430
|
+
let ssrCleanup;
|
|
4431
|
+
if (isInSSRComponentSetup) {
|
|
4432
|
+
onCleanup = NOOP;
|
|
4433
|
+
if (!cb) {
|
|
4434
|
+
getter();
|
|
4435
|
+
} else if (immediate) {
|
|
4436
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
4437
|
+
getter(),
|
|
4438
|
+
isMultiSource ? [] : void 0,
|
|
4439
|
+
onCleanup
|
|
4440
|
+
]);
|
|
4459
4441
|
}
|
|
4460
|
-
if (
|
|
4461
|
-
|
|
4442
|
+
if (flush === "sync") {
|
|
4443
|
+
const ctx = useSSRContext();
|
|
4444
|
+
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
4462
4445
|
} else {
|
|
4463
|
-
|
|
4464
|
-
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
4465
|
-
return;
|
|
4466
|
-
}
|
|
4467
|
-
if (shouldInvokeDirs) {
|
|
4468
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4469
|
-
}
|
|
4470
|
-
if (shapeFlag & 64) {
|
|
4471
|
-
vnode.type.remove(
|
|
4472
|
-
vnode,
|
|
4473
|
-
parentComponent,
|
|
4474
|
-
parentSuspense,
|
|
4475
|
-
optimized,
|
|
4476
|
-
internals,
|
|
4477
|
-
doRemove
|
|
4478
|
-
);
|
|
4479
|
-
} else if (dynamicChildren && // #1153: fast path should not be taken for non-stable (v-for) fragments
|
|
4480
|
-
(type !== Fragment || patchFlag > 0 && patchFlag & 64)) {
|
|
4481
|
-
unmountChildren(
|
|
4482
|
-
dynamicChildren,
|
|
4483
|
-
parentComponent,
|
|
4484
|
-
parentSuspense,
|
|
4485
|
-
false,
|
|
4486
|
-
true
|
|
4487
|
-
);
|
|
4488
|
-
} else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {
|
|
4489
|
-
unmountChildren(children, parentComponent, parentSuspense);
|
|
4490
|
-
}
|
|
4491
|
-
if (doRemove) {
|
|
4492
|
-
remove2(vnode);
|
|
4493
|
-
}
|
|
4494
|
-
}
|
|
4495
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {
|
|
4496
|
-
queuePostRenderEffect(() => {
|
|
4497
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4498
|
-
shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4499
|
-
}, parentSuspense);
|
|
4500
|
-
}
|
|
4501
|
-
};
|
|
4502
|
-
const remove2 = (vnode) => {
|
|
4503
|
-
const { type, el, anchor, transition } = vnode;
|
|
4504
|
-
if (type === Fragment) {
|
|
4505
|
-
{
|
|
4506
|
-
removeFragment(el, anchor);
|
|
4507
|
-
}
|
|
4508
|
-
return;
|
|
4446
|
+
return NOOP;
|
|
4509
4447
|
}
|
|
4510
|
-
|
|
4511
|
-
|
|
4448
|
+
}
|
|
4449
|
+
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
4450
|
+
const job = () => {
|
|
4451
|
+
if (!effect2.active || !effect2.dirty) {
|
|
4512
4452
|
return;
|
|
4513
4453
|
}
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
if (
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4454
|
+
if (cb) {
|
|
4455
|
+
const newValue = effect2.run();
|
|
4456
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue)) || false) {
|
|
4457
|
+
if (cleanup) {
|
|
4458
|
+
cleanup();
|
|
4459
|
+
}
|
|
4460
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
4461
|
+
newValue,
|
|
4462
|
+
// pass undefined as the old value when it's changed for the first time
|
|
4463
|
+
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
4464
|
+
onCleanup
|
|
4465
|
+
]);
|
|
4466
|
+
oldValue = newValue;
|
|
4527
4467
|
}
|
|
4528
4468
|
} else {
|
|
4529
|
-
|
|
4469
|
+
effect2.run();
|
|
4530
4470
|
}
|
|
4531
4471
|
};
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4472
|
+
job.allowRecurse = !!cb;
|
|
4473
|
+
let scheduler;
|
|
4474
|
+
if (flush === "sync") {
|
|
4475
|
+
scheduler = job;
|
|
4476
|
+
} else if (flush === "post") {
|
|
4477
|
+
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
4478
|
+
} else {
|
|
4479
|
+
job.pre = true;
|
|
4480
|
+
if (instance) job.id = instance.uid;
|
|
4481
|
+
scheduler = () => queueJob(job);
|
|
4482
|
+
}
|
|
4483
|
+
const effect2 = new ReactiveEffect(getter, NOOP, scheduler);
|
|
4484
|
+
const scope = getCurrentScope();
|
|
4485
|
+
const unwatch = () => {
|
|
4486
|
+
effect2.stop();
|
|
4487
|
+
if (scope) {
|
|
4488
|
+
remove(scope.effects, effect2);
|
|
4538
4489
|
}
|
|
4539
|
-
hostRemove(end);
|
|
4540
4490
|
};
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
scope.stop();
|
|
4547
|
-
if (update) {
|
|
4548
|
-
update.active = false;
|
|
4549
|
-
unmount(subTree, instance, parentSuspense, doRemove);
|
|
4550
|
-
}
|
|
4551
|
-
if (um) {
|
|
4552
|
-
queuePostRenderEffect(um, parentSuspense);
|
|
4553
|
-
}
|
|
4554
|
-
queuePostRenderEffect(() => {
|
|
4555
|
-
instance.isUnmounted = true;
|
|
4556
|
-
}, parentSuspense);
|
|
4557
|
-
if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {
|
|
4558
|
-
parentSuspense.deps--;
|
|
4559
|
-
if (parentSuspense.deps === 0) {
|
|
4560
|
-
parentSuspense.resolve();
|
|
4561
|
-
}
|
|
4491
|
+
if (cb) {
|
|
4492
|
+
if (immediate) {
|
|
4493
|
+
job();
|
|
4494
|
+
} else {
|
|
4495
|
+
oldValue = effect2.run();
|
|
4562
4496
|
}
|
|
4563
|
-
}
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4497
|
+
} else if (flush === "post") {
|
|
4498
|
+
queuePostRenderEffect(
|
|
4499
|
+
effect2.run.bind(effect2),
|
|
4500
|
+
instance && instance.suspense
|
|
4501
|
+
);
|
|
4502
|
+
} else {
|
|
4503
|
+
effect2.run();
|
|
4504
|
+
}
|
|
4505
|
+
if (ssrCleanup) ssrCleanup.push(unwatch);
|
|
4506
|
+
return unwatch;
|
|
4507
|
+
}
|
|
4508
|
+
function instanceWatch(source, value, options) {
|
|
4509
|
+
const publicThis = this.proxy;
|
|
4510
|
+
const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
|
|
4511
|
+
let cb;
|
|
4512
|
+
if (isFunction(value)) {
|
|
4513
|
+
cb = value;
|
|
4514
|
+
} else {
|
|
4515
|
+
cb = value.handler;
|
|
4516
|
+
options = value;
|
|
4517
|
+
}
|
|
4518
|
+
const reset = setCurrentInstance(this);
|
|
4519
|
+
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
4520
|
+
reset();
|
|
4521
|
+
return res;
|
|
4522
|
+
}
|
|
4523
|
+
function createPathGetter(ctx, path) {
|
|
4524
|
+
const segments = path.split(".");
|
|
4525
|
+
return () => {
|
|
4526
|
+
let cur = ctx;
|
|
4527
|
+
for (let i = 0; i < segments.length && cur; i++) {
|
|
4528
|
+
cur = cur[segments[i]];
|
|
4567
4529
|
}
|
|
4530
|
+
return cur;
|
|
4568
4531
|
};
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4532
|
+
}
|
|
4533
|
+
function traverse(value, depth = Infinity, seen) {
|
|
4534
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
4535
|
+
return value;
|
|
4536
|
+
}
|
|
4537
|
+
seen = seen || /* @__PURE__ */ new Set();
|
|
4538
|
+
if (seen.has(value)) {
|
|
4539
|
+
return value;
|
|
4540
|
+
}
|
|
4541
|
+
seen.add(value);
|
|
4542
|
+
depth--;
|
|
4543
|
+
if (isRef(value)) {
|
|
4544
|
+
traverse(value.value, depth, seen);
|
|
4545
|
+
} else if (isArray$1(value)) {
|
|
4546
|
+
for (let i = 0; i < value.length; i++) {
|
|
4547
|
+
traverse(value[i], depth, seen);
|
|
4572
4548
|
}
|
|
4573
|
-
|
|
4574
|
-
|
|
4549
|
+
} else if (isSet(value) || isMap(value)) {
|
|
4550
|
+
value.forEach((v) => {
|
|
4551
|
+
traverse(v, depth, seen);
|
|
4552
|
+
});
|
|
4553
|
+
} else if (isPlainObject(value)) {
|
|
4554
|
+
for (const key in value) {
|
|
4555
|
+
traverse(value[key], depth, seen);
|
|
4575
4556
|
}
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
const render = (vnode, container, namespace) => {
|
|
4580
|
-
if (vnode == null) {
|
|
4581
|
-
if (container._vnode) {
|
|
4582
|
-
unmount(container._vnode, null, null, true);
|
|
4557
|
+
for (const key of Object.getOwnPropertySymbols(value)) {
|
|
4558
|
+
if (Object.prototype.propertyIsEnumerable.call(value, key)) {
|
|
4559
|
+
traverse(value[key], depth, seen);
|
|
4583
4560
|
}
|
|
4584
|
-
} else {
|
|
4585
|
-
patch(
|
|
4586
|
-
container._vnode || null,
|
|
4587
|
-
vnode,
|
|
4588
|
-
container,
|
|
4589
|
-
null,
|
|
4590
|
-
null,
|
|
4591
|
-
null,
|
|
4592
|
-
namespace
|
|
4593
|
-
);
|
|
4594
|
-
}
|
|
4595
|
-
if (!isFlushing2) {
|
|
4596
|
-
isFlushing2 = true;
|
|
4597
|
-
flushPreFlushCbs();
|
|
4598
|
-
flushPostFlushCbs();
|
|
4599
|
-
isFlushing2 = false;
|
|
4600
4561
|
}
|
|
4601
|
-
|
|
4602
|
-
|
|
4603
|
-
const internals = {
|
|
4604
|
-
p: patch,
|
|
4605
|
-
um: unmount,
|
|
4606
|
-
m: move,
|
|
4607
|
-
r: remove2,
|
|
4608
|
-
mt: mountComponent,
|
|
4609
|
-
mc: mountChildren,
|
|
4610
|
-
pc: patchChildren,
|
|
4611
|
-
pbc: patchBlockChildren,
|
|
4612
|
-
n: getNextHostNode,
|
|
4613
|
-
o: options
|
|
4614
|
-
};
|
|
4615
|
-
let hydrate;
|
|
4616
|
-
let hydrateNode;
|
|
4617
|
-
return {
|
|
4618
|
-
render,
|
|
4619
|
-
hydrate,
|
|
4620
|
-
createApp: createAppAPI(render, hydrate)
|
|
4621
|
-
};
|
|
4622
|
-
}
|
|
4623
|
-
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
4624
|
-
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
4562
|
+
}
|
|
4563
|
+
return value;
|
|
4625
4564
|
}
|
|
4626
|
-
|
|
4627
|
-
|
|
4565
|
+
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
4566
|
+
function onActivated(hook, target) {
|
|
4567
|
+
registerKeepAliveHook(hook, "a", target);
|
|
4628
4568
|
}
|
|
4629
|
-
function
|
|
4630
|
-
|
|
4569
|
+
function onDeactivated(hook, target) {
|
|
4570
|
+
registerKeepAliveHook(hook, "da", target);
|
|
4631
4571
|
}
|
|
4632
|
-
function
|
|
4633
|
-
const
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
let c2 = ch2[i];
|
|
4639
|
-
if (c2.shapeFlag & 1 && !c2.dynamicChildren) {
|
|
4640
|
-
if (c2.patchFlag <= 0 || c2.patchFlag === 32) {
|
|
4641
|
-
c2 = ch2[i] = cloneIfMounted(ch2[i]);
|
|
4642
|
-
c2.el = c1.el;
|
|
4643
|
-
}
|
|
4644
|
-
if (!shallow)
|
|
4645
|
-
traverseStaticChildren(c1, c2);
|
|
4646
|
-
}
|
|
4647
|
-
if (c2.type === Text) {
|
|
4648
|
-
c2.el = c1.el;
|
|
4572
|
+
function registerKeepAliveHook(hook, type, target = currentInstance) {
|
|
4573
|
+
const wrappedHook = hook.__wdc || (hook.__wdc = () => {
|
|
4574
|
+
let current = target;
|
|
4575
|
+
while (current) {
|
|
4576
|
+
if (current.isDeactivated) {
|
|
4577
|
+
return;
|
|
4649
4578
|
}
|
|
4579
|
+
current = current.parent;
|
|
4650
4580
|
}
|
|
4651
|
-
|
|
4652
|
-
}
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
const arrI = arr[i];
|
|
4660
|
-
if (arrI !== 0) {
|
|
4661
|
-
j = result[result.length - 1];
|
|
4662
|
-
if (arr[j] < arrI) {
|
|
4663
|
-
p[i] = j;
|
|
4664
|
-
result.push(i);
|
|
4665
|
-
continue;
|
|
4666
|
-
}
|
|
4667
|
-
u = 0;
|
|
4668
|
-
v = result.length - 1;
|
|
4669
|
-
while (u < v) {
|
|
4670
|
-
c = u + v >> 1;
|
|
4671
|
-
if (arr[result[c]] < arrI) {
|
|
4672
|
-
u = c + 1;
|
|
4673
|
-
} else {
|
|
4674
|
-
v = c;
|
|
4675
|
-
}
|
|
4676
|
-
}
|
|
4677
|
-
if (arrI < arr[result[u]]) {
|
|
4678
|
-
if (u > 0) {
|
|
4679
|
-
p[i] = result[u - 1];
|
|
4680
|
-
}
|
|
4681
|
-
result[u] = i;
|
|
4581
|
+
return hook();
|
|
4582
|
+
});
|
|
4583
|
+
injectHook(type, wrappedHook, target);
|
|
4584
|
+
if (target) {
|
|
4585
|
+
let current = target.parent;
|
|
4586
|
+
while (current && current.parent) {
|
|
4587
|
+
if (isKeepAlive(current.parent.vnode)) {
|
|
4588
|
+
injectToKeepAliveRoot(wrappedHook, type, target, current);
|
|
4682
4589
|
}
|
|
4590
|
+
current = current.parent;
|
|
4683
4591
|
}
|
|
4684
4592
|
}
|
|
4685
|
-
u = result.length;
|
|
4686
|
-
v = result[u - 1];
|
|
4687
|
-
while (u-- > 0) {
|
|
4688
|
-
result[u] = v;
|
|
4689
|
-
v = p[v];
|
|
4690
|
-
}
|
|
4691
|
-
return result;
|
|
4692
4593
|
}
|
|
4693
|
-
function
|
|
4694
|
-
const
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4594
|
+
function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
|
|
4595
|
+
const injected = injectHook(
|
|
4596
|
+
type,
|
|
4597
|
+
hook,
|
|
4598
|
+
keepAliveRoot,
|
|
4599
|
+
true
|
|
4600
|
+
/* prepend */
|
|
4601
|
+
);
|
|
4602
|
+
onUnmounted(() => {
|
|
4603
|
+
remove(keepAliveRoot[type], injected);
|
|
4604
|
+
}, target);
|
|
4605
|
+
}
|
|
4606
|
+
function setTransitionHooks(vnode, hooks) {
|
|
4607
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4608
|
+
setTransitionHooks(vnode.component.subTree, hooks);
|
|
4609
|
+
} else if (vnode.shapeFlag & 128) {
|
|
4610
|
+
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4611
|
+
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4612
|
+
} else {
|
|
4613
|
+
vnode.transition = hooks;
|
|
4701
4614
|
}
|
|
4702
4615
|
}
|
|
4703
4616
|
const isTeleport = (type) => type.__isTeleport;
|
|
@@ -4726,19 +4639,6 @@ function setupBlock(vnode) {
|
|
|
4726
4639
|
}
|
|
4727
4640
|
return vnode;
|
|
4728
4641
|
}
|
|
4729
|
-
function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
|
|
4730
|
-
return setupBlock(
|
|
4731
|
-
createBaseVNode(
|
|
4732
|
-
type,
|
|
4733
|
-
props,
|
|
4734
|
-
children,
|
|
4735
|
-
patchFlag,
|
|
4736
|
-
dynamicProps,
|
|
4737
|
-
shapeFlag,
|
|
4738
|
-
true
|
|
4739
|
-
)
|
|
4740
|
-
);
|
|
4741
|
-
}
|
|
4742
4642
|
function createBlock(type, props, children, patchFlag, dynamicProps) {
|
|
4743
4643
|
return setupBlock(
|
|
4744
4644
|
createVNode(
|
|
@@ -4840,7 +4740,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
4840
4740
|
currentBlock.push(cloned);
|
|
4841
4741
|
}
|
|
4842
4742
|
}
|
|
4843
|
-
cloned.patchFlag
|
|
4743
|
+
cloned.patchFlag = -2;
|
|
4844
4744
|
return cloned;
|
|
4845
4745
|
}
|
|
4846
4746
|
if (isClassComponent(type)) {
|
|
@@ -4872,8 +4772,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
4872
4772
|
);
|
|
4873
4773
|
}
|
|
4874
4774
|
function guardReactiveProps(props) {
|
|
4875
|
-
if (!props)
|
|
4876
|
-
return null;
|
|
4775
|
+
if (!props) return null;
|
|
4877
4776
|
return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
|
|
4878
4777
|
}
|
|
4879
4778
|
function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {
|
|
@@ -4922,16 +4821,16 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
4922
4821
|
ce: vnode.ce
|
|
4923
4822
|
};
|
|
4924
4823
|
if (transition && cloneTransition) {
|
|
4925
|
-
|
|
4824
|
+
setTransitionHooks(
|
|
4825
|
+
cloned,
|
|
4826
|
+
transition.clone(cloned)
|
|
4827
|
+
);
|
|
4926
4828
|
}
|
|
4927
4829
|
return cloned;
|
|
4928
4830
|
}
|
|
4929
4831
|
function createTextVNode(text = " ", flag = 0) {
|
|
4930
4832
|
return createVNode(Text, null, text, flag);
|
|
4931
4833
|
}
|
|
4932
|
-
function createCommentVNode(text = "", asBlock = false) {
|
|
4933
|
-
return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
|
|
4934
|
-
}
|
|
4935
4834
|
function normalizeVNode(child) {
|
|
4936
4835
|
if (child == null || typeof child === "boolean") {
|
|
4937
4836
|
return createVNode(Comment);
|
|
@@ -5124,14 +5023,11 @@ let setInSSRSetupState;
|
|
|
5124
5023
|
const g = getGlobalThis();
|
|
5125
5024
|
const registerGlobalSetter = (key, setter) => {
|
|
5126
5025
|
let setters;
|
|
5127
|
-
if (!(setters = g[key]))
|
|
5128
|
-
setters = g[key] = [];
|
|
5026
|
+
if (!(setters = g[key])) setters = g[key] = [];
|
|
5129
5027
|
setters.push(setter);
|
|
5130
5028
|
return (v) => {
|
|
5131
|
-
if (setters.length > 1)
|
|
5132
|
-
|
|
5133
|
-
else
|
|
5134
|
-
setters[0](v);
|
|
5029
|
+
if (setters.length > 1) setters.forEach((set) => set(v));
|
|
5030
|
+
else setters[0](v);
|
|
5135
5031
|
};
|
|
5136
5032
|
};
|
|
5137
5033
|
internalSetCurrentInstance = registerGlobalSetter(
|
|
@@ -5274,7 +5170,7 @@ function createSetupContext(instance) {
|
|
|
5274
5170
|
};
|
|
5275
5171
|
}
|
|
5276
5172
|
}
|
|
5277
|
-
function
|
|
5173
|
+
function getComponentPublicInstance(instance) {
|
|
5278
5174
|
if (instance.exposed) {
|
|
5279
5175
|
return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
|
|
5280
5176
|
get(target, key) {
|
|
@@ -5288,6 +5184,8 @@ function getExposeProxy(instance) {
|
|
|
5288
5184
|
return key in target || key in publicPropertiesMap;
|
|
5289
5185
|
}
|
|
5290
5186
|
}));
|
|
5187
|
+
} else {
|
|
5188
|
+
return instance.proxy;
|
|
5291
5189
|
}
|
|
5292
5190
|
}
|
|
5293
5191
|
const classifyRE = /(?:^|[-_])(\w)/g;
|
|
@@ -5344,12 +5242,12 @@ function h(type, propsOrChildren, children) {
|
|
|
5344
5242
|
return createVNode(type, propsOrChildren, children);
|
|
5345
5243
|
}
|
|
5346
5244
|
}
|
|
5347
|
-
const version = "3.4.
|
|
5245
|
+
const version = "3.4.30";
|
|
5348
5246
|
|
|
5349
5247
|
/* Injected with object hook! */
|
|
5350
5248
|
|
|
5351
5249
|
/**
|
|
5352
|
-
* @vue/runtime-dom v3.4.
|
|
5250
|
+
* @vue/runtime-dom v3.4.30
|
|
5353
5251
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5354
5252
|
* @license MIT
|
|
5355
5253
|
**/
|
|
@@ -5368,7 +5266,7 @@ const nodeOps = {
|
|
|
5368
5266
|
}
|
|
5369
5267
|
},
|
|
5370
5268
|
createElement: (tag, namespace, is, props) => {
|
|
5371
|
-
const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag,
|
|
5269
|
+
const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
|
|
5372
5270
|
if (tag === "select" && props && props.multiple != null) {
|
|
5373
5271
|
el.setAttribute("multiple", props.multiple);
|
|
5374
5272
|
}
|
|
@@ -5397,8 +5295,7 @@ const nodeOps = {
|
|
|
5397
5295
|
if (start && (start === end || start.nextSibling)) {
|
|
5398
5296
|
while (true) {
|
|
5399
5297
|
parent.insertBefore(start.cloneNode(true), anchor);
|
|
5400
|
-
if (start === end || !(start = start.nextSibling))
|
|
5401
|
-
break;
|
|
5298
|
+
if (start === end || !(start = start.nextSibling)) break;
|
|
5402
5299
|
}
|
|
5403
5300
|
} else {
|
|
5404
5301
|
templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
|
|
@@ -5491,8 +5388,7 @@ function setStyle(style, name, val) {
|
|
|
5491
5388
|
if (isArray$1(val)) {
|
|
5492
5389
|
val.forEach((v) => setStyle(style, name, v));
|
|
5493
5390
|
} else {
|
|
5494
|
-
if (val == null)
|
|
5495
|
-
val = "";
|
|
5391
|
+
if (val == null) val = "";
|
|
5496
5392
|
if (name.startsWith("--")) {
|
|
5497
5393
|
style.setProperty(name, val);
|
|
5498
5394
|
} else {
|
|
@@ -5530,7 +5426,7 @@ function autoPrefix(style, rawName) {
|
|
|
5530
5426
|
return rawName;
|
|
5531
5427
|
}
|
|
5532
5428
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
5533
|
-
function patchAttr(el, key, value, isSVG, instance) {
|
|
5429
|
+
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
5534
5430
|
if (isSVG && key.startsWith("xlink:")) {
|
|
5535
5431
|
if (value == null) {
|
|
5536
5432
|
el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
@@ -5538,11 +5434,13 @@ function patchAttr(el, key, value, isSVG, instance) {
|
|
|
5538
5434
|
el.setAttributeNS(xlinkNS, key, value);
|
|
5539
5435
|
}
|
|
5540
5436
|
} else {
|
|
5541
|
-
const isBoolean = isSpecialBooleanAttr(key);
|
|
5542
5437
|
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
5543
5438
|
el.removeAttribute(key);
|
|
5544
5439
|
} else {
|
|
5545
|
-
el.setAttribute(
|
|
5440
|
+
el.setAttribute(
|
|
5441
|
+
key,
|
|
5442
|
+
isBoolean ? "" : isSymbol(value) ? String(value) : value
|
|
5443
|
+
);
|
|
5546
5444
|
}
|
|
5547
5445
|
}
|
|
5548
5446
|
}
|
|
@@ -5558,7 +5456,7 @@ function patchDOMProp(el, key, value, prevChildren, parentComponent, parentSuspe
|
|
|
5558
5456
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
5559
5457
|
!tag.includes("-")) {
|
|
5560
5458
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
5561
|
-
const newValue = value == null ? "" : value;
|
|
5459
|
+
const newValue = value == null ? "" : String(value);
|
|
5562
5460
|
if (oldValue !== newValue || !("_value" in el)) {
|
|
5563
5461
|
el.value = newValue;
|
|
5564
5462
|
}
|
|
@@ -5684,6 +5582,9 @@ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, paren
|
|
|
5684
5582
|
parentSuspense,
|
|
5685
5583
|
unmountChildren
|
|
5686
5584
|
);
|
|
5585
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
5586
|
+
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
5587
|
+
}
|
|
5687
5588
|
} else {
|
|
5688
5589
|
if (key === "true-value") {
|
|
5689
5590
|
el._trueValue = nextValue;
|
|
@@ -5736,8 +5637,7 @@ const createApp = (...args) => {
|
|
|
5736
5637
|
const { mount } = app;
|
|
5737
5638
|
app.mount = (containerOrSelector) => {
|
|
5738
5639
|
const container = normalizeContainer(containerOrSelector);
|
|
5739
|
-
if (!container)
|
|
5740
|
-
return;
|
|
5640
|
+
if (!container) return;
|
|
5741
5641
|
const component = app._component;
|
|
5742
5642
|
if (!isFunction(component) && !component.render && !component.template) {
|
|
5743
5643
|
component.template = container.innerHTML;
|
|
@@ -5770,105 +5670,8 @@ function normalizeContainer(container) {
|
|
|
5770
5670
|
|
|
5771
5671
|
/* Injected with object hook! */
|
|
5772
5672
|
|
|
5773
|
-
const scriptRel = 'modulepreload';const assetsURL = function(dep, importerUrl) { return new URL(dep, importerUrl).href };const seen = {};const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
5774
|
-
let promise = Promise.resolve();
|
|
5775
|
-
// @ts-expect-error true will be replaced with boolean later
|
|
5776
|
-
if (true && deps && deps.length > 0) {
|
|
5777
|
-
const links = document.getElementsByTagName('link');
|
|
5778
|
-
const cspNonceMeta = document.querySelector('meta[property=csp-nonce]');
|
|
5779
|
-
// `.nonce` should be used to get along with nonce hiding (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/nonce#accessing_nonces_and_nonce_hiding)
|
|
5780
|
-
// Firefox 67-74 uses modern chunks and supports CSP nonce, but does not support `.nonce`
|
|
5781
|
-
// in that case fallback to getAttribute
|
|
5782
|
-
const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute('nonce');
|
|
5783
|
-
promise = Promise.all(deps.map((dep) => {
|
|
5784
|
-
// @ts-expect-error assetsURL is declared before preload.toString()
|
|
5785
|
-
dep = assetsURL(dep, importerUrl);
|
|
5786
|
-
if (dep in seen)
|
|
5787
|
-
return;
|
|
5788
|
-
seen[dep] = true;
|
|
5789
|
-
const isCss = dep.endsWith('.css');
|
|
5790
|
-
const cssSelector = isCss ? '[rel="stylesheet"]' : '';
|
|
5791
|
-
const isBaseRelative = !!importerUrl;
|
|
5792
|
-
// check if the file is already preloaded by SSR markup
|
|
5793
|
-
if (isBaseRelative) {
|
|
5794
|
-
// When isBaseRelative is true then we have `importerUrl` and `dep` is
|
|
5795
|
-
// already converted to an absolute URL by the `assetsURL` function
|
|
5796
|
-
for (let i = links.length - 1; i >= 0; i--) {
|
|
5797
|
-
const link = links[i];
|
|
5798
|
-
// The `links[i].href` is an absolute URL thanks to browser doing the work
|
|
5799
|
-
// for us. See https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes:idl-domstring-5
|
|
5800
|
-
if (link.href === dep && (!isCss || link.rel === 'stylesheet')) {
|
|
5801
|
-
return;
|
|
5802
|
-
}
|
|
5803
|
-
}
|
|
5804
|
-
}
|
|
5805
|
-
else if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
|
|
5806
|
-
return;
|
|
5807
|
-
}
|
|
5808
|
-
const link = document.createElement('link');
|
|
5809
|
-
link.rel = isCss ? 'stylesheet' : scriptRel;
|
|
5810
|
-
if (!isCss) {
|
|
5811
|
-
link.as = 'script';
|
|
5812
|
-
link.crossOrigin = '';
|
|
5813
|
-
}
|
|
5814
|
-
link.href = dep;
|
|
5815
|
-
if (cspNonce) {
|
|
5816
|
-
link.setAttribute('nonce', cspNonce);
|
|
5817
|
-
}
|
|
5818
|
-
document.head.appendChild(link);
|
|
5819
|
-
if (isCss) {
|
|
5820
|
-
return new Promise((res, rej) => {
|
|
5821
|
-
link.addEventListener('load', res);
|
|
5822
|
-
link.addEventListener('error', () => rej(new Error(`Unable to preload CSS for ${dep}`)));
|
|
5823
|
-
});
|
|
5824
|
-
}
|
|
5825
|
-
}));
|
|
5826
|
-
}
|
|
5827
|
-
return promise
|
|
5828
|
-
.then(() => baseModule())
|
|
5829
|
-
.catch((err) => {
|
|
5830
|
-
const e = new Event('vite:preloadError', { cancelable: true });
|
|
5831
|
-
// @ts-expect-error custom payload
|
|
5832
|
-
e.payload = err;
|
|
5833
|
-
window.dispatchEvent(e);
|
|
5834
|
-
if (!e.defaultPrevented) {
|
|
5835
|
-
throw err;
|
|
5836
|
-
}
|
|
5837
|
-
});
|
|
5838
|
-
};
|
|
5839
|
-
/* Injected with object hook! */
|
|
5840
|
-
|
|
5841
|
-
const routes = [
|
|
5842
|
-
{
|
|
5843
|
-
path: '/',
|
|
5844
|
-
name: '/',
|
|
5845
|
-
component: () => __vitePreload(() => import('./index-BRTQkmk7.js'),true?__vite__mapDeps([0,1,2]):void 0,import.meta.url),
|
|
5846
|
-
/* no children */
|
|
5847
|
-
},
|
|
5848
|
-
{
|
|
5849
|
-
path: '/about',
|
|
5850
|
-
name: '/about',
|
|
5851
|
-
component: () => __vitePreload(() => import('./about-DwWwcIBI.js'),true?__vite__mapDeps([3,1]):void 0,import.meta.url),
|
|
5852
|
-
/* no children */
|
|
5853
|
-
},
|
|
5854
|
-
{
|
|
5855
|
-
path: '/categories',
|
|
5856
|
-
name: '/categories',
|
|
5857
|
-
component: () => __vitePreload(() => import('./categories-CuWZw3k9.js'),true?__vite__mapDeps([4,1]):void 0,import.meta.url),
|
|
5858
|
-
/* no children */
|
|
5859
|
-
},
|
|
5860
|
-
{
|
|
5861
|
-
path: '/tags',
|
|
5862
|
-
name: '/tags',
|
|
5863
|
-
component: () => __vitePreload(() => import('./tags-BDSDogY-.js'),true?__vite__mapDeps([5,1]):void 0,import.meta.url),
|
|
5864
|
-
/* no children */
|
|
5865
|
-
}
|
|
5866
|
-
];
|
|
5867
|
-
|
|
5868
|
-
/* Injected with object hook! */
|
|
5869
|
-
|
|
5870
5673
|
/*!
|
|
5871
|
-
* vue-router v4.
|
|
5674
|
+
* vue-router v4.4.0
|
|
5872
5675
|
* (c) 2024 Eduardo San Martin Morote
|
|
5873
5676
|
* @license MIT
|
|
5874
5677
|
*/
|
|
@@ -6011,6 +5814,18 @@ function resolveRelativePath(to, from) {
|
|
|
6011
5814
|
}
|
|
6012
5815
|
return fromSegments.slice(0, position).join("/") + "/" + toSegments.slice(toPosition).join("/");
|
|
6013
5816
|
}
|
|
5817
|
+
const START_LOCATION_NORMALIZED = {
|
|
5818
|
+
path: "/",
|
|
5819
|
+
// TODO: could we use a symbol in the future?
|
|
5820
|
+
name: void 0,
|
|
5821
|
+
params: {},
|
|
5822
|
+
query: {},
|
|
5823
|
+
hash: "",
|
|
5824
|
+
fullPath: "/",
|
|
5825
|
+
matched: [],
|
|
5826
|
+
meta: {},
|
|
5827
|
+
redirectedFrom: void 0
|
|
5828
|
+
};
|
|
6014
5829
|
var NavigationType;
|
|
6015
5830
|
(function(NavigationType2) {
|
|
6016
5831
|
NavigationType2["pop"] = "pop";
|
|
@@ -6279,17 +6094,6 @@ function isRouteLocation(route) {
|
|
|
6279
6094
|
function isRouteName(name) {
|
|
6280
6095
|
return typeof name === "string" || typeof name === "symbol";
|
|
6281
6096
|
}
|
|
6282
|
-
const START_LOCATION_NORMALIZED = {
|
|
6283
|
-
path: "/",
|
|
6284
|
-
name: void 0,
|
|
6285
|
-
params: {},
|
|
6286
|
-
query: {},
|
|
6287
|
-
hash: "",
|
|
6288
|
-
fullPath: "/",
|
|
6289
|
-
matched: [],
|
|
6290
|
-
meta: {},
|
|
6291
|
-
redirectedFrom: void 0
|
|
6292
|
-
};
|
|
6293
6097
|
const NavigationFailureSymbol = Symbol("");
|
|
6294
6098
|
var NavigationFailureType;
|
|
6295
6099
|
(function(NavigationFailureType2) {
|
|
@@ -6658,6 +6462,9 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
6658
6462
|
if (isRootAdd && record.name && !isAliasRecord(matcher))
|
|
6659
6463
|
removeRoute(record.name);
|
|
6660
6464
|
}
|
|
6465
|
+
if (isMatchable(matcher)) {
|
|
6466
|
+
insertMatcher(matcher);
|
|
6467
|
+
}
|
|
6661
6468
|
if (mainNormalizedRecord.children) {
|
|
6662
6469
|
const children = mainNormalizedRecord.children;
|
|
6663
6470
|
for (let i = 0; i < children.length; i++) {
|
|
@@ -6665,9 +6472,6 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
6665
6472
|
}
|
|
6666
6473
|
}
|
|
6667
6474
|
originalRecord = originalRecord || matcher;
|
|
6668
|
-
if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {
|
|
6669
|
-
insertMatcher(matcher);
|
|
6670
|
-
}
|
|
6671
6475
|
}
|
|
6672
6476
|
return originalMatcher ? () => {
|
|
6673
6477
|
removeRoute(originalMatcher);
|
|
@@ -6697,12 +6501,8 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
6697
6501
|
return matchers;
|
|
6698
6502
|
}
|
|
6699
6503
|
function insertMatcher(matcher) {
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
// https://github.com/vuejs/router/issues/1124
|
|
6703
|
-
(matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))
|
|
6704
|
-
i++;
|
|
6705
|
-
matchers.splice(i, 0, matcher);
|
|
6504
|
+
const index = findInsertionIndex(matcher, matchers);
|
|
6505
|
+
matchers.splice(index, 0, matcher);
|
|
6706
6506
|
if (matcher.record.name && !isAliasRecord(matcher))
|
|
6707
6507
|
matcherMap.set(matcher.record.name, matcher);
|
|
6708
6508
|
}
|
|
@@ -6764,7 +6564,18 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
6764
6564
|
};
|
|
6765
6565
|
}
|
|
6766
6566
|
routes.forEach((route) => addRoute(route));
|
|
6767
|
-
|
|
6567
|
+
function clearRoutes() {
|
|
6568
|
+
matchers.length = 0;
|
|
6569
|
+
matcherMap.clear();
|
|
6570
|
+
}
|
|
6571
|
+
return {
|
|
6572
|
+
addRoute,
|
|
6573
|
+
resolve,
|
|
6574
|
+
removeRoute,
|
|
6575
|
+
clearRoutes,
|
|
6576
|
+
getRoutes,
|
|
6577
|
+
getRecordMatcher
|
|
6578
|
+
};
|
|
6768
6579
|
}
|
|
6769
6580
|
function paramsFromLocation(params, keys) {
|
|
6770
6581
|
const newParams = {};
|
|
@@ -6820,8 +6631,35 @@ function mergeOptions(defaults, partialOptions) {
|
|
|
6820
6631
|
}
|
|
6821
6632
|
return options;
|
|
6822
6633
|
}
|
|
6823
|
-
function
|
|
6824
|
-
|
|
6634
|
+
function findInsertionIndex(matcher, matchers) {
|
|
6635
|
+
let lower = 0;
|
|
6636
|
+
let upper = matchers.length;
|
|
6637
|
+
while (lower !== upper) {
|
|
6638
|
+
const mid = lower + upper >> 1;
|
|
6639
|
+
const sortOrder = comparePathParserScore(matcher, matchers[mid]);
|
|
6640
|
+
if (sortOrder < 0) {
|
|
6641
|
+
upper = mid;
|
|
6642
|
+
} else {
|
|
6643
|
+
lower = mid + 1;
|
|
6644
|
+
}
|
|
6645
|
+
}
|
|
6646
|
+
const insertionAncestor = getInsertionAncestor(matcher);
|
|
6647
|
+
if (insertionAncestor) {
|
|
6648
|
+
upper = matchers.lastIndexOf(insertionAncestor, upper - 1);
|
|
6649
|
+
}
|
|
6650
|
+
return upper;
|
|
6651
|
+
}
|
|
6652
|
+
function getInsertionAncestor(matcher) {
|
|
6653
|
+
let ancestor = matcher;
|
|
6654
|
+
while (ancestor = ancestor.parent) {
|
|
6655
|
+
if (isMatchable(ancestor) && comparePathParserScore(matcher, ancestor) === 0) {
|
|
6656
|
+
return ancestor;
|
|
6657
|
+
}
|
|
6658
|
+
}
|
|
6659
|
+
return;
|
|
6660
|
+
}
|
|
6661
|
+
function isMatchable({ record }) {
|
|
6662
|
+
return !!(record.name || record.components && Object.keys(record.components).length || record.redirect);
|
|
6825
6663
|
}
|
|
6826
6664
|
function parseQuery(search) {
|
|
6827
6665
|
const query = {};
|
|
@@ -7588,6 +7426,7 @@ function createRouter$1(options) {
|
|
|
7588
7426
|
listening: true,
|
|
7589
7427
|
addRoute,
|
|
7590
7428
|
removeRoute,
|
|
7429
|
+
clearRoutes: matcher.clearRoutes,
|
|
7591
7430
|
hasRoute,
|
|
7592
7431
|
getRoutes,
|
|
7593
7432
|
resolve,
|
|
@@ -7675,11 +7514,14 @@ function extractChangingRecords(to, from) {
|
|
|
7675
7514
|
/* Injected with object hook! */
|
|
7676
7515
|
|
|
7677
7516
|
function createRouter(options) {
|
|
7678
|
-
const { extendRoutes } = options;
|
|
7517
|
+
const { extendRoutes, routes } = options;
|
|
7679
7518
|
// use Object.assign for better browser support
|
|
7519
|
+
if (extendRoutes) {
|
|
7520
|
+
console.warn('"extendRoutes()" is deprecated, please modify the routes directly. See');
|
|
7521
|
+
}
|
|
7680
7522
|
const router = createRouter$1(Object.assign(
|
|
7681
7523
|
options,
|
|
7682
|
-
{ routes: typeof extendRoutes === 'function' ? extendRoutes(routes) : routes },
|
|
7524
|
+
{ routes: typeof extendRoutes === 'function' ? (extendRoutes(routes) || routes) : routes },
|
|
7683
7525
|
));
|
|
7684
7526
|
|
|
7685
7527
|
return router
|
|
@@ -7694,16 +7536,9 @@ const pageData = ref();
|
|
|
7694
7536
|
|
|
7695
7537
|
/* Injected with object hook! */
|
|
7696
7538
|
|
|
7697
|
-
function getAppWindow() {
|
|
7698
|
-
return window.parent.parent;
|
|
7699
|
-
}
|
|
7700
7539
|
function getWindowProperty(property) {
|
|
7701
7540
|
return window.parent.parent[property];
|
|
7702
7541
|
}
|
|
7703
|
-
function getGlobalValaxyProperty(property) {
|
|
7704
|
-
const $valaxy = window.parent.parent.$valaxy;
|
|
7705
|
-
return $valaxy[property];
|
|
7706
|
-
}
|
|
7707
7542
|
|
|
7708
7543
|
/* Injected with object hook! */
|
|
7709
7544
|
|
|
@@ -7727,7 +7562,7 @@ function initDevtoolsClient() {
|
|
|
7727
7562
|
|
|
7728
7563
|
/* Injected with object hook! */
|
|
7729
7564
|
|
|
7730
|
-
|
|
7565
|
+
document.body.getAttribute("data-valaxy-devtools-mode") === "BUILD";
|
|
7731
7566
|
|
|
7732
7567
|
/* Injected with object hook! */
|
|
7733
7568
|
|
|
@@ -7764,5 +7599,3 @@ app.mount("#app");
|
|
|
7764
7599
|
/* Injected with object hook! */
|
|
7765
7600
|
|
|
7766
7601
|
/* Injected with object hook! */
|
|
7767
|
-
|
|
7768
|
-
export { h as A, normalizeStyle as B, isStaticMode as C, Fragment as F, createElementBlock as a, createCommentVNode as b, computed as c, defineComponent as d, ref as e, onMounted as f, getAppWindow as g, createBaseVNode as h, resolveComponent as i, createBlock as j, renderList as k, createTextVNode as l, createVNode as m, normalizeClass as n, openBlock as o, pageData as p, toRaw as q, renderSlot as r, frontmatter as s, toDisplayString as t, unref as u, getWindowProperty as v, withCtx as w, getGlobalValaxyProperty as x, activePath as y, devtoolsRouter as z };
|