vimr
Version:
## 安装 ``` pnpm add vimr ``` ## 使用
978 lines (977 loc) • 42.5 kB
JavaScript
import { unref as B, getCurrentScope as Oe, onScopeDispose as Ve, getCurrentInstance as ze, onMounted as Pe, nextTick as se, watch as V, ref as f, defineComponent as M, openBlock as g, createElementBlock as b, normalizeStyle as E, pushScopeId as H, popScopeId as L, createElementVNode as p, renderSlot as F, toDisplayString as j, createVNode as z, createCommentVNode as R, withModifiers as C, Fragment as A, renderList as N, normalizeProps as ae, guardReactiveProps as ce, withCtx as Z, toRaw as k, computed as re, normalizeClass as q, mergeProps as ue, createBlock as de, Transition as pe, withDirectives as Se, vShow as Be } from "vue";
if (typeof window < "u") {
let e = function() {
var o = document.body, t = document.getElementById("__svg__icons__dom__");
t || (t = document.createElementNS("http://www.w3.org/2000/svg", "svg"), t.style.position = "absolute", t.style.width = "0", t.style.height = "0", t.id = "__svg__icons__dom__", t.setAttribute("xmlns", "http://www.w3.org/2000/svg"), t.setAttribute("xmlns:link", "http://www.w3.org/1999/xlink")), t.innerHTML = '<symbol class="icon" viewBox="0 0 1024 1024" id="icon-file"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#4895FF" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M327 349h224.931q37 0 37 37t-37 37H327q-37 0-37-37t37-37ZM327 511h370q37 0 37 37t-37 37H327q-37 0-37-37t37-37ZM327 673h370q37 0 37 37t-37 37H327q-37 0-37-37t37-37Z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-folder"><path d="M92 810V213q0-30 30-30h780q30 0 30 30v597q0 30-30 30H122q-30 0-30-30Z" fill="#C49C30" /><path d="M92 753V170q0-30 30-30h212q30 0 30 30v583q0 30-30 30H122q-30 0-30-30Z" fill="#C49C30" /><path d="M146 784.764V272.235q0-30 30-30h672q30 0 30 30v512.529q0 30-30 30H176q-30 0-30-30Z" fill="#FFF" /><path d="M92 902V340q0-30 30-30h780q30 0 30 30v562q0 30-30 30H122q-30 0-30-30Z" fill="#FFCF4E" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-img"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#FFAB4E" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="m440.26 397.636 152.711 269.49c4.901 8.649 1.863 19.633-6.786 24.534a18 18 0 0 1-8.874 2.34H271.889c-9.941 0-18-8.059-18-18a18 18 0 0 1 2.34-8.874l152.71-269.49c4.902-8.649 15.886-11.687 24.535-6.786a18 18 0 0 1 6.786 6.786z" fill="#FFF" /><path d="m633.04 497.15 96.32 169.976c4.9 8.649 1.863 19.633-6.786 24.534a18 18 0 0 1-8.875 2.34H521.061c-9.942 0-18-8.059-18-18a18 18 0 0 1 2.34-8.874L601.72 497.15c4.9-8.649 15.885-11.687 24.534-6.786a18 18 0 0 1 6.786 6.786zM645 420a50 50 0 1 0 100 0 50 50 0 1 0-100 0Z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-jpg"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#60C267" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M306.76 444.2c21.12 0 25.92-2.88 25.92-24.64s-4.8-24-25.92-24c-20.8 0-25.92 2.24-25.92 24 0 21.76 5.12 24.64 25.92 24.64zM264.52 705c41.28 0 65.28-10.88 65.28-64.64V468.2h-46.4v170.24c0 24-3.2 31.68-24 31.68-5.12 0-11.2-.32-15.36-1.28v34.56c6.08.96 12.8 1.6 20.48 1.6zm209.92-240c-30.4 0-45.44 11.2-52.16 24v-20.8h-46.4V705h46.4v-86.08c6.72 15.36 20.48 25.28 52.16 25.28 56 0 68.8-40 68.8-89.6 0-55.04-12.8-89.6-68.8-89.6zm-14.72 144c-31.68 0-40-21.12-40-54.4 0-34.88 8.32-55.04 40-55.04 31.36 0 36.16 23.36 36.16 55.04 0 29.76-4.16 54.4-36.16 54.4zm234.56-140.8v22.08C687.56 473.96 673.8 465 642.12 465c-56 0-70.08 40.64-70.08 88 0 52.48 14.08 88 70.08 88 31.04 0 44.8-9.28 52.16-24.64v9.28c0 32.96-15.68 43.52-53.12 43.52-15.04 0-32-1.6-45.76-5.12v36.8c14.08 2.56 33.6 4.16 49.28 4.16 71.68 0 95.68-30.08 95.68-77.44V468.2h-46.08zm-38.4 138.88c-32 0-36.16-24.64-36.16-54.08 0-27.84 3.84-53.44 36.16-53.44 34.56 0 40.64 20.48 40.64 53.44 0 34.24-6.08 54.08-40.64 54.08z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-mov"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#C076E5" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M257 92h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zM698 302h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zm0 140h70v70h-70zM593.941 544.47l-138.743 95.568c-9.096 6.266-21.55 3.971-27.816-5.125a20 20 0 0 1-3.529-11.345V432.432c0-11.045 8.954-20 20-20a20 20 0 0 1 11.345 3.53l138.743 95.567c9.097 6.266 11.392 18.72 5.126 27.816a20 20 0 0 1-5.126 5.126z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-mp4"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#4895FF" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M393.76 465c-25.6 0-44.8 6.72-54.08 24.32C332 473 316.32 465 290.4 465c-24.32 0-39.36 7.36-48.64 22.72V468.2h-46.4V641h46.4V526.12c4.8-16.96 12.8-23.36 32-23.36 18.88 0 25.6 8.96 25.6 32.32V641h46.4V528.04c4.16-18.24 14.08-25.28 32.96-25.28 19.52 0 26.24 8.96 26.24 32.32V641h46.4V526.44c0-43.2-18.88-61.44-57.6-61.44zm196.92 0c-30.4 0-45.44 11.2-52.16 24v-20.8h-46.4V705h46.4v-86.08c6.72 15.36 20.48 25.28 52.16 25.28 56 0 68.8-40 68.8-89.6 0-55.04-12.8-89.6-68.8-89.6zm-14.72 144c-31.68 0-40-21.12-40-54.4 0-34.88 8.32-55.04 40-55.04 31.36 0 36.16 23.36 36.16 55.04 0 29.76-4.16 54.4-36.16 54.4zm268.92-54.72h-24.32V418.92h-54.08L677.2 548.2v45.44h98.88V641h44.48v-47.36h24.32v-39.36zm-128.32 0v-1.92l57.6-85.44h1.92v87.36h-59.52z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-music"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#FF6359" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="m619.815 356.754-94.728 353.53q-7.764 28.977-36.742 21.213-28.978-7.765-21.213-36.743l94.727-353.529q7.765-28.977 36.743-21.213 28.977 7.765 21.213 36.742Z" fill="#FFF" /><path d="M614.552 328.726c5.486 6.672 9.751 12.916 12.797 18.734 9.545 18.239-1.202 29.447 23.113 56.775 24.316 27.327 60.062 26.208 76.795 50.598 16.735 24.39 17.316 28.648 19.51 52.42 2.195 23.772-23.492 74.571-26.77 49.92-3.278-24.652-19.503-42.788-31.327-73.083-5.384-13.797-21.83-19.055-41.087-26.765-.7-.28-2.886-1.38-6.557-3.3a99.988 99.988 0 0 1-34.015-29.076l-39.3-53.024c-10.264-13.849-8.838-33.126 3.35-45.315 11.48-11.48 30.092-11.479 41.571 0a29.52 29.52 0 0 1 1.92 2.117zM270.399 649.323a130.822 87.5 15 1 0 252.728 67.718A130.822 87.5 15 1 0 270.4 649.323Z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-pdf"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#FF6359" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M234.64 641h48.64v-68.48h27.2c62.72 0 87.36-20.16 87.36-78.08 0-53.44-20.8-75.52-87.36-75.52h-75.84V641zm48.64-107.52v-76.16h20.8c32.64 0 44.16 9.6 44.16 38.08 0 29.44-11.2 38.08-44.16 38.08h-20.8zm154.24-114.56V641h76.16c65.28 0 108.16-25.28 108.16-111.04 0-92.48-42.88-111.04-108.16-111.04h-76.16zm48.64 180.48V459.88h24.96c40 0 60.48 12.8 60.48 70.08 0 54.08-19.52 69.44-60.48 69.44h-24.96zm315.2-138.24v-42.24H665.68V641h48.64v-86.4h80.64v-41.92h-80.64v-51.52z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-ppt"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#FF6359" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M391.269 705h75.544V598.642h42.245c97.412 0 135.681-31.311 135.681-121.268 0-82.999-32.305-117.292-135.681-117.292H391.269V705zm75.544-166.992V419.722h32.305c50.694 0 68.586 14.91 68.586 59.143 0 45.724-17.395 59.143-68.586 59.143h-32.305z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-txt"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#BEBEBE" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M638.17 362.94H385.82v65.17H475V703h73.99V428.11h89.18z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-unknown"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#BEBEBE" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M474.17 591.28h59.78v-11.27c0-16.66 5.88-25.97 35.77-48.02 33.32-24.99 44.1-42.63 44.1-88.2 0-68.6-33.32-86.73-113.68-86.73-29.4 0-55.86 3.43-73.99 8.82v60.76c17.15-5.39 39.69-8.33 59.78-8.33 39.69 0 51.94 6.37 51.94 35.77 0 20.58-4.41 29.89-25.97 47.04-28.91 24.99-37.73 40.18-37.73 68.11v22.05zm30.38 114.66c34.79 0 41.65-5.88 41.65-41.16 0-34.3-6.86-40.67-41.65-40.67-35.28 0-41.65 6.37-41.65 40.67 0 35.28 6.37 41.16 41.65 41.16z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-word"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#4895FF" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M361.81 703h93.1l53.41-215.6h2.94L563.69 703h93.1l77.91-340.06h-76.93l-49.98 251.37h-2.94l-49-218.54h-86.24l-51.94 218.54h-2.94l-49-251.37h-77.91z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-xlsx"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#60C267" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M495.93 707.9c93.59 0 130.83-35.77 130.83-102.41 0-63.21-17.64-88.69-98.98-108.29-49.98-11.76-57.82-19.6-57.82-41.65 0-28.91 16.17-36.26 54.88-36.26 28.42 0 67.62 6.86 84.28 12.25v-61.25c-18.13-6.37-48.51-12.25-87.22-12.25-78.89 0-124.46 27.44-124.46 99.47 0 60.76 21.07 81.34 93.59 98 51.94 12.74 61.74 22.05 61.74 48.02 0 30.38-14.7 40.67-59.78 40.67-34.3 0-74.97-5.88-96.04-13.72v65.17c21.07 5.88 59.29 12.25 98.98 12.25z" fill="#FFF" /></symbol><symbol class="icon" viewBox="0 0 1024 1024" id="icon-zip-rar"><path d="M862 902c0 16.569-13.431 30-30 30H192c-16.569 0-30-13.431-30-30V122c0-16.569 13.431-30 30-30h476l194 194v616z" fill="#7DB4FF" /><path d="M862 286H698c-16.569 0-30-13.431-30-30V92" fill="#FFF" fill-opacity=".296" /><path d="M289 92h70v70h-70zm70 70h70v70h-70zm-70 70h70v70h-70zm70 70h70v70h-70zm-70 70h70v70h-70zm0 96h140v110c0 16.569-13.431 30-30 30h-80c-16.569 0-30-13.431-30-30V468z" fill="#FFF" /></symbol>', o.insertBefore(t, o.lastChild);
};
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", e) : e();
}
var Y;
const ve = typeof window < "u", He = (e) => typeof e == "string", fe = () => {
}, Le = ve && ((Y = window == null ? void 0 : window.navigator) == null ? void 0 : Y.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
function he(e) {
return typeof e == "function" ? e() : B(e);
}
function je(e) {
return e;
}
function _e(e) {
return Oe() ? (Ve(e), !0) : !1;
}
function me(e, o = !0) {
ze() ? Pe(e) : o ? e() : se(e);
}
function P(e) {
var o;
const t = he(e);
return (o = t == null ? void 0 : t.$el) != null ? o : t;
}
const T = ve ? window : void 0;
function $(...e) {
let o, t, l, a;
if (He(e[0]) || Array.isArray(e[0]) ? ([t, l, a] = e, o = T) : [o, t, l, a] = e, !o)
return fe;
Array.isArray(t) || (t = [t]), Array.isArray(l) || (l = [l]);
const c = [], r = () => {
c.forEach((u) => u()), c.length = 0;
}, n = (u, m, d, v) => (u.addEventListener(m, d, v), () => u.removeEventListener(m, d, v)), i = V(() => [P(o), he(a)], ([u, m]) => {
r(), u && c.push(...t.flatMap((d) => l.map((v) => n(u, d, v, m))));
}, { immediate: !0, flush: "post" }), s = () => {
i(), r();
};
return _e(s), s;
}
let K = !1;
function Re(e, o, t = {}) {
const { window: l = T, ignore: a = [], capture: c = !0, detectIframe: r = !1 } = t;
if (!l)
return;
Le && !K && (K = !0, Array.from(l.document.body.children).forEach((d) => d.addEventListener("click", fe)));
let n = !0;
const i = (d) => a.some((v) => {
if (typeof v == "string")
return Array.from(l.document.querySelectorAll(v)).some((h) => h === d.target || d.composedPath().includes(h));
{
const h = P(v);
return h && (d.target === h || d.composedPath().includes(h));
}
}), u = [
$(l, "click", (d) => {
const v = P(e);
if (!(!v || v === d.target || d.composedPath().includes(v))) {
if (d.detail === 0 && (n = !i(d)), !n) {
n = !0;
return;
}
o(d);
}
}, { passive: !0, capture: c }),
$(l, "pointerdown", (d) => {
const v = P(e);
v && (n = !d.composedPath().includes(v) && !i(d));
}, { passive: !0 }),
r && $(l, "blur", (d) => {
var v;
const h = P(e);
((v = l.document.activeElement) == null ? void 0 : v.tagName) === "IFRAME" && !(h != null && h.contains(l.document.activeElement)) && o(d);
})
].filter(Boolean);
return () => u.forEach((d) => d());
}
function qe(e, o = !1) {
const t = f(), l = () => t.value = Boolean(e());
return l(), me(l, o), t;
}
const G = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, J = "__vueuse_ssr_handlers__";
G[J] = G[J] || {};
var D = Object.getOwnPropertySymbols, Ee = Object.prototype.hasOwnProperty, Ue = Object.prototype.propertyIsEnumerable, Ae = (e, o) => {
var t = {};
for (var l in e)
Ee.call(e, l) && o.indexOf(l) < 0 && (t[l] = e[l]);
if (e != null && D)
for (var l of D(e))
o.indexOf(l) < 0 && Ue.call(e, l) && (t[l] = e[l]);
return t;
};
function Ne(e, o, t = {}) {
const l = t, { window: a = T } = l, c = Ae(l, ["window"]);
let r;
const n = qe(() => a && "ResizeObserver" in a), i = () => {
r && (r.disconnect(), r = void 0);
}, s = V(() => P(e), (m) => {
i(), n.value && a && m && (r = new ResizeObserver(o), r.observe(m, c));
}, { immediate: !0, flush: "post" }), u = () => {
i(), s();
};
return _e(u), {
isSupported: n,
stop: u
};
}
function ee(e, o = {}) {
const {
reset: t = !0,
windowResize: l = !0,
windowScroll: a = !0,
immediate: c = !0
} = o, r = f(0), n = f(0), i = f(0), s = f(0), u = f(0), m = f(0), d = f(0), v = f(0);
function h() {
const y = P(e);
if (!y) {
t && (r.value = 0, n.value = 0, i.value = 0, s.value = 0, u.value = 0, m.value = 0, d.value = 0, v.value = 0);
return;
}
const w = y.getBoundingClientRect();
r.value = w.height, n.value = w.bottom, i.value = w.left, s.value = w.right, u.value = w.top, m.value = w.width, d.value = w.x, v.value = w.y;
}
return Ne(e, h), V(() => P(e), (y) => !y && h()), a && $("scroll", h, { capture: !0, passive: !0 }), l && $("resize", h, { passive: !0 }), me(() => {
c && h();
}), {
height: r,
bottom: n,
left: i,
right: s,
top: u,
width: m,
x: d,
y: v,
update: h
};
}
function Te(e = {}) {
const {
type: o = "page",
touch: t = !0,
resetOnTouchEnds: l = !1,
initialValue: a = { x: 0, y: 0 },
window: c = T,
eventFilter: r
} = e, n = f(a.x), i = f(a.y), s = f(null), u = (y) => {
o === "page" ? (n.value = y.pageX, i.value = y.pageY) : o === "client" ? (n.value = y.clientX, i.value = y.clientY) : o === "movement" && (n.value = y.movementX, i.value = y.movementY), s.value = "mouse";
}, m = () => {
n.value = a.x, i.value = a.y;
}, d = (y) => {
if (y.touches.length > 0) {
const w = y.touches[0];
o === "page" ? (n.value = w.pageX, i.value = w.pageY) : o === "client" && (n.value = w.clientX, i.value = w.clientY), s.value = "touch";
}
}, v = (y) => r === void 0 ? u(y) : r(() => u(y), {}), h = (y) => r === void 0 ? d(y) : r(() => d(y), {});
return c && ($(c, "mousemove", v, { passive: !0 }), $(c, "dragover", v, { passive: !0 }), t && o !== "movement" && ($(c, "touchstart", h, { passive: !0 }), $(c, "touchmove", h, { passive: !0 }), l && $(c, "touchend", m, { passive: !0 }))), {
x: n,
y: i,
sourceType: s
};
}
var te;
(function(e) {
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
})(te || (te = {}));
var We = Object.defineProperty, oe = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, Qe = Object.prototype.propertyIsEnumerable, le = (e, o, t) => o in e ? We(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, Xe = (e, o) => {
for (var t in o || (o = {}))
Ze.call(o, t) && le(e, t, o[t]);
if (oe)
for (var t of oe(o))
Qe.call(o, t) && le(e, t, o[t]);
return e;
};
const Ye = {
easeInSine: [0.12, 0, 0.39, 0],
easeOutSine: [0.61, 1, 0.88, 1],
easeInOutSine: [0.37, 0, 0.63, 1],
easeInQuad: [0.11, 0, 0.5, 0],
easeOutQuad: [0.5, 1, 0.89, 1],
easeInOutQuad: [0.45, 0, 0.55, 1],
easeInCubic: [0.32, 0, 0.67, 0],
easeOutCubic: [0.33, 1, 0.68, 1],
easeInOutCubic: [0.65, 0, 0.35, 1],
easeInQuart: [0.5, 0, 0.75, 0],
easeOutQuart: [0.25, 1, 0.5, 1],
easeInOutQuart: [0.76, 0, 0.24, 1],
easeInQuint: [0.64, 0, 0.78, 0],
easeOutQuint: [0.22, 1, 0.36, 1],
easeInOutQuint: [0.83, 0, 0.17, 1],
easeInExpo: [0.7, 0, 0.84, 0],
easeOutExpo: [0.16, 1, 0.3, 1],
easeInOutExpo: [0.87, 0, 0.13, 1],
easeInCirc: [0.55, 0, 1, 0.45],
easeOutCirc: [0, 0.55, 0.45, 1],
easeInOutCirc: [0.85, 0, 0.15, 1],
easeInBack: [0.36, 0, 0.66, -0.56],
easeOutBack: [0.34, 1.56, 0.64, 1],
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
};
Xe({
linear: je
}, Ye);
const Ke = (e) => (H("data-v-e0e33196"), e = e(), L(), e), Ge = /* @__PURE__ */ Ke(() => /* @__PURE__ */ p("i", { class: "i-ri-more-2-fill" }, null, -1)), Je = [
Ge
], De = /* @__PURE__ */ M({
__name: "UploadToggleButton",
props: {
right: null
},
setup(e) {
const o = e;
return (t, l) => (g(), b("div", {
class: "vimr-upload-toggle-button",
style: E({ transform: `translate(${o.right ?? 0}px,-50%)` })
}, Je, 4));
}
});
const O = (e, o) => {
const t = e.__vccOpts || e;
for (const [l, a] of o)
t[l] = a;
return t;
}, et = /* @__PURE__ */ O(De, [["__scopeId", "data-v-e0e33196"]]);
var ye = /* @__PURE__ */ ((e) => (e.number = "[object Number]", e.string = "[object String]", e.boolean = "[object Boolean]", e.null = "[object Null]", e.undefined = "[object Undefined]", e.object = "[object Object]", e.array = "[object Array]", e.date = "[object Date]", e.regexp = "[object RegExp]", e.set = "[object Set]", e.map = "[object Map]", e.file = "[object File]", e.function = "[object Function]", e))(ye || {});
function Q(e) {
return Object.prototype.toString.call(e) === ye.function;
}
const tt = {
data: {
type: Array,
default: void 0
},
popupMenuOptions: {
type: Array,
default: void 0
},
popupMenuItemOptions: {
type: Array,
default: void 0
},
navigationOptions: {
type: Array,
default: void 0
},
title: {
type: String,
default: void 0
},
previewShow: {
type: Boolean,
default: void 0
},
uploadPanelShow: {
type: Boolean,
default: void 0
}
}, ge = (e) => (H("data-v-86e42881"), e = e(), L(), e), ot = { class: "vimr-wrap" }, lt = { class: "vimr-header" }, nt = { class: "vimr-title" }, it = /* @__PURE__ */ ge(() => /* @__PURE__ */ p("span", { class: "line-x" }, null, -1)), st = {
key: 0,
class: "vimr-navigation"
}, at = /* @__PURE__ */ ge(() => /* @__PURE__ */ p("span", { class: "line-x" }, null, -1)), ct = { class: "vimr-body-content" }, rt = /* @__PURE__ */ M({
__name: "Wrap",
props: tt,
emits: ["update:contextMenuItemClick", "update:select", "update:uploadPanelShow"],
setup(e, { emit: o }) {
const t = e, l = f(), a = f(), { right: c, bottom: r } = ee(l), { width: n, height: i } = ee(a), s = () => {
o("update:uploadPanelShow", !t.uploadPanelShow);
}, { x: u, y: m } = Te(), d = f(u.value), v = f(m.value), h = f(!1), y = f(t.popupMenuOptions), w = async () => {
d.value = u.value > c.value - n.value ? c.value - n.value : u.value, v.value = m.value > r.value - i.value ? r.value - i.value : m.value, h.value && (h.value = !1, await se(), await new Promise((_) => {
setTimeout(() => _(!0), 100);
})), h.value = !0;
}, W = () => {
h.value = !1;
}, U = f(), Fe = async () => {
t.popupMenuOptions || console.warn("popupMenuOptions is not found"), y.value = t.popupMenuOptions, U.value = void 0, w();
}, ke = () => {
W();
}, X = (_) => {
t.popupMenuItemOptions || console.warn("popupMenuItemOptions is not found"), y.value = t.popupMenuItemOptions, U.value = _, w();
}, xe = (_) => {
if (h.value) {
W();
return;
}
X(_);
}, $e = (_) => {
_.onClick && Q(_.onClick) && _.onClick(_, U.value), o("update:contextMenuItemClick", { menu: _, data: k(U.value) });
}, x = f([]), Ce = (_) => {
if (W(), x.value.includes(_.key)) {
x.value = [], o("update:select", { key: void 0, selectKeys: k(x.value) });
return;
}
x.value = [_.key], o("update:select", { key: _.key, selectKeys: k(x.value) });
}, Me = (_) => {
const S = x.value.findIndex((I) => I === _.key);
if (S > -1) {
x.value.splice(S, 1), o("update:select", { key: void 0, selectKeys: k(x.value) });
return;
}
x.value.push(_.key), o("update:select", { key: _.key, selectKeys: k(x.value) });
};
return (_, S) => (g(), b("div", ot, [
F(_.$slots, "header", {}, () => [
p("div", lt, [
p("div", nt, j(t.title), 1),
it,
_.$slots.navigation ? (g(), b("div", st, [
F(_.$slots, "navigation", {}, () => [
z(B(Mo), {
options: t.navigationOptions
}, null, 8, ["options"])
], !0)
])) : R("", !0),
at
])
], !0),
p("div", {
ref_key: "vimrMainRef",
ref: l,
class: "vimr-main"
}, [
F(_.$slots, "side", {}, void 0, !0),
p("div", {
class: "vimr-body",
onContextmenu: S[0] || (S[0] = C((I) => Fe(), ["prevent"])),
onClick: ke
}, [
p("div", ct, [
(g(!0), b(A, null, N(t.data, (I) => F(_.$slots, "default", ae(ce(I)), () => [
z(B(bt), {
data: I,
selected: x.value.includes(I.key),
onContextmenu: C((Ie) => X(I), ["prevent", "stop"]),
onClick: C((Ie) => Ce(I), ["prevent", "stop"]),
onMoreIconClick: xe,
onSelectIconClick: Me
}, null, 8, ["data", "selected", "onContextmenu", "onClick"])
], !0)), 256))
])
], 32),
F(_.$slots, "preview", {}, void 0, !0),
F(_.$slots, "uploadPanel", {}, void 0, !0),
F(_.$slots, "uploadTrigger", {}, void 0, !0),
z(et, {
right: t.uploadPanelShow ? -400 : 0,
onClick: C(s, ["prevent", "stop"])
}, null, 8, ["right", "onClick"]),
z(B(zt), {
ref_key: "popupRef",
ref: a,
value: h.value,
"onUpdate:value": S[1] || (S[1] = (I) => h.value = I),
options: y.value,
x: d.value,
y: v.value,
"onUpdate:menuItemClick": $e
}, {
default: Z(() => [
F(_.$slots, "popupMenu", {}, void 0, !0)
]),
_: 3
}, 8, ["value", "options", "x", "y"])
], 512)
]));
}
});
const Oo = /* @__PURE__ */ O(rt, [["__scopeId", "data-v-86e42881"]]), ut = {
data: {
type: Object,
default: void 0
},
width: {
type: Number,
default: 140
},
selected: {
type: Boolean,
default: void 0
}
}, be = (e) => (H("data-v-06e1441a"), e = e(), L(), e), dt = { class: "vimr-item-checkbox-wrap" }, pt = ["onClick"], vt = /* @__PURE__ */ be(() => /* @__PURE__ */ p("span", { class: "i-ri-checkbox-blank-circle-fill vimr-item-checkbox-icon selected-icon" }, null, -1)), ft = [
vt
], ht = ["onClick"], _t = /* @__PURE__ */ be(() => /* @__PURE__ */ p("span", { class: "i-ri-more-fill vimr-item-checkbox-icon" }, null, -1)), mt = [
_t
], yt = { class: "vimr-item-text" }, gt = /* @__PURE__ */ M({
__name: "Item",
props: ut,
emits: ["moreIconClick", "selectIconClick"],
setup(e, { emit: o }) {
const t = e, l = {
file: ["file"],
folder: ["folder"],
img: ["image/gif", "image/x-icon", "image/jpeg", "image/jpeg", "image/png", "image/wbmp"],
jpg: ["image/jpeg"],
mp4: ["video/mpeg4"],
music: ["audio/mp3"],
pdf: ["text/pdf"],
ppt: ["text/ppt"],
txt: ["text/txt"],
word: ["text/word"],
xlsx: ["text/xlsx"],
"zip-rar": ["zip-rar"],
unknown: ["unknown"]
}, a = re(() => {
var i;
let n = "unknown";
for (const s in l)
t.data && t.data.type && l[s].includes((i = t.data) == null ? void 0 : i.type) && (n = s);
return n;
}), c = () => {
t.data && o("moreIconClick", k(t.data));
}, r = () => {
t.data && o("selectIconClick", k(t.data));
};
return (n, i) => (g(), b("div", {
style: E({ width: `${t.width}px` }),
class: q(["vimr-item-wrap", t.selected ? "selected" : ""])
}, [
p("div", dt, [
p("div", {
class: "vimr-item-checkbox",
onClick: C(r, ["prevent", "stop"])
}, ft, 8, pt),
p("div", {
class: "vimr-item-checkbox",
onClick: C(c, ["prevent", "stop"])
}, mt, 8, ht)
]),
F(n.$slots, "icon", ae(ce(t.data)), () => [
z(B(Ct), {
type: B(a),
width: 5,
height: 5
}, null, 8, ["type"])
], !0),
F(n.$slots, "default", {}, () => {
var s;
return [
p("div", yt, j((s = t.data) == null ? void 0 : s.label), 1)
];
}, !0)
], 6));
}
});
const bt = /* @__PURE__ */ O(gt, [["__scopeId", "data-v-06e1441a"]]), wt = ["xlink:href", "fill"], Ft = /* @__PURE__ */ M({
__name: "SvgIcon",
props: {
prefix: { default: "icon" },
name: null,
color: { default: "#333" },
width: { default: 1 },
height: { default: 1 }
},
setup(e) {
const o = e, t = re(() => `#${o.prefix}-${o.name}`);
return (l, a) => (g(), b("svg", ue({ "aria-hidden": "true" }, l.$attrs, {
style: { width: `${o.width}em`, height: `${o.height}em` }
}), [
p("use", {
"xlink:href": B(t),
fill: o.color
}, null, 8, wt)
], 16));
}
}), kt = {
type: {
type: String,
default: "unknown"
},
width: {
type: Number,
default: 5
},
height: {
type: Number,
default: 5
}
}, xt = { class: "vimr-icon" }, $t = /* @__PURE__ */ M({
__name: "Icon",
props: kt,
setup(e) {
const o = e;
return (t, l) => (g(), b("div", xt, [
z(Ft, {
name: o.type,
width: o.width,
height: o.height
}, null, 8, ["name", "width", "height"])
]));
}
});
const Ct = /* @__PURE__ */ O($t, [["__scopeId", "data-v-149273f1"]]), Mt = {
options: {
type: Object,
default: void 0
},
value: {
type: Boolean,
default: !1
},
x: {
type: Number,
default: 0
},
y: {
type: Number,
default: 0
},
width: {
type: Number,
default: 140
}
}, It = ["onClick", "onContextmenu"], Ot = { class: "vimr-popup-menu-item" }, Vt = /* @__PURE__ */ M({
__name: "PopupMenu",
props: Mt,
emits: ["update:value", "update:menuItemClick"],
setup(e, { emit: o }) {
const t = e, l = f(t.x), a = f(t.y), c = f(t.value), r = f(t.options);
V(() => t.value, (i) => {
c.value = i, i && (l.value = t.x, a.value = t.y);
}), V(() => t.options, (i) => {
r.value = i;
});
const n = (i) => {
c.value = !1, o("update:value", c.value), o("update:menuItemClick", k(i));
};
return (i, s) => (g(), b("div", {
class: "vimr-popup-menu-wrap",
style: E({ transform: `translate(${l.value}px,${a.value}px)`, pointerEvents: c.value ? "auto" : "none" })
}, [
F(i.$slots, "default", {}, () => [
p("div", {
class: "vimr-popup-menu",
style: E([{ width: `${t.width}px` }, c.value ? { visibility: "visible", opacity: 100, transform: "translateY(0)" } : { visibility: "hidden", opacity: 0, transform: "translateY(-10PX)" }])
}, [
(g(!0), b(A, null, N(t.options, (u, m) => (g(), b("div", {
key: m,
onClick: (d) => n(u),
onContextmenu: C((d) => !1, ["prevent"])
}, [
p("div", Ot, [
u.icon ? (g(), b("i", {
key: 0,
class: q(u.icon)
}, null, 2)) : R("", !0),
p("span", null, j(u.label), 1)
])
], 40, It))), 128))
], 4)
], !0)
], 4));
}
});
const zt = /* @__PURE__ */ O(Vt, [["__scopeId", "data-v-21d732b6"]]), Pt = {
options: {
type: Object,
default: void 0
},
show: {
type: Boolean,
default: void 0
},
blur: {
type: Boolean,
default: !0
}
}, St = (e) => (H("data-v-bc5942a8"), e = e(), L(), e), Bt = /* @__PURE__ */ St(() => /* @__PURE__ */ p("i", { class: "i-ri-close-fill" }, null, -1)), Ht = [
Bt
], Lt = ["onClick"], jt = /* @__PURE__ */ M({
__name: "Preview",
props: Pt,
emits: ["update:show"],
setup(e, { emit: o }) {
const t = e;
return (l, a) => (g(), de(pe, { name: "vimr" }, {
default: Z(() => [
t.show ? (g(), b("div", {
key: 0,
class: q(["vimr-preview-wrap", [t.blur ? "backdrop-blur-2xl" : ""]])
}, [
p("div", {
class: "vimr-preview-close-icon",
onClick: a[0] || (a[0] = C((c) => o("update:show", !1), ["prevent", "stop"]))
}, Ht),
F(l.$slots, "default", {}, () => [
p("div", {
class: "vimr-preview-content",
onClick: C((c) => !1, ["prevent", "stop"])
}, null, 8, Lt)
], !0)
], 2)) : R("", !0)
]),
_: 3
}));
}
});
const Vo = /* @__PURE__ */ O(jt, [["__scopeId", "data-v-bc5942a8"]]), Rt = {
show: {
type: Boolean,
default: void 0
},
blur: {
type: Boolean,
default: !0
},
disabled: {
type: Boolean,
default: !1
},
accept: {
type: String,
default: void 0
},
max: {
type: Number,
default: 9
},
multiple: {
type: Boolean,
default: !0
},
name: {
type: String,
default: "file"
},
action: {
type: String,
default: void 0
},
headers: {
type: Object,
default: void 0
},
customRequest: {
type: Function,
default: void 0
},
data: {
type: Object,
default: void 0
},
defaultFileList: {
type: Array,
default: void 0
},
fileList: {
type: Array,
default: void 0
}
}, qt = {
fileList: {
type: Array,
default: void 0
}
}, Et = {
disabled: {
type: Boolean,
default: !1
},
accept: {
type: String,
default: void 0
},
max: {
type: Number,
default: 9
},
multiple: {
type: Boolean,
default: !0
},
name: {
type: String,
default: "file"
},
action: {
type: String,
default: void 0
},
headers: {
type: Object,
default: void 0
},
customRequest: {
type: Function,
default: void 0
},
data: {
type: Object,
default: void 0
},
defaultFileList: {
type: Array,
default: void 0
},
fileList: {
type: Array,
default: void 0
}
};
let ne = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((o, t) => (t &= 63, t < 36 ? o += t.toString(36) : t < 62 ? o += (t - 26).toString(36).toUpperCase() : t > 62 ? o += "-" : o += "_", o), "");
const Ut = (e) => e.type.indexOf("image") === 0, ie = (e, o, t) => {
const l = e.value.findIndex((a) => a.id === o);
l > -1 && (e.value[l].status = t);
}, At = (e, o, t) => {
const l = e.value.findIndex((a) => a.id === o);
l > -1 && (e.value[l].percentage = t);
}, Nt = ({ file: e, action: o, data: t, headers: l, name: a, onFinish: c, onError: r, onProgress: n }) => {
if (!o)
return;
const i = new FormData();
i.append(a ?? "file", e.file), t && Object.keys(t).forEach((u) => {
i.append(u, t[u]);
});
const s = new XMLHttpRequest();
s.open("post", o, !0), s.onload = () => {
s.status < 200 || s.status >= 300 ? (console.error(new Error(s.statusText), s), r()) : c(), s.onerror = () => {
console.error(new Error(s.statusText), s), r();
}, n && s.upload && (s.upload.onprogress = (u) => {
n({ percent: u.loaded / u.total * 100 });
}), l && Object.keys(l).forEach((u) => {
s.setRequestHeader(u, l[u]);
});
}, s.send(i);
}, Tt = (e) => (H("data-v-bca1d5ab"), e = e(), L(), e), Wt = ["multiple", "max", "accept"], Zt = /* @__PURE__ */ Tt(() => /* @__PURE__ */ p("button", null, [
/* @__PURE__ */ p("i", { class: "i-ri-add-line" })
], -1)), Qt = /* @__PURE__ */ M({
__name: "UploadTrigger",
props: Et,
emits: ["click", "update:fileList", "finish", "error", "change"],
setup(e, { emit: o }) {
const t = e, l = f(), a = f(), c = f(t.defaultFileList ?? []);
V(() => t.fileList, (n) => {
c.value = n ?? [];
});
const r = () => {
o("click"), a.value.click();
};
return $(a, "change", (n) => {
const i = a.value ? a.value.files : void 0;
if (!i)
return;
const s = ne(6), u = Object.values(i).map((m) => {
const d = {
id: ne(12),
name: m.name,
status: "pending",
batchId: s,
file: m,
fullPath: URL.createObjectURL(m),
percentage: 0,
type: m.type
};
let v = null;
return t.customRequest && Q(t.customRequest) ? v = t.customRequest : t.action ? v = Nt : console.error("props.action is required"), v && v({
file: d,
data: t.data,
headers: t.headers,
action: t.action,
name: t.name,
onFinish: () => {
ie(c, d.id, "finished"), o("finish", d);
},
onError: () => {
ie(c, d.id, "error"), o("error", d);
},
onProgress: (h) => {
At(c, d.id, h.percent);
}
}), d;
});
c.value.push(...u), o("update:fileList", c.value), o("change", u);
}), (n, i) => (g(), b("div", {
ref_key: "uploadTriggerRef",
ref: l,
class: "vimr-upload-trigger",
onClick: r
}, [
p("input", {
ref_key: "uploadFileRef",
ref: a,
multiple: t.multiple,
max: t.max,
accept: t.accept,
type: "file",
class: "vimr-upload-file-input"
}, null, 8, Wt),
Zt
], 512));
}
});
const Xt = /* @__PURE__ */ O(Qt, [["__scopeId", "data-v-bca1d5ab"]]), we = (e) => (H("data-v-37eac4f2"), e = e(), L(), e), Yt = { class: "vimr-upload-file-list-wrap" }, Kt = { class: "vimr-upload-file-list-item-thumbnail" }, Gt = ["src"], Jt = { class: "vimr-upload-file-list-item-content" }, Dt = { class: "vimr-upload-file-list-item-content-header" }, eo = { class: "vimr-upload-file-list-item-tag" }, to = { class: "vimr-upload-file-list-item-content-body" }, oo = { class: "vimr-upload-file-list-item-text-wrap" }, lo = { class: "vimr-upload-file-list-item-text" }, no = { class: "vimr-upload-file-list-item-actions" }, io = { class: "vimr-upload-file-list-item-actions-btns" }, so = ["onClick"], ao = /* @__PURE__ */ we(() => /* @__PURE__ */ p("i", { class: "i-ri-close-fill" }, null, -1)), co = [
ao
], ro = ["onClick"], uo = /* @__PURE__ */ we(() => /* @__PURE__ */ p("i", { class: "i-ri-refresh-line" }, null, -1)), po = [
uo
], vo = { class: "vimr-upload-file-list-item-content-footer" }, fo = /* @__PURE__ */ M({
__name: "UploadList",
props: qt,
emits: ["retry", "remove"],
setup(e, { emit: o }) {
const t = e, l = f();
V(() => t.fileList, (r) => {
l.value = r ?? [], l.value.forEach((n) => {
if (Ut(n.file) && !n.thumbnailUrl) {
const i = new FileReader();
i.onload = (s) => {
var u;
l.value.find((m) => m.id === n.id).thumbnailUrl = (u = s.target) == null ? void 0 : u.result;
}, i.readAsDataURL(n.file);
}
});
}, { immediate: !0 });
const a = (r) => {
o("retry", r);
}, c = (r) => {
o("remove", r);
};
return (r, n) => {
var i;
return g(), b("div", Yt, [
(g(!0), b(A, null, N((i = l.value) == null ? void 0 : i.filter((s) => s.status !== "removed"), (s) => (g(), b("div", {
key: s.id,
class: "vimr-upload-file-list-item"
}, [
p("div", Kt, [
p("img", {
src: s.thumbnailUrl,
alt: ""
}, null, 8, Gt)
]),
p("div", Jt, [
p("div", Dt, [
p("div", eo, j(s.type), 1)
]),
p("div", to, [
p("div", oo, [
p("div", lo, j(s.name), 1)
]),
p("div", no, [
p("div", io, [
s.status === "uploading" ? (g(), b("div", {
key: 0,
class: "vimr-upload-file-list-item-actions-btns-btn",
onClick: (u) => c(s)
}, co, 8, so)) : R("", !0),
s.status === "error" ? (g(), b("div", {
key: 1,
class: "vimr-upload-file-list-item-actions-btns-btn",
onClick: (u) => a(s)
}, po, 8, ro)) : R("", !0)
])
])
]),
p("div", vo, [
p("div", {
class: "vimr-upload-file-list-item-content-footer-progress",
style: E({ width: `${s.status === "finished" || s.status === "error" ? 100 : s.percentage ?? 0}%`, backgroundColor: `${s.status === "finished" ? "#10b981" : s.status === "error" ? "#ef4444" : ""}` })
}, null, 4)
])
])
]))), 128))
]);
};
}
});
const ho = /* @__PURE__ */ O(fo, [["__scopeId", "data-v-37eac4f2"]]), _o = (e) => (H("data-v-2f9a6904"), e = e(), L(), e), mo = /* @__PURE__ */ _o(() => /* @__PURE__ */ p("i", { class: "i-ri-close-fill" }, null, -1)), yo = [
mo
], go = ["onClick"], bo = { class: "vimr-upload-trigger-wrap" }, wo = /* @__PURE__ */ M({
__name: "UploadPanel",
props: Rt,
emits: ["update:show", "update:fileList", "finish", "error", "change"],
setup(e, { emit: o }) {
const t = e, l = f();
Re(l, (r) => {
r.target.className === "i-ri-more-2-fill" || r.target.className === "vimr-upload-panel-toggle-button" || o("update:show", !1);
});
const a = f(t.defaultFileList ?? []);
V(() => t.fileList, (r) => {
a.value = r ?? [], o("update:fileList", r ?? []);
});
const c = (r) => {
a.value = r, o("update:fileList", k(r));
};
return (r, n) => (g(), de(pe, { name: "vimr" }, {
default: Z(() => [
Se(p("div", {
ref_key: "uploadRef",
ref: l,
class: q(["vimr-upload-panel-wrap", [r.blur ? "backdrop-blur-2xl" : ""]])
}, [
p("div", {
class: "vimr-upload-panel-close-icon",
onClick: n[0] || (n[0] = C((i) => o("update:show", !1), ["prevent", "stop"]))
}, yo),
p("div", {
class: "vimr-upload-panel-content",
onClick: C((i) => !1, ["prevent", "stop"])
}, [
z(ho, { "file-list": a.value }, null, 8, ["file-list"])
], 8, go),
p("div", bo, [
z(Xt, ue({ "file-list": a.value }, t, {
"onUpdate:fileList": c,
onFinish: n[1] || (n[1] = (i) => {
o("finish", k(i));
}),
onError: n[2] || (n[2] = (i) => {
o("error", k(i));
}),
onChange: n[3] || (n[3] = (i) => o("change", k(i)))
}), null, 16, ["file-list"])
])
], 2), [
[Be, t.show]
])
]),
_: 1
}));
}
});
const zo = /* @__PURE__ */ O(wo, [["__scopeId", "data-v-2f9a6904"]]), Fo = {
options: {
type: Object,
default: void 0
},
value: {
type: String,
default: void 0
}
}, ko = { class: "vimr-navigation-wrap" }, xo = ["onClick"], $o = { class: "vimr-navigation-item-label" }, Co = /* @__PURE__ */ M({
__name: "Navigation",
props: Fo,
emits: ["update:value"],
setup(e, { emit: o }) {
const t = e, l = f(t.value), a = (c) => {
l.value = c.key, o("update:value", l.value), c.onClick && Q(c.onClick) && c.onClick(c);
};
return V(() => t.value, (c) => {
l.value = c;
}), (c, r) => (g(), b("div", ko, [
(g(!0), b(A, null, N(t.options, (n, i) => (g(), b("div", {
key: i,
class: q(["vimr-navigation-item", n.key === l.value ? "bg-black/10" : ""]),
onClick: (s) => a(n)
}, [
n.icon ? (g(), b("i", {
key: 0,
class: q(["vimr-navigation-item-icon", n.icon])
}, null, 2)) : R("", !0),
p("span", $o, j(n.label), 1)
], 10, xo))), 128))
]));
}
});
const Mo = /* @__PURE__ */ O(Co, [["__scopeId", "data-v-2e25a5a3"]]);
export {
Ct as VIcon,
bt as VItem,
Mo as VNavigation,
zt as VPopupMenu,
Vo as VPreview,
ho as VUploadList,
zo as VUploadPanel,
et as VUploadToggleButton,
Xt as VUploadTrigger,
Oo as VWrap,
kt as iconProps,
ut as itemProps,
Fo as navigationProps,
Mt as popupMenuProps,
Pt as previewProps,
qt as uploadFileListProps,
Rt as uploadPanelProps,
Et as uploadTriggerProps,
tt as wrapProps
};