UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

1,161 lines (1,160 loc) • 37.1 kB
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js"; import { $ as t, At as n, Bt as r, D as i, Jt as a, M as ee, Vt as te, X as o, i as ne, jt as re, q as ie, t as ae, tt as oe } from "./lib-Bttd6u5E.js"; import { n as se, t as ce } from "./useHints-Dq_w2E8B.js"; import { t as le } from "./useConfig-D3scuR88.js"; import { t as ue } from "./usePrinter-DN5bYhTG.js"; import { n as de, t as fe } from "./BaseScanner-DZvpgOjM.js"; import { t as pe } from "./useSvgExport-DH-FfcqQ.js"; import { t as me } from "./useNestedProp-vPNvh7rV.js"; import { t as he } from "./useThemeCheck-C43Tcqmk.js"; import { t as ge } from "./img-Bnokohej.js"; import { n as _e } from "./Title-BE3qg9xl.js"; import { t as ve } from "./_plugin-vue_export-helper-B3ysoDQm.js"; import { l as ye, t as be } from "./useResponsive-ZtArZtUf.js"; import { t as xe } from "./DefGrad-DVBqDjhO.js"; import { t as Se } from "./A11yDataTable-DdRsVULz.js"; import { t as Ce } from "./useUserOptionState-DK-_1ddE.js"; import { t as we } from "./useChartAccessibility-DYqac8yF.js"; import { t as Te } from "./Legend-CQxUgOd-.js"; import { t as Ee } from "./vue_ui_mood_radar-BA6LAKhk.js"; import { Fragment as De, Teleport as Oe, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createSlots as ke, createTextVNode as Ae, createVNode as f, defineAsyncComponent as p, guardReactiveProps as m, mergeProps as je, nextTick as Me, normalizeClass as Ne, normalizeProps as h, normalizeStyle as g, onMounted as Pe, openBlock as _, ref as v, renderList as Fe, renderSlot as y, resolveDynamicComponent as Ie, toDisplayString as b, toRefs as Le, unref as x, watch as Re, withCtx as S } from "vue"; //#region src/components/vue-ui-mood-radar.vue var ze = /* @__PURE__ */ e({ default: () => C }), Be = ["id"], Ve = ["id"], He = ["id"], Ue = { style: { position: "relative" } }, We = [ "xmlns", "aria-describedby", "viewBox" ], Ge = ["width", "height"], Ke = [ "x1", "y1", "x2", "y2", "stroke", "stroke-width" ], qe = [ "d", "stroke", "stroke-width" ], Je = ["transform"], Ye = ["stroke"], Xe = ["aria-label", "fill"], Ze = ["transform"], Qe = ["stroke"], $e = ["aria-label", "fill"], et = ["transform"], tt = ["stroke"], nt = ["aria-label", "fill"], rt = ["transform"], it = ["stroke"], at = ["aria-label", "fill"], ot = ["transform"], st = ["stroke"], ct = ["aria-label", "fill"], lt = [ "d", "stroke", "stroke-width", "fill" ], ut = [ "x1", "y1", "x2", "y2", "stroke" ], dt = [ "cx", "cy", "fill", "stroke" ], ft = [ "cx", "cy", "fill", "stroke" ], pt = [ "x", "y", "fill", "font-weight" ], mt = [ "x", "y", "fill" ], ht = { key: 0, style: { position: "absolute", top: "100%", left: "0", width: "100%" }, "data-dom-to-png-ignore": "", "aria-hidden": "true" }, gt = { key: 5, class: "vue-data-ui-watermark" }, _t = ["id"], vt = ["onClick", "onKeydown"], yt = ["innerHTML"], C = /*#__PURE__*/ ve({ __name: "vue-ui-mood-radar", props: { config: { type: Object, default() { return {}; } }, dataset: { type: Object, default() { return {}; } } }, emits: ["copyAlt"], setup(e, { expose: ve, emit: ze }) { let C = p(() => import("./BaseIcon-BfndwIWE.js").then((e) => e.n)), bt = p(() => import("./vue-ui-accordion-BxGriZik.js").then((e) => e.n)), xt = p(() => import("./DataTable-BbKgJ5UI.js")), St = p(() => import("./PenAndPaper-DAE-tnEQ.js").then((e) => e.t)), Ct = p(() => import("./UserOptions-Dt98of5H.js").then((e) => e.n)), wt = p(() => import("./PackageVersion-D6d8SCp9.js").then((e) => e.t)), Tt = p(() => import("./BaseDraggableDialog-LoqqwRtV.js").then((e) => e.n)), { vue_ui_mood_radar: Et } = le(), { isThemeValid: Dt, warnInvalidTheme: Ot } = he(), w = e, kt = ze, T = v(ie()), E = v(null), D = v(null), At = v(null), jt = v(0), Mt = v(0), Nt = v(0), Pt = v(null), Ft = v(null), O = v(null), k = v(null), It = v(null), Lt = v(!1), A = v(null), Rt = v(null), j = v(!1), M = v(!1), N = v(null), zt = v(!1), Bt = s(() => !!w.dataset && Object.keys(w.dataset).length), P = v(Jt()); se({ config: () => P.value, dataset: () => w.dataset, component: "VueUiMoodRadar", rules: [ce.noHint] }); let F = s(() => P.value.userOptions.useCursorPointer), Vt = s(() => a({ defaultConfig: { userOptions: { show: !1 }, table: { show: !1 }, style: { chart: { backgroundColor: "#99999930", layout: { grid: { stroke: "#6A6A6A" }, outerPolygon: { stroke: "#6A6A6A" }, dataPolygon: { color: "#6A6A6A", opacity: 30, stroke: "#6A6A6A" }, smileys: { colors: { 1: "#DBDBDB", 2: "#C4C4C4", 3: "#ADADAD", 4: "#969696", 5: "#808080" } }, dataLabel: { color: "transparent" } }, legend: { backgroundColor: "transparent" } } } }, userConfig: P.value.skeletonConfig ?? {} })), { loading: Ht, FINAL_DATASET: I } = de({ ...Le(w), FINAL_CONFIG: P, prepareConfig: Jt, callback: () => { Promise.resolve().then(async () => { await Me(), R.value.showTable = P.value.table.show; }); }, skeletonDataset: w.config?.skeletonDataset ?? { 1: 1, 2: 1, 3: 1, 4: 1, 5: 1 }, skeletonConfig: a({ defaultConfig: P.value, userConfig: Vt.value }) }); Pe(() => { Lt.value = !0, Wt(); }); let Ut = s(() => P.value.debug); function Wt() { if (re(w.dataset) && oe({ componentName: "VueUiMoodRadar", type: "dataset", debug: Ut.value }), P.value.responsive) { let e = ye(() => { let { width: e, height: t } = be({ chart: E.value, title: P.value.style.chart.title.text ? Pt.value : null, legend: P.value.style.chart.legend.show ? Ft.value : null, noTitle: At.value, source: It.value }); requestAnimationFrame(() => { z.value.width = e, z.value.height = t - 12; }); }); O.value && (k.value && O.value.unobserve(k.value), O.value.disconnect()), O.value = new ResizeObserver(e), k.value = E.value.parentNode, O.value.observe(k.value); } } let { userOptionsVisible: Gt, setUserOptionsVisibility: Kt, keepUserOptionState: qt } = Ce({ config: P.value }), { svgRef: L } = we({ config: P.value.style.chart.title }); function Jt() { let e = me({ userConfig: w.config, defaultConfig: Et }), t = e.theme; if (!t) return e; if (!Dt.value(e)) return Ot(e), e; let n = me({ userConfig: Ee[t] || w.config, defaultConfig: e }); return me({ userConfig: w.config, defaultConfig: n }); } Re(() => w.config, (e) => { P.value = Jt(), Gt.value = !P.value.userOptions.showOnChartHover, Wt(), jt.value += 1, Mt.value += 1, Nt.value += 1, R.value.showTable = P.value.table.show; }, { deep: !0 }); let { isPrinting: Yt, isImaging: Xt, generatePdf: Zt, generateImage: Qt } = ue({ elementId: T.value, fileName: P.value.style.chart.title.text || "vue-ui-mood-radar", options: P.value.userOptions.print }), $t = s(() => P.value.userOptions.show && !P.value.style.chart.title.text), R = v({ showTable: P.value.table.show }), z = v({ height: 256, width: 256 }), en = { 5: { x: 128, y: 35 }, 4: { x: 218, y: 98.5 }, 3: { x: 185, y: 204 }, 2: { x: 70, y: 204 }, 1: { x: 38.5, y: 98.5 } }, tn = s(() => { let e = {}; return sn.value.forEach((t) => { e[t.key] = { x: t.x, y: t.y }; }), e; }); function B(e) { let t = en[e], n = tn.value[e] || t; return `translate(${n.x - t.x}, ${n.y - t.y})`; } let nn = s(() => ee({ plot: { x: z.value.width / 2, y: z.value.height / 2 }, radius: Math.min(z.value.height, z.value.width) * .35, sides: 5, rotation: 11 })); function rn({ centerX: e, centerY: t, apexX: n, apexY: r, proportion: i, key: a, value: ee }) { return { x: e + (n - e) * i, y: t + (r - t) * i, key: a, value: ee }; } let an = s(() => Math.max(...Object.values(I.value).map((e) => isNaN(e) ? 0 : e))), V = s(() => Object.values(I.value).reduce((e, t) => (isNaN(e) ? 0 : e) + (isNaN(t) ? 0 : t), 0)), H = s(() => Object.keys(I.value).map((e, t) => { let n = typeof I.value[e] != "number" || isNaN(I.value[e]) ? 0 : I.value[e]; return { index: t, key: e, value: n, proportion: n / V.value, color: P.value.style.chart.layout.smileys.colors[e] }; }).map((e) => ({ ...e, onSelect: () => U(e.key) })).sort((e, t) => t.key - e.key)), on = s(() => H.value.map((e, t) => ({ ...e, display: `${ne(P.value.style.chart.layout.dataLabel.formatter, e.value, o({ p: P.value.style.chart.layout.dataLabel.prefix, v: e.value, s: P.value.style.chart.layout.dataLabel.suffix, r: P.value.style.chart.layout.dataLabel.roundingValue }))}${Ht.value ? "" : ` (${o({ v: e.proportion * 100, s: "%", r: P.value.style.chart.legend.roundingPercentage })})`}` }))), sn = s(() => ([ "1", "2", "3", "4", "5" ].forEach((e) => { [null, void 0].includes(I.value[e]) && oe({ componentName: "VueUiMoodRadar", type: "datasetAttribute", property: e }); }), nn.value.coordinates.map((e, t) => { let n = rn({ centerX: z.value.width / 2, centerY: z.value.height / 2, apexX: e.x, apexY: e.y, proportion: H.value[t].value / an.value, key: H.value[t].key, value: H.value[t].value }); return { ...e, plots: n, key: H.value[t].key }; }))), cn = s(() => ({ cy: "mood-radar-legend", backgroundColor: P.value.style.chart.legend.backgroundColor, color: P.value.style.chart.legend.color, fontSize: P.value.style.chart.legend.fontSize, paddingBottom: 12, fontWeight: P.value.style.chart.legend.bold ? "bold" : "" })); function U(e) { e === D.value ? D.value = null : (D.value = e, K(e)); } function W(e) { D.value = e; let t = H.value.find((t) => t.key === e); P.value.events.datapointEnter && P.value.events.datapointEnter({ datapoint: t, seriesIndex: t.index }); } function G(e) { D.value = null; let t = H.value.find((t) => t.key === e); P.value.events.datapointLeave && P.value.events.datapointLeave({ datapoint: t, seriesIndex: t.index }); } function K(e) { let t = H.value.find((t) => t.key === e); P.value.events.datapointClick && P.value.events.datapointClick({ datapoint: t, seriesIndex: t.index }); } let q = s(() => ({ head: H.value.map((e) => ({ name: e.key, color: e.color })), body: H.value.map((e) => isNaN(e.value) ? 0 : e.value) })); function ln(e = null) { Me(() => { let n = q.value.head.map((e, t) => [ [e.name], [q.value.body[t]], [isNaN(q.value.body[t] / V.value) ? "-" : q.value.body[t] / V.value * 100] ]), r = [ [P.value.style.chart.title.text], [P.value.style.chart.title.subtitle.text], [ [""], ["val"], ["%"] ] ].concat(n), a = i(r); e ? e(a) : t({ csvContent: a, title: P.value.style.chart.title.text || "vue-ui-mood-radar" }); }); } let J = s(() => ({ head: [ " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2\" /></svg>", Number(V.value.toFixed(P.value.table.td.roundingValue)).toLocaleString(), "100%" ], body: q.value.head.map((e, t) => [ { color: e.color, name: e.name }, q.value.body[t].toFixed(P.value.table.td.roundingValue), isNaN(q.value.body[t] / V.value) ? "-" : (q.value.body[t] / V.value * 100).toFixed(P.value.table.td.roundingPercentage) + "%" ]), config: { th: { backgroundColor: P.value.table.th.backgroundColor, color: P.value.table.th.color, outline: P.value.table.th.outline }, td: { backgroundColor: P.value.table.td.backgroundColor, color: P.value.table.td.color, outline: P.value.table.td.outline }, breakpoint: P.value.table.responsiveBreakpoint }, colNames: [ P.value.table.columnNames.series, P.value.table.columnNames.value, P.value.table.columnNames.percentage ] })); function un() { return H.value; } function dn() { R.value.showTable = !R.value.showTable; } let Y = v(!1); function fn(e) { Y.value = e; } let X = v(!1); function pn() { X.value = !X.value; } async function mn({ scale: e = 2 } = {}) { if (!E.value) return; let { width: t, height: n } = E.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ge({ domElement: E.value, base64: !0, img: !0, scale: e }); return { imageUri: i, base64: a, title: P.value.style.chart.title.text, width: t, height: n, aspectRatio: r }; } let Z = s(() => { let e = P.value.table.useDialog && !P.value.table.show, t = R.value.showTable; return { component: e ? Tt : bt, title: `${P.value.style.chart.title.text}${P.value.style.chart.title.subtitle.text ? `: ${P.value.style.chart.title.subtitle.text}` : ""}`, props: e ? { backgroundColor: P.value.table.th.backgroundColor, color: P.value.table.th.color, headerColor: P.value.table.th.color, headerBg: P.value.table.th.backgroundColor, isFullscreen: Y.value, fullscreenParent: E.value, forcedWidth: Math.min(800, window.innerWidth * .8), isCursorPointer: F.value } : { hideDetails: !0, config: { open: t, maxHeight: 1e4, body: { backgroundColor: P.value.style.chart.backgroundColor, color: P.value.style.chart.color }, head: { backgroundColor: P.value.style.chart.backgroundColor, color: P.value.style.chart.color } } } }; }); Re(() => R.value.showTable, (e) => { P.value.table.show || (e && P.value.table.useDialog && A.value ? A.value.open() : "close" in A.value && A.value.close()); }); function hn() { R.value.showTable = !1, Rt.value && Rt.value.setTableIconState(!1); } let gn = s(() => on.value.map((e) => ({ ...e, name: e.display, shape: "circle" }))), _n = s(() => P.value.style.chart.backgroundColor), vn = s(() => P.value.style.chart.legend), yn = s(() => P.value.style.chart.title), { exportSvg: bn, getSvg: xn } = pe({ svg: L, title: yn, legend: vn, legendItems: gn, backgroundColor: _n }); async function Sn({ isCb: e }) { M.value = !0, await Me(); try { if (e) { let { blob: e, url: t, text: n, dataUrl: r } = await xn(); await Promise.resolve(P.value.userOptions.callbacks.svg({ blob: e, url: t, text: n, dataUrl: r })); } else await Promise.resolve(bn()); } finally { M.value = !1; } } function Cn(e) { if (e?.stage === "start") { j.value = !0; return; } if (e?.stage === "end") { j.value = !1; return; } Qt(); } async function wn() { if (kt("copyAlt", { config: P.value, dataset: H.value }), !P.value.userOptions.callbacks.altCopy) { console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions."); return; } await Promise.resolve(P.value.userOptions.callbacks.altCopy({ config: P.value, dataset: H.value })); } let Q = s(() => H.value.map((e) => String(e.key))); function Tn() { Kt(!0); } function En() { Kt(!1); } function Dn(e) { return H.value.find((t) => String(t.key) === String(e)); } function On(e, t, n) { return ne(P.value.style.chart.layout.dataLabel.formatter, e, o({ p: P.value.style.chart.layout.dataLabel.prefix, v: e, s: P.value.style.chart.layout.dataLabel.suffix, r: P.value.style.chart.layout.dataLabel.roundingValue }), { datapoint: n, seriesIndex: t }); } function kn(e) { return o({ v: V.value ? e / V.value * 100 : 0, s: "%", r: P.value.style.chart.layout.dataLabel.roundingPercentage }); } function $(e) { let t = Dn(e); return t ? `${e}, ${On(t.value, t.index, t)}, ${kn(t.value)}` : `${e}`; } function An(e) { let t = Q.value[e]; t && (N.value = e, D.value = t); } function jn() { zt.value = !0; } function Mn() { N.value = null, D.value = null, zt.value = !1; } function Nn(e) { if (!L.value || !Q.value.length || X.value || document.activeElement !== L.value) return; let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape"; if (!t && !n && !r && !i) return; if (e.preventDefault(), e.stopPropagation(), i) { N.value = null, D.value = null; return; } if (r) { if (N.value === null) return; let e = Q.value[N.value]; if (!e) return; U(e); return; } let a = N.value; a === null || a < 0 || a >= Q.value.length ? a = n ? 0 : Q.value.length - 1 : n ? (a += 1, a >= Q.value.length && (a = 0)) : t && (--a, a < 0 && (a = Q.value.length - 1)), An(a); } function Pn(e, t) { let n = e.key === "Enter" || e.key === " ", r = e.key === "Escape"; if (!(!n && !r)) { if (e.preventDefault(), e.stopPropagation(), r) { N.value = null, D.value = null; return; } U(String(t)); } } let Fn = s(() => ({ headers: J.value?.colNames ?? [], rows: H.value.map((e) => [ String(e.key), On(e.value, e.index, e), kn(e.value) ]) })); return ve({ getData: un, getImage: mn, generatePdf: Zt, generateCsv: ln, generateImage: Qt, generateSvg: Sn, toggleTable: dn, toggleAnnotator: pn, toggleFullscreen: fn, copyAlt: wn }), (e, t) => (_(), u("div", { class: Ne(`vue-data-ui-component vue-ui-mood-radar ${Y.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${P.value.useCssAnimation ? "" : "vue-ui-dna"}`), ref_key: "moodRadarChart", ref: E, id: `${T.value}`, style: g(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${P.value.style.chart.backgroundColor}`), onMouseenter: Tn, onMouseleave: En }, [ d("div", { id: `chart-instructions-${T.value}`, class: "sr-only" }, [d("p", null, b(P.value.a11y.translations.keyboardNavigation), 1)], 8, Ve), Fn.value?.rows?.length ? (_(), c(Se, { key: 0, uid: T.value, head: Fn.value.headers, body: Fn.value.rows, notice: P.value.a11y.translations.tableAvailable, caption: P.value.a11y.translations.tableCaption }, null, 8, [ "uid", "head", "body", "notice", "caption" ])) : l("", !0), P.value.userOptions.buttons.annotator ? (_(), c(x(St), { key: 1, svgRef: x(L), backgroundColor: P.value.style.chart.backgroundColor, color: P.value.style.chart.color, active: X.value, isCursorPointer: F.value, onClose: pn }, { "annotator-action-close": S(() => [y(e.$slots, "annotator-action-close", {}, void 0, !0)]), "annotator-action-color": S(({ color: t }) => [y(e.$slots, "annotator-action-color", h(m({ color: t })), void 0, !0)]), "annotator-action-draw": S(({ mode: t }) => [y(e.$slots, "annotator-action-draw", h(m({ mode: t })), void 0, !0)]), "annotator-action-undo": S(({ disabled: t }) => [y(e.$slots, "annotator-action-undo", h(m({ disabled: t })), void 0, !0)]), "annotator-action-redo": S(({ disabled: t }) => [y(e.$slots, "annotator-action-redo", h(m({ disabled: t })), void 0, !0)]), "annotator-action-delete": S(({ disabled: t }) => [y(e.$slots, "annotator-action-delete", h(m({ disabled: t })), void 0, !0)]), _: 3 }, 8, [ "svgRef", "backgroundColor", "color", "active", "isCursorPointer" ])) : l("", !0), $t.value ? (_(), u("div", { key: 2, ref_key: "noTitle", ref: At, class: "vue-data-ui-no-title-space", style: "height:36px; width: 100%;background:transparent" }, null, 512)) : l("", !0), P.value.style.chart.title.text ? (_(), u("div", { key: 3, ref_key: "chartTitle", ref: Pt, style: "width:100%;background:transparent" }, [f(_e, { config: { title: { cy: "mood-radar-title", ...P.value.style.chart.title }, subtitle: { cy: "mood-radar-subtitle", ...P.value.style.chart.title.subtitle } } }, null, 8, ["config"])], 512)) : l("", !0), d("div", { id: `legend-top-${T.value}` }, null, 8, He), P.value.userOptions.show && Bt.value && (x(qt) || x(Gt)) ? (_(), c(x(Ct), { key: 4, ref_key: "userOptionsRef", ref: Rt, backgroundColor: P.value.style.chart.backgroundColor, color: P.value.style.chart.color, isPrinting: x(Yt), isImaging: x(Xt), uid: T.value, hasPdf: P.value.userOptions.buttons.pdf, hasXls: P.value.userOptions.buttons.csv, hasImg: P.value.userOptions.buttons.img, hasSvg: P.value.userOptions.buttons.svg, hasTable: P.value.userOptions.buttons.table, hasFullscreen: P.value.userOptions.buttons.fullscreen, hasAltCopy: P.value.userOptions.buttons.altCopy, isFullscreen: Y.value, titles: { ...P.value.userOptions.buttonTitles }, chartElement: E.value, position: P.value.userOptions.position, hasAnnotator: P.value.userOptions.buttons.annotator, isAnnotation: X.value, callbacks: P.value.userOptions.callbacks, printScale: P.value.userOptions.print.scale, tableDialog: P.value.table.useDialog, isCursorPointer: F.value, onToggleFullscreen: fn, onGeneratePdf: x(Zt), onGenerateCsv: ln, onGenerateImage: Cn, onGenerateSvg: Sn, onToggleTable: dn, onToggleAnnotator: pn, onCopyAlt: wn, style: g({ visibility: x(qt) ? x(Gt) ? "visible" : "hidden" : "visible" }) }, ke({ _: 2 }, [ e.$slots.menuIcon ? { name: "menuIcon", fn: S(({ isOpen: t, color: n }) => [y(e.$slots, "menuIcon", h(m({ isOpen: t, color: n })), void 0, !0)]), key: "0" } : void 0, e.$slots.optionPdf ? { name: "optionPdf", fn: S(() => [y(e.$slots, "optionPdf", {}, void 0, !0)]), key: "1" } : void 0, e.$slots.optionCsv ? { name: "optionCsv", fn: S(() => [y(e.$slots, "optionCsv", {}, void 0, !0)]), key: "2" } : void 0, e.$slots.optionImg ? { name: "optionImg", fn: S(() => [y(e.$slots, "optionImg", {}, void 0, !0)]), key: "3" } : void 0, e.$slots.optionSvg ? { name: "optionSvg", fn: S(() => [y(e.$slots, "optionSvg", {}, void 0, !0)]), key: "4" } : void 0, e.$slots.optionTable ? { name: "optionTable", fn: S(() => [y(e.$slots, "optionTable", {}, void 0, !0)]), key: "5" } : void 0, e.$slots.optionFullscreen ? { name: "optionFullscreen", fn: S(({ toggleFullscreen: t, isFullscreen: n }) => [y(e.$slots, "optionFullscreen", h(m({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)]), key: "6" } : void 0, e.$slots.optionAnnotator ? { name: "optionAnnotator", fn: S(({ toggleAnnotator: t, isAnnotator: n }) => [y(e.$slots, "optionAnnotator", h(m({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)]), key: "7" } : void 0, e.$slots.optionAltCopy ? { name: "optionAltCopy", fn: S(({ altCopy: t }) => [y(e.$slots, "optionAltCopy", h(m({ altCopy: t })), void 0, !0)]), key: "8" } : void 0, e.$slots["custom-menu-before"] ? { name: "custom-menu-before", fn: S(() => [y(e.$slots, "custom-menu-before", {}, void 0, !0)]), key: "9" } : void 0, e.$slots["custom-menu-after"] ? { name: "custom-menu-after", fn: S(() => [y(e.$slots, "custom-menu-after", {}, void 0, !0)]), key: "10" } : void 0 ]), 1032, [ "backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "hasAltCopy", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "isCursorPointer", "onGeneratePdf", "style" ])) : l("", !0), d("div", Ue, [(_(), u("svg", { ref_key: "svgRef", ref: L, xmlns: x(ae), "aria-describedby": `chart-instructions-${T.value}`, viewBox: `0 0 ${z.value.width} ${z.value.height}`, class: Ne({ "vue-data-ui-fullscreen--on": Y.value, "vue-data-ui-fulscreen--off": !Y.value }), style: g(`overflow:visible;background:transparent;color:${P.value.style.chart.color}`), tabindex: "0", onFocus: jn, onBlur: Mn, onKeydown: Nn }, [ f(x(wt)), e.$slots["chart-background"] ? (_(), u("foreignObject", { key: 0, x: 0, y: 0, width: z.value.width, height: z.value.height, style: { pointerEvents: "none" } }, [y(e.$slots, "chart-background", {}, void 0, !0)], 8, Ge)) : l("", !0), d("defs", null, [f(xe, { t: "radial", cx: "50%", cy: "50%", r: "50%", fx: "50%", fy: "50%", id: `mood_radar_gradient_${T.value}`, stops: [[ "0%", x(r)(P.value.style.chart.layout.dataPolygon.color, P.value.style.chart.layout.dataPolygon.opacity), 1 ], [ "100%", x(r)(x(te)(P.value.style.chart.layout.dataPolygon.color, P.value.style.chart.layout.dataPolygon.gradient.intensity / 100), P.value.style.chart.layout.dataPolygon.opacity), 1 ]] }, null, 8, ["id", "stops"])]), (_(!0), u(De, null, Fe(nn.value.coordinates, (e) => (_(), u("line", { x1: z.value.width / 2, y1: z.value.height / 2, x2: e.x, y2: e.y, stroke: P.value.style.chart.layout.grid.stroke, "stroke-width": P.value.style.chart.layout.grid.strokeWidth }, null, 8, Ke))), 256)), d("path", { d: nn.value.path, fill: "none", stroke: P.value.style.chart.layout.outerPolygon.stroke, "stroke-width": P.value.style.chart.layout.outerPolygon.strokeWidth, "stroke-linejoin": "round", "stroke-linecap": "round" }, null, 8, qe), d("g", { transform: B("5") }, [d("path", { fill: "none", stroke: P.value.style.chart.layout.smileys.colors[5], "stroke-width": "1", "stroke-linecap": "round", d: "M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22" }, null, 8, Ye), d("circle", { role: "button", class: "vue-ui-mood-radar-trap", cx: "128", cy: "25", r: "20", "aria-label": $("5"), fill: D.value === "5" ? x(r)(P.value.style.chart.layout.smileys.colors[5], 20) : "transparent", onMouseenter: t[0] ||= (e) => W("5"), onMouseleave: t[1] ||= (e) => G("5"), onClick: t[2] ||= (e) => K("5") }, null, 40, Xe)], 8, Je), d("g", { transform: B("4") }, [d("path", { fill: "none", stroke: P.value.style.chart.layout.smileys.colors[4], "stroke-width": "1", "stroke-linecap": "round", d: "M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92" }, null, 8, Qe), d("circle", { class: "vue-ui-mood-radar-trap", cx: "227", cy: "95.5", r: "20", "aria-label": $("4"), fill: D.value === "4" ? x(r)(P.value.style.chart.layout.smileys.colors[4], 20) : "transparent", onMouseenter: t[3] ||= (e) => W("4"), onMouseleave: t[4] ||= (e) => G("4"), onClick: t[5] ||= (e) => K("4") }, null, 40, $e)], 8, Ze), d("g", { transform: B("3") }, [d("path", { fill: "none", stroke: P.value.style.chart.layout.smileys.colors[3], "stroke-width": "1", "stroke-linecap": "round", d: "M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215" }, null, 8, tt), d("circle", { class: "vue-ui-mood-radar-trap", cx: "190", cy: "213.5", r: "20", "aria-label": $("3"), fill: D.value === "3" ? x(r)(P.value.style.chart.layout.smileys.colors[3], 20) : "transparent", onMouseenter: t[6] ||= (e) => W("3"), onMouseleave: t[7] ||= (e) => G("3"), onClick: t[8] ||= (e) => K("3") }, null, 40, nt)], 8, et), d("g", { transform: B("2") }, [d("path", { fill: "none", stroke: P.value.style.chart.layout.smileys.colors[2], "stroke-width": "1", "stroke-linecap": "round", d: "M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210" }, null, 8, it), d("circle", { class: "vue-ui-mood-radar-trap", cx: "65", cy: "213.5", r: "20", "aria-label": $("2"), fill: D.value === "2" ? x(r)(P.value.style.chart.layout.smileys.colors[2], 20) : "transparent", onMouseenter: t[9] ||= (e) => W("2"), onMouseleave: t[10] ||= (e) => G("2"), onClick: t[11] ||= (e) => K("2") }, null, 40, at)], 8, rt), d("g", { transform: B("1") }, [d("path", { fill: "none", stroke: P.value.style.chart.layout.smileys.colors[1], "stroke-width": "1", "stroke-linecap": "round", d: "M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93" }, null, 8, st), d("circle", { class: "vue-ui-mood-radar-trap", cx: "29", cy: "95.5", r: "20", "aria-label": $("1"), fill: D.value === "1" ? x(r)(P.value.style.chart.layout.smileys.colors[1], 20) : "transparent", onMouseenter: t[12] ||= (e) => W("1"), onMouseleave: t[13] ||= (e) => G("1"), onClick: t[14] ||= (e) => K("1") }, null, 40, ct)], 8, ot), d("path", { d: x(n)(sn.value.map((e) => e.plots)), stroke: P.value.style.chart.layout.dataPolygon.stroke, "stroke-width": P.value.style.chart.layout.dataPolygon.strokeWidth, "stroke-linecap": "round", "stroke-linejoin": "round", fill: P.value.style.chart.layout.dataPolygon.gradient.show ? `url(#mood_radar_gradient_${T.value})` : x(r)(P.value.style.chart.layout.dataPolygon.color, P.value.style.chart.layout.dataPolygon.opacity) }, null, 8, lt), (_(!0), u(De, null, Fe(sn.value.map((e) => e.plots), (e, t) => (_(), u("g", { class: "vue-ui-mood-radar-trap", style: g(`opacity:${D.value == e.key ? "1" : "0"}`) }, [ d("line", { x1: e.x, y1: e.y, x2: z.value.width / 2, y2: z.value.height / 2, stroke: P.value.style.chart.layout.smileys.colors[e.key] }, null, 8, ut), d("circle", { cx: e.x, cy: e.y, fill: P.value.style.chart.layout.smileys.colors[e.key], r: "3", stroke: P.value.style.chart.backgroundColor, "stroke-width": .5 }, null, 8, dt), d("circle", { cx: z.value.width / 2, cy: z.value.height / 2, fill: P.value.style.chart.layout.smileys.colors[e.key], r: "3", stroke: P.value.style.chart.backgroundColor, "stroke-width": .5 }, null, 8, ft), d("text", { x: z.value.width / 2, y: ["5", 5].includes(e.key) ? z.value.height / 2 * 1.13 : z.value.height / 2 * .9375, fill: P.value.style.chart.layout.dataLabel.color, "font-size": "12", "text-anchor": "middle", "font-weight": P.value.style.chart.layout.dataLabel.bold ? "bold" : "normal" }, b(x(ne)(P.value.style.chart.layout.dataLabel.formatter, e.value, x(o)({ p: P.value.style.chart.layout.dataLabel.prefix, v: e.value, s: P.value.style.chart.layout.dataLabel.suffix, r: P.value.style.chart.layout.dataLabel.roundingValue }), { datapoint: e, seriesIndex: t })), 9, pt), d("text", { x: z.value.width / 2, y: ["5", 5].includes(e.key) ? z.value.height / 2 * 1.273 : z.value.height / 2 * .7968, fill: P.value.style.chart.layout.dataLabel.color, "font-size": "12", "text-anchor": "middle" }, " (" + b(x(o)({ v: e.value / V.value * 100, s: "%", r: P.value.style.chart.layout.dataLabel.roundingPercentage })) + ") ", 9, mt) ], 4))), 256)), y(e.$slots, "svg", { svg: { ...z.value, isPrintingImg: x(Yt) || x(Xt) || j.value, isPrintingSvg: M.value } }, void 0, !0) ], 46, We)), e.$slots.hint ? (_(), u("div", ht, [y(e.$slots, "hint", h(m({ hint: P.value.a11y.translations.keyboardNavigation, isVisible: zt.value })), void 0, !0)])) : l("", !0)]), e.$slots.watermark ? (_(), u("div", gt, [y(e.$slots, "watermark", h(m({ isPrinting: x(Yt) || x(Xt) || j.value || M.value })), void 0, !0)])) : l("", !0), d("div", { id: `legend-bottom-${T.value}` }, null, 8, _t), Lt.value && (P.value.style.chart.legend.show || e.$slots.legend) ? (_(), c(Oe, { key: 6, to: P.value.style.chart.legend.position === "top" ? `#legend-top-${T.value}` : `#legend-bottom-${T.value}` }, [d("div", { ref_key: "chartLegend", ref: Ft }, [y(e.$slots, "legend", { legend: H.value }, () => [P.value.style.chart.legend.show ? (_(), c(Te, { legendSet: on.value, config: cn.value, key: `legend_${Nt.value}`, isCursorPointer: F.value, style: { display: "flex", "row-gap": "6px" }, onFocusMarker: t[15] ||= ({ legend: e }) => U(e.key) }, { item: S(({ legend: e, index: t }) => [d("div", { role: "button", onClick: () => U(e.key), style: { display: "flex", "flex-direction": "row", gap: "3px", "align-items": "center", margin: "3px 0" }, onKeydown: (t) => Pn(t, String(e.key)) }, [ e.key == 1 ? (_(), c(x(C), { key: 0, strokeWidth: 1, name: "moodSad", stroke: P.value.style.chart.layout.smileys.colors[e.key] }, null, 8, ["stroke"])) : l("", !0), e.key == 2 ? (_(), c(x(C), { key: 1, strokeWidth: 1, name: "moodFlat", stroke: P.value.style.chart.layout.smileys.colors[e.key] }, null, 8, ["stroke"])) : l("", !0), e.key == 3 ? (_(), c(x(C), { key: 2, strokeWidth: 1, name: "moodNeutral", stroke: P.value.style.chart.layout.smileys.colors[e.key] }, null, 8, ["stroke"])) : l("", !0), e.key == 4 ? (_(), c(x(C), { key: 3, strokeWidth: 1, name: "smiley", stroke: P.value.style.chart.layout.smileys.colors[e.key] }, null, 8, ["stroke"])) : l("", !0), e.key == 5 ? (_(), c(x(C), { key: 4, strokeWidth: 1, name: "moodHappy", stroke: P.value.style.chart.layout.smileys.colors[e.key] }, null, 8, ["stroke"])) : l("", !0), x(Ht) ? l("", !0) : (_(), u("span", { key: 5, style: g({ fontWeight: P.value.style.chart.legend.bold ? "bold" : "normal" }) }, b(e.display), 5)) ], 40, vt)]), _: 1 }, 8, [ "legendSet", "config", "isCursorPointer" ])) : l("", !0)], !0)], 512)], 8, ["to"])) : l("", !0), e.$slots.source ? (_(), u("div", { key: 7, ref_key: "source", ref: It, dir: "auto" }, [y(e.$slots, "source", {}, void 0, !0)], 512)) : l("", !0), Bt.value && P.value.userOptions.buttons.table ? (_(), c(Ie(Z.value.component), je({ key: 8 }, Z.value.props, { ref_key: "tableUnit", ref: A, onClose: hn }), ke({ content: S(() => [f(x(xt), { colNames: J.value.colNames, head: J.value.head, body: J.value.body, config: J.value.config, title: P.value.table.useDialog ? "" : Z.value.title, withCloseButton: !P.value.table.useDialog, isCursorPointer: F.value, onClose: hn }, { th: S(({ th: e }) => [d("div", { innerHTML: e, style: { display: "flex", "align-items": "center" } }, null, 8, yt)]), td: S(({ td: e }) => [Ae(b(e.name || e), 1)]), _: 1 }, 8, [ "colNames", "head", "body", "config", "title", "withCloseButton", "isCursorPointer" ])]), _: 2 }, [P.value.table.useDialog ? { name: "title", fn: S(() => [Ae(b(Z.value.title), 1)]), key: "0" } : void 0, P.value.table.useDialog ? { name: "actions", fn: S(() => [d("button", { tabindex: "0", class: "vue-ui-user-options-button", onClick: t[16] ||= (e) => ln(P.value.userOptions.callbacks.csv), style: g({ cursor: F.value ? "pointer" : "default" }) }, [f(x(C), { name: "fileCsv", stroke: Z.value.props.color }, null, 8, ["stroke"])], 4)]), key: "1" } : void 0]), 1040)) : l("", !0), y(e.$slots, "skeleton", {}, () => [x(Ht) ? (_(), c(fe, { key: 0 })) : l("", !0)], !0) ], 46, Be)); } }, [["__scopeId", "data-v-3dfc2f00"]]); //#endregion export { ze as n, C as t };