import { ref as n, computed as m, onMounted as R, onBeforeUnmount as E, openBlock as o, createElementBlock as l, unref as C, normalizeStyle as b, createElementVNode as r, createCommentVNode as a, normalizeClass as p, toDisplayString as x, nextTick as F, pushScopeId as I, popScopeId as L } from "vue";
import { u as z } from "./useNestedProp-CTDeT4KA.js";
import { u as O, c as B, X as N, s as T } from "./index-MWHrTFPq.js";
import { _ as D } from "./_plugin-vue_export-helper-CHgC5LLL.js";
const g = (i) => (I("data-v-6a1383ea"), i = i(), L(), i), $ = ["xmlns", "height", "width"], W = {
  id: "follower",
  fy: "30%",
  fx: "30%"
}, G = ["stop-color", "stop-opacity"], A = /* @__PURE__ */ g(() => /* @__PURE__ */ r("stop", {
  offset: "95%",
  "stop-color": "transparent"
}, null, -1)), U = ["r", "fill", "stroke", "stroke-width", "stroke-dasharray"], V = ["r", "fill"], M = {
  key: 2,
  class: "wave"
}, P = ["id"], X = ["id"], j = /* @__PURE__ */ g(() => /* @__PURE__ */ r("feColorMatrix", {
  type: "saturate",
  values: "0"
}, null, -1)), Y = ["filter", "stroke"], q = {
  key: 3,
  class: "crosshair"
}, H = ["x1", "stroke", "stroke-width", "stroke-dasharray"], J = ["x1", "stroke", "stroke-width", "stroke-dasharray"], K = ["y1", "stroke", "stroke-width", "stroke-dasharray"], Q = ["y1", "stroke", "stroke-width", "stroke-dasharray"], Z = ["cy", "r", "fill"], ee = ["cy", "r", "fill"], te = ["cx", "r", "fill"], re = ["cx", "r", "fill"], se = {
  key: 5,
  class: "coordinates"
}, oe = ["x", "y", "font-size", "fill"], le = ["transform"], ae = ["font-size", "fill"], ie = {
  __name: "vue-ui-cursor",
  props: {
    config: {
      type: Object,
      default: {}
    }
  },
  setup(i) {
    const w = i, { vue_ui_cursor: S } = O(), d = n(B()), e = m(() => z({
      userConfig: w.config,
      defaultConfig: S
    })), s = n({
      x: -100,
      y: -100
    });
    function h({ clientX: t, clientY: k, ...ce }) {
      s.value.x = t - e.value.centerCircleRadius, s.value.y = k - e.value.centerCircleRadius;
    }
    function f(t) {
      s.value.x = t.targetTouches[0].clientX - e.value.centerCircleRadius, s.value.y = t.targetTouches[0].clientY - e.value.centerCircleRadius;
    }
    const y = n(!0);
    function u(t) {
      y.value = t;
    }
    const c = n(!1), v = n(null);
    function _() {
      c.value = !1, v.value && clearTimeout(v.value), F(() => {
        c.value = !0, v.value = setTimeout(() => {
          c.value = !1;
        }, 1e3);
      });
    }
    return R(() => {
      const t = e.value.parentId ? document.getElementById(e.value.parentId) : document.getElementsByTagName("div")[0];
      t.addEventListener("mousemove", h), t.addEventListener("touchmove", f), t.addEventListener("mouseleave", () => u(!1)), t.addEventListener("mouseenter", () => u(!0)), t.addEventListener("click", _);
    }), E(() => {
      const t = e.value.parentId ? document.getElementById(e.value.parentId) : document.getElementsByTagName("div")[0];
      t.removeEventListener("mousemove", h), t.removeEventListener("touchmove", f), t.removeEventListener("mouseleave", () => u(!1)), t.removeEventListener("mouseenter", () => u(!0)), t.removeEventListener("click", _);
    }), m(() => e.value.centerCircleRadius / 2.5), (t, k) => y.value ? (o(), l("svg", {
      key: 0,
      "data-html2canvas-ignore": "",
      xmlns: C(N),
      style: b(`z-index: 2147483647; overflow: visible; pointer-events: none;background: transparent; position:fixed; top:${s.value.y}px; left:${s.value.x}px;`),
      viewBox: "0 0 100 100",
      height: e.value.centerCircleRadius * 2,
      width: e.value.centerCircleRadius * 2
    }, [
      r("defs", null, [
        r("radialGradient", W, [
          r("stop", {
            offset: "10%",
            "stop-color": e.value.bubbleEffectColor,
            "stop-opacity": e.value.bubbleEffectOpacity
          }, null, 8, G),
          A
        ])
      ]),
      e.value.showCenterCircle ? (o(), l("circle", {
        key: 0,
        cx: 50,
        cy: 50,
        r: e.value.centerCircleRadius,
        fill: C(T)(e.value.centerCircleColor, e.value.centerCircleOpacity * 100),
        stroke: e.value.centerCircleStroke,
        "stroke-width": e.value.centerCircleStrokeWidth,
        "stroke-dasharray": e.value.centerCircleDasharray
      }, null, 8, U)) : a("", !0),
      e.value.bubbleEffect ? (o(), l("circle", {
        key: 1,
        cx: 50,
        cy: 50,
        r: e.value.centerCircleRadius,
        fill: "url(#follower)",
        stroke: "none"
      }, null, 8, V)) : a("", !0),
      e.value.useWaveOnClick ? (o(), l("g", M, [
        r("defs", null, [
          r("filter", {
            id: `blur_${d.value}`,
            x: "-50%",
            y: "-50%",
            width: "200%",
            height: "200%"
          }, [
            r("feGaussianBlur", {
              in: "SourceGraphic",
              stdDeviation: 4,
              id: `blur_std_${d.value}`
            }, null, 8, X),
            j
          ], 8, P)
        ]),
        c.value ? (o(), l("circle", {
          key: 0,
          class: p({ "circle-wave": c.value }),
          cx: 50,
          cy: 50,
          r: 50,
          filter: `url(#blur_${d.value})`,
          stroke: e.value.centerCircleStroke,
          fill: "none",
          "stroke-width": "3"
        }, null, 10, Y)) : a("", !0)
      ])) : a("", !0),
      e.value.showCrosshair ? (o(), l("g", q, [
        r("line", {
          x1: -e.value.centerCircleRadius + 50,
          x2: -5e3,
          y1: 50,
          y2: 50,
          stroke: e.value.crosshairStroke,
          "stroke-width": e.value.crosshairStrokeWidth,
          "stroke-dasharray": e.value.crosshairDasharray,
          "stroke-linecap": "round"
        }, null, 8, H),
        r("line", {
          x1: 50 + e.value.centerCircleRadius,
          x2: 5e3,
          y1: 50,
          y2: 50,
          stroke: e.value.crosshairStroke,
          "stroke-width": e.value.crosshairStrokeWidth,
          "stroke-dasharray": e.value.crosshairDasharray,
          "stroke-linecap": "round"
        }, null, 8, J),
        r("line", {
          x1: 50,
          x2: 50,
          y1: -e.value.centerCircleRadius + 50,
          y2: -5e3,
          stroke: e.value.crosshairStroke,
          "stroke-width": e.value.crosshairStrokeWidth,
          "stroke-dasharray": e.value.crosshairDasharray,
          "stroke-linecap": "round"
        }, null, 8, K),
        r("line", {
          x1: 50,
          x2: 50,
          y1: e.value.centerCircleRadius + 50,
          y2: 5e3,
          stroke: e.value.crosshairStroke,
          "stroke-width": e.value.crosshairStrokeWidth,
          "stroke-dasharray": e.value.crosshairDasharray,
          "stroke-linecap": "round"
        }, null, 8, Q)
      ])) : a("", !0),
      e.value.showIntersectCircles ? (o(), l("g", {
        key: 4,
        class: p({ "rotating-circles": e.value.isLoading })
      }, [
        r("circle", {
          cx: 50,
          cy: e.value.centerCircleRadius + 50,
          r: e.value.intersectCirclesRadius,
          fill: e.value.intersectCirclesFill
        }, null, 8, Z),
        r("circle", {
          cx: 50,
          cy: -e.value.centerCircleRadius + 50,
          r: e.value.intersectCirclesRadius,
          fill: e.value.intersectCirclesFill
        }, null, 8, ee),
        r("circle", {
          cx: -e.value.centerCircleRadius + 50,
          cy: 50,
          r: e.value.intersectCirclesRadius,
          fill: e.value.intersectCirclesFill
        }, null, 8, te),
        r("circle", {
          cx: e.value.centerCircleRadius + 50,
          cy: 50,
          r: e.value.intersectCirclesRadius,
          fill: e.value.intersectCirclesFill
        }, null, 8, re)
      ], 2)) : a("", !0),
      e.value.showCoordinates ? (o(), l("g", se, [
        r("text", {
          "text-anchor": "end",
          x: -e.value.centerCircleRadius + 50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset,
          y: 50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset,
          "font-size": e.value.coordinatesFontSize,
          fill: e.value.coordinatesColor,
          style: { "font-variant-numeric": "tabular-nums" },
          "font-family": "Arial"
        }, x(s.value.x.toFixed(0)), 9, oe),
        r("g", {
          transform: `translate(${50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset}, ${-e.value.centerCircleRadius + 50 - e.value.coordinatesFontSize / 2 + e.value.coordinatesOffset})`
        }, [
          r("text", {
            "text-anchor": "start",
            "font-size": e.value.coordinatesFontSize,
            fill: e.value.coordinatesColor,
            style: { "font-variant-numeric": "tabular-nums" },
            transform: "rotate(-90)",
            "font-family": "Arial"
          }, x(s.value.y.toFixed(0)), 9, ae)
        ], 8, le)
      ])) : a("", !0)
    ], 12, $)) : a("", !0);
  }
}, he = /* @__PURE__ */ D(ie, [["__scopeId", "data-v-6a1383ea"]]);
export {
  he as default
};
