vue3-router-tab 1.4.2 → 1.4.3

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.
@@ -1,5 +1,5 @@
1
1
  import './vue3-router-tab.css';
2
- import { reactive as ie, ref as x, shallowRef as kt, computed as K, watch as S, nextTick as M, inject as De, getCurrentInstance as Ye, onMounted as Fe, onBeforeMount as Ct, defineComponent as Ce, provide as Kt, onErrorCaptured as Et, onBeforeUnmount as $t, h as Pt, resolveComponent as At, createElementBlock as B, openBlock as $, createElementVNode as V, withDirectives as St, normalizeClass as q, renderSlot as me, createVNode as It, TransitionGroup as xt, mergeProps as he, withCtx as ye, Fragment as Te, renderList as Me, withModifiers as we, createCommentVNode as te, toDisplayString as Le, createBlock as X, normalizeProps as Bt, KeepAlive as Dt, resolveDynamicComponent as Oe, Transition as Mt, normalizeStyle as Lt, vShow as Ot, isRef as jt, isReadonly as Ut } from "vue";
2
+ import { reactive as se, ref as x, shallowRef as Rt, computed as E, watch as S, nextTick as L, inject as Le, getCurrentInstance as Ee, onMounted as He, onBeforeMount as Ct, defineComponent as Ke, provide as Et, onErrorCaptured as Kt, onBeforeUnmount as $t, h as Pt, resolveComponent as At, createElementBlock as B, openBlock as $, createElementVNode as _, withDirectives as St, normalizeClass as q, renderSlot as me, createVNode as It, TransitionGroup as xt, mergeProps as ye, withCtx as Te, Fragment as we, renderList as Oe, withModifiers as ke, createCommentVNode as oe, toDisplayString as je, createBlock as Q, normalizeProps as Bt, KeepAlive as Dt, resolveDynamicComponent as Ue, Transition as Mt, normalizeStyle as Lt, vShow as Ot, isRef as jt, isReadonly as Ut } from "vue";
3
3
  import { RouterView as Vt } from "vue-router";
