1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[85],{30085:(e,t,l)=>{l.r(t),l.d(t,{default:()=>u});var n=l(95155),a=l(12115),s=l(44897),o=l(20063),i=l(77629);let r={width:"100%",height:"100%"},c={lat:28.6139,lng:77.209},u=e=>{let{selectedPin:t,listings:l}=e,{brandSlug:u}=(0,o.useParams)(),d=(0,o.useRouter)(),[g,m]=(0,a.useState)({}),[p,h]=(0,a.useState)({}),f=(0,a.useRef)(null),w=(0,a.useRef)(null),x=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return(()=>{let e=window.location.hostname;return"clients.staystack.encrobytes.com"===e||"staging.clients.staystack.encrobytes.com"===e||"localhost"===e})()?"/".concat(u).concat(e):e||"/"},{isLoaded:v}=(0,s.RH)({googleMapsApiKey:"AIzaSyBTjE9Vcira07CaffplqqwGS1AbqTib0Cw"}),[b,_]=a.useState(null);if((0,a.useEffect)(()=>{var e,l;let n={average_per_night_rate:1/0};(null==t||null==(e=t.rate_plans)?void 0:e.length)>0&&(null==t||null==(l=t.rate_plans)||l.forEach(e=>n=e.average_per_night_rate<n.average_per_night_rate?e:n),m(n))},[t]),(0,a.useEffect)(()=>{(null==g?void 0:g.pricing_type_variant_id)&&h((0,i.PI)(g,2,1))},[g]),(0,a.useEffect)(()=>{t&&f.current&&(_(t._id),setTimeout(()=>{let e=f.current,l=e.getBounds();
1if(l){let n=l.getNorthEast(),a=l.getSouthWest();n.lat(),a.lat(),e.panTo({lat:Number(t.latitude),lng:Number(t.longitude)})}},150))},[t]),!v)return(0,n.jsx)("div",{className:"w-full h-96 lg:h-screen lg:sticky lg:top-0 bg-gray-100 flex items-center justify-center",children:"Loading map..."});let y=t||l.find(e=>e._id===b);return(0,n.jsx)("div",{className:"w-full h-full md:h-96 lg:h-screen lg:sticky lg:top-0",children:(0,n.jsxs)(s.u6,{mapContainerStyle:r,center:c,zoom:10,onLoad:e=>{f.current=e},options:{streetViewControl:!1,mapTypeControl:!1,fullscreenControl:!1,styles:[{featureType:"poi",elementType:"labels",stylers:[{visibility:"off"}]}]},children:[l.map(e=>(0,n.jsx)(s.pH,{position:{lat:Number(e.latitude),lng:Number(e.longitude)},onClick:()=>(e=>{_(e),setTimeout(()=>{if(f.current){let t=l.find(t=>t._id===e);if(t){let e=f.current,l=e.getBounds(),n=l.getNorthEast(),a=l.getSouthWest();n.lat(),a.lat(),n.lng(),a.lng(),e.panTo({lat:Number(t.latitude),lng:Number(t.longitude)})}}},100)})(e._id),icon:{url:"data:image/svg+xml;charset=UTF-8,".concat(encodeURIComponent('<svg viewBox="0 0 24 38" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 0C5.373 0 0 5.373 0 12c0 11.5 12 26 12 26s12-14.5 12-26c0-6.627-5.373-12-12-12z" fill="#57d800ff"/>\n <circle cx="12" cy="10" r="5" fill="#FFFFFF"/>\n </svg>')),scaledSize:new window.google.maps.Size(32,40),anchor:new window.google.maps.Point(16,40)}},e._id)),(null==y?void 0:y.latitude)&&(null==y?void 0:y.longitude)&&(0,n.jsx)(s.Fu,{position:{lat:parseFloat(y.latitude),lng:parseFloat(y.longitude)},onCloseClick:()=>{_(null)},options:{pixelOffset:new window.google.maps.Size(0,-40),disableAutoPan:!0},children:(0,n.jsxs)("div",{ref:w,onClick:()=>{let e=null==y?void 0:y.property_url,t=x("/hotels/".concat(e));d.push(t)},className:"bg-white rounded-lg shadow-md overflow-hidden max-w-xs border border-gray-100 cursor-pointer hover:shadow-lg transition-shadow",children:[(0,n.jsxs)("div",{className:"relative overflow-hidden",children:[(0,n.jsx)("img",{src:y.thumbnail,alt:y.name,className:"w-full h-36 object-cover"}),0==y.available_rooms_count?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"absolute bottom-1 left-1 bg-white/90 px-1.5 py-0.5 rounded text-[11px] font-medium",children:"Sold Out"})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"absolute bottom-1 left-1 bg-white/90 px-1.5 py-0.5 rounded text-[11px] font-medium",children:[y.available_rooms_count||0," rooms"]})})]}),(0,n.jsxs)("div",{className:"p-3 space-y-1.5",children:[(0,n.jsx)("h3",{className:"font-bold text-base text-gray-900 line-clamp-1",children:y.title||y.name}),(0,n.jsx)("p",{className:"text-xs text-gray-600 line-clamp-2",children:y.short_description||y.description})]})]})})]})})}}}]);
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.