@valaxyjs/devtools 0.19.9 → 0.19.11
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/{about-GOQp0_NO.js → about-BHaXjiil.js} +1 -1
- package/dist/client/assets/{categories-B9cCje3e.js → categories-COQkgkdS.js} +1 -1
- package/dist/client/assets/{index-B1KXxAEg.js → index-Cp--w0g2.js} +1242 -699
- package/dist/client/assets/{index-DzN-2s1X.css → index-DphOJtuC.css} +1 -1
- package/dist/client/assets/{index-CN4D-pyL.js → index-Zar9_ZCZ.js} +22 -26
- package/dist/client/assets/{migration-CFDlazxl.js → migration-Bs79tDqr.js} +9 -10
- package/dist/client/assets/{splitpanes.es-CS1Tksze.js → splitpanes.es-qpbN6zTy.js} +103 -64
- package/dist/client/assets/{tags-M0cV8ng9.js → tags-BDGFSU7r.js} +1 -1
- package/dist/client/index.html +2 -2
- package/package.json +9 -10
- package/src/client/components/VDPostList.vue +2 -2
- package/src/client/components.d.ts +47 -47
- package/src/client/vite.config.ts +8 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Zar9_ZCZ.js","./_plugin-vue_export-helper-DgDhiqFL.js","./splitpanes.es-qpbN6zTy.js","./index-DF84L4of.css","./about-BHaXjiil.js","./categories-COQkgkdS.js","./migration-Bs79tDqr.js","./tags-BDGFSU7r.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
true&&(function polyfill() {
|
|
3
3
|
const relList = document.createElement("link").relList;
|
|
4
4
|
if (relList && relList.supports && relList.supports("modulepreload")) {
|
|
@@ -39,15 +39,16 @@ true&&(function polyfill() {
|
|
|
39
39
|
/* Injected with object hook! */
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
|
-
* @vue/shared v3.
|
|
42
|
+
* @vue/shared v3.5.7
|
|
43
43
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
44
44
|
* @license MIT
|
|
45
45
|
**/
|
|
46
46
|
/*! #__NO_SIDE_EFFECTS__ */
|
|
47
47
|
// @__NO_SIDE_EFFECTS__
|
|
48
|
-
function makeMap(str
|
|
49
|
-
const
|
|
50
|
-
|
|
48
|
+
function makeMap(str) {
|
|
49
|
+
const map = /* @__PURE__ */ Object.create(null);
|
|
50
|
+
for (const key of str.split(",")) map[key] = 1;
|
|
51
|
+
return (val) => val in map;
|
|
51
52
|
}
|
|
52
53
|
const EMPTY_OBJ = {};
|
|
53
54
|
const EMPTY_ARR = [];
|
|
@@ -96,9 +97,11 @@ const cacheStringFunction = (fn) => {
|
|
|
96
97
|
};
|
|
97
98
|
};
|
|
98
99
|
const camelizeRE = /-(\w)/g;
|
|
99
|
-
const camelize = cacheStringFunction(
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
const camelize = cacheStringFunction(
|
|
101
|
+
(str) => {
|
|
102
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
103
|
+
}
|
|
104
|
+
);
|
|
102
105
|
const hyphenateRE = /\B([A-Z])/g;
|
|
103
106
|
const hyphenate = cacheStringFunction(
|
|
104
107
|
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
@@ -106,10 +109,12 @@ const hyphenate = cacheStringFunction(
|
|
|
106
109
|
const capitalize = cacheStringFunction((str) => {
|
|
107
110
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
108
111
|
});
|
|
109
|
-
const toHandlerKey = cacheStringFunction(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
const toHandlerKey = cacheStringFunction(
|
|
113
|
+
(str) => {
|
|
114
|
+
const s = str ? `on${capitalize(str)}` : ``;
|
|
115
|
+
return s;
|
|
116
|
+
}
|
|
117
|
+
);
|
|
113
118
|
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
114
119
|
const invokeArrayFns = (fns, ...arg) => {
|
|
115
120
|
for (let i = 0; i < fns.length; i++) {
|
|
@@ -237,7 +242,7 @@ function looseIndexOf(arr, val) {
|
|
|
237
242
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
238
243
|
}
|
|
239
244
|
const isRef$1 = (val) => {
|
|
240
|
-
return !!(val && val
|
|
245
|
+
return !!(val && val["__v_isRef"] === true);
|
|
241
246
|
};
|
|
242
247
|
const toDisplayString = (val) => {
|
|
243
248
|
return isString(val) ? val : val == null ? "" : isArray$1(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
|
|
@@ -278,7 +283,7 @@ const stringifySymbol = (v, i = "") => {
|
|
|
278
283
|
/* Injected with object hook! */
|
|
279
284
|
|
|
280
285
|
/**
|
|
281
|
-
* @vue/reactivity v3.
|
|
286
|
+
* @vue/reactivity v3.5.7
|
|
282
287
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
283
288
|
* @license MIT
|
|
284
289
|
**/
|
|
@@ -289,6 +294,7 @@ class EffectScope {
|
|
|
289
294
|
this._active = true;
|
|
290
295
|
this.effects = [];
|
|
291
296
|
this.cleanups = [];
|
|
297
|
+
this._isPaused = false;
|
|
292
298
|
this.parent = activeEffectScope;
|
|
293
299
|
if (!detached && activeEffectScope) {
|
|
294
300
|
this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(
|
|
@@ -299,6 +305,39 @@ class EffectScope {
|
|
|
299
305
|
get active() {
|
|
300
306
|
return this._active;
|
|
301
307
|
}
|
|
308
|
+
pause() {
|
|
309
|
+
if (this._active) {
|
|
310
|
+
this._isPaused = true;
|
|
311
|
+
let i, l;
|
|
312
|
+
if (this.scopes) {
|
|
313
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
314
|
+
this.scopes[i].pause();
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
318
|
+
this.effects[i].pause();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Resumes the effect scope, including all child scopes and effects.
|
|
324
|
+
*/
|
|
325
|
+
resume() {
|
|
326
|
+
if (this._active) {
|
|
327
|
+
if (this._isPaused) {
|
|
328
|
+
this._isPaused = false;
|
|
329
|
+
let i, l;
|
|
330
|
+
if (this.scopes) {
|
|
331
|
+
for (i = 0, l = this.scopes.length; i < l; i++) {
|
|
332
|
+
this.scopes[i].resume();
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
for (i = 0, l = this.effects.length; i < l; i++) {
|
|
336
|
+
this.effects[i].resume();
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
302
341
|
run(fn) {
|
|
303
342
|
if (this._active) {
|
|
304
343
|
const currentEffectScope = activeEffectScope;
|
|
@@ -350,107 +389,245 @@ class EffectScope {
|
|
|
350
389
|
}
|
|
351
390
|
}
|
|
352
391
|
}
|
|
353
|
-
function recordEffectScope(effect2, scope = activeEffectScope) {
|
|
354
|
-
if (scope && scope.active) {
|
|
355
|
-
scope.effects.push(effect2);
|
|
356
|
-
}
|
|
357
|
-
}
|
|
358
392
|
function getCurrentScope() {
|
|
359
393
|
return activeEffectScope;
|
|
360
394
|
}
|
|
361
|
-
let
|
|
395
|
+
let activeSub;
|
|
396
|
+
const pausedQueueEffects = /* @__PURE__ */ new WeakSet();
|
|
362
397
|
class ReactiveEffect {
|
|
363
|
-
constructor(fn
|
|
398
|
+
constructor(fn) {
|
|
364
399
|
this.fn = fn;
|
|
365
|
-
this.
|
|
366
|
-
this.
|
|
367
|
-
this.
|
|
368
|
-
this.
|
|
369
|
-
this.
|
|
370
|
-
this.
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
recordEffectScope(this, scope);
|
|
400
|
+
this.deps = void 0;
|
|
401
|
+
this.depsTail = void 0;
|
|
402
|
+
this.flags = 1 | 4;
|
|
403
|
+
this.next = void 0;
|
|
404
|
+
this.cleanup = void 0;
|
|
405
|
+
this.scheduler = void 0;
|
|
406
|
+
if (activeEffectScope && activeEffectScope.active) {
|
|
407
|
+
activeEffectScope.effects.push(this);
|
|
408
|
+
}
|
|
375
409
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
break;
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
if (this._dirtyLevel === 1) {
|
|
390
|
-
this._dirtyLevel = 0;
|
|
410
|
+
pause() {
|
|
411
|
+
this.flags |= 64;
|
|
412
|
+
}
|
|
413
|
+
resume() {
|
|
414
|
+
if (this.flags & 64) {
|
|
415
|
+
this.flags &= ~64;
|
|
416
|
+
if (pausedQueueEffects.has(this)) {
|
|
417
|
+
pausedQueueEffects.delete(this);
|
|
418
|
+
this.trigger();
|
|
391
419
|
}
|
|
392
|
-
resetTracking();
|
|
393
420
|
}
|
|
394
|
-
return this._dirtyLevel >= 4;
|
|
395
421
|
}
|
|
396
|
-
|
|
397
|
-
|
|
422
|
+
/**
|
|
423
|
+
* @internal
|
|
424
|
+
*/
|
|
425
|
+
notify() {
|
|
426
|
+
if (this.flags & 2 && !(this.flags & 32)) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
if (!(this.flags & 8)) {
|
|
430
|
+
batch(this);
|
|
431
|
+
}
|
|
398
432
|
}
|
|
399
433
|
run() {
|
|
400
|
-
this.
|
|
401
|
-
if (!this.active) {
|
|
434
|
+
if (!(this.flags & 1)) {
|
|
402
435
|
return this.fn();
|
|
403
436
|
}
|
|
404
|
-
|
|
405
|
-
|
|
437
|
+
this.flags |= 2;
|
|
438
|
+
cleanupEffect(this);
|
|
439
|
+
prepareDeps(this);
|
|
440
|
+
const prevEffect = activeSub;
|
|
441
|
+
const prevShouldTrack = shouldTrack;
|
|
442
|
+
activeSub = this;
|
|
443
|
+
shouldTrack = true;
|
|
406
444
|
try {
|
|
407
|
-
shouldTrack = true;
|
|
408
|
-
activeEffect = this;
|
|
409
|
-
this._runnings++;
|
|
410
|
-
preCleanupEffect(this);
|
|
411
445
|
return this.fn();
|
|
412
446
|
} finally {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
447
|
+
cleanupDeps(this);
|
|
448
|
+
activeSub = prevEffect;
|
|
449
|
+
shouldTrack = prevShouldTrack;
|
|
450
|
+
this.flags &= ~2;
|
|
417
451
|
}
|
|
418
452
|
}
|
|
419
453
|
stop() {
|
|
420
|
-
if (this.
|
|
421
|
-
|
|
422
|
-
|
|
454
|
+
if (this.flags & 1) {
|
|
455
|
+
for (let link = this.deps; link; link = link.nextDep) {
|
|
456
|
+
removeSub(link);
|
|
457
|
+
}
|
|
458
|
+
this.deps = this.depsTail = void 0;
|
|
459
|
+
cleanupEffect(this);
|
|
423
460
|
this.onStop && this.onStop();
|
|
424
|
-
this.
|
|
461
|
+
this.flags &= ~1;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
trigger() {
|
|
465
|
+
if (this.flags & 64) {
|
|
466
|
+
pausedQueueEffects.add(this);
|
|
467
|
+
} else if (this.scheduler) {
|
|
468
|
+
this.scheduler();
|
|
469
|
+
} else {
|
|
470
|
+
this.runIfDirty();
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* @internal
|
|
475
|
+
*/
|
|
476
|
+
runIfDirty() {
|
|
477
|
+
if (isDirty(this)) {
|
|
478
|
+
this.run();
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
get dirty() {
|
|
482
|
+
return isDirty(this);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
let batchDepth = 0;
|
|
486
|
+
let batchedSub;
|
|
487
|
+
function batch(sub) {
|
|
488
|
+
sub.flags |= 8;
|
|
489
|
+
sub.next = batchedSub;
|
|
490
|
+
batchedSub = sub;
|
|
491
|
+
}
|
|
492
|
+
function startBatch() {
|
|
493
|
+
batchDepth++;
|
|
494
|
+
}
|
|
495
|
+
function endBatch() {
|
|
496
|
+
if (--batchDepth > 0) {
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
let error;
|
|
500
|
+
while (batchedSub) {
|
|
501
|
+
let e = batchedSub;
|
|
502
|
+
batchedSub = void 0;
|
|
503
|
+
while (e) {
|
|
504
|
+
const next = e.next;
|
|
505
|
+
e.next = void 0;
|
|
506
|
+
e.flags &= ~8;
|
|
507
|
+
if (e.flags & 1) {
|
|
508
|
+
try {
|
|
509
|
+
;
|
|
510
|
+
e.trigger();
|
|
511
|
+
} catch (err) {
|
|
512
|
+
if (!error) error = err;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
e = next;
|
|
425
516
|
}
|
|
426
517
|
}
|
|
518
|
+
if (error) throw error;
|
|
427
519
|
}
|
|
428
|
-
function
|
|
429
|
-
|
|
520
|
+
function prepareDeps(sub) {
|
|
521
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
522
|
+
link.version = -1;
|
|
523
|
+
link.prevActiveLink = link.dep.activeLink;
|
|
524
|
+
link.dep.activeLink = link;
|
|
525
|
+
}
|
|
430
526
|
}
|
|
431
|
-
function
|
|
432
|
-
|
|
433
|
-
|
|
527
|
+
function cleanupDeps(sub) {
|
|
528
|
+
let head;
|
|
529
|
+
let tail = sub.depsTail;
|
|
530
|
+
let link = tail;
|
|
531
|
+
while (link) {
|
|
532
|
+
const prev = link.prevDep;
|
|
533
|
+
if (link.version === -1) {
|
|
534
|
+
if (link === tail) tail = prev;
|
|
535
|
+
removeSub(link);
|
|
536
|
+
removeDep(link);
|
|
537
|
+
} else {
|
|
538
|
+
head = link;
|
|
539
|
+
}
|
|
540
|
+
link.dep.activeLink = link.prevActiveLink;
|
|
541
|
+
link.prevActiveLink = void 0;
|
|
542
|
+
link = prev;
|
|
543
|
+
}
|
|
544
|
+
sub.deps = head;
|
|
545
|
+
sub.depsTail = tail;
|
|
434
546
|
}
|
|
435
|
-
function
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
547
|
+
function isDirty(sub) {
|
|
548
|
+
for (let link = sub.deps; link; link = link.nextDep) {
|
|
549
|
+
if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
|
|
550
|
+
return true;
|
|
439
551
|
}
|
|
440
|
-
effect2.deps.length = effect2._depsLength;
|
|
441
552
|
}
|
|
553
|
+
if (sub._dirty) {
|
|
554
|
+
return true;
|
|
555
|
+
}
|
|
556
|
+
return false;
|
|
442
557
|
}
|
|
443
|
-
function
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
558
|
+
function refreshComputed(computed2) {
|
|
559
|
+
if (computed2.flags & 4 && !(computed2.flags & 16)) {
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
computed2.flags &= ~16;
|
|
563
|
+
if (computed2.globalVersion === globalVersion) {
|
|
564
|
+
return;
|
|
565
|
+
}
|
|
566
|
+
computed2.globalVersion = globalVersion;
|
|
567
|
+
const dep = computed2.dep;
|
|
568
|
+
computed2.flags |= 2;
|
|
569
|
+
if (dep.version > 0 && !computed2.isSSR && computed2.deps && !isDirty(computed2)) {
|
|
570
|
+
computed2.flags &= ~2;
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
const prevSub = activeSub;
|
|
574
|
+
const prevShouldTrack = shouldTrack;
|
|
575
|
+
activeSub = computed2;
|
|
576
|
+
shouldTrack = true;
|
|
577
|
+
try {
|
|
578
|
+
prepareDeps(computed2);
|
|
579
|
+
const value = computed2.fn(computed2._value);
|
|
580
|
+
if (dep.version === 0 || hasChanged(value, computed2._value)) {
|
|
581
|
+
computed2._value = value;
|
|
582
|
+
dep.version++;
|
|
449
583
|
}
|
|
584
|
+
} catch (err) {
|
|
585
|
+
dep.version++;
|
|
586
|
+
throw err;
|
|
587
|
+
} finally {
|
|
588
|
+
activeSub = prevSub;
|
|
589
|
+
shouldTrack = prevShouldTrack;
|
|
590
|
+
cleanupDeps(computed2);
|
|
591
|
+
computed2.flags &= ~2;
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
function removeSub(link, fromComputed = false) {
|
|
595
|
+
const { dep, prevSub, nextSub } = link;
|
|
596
|
+
if (prevSub) {
|
|
597
|
+
prevSub.nextSub = nextSub;
|
|
598
|
+
link.prevSub = void 0;
|
|
599
|
+
}
|
|
600
|
+
if (nextSub) {
|
|
601
|
+
nextSub.prevSub = prevSub;
|
|
602
|
+
link.nextSub = void 0;
|
|
603
|
+
}
|
|
604
|
+
if (dep.subs === link) {
|
|
605
|
+
dep.subs = prevSub;
|
|
606
|
+
}
|
|
607
|
+
if (!dep.subs) {
|
|
608
|
+
if (dep.computed) {
|
|
609
|
+
dep.computed.flags &= ~4;
|
|
610
|
+
for (let l = dep.computed.deps; l; l = l.nextDep) {
|
|
611
|
+
removeSub(l, true);
|
|
612
|
+
}
|
|
613
|
+
} else if (dep.map && !fromComputed) {
|
|
614
|
+
dep.map.delete(dep.key);
|
|
615
|
+
if (!dep.map.size) targetMap.delete(dep.target);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
function removeDep(link) {
|
|
620
|
+
const { prevDep, nextDep } = link;
|
|
621
|
+
if (prevDep) {
|
|
622
|
+
prevDep.nextDep = nextDep;
|
|
623
|
+
link.prevDep = void 0;
|
|
624
|
+
}
|
|
625
|
+
if (nextDep) {
|
|
626
|
+
nextDep.prevDep = prevDep;
|
|
627
|
+
link.nextDep = void 0;
|
|
450
628
|
}
|
|
451
629
|
}
|
|
452
630
|
let shouldTrack = true;
|
|
453
|
-
let pauseScheduleStack = 0;
|
|
454
631
|
const trackStack = [];
|
|
455
632
|
function pauseTracking() {
|
|
456
633
|
trackStack.push(shouldTrack);
|
|
@@ -460,162 +637,378 @@ function resetTracking() {
|
|
|
460
637
|
const last = trackStack.pop();
|
|
461
638
|
shouldTrack = last === void 0 ? true : last;
|
|
462
639
|
}
|
|
463
|
-
function
|
|
464
|
-
|
|
640
|
+
function cleanupEffect(e) {
|
|
641
|
+
const { cleanup } = e;
|
|
642
|
+
e.cleanup = void 0;
|
|
643
|
+
if (cleanup) {
|
|
644
|
+
const prevSub = activeSub;
|
|
645
|
+
activeSub = void 0;
|
|
646
|
+
try {
|
|
647
|
+
cleanup();
|
|
648
|
+
} finally {
|
|
649
|
+
activeSub = prevSub;
|
|
650
|
+
}
|
|
651
|
+
}
|
|
465
652
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
653
|
+
let globalVersion = 0;
|
|
654
|
+
class Link {
|
|
655
|
+
constructor(sub, dep) {
|
|
656
|
+
this.sub = sub;
|
|
657
|
+
this.dep = dep;
|
|
658
|
+
this.version = dep.version;
|
|
659
|
+
this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;
|
|
470
660
|
}
|
|
471
661
|
}
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
662
|
+
class Dep {
|
|
663
|
+
constructor(computed2) {
|
|
664
|
+
this.computed = computed2;
|
|
665
|
+
this.version = 0;
|
|
666
|
+
this.activeLink = void 0;
|
|
667
|
+
this.subs = void 0;
|
|
668
|
+
this.target = void 0;
|
|
669
|
+
this.map = void 0;
|
|
670
|
+
this.key = void 0;
|
|
671
|
+
}
|
|
672
|
+
track(debugInfo) {
|
|
673
|
+
if (!activeSub || !shouldTrack || activeSub === this.computed) {
|
|
674
|
+
return;
|
|
675
|
+
}
|
|
676
|
+
let link = this.activeLink;
|
|
677
|
+
if (link === void 0 || link.sub !== activeSub) {
|
|
678
|
+
link = this.activeLink = new Link(activeSub, this);
|
|
679
|
+
if (!activeSub.deps) {
|
|
680
|
+
activeSub.deps = activeSub.depsTail = link;
|
|
681
|
+
} else {
|
|
682
|
+
link.prevDep = activeSub.depsTail;
|
|
683
|
+
activeSub.depsTail.nextDep = link;
|
|
684
|
+
activeSub.depsTail = link;
|
|
685
|
+
}
|
|
686
|
+
if (activeSub.flags & 4) {
|
|
687
|
+
addSub(link);
|
|
688
|
+
}
|
|
689
|
+
} else if (link.version === -1) {
|
|
690
|
+
link.version = this.version;
|
|
691
|
+
if (link.nextDep) {
|
|
692
|
+
const next = link.nextDep;
|
|
693
|
+
next.prevDep = link.prevDep;
|
|
694
|
+
if (link.prevDep) {
|
|
695
|
+
link.prevDep.nextDep = next;
|
|
696
|
+
}
|
|
697
|
+
link.prevDep = activeSub.depsTail;
|
|
698
|
+
link.nextDep = void 0;
|
|
699
|
+
activeSub.depsTail.nextDep = link;
|
|
700
|
+
activeSub.depsTail = link;
|
|
701
|
+
if (activeSub.deps === link) {
|
|
702
|
+
activeSub.deps = next;
|
|
703
|
+
}
|
|
479
704
|
}
|
|
480
|
-
effect2.deps[effect2._depsLength++] = dep;
|
|
481
|
-
} else {
|
|
482
|
-
effect2._depsLength++;
|
|
483
705
|
}
|
|
706
|
+
return link;
|
|
484
707
|
}
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
effect2._shouldSchedule = false;
|
|
499
|
-
if (effect2.scheduler) {
|
|
500
|
-
queueEffectSchedulers.push(effect2.scheduler);
|
|
708
|
+
trigger(debugInfo) {
|
|
709
|
+
this.version++;
|
|
710
|
+
globalVersion++;
|
|
711
|
+
this.notify(debugInfo);
|
|
712
|
+
}
|
|
713
|
+
notify(debugInfo) {
|
|
714
|
+
startBatch();
|
|
715
|
+
try {
|
|
716
|
+
if (false) ;
|
|
717
|
+
for (let link = this.subs; link; link = link.prevSub) {
|
|
718
|
+
if (link.sub.notify()) {
|
|
719
|
+
;
|
|
720
|
+
link.sub.dep.notify();
|
|
501
721
|
}
|
|
502
722
|
}
|
|
723
|
+
} finally {
|
|
724
|
+
endBatch();
|
|
503
725
|
}
|
|
504
726
|
}
|
|
505
|
-
resetScheduling();
|
|
506
727
|
}
|
|
507
|
-
|
|
508
|
-
const
|
|
509
|
-
dep.
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
728
|
+
function addSub(link) {
|
|
729
|
+
const computed2 = link.dep.computed;
|
|
730
|
+
if (computed2 && !link.dep.subs) {
|
|
731
|
+
computed2.flags |= 4 | 16;
|
|
732
|
+
for (let l = computed2.deps; l; l = l.nextDep) {
|
|
733
|
+
addSub(l);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
const currentTail = link.dep.subs;
|
|
737
|
+
if (currentTail !== link) {
|
|
738
|
+
link.prevSub = currentTail;
|
|
739
|
+
if (currentTail) currentTail.nextSub = link;
|
|
740
|
+
}
|
|
741
|
+
link.dep.subs = link;
|
|
742
|
+
}
|
|
513
743
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
514
|
-
const ITERATE_KEY = Symbol(
|
|
515
|
-
|
|
744
|
+
const ITERATE_KEY = Symbol(
|
|
745
|
+
""
|
|
746
|
+
);
|
|
747
|
+
const MAP_KEY_ITERATE_KEY = Symbol(
|
|
748
|
+
""
|
|
749
|
+
);
|
|
750
|
+
const ARRAY_ITERATE_KEY = Symbol(
|
|
751
|
+
""
|
|
752
|
+
);
|
|
516
753
|
function track(target, type, key) {
|
|
517
|
-
if (shouldTrack &&
|
|
754
|
+
if (shouldTrack && activeSub) {
|
|
518
755
|
let depsMap = targetMap.get(target);
|
|
519
756
|
if (!depsMap) {
|
|
520
757
|
targetMap.set(target, depsMap = /* @__PURE__ */ new Map());
|
|
521
758
|
}
|
|
522
759
|
let dep = depsMap.get(key);
|
|
523
760
|
if (!dep) {
|
|
524
|
-
depsMap.set(key, dep =
|
|
761
|
+
depsMap.set(key, dep = new Dep());
|
|
762
|
+
dep.target = target;
|
|
763
|
+
dep.map = depsMap;
|
|
764
|
+
dep.key = key;
|
|
765
|
+
}
|
|
766
|
+
{
|
|
767
|
+
dep.track();
|
|
525
768
|
}
|
|
526
|
-
trackEffect(
|
|
527
|
-
activeEffect,
|
|
528
|
-
dep);
|
|
529
769
|
}
|
|
530
770
|
}
|
|
531
771
|
function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
532
772
|
const depsMap = targetMap.get(target);
|
|
533
773
|
if (!depsMap) {
|
|
774
|
+
globalVersion++;
|
|
534
775
|
return;
|
|
535
776
|
}
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
const newLength = Number(newValue);
|
|
541
|
-
depsMap.forEach((dep, key2) => {
|
|
542
|
-
if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) {
|
|
543
|
-
deps.push(dep);
|
|
777
|
+
const run = (dep) => {
|
|
778
|
+
if (dep) {
|
|
779
|
+
{
|
|
780
|
+
dep.trigger();
|
|
544
781
|
}
|
|
545
|
-
});
|
|
546
|
-
} else {
|
|
547
|
-
if (key !== void 0) {
|
|
548
|
-
deps.push(depsMap.get(key));
|
|
549
782
|
}
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
783
|
+
};
|
|
784
|
+
startBatch();
|
|
785
|
+
if (type === "clear") {
|
|
786
|
+
depsMap.forEach(run);
|
|
787
|
+
} else {
|
|
788
|
+
const targetIsArray = isArray$1(target);
|
|
789
|
+
const isArrayIndex = targetIsArray && isIntegerKey(key);
|
|
790
|
+
if (targetIsArray && key === "length") {
|
|
791
|
+
const newLength = Number(newValue);
|
|
792
|
+
depsMap.forEach((dep, key2) => {
|
|
793
|
+
if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
|
|
794
|
+
run(dep);
|
|
559
795
|
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
796
|
+
});
|
|
797
|
+
} else {
|
|
798
|
+
if (key !== void 0) {
|
|
799
|
+
run(depsMap.get(key));
|
|
800
|
+
}
|
|
801
|
+
if (isArrayIndex) {
|
|
802
|
+
run(depsMap.get(ARRAY_ITERATE_KEY));
|
|
803
|
+
}
|
|
804
|
+
switch (type) {
|
|
805
|
+
case "add":
|
|
806
|
+
if (!targetIsArray) {
|
|
807
|
+
run(depsMap.get(ITERATE_KEY));
|
|
808
|
+
if (isMap(target)) {
|
|
809
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
810
|
+
}
|
|
811
|
+
} else if (isArrayIndex) {
|
|
812
|
+
run(depsMap.get("length"));
|
|
813
|
+
}
|
|
814
|
+
break;
|
|
815
|
+
case "delete":
|
|
816
|
+
if (!targetIsArray) {
|
|
817
|
+
run(depsMap.get(ITERATE_KEY));
|
|
818
|
+
if (isMap(target)) {
|
|
819
|
+
run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
break;
|
|
823
|
+
case "set":
|
|
564
824
|
if (isMap(target)) {
|
|
565
|
-
|
|
825
|
+
run(depsMap.get(ITERATE_KEY));
|
|
566
826
|
}
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
case "set":
|
|
570
|
-
if (isMap(target)) {
|
|
571
|
-
deps.push(depsMap.get(ITERATE_KEY));
|
|
572
|
-
}
|
|
573
|
-
break;
|
|
827
|
+
break;
|
|
828
|
+
}
|
|
574
829
|
}
|
|
575
830
|
}
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
831
|
+
endBatch();
|
|
832
|
+
}
|
|
833
|
+
function reactiveReadArray(array) {
|
|
834
|
+
const raw = toRaw(array);
|
|
835
|
+
if (raw === array) return raw;
|
|
836
|
+
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
837
|
+
return isShallow(array) ? raw : raw.map(toReactive);
|
|
838
|
+
}
|
|
839
|
+
function shallowReadArray(arr) {
|
|
840
|
+
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
841
|
+
return arr;
|
|
842
|
+
}
|
|
843
|
+
const arrayInstrumentations = {
|
|
844
|
+
__proto__: null,
|
|
845
|
+
[Symbol.iterator]() {
|
|
846
|
+
return iterator(this, Symbol.iterator, toReactive);
|
|
847
|
+
},
|
|
848
|
+
concat(...args) {
|
|
849
|
+
return reactiveReadArray(this).concat(
|
|
850
|
+
...args.map((x) => isArray$1(x) ? reactiveReadArray(x) : x)
|
|
851
|
+
);
|
|
852
|
+
},
|
|
853
|
+
entries() {
|
|
854
|
+
return iterator(this, "entries", (value) => {
|
|
855
|
+
value[1] = toReactive(value[1]);
|
|
856
|
+
return value;
|
|
857
|
+
});
|
|
858
|
+
},
|
|
859
|
+
every(fn, thisArg) {
|
|
860
|
+
return apply(this, "every", fn, thisArg, void 0, arguments);
|
|
861
|
+
},
|
|
862
|
+
filter(fn, thisArg) {
|
|
863
|
+
return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
|
|
864
|
+
},
|
|
865
|
+
find(fn, thisArg) {
|
|
866
|
+
return apply(this, "find", fn, thisArg, toReactive, arguments);
|
|
867
|
+
},
|
|
868
|
+
findIndex(fn, thisArg) {
|
|
869
|
+
return apply(this, "findIndex", fn, thisArg, void 0, arguments);
|
|
870
|
+
},
|
|
871
|
+
findLast(fn, thisArg) {
|
|
872
|
+
return apply(this, "findLast", fn, thisArg, toReactive, arguments);
|
|
873
|
+
},
|
|
874
|
+
findLastIndex(fn, thisArg) {
|
|
875
|
+
return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
|
|
876
|
+
},
|
|
877
|
+
// flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement
|
|
878
|
+
forEach(fn, thisArg) {
|
|
879
|
+
return apply(this, "forEach", fn, thisArg, void 0, arguments);
|
|
880
|
+
},
|
|
881
|
+
includes(...args) {
|
|
882
|
+
return searchProxy(this, "includes", args);
|
|
883
|
+
},
|
|
884
|
+
indexOf(...args) {
|
|
885
|
+
return searchProxy(this, "indexOf", args);
|
|
886
|
+
},
|
|
887
|
+
join(separator) {
|
|
888
|
+
return reactiveReadArray(this).join(separator);
|
|
889
|
+
},
|
|
890
|
+
// keys() iterator only reads `length`, no optimisation required
|
|
891
|
+
lastIndexOf(...args) {
|
|
892
|
+
return searchProxy(this, "lastIndexOf", args);
|
|
893
|
+
},
|
|
894
|
+
map(fn, thisArg) {
|
|
895
|
+
return apply(this, "map", fn, thisArg, void 0, arguments);
|
|
896
|
+
},
|
|
897
|
+
pop() {
|
|
898
|
+
return noTracking(this, "pop");
|
|
899
|
+
},
|
|
900
|
+
push(...args) {
|
|
901
|
+
return noTracking(this, "push", args);
|
|
902
|
+
},
|
|
903
|
+
reduce(fn, ...args) {
|
|
904
|
+
return reduce(this, "reduce", fn, args);
|
|
905
|
+
},
|
|
906
|
+
reduceRight(fn, ...args) {
|
|
907
|
+
return reduce(this, "reduceRight", fn, args);
|
|
908
|
+
},
|
|
909
|
+
shift() {
|
|
910
|
+
return noTracking(this, "shift");
|
|
911
|
+
},
|
|
912
|
+
// slice could use ARRAY_ITERATE but also seems to beg for range tracking
|
|
913
|
+
some(fn, thisArg) {
|
|
914
|
+
return apply(this, "some", fn, thisArg, void 0, arguments);
|
|
915
|
+
},
|
|
916
|
+
splice(...args) {
|
|
917
|
+
return noTracking(this, "splice", args);
|
|
918
|
+
},
|
|
919
|
+
toReversed() {
|
|
920
|
+
return reactiveReadArray(this).toReversed();
|
|
921
|
+
},
|
|
922
|
+
toSorted(comparer) {
|
|
923
|
+
return reactiveReadArray(this).toSorted(comparer);
|
|
924
|
+
},
|
|
925
|
+
toSpliced(...args) {
|
|
926
|
+
return reactiveReadArray(this).toSpliced(...args);
|
|
927
|
+
},
|
|
928
|
+
unshift(...args) {
|
|
929
|
+
return noTracking(this, "unshift", args);
|
|
930
|
+
},
|
|
931
|
+
values() {
|
|
932
|
+
return iterator(this, "values", toReactive);
|
|
933
|
+
}
|
|
934
|
+
};
|
|
935
|
+
function iterator(self, method, wrapValue) {
|
|
936
|
+
const arr = shallowReadArray(self);
|
|
937
|
+
const iter = arr[method]();
|
|
938
|
+
if (arr !== self && !isShallow(self)) {
|
|
939
|
+
iter._next = iter.next;
|
|
940
|
+
iter.next = () => {
|
|
941
|
+
const result = iter._next();
|
|
942
|
+
if (result.value) {
|
|
943
|
+
result.value = wrapValue(result.value);
|
|
944
|
+
}
|
|
945
|
+
return result;
|
|
946
|
+
};
|
|
947
|
+
}
|
|
948
|
+
return iter;
|
|
949
|
+
}
|
|
950
|
+
const arrayProto = Array.prototype;
|
|
951
|
+
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
952
|
+
const arr = shallowReadArray(self);
|
|
953
|
+
const needsWrap = arr !== self && !isShallow(self);
|
|
954
|
+
const methodFn = arr[method];
|
|
955
|
+
if (methodFn !== arrayProto[method]) {
|
|
956
|
+
const result2 = methodFn.apply(self, args);
|
|
957
|
+
return needsWrap ? toReactive(result2) : result2;
|
|
958
|
+
}
|
|
959
|
+
let wrappedFn = fn;
|
|
960
|
+
if (arr !== self) {
|
|
961
|
+
if (needsWrap) {
|
|
962
|
+
wrappedFn = function(item, index) {
|
|
963
|
+
return fn.call(this, toReactive(item), index, self);
|
|
964
|
+
};
|
|
965
|
+
} else if (fn.length > 2) {
|
|
966
|
+
wrappedFn = function(item, index) {
|
|
967
|
+
return fn.call(this, item, index, self);
|
|
968
|
+
};
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
const result = methodFn.call(arr, wrappedFn, thisArg);
|
|
972
|
+
return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
|
|
973
|
+
}
|
|
974
|
+
function reduce(self, method, fn, args) {
|
|
975
|
+
const arr = shallowReadArray(self);
|
|
976
|
+
let wrappedFn = fn;
|
|
977
|
+
if (arr !== self) {
|
|
978
|
+
if (!isShallow(self)) {
|
|
979
|
+
wrappedFn = function(acc, item, index) {
|
|
980
|
+
return fn.call(this, acc, toReactive(item), index, self);
|
|
981
|
+
};
|
|
982
|
+
} else if (fn.length > 3) {
|
|
983
|
+
wrappedFn = function(acc, item, index) {
|
|
984
|
+
return fn.call(this, acc, item, index, self);
|
|
985
|
+
};
|
|
582
986
|
}
|
|
583
987
|
}
|
|
584
|
-
|
|
988
|
+
return arr[method](wrappedFn, ...args);
|
|
989
|
+
}
|
|
990
|
+
function searchProxy(self, method, args) {
|
|
991
|
+
const arr = toRaw(self);
|
|
992
|
+
track(arr, "iterate", ARRAY_ITERATE_KEY);
|
|
993
|
+
const res = arr[method](...args);
|
|
994
|
+
if ((res === -1 || res === false) && isProxy(args[0])) {
|
|
995
|
+
args[0] = toRaw(args[0]);
|
|
996
|
+
return arr[method](...args);
|
|
997
|
+
}
|
|
998
|
+
return res;
|
|
999
|
+
}
|
|
1000
|
+
function noTracking(self, method, args = []) {
|
|
1001
|
+
pauseTracking();
|
|
1002
|
+
startBatch();
|
|
1003
|
+
const res = toRaw(self)[method].apply(self, args);
|
|
1004
|
+
endBatch();
|
|
1005
|
+
resetTracking();
|
|
1006
|
+
return res;
|
|
585
1007
|
}
|
|
586
1008
|
const isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
587
1009
|
const builtInSymbols = new Set(
|
|
588
1010
|
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol)
|
|
589
1011
|
);
|
|
590
|
-
const arrayInstrumentations = /* @__PURE__ */ createArrayInstrumentations();
|
|
591
|
-
function createArrayInstrumentations() {
|
|
592
|
-
const instrumentations = {};
|
|
593
|
-
["includes", "indexOf", "lastIndexOf"].forEach((key) => {
|
|
594
|
-
instrumentations[key] = function(...args) {
|
|
595
|
-
const arr = toRaw(this);
|
|
596
|
-
for (let i = 0, l = this.length; i < l; i++) {
|
|
597
|
-
track(arr, "get", i + "");
|
|
598
|
-
}
|
|
599
|
-
const res = arr[key](...args);
|
|
600
|
-
if (res === -1 || res === false) {
|
|
601
|
-
return arr[key](...args.map(toRaw));
|
|
602
|
-
} else {
|
|
603
|
-
return res;
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
});
|
|
607
|
-
["push", "pop", "shift", "unshift", "splice"].forEach((key) => {
|
|
608
|
-
instrumentations[key] = function(...args) {
|
|
609
|
-
pauseTracking();
|
|
610
|
-
pauseScheduling();
|
|
611
|
-
const res = toRaw(this)[key].apply(this, args);
|
|
612
|
-
resetScheduling();
|
|
613
|
-
resetTracking();
|
|
614
|
-
return res;
|
|
615
|
-
};
|
|
616
|
-
});
|
|
617
|
-
return instrumentations;
|
|
618
|
-
}
|
|
619
1012
|
function hasOwnProperty(key) {
|
|
620
1013
|
if (!isSymbol(key)) key = String(key);
|
|
621
1014
|
const obj = toRaw(this);
|
|
@@ -645,14 +1038,22 @@ class BaseReactiveHandler {
|
|
|
645
1038
|
}
|
|
646
1039
|
const targetIsArray = isArray$1(target);
|
|
647
1040
|
if (!isReadonly2) {
|
|
648
|
-
|
|
649
|
-
|
|
1041
|
+
let fn;
|
|
1042
|
+
if (targetIsArray && (fn = arrayInstrumentations[key])) {
|
|
1043
|
+
return fn;
|
|
650
1044
|
}
|
|
651
1045
|
if (key === "hasOwnProperty") {
|
|
652
1046
|
return hasOwnProperty;
|
|
653
1047
|
}
|
|
654
1048
|
}
|
|
655
|
-
const res = Reflect.get(
|
|
1049
|
+
const res = Reflect.get(
|
|
1050
|
+
target,
|
|
1051
|
+
key,
|
|
1052
|
+
// if this is a proxy wrapping a ref, return methods using the raw ref
|
|
1053
|
+
// as receiver so that we don't have to call `toRaw` on the ref in all
|
|
1054
|
+
// its class methods
|
|
1055
|
+
isRef(target) ? target : receiver
|
|
1056
|
+
);
|
|
656
1057
|
if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
|
|
657
1058
|
return res;
|
|
658
1059
|
}
|
|
@@ -693,7 +1094,12 @@ class MutableReactiveHandler extends BaseReactiveHandler {
|
|
|
693
1094
|
}
|
|
694
1095
|
}
|
|
695
1096
|
const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
|
|
696
|
-
const result = Reflect.set(
|
|
1097
|
+
const result = Reflect.set(
|
|
1098
|
+
target,
|
|
1099
|
+
key,
|
|
1100
|
+
value,
|
|
1101
|
+
isRef(target) ? target : receiver
|
|
1102
|
+
);
|
|
697
1103
|
if (target === toRaw(receiver)) {
|
|
698
1104
|
if (!hadKey) {
|
|
699
1105
|
trigger(target, "add", key, value);
|
|
@@ -741,9 +1147,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
|
741
1147
|
}
|
|
742
1148
|
const mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();
|
|
743
1149
|
const readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();
|
|
744
|
-
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(
|
|
745
|
-
true
|
|
746
|
-
);
|
|
1150
|
+
const shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);
|
|
747
1151
|
const shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
|
|
748
1152
|
const toShallow = (value) => value;
|
|
749
1153
|
const getProto = (v) => Reflect.getPrototypeOf(v);
|
|
@@ -1113,91 +1517,15 @@ function toRaw(observed) {
|
|
|
1113
1517
|
return raw ? toRaw(raw) : observed;
|
|
1114
1518
|
}
|
|
1115
1519
|
function markRaw(value) {
|
|
1116
|
-
if (Object.isExtensible(value)) {
|
|
1520
|
+
if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
|
|
1117
1521
|
def(value, "__v_skip", true);
|
|
1118
1522
|
}
|
|
1119
1523
|
return value;
|
|
1120
1524
|
}
|
|
1121
1525
|
const toReactive = (value) => isObject(value) ? reactive(value) : value;
|
|
1122
1526
|
const toReadonly = (value) => isObject(value) ? readonly(value) : value;
|
|
1123
|
-
class ComputedRefImpl {
|
|
1124
|
-
constructor(getter, _setter, isReadonly2, isSSR) {
|
|
1125
|
-
this.getter = getter;
|
|
1126
|
-
this._setter = _setter;
|
|
1127
|
-
this.dep = void 0;
|
|
1128
|
-
this.__v_isRef = true;
|
|
1129
|
-
this["__v_isReadonly"] = false;
|
|
1130
|
-
this.effect = new ReactiveEffect(
|
|
1131
|
-
() => getter(this._value),
|
|
1132
|
-
() => triggerRefValue(
|
|
1133
|
-
this,
|
|
1134
|
-
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1135
|
-
)
|
|
1136
|
-
);
|
|
1137
|
-
this.effect.computed = this;
|
|
1138
|
-
this.effect.active = this._cacheable = !isSSR;
|
|
1139
|
-
this["__v_isReadonly"] = isReadonly2;
|
|
1140
|
-
}
|
|
1141
|
-
get value() {
|
|
1142
|
-
const self = toRaw(this);
|
|
1143
|
-
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1144
|
-
triggerRefValue(self, 4);
|
|
1145
|
-
}
|
|
1146
|
-
trackRefValue(self);
|
|
1147
|
-
if (self.effect._dirtyLevel >= 2) {
|
|
1148
|
-
triggerRefValue(self, 2);
|
|
1149
|
-
}
|
|
1150
|
-
return self._value;
|
|
1151
|
-
}
|
|
1152
|
-
set value(newValue) {
|
|
1153
|
-
this._setter(newValue);
|
|
1154
|
-
}
|
|
1155
|
-
// #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
|
|
1156
|
-
get _dirty() {
|
|
1157
|
-
return this.effect.dirty;
|
|
1158
|
-
}
|
|
1159
|
-
set _dirty(v) {
|
|
1160
|
-
this.effect.dirty = v;
|
|
1161
|
-
}
|
|
1162
|
-
// #endregion
|
|
1163
|
-
}
|
|
1164
|
-
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1165
|
-
let getter;
|
|
1166
|
-
let setter;
|
|
1167
|
-
const onlyGetter = isFunction(getterOrOptions);
|
|
1168
|
-
if (onlyGetter) {
|
|
1169
|
-
getter = getterOrOptions;
|
|
1170
|
-
setter = NOOP;
|
|
1171
|
-
} else {
|
|
1172
|
-
getter = getterOrOptions.get;
|
|
1173
|
-
setter = getterOrOptions.set;
|
|
1174
|
-
}
|
|
1175
|
-
const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
|
|
1176
|
-
return cRef;
|
|
1177
|
-
}
|
|
1178
|
-
function trackRefValue(ref2) {
|
|
1179
|
-
var _a;
|
|
1180
|
-
if (shouldTrack && activeEffect) {
|
|
1181
|
-
ref2 = toRaw(ref2);
|
|
1182
|
-
trackEffect(
|
|
1183
|
-
activeEffect,
|
|
1184
|
-
(_a = ref2.dep) != null ? _a : ref2.dep = createDep(
|
|
1185
|
-
() => ref2.dep = void 0,
|
|
1186
|
-
ref2 instanceof ComputedRefImpl ? ref2 : void 0
|
|
1187
|
-
));
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
|
|
1191
|
-
ref2 = toRaw(ref2);
|
|
1192
|
-
const dep = ref2.dep;
|
|
1193
|
-
if (dep) {
|
|
1194
|
-
triggerEffects(
|
|
1195
|
-
dep,
|
|
1196
|
-
dirtyLevel);
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
1527
|
function isRef(r) {
|
|
1200
|
-
return
|
|
1528
|
+
return r ? r["__v_isRef"] === true : false;
|
|
1201
1529
|
}
|
|
1202
1530
|
function ref(value) {
|
|
1203
1531
|
return createRef(value, false);
|
|
@@ -1212,25 +1540,30 @@ function createRef(rawValue, shallow) {
|
|
|
1212
1540
|
return new RefImpl(rawValue, shallow);
|
|
1213
1541
|
}
|
|
1214
1542
|
class RefImpl {
|
|
1215
|
-
constructor(value,
|
|
1216
|
-
this.
|
|
1217
|
-
this
|
|
1218
|
-
this
|
|
1219
|
-
this._rawValue =
|
|
1220
|
-
this._value =
|
|
1543
|
+
constructor(value, isShallow2) {
|
|
1544
|
+
this.dep = new Dep();
|
|
1545
|
+
this["__v_isRef"] = true;
|
|
1546
|
+
this["__v_isShallow"] = false;
|
|
1547
|
+
this._rawValue = isShallow2 ? value : toRaw(value);
|
|
1548
|
+
this._value = isShallow2 ? value : toReactive(value);
|
|
1549
|
+
this["__v_isShallow"] = isShallow2;
|
|
1221
1550
|
}
|
|
1222
1551
|
get value() {
|
|
1223
|
-
|
|
1552
|
+
{
|
|
1553
|
+
this.dep.track();
|
|
1554
|
+
}
|
|
1224
1555
|
return this._value;
|
|
1225
1556
|
}
|
|
1226
|
-
set value(
|
|
1227
|
-
const
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
this._rawValue =
|
|
1232
|
-
this._value = useDirectValue ?
|
|
1233
|
-
|
|
1557
|
+
set value(newValue) {
|
|
1558
|
+
const oldValue = this._rawValue;
|
|
1559
|
+
const useDirectValue = this["__v_isShallow"] || isShallow(newValue) || isReadonly(newValue);
|
|
1560
|
+
newValue = useDirectValue ? newValue : toRaw(newValue);
|
|
1561
|
+
if (hasChanged(newValue, oldValue)) {
|
|
1562
|
+
this._rawValue = newValue;
|
|
1563
|
+
this._value = useDirectValue ? newValue : toReactive(newValue);
|
|
1564
|
+
{
|
|
1565
|
+
this.dep.trigger();
|
|
1566
|
+
}
|
|
1234
1567
|
}
|
|
1235
1568
|
}
|
|
1236
1569
|
}
|
|
@@ -1238,7 +1571,7 @@ function unref(ref2) {
|
|
|
1238
1571
|
return isRef(ref2) ? ref2.value : ref2;
|
|
1239
1572
|
}
|
|
1240
1573
|
const shallowUnwrapHandlers = {
|
|
1241
|
-
get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
|
|
1574
|
+
get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
|
|
1242
1575
|
set: (target, key, value, receiver) => {
|
|
1243
1576
|
const oldValue = target[key];
|
|
1244
1577
|
if (isRef(oldValue) && !isRef(value)) {
|
|
@@ -1252,11 +1585,247 @@ const shallowUnwrapHandlers = {
|
|
|
1252
1585
|
function proxyRefs(objectWithRefs) {
|
|
1253
1586
|
return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
|
|
1254
1587
|
}
|
|
1588
|
+
class ComputedRefImpl {
|
|
1589
|
+
constructor(fn, setter, isSSR) {
|
|
1590
|
+
this.fn = fn;
|
|
1591
|
+
this.setter = setter;
|
|
1592
|
+
this._value = void 0;
|
|
1593
|
+
this.dep = new Dep(this);
|
|
1594
|
+
this.__v_isRef = true;
|
|
1595
|
+
this.deps = void 0;
|
|
1596
|
+
this.depsTail = void 0;
|
|
1597
|
+
this.flags = 16;
|
|
1598
|
+
this.globalVersion = globalVersion - 1;
|
|
1599
|
+
this.effect = this;
|
|
1600
|
+
this["__v_isReadonly"] = !setter;
|
|
1601
|
+
this.isSSR = isSSR;
|
|
1602
|
+
}
|
|
1603
|
+
/**
|
|
1604
|
+
* @internal
|
|
1605
|
+
*/
|
|
1606
|
+
notify() {
|
|
1607
|
+
this.flags |= 16;
|
|
1608
|
+
if (!(this.flags & 8) && // avoid infinite self recursion
|
|
1609
|
+
activeSub !== this) {
|
|
1610
|
+
batch(this);
|
|
1611
|
+
return true;
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
get value() {
|
|
1615
|
+
const link = this.dep.track();
|
|
1616
|
+
refreshComputed(this);
|
|
1617
|
+
if (link) {
|
|
1618
|
+
link.version = this.dep.version;
|
|
1619
|
+
}
|
|
1620
|
+
return this._value;
|
|
1621
|
+
}
|
|
1622
|
+
set value(newValue) {
|
|
1623
|
+
if (this.setter) {
|
|
1624
|
+
this.setter(newValue);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
1629
|
+
let getter;
|
|
1630
|
+
let setter;
|
|
1631
|
+
if (isFunction(getterOrOptions)) {
|
|
1632
|
+
getter = getterOrOptions;
|
|
1633
|
+
} else {
|
|
1634
|
+
getter = getterOrOptions.get;
|
|
1635
|
+
setter = getterOrOptions.set;
|
|
1636
|
+
}
|
|
1637
|
+
const cRef = new ComputedRefImpl(getter, setter, isSSR);
|
|
1638
|
+
return cRef;
|
|
1639
|
+
}
|
|
1640
|
+
const INITIAL_WATCHER_VALUE = {};
|
|
1641
|
+
const cleanupMap = /* @__PURE__ */ new WeakMap();
|
|
1642
|
+
let activeWatcher = void 0;
|
|
1643
|
+
function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
|
|
1644
|
+
if (owner) {
|
|
1645
|
+
let cleanups = cleanupMap.get(owner);
|
|
1646
|
+
if (!cleanups) cleanupMap.set(owner, cleanups = []);
|
|
1647
|
+
cleanups.push(cleanupFn);
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
1651
|
+
const { immediate, deep, once, scheduler, augmentJob, call } = options;
|
|
1652
|
+
const reactiveGetter = (source2) => {
|
|
1653
|
+
if (deep) return source2;
|
|
1654
|
+
if (isShallow(source2) || deep === false || deep === 0)
|
|
1655
|
+
return traverse(source2, 1);
|
|
1656
|
+
return traverse(source2);
|
|
1657
|
+
};
|
|
1658
|
+
let effect2;
|
|
1659
|
+
let getter;
|
|
1660
|
+
let cleanup;
|
|
1661
|
+
let boundCleanup;
|
|
1662
|
+
let forceTrigger = false;
|
|
1663
|
+
let isMultiSource = false;
|
|
1664
|
+
if (isRef(source)) {
|
|
1665
|
+
getter = () => source.value;
|
|
1666
|
+
forceTrigger = isShallow(source);
|
|
1667
|
+
} else if (isReactive(source)) {
|
|
1668
|
+
getter = () => reactiveGetter(source);
|
|
1669
|
+
forceTrigger = true;
|
|
1670
|
+
} else if (isArray$1(source)) {
|
|
1671
|
+
isMultiSource = true;
|
|
1672
|
+
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
|
|
1673
|
+
getter = () => source.map((s) => {
|
|
1674
|
+
if (isRef(s)) {
|
|
1675
|
+
return s.value;
|
|
1676
|
+
} else if (isReactive(s)) {
|
|
1677
|
+
return reactiveGetter(s);
|
|
1678
|
+
} else if (isFunction(s)) {
|
|
1679
|
+
return call ? call(s, 2) : s();
|
|
1680
|
+
} else ;
|
|
1681
|
+
});
|
|
1682
|
+
} else if (isFunction(source)) {
|
|
1683
|
+
if (cb) {
|
|
1684
|
+
getter = call ? () => call(source, 2) : source;
|
|
1685
|
+
} else {
|
|
1686
|
+
getter = () => {
|
|
1687
|
+
if (cleanup) {
|
|
1688
|
+
pauseTracking();
|
|
1689
|
+
try {
|
|
1690
|
+
cleanup();
|
|
1691
|
+
} finally {
|
|
1692
|
+
resetTracking();
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
const currentEffect = activeWatcher;
|
|
1696
|
+
activeWatcher = effect2;
|
|
1697
|
+
try {
|
|
1698
|
+
return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
|
|
1699
|
+
} finally {
|
|
1700
|
+
activeWatcher = currentEffect;
|
|
1701
|
+
}
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
} else {
|
|
1705
|
+
getter = NOOP;
|
|
1706
|
+
}
|
|
1707
|
+
if (cb && deep) {
|
|
1708
|
+
const baseGetter = getter;
|
|
1709
|
+
const depth = deep === true ? Infinity : deep;
|
|
1710
|
+
getter = () => traverse(baseGetter(), depth);
|
|
1711
|
+
}
|
|
1712
|
+
const scope = getCurrentScope();
|
|
1713
|
+
const watchHandle = () => {
|
|
1714
|
+
effect2.stop();
|
|
1715
|
+
if (scope) {
|
|
1716
|
+
remove(scope.effects, effect2);
|
|
1717
|
+
}
|
|
1718
|
+
};
|
|
1719
|
+
if (once && cb) {
|
|
1720
|
+
const _cb = cb;
|
|
1721
|
+
cb = (...args) => {
|
|
1722
|
+
_cb(...args);
|
|
1723
|
+
watchHandle();
|
|
1724
|
+
};
|
|
1725
|
+
}
|
|
1726
|
+
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
1727
|
+
const job = (immediateFirstRun) => {
|
|
1728
|
+
if (!(effect2.flags & 1) || !effect2.dirty && !immediateFirstRun) {
|
|
1729
|
+
return;
|
|
1730
|
+
}
|
|
1731
|
+
if (cb) {
|
|
1732
|
+
const newValue = effect2.run();
|
|
1733
|
+
if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
1734
|
+
if (cleanup) {
|
|
1735
|
+
cleanup();
|
|
1736
|
+
}
|
|
1737
|
+
const currentWatcher = activeWatcher;
|
|
1738
|
+
activeWatcher = effect2;
|
|
1739
|
+
try {
|
|
1740
|
+
const args = [
|
|
1741
|
+
newValue,
|
|
1742
|
+
// pass undefined as the old value when it's changed for the first time
|
|
1743
|
+
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
1744
|
+
boundCleanup
|
|
1745
|
+
];
|
|
1746
|
+
call ? call(cb, 3, args) : (
|
|
1747
|
+
// @ts-expect-error
|
|
1748
|
+
cb(...args)
|
|
1749
|
+
);
|
|
1750
|
+
oldValue = newValue;
|
|
1751
|
+
} finally {
|
|
1752
|
+
activeWatcher = currentWatcher;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
} else {
|
|
1756
|
+
effect2.run();
|
|
1757
|
+
}
|
|
1758
|
+
};
|
|
1759
|
+
if (augmentJob) {
|
|
1760
|
+
augmentJob(job);
|
|
1761
|
+
}
|
|
1762
|
+
effect2 = new ReactiveEffect(getter);
|
|
1763
|
+
effect2.scheduler = scheduler ? () => scheduler(job, false) : job;
|
|
1764
|
+
boundCleanup = (fn) => onWatcherCleanup(fn, false, effect2);
|
|
1765
|
+
cleanup = effect2.onStop = () => {
|
|
1766
|
+
const cleanups = cleanupMap.get(effect2);
|
|
1767
|
+
if (cleanups) {
|
|
1768
|
+
if (call) {
|
|
1769
|
+
call(cleanups, 4);
|
|
1770
|
+
} else {
|
|
1771
|
+
for (const cleanup2 of cleanups) cleanup2();
|
|
1772
|
+
}
|
|
1773
|
+
cleanupMap.delete(effect2);
|
|
1774
|
+
}
|
|
1775
|
+
};
|
|
1776
|
+
if (cb) {
|
|
1777
|
+
if (immediate) {
|
|
1778
|
+
job(true);
|
|
1779
|
+
} else {
|
|
1780
|
+
oldValue = effect2.run();
|
|
1781
|
+
}
|
|
1782
|
+
} else if (scheduler) {
|
|
1783
|
+
scheduler(job.bind(null, true), true);
|
|
1784
|
+
} else {
|
|
1785
|
+
effect2.run();
|
|
1786
|
+
}
|
|
1787
|
+
watchHandle.pause = effect2.pause.bind(effect2);
|
|
1788
|
+
watchHandle.resume = effect2.resume.bind(effect2);
|
|
1789
|
+
watchHandle.stop = watchHandle;
|
|
1790
|
+
return watchHandle;
|
|
1791
|
+
}
|
|
1792
|
+
function traverse(value, depth = Infinity, seen) {
|
|
1793
|
+
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
1794
|
+
return value;
|
|
1795
|
+
}
|
|
1796
|
+
seen = seen || /* @__PURE__ */ new Set();
|
|
1797
|
+
if (seen.has(value)) {
|
|
1798
|
+
return value;
|
|
1799
|
+
}
|
|
1800
|
+
seen.add(value);
|
|
1801
|
+
depth--;
|
|
1802
|
+
if (isRef(value)) {
|
|
1803
|
+
traverse(value.value, depth, seen);
|
|
1804
|
+
} else if (isArray$1(value)) {
|
|
1805
|
+
for (let i = 0; i < value.length; i++) {
|
|
1806
|
+
traverse(value[i], depth, seen);
|
|
1807
|
+
}
|
|
1808
|
+
} else if (isSet(value) || isMap(value)) {
|
|
1809
|
+
value.forEach((v) => {
|
|
1810
|
+
traverse(v, depth, seen);
|
|
1811
|
+
});
|
|
1812
|
+
} else if (isPlainObject(value)) {
|
|
1813
|
+
for (const key in value) {
|
|
1814
|
+
traverse(value[key], depth, seen);
|
|
1815
|
+
}
|
|
1816
|
+
for (const key of Object.getOwnPropertySymbols(value)) {
|
|
1817
|
+
if (Object.prototype.propertyIsEnumerable.call(value, key)) {
|
|
1818
|
+
traverse(value[key], depth, seen);
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
return value;
|
|
1823
|
+
}
|
|
1255
1824
|
|
|
1256
1825
|
/* Injected with object hook! */
|
|
1257
1826
|
|
|
1258
1827
|
/**
|
|
1259
|
-
* @vue/runtime-core v3.
|
|
1828
|
+
* @vue/runtime-core v3.5.7
|
|
1260
1829
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
1261
1830
|
* @license MIT
|
|
1262
1831
|
**/
|
|
@@ -1393,6 +1962,7 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
1393
1962
|
}
|
|
1394
1963
|
function handleError(err, instance, type, throwInDev = true) {
|
|
1395
1964
|
const contextVNode = instance ? instance.vnode : null;
|
|
1965
|
+
const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
|
|
1396
1966
|
if (instance) {
|
|
1397
1967
|
let cur = instance.parent;
|
|
1398
1968
|
const exposedInstance = instance.proxy;
|
|
@@ -1408,23 +1978,23 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
1408
1978
|
}
|
|
1409
1979
|
cur = cur.parent;
|
|
1410
1980
|
}
|
|
1411
|
-
|
|
1412
|
-
if (appErrorHandler) {
|
|
1981
|
+
if (errorHandler) {
|
|
1413
1982
|
pauseTracking();
|
|
1414
|
-
callWithErrorHandling(
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
);
|
|
1983
|
+
callWithErrorHandling(errorHandler, null, 10, [
|
|
1984
|
+
err,
|
|
1985
|
+
exposedInstance,
|
|
1986
|
+
errorInfo
|
|
1987
|
+
]);
|
|
1420
1988
|
resetTracking();
|
|
1421
1989
|
return;
|
|
1422
1990
|
}
|
|
1423
1991
|
}
|
|
1424
|
-
logError(err, type, contextVNode, throwInDev);
|
|
1992
|
+
logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
|
|
1425
1993
|
}
|
|
1426
|
-
function logError(err, type, contextVNode, throwInDev = true) {
|
|
1427
|
-
{
|
|
1994
|
+
function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
|
|
1995
|
+
if (throwInProd) {
|
|
1996
|
+
throw err;
|
|
1997
|
+
} else {
|
|
1428
1998
|
console.error(err);
|
|
1429
1999
|
}
|
|
1430
2000
|
}
|
|
@@ -1442,13 +2012,13 @@ function nextTick(fn) {
|
|
|
1442
2012
|
return fn ? p.then(this ? fn.bind(this) : fn) : p;
|
|
1443
2013
|
}
|
|
1444
2014
|
function findInsertionIndex$1(id) {
|
|
1445
|
-
let start = flushIndex + 1;
|
|
2015
|
+
let start = isFlushing ? flushIndex + 1 : 0;
|
|
1446
2016
|
let end = queue.length;
|
|
1447
2017
|
while (start < end) {
|
|
1448
2018
|
const middle = start + end >>> 1;
|
|
1449
2019
|
const middleJob = queue[middle];
|
|
1450
2020
|
const middleJobId = getId(middleJob);
|
|
1451
|
-
if (middleJobId < id || middleJobId === id && middleJob.
|
|
2021
|
+
if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
|
|
1452
2022
|
start = middle + 1;
|
|
1453
2023
|
} else {
|
|
1454
2024
|
end = middle;
|
|
@@ -1457,15 +2027,16 @@ function findInsertionIndex$1(id) {
|
|
|
1457
2027
|
return start;
|
|
1458
2028
|
}
|
|
1459
2029
|
function queueJob(job) {
|
|
1460
|
-
if (!
|
|
1461
|
-
job
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
2030
|
+
if (!(job.flags & 1)) {
|
|
2031
|
+
const jobId = getId(job);
|
|
2032
|
+
const lastJob = queue[queue.length - 1];
|
|
2033
|
+
if (!lastJob || // fast path when the job id is larger than the tail
|
|
2034
|
+
!(job.flags & 2) && jobId >= getId(lastJob)) {
|
|
1465
2035
|
queue.push(job);
|
|
1466
2036
|
} else {
|
|
1467
|
-
queue.splice(findInsertionIndex$1(
|
|
2037
|
+
queue.splice(findInsertionIndex$1(jobId), 0, job);
|
|
1468
2038
|
}
|
|
2039
|
+
job.flags |= 1;
|
|
1469
2040
|
queueFlush();
|
|
1470
2041
|
}
|
|
1471
2042
|
}
|
|
@@ -1475,19 +2046,13 @@ function queueFlush() {
|
|
|
1475
2046
|
currentFlushPromise = resolvedPromise.then(flushJobs);
|
|
1476
2047
|
}
|
|
1477
2048
|
}
|
|
1478
|
-
function invalidateJob(job) {
|
|
1479
|
-
const i = queue.indexOf(job);
|
|
1480
|
-
if (i > flushIndex) {
|
|
1481
|
-
queue.splice(i, 1);
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
2049
|
function queuePostFlushCb(cb) {
|
|
1485
2050
|
if (!isArray$1(cb)) {
|
|
1486
|
-
if (
|
|
1487
|
-
cb
|
|
1488
|
-
|
|
1489
|
-
)) {
|
|
2051
|
+
if (activePostFlushCbs && cb.id === -1) {
|
|
2052
|
+
activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
|
|
2053
|
+
} else if (!(cb.flags & 1)) {
|
|
1490
2054
|
pendingPostFlushCbs.push(cb);
|
|
2055
|
+
cb.flags |= 1;
|
|
1491
2056
|
}
|
|
1492
2057
|
} else {
|
|
1493
2058
|
pendingPostFlushCbs.push(...cb);
|
|
@@ -1497,13 +2062,19 @@ function queuePostFlushCb(cb) {
|
|
|
1497
2062
|
function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
1498
2063
|
for (; i < queue.length; i++) {
|
|
1499
2064
|
const cb = queue[i];
|
|
1500
|
-
if (cb && cb.
|
|
2065
|
+
if (cb && cb.flags & 2) {
|
|
1501
2066
|
if (instance && cb.id !== instance.uid) {
|
|
1502
2067
|
continue;
|
|
1503
2068
|
}
|
|
1504
2069
|
queue.splice(i, 1);
|
|
1505
2070
|
i--;
|
|
2071
|
+
if (cb.flags & 4) {
|
|
2072
|
+
cb.flags &= ~1;
|
|
2073
|
+
}
|
|
1506
2074
|
cb();
|
|
2075
|
+
if (!(cb.flags & 4)) {
|
|
2076
|
+
cb.flags &= ~1;
|
|
2077
|
+
}
|
|
1507
2078
|
}
|
|
1508
2079
|
}
|
|
1509
2080
|
}
|
|
@@ -1520,38 +2091,45 @@ function flushPostFlushCbs(seen) {
|
|
|
1520
2091
|
activePostFlushCbs = deduped;
|
|
1521
2092
|
for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
|
|
1522
2093
|
const cb = activePostFlushCbs[postFlushIndex];
|
|
1523
|
-
if (cb.
|
|
2094
|
+
if (cb.flags & 4) {
|
|
2095
|
+
cb.flags &= ~1;
|
|
2096
|
+
}
|
|
2097
|
+
if (!(cb.flags & 8)) cb();
|
|
2098
|
+
cb.flags &= ~1;
|
|
1524
2099
|
}
|
|
1525
2100
|
activePostFlushCbs = null;
|
|
1526
2101
|
postFlushIndex = 0;
|
|
1527
2102
|
}
|
|
1528
2103
|
}
|
|
1529
|
-
const getId = (job) => job.id == null ? Infinity : job.id;
|
|
1530
|
-
const comparator = (a, b) => {
|
|
1531
|
-
const diff = getId(a) - getId(b);
|
|
1532
|
-
if (diff === 0) {
|
|
1533
|
-
if (a.pre && !b.pre) return -1;
|
|
1534
|
-
if (b.pre && !a.pre) return 1;
|
|
1535
|
-
}
|
|
1536
|
-
return diff;
|
|
1537
|
-
};
|
|
2104
|
+
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
1538
2105
|
function flushJobs(seen) {
|
|
1539
2106
|
isFlushPending = false;
|
|
1540
2107
|
isFlushing = true;
|
|
1541
|
-
queue.sort(comparator);
|
|
1542
2108
|
try {
|
|
1543
2109
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
1544
2110
|
const job = queue[flushIndex];
|
|
1545
|
-
if (job && job.
|
|
2111
|
+
if (job && !(job.flags & 8)) {
|
|
1546
2112
|
if (false) ;
|
|
2113
|
+
if (job.flags & 4) {
|
|
2114
|
+
job.flags &= ~1;
|
|
2115
|
+
}
|
|
1547
2116
|
callWithErrorHandling(
|
|
1548
2117
|
job,
|
|
1549
2118
|
job.i,
|
|
1550
2119
|
job.i ? 15 : 14
|
|
1551
2120
|
);
|
|
2121
|
+
if (!(job.flags & 4)) {
|
|
2122
|
+
job.flags &= ~1;
|
|
2123
|
+
}
|
|
1552
2124
|
}
|
|
1553
2125
|
}
|
|
1554
2126
|
} finally {
|
|
2127
|
+
for (; flushIndex < queue.length; flushIndex++) {
|
|
2128
|
+
const job = queue[flushIndex];
|
|
2129
|
+
if (job) {
|
|
2130
|
+
job.flags &= ~1;
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
1555
2133
|
flushIndex = 0;
|
|
1556
2134
|
queue.length = 0;
|
|
1557
2135
|
flushPostFlushCbs();
|
|
@@ -1647,8 +2225,11 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
1647
2225
|
}
|
|
1648
2226
|
}
|
|
1649
2227
|
}
|
|
2228
|
+
const TeleportEndKey = Symbol("_vte");
|
|
2229
|
+
const isTeleport = (type) => type.__isTeleport;
|
|
1650
2230
|
function setTransitionHooks(vnode, hooks) {
|
|
1651
2231
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
2232
|
+
vnode.transition = hooks;
|
|
1652
2233
|
setTransitionHooks(vnode.component.subTree, hooks);
|
|
1653
2234
|
} else if (vnode.shapeFlag & 128) {
|
|
1654
2235
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
@@ -1657,15 +2238,99 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
1657
2238
|
vnode.transition = hooks;
|
|
1658
2239
|
}
|
|
1659
2240
|
}
|
|
1660
|
-
/*! #__NO_SIDE_EFFECTS__ */
|
|
1661
|
-
// @__NO_SIDE_EFFECTS__
|
|
1662
|
-
function defineComponent(options, extraOptions) {
|
|
1663
|
-
return isFunction(options) ? (
|
|
1664
|
-
// #
|
|
1665
|
-
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
1666
|
-
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
|
|
1667
|
-
) : options;
|
|
1668
|
-
}
|
|
2241
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
2242
|
+
// @__NO_SIDE_EFFECTS__
|
|
2243
|
+
function defineComponent(options, extraOptions) {
|
|
2244
|
+
return isFunction(options) ? (
|
|
2245
|
+
// #8236: extend call and options.name access are considered side-effects
|
|
2246
|
+
// by Rollup, so we have to wrap it in a pure-annotated IIFE.
|
|
2247
|
+
/* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()
|
|
2248
|
+
) : options;
|
|
2249
|
+
}
|
|
2250
|
+
function markAsyncBoundary(instance) {
|
|
2251
|
+
instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
|
|
2252
|
+
}
|
|
2253
|
+
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
2254
|
+
if (isArray$1(rawRef)) {
|
|
2255
|
+
rawRef.forEach(
|
|
2256
|
+
(r, i) => setRef(
|
|
2257
|
+
r,
|
|
2258
|
+
oldRawRef && (isArray$1(oldRawRef) ? oldRawRef[i] : oldRawRef),
|
|
2259
|
+
parentSuspense,
|
|
2260
|
+
vnode,
|
|
2261
|
+
isUnmount
|
|
2262
|
+
)
|
|
2263
|
+
);
|
|
2264
|
+
return;
|
|
2265
|
+
}
|
|
2266
|
+
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
2267
|
+
return;
|
|
2268
|
+
}
|
|
2269
|
+
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
2270
|
+
const value = isUnmount ? null : refValue;
|
|
2271
|
+
const { i: owner, r: ref3 } = rawRef;
|
|
2272
|
+
const oldRef = oldRawRef && oldRawRef.r;
|
|
2273
|
+
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
2274
|
+
const setupState = owner.setupState;
|
|
2275
|
+
const rawSetupState = toRaw(setupState);
|
|
2276
|
+
const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
|
|
2277
|
+
return hasOwn(rawSetupState, key);
|
|
2278
|
+
};
|
|
2279
|
+
if (oldRef != null && oldRef !== ref3) {
|
|
2280
|
+
if (isString(oldRef)) {
|
|
2281
|
+
refs[oldRef] = null;
|
|
2282
|
+
if (canSetSetupRef(oldRef)) {
|
|
2283
|
+
setupState[oldRef] = null;
|
|
2284
|
+
}
|
|
2285
|
+
} else if (isRef(oldRef)) {
|
|
2286
|
+
oldRef.value = null;
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
if (isFunction(ref3)) {
|
|
2290
|
+
callWithErrorHandling(ref3, owner, 12, [value, refs]);
|
|
2291
|
+
} else {
|
|
2292
|
+
const _isString = isString(ref3);
|
|
2293
|
+
const _isRef = isRef(ref3);
|
|
2294
|
+
if (_isString || _isRef) {
|
|
2295
|
+
const doSet = () => {
|
|
2296
|
+
if (rawRef.f) {
|
|
2297
|
+
const existing = _isString ? canSetSetupRef(ref3) ? setupState[ref3] : refs[ref3] : ref3.value;
|
|
2298
|
+
if (isUnmount) {
|
|
2299
|
+
isArray$1(existing) && remove(existing, refValue);
|
|
2300
|
+
} else {
|
|
2301
|
+
if (!isArray$1(existing)) {
|
|
2302
|
+
if (_isString) {
|
|
2303
|
+
refs[ref3] = [refValue];
|
|
2304
|
+
if (canSetSetupRef(ref3)) {
|
|
2305
|
+
setupState[ref3] = refs[ref3];
|
|
2306
|
+
}
|
|
2307
|
+
} else {
|
|
2308
|
+
ref3.value = [refValue];
|
|
2309
|
+
if (rawRef.k) refs[rawRef.k] = ref3.value;
|
|
2310
|
+
}
|
|
2311
|
+
} else if (!existing.includes(refValue)) {
|
|
2312
|
+
existing.push(refValue);
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
} else if (_isString) {
|
|
2316
|
+
refs[ref3] = value;
|
|
2317
|
+
if (canSetSetupRef(ref3)) {
|
|
2318
|
+
setupState[ref3] = value;
|
|
2319
|
+
}
|
|
2320
|
+
} else if (_isRef) {
|
|
2321
|
+
ref3.value = value;
|
|
2322
|
+
if (rawRef.k) refs[rawRef.k] = value;
|
|
2323
|
+
} else ;
|
|
2324
|
+
};
|
|
2325
|
+
if (value) {
|
|
2326
|
+
doSet.id = -1;
|
|
2327
|
+
queuePostRenderEffect(doSet, parentSuspense);
|
|
2328
|
+
} else {
|
|
2329
|
+
doSet();
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
1669
2334
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
1670
2335
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
1671
2336
|
function onActivated(hook, target) {
|
|
@@ -1734,17 +2399,19 @@ const createHook = (lifecycle) => (hook, target = currentInstance) => {
|
|
|
1734
2399
|
};
|
|
1735
2400
|
const onBeforeMount = createHook("bm");
|
|
1736
2401
|
const onMounted = createHook("m");
|
|
1737
|
-
const onBeforeUpdate = createHook(
|
|
2402
|
+
const onBeforeUpdate = createHook(
|
|
2403
|
+
"bu"
|
|
2404
|
+
);
|
|
1738
2405
|
const onUpdated = createHook("u");
|
|
1739
|
-
const onBeforeUnmount = createHook(
|
|
1740
|
-
|
|
1741
|
-
const onServerPrefetch = createHook("sp");
|
|
1742
|
-
const onRenderTriggered = createHook(
|
|
1743
|
-
"rtg"
|
|
2406
|
+
const onBeforeUnmount = createHook(
|
|
2407
|
+
"bum"
|
|
1744
2408
|
);
|
|
1745
|
-
const
|
|
1746
|
-
|
|
2409
|
+
const onUnmounted = createHook("um");
|
|
2410
|
+
const onServerPrefetch = createHook(
|
|
2411
|
+
"sp"
|
|
1747
2412
|
);
|
|
2413
|
+
const onRenderTriggered = createHook("rtg");
|
|
2414
|
+
const onRenderTracked = createHook("rtc");
|
|
1748
2415
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
1749
2416
|
injectHook("ec", hook, target);
|
|
1750
2417
|
}
|
|
@@ -1784,10 +2451,22 @@ function resolve(registry, name) {
|
|
|
1784
2451
|
function renderList(source, renderItem, cache, index) {
|
|
1785
2452
|
let ret;
|
|
1786
2453
|
const cached = cache;
|
|
1787
|
-
|
|
2454
|
+
const sourceIsArray = isArray$1(source);
|
|
2455
|
+
if (sourceIsArray || isString(source)) {
|
|
2456
|
+
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
2457
|
+
let needsWrap = false;
|
|
2458
|
+
if (sourceIsReactiveArray) {
|
|
2459
|
+
needsWrap = !isShallow(source);
|
|
2460
|
+
source = shallowReadArray(source);
|
|
2461
|
+
}
|
|
1788
2462
|
ret = new Array(source.length);
|
|
1789
2463
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
1790
|
-
ret[i] = renderItem(
|
|
2464
|
+
ret[i] = renderItem(
|
|
2465
|
+
needsWrap ? toReactive(source[i]) : source[i],
|
|
2466
|
+
i,
|
|
2467
|
+
void 0,
|
|
2468
|
+
cached
|
|
2469
|
+
);
|
|
1791
2470
|
}
|
|
1792
2471
|
} else if (typeof source === "number") {
|
|
1793
2472
|
ret = new Array(source);
|
|
@@ -1814,9 +2493,14 @@ function renderList(source, renderItem, cache, index) {
|
|
|
1814
2493
|
return ret;
|
|
1815
2494
|
}
|
|
1816
2495
|
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
1817
|
-
if (currentRenderingInstance.
|
|
2496
|
+
if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
|
|
1818
2497
|
if (name !== "default") props.name = name;
|
|
1819
|
-
return
|
|
2498
|
+
return openBlock(), createBlock(
|
|
2499
|
+
Fragment,
|
|
2500
|
+
null,
|
|
2501
|
+
[createVNode("slot", props, fallback)],
|
|
2502
|
+
64
|
|
2503
|
+
);
|
|
1820
2504
|
}
|
|
1821
2505
|
let slot = slots[name];
|
|
1822
2506
|
if (slot && slot._c) {
|
|
@@ -1870,10 +2554,10 @@ const publicPropertiesMap = (
|
|
|
1870
2554
|
$refs: (i) => i.refs,
|
|
1871
2555
|
$parent: (i) => getPublicInstance(i.parent),
|
|
1872
2556
|
$root: (i) => getPublicInstance(i.root),
|
|
2557
|
+
$host: (i) => i.ce,
|
|
1873
2558
|
$emit: (i) => i.emit,
|
|
1874
2559
|
$options: (i) => resolveMergedOptions(i) ,
|
|
1875
2560
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
1876
|
-
i.effect.dirty = true;
|
|
1877
2561
|
queueJob(i.update);
|
|
1878
2562
|
}),
|
|
1879
2563
|
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
@@ -2120,6 +2804,9 @@ function applyOptions(instance) {
|
|
|
2120
2804
|
}
|
|
2121
2805
|
if (components) instance.components = components;
|
|
2122
2806
|
if (directives) instance.directives = directives;
|
|
2807
|
+
if (serverPrefetch) {
|
|
2808
|
+
markAsyncBoundary(instance);
|
|
2809
|
+
}
|
|
2123
2810
|
}
|
|
2124
2811
|
function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {
|
|
2125
2812
|
if (isArray$1(injectOptions)) {
|
|
@@ -2161,14 +2848,18 @@ function callHook(hook, instance, type) {
|
|
|
2161
2848
|
);
|
|
2162
2849
|
}
|
|
2163
2850
|
function createWatcher(raw, ctx, publicThis, key) {
|
|
2164
|
-
|
|
2851
|
+
let getter = key.includes(".") ? createPathGetter(publicThis, key) : () => publicThis[key];
|
|
2165
2852
|
if (isString(raw)) {
|
|
2166
2853
|
const handler = ctx[raw];
|
|
2167
2854
|
if (isFunction(handler)) {
|
|
2168
|
-
|
|
2855
|
+
{
|
|
2856
|
+
watch(getter, handler);
|
|
2857
|
+
}
|
|
2169
2858
|
}
|
|
2170
2859
|
} else if (isFunction(raw)) {
|
|
2171
|
-
|
|
2860
|
+
{
|
|
2861
|
+
watch(getter, raw.bind(publicThis));
|
|
2862
|
+
}
|
|
2172
2863
|
} else if (isObject(raw)) {
|
|
2173
2864
|
if (isArray$1(raw)) {
|
|
2174
2865
|
raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
@@ -2347,6 +3038,7 @@ function createAppAPI(render, hydrate) {
|
|
|
2347
3038
|
}
|
|
2348
3039
|
const context = createAppContext();
|
|
2349
3040
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
3041
|
+
const pluginCleanupFns = [];
|
|
2350
3042
|
let isMounted = false;
|
|
2351
3043
|
const app = context.app = {
|
|
2352
3044
|
_uid: uid$1++,
|
|
@@ -2395,7 +3087,7 @@ function createAppAPI(render, hydrate) {
|
|
|
2395
3087
|
},
|
|
2396
3088
|
mount(rootContainer, isHydrate, namespace) {
|
|
2397
3089
|
if (!isMounted) {
|
|
2398
|
-
const vnode = createVNode(rootComponent, rootProps);
|
|
3090
|
+
const vnode = app._ceVNode || createVNode(rootComponent, rootProps);
|
|
2399
3091
|
vnode.appContext = context;
|
|
2400
3092
|
if (namespace === true) {
|
|
2401
3093
|
namespace = "svg";
|
|
@@ -2413,8 +3105,16 @@ function createAppAPI(render, hydrate) {
|
|
|
2413
3105
|
return getComponentPublicInstance(vnode.component);
|
|
2414
3106
|
}
|
|
2415
3107
|
},
|
|
3108
|
+
onUnmount(cleanupFn) {
|
|
3109
|
+
pluginCleanupFns.push(cleanupFn);
|
|
3110
|
+
},
|
|
2416
3111
|
unmount() {
|
|
2417
3112
|
if (isMounted) {
|
|
3113
|
+
callWithAsyncErrorHandling(
|
|
3114
|
+
pluginCleanupFns,
|
|
3115
|
+
app._instance,
|
|
3116
|
+
16
|
|
3117
|
+
);
|
|
2418
3118
|
render(null, app._container);
|
|
2419
3119
|
delete app._container.__vue_app__;
|
|
2420
3120
|
}
|
|
@@ -2634,6 +3334,9 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
2634
3334
|
} else {
|
|
2635
3335
|
value = defaultValue;
|
|
2636
3336
|
}
|
|
3337
|
+
if (instance.ce) {
|
|
3338
|
+
instance.ce._setProp(key, value);
|
|
3339
|
+
}
|
|
2637
3340
|
}
|
|
2638
3341
|
if (opt[
|
|
2639
3342
|
0
|
|
@@ -2823,85 +3526,6 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
2823
3526
|
}
|
|
2824
3527
|
}
|
|
2825
3528
|
};
|
|
2826
|
-
function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
2827
|
-
if (isArray$1(rawRef)) {
|
|
2828
|
-
rawRef.forEach(
|
|
2829
|
-
(r, i) => setRef(
|
|
2830
|
-
r,
|
|
2831
|
-
oldRawRef && (isArray$1(oldRawRef) ? oldRawRef[i] : oldRawRef),
|
|
2832
|
-
parentSuspense,
|
|
2833
|
-
vnode,
|
|
2834
|
-
isUnmount
|
|
2835
|
-
)
|
|
2836
|
-
);
|
|
2837
|
-
return;
|
|
2838
|
-
}
|
|
2839
|
-
if (isAsyncWrapper(vnode) && !isUnmount) {
|
|
2840
|
-
return;
|
|
2841
|
-
}
|
|
2842
|
-
const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;
|
|
2843
|
-
const value = isUnmount ? null : refValue;
|
|
2844
|
-
const { i: owner, r: ref3 } = rawRef;
|
|
2845
|
-
const oldRef = oldRawRef && oldRawRef.r;
|
|
2846
|
-
const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
|
|
2847
|
-
const setupState = owner.setupState;
|
|
2848
|
-
if (oldRef != null && oldRef !== ref3) {
|
|
2849
|
-
if (isString(oldRef)) {
|
|
2850
|
-
refs[oldRef] = null;
|
|
2851
|
-
if (hasOwn(setupState, oldRef)) {
|
|
2852
|
-
setupState[oldRef] = null;
|
|
2853
|
-
}
|
|
2854
|
-
} else if (isRef(oldRef)) {
|
|
2855
|
-
oldRef.value = null;
|
|
2856
|
-
}
|
|
2857
|
-
}
|
|
2858
|
-
if (isFunction(ref3)) {
|
|
2859
|
-
callWithErrorHandling(ref3, owner, 12, [value, refs]);
|
|
2860
|
-
} else {
|
|
2861
|
-
const _isString = isString(ref3);
|
|
2862
|
-
const _isRef = isRef(ref3);
|
|
2863
|
-
if (_isString || _isRef) {
|
|
2864
|
-
const doSet = () => {
|
|
2865
|
-
if (rawRef.f) {
|
|
2866
|
-
const existing = _isString ? hasOwn(setupState, ref3) ? setupState[ref3] : refs[ref3] : ref3.value;
|
|
2867
|
-
if (isUnmount) {
|
|
2868
|
-
isArray$1(existing) && remove(existing, refValue);
|
|
2869
|
-
} else {
|
|
2870
|
-
if (!isArray$1(existing)) {
|
|
2871
|
-
if (_isString) {
|
|
2872
|
-
refs[ref3] = [refValue];
|
|
2873
|
-
if (hasOwn(setupState, ref3)) {
|
|
2874
|
-
setupState[ref3] = refs[ref3];
|
|
2875
|
-
}
|
|
2876
|
-
} else {
|
|
2877
|
-
ref3.value = [refValue];
|
|
2878
|
-
if (rawRef.k) refs[rawRef.k] = ref3.value;
|
|
2879
|
-
}
|
|
2880
|
-
} else if (!existing.includes(refValue)) {
|
|
2881
|
-
existing.push(refValue);
|
|
2882
|
-
}
|
|
2883
|
-
}
|
|
2884
|
-
} else if (_isString) {
|
|
2885
|
-
refs[ref3] = value;
|
|
2886
|
-
if (hasOwn(setupState, ref3)) {
|
|
2887
|
-
setupState[ref3] = value;
|
|
2888
|
-
}
|
|
2889
|
-
} else if (_isRef) {
|
|
2890
|
-
ref3.value = value;
|
|
2891
|
-
if (rawRef.k) refs[rawRef.k] = value;
|
|
2892
|
-
} else ;
|
|
2893
|
-
};
|
|
2894
|
-
if (value) {
|
|
2895
|
-
doSet.id = -1;
|
|
2896
|
-
queuePostRenderEffect(doSet, parentSuspense);
|
|
2897
|
-
} else {
|
|
2898
|
-
doSet();
|
|
2899
|
-
}
|
|
2900
|
-
}
|
|
2901
|
-
}
|
|
2902
|
-
}
|
|
2903
|
-
const TeleportEndKey = Symbol("_vte");
|
|
2904
|
-
const isTeleport = (type) => type.__isTeleport;
|
|
2905
3529
|
const queuePostRenderEffect = queueEffectWithSuspense;
|
|
2906
3530
|
function createRenderer(options) {
|
|
2907
3531
|
return baseCreateRenderer(options);
|
|
@@ -3169,7 +3793,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3169
3793
|
}
|
|
3170
3794
|
if (parentComponent) {
|
|
3171
3795
|
let subTree = parentComponent.subTree;
|
|
3172
|
-
if (vnode === subTree) {
|
|
3796
|
+
if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {
|
|
3173
3797
|
const parentVNode = parentComponent.vnode;
|
|
3174
3798
|
setScopeId(
|
|
3175
3799
|
el,
|
|
@@ -3467,8 +4091,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3467
4091
|
return;
|
|
3468
4092
|
} else {
|
|
3469
4093
|
instance.next = n2;
|
|
3470
|
-
invalidateJob(instance.update);
|
|
3471
|
-
instance.effect.dirty = true;
|
|
3472
4094
|
instance.update();
|
|
3473
4095
|
}
|
|
3474
4096
|
} else {
|
|
@@ -3481,7 +4103,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3481
4103
|
if (!instance.isMounted) {
|
|
3482
4104
|
let vnodeHook;
|
|
3483
4105
|
const { el, props } = initialVNode;
|
|
3484
|
-
const { bm, m, parent } = instance;
|
|
4106
|
+
const { bm, m, parent, root, type } = instance;
|
|
3485
4107
|
const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
|
|
3486
4108
|
toggleRecurse(instance, false);
|
|
3487
4109
|
if (bm) {
|
|
@@ -3502,18 +4124,19 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3502
4124
|
null
|
|
3503
4125
|
);
|
|
3504
4126
|
};
|
|
3505
|
-
if (isAsyncWrapperVNode) {
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
// and it will never need to change.
|
|
3511
|
-
() => !instance.isUnmounted && hydrateSubTree()
|
|
4127
|
+
if (isAsyncWrapperVNode && type.__asyncHydrate) {
|
|
4128
|
+
type.__asyncHydrate(
|
|
4129
|
+
el,
|
|
4130
|
+
instance,
|
|
4131
|
+
hydrateSubTree
|
|
3512
4132
|
);
|
|
3513
4133
|
} else {
|
|
3514
4134
|
hydrateSubTree();
|
|
3515
4135
|
}
|
|
3516
4136
|
} else {
|
|
4137
|
+
if (root.ce) {
|
|
4138
|
+
root.ce._injectChildStyle(type);
|
|
4139
|
+
}
|
|
3517
4140
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
3518
4141
|
patch(
|
|
3519
4142
|
null,
|
|
@@ -3603,20 +4226,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3603
4226
|
}
|
|
3604
4227
|
}
|
|
3605
4228
|
};
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
if (effect2.dirty) {
|
|
3615
|
-
effect2.run();
|
|
3616
|
-
}
|
|
3617
|
-
};
|
|
3618
|
-
update.i = instance;
|
|
3619
|
-
update.id = instance.uid;
|
|
4229
|
+
instance.scope.on();
|
|
4230
|
+
const effect2 = instance.effect = new ReactiveEffect(componentUpdateFn);
|
|
4231
|
+
instance.scope.off();
|
|
4232
|
+
const update = instance.update = effect2.run.bind(effect2);
|
|
4233
|
+
const job = instance.job = effect2.runIfDirty.bind(effect2);
|
|
4234
|
+
job.i = instance;
|
|
4235
|
+
job.id = instance.uid;
|
|
4236
|
+
effect2.scheduler = () => queueJob(job);
|
|
3620
4237
|
toggleRecurse(instance, true);
|
|
3621
4238
|
update();
|
|
3622
4239
|
};
|
|
@@ -4075,15 +4692,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4075
4692
|
hostRemove(end);
|
|
4076
4693
|
};
|
|
4077
4694
|
const unmountComponent = (instance, parentSuspense, doRemove) => {
|
|
4078
|
-
const { bum, scope,
|
|
4695
|
+
const { bum, scope, job, subTree, um, m, a } = instance;
|
|
4079
4696
|
invalidateMount(m);
|
|
4080
4697
|
invalidateMount(a);
|
|
4081
4698
|
if (bum) {
|
|
4082
4699
|
invokeArrayFns(bum);
|
|
4083
4700
|
}
|
|
4084
4701
|
scope.stop();
|
|
4085
|
-
if (
|
|
4086
|
-
|
|
4702
|
+
if (job) {
|
|
4703
|
+
job.flags |= 8;
|
|
4087
4704
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
4088
4705
|
}
|
|
4089
4706
|
if (um) {
|
|
@@ -4163,8 +4780,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4163
4780
|
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
4164
4781
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
4165
4782
|
}
|
|
4166
|
-
function toggleRecurse({ effect: effect2,
|
|
4167
|
-
|
|
4783
|
+
function toggleRecurse({ effect: effect2, job }, allowed) {
|
|
4784
|
+
if (allowed) {
|
|
4785
|
+
effect2.flags |= 32;
|
|
4786
|
+
job.flags |= 4;
|
|
4787
|
+
} else {
|
|
4788
|
+
effect2.flags &= ~32;
|
|
4789
|
+
job.flags &= ~4;
|
|
4790
|
+
}
|
|
4168
4791
|
}
|
|
4169
4792
|
function needTransition(parentSuspense, transition) {
|
|
4170
4793
|
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
@@ -4242,7 +4865,8 @@ function locateNonHydratedAsyncRoot(instance) {
|
|
|
4242
4865
|
}
|
|
4243
4866
|
function invalidateMount(hooks) {
|
|
4244
4867
|
if (hooks) {
|
|
4245
|
-
for (let i = 0; i < hooks.length; i++)
|
|
4868
|
+
for (let i = 0; i < hooks.length; i++)
|
|
4869
|
+
hooks[i].flags |= 8;
|
|
4246
4870
|
}
|
|
4247
4871
|
}
|
|
4248
4872
|
const ssrContextKey = Symbol.for("v-scx");
|
|
@@ -4252,158 +4876,60 @@ const useSSRContext = () => {
|
|
|
4252
4876
|
return ctx;
|
|
4253
4877
|
}
|
|
4254
4878
|
};
|
|
4255
|
-
const INITIAL_WATCHER_VALUE = {};
|
|
4256
4879
|
function watch(source, cb, options) {
|
|
4257
4880
|
return doWatch(source, cb, options);
|
|
4258
4881
|
}
|
|
4259
|
-
function doWatch(source, cb, {
|
|
4260
|
-
immediate,
|
|
4261
|
-
|
|
4262
|
-
flush,
|
|
4263
|
-
once,
|
|
4264
|
-
onTrack,
|
|
4265
|
-
onTrigger
|
|
4266
|
-
} = EMPTY_OBJ) {
|
|
4267
|
-
if (cb && once) {
|
|
4268
|
-
const _cb = cb;
|
|
4269
|
-
cb = (...args) => {
|
|
4270
|
-
_cb(...args);
|
|
4271
|
-
unwatch();
|
|
4272
|
-
};
|
|
4273
|
-
}
|
|
4274
|
-
const instance = currentInstance;
|
|
4275
|
-
const reactiveGetter = (source2) => deep === true ? source2 : (
|
|
4276
|
-
// for deep: false, only traverse root-level properties
|
|
4277
|
-
traverse(source2, deep === false ? 1 : void 0)
|
|
4278
|
-
);
|
|
4279
|
-
let getter;
|
|
4280
|
-
let forceTrigger = false;
|
|
4281
|
-
let isMultiSource = false;
|
|
4282
|
-
if (isRef(source)) {
|
|
4283
|
-
getter = () => source.value;
|
|
4284
|
-
forceTrigger = isShallow(source);
|
|
4285
|
-
} else if (isReactive(source)) {
|
|
4286
|
-
getter = () => reactiveGetter(source);
|
|
4287
|
-
forceTrigger = true;
|
|
4288
|
-
} else if (isArray$1(source)) {
|
|
4289
|
-
isMultiSource = true;
|
|
4290
|
-
forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
|
|
4291
|
-
getter = () => source.map((s) => {
|
|
4292
|
-
if (isRef(s)) {
|
|
4293
|
-
return s.value;
|
|
4294
|
-
} else if (isReactive(s)) {
|
|
4295
|
-
return reactiveGetter(s);
|
|
4296
|
-
} else if (isFunction(s)) {
|
|
4297
|
-
return callWithErrorHandling(s, instance, 2);
|
|
4298
|
-
} else ;
|
|
4299
|
-
});
|
|
4300
|
-
} else if (isFunction(source)) {
|
|
4301
|
-
if (cb) {
|
|
4302
|
-
getter = () => callWithErrorHandling(source, instance, 2);
|
|
4303
|
-
} else {
|
|
4304
|
-
getter = () => {
|
|
4305
|
-
if (cleanup) {
|
|
4306
|
-
cleanup();
|
|
4307
|
-
}
|
|
4308
|
-
return callWithAsyncErrorHandling(
|
|
4309
|
-
source,
|
|
4310
|
-
instance,
|
|
4311
|
-
3,
|
|
4312
|
-
[onCleanup]
|
|
4313
|
-
);
|
|
4314
|
-
};
|
|
4315
|
-
}
|
|
4316
|
-
} else {
|
|
4317
|
-
getter = NOOP;
|
|
4318
|
-
}
|
|
4319
|
-
if (cb && deep) {
|
|
4320
|
-
const baseGetter = getter;
|
|
4321
|
-
getter = () => traverse(baseGetter());
|
|
4322
|
-
}
|
|
4323
|
-
let cleanup;
|
|
4324
|
-
let onCleanup = (fn) => {
|
|
4325
|
-
cleanup = effect2.onStop = () => {
|
|
4326
|
-
callWithErrorHandling(fn, instance, 4);
|
|
4327
|
-
cleanup = effect2.onStop = void 0;
|
|
4328
|
-
};
|
|
4329
|
-
};
|
|
4882
|
+
function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
4883
|
+
const { immediate, deep, flush, once } = options;
|
|
4884
|
+
const baseWatchOptions = extend({}, options);
|
|
4330
4885
|
let ssrCleanup;
|
|
4331
4886
|
if (isInSSRComponentSetup) {
|
|
4332
|
-
onCleanup = NOOP;
|
|
4333
|
-
if (!cb) {
|
|
4334
|
-
getter();
|
|
4335
|
-
} else if (immediate) {
|
|
4336
|
-
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
4337
|
-
getter(),
|
|
4338
|
-
isMultiSource ? [] : void 0,
|
|
4339
|
-
onCleanup
|
|
4340
|
-
]);
|
|
4341
|
-
}
|
|
4342
4887
|
if (flush === "sync") {
|
|
4343
4888
|
const ctx = useSSRContext();
|
|
4344
4889
|
ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
|
|
4890
|
+
} else if (!cb || immediate) {
|
|
4891
|
+
baseWatchOptions.once = true;
|
|
4345
4892
|
} else {
|
|
4346
|
-
|
|
4893
|
+
const watchStopHandle = () => {
|
|
4894
|
+
};
|
|
4895
|
+
watchStopHandle.stop = NOOP;
|
|
4896
|
+
watchStopHandle.resume = NOOP;
|
|
4897
|
+
watchStopHandle.pause = NOOP;
|
|
4898
|
+
return watchStopHandle;
|
|
4347
4899
|
}
|
|
4348
4900
|
}
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
4364
|
-
onCleanup
|
|
4365
|
-
]);
|
|
4366
|
-
oldValue = newValue;
|
|
4901
|
+
const instance = currentInstance;
|
|
4902
|
+
baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
|
|
4903
|
+
let isPre = false;
|
|
4904
|
+
if (flush === "post") {
|
|
4905
|
+
baseWatchOptions.scheduler = (job) => {
|
|
4906
|
+
queuePostRenderEffect(job, instance && instance.suspense);
|
|
4907
|
+
};
|
|
4908
|
+
} else if (flush !== "sync") {
|
|
4909
|
+
isPre = true;
|
|
4910
|
+
baseWatchOptions.scheduler = (job, isFirstRun) => {
|
|
4911
|
+
if (isFirstRun) {
|
|
4912
|
+
job();
|
|
4913
|
+
} else {
|
|
4914
|
+
queueJob(job);
|
|
4367
4915
|
}
|
|
4368
|
-
}
|
|
4369
|
-
effect2.run();
|
|
4370
|
-
}
|
|
4371
|
-
};
|
|
4372
|
-
job.allowRecurse = !!cb;
|
|
4373
|
-
let scheduler;
|
|
4374
|
-
if (flush === "sync") {
|
|
4375
|
-
scheduler = job;
|
|
4376
|
-
} else if (flush === "post") {
|
|
4377
|
-
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
4378
|
-
} else {
|
|
4379
|
-
job.pre = true;
|
|
4380
|
-
if (instance) job.id = instance.uid;
|
|
4381
|
-
scheduler = () => queueJob(job);
|
|
4916
|
+
};
|
|
4382
4917
|
}
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
effect2.stop();
|
|
4387
|
-
if (scope) {
|
|
4388
|
-
remove(scope.effects, effect2);
|
|
4918
|
+
baseWatchOptions.augmentJob = (job) => {
|
|
4919
|
+
if (cb) {
|
|
4920
|
+
job.flags |= 4;
|
|
4389
4921
|
}
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4922
|
+
if (isPre) {
|
|
4923
|
+
job.flags |= 2;
|
|
4924
|
+
if (instance) {
|
|
4925
|
+
job.id = instance.uid;
|
|
4926
|
+
job.i = instance;
|
|
4927
|
+
}
|
|
4396
4928
|
}
|
|
4397
|
-
}
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
);
|
|
4402
|
-
} else {
|
|
4403
|
-
effect2.run();
|
|
4404
|
-
}
|
|
4405
|
-
if (ssrCleanup) ssrCleanup.push(unwatch);
|
|
4406
|
-
return unwatch;
|
|
4929
|
+
};
|
|
4930
|
+
const watchHandle = watch$1(source, cb, baseWatchOptions);
|
|
4931
|
+
if (ssrCleanup) ssrCleanup.push(watchHandle);
|
|
4932
|
+
return watchHandle;
|
|
4407
4933
|
}
|
|
4408
4934
|
function instanceWatch(source, value, options) {
|
|
4409
4935
|
const publicThis = this.proxy;
|
|
@@ -4430,38 +4956,6 @@ function createPathGetter(ctx, path) {
|
|
|
4430
4956
|
return cur;
|
|
4431
4957
|
};
|
|
4432
4958
|
}
|
|
4433
|
-
function traverse(value, depth = Infinity, seen) {
|
|
4434
|
-
if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
|
|
4435
|
-
return value;
|
|
4436
|
-
}
|
|
4437
|
-
seen = seen || /* @__PURE__ */ new Set();
|
|
4438
|
-
if (seen.has(value)) {
|
|
4439
|
-
return value;
|
|
4440
|
-
}
|
|
4441
|
-
seen.add(value);
|
|
4442
|
-
depth--;
|
|
4443
|
-
if (isRef(value)) {
|
|
4444
|
-
traverse(value.value, depth, seen);
|
|
4445
|
-
} else if (isArray$1(value)) {
|
|
4446
|
-
for (let i = 0; i < value.length; i++) {
|
|
4447
|
-
traverse(value[i], depth, seen);
|
|
4448
|
-
}
|
|
4449
|
-
} else if (isSet(value) || isMap(value)) {
|
|
4450
|
-
value.forEach((v) => {
|
|
4451
|
-
traverse(v, depth, seen);
|
|
4452
|
-
});
|
|
4453
|
-
} else if (isPlainObject(value)) {
|
|
4454
|
-
for (const key in value) {
|
|
4455
|
-
traverse(value[key], depth, seen);
|
|
4456
|
-
}
|
|
4457
|
-
for (const key of Object.getOwnPropertySymbols(value)) {
|
|
4458
|
-
if (Object.prototype.propertyIsEnumerable.call(value, key)) {
|
|
4459
|
-
traverse(value[key], depth, seen);
|
|
4460
|
-
}
|
|
4461
|
-
}
|
|
4462
|
-
}
|
|
4463
|
-
return value;
|
|
4464
|
-
}
|
|
4465
4959
|
const getModelModifiers = (props, modelName) => {
|
|
4466
4960
|
return modelName === "modelValue" || modelName === "model-value" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];
|
|
4467
4961
|
};
|
|
@@ -4654,7 +5148,7 @@ function renderComponentRoot(instance) {
|
|
|
4654
5148
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
4655
5149
|
}
|
|
4656
5150
|
if (vnode.transition) {
|
|
4657
|
-
root
|
|
5151
|
+
setTransitionHooks(root, vnode.transition);
|
|
4658
5152
|
}
|
|
4659
5153
|
{
|
|
4660
5154
|
result = root;
|
|
@@ -5114,6 +5608,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
5114
5608
|
effect: null,
|
|
5115
5609
|
update: null,
|
|
5116
5610
|
// will be set synchronously right after creation
|
|
5611
|
+
job: null,
|
|
5117
5612
|
scope: new EffectScope(
|
|
5118
5613
|
true
|
|
5119
5614
|
/* detached */
|
|
@@ -5124,6 +5619,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
5124
5619
|
exposeProxy: null,
|
|
5125
5620
|
withProxy: null,
|
|
5126
5621
|
provides: parent ? parent.provides : Object.create(appContext.provides),
|
|
5622
|
+
ids: parent ? parent.ids : ["", 0, 0],
|
|
5127
5623
|
accessCache: null,
|
|
5128
5624
|
renderCache: [],
|
|
5129
5625
|
// local resolved assets
|
|
@@ -5255,6 +5751,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
5255
5751
|
resetTracking();
|
|
5256
5752
|
reset();
|
|
5257
5753
|
if (isPromise(setupResult)) {
|
|
5754
|
+
if (!isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
5258
5755
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
5259
5756
|
if (isSSR) {
|
|
5260
5757
|
return setupResult.then((resolvedResult) => {
|
|
@@ -5410,15 +5907,26 @@ function h(type, propsOrChildren, children) {
|
|
|
5410
5907
|
return createVNode(type, propsOrChildren, children);
|
|
5411
5908
|
}
|
|
5412
5909
|
}
|
|
5413
|
-
const version = "3.
|
|
5910
|
+
const version = "3.5.7";
|
|
5414
5911
|
|
|
5415
5912
|
/* Injected with object hook! */
|
|
5416
5913
|
|
|
5417
5914
|
/**
|
|
5418
|
-
* @vue/runtime-dom v3.
|
|
5915
|
+
* @vue/runtime-dom v3.5.7
|
|
5419
5916
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
5420
5917
|
* @license MIT
|
|
5421
5918
|
**/
|
|
5919
|
+
let policy = void 0;
|
|
5920
|
+
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
5921
|
+
if (tt) {
|
|
5922
|
+
try {
|
|
5923
|
+
policy = /* @__PURE__ */ tt.createPolicy("vue", {
|
|
5924
|
+
createHTML: (val) => val
|
|
5925
|
+
});
|
|
5926
|
+
} catch (e) {
|
|
5927
|
+
}
|
|
5928
|
+
}
|
|
5929
|
+
const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
|
|
5422
5930
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
5423
5931
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
5424
5932
|
const doc = typeof document !== "undefined" ? document : null;
|
|
@@ -5466,7 +5974,9 @@ const nodeOps = {
|
|
|
5466
5974
|
if (start === end || !(start = start.nextSibling)) break;
|
|
5467
5975
|
}
|
|
5468
5976
|
} else {
|
|
5469
|
-
templateContainer.innerHTML =
|
|
5977
|
+
templateContainer.innerHTML = unsafeToTrustedHTML(
|
|
5978
|
+
namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
|
|
5979
|
+
);
|
|
5470
5980
|
const template = templateContainer.content;
|
|
5471
5981
|
if (namespace === "svg" || namespace === "mathml") {
|
|
5472
5982
|
const wrapper = template.firstChild;
|
|
@@ -5614,15 +6124,20 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
5614
6124
|
}
|
|
5615
6125
|
function patchDOMProp(el, key, value, parentComponent) {
|
|
5616
6126
|
if (key === "innerHTML" || key === "textContent") {
|
|
5617
|
-
if (value
|
|
5618
|
-
|
|
6127
|
+
if (value != null) {
|
|
6128
|
+
el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
|
|
6129
|
+
}
|
|
5619
6130
|
return;
|
|
5620
6131
|
}
|
|
5621
6132
|
const tag = el.tagName;
|
|
5622
6133
|
if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
|
|
5623
6134
|
!tag.includes("-")) {
|
|
5624
6135
|
const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
|
|
5625
|
-
const newValue = value == null ?
|
|
6136
|
+
const newValue = value == null ? (
|
|
6137
|
+
// #11647: value should be set as empty string for null and undefined,
|
|
6138
|
+
// but <input type="checkbox"> should be set as 'on'.
|
|
6139
|
+
el.type === "checkbox" ? "on" : ""
|
|
6140
|
+
) : String(value);
|
|
5626
6141
|
if (oldValue !== newValue || !("_value" in el)) {
|
|
5627
6142
|
el.value = newValue;
|
|
5628
6143
|
}
|
|
@@ -5783,7 +6298,13 @@ function shouldSetAsProp(el, key, value, isSVG) {
|
|
|
5783
6298
|
if (isNativeOn(key) && isString(value)) {
|
|
5784
6299
|
return false;
|
|
5785
6300
|
}
|
|
5786
|
-
|
|
6301
|
+
if (key in el) {
|
|
6302
|
+
return true;
|
|
6303
|
+
}
|
|
6304
|
+
if (el._isVueCE && (/[A-Z]/.test(key) || !isString(value))) {
|
|
6305
|
+
return true;
|
|
6306
|
+
}
|
|
6307
|
+
return false;
|
|
5787
6308
|
}
|
|
5788
6309
|
const getModelAssigner = (vnode) => {
|
|
5789
6310
|
const fn = vnode.props["onUpdate:modelValue"] || false;
|
|
@@ -5891,12 +6412,16 @@ const vModelCheckbox = {
|
|
|
5891
6412
|
};
|
|
5892
6413
|
function setChecked(el, { value, oldValue }, vnode) {
|
|
5893
6414
|
el._modelValue = value;
|
|
6415
|
+
let checked;
|
|
5894
6416
|
if (isArray$1(value)) {
|
|
5895
|
-
|
|
6417
|
+
checked = looseIndexOf(value, vnode.props.value) > -1;
|
|
5896
6418
|
} else if (isSet(value)) {
|
|
5897
|
-
|
|
5898
|
-
} else
|
|
5899
|
-
|
|
6419
|
+
checked = value.has(vnode.props.value);
|
|
6420
|
+
} else {
|
|
6421
|
+
checked = looseEqual(value, getCheckboxValue(el, true));
|
|
6422
|
+
}
|
|
6423
|
+
if (el.checked !== checked) {
|
|
6424
|
+
el.checked = checked;
|
|
5900
6425
|
}
|
|
5901
6426
|
}
|
|
5902
6427
|
function getValue(el) {
|
|
@@ -5921,7 +6446,9 @@ const createApp = (...args) => {
|
|
|
5921
6446
|
if (!isFunction(component) && !component.render && !component.template) {
|
|
5922
6447
|
component.template = container.innerHTML;
|
|
5923
6448
|
}
|
|
5924
|
-
container.
|
|
6449
|
+
if (container.nodeType === 1) {
|
|
6450
|
+
container.textContent = "";
|
|
6451
|
+
}
|
|
5925
6452
|
const proxy = mount(container, false, resolveRootNamespace(container));
|
|
5926
6453
|
if (container instanceof Element) {
|
|
5927
6454
|
container.removeAttribute("v-cloak");
|
|
@@ -5950,13 +6477,18 @@ function normalizeContainer(container) {
|
|
|
5950
6477
|
/* Injected with object hook! */
|
|
5951
6478
|
|
|
5952
6479
|
/*!
|
|
5953
|
-
* vue-router v4.4.
|
|
6480
|
+
* vue-router v4.4.5
|
|
5954
6481
|
* (c) 2024 Eduardo San Martin Morote
|
|
5955
6482
|
* @license MIT
|
|
5956
6483
|
*/
|
|
5957
6484
|
const isBrowser = typeof document !== "undefined";
|
|
6485
|
+
function isRouteComponent(component) {
|
|
6486
|
+
return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component;
|
|
6487
|
+
}
|
|
5958
6488
|
function isESModule(obj) {
|
|
5959
|
-
return obj.__esModule || obj[Symbol.toStringTag] === "Module"
|
|
6489
|
+
return obj.__esModule || obj[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
|
|
6490
|
+
// add the Module string tag
|
|
6491
|
+
obj.default && isRouteComponent(obj.default);
|
|
5960
6492
|
}
|
|
5961
6493
|
const assign = Object.assign;
|
|
5962
6494
|
function applyToParams(fn, params) {
|
|
@@ -6704,22 +7236,24 @@ function createRouterMatcher(routes, globalOptions) {
|
|
|
6704
7236
|
const mainNormalizedRecord = normalizeRouteRecord(record);
|
|
6705
7237
|
mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;
|
|
6706
7238
|
const options = mergeOptions(globalOptions, record);
|
|
6707
|
-
const normalizedRecords = [
|
|
6708
|
-
mainNormalizedRecord
|
|
6709
|
-
];
|
|
7239
|
+
const normalizedRecords = [mainNormalizedRecord];
|
|
6710
7240
|
if ("alias" in record) {
|
|
6711
7241
|
const aliases = typeof record.alias === "string" ? [record.alias] : record.alias;
|
|
6712
7242
|
for (const alias of aliases) {
|
|
6713
|
-
normalizedRecords.push(
|
|
6714
|
-
//
|
|
6715
|
-
//
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
7243
|
+
normalizedRecords.push(
|
|
7244
|
+
// we need to normalize again to ensure the `mods` property
|
|
7245
|
+
// being non enumerable
|
|
7246
|
+
normalizeRouteRecord(assign({}, mainNormalizedRecord, {
|
|
7247
|
+
// this allows us to hold a copy of the `components` option
|
|
7248
|
+
// so that async components cache is hold on the original record
|
|
7249
|
+
components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,
|
|
7250
|
+
path: alias,
|
|
7251
|
+
// we might be the child of an alias
|
|
7252
|
+
aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord
|
|
7253
|
+
// the aliases are always of the same kind as the original since they
|
|
7254
|
+
// are defined on the same record
|
|
7255
|
+
}))
|
|
7256
|
+
);
|
|
6723
7257
|
}
|
|
6724
7258
|
}
|
|
6725
7259
|
let matcher;
|
|
@@ -6865,12 +7399,12 @@ function paramsFromLocation(params, keys) {
|
|
|
6865
7399
|
return newParams;
|
|
6866
7400
|
}
|
|
6867
7401
|
function normalizeRouteRecord(record) {
|
|
6868
|
-
|
|
7402
|
+
const normalized = {
|
|
6869
7403
|
path: record.path,
|
|
6870
7404
|
redirect: record.redirect,
|
|
6871
7405
|
name: record.name,
|
|
6872
7406
|
meta: record.meta || {},
|
|
6873
|
-
aliasOf:
|
|
7407
|
+
aliasOf: record.aliasOf,
|
|
6874
7408
|
beforeEnter: record.beforeEnter,
|
|
6875
7409
|
props: normalizeRecordProps(record),
|
|
6876
7410
|
children: record.children || [],
|
|
@@ -6878,8 +7412,14 @@ function normalizeRouteRecord(record) {
|
|
|
6878
7412
|
leaveGuards: /* @__PURE__ */ new Set(),
|
|
6879
7413
|
updateGuards: /* @__PURE__ */ new Set(),
|
|
6880
7414
|
enterCallbacks: {},
|
|
7415
|
+
// must be declared afterwards
|
|
7416
|
+
// mods: {},
|
|
6881
7417
|
components: "components" in record ? record.components || null : record.component && { default: record.component }
|
|
6882
7418
|
};
|
|
7419
|
+
Object.defineProperty(normalized, "mods", {
|
|
7420
|
+
value: {}
|
|
7421
|
+
});
|
|
7422
|
+
return normalized;
|
|
6883
7423
|
}
|
|
6884
7424
|
function normalizeRecordProps(record) {
|
|
6885
7425
|
const propsObject = {};
|
|
@@ -7066,8 +7606,9 @@ function extractComponentsGuards(matched, guardType, to, from, runWithContext =
|
|
|
7066
7606
|
let componentPromise = rawComponent();
|
|
7067
7607
|
guards.push(() => componentPromise.then((resolved) => {
|
|
7068
7608
|
if (!resolved)
|
|
7069
|
-
|
|
7609
|
+
throw new Error(`Couldn't resolve component "${name}" at "${record.path}"`);
|
|
7070
7610
|
const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;
|
|
7611
|
+
record.mods[name] = resolved;
|
|
7071
7612
|
record.components[name] = resolvedComponent;
|
|
7072
7613
|
const options = resolvedComponent.__vccOpts || resolvedComponent;
|
|
7073
7614
|
const guard = options[guardType];
|
|
@@ -7078,9 +7619,6 @@ function extractComponentsGuards(matched, guardType, to, from, runWithContext =
|
|
|
7078
7619
|
}
|
|
7079
7620
|
return guards;
|
|
7080
7621
|
}
|
|
7081
|
-
function isRouteComponent(component) {
|
|
7082
|
-
return typeof component === "object" || "displayName" in component || "props" in component || "__vccOpts" in component;
|
|
7083
|
-
}
|
|
7084
7622
|
function useLink(props) {
|
|
7085
7623
|
const router = inject(routerKey);
|
|
7086
7624
|
const currentRoute = inject(routeLocationKey);
|
|
@@ -7819,7 +8357,7 @@ const scriptRel = 'modulepreload';const assetsURL = function(dep, importerUrl) {
|
|
|
7819
8357
|
"meta[property=csp-nonce]"
|
|
7820
8358
|
);
|
|
7821
8359
|
const cspNonce = cspNonceMeta?.nonce || cspNonceMeta?.getAttribute("nonce");
|
|
7822
|
-
promise = Promise.
|
|
8360
|
+
promise = Promise.allSettled(
|
|
7823
8361
|
deps.map((dep) => {
|
|
7824
8362
|
dep = assetsURL(dep, importerUrl);
|
|
7825
8363
|
if (dep in seen) return;
|
|
@@ -7841,8 +8379,8 @@ const scriptRel = 'modulepreload';const assetsURL = function(dep, importerUrl) {
|
|
|
7841
8379
|
link.rel = isCss ? "stylesheet" : scriptRel;
|
|
7842
8380
|
if (!isCss) {
|
|
7843
8381
|
link.as = "script";
|
|
7844
|
-
link.crossOrigin = "";
|
|
7845
8382
|
}
|
|
8383
|
+
link.crossOrigin = "";
|
|
7846
8384
|
link.href = dep;
|
|
7847
8385
|
if (cspNonce) {
|
|
7848
8386
|
link.setAttribute("nonce", cspNonce);
|
|
@@ -7860,7 +8398,7 @@ const scriptRel = 'modulepreload';const assetsURL = function(dep, importerUrl) {
|
|
|
7860
8398
|
})
|
|
7861
8399
|
);
|
|
7862
8400
|
}
|
|
7863
|
-
|
|
8401
|
+
function handlePreloadError(err) {
|
|
7864
8402
|
const e = new Event("vite:preloadError", {
|
|
7865
8403
|
cancelable: true
|
|
7866
8404
|
});
|
|
@@ -7869,6 +8407,13 @@ const scriptRel = 'modulepreload';const assetsURL = function(dep, importerUrl) {
|
|
|
7869
8407
|
if (!e.defaultPrevented) {
|
|
7870
8408
|
throw err;
|
|
7871
8409
|
}
|
|
8410
|
+
}
|
|
8411
|
+
return promise.then((res) => {
|
|
8412
|
+
for (const item of res || []) {
|
|
8413
|
+
if (item.status !== "rejected") continue;
|
|
8414
|
+
handlePreloadError(item.reason);
|
|
8415
|
+
}
|
|
8416
|
+
return baseModule().catch(handlePreloadError);
|
|
7872
8417
|
});
|
|
7873
8418
|
};
|
|
7874
8419
|
/* Injected with object hook! */
|
|
@@ -7877,31 +8422,31 @@ const routes = [
|
|
|
7877
8422
|
{
|
|
7878
8423
|
path: "/",
|
|
7879
8424
|
name: "/",
|
|
7880
|
-
component: () => __vitePreload(() => import('./index-
|
|
8425
|
+
component: () => __vitePreload(() => import('./index-Zar9_ZCZ.js'),true?__vite__mapDeps([0,1,2,3]):void 0,import.meta.url)
|
|
7881
8426
|
/* no children */
|
|
7882
8427
|
},
|
|
7883
8428
|
{
|
|
7884
8429
|
path: "/about",
|
|
7885
8430
|
name: "/about",
|
|
7886
|
-
component: () => __vitePreload(() => import('./about-
|
|
8431
|
+
component: () => __vitePreload(() => import('./about-BHaXjiil.js'),true?__vite__mapDeps([4,1]):void 0,import.meta.url)
|
|
7887
8432
|
/* no children */
|
|
7888
8433
|
},
|
|
7889
8434
|
{
|
|
7890
8435
|
path: "/categories",
|
|
7891
8436
|
name: "/categories",
|
|
7892
|
-
component: () => __vitePreload(() => import('./categories-
|
|
8437
|
+
component: () => __vitePreload(() => import('./categories-COQkgkdS.js'),true?__vite__mapDeps([5,1]):void 0,import.meta.url)
|
|
7893
8438
|
/* no children */
|
|
7894
8439
|
},
|
|
7895
8440
|
{
|
|
7896
8441
|
path: "/migration",
|
|
7897
8442
|
name: "/migration",
|
|
7898
|
-
component: () => __vitePreload(() => import('./migration-
|
|
8443
|
+
component: () => __vitePreload(() => import('./migration-Bs79tDqr.js'),true?__vite__mapDeps([6,2]):void 0,import.meta.url)
|
|
7899
8444
|
/* no children */
|
|
7900
8445
|
},
|
|
7901
8446
|
{
|
|
7902
8447
|
path: "/tags",
|
|
7903
8448
|
name: "/tags",
|
|
7904
|
-
component: () => __vitePreload(() => import('./tags-
|
|
8449
|
+
component: () => __vitePreload(() => import('./tags-BDGFSU7r.js'),true?__vite__mapDeps([7,1]):void 0,import.meta.url)
|
|
7905
8450
|
/* no children */
|
|
7906
8451
|
}
|
|
7907
8452
|
];
|
|
@@ -7957,14 +8502,6 @@ const _hoisted_1$1 = {
|
|
|
7957
8502
|
dark: "border-b-black",
|
|
7958
8503
|
flex: "~"
|
|
7959
8504
|
};
|
|
7960
|
-
const _hoisted_2$1 = /* @__PURE__ */ createBaseVNode("div", { flex: "1" }, null, -1);
|
|
7961
|
-
const _hoisted_3 = /* @__PURE__ */ createBaseVNode("a", {
|
|
7962
|
-
href: "https://valaxy.site",
|
|
7963
|
-
target: "_blank",
|
|
7964
|
-
class: "bg-white dark:bg-gray-900 inline-flex justify-center items-center w-8 h-8 hover:bg-gray-200"
|
|
7965
|
-
}, [
|
|
7966
|
-
/* @__PURE__ */ createBaseVNode("div", { "i-ri-book-line": "" })
|
|
7967
|
-
], -1);
|
|
7968
8505
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
7969
8506
|
__name: "VDHeader",
|
|
7970
8507
|
setup(__props) {
|
|
@@ -8015,8 +8552,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8015
8552
|
_: 2
|
|
8016
8553
|
}, 1032, ["class", "to"]);
|
|
8017
8554
|
}), 64)),
|
|
8018
|
-
|
|
8019
|
-
|
|
8555
|
+
_cache[0] || (_cache[0] = createBaseVNode("div", { flex: "1" }, null, -1)),
|
|
8556
|
+
_cache[1] || (_cache[1] = createBaseVNode("a", {
|
|
8557
|
+
href: "https://valaxy.site",
|
|
8558
|
+
target: "_blank",
|
|
8559
|
+
class: "bg-white dark:bg-gray-900 inline-flex justify-center items-center w-8 h-8 hover:bg-gray-200"
|
|
8560
|
+
}, [
|
|
8561
|
+
createBaseVNode("div", { "i-ri-book-line": "" })
|
|
8562
|
+
], -1))
|
|
8020
8563
|
]);
|
|
8021
8564
|
};
|
|
8022
8565
|
}
|