"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),c=require("lodash"),m=require("../../commons/core/datasource/index.js"),v=require("../../commons/core/useChart.js"),b=require("../../commons/utils/parseOtherData.js"),f={class:"zerov-widget"},O=["id"],_=t.defineComponent({name:"zv-chart-other-funnel"}),E=t.defineComponent({..._,props:{basicOption:{},sources:{},useEvents:{},uuid:{}},emits:["chart-click","chart-dblclick","chart-mousedown","chart-mouseover","chart-mouseout","chart-contextmenu"],setup(i,{expose:u,emit:d}){const e=i,l=d,{id:p,setOption:a,chart:h,renderChart:n,renderData:o}=v.useChart({basicOption:c.cloneDeep(e.basicOption),useEvents:c.cloneDeep(e.useEvents),customRenderData:s=>{s=c.cloneDeep(s),m.SHJDatasourceV2.parse({tId:e.uuid,sources:e.sources,callback:({data:r})=>{try{window.SHJParseEvent(e.useEvents,"dataListener",r),a(b.parseOtherData(r,e.basicOption))}catch{window.SHJParseEvent(e.useEvents,"dataListener",null),a(s)}}})},emit:l});return t.watch(()=>e.sources,()=>{o(e.basicOption)},{deep:!0}),t.watch(()=>c.cloneDeep(e.basicOption),(s,r)=>{c.isEqual(s,r)||n(s)},{deep:!0}),u({getEchartsInstance:()=>h.value,refresh:()=>{e.sources&&e.sources.length>0&&n(e.basicOption),o(e.basicOption)},refreshView:()=>{e.sources&&e.sources.length>0&&n(e.basicOption)},refreshData:()=>{o(e.basicOption)}}),(s,r)=>(t.openBlock(),t.createElementBlock("div",f,[t.createElementVNode("div",{id:t.unref(p),class:"widget"},null,8,O)]))}});exports.default=E;
