import { computed as y, ref as d, watch as ie, onMounted as Pe, onBeforeUnmount as Ne, openBlock as s, createElementBlock as r, normalizeClass as ce, normalizeStyle as ve, createBlock as Y, createCommentVNode as v, withCtx as N, toDisplayString as z, unref as i, createSlots as Oe, renderSlot as x, normalizeProps as L, guardReactiveProps as D, createVNode as Ie, createElementVNode as g, Fragment as F, renderList as O } from "vue";
import { u as Xe, c as Ae, t as Ye, a as Re, p as he, b as Ge, o as de, d as Ee, e as R, g as fe, m as U, X as Te, s as B, k as je, I as G, i as W, f as V, F as q } from "./index-Cm2_6s9o.js";
import { t as Le, u as De } from "./useResponsive-CoxXLe23.js";
import { u as Ue, U as Be } from "./usePrinter-Cx8U1e30.js";
import We from "./vue-ui-skeleton-BUS6A44x.js";
import { _ as Ve } from "./Title-Coit3NcT.js";
import { u as ye } from "./useNestedProp-BYPZJNhi.js";
import { _ as qe } from "./PackageVersion-CTMY4zeY.js";
import { P as He } from "./PenAndPaper-DJ_d10S-.js";
import { _ as Ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const Je = ["id"], Ke = { key: 0 }, Qe = ["xmlns", "viewBox"], et = ["id"], tt = ["stop-color"], at = ["stop-color"], lt = ["stop-color"], ot = ["id"], st = ["stdDeviation"], rt = ["d", "fill", "stroke"], ut = ["id", "d"], nt = ["fill", "font-size", "font-weight"], it = ["href", "startOffset"], ct = ["x", "y", "text-anchor", "fill", "font-size", "font-weight"], vt = ["d", "filter"], ht = { key: 3 }, dt = ["x", "y", "text-anchor", "font-size", "font-weight", "fill"], ft = ["x", "y", "font-size", "font-weight", "fill"], yt = { key: 5 }, mt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], gt = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], pt = ["x1", "y1", "x2", "y2", "stroke-width", "filter"], kt = { key: 6 }, bt = ["d", "fill", "stroke", "stroke-width"], _t = ["cx", "cy", "fill", "r", "stroke-width", "stroke"], xt = ["x", "y", "font-size", "fill"], wt = {
  key: 5,
  class: "vue-data-ui-watermark"
}, St = {
  __name: "vue-ui-gauge",
  props: {
    config: {
      type: Object,
      default() {
        return {};
      }
    },
    dataset: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  setup(E, { expose: me }) {
    const c = E, { vue_ui_gauge: ge } = Xe(), I = y(() => !!c.dataset && Object.keys(c.dataset).length > 0 && c.dataset.series && c.dataset.series.length), k = d(Ae()), pe = d(null), H = d(0), $ = d(null), Z = d(null), J = d(null), K = d(null), Q = d(null), ee = d(0), e = y({
      get: () => te(),
      set: (a) => a
    });
    ie(() => c.config, (a) => {
      e.value = te(), ue(), ee.value += 1;
    }, { deep: !0 });
    function te() {
      const a = ye({
        userConfig: c.config,
        defaultConfig: ge
      });
      return a.theme ? {
        ...ye({
          userConfig: Ye.vue_ui_gauge[a.theme] || c.config,
          defaultConfig: a
        }),
        customPalette: Re[a.theme] || he
      } : a;
    }
    const { isPrinting: ae, isImaging: le, generatePdf: oe, generateImage: se } = Ue({
      elementId: `vue-ui-gauge_${k.value}`,
      fileName: e.value.style.chart.title.text || "vue-ui-gauge"
    }), ke = y(() => e.value.userOptions.show && !e.value.style.chart.title.text), be = y(() => Ge(e.value.customPalette)), w = y(() => {
      if (!I.value || de(c.dataset.series || {}))
        return {
          value: 0,
          series: [
            {
              from: 0,
              to: 0
            }
          ]
        };
      const a = [];
      (c.dataset.series || []).forEach((t) => {
        a.push(t.from || 1e-7), a.push(t.to || 1e-7);
      });
      const o = Math.max(...a);
      return {
        ...c.dataset,
        series: (c.dataset.series || []).map((t, u) => ({
          ...t,
          color: Ee(t.color) || be.value[u] || he[u],
          value: ((t.to || 0) - (t.from || 0)) / o * 100
        }))
      };
    }), m = d(512), l = d({
      height: 358.4,
      width: m.value,
      top: 0,
      bottom: 358.4,
      centerX: 179.2,
      centerY: m.value / 2,
      labelFontSize: 18,
      legendFontSize: e.value.style.chart.legend.fontSize,
      pointerRadius: e.value.style.chart.layout.pointer.circle.radius,
      trackSize: e.value.style.chart.layout.track.size,
      pointerSize: e.value.style.chart.layout.pointer.size,
      pointerStrokeWidth: e.value.style.chart.layout.pointer.strokeWidth,
      markerOffset: e.value.style.chart.layout.markers.offsetY + 3,
      segmentFontSize: e.value.style.chart.layout.segmentNames.fontSize
    }), C = d(0), M = d(0), f = d(e.value.style.chart.animation.use ? 0 : c.dataset.value);
    ie(() => c.dataset.value, () => {
      ne(c.dataset.value);
    });
    const h = y(() => {
      const a = l.value.width / 2, o = n.value.base, t = Math.PI * ((f.value + 0 - M.value) / (C.value - M.value)) + Math.PI;
      return {
        x1: a,
        y1: o,
        x2: a + n.value.pointerSize * l.value.pointerSize * 0.9 * Math.cos(t),
        y2: o + n.value.pointerSize * l.value.pointerSize * 0.9 * Math.sin(t)
      };
    }), re = y(() => {
      const a = l.value.width / 2, o = n.value.base, t = Math.PI * ((f.value + 0 - M.value) / (C.value - M.value)) + Math.PI, u = a + n.value.pointerSize * l.value.pointerSize * 0.9 * Math.cos(t), b = o + n.value.pointerSize * l.value.pointerSize * 0.9 * Math.sin(t), p = l.value.pointerRadius, Fe = a + p * Math.cos(t + Math.PI / 2), $e = o + p * Math.sin(t + Math.PI / 2), Ce = a + p * Math.cos(t - Math.PI / 2), Me = o + p * Math.sin(t - Math.PI / 2);
      return isNaN(u) ? null : `M ${u},${b} ${Fe},${$e} ${Ce},${Me} Z`;
    }), T = y(() => {
      for (let a = 0; a < w.value.series.length; a += 1) {
        const { color: o, from: t, to: u } = w.value.series[a];
        if (f.value >= t && f.value <= u)
          return o;
      }
      return "#2D353C";
    }), X = d(null);
    function ue() {
      if (de(c.dataset) ? R({
        componentName: "VueUiGauge",
        type: "dataset"
      }) : (fe({
        datasetObject: c.dataset,
        requiredAttributes: ["value", "series"]
      }).forEach((a) => {
        R({
          componentName: "VueUiGauge",
          type: "datasetAttribute",
          property: a
        });
      }), Object.hasOwn(c.dataset, "series") && (c.dataset.series.length ? c.dataset.series.forEach((a, o) => {
        fe({
          datasetObject: a,
          requiredAttributes: ["from", "to"]
        }).forEach((t) => {
          R({
            componentName: "VueUiGauge",
            type: "datasetSerieAttribute",
            property: t,
            index: o
          });
        });
      }) : R({
        componentName: "VueUiGauge",
        type: "datasetAttributeEmpty",
        property: "series"
      }))), ne(c.dataset.value || 0), e.value.responsive) {
        const a = Le(() => {
          const { width: o, height: t } = De({
            chart: $.value,
            title: e.value.style.chart.title.text ? Z.value : null,
            legend: J.value,
            source: K.value,
            noTitle: Q.value
          });
          l.value.width = o, l.value.height = t, l.value.centerX = o / 2, l.value.centerY = m.value / 2 / 358.4 * t, l.value.bottom = t, l.value.labelFontSize = 18 / m.value * Math.min(t, o) < 10 ? 10 : 18 / m.value * Math.min(t, o), l.value.legendFontSize = e.value.style.chart.legend.fontSize / m.value * Math.min(t, o) < 14 ? 14 : e.value.style.chart.legend.fontSize / m.value * Math.min(t, o), l.value.pointerRadius = e.value.style.chart.layout.pointer.circle.radius / m.value * Math.min(t, o), l.value.trackSize = e.value.style.chart.layout.track.size / m.value * Math.min(t, o), l.value.pointerStrokeWidth = q({
            relator: Math.min(o, t),
            adjuster: m.value,
            source: e.value.style.chart.layout.pointer.strokeWidth,
            threshold: 2,
            fallback: 2
          }), l.value.markerOffset = q({
            relator: Math.max(o, t),
            adjuster: m.value,
            source: e.value.style.chart.layout.markers.offsetY + 3,
            threshold: 2,
            fallback: 2
          }), l.value.segmentFontSize = q({
            relator: Math.min(o, t),
            adjuster: m.value,
            source: e.value.style.chart.layout.segmentNames.fontSize,
            threshold: 8,
            fallback: 8
          });
        });
        X.value = new ResizeObserver(a), X.value.observe($.value.parentNode);
      }
    }
    Pe(() => {
      ue();
    }), Ne(() => {
      X.value && X.value.disconnect();
    });
    function ne(a) {
      const o = [];
      (w.value.series || []).forEach((p) => {
        o.push(p.from || 0), o.push(p.to || 0);
      }), C.value = Math.max(...o), M.value = Math.min(...o);
      let t = e.value.style.chart.animation.speed;
      const u = Math.abs(a - f.value) / (t * 60);
      function b() {
        f.value < a ? f.value = Math.min(f.value + u, a) : f.value > a && (f.value = Math.max(f.value - u, a)), f.value !== a && requestAnimationFrame(b);
      }
      b();
    }
    const n = y(() => {
      const a = e.value.responsive ? Math.min(l.value.width, l.value.height) : l.value.width;
      return {
        arcs: a / 2.5,
        gradients: a / 2.75,
        base: e.value.responsive ? l.value.height / 2 : l.value.height * 0.7,
        ratingBase: e.value.responsive ? l.value.height / 2 + l.value.height / 4 : l.value.height * 0.9,
        pointerSize: e.value.responsive ? Math.min(l.value.width, l.value.height) / 3 : l.value.width / 3.2
      };
    }), _ = y(() => U(
      { series: w.value.series },
      l.value.width / 2,
      n.value.base,
      n.value.arcs,
      n.value.arcs,
      1,
      1,
      1,
      180,
      109.9495,
      40 * l.value.trackSize
    )), _e = y(() => U(
      { series: w.value.series },
      l.value.width / 2,
      n.value.base,
      n.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio,
      n.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio,
      1,
      1,
      1,
      180,
      109.9495,
      40 * l.value.trackSize
    )), S = y(() => n.value.arcs * e.value.style.chart.layout.segmentNames.offsetRatio);
    function xe(a) {
      if (a.reduce((b, p) => b + p, 0) > 100)
        throw new Error("Total % must not exceed 100");
      const t = 50;
      let u = 0;
      return a.map((b) => (u += b, `${u / 100 * t - b / 4}%`));
    }
    const we = y(() => xe(_.value.map((a) => a.proportion * 100))), Se = y(() => U(
      { series: w.value.series },
      l.value.width / 2,
      n.value.base,
      n.value.gradients,
      n.value.gradients,
      0.95,
      1,
      1,
      180,
      110.02,
      2 * l.value.trackSize
    )), P = d(!1);
    function ze(a) {
      P.value = a, H.value += 1;
    }
    const A = d(!1);
    function j() {
      A.value = !A.value;
    }
    return me({
      generatePdf: oe,
      generateImage: se,
      toggleAnnotator: j
    }), (a, o) => (s(), r("div", {
      class: ce(`vue-ui-gauge ${P.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
      ref_key: "gaugeChart",
      ref: $,
      id: `vue-ui-gauge_${k.value}`,
      style: ve(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height: 100%" : ""}`)
    }, [
      e.value.userOptions.buttons.annotator ? (s(), Y(He, {
        key: 0,
        parent: $.value,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        active: A.value,
        onClose: j
      }, null, 8, ["parent", "backgroundColor", "color", "active"])) : v("", !0),
      ke.value ? (s(), r("div", {
        key: 1,
        ref_key: "noTitle",
        ref: Q,
        class: "vue-data-ui-no-title-space",
        style: "height:36px; width: 100%;background:transparent"
      }, null, 512)) : v("", !0),
      e.value.style.chart.title.text ? (s(), r("div", {
        key: 2,
        ref_key: "chartTitle",
        ref: Z,
        style: "width:100%;background:transparent;padding-bottom:12px"
      }, [
        (s(), Y(Ve, {
          key: `title_${ee.value}`,
          config: {
            title: {
              cy: "gauge-div-title",
              ...e.value.style.chart.title
            },
            subtitle: {
              cy: "gauge-div-subtitle",
              ...e.value.style.chart.title.subtitle
            }
          }
        }, {
          default: N(() => [
            e.value.translations.base && E.dataset.base ? (s(), r("span", Ke, z(e.value.translations.base) + ": " + z(E.dataset.base), 1)) : v("", !0)
          ]),
          _: 1
        }, 8, ["config"]))
      ], 512)) : v("", !0),
      e.value.userOptions.show && I.value ? (s(), Y(Be, {
        ref_key: "details",
        ref: pe,
        key: `user_options_${H.value}`,
        backgroundColor: e.value.style.chart.backgroundColor,
        color: e.value.style.chart.color,
        isImaging: i(le),
        isPrinting: i(ae),
        uid: k.value,
        hasXls: !1,
        hasPdf: e.value.userOptions.buttons.pdf,
        hasImg: e.value.userOptions.buttons.img,
        hasFullscreen: e.value.userOptions.buttons.fullscreen,
        isFullscreen: P.value,
        titles: { ...e.value.userOptions.buttonTitles },
        chartElement: $.value,
        position: e.value.userOptions.position,
        hasAnnotator: e.value.userOptions.buttons.annotator,
        isAnnotation: A.value,
        onToggleFullscreen: ze,
        onGeneratePdf: i(oe),
        onGenerateImage: i(se),
        onToggleAnnotator: j
      }, Oe({ _: 2 }, [
        a.$slots.optionPdf ? {
          name: "optionPdf",
          fn: N(() => [
            x(a.$slots, "optionPdf", {}, void 0, !0)
          ]),
          key: "0"
        } : void 0,
        a.$slots.optionImg ? {
          name: "optionImg",
          fn: N(() => [
            x(a.$slots, "optionImg", {}, void 0, !0)
          ]),
          key: "1"
        } : void 0,
        a.$slots.optionFullscreen ? {
          name: "optionFullscreen",
          fn: N(({ toggleFullscreen: t, isFullscreen: u }) => [
            x(a.$slots, "optionFullscreen", L(D({ toggleFullscreen: t, isFullscreen: u })), void 0, !0)
          ]),
          key: "2"
        } : void 0,
        a.$slots.optionAnnotator ? {
          name: "optionAnnotator",
          fn: N(({ toggleAnnotator: t, isAnnotator: u }) => [
            x(a.$slots, "optionAnnotator", L(D({ toggleAnnotator: t, isAnnotator: u })), void 0, !0)
          ]),
          key: "3"
        } : void 0
      ]), 1032, ["backgroundColor", "color", "isImaging", "isPrinting", "uid", "hasPdf", "hasImg", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "onGeneratePdf", "onGenerateImage"])) : v("", !0),
      I.value ? (s(), r("svg", {
        key: 4,
        xmlns: i(Te),
        class: ce({ "vue-data-ui-fullscreen--on": P.value, "vue-data-ui-fulscreen--off": !P.value }),
        viewBox: `0 0 ${l.value.width <= 0 ? 10 : l.value.width} ${l.value.height <= 0 ? 10 : l.value.height}`,
        style: ve(`max-width:100%;overflow:hidden !important;background:transparent;color:${e.value.style.chart.color}`)
      }, [
        Ie(qe),
        g("defs", null, [
          g("radialGradient", {
            id: `gradient_${k.value}`,
            cx: "50%",
            cy: "50%",
            r: "50%",
            fx: "50%",
            fy: "50%"
          }, [
            g("stop", {
              offset: "0%",
              "stop-color": i(B)("#FFFFFF", 1)
            }, null, 8, tt),
            g("stop", {
              offset: "80%",
              "stop-color": i(B)("#FFFFFF", e.value.style.chart.layout.track.gradientIntensity)
            }, null, 8, at),
            g("stop", {
              offset: "100%",
              "stop-color": i(B)("#FFFFFF", 1)
            }, null, 8, lt)
          ], 8, et)
        ]),
        g("defs", null, [
          g("filter", {
            id: `blur_${k.value}`,
            x: "-50%",
            y: "-50%",
            width: "200%",
            height: "200%"
          }, [
            g("feGaussianBlur", {
              in: "SourceGraphic",
              stdDeviation: 100 / e.value.style.chart.layout.track.gradientIntensity
            }, null, 8, st)
          ], 8, ot)
        ]),
        (s(!0), r(F, null, O(_.value, (t, u) => (s(), r("path", {
          key: `arc_${u}`,
          d: t.arcSlice,
          fill: t.color,
          stroke: e.value.style.chart.backgroundColor,
          "stroke-linecap": "round"
        }, null, 8, rt))), 128)),
        e.value.style.chart.layout.segmentNames.show && e.value.style.chart.layout.segmentNames.curved ? (s(), r(F, { key: 0 }, [
          g("path", {
            id: `curve_${k.value}`,
            d: `M ${h.value.x1},${h.value.y1} m -${S.value},0 a ${S.value},${S.value} 0 1,1 ${2 * S.value},0 a ${S.value},${S.value} 0 1,1 -${2 * S.value},0`,
            fill: "transparent"
          }, null, 8, ut),
          (s(!0), r(F, null, O(_.value, (t, u) => (s(), r("text", {
            fill: e.value.style.chart.layout.segmentNames.useSerieColor ? t.color : e.value.style.chart.layout.segmentNames.color,
            "font-size": l.value.segmentFontSize,
            "font-weight": e.value.style.chart.layout.segmentNames.bold ? "bold" : "normal",
            "text-anchor": "middle"
          }, [
            g("textPath", {
              href: `#curve_${k.value}`,
              startOffset: we.value[u]
            }, z(t.name || ""), 9, it)
          ], 8, nt))), 256))
        ], 64)) : v("", !0),
        e.value.style.chart.layout.segmentNames.show && !e.value.style.chart.layout.segmentNames.curved ? (s(!0), r(F, { key: 1 }, O(_e.value, (t, u) => (s(), r("text", {
          x: t.center.endX,
          y: t.center.endY,
          "text-anchor": i(je)(t, !1, 12).anchor,
          fill: e.value.style.chart.layout.segmentNames.useSerieColor ? t.color : e.value.style.chart.layout.segmentNames.color,
          "font-size": l.value.segmentFontSize,
          "font-weight": e.value.style.chart.layout.segmentNames.bold ? "bold" : "normal"
        }, z(t.name || ""), 9, ct))), 256)) : v("", !0),
        e.value.style.chart.layout.track.useGradient ? (s(!0), r(F, { key: 2 }, O(Se.value, (t, u) => (s(), r("path", {
          key: `arc_${u}`,
          d: t.arcSlice,
          fill: "#FFFFFF",
          stroke: "none",
          "stroke-linecap": "round",
          filter: `url(#blur_${k.value})`
        }, null, 8, vt))), 128)) : v("", !0),
        e.value.style.chart.layout.markers.show ? (s(), r("g", ht, [
          (s(!0), r(F, null, O(_.value, (t, u) => (s(), r("text", {
            x: i(G)({
              centerX: l.value.width / 2,
              centerY: n.value.base,
              initX: t.center.startX,
              initY: t.center.startY,
              offset: l.value.markerOffset
            }).x,
            y: i(G)({
              centerX: l.value.width / 2,
              centerY: n.value.base,
              initX: t.center.startX,
              initY: t.center.startY,
              offset: l.value.markerOffset
            }).y,
            "text-anchor": t.center.startX < l.value.width / 2 - 5 ? "end" : t.center.startX > l.value.width / 2 + 5 ? "start" : "middle",
            "font-size": l.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
            "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
            fill: e.value.style.chart.layout.markers.color
          }, z(i(W)(
            e.value.style.chart.layout.markers.formatter,
            t.from,
            i(V)({
              p: e.value.style.chart.layout.markers.prefix,
              v: t.from,
              s: e.value.style.chart.layout.markers.suffix,
              r: e.value.style.chart.layout.markers.roundingValue
            })
          )), 9, dt))), 256))
        ])) : v("", !0),
        e.value.style.chart.layout.markers.show ? (s(), r("text", {
          key: 4,
          x: i(G)({
            centerX: l.value.width / 2,
            centerY: n.value.base,
            initX: _.value.at(-1).endX,
            initY: _.value.at(-1).endY,
            offset: l.value.markerOffset
          }).x,
          y: i(G)({
            centerX: l.value.width / 2,
            centerY: n.value.base,
            initX: _.value.at(-1).endX,
            initY: _.value.at(-1).endY,
            offset: l.value.markerOffset
          }).y,
          "text-anchor": "start",
          "font-size": l.value.labelFontSize * e.value.style.chart.layout.markers.fontSizeRatio,
          "font-weight": `${e.value.style.chart.layout.markers.bold ? "bold" : "normal"}`,
          fill: e.value.style.chart.layout.markers.color
        }, z(i(W)(
          e.value.style.chart.layout.markers.formatter,
          C.value,
          i(V)({
            p: e.value.style.chart.layout.markers.prefix,
            v: C.value,
            s: e.value.style.chart.layout.markers.suffix,
            r: e.value.style.chart.layout.markers.roundingValue
          })
        )), 9, ft)) : v("", !0),
        e.value.style.chart.layout.pointer.type === "rounded" ? (s(), r("g", yt, [
          isNaN(h.value.x2) ? v("", !0) : (s(), r("line", {
            key: 0,
            x1: h.value.x1,
            y1: h.value.y1,
            x2: h.value.x2,
            y2: h.value.y2,
            stroke: e.value.style.chart.layout.pointer.stroke,
            "stroke-width": l.value.pointerStrokeWidth,
            "stroke-linecap": "round"
          }, null, 8, mt)),
          isNaN(h.value.x2) ? v("", !0) : (s(), r("line", {
            key: 1,
            x1: h.value.x1,
            y1: h.value.y1,
            x2: h.value.x2,
            y2: h.value.y2,
            stroke: e.value.style.chart.layout.pointer.useRatingColor ? T.value : e.value.style.chart.layout.pointer.color,
            "stroke-linecap": "round",
            "stroke-width": l.value.pointerStrokeWidth * 0.7
          }, null, 8, gt)),
          !isNaN(h.value.x2) && e.value.style.chart.layout.track.useGradient ? (s(), r("line", {
            key: 2,
            x1: h.value.x1,
            y1: h.value.y1,
            x2: h.value.x2,
            y2: h.value.y2,
            stroke: "white",
            "stroke-linecap": "round",
            "stroke-width": l.value.pointerStrokeWidth * 0.3,
            filter: `url(#blur_${k.value})`
          }, null, 8, pt)) : v("", !0)
        ])) : (s(), r("g", kt, [
          re.value ? (s(), r("path", {
            key: 0,
            d: re.value,
            fill: e.value.style.chart.layout.pointer.useRatingColor ? T.value : e.value.style.chart.layout.pointer.color,
            stroke: e.value.style.chart.layout.pointer.stroke,
            "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
            "stroke-linejoin": "round"
          }, null, 8, bt)) : v("", !0)
        ])),
        g("circle", {
          cx: l.value.width / 2,
          cy: n.value.base,
          fill: e.value.style.chart.layout.pointer.circle.color,
          r: l.value.pointerRadius <= 0 ? 1e-4 : l.value.pointerRadius,
          "stroke-width": e.value.style.chart.layout.pointer.circle.strokeWidth,
          stroke: e.value.style.chart.layout.pointer.circle.stroke
        }, null, 8, _t),
        e.value.style.chart.legend.show ? (s(), r("text", {
          key: 7,
          x: l.value.width / 2,
          y: n.value.ratingBase,
          "text-anchor": "middle",
          "font-size": l.value.legendFontSize,
          "font-weight": "bold",
          fill: e.value.style.chart.legend.useRatingColor ? T.value : e.value.style.chart.legend.color
        }, z(i(W)(
          e.value.style.chart.legend.formatter,
          f.value,
          i(V)({
            p: e.value.style.chart.legend.prefix + (e.value.style.chart.legend.showPlusSymbol && f.value > 0 ? "+" : ""),
            v: f.value,
            s: e.value.style.chart.legend.suffix,
            r: e.value.style.chart.legend.roundingValue
          })
        )), 9, xt)) : v("", !0),
        x(a.$slots, "svg", { svg: l.value }, void 0, !0)
      ], 14, Qe)) : v("", !0),
      a.$slots.watermark ? (s(), r("div", wt, [
        x(a.$slots, "watermark", L(D({ isPrinting: i(ae) || i(le) })), void 0, !0)
      ])) : v("", !0),
      I.value ? v("", !0) : (s(), Y(We, {
        key: 6,
        config: {
          type: "gauge",
          style: {
            backgroundColor: e.value.style.chart.backgroundColor,
            gauge: {
              color: "#CCCCCC"
            }
          }
        }
      }, null, 8, ["config"])),
      g("div", {
        ref_key: "chartLegend",
        ref: J
      }, [
        x(a.$slots, "legend", { legend: w.value }, void 0, !0)
      ], 512),
      a.$slots.source ? (s(), r("div", {
        key: 7,
        ref_key: "source",
        ref: K,
        dir: "auto"
      }, [
        x(a.$slots, "source", {}, void 0, !0)
      ], 512)) : v("", !0)
    ], 14, Je));
  }
}, At = /* @__PURE__ */ Ze(St, [["__scopeId", "data-v-e228171b"]]);
export {
  At as default
};
