vue-stack-tabs 0.1.35 → 0.1.36
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/vue-stack-tabs.es.js +446 -439
- package/dist/vue-stack-tabs.umd.js +1 -1
- package/package.json +1 -1
- package/src/lib/hooks/useStackTab.ts +112 -103
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var wn = Object.defineProperty;
|
|
2
2
|
var Tn = (e, t, n) => t in e ? wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var kt = (e, t, n) => (Tn(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
|
-
import { inject as lt, ref as R, reactive as Ie, readonly as wt, toRaw as xn, defineComponent as Q, openBlock as z, createElementBlock as W, createCommentVNode as ne, createElementVNode as K, unref as O, nextTick as
|
|
4
|
+
import { inject as lt, ref as R, reactive as Ie, readonly as wt, toRaw as xn, defineComponent as Q, openBlock as z, createElementBlock as W, createCommentVNode as ne, createElementVNode as K, unref as O, nextTick as ae, onMounted as Ge, onDeactivated as Sn, onActivated as On, onUnmounted as He, createVNode as N, resolveComponent as Yt, normalizeClass as le, withModifiers as _e, toDisplayString as Jt, normalizeStyle as ut, Fragment as Ze, renderList as ft, createBlock as me, computed as ge, renderSlot as ke, watch as En, withDirectives as Kt, vShow as Qt, withCtx as ce, TransitionGroup as en, mergeProps as An, Transition as tn, provide as In, onBeforeMount as Bn, onBeforeUnmount as Cn, KeepAlive as Mn, resolveDynamicComponent as Ln, getCurrentInstance as nn } from "vue";
|
|
5
5
|
import { useRouter as dt, useRoute as zn } from "vue-router";
|
|
6
6
|
const $n = {
|
|
7
7
|
VueStackTab: {
|
|
@@ -415,8 +415,8 @@ pt.exports;
|
|
|
415
415
|
function i(a, c) {
|
|
416
416
|
if (!o[a]) {
|
|
417
417
|
o[a] = {};
|
|
418
|
-
for (var
|
|
419
|
-
o[a][a.charAt(
|
|
418
|
+
for (var p = 0; p < a.length; p++)
|
|
419
|
+
o[a][a.charAt(p)] = p;
|
|
420
420
|
}
|
|
421
421
|
return o[a][c];
|
|
422
422
|
}
|
|
@@ -424,8 +424,8 @@ pt.exports;
|
|
|
424
424
|
compressToBase64: function(a) {
|
|
425
425
|
if (a == null)
|
|
426
426
|
return "";
|
|
427
|
-
var c = f._compress(a, 6, function(
|
|
428
|
-
return r.charAt(
|
|
427
|
+
var c = f._compress(a, 6, function(p) {
|
|
428
|
+
return r.charAt(p);
|
|
429
429
|
});
|
|
430
430
|
switch (c.length % 4) {
|
|
431
431
|
default:
|
|
@@ -456,22 +456,22 @@ pt.exports;
|
|
|
456
456
|
},
|
|
457
457
|
//compress into uint8array (UCS-2 big endian format)
|
|
458
458
|
compressToUint8Array: function(a) {
|
|
459
|
-
for (var c = f.compress(a),
|
|
460
|
-
var
|
|
461
|
-
|
|
459
|
+
for (var c = f.compress(a), p = new Uint8Array(c.length * 2), d = 0, l = c.length; d < l; d++) {
|
|
460
|
+
var w = c.charCodeAt(d);
|
|
461
|
+
p[d * 2] = w >>> 8, p[d * 2 + 1] = w % 256;
|
|
462
462
|
}
|
|
463
|
-
return
|
|
463
|
+
return p;
|
|
464
464
|
},
|
|
465
465
|
//decompress from uint8array (UCS-2 big endian format)
|
|
466
466
|
decompressFromUint8Array: function(a) {
|
|
467
467
|
if (a == null)
|
|
468
468
|
return f.decompress(a);
|
|
469
|
-
for (var c = new Array(a.length / 2),
|
|
470
|
-
c[
|
|
471
|
-
var
|
|
472
|
-
return c.forEach(function(
|
|
473
|
-
|
|
474
|
-
}), f.decompress(
|
|
469
|
+
for (var c = new Array(a.length / 2), p = 0, d = c.length; p < d; p++)
|
|
470
|
+
c[p] = a[p * 2] * 256 + a[p * 2 + 1];
|
|
471
|
+
var l = [];
|
|
472
|
+
return c.forEach(function(w) {
|
|
473
|
+
l.push(n(w));
|
|
474
|
+
}), f.decompress(l.join(""));
|
|
475
475
|
},
|
|
476
476
|
//compress into a string that is already URI encoded
|
|
477
477
|
compressToEncodedURIComponent: function(a) {
|
|
@@ -490,56 +490,56 @@ pt.exports;
|
|
|
490
490
|
return n(c);
|
|
491
491
|
});
|
|
492
492
|
},
|
|
493
|
-
_compress: function(a, c,
|
|
493
|
+
_compress: function(a, c, p) {
|
|
494
494
|
if (a == null)
|
|
495
495
|
return "";
|
|
496
|
-
var
|
|
496
|
+
var d, l, w = {}, E = {}, B = "", T = "", k = "", _ = 2, x = 3, g = 2, S = [], u = 0, y = 0, v;
|
|
497
497
|
for (v = 0; v < a.length; v += 1)
|
|
498
|
-
if (
|
|
499
|
-
|
|
498
|
+
if (B = a.charAt(v), Object.prototype.hasOwnProperty.call(w, B) || (w[B] = x++, E[B] = !0), T = k + B, Object.prototype.hasOwnProperty.call(w, T))
|
|
499
|
+
k = T;
|
|
500
500
|
else {
|
|
501
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
502
|
-
if (
|
|
503
|
-
for (
|
|
504
|
-
u = u << 1, y == c - 1 ? (y = 0, S.push(
|
|
505
|
-
for (
|
|
506
|
-
u = u << 1 |
|
|
501
|
+
if (Object.prototype.hasOwnProperty.call(E, k)) {
|
|
502
|
+
if (k.charCodeAt(0) < 256) {
|
|
503
|
+
for (d = 0; d < g; d++)
|
|
504
|
+
u = u << 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++;
|
|
505
|
+
for (l = k.charCodeAt(0), d = 0; d < 8; d++)
|
|
506
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
507
507
|
} else {
|
|
508
|
-
for (
|
|
509
|
-
u = u << 1 |
|
|
510
|
-
for (
|
|
511
|
-
u = u << 1 |
|
|
508
|
+
for (l = 1, d = 0; d < g; d++)
|
|
509
|
+
u = u << 1 | l, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = 0;
|
|
510
|
+
for (l = k.charCodeAt(0), d = 0; d < 16; d++)
|
|
511
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
512
512
|
}
|
|
513
|
-
_--, _ == 0 && (_ = Math.pow(2, g), g++), delete
|
|
513
|
+
_--, _ == 0 && (_ = Math.pow(2, g), g++), delete E[k];
|
|
514
514
|
} else
|
|
515
|
-
for (
|
|
516
|
-
u = u << 1 |
|
|
517
|
-
_--, _ == 0 && (_ = Math.pow(2, g), g++),
|
|
515
|
+
for (l = w[k], d = 0; d < g; d++)
|
|
516
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
517
|
+
_--, _ == 0 && (_ = Math.pow(2, g), g++), w[T] = x++, k = String(B);
|
|
518
518
|
}
|
|
519
|
-
if (
|
|
520
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
521
|
-
if (
|
|
522
|
-
for (
|
|
523
|
-
u = u << 1, y == c - 1 ? (y = 0, S.push(
|
|
524
|
-
for (
|
|
525
|
-
u = u << 1 |
|
|
519
|
+
if (k !== "") {
|
|
520
|
+
if (Object.prototype.hasOwnProperty.call(E, k)) {
|
|
521
|
+
if (k.charCodeAt(0) < 256) {
|
|
522
|
+
for (d = 0; d < g; d++)
|
|
523
|
+
u = u << 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++;
|
|
524
|
+
for (l = k.charCodeAt(0), d = 0; d < 8; d++)
|
|
525
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
526
526
|
} else {
|
|
527
|
-
for (
|
|
528
|
-
u = u << 1 |
|
|
529
|
-
for (
|
|
530
|
-
u = u << 1 |
|
|
527
|
+
for (l = 1, d = 0; d < g; d++)
|
|
528
|
+
u = u << 1 | l, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = 0;
|
|
529
|
+
for (l = k.charCodeAt(0), d = 0; d < 16; d++)
|
|
530
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
531
531
|
}
|
|
532
|
-
_--, _ == 0 && (_ = Math.pow(2, g), g++), delete
|
|
532
|
+
_--, _ == 0 && (_ = Math.pow(2, g), g++), delete E[k];
|
|
533
533
|
} else
|
|
534
|
-
for (
|
|
535
|
-
u = u << 1 |
|
|
534
|
+
for (l = w[k], d = 0; d < g; d++)
|
|
535
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
536
536
|
_--, _ == 0 && (_ = Math.pow(2, g), g++);
|
|
537
537
|
}
|
|
538
|
-
for (
|
|
539
|
-
u = u << 1 |
|
|
538
|
+
for (l = 2, d = 0; d < g; d++)
|
|
539
|
+
u = u << 1 | l & 1, y == c - 1 ? (y = 0, S.push(p(u)), u = 0) : y++, l = l >> 1;
|
|
540
540
|
for (; ; )
|
|
541
541
|
if (u = u << 1, y == c - 1) {
|
|
542
|
-
S.push(
|
|
542
|
+
S.push(p(u));
|
|
543
543
|
break;
|
|
544
544
|
} else
|
|
545
545
|
y++;
|
|
@@ -550,52 +550,52 @@ pt.exports;
|
|
|
550
550
|
return a.charCodeAt(c);
|
|
551
551
|
});
|
|
552
552
|
},
|
|
553
|
-
_decompress: function(a, c,
|
|
554
|
-
var
|
|
555
|
-
for (
|
|
556
|
-
|
|
557
|
-
for (
|
|
558
|
-
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val =
|
|
559
|
-
switch (
|
|
553
|
+
_decompress: function(a, c, p) {
|
|
554
|
+
var d = [], l = 4, w = 4, E = 3, B = "", T = [], k, _, x, g, S, u, y, v = { val: p(0), position: c, index: 1 };
|
|
555
|
+
for (k = 0; k < 3; k += 1)
|
|
556
|
+
d[k] = k;
|
|
557
|
+
for (x = 0, S = Math.pow(2, 2), u = 1; u != S; )
|
|
558
|
+
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val = p(v.index++)), x |= (g > 0 ? 1 : 0) * u, u <<= 1;
|
|
559
|
+
switch (x) {
|
|
560
560
|
case 0:
|
|
561
|
-
for (
|
|
562
|
-
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val =
|
|
563
|
-
y = n(
|
|
561
|
+
for (x = 0, S = Math.pow(2, 8), u = 1; u != S; )
|
|
562
|
+
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val = p(v.index++)), x |= (g > 0 ? 1 : 0) * u, u <<= 1;
|
|
563
|
+
y = n(x);
|
|
564
564
|
break;
|
|
565
565
|
case 1:
|
|
566
|
-
for (
|
|
567
|
-
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val =
|
|
568
|
-
y = n(
|
|
566
|
+
for (x = 0, S = Math.pow(2, 16), u = 1; u != S; )
|
|
567
|
+
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val = p(v.index++)), x |= (g > 0 ? 1 : 0) * u, u <<= 1;
|
|
568
|
+
y = n(x);
|
|
569
569
|
break;
|
|
570
570
|
case 2:
|
|
571
571
|
return "";
|
|
572
572
|
}
|
|
573
|
-
for (
|
|
573
|
+
for (d[3] = y, _ = y, T.push(y); ; ) {
|
|
574
574
|
if (v.index > a)
|
|
575
575
|
return "";
|
|
576
|
-
for (
|
|
577
|
-
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val =
|
|
578
|
-
switch (y =
|
|
576
|
+
for (x = 0, S = Math.pow(2, E), u = 1; u != S; )
|
|
577
|
+
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val = p(v.index++)), x |= (g > 0 ? 1 : 0) * u, u <<= 1;
|
|
578
|
+
switch (y = x) {
|
|
579
579
|
case 0:
|
|
580
|
-
for (
|
|
581
|
-
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val =
|
|
582
|
-
|
|
580
|
+
for (x = 0, S = Math.pow(2, 8), u = 1; u != S; )
|
|
581
|
+
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val = p(v.index++)), x |= (g > 0 ? 1 : 0) * u, u <<= 1;
|
|
582
|
+
d[w++] = n(x), y = w - 1, l--;
|
|
583
583
|
break;
|
|
584
584
|
case 1:
|
|
585
|
-
for (
|
|
586
|
-
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val =
|
|
587
|
-
|
|
585
|
+
for (x = 0, S = Math.pow(2, 16), u = 1; u != S; )
|
|
586
|
+
g = v.val & v.position, v.position >>= 1, v.position == 0 && (v.position = c, v.val = p(v.index++)), x |= (g > 0 ? 1 : 0) * u, u <<= 1;
|
|
587
|
+
d[w++] = n(x), y = w - 1, l--;
|
|
588
588
|
break;
|
|
589
589
|
case 2:
|
|
590
|
-
return
|
|
590
|
+
return T.join("");
|
|
591
591
|
}
|
|
592
|
-
if (
|
|
593
|
-
|
|
594
|
-
else if (y ===
|
|
595
|
-
|
|
592
|
+
if (l == 0 && (l = Math.pow(2, E), E++), d[y])
|
|
593
|
+
B = d[y];
|
|
594
|
+
else if (y === w)
|
|
595
|
+
B = _ + _.charAt(0);
|
|
596
596
|
else
|
|
597
597
|
return null;
|
|
598
|
-
|
|
598
|
+
T.push(B), d[w++] = _ + B.charAt(0), l--, _ = B, l == 0 && (l = Math.pow(2, E), E++);
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
601
|
};
|
|
@@ -716,11 +716,11 @@ class gr extends mr {
|
|
|
716
716
|
const o = t.length, i = t.byteOffset, f = t.buffer;
|
|
717
717
|
for (let a = 0; a < o; ) {
|
|
718
718
|
this.pos === n && (this.compress(s, 0, !1), this.pos = 0);
|
|
719
|
-
const c = Math.min(n - this.pos, o - a),
|
|
720
|
-
if (c === n && !(
|
|
721
|
-
const
|
|
722
|
-
for (let
|
|
723
|
-
this.length += n, this.compress(
|
|
719
|
+
const c = Math.min(n - this.pos, o - a), p = i + a;
|
|
720
|
+
if (c === n && !(p % 4) && a + c < o) {
|
|
721
|
+
const d = new Uint32Array(f, p, Math.floor((o - a) / 4));
|
|
722
|
+
for (let l = 0; a + n < o; l += s.length, a += n)
|
|
723
|
+
this.length += n, this.compress(d, l, !1);
|
|
724
724
|
continue;
|
|
725
725
|
}
|
|
726
726
|
r.set(t.subarray(a, a + c), this.pos), this.pos += c, this.length += c, a += c;
|
|
@@ -752,11 +752,11 @@ function se(e, t, n, r, s) {
|
|
|
752
752
|
function oe(e, t, n, r, s) {
|
|
753
753
|
return e = e + t + s | 0, r = Ve(r ^ e, 8), n = n + r | 0, t = Ve(t ^ n, 7), { a: e, b: t, c: n, d: r };
|
|
754
754
|
}
|
|
755
|
-
function At(e, t, n, r, s, o, i, f, a, c,
|
|
755
|
+
function At(e, t, n, r, s, o, i, f, a, c, p, d, l, w, E, B, T, k, _, x) {
|
|
756
756
|
let g = 0;
|
|
757
757
|
for (let S = 0; S < r; S++)
|
|
758
|
-
({ a: s, b: a, c:
|
|
759
|
-
return { v0: s, v1: o, v2: i, v3: f, v4: a, v5: c, v6:
|
|
758
|
+
({ a: s, b: a, c: l, d: T } = se(s, a, l, T, n[t + e[g++]])), { a: s, b: a, c: l, d: T } = oe(s, a, l, T, n[t + e[g++]]), { a: o, b: c, c: w, d: k } = se(o, c, w, k, n[t + e[g++]]), { a: o, b: c, c: w, d: k } = oe(o, c, w, k, n[t + e[g++]]), { a: i, b: p, c: E, d: _ } = se(i, p, E, _, n[t + e[g++]]), { a: i, b: p, c: E, d: _ } = oe(i, p, E, _, n[t + e[g++]]), { a: f, b: d, c: B, d: x } = se(f, d, B, x, n[t + e[g++]]), { a: f, b: d, c: B, d: x } = oe(f, d, B, x, n[t + e[g++]]), { a: s, b: c, c: E, d: x } = se(s, c, E, x, n[t + e[g++]]), { a: s, b: c, c: E, d: x } = oe(s, c, E, x, n[t + e[g++]]), { a: o, b: p, c: B, d: T } = se(o, p, B, T, n[t + e[g++]]), { a: o, b: p, c: B, d: T } = oe(o, p, B, T, n[t + e[g++]]), { a: i, b: d, c: l, d: k } = se(i, d, l, k, n[t + e[g++]]), { a: i, b: d, c: l, d: k } = oe(i, d, l, k, n[t + e[g++]]), { a: f, b: a, c: w, d: _ } = se(f, a, w, _, n[t + e[g++]]), { a: f, b: a, c: w, d: _ } = oe(f, a, w, _, n[t + e[g++]]);
|
|
759
|
+
return { v0: s, v1: o, v2: i, v3: f, v4: a, v5: c, v6: p, v7: d, v8: l, v9: w, v10: E, v11: B, v12: T, v13: k, v14: _, v15: x };
|
|
760
760
|
}
|
|
761
761
|
const It = /* @__PURE__ */ (() => {
|
|
762
762
|
const e = Array.from({ length: 16 }, (r, s) => s), t = (r) => [2, 6, 3, 10, 7, 0, 4, 13, 1, 11, 12, 5, 9, 14, 15, 8].map((s) => r[s]), n = [];
|
|
@@ -791,8 +791,8 @@ class mt extends gr {
|
|
|
791
791
|
set() {
|
|
792
792
|
}
|
|
793
793
|
b2Compress(t, n, r, s = 0) {
|
|
794
|
-
const { state: o, pos: i } = this, { h: f, l: a } = Et(BigInt(t), !0), { v0: c, v1:
|
|
795
|
-
o[0] = c ^
|
|
794
|
+
const { state: o, pos: i } = this, { h: f, l: a } = Et(BigInt(t), !0), { v0: c, v1: p, v2: d, v3: l, v4: w, v5: E, v6: B, v7: T, v8: k, v9: _, v10: x, v11: g, v12: S, v13: u, v14: y, v15: v } = At(It, s, r, 7, o[0], o[1], o[2], o[3], o[4], o[5], o[6], o[7], ee[0], ee[1], ee[2], ee[3], f, a, i, n);
|
|
795
|
+
o[0] = c ^ k, o[1] = p ^ _, o[2] = d ^ x, o[3] = l ^ g, o[4] = w ^ S, o[5] = E ^ u, o[6] = B ^ y, o[7] = T ^ v;
|
|
796
796
|
}
|
|
797
797
|
compress(t, n = 0, r = !1) {
|
|
798
798
|
let s = this.flags;
|
|
@@ -808,7 +808,7 @@ class mt extends gr {
|
|
|
808
808
|
_cloneInto(t) {
|
|
809
809
|
t = super._cloneInto(t);
|
|
810
810
|
const { IV: n, flags: r, state: s, chunkPos: o, posOut: i, chunkOut: f, stack: a, chunksDone: c } = this;
|
|
811
|
-
return t.state.set(s.slice()), t.stack = a.map((
|
|
811
|
+
return t.state.set(s.slice()), t.stack = a.map((p) => Uint32Array.from(p)), t.IV.set(n), t.flags = r, t.chunkPos = o, t.chunksDone = c, t.posOut = i, t.chunkOut = f, t.enableXOF = this.enableXOF, t.bufferOut32.set(this.bufferOut32), t;
|
|
812
812
|
}
|
|
813
813
|
destroy() {
|
|
814
814
|
this.destroyed = !0, this.state.fill(0), this.buffer32.fill(0), this.IV.fill(0), this.bufferOut32.fill(0);
|
|
@@ -817,8 +817,8 @@ class mt extends gr {
|
|
|
817
817
|
}
|
|
818
818
|
// Same as b2Compress, but doesn't modify state and returns 16 u32 array (instead of 8)
|
|
819
819
|
b2CompressOut() {
|
|
820
|
-
const { state: t, pos: n, flags: r, buffer32: s, bufferOut32: o } = this, { h: i, l: f } = Et(BigInt(this.chunkOut++)), { v0: a, v1: c, v2:
|
|
821
|
-
o[0] = a ^
|
|
820
|
+
const { state: t, pos: n, flags: r, buffer32: s, bufferOut32: o } = this, { h: i, l: f } = Et(BigInt(this.chunkOut++)), { v0: a, v1: c, v2: p, v3: d, v4: l, v5: w, v6: E, v7: B, v8: T, v9: k, v10: _, v11: x, v12: g, v13: S, v14: u, v15: y } = At(It, 0, s, 7, t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7], ee[0], ee[1], ee[2], ee[3], f, i, n, r);
|
|
821
|
+
o[0] = a ^ T, o[1] = c ^ k, o[2] = p ^ _, o[3] = d ^ x, o[4] = l ^ g, o[5] = w ^ S, o[6] = E ^ u, o[7] = B ^ y, o[8] = t[0] ^ T, o[9] = t[1] ^ k, o[10] = t[2] ^ _, o[11] = t[3] ^ x, o[12] = t[4] ^ g, o[13] = t[5] ^ S, o[14] = t[6] ^ u, o[15] = t[7] ^ y, this.posOut = 0;
|
|
822
822
|
}
|
|
823
823
|
finish() {
|
|
824
824
|
if (this.finished)
|
|
@@ -966,14 +966,14 @@ const Sr = {
|
|
|
966
966
|
s === t.tId && (r.value = o);
|
|
967
967
|
}), (s, o) => r.value ? (z(), W("div", Sr, Er)) : ne("", !0);
|
|
968
968
|
}
|
|
969
|
-
}), C = R([]), Ke = [], D = R([]),
|
|
969
|
+
}), C = R([]), Ke = [], D = R([]), ue = /* @__PURE__ */ new Map(), Re = /* @__PURE__ */ new Set(), F = /* @__PURE__ */ new Set(), fe = R(!0), Ct = "stacktab-active-tab", de = /* @__PURE__ */ new Map();
|
|
970
970
|
let Mt = !1, Ne = 0, Lt = !1;
|
|
971
971
|
const Le = () => {
|
|
972
972
|
const e = dt(), t = Me(), {
|
|
973
973
|
t: n
|
|
974
974
|
} = Ce(), r = () => C.value.length, s = (m) => {
|
|
975
|
-
for (const
|
|
976
|
-
const h = te(
|
|
975
|
+
for (const A of m) {
|
|
976
|
+
const h = te(A, {
|
|
977
977
|
id: nt(),
|
|
978
978
|
refreshable: !0,
|
|
979
979
|
closable: !0,
|
|
@@ -1004,39 +1004,39 @@ const Le = () => {
|
|
|
1004
1004
|
...X
|
|
1005
1005
|
});
|
|
1006
1006
|
}
|
|
1007
|
-
const
|
|
1008
|
-
if (
|
|
1009
|
-
const
|
|
1007
|
+
const b = window.sessionStorage.getItem(Ct);
|
|
1008
|
+
if (b != null) {
|
|
1009
|
+
const A = JSON.parse(b, (L, V) => L === "pages" ? new Xe(V) : V);
|
|
1010
1010
|
let h = !1;
|
|
1011
1011
|
for (const L of C.value)
|
|
1012
|
-
if (L.id ===
|
|
1012
|
+
if (L.id === A.id) {
|
|
1013
1013
|
h = !0;
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
|
-
h || C.value.push(
|
|
1016
|
+
h || C.value.push(A);
|
|
1017
1017
|
}
|
|
1018
1018
|
Mt = !0;
|
|
1019
1019
|
}, o = (m) => {
|
|
1020
|
-
for (const
|
|
1021
|
-
if (
|
|
1020
|
+
for (const b of C.value)
|
|
1021
|
+
if (b.id === m)
|
|
1022
1022
|
return !0;
|
|
1023
1023
|
return !1;
|
|
1024
|
-
}, i = () => Ne <= 0 || Ne > 0 && Ne > C.value.length, f = (m) => new Promise((
|
|
1025
|
-
C.value.push(m),
|
|
1024
|
+
}, i = () => Ne <= 0 || Ne > 0 && Ne > C.value.length, f = (m) => new Promise((b) => {
|
|
1025
|
+
C.value.push(m), b(!0);
|
|
1026
1026
|
}), a = (m) => {
|
|
1027
|
-
for (const
|
|
1028
|
-
if (
|
|
1029
|
-
return
|
|
1027
|
+
for (const b of C.value)
|
|
1028
|
+
if (b.id === m)
|
|
1029
|
+
return b;
|
|
1030
1030
|
return null;
|
|
1031
|
-
}, c = (m,
|
|
1032
|
-
let
|
|
1031
|
+
}, c = (m, b) => {
|
|
1032
|
+
let A, h;
|
|
1033
1033
|
if (m.query.__tab ? h = _r(m.query.__tab) : (h = {
|
|
1034
1034
|
id: nt(),
|
|
1035
1035
|
title: n("VueStackTab.undefined"),
|
|
1036
1036
|
closable: !0,
|
|
1037
1037
|
refreshable: !0,
|
|
1038
1038
|
iframe: !1
|
|
1039
|
-
}, m.query.__tab = ot(h)), F.has(h.id) || !
|
|
1039
|
+
}, m.query.__tab = ot(h)), F.has(h.id) || !b)
|
|
1040
1040
|
return;
|
|
1041
1041
|
const L = m.matched[m.matched.length - 1].path, V = m.path.endsWith("/") ? m.path.substring(0, m.path.length - 1) : m.path, j = Bt(h.id, L === V ? V : m.path, m.query.valueOf()), ze = m.query.__src;
|
|
1042
1042
|
let H = null;
|
|
@@ -1067,23 +1067,23 @@ const Le = () => {
|
|
|
1067
1067
|
});
|
|
1068
1068
|
} else
|
|
1069
1069
|
H.active = !0, (H.pages.isEmpty() || H.pages.peek().id !== ve.id) && H.pages.push(ve);
|
|
1070
|
-
return U(H),
|
|
1070
|
+
return U(H), ue.has(j) ? A = ue.get(j) : (A = /* @__PURE__ */ Q({
|
|
1071
1071
|
name: j,
|
|
1072
1072
|
components: {
|
|
1073
|
-
DynamicComponent:
|
|
1073
|
+
DynamicComponent: b
|
|
1074
1074
|
},
|
|
1075
1075
|
emits: {
|
|
1076
1076
|
onLoaded: null
|
|
1077
1077
|
},
|
|
1078
1078
|
setup(X, _t) {
|
|
1079
1079
|
return Ge(() => {
|
|
1080
|
-
_t.emit("onLoaded"),
|
|
1080
|
+
_t.emit("onLoaded"), w(j, ".cache-page-wrapper");
|
|
1081
1081
|
}), Sn(() => {
|
|
1082
|
-
|
|
1082
|
+
d(j);
|
|
1083
1083
|
}), On(() => {
|
|
1084
|
-
_t.emit("onLoaded"),
|
|
1084
|
+
_t.emit("onLoaded"), p(j), P(), F.clear(), b.props = null;
|
|
1085
1085
|
}), He(() => {
|
|
1086
|
-
|
|
1086
|
+
l(j);
|
|
1087
1087
|
}), () => N("div", {
|
|
1088
1088
|
class: "cache-page-wrapper",
|
|
1089
1089
|
id: "W-" + h.id,
|
|
@@ -1095,141 +1095,141 @@ const Le = () => {
|
|
|
1095
1095
|
tId: h.id
|
|
1096
1096
|
}, null)]);
|
|
1097
1097
|
}
|
|
1098
|
-
}),
|
|
1099
|
-
},
|
|
1100
|
-
const
|
|
1101
|
-
if (
|
|
1102
|
-
for (const
|
|
1103
|
-
if (document.querySelector(
|
|
1104
|
-
const h =
|
|
1105
|
-
document.querySelector(
|
|
1098
|
+
}), ue.set(j, A)), I(j), A;
|
|
1099
|
+
}, p = (m) => {
|
|
1100
|
+
const b = de.get(m);
|
|
1101
|
+
if (b) {
|
|
1102
|
+
for (const A of b.keys())
|
|
1103
|
+
if (document.querySelector(A)) {
|
|
1104
|
+
const h = b.get(A);
|
|
1105
|
+
document.querySelector(A).scrollTop = h.top, document.querySelector(A).scrollLeft = h.left;
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
|
-
},
|
|
1109
|
-
var
|
|
1110
|
-
const
|
|
1111
|
-
if (
|
|
1112
|
-
for (const L of
|
|
1108
|
+
}, d = (m) => {
|
|
1109
|
+
var A, h;
|
|
1110
|
+
const b = de.get(m);
|
|
1111
|
+
if (b)
|
|
1112
|
+
for (const L of b.keys()) {
|
|
1113
1113
|
const V = {
|
|
1114
|
-
top: ((
|
|
1114
|
+
top: ((A = document.querySelector(L)) == null ? void 0 : A.scrollTop) ?? 0,
|
|
1115
1115
|
left: ((h = document.querySelector(L)) == null ? void 0 : h.scrollLeft) ?? 0
|
|
1116
1116
|
};
|
|
1117
|
-
|
|
1117
|
+
b.set(L, V);
|
|
1118
1118
|
}
|
|
1119
|
-
},
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
const
|
|
1125
|
-
for (const h of
|
|
1126
|
-
|
|
1119
|
+
}, l = (m) => {
|
|
1120
|
+
const b = de.get(m);
|
|
1121
|
+
b && (b.clear(), de.delete(m));
|
|
1122
|
+
}, w = (m, ...b) => {
|
|
1123
|
+
de.has(m) || de.set(m, /* @__PURE__ */ new Map());
|
|
1124
|
+
const A = de.get(m);
|
|
1125
|
+
for (const h of b)
|
|
1126
|
+
A.set(h, {
|
|
1127
1127
|
top: 0,
|
|
1128
1128
|
left: 0
|
|
1129
1129
|
});
|
|
1130
|
-
}, T = (m) => {
|
|
1131
|
-
const p = a(m.id);
|
|
1132
|
-
for (const I of p.pages.list())
|
|
1133
|
-
v(I.id), $(I.id);
|
|
1134
|
-
P(), p.pages.clear();
|
|
1135
1130
|
}, E = (m) => {
|
|
1136
|
-
|
|
1137
|
-
const
|
|
1131
|
+
const b = a(m.id);
|
|
1132
|
+
for (const A of b.pages.list())
|
|
1133
|
+
v(A.id), $(A.id);
|
|
1134
|
+
P(), b.pages.clear();
|
|
1135
|
+
}, B = (m) => {
|
|
1136
|
+
let b = "";
|
|
1137
|
+
const A = a(m);
|
|
1138
1138
|
for (let h = C.value.length - 1; h >= 0; h--)
|
|
1139
1139
|
if (m === O(C)[h].id) {
|
|
1140
1140
|
if (!O(C)[h].closable)
|
|
1141
1141
|
return m;
|
|
1142
1142
|
for (const L of O(C)[h].pages.list())
|
|
1143
1143
|
v(L.id), $(L.id), F.add(O(C)[h].id);
|
|
1144
|
-
O(C)[h].pages.clear(), C.value.length > 1 && O(C)[h].active && (h === 0 ?
|
|
1144
|
+
O(C)[h].pages.clear(), C.value.length > 1 && O(C)[h].active && (h === 0 ? b = O(C)[h + 1].id : b = O(C)[h - 1].id), O(C).splice(h, 1);
|
|
1145
1145
|
break;
|
|
1146
1146
|
}
|
|
1147
|
-
return
|
|
1148
|
-
id:
|
|
1149
|
-
}),
|
|
1150
|
-
},
|
|
1147
|
+
return b !== "" && t.emit(q.TAB_ACTIVE, {
|
|
1148
|
+
id: b
|
|
1149
|
+
}), A != null && A.active || (P(), F.clear()), b;
|
|
1150
|
+
}, T = () => {
|
|
1151
1151
|
const m = O(C);
|
|
1152
|
-
for (let
|
|
1153
|
-
if (m[
|
|
1154
|
-
for (const
|
|
1155
|
-
v(
|
|
1156
|
-
O(C)[
|
|
1152
|
+
for (let b = m.length - 1; b >= 0; b--)
|
|
1153
|
+
if (m[b].closable) {
|
|
1154
|
+
for (const A of m[b].pages.list())
|
|
1155
|
+
v(A.id), $(A.id), F.add(m[b].id);
|
|
1156
|
+
O(C)[b].pages.clear(), O(C).splice(b, 1);
|
|
1157
1157
|
}
|
|
1158
|
-
for (const
|
|
1159
|
-
if (
|
|
1158
|
+
for (const b of m)
|
|
1159
|
+
if (b.active) {
|
|
1160
1160
|
P(), F.clear();
|
|
1161
1161
|
return;
|
|
1162
1162
|
}
|
|
1163
1163
|
t.emit(q.TAB_ACTIVE, {
|
|
1164
1164
|
id: m[m.length - 1].id
|
|
1165
1165
|
});
|
|
1166
|
-
},
|
|
1167
|
-
const
|
|
1168
|
-
let
|
|
1169
|
-
for (let h =
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1172
|
-
else if (
|
|
1173
|
-
for (const L of
|
|
1174
|
-
v(L.id), $(L.id), F.add(
|
|
1166
|
+
}, k = (m) => {
|
|
1167
|
+
const b = O(C);
|
|
1168
|
+
let A;
|
|
1169
|
+
for (let h = b.length - 1; h >= 0; h--)
|
|
1170
|
+
if (b[h].id === m)
|
|
1171
|
+
A = b[h];
|
|
1172
|
+
else if (b[h].closable && b[h].id !== m) {
|
|
1173
|
+
for (const L of b[h].pages.list())
|
|
1174
|
+
v(L.id), $(L.id), F.add(b[h].id);
|
|
1175
1175
|
O(C)[h].pages.clear(), O(C).splice(h, 1);
|
|
1176
1176
|
}
|
|
1177
|
-
|
|
1177
|
+
A.active ? (P(), F.clear()) : t.emit(q.TAB_ACTIVE, {
|
|
1178
1178
|
id: m
|
|
1179
1179
|
});
|
|
1180
1180
|
}, _ = (m) => {
|
|
1181
|
-
let
|
|
1182
|
-
const
|
|
1183
|
-
for (let h = 0; h <
|
|
1184
|
-
if (
|
|
1185
|
-
|
|
1181
|
+
let b = -1;
|
|
1182
|
+
const A = O(C);
|
|
1183
|
+
for (let h = 0; h < A.length; h++)
|
|
1184
|
+
if (A[h].id === m) {
|
|
1185
|
+
b = h - 1;
|
|
1186
1186
|
break;
|
|
1187
1187
|
}
|
|
1188
|
-
for (let h =
|
|
1189
|
-
if (
|
|
1190
|
-
for (const L of
|
|
1191
|
-
v(L.id), $(L.id), F.add(
|
|
1188
|
+
for (let h = b; h >= 0; h--)
|
|
1189
|
+
if (A[h].closable) {
|
|
1190
|
+
for (const L of A[h].pages.list())
|
|
1191
|
+
v(L.id), $(L.id), F.add(A[h].id);
|
|
1192
1192
|
O(C)[h].pages.clear(), O(C).splice(h, 1);
|
|
1193
1193
|
}
|
|
1194
|
-
for (const h of
|
|
1194
|
+
for (const h of A)
|
|
1195
1195
|
if (h.active) {
|
|
1196
1196
|
P(), F.clear();
|
|
1197
1197
|
return;
|
|
1198
1198
|
}
|
|
1199
1199
|
t.emit(q.TAB_ACTIVE, {
|
|
1200
|
-
id:
|
|
1200
|
+
id: A[0].id
|
|
1201
1201
|
});
|
|
1202
|
-
},
|
|
1203
|
-
const
|
|
1204
|
-
let
|
|
1205
|
-
for (let h = 0; h <
|
|
1206
|
-
if (
|
|
1207
|
-
|
|
1202
|
+
}, x = (m) => {
|
|
1203
|
+
const b = O(C);
|
|
1204
|
+
let A = b.length;
|
|
1205
|
+
for (let h = 0; h < b.length; h++)
|
|
1206
|
+
if (b[h].id === m) {
|
|
1207
|
+
A = h + 1;
|
|
1208
1208
|
break;
|
|
1209
1209
|
}
|
|
1210
|
-
for (let h =
|
|
1211
|
-
if (
|
|
1212
|
-
for (const L of
|
|
1213
|
-
v(L.id), $(L.id), F.add(
|
|
1210
|
+
for (let h = b.length - 1; h >= A; h--)
|
|
1211
|
+
if (b[h].closable) {
|
|
1212
|
+
for (const L of b[h].pages.list())
|
|
1213
|
+
v(L.id), $(L.id), F.add(b[h].id);
|
|
1214
1214
|
O(C)[h].pages.clear(), O(C).splice(h, 1);
|
|
1215
1215
|
}
|
|
1216
|
-
for (const h of
|
|
1216
|
+
for (const h of b)
|
|
1217
1217
|
if (h.active) {
|
|
1218
1218
|
P(), F.clear();
|
|
1219
1219
|
return;
|
|
1220
1220
|
}
|
|
1221
1221
|
t.emit(q.TAB_ACTIVE, {
|
|
1222
|
-
id:
|
|
1222
|
+
id: b[b.length - 1].id
|
|
1223
1223
|
});
|
|
1224
1224
|
}, g = (m) => {
|
|
1225
|
-
var
|
|
1226
|
-
for (const
|
|
1227
|
-
if (
|
|
1228
|
-
const h = (
|
|
1225
|
+
var b;
|
|
1226
|
+
for (const A of O(C))
|
|
1227
|
+
if (A.id === m) {
|
|
1228
|
+
const h = (b = A.pages.peek()) == null ? void 0 : b.id;
|
|
1229
1229
|
for (let L = D.value.length - 1; L >= 0; L--)
|
|
1230
1230
|
if (D.value[L] === h) {
|
|
1231
|
-
D.value.splice(L, 1),
|
|
1232
|
-
|
|
1231
|
+
D.value.splice(L, 1), A.active && (fe.value = !1, ae(() => {
|
|
1232
|
+
fe.value = !0;
|
|
1233
1233
|
}));
|
|
1234
1234
|
break;
|
|
1235
1235
|
}
|
|
@@ -1237,24 +1237,24 @@ const Le = () => {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
}, S = () => {
|
|
1239
1239
|
const m = /* @__PURE__ */ new Set();
|
|
1240
|
-
C.value.forEach((
|
|
1241
|
-
m.add(
|
|
1240
|
+
C.value.forEach((b) => {
|
|
1241
|
+
m.add(b.pages.peek().id);
|
|
1242
1242
|
});
|
|
1243
|
-
for (let
|
|
1244
|
-
const
|
|
1245
|
-
m.has(
|
|
1243
|
+
for (let b = D.value.length - 1; b >= 0; b--) {
|
|
1244
|
+
const A = D.value[b];
|
|
1245
|
+
m.has(A) && D.value.splice(b, 1);
|
|
1246
1246
|
}
|
|
1247
|
-
|
|
1248
|
-
|
|
1247
|
+
ae(() => {
|
|
1248
|
+
fe.value = !1, ae(() => {
|
|
1249
1249
|
setTimeout(() => {
|
|
1250
|
-
|
|
1250
|
+
fe.value = !0;
|
|
1251
1251
|
}, 300);
|
|
1252
1252
|
});
|
|
1253
1253
|
});
|
|
1254
|
-
}, u = (m,
|
|
1255
|
-
|
|
1256
|
-
}, y = (m) =>
|
|
1257
|
-
|
|
1254
|
+
}, u = (m, b) => {
|
|
1255
|
+
ue.set(m, b);
|
|
1256
|
+
}, y = (m) => ue.get(m), v = (m) => {
|
|
1257
|
+
ue.delete(m);
|
|
1258
1258
|
}, $ = (m) => {
|
|
1259
1259
|
Re.add(m);
|
|
1260
1260
|
}, P = () => {
|
|
@@ -1262,17 +1262,17 @@ const Le = () => {
|
|
|
1262
1262
|
Re.has(D.value[m]) && O(D).splice(m, 1);
|
|
1263
1263
|
Re.clear();
|
|
1264
1264
|
}, G = (m) => {
|
|
1265
|
-
for (let
|
|
1266
|
-
m === D.value[
|
|
1267
|
-
},
|
|
1265
|
+
for (let b = D.value.length - 1; b >= 0; b--)
|
|
1266
|
+
m === D.value[b] && O(D).splice(b, 1);
|
|
1267
|
+
}, I = (m) => {
|
|
1268
1268
|
new Set(D.value).has(m) || D.value.push(m);
|
|
1269
|
-
}, M = (m,
|
|
1270
|
-
for (let
|
|
1271
|
-
const h = C.value[
|
|
1269
|
+
}, M = (m, b = !0) => {
|
|
1270
|
+
for (let A = C.value.length - 1; A >= 0; A--) {
|
|
1271
|
+
const h = C.value[A];
|
|
1272
1272
|
if (h.id === m) {
|
|
1273
1273
|
if (h.active)
|
|
1274
1274
|
break;
|
|
1275
|
-
if (h.active = !0, U(h),
|
|
1275
|
+
if (h.active = !0, U(h), b) {
|
|
1276
1276
|
const L = h.pages.peek();
|
|
1277
1277
|
e.push({
|
|
1278
1278
|
path: L.path,
|
|
@@ -1280,25 +1280,25 @@ const Le = () => {
|
|
|
1280
1280
|
});
|
|
1281
1281
|
}
|
|
1282
1282
|
} else
|
|
1283
|
-
C.value[
|
|
1283
|
+
C.value[A].active = !1;
|
|
1284
1284
|
}
|
|
1285
1285
|
}, U = (m) => {
|
|
1286
1286
|
window.sessionStorage.setItem(Ct, JSON.stringify(m));
|
|
1287
1287
|
}, re = () => {
|
|
1288
|
-
|
|
1288
|
+
fe.value = !1, we(), ae(() => {
|
|
1289
1289
|
O(C).push(...Ke), t.emit(q.TAB_ACTIVE, {
|
|
1290
1290
|
id: Ke[0].id
|
|
1291
|
-
}),
|
|
1292
|
-
|
|
1291
|
+
}), ae(() => {
|
|
1292
|
+
fe.value = !0;
|
|
1293
1293
|
});
|
|
1294
1294
|
});
|
|
1295
1295
|
}, we = () => {
|
|
1296
|
-
O(C).splice(0),
|
|
1296
|
+
O(C).splice(0), ue.clear(), Re.clear(), F.clear(), O(D).splice(0);
|
|
1297
1297
|
};
|
|
1298
1298
|
return {
|
|
1299
1299
|
tabs: C,
|
|
1300
1300
|
caches: D,
|
|
1301
|
-
pageShown:
|
|
1301
|
+
pageShown: fe,
|
|
1302
1302
|
initialed: Mt,
|
|
1303
1303
|
setMaxSize: (m) => {
|
|
1304
1304
|
Ne = m;
|
|
@@ -1309,17 +1309,17 @@ const Le = () => {
|
|
|
1309
1309
|
active: M,
|
|
1310
1310
|
destroy: we,
|
|
1311
1311
|
reset: re,
|
|
1312
|
-
addCache:
|
|
1312
|
+
addCache: I,
|
|
1313
1313
|
removeCache: G,
|
|
1314
1314
|
getTab: a,
|
|
1315
1315
|
addTab: f,
|
|
1316
|
-
removeTab:
|
|
1317
|
-
removeAllTabs:
|
|
1316
|
+
removeTab: B,
|
|
1317
|
+
removeAllTabs: T,
|
|
1318
1318
|
removeLeftTabs: _,
|
|
1319
|
-
removeRightTabs:
|
|
1320
|
-
removeOtherTabs:
|
|
1319
|
+
removeRightTabs: x,
|
|
1320
|
+
removeOtherTabs: k,
|
|
1321
1321
|
hasTab: o,
|
|
1322
|
-
renewTab:
|
|
1322
|
+
renewTab: E,
|
|
1323
1323
|
addPage: c,
|
|
1324
1324
|
addComponent: u,
|
|
1325
1325
|
getComponent: y,
|
|
@@ -1328,7 +1328,7 @@ const Le = () => {
|
|
|
1328
1328
|
removeDeletableCache: P,
|
|
1329
1329
|
refreshTab: g,
|
|
1330
1330
|
refreshAllTabs: S,
|
|
1331
|
-
addPageScroller:
|
|
1331
|
+
addPageScroller: w,
|
|
1332
1332
|
setGlobalScroll: (m) => {
|
|
1333
1333
|
Lt = m;
|
|
1334
1334
|
}
|
|
@@ -1342,7 +1342,7 @@ const Le = () => {
|
|
|
1342
1342
|
setup(e) {
|
|
1343
1343
|
return (t, n) => (z(), W("div", Ir, [
|
|
1344
1344
|
K("div", {
|
|
1345
|
-
class:
|
|
1345
|
+
class: le(["stack-tab__contextmenu-icon", t.icon])
|
|
1346
1346
|
}, null, 2),
|
|
1347
1347
|
K("div", {
|
|
1348
1348
|
style: { "margin-left": "8px" },
|
|
@@ -1374,13 +1374,13 @@ const Le = () => {
|
|
|
1374
1374
|
removeLeftTabs: f,
|
|
1375
1375
|
removeRightTabs: a,
|
|
1376
1376
|
refreshTab: c,
|
|
1377
|
-
refreshAllTabs:
|
|
1378
|
-
removeOtherTabs:
|
|
1377
|
+
refreshAllTabs: p,
|
|
1378
|
+
removeOtherTabs: d
|
|
1379
1379
|
} = Le();
|
|
1380
1380
|
return Ge(() => {
|
|
1381
|
-
const
|
|
1382
|
-
s.left +
|
|
1383
|
-
}), (
|
|
1381
|
+
const l = r.value ? r.value.clientWidth : 0, w = window.innerWidth;
|
|
1382
|
+
s.left + l > w && (s.left = w - l - 5);
|
|
1383
|
+
}), (l, w) => (z(), W("div", {
|
|
1384
1384
|
ref_key: "contextmenu",
|
|
1385
1385
|
ref: r,
|
|
1386
1386
|
class: "stack-tab__contextmenu",
|
|
@@ -1393,48 +1393,48 @@ const Le = () => {
|
|
|
1393
1393
|
N(ie, {
|
|
1394
1394
|
icon: "stack-tab__icon-reload svg-mask",
|
|
1395
1395
|
title: O(n)("VueStackTab.reload"),
|
|
1396
|
-
onClick:
|
|
1396
|
+
onClick: w[0] || (w[0] = (E) => O(c)(l.tabItem.id))
|
|
1397
1397
|
}, null, 8, ["title"]),
|
|
1398
1398
|
N(ie, {
|
|
1399
1399
|
icon: "stack-tab__icon-reload-all svg-mask",
|
|
1400
1400
|
title: O(n)("VueStackTab.reloadAll"),
|
|
1401
|
-
onClick: O(
|
|
1401
|
+
onClick: O(p)
|
|
1402
1402
|
}, null, 8, ["title", "onClick"]),
|
|
1403
1403
|
N(ie, {
|
|
1404
1404
|
icon: "stack-tab__icon-close svg-mask",
|
|
1405
1405
|
title: O(n)("VueStackTab.close"),
|
|
1406
|
-
disabled:
|
|
1407
|
-
onClick:
|
|
1406
|
+
disabled: l.tabItem.closable ? null : "disabled",
|
|
1407
|
+
onClick: w[1] || (w[1] = (E) => O(o)(l.tabItem.id))
|
|
1408
1408
|
}, null, 8, ["title", "disabled"]),
|
|
1409
1409
|
N(ie, {
|
|
1410
1410
|
icon: "stack-tab__icon-close-lefts svg-mask",
|
|
1411
1411
|
title: O(n)("VueStackTab.closeLeft"),
|
|
1412
|
-
disabled:
|
|
1413
|
-
onClick:
|
|
1412
|
+
disabled: l.index <= 0 ? "disabled" : null,
|
|
1413
|
+
onClick: w[2] || (w[2] = (E) => O(f)(l.tabItem.id))
|
|
1414
1414
|
}, null, 8, ["title", "disabled"]),
|
|
1415
1415
|
N(ie, {
|
|
1416
1416
|
icon: "stack-tab__icon-close-rights svg-mask",
|
|
1417
1417
|
title: O(n)("VueStackTab.closeRight"),
|
|
1418
|
-
disabled:
|
|
1419
|
-
onClick:
|
|
1418
|
+
disabled: l.index >= l.max - 1 ? "disabled" : null,
|
|
1419
|
+
onClick: w[3] || (w[3] = (E) => O(a)(l.tabItem.id))
|
|
1420
1420
|
}, null, 8, ["title", "disabled"]),
|
|
1421
1421
|
N(ie, {
|
|
1422
1422
|
icon: "stack-tab__icon-close-others svg-mask",
|
|
1423
1423
|
title: O(n)("VueStackTab.closeOthers"),
|
|
1424
|
-
onClick:
|
|
1424
|
+
onClick: w[4] || (w[4] = (E) => O(d)(l.tabItem.id))
|
|
1425
1425
|
}, null, 8, ["title"]),
|
|
1426
1426
|
N(ie, {
|
|
1427
1427
|
icon: "stack-tab__icon-close-all svg-mask",
|
|
1428
1428
|
title: O(n)("VueStackTab.closeAll"),
|
|
1429
1429
|
onClick: O(i)
|
|
1430
1430
|
}, null, 8, ["title", "onClick"]),
|
|
1431
|
-
|
|
1432
|
-
(z(!0), W(Ze, null, ft(
|
|
1433
|
-
key:
|
|
1434
|
-
icon:
|
|
1435
|
-
title:
|
|
1436
|
-
disabled:
|
|
1437
|
-
onClick: (
|
|
1431
|
+
l.contextMenu !== void 0 && l.contextMenu.length > 0 ? (z(), W("div", Br)) : ne("", !0),
|
|
1432
|
+
(z(!0), W(Ze, null, ft(l.contextMenu, (E, B) => (z(), me(ie, {
|
|
1433
|
+
key: B,
|
|
1434
|
+
icon: E.icon,
|
|
1435
|
+
title: E.title,
|
|
1436
|
+
disabled: E.disabled(l.tabItem) ? "disabled" : null,
|
|
1437
|
+
onClick: (T) => !E.disabled && E.callback(l.tabItem.id)
|
|
1438
1438
|
}, null, 8, ["icon", "title", "disabled", "onClick"]))), 128))
|
|
1439
1439
|
], 4));
|
|
1440
1440
|
}
|
|
@@ -1457,7 +1457,7 @@ const Le = () => {
|
|
|
1457
1457
|
document.removeEventListener("click", r);
|
|
1458
1458
|
});
|
|
1459
1459
|
const n = async (s, o, i, f) => {
|
|
1460
|
-
t.value = !1, await
|
|
1460
|
+
t.value = !1, await ae(() => {
|
|
1461
1461
|
const { clientY: a, clientX: c } = s;
|
|
1462
1462
|
t.value = !0, Object.assign(e, { item: o, index: i, top: a, left: c, max: f });
|
|
1463
1463
|
});
|
|
@@ -1477,22 +1477,22 @@ const Le = () => {
|
|
|
1477
1477
|
emits: ["close", "active"],
|
|
1478
1478
|
setup(e, { emit: t }) {
|
|
1479
1479
|
const n = t, r = Me(), { t: s } = Ce(), o = R(), i = e;
|
|
1480
|
-
r.on(q.TAB_ACTIVE, ({ id:
|
|
1481
|
-
i.item.id ===
|
|
1480
|
+
r.on(q.TAB_ACTIVE, ({ id: p, isRoute: d }) => {
|
|
1481
|
+
i.item.id === p && c(d);
|
|
1482
1482
|
});
|
|
1483
1483
|
const f = ge(() => i.item.title || s("undefined")), a = () => {
|
|
1484
1484
|
n("close", i.item);
|
|
1485
|
-
}, c = (
|
|
1486
|
-
n("active", i.item, o,
|
|
1485
|
+
}, c = (p = !0) => {
|
|
1486
|
+
n("active", i.item, o, p);
|
|
1487
1487
|
};
|
|
1488
|
-
return (
|
|
1488
|
+
return (p, d) => (z(), W("li", {
|
|
1489
1489
|
ref_key: "curtab",
|
|
1490
1490
|
ref: o,
|
|
1491
|
-
class:
|
|
1492
|
-
"is-active":
|
|
1493
|
-
"is-icon":
|
|
1491
|
+
class: le(["stack-tab__item", {
|
|
1492
|
+
"is-active": p.item.active,
|
|
1493
|
+
"is-icon": p.item.closable
|
|
1494
1494
|
}]),
|
|
1495
|
-
onClick:
|
|
1495
|
+
onClick: d[0] || (d[0] = (l) => c(!0))
|
|
1496
1496
|
}, [
|
|
1497
1497
|
K("div", $r, [
|
|
1498
1498
|
K("div", {
|
|
@@ -1500,7 +1500,7 @@ const Le = () => {
|
|
|
1500
1500
|
title: f.value
|
|
1501
1501
|
}, Jt(f.value), 9, Rr)
|
|
1502
1502
|
]),
|
|
1503
|
-
|
|
1503
|
+
p.item.closable ? (z(), W("div", {
|
|
1504
1504
|
key: 0,
|
|
1505
1505
|
class: "stack-tab__icon-close-fill stack-tab__item-button",
|
|
1506
1506
|
title: O(s)("VueStackTab.close"),
|
|
@@ -1587,13 +1587,13 @@ var be = function(e) {
|
|
|
1587
1587
|
return Pe.get(e);
|
|
1588
1588
|
if (pn(e))
|
|
1589
1589
|
return Pe.set(e, Nt), Nt;
|
|
1590
|
-
var n = getComputedStyle(e), r = gt(e) && e.ownerSVGElement && e.getBBox(), s = !qr && n.boxSizing === "border-box", o = Fr.test(n.writingMode || ""), i = !r && Rt.test(n.overflowY || ""), f = !r && Rt.test(n.overflowX || ""), a = r ? 0 : Y(n.paddingTop), c = r ? 0 : Y(n.paddingRight),
|
|
1590
|
+
var n = getComputedStyle(e), r = gt(e) && e.ownerSVGElement && e.getBBox(), s = !qr && n.boxSizing === "border-box", o = Fr.test(n.writingMode || ""), i = !r && Rt.test(n.overflowY || ""), f = !r && Rt.test(n.overflowX || ""), a = r ? 0 : Y(n.paddingTop), c = r ? 0 : Y(n.paddingRight), p = r ? 0 : Y(n.paddingBottom), d = r ? 0 : Y(n.paddingLeft), l = r ? 0 : Y(n.borderTopWidth), w = r ? 0 : Y(n.borderRightWidth), E = r ? 0 : Y(n.borderBottomWidth), B = r ? 0 : Y(n.borderLeftWidth), T = d + c, k = a + p, _ = B + w, x = l + E, g = f ? e.offsetHeight - x - e.clientHeight : 0, S = i ? e.offsetWidth - _ - e.clientWidth : 0, u = s ? T + _ : 0, y = s ? k + x : 0, v = r ? r.width : Y(n.width) - u - S, $ = r ? r.height : Y(n.height) - y - g, P = v + T + S + _, G = $ + k + g + x, I = be({
|
|
1591
1591
|
devicePixelContentBoxSize: ye(Math.round(v * devicePixelRatio), Math.round($ * devicePixelRatio), o),
|
|
1592
1592
|
borderBoxSize: ye(P, G, o),
|
|
1593
1593
|
contentBoxSize: ye(v, $, o),
|
|
1594
|
-
contentRect: new hn(
|
|
1594
|
+
contentRect: new hn(d, a, v, $)
|
|
1595
1595
|
});
|
|
1596
|
-
return Pe.set(e,
|
|
1596
|
+
return Pe.set(e, I), I;
|
|
1597
1597
|
}, mn = function(e, t, n) {
|
|
1598
1598
|
var r = bn(e, n), s = r.borderBoxSize, o = r.contentBoxSize, i = r.devicePixelContentBoxSize;
|
|
1599
1599
|
switch (t) {
|
|
@@ -1622,8 +1622,8 @@ var be = function(e) {
|
|
|
1622
1622
|
if (i.activeTargets.length !== 0) {
|
|
1623
1623
|
var f = [];
|
|
1624
1624
|
i.activeTargets.forEach(function(c) {
|
|
1625
|
-
var
|
|
1626
|
-
f.push(
|
|
1625
|
+
var p = new Gr(c.target), d = vn(c.target);
|
|
1626
|
+
f.push(p), c.lastReportedSize = mn(c.target, c.observedBox), d < e && (e = d);
|
|
1627
1627
|
}), t.push(function() {
|
|
1628
1628
|
i.callback.call(i.observer, f, i.observer);
|
|
1629
1629
|
}), i.activeTargets.splice(0, i.activeTargets.length);
|
|
@@ -1805,7 +1805,7 @@ const os = ["disabled", "title"], is = {
|
|
|
1805
1805
|
},
|
|
1806
1806
|
setup(e) {
|
|
1807
1807
|
return (t, n) => (z(), W("div", {
|
|
1808
|
-
class:
|
|
1808
|
+
class: le(["stack-tab__header-button", {
|
|
1809
1809
|
"stack-tab__shadow-right": t.shadow === "right",
|
|
1810
1810
|
"stack-tab__shadow-left": t.shadow === "left"
|
|
1811
1811
|
}]),
|
|
@@ -1814,7 +1814,7 @@ const os = ["disabled", "title"], is = {
|
|
|
1814
1814
|
}, [
|
|
1815
1815
|
"icon" in t.$slots ? ne("", !0) : (z(), W("div", {
|
|
1816
1816
|
key: 0,
|
|
1817
|
-
class:
|
|
1817
|
+
class: le(["stack-tab__mask-button", t.iconClass])
|
|
1818
1818
|
}, null, 2)),
|
|
1819
1819
|
"icon" in t.$slots ? (z(), W("div", is, [
|
|
1820
1820
|
ke(t.$slots, "icon")
|
|
@@ -1829,93 +1829,93 @@ const os = ["disabled", "title"], is = {
|
|
|
1829
1829
|
isScrollButton: { type: Boolean, default: !0 }
|
|
1830
1830
|
},
|
|
1831
1831
|
setup(e, { expose: t }) {
|
|
1832
|
-
const n = R(null), r = R(null), s = R(null), o = R(!1), i = R(!1), f = R(!1), a = R(!0), c = R(),
|
|
1832
|
+
const n = R(null), r = R(null), s = R(null), o = R(!1), i = R(!1), f = R(!1), a = R(!0), c = R(), p = e, d = Ie({
|
|
1833
1833
|
clientWidth: 0,
|
|
1834
1834
|
scrollWidth: 0,
|
|
1835
1835
|
scrollLeft: 0
|
|
1836
|
-
}),
|
|
1836
|
+
}), l = Ie({
|
|
1837
1837
|
thumbLeft: 0,
|
|
1838
1838
|
startScrollLeft: 0,
|
|
1839
1839
|
startThumbLeft: 0,
|
|
1840
1840
|
startPageX: 0
|
|
1841
1841
|
});
|
|
1842
|
-
En(
|
|
1843
|
-
|
|
1842
|
+
En(d, (I) => {
|
|
1843
|
+
w(I);
|
|
1844
1844
|
});
|
|
1845
|
-
const
|
|
1846
|
-
i.value =
|
|
1847
|
-
},
|
|
1848
|
-
if (!
|
|
1845
|
+
const w = (I) => {
|
|
1846
|
+
i.value = I.scrollLeft <= 10, f.value = I.clientWidth + I.scrollLeft - I.scrollWidth >= -10, a.value = I.scrollWidth !== I.clientWidth;
|
|
1847
|
+
}, E = ge(() => d.scrollWidth > d.clientWidth), B = ge(() => {
|
|
1848
|
+
if (!E.value)
|
|
1849
1849
|
return 0;
|
|
1850
|
-
const { clientWidth:
|
|
1851
|
-
return
|
|
1852
|
-
}),
|
|
1853
|
-
if (!
|
|
1850
|
+
const { clientWidth: I, scrollWidth: M } = d;
|
|
1851
|
+
return I / M * I;
|
|
1852
|
+
}), T = ge(() => {
|
|
1853
|
+
if (!E.value)
|
|
1854
1854
|
return 0;
|
|
1855
|
-
const { clientWidth:
|
|
1856
|
-
return (
|
|
1857
|
-
}),
|
|
1855
|
+
const { clientWidth: I, scrollWidth: M, scrollLeft: U } = d;
|
|
1856
|
+
return (I - B.value) * (U / (M - I));
|
|
1857
|
+
}), k = () => {
|
|
1858
1858
|
if (n.value === null || n.value === void 0)
|
|
1859
1859
|
return;
|
|
1860
|
-
const { clientWidth:
|
|
1861
|
-
Object.assign(
|
|
1860
|
+
const { clientWidth: I, scrollWidth: M, scrollLeft: U } = n.value;
|
|
1861
|
+
Object.assign(d, { clientWidth: I, scrollWidth: M, scrollLeft: U });
|
|
1862
1862
|
}, _ = new Vt(() => {
|
|
1863
1863
|
var M;
|
|
1864
|
-
|
|
1865
|
-
const
|
|
1866
|
-
|
|
1867
|
-
}),
|
|
1868
|
-
var
|
|
1869
|
-
if (!
|
|
1870
|
-
const M = (
|
|
1864
|
+
k();
|
|
1865
|
+
const I = (M = n.value) == null ? void 0 : M.querySelector(".stack-tab__item.is-active");
|
|
1866
|
+
I && (G(I) || P(I));
|
|
1867
|
+
}), x = new Vt(() => {
|
|
1868
|
+
var I;
|
|
1869
|
+
if (!E.value) {
|
|
1870
|
+
const M = (I = n.value) == null ? void 0 : I.querySelector(".stack-tab__item.is-active");
|
|
1871
1871
|
M && (G(M) || P(M));
|
|
1872
1872
|
}
|
|
1873
|
-
|
|
1874
|
-
}), g = (
|
|
1875
|
-
on({ wrap: n.value, left:
|
|
1876
|
-
}, S = (
|
|
1877
|
-
g(n.value.scrollLeft +
|
|
1878
|
-
}, u = (
|
|
1879
|
-
const M =
|
|
1880
|
-
g(n.value.scrollLeft + (M ? -
|
|
1881
|
-
}, y = (
|
|
1873
|
+
k();
|
|
1874
|
+
}), g = (I, M = !0) => {
|
|
1875
|
+
on({ wrap: n.value, left: I, smooth: M });
|
|
1876
|
+
}, S = (I) => {
|
|
1877
|
+
g(n.value.scrollLeft + I);
|
|
1878
|
+
}, u = (I) => {
|
|
1879
|
+
const M = I.deltaY < 0;
|
|
1880
|
+
g(n.value.scrollLeft + (M ? -p.space : p.space));
|
|
1881
|
+
}, y = (I) => {
|
|
1882
1882
|
var M;
|
|
1883
|
-
Object.assign(
|
|
1884
|
-
startPageX:
|
|
1883
|
+
Object.assign(l, {
|
|
1884
|
+
startPageX: I.pageX,
|
|
1885
1885
|
startScrollLeft: (M = n.value) == null ? void 0 : M.scrollLeft,
|
|
1886
|
-
startThumbLeft:
|
|
1887
|
-
thumbLeft:
|
|
1886
|
+
startThumbLeft: T.value,
|
|
1887
|
+
thumbLeft: T.value
|
|
1888
1888
|
}), o.value = !0, document.addEventListener("mousemove", v), document.addEventListener("mouseup", $);
|
|
1889
|
-
}, v = (
|
|
1890
|
-
const { clientWidth: M, scrollWidth: U } =
|
|
1891
|
-
let re =
|
|
1892
|
-
const we = M -
|
|
1893
|
-
re < 0 ? re = 0 : re > we && (re = we),
|
|
1894
|
-
}, $ = (
|
|
1895
|
-
o.value = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", $),
|
|
1889
|
+
}, v = (I) => {
|
|
1890
|
+
const { clientWidth: M, scrollWidth: U } = d;
|
|
1891
|
+
let re = l.startThumbLeft + I.pageX - l.startPageX;
|
|
1892
|
+
const we = M - B.value;
|
|
1893
|
+
re < 0 ? re = 0 : re > we && (re = we), l.thumbLeft = re, g(re * (U - M) / (M - B.value), !1), I.preventDefault();
|
|
1894
|
+
}, $ = (I) => {
|
|
1895
|
+
o.value = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", $), I.preventDefault();
|
|
1896
1896
|
};
|
|
1897
1897
|
Ge(() => {
|
|
1898
1898
|
var M;
|
|
1899
1899
|
_.observe(c.value);
|
|
1900
|
-
const
|
|
1901
|
-
|
|
1900
|
+
const I = (M = n.value) == null ? void 0 : M.querySelector(".stack-tab__nav");
|
|
1901
|
+
x.observe(I);
|
|
1902
1902
|
}), He(() => {
|
|
1903
|
-
_.disconnect(),
|
|
1903
|
+
_.disconnect(), x.disconnect();
|
|
1904
1904
|
});
|
|
1905
|
-
const P = (
|
|
1906
|
-
Yn({ el:
|
|
1907
|
-
}, G = (
|
|
1908
|
-
if (!
|
|
1905
|
+
const P = (I) => {
|
|
1906
|
+
Yn({ el: I, wrap: n, block: "end", inline: "center" });
|
|
1907
|
+
}, G = (I) => {
|
|
1908
|
+
if (!E.value)
|
|
1909
1909
|
return !0;
|
|
1910
|
-
const M =
|
|
1911
|
-
return !(M < U || M +
|
|
1910
|
+
const M = I.offsetLeft, U = n.value.scrollLeft;
|
|
1911
|
+
return !(M < U || M + I.clientWidth > U + n.value.clientWidth);
|
|
1912
1912
|
};
|
|
1913
|
-
return t({ scrollIntoView: P, isInView: G }), (
|
|
1913
|
+
return t({ scrollIntoView: P, isInView: G }), (I, M) => (z(), W(Ze, null, [
|
|
1914
1914
|
a.value ? (z(), me(ct, {
|
|
1915
1915
|
key: 0,
|
|
1916
1916
|
"icon-class": "stack-tab__icon-left-arrow",
|
|
1917
1917
|
disabled: i.value,
|
|
1918
|
-
onClick: M[0] || (M[0] = (U) => !i.value && S(-1 *
|
|
1918
|
+
onClick: M[0] || (M[0] = (U) => !i.value && S(-1 * I.space))
|
|
1919
1919
|
}, null, 8, ["disabled"])) : ne("", !0),
|
|
1920
1920
|
K("div", {
|
|
1921
1921
|
ref_key: "headerScroll",
|
|
@@ -1926,39 +1926,39 @@ const os = ["disabled", "title"], is = {
|
|
|
1926
1926
|
K("div", {
|
|
1927
1927
|
ref_key: "container",
|
|
1928
1928
|
ref: n,
|
|
1929
|
-
class:
|
|
1929
|
+
class: le(["stack-tab__scroll-container", {
|
|
1930
1930
|
"stack-tab__shadow-inset-left": !i.value && f.value,
|
|
1931
1931
|
"stack-tab__shadow-inset-right": !f.value && i.value,
|
|
1932
1932
|
"stack-tab__shadow-inset-all": !i.value && !f.value
|
|
1933
1933
|
}]),
|
|
1934
|
-
onScrollPassive:
|
|
1934
|
+
onScrollPassive: k
|
|
1935
1935
|
}, [
|
|
1936
|
-
ke(
|
|
1936
|
+
ke(I.$slots, "default")
|
|
1937
1937
|
], 34),
|
|
1938
1938
|
Kt(K("div", {
|
|
1939
1939
|
ref_key: "bar",
|
|
1940
1940
|
ref: r,
|
|
1941
|
-
class:
|
|
1941
|
+
class: le(["stack-tab__scrollbar", { "is-dragging": o.value }])
|
|
1942
1942
|
}, [
|
|
1943
1943
|
K("div", {
|
|
1944
1944
|
ref_key: "thumb",
|
|
1945
1945
|
ref: s,
|
|
1946
|
-
class:
|
|
1946
|
+
class: le(["stack-tab__scrollbar-thumb", { "is-dragging": o.value }]),
|
|
1947
1947
|
style: ut({
|
|
1948
|
-
width: `${
|
|
1949
|
-
transform: `translateX(${
|
|
1948
|
+
width: `${B.value}px`,
|
|
1949
|
+
transform: `translateX(${T.value}px)`
|
|
1950
1950
|
}),
|
|
1951
1951
|
onMousedown: _e(y, ["prevent"])
|
|
1952
1952
|
}, null, 38)
|
|
1953
1953
|
], 2), [
|
|
1954
|
-
[Qt,
|
|
1954
|
+
[Qt, E.value]
|
|
1955
1955
|
])
|
|
1956
1956
|
], 544),
|
|
1957
1957
|
a.value ? (z(), me(ct, {
|
|
1958
1958
|
key: 1,
|
|
1959
1959
|
"icon-class": "stack-tab__icon-right-arrow",
|
|
1960
1960
|
disabled: f.value,
|
|
1961
|
-
onClick: M[1] || (M[1] = (U) => !f.value && S(
|
|
1961
|
+
onClick: M[1] || (M[1] = (U) => !f.value && S(I.space))
|
|
1962
1962
|
}, null, 8, ["disabled"])) : ne("", !0)
|
|
1963
1963
|
], 64));
|
|
1964
1964
|
}
|
|
@@ -1975,42 +1975,42 @@ const os = ["disabled", "title"], is = {
|
|
|
1975
1975
|
},
|
|
1976
1976
|
emits: ["active"],
|
|
1977
1977
|
setup(e, { emit: t }) {
|
|
1978
|
-
const { t: n } = Ce(), r = lt("maximum"), s = t, o = R(), { shown: i, contextMenuData: f, showContextMenu: a } = zr(), c = e, { removeTab:
|
|
1978
|
+
const { t: n } = Ce(), r = lt("maximum"), s = t, o = R(), { shown: i, contextMenuData: f, showContextMenu: a } = zr(), c = e, { removeTab: p, active: d, tabs: l } = Le(), w = ge(() => typeof c.tabTransition == "string" ? {
|
|
1979
1979
|
name: c.tabTransition
|
|
1980
|
-
} : c.tabTransition),
|
|
1981
|
-
_.closable &&
|
|
1982
|
-
},
|
|
1983
|
-
o.value && (
|
|
1984
|
-
o.value.isInView(
|
|
1985
|
-
}),
|
|
1980
|
+
} : c.tabTransition), E = ge(() => c.tabScrollMode === he.BOTH || c.tabScrollMode === he.BUTTON), B = c.tabScrollMode === he.BOTH || c.tabScrollMode === he.WHEEL, T = (_) => {
|
|
1981
|
+
_.closable && p(_.id), i.value = !1;
|
|
1982
|
+
}, k = (_, x, g) => {
|
|
1983
|
+
o.value && (ae(() => {
|
|
1984
|
+
o.value.isInView(x.value) || o.value.scrollIntoView(x.value);
|
|
1985
|
+
}), d(_.id, g), s("active", _.id));
|
|
1986
1986
|
};
|
|
1987
|
-
return (_,
|
|
1987
|
+
return (_, x) => (z(), W("div", cs, [
|
|
1988
1988
|
ke(_.$slots, "leftButton"),
|
|
1989
1989
|
N(as, {
|
|
1990
1990
|
ref_key: "scroll",
|
|
1991
1991
|
ref: o,
|
|
1992
1992
|
space: _.space,
|
|
1993
|
-
"is-scroll-wheel": O(
|
|
1994
|
-
"is-scroll-button":
|
|
1993
|
+
"is-scroll-wheel": O(B),
|
|
1994
|
+
"is-scroll-button": E.value
|
|
1995
1995
|
}, {
|
|
1996
|
-
default:
|
|
1996
|
+
default: ce(() => [
|
|
1997
1997
|
N(en, An({
|
|
1998
1998
|
key: "tabItemTrans",
|
|
1999
1999
|
tag: "ul",
|
|
2000
2000
|
class: "stack-tab__nav"
|
|
2001
|
-
},
|
|
2002
|
-
default:
|
|
2003
|
-
(z(!0), W(Ze, null, ft(O(
|
|
2001
|
+
}, w.value, { appear: "" }), {
|
|
2002
|
+
default: ce(() => [
|
|
2003
|
+
(z(!0), W(Ze, null, ft(O(l), (g, S) => (z(), me(Pr, {
|
|
2004
2004
|
key: g.id,
|
|
2005
2005
|
contextmenu: _.contextmenu,
|
|
2006
2006
|
item: g,
|
|
2007
2007
|
onContextmenu: _e(
|
|
2008
|
-
(u) => O(a)(u, g, S, O(
|
|
2008
|
+
(u) => O(a)(u, g, S, O(l).length),
|
|
2009
2009
|
["prevent"]
|
|
2010
2010
|
),
|
|
2011
|
-
onMouseup: _e((u) =>
|
|
2012
|
-
onClose:
|
|
2013
|
-
onActive:
|
|
2011
|
+
onMouseup: _e((u) => T(g), ["middle", "prevent"]),
|
|
2012
|
+
onClose: T,
|
|
2013
|
+
onActive: k
|
|
2014
2014
|
}, null, 8, ["contextmenu", "item", "onContextmenu", "onMouseup"]))), 128))
|
|
2015
2015
|
]),
|
|
2016
2016
|
_: 1
|
|
@@ -2022,13 +2022,13 @@ const os = ["disabled", "title"], is = {
|
|
|
2022
2022
|
N(ct, {
|
|
2023
2023
|
"icon-class": O(r) ? "stack-tab__icon-restore" : "stack-tab__icon-fullscreen",
|
|
2024
2024
|
title: O(n)("VueStackTab.maximum"),
|
|
2025
|
-
onClick:
|
|
2025
|
+
onClick: x[0] || (x[0] = (g) => r.value = !O(r))
|
|
2026
2026
|
}, null, 8, ["icon-class", "title"]),
|
|
2027
2027
|
N(tn, {
|
|
2028
2028
|
name: "stack-tab-zoom",
|
|
2029
2029
|
appear: ""
|
|
2030
2030
|
}, {
|
|
2031
|
-
default:
|
|
2031
|
+
default: ce(() => [
|
|
2032
2032
|
O(i) ? (z(), me(Lr, {
|
|
2033
2033
|
key: "tabMenuTrans",
|
|
2034
2034
|
left: O(f).left,
|
|
@@ -2103,51 +2103,51 @@ var tt = function() {
|
|
|
2103
2103
|
return yn.Date.now();
|
|
2104
2104
|
}, Ms = "Expected a function", Ls = Math.max, zs = Math.min;
|
|
2105
2105
|
function $s(e, t, n) {
|
|
2106
|
-
var r, s, o, i, f, a, c = 0,
|
|
2106
|
+
var r, s, o, i, f, a, c = 0, p = !1, d = !1, l = !0;
|
|
2107
2107
|
if (typeof e != "function")
|
|
2108
2108
|
throw new TypeError(Ms);
|
|
2109
|
-
t = Gt(t) || 0, qe(n) && (
|
|
2110
|
-
function
|
|
2109
|
+
t = Gt(t) || 0, qe(n) && (p = !!n.leading, d = "maxWait" in n, o = d ? Ls(Gt(n.maxWait) || 0, t) : o, l = "trailing" in n ? !!n.trailing : l);
|
|
2110
|
+
function w(u) {
|
|
2111
2111
|
var y = r, v = s;
|
|
2112
2112
|
return r = s = void 0, c = u, i = e.apply(v, y), i;
|
|
2113
2113
|
}
|
|
2114
|
-
function T(u) {
|
|
2115
|
-
return c = u, f = setTimeout(x, t), b ? k(u) : i;
|
|
2116
|
-
}
|
|
2117
2114
|
function E(u) {
|
|
2115
|
+
return c = u, f = setTimeout(k, t), p ? w(u) : i;
|
|
2116
|
+
}
|
|
2117
|
+
function B(u) {
|
|
2118
2118
|
var y = u - a, v = u - c, $ = t - y;
|
|
2119
|
-
return
|
|
2119
|
+
return d ? zs($, o - v) : $;
|
|
2120
2120
|
}
|
|
2121
|
-
function
|
|
2121
|
+
function T(u) {
|
|
2122
2122
|
var y = u - a, v = u - c;
|
|
2123
|
-
return a === void 0 || y >= t || y < 0 ||
|
|
2123
|
+
return a === void 0 || y >= t || y < 0 || d && v >= o;
|
|
2124
2124
|
}
|
|
2125
|
-
function
|
|
2125
|
+
function k() {
|
|
2126
2126
|
var u = tt();
|
|
2127
|
-
if (
|
|
2127
|
+
if (T(u))
|
|
2128
2128
|
return _(u);
|
|
2129
|
-
f = setTimeout(
|
|
2129
|
+
f = setTimeout(k, B(u));
|
|
2130
2130
|
}
|
|
2131
2131
|
function _(u) {
|
|
2132
|
-
return f = void 0,
|
|
2132
|
+
return f = void 0, l && r ? w(u) : (r = s = void 0, i);
|
|
2133
2133
|
}
|
|
2134
|
-
function
|
|
2134
|
+
function x() {
|
|
2135
2135
|
f !== void 0 && clearTimeout(f), c = 0, r = a = s = f = void 0;
|
|
2136
2136
|
}
|
|
2137
2137
|
function g() {
|
|
2138
2138
|
return f === void 0 ? i : _(tt());
|
|
2139
2139
|
}
|
|
2140
2140
|
function S() {
|
|
2141
|
-
var u = tt(), y =
|
|
2141
|
+
var u = tt(), y = T(u);
|
|
2142
2142
|
if (r = arguments, s = this, a = u, y) {
|
|
2143
2143
|
if (f === void 0)
|
|
2144
|
-
return
|
|
2145
|
-
if (
|
|
2146
|
-
return clearTimeout(f), f = setTimeout(
|
|
2144
|
+
return E(a);
|
|
2145
|
+
if (d)
|
|
2146
|
+
return clearTimeout(f), f = setTimeout(k, t), w(a);
|
|
2147
2147
|
}
|
|
2148
|
-
return f === void 0 && (f = setTimeout(
|
|
2148
|
+
return f === void 0 && (f = setTimeout(k, t)), i;
|
|
2149
2149
|
}
|
|
2150
|
-
return S.cancel =
|
|
2150
|
+
return S.cancel = x, S.flush = g, S;
|
|
2151
2151
|
}
|
|
2152
2152
|
var Rs = "Expected a function";
|
|
2153
2153
|
function Ns(e, t, n) {
|
|
@@ -2162,42 +2162,49 @@ function Ns(e, t, n) {
|
|
|
2162
2162
|
}
|
|
2163
2163
|
let Ht;
|
|
2164
2164
|
const Ps = () => {
|
|
2165
|
-
const e = dt(), { active: t, hasTab: n, pageShown: r, reset: s, canAddTab: o, renewTab: i } = Le(),
|
|
2165
|
+
const e = dt(), { active: t, hasTab: n, pageShown: r, reset: s, canAddTab: o, renewTab: i, getTab: f } = Le(), a = Me(), c = Ns((l, w = !1) => new Promise((E, B) => {
|
|
2166
2166
|
if (!r.value) {
|
|
2167
|
-
|
|
2167
|
+
B();
|
|
2168
2168
|
return;
|
|
2169
2169
|
}
|
|
2170
|
-
const
|
|
2171
|
-
if (
|
|
2172
|
-
|
|
2170
|
+
const T = te(l, { refreshable: !0, closable: !0, iframe: !1 });
|
|
2171
|
+
if (T.id && w && n(T.id)) {
|
|
2172
|
+
i(l);
|
|
2173
|
+
const k = f(l.id);
|
|
2174
|
+
k != null && k.active && (r.value = !1, ae(() => {
|
|
2175
|
+
r.value = !0;
|
|
2176
|
+
}));
|
|
2177
|
+
}
|
|
2178
|
+
if (n(T.id) && !w) {
|
|
2179
|
+
a.emit(q.TAB_ACTIVE, { id: T.id }), E(T.id);
|
|
2173
2180
|
return;
|
|
2174
2181
|
}
|
|
2175
|
-
if (
|
|
2176
|
-
|
|
2182
|
+
if (T.id || (T.id = nt()), !o()) {
|
|
2183
|
+
B("Max Size");
|
|
2177
2184
|
return;
|
|
2178
2185
|
}
|
|
2179
|
-
|
|
2180
|
-
}), 500),
|
|
2181
|
-
const
|
|
2182
|
-
let
|
|
2186
|
+
p(l, T), E(T.id);
|
|
2187
|
+
}), 500), p = (l, w) => {
|
|
2188
|
+
const E = ot(w);
|
|
2189
|
+
let B = te(
|
|
2183
2190
|
{
|
|
2184
|
-
__tab:
|
|
2191
|
+
__tab: E
|
|
2185
2192
|
},
|
|
2186
2193
|
l.query
|
|
2187
|
-
),
|
|
2194
|
+
), T;
|
|
2188
2195
|
if (l.iframe) {
|
|
2189
|
-
const
|
|
2190
|
-
|
|
2196
|
+
const k = encodeURIComponent(l.path);
|
|
2197
|
+
T = Ht, B.__src = k;
|
|
2191
2198
|
} else {
|
|
2192
|
-
const
|
|
2193
|
-
|
|
2199
|
+
const k = vt(l.path);
|
|
2200
|
+
T = k.path, B = te(k.query, B);
|
|
2194
2201
|
}
|
|
2195
2202
|
e.push({
|
|
2196
|
-
path:
|
|
2197
|
-
query:
|
|
2203
|
+
path: T,
|
|
2204
|
+
query: B
|
|
2198
2205
|
});
|
|
2199
2206
|
};
|
|
2200
|
-
return { openNewTab:
|
|
2207
|
+
return { openNewTab: c, setIFramePath: (l) => {
|
|
2201
2208
|
Ht = l;
|
|
2202
2209
|
}, active: t, reset: s };
|
|
2203
2210
|
}, Ds = { class: "stack-tab__container" }, js = ["src"], Ws = /* @__PURE__ */ Q({
|
|
@@ -2219,58 +2226,58 @@ const Ps = () => {
|
|
|
2219
2226
|
},
|
|
2220
2227
|
emits: ["onActive", "onPageLoaded"],
|
|
2221
2228
|
setup(e, { emit: t }) {
|
|
2222
|
-
const { tabs: n, pageShown: r, caches: s, destroy: o, addPage: i, initial: f, setMaxSize: a, setGlobalScroll: c } = Le(),
|
|
2223
|
-
In("maximum",
|
|
2224
|
-
const { setIFramePath:
|
|
2225
|
-
|
|
2226
|
-
f(
|
|
2229
|
+
const { tabs: n, pageShown: r, caches: s, destroy: o, addPage: i, initial: f, setMaxSize: a, setGlobalScroll: c } = Le(), p = t, d = e, { changeLocale: l } = Ce(), w = R(!1);
|
|
2230
|
+
In("maximum", w);
|
|
2231
|
+
const { setIFramePath: E } = Ps();
|
|
2232
|
+
E(d.iframePath), c(d.globalScroll), l(d.i18n), Bn(() => {
|
|
2233
|
+
f(d.defaultTabs);
|
|
2227
2234
|
});
|
|
2228
|
-
const
|
|
2229
|
-
|
|
2235
|
+
const B = (_, x) => i(_, x), T = (_) => {
|
|
2236
|
+
p("onActive", _);
|
|
2230
2237
|
};
|
|
2231
|
-
a(
|
|
2238
|
+
a(d.max), Cn(() => {
|
|
2232
2239
|
o();
|
|
2233
2240
|
});
|
|
2234
|
-
const
|
|
2235
|
-
|
|
2241
|
+
const k = () => {
|
|
2242
|
+
p("onPageLoaded");
|
|
2236
2243
|
};
|
|
2237
|
-
return (_,
|
|
2244
|
+
return (_, x) => {
|
|
2238
2245
|
const g = Yt("router-view");
|
|
2239
2246
|
return z(), W("div", {
|
|
2240
|
-
class:
|
|
2247
|
+
class: le(["stack-tab", { "stack-tab__maximum": w.value }]),
|
|
2241
2248
|
style: ut({
|
|
2242
2249
|
width: _.width,
|
|
2243
2250
|
height: _.height,
|
|
2244
|
-
"z-index":
|
|
2251
|
+
"z-index": w.value ? O(an)("body *:not(.stack-tab,.stack-tab *)") : void 0
|
|
2245
2252
|
})
|
|
2246
2253
|
}, [
|
|
2247
2254
|
N(ls, {
|
|
2248
2255
|
space: _.space,
|
|
2249
|
-
onActive:
|
|
2256
|
+
onActive: T,
|
|
2250
2257
|
"tab-transition": _.tabTransition,
|
|
2251
2258
|
max: _.max
|
|
2252
2259
|
}, {
|
|
2253
|
-
leftButton:
|
|
2260
|
+
leftButton: ce(() => [
|
|
2254
2261
|
ke(_.$slots, "leftButton")
|
|
2255
2262
|
]),
|
|
2256
|
-
rightButton:
|
|
2263
|
+
rightButton: ce(() => [
|
|
2257
2264
|
ke(_.$slots, "rightButton")
|
|
2258
2265
|
]),
|
|
2259
2266
|
_: 3
|
|
2260
2267
|
}, 8, ["space", "tab-transition", "max"]),
|
|
2261
2268
|
K("div", Ds, [
|
|
2262
2269
|
N(g, null, {
|
|
2263
|
-
default:
|
|
2270
|
+
default: ce(({ Component: S, route: u }) => [
|
|
2264
2271
|
N(tn, {
|
|
2265
2272
|
name: _.pageTransition,
|
|
2266
2273
|
appear: "",
|
|
2267
2274
|
mode: "out-in"
|
|
2268
2275
|
}, {
|
|
2269
|
-
default:
|
|
2276
|
+
default: ce(() => [
|
|
2270
2277
|
(z(), me(Mn, { include: O(s) }, [
|
|
2271
|
-
O(r) ? (z(), me(Ln(
|
|
2278
|
+
O(r) ? (z(), me(Ln(B(u, S)), {
|
|
2272
2279
|
key: u.fullPath,
|
|
2273
|
-
onOnLoaded:
|
|
2280
|
+
onOnLoaded: k
|
|
2274
2281
|
}, null, 32)) : ne("", !0)
|
|
2275
2282
|
], 1032, ["include"]))
|
|
2276
2283
|
]),
|
|
@@ -2283,7 +2290,7 @@ const Ps = () => {
|
|
|
2283
2290
|
name: _.pageTransition,
|
|
2284
2291
|
appear: ""
|
|
2285
2292
|
}, {
|
|
2286
|
-
default:
|
|
2293
|
+
default: ce(() => [
|
|
2287
2294
|
(z(!0), W(Ze, null, ft(O(n).filter((S) => S.iframe), (S) => Kt((z(), W("iframe", {
|
|
2288
2295
|
key: S.id,
|
|
2289
2296
|
class: "stack-tab__iframe",
|
|
@@ -2338,35 +2345,35 @@ const Vs = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" :
|
|
|
2338
2345
|
);
|
|
2339
2346
|
}, Js = () => {
|
|
2340
2347
|
const { attrs: e, props: t } = nn(), { pageShown: n, getTab: r, markDeletableCache: s, removeComponent: o, getComponent: i, addPageScroller: f } = Le(), a = zn(), c = dt();
|
|
2341
|
-
let
|
|
2342
|
-
|
|
2343
|
-
const
|
|
2344
|
-
return
|
|
2345
|
-
forward: (
|
|
2346
|
-
const
|
|
2348
|
+
let p = "", d = "";
|
|
2349
|
+
p = e.tId || t.tId;
|
|
2350
|
+
const l = e.pId || t.pId;
|
|
2351
|
+
return d = a.query.__tab, {
|
|
2352
|
+
forward: (T) => {
|
|
2353
|
+
const k = te(
|
|
2347
2354
|
{
|
|
2348
|
-
__tab:
|
|
2355
|
+
__tab: d
|
|
2349
2356
|
},
|
|
2350
|
-
|
|
2357
|
+
T.query
|
|
2351
2358
|
);
|
|
2352
2359
|
c.push({
|
|
2353
|
-
path:
|
|
2354
|
-
query:
|
|
2360
|
+
path: T.path,
|
|
2361
|
+
query: k
|
|
2355
2362
|
});
|
|
2356
2363
|
},
|
|
2357
|
-
backward: (
|
|
2358
|
-
const _ = r(
|
|
2364
|
+
backward: (T, k) => {
|
|
2365
|
+
const _ = r(p);
|
|
2359
2366
|
if (!_)
|
|
2360
2367
|
return;
|
|
2361
|
-
const
|
|
2368
|
+
const x = _.pages;
|
|
2362
2369
|
let g = 0;
|
|
2363
|
-
if (typeof
|
|
2364
|
-
g = Math.abs(
|
|
2370
|
+
if (typeof T == "number")
|
|
2371
|
+
g = Math.abs(T);
|
|
2365
2372
|
else {
|
|
2366
2373
|
let y = 1, v = !1;
|
|
2367
|
-
const $ =
|
|
2368
|
-
|
|
2369
|
-
for (let G =
|
|
2374
|
+
const $ = x.list(), P = vt(T);
|
|
2375
|
+
k = te(P.query, k);
|
|
2376
|
+
for (let G = x.size() - 2; G >= 0; G--) {
|
|
2370
2377
|
if ($[G].path === P.path) {
|
|
2371
2378
|
v = !0;
|
|
2372
2379
|
break;
|
|
@@ -2375,24 +2382,24 @@ const Vs = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" :
|
|
|
2375
2382
|
}
|
|
2376
2383
|
v && (g = y);
|
|
2377
2384
|
}
|
|
2378
|
-
if (g === 0 ||
|
|
2385
|
+
if (g === 0 || x.size() <= g)
|
|
2379
2386
|
return;
|
|
2380
2387
|
for (let y = 0; y < g; y++) {
|
|
2381
|
-
const v =
|
|
2388
|
+
const v = x.pop();
|
|
2382
2389
|
o(v.id), s(v.id);
|
|
2383
2390
|
}
|
|
2384
|
-
const S =
|
|
2391
|
+
const S = x == null ? void 0 : x.peek(), u = i(S.id);
|
|
2385
2392
|
if (u != null) {
|
|
2386
2393
|
const y = u.components.DynamicComponent;
|
|
2387
|
-
y.props = te(
|
|
2394
|
+
y.props = te(k, y.props);
|
|
2388
2395
|
}
|
|
2389
2396
|
c.push({
|
|
2390
2397
|
path: S.path,
|
|
2391
2398
|
query: S.query
|
|
2392
2399
|
});
|
|
2393
2400
|
},
|
|
2394
|
-
addScroller: (...
|
|
2395
|
-
f(
|
|
2401
|
+
addScroller: (...T) => {
|
|
2402
|
+
f(l, ...T);
|
|
2396
2403
|
}
|
|
2397
2404
|
};
|
|
2398
2405
|
}, ro = /* @__PURE__ */ Q({
|
|
@@ -2414,7 +2421,7 @@ const Vs = (e) => e.replace(/=/g, "").replace(/[+\/]/g, (t) => t == "+" ? "-" :
|
|
|
2414
2421
|
return { openTabLoading: n, closeTabLoading: r };
|
|
2415
2422
|
}, oo = {
|
|
2416
2423
|
install(e, t) {
|
|
2417
|
-
Ys("0.1.
|
|
2424
|
+
Ys("0.1.36"), e.component("VueStackTabs", Ws).use(xr).use(Xn().getI18n(t));
|
|
2418
2425
|
}
|
|
2419
2426
|
};
|
|
2420
2427
|
export {
|