1import{j as o}from"./jsx-runtime-0DLF9kdB.js";import{r}from"./index-DM-Ysix_.js";function x({name:y,defaultValue:m="",placeholder:u,apiKey:n}){const i=r.useRef(null),p=r.useRef(null),[f,c]=r.useState(m),[w,d]=r.useState(null),[T,g]=r.useState(null);return r.useEffect(()=>{if(!n)return;const s=()=>{if(!i.current)return;const e=new window.google.maps.places.Autocomplete(i.current,{types:["address","establishment"]});let l=null,a=null;p.current&&(l=new window.google.maps.places.Map(p.current,{center:{lat:25.0339,lng:121.5644},zoom:13,styles:[{elementType:"geometry",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.stroke",stylers:[{color:"#242f3e"}]},{elementType:"labels.text.fill",stylers:[{color:"#746855"}]},{featureType:"administrative.locality",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"poi.park",elementType:"geometry",stylers:[{color:"#263c3f"}]},{featureType:"poi.park",elementType:"labels.text.fill",stylers:[{color:"#6b9a76"}]},{featureType:"road",elementType:"geometry",stylers:[{color:"#38414e"}]},{featureType:"road",elementType:"geometry.stroke",stylers:[{color:"#212a37"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{color:"#9ca5b3"}]},{featureType:"road.highway",elementType:"geometry",stylers:[{color:"#746855"}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#1f2835"}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{color:"#f3d19c"}]},{featureType:"transit",elementType:"geometry",stylers:[{color:"#2f3948"}]},{featureType:"transit.station",elementType:"labels.text.fill",stylers:[{color:"#d59563"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#17263c"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#515c6d"}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{color:"#17263c"}]}]}),a=new window.google.maps.Marker({map:l,anchorPoint:new window.google.maps.Point(0,-29)}),d(l),g(a)),e.addListener("place_changed",()=>{const t=e.getPlace();!t.geometry||!t.geometry.location||(l&&(t.geometry.viewport?l.fitBounds(t.geometry.viewport):(l.setCenter(t.geometry.location),l.setZoom(17)),a.setPosition(t.geometry.location),a.setVisible(!0)),c(t.formatted_address||t.name||""))})};if(window.google&&window.google.maps&&window.google.maps.places)s();else{const e=document.createElement("script");e.src=`https://maps.googleapis.com/maps/api/js?key=${n}&libraries=places`,e.async=!0,e.defer=!0,e.onload=s,document.head.appendChild(e)}},[n]),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"relative",children:[o.jsx("input",{ref:i,type:"text",name:y,value:f,onChange:s=>c(s.target.value),placeholder:u,className:"w-full bg-white/5 border border-white/10 rounded-lg px-4 py-2 text-white focus:outline-none focus:border-blue-500 pr-10"}),o.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none",children:"ð"})]}),o.jsx("div",{ref:p,className:"w-full h-48 rounded-xl border border-white/10 overflow-hidden shadow-inner bg-white/5"})]})}export{x as L};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.