import{g as t,S as e,i as s,a as o,b as n,v as r,s as i,f as a,n as l,j as c,d as p,q as u,o as h,h as d,t as m,w as f,m as g,r as y,p as $,x as b}from"./index-3cab5f92.js";import{pullLegendData as w}from"../../../../../../js/predict/charts.js";const{customElements:x}=t;function k(t,e,s){const o=t.slice();return o[10]=e[s],o[11]=e,o[12]=s,o}function j(t){let e,s,o,r,i,l,u,h,b=t[10].name+"",w=t[12];const x=()=>t[6](e,w),k=()=>t[6](null,w);function j(){return t[7](t[12])}return{c(){e=a("button"),s=a("div"),o=d(),r=a("span"),i=m(b),l=d(),c(s,"class","marker"),f(s,"background-color",t[10].color)},m(t,a){n(t,e,a),g(e,s),g(e,o),g(e,r),g(r,i),g(e,l),x(),u||(h=y(e,"click",j),u=!0)},p(e,o){t=e,1&o&&f(s,"background-color",t[10].color),1&o&&b!==(b=t[10].name+"")&&$(i,b),w!==t[12]&&(k(),w=t[12],x())},d(t){t&&p(e),k(),u=!1,h()}}}function v(t){let e,s=t[0],o=[];for(let e=0;et._id)),c=a[t];for(let t=0;t{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){b[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class E extends e{constructor(t){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},S,v,i,{option:4,chart:5,data:3},null),t&&(t.target&&n(t.target,this,t.anchor),t.props&&(this.$set(t.props),r()))}static get observedAttributes(){return["option","chart","data"]}get option(){return this.$$.ctx[4]}set option(t){this.$$set({option:t}),r()}get chart(){return this.$$.ctx[5]}set chart(t){this.$$set({chart:t}),r()}get data(){return this.$$.ctx[3]}set data(t){this.$$set({data:t}),r()}}x.define("legend-component",E);export{E as default};