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