@valaxyjs/devtools 0.0.1 → 0.18.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/client/assets/about-SiRA-rr8.js +11 -0
- package/dist/client/assets/categories-XFPOy2yC.js +11 -0
- package/dist/client/assets/index-51E08Ncj.js +522 -0
- package/dist/client/assets/{index-vPMPXhW9.js → index-8_TdlA6f.js} +304 -658
- package/dist/client/assets/{index-UJyf60Kd.css → index-ZDzLlgt_.css} +5 -1
- package/dist/client/assets/tags-pRAQg_EK.js +11 -0
- package/dist/client/index.html +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +7 -2
- package/src/client/App.vue +1 -18
- package/src/client/components/PageFrontmatter.vue +15 -0
- package/src/client/components/VDPostList.vue +51 -0
- package/src/client/components.d.ts +2 -0
- package/src/client/composables/app.ts +3 -0
- package/src/client/index.html +1 -1
- package/src/client/main.ts +6 -3
- package/src/client/pages/about.vue +5 -0
- package/src/client/pages/categories.vue +5 -0
- package/src/client/pages/index.vue +36 -3
- package/src/client/pages/tags.vue +5 -0
- package/src/client/styles/index.css +4 -0
- package/src/client/typed-routes.d.ts +4 -0
- package/src/client/types/index.ts +3 -0
- package/src/client/utils/api.ts +18 -0
- package/src/client/utils/get.ts +19 -0
- package/src/client/utils/index.ts +3 -0
- package/src/client/vite.config.ts +10 -13
- package/src/node/index.ts +1 -1
- package/uno.config.ts +0 -3
|
@@ -44,7 +44,7 @@ true&&(function polyfill() {
|
|
|
44
44
|
/* Injected with object hook! */
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
* @vue/shared v3.4.
|
|
47
|
+
* @vue/shared v3.4.19
|
|
48
48
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
49
49
|
* @license MIT
|
|
50
50
|
**/
|
|
@@ -129,10 +129,6 @@ const looseToNumber = (val) => {
|
|
|
129
129
|
const n = parseFloat(val);
|
|
130
130
|
return isNaN(n) ? val : n;
|
|
131
131
|
};
|
|
132
|
-
const toNumber = (val) => {
|
|
133
|
-
const n = isString(val) ? Number(val) : NaN;
|
|
134
|
-
return isNaN(n) ? val : n;
|
|
135
|
-
};
|
|
136
132
|
let _globalThis;
|
|
137
133
|
const getGlobalThis = () => {
|
|
138
134
|
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
@@ -192,11 +188,42 @@ const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
|
192
188
|
function includeBooleanAttr(value) {
|
|
193
189
|
return !!value || value === "";
|
|
194
190
|
}
|
|
191
|
+
const toDisplayString = (val) => {
|
|
192
|
+
return isString(val) ? val : val == null ? "" : isArray$1(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
193
|
+
};
|
|
194
|
+
const replacer = (_key, val) => {
|
|
195
|
+
if (val && val.__v_isRef) {
|
|
196
|
+
return replacer(_key, val.value);
|
|
197
|
+
} else if (isMap(val)) {
|
|
198
|
+
return {
|
|
199
|
+
[`Map(${val.size})`]: [...val.entries()].reduce(
|
|
200
|
+
(entries, [key, val2], i) => {
|
|
201
|
+
entries[stringifySymbol(key, i) + " =>"] = val2;
|
|
202
|
+
return entries;
|
|
203
|
+
},
|
|
204
|
+
{}
|
|
205
|
+
)
|
|
206
|
+
};
|
|
207
|
+
} else if (isSet(val)) {
|
|
208
|
+
return {
|
|
209
|
+
[`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
|
|
210
|
+
};
|
|
211
|
+
} else if (isSymbol(val)) {
|
|
212
|
+
return stringifySymbol(val);
|
|
213
|
+
} else if (isObject(val) && !isArray$1(val) && !isPlainObject(val)) {
|
|
214
|
+
return String(val);
|
|
215
|
+
}
|
|
216
|
+
return val;
|
|
217
|
+
};
|
|
218
|
+
const stringifySymbol = (v, i = "") => {
|
|
219
|
+
var _a;
|
|
220
|
+
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
|
221
|
+
};
|
|
195
222
|
|
|
196
223
|
/* Injected with object hook! */
|
|
197
224
|
|
|
198
225
|
/**
|
|
199
|
-
* @vue/reactivity v3.4.
|
|
226
|
+
* @vue/reactivity v3.4.19
|
|
200
227
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
201
228
|
* @license MIT
|
|
202
229
|
**/
|
|
@@ -284,7 +311,7 @@ class ReactiveEffect {
|
|
|
284
311
|
this.scheduler = scheduler;
|
|
285
312
|
this.active = true;
|
|
286
313
|
this.deps = [];
|
|
287
|
-
this._dirtyLevel =
|
|
314
|
+
this._dirtyLevel = 4;
|
|
288
315
|
this._trackId = 0;
|
|
289
316
|
this._runnings = 0;
|
|
290
317
|
this._shouldSchedule = false;
|
|
@@ -292,26 +319,27 @@ class ReactiveEffect {
|
|
|
292
319
|
recordEffectScope(this, scope);
|
|
293
320
|
}
|
|
294
321
|
get dirty() {
|
|
295
|
-
if (this._dirtyLevel ===
|
|
322
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
323
|
+
this._dirtyLevel = 1;
|
|
296
324
|
pauseTracking();
|
|
297
325
|
for (let i = 0; i < this._depsLength; i++) {
|
|
298
326
|
const dep = this.deps[i];
|
|
299
327
|
if (dep.computed) {
|
|
300
328
|
triggerComputed(dep.computed);
|
|
301
|
-
if (this._dirtyLevel >=
|
|
329
|
+
if (this._dirtyLevel >= 4) {
|
|
302
330
|
break;
|
|
303
331
|
}
|
|
304
332
|
}
|
|
305
333
|
}
|
|
306
|
-
if (this._dirtyLevel
|
|
334
|
+
if (this._dirtyLevel === 1) {
|
|
307
335
|
this._dirtyLevel = 0;
|
|
308
336
|
}
|
|
309
337
|
resetTracking();
|
|
310
338
|
}
|
|
311
|
-
return this._dirtyLevel >=
|
|
339
|
+
return this._dirtyLevel >= 4;
|
|
312
340
|
}
|
|
313
341
|
set dirty(v) {
|
|
314
|
-
this._dirtyLevel = v ?
|
|
342
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
315
343
|
}
|
|
316
344
|
run() {
|
|
317
345
|
this._dirtyLevel = 0;
|
|
@@ -351,7 +379,7 @@ function preCleanupEffect(effect2) {
|
|
|
351
379
|
effect2._depsLength = 0;
|
|
352
380
|
}
|
|
353
381
|
function postCleanupEffect(effect2) {
|
|
354
|
-
if (effect2.deps
|
|
382
|
+
if (effect2.deps.length > effect2._depsLength) {
|
|
355
383
|
for (let i = effect2._depsLength; i < effect2.deps.length; i++) {
|
|
356
384
|
cleanupDepEffect(effect2.deps[i], effect2);
|
|
357
385
|
}
|
|
@@ -405,26 +433,23 @@ const queueEffectSchedulers = [];
|
|
|
405
433
|
function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
406
434
|
pauseScheduling();
|
|
407
435
|
for (const effect2 of dep.keys()) {
|
|
408
|
-
|
|
409
|
-
|
|
436
|
+
let tracking;
|
|
437
|
+
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
438
|
+
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
410
439
|
effect2._dirtyLevel = dirtyLevel;
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
440
|
+
}
|
|
441
|
+
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
442
|
+
effect2.trigger();
|
|
443
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
444
|
+
effect2._shouldSchedule = false;
|
|
445
|
+
if (effect2.scheduler) {
|
|
446
|
+
queueEffectSchedulers.push(effect2.scheduler);
|
|
447
|
+
}
|
|
414
448
|
}
|
|
415
449
|
}
|
|
416
450
|
}
|
|
417
|
-
scheduleEffects(dep);
|
|
418
451
|
resetScheduling();
|
|
419
452
|
}
|
|
420
|
-
function scheduleEffects(dep) {
|
|
421
|
-
for (const effect2 of dep.keys()) {
|
|
422
|
-
if (effect2.scheduler && effect2._shouldSchedule && (!effect2._runnings || effect2.allowRecurse) && dep.get(effect2) === effect2._trackId) {
|
|
423
|
-
effect2._shouldSchedule = false;
|
|
424
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
453
|
const createDep = (cleanup, computed2) => {
|
|
429
454
|
const dep = /* @__PURE__ */ new Map();
|
|
430
455
|
dep.cleanup = cleanup;
|
|
@@ -499,7 +524,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
499
524
|
if (dep) {
|
|
500
525
|
triggerEffects(
|
|
501
526
|
dep,
|
|
502
|
-
|
|
527
|
+
4);
|
|
503
528
|
}
|
|
504
529
|
}
|
|
505
530
|
resetScheduling();
|
|
@@ -1019,7 +1044,9 @@ function toRaw(observed) {
|
|
|
1019
1044
|
return raw ? toRaw(raw) : observed;
|
|
1020
1045
|
}
|
|
1021
1046
|
function markRaw(value) {
|
|
1022
|
-
|
|
1047
|
+
if (Object.isExtensible(value)) {
|
|
1048
|
+
def(value, "__v_skip", true);
|
|
1049
|
+
}
|
|
1023
1050
|
return value;
|
|
1024
1051
|
}
|
|
1025
1052
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
@@ -1032,8 +1059,10 @@ class ComputedRefImpl {
|
|
|
1032
1059
|
this["__v_isReadonly"] = false;
|
|
1033
1060
|
this.effect = new ReactiveEffect(
|
|
1034
1061
|
() => getter(this._value),
|
|
1035
|
-
() => triggerRefValue(
|
|
1036
|
-
|
|
1062
|
+
() => triggerRefValue(
|
|
1063
|
+
this,
|
|
1064
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1065
|
+
)
|
|
1037
1066
|
);
|
|
1038
1067
|
this.effect.computed = this;
|
|
1039
1068
|
this.effect.active = this._cacheable = !isSSR;
|
|
@@ -1041,14 +1070,12 @@ class ComputedRefImpl {
|
|
|
1041
1070
|
}
|
|
1042
1071
|
get value() {
|
|
1043
1072
|
const self = toRaw(this);
|
|
1044
|
-
if (!self._cacheable || self.effect.dirty) {
|
|
1045
|
-
|
|
1046
|
-
triggerRefValue(self, 2);
|
|
1047
|
-
}
|
|
1073
|
+
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1074
|
+
triggerRefValue(self, 4);
|
|
1048
1075
|
}
|
|
1049
1076
|
trackRefValue(self);
|
|
1050
|
-
if (self.effect._dirtyLevel >=
|
|
1051
|
-
triggerRefValue(self,
|
|
1077
|
+
if (self.effect._dirtyLevel >= 2) {
|
|
1078
|
+
triggerRefValue(self, 2);
|
|
1052
1079
|
}
|
|
1053
1080
|
return self._value;
|
|
1054
1081
|
}
|
|
@@ -1079,17 +1106,18 @@ function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
|
1079
1106
|
return cRef;
|
|
1080
1107
|
}
|
|
1081
1108
|
function trackRefValue(ref2) {
|
|
1109
|
+
var _a;
|
|
1082
1110
|
if (shouldTrack && activeEffect) {
|
|
1083
1111
|
ref2 = toRaw(ref2);
|
|
1084
1112
|
trackEffect(
|
|
1085
1113
|
activeEffect,
|
|
1086
|
-
ref2.dep
|
|
1114
|
+
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1087
1115
|
() => ref2.dep = void 0,
|
|
1088
1116
|
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1089
|
-
))
|
|
1117
|
+
));
|
|
1090
1118
|
}
|
|
1091
1119
|
}
|
|
1092
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1120
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal) {
|
|
1093
1121
|
ref2 = toRaw(ref2);
|
|
1094
1122
|
const dep = ref2.dep;
|
|
1095
1123
|
if (dep) {
|
|
@@ -1131,7 +1159,7 @@ class RefImpl {
|
|
|
1131
1159
|
if (hasChanged(newVal, this._rawValue)) {
|
|
1132
1160
|
this._rawValue = newVal;
|
|
1133
1161
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1134
|
-
triggerRefValue(this,
|
|
1162
|
+
triggerRefValue(this, 4);
|
|
1135
1163
|
}
|
|
1136
1164
|
}
|
|
1137
1165
|
}
|
|
@@ -1157,7 +1185,7 @@ function proxyRefs(objectWithRefs) {
|
|
|
1157
1185
|
/* Injected with object hook! */
|
|
1158
1186
|
|
|
1159
1187
|
/**
|
|
1160
|
-
* @vue/runtime-core v3.4.
|
|
1188
|
+
* @vue/runtime-core v3.4.19
|
|
1161
1189
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1162
1190
|
* @license MIT
|
|
1163
1191
|
**/
|
|
@@ -1260,13 +1288,11 @@ function formatProp(key, value, raw) {
|
|
|
1260
1288
|
}
|
|
1261
1289
|
}
|
|
1262
1290
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
1263
|
-
let res;
|
|
1264
1291
|
try {
|
|
1265
|
-
|
|
1292
|
+
return args ? fn(...args) : fn();
|
|
1266
1293
|
} catch (err) {
|
|
1267
1294
|
handleError(err, instance, type);
|
|
1268
1295
|
}
|
|
1269
|
-
return res;
|
|
1270
1296
|
}
|
|
1271
1297
|
function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
1272
1298
|
if (isFunction(fn)) {
|
|
@@ -1686,24 +1712,6 @@ function renderComponentRoot(instance) {
|
|
|
1686
1712
|
setCurrentRenderingInstance(prev);
|
|
1687
1713
|
return result;
|
|
1688
1714
|
}
|
|
1689
|
-
function filterSingleRoot(children, recurse = true) {
|
|
1690
|
-
let singleRoot;
|
|
1691
|
-
for (let i = 0; i < children.length; i++) {
|
|
1692
|
-
const child = children[i];
|
|
1693
|
-
if (isVNode(child)) {
|
|
1694
|
-
if (child.type !== Comment || child.children === "v-if") {
|
|
1695
|
-
if (singleRoot) {
|
|
1696
|
-
return;
|
|
1697
|
-
} else {
|
|
1698
|
-
singleRoot = child;
|
|
1699
|
-
}
|
|
1700
|
-
}
|
|
1701
|
-
} else {
|
|
1702
|
-
return;
|
|
1703
|
-
}
|
|
1704
|
-
}
|
|
1705
|
-
return singleRoot;
|
|
1706
|
-
}
|
|
1707
1715
|
const getFunctionalFallthrough = (attrs) => {
|
|
1708
1716
|
let res;
|
|
1709
1717
|
for (const key in attrs) {
|
|
@@ -1827,536 +1835,6 @@ function resolve(registry, name) {
|
|
|
1827
1835
|
return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);
|
|
1828
1836
|
}
|
|
1829
1837
|
const isSuspense = (type) => type.__isSuspense;
|
|
1830
|
-
let suspenseId = 0;
|
|
1831
|
-
const SuspenseImpl = {
|
|
1832
|
-
name: "Suspense",
|
|
1833
|
-
// In order to make Suspense tree-shakable, we need to avoid importing it
|
|
1834
|
-
// directly in the renderer. The renderer checks for the __isSuspense flag
|
|
1835
|
-
// on a vnode's type and calls the `process` method, passing in renderer
|
|
1836
|
-
// internals.
|
|
1837
|
-
__isSuspense: true,
|
|
1838
|
-
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
1839
|
-
if (n1 == null) {
|
|
1840
|
-
mountSuspense(
|
|
1841
|
-
n2,
|
|
1842
|
-
container,
|
|
1843
|
-
anchor,
|
|
1844
|
-
parentComponent,
|
|
1845
|
-
parentSuspense,
|
|
1846
|
-
namespace,
|
|
1847
|
-
slotScopeIds,
|
|
1848
|
-
optimized,
|
|
1849
|
-
rendererInternals
|
|
1850
|
-
);
|
|
1851
|
-
} else {
|
|
1852
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
1853
|
-
n2.suspense = n1.suspense;
|
|
1854
|
-
return;
|
|
1855
|
-
}
|
|
1856
|
-
patchSuspense(
|
|
1857
|
-
n1,
|
|
1858
|
-
n2,
|
|
1859
|
-
container,
|
|
1860
|
-
anchor,
|
|
1861
|
-
parentComponent,
|
|
1862
|
-
namespace,
|
|
1863
|
-
slotScopeIds,
|
|
1864
|
-
optimized,
|
|
1865
|
-
rendererInternals
|
|
1866
|
-
);
|
|
1867
|
-
}
|
|
1868
|
-
},
|
|
1869
|
-
hydrate: hydrateSuspense,
|
|
1870
|
-
create: createSuspenseBoundary,
|
|
1871
|
-
normalize: normalizeSuspenseChildren
|
|
1872
|
-
};
|
|
1873
|
-
const Suspense = SuspenseImpl;
|
|
1874
|
-
function triggerEvent(vnode, name) {
|
|
1875
|
-
const eventListener = vnode.props && vnode.props[name];
|
|
1876
|
-
if (isFunction(eventListener)) {
|
|
1877
|
-
eventListener();
|
|
1878
|
-
}
|
|
1879
|
-
}
|
|
1880
|
-
function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
1881
|
-
const {
|
|
1882
|
-
p: patch,
|
|
1883
|
-
o: { createElement }
|
|
1884
|
-
} = rendererInternals;
|
|
1885
|
-
const hiddenContainer = createElement("div");
|
|
1886
|
-
const suspense = vnode.suspense = createSuspenseBoundary(
|
|
1887
|
-
vnode,
|
|
1888
|
-
parentSuspense,
|
|
1889
|
-
parentComponent,
|
|
1890
|
-
container,
|
|
1891
|
-
hiddenContainer,
|
|
1892
|
-
anchor,
|
|
1893
|
-
namespace,
|
|
1894
|
-
slotScopeIds,
|
|
1895
|
-
optimized,
|
|
1896
|
-
rendererInternals
|
|
1897
|
-
);
|
|
1898
|
-
patch(
|
|
1899
|
-
null,
|
|
1900
|
-
suspense.pendingBranch = vnode.ssContent,
|
|
1901
|
-
hiddenContainer,
|
|
1902
|
-
null,
|
|
1903
|
-
parentComponent,
|
|
1904
|
-
suspense,
|
|
1905
|
-
namespace,
|
|
1906
|
-
slotScopeIds
|
|
1907
|
-
);
|
|
1908
|
-
if (suspense.deps > 0) {
|
|
1909
|
-
triggerEvent(vnode, "onPending");
|
|
1910
|
-
triggerEvent(vnode, "onFallback");
|
|
1911
|
-
patch(
|
|
1912
|
-
null,
|
|
1913
|
-
vnode.ssFallback,
|
|
1914
|
-
container,
|
|
1915
|
-
anchor,
|
|
1916
|
-
parentComponent,
|
|
1917
|
-
null,
|
|
1918
|
-
// fallback tree will not have suspense context
|
|
1919
|
-
namespace,
|
|
1920
|
-
slotScopeIds
|
|
1921
|
-
);
|
|
1922
|
-
setActiveBranch(suspense, vnode.ssFallback);
|
|
1923
|
-
} else {
|
|
1924
|
-
suspense.resolve(false, true);
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
1927
|
-
function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
|
|
1928
|
-
const suspense = n2.suspense = n1.suspense;
|
|
1929
|
-
suspense.vnode = n2;
|
|
1930
|
-
n2.el = n1.el;
|
|
1931
|
-
const newBranch = n2.ssContent;
|
|
1932
|
-
const newFallback = n2.ssFallback;
|
|
1933
|
-
const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
|
|
1934
|
-
if (pendingBranch) {
|
|
1935
|
-
suspense.pendingBranch = newBranch;
|
|
1936
|
-
if (isSameVNodeType(newBranch, pendingBranch)) {
|
|
1937
|
-
patch(
|
|
1938
|
-
pendingBranch,
|
|
1939
|
-
newBranch,
|
|
1940
|
-
suspense.hiddenContainer,
|
|
1941
|
-
null,
|
|
1942
|
-
parentComponent,
|
|
1943
|
-
suspense,
|
|
1944
|
-
namespace,
|
|
1945
|
-
slotScopeIds,
|
|
1946
|
-
optimized
|
|
1947
|
-
);
|
|
1948
|
-
if (suspense.deps <= 0) {
|
|
1949
|
-
suspense.resolve();
|
|
1950
|
-
} else if (isInFallback) {
|
|
1951
|
-
if (!isHydrating) {
|
|
1952
|
-
patch(
|
|
1953
|
-
activeBranch,
|
|
1954
|
-
newFallback,
|
|
1955
|
-
container,
|
|
1956
|
-
anchor,
|
|
1957
|
-
parentComponent,
|
|
1958
|
-
null,
|
|
1959
|
-
// fallback tree will not have suspense context
|
|
1960
|
-
namespace,
|
|
1961
|
-
slotScopeIds,
|
|
1962
|
-
optimized
|
|
1963
|
-
);
|
|
1964
|
-
setActiveBranch(suspense, newFallback);
|
|
1965
|
-
}
|
|
1966
|
-
}
|
|
1967
|
-
} else {
|
|
1968
|
-
suspense.pendingId = suspenseId++;
|
|
1969
|
-
if (isHydrating) {
|
|
1970
|
-
suspense.isHydrating = false;
|
|
1971
|
-
suspense.activeBranch = pendingBranch;
|
|
1972
|
-
} else {
|
|
1973
|
-
unmount(pendingBranch, parentComponent, suspense);
|
|
1974
|
-
}
|
|
1975
|
-
suspense.deps = 0;
|
|
1976
|
-
suspense.effects.length = 0;
|
|
1977
|
-
suspense.hiddenContainer = createElement("div");
|
|
1978
|
-
if (isInFallback) {
|
|
1979
|
-
patch(
|
|
1980
|
-
null,
|
|
1981
|
-
newBranch,
|
|
1982
|
-
suspense.hiddenContainer,
|
|
1983
|
-
null,
|
|
1984
|
-
parentComponent,
|
|
1985
|
-
suspense,
|
|
1986
|
-
namespace,
|
|
1987
|
-
slotScopeIds,
|
|
1988
|
-
optimized
|
|
1989
|
-
);
|
|
1990
|
-
if (suspense.deps <= 0) {
|
|
1991
|
-
suspense.resolve();
|
|
1992
|
-
} else {
|
|
1993
|
-
patch(
|
|
1994
|
-
activeBranch,
|
|
1995
|
-
newFallback,
|
|
1996
|
-
container,
|
|
1997
|
-
anchor,
|
|
1998
|
-
parentComponent,
|
|
1999
|
-
null,
|
|
2000
|
-
// fallback tree will not have suspense context
|
|
2001
|
-
namespace,
|
|
2002
|
-
slotScopeIds,
|
|
2003
|
-
optimized
|
|
2004
|
-
);
|
|
2005
|
-
setActiveBranch(suspense, newFallback);
|
|
2006
|
-
}
|
|
2007
|
-
} else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
|
|
2008
|
-
patch(
|
|
2009
|
-
activeBranch,
|
|
2010
|
-
newBranch,
|
|
2011
|
-
container,
|
|
2012
|
-
anchor,
|
|
2013
|
-
parentComponent,
|
|
2014
|
-
suspense,
|
|
2015
|
-
namespace,
|
|
2016
|
-
slotScopeIds,
|
|
2017
|
-
optimized
|
|
2018
|
-
);
|
|
2019
|
-
suspense.resolve(true);
|
|
2020
|
-
} else {
|
|
2021
|
-
patch(
|
|
2022
|
-
null,
|
|
2023
|
-
newBranch,
|
|
2024
|
-
suspense.hiddenContainer,
|
|
2025
|
-
null,
|
|
2026
|
-
parentComponent,
|
|
2027
|
-
suspense,
|
|
2028
|
-
namespace,
|
|
2029
|
-
slotScopeIds,
|
|
2030
|
-
optimized
|
|
2031
|
-
);
|
|
2032
|
-
if (suspense.deps <= 0) {
|
|
2033
|
-
suspense.resolve();
|
|
2034
|
-
}
|
|
2035
|
-
}
|
|
2036
|
-
}
|
|
2037
|
-
} else {
|
|
2038
|
-
if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
|
|
2039
|
-
patch(
|
|
2040
|
-
activeBranch,
|
|
2041
|
-
newBranch,
|
|
2042
|
-
container,
|
|
2043
|
-
anchor,
|
|
2044
|
-
parentComponent,
|
|
2045
|
-
suspense,
|
|
2046
|
-
namespace,
|
|
2047
|
-
slotScopeIds,
|
|
2048
|
-
optimized
|
|
2049
|
-
);
|
|
2050
|
-
setActiveBranch(suspense, newBranch);
|
|
2051
|
-
} else {
|
|
2052
|
-
triggerEvent(n2, "onPending");
|
|
2053
|
-
suspense.pendingBranch = newBranch;
|
|
2054
|
-
if (newBranch.shapeFlag & 512) {
|
|
2055
|
-
suspense.pendingId = newBranch.component.suspenseId;
|
|
2056
|
-
} else {
|
|
2057
|
-
suspense.pendingId = suspenseId++;
|
|
2058
|
-
}
|
|
2059
|
-
patch(
|
|
2060
|
-
null,
|
|
2061
|
-
newBranch,
|
|
2062
|
-
suspense.hiddenContainer,
|
|
2063
|
-
null,
|
|
2064
|
-
parentComponent,
|
|
2065
|
-
suspense,
|
|
2066
|
-
namespace,
|
|
2067
|
-
slotScopeIds,
|
|
2068
|
-
optimized
|
|
2069
|
-
);
|
|
2070
|
-
if (suspense.deps <= 0) {
|
|
2071
|
-
suspense.resolve();
|
|
2072
|
-
} else {
|
|
2073
|
-
const { timeout, pendingId } = suspense;
|
|
2074
|
-
if (timeout > 0) {
|
|
2075
|
-
setTimeout(() => {
|
|
2076
|
-
if (suspense.pendingId === pendingId) {
|
|
2077
|
-
suspense.fallback(newFallback);
|
|
2078
|
-
}
|
|
2079
|
-
}, timeout);
|
|
2080
|
-
} else if (timeout === 0) {
|
|
2081
|
-
suspense.fallback(newFallback);
|
|
2082
|
-
}
|
|
2083
|
-
}
|
|
2084
|
-
}
|
|
2085
|
-
}
|
|
2086
|
-
}
|
|
2087
|
-
function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
|
|
2088
|
-
const {
|
|
2089
|
-
p: patch,
|
|
2090
|
-
m: move,
|
|
2091
|
-
um: unmount,
|
|
2092
|
-
n: next,
|
|
2093
|
-
o: { parentNode, remove: remove2 }
|
|
2094
|
-
} = rendererInternals;
|
|
2095
|
-
let parentSuspenseId;
|
|
2096
|
-
const isSuspensible = isVNodeSuspensible(vnode);
|
|
2097
|
-
if (isSuspensible) {
|
|
2098
|
-
if (parentSuspense == null ? void 0 : parentSuspense.pendingBranch) {
|
|
2099
|
-
parentSuspenseId = parentSuspense.pendingId;
|
|
2100
|
-
parentSuspense.deps++;
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;
|
|
2104
|
-
const initialAnchor = anchor;
|
|
2105
|
-
const suspense = {
|
|
2106
|
-
vnode,
|
|
2107
|
-
parent: parentSuspense,
|
|
2108
|
-
parentComponent,
|
|
2109
|
-
namespace,
|
|
2110
|
-
container,
|
|
2111
|
-
hiddenContainer,
|
|
2112
|
-
deps: 0,
|
|
2113
|
-
pendingId: suspenseId++,
|
|
2114
|
-
timeout: typeof timeout === "number" ? timeout : -1,
|
|
2115
|
-
activeBranch: null,
|
|
2116
|
-
pendingBranch: null,
|
|
2117
|
-
isInFallback: !isHydrating,
|
|
2118
|
-
isHydrating,
|
|
2119
|
-
isUnmounted: false,
|
|
2120
|
-
effects: [],
|
|
2121
|
-
resolve(resume = false, sync = false) {
|
|
2122
|
-
const {
|
|
2123
|
-
vnode: vnode2,
|
|
2124
|
-
activeBranch,
|
|
2125
|
-
pendingBranch,
|
|
2126
|
-
pendingId,
|
|
2127
|
-
effects,
|
|
2128
|
-
parentComponent: parentComponent2,
|
|
2129
|
-
container: container2
|
|
2130
|
-
} = suspense;
|
|
2131
|
-
let delayEnter = false;
|
|
2132
|
-
if (suspense.isHydrating) {
|
|
2133
|
-
suspense.isHydrating = false;
|
|
2134
|
-
} else if (!resume) {
|
|
2135
|
-
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
2136
|
-
if (delayEnter) {
|
|
2137
|
-
activeBranch.transition.afterLeave = () => {
|
|
2138
|
-
if (pendingId === suspense.pendingId) {
|
|
2139
|
-
move(
|
|
2140
|
-
pendingBranch,
|
|
2141
|
-
container2,
|
|
2142
|
-
anchor === initialAnchor ? next(activeBranch) : anchor,
|
|
2143
|
-
0
|
|
2144
|
-
);
|
|
2145
|
-
queuePostFlushCb(effects);
|
|
2146
|
-
}
|
|
2147
|
-
};
|
|
2148
|
-
}
|
|
2149
|
-
if (activeBranch) {
|
|
2150
|
-
if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
|
|
2151
|
-
anchor = next(activeBranch);
|
|
2152
|
-
}
|
|
2153
|
-
unmount(activeBranch, parentComponent2, suspense, true);
|
|
2154
|
-
}
|
|
2155
|
-
if (!delayEnter) {
|
|
2156
|
-
move(pendingBranch, container2, anchor, 0);
|
|
2157
|
-
}
|
|
2158
|
-
}
|
|
2159
|
-
setActiveBranch(suspense, pendingBranch);
|
|
2160
|
-
suspense.pendingBranch = null;
|
|
2161
|
-
suspense.isInFallback = false;
|
|
2162
|
-
let parent = suspense.parent;
|
|
2163
|
-
let hasUnresolvedAncestor = false;
|
|
2164
|
-
while (parent) {
|
|
2165
|
-
if (parent.pendingBranch) {
|
|
2166
|
-
parent.effects.push(...effects);
|
|
2167
|
-
hasUnresolvedAncestor = true;
|
|
2168
|
-
break;
|
|
2169
|
-
}
|
|
2170
|
-
parent = parent.parent;
|
|
2171
|
-
}
|
|
2172
|
-
if (!hasUnresolvedAncestor && !delayEnter) {
|
|
2173
|
-
queuePostFlushCb(effects);
|
|
2174
|
-
}
|
|
2175
|
-
suspense.effects = [];
|
|
2176
|
-
if (isSuspensible) {
|
|
2177
|
-
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
2178
|
-
parentSuspense.deps--;
|
|
2179
|
-
if (parentSuspense.deps === 0 && !sync) {
|
|
2180
|
-
parentSuspense.resolve();
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
triggerEvent(vnode2, "onResolve");
|
|
2185
|
-
},
|
|
2186
|
-
fallback(fallbackVNode) {
|
|
2187
|
-
if (!suspense.pendingBranch) {
|
|
2188
|
-
return;
|
|
2189
|
-
}
|
|
2190
|
-
const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
|
|
2191
|
-
triggerEvent(vnode2, "onFallback");
|
|
2192
|
-
const anchor2 = next(activeBranch);
|
|
2193
|
-
const mountFallback = () => {
|
|
2194
|
-
if (!suspense.isInFallback) {
|
|
2195
|
-
return;
|
|
2196
|
-
}
|
|
2197
|
-
patch(
|
|
2198
|
-
null,
|
|
2199
|
-
fallbackVNode,
|
|
2200
|
-
container2,
|
|
2201
|
-
anchor2,
|
|
2202
|
-
parentComponent2,
|
|
2203
|
-
null,
|
|
2204
|
-
// fallback tree will not have suspense context
|
|
2205
|
-
namespace2,
|
|
2206
|
-
slotScopeIds,
|
|
2207
|
-
optimized
|
|
2208
|
-
);
|
|
2209
|
-
setActiveBranch(suspense, fallbackVNode);
|
|
2210
|
-
};
|
|
2211
|
-
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
2212
|
-
if (delayEnter) {
|
|
2213
|
-
activeBranch.transition.afterLeave = mountFallback;
|
|
2214
|
-
}
|
|
2215
|
-
suspense.isInFallback = true;
|
|
2216
|
-
unmount(
|
|
2217
|
-
activeBranch,
|
|
2218
|
-
parentComponent2,
|
|
2219
|
-
null,
|
|
2220
|
-
// no suspense so unmount hooks fire now
|
|
2221
|
-
true
|
|
2222
|
-
// shouldRemove
|
|
2223
|
-
);
|
|
2224
|
-
if (!delayEnter) {
|
|
2225
|
-
mountFallback();
|
|
2226
|
-
}
|
|
2227
|
-
},
|
|
2228
|
-
move(container2, anchor2, type) {
|
|
2229
|
-
suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);
|
|
2230
|
-
suspense.container = container2;
|
|
2231
|
-
},
|
|
2232
|
-
next() {
|
|
2233
|
-
return suspense.activeBranch && next(suspense.activeBranch);
|
|
2234
|
-
},
|
|
2235
|
-
registerDep(instance, setupRenderEffect) {
|
|
2236
|
-
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
2237
|
-
if (isInPendingSuspense) {
|
|
2238
|
-
suspense.deps++;
|
|
2239
|
-
}
|
|
2240
|
-
const hydratedEl = instance.vnode.el;
|
|
2241
|
-
instance.asyncDep.catch((err) => {
|
|
2242
|
-
handleError(err, instance, 0);
|
|
2243
|
-
}).then((asyncSetupResult) => {
|
|
2244
|
-
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
2245
|
-
return;
|
|
2246
|
-
}
|
|
2247
|
-
instance.asyncResolved = true;
|
|
2248
|
-
const { vnode: vnode2 } = instance;
|
|
2249
|
-
handleSetupResult(instance, asyncSetupResult, false);
|
|
2250
|
-
if (hydratedEl) {
|
|
2251
|
-
vnode2.el = hydratedEl;
|
|
2252
|
-
}
|
|
2253
|
-
const placeholder = !hydratedEl && instance.subTree.el;
|
|
2254
|
-
setupRenderEffect(
|
|
2255
|
-
instance,
|
|
2256
|
-
vnode2,
|
|
2257
|
-
// component may have been moved before resolve.
|
|
2258
|
-
// if this is not a hydration, instance.subTree will be the comment
|
|
2259
|
-
// placeholder.
|
|
2260
|
-
parentNode(hydratedEl || instance.subTree.el),
|
|
2261
|
-
// anchor will not be used if this is hydration, so only need to
|
|
2262
|
-
// consider the comment placeholder case.
|
|
2263
|
-
hydratedEl ? null : next(instance.subTree),
|
|
2264
|
-
suspense,
|
|
2265
|
-
namespace,
|
|
2266
|
-
optimized
|
|
2267
|
-
);
|
|
2268
|
-
if (placeholder) {
|
|
2269
|
-
remove2(placeholder);
|
|
2270
|
-
}
|
|
2271
|
-
updateHOCHostEl(instance, vnode2.el);
|
|
2272
|
-
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
2273
|
-
suspense.resolve();
|
|
2274
|
-
}
|
|
2275
|
-
});
|
|
2276
|
-
},
|
|
2277
|
-
unmount(parentSuspense2, doRemove) {
|
|
2278
|
-
suspense.isUnmounted = true;
|
|
2279
|
-
if (suspense.activeBranch) {
|
|
2280
|
-
unmount(
|
|
2281
|
-
suspense.activeBranch,
|
|
2282
|
-
parentComponent,
|
|
2283
|
-
parentSuspense2,
|
|
2284
|
-
doRemove
|
|
2285
|
-
);
|
|
2286
|
-
}
|
|
2287
|
-
if (suspense.pendingBranch) {
|
|
2288
|
-
unmount(
|
|
2289
|
-
suspense.pendingBranch,
|
|
2290
|
-
parentComponent,
|
|
2291
|
-
parentSuspense2,
|
|
2292
|
-
doRemove
|
|
2293
|
-
);
|
|
2294
|
-
}
|
|
2295
|
-
}
|
|
2296
|
-
};
|
|
2297
|
-
return suspense;
|
|
2298
|
-
}
|
|
2299
|
-
function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
|
|
2300
|
-
const suspense = vnode.suspense = createSuspenseBoundary(
|
|
2301
|
-
vnode,
|
|
2302
|
-
parentSuspense,
|
|
2303
|
-
parentComponent,
|
|
2304
|
-
node.parentNode,
|
|
2305
|
-
// eslint-disable-next-line no-restricted-globals
|
|
2306
|
-
document.createElement("div"),
|
|
2307
|
-
null,
|
|
2308
|
-
namespace,
|
|
2309
|
-
slotScopeIds,
|
|
2310
|
-
optimized,
|
|
2311
|
-
rendererInternals,
|
|
2312
|
-
true
|
|
2313
|
-
);
|
|
2314
|
-
const result = hydrateNode(
|
|
2315
|
-
node,
|
|
2316
|
-
suspense.pendingBranch = vnode.ssContent,
|
|
2317
|
-
parentComponent,
|
|
2318
|
-
suspense,
|
|
2319
|
-
slotScopeIds,
|
|
2320
|
-
optimized
|
|
2321
|
-
);
|
|
2322
|
-
if (suspense.deps === 0) {
|
|
2323
|
-
suspense.resolve(false, true);
|
|
2324
|
-
}
|
|
2325
|
-
return result;
|
|
2326
|
-
}
|
|
2327
|
-
function normalizeSuspenseChildren(vnode) {
|
|
2328
|
-
const { shapeFlag, children } = vnode;
|
|
2329
|
-
const isSlotChildren = shapeFlag & 32;
|
|
2330
|
-
vnode.ssContent = normalizeSuspenseSlot(
|
|
2331
|
-
isSlotChildren ? children.default : children
|
|
2332
|
-
);
|
|
2333
|
-
vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);
|
|
2334
|
-
}
|
|
2335
|
-
function normalizeSuspenseSlot(s) {
|
|
2336
|
-
let block;
|
|
2337
|
-
if (isFunction(s)) {
|
|
2338
|
-
const trackBlock = isBlockTreeEnabled && s._c;
|
|
2339
|
-
if (trackBlock) {
|
|
2340
|
-
s._d = false;
|
|
2341
|
-
openBlock();
|
|
2342
|
-
}
|
|
2343
|
-
s = s();
|
|
2344
|
-
if (trackBlock) {
|
|
2345
|
-
s._d = true;
|
|
2346
|
-
block = currentBlock;
|
|
2347
|
-
closeBlock();
|
|
2348
|
-
}
|
|
2349
|
-
}
|
|
2350
|
-
if (isArray$1(s)) {
|
|
2351
|
-
const singleChild = filterSingleRoot(s);
|
|
2352
|
-
s = singleChild;
|
|
2353
|
-
}
|
|
2354
|
-
s = normalizeVNode(s);
|
|
2355
|
-
if (block && !s.dynamicChildren) {
|
|
2356
|
-
s.dynamicChildren = block.filter((c) => c !== s);
|
|
2357
|
-
}
|
|
2358
|
-
return s;
|
|
2359
|
-
}
|
|
2360
1838
|
function queueEffectWithSuspense(fn, suspense) {
|
|
2361
1839
|
if (suspense && suspense.pendingBranch) {
|
|
2362
1840
|
if (isArray$1(fn)) {
|
|
@@ -2368,24 +1846,6 @@ function queueEffectWithSuspense(fn, suspense) {
|
|
|
2368
1846
|
queuePostFlushCb(fn);
|
|
2369
1847
|
}
|
|
2370
1848
|
}
|
|
2371
|
-
function setActiveBranch(suspense, branch) {
|
|
2372
|
-
suspense.activeBranch = branch;
|
|
2373
|
-
const { vnode, parentComponent } = suspense;
|
|
2374
|
-
let el = branch.el;
|
|
2375
|
-
while (!el && branch.component) {
|
|
2376
|
-
branch = branch.component.subTree;
|
|
2377
|
-
el = branch.el;
|
|
2378
|
-
}
|
|
2379
|
-
vnode.el = el;
|
|
2380
|
-
if (parentComponent && parentComponent.subTree === vnode) {
|
|
2381
|
-
parentComponent.vnode.el = el;
|
|
2382
|
-
updateHOCHostEl(parentComponent, el);
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
function isVNodeSuspensible(vnode) {
|
|
2386
|
-
var _a;
|
|
2387
|
-
return ((_a = vnode.props) == null ? void 0 : _a.suspensible) != null && vnode.props.suspensible !== false;
|
|
2388
|
-
}
|
|
2389
1849
|
const ssrContextKey = Symbol.for("v-scx");
|
|
2390
1850
|
const useSSRContext = () => {
|
|
2391
1851
|
{
|
|
@@ -2719,6 +2179,82 @@ const onRenderTracked = createHook(
|
|
|
2719
2179
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
2720
2180
|
injectHook("ec", hook, target);
|
|
2721
2181
|
}
|
|
2182
|
+
function renderList(source, renderItem, cache, index) {
|
|
2183
|
+
let ret;
|
|
2184
|
+
const cached = cache && cache[index];
|
|
2185
|
+
if (isArray$1(source) || isString(source)) {
|
|
2186
|
+
ret = new Array(source.length);
|
|
2187
|
+
for (let i = 0, l = source.length; i < l; i++) {
|
|
2188
|
+
ret[i] = renderItem(source[i], i, void 0, cached && cached[i]);
|
|
2189
|
+
}
|
|
2190
|
+
} else if (typeof source === "number") {
|
|
2191
|
+
ret = new Array(source);
|
|
2192
|
+
for (let i = 0; i < source; i++) {
|
|
2193
|
+
ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2194
|
+
}
|
|
2195
|
+
} else if (isObject(source)) {
|
|
2196
|
+
if (source[Symbol.iterator]) {
|
|
2197
|
+
ret = Array.from(
|
|
2198
|
+
source,
|
|
2199
|
+
(item, i) => renderItem(item, i, void 0, cached && cached[i])
|
|
2200
|
+
);
|
|
2201
|
+
} else {
|
|
2202
|
+
const keys = Object.keys(source);
|
|
2203
|
+
ret = new Array(keys.length);
|
|
2204
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2205
|
+
const key = keys[i];
|
|
2206
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
} else {
|
|
2210
|
+
ret = [];
|
|
2211
|
+
}
|
|
2212
|
+
if (cache) {
|
|
2213
|
+
cache[index] = ret;
|
|
2214
|
+
}
|
|
2215
|
+
return ret;
|
|
2216
|
+
}
|
|
2217
|
+
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
2218
|
+
if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) {
|
|
2219
|
+
if (name !== "default")
|
|
2220
|
+
props.name = name;
|
|
2221
|
+
return createVNode("slot", props, fallback && fallback());
|
|
2222
|
+
}
|
|
2223
|
+
let slot = slots[name];
|
|
2224
|
+
if (slot && slot._c) {
|
|
2225
|
+
slot._d = false;
|
|
2226
|
+
}
|
|
2227
|
+
openBlock();
|
|
2228
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
2229
|
+
const rendered = createBlock(
|
|
2230
|
+
Fragment,
|
|
2231
|
+
{
|
|
2232
|
+
key: props.key || // slot content array of a dynamic conditional slot may have a branch
|
|
2233
|
+
// key attached in the `createSlots` helper, respect that
|
|
2234
|
+
validSlotContent && validSlotContent.key || `_${name}`
|
|
2235
|
+
},
|
|
2236
|
+
validSlotContent || (fallback ? fallback() : []),
|
|
2237
|
+
validSlotContent && slots._ === 1 ? 64 : -2
|
|
2238
|
+
);
|
|
2239
|
+
if (!noSlotted && rendered.scopeId) {
|
|
2240
|
+
rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
2241
|
+
}
|
|
2242
|
+
if (slot && slot._c) {
|
|
2243
|
+
slot._d = true;
|
|
2244
|
+
}
|
|
2245
|
+
return rendered;
|
|
2246
|
+
}
|
|
2247
|
+
function ensureValidVNode(vnodes) {
|
|
2248
|
+
return vnodes.some((child) => {
|
|
2249
|
+
if (!isVNode(child))
|
|
2250
|
+
return true;
|
|
2251
|
+
if (child.type === Comment)
|
|
2252
|
+
return false;
|
|
2253
|
+
if (child.type === Fragment && !ensureValidVNode(child.children))
|
|
2254
|
+
return false;
|
|
2255
|
+
return true;
|
|
2256
|
+
}) ? vnodes : null;
|
|
2257
|
+
}
|
|
2722
2258
|
const getPublicInstance = (i) => {
|
|
2723
2259
|
if (!i)
|
|
2724
2260
|
return null;
|
|
@@ -3294,11 +2830,12 @@ function createAppAPI(render, hydrate) {
|
|
|
3294
2830
|
return app;
|
|
3295
2831
|
},
|
|
3296
2832
|
runWithContext(fn) {
|
|
2833
|
+
const lastApp = currentApp;
|
|
3297
2834
|
currentApp = app;
|
|
3298
2835
|
try {
|
|
3299
2836
|
return fn();
|
|
3300
2837
|
} finally {
|
|
3301
|
-
currentApp =
|
|
2838
|
+
currentApp = lastApp;
|
|
3302
2839
|
}
|
|
3303
2840
|
}
|
|
3304
2841
|
};
|
|
@@ -3590,14 +3127,22 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
3590
3127
|
return res;
|
|
3591
3128
|
}
|
|
3592
3129
|
function validatePropName(key) {
|
|
3593
|
-
if (key[0] !== "$") {
|
|
3130
|
+
if (key[0] !== "$" && !isReservedProp(key)) {
|
|
3594
3131
|
return true;
|
|
3595
3132
|
}
|
|
3596
3133
|
return false;
|
|
3597
3134
|
}
|
|
3598
3135
|
function getType(ctor) {
|
|
3599
|
-
|
|
3600
|
-
|
|
3136
|
+
if (ctor === null) {
|
|
3137
|
+
return "null";
|
|
3138
|
+
}
|
|
3139
|
+
if (typeof ctor === "function") {
|
|
3140
|
+
return ctor.name || "";
|
|
3141
|
+
} else if (typeof ctor === "object") {
|
|
3142
|
+
const name = ctor.constructor && ctor.constructor.name;
|
|
3143
|
+
return name || "";
|
|
3144
|
+
}
|
|
3145
|
+
return "";
|
|
3601
3146
|
}
|
|
3602
3147
|
function isSameType(a, b) {
|
|
3603
3148
|
return getType(a) === getType(b);
|
|
@@ -3730,10 +3275,9 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3730
3275
|
} else {
|
|
3731
3276
|
const _isString = isString(ref3);
|
|
3732
3277
|
const _isRef = isRef(ref3);
|
|
3733
|
-
const isVFor = rawRef.f;
|
|
3734
3278
|
if (_isString || _isRef) {
|
|
3735
3279
|
const doSet = () => {
|
|
3736
|
-
if (
|
|
3280
|
+
if (rawRef.f) {
|
|
3737
3281
|
const existing = _isString ? hasOwn(setupState, ref3) ? setupState[ref3] : refs[ref3] : ref3.value;
|
|
3738
3282
|
if (isUnmount) {
|
|
3739
3283
|
isArray$1(existing) && remove(existing, refValue);
|
|
@@ -3764,11 +3308,11 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3764
3308
|
refs[rawRef.k] = value;
|
|
3765
3309
|
} else ;
|
|
3766
3310
|
};
|
|
3767
|
-
if (
|
|
3768
|
-
doSet();
|
|
3769
|
-
} else {
|
|
3311
|
+
if (value) {
|
|
3770
3312
|
doSet.id = -1;
|
|
3771
3313
|
queuePostRenderEffect(doSet, parentSuspense);
|
|
3314
|
+
} else {
|
|
3315
|
+
doSet();
|
|
3772
3316
|
}
|
|
3773
3317
|
}
|
|
3774
3318
|
}
|
|
@@ -5375,6 +4919,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
|
5375
4919
|
function createTextVNode(text = " ", flag = 0) {
|
|
5376
4920
|
return createVNode(Text, null, text, flag);
|
|
5377
4921
|
}
|
|
4922
|
+
function createCommentVNode(text = "", asBlock = false) {
|
|
4923
|
+
return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);
|
|
4924
|
+
}
|
|
5378
4925
|
function normalizeVNode(child) {
|
|
5379
4926
|
if (child == null || typeof child === "boolean") {
|
|
5380
4927
|
return createVNode(Comment);
|
|
@@ -5793,12 +5340,12 @@ function h(type, propsOrChildren, children) {
|
|
|
5793
5340
|
return createVNode(type, propsOrChildren, children);
|
|
5794
5341
|
}
|
|
5795
5342
|
}
|
|
5796
|
-
const version = "3.4.
|
|
5343
|
+
const version = "3.4.19";
|
|
5797
5344
|
|
|
5798
5345
|
/* Injected with object hook! */
|
|
5799
5346
|
|
|
5800
5347
|
/**
|
|
5801
|
-
* @vue/runtime-dom v3.4.
|
|
5348
|
+
* @vue/runtime-dom v3.4.19
|
|
5802
5349
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5803
5350
|
* @license MIT
|
|
5804
5351
|
**/
|
|
@@ -5885,10 +5432,12 @@ function patchClass(el, value, isSVG) {
|
|
|
5885
5432
|
}
|
|
5886
5433
|
const vShowOldKey = Symbol("_vod");
|
|
5887
5434
|
const CSS_VAR_TEXT = Symbol("");
|
|
5435
|
+
const displayRE = /(^|;)\s*display\s*:/;
|
|
5888
5436
|
function patchStyle(el, prev, next) {
|
|
5889
5437
|
const style = el.style;
|
|
5890
|
-
const currentDisplay = style.display;
|
|
5891
5438
|
const isCssString = isString(next);
|
|
5439
|
+
const currentDisplay = style.display;
|
|
5440
|
+
let hasControlledDisplay = false;
|
|
5892
5441
|
if (next && !isCssString) {
|
|
5893
5442
|
if (prev && !isString(prev)) {
|
|
5894
5443
|
for (const key in prev) {
|
|
@@ -5898,6 +5447,9 @@ function patchStyle(el, prev, next) {
|
|
|
5898
5447
|
}
|
|
5899
5448
|
}
|
|
5900
5449
|
for (const key in next) {
|
|
5450
|
+
if (key === "display") {
|
|
5451
|
+
hasControlledDisplay = true;
|
|
5452
|
+
}
|
|
5901
5453
|
setStyle(style, key, next[key]);
|
|
5902
5454
|
}
|
|
5903
5455
|
} else {
|
|
@@ -5908,12 +5460,14 @@ function patchStyle(el, prev, next) {
|
|
|
5908
5460
|
next += ";" + cssVarText;
|
|
5909
5461
|
}
|
|
5910
5462
|
style.cssText = next;
|
|
5463
|
+
hasControlledDisplay = displayRE.test(next);
|
|
5911
5464
|
}
|
|
5912
5465
|
} else if (prev) {
|
|
5913
5466
|
el.removeAttribute("style");
|
|
5914
5467
|
}
|
|
5915
5468
|
}
|
|
5916
5469
|
if (vShowOldKey in el) {
|
|
5470
|
+
el[vShowOldKey] = hasControlledDisplay ? style.display : "";
|
|
5917
5471
|
style.display = currentDisplay;
|
|
5918
5472
|
}
|
|
5919
5473
|
}
|
|
@@ -6196,6 +5750,95 @@ function normalizeContainer(container) {
|
|
|
6196
5750
|
|
|
6197
5751
|
/* Injected with object hook! */
|
|
6198
5752
|
|
|
5753
|
+
const scriptRel = 'modulepreload';const assetsURL = function(dep, importerUrl) { return new URL(dep, importerUrl).href };const seen = {};const __vitePreload = function preload(baseModule, deps, importerUrl) {
|
|
5754
|
+
let promise = Promise.resolve();
|
|
5755
|
+
// @ts-expect-error true will be replaced with boolean later
|
|
5756
|
+
if (true && deps && deps.length > 0) {
|
|
5757
|
+
const links = document.getElementsByTagName('link');
|
|
5758
|
+
promise = Promise.all(deps.map((dep) => {
|
|
5759
|
+
// @ts-expect-error assetsURL is declared before preload.toString()
|
|
5760
|
+
dep = assetsURL(dep, importerUrl);
|
|
5761
|
+
if (dep in seen)
|
|
5762
|
+
return;
|
|
5763
|
+
seen[dep] = true;
|
|
5764
|
+
const isCss = dep.endsWith('.css');
|
|
5765
|
+
const cssSelector = isCss ? '[rel="stylesheet"]' : '';
|
|
5766
|
+
const isBaseRelative = !!importerUrl;
|
|
5767
|
+
// check if the file is already preloaded by SSR markup
|
|
5768
|
+
if (isBaseRelative) {
|
|
5769
|
+
// When isBaseRelative is true then we have `importerUrl` and `dep` is
|
|
5770
|
+
// already converted to an absolute URL by the `assetsURL` function
|
|
5771
|
+
for (let i = links.length - 1; i >= 0; i--) {
|
|
5772
|
+
const link = links[i];
|
|
5773
|
+
// The `links[i].href` is an absolute URL thanks to browser doing the work
|
|
5774
|
+
// for us. See https://html.spec.whatwg.org/multipage/common-dom-interfaces.html#reflecting-content-attributes-in-idl-attributes:idl-domstring-5
|
|
5775
|
+
if (link.href === dep && (!isCss || link.rel === 'stylesheet')) {
|
|
5776
|
+
return;
|
|
5777
|
+
}
|
|
5778
|
+
}
|
|
5779
|
+
}
|
|
5780
|
+
else if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
|
|
5781
|
+
return;
|
|
5782
|
+
}
|
|
5783
|
+
const link = document.createElement('link');
|
|
5784
|
+
link.rel = isCss ? 'stylesheet' : scriptRel;
|
|
5785
|
+
if (!isCss) {
|
|
5786
|
+
link.as = 'script';
|
|
5787
|
+
link.crossOrigin = '';
|
|
5788
|
+
}
|
|
5789
|
+
link.href = dep;
|
|
5790
|
+
document.head.appendChild(link);
|
|
5791
|
+
if (isCss) {
|
|
5792
|
+
return new Promise((res, rej) => {
|
|
5793
|
+
link.addEventListener('load', res);
|
|
5794
|
+
link.addEventListener('error', () => rej(new Error(`Unable to preload CSS for ${dep}`)));
|
|
5795
|
+
});
|
|
5796
|
+
}
|
|
5797
|
+
}));
|
|
5798
|
+
}
|
|
5799
|
+
return promise
|
|
5800
|
+
.then(() => baseModule())
|
|
5801
|
+
.catch((err) => {
|
|
5802
|
+
const e = new Event('vite:preloadError', { cancelable: true });
|
|
5803
|
+
// @ts-expect-error custom payload
|
|
5804
|
+
e.payload = err;
|
|
5805
|
+
window.dispatchEvent(e);
|
|
5806
|
+
if (!e.defaultPrevented) {
|
|
5807
|
+
throw err;
|
|
5808
|
+
}
|
|
5809
|
+
});
|
|
5810
|
+
};
|
|
5811
|
+
/* Injected with object hook! */
|
|
5812
|
+
|
|
5813
|
+
const routes = [
|
|
5814
|
+
{
|
|
5815
|
+
path: '/',
|
|
5816
|
+
name: '/',
|
|
5817
|
+
component: () => __vitePreload(() => import('./index-51E08Ncj.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
|
|
5818
|
+
/* no children */
|
|
5819
|
+
},
|
|
5820
|
+
{
|
|
5821
|
+
path: '/about',
|
|
5822
|
+
name: '/about',
|
|
5823
|
+
component: () => __vitePreload(() => import('./about-SiRA-rr8.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
|
|
5824
|
+
/* no children */
|
|
5825
|
+
},
|
|
5826
|
+
{
|
|
5827
|
+
path: '/categories',
|
|
5828
|
+
name: '/categories',
|
|
5829
|
+
component: () => __vitePreload(() => import('./categories-XFPOy2yC.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
|
|
5830
|
+
/* no children */
|
|
5831
|
+
},
|
|
5832
|
+
{
|
|
5833
|
+
path: '/tags',
|
|
5834
|
+
name: '/tags',
|
|
5835
|
+
component: () => __vitePreload(() => import('./tags-pRAQg_EK.js'),true?__vite__mapDeps([]):void 0,import.meta.url),
|
|
5836
|
+
/* no children */
|
|
5837
|
+
}
|
|
5838
|
+
];
|
|
5839
|
+
|
|
5840
|
+
/* Injected with object hook! */
|
|
5841
|
+
|
|
6199
5842
|
/*!
|
|
6200
5843
|
* vue-router v4.2.5
|
|
6201
5844
|
* (c) 2023 Eduardo San Martin Morote
|
|
@@ -7499,7 +7142,7 @@ function normalizeSlot(slot, data) {
|
|
|
7499
7142
|
return slotContent.length === 1 ? slotContent[0] : slotContent;
|
|
7500
7143
|
}
|
|
7501
7144
|
const RouterView = RouterViewImpl;
|
|
7502
|
-
function createRouter(options) {
|
|
7145
|
+
function createRouter$1(options) {
|
|
7503
7146
|
const matcher = createRouterMatcher(options.routes, options);
|
|
7504
7147
|
const parseQuery$1 = options.parseQuery || parseQuery;
|
|
7505
7148
|
const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;
|
|
@@ -8000,44 +7643,38 @@ function extractChangingRecords(to, from) {
|
|
|
8000
7643
|
|
|
8001
7644
|
/* Injected with object hook! */
|
|
8002
7645
|
|
|
8003
|
-
|
|
7646
|
+
function createRouter(options) {
|
|
7647
|
+
const { extendRoutes } = options;
|
|
7648
|
+
// use Object.assign for better browser support
|
|
7649
|
+
const router = createRouter$1(Object.assign(
|
|
7650
|
+
options,
|
|
7651
|
+
{ routes: typeof extendRoutes === 'function' ? extendRoutes(routes) : routes },
|
|
7652
|
+
));
|
|
8004
7653
|
|
|
8005
|
-
|
|
7654
|
+
return router
|
|
7655
|
+
}
|
|
8006
7656
|
|
|
8007
7657
|
/* Injected with object hook! */
|
|
8008
7658
|
|
|
8009
|
-
const
|
|
7659
|
+
const _export_sfc = (sfc, props) => {
|
|
7660
|
+
const target = sfc.__vccOpts || sfc;
|
|
7661
|
+
for (const [key, val] of props) {
|
|
7662
|
+
target[key] = val;
|
|
7663
|
+
}
|
|
7664
|
+
return target;
|
|
7665
|
+
};
|
|
8010
7666
|
|
|
8011
7667
|
/* Injected with object hook! */
|
|
8012
7668
|
|
|
8013
|
-
const
|
|
8014
|
-
|
|
8015
|
-
|
|
8016
|
-
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8021
|
-
|
|
8022
|
-
if (isStaticMode)
|
|
8023
|
-
document.title = "Vite Inspect (Production)";
|
|
8024
|
-
});
|
|
8025
|
-
return (_ctx, _cache) => {
|
|
8026
|
-
const _component_RouterView = resolveComponent("RouterView");
|
|
8027
|
-
return openBlock(), createElementBlock("main", _hoisted_1, [
|
|
8028
|
-
(openBlock(), createBlock(Suspense, null, {
|
|
8029
|
-
fallback: withCtx(() => [
|
|
8030
|
-
createTextVNode(" Loading... ")
|
|
8031
|
-
]),
|
|
8032
|
-
default: withCtx(() => [
|
|
8033
|
-
createVNode(_component_RouterView)
|
|
8034
|
-
]),
|
|
8035
|
-
_: 1
|
|
8036
|
-
}))
|
|
8037
|
-
]);
|
|
8038
|
-
};
|
|
8039
|
-
}
|
|
8040
|
-
});
|
|
7669
|
+
/* unplugin-vue-components disabled */const _sfc_main = {};
|
|
7670
|
+
|
|
7671
|
+
function _sfc_render(_ctx, _cache) {
|
|
7672
|
+
const _component_RouterView = resolveComponent("RouterView");
|
|
7673
|
+
|
|
7674
|
+
return (openBlock(), createBlock(_component_RouterView))
|
|
7675
|
+
}
|
|
7676
|
+
const App = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]]);
|
|
7677
|
+
/* Injected with object hook! */
|
|
8041
7678
|
|
|
8042
7679
|
/* Injected with object hook! */
|
|
8043
7680
|
|
|
@@ -8045,10 +7682,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
8045
7682
|
|
|
8046
7683
|
/* Injected with object hook! */
|
|
8047
7684
|
|
|
8048
|
-
|
|
7685
|
+
/* Injected with object hook! */
|
|
7686
|
+
|
|
7687
|
+
const app = createApp(App);
|
|
8049
7688
|
const router = createRouter({
|
|
8050
|
-
history: createWebHashHistory()
|
|
8051
|
-
routes
|
|
7689
|
+
history: createWebHashHistory()
|
|
8052
7690
|
});
|
|
8053
7691
|
app.use(router);
|
|
8054
7692
|
app.mount("#app");
|
|
@@ -8056,3 +7694,11 @@ app.mount("#app");
|
|
|
8056
7694
|
/* Injected with object hook! */
|
|
8057
7695
|
|
|
8058
7696
|
/* Injected with object hook! */
|
|
7697
|
+
|
|
7698
|
+
export { Fragment as F, _export_sfc as _, createCommentVNode as a, createBaseVNode as b, createElementBlock as c, defineComponent as d, createTextVNode as e, ref as f, onMounted as g, h, renderSlot as i, normalizeStyle as j, createVNode as k, normalizeClass as n, openBlock as o, renderList as r, toDisplayString as t, unref as u, withCtx as w };
|
|
7699
|
+
function __vite__mapDeps(indexes) {
|
|
7700
|
+
if (!__vite__mapDeps.viteFileDeps) {
|
|
7701
|
+
__vite__mapDeps.viteFileDeps = []
|
|
7702
|
+
}
|
|
7703
|
+
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
|
|
7704
|
+
}
|