import { d as s, _ as B, K as V, dE as ze, dF as Se, bW as Me, g as Ke, c as Te, aj as We, dG as Ue, dH as Fe, u as we, w as ae, bq as X, L as Ve, db as se, dI as Xe, o as W, R as qe, y as ce, dJ as Ee, dK as Ge, cx as Je, dL as Qe, dM as Ye } from "./index2.js"; import { defineComponent as ie, shallowRef as Ze, onMounted as fe, createVNode as f, toRefs as et, reactive as Oe, watch as ue, ref as pe, createApp as tt, computed as oe, onBeforeUnmount as nt, nextTick as be, watchEffect as ot, Fragment as he, toRaw as it } from "vue"; var lt = function(e, n) { var o = {}; for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]); if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++) n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]); return o; }; const rt = { border: 0, background: "transparent", padding: 0, lineHeight: "inherit", display: "inline-block" }, ve = ie({ compatConfig: { MODE: 3 }, name: "TransButton", inheritAttrs: !1, props: { noStyle: { type: Boolean, default: void 0 }, onClick: Function, disabled: { type: Boolean, default: void 0 }, autofocus: { type: Boolean, default: void 0 } }, setup(e, n) { let { slots: o, emit: t, attrs: i, expose: d } = n; const a = Ze(), l = (v) => { const { keyCode: S } = v; S === V.ENTER && v.preventDefault(); }, m = (v) => { const { keyCode: S } = v; S === V.ENTER && t("click", v); }, C = (v) => { t("click", v); }, y = () => { a.value && a.value.focus(); }, _ = () => { a.value && a.value.blur(); }; return fe(() => { e.autofocus && y(); }), d({ focus: y, blur: _ }), () => { var v; const { noStyle: S, disabled: I } = e, N = lt(e, ["noStyle", "disabled"]); let $ = {}; return S || ($ = s({}, rt)), I && ($.pointerEvents = "none"), f("div", B(B(B({ role: "button", tabindex: 0, ref: a }, N), i), {}, { onClick: C, onKeydown: l, onKeyup: m, style: s(s({}, $), i.style || {}) }), [(v = o.default) === null || v === void 0 ? void 0 : v.call(o)]); }; } }), at = (e, n, o, t) => { const { sizeMarginHeadingVerticalEnd: i, fontWeightStrong: d } = t; return { marginBottom: i, color: o, fontWeight: d, fontSize: e, lineHeight: n }; }, st = (e) => { const n = [1, 2, 3, 4, 5], o = {}; return n.forEach((t) => { o[` h${t}&, div&-h${t}, div&-h${t} > textarea, h${t} `] = at(e[`fontSizeHeading${t}`], e[`lineHeightHeading${t}`], e.colorTextHeading, e); }), o; }, ct = (e) => { const { componentCls: n } = e; return { "a&, a": s(s({}, Se(e)), { textDecoration: e.linkDecoration, "&:active, &:hover": { textDecoration: e.linkHoverDecoration }, [`&[disabled], &${n}-disabled`]: { color: e.colorTextDisabled, cursor: "not-allowed", "&:active, &:hover": { color: e.colorTextDisabled }, "&:active": { pointerEvents: "none" } } }) }; }, dt = () => ({ code: { margin: "0 0.2em", paddingInline: "0.4em", paddingBlock: "0.2em 0.1em", fontSize: "85%", background: "rgba(150, 150, 150, 0.1)", border: "1px solid rgba(100, 100, 100, 0.2)", borderRadius: 3 }, kbd: { margin: "0 0.2em", paddingInline: "0.4em", paddingBlock: "0.15em 0.1em", fontSize: "90%", background: "rgba(150, 150, 150, 0.06)", border: "1px solid rgba(100, 100, 100, 0.2)", borderBottomWidth: 2, borderRadius: 3 }, mark: { padding: 0, // FIXME hardcode in v4 backgroundColor: ze[2] }, "u, ins": { textDecoration: "underline", textDecorationSkipInk: "auto" }, "s, del": { textDecoration: "line-through" }, strong: { fontWeight: 600 }, // list "ul, ol": { marginInline: 0, marginBlock: "0 1em", padding: 0, li: { marginInline: "20px 0", marginBlock: 0, paddingInline: "4px 0", paddingBlock: 0 } }, ul: { listStyleType: "circle", ul: { listStyleType: "disc" } }, ol: { listStyleType: "decimal" }, // pre & block "pre, blockquote": { margin: "1em 0" }, pre: { padding: "0.4em 0.6em", whiteSpace: "pre-wrap", wordWrap: "break-word", background: "rgba(150, 150, 150, 0.1)", border: "1px solid rgba(100, 100, 100, 0.2)", borderRadius: 3, // Compatible for marked code: { display: "inline", margin: 0, padding: 0, fontSize: "inherit", fontFamily: "inherit", background: "transparent", border: 0 } }, blockquote: { paddingInline: "0.6em 0", paddingBlock: 0, borderInlineStart: "4px solid rgba(100, 100, 100, 0.2)", opacity: 0.85 } }), ut = (e) => { const { componentCls: n } = e, t = Me(e).inputPaddingVertical + 1; return { "&-edit-content": { position: "relative", "div&": { insetInlineStart: -e.paddingSM, marginTop: -t, marginBottom: `calc(1em - ${t}px)` }, [`${n}-edit-content-confirm`]: { position: "absolute", insetInlineEnd: e.marginXS + 2, insetBlockEnd: e.marginXS, color: e.colorTextDescription, // default style fontWeight: "normal", fontSize: e.fontSize, fontStyle: "normal", pointerEvents: "none" }, textarea: { margin: "0!important", // Fix Editable Textarea flash in Firefox MozTransition: "none", height: "1em" } } }; }, pt = (e) => ({ "&-copy-success": { "\n &,\n &:hover,\n &:focus": { color: e.colorSuccess } } }), ft = () => ({ "\n a&-ellipsis,\n span&-ellipsis\n ": { display: "inline-block", maxWidth: "100%" }, "&-single-line": { whiteSpace: "nowrap" }, "&-ellipsis-single-line": { overflow: "hidden", textOverflow: "ellipsis", // https://blog.csdn.net/iefreer/article/details/50421025 "a&, span&": { verticalAlign: "bottom" } }, "&-ellipsis-multiple-line": { display: "-webkit-box", overflow: "hidden", WebkitLineClamp: 3, WebkitBoxOrient: "vertical" } }), yt = (e) => { const { componentCls: n, sizeMarginHeadingVerticalStart: o } = e; return { [n]: s(s(s(s(s(s(s(s(s({ color: e.colorText, wordBreak: "break-word", lineHeight: e.lineHeight, [`&${n}-secondary`]: { color: e.colorTextDescription }, [`&${n}-success`]: { color: e.colorSuccess }, [`&${n}-warning`]: { color: e.colorWarning }, [`&${n}-danger`]: { color: e.colorError, "a&:active, a&:focus": { color: e.colorErrorActive }, "a&:hover": { color: e.colorErrorHover } }, [`&${n}-disabled`]: { color: e.colorTextDisabled, cursor: "not-allowed", userSelect: "none" }, "\n div&,\n p\n ": { marginBottom: "1em" } }, st(e)), { [` & + h1${n}, & + h2${n}, & + h3${n}, & + h4${n}, & + h5${n} `]: { marginTop: o }, "\n div,\n ul,\n li,\n p,\n h1,\n h2,\n h3,\n h4,\n h5": { "\n + h1,\n + h2,\n + h3,\n + h4,\n + h5\n ": { marginTop: o } } }), dt()), ct(e)), { // Operation [` ${n}-expand, ${n}-edit, ${n}-copy `]: s(s({}, Se(e)), { marginInlineStart: e.marginXXS }) }), ut(e)), pt(e)), ft()), { "&-rtl": { direction: "rtl" } }) }; }, ke = Ke("Typography", (e) => [yt(e)], { sizeMarginHeadingVerticalStart: "1.2em", sizeMarginHeadingVerticalEnd: "0.5em" }), gt = () => ({ prefixCls: String, value: String, maxlength: Number, autoSize: { type: [Boolean, Object] }, onSave: Function, onCancel: Function, onEnd: Function, onChange: Function, originContent: String, direction: String, component: String }), mt = ie({ compatConfig: { MODE: 3 }, name: "Editable", inheritAttrs: !1, props: gt(), // emits: ['save', 'cancel', 'end', 'change'], setup(e, n) { let { emit: o, slots: t, attrs: i } = n; const { prefixCls: d } = et(e), a = Oe({ current: e.value || "", lastKeyCode: void 0, inComposition: !1, cancelFlag: !1 }); ue(() => e.value, (g) => { a.current = g; }); const l = pe(); fe(() => { var g; if (l.value) { const u = (g = l.value) === null || g === void 0 ? void 0 : g.resizableTextArea, h = u == null ? void 0 : u.textArea; h.focus(); const { length: b } = h.value; h.setSelectionRange(b, b); } }); function m(g) { l.value = g; } function C(g) { let { target: { value: u } } = g; a.current = u.replace(/[\r\n]/g, ""), o("change", a.current); } function y() { a.inComposition = !0; } function _() { a.inComposition = !1; } function v(g) { const { keyCode: u } = g; u === V.ENTER && g.preventDefault(), !a.inComposition && (a.lastKeyCode = u); } function S(g) { const { keyCode: u, ctrlKey: h, altKey: b, metaKey: O, shiftKey: H } = g; a.lastKeyCode === u && !a.inComposition && !h && !b && !O && !H && (u === V.ENTER ? (N(), o("end")) : u === V.ESC && (a.current = e.originContent, o("cancel"))); } function I() { N(); } function N() { o("save", a.current.trim()); } const [$, R] = ke(d); return () => { const g = Te({ [`${d.value}`]: !0, [`${d.value}-edit-content`]: !0, [`${d.value}-rtl`]: e.direction === "rtl", [e.component ? `${d.value}-${e.component}` : ""]: !0 }, i.class, R.value); return $(f("div", B(B({}, i), {}, { class: g }), [f(We, { ref: m, maxlength: e.maxlength, value: a.current, onChange: C, onKeydown: v, onKeyup: S, onCompositionstart: y, onCompositionend: _, onBlur: I, rows: 1, autoSize: e.autoSize === void 0 || e.autoSize }, null), t.enterIcon ? t.enterIcon({ className: `${e.prefixCls}-edit-content-confirm` }) : f(Ue, { class: `${e.prefixCls}-edit-content-confirm` }, null)])); }; } }), bt = 3, ht = 8; let w; const de = { padding: 0, margin: 0, display: "inline", lineHeight: "inherit" }; function _e(e, n) { e.setAttribute("aria-hidden", "true"); const o = window.getComputedStyle(n), t = Fe(o); e.setAttribute("style", t), e.style.position = "fixed", e.style.left = "0", e.style.height = "auto", e.style.minHeight = "auto", e.style.maxHeight = "auto", e.style.paddingTop = "0", e.style.paddingBottom = "0", e.style.borderTopWidth = "0", e.style.borderBottomWidth = "0", e.style.top = "-999999px", e.style.zIndex = "-1000", e.style.textOverflow = "clip", e.style.whiteSpace = "normal", e.style.webkitLineClamp = "none"; } function vt(e) { const n = document.createElement("div"); _e(n, e), n.appendChild(document.createTextNode("text")), document.body.appendChild(n); const o = n.getBoundingClientRect().height; return document.body.removeChild(n), o; } const xt = (e, n, o, t, i) => { w || (w = document.createElement("div"), w.setAttribute("aria-hidden", "true"), document.body.appendChild(w)); const { rows: d, suffix: a = "" } = n, l = vt(e), m = Math.round(l * d * 100) / 100; _e(w, e); const C = tt({ render() { return f("div", { style: de }, [f("span", { style: de }, [o, a]), f("span", { style: de }, [t])]); } }); C.mount(w); function y() { return Math.round(w.getBoundingClientRect().height * 100) / 100 - 0.1 <= m; } if (y()) return C.unmount(), { content: o, text: w.innerHTML, ellipsis: !1 }; const _ = Array.prototype.slice.apply(w.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter((u) => { let { nodeType: h, data: b } = u; return h !== ht && b !== ""; }), v = Array.prototype.slice.apply(w.childNodes[0].childNodes[1].cloneNode(!0).childNodes); C.unmount(); const S = []; w.innerHTML = ""; const I = document.createElement("span"); w.appendChild(I); const N = document.createTextNode(i + a); I.appendChild(N), v.forEach((u) => { w.appendChild(u); }); function $(u) { I.insertBefore(u, N); } function R(u, h) { let b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, O = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : h.length, H = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 0; const A = Math.floor((b + O) / 2), le = h.slice(0, A); if (u.textContent = le, b >= O - 1) for (let L = O; L >= b; L -= 1) { const U = h.slice(0, L); if (u.textContent = U, y() || !U) return L === h.length ? { finished: !1, vNode: h } : { finished: !0, vNode: U }; } return y() ? R(u, h, A, O, A) : R(u, h, b, A, H); } function g(u) { if (u.nodeType === bt) { const b = u.textContent || "", O = document.createTextNode(b); return $(O), R(O, b); } return { finished: !1, vNode: null }; } return _.some((u) => { const { finished: h, vNode: b } = g(u); return b && S.push(b), h; }), { content: S, text: w.innerHTML, ellipsis: !0 }; }; var Ct = function(e, n) { var o = {}; for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]); if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++) n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]); return o; }; const St = () => ({ prefixCls: String, direction: String, // Form Internal use component: String }), E = ie({ name: "ATypography", inheritAttrs: !1, props: St(), setup(e, n) { let { slots: o, attrs: t } = n; const { prefixCls: i, direction: d } = we("typography", e), [a, l] = ke(i); return () => { var m; const C = s(s({}, e), t), { prefixCls: y, direction: _, component: v = "article" } = C, S = Ct(C, ["prefixCls", "direction", "component"]); return a(f(v, B(B({}, S), {}, { class: Te(i.value, { [`${i.value}-rtl`]: d.value === "rtl" }, t.class, l.value) }), { default: () => [(m = o.default) === null || m === void 0 ? void 0 : m.call(o)] })); }; } }), Tt = () => { const e = document.getSelection(); if (!e.rangeCount) return function() { }; let n = document.activeElement; const o = []; for (let t = 0; t < e.rangeCount; t++) o.push(e.getRangeAt(t)); switch (n.tagName.toUpperCase()) { case "INPUT": case "TEXTAREA": n.blur(); break; default: n = null; break; } return e.removeAllRanges(), function() { e.type === "Caret" && e.removeAllRanges(), e.rangeCount || o.forEach(function(t) { e.addRange(t); }), n && n.focus(); }; }, xe = { "text/plain": "Text", "text/html": "Url", default: "Text" }, wt = "Copy to clipboard: #{key}, Enter"; function Et(e) { const n = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C"; return e.replace(/#{\s*key\s*}/g, n); } function Ot(e, n) { let o, t, i, d, a, l = !1; n || (n = {}); const m = n.debug || !1; try { if (t = Tt(), i = document.createRange(), d = document.getSelection(), a = document.createElement("span"), a.textContent = e, a.style.all = "unset", a.style.position = "fixed", a.style.top = 0, a.style.clip = "rect(0, 0, 0, 0)", a.style.whiteSpace = "pre", a.style.webkitUserSelect = "text", a.style.MozUserSelect = "text", a.style.msUserSelect = "text", a.style.userSelect = "text", a.addEventListener("copy", function(y) { if (y.stopPropagation(), n.format) if (y.preventDefault(), typeof y.clipboardData == "undefined") { m && console.warn("unable to use e.clipboardData"), m && console.warn("trying IE specific stuff"), window.clipboardData.clearData(); const _ = xe[n.format] || xe.default; window.clipboardData.setData(_, e); } else y.clipboardData.clearData(), y.clipboardData.setData(n.format, e); n.onCopy && (y.preventDefault(), n.onCopy(y.clipboardData)); }), document.body.appendChild(a), i.selectNodeContents(a), d.addRange(i), !document.execCommand("copy")) throw new Error("copy command was unsuccessful"); l = !0; } catch (C) { m && console.error("unable to copy using execCommand: ", C), m && console.warn("trying IE specific stuff"); try { window.clipboardData.setData(n.format || "text", e), n.onCopy && n.onCopy(window.clipboardData), l = !0; } catch (y) { m && console.error("unable to copy using clipboardData: ", y), m && console.error("falling back to prompt"), o = Et("message" in n ? n.message : wt), window.prompt(o, e); } } finally { d && (typeof d.removeRange == "function" ? d.removeRange(i) : d.removeAllRanges()), a && document.body.removeChild(a), t(); } return l; } var kt = function(e, n) { var o = {}; for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]); if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++) n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]); return o; }; const _t = Ee("webkitLineClamp"), Nt = Ee("textOverflow"), Ce = "...", q = () => ({ editable: { type: [Boolean, Object], default: void 0 }, copyable: { type: [Boolean, Object], default: void 0 }, prefixCls: String, component: String, type: String, disabled: { type: Boolean, default: void 0 }, ellipsis: { type: [Boolean, Object], default: void 0 }, code: { type: Boolean, default: void 0 }, mark: { type: Boolean, default: void 0 }, underline: { type: Boolean, default: void 0 }, delete: { type: Boolean, default: void 0 }, strong: { type: Boolean, default: void 0 }, keyboard: { type: Boolean, default: void 0 }, content: String, "onUpdate:content": Function }), G = ie({ compatConfig: { MODE: 3 }, name: "TypographyBase", inheritAttrs: !1, props: q(), // emits: ['update:content'], setup(e, n) { let { slots: o, attrs: t, emit: i } = n; const { prefixCls: d, direction: a } = we("typography", e), l = Oe({ copied: !1, ellipsisText: "", ellipsisContent: null, isEllipsis: !1, expanded: !1, clientRendered: !1, //locale expandStr: "", copyStr: "", copiedStr: "", editStr: "", copyId: void 0, rafId: void 0, prevProps: void 0, originContent: "" }), m = pe(), C = pe(), y = oe(() => { const r = e.ellipsis; return r ? s({ rows: 1, expandable: !1 }, typeof r == "object" ? r : null) : {}; }); fe(() => { l.clientRendered = !0, A(); }), nt(() => { clearTimeout(l.copyId), ae.cancel(l.rafId); }), ue([() => y.value.rows, () => e.content], () => { be(() => { O(); }); }, { flush: "post", deep: !0 }), ot(() => { e.content === void 0 && (X(!e.editable, "Typography", "When `editable` is enabled, please use `content` instead of children"), X(!e.ellipsis, "Typography", "When `ellipsis` is enabled, please use `content` instead of children")); }); function _() { var r; return e.ellipsis || e.editable ? e.content : (r = se(m.value)) === null || r === void 0 ? void 0 : r.innerText; } function v(r) { const { onExpand: c } = y.value; l.expanded = !0, c == null || c(r); } function S(r) { r.preventDefault(), l.originContent = e.content, b(!0); } function I(r) { N(r), b(!1); } function N(r) { const { onChange: c } = g.value; r !== e.content && (i("update:content", r), c == null || c(r)); } function $() { var r, c; (c = (r = g.value).onCancel) === null || c === void 0 || c.call(r), b(!1); } function R(r) { r.preventDefault(), r.stopPropagation(); const { copyable: c } = e, p = s({}, typeof c == "object" ? c : null); p.text === void 0 && (p.text = _()), Ot(p.text || ""), l.copied = !0, be(() => { p.onCopy && p.onCopy(r), l.copyId = setTimeout(() => { l.copied = !1; }, 3e3); }); } const g = oe(() => { const r = e.editable; return r ? s({}, typeof r == "object" ? r : null) : { editing: !1 }; }), [u, h] = Ve(!1, { value: oe(() => g.value.editing) }); function b(r) { const { onStart: c } = g.value; r && c && c(), h(r); } ue(u, (r) => { var c; r || (c = C.value) === null || c === void 0 || c.focus(); }, { flush: "post" }); function O(r) { if (r) { const { width: c, height: p } = r; if (!c || !p) return; } ae.cancel(l.rafId), l.rafId = ae(() => { A(); }); } const H = oe(() => { const { rows: r, expandable: c, suffix: p, onEllipsis: x, tooltip: T } = y.value; return p || T || e.editable || e.copyable || c || x ? !1 : r === 1 ? Nt : _t; }), A = () => { const { ellipsisText: r, isEllipsis: c } = l, { rows: p, suffix: x, onEllipsis: T } = y.value; if (!p || p < 0 || !se(m.value) || l.expanded || e.content === void 0 || H.value) return; const { content: P, text: z, ellipsis: j } = xt(se(m.value), { rows: p, suffix: x }, e.content, ye(!0), Ce); (r !== z || l.isEllipsis !== j) && (l.ellipsisText = z, l.ellipsisContent = P, l.isEllipsis = j, c !== j && T && T(j)); }; function le(r, c) { let { mark: p, code: x, underline: T, delete: P, strong: z, keyboard: j } = r, F = c; function D(ee, k) { if (!ee) return; const te = /* @__PURE__ */ function() { return F; }(); F = f(k, null, { default: () => [te] }); } return D(z, "strong"), D(T, "u"), D(P, "del"), D(x, "code"), D(p, "mark"), D(j, "kbd"), F; } function L(r) { const { expandable: c, symbol: p } = y.value; if (!c || !r && (l.expanded || !l.isEllipsis)) return null; const x = (o.ellipsisSymbol ? o.ellipsisSymbol() : p) || l.expandStr; return f("a", { key: "expand", class: `${d.value}-expand`, onClick: v, "aria-label": l.expandStr }, [x]); } function U() { if (!e.editable) return; const { tooltip: r, triggerType: c = ["icon"] } = e.editable, p = o.editableIcon ? o.editableIcon() : f(Ge, { role: "button" }, null), x = o.editableTooltip ? o.editableTooltip() : l.editStr, T = typeof x == "string" ? x : ""; return c.indexOf("icon") !== -1 ? f(ce, { key: "edit", title: r === !1 ? "" : x }, { default: () => [f(ve, { ref: C, class: `${d.value}-edit`, onClick: S, "aria-label": T }, { default: () => [p] })] }) : null; } function Ne() { if (!e.copyable) return; const { tooltip: r } = e.copyable, c = l.copied ? l.copiedStr : l.copyStr, p = o.copyableTooltip ? o.copyableTooltip({ copied: l.copied }) : c, x = typeof p == "string" ? p : "", T = l.copied ? f(Je, null, null) : f(Qe, null, null), P = o.copyableIcon ? o.copyableIcon({ copied: !!l.copied }) : T; return f(ce, { key: "copy", title: r === !1 ? "" : p }, { default: () => [f(ve, { class: [`${d.value}-copy`, { [`${d.value}-copy-success`]: l.copied }], onClick: R, "aria-label": x }, { default: () => [P] })] }); } function Ie() { const { class: r, style: c } = t, { maxlength: p, autoSize: x, onEnd: T } = g.value; return f(mt, { class: r, style: c, prefixCls: d.value, value: e.content, originContent: l.originContent, maxlength: p, autoSize: x, onSave: I, onChange: N, onCancel: $, onEnd: T, direction: a.value, component: e.component }, { enterIcon: o.editableEnterIcon }); } function ye(r) { return [L(r), U(), Ne()].filter((c) => c); } return () => { var r; const { triggerType: c = ["icon"] } = g.value, p = e.ellipsis || e.editable ? e.content !== void 0 ? e.content : (r = o.default) === null || r === void 0 ? void 0 : r.call(o) : o.default ? o.default() : e.content; return u.value ? Ie() : f(Xe, { componentName: "Text", children: (x) => { const T = s(s({}, e), t), { type: P, disabled: z, content: j, class: F, style: D } = T, ee = kt(T, ["type", "disabled", "content", "class", "style"]), { rows: k, suffix: te, tooltip: re } = y.value, { edit: $e, copy: Pe, copied: De, expand: Be } = x; l.editStr = $e, l.copyStr = Pe, l.copiedStr = De, l.expandStr = Be; const Re = W(ee, ["prefixCls", "editable", "copyable", "ellipsis", "mark", "code", "delete", "underline", "strong", "keyboard", "onUpdate:content"]), ne = H.value, Ae = k === 1 && ne, ge = k && k > 1 && ne; let M = p, je; if (k && l.isEllipsis && !l.expanded && !ne) { const { title: me } = ee; let K = me || ""; !me && (typeof p == "string" || typeof p == "number") && (K = String(p)), K = K == null ? void 0 : K.slice(String(l.ellipsisContent || "").length), M = f(he, null, [it(l.ellipsisContent), f("span", { title: K, "aria-hidden": "true" }, [Ce]), te]); } else M = f(he, null, [p, te]); M = le(e, M); const He = re && k && l.isEllipsis && !l.expanded && !ne, Le = o.ellipsisTooltip ? o.ellipsisTooltip() : re; return f(qe, { onResize: O, disabled: !k }, { default: () => [f(E, B({ ref: m, class: [{ [`${d.value}-${P}`]: P, [`${d.value}-disabled`]: z, [`${d.value}-ellipsis`]: k, [`${d.value}-single-line`]: k === 1 && !l.isEllipsis, [`${d.value}-ellipsis-single-line`]: Ae, [`${d.value}-ellipsis-multiple-line`]: ge }, F], style: s(s({}, D), { WebkitLineClamp: ge ? k : void 0 }), "aria-label": je, direction: a.value, onClick: c.indexOf("text") !== -1 ? S : () => { } }, Re), { default: () => [He ? f(ce, { title: re === !0 ? p : Le }, { default: () => [f("span", null, [M])] }) : M, ye()] })] }); } }, null); }; } }); var It = function(e, n) { var o = {}; for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]); if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++) n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]); return o; }; const $t = () => W(s(s({}, q()), { ellipsis: { type: Boolean, default: void 0 } }), ["component"]), J = (e, n) => { let { slots: o, attrs: t } = n; const i = s(s({}, e), t), { ellipsis: d, rel: a } = i, l = It(i, ["ellipsis", "rel"]); X(typeof d != "object", "Typography.Link", "`ellipsis` only supports boolean value."); const m = s(s({}, l), { rel: a === void 0 && l.target === "_blank" ? "noopener noreferrer" : a, ellipsis: !!d, component: "a" }); return delete m.navigate, f(G, m, o); }; J.displayName = "ATypographyLink"; J.inheritAttrs = !1; J.props = $t(); const Pt = () => W(q(), ["component"]), Q = (e, n) => { let { slots: o, attrs: t } = n; const i = s(s(s({}, e), { component: "div" }), t); return f(G, i, o); }; Q.displayName = "ATypographyParagraph"; Q.inheritAttrs = !1; Q.props = Pt(); const Dt = () => s(s({}, W(q(), ["component"])), { ellipsis: { type: [Boolean, Object], default: void 0 } }), Y = (e, n) => { let { slots: o, attrs: t } = n; const { ellipsis: i } = e; X(typeof i != "object" || !i || !("expandable" in i) && !("rows" in i), "Typography.Text", "`ellipsis` do not support `expandable` or `rows` props."); const d = s(s(s({}, e), { ellipsis: i && typeof i == "object" ? W(i, ["expandable", "rows"]) : i, component: "span" }), t); return f(G, d, o); }; Y.displayName = "ATypographyText"; Y.inheritAttrs = !1; Y.props = Dt(); var Bt = function(e, n) { var o = {}; for (var t in e) Object.prototype.hasOwnProperty.call(e, t) && n.indexOf(t) < 0 && (o[t] = e[t]); if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, t = Object.getOwnPropertySymbols(e); i < t.length; i++) n.indexOf(t[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, t[i]) && (o[t[i]] = e[t[i]]); return o; }; const Rt = Ye(1, 2, 3, 4, 5), At = () => s(s({}, W(q(), ["component", "strong"])), { level: Number }), Z = (e, n) => { let { slots: o, attrs: t } = n; const { level: i = 1 } = e, d = Bt(e, ["level"]); let a; Rt.includes(i) ? a = `h${i}` : (X(!1, "Typography", "Title only accept `1 | 2 | 3 | 4 | 5` as `level` value."), a = "h1"); const l = s(s(s({}, d), { component: a }), t); return f(G, l, o); }; Z.displayName = "ATypographyTitle"; Z.inheritAttrs = !1; Z.props = At(); E.Text = Y; E.Title = Z; E.Paragraph = Q; E.Link = J; E.Base = G; E.install = function(e) { return e.component(E.name, E), e.component(E.Text.displayName, Y), e.component(E.Title.displayName, Z), e.component(E.Paragraph.displayName, Q), e.component(E.Link.displayName, J), e; }; export { Q as P, Z as T, Y as a };