@oiij/chrome-tabs 0.0.10 → 0.0.12
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/LICENSE +5 -17
- package/dist/index.cjs +7 -7
- package/dist/index.js +418 -439
- package/dist/index.umd.cjs +7 -7
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import { inject as Le, onBeforeMount as ze, onMounted as
|
|
1
|
+
import { inject as Le, onBeforeMount as ze, onMounted as ye, nextTick as $e, watch as P, getCurrentScope as Te, onScopeDispose as je, getCurrentInstance as ke, toValue as L, computed as M, shallowRef as Q, unref as y, ref as Pe, createElementBlock as A, openBlock as I, createElementVNode as k, createStaticVNode as Fe, defineComponent as we, h as ie, normalizeClass as C, createCommentVNode as X, normalizeStyle as _, createBlock as ee, resolveDynamicComponent as re, withModifiers as Oe, createVNode as D, renderSlot as ue, TransitionGroup as Ve, withCtx as He, Fragment as We, renderList as De, mergeProps as Ke } from "vue";
|
|
2
2
|
function qe(e) {
|
|
3
|
-
let t = ".", n = "__", o = "--",
|
|
3
|
+
let t = ".", n = "__", o = "--", i;
|
|
4
4
|
if (e) {
|
|
5
5
|
let a = e.blockPrefix;
|
|
6
6
|
a && (t = a), a = e.elementPrefix, a && (n = a), a = e.modifierPrefix, a && (o = a);
|
|
7
7
|
}
|
|
8
|
-
const
|
|
8
|
+
const r = {
|
|
9
9
|
install(a) {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
10
|
+
i = a.c;
|
|
11
|
+
const h = a.context;
|
|
12
|
+
h.bem = {}, h.bem.b = null, h.bem.els = null;
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
|
-
function
|
|
16
|
-
let
|
|
15
|
+
function u(a) {
|
|
16
|
+
let h, m;
|
|
17
17
|
return {
|
|
18
|
-
before(
|
|
19
|
-
|
|
18
|
+
before(v) {
|
|
19
|
+
h = v.bem.b, m = v.bem.els, v.bem.els = null;
|
|
20
20
|
},
|
|
21
|
-
after(
|
|
22
|
-
|
|
21
|
+
after(v) {
|
|
22
|
+
v.bem.b = h, v.bem.els = m;
|
|
23
23
|
},
|
|
24
|
-
$({ context:
|
|
25
|
-
return a = typeof a == "string" ? a : a({ context:
|
|
24
|
+
$({ context: v, props: N }) {
|
|
25
|
+
return a = typeof a == "string" ? a : a({ context: v, props: N }), v.bem.b = a, `${N?.bPrefix || t}${v.bem.b}`;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
let
|
|
29
|
+
function l(a) {
|
|
30
|
+
let h;
|
|
31
31
|
return {
|
|
32
|
-
before(
|
|
33
|
-
|
|
32
|
+
before(m) {
|
|
33
|
+
h = m.bem.els;
|
|
34
34
|
},
|
|
35
|
-
after(
|
|
36
|
-
|
|
35
|
+
after(m) {
|
|
36
|
+
m.bem.els = h;
|
|
37
37
|
},
|
|
38
|
-
$({ context:
|
|
39
|
-
return a = typeof a == "string" ? a : a({ context:
|
|
38
|
+
$({ context: m, props: v }) {
|
|
39
|
+
return a = typeof a == "string" ? a : a({ context: m, props: v }), m.bem.els = a.split(",").map((N) => N.trim()), m.bem.els.map((N) => `${v?.bPrefix || t}${m.bem.b}${n}${N}`).join(", ");
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function d(a) {
|
|
44
44
|
return {
|
|
45
|
-
$({ context:
|
|
46
|
-
a = typeof a == "string" ? a : a({ context:
|
|
47
|
-
const
|
|
45
|
+
$({ context: h, props: m }) {
|
|
46
|
+
a = typeof a == "string" ? a : a({ context: h, props: m });
|
|
47
|
+
const v = a.split(",").map((F) => F.trim());
|
|
48
48
|
function N(F) {
|
|
49
|
-
return
|
|
49
|
+
return v.map((Be) => `&${m?.bPrefix || t}${h.bem.b}${F !== void 0 ? `${n}${F}` : ""}${o}${Be}`).join(", ");
|
|
50
50
|
}
|
|
51
|
-
const G =
|
|
51
|
+
const G = h.bem.els;
|
|
52
52
|
if (G !== null) {
|
|
53
53
|
if (process.env.NODE_ENV !== "production" && G.length >= 2)
|
|
54
54
|
throw Error(`[css-render/plugin-bem]: m(${a}) is invalid, using modifier inside multiple elements is not allowed`);
|
|
@@ -58,23 +58,23 @@ function qe(e) {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function c(a) {
|
|
62
62
|
return {
|
|
63
|
-
$({ context:
|
|
64
|
-
a = typeof a == "string" ? a : a({ context:
|
|
65
|
-
const
|
|
66
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
63
|
+
$({ context: h, props: m }) {
|
|
64
|
+
a = typeof a == "string" ? a : a({ context: h, props: m });
|
|
65
|
+
const v = h.bem.els;
|
|
66
|
+
if (process.env.NODE_ENV !== "production" && v !== null && v.length >= 2)
|
|
67
67
|
throw Error(`[css-render/plugin-bem]: notM(${a}) is invalid, using modifier inside multiple elements is not allowed`);
|
|
68
|
-
return `&:not(${
|
|
68
|
+
return `&:not(${m?.bPrefix || t}${h.bem.b}${v !== null && v.length > 0 ? `${n}${v[0]}` : ""}${o}${a})`;
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
|
-
return Object.assign(
|
|
73
|
-
cB: ((...a) =>
|
|
74
|
-
cE: ((...a) =>
|
|
75
|
-
cM: ((...a) =>
|
|
76
|
-
cNotM: ((...a) =>
|
|
77
|
-
}),
|
|
72
|
+
return Object.assign(r, {
|
|
73
|
+
cB: ((...a) => i(u(a[0]), a[1], a[2])),
|
|
74
|
+
cE: ((...a) => i(l(a[0]), a[1], a[2])),
|
|
75
|
+
cM: ((...a) => i(d(a[0]), a[1], a[2])),
|
|
76
|
+
cNotM: ((...a) => i(c(a[0]), a[1], a[2]))
|
|
77
|
+
}), r;
|
|
78
78
|
}
|
|
79
79
|
function Ge(e) {
|
|
80
80
|
let t = 0;
|
|
@@ -86,42 +86,42 @@ const Ce = /\s*,(?![^(]*\))\s*/g, Ze = /\s+/g;
|
|
|
86
86
|
function Ue(e, t) {
|
|
87
87
|
const n = [];
|
|
88
88
|
return t.split(Ce).forEach((o) => {
|
|
89
|
-
let
|
|
90
|
-
if (
|
|
91
|
-
if (
|
|
92
|
-
e.forEach((
|
|
93
|
-
n.push(o.replace("&",
|
|
89
|
+
let i = Ge(o);
|
|
90
|
+
if (i) {
|
|
91
|
+
if (i === 1) {
|
|
92
|
+
e.forEach((u) => {
|
|
93
|
+
n.push(o.replace("&", u));
|
|
94
94
|
});
|
|
95
95
|
return;
|
|
96
96
|
}
|
|
97
97
|
} else {
|
|
98
|
-
e.forEach((
|
|
98
|
+
e.forEach((u) => {
|
|
99
99
|
n.push(
|
|
100
100
|
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
|
|
101
|
-
(
|
|
101
|
+
(u && u + " ") + o
|
|
102
102
|
);
|
|
103
103
|
});
|
|
104
104
|
return;
|
|
105
105
|
}
|
|
106
|
-
let
|
|
106
|
+
let r = [
|
|
107
107
|
o
|
|
108
108
|
];
|
|
109
|
-
for (;
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
e.forEach((
|
|
113
|
-
|
|
109
|
+
for (; i--; ) {
|
|
110
|
+
const u = [];
|
|
111
|
+
r.forEach((l) => {
|
|
112
|
+
e.forEach((d) => {
|
|
113
|
+
u.push(l.replace("&", d));
|
|
114
114
|
});
|
|
115
|
-
}),
|
|
115
|
+
}), r = u;
|
|
116
116
|
}
|
|
117
|
-
|
|
117
|
+
r.forEach((u) => n.push(u));
|
|
118
118
|
}), n;
|
|
119
119
|
}
|
|
120
120
|
function Ye(e, t) {
|
|
121
121
|
const n = [];
|
|
122
122
|
return t.split(Ce).forEach((o) => {
|
|
123
|
-
e.forEach((
|
|
124
|
-
n.push((
|
|
123
|
+
e.forEach((i) => {
|
|
124
|
+
n.push((i && i + " ") + o);
|
|
125
125
|
});
|
|
126
126
|
}), n;
|
|
127
127
|
}
|
|
@@ -132,7 +132,7 @@ function Je(e) {
|
|
|
132
132
|
n && (n.includes("&") ? t = Ue(t, n) : t = Ye(t, n));
|
|
133
133
|
}), t.join(", ").replace(Ze, " ");
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function le(e) {
|
|
136
136
|
if (!e)
|
|
137
137
|
return;
|
|
138
138
|
const t = e.parentElement;
|
|
@@ -164,33 +164,33 @@ function et(e, t, n) {
|
|
|
164
164
|
props: n
|
|
165
165
|
}) : e;
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function se(e, t, n, o) {
|
|
168
168
|
if (!t)
|
|
169
169
|
return "";
|
|
170
|
-
const
|
|
171
|
-
if (!
|
|
170
|
+
const i = et(t, n, o);
|
|
171
|
+
if (!i)
|
|
172
172
|
return "";
|
|
173
|
-
if (typeof
|
|
173
|
+
if (typeof i == "string")
|
|
174
174
|
return `${e} {
|
|
175
|
-
${
|
|
175
|
+
${i}
|
|
176
176
|
}`;
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
177
|
+
const r = Object.keys(i);
|
|
178
|
+
if (r.length === 0)
|
|
179
179
|
return n.config.keepEmptyBlock ? e + ` {
|
|
180
180
|
}` : "";
|
|
181
|
-
const
|
|
181
|
+
const u = e ? [
|
|
182
182
|
e + " {"
|
|
183
183
|
] : [];
|
|
184
|
-
return
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
` +
|
|
184
|
+
return r.forEach((l) => {
|
|
185
|
+
const d = i[l];
|
|
186
|
+
if (l === "raw") {
|
|
187
|
+
u.push(`
|
|
188
|
+
` + d + `
|
|
189
189
|
`);
|
|
190
190
|
return;
|
|
191
191
|
}
|
|
192
|
-
|
|
193
|
-
}), e &&
|
|
192
|
+
l = Ie(l), d != null && u.push(` ${l}${_e(d)}`);
|
|
193
|
+
}), e && u.push("}"), u.join(`
|
|
194
194
|
`);
|
|
195
195
|
}
|
|
196
196
|
function te(e, t, n) {
|
|
@@ -198,42 +198,42 @@ function te(e, t, n) {
|
|
|
198
198
|
if (Array.isArray(o))
|
|
199
199
|
te(o, t, n);
|
|
200
200
|
else if (typeof o == "function") {
|
|
201
|
-
const
|
|
202
|
-
Array.isArray(
|
|
201
|
+
const i = o(t);
|
|
202
|
+
Array.isArray(i) ? te(i, t, n) : i && n(i);
|
|
203
203
|
} else o && n(o);
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
-
function Ee(e, t, n, o,
|
|
207
|
-
const
|
|
208
|
-
let
|
|
209
|
-
if (!
|
|
210
|
-
O(
|
|
211
|
-
else if (typeof
|
|
212
|
-
const
|
|
206
|
+
function Ee(e, t, n, o, i) {
|
|
207
|
+
const r = e.$;
|
|
208
|
+
let u = "";
|
|
209
|
+
if (!r || typeof r == "string")
|
|
210
|
+
O(r) ? u = r : t.push(r);
|
|
211
|
+
else if (typeof r == "function") {
|
|
212
|
+
const c = r({
|
|
213
213
|
context: o.context,
|
|
214
|
-
props:
|
|
214
|
+
props: i
|
|
215
215
|
});
|
|
216
|
-
O(
|
|
217
|
-
} else if (
|
|
218
|
-
O(
|
|
219
|
-
else if (
|
|
220
|
-
const
|
|
216
|
+
O(c) ? u = c : t.push(c);
|
|
217
|
+
} else if (r.before && r.before(o.context), !r.$ || typeof r.$ == "string")
|
|
218
|
+
O(r.$) ? u = r.$ : t.push(r.$);
|
|
219
|
+
else if (r.$) {
|
|
220
|
+
const c = r.$({
|
|
221
221
|
context: o.context,
|
|
222
|
-
props:
|
|
222
|
+
props: i
|
|
223
223
|
});
|
|
224
|
-
O(
|
|
224
|
+
O(c) ? u = c : t.push(c);
|
|
225
225
|
}
|
|
226
|
-
const
|
|
227
|
-
|
|
226
|
+
const l = Je(t), d = se(l, e.props, o, i);
|
|
227
|
+
u ? n.push(`${u} {`) : d.length && n.push(d), e.children && te(e.children, {
|
|
228
228
|
context: o.context,
|
|
229
|
-
props:
|
|
230
|
-
}, (
|
|
231
|
-
if (typeof
|
|
232
|
-
const
|
|
233
|
-
n.push(
|
|
229
|
+
props: i
|
|
230
|
+
}, (c) => {
|
|
231
|
+
if (typeof c == "string") {
|
|
232
|
+
const f = se(l, { raw: c }, o, i);
|
|
233
|
+
n.push(f);
|
|
234
234
|
} else
|
|
235
|
-
Ee(
|
|
236
|
-
}), t.pop(),
|
|
235
|
+
Ee(c, t, n, o, i);
|
|
236
|
+
}), t.pop(), u && n.push("}"), r && r.after && r.after(o.context);
|
|
237
237
|
}
|
|
238
238
|
function tt(e, t, n) {
|
|
239
239
|
const o = [];
|
|
@@ -242,13 +242,13 @@ function tt(e, t, n) {
|
|
|
242
242
|
`);
|
|
243
243
|
}
|
|
244
244
|
function nt(e) {
|
|
245
|
-
for (var t = 0, n, o = 0,
|
|
245
|
+
for (var t = 0, n, o = 0, i = e.length; i >= 4; ++o, i -= 4)
|
|
246
246
|
n = e.charCodeAt(o) & 255 | (e.charCodeAt(++o) & 255) << 8 | (e.charCodeAt(++o) & 255) << 16 | (e.charCodeAt(++o) & 255) << 24, n = /* Math.imul(k, m): */
|
|
247
247
|
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
|
|
248
248
|
n >>> 24, t = /* Math.imul(k, m): */
|
|
249
249
|
(n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
250
250
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
251
|
-
switch (
|
|
251
|
+
switch (i) {
|
|
252
252
|
case 3:
|
|
253
253
|
t ^= (e.charCodeAt(o + 2) & 255) << 16;
|
|
254
254
|
case 2:
|
|
@@ -262,45 +262,45 @@ function nt(e) {
|
|
|
262
262
|
}
|
|
263
263
|
typeof window < "u" && (window.__cssrContext = {});
|
|
264
264
|
function ot(e, t, n, o) {
|
|
265
|
-
const { els:
|
|
265
|
+
const { els: i } = t;
|
|
266
266
|
if (n === void 0)
|
|
267
|
-
|
|
267
|
+
i.forEach(le), t.els = [];
|
|
268
268
|
else {
|
|
269
|
-
const
|
|
270
|
-
|
|
269
|
+
const r = ne(n, o);
|
|
270
|
+
r && i.includes(r) && (le(r), t.els = i.filter((u) => u !== r));
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
function ae(e, t) {
|
|
274
274
|
e.push(t);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
let
|
|
278
|
-
if (n === void 0 && (
|
|
279
|
-
|
|
276
|
+
function it(e, t, n, o, i, r, u, l, d) {
|
|
277
|
+
let c;
|
|
278
|
+
if (n === void 0 && (c = t.render(o), n = nt(c)), d) {
|
|
279
|
+
d.adapter(n, c ?? t.render(o));
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
|
|
283
|
-
const
|
|
284
|
-
if (
|
|
285
|
-
return
|
|
286
|
-
const
|
|
287
|
-
if (
|
|
288
|
-
return
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
292
|
-
return
|
|
282
|
+
l === void 0 && (l = document.head);
|
|
283
|
+
const f = ne(n, l);
|
|
284
|
+
if (f !== null && !r)
|
|
285
|
+
return f;
|
|
286
|
+
const s = f ?? Qe(n);
|
|
287
|
+
if (c === void 0 && (c = t.render(o)), s.textContent = c, f !== null)
|
|
288
|
+
return f;
|
|
289
|
+
if (u) {
|
|
290
|
+
const b = l.querySelector(`meta[name="${u}"]`);
|
|
291
|
+
if (b)
|
|
292
|
+
return l.insertBefore(s, b), ae(t.els, s), s;
|
|
293
293
|
}
|
|
294
|
-
return
|
|
294
|
+
return i ? l.insertBefore(s, l.querySelector("style, link")) : l.appendChild(s), ae(t.els, s), s;
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function rt(e) {
|
|
297
297
|
return tt(this, this.instance, e);
|
|
298
298
|
}
|
|
299
|
-
function st(e = {}) {
|
|
300
|
-
const { id: t, ssr: n, props: o, head: r = !1, force: i = !1, anchorMetaName: s, parent: u } = e;
|
|
301
|
-
return rt(this.instance, this, t, o, r, i, s, u, n);
|
|
302
|
-
}
|
|
303
299
|
function ut(e = {}) {
|
|
300
|
+
const { id: t, ssr: n, props: o, head: i = !1, force: r = !1, anchorMetaName: u, parent: l } = e;
|
|
301
|
+
return it(this.instance, this, t, o, i, r, u, l, n);
|
|
302
|
+
}
|
|
303
|
+
function lt(e = {}) {
|
|
304
304
|
const { id: t, parent: n } = e;
|
|
305
305
|
ot(this.instance, this, t, n);
|
|
306
306
|
}
|
|
@@ -311,16 +311,16 @@ const V = function(e, t, n, o) {
|
|
|
311
311
|
props: n,
|
|
312
312
|
children: o,
|
|
313
313
|
els: [],
|
|
314
|
-
render:
|
|
315
|
-
mount:
|
|
316
|
-
unmount:
|
|
314
|
+
render: rt,
|
|
315
|
+
mount: ut,
|
|
316
|
+
unmount: lt
|
|
317
317
|
};
|
|
318
|
-
},
|
|
318
|
+
}, st = function(e, t, n, o) {
|
|
319
319
|
return Array.isArray(t) ? V(e, { $: null }, null, t) : Array.isArray(n) ? V(e, t, null, n) : Array.isArray(o) ? V(e, t, n, o) : V(e, t, n, null);
|
|
320
320
|
};
|
|
321
321
|
function at(e = {}) {
|
|
322
322
|
const t = {
|
|
323
|
-
c: ((...n) =>
|
|
323
|
+
c: ((...n) => st(t, ...n)),
|
|
324
324
|
use: (n, ...o) => n.install(t, ...o),
|
|
325
325
|
find: ne,
|
|
326
326
|
context: {},
|
|
@@ -329,18 +329,18 @@ function at(e = {}) {
|
|
|
329
329
|
return t;
|
|
330
330
|
}
|
|
331
331
|
function ct(e) {
|
|
332
|
-
const { namespace: t = "n", blockPrefix: n = `.${t}-`, elementPrefix: o = "__", modifierPrefix:
|
|
332
|
+
const { namespace: t = "n", blockPrefix: n = `.${t}-`, elementPrefix: o = "__", modifierPrefix: i = "--" } = e ?? {}, r = at(), u = qe({
|
|
333
333
|
blockPrefix: n,
|
|
334
334
|
elementPrefix: o,
|
|
335
|
-
modifierPrefix:
|
|
335
|
+
modifierPrefix: i
|
|
336
336
|
});
|
|
337
|
-
return
|
|
337
|
+
return r.use(u), {
|
|
338
338
|
namespace: t,
|
|
339
339
|
blockPrefix: n,
|
|
340
340
|
elementPrefix: o,
|
|
341
|
-
modifierPrefix:
|
|
342
|
-
cssr:
|
|
343
|
-
plugin:
|
|
341
|
+
modifierPrefix: i,
|
|
342
|
+
cssr: r,
|
|
343
|
+
plugin: u
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
const dt = "@css-render/vue3-ssr";
|
|
@@ -350,8 +350,8 @@ ${t}
|
|
|
350
350
|
</style>`;
|
|
351
351
|
}
|
|
352
352
|
function ht(e, t, n) {
|
|
353
|
-
const { styles: o, ids:
|
|
354
|
-
|
|
353
|
+
const { styles: o, ids: i } = n;
|
|
354
|
+
i.has(e) || o !== null && (i.add(e), o.push(ft(e, t)));
|
|
355
355
|
}
|
|
356
356
|
const mt = typeof document < "u";
|
|
357
357
|
function vt() {
|
|
@@ -377,35 +377,39 @@ function bt(e, t) {
|
|
|
377
377
|
o();
|
|
378
378
|
});
|
|
379
379
|
}
|
|
380
|
-
function Se(e) {
|
|
381
|
-
return
|
|
380
|
+
function Se(e, t) {
|
|
381
|
+
return Te() ? (je(e, t), !0) : !1;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
383
|
+
const gt = typeof window < "u" && typeof document < "u";
|
|
384
384
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
385
|
-
const
|
|
385
|
+
const pt = Object.prototype.toString, xt = (e) => pt.call(e) === "[object Object]", ce = () => {
|
|
386
386
|
};
|
|
387
|
-
function
|
|
387
|
+
function yt(e, t) {
|
|
388
388
|
function n(...o) {
|
|
389
|
-
return new Promise((
|
|
390
|
-
Promise.resolve(e(() => t.apply(this, o), {
|
|
389
|
+
return new Promise((i, r) => {
|
|
390
|
+
Promise.resolve(e(() => t.apply(this, o), {
|
|
391
|
+
fn: t,
|
|
392
|
+
thisArg: this,
|
|
393
|
+
args: o
|
|
394
|
+
})).then(i).catch(r);
|
|
391
395
|
});
|
|
392
396
|
}
|
|
393
397
|
return n;
|
|
394
398
|
}
|
|
395
399
|
function $t(e, t = {}) {
|
|
396
|
-
let n, o,
|
|
397
|
-
const
|
|
398
|
-
clearTimeout(
|
|
400
|
+
let n, o, i = ce;
|
|
401
|
+
const r = (d) => {
|
|
402
|
+
clearTimeout(d), i(), i = ce;
|
|
399
403
|
};
|
|
400
|
-
let
|
|
401
|
-
return (
|
|
402
|
-
const
|
|
403
|
-
return n &&
|
|
404
|
-
|
|
405
|
-
n &&
|
|
406
|
-
},
|
|
407
|
-
o &&
|
|
408
|
-
},
|
|
404
|
+
let u;
|
|
405
|
+
return (d) => {
|
|
406
|
+
const c = L(e), f = L(t.maxWait);
|
|
407
|
+
return n && r(n), c <= 0 || f !== void 0 && f <= 0 ? (o && (r(o), o = void 0), Promise.resolve(d())) : new Promise((s, b) => {
|
|
408
|
+
i = t.rejectOnCancel ? b : s, u = d, f && !o && (o = setTimeout(() => {
|
|
409
|
+
n && r(n), o = void 0, s(u());
|
|
410
|
+
}, f)), n = setTimeout(() => {
|
|
411
|
+
o && r(o), o = void 0, s(d());
|
|
412
|
+
}, c);
|
|
409
413
|
});
|
|
410
414
|
};
|
|
411
415
|
}
|
|
@@ -417,69 +421,50 @@ function kt(e) {
|
|
|
417
421
|
}
|
|
418
422
|
// @__NO_SIDE_EFFECTS__
|
|
419
423
|
function wt(e, t = 200, n = {}) {
|
|
420
|
-
return
|
|
421
|
-
$t(t, n),
|
|
422
|
-
e
|
|
423
|
-
);
|
|
424
|
+
return yt($t(t, n), e);
|
|
424
425
|
}
|
|
425
426
|
function Ct(e, t = !0, n) {
|
|
426
|
-
kt() ?
|
|
427
|
+
kt() ? ye(e, n) : t ? e() : $e(e);
|
|
427
428
|
}
|
|
428
429
|
function It(e, t, n) {
|
|
429
|
-
return P(
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
...n,
|
|
434
|
-
immediate: !0
|
|
435
|
-
}
|
|
436
|
-
);
|
|
430
|
+
return P(e, t, {
|
|
431
|
+
...n,
|
|
432
|
+
immediate: !0
|
|
433
|
+
});
|
|
437
434
|
}
|
|
438
|
-
const oe =
|
|
435
|
+
const oe = gt ? window : void 0;
|
|
439
436
|
function B(e) {
|
|
440
437
|
var t;
|
|
441
438
|
const n = L(e);
|
|
442
|
-
return (t = n?.$el)
|
|
439
|
+
return (t = n?.$el) !== null && t !== void 0 ? t : n;
|
|
443
440
|
}
|
|
444
441
|
function Et(...e) {
|
|
445
442
|
const t = [], n = () => {
|
|
446
|
-
t.forEach((
|
|
447
|
-
}, o = (
|
|
448
|
-
const
|
|
449
|
-
return
|
|
450
|
-
}),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
}
|
|
461
|
-
(
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
const l = yt(c) ? { ...c } : c;
|
|
465
|
-
t.push(
|
|
466
|
-
...u.flatMap(
|
|
467
|
-
(h) => f.flatMap(
|
|
468
|
-
($) => d.map((a) => o(h, $, a, l))
|
|
469
|
-
)
|
|
470
|
-
)
|
|
471
|
-
);
|
|
472
|
-
},
|
|
473
|
-
{ flush: "post" }
|
|
474
|
-
), s = () => {
|
|
475
|
-
i(), n();
|
|
443
|
+
t.forEach((l) => l()), t.length = 0;
|
|
444
|
+
}, o = (l, d, c, f) => (l.addEventListener(d, c, f), () => l.removeEventListener(d, c, f)), i = M(() => {
|
|
445
|
+
const l = K(L(e[0])).filter((d) => d != null);
|
|
446
|
+
return l.every((d) => typeof d != "string") ? l : void 0;
|
|
447
|
+
}), r = It(() => {
|
|
448
|
+
var l, d;
|
|
449
|
+
return [
|
|
450
|
+
(l = (d = i.value) === null || d === void 0 ? void 0 : d.map((c) => B(c))) !== null && l !== void 0 ? l : [oe].filter((c) => c != null),
|
|
451
|
+
K(L(i.value ? e[1] : e[0])),
|
|
452
|
+
K(y(i.value ? e[2] : e[1])),
|
|
453
|
+
L(i.value ? e[3] : e[2])
|
|
454
|
+
];
|
|
455
|
+
}, ([l, d, c, f]) => {
|
|
456
|
+
if (n(), !l?.length || !d?.length || !c?.length) return;
|
|
457
|
+
const s = xt(f) ? { ...f } : f;
|
|
458
|
+
t.push(...l.flatMap((b) => d.flatMap(($) => c.map((a) => o(b, $, a, s)))));
|
|
459
|
+
}, { flush: "post" }), u = () => {
|
|
460
|
+
r(), n();
|
|
476
461
|
};
|
|
477
|
-
return Se(n),
|
|
462
|
+
return Se(n), u;
|
|
478
463
|
}
|
|
479
464
|
// @__NO_SIDE_EFFECTS__
|
|
480
465
|
function St() {
|
|
481
466
|
const e = Q(!1), t = ke();
|
|
482
|
-
return t &&
|
|
467
|
+
return t && ye(() => {
|
|
483
468
|
e.value = !0;
|
|
484
469
|
}, t), e;
|
|
485
470
|
}
|
|
@@ -489,115 +474,109 @@ function Nt(e) {
|
|
|
489
474
|
return M(() => (t.value, !!e()));
|
|
490
475
|
}
|
|
491
476
|
function Mt(e, t, n = {}) {
|
|
492
|
-
const { window: o = oe, ...
|
|
493
|
-
let
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
},
|
|
497
|
-
const
|
|
498
|
-
return Array.isArray(
|
|
499
|
-
}),
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
), c = () => {
|
|
510
|
-
u(), d();
|
|
477
|
+
const { window: o = oe, ...i } = n;
|
|
478
|
+
let r;
|
|
479
|
+
const u = /* @__PURE__ */ Nt(() => o && "ResizeObserver" in o), l = () => {
|
|
480
|
+
r && (r.disconnect(), r = void 0);
|
|
481
|
+
}, d = P(M(() => {
|
|
482
|
+
const f = L(e);
|
|
483
|
+
return Array.isArray(f) ? f.map((s) => B(s)) : [B(f)];
|
|
484
|
+
}), (f) => {
|
|
485
|
+
if (l(), u.value && o) {
|
|
486
|
+
r = new ResizeObserver(t);
|
|
487
|
+
for (const s of f) s && r.observe(s, i);
|
|
488
|
+
}
|
|
489
|
+
}, {
|
|
490
|
+
immediate: !0,
|
|
491
|
+
flush: "post"
|
|
492
|
+
}), c = () => {
|
|
493
|
+
l(), d();
|
|
511
494
|
};
|
|
512
495
|
return Se(c), {
|
|
513
|
-
isSupported:
|
|
496
|
+
isSupported: u,
|
|
514
497
|
stop: c
|
|
515
498
|
};
|
|
516
499
|
}
|
|
517
|
-
function At(e, t = {
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
(
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
);
|
|
500
|
+
function At(e, t = {
|
|
501
|
+
width: 0,
|
|
502
|
+
height: 0
|
|
503
|
+
}, n = {}) {
|
|
504
|
+
const { window: o = oe, box: i = "content-box" } = n, r = M(() => {
|
|
505
|
+
var s;
|
|
506
|
+
return (s = B(e)) === null || s === void 0 || (s = s.namespaceURI) === null || s === void 0 ? void 0 : s.includes("svg");
|
|
507
|
+
}), u = Q(t.width), l = Q(t.height), { stop: d } = Mt(e, ([s]) => {
|
|
508
|
+
const b = i === "border-box" ? s.borderBoxSize : i === "content-box" ? s.contentBoxSize : s.devicePixelContentBoxSize;
|
|
509
|
+
if (o && r.value) {
|
|
510
|
+
const $ = B(e);
|
|
511
|
+
if ($) {
|
|
512
|
+
const a = $.getBoundingClientRect();
|
|
513
|
+
u.value = a.width, l.value = a.height;
|
|
514
|
+
}
|
|
515
|
+
} else if (b) {
|
|
516
|
+
const $ = K(b);
|
|
517
|
+
u.value = $.reduce((a, { inlineSize: h }) => a + h, 0), l.value = $.reduce((a, { blockSize: h }) => a + h, 0);
|
|
518
|
+
} else
|
|
519
|
+
u.value = s.contentRect.width, l.value = s.contentRect.height;
|
|
520
|
+
}, n);
|
|
539
521
|
Ct(() => {
|
|
540
|
-
const
|
|
541
|
-
|
|
522
|
+
const s = B(e);
|
|
523
|
+
s && (u.value = "offsetWidth" in s ? s.offsetWidth : t.width, l.value = "offsetHeight" in s ? s.offsetHeight : t.height);
|
|
542
524
|
});
|
|
543
|
-
const
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
);
|
|
549
|
-
function c() {
|
|
550
|
-
f(), d();
|
|
525
|
+
const c = P(() => B(e), (s) => {
|
|
526
|
+
u.value = s ? t.width : 0, l.value = s ? t.height : 0;
|
|
527
|
+
});
|
|
528
|
+
function f() {
|
|
529
|
+
d(), c();
|
|
551
530
|
}
|
|
552
531
|
return {
|
|
553
|
-
width:
|
|
554
|
-
height:
|
|
555
|
-
stop:
|
|
532
|
+
width: u,
|
|
533
|
+
height: l,
|
|
534
|
+
stop: f
|
|
556
535
|
};
|
|
557
536
|
}
|
|
558
537
|
function Rt(e) {
|
|
559
|
-
const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {},
|
|
560
|
-
async function
|
|
538
|
+
const { activeClassName: t = ".active", enableWheel: n = !0, direction: o = "vertical" } = e ?? {}, i = Pe(), { width: r, height: u } = At(i);
|
|
539
|
+
async function l(f) {
|
|
561
540
|
await $e();
|
|
562
|
-
const
|
|
563
|
-
|
|
541
|
+
const s = i.value?.querySelector(t);
|
|
542
|
+
s && s.scrollIntoView({
|
|
564
543
|
behavior: "smooth",
|
|
565
544
|
block: "nearest",
|
|
566
545
|
inline: "nearest",
|
|
567
|
-
...
|
|
546
|
+
...f
|
|
568
547
|
});
|
|
569
548
|
}
|
|
570
|
-
function f
|
|
549
|
+
function d(f) {
|
|
571
550
|
if (!n) return;
|
|
572
|
-
|
|
573
|
-
const { deltaY:
|
|
551
|
+
f.preventDefault();
|
|
552
|
+
const { deltaY: s } = f;
|
|
574
553
|
switch (o) {
|
|
575
554
|
case "vertical":
|
|
576
|
-
|
|
577
|
-
top:
|
|
555
|
+
i.value?.scrollBy({
|
|
556
|
+
top: s > 0 ? u.value : -u.value,
|
|
578
557
|
behavior: "smooth"
|
|
579
558
|
});
|
|
580
559
|
break;
|
|
581
560
|
case "horizontal":
|
|
582
|
-
|
|
583
|
-
left:
|
|
561
|
+
i.value?.scrollBy({
|
|
562
|
+
left: s > 0 ? r.value : -r.value,
|
|
584
563
|
behavior: "smooth"
|
|
585
564
|
});
|
|
586
565
|
break;
|
|
587
566
|
}
|
|
588
567
|
}
|
|
589
|
-
Et(
|
|
590
|
-
const
|
|
591
|
-
return P([
|
|
592
|
-
|
|
568
|
+
Et(i, "wheel", d);
|
|
569
|
+
const c = /* @__PURE__ */ wt(l, 500);
|
|
570
|
+
return P([r, u], () => {
|
|
571
|
+
c();
|
|
593
572
|
}), {
|
|
594
|
-
scrollRef:
|
|
595
|
-
scrollToView:
|
|
573
|
+
scrollRef: i,
|
|
574
|
+
scrollToView: l
|
|
596
575
|
};
|
|
597
576
|
}
|
|
598
577
|
var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
599
578
|
return typeof e == "string" ? e.length > 0 : typeof e == "number";
|
|
600
|
-
},
|
|
579
|
+
}, x = function(e, t, n) {
|
|
601
580
|
return t === void 0 && (t = 0), n === void 0 && (n = Math.pow(10, t)), Math.round(n * e) / n + 0;
|
|
602
581
|
}, S = function(e, t, n) {
|
|
603
582
|
return t === void 0 && (t = 0), n === void 0 && (n = 1), e > n ? n : e > t ? e : t;
|
|
@@ -606,54 +585,54 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
|
606
585
|
}, de = function(e) {
|
|
607
586
|
return { r: S(e.r, 0, 255), g: S(e.g, 0, 255), b: S(e.b, 0, 255), a: S(e.a) };
|
|
608
587
|
}, Z = function(e) {
|
|
609
|
-
return { r:
|
|
588
|
+
return { r: x(e.r), g: x(e.g), b: x(e.b), a: x(e.a, 3) };
|
|
610
589
|
}, Lt = /^#([0-9a-f]{3,8})$/i, H = function(e) {
|
|
611
590
|
var t = e.toString(16);
|
|
612
591
|
return t.length < 2 ? "0" + t : t;
|
|
613
592
|
}, Me = function(e) {
|
|
614
|
-
var t = e.r, n = e.g, o = e.b,
|
|
615
|
-
return { h: 60 * (
|
|
593
|
+
var t = e.r, n = e.g, o = e.b, i = e.a, r = Math.max(t, n, o), u = r - Math.min(t, n, o), l = u ? r === t ? (n - o) / u : r === n ? 2 + (o - t) / u : 4 + (t - n) / u : 0;
|
|
594
|
+
return { h: 60 * (l < 0 ? l + 6 : l), s: r ? u / r * 100 : 0, v: r / 255 * 100, a: i };
|
|
616
595
|
}, Ae = function(e) {
|
|
617
|
-
var t = e.h, n = e.s, o = e.v,
|
|
596
|
+
var t = e.h, n = e.s, o = e.v, i = e.a;
|
|
618
597
|
t = t / 360 * 6, n /= 100, o /= 100;
|
|
619
|
-
var
|
|
620
|
-
return { r: 255 * [o,
|
|
598
|
+
var r = Math.floor(t), u = o * (1 - n), l = o * (1 - (t - r) * n), d = o * (1 - (1 - t + r) * n), c = r % 6;
|
|
599
|
+
return { r: 255 * [o, l, u, u, d, o][c], g: 255 * [d, o, o, l, u, u][c], b: 255 * [u, u, d, o, o, l][c], a: i };
|
|
621
600
|
}, fe = function(e) {
|
|
622
601
|
return { h: Ne(e.h), s: S(e.s, 0, 100), l: S(e.l, 0, 100), a: S(e.a) };
|
|
623
602
|
}, he = function(e) {
|
|
624
|
-
return { h:
|
|
603
|
+
return { h: x(e.h), s: x(e.s), l: x(e.l), a: x(e.a, 3) };
|
|
625
604
|
}, me = function(e) {
|
|
626
605
|
return Ae((n = (t = e).s, { h: t.h, s: (n *= ((o = t.l) < 50 ? o : 100 - o) / 100) > 0 ? 2 * n / (o + n) * 100 : 0, v: o + n, a: t.a }));
|
|
627
606
|
var t, n, o;
|
|
628
|
-
},
|
|
629
|
-
return { h: (t = Me(e)).h, s: (
|
|
630
|
-
var t, n, o,
|
|
631
|
-
}, zt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,
|
|
607
|
+
}, j = function(e) {
|
|
608
|
+
return { h: (t = Me(e)).h, s: (i = (200 - (n = t.s)) * (o = t.v) / 100) > 0 && i < 200 ? n * o / 100 / (i <= 100 ? i : 200 - i) * 100 : 0, l: i / 2, a: t.a };
|
|
609
|
+
var t, n, o, i;
|
|
610
|
+
}, zt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Tt = /^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, jt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, Pt = /^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i, ve = { string: [[function(e) {
|
|
632
611
|
var t = Lt.exec(e);
|
|
633
|
-
return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ?
|
|
612
|
+
return t ? (e = t[1]).length <= 4 ? { r: parseInt(e[0] + e[0], 16), g: parseInt(e[1] + e[1], 16), b: parseInt(e[2] + e[2], 16), a: e.length === 4 ? x(parseInt(e[3] + e[3], 16) / 255, 2) : 1 } : e.length === 6 || e.length === 8 ? { r: parseInt(e.substr(0, 2), 16), g: parseInt(e.substr(2, 2), 16), b: parseInt(e.substr(4, 2), 16), a: e.length === 8 ? x(parseInt(e.substr(6, 2), 16) / 255, 2) : 1 } : null : null;
|
|
634
613
|
}, "hex"], [function(e) {
|
|
635
|
-
var t =
|
|
614
|
+
var t = jt.exec(e) || Pt.exec(e);
|
|
636
615
|
return t ? t[2] !== t[4] || t[4] !== t[6] ? null : de({ r: Number(t[1]) / (t[2] ? 100 / 255 : 1), g: Number(t[3]) / (t[4] ? 100 / 255 : 1), b: Number(t[5]) / (t[6] ? 100 / 255 : 1), a: t[7] === void 0 ? 1 : Number(t[7]) / (t[8] ? 100 : 1) }) : null;
|
|
637
616
|
}, "rgb"], [function(e) {
|
|
638
|
-
var t = zt.exec(e) ||
|
|
617
|
+
var t = zt.exec(e) || Tt.exec(e);
|
|
639
618
|
if (!t) return null;
|
|
640
|
-
var n, o,
|
|
641
|
-
return me(
|
|
619
|
+
var n, o, i = fe({ h: (n = t[1], o = t[2], o === void 0 && (o = "deg"), Number(n) * (Bt[o] || 1)), s: Number(t[3]), l: Number(t[4]), a: t[5] === void 0 ? 1 : Number(t[5]) / (t[6] ? 100 : 1) });
|
|
620
|
+
return me(i);
|
|
642
621
|
}, "hsl"]], object: [[function(e) {
|
|
643
|
-
var t = e.r, n = e.g, o = e.b,
|
|
644
|
-
return R(t) && R(n) && R(o) ? de({ r: Number(t), g: Number(n), b: Number(o), a: Number(
|
|
622
|
+
var t = e.r, n = e.g, o = e.b, i = e.a, r = i === void 0 ? 1 : i;
|
|
623
|
+
return R(t) && R(n) && R(o) ? de({ r: Number(t), g: Number(n), b: Number(o), a: Number(r) }) : null;
|
|
645
624
|
}, "rgb"], [function(e) {
|
|
646
|
-
var t = e.h, n = e.s, o = e.l,
|
|
625
|
+
var t = e.h, n = e.s, o = e.l, i = e.a, r = i === void 0 ? 1 : i;
|
|
647
626
|
if (!R(t) || !R(n) || !R(o)) return null;
|
|
648
|
-
var
|
|
649
|
-
return me(
|
|
627
|
+
var u = fe({ h: Number(t), s: Number(n), l: Number(o), a: Number(r) });
|
|
628
|
+
return me(u);
|
|
650
629
|
}, "hsl"], [function(e) {
|
|
651
|
-
var t = e.h, n = e.s, o = e.v,
|
|
630
|
+
var t = e.h, n = e.s, o = e.v, i = e.a, r = i === void 0 ? 1 : i;
|
|
652
631
|
if (!R(t) || !R(n) || !R(o)) return null;
|
|
653
|
-
var
|
|
654
|
-
return { h: Ne(
|
|
655
|
-
})({ h: Number(t), s: Number(n), v: Number(o), a: Number(
|
|
656
|
-
return Ae(
|
|
632
|
+
var u = (function(l) {
|
|
633
|
+
return { h: Ne(l.h), s: S(l.s, 0, 100), v: S(l.v, 0, 100), a: S(l.a) };
|
|
634
|
+
})({ h: Number(t), s: Number(n), v: Number(o), a: Number(r) });
|
|
635
|
+
return Ae(u);
|
|
657
636
|
}, "hsv"]] }, be = function(e, t) {
|
|
658
637
|
for (var n = 0; n < t.length; n++) {
|
|
659
638
|
var o = t[n][0](e);
|
|
@@ -663,40 +642,40 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
|
663
642
|
}, Ft = function(e) {
|
|
664
643
|
return typeof e == "string" ? be(e.trim(), ve.string) : typeof e == "object" && e !== null ? be(e, ve.object) : [null, void 0];
|
|
665
644
|
}, U = function(e, t) {
|
|
666
|
-
var n =
|
|
645
|
+
var n = j(e);
|
|
667
646
|
return { h: n.h, s: S(n.s + 100 * t, 0, 100), l: n.l, a: n.a };
|
|
668
647
|
}, Y = function(e) {
|
|
669
648
|
return (299 * e.r + 587 * e.g + 114 * e.b) / 1e3 / 255;
|
|
670
|
-
},
|
|
671
|
-
var n =
|
|
649
|
+
}, ge = function(e, t) {
|
|
650
|
+
var n = j(e);
|
|
672
651
|
return { h: n.h, s: n.s, l: S(n.l + 100 * t, 0, 100), a: n.a };
|
|
673
|
-
},
|
|
652
|
+
}, pe = (function() {
|
|
674
653
|
function e(t) {
|
|
675
654
|
this.parsed = Ft(t)[0], this.rgba = this.parsed || { r: 0, g: 0, b: 0, a: 1 };
|
|
676
655
|
}
|
|
677
656
|
return e.prototype.isValid = function() {
|
|
678
657
|
return this.parsed !== null;
|
|
679
658
|
}, e.prototype.brightness = function() {
|
|
680
|
-
return
|
|
659
|
+
return x(Y(this.rgba), 2);
|
|
681
660
|
}, e.prototype.isDark = function() {
|
|
682
661
|
return Y(this.rgba) < 0.5;
|
|
683
662
|
}, e.prototype.isLight = function() {
|
|
684
663
|
return Y(this.rgba) >= 0.5;
|
|
685
664
|
}, e.prototype.toHex = function() {
|
|
686
|
-
return t = Z(this.rgba), n = t.r, o = t.g,
|
|
687
|
-
var t, n, o,
|
|
665
|
+
return t = Z(this.rgba), n = t.r, o = t.g, i = t.b, u = (r = t.a) < 1 ? H(x(255 * r)) : "", "#" + H(n) + H(o) + H(i) + u;
|
|
666
|
+
var t, n, o, i, r, u;
|
|
688
667
|
}, e.prototype.toRgb = function() {
|
|
689
668
|
return Z(this.rgba);
|
|
690
669
|
}, e.prototype.toRgbString = function() {
|
|
691
|
-
return t = Z(this.rgba), n = t.r, o = t.g,
|
|
692
|
-
var t, n, o,
|
|
670
|
+
return t = Z(this.rgba), n = t.r, o = t.g, i = t.b, (r = t.a) < 1 ? "rgba(" + n + ", " + o + ", " + i + ", " + r + ")" : "rgb(" + n + ", " + o + ", " + i + ")";
|
|
671
|
+
var t, n, o, i, r;
|
|
693
672
|
}, e.prototype.toHsl = function() {
|
|
694
|
-
return he(
|
|
673
|
+
return he(j(this.rgba));
|
|
695
674
|
}, e.prototype.toHslString = function() {
|
|
696
|
-
return t = he(
|
|
697
|
-
var t, n, o,
|
|
675
|
+
return t = he(j(this.rgba)), n = t.h, o = t.s, i = t.l, (r = t.a) < 1 ? "hsla(" + n + ", " + o + "%, " + i + "%, " + r + ")" : "hsl(" + n + ", " + o + "%, " + i + "%)";
|
|
676
|
+
var t, n, o, i, r;
|
|
698
677
|
}, e.prototype.toHsv = function() {
|
|
699
|
-
return t = Me(this.rgba), { h:
|
|
678
|
+
return t = Me(this.rgba), { h: x(t.h), s: x(t.s), v: x(t.v), a: x(t.a, 3) };
|
|
700
679
|
var t;
|
|
701
680
|
}, e.prototype.invert = function() {
|
|
702
681
|
return E({ r: 255 - (t = this.rgba).r, g: 255 - t.g, b: 255 - t.b, a: t.a });
|
|
@@ -708,26 +687,26 @@ var Bt = { grad: 0.9, turn: 360, rad: 360 / (2 * Math.PI) }, R = function(e) {
|
|
|
708
687
|
}, e.prototype.grayscale = function() {
|
|
709
688
|
return E(U(this.rgba, -1));
|
|
710
689
|
}, e.prototype.lighten = function(t) {
|
|
711
|
-
return t === void 0 && (t = 0.1), E(
|
|
690
|
+
return t === void 0 && (t = 0.1), E(ge(this.rgba, t));
|
|
712
691
|
}, e.prototype.darken = function(t) {
|
|
713
|
-
return t === void 0 && (t = 0.1), E(
|
|
692
|
+
return t === void 0 && (t = 0.1), E(ge(this.rgba, -t));
|
|
714
693
|
}, e.prototype.rotate = function(t) {
|
|
715
694
|
return t === void 0 && (t = 15), this.hue(this.hue() + t);
|
|
716
695
|
}, e.prototype.alpha = function(t) {
|
|
717
|
-
return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) :
|
|
696
|
+
return typeof t == "number" ? E({ r: (n = this.rgba).r, g: n.g, b: n.b, a: t }) : x(this.rgba.a, 3);
|
|
718
697
|
var n;
|
|
719
698
|
}, e.prototype.hue = function(t) {
|
|
720
|
-
var n =
|
|
721
|
-
return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) :
|
|
699
|
+
var n = j(this.rgba);
|
|
700
|
+
return typeof t == "number" ? E({ h: t, s: n.s, l: n.l, a: n.a }) : x(n.h);
|
|
722
701
|
}, e.prototype.isEqual = function(t) {
|
|
723
702
|
return this.toHex() === E(t).toHex();
|
|
724
703
|
}, e;
|
|
725
704
|
})(), E = function(e) {
|
|
726
|
-
return e instanceof
|
|
705
|
+
return e instanceof pe ? e : new pe(e);
|
|
727
706
|
};
|
|
728
|
-
const { cssr: Ot, plugin: Vt, namespace: Re } = ct(), { c:
|
|
707
|
+
const { cssr: Ot, plugin: Vt, namespace: Re } = ct(), { c: g, cB: W, cE: p, cM: J, cNotM: xe } = { ...Ot, ...Vt }, T = `${Re}-chrome-tabs`, w = `${Re}-chrome-tabs-item`, z = "all .2s cubic-bezier(.4, 0, .2, 1)";
|
|
729
708
|
function Ht() {
|
|
730
|
-
return
|
|
709
|
+
return g([
|
|
731
710
|
W("chrome-tabs", {
|
|
732
711
|
display: "flex",
|
|
733
712
|
width: "100%",
|
|
@@ -737,18 +716,18 @@ function Ht() {
|
|
|
737
716
|
backgroundColor: "var(--background-color)",
|
|
738
717
|
color: "var(--background-color-dark)"
|
|
739
718
|
}, [
|
|
740
|
-
|
|
719
|
+
g("div", {
|
|
741
720
|
boxSizing: "border-box"
|
|
742
721
|
}),
|
|
743
|
-
|
|
722
|
+
g(".group-move, .group-enter-active, .group-leave-active", {
|
|
744
723
|
transition: z
|
|
745
724
|
}),
|
|
746
|
-
|
|
725
|
+
g(".group-enter-from, .group-leave-to", {
|
|
747
726
|
opacity: 0
|
|
748
727
|
}),
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
728
|
+
g(".group-leave-active", {}),
|
|
729
|
+
p("prefix", {}),
|
|
730
|
+
p("icon", {
|
|
752
731
|
width: "28px",
|
|
753
732
|
height: "28px",
|
|
754
733
|
display: "flex",
|
|
@@ -759,16 +738,16 @@ function Ht() {
|
|
|
759
738
|
backgroundColor: "var(--active-background-color)",
|
|
760
739
|
transition: z
|
|
761
740
|
}, [
|
|
762
|
-
|
|
741
|
+
g("svg", {
|
|
763
742
|
width: "100%",
|
|
764
743
|
height: "100%",
|
|
765
744
|
fill: "currentColor"
|
|
766
745
|
}),
|
|
767
|
-
|
|
746
|
+
g("&:hover", {
|
|
768
747
|
backgroundColor: "var(--primary-color)"
|
|
769
748
|
})
|
|
770
749
|
]),
|
|
771
|
-
|
|
750
|
+
p("content", {
|
|
772
751
|
flex: "1",
|
|
773
752
|
height: "100%",
|
|
774
753
|
minWidth: 0,
|
|
@@ -776,24 +755,24 @@ function Ht() {
|
|
|
776
755
|
marginLeft: "-6px",
|
|
777
756
|
padding: "0 10px"
|
|
778
757
|
}),
|
|
779
|
-
|
|
758
|
+
p("scroll", {
|
|
780
759
|
position: "relative",
|
|
781
760
|
display: "flex",
|
|
782
761
|
alignItems: "center",
|
|
783
762
|
height: "100%"
|
|
784
763
|
}, [
|
|
785
|
-
|
|
764
|
+
p("icon", {
|
|
786
765
|
marginLeft: "5px",
|
|
787
766
|
borderRadius: "50%",
|
|
788
767
|
backgroundColor: "transparent",
|
|
789
768
|
flexShrink: 0
|
|
790
769
|
}, [
|
|
791
|
-
|
|
770
|
+
g("&:hover", {
|
|
792
771
|
backgroundColor: "var(--primary-color)"
|
|
793
772
|
})
|
|
794
773
|
])
|
|
795
774
|
]),
|
|
796
|
-
|
|
775
|
+
p("suffix", {})
|
|
797
776
|
]),
|
|
798
777
|
W("chrome-tabs-item", {
|
|
799
778
|
position: "relative",
|
|
@@ -811,24 +790,24 @@ function Ht() {
|
|
|
811
790
|
filter: "grayscale(0.5)"
|
|
812
791
|
}),
|
|
813
792
|
J("active", [
|
|
814
|
-
|
|
793
|
+
p("background", {
|
|
815
794
|
opacity: 1
|
|
816
795
|
})
|
|
817
796
|
]),
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
797
|
+
xe("active", [
|
|
798
|
+
g("&:hover", {}, [
|
|
799
|
+
p("content", {
|
|
821
800
|
backgroundColor: "var(--primary-color)"
|
|
822
801
|
})
|
|
823
802
|
])
|
|
824
803
|
]),
|
|
825
|
-
|
|
804
|
+
g("&::first-child", {
|
|
826
805
|
marginLeft: "0 !important"
|
|
827
806
|
}),
|
|
828
|
-
|
|
807
|
+
g("&::last-child", {
|
|
829
808
|
marginRight: "0 !important"
|
|
830
809
|
}),
|
|
831
|
-
|
|
810
|
+
p("content", {
|
|
832
811
|
position: "relative",
|
|
833
812
|
zIndex: 1,
|
|
834
813
|
height: "28px",
|
|
@@ -839,17 +818,17 @@ function Ht() {
|
|
|
839
818
|
padding: "0 10px",
|
|
840
819
|
transition: z
|
|
841
820
|
}),
|
|
842
|
-
|
|
843
|
-
|
|
821
|
+
p("slot", {}),
|
|
822
|
+
p("icon", {
|
|
844
823
|
lineHeight: 1
|
|
845
824
|
}, [
|
|
846
|
-
|
|
825
|
+
g("svg", {
|
|
847
826
|
width: "1.2em",
|
|
848
827
|
height: "1.2em",
|
|
849
828
|
fill: "currentColor"
|
|
850
829
|
})
|
|
851
830
|
]),
|
|
852
|
-
|
|
831
|
+
p("close", {
|
|
853
832
|
width: "16px",
|
|
854
833
|
height: "16px",
|
|
855
834
|
padding: "2px",
|
|
@@ -859,16 +838,16 @@ function Ht() {
|
|
|
859
838
|
borderRadius: "50%",
|
|
860
839
|
transition: z
|
|
861
840
|
}, [
|
|
862
|
-
|
|
841
|
+
g("&:hover", {
|
|
863
842
|
backgroundColor: "rgba(0,0,0,0.1)"
|
|
864
843
|
}),
|
|
865
|
-
|
|
844
|
+
g("svg", {
|
|
866
845
|
width: "100%",
|
|
867
846
|
height: "100%",
|
|
868
847
|
fill: "currentColor"
|
|
869
848
|
})
|
|
870
849
|
]),
|
|
871
|
-
|
|
850
|
+
p("background", {
|
|
872
851
|
position: "absolute",
|
|
873
852
|
opacity: 0,
|
|
874
853
|
left: 0,
|
|
@@ -880,18 +859,18 @@ function Ht() {
|
|
|
880
859
|
alignItems: "flex-end",
|
|
881
860
|
transition: z
|
|
882
861
|
}, [
|
|
883
|
-
|
|
862
|
+
p("block", {
|
|
884
863
|
height: "100%",
|
|
885
864
|
flex: 1,
|
|
886
865
|
minWidth: 0,
|
|
887
866
|
borderRadius: "10px 10px 0 0",
|
|
888
867
|
backgroundColor: "var(--active-background-color)"
|
|
889
868
|
}),
|
|
890
|
-
|
|
869
|
+
g("svg", {
|
|
891
870
|
fill: "var(--active-background-color)"
|
|
892
871
|
})
|
|
893
872
|
]),
|
|
894
|
-
|
|
873
|
+
p("line", {
|
|
895
874
|
position: "absolute",
|
|
896
875
|
bottom: "12px",
|
|
897
876
|
right: "4px",
|
|
@@ -907,32 +886,32 @@ function Ht() {
|
|
|
907
886
|
})
|
|
908
887
|
])
|
|
909
888
|
]),
|
|
910
|
-
|
|
889
|
+
g(".dark", [
|
|
911
890
|
W("chrome-tabs", {
|
|
912
891
|
backgroundColor: "var(--background-color-dark)",
|
|
913
892
|
color: "var(--background-color)"
|
|
914
893
|
}, [
|
|
915
|
-
|
|
894
|
+
p("icon", {
|
|
916
895
|
backgroundColor: "var(--active-background-color-dark)"
|
|
917
896
|
}, [
|
|
918
|
-
|
|
897
|
+
g("&:hover", {
|
|
919
898
|
backgroundColor: "var(--primary-color-dark)"
|
|
920
899
|
})
|
|
921
900
|
])
|
|
922
901
|
]),
|
|
923
902
|
W("chrome-tabs-item", {}, [
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
903
|
+
xe("active", [
|
|
904
|
+
g("&:hover", {}, [
|
|
905
|
+
p("content", {
|
|
927
906
|
backgroundColor: "var(--primary-color-dark)"
|
|
928
907
|
})
|
|
929
908
|
])
|
|
930
909
|
]),
|
|
931
|
-
|
|
932
|
-
|
|
910
|
+
p("background", {}, [
|
|
911
|
+
p("block", {
|
|
933
912
|
backgroundColor: "var(--active-background-color-dark)"
|
|
934
913
|
}),
|
|
935
|
-
|
|
914
|
+
g("svg", {
|
|
936
915
|
fill: "var(--active-background-color-dark)"
|
|
937
916
|
})
|
|
938
917
|
])
|
|
@@ -942,8 +921,8 @@ function Ht() {
|
|
|
942
921
|
}
|
|
943
922
|
const q = (e, t) => {
|
|
944
923
|
const n = e.__vccOpts || e;
|
|
945
|
-
for (const [o,
|
|
946
|
-
n[o] =
|
|
924
|
+
for (const [o, i] of t)
|
|
925
|
+
n[o] = i;
|
|
947
926
|
return n;
|
|
948
927
|
}, Wt = {
|
|
949
928
|
name: "RiAddLine"
|
|
@@ -953,7 +932,7 @@ const q = (e, t) => {
|
|
|
953
932
|
height: "1em",
|
|
954
933
|
viewBox: "0 0 24 24"
|
|
955
934
|
};
|
|
956
|
-
function Kt(e, t, n, o,
|
|
935
|
+
function Kt(e, t, n, o, i, r) {
|
|
957
936
|
return I(), A("svg", Dt, [...t[0] || (t[0] = [
|
|
958
937
|
k("path", {
|
|
959
938
|
fill: "#757575",
|
|
@@ -969,7 +948,7 @@ const qt = /* @__PURE__ */ q(Wt, [["render", Kt]]), Gt = {
|
|
|
969
948
|
height: "1em",
|
|
970
949
|
viewBox: "0 0 24 24"
|
|
971
950
|
};
|
|
972
|
-
function Ut(e, t, n, o,
|
|
951
|
+
function Ut(e, t, n, o, i, r) {
|
|
973
952
|
return I(), A("svg", Zt, [...t[0] || (t[0] = [
|
|
974
953
|
k("path", {
|
|
975
954
|
fill: "#757575",
|
|
@@ -985,7 +964,7 @@ const Yt = /* @__PURE__ */ q(Gt, [["render", Ut]]), Jt = {
|
|
|
985
964
|
height: "1em",
|
|
986
965
|
viewBox: "0 0 24 24"
|
|
987
966
|
};
|
|
988
|
-
function Xt(e, t, n, o,
|
|
967
|
+
function Xt(e, t, n, o, i, r) {
|
|
989
968
|
return I(), A("svg", Qt, [...t[0] || (t[0] = [
|
|
990
969
|
Fe('<g fill="none" stroke="#757575" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="16" stroke-dashoffset="16" d="M12 3c4.97 0 9 4.03 9 9"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="16;0"></animate><animateTransform attributeName="transform" dur="1.5s" repeatCount="indefinite" type="rotate" values="0 12 12;360 12 12"></animateTransform></path><path stroke-dasharray="64" stroke-dashoffset="64" stroke-opacity=".3" d="M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9Z"><animate fill="freeze" attributeName="stroke-dashoffset" dur="1.2s" values="64;0"></animate></path></g>', 1)
|
|
991
970
|
])]);
|
|
@@ -998,7 +977,7 @@ const _t = /* @__PURE__ */ q(Jt, [["render", Xt]]), en = {
|
|
|
998
977
|
height: "1em",
|
|
999
978
|
viewBox: "0 0 24 24"
|
|
1000
979
|
};
|
|
1001
|
-
function nn(e, t, n, o,
|
|
980
|
+
function nn(e, t, n, o, i, r) {
|
|
1002
981
|
return I(), A("svg", tn, [...t[0] || (t[0] = [
|
|
1003
982
|
k("path", {
|
|
1004
983
|
fill: "#757575",
|
|
@@ -1027,62 +1006,62 @@ const on = /* @__PURE__ */ q(en, [["render", nn]]), rn = /* @__PURE__ */ we({
|
|
|
1027
1006
|
},
|
|
1028
1007
|
emits: ["itemClick", "itemContextmenu", "itemClose"],
|
|
1029
1008
|
setup(e, { emit: t }) {
|
|
1030
|
-
const n = t, o = M(() => e.activeIndex !== e.itemIndex && e.activeIndex - 1 !== e.itemIndex),
|
|
1031
|
-
function
|
|
1032
|
-
|
|
1009
|
+
const n = t, o = M(() => e.activeIndex !== e.itemIndex && e.activeIndex - 1 !== e.itemIndex), i = M(() => e.activeIndex === e.itemIndex), r = M(() => typeof e.label == "string" ? ie("span", { class: `${w}__label` }, e.label) : e.label(e.itemKey, e.itemIndex)), u = M(() => e.loadingIcon?.(e.itemKey, e.itemIndex) ?? ie(_t));
|
|
1010
|
+
function l(f) {
|
|
1011
|
+
f.stopPropagation(), n("itemClick", f), e.onClick?.(e.itemKey, e.itemIndex, f);
|
|
1033
1012
|
}
|
|
1034
|
-
function f
|
|
1035
|
-
n("itemContextmenu",
|
|
1013
|
+
function d(f) {
|
|
1014
|
+
n("itemContextmenu", f), e.onContextMenu?.(e.itemKey, e.itemIndex, f);
|
|
1036
1015
|
}
|
|
1037
|
-
function
|
|
1038
|
-
n("itemClose"), e.onClose?.(e.itemKey, e.itemIndex,
|
|
1016
|
+
function c(f) {
|
|
1017
|
+
n("itemClose"), e.onClose?.(e.itemKey, e.itemIndex, f);
|
|
1039
1018
|
}
|
|
1040
|
-
return (
|
|
1019
|
+
return (f, s) => (I(), A("div", {
|
|
1041
1020
|
class: C([
|
|
1042
|
-
|
|
1021
|
+
y(w),
|
|
1043
1022
|
{
|
|
1044
|
-
[`${
|
|
1045
|
-
[`${
|
|
1023
|
+
[`${y(w)}--active`]: i.value,
|
|
1024
|
+
[`${y(w)}--disabled`]: typeof e.disabled == "function" ? e.disabled(e.itemKey, e.itemIndex) : e.disabled
|
|
1046
1025
|
}
|
|
1047
1026
|
]),
|
|
1048
|
-
onClick:
|
|
1049
|
-
onContextmenu:
|
|
1027
|
+
onClick: l,
|
|
1028
|
+
onContextmenu: d
|
|
1050
1029
|
}, [
|
|
1051
1030
|
k("div", {
|
|
1052
|
-
class: C([`${
|
|
1031
|
+
class: C([`${y(w)}__content`])
|
|
1053
1032
|
}, [
|
|
1054
1033
|
k("div", {
|
|
1055
|
-
class: C([`${
|
|
1056
|
-
style: _({ fontSize: `${
|
|
1034
|
+
class: C([`${y(w)}__icon`]),
|
|
1035
|
+
style: _({ fontSize: `${e.iconSize}px` })
|
|
1057
1036
|
}, [
|
|
1058
|
-
(I(), ee(
|
|
1037
|
+
(I(), ee(re(typeof e.loading == "function" ? e.loading(e.itemKey, e.itemIndex) : e.loading ? u.value : e.icon?.(e.itemKey, e.itemIndex) ?? void 0)))
|
|
1059
1038
|
], 6),
|
|
1060
1039
|
k("div", {
|
|
1061
|
-
class: C([`${
|
|
1040
|
+
class: C([`${y(w)}__slot`])
|
|
1062
1041
|
}, [
|
|
1063
|
-
(I(), ee(
|
|
1042
|
+
(I(), ee(re(r.value)))
|
|
1064
1043
|
], 2),
|
|
1065
|
-
(typeof
|
|
1044
|
+
(typeof e.closable == "function" ? e.closable(e.itemKey, e.itemIndex) : e.closable) ? (I(), A("div", {
|
|
1066
1045
|
key: 0,
|
|
1067
|
-
class: C([`${
|
|
1068
|
-
onClick: Oe(
|
|
1046
|
+
class: C([`${y(w)}__close`]),
|
|
1047
|
+
onClick: Oe(c, ["stop"])
|
|
1069
1048
|
}, [
|
|
1070
1049
|
D(on)
|
|
1071
1050
|
], 2)) : X("", !0)
|
|
1072
1051
|
], 2),
|
|
1073
1052
|
k("div", {
|
|
1074
|
-
class: C([`${
|
|
1053
|
+
class: C([`${y(w)}__background`])
|
|
1075
1054
|
}, [
|
|
1076
|
-
|
|
1055
|
+
s[0] || (s[0] = k("svg", {
|
|
1077
1056
|
width: "10",
|
|
1078
1057
|
height: "10"
|
|
1079
1058
|
}, [
|
|
1080
1059
|
k("path", { d: "M 0 10 A 10 10 0 0 0 10 0 L 10 10 Z" })
|
|
1081
1060
|
], -1)),
|
|
1082
1061
|
k("div", {
|
|
1083
|
-
class: C([`${
|
|
1062
|
+
class: C([`${y(w)}__block`])
|
|
1084
1063
|
}, null, 2),
|
|
1085
|
-
|
|
1064
|
+
s[1] || (s[1] = k("svg", {
|
|
1086
1065
|
width: "10",
|
|
1087
1066
|
height: "10"
|
|
1088
1067
|
}, [
|
|
@@ -1090,11 +1069,11 @@ const on = /* @__PURE__ */ q(en, [["render", nn]]), rn = /* @__PURE__ */ we({
|
|
|
1090
1069
|
], -1))
|
|
1091
1070
|
], 2),
|
|
1092
1071
|
k("div", {
|
|
1093
|
-
class: C([`${
|
|
1072
|
+
class: C([`${y(w)}__line`, o.value ? `${y(w)}__line--show` : ""])
|
|
1094
1073
|
}, null, 2)
|
|
1095
1074
|
], 34));
|
|
1096
1075
|
}
|
|
1097
|
-
}),
|
|
1076
|
+
}), ln = /* @__PURE__ */ we({
|
|
1098
1077
|
__name: "Tabs",
|
|
1099
1078
|
props: {
|
|
1100
1079
|
value: {},
|
|
@@ -1111,82 +1090,82 @@ const on = /* @__PURE__ */ q(en, [["render", nn]]), rn = /* @__PURE__ */ we({
|
|
|
1111
1090
|
setup(e, { emit: t }) {
|
|
1112
1091
|
const n = t;
|
|
1113
1092
|
bt("n-chrome-tabs", Ht());
|
|
1114
|
-
const o = M(() => e.value ? e.options?.findIndex((
|
|
1093
|
+
const o = M(() => e.value ? e.options?.findIndex((s) => s.key === e.value) : 0), { scrollRef: i, scrollToView: r } = Rt({ activeClassName: `.${w}--active`, direction: "horizontal" });
|
|
1115
1094
|
P(() => e.value, () => {
|
|
1116
|
-
|
|
1095
|
+
r();
|
|
1117
1096
|
}, {
|
|
1118
1097
|
immediate: !0
|
|
1119
1098
|
});
|
|
1120
|
-
const
|
|
1099
|
+
const u = M(() => ({
|
|
1121
1100
|
background: "#F1F1F1",
|
|
1122
1101
|
active: "#fff",
|
|
1123
1102
|
primary: "rgba(0,0,0,.1)",
|
|
1124
1103
|
...e.colors
|
|
1125
|
-
})),
|
|
1126
|
-
background: E(
|
|
1127
|
-
active: E(
|
|
1128
|
-
primary: E(
|
|
1104
|
+
})), l = M(() => ({
|
|
1105
|
+
background: E(u.value.background).darken(0.8).toHex(),
|
|
1106
|
+
active: E(u.value.active).darken(0.8).toHex(),
|
|
1107
|
+
primary: E(u.value.primary).darken(0.3).toHex()
|
|
1129
1108
|
}));
|
|
1130
|
-
function
|
|
1131
|
-
n("update:value",
|
|
1109
|
+
function d(s, b) {
|
|
1110
|
+
n("update:value", s), n("click", s, b);
|
|
1132
1111
|
}
|
|
1133
|
-
function
|
|
1134
|
-
n("contextmenu",
|
|
1112
|
+
function c(s, b) {
|
|
1113
|
+
n("contextmenu", s, b);
|
|
1135
1114
|
}
|
|
1136
|
-
function
|
|
1137
|
-
n("close",
|
|
1115
|
+
function f(s, b) {
|
|
1116
|
+
n("close", s, b);
|
|
1138
1117
|
}
|
|
1139
|
-
return (
|
|
1140
|
-
class: C([
|
|
1118
|
+
return (s, b) => (I(), A("div", {
|
|
1119
|
+
class: C([y(T)]),
|
|
1141
1120
|
style: _({
|
|
1142
|
-
"--background-color": `${
|
|
1143
|
-
"--background-color-dark": `${
|
|
1144
|
-
"--active-background-color": `${
|
|
1145
|
-
"--active-background-color-dark": `${
|
|
1146
|
-
"--primary-color": `${
|
|
1147
|
-
"--primary-color-dark": `${
|
|
1121
|
+
"--background-color": `${u.value.background}`,
|
|
1122
|
+
"--background-color-dark": `${l.value.background}`,
|
|
1123
|
+
"--active-background-color": `${u.value.active}`,
|
|
1124
|
+
"--active-background-color-dark": `${l.value.active}`,
|
|
1125
|
+
"--primary-color": `${u.value.primary}`,
|
|
1126
|
+
"--primary-color-dark": `${l.value.primary}`
|
|
1148
1127
|
})
|
|
1149
1128
|
}, [
|
|
1150
|
-
|
|
1129
|
+
e.dropdown ? (I(), A("div", {
|
|
1151
1130
|
key: 0,
|
|
1152
|
-
class: C([`${
|
|
1131
|
+
class: C([`${y(T)}__icon`])
|
|
1153
1132
|
}, [
|
|
1154
1133
|
D(Yt)
|
|
1155
1134
|
], 2)) : X("", !0),
|
|
1156
|
-
|
|
1135
|
+
ue(s.$slots, "prefix"),
|
|
1157
1136
|
k("div", {
|
|
1158
1137
|
ref_key: "scrollRef",
|
|
1159
|
-
ref:
|
|
1160
|
-
class: C([`${
|
|
1161
|
-
style: _(
|
|
1138
|
+
ref: i,
|
|
1139
|
+
class: C([`${y(T)}__content`, e.contentClass]),
|
|
1140
|
+
style: _(e.contentStyle)
|
|
1162
1141
|
}, [
|
|
1163
1142
|
D(Ve, {
|
|
1164
1143
|
name: "group",
|
|
1165
1144
|
tag: "div",
|
|
1166
|
-
class: C([`${
|
|
1145
|
+
class: C([`${y(T)}__scroll`])
|
|
1167
1146
|
}, {
|
|
1168
1147
|
default: He(() => [
|
|
1169
|
-
(I(!0), A(We, null, De(
|
|
1148
|
+
(I(!0), A(We, null, De(e.options, ({ key: $, ...a }, h) => (I(), ee(rn, Ke({
|
|
1170
1149
|
key: $,
|
|
1171
|
-
loading:
|
|
1150
|
+
loading: e.loadingValue === $
|
|
1172
1151
|
}, { ref_for: !0 }, a, {
|
|
1173
1152
|
"item-key": $,
|
|
1174
|
-
"item-index":
|
|
1153
|
+
"item-index": h,
|
|
1175
1154
|
"active-index": o.value,
|
|
1176
|
-
"icon-size":
|
|
1177
|
-
onItemClick: (
|
|
1178
|
-
onItemContextmenu: (
|
|
1179
|
-
onItemClose: (
|
|
1155
|
+
"icon-size": e.iconSize,
|
|
1156
|
+
onItemClick: (m) => d($, h),
|
|
1157
|
+
onItemContextmenu: (m) => c($, h),
|
|
1158
|
+
onItemClose: (m) => f($, h)
|
|
1180
1159
|
}), null, 16, ["loading", "item-key", "item-index", "active-index", "icon-size", "onItemClick", "onItemContextmenu", "onItemClose"]))), 128))
|
|
1181
1160
|
]),
|
|
1182
1161
|
_: 1
|
|
1183
1162
|
}, 8, ["class"])
|
|
1184
1163
|
], 6),
|
|
1185
|
-
|
|
1186
|
-
|
|
1164
|
+
ue(s.$slots, "suffix"),
|
|
1165
|
+
e.addable ? (I(), A("div", {
|
|
1187
1166
|
key: 1,
|
|
1188
|
-
class: C([`${
|
|
1189
|
-
onClick:
|
|
1167
|
+
class: C([`${y(T)}__icon`]),
|
|
1168
|
+
onClick: b[0] || (b[0] = ($) => n("add"))
|
|
1190
1169
|
}, [
|
|
1191
1170
|
D(qt)
|
|
1192
1171
|
], 2)) : X("", !0)
|
|
@@ -1194,5 +1173,5 @@ const on = /* @__PURE__ */ q(en, [["render", nn]]), rn = /* @__PURE__ */ we({
|
|
|
1194
1173
|
}
|
|
1195
1174
|
});
|
|
1196
1175
|
export {
|
|
1197
|
-
|
|
1176
|
+
ln as CTabs
|
|
1198
1177
|
};
|