import { defineComponent, toRefs, openBlock, createElementBlock, unref, createElementVNode } from "vue";
const _hoisted_1 = { class: "go-border-box" };
const _hoisted_2 = ["width", "height"];
const _hoisted_3 = /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "x1",
  values: "0%;100%;0%",
  dur: "10s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1);
const _hoisted_4 = /* @__PURE__ */ createElementVNode("animate", {
  attributeName: "x2",
  values: "100%;0%;100%",
  dur: "10s",
  begin: "0s",
  repeatCount: "indefinite"
}, null, -1);
const _hoisted_5 = ["stop-color"];
const _hoisted_6 = ["values"];
const _hoisted_7 = ["stop-color"];
const _hoisted_8 = ["values"];
const _hoisted_9 = ["points"];
const _hoisted_10 = ["points"];
const _hoisted_11 = ["points"];
const _hoisted_12 = ["points"];
const _hoisted_13 = ["points"];
const _hoisted_14 = ["points"];
const _hoisted_15 = ["points"];
const _hoisted_16 = ["points"];
const _hoisted_17 = ["points"];
const _hoisted_18 = ["fill", "points"];
const _hoisted_19 = ["width", "height", "fill", "mask"];
const __default__ = defineComponent({ name: "EBorder07" });
const _sfc_main = /* @__PURE__ */ defineComponent({
  ...__default__,
  props: {
    chartConfig: {
      type: Object,
      required: true
    }
  },
  setup(__props) {
    const props = __props;
    const getUUID = (randomLength = 10) => {
      return Number(
        Math.random().toString().substring(2, randomLength) + Date.now()
      ).toString(36);
    };
    const filterId = `border-box-07-filter-${getUUID()}`;
    const maskId = `border-box-07-mask-${getUUID()}`;
    const { w, h } = toRefs(props.chartConfig.attr);
    const { colors, backgroundColor } = toRefs(props.chartConfig.option);
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("div", _hoisted_1, [
        (openBlock(), createElementBlock("svg", {
          width: unref(w),
          height: unref(h)
        }, [
          createElementVNode("defs", null, [
            createElementVNode("linearGradient", {
              id: filterId,
              x1: "0%",
              y1: "0%",
              x2: "100%",
              y2: "100%"
            }, [
              _hoisted_3,
              _hoisted_4,
              createElementVNode("stop", {
                offset: "0%",
                "stop-color": unref(colors)[0]
              }, [
                createElementVNode("animate", {
                  attributeName: "stop-color",
                  values: `${unref(colors)[0]};${unref(colors)[1]};${unref(colors)[0]}`,
                  dur: "10s",
                  begin: "0s",
                  repeatCount: "indefinite"
                }, null, 8, _hoisted_6)
              ], 8, _hoisted_5),
              createElementVNode("stop", {
                offset: "100%",
                "stop-color": unref(colors)[1]
              }, [
                createElementVNode("animate", {
                  attributeName: "stop-color",
                  values: `${unref(colors)[1]};${unref(colors)[0]};${unref(colors)[1]}`,
                  dur: "10s",
                  begin: "0s",
                  repeatCount: "indefinite"
                }, null, 8, _hoisted_8)
              ], 8, _hoisted_7)
            ]),
            createElementVNode("mask", { id: maskId }, [
              createElementVNode("polyline", {
                stroke: "#fff",
                "stroke-width": "3",
                fill: "transparent",
                points: `8, ${unref(h) * 0.4} 8, 3, ${unref(w) * 0.4 + 7}, 3`
              }, null, 8, _hoisted_9),
              createElementVNode("polyline", {
                fill: "#fff",
                points: `8, ${unref(h) * 0.15} 8, 3, ${unref(w) * 0.1 + 7}, 3
              ${unref(w) * 0.1}, 8 14, 8 14, ${unref(h) * 0.15 - 7}
            `
              }, null, 8, _hoisted_10),
              createElementVNode("polyline", {
                stroke: "#fff",
                "stroke-width": "3",
                fill: "transparent",
                points: `${unref(w) * 0.5}, 3 ${unref(w) - 3}, 3, ${unref(w) - 3}, ${unref(h) * 0.25}`
              }, null, 8, _hoisted_11),
              createElementVNode("polyline", {
                fill: "#fff",
                points: `
              ${unref(w) * 0.52}, 3 ${unref(w) * 0.58}, 3
              ${unref(w) * 0.58 - 7}, 9 ${unref(w) * 0.52 + 7}, 9
            `
              }, null, 8, _hoisted_12),
              createElementVNode("polyline", {
                fill: "#fff",
                points: `
              ${unref(w) * 0.9}, 3 ${unref(w) - 3}, 3 ${unref(w) - 3}, ${unref(h) * 0.1}
              ${unref(w) - 9}, ${unref(h) * 0.1 - 7} ${unref(w) - 9}, 9 ${unref(w) * 0.9 + 7}, 9
            `
              }, null, 8, _hoisted_13),
              createElementVNode("polyline", {
                stroke: "#fff",
                "stroke-width": "3",
                fill: "transparent",
                points: `8, ${unref(h) * 0.5} 8, ${unref(h) - 3} ${unref(w) * 0.3 + 7}, ${unref(h) - 3}`
              }, null, 8, _hoisted_14),
              createElementVNode("polyline", {
                fill: "#fff",
                points: `
              8, ${unref(h) * 0.55} 8, ${unref(h) * 0.7}
              2, ${unref(h) * 0.7 - 7} 2, ${unref(h) * 0.55 + 7}
            `
              }, null, 8, _hoisted_15),
              createElementVNode("polyline", {
                stroke: "#fff",
                "stroke-width": "3",
                fill: "transparent",
                points: `${unref(w) * 0.35}, ${unref(h) - 3} ${unref(w) - 3}, ${unref(h) - 3} ${unref(w) - 3}, ${unref(h) * 0.35}`
              }, null, 8, _hoisted_16),
              createElementVNode("polyline", {
                fill: "#fff",
                points: `
              ${unref(w) * 0.92}, ${unref(h) - 3} ${unref(w) - 3}, ${unref(h) - 3} ${unref(w) - 3}, ${unref(h) * 0.8}
              ${unref(w) - 9}, ${unref(h) * 0.8 + 7} ${unref(w) - 9}, ${unref(h) - 9} ${unref(w) * 0.92 + 7}, ${unref(h) - 9}
            `
              }, null, 8, _hoisted_17)
            ])
          ]),
          createElementVNode("polygon", {
            fill: unref(backgroundColor),
            points: `
        15, 9 ${unref(w) * 0.1 + 1}, 9 ${unref(w) * 0.1 + 4}, 6 ${unref(w) * 0.52 + 2}, 6
        ${unref(w) * 0.52 + 6}, 10 ${unref(w) * 0.58 - 7}, 10 ${unref(w) * 0.58 - 2}, 6
        ${unref(w) * 0.9 + 2}, 6 ${unref(w) * 0.9 + 6}, 10 ${unref(w) - 10}, 10 ${unref(w) - 10}, ${unref(h) * 0.1 - 6}
        ${unref(w) - 6}, ${unref(h) * 0.1 - 1} ${unref(w) - 6}, ${unref(h) * 0.8 + 1} ${unref(w) - 10}, ${unref(h) * 0.8 + 6}
        ${unref(w) - 10}, ${unref(h) - 10} ${unref(w) * 0.92 + 7}, ${unref(h) - 10}  ${unref(w) * 0.92 + 2}, ${unref(h) - 6}
        11, ${unref(h) - 6} 11, ${unref(h) * 0.15 - 2} 15, ${unref(h) * 0.15 - 7}
      `
          }, null, 8, _hoisted_18),
          createElementVNode("rect", {
            x: "0",
            y: "0",
            width: unref(w),
            height: unref(h),
            fill: `url(#${filterId})`,
            mask: `url(#${maskId})`
          }, null, 8, _hoisted_19)
        ], 8, _hoisted_2))
      ]);
    };
  }
});
export { _sfc_main as default };
