import{i as e}from"./chunk-aKtaBQYM.js";import{Vt as t}from"./mui-B6lh3XSP.js";import{B as n,I as r,P as i}from"./index-KVuxnkWj.js";var a=e(t(),1),o=e(n(),1),s=({latitude:e,longitude:t,positions:n,coordinates:s})=>((0,a.useEffect)(()=>{if(s||n){let e=s?s.map(([e,t])=>i(e,t)):n.map(e=>i(e.longitude,e.latitude));if(e.length){let t=e.reduce((e,t)=>e.extend(t),new o.default.LngLatBounds(e[0],e[0])),n=r.getCanvas();r.fitBounds(t,{padding:Math.min(n.width,n.height)*.1,duration:0})}}else r.jumpTo({center:i(t,e),zoom:Math.max(r.getZoom(),10)})},[e,t,n,s]),null);export{s as t};