4
4
  function _t(e = {}) {
5
5
  return {
@@ -11,7 +11,7 @@ function _t(e = {}) {
11
11
  defaultRoute: e.defaultRoute ?? "/"
12
12
  };
13
13
  }
14
- function _(e, r) {
14
+ function N(e, r) {
15
15
  const o = e.resolve(r);
16
16
  if (!o || !o.matched.length)
17
17
  throw new Error(`[RouterTabs] Unable to resolve route: ${String(r)}`);
@@ -35,27 +35,27 @@ function z(e) {
35
35
  }
36
36
  return e.fullPath;
37
37
  }
38
- function Ke(e, r) {
38
+ function $e(e, r) {
39
39
  const o = e.meta?.keepAlive;
40
40
  return typeof o == "boolean" ? o : r;
41
41
  }
42
- function Ee(e, r) {
42
+ function Pe(e, r) {
43
43
  const o = e.meta?.reuse;
44
44
  return typeof o == "boolean" ? o : r;
45
45
  }
46
- function He(e) {
46
+ function We(e) {
47
47
  const r = e.meta ?? {}, o = {};
48
48
  return "title" in r && (o.title = r.title), "tips" in r && (o.tips = r.tips), "icon" in r && (o.icon = r.icon), "closable" in r && (o.closable = r.closable), "tabClass" in r && (o.tabClass = r.tabClass), "target" in r && (o.target = r.target), "href" in r && (o.href = r.href), o;
49
49
  }
50
- function ne(e, r, o) {
51
- const s = He(e);
50
+ function re(e, r, o) {
51
+ const s = We(e);
52
52
  return {
53
53
  id: z(e),
54
54
  to: e.fullPath,
55
55
  fullPath: e.fullPath,
56
56
  matched: e,
57
- alive: Ke(e, o),
58
- reusable: Ee(e, !1),
57
+ alive: $e(e, o),
58
+ reusable: Pe(e, !1),
59
59
  closable: s.closable ?? !0,
60
60
  renderKey: typeof r.renderKey == "number" ? r.renderKey : 0,
61
61
  ...s,
@@ -63,27 +63,27 @@ function ne(e, r, o) {
63
63
  };
64
64
  }
65
65
  function Re(e, r, o, s) {
66
- if (!e.find((p) => p.id === r.id)) {
66
+ if (!e.find((g) => g.id === r.id)) {
67
67
  if (o === "next" && s) {
68
- const p = e.findIndex((w) => w.id === s);
69
- if (p !== -1) {
70
- e.splice(p + 1, 0, r);
68
+ const g = e.findIndex((w) => w.id === s);
69
+ if (g !== -1) {
70
+ e.splice(g + 1, 0, r);
71
71
  return;
72
72
  }
73
73
  }
74
74
  e.push(r);
75
75
  }
76
76
  }
77
- function oe(e, r, o, s) {
77
+ function ae(e, r, o, s) {
78
78
  if (!r || r <= 0) return;
79
- const a = e.filter((p) => p.alive);
79
+ const a = e.filter((g) => g.alive);
80
80
  for (; a.length > r; ) {
81
- const p = a.shift();
82
- if (!p || p.id === o) continue;
83
- const w = e.findIndex((i) => i.id === p.id);
81
+ const g = a.shift();
82
+ if (!g || g.id === o) continue;
83
+ const w = e.findIndex((i) => i.id === g.id);
84
84
  if (w > -1) {
85
- const i = e[w], m = `${i.id}::${i.renderKey ?? 0}`;
86
- s.delete(m), i.alive = !1;
85
+ const i = e[w], h = `${i.id}::${i.renderKey ?? 0}`;
86
+ s.delete(h), i.alive = !1;
87
87
  }
88
88
  }
89
89
  }
@@ -103,183 +103,183 @@ function Yt(e) {
103
103
  return "title" in e && (r.title = e.title), "tips" in e && (r.tips = e.tips), "icon" in e && (r.icon = e.icon), "tabClass" in e && (r.tabClass = e.tabClass), "closable" in e && (r.closable = e.closable), "renderKey" in e && typeof e.renderKey == "number" && (r.renderKey = e.renderKey), r;
104
104
  }
105
105
  function Ft(e, r = {}) {
106
- const o = _t(r), s = ie([]), a = x(null), p = kt(), w = x(null), i = ie(/* @__PURE__ */ new Set()), m = K(() => Array.from(i));
107
- let v = !1;
106
+ const o = _t(r), s = se([]), a = x(null), g = Rt(), w = x(null), i = se(/* @__PURE__ */ new Set()), h = E(() => Array.from(i));
107
+ let p = !1;
108
108
  function T(u) {
109
- const d = typeof u.matched == "object" ? u : _(e, u);
109
+ const d = typeof u.matched == "object" ? u : N(e, u);
110
110
  return {
111
111
  key: z(d),
112
112
  fullPath: d.fullPath,
113
- alive: Ke(d, o.keepAlive),
114
- reusable: Ee(d, !1),
113
+ alive: $e(d, o.keepAlive),
114
+ reusable: Pe(d, !1),
115
115
  matched: d
116
116
  };
117
117
  }
118
118
  function I(u) {
119
119
  const d = z(u);
120
- let c = s.find((y) => y.id === d);
121
- const h = Ke(u, o.keepAlive);
122
- if (c) {
123
- c.fullPath = u.fullPath, c.to = u.fullPath, c.matched = u, c.reusable = Ee(u, c.reusable), typeof c.renderKey != "number" && (c.renderKey = 0);
124
- const y = `${d}::${c.renderKey}`;
125
- return h ? i.has(y) ? c.alive || (c.alive = !0) : (i.add(y), c.alive = !0) : c.alive && (i.delete(y), c.alive = !1), Object.assign(c, He(u)), c;
120
+ let f = s.find((y) => y.id === d);
121
+ const m = $e(u, o.keepAlive);
122
+ if (f) {
123
+ f.fullPath = u.fullPath, f.to = u.fullPath, f.matched = u, f.reusable = Pe(u, f.reusable), typeof f.renderKey != "number" && (f.renderKey = 0);
124
+ const y = `${d}::${f.renderKey}`;
125
+ return m ? i.has(y) ? f.alive || (f.alive = !0) : (i.add(y), f.alive = !0) : f.alive && (i.delete(y), f.alive = !1), Object.assign(f, We(u)), f;
126
126
  }
127
- if (c = ne(u, {}, o.keepAlive), c.alive) {
128
- const y = `${d}::${c.renderKey ?? 0}`;
127
+ if (f = re(u, {}, o.keepAlive), f.alive) {
128
+ const y = `${d}::${f.renderKey ?? 0}`;
129
129
  i.add(y);
130
130
  }
131
- return Re(s, c, o.appendPosition, a.value), oe(s, o.maxAlive, a.value, i), c;
131
+ return Re(s, f, o.appendPosition, a.value), ae(s, o.maxAlive, a.value, i), f;
132
132
  }
133
- async function A(u, d = !1, c = "sameTab") {
134
- const h = _(e, u), y = z(h), E = a.value === y;
135
- c === "sameTab" && (c = E), c && await j(y, !0), await e[d ? "replace" : "push"](h), E && await F();
133
+ async function A(u, d = !1, f = "sameTab") {
134
+ const m = N(e, u), y = z(m), K = a.value === y;
135
+ f === "sameTab" && (f = K), f && await U(y, !0), await e[d ? "replace" : "push"](m), K && await F();
136
136
  }
137
- function L(u) {
137
+ function O(u) {
138
138
  const d = s.findIndex((C) => C.id === u);
139
139
  if (d === -1) return o.defaultRoute;
140
- const c = s[d + 1], h = s[d - 1], y = s.find((C) => C.id !== u), E = c || h || y;
141
- return E ? E.to : o.defaultRoute;
140
+ const f = s[d + 1], m = s[d - 1], y = s.find((C) => C.id !== u), K = f || m || y;
141
+ return K ? K.to : o.defaultRoute;
142
142
  }
143
- async function O(u = a.value, d = {}) {
143
+ async function j(u = a.value, d = {}) {
144
144
  if (!u) return;
145
145
  if (!d.force && o.keepLastTab && s.length === 1)
146
146
  throw new Error("[RouterTabs] Unable to close the final tab when keepLastTab is true.");
147
- const h = a.value === u && d.redirect !== null, y = h ? d.redirect ?? L(u) : null;
148
- await Y(u, { force: d.force }), d.redirect !== null && h && y && await e.replace(y);
147
+ const m = a.value === u && d.redirect !== null, y = m ? d.redirect ?? O(u) : null;
148
+ await Y(u, { force: d.force }), d.redirect !== null && m && y && await e.replace(y);
149
149
  }
150
150
  async function Y(u, d = {}) {
151
- const c = s.findIndex((E) => E.id === u);
152
- if (c === -1) return;
153
- const h = s[c], y = `${u}::${h.renderKey ?? 0}`;
154
- i.delete(y), h.alive = !1, s.splice(c, 1), w.value === u && (w.value = null), a.value === u && (a.value = null, p.value = void 0);
151
+ const f = s.findIndex((K) => K.id === u);
152
+ if (f === -1) return;
153
+ const m = s[f], y = `${u}::${m.renderKey ?? 0}`;
154
+ i.delete(y), m.alive = !1, s.splice(f, 1), w.value === u && (w.value = null), a.value === u && (a.value = null, g.value = void 0);
155
155
  }
156
- async function j(u = a.value ?? void 0, d = !1) {
156
+ async function U(u = a.value ?? void 0, d = !1) {
157
157
  if (!u) return;
158
- const c = s.find((C) => C.id === u);
159
- if (!c) return;
160
- const h = o.keepAlive && c.alive, y = `${u}::${c.renderKey ?? 0}`;
161
- h && (i.delete(y), c.alive = !1, await M()), c.renderKey = (c.renderKey ?? 0) + 1;
162
- const E = `${u}::${c.renderKey}`;
163
- h && (i.add(E), c.alive = !0), w.value = u, await M(), d || await M(), w.value = null;
158
+ const f = s.find((C) => C.id === u);
159
+ if (!f) return;
160
+ const m = o.keepAlive && f.alive, y = `${u}::${f.renderKey ?? 0}`;
161
+ m && (i.delete(y), f.alive = !1, await L()), f.renderKey = (f.renderKey ?? 0) + 1;
162
+ const K = `${u}::${f.renderKey}`;
163
+ m && (i.add(K), f.alive = !0), w.value = u, await L(), d || await L(), w.value = null;
164
164
  }
165
- async function se(u = !1) {
165
+ async function ce(u = !1) {
166
166
  for (const d of s)
167
- await j(d.id, u);
167
+ await U(d.id, u);
168
168
  }
169
- function ue(u, d) {
170
- const c = s.find((y) => y.id === u);
171
- if (!c) return;
172
- const h = `${u}::${c.renderKey ?? 0}`;
173
- d ? (i.add(h), c.alive = !0, oe(s, o.maxAlive, a.value, i)) : (i.delete(h), c.alive = !1);
169
+ function fe(u, d) {
170
+ const f = s.find((y) => y.id === u);
171
+ if (!f) return;
172
+ const m = `${u}::${f.renderKey ?? 0}`;
173
+ d ? (i.add(m), f.alive = !0, ae(s, o.maxAlive, a.value, i)) : (i.delete(m), f.alive = !1);
174
174
  }
175
- function R(u) {
176
- const d = s.find((h) => h.id === u);
175
+ function k(u) {
176
+ const d = s.find((m) => m.id === u);
177
177
  if (!d) return;
178
- const c = `${u}::${d.renderKey ?? 0}`;
179
- i.delete(c), d.alive = !1, d.renderKey = (d.renderKey ?? 0) + 1;
178
+ const f = `${u}::${d.renderKey ?? 0}`;
179
+ i.delete(f), d.alive = !1, d.renderKey = (d.renderKey ?? 0) + 1;
180
180
  }
181
- function Z() {
181
+ function ee() {
182
182
  i.clear(), s.forEach((u) => {
183
183
  u.alive = !1;
184
184
  });
185
185
  }
186
- function U() {
187
- return m.value.slice();
186
+ function V() {
187
+ return h.value.slice();
188
188
  }
189
- async function D(u = o.defaultRoute) {
190
- s.splice(0, s.length), a.value = null, p.value = void 0;
189
+ async function M(u = o.defaultRoute) {
190
+ s.splice(0, s.length), a.value = null, g.value = void 0;
191
191
  for (const d of o.initialTabs) {
192
- const c = _(e, d.to), h = ne(c, d, o.keepAlive);
193
- s.push(h);
192
+ const f = N(e, d.to), m = re(f, d, o.keepAlive);
193
+ s.push(m);
194
194
  }
195
195
  await e.replace(u);
196
196
  }
197
197
  async function F() {
198
198
  const u = a.value;
199
- u && await j(u, !0);
199
+ u && await U(u, !0);
200
200
  }
201
201
  function H(u) {
202
- return typeof u.matched == "object" ? z(u) : z(_(e, u));
202
+ return typeof u.matched == "object" ? z(u) : z(N(e, u));
203
203
  }
204
- function k() {
204
+ function R() {
205
205
  const u = s.find((d) => d.id === a.value);
206
206
  return {
207
207
  tabs: s.map(zt),
208
208
  active: u ? u.to : null
209
209
  };
210
210
  }
211
- async function ce(u) {
212
- v = !0, s.splice(0, s.length), a.value = null, p.value = void 0;
211
+ async function de(u) {
212
+ p = !0, s.splice(0, s.length), a.value = null, g.value = void 0;
213
213
  const d = u?.tabs ?? [];
214
- for (const h of d)
214
+ for (const m of d)
215
215
  try {
216
- const y = _(e, h.to), E = Yt(h), C = ne(y, E, o.keepAlive);
216
+ const y = N(e, m.to), K = Yt(m), C = re(y, K, o.keepAlive);
217
217
  Re(s, C, "last", null);
218
218
  } catch (y) {
219
- console.warn("[RouterTabs] Failed to restore tab", h, y);
219
+ console.warn("[RouterTabs] Failed to restore tab", m, y);
220
220
  }
221
- v = !1;
222
- const c = u?.active ?? d[d.length - 1]?.to ?? o.defaultRoute;
223
- if (c)
221
+ p = !1;
222
+ const f = u?.active ?? d[d.length - 1]?.to ?? o.defaultRoute;
223
+ if (f)
224
224
  try {
225
- const h = _(e, c), y = e.currentRoute.value;
226
- if (h.fullPath === y.fullPath) {
227
- const E = I(y);
228
- a.value = E.id, p.value = E, oe(s, o.maxAlive, a.value, i);
225
+ const m = N(e, f), y = e.currentRoute.value;
226
+ if (m.fullPath === y.fullPath) {
227
+ const K = I(y);
228
+ a.value = K.id, g.value = K, ae(s, o.maxAlive, a.value, i);
229
229
  return;
230
230
  }
231
- await e.replace(h);
232
- } catch (h) {
233
- console.warn("[RouterTabs] Failed to navigate to restored route", c, h);
231
+ await e.replace(m);
232
+ } catch (m) {
233
+ console.warn("[RouterTabs] Failed to navigate to restored route", f, m);
234
234
  }
235
235
  }
236
236
  return S(
237
237
  () => e.currentRoute.value,
238
238
  (u) => {
239
- if (v) return;
239
+ if (p) return;
240
240
  const d = I(u);
241
- a.value = d.id, p.value = d, oe(s, o.maxAlive, a.value, i);
241
+ a.value = d.id, g.value = d, ae(s, o.maxAlive, a.value, i);
242
242
  },
243
243
  { immediate: !0 }
244
244
  ), o.initialTabs.length && o.initialTabs.forEach((u) => {
245
- const d = _(e, u.to), c = ne(d, u, o.keepAlive);
246
- Re(s, c, "last", null);
245
+ const d = N(e, u.to), f = re(d, u, o.keepAlive);
246
+ Re(s, f, "last", null);
247
247
  }), {
248
248
  options: o,
249
249
  tabs: s,
250
250
  activeId: a,
251
- current: p,
252
- includeKeys: m,
251
+ current: g,
252
+ includeKeys: h,
253
253
  refreshingKey: w,
254
254
  openTab: A,
255
- closeTab: O,
255
+ closeTab: j,
256
256
  removeTab: Y,
257
- refreshTab: j,
258
- refreshAll: se,
259
- setTabAlive: ue,
260
- evictCache: R,
261
- clearCache: Z,
262
- getCacheKeys: U,
263
- reset: D,
257
+ refreshTab: U,
258
+ refreshAll: ce,
259
+ setTabAlive: fe,
260
+ evictCache: k,
261
+ clearCache: ee,
262
+ getCacheKeys: V,
263
+ reset: M,
264
264
  reload: F,
265
265
  getRouteKey: H,
266
266
  matchRoute: T,
267
- snapshot: k,
268
- hydrate: ce,
267
+ snapshot: R,
268
+ hydrate: de,
269
269
  ensureTab: I
270
270
  };
271
271
  }
272
- function je(e) {
272
+ function Ve(e) {
273
273
  return e ? typeof e == "string" ? { name: e } : e : {};
274
274
  }
275
- const le = Symbol("RouterTabsContext"), ae = "router-tabs:snapshot";
276
- function Ue(e = {}) {
277
- const { optional: r = !1 } = e, o = De(le, null);
275
+ const ue = Symbol("RouterTabsContext"), le = "router-tabs:snapshot";
276
+ function _e(e = {}) {
277
+ const { optional: r = !1 } = e, o = Le(ue, null);
278
278
  if (o) return o;
279
- const s = De("$tabs", null);
279
+ const s = Le("$tabs", null);
280
280
  if (s) return s;
281
- const p = Ye()?.appContext.config.globalProperties.$tabs;
282
- if (p) return p;
281
+ const g = Ee()?.appContext.config.globalProperties.$tabs;
282
+ if (g) return g;
283
283
  if (!r)
284
284
  throw new Error("[RouterTabs] useRouterTabs must be used within <router-tab>.");
285
285
  return null;
@@ -293,22 +293,22 @@ function Wt(e) {
293
293
  return decodeURIComponent(s.slice(r.length));
294
294
  return null;
295
295
  }
296
- function Ve(e, r, o) {
296
+ function Ne(e, r, o) {
297
297
  if (typeof document > "u") return;
298
298
  const {
299
299
  expiresInDays: s = 7,
300
300
  path: a = "/",
301
- domain: p,
301
+ domain: g,
302
302
  secure: w,
303
303
  sameSite: i = "lax"
304
- } = o, m = [`${encodeURIComponent(e)}=${encodeURIComponent(r)}`];
304
+ } = o, h = [`${encodeURIComponent(e)}=${encodeURIComponent(r)}`];
305
305
  if (s !== 1 / 0) {
306
- const v = new Date(Date.now() + s * Ht).toUTCString();
307
- m.push(`Expires=${v}`);
306
+ const p = new Date(Date.now() + s * Ht).toUTCString();
307
+ h.push(`Expires=${p}`);
308
308
  }
309
- a && m.push(`Path=${a}`), p && m.push(`Domain=${p}`), w && m.push("Secure"), i && m.push(`SameSite=${i.charAt(0).toUpperCase()}${i.slice(1)}`), document.cookie = m.join("; ");
309
+ a && h.push(`Path=${a}`), g && h.push(`Domain=${g}`), w && h.push("Secure"), i && h.push(`SameSite=${i.charAt(0).toUpperCase()}${i.slice(1)}`), document.cookie = h.join("; ");
310
310
  }
311
- function _e(e, r) {
311
+ function ze(e, r) {
312
312
  if (typeof document > "u") return;
313
313
  const { path: o = "/", domain: s } = r, a = [`${encodeURIComponent(e)}=`];
314
314
  a.push("Expires=Thu, 01 Jan 1970 00:00:01 GMT"), o && a.push(`Path=${o}`), s && a.push(`Domain=${s}`), document.cookie = a.join("; ");
@@ -321,20 +321,20 @@ const Jt = (e) => JSON.stringify(e ?? null), Gt = (e) => {
321
321
  return null;
322
322
  }
323
323
  };
324
- function We(e = {}) {
324
+ function Je(e = {}) {
325
325
  const {
326
- cookieKey: r = ae,
326
+ cookieKey: r = le,
327
327
  serialize: o = Jt,
328
328
  deserialize: s = Gt
329
- } = e, a = Ue({ optional: !0 }), p = x(!0), w = (i, m = "hook") => {
330
- const v = async () => {
331
- p.value = !0;
329
+ } = e, a = _e({ optional: !0 }), g = x(!0), w = (i, h = "hook") => {
330
+ const p = async () => {
331
+ g.value = !0;
332
332
  try {
333
333
  const T = s(Wt(r));
334
334
  if (T && T.tabs?.length) {
335
335
  if (await i.hydrate(T), T.active) {
336
- await M();
337
- const A = i.tabs.find((L) => L.to === T.active);
336
+ await L();
337
+ const A = i.tabs.find((O) => O.to === T.active);
338
338
  A && (i.activeId.value = A.id, i.current.value = A);
339
339
  }
340
340
  } else if (Object.prototype.hasOwnProperty.call(e, "fallbackRoute")) {
@@ -342,13 +342,13 @@ function We(e = {}) {
342
342
  await i.reset(A);
343
343
  }
344
344
  const I = i.snapshot();
345
- I.tabs.length ? Ve(r, o(I), e) : _e(r, e);
345
+ I.tabs.length ? Ne(r, o(I), e) : ze(r, e);
346
346
  } finally {
347
- p.value = !1;
347
+ g.value = !1;
348
348
  }
349
349
  };
350
- m === "immediate" ? v() : Ct(() => {
351
- v();
350
+ h === "immediate" ? p() : Ct(() => {
351
+ p();
352
352
  }), S(
353
353
  () => ({
354
354
  tabs: i.tabs.map((T) => ({
@@ -363,19 +363,19 @@ function We(e = {}) {
363
363
  active: i.activeId.value
364
364
  }),
365
365
  () => {
366
- if (p.value) return;
366
+ if (g.value) return;
367
367
  const T = i.snapshot();
368
- T.tabs.length ? Ve(r, o(T), e) : _e(r, e);
368
+ T.tabs.length ? Ne(r, o(T), e) : ze(r, e);
369
369
  },
370
370
  { deep: !0 }
371
371
  );
372
372
  };
373
- return a ? w(a) : Fe(() => {
374
- const i = Ue({ optional: !0 });
373
+ return a ? w(a) : He(() => {
374
+ const i = _e({ optional: !0 });
375
375
  i && w(i, "immediate");
376
- }), { hydrating: p };
376
+ }), { hydrating: g };
377
377
  }
378
- const qt = Ce({
378
+ const Xt = Ke({
379
379
  name: "RouterTab",
380
380
  components: { RouterView: Vt },
381
381
  props: {
@@ -417,7 +417,7 @@ const qt = Ce({
417
417
  },
418
418
  cookieKey: {
419
419
  type: String,
420
- default: ae
420
+ default: le
421
421
  },
422
422
  persistence: {
423
423
  type: Object,
@@ -430,7 +430,7 @@ const qt = Ce({
430
430
  },
431
431
  emits: ["tab-sort", "tab-sorted"],
432
432
  setup(e, { emit: r }) {
433
- const o = Ye();
433
+ const o = Ee();
434
434
  if (!o)
435
435
  throw new Error("[RouterTab] component must be used within a Vue application context.");
436
436
  const s = o.appContext.app.config.globalProperties.$router;
@@ -444,24 +444,24 @@ const qt = Ce({
444
444
  appendPosition: e.append,
445
445
  defaultRoute: e.defaultPage
446
446
  });
447
- Kt(le, a), o.appContext.config.globalProperties.$tabs = a;
448
- const p = K(() => !!o?.slots?.default), w = K(() => !!o?.slots?.start), i = K(() => !!o?.slots?.end), m = x(0), v = K(() => {
449
- m.value;
447
+ Et(ue, a), o.appContext.config.globalProperties.$tabs = a;
448
+ const g = E(() => !!o?.slots?.default), w = E(() => !!o?.slots?.start), i = E(() => !!o?.slots?.end), h = x(0), p = E(() => {
449
+ h.value;
450
450
  const t = {};
451
451
  return a.tabs.forEach((n) => {
452
- const l = typeof n.title == "string" ? n.title : String(n.title || fe(n));
452
+ const l = typeof n.title == "string" ? n.title : String(n.title || be(n));
453
453
  t[n.id] = l;
454
454
  }), t;
455
455
  });
456
456
  function T() {
457
- m.value++;
457
+ h.value++;
458
458
  }
459
459
  const I = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map();
460
- function L(t, n) {
460
+ function O(t, n) {
461
461
  if (!(!n || I.has(t)))
462
462
  try {
463
463
  I.set(t, n);
464
- const l = a.tabs.find((g) => a.getRouteKey(g.to) === t);
464
+ const l = a.tabs.find((v) => a.getRouteKey(v.to) === t);
465
465
  if (!l) {
466
466
  console.warn(`[RouterTab] Cannot setup watching: tab not found for ${t}`);
467
467
  return;
@@ -469,77 +469,77 @@ const qt = Ce({
469
469
  const b = [];
470
470
  if (n.routeTabTitle !== void 0)
471
471
  try {
472
- const g = S(
472
+ const v = S(
473
473
  () => {
474
- const f = n.routeTabTitle;
475
- return f && typeof f == "object" && "value" in f ? f.value : f;
474
+ const c = n.routeTabTitle;
475
+ return c && typeof c == "object" && "value" in c ? c.value : c;
476
476
  },
477
- (f) => {
478
- if (f != null) {
479
- const N = String(f);
480
- l.title = N, T();
477
+ (c) => {
478
+ if (c != null) {
479
+ const D = String(c);
480
+ l.title = D, T();
481
481
  }
482
482
  },
483
483
  { immediate: !0 }
484
484
  );
485
- b.push(g);
486
- } catch (g) {
487
- console.error(`[RouterTab] Error watching routeTabTitle for ${t}:`, g);
485
+ b.push(v);
486
+ } catch (v) {
487
+ console.error(`[RouterTab] Error watching routeTabTitle for ${t}:`, v);
488
488
  }
489
489
  if (n.routeTabIcon !== void 0)
490
490
  try {
491
- const g = S(
491
+ const v = S(
492
492
  () => {
493
- const f = n.routeTabIcon;
494
- return f && typeof f == "object" && "value" in f ? f.value : f;
493
+ const c = n.routeTabIcon;
494
+ return c && typeof c == "object" && "value" in c ? c.value : c;
495
495
  },
496
- (f) => {
497
- f != null && (l.icon = String(f), T());
496
+ (c) => {
497
+ c != null && (l.icon = String(c), T());
498
498
  },
499
499
  { immediate: !0 }
500
500
  );
501
- b.push(g);
502
- } catch (g) {
503
- console.error(`[RouterTab] Error watching routeTabIcon for ${t}:`, g);
501
+ b.push(v);
502
+ } catch (v) {
503
+ console.error(`[RouterTab] Error watching routeTabIcon for ${t}:`, v);
504
504
  }
505
505
  if (n.routeTabClosable !== void 0)
506
506
  try {
507
- const g = S(
507
+ const v = S(
508
508
  () => {
509
- const f = n.routeTabClosable;
510
- return f && typeof f == "object" && "value" in f ? f.value : f;
509
+ const c = n.routeTabClosable;
510
+ return c && typeof c == "object" && "value" in c ? c.value : c;
511
511
  },
512
- (f) => {
513
- f != null && (l.closable = !!f, T());
512
+ (c) => {
513
+ c != null && (l.closable = !!c, T());
514
514
  },
515
515
  { immediate: !0 }
516
516
  );
517
- b.push(g);
518
- } catch (g) {
519
- console.error(`[RouterTab] Error watching routeTabClosable for ${t}:`, g);
517
+ b.push(v);
518
+ } catch (v) {
519
+ console.error(`[RouterTab] Error watching routeTabClosable for ${t}:`, v);
520
520
  }
521
521
  if (n.routeTabMeta !== void 0)
522
522
  try {
523
- const g = S(
523
+ const v = S(
524
524
  () => {
525
- const f = n.routeTabMeta;
526
- return f && typeof f == "object" && "value" in f ? f.value : f;
525
+ const c = n.routeTabMeta;
526
+ return c && typeof c == "object" && "value" in c ? c.value : c;
527
527
  },
528
- (f) => {
529
- f && typeof f == "object" && (Object.assign(l, f), T());
528
+ (c) => {
529
+ c && typeof c == "object" && (Object.assign(l, c), T());
530
530
  },
531
531
  { immediate: !0, deep: !0 }
532
532
  );
533
- b.push(g);
534
- } catch (g) {
535
- console.error(`[RouterTab] Error watching routeTabMeta for ${t}:`, g);
533
+ b.push(v);
534
+ } catch (v) {
535
+ console.error(`[RouterTab] Error watching routeTabMeta for ${t}:`, v);
536
536
  }
537
537
  A.set(t, b);
538
538
  } catch (l) {
539
- console.error(`[RouterTab] Error in setupComponentWatching for ${t}:`, l), O(t);
539
+ console.error(`[RouterTab] Error in setupComponentWatching for ${t}:`, l), j(t);
540
540
  }
541
541
  }
542
- function O(t) {
542
+ function j(t) {
543
543
  try {
544
544
  const n = A.get(t);
545
545
  n && (n.forEach((l) => {
@@ -555,29 +555,29 @@ const qt = Ce({
555
555
  }
556
556
  function Y(t, n) {
557
557
  try {
558
- t ? t.routeTabTitle !== void 0 || t.routeTabIcon !== void 0 || t.routeTabClosable !== void 0 ? L(n, t) : t.$ && (t.$.routeTabTitle !== void 0 || t.$.routeTabIcon !== void 0 || t.$.routeTabClosable !== void 0) && L(n, t.$) : t === null && O(n);
558
+ t ? t.routeTabTitle !== void 0 || t.routeTabIcon !== void 0 || t.routeTabClosable !== void 0 ? O(n, t) : t.$ && (t.$.routeTabTitle !== void 0 || t.$.routeTabIcon !== void 0 || t.$.routeTabClosable !== void 0) && O(n, t.$) : t === null && j(n);
559
559
  } catch (l) {
560
- console.error(`[RouterTab] Error handling component ref for ${n}:`, l), O(n);
560
+ console.error(`[RouterTab] Error handling component ref for ${n}:`, l), j(n);
561
561
  }
562
562
  }
563
- Et((t, n, l) => (console.error("[RouterTab] Error captured from component:", t, l), !1));
564
- let j = x(!1);
563
+ Kt((t, n, l) => (console.error("[RouterTab] Error captured from component:", t, l), !1));
564
+ let U = x(!1);
565
565
  if (e.cookieKey !== null || e.persistence) {
566
566
  const t = {
567
567
  ...e.persistence ?? {}
568
568
  };
569
- e.cookieKey !== null ? t.cookieKey = e.cookieKey || ae : t.cookieKey || (t.cookieKey = ae), j = We(t).hydrating;
569
+ e.cookieKey !== null ? t.cookieKey = e.cookieKey || le : t.cookieKey || (t.cookieKey = le), U = Je(t).hydrating;
570
570
  }
571
- const se = K(() => je(e.tabTransition)), ue = K(() => je(e.pageTransition)), R = ie({
571
+ const ce = E(() => Ve(e.tabTransition)), fe = E(() => Ve(e.pageTransition)), k = se({
572
572
  visible: !1,
573
573
  target: null,
574
574
  position: { x: 0, y: 0 }
575
- }), Z = x(null), U = x([]), D = x(-1), F = x(null), H = /* @__PURE__ */ new Map(), k = ie({
575
+ }), ee = x(null), V = x([]), M = x(-1), F = x(null), H = /* @__PURE__ */ new Map(), R = se({
576
576
  dragging: !1,
577
577
  dragIndex: -1,
578
578
  dropIndex: -1,
579
579
  dragTab: null
580
- }), ce = [
580
+ }), de = [
581
581
  "refresh",
582
582
  "refreshAll",
583
583
  "close",
@@ -592,11 +592,11 @@ const qt = Ce({
592
592
  const n = u(t.id);
593
593
  return n > 0 ? a.tabs.slice(0, n) : [];
594
594
  }
595
- function c(t) {
595
+ function f(t) {
596
596
  const n = u(t.id);
597
597
  return n > -1 ? a.tabs.slice(n + 1) : [];
598
598
  }
599
- function h(t) {
599
+ function m(t) {
600
600
  return a.tabs.filter((n) => n.id !== t.id);
601
601
  }
602
602
  async function y(t, n) {
@@ -607,7 +607,7 @@ const qt = Ce({
607
607
  a.activeId.value !== n.id && await a.openTab(n.to, !0, !1);
608
608
  }
609
609
  }
610
- const E = {
610
+ const K = {
611
611
  refresh: {
612
612
  label: "Refresh",
613
613
  handler: async ({ target: t }) => {
@@ -625,7 +625,7 @@ const qt = Ce({
625
625
  handler: async ({ target: t }) => {
626
626
  await a.closeTab(t.id);
627
627
  },
628
- enable: ({ target: t }) => be(t)
628
+ enable: ({ target: t }) => pe(t)
629
629
  },
630
630
  closeLefts: {
631
631
  label: "Close to the Left",
@@ -637,79 +637,79 @@ const qt = Ce({
637
637
  closeRights: {
638
638
  label: "Close to the Right",
639
639
  handler: async ({ target: t }) => {
640
- await y(c(t), t);
640
+ await y(f(t), t);
641
641
  },
642
- enable: ({ target: t }) => c(t).some((n) => n.closable !== !1)
642
+ enable: ({ target: t }) => f(t).some((n) => n.closable !== !1)
643
643
  },
644
644
  closeOthers: {
645
645
  label: "Close Others",
646
646
  handler: async ({ target: t }) => {
647
- await y(h(t), t);
647
+ await y(m(t), t);
648
648
  },
649
- enable: ({ target: t }) => h(t).some((n) => n.closable !== !1)
649
+ enable: ({ target: t }) => m(t).some((n) => n.closable !== !1)
650
650
  }
651
651
  };
652
652
  function C() {
653
- R.visible = !1, R.target = null, D.value = -1, U.value = [];
653
+ k.visible = !1, k.target = null, M.value = -1, V.value = [];
654
654
  }
655
- function Qe(t, n) {
656
- e.contextmenu && (R.target = t, R.position.x = n.clientX, R.position.y = n.clientY, M(() => {
657
- R.visible = !0, document.addEventListener("click", C, { once: !0 }), M(() => {
658
- et();
655
+ function Ze(t, n) {
656
+ e.contextmenu && (k.target = t, k.position.x = n.clientX, k.position.y = n.clientY, L(() => {
657
+ k.visible = !0, document.addEventListener("click", C, { once: !0 }), L(() => {
658
+ tt();
659
659
  });
660
660
  }));
661
661
  }
662
- function Ze(t, n) {
663
- const l = typeof t == "string" ? { id: t } : t, b = E[l.id], g = l.label ?? b?.label ?? String(l.id), f = l.visible ?? b?.visible ?? !0;
664
- if (!(typeof f == "function" ? f(n) : f !== !1)) return null;
665
- const ve = l.enable ?? b?.enable ?? !0, wt = typeof ve == "function" ? ve(n) : ve !== !1, Be = l.handler ?? b?.handler;
666
- if (!Be) return null;
667
- const Rt = async () => {
668
- await Promise.resolve(Be(n));
662
+ function et(t, n) {
663
+ const l = typeof t == "string" ? { id: t } : t, b = K[l.id], v = l.label ?? b?.label ?? String(l.id), c = l.visible ?? b?.visible ?? !0;
664
+ if (!(typeof c == "function" ? c(n) : c !== !1)) return null;
665
+ const X = l.enable ?? b?.enable ?? !0, Me = typeof X == "function" ? X(n) : X !== !1, ne = l.handler ?? b?.handler;
666
+ if (!ne) return null;
667
+ const he = async () => {
668
+ await Promise.resolve(ne(n));
669
669
  };
670
670
  return {
671
671
  id: String(l.id),
672
- label: g,
673
- disabled: !wt,
674
- action: Rt
672
+ label: v,
673
+ disabled: !Me,
674
+ action: he
675
675
  };
676
676
  }
677
- const W = K(() => {
678
- if (!R.visible || !R.target || e.contextmenu === !1) return [];
679
- const t = Array.isArray(e.contextmenu) ? e.contextmenu : ce, n = { target: R.target, controller: a };
680
- return t.map((l) => Ze(l, n)).filter((l) => !!l);
677
+ const W = E(() => {
678
+ if (!k.visible || !k.target || e.contextmenu === !1) return [];
679
+ const t = Array.isArray(e.contextmenu) ? e.contextmenu : de, n = { target: k.target, controller: a };
680
+ return t.map((l) => et(l, n)).filter((l) => !!l);
681
681
  });
682
- function et() {
683
- const t = Z.value;
682
+ function tt() {
683
+ const t = ee.value;
684
684
  if (!t) return;
685
- const n = 8, { innerWidth: l, innerHeight: b } = window, g = t.getBoundingClientRect();
686
- let f = R.position.x, N = R.position.y;
687
- g.right > l - n && (f = Math.max(n, l - g.width - n)), g.bottom > b - n && (N = Math.max(n, b - g.height - n)), (f !== R.position.x || N !== R.position.y) && (R.position.x = f, R.position.y = N);
685
+ const n = 8, { innerWidth: l, innerHeight: b } = window, v = t.getBoundingClientRect();
686
+ let c = k.position.x, D = k.position.y;
687
+ v.right > l - n && (c = Math.max(n, l - v.width - n)), v.bottom > b - n && (D = Math.max(n, b - v.height - n)), (c !== k.position.x || D !== k.position.y) && (k.position.x = c, k.position.y = D);
688
688
  }
689
- function tt(t, n) {
690
- U.value[n] = t ?? null;
689
+ function nt(t, n) {
690
+ V.value[n] = t ?? null;
691
691
  }
692
- function nt(t) {
692
+ function ot(t) {
693
693
  if (t < 0) return;
694
- U.value[t]?.focus({ preventScroll: !0 });
694
+ V.value[t]?.focus({ preventScroll: !0 });
695
695
  }
696
- function ee(t, n, l = W.value) {
696
+ function te(t, n, l = W.value) {
697
697
  if (!l.length) return -1;
698
698
  const b = l.length;
699
- let g = t;
700
- for (let f = 0; f < b; f++)
701
- if (g = (g + n + b) % b, !l[g].disabled) return g;
699
+ let v = t;
700
+ for (let c = 0; c < b; c++)
701
+ if (v = (v + n + b) % b, !l[v].disabled) return v;
702
702
  return -1;
703
703
  }
704
704
  function J(t) {
705
- D.value = t, !(t < 0) && M(() => nt(t));
705
+ M.value = t, !(t < 0) && L(() => ot(t));
706
706
  }
707
- function Ae(t) {
708
- const n = ee(D.value, t);
707
+ function Ie(t) {
708
+ const n = te(M.value, t);
709
709
  n !== -1 && J(n);
710
710
  }
711
- function ot(t) {
712
- if (!R.visible) return;
711
+ function rt(t) {
712
+ if (!k.visible) return;
713
713
  const n = t.key, l = W.value;
714
714
  if (!l.length) return;
715
715
  if (n === "Tab") {
@@ -731,25 +731,25 @@ const qt = Ce({
731
731
  switch (t.preventDefault(), n) {
732
732
  case "ArrowDown":
733
733
  case "ArrowRight":
734
- Ae(1);
734
+ Ie(1);
735
735
  break;
736
736
  case "ArrowUp":
737
737
  case "ArrowLeft":
738
- Ae(-1);
738
+ Ie(-1);
739
739
  break;
740
740
  case "Home":
741
- J(ee(-1, 1));
741
+ J(te(-1, 1));
742
742
  break;
743
743
  case "End":
744
- J(ee(l.length, -1));
744
+ J(te(l.length, -1));
745
745
  break;
746
746
  case "Enter":
747
747
  case " ":
748
748
  case "Spacebar": {
749
- const g = D.value;
750
- if (g > -1) {
751
- const f = l[g];
752
- f.disabled || Se(f);
749
+ const v = M.value;
750
+ if (v > -1) {
751
+ const c = l[v];
752
+ c.disabled || xe(c);
753
753
  }
754
754
  break;
755
755
  }
@@ -758,70 +758,79 @@ const qt = Ce({
758
758
  break;
759
759
  }
760
760
  }
761
- async function Se(t) {
761
+ async function xe(t) {
762
762
  t.disabled || (C(), await t.action());
763
763
  }
764
- function fe(t) {
764
+ function be(t) {
765
765
  return typeof t.title == "string" && t.title.trim() ? t.title : Array.isArray(t.title) && t.title.length && String(t.title[0]).trim() ? String(t.title[0]) : "Untitled";
766
766
  }
767
- function rt(t) {
768
- return v.value[t.id] || fe(t);
767
+ function at(t) {
768
+ return p.value[t.id] || be(t);
769
769
  }
770
- function Ie(t, n) {
771
- return Ce({
770
+ function Be(t, n) {
771
+ return Ke({
772
772
  name: n,
773
- setup(l, { attrs: b, slots: g }) {
774
- return () => Pt(t, b, g);
773
+ setup(l, { attrs: b, slots: v }) {
774
+ const c = x(), D = Ee();
775
+ if (D?.proxy) {
776
+ const X = D.proxy;
777
+ Object.entries({
778
+ routeTabTitle: () => c.value?.routeTabTitle,
779
+ routeTabIcon: () => c.value?.routeTabIcon,
780
+ routeTabClosable: () => c.value?.routeTabClosable,
781
+ routeTabMeta: () => c.value?.routeTabMeta,
782
+ $: () => c.value
783
+ }).forEach(([ne, he]) => {
784
+ Object.defineProperty(X, ne, {
785
+ get: he,
786
+ configurable: !0
787
+ });
788
+ });
789
+ }
790
+ return () => Pt(t, { ...b, ref: c }, v);
775
791
  }
776
792
  });
777
793
  }
778
- const G = /* @__PURE__ */ new Map(), de = x(0);
779
- function at(t, n, l) {
780
- G.has(l) || (G.set(l, n), de.value++), t && Y(t, l);
794
+ const G = /* @__PURE__ */ new Map(), ge = x(0);
795
+ function it(t, n, l) {
796
+ G.has(l) || (G.set(l, n), ge.value++), t && Y(t, l);
781
797
  }
782
- function it(t, n) {
798
+ function lt(t, n) {
783
799
  return t && ((!t.name || t.name !== n) && (t.name = n), t);
784
800
  }
785
- function lt(t, n) {
801
+ function st(t, n) {
786
802
  if (!t) return t;
787
803
  const l = G.get(n);
788
804
  if (l) return l;
789
- const b = Ie(t, n);
790
- return G.set(n, b), de.value++, b;
805
+ const b = Be(t, n);
806
+ return G.set(n, b), ge.value++, b;
791
807
  }
792
- function st(t) {
808
+ function ut(t) {
793
809
  const n = a.getRouteKey(t), l = s.currentRoute.value, b = a.getRouteKey(l);
794
810
  return n === b;
795
811
  }
796
- function ut(t) {
797
- const n = a.getRouteKey(t), l = a.tabs.find((f) => f.id === n);
812
+ function ct(t) {
813
+ const n = a.getRouteKey(t), l = a.tabs.find((c) => c.id === n);
798
814
  if (!l)
799
- return console.warn("[RouterTab] Tab not found for route:", n), `${n}::0`;
800
- const b = l.renderKey ?? 0, g = `${n}::${b}`;
801
- return (n.includes("students") || n.includes("classroom") || n.includes("quiz")) && console.log(`[getComponentCacheKey] Route: ${t.fullPath}`, {
802
- routeKey: n,
803
- renderKey: b,
804
- cacheKey: g,
805
- tabAlive: l.alive,
806
- includeKeys: pe.value,
807
- isIncluded: pe.value.includes(g)
808
- }), g;
815
+ return `${n}::0`;
816
+ const b = l.renderKey ?? 0;
817
+ return `${n}::${b}`;
809
818
  }
810
- function be(t) {
819
+ function pe(t) {
811
820
  return !(t.closable === !1 || a.options.keepLastTab && a.tabs.length <= 1);
812
821
  }
813
- async function ct(t) {
822
+ async function ft(t) {
814
823
  await a.closeTab(t.id);
815
824
  }
816
- function ft(t, n) {
825
+ function dt(t, n) {
817
826
  n ? H.set(t, n) : H.delete(t);
818
827
  }
819
- function ge(t) {
820
- M(() => {
828
+ function ve(t) {
829
+ L(() => {
821
830
  const n = H.get(t), l = F.value;
822
831
  if (n && l) {
823
- const b = n.getBoundingClientRect(), g = l.getBoundingClientRect();
824
- (b.left < g.left || b.right > g.right) && n.scrollIntoView({
832
+ const b = n.getBoundingClientRect(), v = l.getBoundingClientRect();
833
+ (b.left < v.left || b.right > v.right) && n.scrollIntoView({
825
834
  behavior: "smooth",
826
835
  block: "nearest",
827
836
  inline: "nearest"
@@ -829,62 +838,62 @@ const qt = Ce({
829
838
  }
830
839
  });
831
840
  }
832
- function dt(t) {
841
+ function bt(t) {
833
842
  if (t.href && typeof window < "u") {
834
843
  t.target && t.target !== "_self" ? window.open(t.href, t.target) : window.location.assign(t.href);
835
844
  return;
836
845
  }
837
- a.activeId.value !== t.id && (a.openTab(t.to, !1), ge(t.id));
846
+ a.activeId.value !== t.id && (a.openTab(t.to, !1), ve(t.id));
838
847
  }
839
- function bt(t) {
848
+ function gt(t) {
840
849
  return [
841
850
  "router-tab__item",
842
851
  {
843
852
  "is-active": a.activeId.value === t.id,
844
- "is-closable": be(t),
845
- "is-dragging": k.dragging && k.dragTab?.id === t.id,
846
- "is-drag-over": k.dropIndex === u(t.id)
853
+ "is-closable": pe(t),
854
+ "is-dragging": R.dragging && R.dragTab?.id === t.id,
855
+ "is-drag-over": R.dropIndex === u(t.id)
847
856
  },
848
857
  t.tabClass
849
858
  ];
850
859
  }
851
- function gt(t) {
860
+ function pt(t) {
852
861
  const n = a.getRouteKey(t), l = a.tabs.find((b) => b.id === n);
853
862
  return l ? l.alive : !1;
854
863
  }
855
- function pt(t) {
864
+ function vt(t) {
856
865
  const n = a.getRouteKey(t);
857
866
  return !!a.tabs.find((b) => b.id === n);
858
867
  }
859
- function vt(t, n, l) {
860
- e.sortable && (k.dragging = !0, k.dragIndex = n, k.dragTab = t, l.dataTransfer && (l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", t.id)), r("tab-sort", { tab: t, index: n }));
868
+ function ht(t, n, l) {
869
+ e.sortable && (R.dragging = !0, R.dragIndex = n, R.dragTab = t, l.dataTransfer && (l.dataTransfer.effectAllowed = "move", l.dataTransfer.setData("text/plain", t.id)), r("tab-sort", { tab: t, index: n }));
861
870
  }
862
871
  function mt(t, n) {
863
- !e.sortable || !k.dragging || (n.preventDefault(), n.dataTransfer && (n.dataTransfer.dropEffect = "move"));
872
+ !e.sortable || !R.dragging || (n.preventDefault(), n.dataTransfer && (n.dataTransfer.dropEffect = "move"));
864
873
  }
865
- function ht(t) {
866
- !e.sortable || !k.dragging || (k.dropIndex = t);
874
+ function yt(t) {
875
+ !e.sortable || !R.dragging || (R.dropIndex = t);
867
876
  }
868
- function yt() {
869
- !e.sortable || k.dragging;
877
+ function Tt() {
878
+ !e.sortable || R.dragging;
870
879
  }
871
- function Tt(t, n) {
872
- if (!(!e.sortable || !k.dragging)) {
873
- if (n.preventDefault(), k.dragIndex !== -1 && k.dragIndex !== t) {
874
- const l = a.tabs.splice(k.dragIndex, 1)[0];
880
+ function wt(t, n) {
881
+ if (!(!e.sortable || !R.dragging)) {
882
+ if (n.preventDefault(), R.dragIndex !== -1 && R.dragIndex !== t) {
883
+ const l = a.tabs.splice(R.dragIndex, 1)[0];
875
884
  a.tabs.splice(t, 0, l), r("tab-sorted", {
876
885
  tab: l,
877
- fromIndex: k.dragIndex,
886
+ fromIndex: R.dragIndex,
878
887
  toIndex: t
879
888
  });
880
889
  }
881
- xe();
890
+ De();
882
891
  }
883
892
  }
884
- function xe() {
885
- k.dragging = !1, k.dragIndex = -1, k.dropIndex = -1, k.dragTab = null;
893
+ function De() {
894
+ R.dragging = !1, R.dragIndex = -1, R.dropIndex = -1, R.dragTab = null;
886
895
  }
887
- Fe(() => {
896
+ He(() => {
888
897
  document.addEventListener("keydown", C);
889
898
  }), $t(() => {
890
899
  document.removeEventListener("keydown", C), o.appContext.config.globalProperties.$tabs = null, A.forEach((t) => {
@@ -904,14 +913,14 @@ const qt = Ce({
904
913
  ), S(
905
914
  () => a.activeId.value,
906
915
  (t) => {
907
- t && ge(t), C();
916
+ t && ve(t), C();
908
917
  }
909
918
  ), S(
910
919
  () => a.tabs.length,
911
920
  () => {
912
921
  const t = new Set(a.tabs.map((l) => l.id));
913
922
  Array.from(I.keys()).forEach((l) => {
914
- t.has(l) || (console.log(`[RouterTab] Cleaning up stale component instance: ${l}`), O(l));
923
+ t.has(l) || j(l);
915
924
  });
916
925
  }
917
926
  ), S(
@@ -922,74 +931,74 @@ const qt = Ce({
922
931
  ), S(
923
932
  () => W.value.length,
924
933
  (t) => {
925
- R.visible && t === 0 && C();
934
+ k.visible && t === 0 && C();
926
935
  },
927
936
  { flush: "post" }
928
937
  // Run after component updates to prevent blocking render
929
938
  ), S(W, (t) => {
930
- if (!R.visible) return;
931
- U.value = new Array(t.length).fill(null);
932
- const n = ee(-1, 1, t);
939
+ if (!k.visible) return;
940
+ V.value = new Array(t.length).fill(null);
941
+ const n = te(-1, 1, t);
933
942
  J(n);
934
943
  }, { flush: "post" }), S(
935
- () => R.visible,
944
+ () => k.visible,
936
945
  (t) => {
937
- t || (D.value = -1, U.value = []);
946
+ t || (M.value = -1, V.value = []);
938
947
  }
939
948
  );
940
- const pe = a.includeKeys;
949
+ const kt = a.includeKeys;
941
950
  return {
942
951
  controller: a,
943
952
  tabs: a.tabs,
944
- includeKeys: pe,
945
- persistenceHydrating: j,
953
+ includeKeys: kt,
954
+ persistenceHydrating: U,
946
955
  componentCache: G,
947
- componentCacheTrigger: de,
948
- cacheCurrentComponent: at,
949
- tabTransitionProps: se,
950
- pageTransitionProps: ue,
951
- buildTabClass: bt,
952
- activate: dt,
953
- close: ct,
954
- context: R,
956
+ componentCacheTrigger: ge,
957
+ cacheCurrentComponent: it,
958
+ tabTransitionProps: ce,
959
+ pageTransitionProps: fe,
960
+ buildTabClass: gt,
961
+ activate: bt,
962
+ close: ft,
963
+ context: k,
955
964
  menuItems: W,
956
- handleMenuAction: Se,
957
- showContextMenu: Qe,
965
+ handleMenuAction: xe,
966
+ showContextMenu: Ze,
958
967
  hideContextMenu: C,
959
- getTabTitle: fe,
960
- isClosable: be,
961
- isTabCached: gt,
962
- isTabReady: pt,
963
- hasCustomSlot: p,
968
+ getTabTitle: be,
969
+ isClosable: pe,
970
+ isTabCached: pt,
971
+ isTabReady: vt,
972
+ hasCustomSlot: g,
964
973
  hasStartSlot: w,
965
974
  hasEndSlot: i,
966
- onDragStart: vt,
975
+ onDragStart: ht,
967
976
  onDragOver: mt,
968
- onDragEnter: ht,
969
- onDragLeave: yt,
970
- onDrop: Tt,
971
- onDragEnd: xe,
972
- setupComponentWatching: L,
973
- cleanupComponentWatching: O,
977
+ onDragEnter: yt,
978
+ onDragLeave: Tt,
979
+ onDrop: wt,
980
+ onDragEnd: De,
981
+ setupComponentWatching: O,
982
+ cleanupComponentWatching: j,
974
983
  handleComponentRef: Y,
975
- getReactiveTabTitle: rt,
976
- getComponentCacheKey: ut,
977
- createNamedComponent: Ie,
978
- ensureNamedComponent: it,
979
- getNamedComponent: lt,
980
- shouldRenderRoute: st,
984
+ getReactiveTabTitle: at,
985
+ getComponentCacheKey: ct,
986
+ createNamedComponent: Be,
987
+ ensureNamedComponent: lt,
988
+ getNamedComponent: st,
989
+ shouldRenderRoute: ut,
981
990
  triggerTabUpdate: T,
982
- menuRef: Z,
983
- highlightedIndex: D,
984
- setMenuItemRef: tt,
985
- onMenuKeydown: ot,
991
+ menuRef: ee,
992
+ highlightedIndex: M,
993
+ setMenuItemRef: nt,
994
+ onMenuKeydown: rt,
986
995
  highlightMenuIndex: J,
987
996
  scrollContainer: F,
988
- setTabRef: ft,
989
- scrollTabIntoView: ge
997
+ setTabRef: dt,
998
+ scrollTabIntoView: ve
990
999
  };
991
1000
  }
992
- }), Xt = (e, r) => {
1001
+ }), qt = (e, r) => {
993
1002
  const o = e.__vccOpts || e;
994
1003
  for (const [s, a] of r)
995
1004
  o[s] = a;
@@ -1002,87 +1011,87 @@ const qt = Ce({
1002
1011
  class: "router-tab__hydrating",
1003
1012
  "aria-hidden": "true"
1004
1013
  }, ln = ["aria-disabled", "disabled", "tabindex", "onMouseenter", "onClick"];
1005
- function sn(e, r, o, s, a, p) {
1014
+ function sn(e, r, o, s, a, g) {
1006
1015
  const w = At("RouterView");
1007
1016
  return $(), B("div", Qt, [
1008
- V("header", Zt, [
1009
- V("div", {
1017
+ _("header", Zt, [
1018
+ _("div", {
1010
1019
  class: q(["router-tab__slot-start", { "has-content": e.hasStartSlot }])
1011
1020
  }, [
1012
1021
  me(e.$slots, "start")
1013
1022
  ], 2),
1014
- V("div", en, [
1015
- It(xt, he({
1023
+ _("div", en, [
1024
+ It(xt, ye({
1016
1025
  tag: "ul",
1017
1026
  class: "router-tab__nav"
1018
1027
  }, e.tabTransitionProps), {
1019
- default: ye(() => [
1020
- ($(!0), B(Te, null, Me(e.tabs, (i, m) => ($(), B("li", {
1028
+ default: Te(() => [
1029
+ ($(!0), B(we, null, Oe(e.tabs, (i, h) => ($(), B("li", {
1021
1030
  key: i.id,
1022
1031
  class: q(e.buildTabClass(i)),
1023
1032
  "data-title": e.getTabTitle(i),
1024
1033
  draggable: e.sortable,
1025
1034
  ref_for: !0,
1026
- ref: (v) => e.setTabRef(i.id, v),
1027
- onClick: (v) => e.activate(i),
1028
- onAuxclick: we((v) => e.close(i), ["middle", "prevent"]),
1029
- onContextmenu: we((v) => e.showContextMenu(i, v), ["prevent"]),
1030
- onDragstart: (v) => e.onDragStart(i, m, v),
1031
- onDragover: (v) => e.onDragOver(m, v),
1032
- onDragenter: (v) => e.onDragEnter(m),
1033
- onDragleave: r[0] || (r[0] = (...v) => e.onDragLeave && e.onDragLeave(...v)),
1034
- onDrop: (v) => e.onDrop(m, v),
1035
- onDragend: r[1] || (r[1] = (...v) => e.onDragEnd && e.onDragEnd(...v))
1035
+ ref: (p) => e.setTabRef(i.id, p),
1036
+ onClick: (p) => e.activate(i),
1037
+ onAuxclick: ke((p) => e.close(i), ["middle", "prevent"]),
1038
+ onContextmenu: ke((p) => e.showContextMenu(i, p), ["prevent"]),
1039
+ onDragstart: (p) => e.onDragStart(i, h, p),
1040
+ onDragover: (p) => e.onDragOver(h, p),
1041
+ onDragenter: (p) => e.onDragEnter(h),
1042
+ onDragleave: r[0] || (r[0] = (...p) => e.onDragLeave && e.onDragLeave(...p)),
1043
+ onDrop: (p) => e.onDrop(h, p),
1044
+ onDragend: r[1] || (r[1] = (...p) => e.onDragEnd && e.onDragEnd(...p))
1036
1045
  }, [
1037
1046
  i.icon ? ($(), B("i", {
1038
1047
  key: 0,
1039
1048
  class: q(["router-tab__item-icon", i.icon])
1040
- }, null, 2)) : te("", !0),
1041
- V("span", {
1049
+ }, null, 2)) : oe("", !0),
1050
+ _("span", {
1042
1051
  class: "router-tab__item-title",
1043
1052
  title: e.getReactiveTabTitle(i)
1044
- }, Le(e.getReactiveTabTitle(i)), 9, nn),
1053
+ }, je(e.getReactiveTabTitle(i)), 9, nn),
1045
1054
  e.isClosable(i) ? ($(), B("a", {
1046
1055
  key: 1,
1047
1056
  class: "router-tab__item-close",
1048
- onClick: we((v) => e.close(i), ["stop"])
1049
- }, null, 8, on)) : te("", !0)
1057
+ onClick: ke((p) => e.close(i), ["stop"])
1058
+ }, null, 8, on)) : oe("", !0)
1050
1059
  ], 42, tn))), 128))
1051
1060
  ]),
1052
1061
  _: 1
1053
1062
  }, 16)
1054
1063
  ], 512),
1055
- V("div", {
1064
+ _("div", {
1056
1065
  class: q(["router-tab__slot-end", { "has-content": e.hasEndSlot }])
1057
1066
  }, [
1058
1067
  me(e.$slots, "end")
1059
1068
  ], 2)
1060
1069
  ]),
1061
- V("div", rn, [
1062
- e.persistenceHydrating ? ($(), B("div", an)) : ($(), X(w, { key: 0 }, {
1063
- default: ye(({ Component: i, route: m }) => [
1064
- e.hasCustomSlot ? me(e.$slots, "default", Bt(he({ key: 0 }, {
1070
+ _("div", rn, [
1071
+ e.persistenceHydrating ? ($(), B("div", an)) : ($(), Q(w, { key: 0 }, {
1072
+ default: Te(({ Component: i, route: h }) => [
1073
+ e.hasCustomSlot ? me(e.$slots, "default", Bt(ye({ key: 0 }, {
1065
1074
  Component: i,
1066
- route: m,
1075
+ route: h,
1067
1076
  controller: e.controller,
1068
- pageRef: (v) => e.handleComponentRef(v, e.controller.getRouteKey(m))
1069
- }))) : ($(), B(Te, { key: 1 }, [
1070
- e.controller.options.keepAlive ? ($(), X(Dt, {
1077
+ pageRef: (p) => e.handleComponentRef(p, e.controller.getRouteKey(h))
1078
+ }))) : ($(), B(we, { key: 1 }, [
1079
+ e.controller.options.keepAlive ? ($(), Q(Dt, {
1071
1080
  key: 0,
1072
1081
  include: e.includeKeys
1073
1082
  }, [
1074
- i ? ($(), X(Oe(e.getNamedComponent(i, e.getComponentCacheKey(m))), {
1075
- key: e.getComponentCacheKey(m),
1076
- ref: (v) => e.handleComponentRef(v, e.controller.getRouteKey(m)),
1083
+ i ? ($(), Q(Ue(e.getNamedComponent(i, e.getComponentCacheKey(h))), {
1084
+ key: e.getComponentCacheKey(h),
1085
+ ref: (p) => e.handleComponentRef(p, e.controller.getRouteKey(h)),
1077
1086
  class: "router-tab-page"
1078
- })) : te("", !0)
1079
- ], 1032, ["include"])) : ($(), X(Mt, he({ key: 1 }, e.pageTransitionProps, { appear: "" }), {
1080
- default: ye(() => [
1081
- i ? ($(), X(Oe(i), {
1082
- key: e.controller.getRouteKey(m),
1083
- ref: (v) => e.handleComponentRef(v, e.controller.getRouteKey(m)),
1087
+ })) : oe("", !0)
1088
+ ], 1032, ["include"])) : ($(), Q(Mt, ye({ key: 1 }, e.pageTransitionProps, { appear: "" }), {
1089
+ default: Te(() => [
1090
+ i ? ($(), Q(Ue(i), {
1091
+ key: e.controller.getRouteKey(h),
1092
+ ref: (p) => e.handleComponentRef(p, e.controller.getRouteKey(h)),
1084
1093
  class: "router-tab-page"
1085
- })) : te("", !0)
1094
+ })) : oe("", !0)
1086
1095
  ]),
1087
1096
  _: 2
1088
1097
  }, 1040))
@@ -1091,34 +1100,34 @@ function sn(e, r, o, s, a, p) {
1091
1100
  _: 3
1092
1101
  }))
1093
1102
  ]),
1094
- St(V("div", {
1103
+ St(_("div", {
1095
1104
  ref: "menuRef",
1096
1105
  class: "router-tab__contextmenu",
1097
1106
  role: "menu",
1098
1107
  onKeydown: r[2] || (r[2] = (...i) => e.onMenuKeydown && e.onMenuKeydown(...i)),
1099
1108
  style: Lt({ left: e.context.position.x + "px", top: e.context.position.y + "px" })
1100
1109
  }, [
1101
- ($(!0), B(Te, null, Me(e.menuItems, (i, m) => ($(), B("a", {
1110
+ ($(!0), B(we, null, Oe(e.menuItems, (i, h) => ($(), B("a", {
1102
1111
  key: i.id,
1103
1112
  role: "menuitem",
1104
- class: q(["router-tab__contextmenu-item", { "is-focused": m === e.highlightedIndex }]),
1113
+ class: q(["router-tab__contextmenu-item", { "is-focused": h === e.highlightedIndex }]),
1105
1114
  "aria-disabled": i.disabled,
1106
1115
  disabled: i.disabled,
1107
- tabindex: i.disabled ? -1 : m === e.highlightedIndex ? 0 : -1,
1116
+ tabindex: i.disabled ? -1 : h === e.highlightedIndex ? 0 : -1,
1108
1117
  ref_for: !0,
1109
- ref: (v) => e.setMenuItemRef(v, m),
1110
- onMouseenter: (v) => !i.disabled && e.highlightMenuIndex(m),
1111
- onClick: (v) => e.handleMenuAction(i)
1112
- }, Le(i.label), 43, ln))), 128))
1118
+ ref: (p) => e.setMenuItemRef(p, h),
1119
+ onMouseenter: (p) => !i.disabled && e.highlightMenuIndex(h),
1120
+ onClick: (p) => e.handleMenuAction(i)
1121
+ }, je(i.label), 43, ln))), 128))
1113
1122
  ], 36), [
1114
1123
  [Ot, e.context.visible && e.context.target]
1115
1124
  ])
1116
1125
  ]);
1117
1126
  }
1118
- const Ne = /* @__PURE__ */ Xt(qt, [["render", sn]]), un = {
1127
+ const Ye = /* @__PURE__ */ qt(Xt, [["render", sn]]), un = {
1119
1128
  class: "router-tabs",
1120
1129
  "aria-hidden": "true"
1121
- }, ke = /* @__PURE__ */ Ce({
1130
+ }, Ce = /* @__PURE__ */ Ke({
1122
1131
  name: "RouterTabs",
1123
1132
  __name: "RouterTabs",
1124
1133
  props: {
@@ -1133,10 +1142,10 @@ const Ne = /* @__PURE__ */ Xt(qt, [["render", sn]]), un = {
1133
1142
  fallbackRoute: {}
1134
1143
  },
1135
1144
  setup(e) {
1136
- return We(e), (o, s) => ($(), B("span", un));
1145
+ return Je(e), (o, s) => ($(), B("span", un));
1137
1146
  }
1138
- }), Je = "tab-theme-style", Ge = "tab-theme-primary-color", cn = "system", qe = "(prefers-color-scheme: dark)";
1139
- let Q = null;
1147
+ }), Ge = "tab-theme-style", Xe = "tab-theme-primary-color", cn = "system", qe = "(prefers-color-scheme: dark)";
1148
+ let Z = null;
1140
1149
  const P = {
1141
1150
  primary: "#034960",
1142
1151
  background: "#ffffff",
@@ -1178,44 +1187,44 @@ function dn(e) {
1178
1187
  return null;
1179
1188
  }
1180
1189
  }
1181
- function $e(e) {
1190
+ function Ae(e) {
1182
1191
  typeof document > "u" || (document.documentElement.style.setProperty("--router-tab-primary", e.primary ?? P.primary), document.documentElement.style.setProperty("--router-tab-header-bg", e.headerBackground ?? P.headerBackground), document.documentElement.style.setProperty("--router-tab-background", e.background ?? P.background), document.documentElement.style.setProperty("--router-tab-active-background", e.activeBackground ?? P.activeBackground), document.documentElement.style.setProperty("--router-tab-text", e.text ?? P.text), document.documentElement.style.setProperty("--router-tab-active-text", e.activeText ?? P.activeText), document.documentElement.style.setProperty("--router-tab-border", e.border ?? P.border), document.documentElement.style.setProperty("--router-tab-active-border", e.activeBorder ?? P.activeBorder), document.documentElement.style.setProperty("--router-tab-button-color", e.buttonColor ?? P.buttonColor), document.documentElement.style.setProperty("--router-tab-active-button-color", e.activeButtonColor ?? P.activeButtonColor), document.documentElement.style.setProperty("--router-tab-button-background", e.buttonBackground ?? P.buttonBackground), document.documentElement.style.setProperty("--router-tab-active-button-background", e.activeButtonBackground ?? P.activeButtonBackground), document.documentElement.style.setProperty("--router-tab-icon-color", e.iconColor ?? P.iconColor));
1183
1192
  }
1184
- function Xe(e) {
1193
+ function Qe(e) {
1185
1194
  if (typeof document > "u") return;
1186
1195
  const r = document.documentElement, o = window.matchMedia(qe), s = () => {
1187
1196
  r.dataset.theme = o.matches ? "dark" : "light";
1188
1197
  };
1189
- Q && (o.removeEventListener("change", Q), Q = null), e === "system" ? (s(), Q = () => s(), o.addEventListener("change", Q)) : r.dataset.theme = e;
1198
+ Z && (o.removeEventListener("change", Z), Z = null), e === "system" ? (s(), Z = () => s(), o.addEventListener("change", Z)) : r.dataset.theme = e;
1190
1199
  }
1191
1200
  function bn(e = {}) {
1192
1201
  if (typeof window > "u") return;
1193
1202
  const {
1194
- styleKey: r = Je,
1195
- primaryKey: o = Ge,
1203
+ styleKey: r = Ge,
1204
+ primaryKey: o = Xe,
1196
1205
  defaultStyle: s = cn,
1197
1206
  defaultPrimary: a
1198
- } = e, p = window.localStorage.getItem(r) ?? s;
1199
- Xe(p);
1200
- const i = p === "dark" || p === "system" && window.matchMedia(qe).matches ? { ...fn } : { ...P };
1207
+ } = e, g = window.localStorage.getItem(r) ?? s;
1208
+ Qe(g);
1209
+ const i = g === "dark" || g === "system" && window.matchMedia(qe).matches ? { ...fn } : { ...P };
1201
1210
  a && (i.primary = a);
1202
- const m = dn(o);
1203
- $e(m ? {
1211
+ const h = dn(o);
1212
+ Ae(h ? {
1204
1213
  ...i,
1205
- ...m
1214
+ ...h
1206
1215
  } : i);
1207
1216
  }
1208
1217
  function vn(e, r) {
1209
1218
  if (typeof window > "u") return;
1210
- const o = r?.styleKey ?? Je;
1211
- window.localStorage.setItem(o, e), Xe(e);
1219
+ const o = r?.styleKey ?? Ge;
1220
+ window.localStorage.setItem(o, e), Qe(e);
1212
1221
  }
1213
- function mn(e, r) {
1222
+ function hn(e, r) {
1214
1223
  if (typeof window > "u") return;
1215
- const o = r?.primaryKey ?? Ge;
1216
- window.localStorage.setItem(o, JSON.stringify(e)), $e(e);
1224
+ const o = r?.primaryKey ?? Xe;
1225
+ window.localStorage.setItem(o, JSON.stringify(e)), Ae(e);
1217
1226
  }
1218
- function re(e, r) {
1227
+ function ie(e, r) {
1219
1228
  if (jt(e)) {
1220
1229
  const s = !Ut(e);
1221
1230
  return {
@@ -1228,7 +1237,7 @@ function re(e, r) {
1228
1237
  }
1229
1238
  if (typeof e == "function")
1230
1239
  return {
1231
- value: K(e),
1240
+ value: E(e),
1232
1241
  update: () => {
1233
1242
  }
1234
1243
  };
@@ -1242,8 +1251,8 @@ function re(e, r) {
1242
1251
  }
1243
1252
  };
1244
1253
  }
1245
- function Pe(e = {}) {
1246
- const r = re(e.title, "Untitled"), o = re(e.icon, ""), s = re(e.closable, !0), a = re(e.meta, {});
1254
+ function Se(e = {}) {
1255
+ const r = ie(e.title, "Untitled"), o = ie(e.icon, ""), s = ie(e.closable, !0), a = ie(e.meta, {});
1247
1256
  return {
1248
1257
  routeTabTitle: r.value,
1249
1258
  routeTabIcon: o.value,
@@ -1255,17 +1264,17 @@ function Pe(e = {}) {
1255
1264
  updateMeta: a.update
1256
1265
  };
1257
1266
  }
1258
- function hn(e, r = "Page") {
1259
- return Pe({
1260
- title: K(() => e.value ? "Loading..." : r),
1261
- icon: K(() => e.value ? "mdi-loading mdi-spin" : "mdi-page"),
1262
- closable: K(() => !e.value)
1267
+ function mn(e, r = "Page") {
1268
+ return Se({
1269
+ title: E(() => e.value ? "Loading..." : r),
1270
+ icon: E(() => e.value ? "mdi-loading mdi-spin" : "mdi-page"),
1271
+ closable: E(() => !e.value)
1263
1272
  });
1264
1273
  }
1265
1274
  function yn(e, r = "Page", o = "mdi-page") {
1266
- return Pe({
1267
- title: K(() => e.value > 0 ? `${r} (${e.value})` : r),
1268
- icon: K(() => e.value > 0 ? "mdi-bell-badge" : o)
1275
+ return Se({
1276
+ title: E(() => e.value > 0 ? `${r} (${e.value})` : r),
1277
+ icon: E(() => e.value > 0 ? "mdi-bell-badge" : o)
1269
1278
  });
1270
1279
  }
1271
1280
  function Tn(e, r = "Page") {
@@ -1275,47 +1284,47 @@ function Tn(e, r = "Page") {
1275
1284
  error: { suffix: " - Error", icon: "mdi-alert" },
1276
1285
  success: { suffix: " - Success", icon: "mdi-check-circle" }
1277
1286
  };
1278
- return Pe({
1279
- title: K(() => r + o[e.value].suffix),
1280
- icon: K(() => o[e.value].icon),
1281
- closable: K(() => e.value !== "loading")
1287
+ return Se({
1288
+ title: E(() => r + o[e.value].suffix),
1289
+ icon: E(() => o[e.value].icon),
1290
+ closable: E(() => e.value !== "loading")
1282
1291
  });
1283
1292
  }
1284
- let ze = !1;
1293
+ let Fe = !1;
1285
1294
  const wn = {
1286
1295
  install(e, r) {
1287
- if (ze) return;
1288
- ze = !0;
1296
+ if (Fe) return;
1297
+ Fe = !0;
1289
1298
  const {
1290
1299
  initTheme: o = !0,
1291
1300
  themeOptions: s,
1292
- componentName: a = Ne.name || "RouterTab",
1293
- tabsComponentName: p = ke.name || "RouterTabs"
1301
+ componentName: a = Ye.name || "RouterTab",
1302
+ tabsComponentName: g = Ce.name || "RouterTabs"
1294
1303
  } = r ?? {};
1295
- o && bn(s ?? {}), e.component(a, Ne), e.component(p, ke), p.toLowerCase() !== "router-tabs" && e.component("router-tabs", ke), Object.defineProperty(e.config.globalProperties, "$tabs", {
1304
+ o && bn(s ?? {}), e.component(a, Ye), e.component(g, Ce), g.toLowerCase() !== "router-tabs" && e.component("router-tabs", Ce), Object.defineProperty(e.config.globalProperties, "$tabs", {
1296
1305
  configurable: !0,
1297
1306
  enumerable: !1,
1298
1307
  get() {
1299
- return e._context.provides[le];
1308
+ return e._context.provides[ue];
1300
1309
  },
1301
1310
  set(w) {
1302
- w && e.provide(le, w);
1311
+ w && e.provide(ue, w);
1303
1312
  }
1304
1313
  });
1305
1314
  }
1306
1315
  };
1307
1316
  export {
1308
- Ne as RouterTab,
1309
- ke as RouterTabs,
1317
+ Ye as RouterTab,
1318
+ Ce as RouterTabs,
1310
1319
  wn as default,
1311
1320
  bn as initRouterTabsTheme,
1312
- le as routerTabsKey,
1313
- mn as setRouterTabsPrimary,
1321
+ ue as routerTabsKey,
1322
+ hn as setRouterTabsPrimary,
1314
1323
  vn as setRouterTabsTheme,
1315
- hn as useLoadingTab,
1324
+ mn as useLoadingTab,
1316
1325
  yn as useNotificationTab,
1317
- Pe as useReactiveTab,
1318
- Ue as useRouterTabs,
1319
- We as useRouterTabsPersistence,
1326
+ Se as useReactiveTab,
1327
+ _e as useRouterTabs,
1328
+ Je as useRouterTabsPersistence,
1320
1329
  Tn as useStatusTab
1321
1330
  };