import{R as s,s as t,e,N as a,n as o,j as r,w as n,x as c,y as d,z as l,A as f,B as i}from"./index.5a260dc4.js";export{z as transformDataset}from"./index.5a260dc4.js";import{d as u,a as p,B as x,R as m}from"./vendor.b0739682.js";const j=i,v=({prepared:i})=>{const{dataset:v}=u.usePreloadedQuery(j,i),g=p.exports.useContext(s),w=x(t),R=x(e);if(p.exports.useRef(R).current=R,!v)throw new a(`/datasets/${o(g)}`);const y=r();return p.exports.useEffect((()=>{y((({reset:s})=>(s(n),s(c),{colorscale:g.state&&g.state.colorscale?g.state.colorscale:void 0,config:g.state&&g.state.config?d(g.state.config):void 0,dataset:l(v),state:g.state&&g.state.state&&(null==g?void 0:g.state.state)||{}})))}),[v]),w?m.createElement(f,null):null};export{v as default};
