"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[8680],{858680:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var n=r(263475),c=r(135944);function u(e){const{height:t,width:r,echartOptions:u,refs:h}=e;return(0,c.tZ)(n.Z,{refs:h,height:t,width:r,echartOptions:u})}},263475:(e,t,r)=>{r.d(t,{Z:()=>D});var n=r(667294),c=r(751995),u=r(768023),h=r(281615),i=r(967021),s=r(358062),a=r(781836),d=r(873463),l=r(216026),f=r(259048),o=r(15746),N=r(126947),g=r(302907),p=r(516049),w=r(541969),v=r(938198),b=r(548785),E=r(557494),O=r(570012),k=r(730322),Z=r(655958),y=r(603174),R=r(731281),I=r(210680),j=r(347106),C=r(693450),H=r(499326),T=r(617813),m=r(129167),x=r(787164),z=r(135944);const A=c.iK.div`
  height: ${({height:e})=>e};
  width: ${({width:e})=>e};
`;function $({width:e,height:t,echartOptions:r,eventHandlers:c,zrEventHandlers:u,selectedValues:i={},refs:s},a){const d=(0,n.useRef)(null);s&&(s.divRef=d);const l=(0,n.useRef)(),f=(0,n.useMemo)((()=>Object.keys(i)||[]),[i]),o=(0,n.useRef)([]);(0,n.useImperativeHandle)(a,(()=>({getEchartInstance:()=>l.current}))),(0,n.useEffect)((()=>{d.current&&(l.current||(l.current=(0,h.S1)(d.current)),Object.entries(c||{}).forEach((([e,t])=>{var r,n;null==(r=l.current)||r.off(e),null==(n=l.current)||n.on(e,t)})),Object.entries(u||{}).forEach((([e,t])=>{var r,n;null==(r=l.current)||r.getZr().off(e),null==(n=l.current)||n.getZr().on(e,t)})),l.current.setOption(r,!0))}),[r,c,u]),(0,n.useEffect)((()=>{l.current&&(l.current.dispatchAction({type:"downplay",dataIndex:o.current.filter((e=>!f.includes(e)))}),f.length&&l.current.dispatchAction({type:"highlight",dataIndex:f}),o.current=f)}),[f]);const N=(0,n.useCallback)((({width:e,height:t})=>{l.current&&l.current.resize({width:e,height:t})}),[]);return(0,n.useEffect)((()=>(N({width:e,height:t}),()=>{var e;return null==(e=l.current)?void 0:e.dispose()})),[]),(0,n.useLayoutEffect)((()=>{N({width:e,height:t})}),[e,t,N]),(0,z.tZ)(A,{ref:d,height:t,width:e})}(0,u.D)([O.N,i.N,s.N,a.N,d.N,l.N,f.N,o.N,N.N,g.N,p.N,w.N,v.N,b.N,E.N,k.N,Z.N,y.N,R.N,I.N,j.N,C.N,H.N,T.N,m.N,x.T]);const D=(0,n.forwardRef)($)}}]);
//# sourceMappingURL=d377b67bc310f478f45a.chunk.js.map