import{a4 as e,y as a,a6 as t,a7 as s,a8 as n,a9 as o,aa as i,ab as r,ac as l,al as u,af as m,ag as p,ah as d}from"./echarts.js?v=1753954525509";import{bR as v}from"./naive.js?v=1753954525509";import{k as c,r as f,w as h,n as g,an as y,o as w,b as j,U as _,V as b,I as x,X as B}from"./vue.js?v=1753954525509";import"./__commonjsHelpers__.js?v=1753954525509";import"./common.js?v=1753954525509";a([t,s,n,o,i,r,l,u,m,p,d]);const I=c({__name:"index",props:{width:{type:[Number,String],default:"100%"},height:{type:[Number,String],default:"200px"},dataZoom:{type:Boolean,default:!1},option:{type:Object,required:!0}},setup(a,{expose:t}){const s=a,n=f(null);let o=null;function i(){null!==n.value&&(o=e.getInstanceByDom(n.value),null==o&&(o=e.init(n.value)),o.setOption(s.option,!0))}h((()=>s.option),(e=>{e&&g((()=>{i()}))}),{immediate:!0,deep:!0});const r=y((function(){var a;null!==n.value&&(null==(a=e.getInstanceByDom(n.value))||a.resize())}),300,{maxWait:800});return w((()=>{i(),window.addEventListener("resize",r)})),j((()=>{var a;n.value&&(null==(a=e.getInstanceByDom(n.value))||a.dispose(),window.removeEventListener("resize",r))})),t({getChart:()=>o}),(e,t)=>(_(),b("div",{ref_key:"chartRef",ref:n,style:x({width:B(v)(a.width),height:B(v)(a.height)})},null,4))}});export{I as default};
