const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./register-BqqwIOLc-DxYuNPO5.js","./register-BqqwIOLc-BmdQpaTx.js","./rolldown-runtime-BG2f4sTM.js","./app-initial-BHB6SClA.js","./app-initial-Czet5G9g.css"])))=>i.map(i=>d[i]);
import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{Bmt as n,Dvt as r,Mvt as i,Nvt as a,Vmt as o}from"./app-initial-BHB6SClA.js";function s(e){let t=(0,u.c)(21),{widget:n,initialState:r,theme:i,dir:a,mapboxAccessToken:o,streaming:s,className:f,customCss:m,onAction:h,onError:g,onLoad:_}=e,v=(0,d.useRef)(null),y;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(y=[],t[0]=y):y=t[0],(0,d.useEffect)(c,y);let b,x;t[1]===_?(b=t[2],x=t[3]):(b=()=>{if(!v.current)return;let e=new AbortController;return v.current.addEventListener(`dil.load`,e=>{let{detail:t}=e;_?.(t.imperativeApi)},{signal:e.signal}),()=>{e.abort()}},x=[_],t[1]=_,t[2]=b,t[3]=x),(0,d.useEffect)(b,x);let S,C;t[4]===h?(S=t[5],C=t[6]):(S=()=>{if(!v.current||!h)return;let e=new AbortController;return v.current.addEventListener(`dil.action`,e=>{let{detail:t}=e,{action:n,resolve:r,reject:i}=t;h(n).then(r,i)},{signal:e.signal}),()=>{e.abort()}},C=[h],t[4]=h,t[5]=S,t[6]=C),(0,d.useEffect)(S,C);let w,T;t[7]===g?(w=t[8],T=t[9]):(w=()=>{if(!v.current||!g)return;let e=new AbortController;return v.current.addEventListener(`dil.error`,e=>{let{error:t}=e;g(t)},{signal:e.signal}),()=>{e.abort()}},T=[g],t[7]=g,t[8]=w,t[9]=T),(0,d.useEffect)(w,T);let E,D;t[10]!==m||t[11]!==a||t[12]!==r||t[13]!==o||t[14]!==s||t[15]!==i||t[16]!==n?(E=()=>{if(!v.current)return;let e=v.current;p().then(()=>{e.setState({widget:n,initialState:r,theme:i,streaming:s,mapboxAccessToken:o,dir:a,customCss:m})})},D=[n,r,i,s,o,a,m],t[10]=m,t[11]=a,t[12]=r,t[13]=o,t[14]=s,t[15]=i,t[16]=n,t[17]=E,t[18]=D):(E=t[17],D=t[18]),(0,d.useEffect)(E,D);let O;return t[19]===f?O=t[20]:(O=(0,l.jsx)(`dil-renderer`,{ref:v,className:f}),t[19]=f,t[20]=O),O}function c(){p()}var l,u,d,f,p;e((()=>{l=r(),u=i(),d=t(a(),1),o(),f=null,p=()=>(f??=n(()=>import(`./register-BqqwIOLc-DxYuNPO5.js`).then(e=>e.r),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(e=>{e.registerTag()}),f)}))();export{s as DILRenderer};
//# sourceMappingURL=dist-BDdUmOWm.js.map