1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1339],{93720:(e,t,l)=>{l.r(t),l.d(t,{default:()=>i});var r=l(95155),n=l(12115),s=l(6172);let o=[{elementType:"geometry",stylers:[{color:"#f5f6f8"}]},{elementType:"labels.icon",stylers:[{visibility:"off"}]},{elementType:"labels.text.fill",stylers:[{color:"#64748b"}]},{elementType:"labels.text.stroke",stylers:[{color:"#ffffff"},{weight:2}]},{featureType:"administrative",elementType:"geometry",stylers:[{visibility:"off"}]},{featureType:"administrative.country",elementType:"geometry.stroke",stylers:[{color:"#cbd5e1"},{weight:.6}]},{featureType:"administrative.country",elementType:"labels.text.fill",stylers:[{color:"#475569"},{weight:"bold"}]},{featureType:"administrative.land_parcel",stylers:[{visibility:"off"}]},{featureType:"administrative.neighborhood",stylers:[{visibility:"off"}]},{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"road",stylers:[{visibility:"off"}]},{featureType:"transit",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"geometry",stylers:[{color:"#ffffff"}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{color:"#94a3b8"}]}];function i(e){let{locations:t=[],orders:l=[],streamerMode:i=!1,targetLocation:a=null}=e,c=(0,n.useRef)(null),u=(0,n.useRef)(null),d=(0,n.useRef)([]),[m,p]=(0,n.useState)(!1),[f,x]=(0,n.useState)(null),[h,g]=(0,n.useState)(null),[b,y]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e="AIzaSyBokVwG-ARphvyioAYzUkjBdZT5qJYTIY0";if(window.google&&window.google.maps)return void v();let t="google-maps-js-sdk",l=document.getElementById(t);if(l){let e=setInterval(()=>{window.google&&window.google.maps&&(clearInterval(e),v())},100);return()=>clearInterval(e)}(l=document.createElement("script")).id=t,l.src="https://maps.googleapis.com/maps/api/js?".concat(e?"key=".concat(e,"&"):"","libraries=places,geometry&v=weekly"),l.async=!0,l.defer=!0,l.onload=()=>{v()},l.onerror=()=>{x("Failed to load Google Maps script. Please check your internet connection or API key.")},document.head.appendChild(l)},[]);let v=(0,n.useCallback)(()=>{var e;if(c.current&&(null==(e=window.google)?void 0:e.maps)&&!u.current)try{u.current=new window.google.maps.Map(c.current,{center:{lat:22.5,lng:78.5},zoom:3,minZoom:2,maxZoom:14,disableDefaultUI:!0,backgroundColor:"#ffffff",styles:o,gestureHandling:"greedy"}),p(!0)}catch(e){console.error("[LiveMap2D] Google Map init error:",e),x(e.message||"Error initializing Google Map")}},[]);return(0,n.useEffect)(()=>{u.current&&a&&a.lat&&a.lng&&(u.current.panTo({lat:Number(a.lat),lng:Number(a.lng)}),u.current.setZoom(6))},[a]),(0,n.useEffect)(()=>{var e;if(!m||!u.current||!(null==(e=window.google)?void 0:e.maps))return;d.current.forEach(e=>e.setMap(null)),d.current=[];let r=u.current;class n extends window.google.maps.OverlayView{onAdd(){this.element.style.position="absolute",this.element.style.transform="translate(-50%, -50%)",this.getPanes().overlayMouseTarget.appendChild(this.element)}draw(){let e=this.getProjection();if(!e)return;let t=e.fromLatLngToDivPixel(this.latLng);t&&(this.element.style.left="".concat(t.x,"px"),this.element.style.top="".concat(t.y,"px"))}onRemove(){this.element.parentNode&&this.element.parentNode.removeChild(this.element)}constructor(e,t){super(),this.latLng=e,this.element=t,this.setMap(r)}}return t.forEach(e=>{if(!e.lat||!e.lng)return;let t=document.createElement("div");t.className="group relative flex items-center justify-center cursor-pointer pointer-events-auto";let l=Math.min(Math.max(18,16+2*(e.activeUsers||1)),36);t.innerHTML='\n <span class="absolute inline-flex rounded-full bg-blue-500/30 animate-ping" style="width: '.concat(1.8*l,"px; height: ").concat(1.8*l,'px;"></span>\n <span class="absolute inline-flex rounded-full bg-blue-400/20" style="width: ').concat(1.4*l,"px; height: ").concat(1.4*l,'px;"></span>\n <div class="relative flex items-center justify-center rounded-full bg-blue-600 text-white font-bold text-[10px] shadow-lg border-2 border-white transition-transform hover:scale-125" style="width: ').concat(l,"px; height: ").concat(l,'px;">\n ').concat(i?"â¢":e.activeUsers||1,"\n </div>\n "),t.onmouseenter=()=>g(e),t.onmouseleave=()=>g(null);let r=new n(new window.google.maps.LatLng(Number(e.lat),Number(e.lng)),t);d.current.push(r)}
1),l.forEach(e=>{if(!e.lat||!e.lng)return;let t=document.createElement("div");t.className="group relative flex items-center justify-center cursor-pointer pointer-events-auto",t.innerHTML='\n <span class="absolute inline-flex h-9 w-9 rounded-full bg-purple-500/40 animate-ping"></span>\n <div class="relative flex items-center justify-center h-7 w-7 rounded-full bg-gradient-to-tr from-purple-600 to-indigo-600 text-white font-bold text-xs shadow-xl border-2 border-white transition-transform hover:scale-125">\n \uD83D\uDECDï¸\n </div>\n ',t.onmouseenter=()=>y(e),t.onmouseleave=()=>y(null);let l=new n(new window.google.maps.LatLng(Number(e.lat),Number(e.lng)),t);d.current.push(l)}),()=>{d.current.forEach(e=>e.setMap(null)),d.current=[]}},[m,t,l,i]),(0,r.jsxs)("div",{className:"w-full h-full relative overflow-hidden bg-white select-none",children:[(0,r.jsx)("div",{ref:c,className:"w-full h-full"}),f&&(0,r.jsxs)("div",{className:"absolute inset-0 flex flex-col items-center justify-center bg-zinc-50/90 backdrop-blur-sm z-30 p-6 text-center",children:[(0,r.jsx)(s.Ia7,{className:"text-4xl text-amber-500 mb-2"}),(0,r.jsx)("h4",{className:"text-sm font-semibold text-zinc-900",children:"Google Maps Error"}),(0,r.jsx)("p",{className:"text-xs text-zinc-600 max-w-sm mt-1",children:f})]}),h&&(0,r.jsxs)("div",{className:"absolute top-16 right-6 bg-zinc-900/95 backdrop-blur-md text-white p-3 rounded-2xl shadow-2xl border border-white/10 z-40 pointer-events-none transition-all animate-in fade-in slide-in-from-top-1",children:[(0,r.jsxs)("p",{className:"text-xs font-bold text-white",children:[h.city,", ",h.country]}),(0,r.jsx)("p",{className:"text-xs font-semibold text-blue-400 mt-0.5",children:i?"Visitors Active":"".concat(h.activeUsers," active visitor").concat(h.activeUsers>1?"s":"")})]}),b&&(0,r.jsxs)("div",{className:"absolute top-16 right-6 bg-zinc-900/95 backdrop-blur-md text-white p-3 rounded-2xl shadow-2xl border border-purple-500/30 z-40 pointer-events-none transition-all animate-in fade-in slide-in-from-top-1",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 text-purple-400 text-xs font-bold",children:[(0,r.jsx)(s.KQF,{}),(0,r.jsx)("span",{children:"Store Order"})]}),(0,r.jsx)("p",{className:"text-xs font-semibold text-white mt-1",children:b.city||"Store Customer"}),(0,r.jsx)("p",{className:"text-[10px] text-zinc-400 mt-0.5",children:new Date(b.createdAt).toLocaleTimeString()})]}),(0,r.jsxs)("div",{className:"absolute bottom-6 right-6 flex flex-col gap-1.5 bg-white/95 backdrop-blur-md p-1.5 rounded-2xl shadow-xl border border-zinc-200/80 z-20",children:[(0,r.jsx)("button",{type:"button",onClick:()=>{u.current&&u.current.setZoom(u.current.getZoom()+1)},title:"Zoom In",className:"p-2 rounded-xl text-zinc-700 hover:text-zinc-950 hover:bg-zinc-100 transition-colors",children:(0,r.jsx)(s.enO,{className:"text-base"})}),(0,r.jsx)("button",{type:"button",onClick:()=>{u.current&&u.current.setZoom(u.current.getZoom()-1)},title:"Zoom Out",className:"p-2 rounded-xl text-zinc-700 hover:text-zinc-950 hover:bg-zinc-100 transition-colors",children:(0,r.jsx)(s.uPM,{className:"text-base"})}),(0,r.jsx)("button",{type:"button",onClick:()=>{u.current&&(u.current.setCenter({lat:22.5,lng:78.5}),u.current.setZoom(3))},title:"Reset View",className:"p-2 rounded-xl text-zinc-700 hover:text-zinc-950 hover:bg-zinc-100 transition-colors",children:(0,r.jsx)(s.k44,{className:"text-base"})})]})]})}}}]);
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.