UNPKG

vue-amazing-ui

Version:

An Amazing Vue3 UI Components Library, Using TypeScript.

1,274 lines 561 kB
import { onMounted as ct, onUnmounted as Tl, ref as d, computed as f, toValue as rl, watch as Me, onBeforeUnmount as Ct, useSlots as ka, reactive as gl, inject as ql, toRefs as Gl, getCurrentInstance as $a, Comment as xa, Text as Ca, defineComponent as be, createBlock as ye, openBlock as a, Transition as rt, withCtx as ae, createElementBlock as n, createCommentVNode as $, normalizeStyle as M, normalizeClass as P, unref as I, createElementVNode as s, Fragment as re, renderSlot as A, createTextVNode as K, toDisplayString as N, withKeys as Ge, withModifiers as Fe, nextTick as Xe, resolveDynamicComponent as et, Teleport as kl, createVNode as $e, withDirectives as Te, vShow as Ve, mergeProps as pe, createSlots as $l, renderList as ze, createStaticVNode as Ut, watchEffect as nt, vModelText as Dl, mergeModels as Xl, useModel as Sa, provide as Zl, normalizeProps as Jt, guardReactiveProps as _t, h as Ma, TransitionGroup as Hl, isVNode as yl, shallowRef as ol } from "vue"; import { TinyColor as Wt } from "@ctrl/tinycolor"; import { generate as Vl } from "@ant-design/colors"; import { getYear as fl, getMonth as Gt, parse as za, format as Xt, startOfDay as vl, startOfMonth as Sl, getTime as Tt, addDays as hl, getDay as Ba, startOfYear as La, addMonths as Pa, set as Ql, isSameDay as Ea, isSameMonth as Jl, getDate as Fa } from "date-fns"; import { useTransition as ia, TransitionPresets as Ra } from "@vueuse/core"; import { toRgbaString as Bt, toHexString as nl, rgba as Lt, rgb2hsv as Ml, hsla as Zt, hsl2hsv as _l, hsva as It, hsl2rgb as zl, hsv2rgb as Dt, rgb2hsl as Bl, hsv2hsl as pl, toHexaString as Ht, toHslaString as Vt, toRgbString as Ll, toHslString as Pl, toHsvaString as jt, toHsvString as El } from "seemly"; import { VueDatePicker as Aa } from "@vuepic/vue-datepicker"; import ml from "qrcode"; import { Swiper as Fl, SwiperSlide as Rl } from "swiper/vue"; import { Autoplay as ea, Navigation as ta, Pagination as la, Mousewheel as Ta, EffectCreative as Da, EffectCards as Ha, EffectCoverflow as Va, EffectFlip as Wa, EffectCube as Oa, EffectFade as Ia } from "swiper/modules"; function e2(e = Date.now(), o = "YYYY-MM-DD HH:mm:ss") { try { let t; if (typeof e == "number" || typeof e == "string") { if (t = new Date(e), isNaN(t.getTime())) throw new Error("Invalid date"); } else t = e; const l = (i, c = 2) => String(i).padStart(c, "0"), u = (i) => { switch (i) { case "YYYY": return l(t.getFullYear()); case "YY": return l(t.getFullYear()).slice(2, 4); case "MM": return l(t.getMonth() + 1); case "M": return String(t.getMonth() + 1); case "DD": return l(t.getDate()); case "D": return String(t.getDate()); case "HH": return l(t.getHours()); case "H": return String(t.getHours()); case "mm": return l(t.getMinutes()); case "m": return String(t.getMinutes()); case "ss": return l(t.getSeconds()); case "s": return String(t.getSeconds()); case "SSS": return l(t.getMilliseconds(), 3); default: return i; } }; return o.replace(/(YYYY|YY|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS)/g, u); } catch (t) { return console.error("Error formatting date:", t), ""; } } function ra(e, o = 2, t = ",", l = ".", u, i) { typeof e != "number" && typeof e != "string" && console.warn("Expected value to be of type number or string"), typeof o != "number" && console.warn("Expected precision to be of type number"); const c = Number(e); if (isNaN(c) || !isFinite(c)) return ""; if (c === 0) return c.toFixed(o); let r = c.toFixed(o); if (typeof t == "string" && t !== "") { const [p, v] = r.split("."); r = p.replace(/(\d)(?=(\d{3})+$)/g, "$1" + t) + (v ? l + v : ""); } return (u || "") + r + (i || ""); } function Pt(e, o = 0, t = !1) { let l = null; function u(c) { if (l || (l = c), c - l >= o) { try { e(); } catch (p) { console.error("Error executing rafTimeout function:", p); } t && (l = c, i.id = requestAnimationFrame(u)); } else i.id = requestAnimationFrame(u); } const i = { id: requestAnimationFrame(u) }; return i; } function ut(e) { e && e.id && typeof e.id == "number" ? cancelAnimationFrame(e.id) : console.warn("cancelRaf received an invalid id:", e); } function ja(e, o = 300) { let t = !0; return function(...l) { if (!t) return !1; t && (e(...l), t = !1, setTimeout(() => { t = !0; }, o)); }; } function Qt(e, o = 300) { let t = null; return function(...l) { t && clearTimeout(t), t = setTimeout(() => { e(...l); }, o); }; } function il(e, o) { if (Number.isNaN(e) || Number.isNaN(o)) throw new Error("Both num1 and num2 must be valid numbers."); const t = e % 1 !== 0, l = o % 1 !== 0; if (!t && !l) return e + o; const u = String(e).split(".")[1] ?? "", i = String(o).split(".")[1] ?? "", c = Math.max(u.length, i.length), r = Math.pow(10, c), p = e.toFixed(c), v = o.toFixed(c); return (+p.replace(".", "") + +v.replace(".", "")) / r; } function Na(e, o) { if (!e) { console.error("无效的 url"); return; } const t = o || e.split("?")[0].split("/").pop() || "download"; try { fetch(e).then((l) => { l.ok ? l.blob().then((u) => { const i = URL.createObjectURL(u), c = document.createElement("a"); c.href = i, c.download = t, document.body.appendChild(c), c.click(), document.body.removeChild(c), URL.revokeObjectURL(i); }) : console.error("请求文件失败,状态码:", l.status); }); } catch (l) { console.error("文件下载失败:", l); } } function t2() { const e = document.documentElement; e.classList.toggle("dark"), e.classList.contains("dark") ? e.style.colorScheme = "dark" : e.style.colorScheme = "light"; } function Ua() { const e = d(!1), o = $a(); return o && ct(() => { e.value = !0; }, o), e; } function ua(e) { const o = Ua(); return f(() => (o.value, !!e())); } function Yt(e, o, t) { ct(() => e.addEventListener(o, t)), Tl(() => e.removeEventListener(o, t)); } function el(e, o, t = {}) { const l = ua(() => window && "MutationObserver" in window), u = d(!1); let i; const c = f(() => { const h = rl(e); return h ? Array.isArray(h) ? h.map((m) => rl(m)).filter((m) => m) : [h] : []; }), r = () => { i && (i.disconnect(), i = void 0); }, p = () => { l.value && c.value.length && !u.value && (i = new MutationObserver(o), c.value.forEach((h) => i.observe(h, t))); }; Me( () => c.value, () => { r(), p(); }, { immediate: !0, // 立即触发回调,以便初始状态也被观察 flush: "post" } ); const v = () => { u.value = !1, p(); }, y = () => { u.value = !0, r(); }; return Ct(() => r()), { start: v, stop: y }; } function Ka(e = window, o = 0, t, l) { const u = d(0), i = d(0), c = d(0), r = d(0), p = d(!1), v = d(!1), y = d(!1), h = d(!1), m = d(!1), E = d(0), B = d(0); function z(H) { p.value = !0; const D = H.target.documentElement ?? H.target; u.value = D.scrollLeft, c.value = D.scrollTop, v.value = u.value < E.value, y.value = u.value > E.value, h.value = c.value < B.value, m.value = c.value > B.value, E.value = u.value, B.value = c.value, x(H), t && t(H); } const k = ja(z, o); function g(H) { p.value && (p.value = !1, v.value = !1, y.value = !1, h.value = !1, m.value = !1, l && l(H)); } const x = Qt(g, o + 200), b = f(() => { const H = rl(e); return H || null; }); Me( () => b.value, (H, D) => { if (D && w(D), H) { const W = H?.document?.documentElement || H?.documentElement || H; i.value = W.scrollWidth - W.clientWidth, r.value = W.scrollHeight - W.clientHeight, W.addEventListener("scroll", k), W.addEventListener("scrollend", x); } }, { immediate: !0, flush: "post" } ); function w(H) { const D = H?.document?.documentElement || H?.documentElement || H; D.removeEventListener("scroll", k), D.removeEventListener("scrollend", x); } return Ct(() => w(b.value)), { x: u, xScrollMax: i, y: c, yScrollMax: r, isScrolling: p, left: v, right: y, top: h, bottom: m }; } function l2() { const e = d(0), o = d(0); let t = performance.now(); const l = 10, u = (i) => { if (o.value++, o.value >= l) { const c = i - t; e.value = Math.round(1e3 / (c / l)), t = i, o.value = 0; } requestAnimationFrame(u); }; return requestAnimationFrame(u), { fps: e }; } function a2(e) { if (!e || typeof e != "string" || e.trim() === "") throw new Error("Invalid mediaQuery parameter. It must be a non-empty string."); const o = d(window && window.matchMedia(e).matches), t = window.matchMedia(e), l = (u) => { o.value = u.matches; }; return ct(() => { t.addEventListener("change", l); }), Ct(() => { t.removeEventListener("change", l); }), { match: o }; } function St(e, o, t = {}) { const l = ua(() => window && "ResizeObserver" in window); let u; const i = d(!1), c = f(() => { const h = rl(e); return h ? Array.isArray(h) ? h.map((m) => rl(m)).filter((m) => m) : [h] : []; }), r = () => { u && (u.disconnect(), u = void 0); }, p = () => { l.value && c.value.length && !i.value && (u = new ResizeObserver(o), c.value.forEach((h) => u.observe(h, t))); }; Me( () => c.value, () => { r(), p(); }, { immediate: !0, // 立即触发回调,以便初始状态也被观察 flush: "post" } ); const v = () => { i.value = !1, p(); }, y = () => { i.value = !0, r(); }; return Ct(() => r()), { start: v, stop: y }; } function Ze(e) { const o = ka(), t = (l) => { const u = o[l]?.(), i = (c) => { if (c.type === xa || Array.isArray(c.children) && !c.children.length) return !1; if (c.type !== Ca) return !0; if (typeof c.children == "string") return c.children.trim() !== ""; }; return u && u?.length ? u.some((r) => i(r)) : !1; }; if (Array.isArray(e)) { const l = gl({}); return e.forEach((u) => { const i = f(() => t(u)); l[u] = i; }), l; } else return f(() => t(e)); } function Qe(e) { const o = Ya("#1677ff"), t = ql("common", gl({ colorPalettes: o, shadowColor: qa(o[0]) })), l = ql("components", null); return l !== null && e in l && l[e].colorPalettes.length ? Gl(l[e]) : Gl(t); } function Ya(e) { return Vl(e); } function Al(e) { return e >= 0 && e <= 255; } function qa(e, o = "#ffffff") { const { r: t, g: l, b: u, a: i } = new Wt(e).toRgb(); if (i < 1) return e; const { r: c, g: r, b: p } = new Wt(o).toRgb(); for (let v = 0.01; v <= 1; v += 0.01) { const y = Math.round((t - c * (1 - v)) / v), h = Math.round((l - r * (1 - v)) / v), m = Math.round((u - p * (1 - v)) / v); if (Al(y) && Al(h) && Al(m)) return new Wt({ r: y, g: h, b: m, a: Math.round(v * 100) / 100 }).toRgbString(); } return new Wt({ r: t, g: l, b: u, a: 1 }).toRgbString(); } function tl(e) { const o = d(!1); try { const t = { get [e]() { return o.value = !0, !1; } }; window.addEventListener("test", () => null, t), window.removeEventListener("test", () => null, t); } catch { o.value = !1; } return { isSupported: o }; } const Ga = { key: 0, class: "alert-icon" }, Xa = ["src"], Za = { key: 1, class: "icon-svg", focusable: "false", "data-icon": "info-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, Qa = { key: 2, class: "icon-svg", focusable: "false", "data-icon": "check-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, Ja = { key: 3, class: "icon-svg", focusable: "false", "data-icon": "exclamation-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, _a = { key: 4, class: "icon-svg", focusable: "false", "data-icon": "close-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, eo = { key: 1, class: "big-icon" }, to = ["src"], lo = { key: 1, class: "icon-svg", focusable: "false", "data-icon": "info-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, ao = { key: 2, class: "icon-svg", focusable: "false", "data-icon": "check-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, oo = { key: 3, class: "icon-svg", focusable: "false", "data-icon": "exclamation-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, no = { key: 4, class: "icon-svg", focusable: "false", "data-icon": "close-circle", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, so = { class: "alert-content" }, io = { class: "alert-message" }, ro = { key: 0, class: "alert-description" }, uo = { key: 1, class: "alert-actions" }, co = ["onKeydown"], fo = { key: 0 }, vo = { key: 1, class: "alert-close", focusable: "false", "data-icon": "close", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true", viewBox: "64 64 896 896" }, ho = /* @__PURE__ */ be({ __name: "Alert", props: { message: { default: void 0 }, description: { default: void 0 }, type: { default: "default" }, bordered: { type: Boolean, default: !0 }, closable: { type: Boolean, default: !1 }, closeText: { default: void 0 }, icon: { default: void 0 }, showIcon: { type: Boolean, default: !1 }, actions: { type: Function, default: void 0 } }, emits: ["close"], setup(e, { emit: o }) { const t = e, l = d(), u = d(!1), { colorPalettes: i } = Qe("Alert"), c = o, r = Ze(["icon", "description", "actions"]), p = f(() => r.icon || t.icon || ["success", "info", "warning", "error"].includes(t.type)), v = f(() => r.description || t.description); async function y(h) { l.value.style.maxHeight = `${l.value.offsetHeight}px`, await Xe(), u.value = !0, c("close", h); } return (h, m) => (a(), ye(rt, { name: "alert-motion", "leave-from-class": "alert-motion-leave", "leave-active-class": "alert-motion-leave alert-motion-leave-active", "leave-to-class": "alert-motion-leave alert-motion-leave-active" }, { default: ae(() => [ u.value ? $("", !0) : (a(), n("div", { key: 0, ref_key: "alertRef", ref: l, class: P(["alert-wrap", [ `alert-${e.type}`, { "alert-borderless": !e.bordered, "alert-width-description": v.value } ]]), style: M(` --alert-primary-color: ${I(i)[5]}; --alert-primary-bg-color: ${I(i)[0]}; --alert-primary-border-color: ${I(i)[2]}; --alert-success-color: #52c41a; --alert-success-bg-color: #f6ffed; --alert-success-border-color: #b7eb8f; --alert-warning-color: #faad14; --alert-warning-bg-color: #fffbe6; --alert-warning-border-color: #ffe58f; --alert-error-color: #ff4d4f; --alert-error-bg-color: #fff2f0; --alert-error-border-color: #ffccc7; `) }, [ e.showIcon && p.value ? (a(), n(re, { key: 0 }, [ v.value ? (a(), n("span", eo, [ A(h.$slots, "icon", {}, () => [ e.icon ? (a(), n("img", { key: 0, src: e.icon, class: "big-icon-img" }, null, 8, to)) : e.type === "info" ? (a(), n("svg", lo, [...m[4] || (m[4] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1), s("path", { d: "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" }, null, -1) ])])) : e.type === "success" ? (a(), n("svg", ao, [...m[5] || (m[5] = [ s("path", { d: "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" }, null, -1), s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1) ])])) : e.type === "warning" ? (a(), n("svg", oo, [...m[6] || (m[6] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1), s("path", { d: "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" }, null, -1) ])])) : e.type === "error" ? (a(), n("svg", no, [...m[7] || (m[7] = [ s("path", { d: "M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z" }, null, -1), s("path", { d: "M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" }, null, -1) ])])) : $("", !0) ], !0) ])) : (a(), n("span", Ga, [ A(h.$slots, "icon", {}, () => [ e.icon ? (a(), n("img", { key: 0, src: e.icon, class: "icon-img" }, null, 8, Xa)) : e.type === "info" ? (a(), n("svg", Za, [...m[0] || (m[0] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" }, null, -1) ])])) : e.type === "success" ? (a(), n("svg", Qa, [...m[1] || (m[1] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" }, null, -1) ])])) : e.type === "warning" ? (a(), n("svg", Ja, [...m[2] || (m[2] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" }, null, -1) ])])) : e.type === "error" ? (a(), n("svg", _a, [...m[3] || (m[3] = [ s("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z" }, null, -1) ])])) : $("", !0) ], !0) ])) ], 64)) : $("", !0), s("div", so, [ s("div", io, [ A(h.$slots, "default", {}, () => [ K(N(e.message), 1) ], !0) ]), v.value ? (a(), n("div", ro, [ A(h.$slots, "description", {}, () => [ K(N(e.description), 1) ], !0) ])) : $("", !0) ]), I(r).actions ? (a(), n("div", uo, [ A(h.$slots, "actions", {}, void 0, !0) ])) : $("", !0), e.closable ? (a(), n("a", { key: 2, tabindex: "0", class: "alert-close", onClick: y, onKeydown: Ge(Fe(y, ["prevent"]), ["enter"]) }, [ A(h.$slots, "closeText", {}, () => [ e.closeText ? (a(), n("span", fo, N(e.closeText), 1)) : (a(), n("svg", vo, [...m[8] || (m[8] = [ s("path", { d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" }, null, -1) ])])) ], !0) ], 40, co)) : $("", !0) ], 6)) ]), _: 3 })); } }), xe = (e, o) => { const t = e.__vccOpts || e; for (const [l, u] of o) t[l] = u; return t; }, po = /* @__PURE__ */ xe(ho, [["__scopeId", "data-v-a8544be4"]]), we = (e) => { const o = e; return o.install = function(t) { t.component(o.__name, e); }, e; }, mo = we(po), go = ["src", "alt"], yo = /* @__PURE__ */ be({ __name: "Avatar", props: { color: { default: "rgba(0, 0, 0, 0.25)" }, shape: { default: "circle" }, size: { default: "middle" }, src: { default: void 0 }, alt: { default: void 0 }, icon: { type: [Object, Function], default: void 0 }, href: { default: void 0 }, target: { default: "_self" } }, setup(e) { const o = e, t = d(window.innerWidth), l = Ze(["default", "icon"]), u = f(() => o.src ? !1 : !!(l.icon || o.icon)), i = f(() => { if (typeof o.size == "number") return u.value ? { backgroundColor: o.color, width: `${o.size}px`, height: `${o.size}px`, lineHeight: `${o.size}px`, fontSize: `${o.size / 2}px` } : { backgroundColor: o.color, width: `${o.size}px`, height: `${o.size}px`, lineHeight: `${o.size}px`, fontSize: "18px" }; if (typeof o.size == "object") { let v = 32; return t.value >= 1600 && o.size.xxl !== void 0 ? v = o.size.xxl : t.value >= 1200 && o.size.xl !== void 0 ? v = o.size.xl : t.value >= 992 && o.size.lg !== void 0 ? v = o.size.lg : t.value >= 768 && o.size.md !== void 0 ? v = o.size.md : t.value >= 576 && o.size.sm !== void 0 ? v = o.size.sm : t.value < 576 && o.size.xs !== void 0 && (v = o.size.xs), { backgroundColor: o.color, width: `${v}px`, height: `${v}px`, lineHeight: `${v}px`, fontSize: `${v / 2}px` }; } return { backgroundColor: o.color }; }), c = f(() => !o.src && !u.value ? l.default : !1), r = f(() => { if (typeof o.size == "string") return { transform: "scale(1) translateX(-50%)" }; if (typeof o.size == "number") { const v = Math.min(1, Math.max(0.022222222222222223, (1 + (o.size - 9) * 1) / 45)); return { lineHeight: `${o.size}px`, transform: `scale(${v}) translateX(-50%)` }; } return {}; }); Yt(window, "resize", p); function p() { t.value = window.innerWidth; } return (v, y) => (a(), ye(et(e.href ? "a" : "div"), { class: P(["avatar-wrap", [ `avatar-${e.shape}`, { [`avatar-${e.size}`]: typeof e.size == "string" && ["small", "middle", "large"].includes(e.size), "avatar-image": e.src, "avatar-link": e.href } ]]), style: M(i.value), href: e.href, target: e.target }, { default: ae(() => [ e.src ? (a(), n("img", { key: 0, class: "image-item", src: e.src, alt: e.alt }, null, 8, go)) : $("", !0), !e.src && u.value ? A(v.$slots, "icon", { key: 1 }, () => [ (a(), ye(et(e.icon))) ], !0) : $("", !0), c.value ? (a(), n("span", { key: 2, class: "string-item", style: M(r.value) }, [ A(v.$slots, "default", {}, void 0, !0) ], 4)) : $("", !0) ]), _: 3 }, 8, ["class", "style", "href", "target"])); } }), bo = /* @__PURE__ */ xe(yo, [["__scopeId", "data-v-5a0b276f"]]), ca = we(bo), wo = /* @__PURE__ */ be({ __name: "Tooltip", props: { maxWidth: { default: 240 }, content: { default: void 0 }, contentClass: { default: void 0 }, contentStyle: { default: () => ({}) }, tooltip: { default: void 0 }, tooltipClass: { default: void 0 }, tooltipStyle: { default: () => ({}) }, bgColor: { default: "rgba(0, 0, 0, 0.85)" }, arrow: { type: Boolean, default: !0 }, placement: { default: "top" }, flip: { type: Boolean, default: !0 }, trigger: { default: "hover" }, keyboard: { type: Boolean, default: !1 }, to: { type: [String, Boolean], default: "body" }, transitionDuration: { default: 100 }, showDelay: { default: 100 }, hideDelay: { default: 100 }, show: { type: Boolean, default: !1 }, showControl: { type: Boolean, default: !1 } }, emits: ["update:show", "openChange", "animationend"], setup(e, { expose: o, emit: t }) { const l = e, u = d(!1), i = d(!1), c = d(), r = d(null), p = d(0), v = d(0), y = d(0), h = d("top"), m = d(null), E = d(), B = d(null), z = d(null), k = d(), g = d(null), x = d(), b = d(document.documentElement.clientWidth), w = d(document.documentElement.clientHeight), { isSupported: H } = tl("passive"), { isSupported: D } = tl("capture"), W = t, S = Ze(["tooltip"]), F = f(() => typeof l.maxWidth == "number" ? `${l.maxWidth}px` : l.maxWidth), j = f(() => S.tooltip || l.tooltip), C = f(() => { const ge = E.value?.top ?? 0, He = k.value?.top ?? 0, ue = ge - He, Be = E.value?.left ?? 0, te = k.value?.left ?? 0, ce = Be - te; switch (h.value) { case "top": return { transformOrigin: `50% ${v.value}px`, top: `${ue - v.value}px`, left: `${ce - y.value}px` }; case "bottom": return { transformOrigin: `50% ${l.arrow ? -4 : -6}px`, top: `${ue + v.value}px`, left: `${ce - y.value}px` }; case "left": return { transformOrigin: `${y.value}px 50%`, top: `${ue - v.value}px`, left: `${ce - y.value}px` }; case "right": return { transformOrigin: `${l.arrow ? -4 : -6}px 50%`, top: `${ue - v.value}px`, left: `${ce + y.value}px` }; default: return { transformOrigin: `50% ${v.value}px`, top: `${ue - v.value}px`, left: `${ce - y.value}px` }; } }); Me( () => [l.placement, l.arrow, l.flip], () => { Ce(); }, { deep: !0 } ), Me( () => j.value && i.value, (ge) => { ge && !u.value && (u.value = !0); }, { immediate: !0 } ), Me( () => l.show, (ge) => { ge && !i.value && le(), !ge && i.value && ve(); }, { immediate: !0 } ), ct(() => { oe(); }), Ct(() => { fe(); }); const U = el( r, () => { p.value !== r.value?.scrollTop && (p.value = r.value?.scrollTop ?? 0, Ce()); }, { subtree: !0, attributes: !0 } ); Yt(window, "resize", J), St([g, m], (ge) => { if (j.value && i.value) { if (ge.length === 1 && ge[0].target.classList.contains("tooltip-card")) { const { blockSize: He, inlineSize: ue } = ge[0].borderBoxSize[0]; if (Math.round(He) === Math.round(x.value.height) && Math.round(ue) === Math.round(x.value.width)) return; } Ce(); } }); function q() { let ge = B.value?.parentElement; for (; ge; ) { if (ge === document.documentElement) { z.value = document.documentElement; return; } const { position: He } = getComputedStyle(ge); if (He !== "static") { z.value = ge; return; } ge = ge.parentElement; } } function J() { b.value = document.documentElement.clientWidth, w.value = document.documentElement.clientHeight, oe(), Ce(); } function oe() { fe(), r.value = se(m.value), r.value && r.value.addEventListener( "scroll", Ce, H.value ? { passive: !0 } : void 0 ), r.value === document.documentElement ? U.start() : U.stop(); } function fe() { r.value && r.value.removeEventListener("scroll", Ce), r.value = null; } function G(ge) { return ge === document.documentElement ? null : ge.parentElement; } function se(ge) { if (ge === null) return null; const He = G(ge); return He === null ? null : He === document.documentElement ? document.documentElement : ((Be) => { const { overflow: te, overflowX: ce, overflowY: Ee } = getComputedStyle(Be); return /(auto|scroll|overlay)/.test(te + Ee + ce); })(He) ? He : se(He); } function Ce() { i.value && Re(); } async function Re() { await Xe(), q(), k.value = z.value?.getBoundingClientRect(), E.value = m.value?.getBoundingClientRect(), x.value = g.value?.getBoundingClientRect(), l.flip && (h.value = _()), h.value === "top" ? (v.value = x.value.height + (l.arrow ? 16 : 6), y.value = (x.value.width - E.value.width) / 2) : h.value === "bottom" ? (v.value = E.value.height + (l.arrow ? 4 : 6), y.value = (x.value.width - E.value.width) / 2) : h.value === "left" ? (v.value = (x.value.height - E.value.height) / 2, y.value = x.value.width + (l.arrow ? 16 : 6)) : h.value === "right" && (v.value = (x.value.height - E.value.height) / 2, y.value = E.value.width + (l.arrow ? 4 : 6)); } function X() { if (r.value) { const ge = r.value.getBoundingClientRect(); return { top: ge.top < 0 ? 0 : ge.top, left: ge.left < 0 ? 0 : ge.left, bottom: ge.bottom > w.value ? w.value : ge.bottom, right: ge.right > b.value ? b.value : ge.right }; } return { top: 0, left: 0, bottom: w.value, right: b.value }; } function _() { const { top: ge, bottom: He, left: ue, right: Be } = E.value, { top: te, bottom: ce, left: Ee, right: je } = X(), Je = ge - te - (l.arrow ? 12 : 0), tt = ce - He - (l.arrow ? 12 : 0), _e = ue - Ee - (l.arrow ? 12 : 0), O = je - Be - (l.arrow ? 12 : 0), T = (x.value.width - E.value.width) / 2, ee = (x.value.height - E.value.height) / 2; return ne(l.placement, []); function ne(Ae, ke) { if (Ae === "top") { if (ke.includes("top")) return ke.includes("bottom") ? ke.includes("left") ? ne("right", ke) : ne("left", ke) : ne("bottom", ke); if (Je < x.value.height + (l.arrow ? 4 : 6) && ke.length !== 3) return ne("bottom", [...ke, "top"]); if (_e >= T && O >= T) return "top"; if (ke.length !== 3) { if (_e >= T) return ne("left", ["top", "bottom", "right"]); if (O >= T) return ne("right", ["top", "bottom", "left"]); } } else if (Ae === "bottom") { if (ke.includes("bottom")) return ke.includes("top") ? ke.includes("left") ? ne("right", ke) : ne("left", ke) : ne("top", ke); if (tt < x.value.height + (l.arrow ? 4 : 6) && ke.length !== 3) return ne("top", [...ke, "bottom"]); if (_e >= T && O >= T) return "bottom"; if (ke.length !== 3) { if (_e >= T) return ne("left", ["top", "bottom", "right"]); if (O >= T) return ne("right", ["top", "bottom", "left"]); } } else if (Ae === "left") { if (ke.includes("left")) return ke.includes("right") ? ke.includes("top") ? ne("bottom", ke) : ne("top", ke) : ne("right", ke); if (_e < x.value.width + (l.arrow ? 4 : 6) && ke.length !== 3) return ne("right", [...ke, "left"]); if (Je >= ee && tt >= ee) return "left"; if (ke.length !== 3) { if (Je >= ee) return ne("top", ["left", "right", "bottom"]); if (tt >= ee) return ne("bottom", ["left", "right", "top"]); } } else if (Ae === "right") { if (ke.includes("right")) return ke.includes("left") ? ke.includes("top") ? ne("bottom", ke) : ne("top", ke) : ne("left", ke); if (O < x.value.width + (l.arrow ? 4 : 6) && ke.length !== 3) return ne("left", [...ke, "right"]); if (Je >= ee && tt >= ee) return "right"; if (ke.length !== 3) { if (Je >= ee) return ne("top", ["left", "right", "bottom"]); if (tt >= ee) return ne("bottom", ["left", "right", "top"]); } } return l.placement; } } function le() { c.value && ut(c.value), i.value || (c.value = Pt(() => { i.value = !0, Re(), W("update:show", !0), W("openChange", !0), j.value && l.trigger === "click" && document.addEventListener("click", Pe, D.value ? { capture: !0 } : !0); }, l.showDelay)); } function ve() { c.value && ut(c.value), i.value && (c.value = Pt(() => { i.value = !1, W("update:show", !1), W("openChange", !1), j.value && l.trigger === "click" && document.removeEventListener("click", Pe, D.value ? { capture: !0 } : !0); }, l.hideDelay)); } function ie() { i.value ? ve() : le(); } function Pe(ge) { B.value?.contains(ge.target) || ve(); } function We() { j.value && l.trigger === "hover" && !l.showControl && le(); } function he() { j.value && l.trigger === "hover" && !l.showControl && ve(); } function Se() { W("animationend", i.value); } function me() { l.trigger === "hover" && !l.showControl && le(); } function De() { l.trigger === "hover" && !l.showControl && ve(); } return o({ show: le, hide: ve, observeScroll: oe }), (ge, He) => (a(), n("div", { class: "tooltip-wrap", onMouseenter: We, onMouseleave: he }, [ (a(), ye(kl, { disabled: e.to === !1, to: e.to === !1 ? null : e.to }, [ $e(rt, { name: "zoom", "enter-from-class": "zoom-enter", "enter-active-class": "zoom-enter", "enter-to-class": "zoom-enter zoom-enter-active", "leave-from-class": "zoom-leave", "leave-active-class": "zoom-leave zoom-leave-active", "leave-to-class": "zoom-leave zoom-leave-active", onAnimationend: Se }, { default: ae(() => [ u.value ? Te((a(), n("div", { key: 0, ref_key: "tooltipRef", ref: B, class: P(["tooltip-card-container", { [`tooltip-${h.value}-padding`]: e.arrow }]), style: M({ ...C.value, "--tooltip-max-width": F.value, "--tooltip-background-color": e.bgColor, "--tooltip-transition-duration": `${e.transitionDuration}ms` }), onMouseenter: me, onMouseleave: De, onKeydown: He[0] || (He[0] = Ge((ue) => e.trigger === "click" && e.keyboard && i.value ? ve() : () => !1, ["esc"])) }, [ s("div", { ref_key: "tooltipCardRef", ref: g, class: P(["tooltip-card", e.tooltipClass]), style: M(e.tooltipStyle) }, [ A(ge.$slots, "tooltip", {}, () => [ K(N(e.tooltip), 1) ], !0) ], 6), e.arrow ? (a(), n("div", { key: 0, class: P(["tooltip-arrow", `arrow-${h.value || "top"}`]) }, null, 2)) : $("", !0) ], 38)), [ [Ve, j.value && i.value] ]) : $("", !0) ]), _: 3 }) ], 8, ["disabled", "to"])), s("span", { ref_key: "tooltipContentRef", ref: m, class: P(["tooltip-content", e.contentClass]), style: M(e.contentStyle), onClick: He[1] || (He[1] = (ue) => j.value && e.trigger === "click" && !i.value ? le() : () => !1), onKeydown: [ He[2] || (He[2] = Ge((ue) => j.value && e.trigger === "click" && e.keyboard ? ie() : () => !1, ["enter"])), He[3] || (He[3] = Ge((ue) => j.value && e.trigger === "click" && e.keyboard && i.value ? ve() : () => !1, ["esc"])) ] }, [ A(ge.$slots, "default", {}, () => [ K(N(e.content), 1) ], !0) ], 38) ], 32)); } }), ko = /* @__PURE__ */ xe(wo, [["__scopeId", "data-v-f1dca55a"]]), xt = we(ko), $o = { key: 1, width: "1em", height: "1em", viewBox: "0 0 24 24", version: "1.1", xmlns: "http://www.w3.org/2000/svg", xlinkHref: "http://www.w3.org/1999/xlink" }, xo = { key: 0, class: "backtop-description" }, Co = /* @__PURE__ */ be({ __name: "BackTop", props: { icon: { type: [Object, Function], default: void 0 }, description: { default: void 0 }, tooltip: { default: void 0 }, tooltipProps: { default: () => ({}) }, type: { default: "default" }, shape: { default: "circle" }, bottom: { default: 40 }, right: { default: 40 }, zIndex: { default: 9 }, visibilityHeight: { default: 180 }, to: { default: "body" }, listenTo: { default: void 0 } }, emits: ["click", "show"], setup(e, { emit: o }) { const t = e, l = d(!1), u = d(null), i = d(0), c = d(null), { colorPalettes: r } = Qe("BackTop"), { isSupported: p } = tl("passive"), v = o, y = Ze(["tooltip", "icon", "description"]), h = f(() => ({ bottom: typeof t.bottom == "number" ? `${t.bottom}px` : t.bottom, right: typeof t.right == "number" ? `${t.right}px` : t.right })), m = f(() => i.value >= t.visibilityHeight), E = f(() => y.tooltip || t.tooltip), B = f(() => y.description || t.description); Me( m, (D) => { D && !l.value && (l.value = !0); }, { immediate: !0 } ), Me( () => t.listenTo, () => { g(); }, { flush: "post" } ), Me(m, (D) => { v("show", D); }), ct(() => { g(); }), Ct(() => { x(); }); const z = el( c, () => { i.value = c.value?.scrollTop ?? 0; }, { subtree: !0, childList: !0, attributes: !0, characterData: !0 } ); function k(D) { i.value = D.target.scrollTop; } function g() { x(), t.listenTo === void 0 ? c.value = w(u.value) : typeof t.listenTo == "string" ? c.value = document.getElementsByTagName(t.listenTo)[0] : t.listenTo instanceof HTMLElement && (c.value = t.listenTo), c.value || console.warn("Container of back-top element is not found."), c.value && c.value.addEventListener( "scroll", k, p.value ? { passive: !0 } : void 0 ), c.value === document.documentElement ? z.start() : z.stop(); } function x() { c.value && c.value.removeEventListener("scroll", k), c.value = null, z.stop(); } function b(D) { return D === document.documentElement ? null : D.parentElement; } function w(D) { if (D === null) return null; const W = b(D); return W === null ? null : W === document.documentElement ? document.documentElement : ((F) => { const { overflow: j, overflowX: C, overflowY: U } = getComputedStyle(F); return /(auto|scroll|overlay)/.test(j + U + C); })(W) ? W : w(W); } function H() { c.value && c.value.scrollTo({ top: 0, behavior: "smooth" // 平滑滚动并产生过渡效果 }), v("click"); } return (D, W) => (a(), n("div", { ref_key: "backTopPlaceholderRef", ref: u, class: "back-top-placeholder", style: { display: "none" } }, [ (a(), ye(kl, { to: e.to }, [ $e(rt, { name: "zoom" }, { default: ae(() => [ l.value ? Te((a(), n("div", pe({ key: 0, class: "back-top", style: [ h.value, ` --backtop-z-index: ${e.zIndex}; --backtop-width: 44px; --backtop-height: 44px; --backtop-icon-size: 26px; --backtop-icon-with-desc-size: 24px; --backtop-desc-font-size: 12px; --backtop-default-color: rgba(0, 0, 0, 0.88); --backtop-default-color-hover: ${I(r)[5]}; --backtop-default-bg-color: rgba(255, 255, 255, 0.88); --backtop-default-bg-color-hover: rgba(255, 255, 255); --backtop-default-shadow-color: rgba(0, 0, 0, 0.12); --backtop-default-shadow-color-hover: rgba(0, 0, 0, 0.12); --backtop-primary-color: #fff; --backtop-primary-color-hover: #fff; --backtop-primary-bg-color: ${I(r)[5]}; --backtop-primary-bg-color-hover: ${I(r)[4]}; --backtop-primary-shadow-color: rgba(9, 88, 217, 0.32); --backtop-primary-shadow-color-hover: rgba(9, 88, 217, 0.32); --backtop-circle-border-radius: calc(var(--backtop-width) / 2); --backtop-square-border-radius: 8px; ` ], onClick: H }, D.$attrs), [ $e(I(xt), pe({ style: `border-radius: var(--backtop-${e.shape}-border-radius)`, "content-style": { borderRadius: `var(--backtop-${e.shape}-border-radius)` } }, e.tooltipProps), $l({ default: ae(() => [ s("div", { class: P(["backtop-wrap", `backtop-${e.type} backtop-${e.shape}`]) }, [ A(D.$slots, "default", {}, () => [ s("span", { class: P(["backtop-icon", { "icon-with-description": B.value }]) }, [ A(D.$slots, "icon", {}, () => [ e.icon ? (a(), ye(et(e.icon), { key: 0 })) : (a(), n("svg", $o, [...W[0] || (W[0] = [ s("g", { stroke: "none", "stroke-width": "1", "fill-rule": "evenodd" }, [ s("g", { transform: "translate(-139.000000, -4423.000000)", "fill-rule": "nonzero" }, [ s("g", { transform: "translate(120.000000, 4285.000000)" }, [ s("g", { transform: "translate(7.000000, 126.000000)" }, [ s("g", { transform: "translate(24.000000, 24.000000) scale(1, -1) translate(-24.000000, -24.000000) translate(12.000000, 12.000000)" }, [ s("g", { transform: "translate(4.000000, 2.000000)" }, [ s("path", { d: "M8,0 C8.51283584,0 8.93550716,0.38604019 8.99327227,0.883378875 L9,1 L9,10.584 L12.2928932,7.29289322 C12.6834175,6.90236893 13.3165825,6.90236893 13.7071068,7.29289322 C14.0675907,7.65337718 14.0953203,8.22060824 13.7902954,8.61289944 L13.7071068,8.70710678 L8.70710678,13.7071068 L8.62544899,13.7803112 L8.618,13.784 L8.59530661,13.8036654 L8.4840621,13.8753288 L8.37133602,13.9287745 L8.22929083,13.9735893 L8.14346259,13.9897165 L8.03324678,13.9994506 L7.9137692,13.9962979 L7.77070917,13.9735893 L7.6583843,13.9401293 L7.57677845,13.9063266 L7.47929125,13.8540045 L7.4048407,13.8036865 L7.38131006,13.7856883 C7.35030318,13.7612383 7.32077858,13.7349921 7.29289322,13.7071068 L2.29289322,8.70710678 L2.20970461,8.61289944 C1.90467972,8.22060824 1.93240926,7.65337718 2.29289322,7.29289322 C2.65337718,6.93240926 3.22060824,6.90467972 3.61289944,7.20970461 L3.70710678,7.29289322 L7,10.585 L7,1 L7.00672773,0.883378875 C7.06449284,0.38604019 7.48716416,0 8,0 Z" }), s("path", { d: "M14.9333333,15.9994506 C15.5224371,15.9994506 16,16.4471659 16,16.9994506 C16,17.5122865 15.5882238,17.9349578 15.0577292,17.9927229 L14.9333333,17.9994506 L1.06666667,17.9994506 C0.477562934,17.9994506 0,17.5517354 0,16.9994506 C0,16.4866148 0.411776203,16.0639435 0.9422708,16.0061783 L1.06666667,15.9994506 L14.9333333,15.9994506 Z" }) ]) ]) ]) ]) ]) ], -1) ])])) ], !0) ], 2), B.value ? (a(), n("span", xo, [ A(D.$slots, "description", {}, () => [ K(N(e.description), 1) ], !0) ])) : $("", !0) ], !0) ], 2) ]), _: 2 }, [ E.value ? { name: "tooltip", fn: ae(() => [ A(D.$slots, "tooltip", {}, () => [ K(N(e.tooltip), 1) ], !0) ]), key: "0" } : void 0 ]), 1040, ["style", "content-style"]) ], 16)), [ [Ve, m.value] ]) : $("", !0) ]), _: 3 }) ], 8, ["to"])) ], 512)); } }), So = /* @__PURE__ */ xe(Co, [["__scopeId", "data-v-70c99b40"]]), Mo = we(So), zo = { class: "status-text" }, Bo = ["title"], Lo = { key: 0, class: "number-value", style: { transition: "none 0s ease 0s" } }, Po = { class: "number" }, Eo = /* @__PURE__ */ be({ __name: "Badge", props: { color: { default: void 0 }, value: { default: void 0 }, max: { default: 99 }, showZero: { type: Boolean, default: !1 }, dot: { type: Boolean, default: !1 }, offset: { default: void 0 }, status: { default: void 0 }, text: { default: void 0 }, valueStyle: { default: () => ({}) }, zIndex: { default: 9 }, title: { default: void 0 }, ripple: { type: Boolean, default: !1 } }, setup(e) { const o = e, t = [ "pink", "red", "yellow", "orange", "cyan", "green", "blue", "purple", "geekblue", "magenta", "volcano", "gold", "lime" ], l = Ze(["default", "value"]), u = f(() => { if (o.color && !t.includes(o.color)) return o.value !== void 0 && o.value !== 0 || o.showZero && o.value === 0 ? { backgroundColor: o.color } : { color: o.color, backgroundColor: o.color }; }), i = f(() => { if (o.color && t.includes(o.color)) return o.value !== void 0 && o.value !== 0 || o.showZero && o.value === 0 ? `color-${o.color} white` : `color-${o.color}`; if (o.status) return o.value !== void 0 && o.value !== 0 || o.showZero && o.value === 0 ? `status-${o.status} white` : `status-${o.status}`; }), c = f(() => o.value !== void 0 || o.dot || !o.color && !o.status ? l.default : !1), r = f(() => !o.color && !o.status ? l.value : !1), p = f(() => !!(o.value !== void 0 && o.value !== 0 || o.showZero && o.value === 0 || o.dot)), v = f(() => o.value === void 0 || o.value === 0 && !o.showZero || o.dot), y = f(() => o.offset?.length ? { right: h(o.offset[0]) ? -o.offset[0] + "px" : m(o.offset[0]), marginTop: h(o.offset[1]) ? o.offset[1] + "px" : o.offset[1] } : {}); function h(E) { return typeof E == "number"; } function m(E) { return E.includes("-") ? E.replace("-", "") : `-${E}`; } return (E, B) => (a(), n("div", { class: P(["badge-wrap", { "badge-status-color": e.value === void 0 && (e.color || e.status) }]), style: M([`--badge-z-index: ${e.zIndex}`, e.value === void 0 && !e.dot ? y.value : null]) }, [ e.value === void 0 && !e.dot && (e.color || e.status) ? (a(), n(re, { key: 0 }, [ s("span", { class: P(["status-dot", [i.value, { "dot-ripple": e.ripple }]]), style: M(u.value) }, null, 6), s("span", zo, [ A(E.$slots, "default", {}, () => [ K(N(e.text), 1) ], !0) ]) ], 64)) : (a(), n(re, { key: 1 }, [ c.value ? A(E.$slots, "default", { key: 0 }, void 0, !0) : $("", !0), r.value ? (a(), n("span", { key: 1, class: P(["value", { "only-number": !c.value }]) }, [ A(E.$slots, "value", {}, void 0, !0) ], 2)) : (a(), ye(rt, { key: