1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,68530,e=>{"use strict";e.i(50461);var t=e.i(91398),a=e.i(52983),r=e.i(91788),l=e.i(45148),i=e.i(63356),s=e.i(23900),n=e.i(26019),o=e.i(18552),d=e.i(83958),c=e.i(16262),u=e.i(96137),m=e.i(75427),x=e.i(17238),h=e.i(69895),p=e.i(95506),f=e.i(35919),g=e.i(47365),b=e.i(46982),v=e.i(47896),w=e.i(97487),y=e.i(74859),j=e.i(65519),N=e.i(38164),_=e.i(58292),k=e.i(30833);let F={"Marriott Bonvoy Home":"1","Cable Television":"9","Breakfast Included In Tariff":"10","WiFi Fibre Or WiFi Cable":"11","AC in living room":"12","AC in Bedrooms":"13","100 Percent Pet Friendly":"14","Ensuite Bathroom":"15","Child friendly":"16","Elderly Friendly":"17","Guests Allowed":"18","Pet Friendly":"19","Unmarried Couples Allowed":"20","LGBTQ Friendly":"21","Only Jain and Vegetarian Meals":"22","Alcohol Allowed":"23","Smoking Allowed":"24","Meals Provided At Additional Charges":"25","Elevator in Building":"26","Equipped kitchen":"27","Washing machine":"28","Hair Dryer":"29",Genset:"30","Parking Available":"31","Corporate Guests Only":"32","Family ONLY":"33","Women ONLY":"34","Accommodation For Driver":"35","Swimming Pool":"36","Towels and Toiletries":"37",Toiletries:"38","Meals Included In Tariff":"39",Shoots:"40","Self Catered":"41",Inverter:"42","Meals Not Provided":"43","Proposal or Anniversary or Babymoon":"44","Pre Wedding Shoots":"45","Small Functions and Weddings":"46","Big Weddings":"47","Anniversary Celebrations":"48","Milestone Birthdays":"49","Team Offsites":"50","Strategic Meetings and Gatherings":"51","Safe Deposit Box":"52","Fire Extinguisher":"53","Heater in Bedrooms":"54","WiFi Dongle":"55","Massage At Additional Charges":"58","TV in Living Room":"59","TV in Bedrooms":"60","Heater in Living Room":"61","TV in Games Room":"62","Games Room":"63",CCTV:"64","Vegetarian and Non Vegetarian Meals":"65","Jain and Vegetarian and Non Vegetarian Meals":"66",Fireplace:"67",Jacuzzi:"74","Heated Jacuzzi":"75","Ensuite Bathroom in Some Rooms":"76","Caretaker Available on Demand":"77","Caretaker Always On Site":"78","Library or Books":"79","Accommodation for Maid":"80","Smart TV":"81","WiFi Available Across the Estate":"82","WiFi Available in Limited Spaces":"83","FnB Outlets Available Nearby":"84",Lawns:"85","WiFi Available Throughout The Home":"86",Kettle:"87",Refrigerator:"88",Microwave:"89","Wheelchair Accessible":"90","Pool Table":"92","Wheelchair friendly villa":"93","Gourmet Dining":"96","Luxury Apartment":"97"};function C(e){return Object.entries(F).filter(t=>{let[,a]=t;return e.includes(a)}).map(e=>{let[t]=e;return t})}var S=e.i(98093),E=e.i(92078),M=e.i(66471),T=e.i(19713),$=e.i(3484);let L=new Intl.NumberFormat("en-IN",{style:"currency",currency:"INR",maximumFractionDigits:0}),P=new Intl.NumberFormat("en-IN",{maximumFractionDigits:0}),R=e=>{let a,{review:r,fullReviewHref:l}=e,i=Number.isFinite(a=Number.parseFloat(r.rating))?Math.min(5,Math.max(0,Math.round(a))):0;return(0,t.jsx)("div",{className:"absolute inset-x-0 bottom-0 z-2 pointer-events-none",children:(0,t.jsxs)("div",{className:"bg-linear-to-t from-black/100 via-black/70 via-60% to-transparent px-3.5 pb-2.5 pt-12 max-md:px-3 max-md:pb-2 max-md:pt-10",children:[(0,t.jsxs)("p",{className:"pointer-events-auto font-avenir text-[11px] leading-[1.4] text-white/90 max-md:text-[10px] line-clamp-2 wrap-anywhere drop-shadow-[0_1px_2px_rgba(0,0,0,0.3)]",children:["â",r.review?.replaceAll("?",""),"â"," ",(0,t.jsx)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-white/60 hover:text-white transition-colors whitespace-nowrap",onClick:e=>e.stopPropagation(),children:"more âº"})]}),(0,t.jsxs)("div",{className:"mt-1 flex items-center gap-1.5 text-[10px] text-white/60 max-md:text-[9px]",children:[(0,t.jsx)("span",{className:"truncate max-w-[120px]",children:r.name}),(0,t.jsx)("span",{className:"shrink-0 flex gap-px leading-none",title:`${r.rating} / 5`,children:Array.from({length:5},(e,a)=>(0,t.jsx)("span",{className:a<i?"text-amber-400/80":"text-white/20",children:"â
"},a))})]})]})})},A=e=>{let{images:a,isWishList:l,location:i,onWishList:s,title:o,isMintFresh:d,isProudlyVeg:c,topReviews:u,fullReviewHref:m}=e,[x,p]=(0,r.useState)(0),g=(0,r.useRef)(null),b=(0,r.useRef)({start:0,end:0,isDragging:!1,startTime:0}),v=!!m&&(1===x&&!!u?.[0]||2===x&&!!u?.[1]),w=()=>{p(0===x?a.length-1:x-1)},_=()=>{p(x===a.length-1?0:x+1)},k=()=>{g.current&&(g.current.style.transition="transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94)",g.current.style.transform=`translateX(-${100*x}%)`)};return(0,t.jsxs)("div",{className:"image-slider-root relative h-[306px] overflow-hidden w-fit max-w-[544px] group max-md:w-full rounded-[10px] max-md:h-[215px] max-md:max-w-full",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),w()},className:"absolute top-1/2 w-[30px] h-[30px] flex items-center justify-center left-4 transform -translate-y-1/2 text-black p-2 rounded-full z-4 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-[#ffffffc5]",children:"â®"}),(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),_()},className:"absolute top-1/2 right-4 w-[30px] h-[30px] flex items-center justify-center transform -translate-y-1/2 text-black p-2 rounded-full z-4 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity duration-300 bg-[#ffffffc5] ",children:"â¯"}),(0,t.jsx)("div",{className:"relative w-full h-full",onTouchStart:e=>{let t=b.current;t.start=e.targetTouches[0].clientX,t.end=0,t.startTime=Date.now(),t.isDragging=!0},onTouchMove:e=>{var t;let r=b.current;if(!r.isDragging)return;let l=e.targetTouches[0].clientX;r.end=l;let i=l-r.start;Math.abs(i)>10&&e.preventDefault();let s=0===x&&i>0,n=x===a.length-1&&i<0;(s||n)&&(i*=.3),t=i,g.current&&(g.current.style.transition="none",g.current.style.transform=`translateX(calc(-${100*x}% + ${t}px))`)},onTouchEnd:()=>{let e=b.current;if(e.isDragging=!1,!e.start||!e.end)return void k();let t=e.start-e.end,r=Math.abs(t)/(Date.now()-e.startTime);(Math.abs(t)>50||r>.3)&&(t>0&&x<a.length-1?_():t<0&&x>0&&w()),k(),e.start=0,e.end=0},style:{touchAction:"pan-y"},children:(0,t.jsx)("div",{ref:g,className:"flex w-full h-full",style:{transform:`translateX(-${100*x}%)`,transition:"transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94)",willChange:"transform"},children:a.map((e,r)=>{let l=1>=Math.abs(r-x)||0===x&&r===a.length-1||x===a.length-1&&0===r;return(0,t.jsx)("div",{className:"relative w-full h-full flex-shrink-0",style:{minWidth:"100%"},children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(N.default,{width:400,height:400,className:"w-full h-full bg-cover bg-center object-cover",smallSrc:e.small,fullSrc:e.full,fallBackSrc:e.fallback,alt:`${o}, villas in ${i} - Image ${r+1}`}),m&&u?.[0]&&1===r&&(0,t.jsx)(R,{review:u[0],fullReviewHref:m}),m&&u?.[1]&&2===r&&(0,t.jsx)(R,{review:u[1],fullReviewHref:m})]}):(0,t.jsx)("div",{className:"w-full h-full bg-gray-100"})},r)})})}),(0,t.jsx)("button",{type:"button",onClick:s,"aria-label":"Save to wishlist","aria-pressed":l,className:"z-1 absolute top-3 right-3 cursor-pointer",children:(0,t.jsx)(n.default,{width:25,height:25,src:l?f.default:h.default,alt:""})}),(0,t.jsxs)("div",{className:"absolute top-3 left-2 flex items-center gap-2",children:[d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($.Tooltip,{anchorSelect:".mint-fresh-badge",className:"mint-fresh-tooltip",children:"New/Renovated"}),(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 rounded-full bg-white/90 py-1 px-2 mint-fresh-badge",children:[(0,t.jsx)(n.default,{src:y.default,width:18,height:18,alt:"mint fresh",priority:!0}),(0,t.jsx)("span",{className:"font-avenir text-charcoal text-[12px] font-semibold leading-[170%] pr-1",children:"Mint Fresh"})]})]}),c&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-1 rounded-full bg-white/90 py-1 px-2",children:[(0,t.jsx)(n.default,{src:j.default,width:16,height:16,alt:"100% Veg Kitchen",priority:!0}),(0,t.jsx)("span",{className:"font-avenir text-[#15803d] text-[12px] font-semibold leading-[170%] pr-1",children:"100% Veg Kitchen"})]})]}),!v&&(0,t.jsx)("div",{className:"absolute bottom-4 left-1/2 flex -translate-x-1/2 transform space-x-2",children:a.map((e,a)=>(0,t.jsx)("button",{type:"button",onClick:()=>{p(a)},className:`h-2 w-2 rounded-full ${a===x?"bg-white":"bg-gray-500"}`},a))})]})};function I(){return(0,t.jsx)("div",{className:"w-full rounded-md border border-gray-200 shadow-sm p-4 mx-auto",children:(0,t.jsxs)("div",{className:"animate-pulse flex gap-5",children:[(0,t.jsx)("div",{className:"flex-[0.5] h-48 bg-gray-200 rounded-md mb-4"}),(0,t.jsxs)("div",{className:"flex flex-col flex-[0.5]",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-3/4 mb-2"}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-1/2 mb-4"}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-1/3 mb-2"}),(0,t.jsxs)("div",{className:"flex gap-2 mt-4",children:[(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-16"}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-16"}),(0,t.jsx)("div",{className:"h-4 bg-gray-200 rounded w-16"})]})]})]})})}let z=()=>(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("div",{className:"w-full mx-auto my-0 container",children:(0,t.jsx)("div",{className:"flex flex-col gap-5",children:[...Array(10)].map((e,a)=>(0,t.jsx)(I,{},a))})})});var D=e.i(30559);let B={src:e.i(57839).default,width:16,height:16,blurWidth:0,blurHeight:0},V={src:e.i(18205).default,width:16,height:16,blurWidth:0,blurHeight:0},H="https://ik.imagekit.io/5tgxhsqev/saffronstays-media",W="u">typeof navigator&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1),O="u">typeof navigator&&navigator.maxTouchPoints>0,G=O?1:2,q=e=>{let{posts:a,initialIndex:l,onClose:i}=e,[s,n]=(0,r.useState)(l),[o,d]=(0,r.useState)(W||O),c=(0,r.useRef)(null),u=(0,r.useRef)([]),m=(0,r.useRef)(0),x=(0,r.useRef)(new Set([l]));(0,r.useEffect)(()=>{x.current.add(s)},[s]),(0,r.useEffect)(()=>(document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}),[]),(0,r.useEffect)(()=>{let e=u.current[l];e&&e.scrollIntoView({behavior:"instant",block:"start"})},[l]);let h=(0,r.useCallback)(()=>{cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>
1{let e=c.current;e&&n(Math.min(Math.round(e.scrollTop/e.clientHeight),a.length-1))})},[a.length]);return(0,r.useEffect)(()=>()=>cancelAnimationFrame(m.current),[]),(0,r.useEffect)(()=>{let e=e=>{if("Escape"===e.key&&i(),"ArrowDown"===e.key||"ArrowRight"===e.key){let e=Math.min(s+1,a.length-1);u.current[e]?.scrollIntoView({behavior:"smooth",block:"start"})}if("ArrowUp"===e.key||"ArrowLeft"===e.key){let e=Math.max(s-1,0);u.current[e]?.scrollIntoView({behavior:"smooth",block:"start"})}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[s,a.length,i]),(0,t.jsxs)("div",{className:"fixed inset-0 z-9999 bg-black",children:[(0,t.jsxs)("div",{className:"absolute top-0 left-0 right-0 z-50 flex items-center justify-between px-4 pt-safe-top pt-4",children:[(0,t.jsx)("button",{onClick:i,className:"w-10 h-10 rounded-full bg-black/50 active:bg-white/20 flex items-center justify-center cursor-pointer","aria-label":"Close",children:(0,t.jsxs)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,t.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}),(0,t.jsxs)("span",{className:"text-white/60 text-[13px] font-avenir font-medium",children:[s+1," / ",a.length]}),(0,t.jsx)("div",{className:"w-10 h-10"})]}),(0,t.jsx)("div",{ref:c,onScroll:h,className:"w-full h-full overflow-y-scroll snap-y snap-mandatory",style:{WebkitOverflowScrolling:"touch"},children:a.map((e,a)=>{var r;let l=(r=x.current,a===s?"active":a>s&&a<=s+G||a===s-1?"buffer":r.has(a)?"idle":"none");return(0,t.jsx)("div",{ref:e=>{u.current[a]=e},className:"w-full h-dvh snap-start snap-always flex items-center justify-center",children:"none"!==l?(0,t.jsx)(U,{post:e,tier:l,muted:o,onToggleMute:()=>d(e=>!e)}):(0,t.jsx)("div",{className:"relative w-full h-dvh bg-black"})},e.id)})}),(0,t.jsxs)("div",{className:"hidden md:flex absolute right-6 top-1/2 -translate-y-1/2 z-50 flex-col gap-2",children:[(0,t.jsx)("button",{onClick:()=>{let e=Math.max(s-1,0);u.current[e]?.scrollIntoView({behavior:"smooth",block:"start"})},disabled:0===s,className:"w-9 h-9 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors disabled:opacity-30 cursor-pointer",children:(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("polyline",{points:"18 15 12 9 6 15"})})}),(0,t.jsx)("button",{onClick:()=>{let e=Math.min(s+1,a.length-1);u.current[e]?.scrollIntoView({behavior:"smooth",block:"start"})},disabled:s===a.length-1,className:"w-9 h-9 rounded-full bg-white/10 hover:bg-white/20 flex items-center justify-center transition-colors disabled:opacity-30 cursor-pointer",children:(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("polyline",{points:"6 9 12 15 18 9"})})})]})]})},U=(0,r.memo)(function(e){let{post:a,tier:l,muted:i,onToggleMute:s}=e,o=(0,r.useRef)(null),[d,c]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),[x,h]=(0,r.useState)(!1),p=(0,r.useRef)(l);p.current=l;let f=(0,r.useRef)(null),g="active"===l,b="active"===l||"buffer"===l,v=`${H}/${a.video_url}/ik-video.mp4?tr=${W?"q-40":"q-50"}`,w=`${H}/${a.video_url}/ik-thumbnail.jpg?tr=q-40,w-480`,y=`${H}/${a.user_link}?tr=q-50,w-48,h-48`;(0,r.useEffect)(()=>{"idle"===l&&c(!1)},[l]),(0,r.useEffect)(()=>{let e=o.current;if(e){if(e.src&&e.src.includes(a.video_url)||(e.src=v,e.load()),"active"===l&&!u){let t=setTimeout(()=>{"active"===p.current&&e.play().catch(()=>{let t=()=>{e.removeEventListener("canplay",t),f.current=null,"active"===p.current&&e.play().catch(()=>{})};f.current?.(),e.addEventListener("canplay",t),f.current=()=>e.removeEventListener("canplay",t)})},120);return()=>{clearTimeout(t),f.current?.(),f.current=null}}"buffer"===l&&(e.pause(),e.preload="auto",W&&e.load())}},[l,u,v,a.video_url]),(0,r.useEffect)(()=>{let e=o.current;e&&(e.muted=i)},[i]);let j=(0,r.useCallback)(()=>{let e=o.current;e&&(e.paused?(e.play().catch(()=>{}),m(!1)):(e.pause(),m(!0)))},[]),N=a.text?.split("\n")[0]?.slice(0,90)||"",_=`/view/${a._listingId}`;return(0,t.jsxs)("div",{className:"relative w-full h-dvh md:w-auto md:h-[92vh] md:max-w-[600px] md:rounded-2xl overflow-hidden bg-black md:mx-auto",children:[(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),s()},className:"absolute top-4 right-4 z-20 w-9 h-9 rounded-full bg-black/50 active:bg-black/70 flex items-center justify-center cursor-pointer","aria-label":i?"Unmute video":"Mute video",children:i?(0,t.jsx)(n.default,{src:B,alt:"",width:16,height:16}):(0,t.jsx)(n.default,{src:V,alt:"",width:16,height:16})}),(!d||!b)&&(0,t.jsxs)("div",{className:"absolute inset-0 z-1",children:[(0,t.jsx)("img",{src:w,alt:a.user_name,className:"w-full h-full object-cover",loading:"eager"}),g&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30",children:(0,t.jsx)("div",{className:"w-10 h-10 border-2 border-white/30 border-t-white rounded-full animate-spin"})})]}),b&&(0,t.jsx)("video",{ref:o,className:`w-full h-full object-cover ${d?"opacity-100":"opacity-0"}`,style:{willChange:"opacity",transition:"opacity 0.2s"}
1,muted:i,loop:!0,playsInline:!0,preload:"auto",poster:w,onClick:j,onLoadedData:()=>c(!0)}),u&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center z-10 pointer-events-none",children:(0,t.jsx)("div",{className:"w-16 h-16 rounded-full bg-black/50 flex items-center justify-center",children:(0,t.jsx)("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"white",children:(0,t.jsx)("polygon",{points:"6,3 21,12 6,21"})})})}),(0,t.jsx)("div",{className:"absolute inset-0 bg-linear-to-t from-black/75 via-transparent to-black/30 pointer-events-none z-2"}),(0,t.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 z-10 px-4 pt-4 pb-safe-bottom pb-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,t.jsx)("img",{width:36,height:36,alt:a.user_name,className:"rounded-full object-cover w-9 h-9 border-2 border-white/30 shrink-0",src:y}),(0,t.jsxs)("div",{className:"flex flex-col min-w-0",children:[(0,t.jsx)("span",{className:"text-[14px] font-semibold text-white drop-shadow-md truncate",children:a.full_name||a.user_name}),(0,t.jsx)("span",{className:"text-[11px] text-white/70",children:(e=>{if(!e)return"";let t=Math.ceil(Math.abs(new Date().getTime()-new Date(e).getTime())/864e5);return 0===t?"today":1===t?"yesterday":t<7?`${t}d ago`:t<30?`${Math.floor(t/7)}w ago`:t<365?`${Math.floor(t/30)}mo ago`:`${Math.floor(t/365)}y ago`})(a.date_posted)})]})]}),a.text&&(0,t.jsx)("div",{className:"mb-3",children:x?(0,t.jsxs)("p",{className:"text-[13px] text-white/90 leading-relaxed max-h-[28vh] overflow-y-auto whitespace-pre-wrap pr-1",children:[a.text,(0,t.jsxs)("button",{onClick:e=>{e.stopPropagation(),h(!1)},className:"text-white/50 ml-1 active:text-white",children:[" ","less"]})]}):(0,t.jsxs)("p",{className:"text-[13px] text-white/90 leading-snug",children:[N,a.text.length>90&&(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),h(!0)},className:"text-white/50 ml-1 active:text-white",children:"...more"})]})}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("a",{href:a.link,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-full bg-white/15 border border-white/20 text-white text-[12px] font-semibold active:bg-white/25",children:[(0,t.jsx)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"white",children:(0,t.jsx)("path",{d:"M12 2.163c3.204 0 3.584.012 4.85.07 3.252.148 4.771 1.691 4.919 4.919.058 1.265.069 1.645.069 4.849 0 3.205-.012 3.584-.069 4.849-.149 3.225-1.664 4.771-4.919 4.919-1.266.058-1.644.07-4.85.07-3.204 0-3.584-.012-4.849-.07-3.26-.149-4.771-1.699-4.919-4.92-.058-1.265-.07-1.644-.07-4.849 0-3.204.013-3.583.07-4.849.149-3.227 1.664-4.771 4.919-4.919 1.266-.057 1.645-.069 4.849-.069zm0-2.163c-3.259 0-3.667.014-4.947.072-4.358.2-6.78 2.618-6.98 6.98-.059 1.281-.073 1.689-.073 4.948 0 3.259.014 3.668.072 4.948.2 4.358 2.618 6.78 6.98 6.98 1.281.058 1.689.072 4.948.072 3.259 0 3.668-.014 4.948-.072 4.354-.2 6.782-2.618 6.979-6.98.059-1.28.073-1.689.073-4.948 0-3.259-.014-3.667-.072-4.947-.196-4.354-2.617-6.78-6.979-6.98-1.281-.059-1.69-.073-4.949-.073z"})}),"Instagram"]}),(0,t.jsxs)("a",{href:_,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"flex items-center gap-1.5 px-3.5 py-2 rounded-full bg-white text-charcoal text-[12px] font-bold active:bg-white/90",children:[(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#373636",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("path",{d:"M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2z"}),(0,t.jsx)("polyline",{points:"9 22 9 12 15 12 15 22"})]}),"View Listing"]})]})]})]})}),K={src:e.i(44547).default,width:16,height:16,blurWidth:0,blurHeight:0},Y={src:e.i(62957).default,width:14,height:14,blurWidth:0,blurHeight:0},X={src:e.i(5195).default,width:430,height:35,blurWidth:0,blurHeight:0},J="https://ik.imagekit.io/5tgxhsqev/saffronstays-media",Z=()=>{let{params:e}=(0,r.useContext)(_.SearchContext),[a,l]=(0,r.useState)([]),[i,s]=(0,r.useState)(!0),[o,d]=(0,r.useState)(null),c=(0,r.useRef)(null),u=(0,r.useCallback)(async()=>
1{if(e.location)try{let t=await D.default.get(`https://go.saffronstays.com/api/embed-social/location?location=${encodeURIComponent(e.location)}`);if(t.data?.data){let e=t.data.data.flatMap(e=>e.posts.map(t=>({...t,_listingId:e.listing_id})));l(e)}}catch(e){console.error("Failed to fetch search reels",e)}finally{s(!1)}},[e.location]);return((0,r.useEffect)(()=>{u()},[u]),i||0===a.length)?null:(0,t.jsxs)("div",{className:"search-reels-section w-full overflow-hidden rounded-3xl bg-[#FDF8E7] py-7 max-md:mx-[calc(50%-50vw)] max-md:w-screen max-md:max-w-[100vw] max-md:rounded-none md:mx-0 md:w-full md:max-w-none sm:px-7 sm:py-8 md:px-8 md:py-10 mb-8",children:[(0,t.jsxs)("div",{className:"relative mb-6 flex flex-col gap-3 md:mb-8",children:[(0,t.jsx)("div",{className:"flex w-full items-start justify-between gap-4 px-5 md:px-0",children:(0,t.jsx)("h2",{className:"font-butler min-w-0 text-[18px] leading-[1.1] tracking-[2px] text-charcoal sm:text-[32px] md:text-[26px]",children:"Real Stays, Reel Moments"})}),(0,t.jsx)("div",{className:"flex items-center absolute top-3 md:-top-5 w-full",children:(0,t.jsx)(n.default,{src:X,alt:"",width:82,height:35,className:"w-full"})})]}),(0,t.jsx)("div",{ref:c,className:"reel-scroll-container -mx-1 flex gap-3 overflow-x-auto scroll-smooth px-1 pb-2 pt-5 max-md:pl-4 max-md:pr-4 sm:gap-4",children:a.map((e,a)=>(0,t.jsx)(Q,{post:e,onClick:()=>d(a)},e.id))}),null!==o&&(0,t.jsx)(q,{posts:a,initialIndex:o,onClose:()=>d(null)})]})},Q=(0,r.memo)(function(e){let{post:a,onClick:l}=e,i=(0,r.useRef)(null),[s,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1),u=(0,r.useRef)(void 0),m=`${J}/${a.video_url}/ik-thumbnail.jpg?tr=q-50,w-400`,x=`${J}/${a.video_url}?tr=q-50,w-400`,h=`${J}/${a.user_link}?tr=q-60,w-50,h-50`,p=(0,r.useCallback)(()=>{u.current=setTimeout(()=>o(!0),400)},[]),f=(0,r.useCallback)(()=>{clearTimeout(u.current),o(!1);let e=i.current;e&&(e.pause(),e.currentTime=0)},[]);return(0,r.useEffect)(()=>{let e=i.current;e&&s&&d&&e.play().catch(()=>{})},[s,d]),(0,r.useEffect)(()=>()=>clearTimeout(u.current),[]),(0,t.jsxs)("div",{onClick:l,onPointerEnter:p,onPointerLeave:f,className:"reel-thumb group relative shrink-0 cursor-pointer overflow-hidden rounded-2xl bg-neutral-900 w-45 h-60 sm:w-50 sm:h-67 md:w-55 md:h-74",style:{contentVisibility:"auto",containIntrinsicSize:"180px 240px"},children:[(0,t.jsx)(n.default,{src:m,alt:a.user_name,fill:!0,className:"object-cover",sizes:"(max-width: 640px) 180px, (max-width: 768px) 200px, 220px"}),s&&(0,t.jsx)("video",{ref:i,className:`absolute inset-0 h-full w-full object-cover transition-opacity duration-300 ${d?"opacity-100":"opacity-0"}`,muted:!0,loop:!0,playsInline:!0,preload:"auto",poster:m,onLoadedData:()=>c(!0),children:(0,t.jsx)("source",{src:x,type:"video/mp4"})}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 bg-linear-to-t from-black/70 via-black/20 via-40% to-transparent"}),(0,t.jsx)("div",{className:"absolute right-2.5 top-2.5 z-10 flex h-7 w-7 items-center justify-center rounded-full bg-black/30",children:(0,t.jsx)(n.default,{src:Y,alt:"Instagram",width:16,height:16})}),(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,t.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-full bg-white/80 shadow-lg transition-transform duration-200 group-hover:scale-110 sm:h-13 sm:w-13",children:(0,t.jsx)(n.default,{src:K,alt:"Play",width:20,height:20})})}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 right-0 z-10 flex items-center gap-2.5 px-3 pb-3 pt-6",children:(0,t.jsxs)("div",{className:"flex items-center gap-2.5 min-w-0",children:[(0,t.jsx)("div",{className:"shrink-0 h-6 w-6 overflow-hidden rounded-full bg-[#FBA919] ring-1 ring-[#FBA919] ring-offset-1 ring-offset-black/20",children:(0,t.jsx)(n.default,{width:36,height:36,alt:a.user_name,className:"h-full w-full object-cover",src:h,loading:"lazy"})}),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:"truncate text-[12px] font-semibold leading-tight text-white drop-shadow-sm",children:a.full_name||a.user_name}),(0,t.jsx)("span",{className:"text-[10px] leading-tight text-white/60",children:(e=>{if(!e)return"";let t=Math.ceil(Math.abs(new Date().getTime()-new Date(e).getTime())/864e5);return 0===t?"today":1===t?"yesterday":t<7?`${t}d ago`:t<30?`${Math.floor(t/7)}w ago`:t<365?`${Math.floor(t/30)}mo ago`:`${Math.floor(t/365)}y ago`})(a.date_posted)})]})]})})]})});var ee=e.i(79247),et=e.i(3828),ea=e.i(35439),er=e.i(38266),el=e.i(14168);let ei=(0,r.memo)(e=>{let h,{showTax:f,params:y}=(0,r.useContext)(_.SearchContext),j=Object.values(e?.images||{}).map(t=>({fallback:(0,a.ImageParser)(`listing/${e?.id}/${t}`,"w=800&h=500&q=60&f=auto"),small:(0,a.ImageParser)(t,"w-400,h-400,q-auto:low,f-auto"),full:(0,a.ImageParser)(t,"w-800,h-500,q-90,f-auto")})).splice(0,6),[N,F]=(0,r.useState)(null),R=N??!!e?.is_wishlist,{openSaveSheet:I}=(0,S.useSaveToWishlist)();if(0===Object.keys(e).length)return null;let z=(0,d.listingHref)(e.seo_url,e?.id,{adults:y.guests,children:Number(y.children)>0?y.children:void 0,infants:(0,c.clampInfants)(y.infants)||void 0,pets:y.pets,rooms:y.rooms,checkin:y.
1checkin,checkout:y.checkout,...y.pets&&Number(y.pets)>0?{more:"29"}:{}}),D=`${z}#listing-review`;return(0,t.jsxs)("div",{className:"search-card flex flex-row gap-6 cursor-pointer pb-5 w-full max-md:flex-col max-md:gap-4",onClick:()=>{window.open(z,"_blank")},children:[(0,t.jsx)(A,{images:j,reviews:e?.total_reviews,isWishList:R,onWishList:t=>{t.stopPropagation(),I(e.id,{knownLists:e.wishlists??void 0,onSaved:t=>{F(t);let r=localStorage.getItem("token");t?(0,k.trackEvent)("hotel wishlisted",{url:`https://www.saffronstays.com/view/${e.id}`,image:`https://ik.imagekit.io/5tgxhsqev/saffronstays-media/image/upload/${e.images[0]}`,location:e.location,"hotel id":e.id,"hotel type":e.type_flag,"hotel name":e.title,"price per night":Number(e.price_per_night.toFixed(0)),rating:Number(e.rating.toFixed(2)),reviews:e.total_reviews,"check-in date":y.checkin?new Date(`${y.checkin||""}T13:00:00+05:30`):null,"check-out date":y.checkout?new Date(`${y.checkout||""}T10:00:00+05:30`):null,amenities:C(e.amens),"ticker tape":e.red_tape||null,"tax and fees":Number((e?.total_amount_with_tax-e?.service_charge).toFixed(0))||null,"total payable without discount":Number((e?.total_amount_with_tax).toFixed(0))||null,"wishlist type":"Search Page","user type":r?"LoggedIn":"guest"}):(0,k.trackEvent)("hotel remove from wishlist",{url:`https://www.saffronstays.com/view/${e.id}`,image:(0,a.ImageParser)(e.images[0]),location:e.location,"ticker tape":e.red_tape||null,"hotel type":e.type_flag,"hotel id":e.id,"hotel name":e.title,"price per night":Number(e.price_per_night.toFixed(0)),rating:Number(e.rating.toFixed(2)),reviews:e.total_reviews,"check-in date":y.checkin?new Date(`${y.checkin||""}T13:00:00+05:30`):null,"check-out date":y.checkout?new Date(`${y.checkout||""}T10:00:00+05:30`):null,amenities:C(e.amens),"wishlist type":"Search Page","user type":r?"LoggedIn":"guest"})}})},overAllRatings:e?.total_ratings,title:e?.title,location:e?.location,isMintFresh:e?.mint_fresh==="Y",isProudlyVeg:e?.amens?.includes("22"),topReviews:e?.top_reviews,fullReviewHref:D}),(0,t.jsx)("div",{className:"w-full flex items-start justify-between",children:(0,t.jsxs)("a",{onClick:e=>{e.stopPropagation(),(0,E.eventClarity)("Villa Card Clicked",{"Page URL":window.location.href})},className:"w-full flex flex-col justify-center font-avenir gap-2 max-md:gap-2",href:z,target:"_blank",children:[(0,t.jsxs)("div",{className:"w-full flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex gap-2 items-center",children:[e.suited_for?(0,t.jsxs)("div",{className:"flex gap-2 align-middle items-center rounded-[100px] bg-[#373636] p-1 text-[var(--Alabaster,#FDF8E7)] font-avenir text-[10px] not-italic font-[600] leading-[170%] tracking-[0.5px] uppercase",children:[(0,t.jsx)(n.default,{width:20,height:20,src:T.default,alt:"",className:"object-contain shrink-0"})," ",(0,t.jsx)($.Tooltip,{anchorSelect:".celebrations",children:"Made for Occasions"}),(0,t.jsx)("span",{className:"block pr-2 mt-[2px] celebrations",children:"Celebrations"})]}):(0,t.jsxs)("div",{className:"flex gap-2 align-middle items-center rounded-[100px] bg-[#373636] p-1 text-[var(--Alabaster,#FDF8E7)] font-avenir text-[10px] not-italic font-[600] leading-[170%] tracking-[0.5px] uppercase",children:[(0,t.jsx)(n.default,{width:20,height:20,src:M.default,alt:"",className:"object-contain shrink-0"})," ",(0,t.jsx)($.Tooltip,{anchorSelect:".escapes",children:"For Families and Couples"}),(0,t.jsx)("span",{className:"block pr-2 mt-[2px] escapes",children:"Escapes"})]}),e?.classification===3&&(0,t.jsxs)("div",{children:[(0,t.jsx)($.Tooltip,{style:{fontSize:"12px"},anchorSelect:".x-series",children:"Uber Luxury"}),(0,t.jsx)(n.default,{className:"x-series",width:89,height:28,src:b.default,alt:"x-series"})]}),e?.classification===2&&(0,t.jsxs)("div",{className:"flex gap-2 align-middle items-center rounded-[100px] bg-[#373636] p-1 text-[var(--Alabaster,#FDF8E7)] font-avenir text-[10px] not-italic font-[600] leading-[170%] tracking-[0.5px] uppercase",children:[(0,t.jsx)($.Tooltip,{style:{fontSize:"10px"},anchorSelect:".signature",children:"Premium Luxury"}),(0,t.jsx)(n.default,{width:20,height:20,src:v.default,alt:"",className:"object-contain shrink-0"})," ",(0,t.jsx)("span",{className:"block pr-2 mt-[2px] signature",children:"Signature"})]})]}),e?.total_reviews>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"w-full flex flex-col items-end ",children:[(0,t.jsx)("p",{className:"font-avenir text-charcoal md:text-[14px] text-[10px] font-semibold",children:(h=Number((e?.total_ratings/e?.total_reviews).toFixed(2)))>=4.9?"Excellent":h>=4.5?"Very Good":"Good"}),(0,t.jsxs)("p",{className:"md:text-[12px] text-[10px] font-avenir text-[#8B94A4] font-medium leading-[16
1px]",children:[e?.total_reviews," reviews"]})]}),(0,t.jsx)("div",{className:"w-[40px] md:w-[50px] rounded-tl-[0px] rounded-tr-[9.375px] md:rounded-tr-[15px] rounded-br-[9.375px] md:rounded-br-[15px] rounded-bl-[6.25px] md:rounded-bl-[10px] bg-[#017401] px-[5px] md:px-2 py-[4px] md:py-2 flex justify-center",children:(0,t.jsxs)("p",{className:"font-bold md:text-[16px] text-[12px] text-white font-avenir leading-[22px]",children:[Number((e?.total_ratings/e?.total_reviews).toFixed(1)),(0,t.jsx)("span",{className:"font-bold md:text-[10px] text-[8px] text-white font-avenir leading-[22px]",children:"/5"})]})})]})]}),(0,t.jsxs)("p",{className:"flex items-center text-[20px] leading-[170%] tracking-[0%] max-md:text-base mb-[-4px]",children:[e?.title," ",!!e?.ta_discount&&(0,t.jsxs)("div",{className:"max-md:hidden ml-auto text-xs font-semibold text-yellow-900 bg-yellow-100 px-3 py-1 rounded-full",children:[e.ta_discount,"% Commission"]})]}),(0,t.jsx)("span",{className:"text-s leading-[170%] tracking-[0%] text-charcoal max-md:text-xs",children:e?.location}),(0,t.jsxs)("p",{className:" flex flex-wrap space-x-4",children:[(0,t.jsxs)("span",{className:"text-charcoal flex align-middle items-center gap-2 text-s whitespace-pre leading-[170%] tracking-[0%] font-thin max-md:text-xs",children:[(0,t.jsx)(n.default,{src:l.default,alt:"people",height:20,width:20})," ",e?.max_capacity<=e?.capacity*e.no_of_rooms?e?.max_capacity:`${e?.capacity*e.no_of_rooms} - ${e.max_capacity}`," ","Guests"]}),(0,t.jsxs)("span",{className:"text-charcoal flex align-middle items-center gap-2 text-s whitespace-pre leading-[170%] tracking-[0%] font-thin max-md:text-xs",children:[(0,t.jsx)(n.default,{src:i.default,alt:"people",height:20,width:20}),"MV"===e.type_flag?`${e.no_of_rooms*e.bedrooms} Bedrooms`:`${e?.no_of_rooms} Bedrooms`]}),(0,t.jsxs)("span",{className:"text-charcoal flex align-middle items-center gap-2 text-s whitespace-pre leading-[170%] tracking-[0%] font-thin max-md:text-xs",children:[(0,t.jsx)(n.default,{src:s.default,alt:"people",height:20,width:20}),"MV"===e.type_flag&&`${e.no_of_rooms} `,(0,o.getVillaType)(e?.type_flag)]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1 mt-[4px] relative",children:[(0,t.jsx)("span",{className:"font-normal text-[20px] leading-[170%] tracking-[0%]",children:y.checkin&&y.checkout?f?e?.total_amount_with_tax&&e.total_amount_with_tax>e?.price_per_night?(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e?.discount>1&&e?.total_after_discount>1&&(0,t.jsx)("span",{className:"text-[#8B94A4] text-[16px] line-through max-md:text-[14px]",children:L.format(e?.total_after_discount+e.discount)}),(0,t.jsx)("span",{children:L.format(e?.discount>1&&e?.total_after_discount>1?e?.total_after_discount:e?.total_amount_with_tax)}),e?.discount>=1e3&&(0,t.jsxs)("span",{className:"text-[#2E7D32] text-[12px] font-semibold bg-[#E8F5E9] px-2 py-0.5 rounded max-md:text-[10px]",children:["Save upto â¹",P.format(e.discount)]})]}):null:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e?.discount>1&&e?.per_night_price_after_discount>1&&(0,t.jsx)("span",{className:"text-[#8B94A4] text-[16px] line-through max-md:text-[14px]",children:L.format(e?.price_per_night)}),(0,t.jsx)("span",{children:L.format(e?.discount>1&&e?.per_night_price_after_discount>1?e?.per_night_price_after_discount:e?.price_per_night)}),(0,t.jsx)("span",{className:"font-light text-charcoal text-[14px] leading-[170%] tracking-[0%] max-md:text-xs",children:"/ night + GST"}),e?.discount>=1e3&&(0,t.jsxs)("span",{className:"text-[#2E7D32] text-[12px] font-semibold bg-[#E8F5E9] px-2 py-0.5 rounded max-md:text-[10px]",children:["Save upto â¹",P.format(e.discount)]})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{style:{color:"#373636",fontSize:"12px"},className:"text-charcoal flex align-middle gap-2 text-s whitespace-pre leading-[170%] tracking-[0%] font-thin max-md:text-xs",children:"Starting"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[e?.discount>1&&e?.per_night_price_after_discount>1&&(0,t.jsx)("span",{className:"text-[#8B94A4] text-[16px] line-through max-md:text-[14px]",children:L.format(e?.price_per_night)}),(0,t.jsx)("span",{children:L.format(e?.discount>1&&e?.per_night_price_after_discount>1?e?.per_night_price_after_discount:e?.price_per_night)}),e?.discount>=1e3&&(0,t.jsxs)("span",{className:"text-[#2E7D32] text-[12px] font-semibold bg-[#E8F5E9] px-2 py-0.5 rounded max-md:text-[10px]",children:["Save upto â¹",P.format(e.discount)]})]})]})}),!!e?.ta_discount&&(0,t.jsxs)("div",{className:" hidden max-md:flex w-fit text-xs font-semibold text-yellow-900 bg-yellow-100 px-3 py-1 rounded-full",children:[e.ta_discount,"% Commission"]})]}),(0,t.jsxs)("div",{className:"font-light text-xs leading-[170%] tracking-[0%] flex gap-2 pt-4 border-t-1 w-[100%] border-[#37363614] flex-wrap",children:[(e?.amens.includes("65")||e?.amens.includes("66"))&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:p.default,he
1ight:20,width:20,alt:"wifi logo"}),"Â Meals Available"]}),e?.amens.includes("36")&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:u.default,height:20,width:20,alt:"wifi logo"}),"Â Pool"]}),e?.suitables.includes("33")&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:g.default,height:16,width:16,alt:"wifi logo"})," ","Couple Friendly"]}),e?.amens.includes("17")&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:w.default,height:20,width:20,alt:"wifi logo"})," ","Elderly Friendly"]}),e?.amens.includes("19")&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:m.default,height:20,width:20,alt:"wifi logo"})," Pet Friendly"]}),e?.amens.includes("11")&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:x.default,height:20,width:20,alt:"wifi logo"})," Wifi"]}),e?.amens.includes("10")&&(0,t.jsxs)("span",{className:"gap-2 flex px-4 py-2 rounded-[100px] bg-[#37363614] shrink-0",children:[(0,t.jsx)(n.default,{src:p.default,height:20,width:20,alt:"wifi logo"})," ","Free Breakfast"]})]})]})})]})}),es=(0,r.memo)(function(e){let a=(0,r.useRef)(null),[l,i]=(0,r.useState)(!1);return((0,r.useEffect)(()=>{let e=a.current;if(!e)return;let t=new IntersectionObserver(e=>{let[a]=e;a.isIntersecting&&(i(!0),t.disconnect())},{rootMargin:"600px"});return t.observe(e),()=>t.disconnect()},[]),l)?(0,t.jsx)("div",{ref:a,style:{contentVisibility:"auto",containIntrinsicSize:"auto 340px"},children:(0,t.jsx)(ei,{...e})}):(0,t.jsx)("div",{ref:a,style:{minHeight:340,contentVisibility:"auto",containIntrinsicSize:"auto 340px"},className:"w-full animate-pulse rounded-[10px] bg-gray-100"})}),en=e=>parseInt("Near Me"===e.location?"500":e.distance?e.distance:"125"),eo=(0,r.memo)(e=>{let{params:a}=e,[l,i]=(0,r.useState)(!1),[s,o]=(0,r.useState)([]),d=(0,r.useRef)(new Set),[c,u]=(0,r.useState)(()=>en(a)),[m,x]=(0,r.useState)(()=>en(a)),h=(0,r.useMemo)(()=>null!==a.amenities&&("null"===a.amenities||""!==a.amenities)?a.amenities:"",[a.amenities]),p=(0,r.useMemo)(()=>null!==a.more&&("null"===a.more||""!==a.more)?a.more:"",[a.more]),f=(0,r.useMemo)(()=>{switch(a.sortby){case"Price: Low to high":return"price-low-high";case"Price: High to low":return"price-high-low";case"Popularity":return"rating-high-low";case"Newest first":return"new-to-old";default:return""}},[a.sortby]),g="true"===a.pocket,b="true"===a.same_day,v="true"===a.non_shared,w="true"===a.top_rated,y="true"===a.mint_fresh,j=a.location,N=(0,r.useCallback)(async(e,t)=>(0,D.default)({method:"POST",url:"https://ecapi4.saffronstays.com/api/search-advance",headers:{"Content-Type":"application/json",...localStorage.getItem("token")&&{Authorization:`Bearer ${localStorage.getItem("token")}`}},data:{location:"Near Me"===j?"":j?j.replaceAll("%20"," "):"",...a.checkin&&a.checkout?{from:a.checkin,to:a.checkout}:{},...localStorage?.getItem("uuid")?{uuid:localStorage.getItem("uuid")}:{},..."Near Me"===j&&localStorage.getItem("location")?{lat:JSON.parse(localStorage.getItem("location")||"")?.lat||18.9582,long:JSON.parse(localStorage.getItem("location")||"")?.lon||72.8321}:{},page:e,no_of_guest:parseInt(a?.guests||"1")||"",no_of_room:parseInt(a?.rooms||"1")||"",suitables:p?.split(",").filter(e=>""!==e)??[],amens:h?.split(",").filter(e=>""!==e)??[],sort_by:f,signature:a.signature??"",min_price:a.min?parseInt(a.min):0,max_price:a.max?parseInt(a.max):25e5,pocket:g,same_day:b,non_shared:v,new_home:!!a.new_homes,top_rated:w,lat:parseFloat(a?.lat||"")??0,long:parseFloat(a?.lon||"")??0,mint_fresh:y,distance:m,expand_radius:c},signal:t}),[j,a.checkin,a.checkout,a.guests,a.rooms,a.signature,a.min,a.max,a.new_homes,a.lat,a.lon,h,p,f,g,b,v,w,y,m,c]),_=(0,er.useInfiniteQuery)({queryKey:["expandResultsQuery",a,c],queryFn:e=>{let{pageParam:t=1,signal:a}=e;return N(t,a)},initialPageParam:1,getNextPageParam:(e,t)=>{if(e?.data?.data&&0!==e.data.data.length)return t.length+1},retry:!1,enabled:l}),{ref:k,inView:F}=(0,el.useInView)();return(0,r.useEffect)(()=>
1{if(!_?.data?.pages)return;let e=_.data.pages.flatMap(e=>e.data?.data??[]).filter(e=>!(!e?.id||d.current.has(e.id))&&(d.current.add(e.id),!0));0!==e.length&&o(t=>{let a=t.findIndex(e=>e.radius===c);if(-1!==a){let r=[...t];return r[a]={...r[a],results:[...r[a].results,...e]},r}return[...t,{radius:c,results:e}]})},[_?.data?.pages,c]),(0,r.useEffect)(()=>{F&&_.hasNextPage&&_.fetchNextPage()},[F]),(0,t.jsxs)(t.Fragment,{children:[l&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex flex-col gap-4",children:s.map(e=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 my-6",children:[(0,t.jsx)("div",{className:"flex-1 h-px bg-[#E0E0E0]"}),(0,t.jsxs)("span",{className:"text-med-grey font-avenir text-sm whitespace-nowrap",children:["Exploring within ",e.radius," km"]}),(0,t.jsx)("div",{className:"flex-1 h-px bg-[#E0E0E0]"})]}),(0,t.jsx)("div",{className:"flex flex-col gap-5 w-full",children:e.results.map(e=>(0,t.jsx)(ei,{...e},e?.id+":expand"))})]},`group-${e.radius}`))}),(0,t.jsx)("div",{ref:k,style:{height:1}})]}),(0,t.jsxs)("div",{className:"py-11 w-full flex items-center flex-col gap-[10px] bg-[#FDF8E7] rounded-[8px] mb-[80px]",children:[(0,t.jsx)(n.default,{src:ea.default,width:72,height:72,alt:"location"}),(0,t.jsx)("div",{className:"text-black font-avenir text-2xl font-medium leading-normal max-md:text-xl text-center",children:"Expand Your Search"}),(0,t.jsx)("p",{className:"text-med-grey text-center font-avenir text-[18px] font-normal leading-normal max-w-[60%] max-md:max-w-[80%] max-md:text-l",children:"You can find more villa options by expanding your search area"}),(0,t.jsx)("button",{className:"text-white font-avenir text-base leading-normal flex h-[52px] px-[79px] py-[22px] max-md:px-[40px] font-bold justify-center items-center gap-[10px] rounded-lg bg-charcoal mt-[30px] mb-[40px] disabled:opacity-50 disabled:cursor-not-allowed",onClick:()=>{i(!0),u(e=>(x(e),Math.min(e+300,2300)))},disabled:c>=2300||_.isFetching,children:c>=2300?"Maximum area reached":_.isFetching?"Loading results...":"Show More Villas"})]})]})});eo.displayName="ExploreNearby",e.s(["SearchGrid",0,e=>{let{hideStories:a=!1}=e,{searchResults:l,ref:i,params:s}=(0,r.useContext)(_.SearchContext),o=(0,r.useRef)(null),d=(0,r.useMemo)(()=>l.data?.pages.flatMap(e=>e.data?.data??[])??[],[l.data]);return((0,r.useEffect)(()=>{if(!l?.data||!et.default.isReady||!d.length)return;let{id:e}=et.default.query,t=d.slice(0,10);if(!t.length)return;let a=JSON.stringify(t.map(e=>e.title));if(o.current===a)return;let r=e&&"string"==typeof e?decodeURIComponent(e.replace("villas-in-","").replace(/-/g," ")):"";(0,k.trackEvent)("search page results",{"location name":r,"villa name":t.map(e=>e.title??""),"villa location":t.map(e=>e.location??""),"villa image":t.map(e=>e.images?.[0]?`https://ik.imagekit.io/5tgxhsqev/saffronstays-media/${e.images[0]}?tr=f-jpeg,q-60`:""),rooms:t.map(e=>e.bedrooms??0),capacity:t.map(e=>e.max_capacity??0),type:t.map(e=>e.type_flag??"")}),o.current=a},[l.data,d]),l.isLoading)?(0,t.jsx)(z,{}):d.length>0?(0,t.jsxs)("div",{"data-testid":"villa container",className:"flex flex-col gap-5 w-full",children:[d.map((e,r)=>e?(0,t.jsxs)("div",{children:[!a&&3===r&&(0,t.jsx)("div",{className:"w-full py-3",children:(0,t.jsx)(Z,{})}),r<8?(0,t.jsx)(ei,{...e}):(0,t.jsx)(es,{...e})]},e?.id??r):null),!a&&d.length<3&&(0,t.jsx)("div",{className:"w-full py-3",children:(0,t.jsx)(Z,{})}),(0,t.jsx)("div",{ref:i,style:{height:1}}),l.isFetchingNextPage&&(0,t.jsx)("p",{className:"text-center text-gray-500",children:"Finding more beautiful villas, just for you"}),(0,t.jsx)(eo,{params:s})]}):(0,t.jsxs)("div",{className:"h-[400px] w-fit m-auto flex items-center justify-center gap-5 flex-col",children:[(0,t.jsx)(n.default,{src:ee.default,alt:"home not found",width:500,height:500,className:"mb-5"}),(0,t.jsx)("span",{className:"font-avenir font-bold text-[20px]",children:"Opps, we couldn't find any results"}),(0,t.jsx)("span",{className:"font-avenir",children:"Try searching for something else"})]})}],68530)},88721,25525,58472,e=>{"use strict";let t={src:e.i(10398).default,width:20,height:20,blurWidth:0,blurHeight:0};e.s(["default",0,t],88721);let a={src:e.i(14794).default,width:20,height:20,blurWidth:0,blurHeight:0};e.s(["default",0,a],25525);var r=e.i(91398),l=e.i(91788);e.s(["default",0,e=>{let{min:t,max:a,step:i=1e3,initialMin:s,initialMax:n,onChange:o}=e,d=(0,l.useRef)(null),c=(0,l.useRef)(null),u=(0,l.useRef)(o),m=(0,l.useRef)(!1);(0,l.useEffect)(()=>{u.current=o},[o]);let x=Math.max(t,1999),h=Math.min(a,249999),p=Math.max(i,1e3),f=(e,t,a)=>Math.max(t,Math.min(e,a)),g=(0,l.useCallback)(e=>{let t=Math.round((e-x)/p)*p;return f(x+t,x,h)},[x,h,p]),[b,v]=(0,l.useState)(()=>g(f(s??x,x,h))),[w,y]=(0,l.useState)(()=>
1g(f(n??h,x,h))),[j,N]=(0,l.useState)(null),_=(0,l.useRef)(b),k=(0,l.useRef)(w),F=(0,l.useRef)(j);(0,l.useEffect)(()=>{_.current=b},[b]),(0,l.useEffect)(()=>{k.current=w},[w]),(0,l.useEffect)(()=>{F.current=j},[j]);let C=(0,l.useCallback)(e=>(e-x)/(h-x)*100,[x,h]);(0,l.useEffect)(()=>{if(c.current){let e=C(b);c.current.style.left=`${e}%`,c.current.style.width=`${C(w)-e}%`}},[b,w,C]);let S=(0,l.useRef)({min:b,max:w});(0,l.useEffect)(()=>{let e=S.current;(e.min!==b||e.max!==w)&&(S.current={min:b,max:w},m.current||u.current?.({min:b,max:w}),m.current=!1)},[b,w]),(0,l.useEffect)(()=>{m.current=!0,v(e=>g(f(e,x,h))),y(e=>g(f(e,x,h)))},[x,h,g]),(0,l.useEffect)(()=>{if(void 0===s)return;let e=g(f(s,x,h));v(t=>(t!==e&&(m.current=!0),e))},[s,x,h,g]),(0,l.useEffect)(()=>{if(void 0===n)return;let e=g(f(n,x,h));y(t=>(t!==e&&(m.current=!0),e))},[n,x,h,g]);let E=(0,l.useCallback)(e=>{if(!d.current)return x;let t=d.current.getBoundingClientRect();return g(x+f((e-t.left)/t.width,0,1)*(h-x))},[x,h,g]),M=(0,l.useCallback)(e=>{let t=F.current;if(!t)return;e.cancelable&&e.preventDefault();let a=E("touches"in e?e.touches[0].clientX:e.clientX);"min"===t?v(g(f(a,x,k.current-p))):y(g(f(a,_.current+p,h)))},[E,x,h,p,g]),T=(0,l.useCallback)(()=>N(null),[]);(0,l.useEffect)(()=>{if(j)return window.addEventListener("mousemove",M),window.addEventListener("touchmove",M,{passive:!1}),window.addEventListener("mouseup",T),window.addEventListener("touchend",T),()=>{window.removeEventListener("mousemove",M),window.removeEventListener("touchmove",M),window.removeEventListener("mouseup",T),window.removeEventListener("touchend",T)}},[j,M,T]);let $=e=>t=>{t.preventDefault(),N(e)};return(0,r.jsx)("div",{className:"w-full",children:(0,r.jsx)("div",{className:"px-4 pt-2",children:(0,r.jsxs)("div",{ref:d,className:"relative w-full h-1.5 bg-gray-200 rounded-full select-none",children:[(0,r.jsx)("div",{ref:c,className:"absolute h-1.5 bg-gradient-to-r from-orange-400 to-orange-500 rounded-full pointer-events-none"}),["min","max"].map(e=>{let t="min"===e?b:w,a=j===e;return(0,r.jsx)("div",{onMouseDown:$(e),onTouchStart:$(e),onKeyDown:t=>{let a=0;if("ArrowRight"===t.key||"ArrowUp"===t.key)a=p;else if("ArrowLeft"===t.key||"ArrowDown"===t.key)a=-p;else if("Home"===t.key){t.preventDefault(),"min"===e?v(x):y(x);return}else{if("End"!==t.key)return;t.preventDefault(),"min"===e?v(h):y(h);return}t.preventDefault(),"min"===e?v(e=>g(f(e+a,x,w-p))):y(e=>g(f(e+a,b+p,h)))},className:`absolute top-1/2 w-5 h-5 bg-white border-2 rounded-full shadow-md ${a?"cursor-grabbing border-orange-600 shadow-lg":"cursor-grab border-orange-500"}`,style:{left:`${C(t)}%`,transform:`translate(-50%, -50%) scale(${a?1.25:1})`,transition:a?"box-shadow 150ms, border-color 150ms":"transform 150ms, box-shadow 150ms, border-color 150ms",zIndex:a?10:"max"===e?3:2,outline:"none",boxShadow:a?"0 0 0 4px rgba(251,146,60,0.2), 0 2px 8px rgba(0,0,0,0.15)":void 0,willChange:a?"transform":void 0},role:"slider","aria-valuemin":x,"aria-valuemax":h,"aria-valuenow":t,"aria-label":"min"===e?"Minimum price":"Maximum price",tabIndex:0},e)})]})})})}],58472)},76611,30585,69512,53268,e=>{"use strict";var t=e.i(91398),a=e.i(91788),r=e.i(58292),l=e.i(82447),i=e.i(28599),s=e.i(40138),n=e.i(28755),o=e.i(66865),d=e.i(26019),c=e.i(69895),u=e.i(23801),m=e.i(35919),x=e.i(98093);let h=e=>{let{imageUrl:r,title:l,location:i,rating:s,reviews:n,discountedPrice:o,setSelected:h,id:p,seoUrl:f,inDreamList:g,bedroomCount:b,minGuests:v,maxGuests:w}=e,y=l.split(" - ")[0],[j,N]=a.default.useState(null),_=j??!!g,{openSaveSheet:k}=(0,x.useSaveToWishlist)(),F="number"==typeof b&&b>0?`${b} Bedroom${b>1?"s":""}`:"",C=Number(v),S=Number(w),E="";Number.isFinite(C)&&Number.isFinite(S)&&S>0?E=C>0&&C<S?`${C}-${S} Guests`:`${S} Guests`:Number.isFinite(S)&&S>0?E=`${S} Guests`:Number.isFinite(C)&&C>0&&(E=`${C} Guests`);let M=[F,E].filter(Boolean).join(" | ");return(0,t.jsxs)("div",{onClick:()=>{window.open(`/view/${f}-${p}?from_source=map`,"_blank")},className:"text-poppins relative w-[250px] max-md:w-full md:w-[250px] rounded-3xl overflow-hidden cursor-pointer bg-white/15 border border-white/40 shadow-[0_18px_48px_-10px_rgba(31,38,135,0.35)] hover:shadow-[0_22px_52px_-10px_rgba(31,38,135,0.45)] hover:bg-white/35 transition-all duration-300 ease-in-out",style:{boxShadow:"0 12px 36px -12px rgba(31, 38, 135, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.25)"},children:[(0,t.jsxs)("div",{className:"relative w-full h-28 max-md:h-40",children:[(0,t.jsx)(d.default,{src:"https://ik.imagekit.io/5tgxhsqev/saffronstays-media/"+r+"?tr=w-500,h-200,q-80",alt:`${y}`,layout:"fill",objectFit:"cover",className:"rounded-t-3xl"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-linear-to-b from-black/0 via-black/0 to-black/25"}),(0,t.jsxs)("div",{onClick:e=>e.stopPropagation(),className:"absolute top-2 right-2 flex items-center gap-2 z-10",children:[(0,t.jsx)("button",{type:"button","aria-label":"Save to wishlist","aria-pressed":_,onClick:()=>{k(p,{onSaved:N})},className:"backdrop-blur-2xl bg-white rounded-full p-1.5 max-md:p-2 cursor-pointer border border-white/60 hover:bg-white/80 hover:scale-110 transition-all duration-200 shadow-[0_4px_16px_0_rgba(31,38,135,0.15)]",children:(0,t.jsx)(d.default,{src:_?m.default:c.default,className:"w-4 h-4 max-md:w-4 max-md:h-4",alt:"Heart"})}),(0,t.jsx)("button",{onClick:()=>{h(null)},className:"backdrop-blur-2xl bg-white/50 rounded-full p-1.5 max-md:p-2 cursor-pointer border border-white/60 hover:bg-white/80 hover:scale-110 transition-all duration-200 shadow-[0_4px_16px_0_rgba(31,38,135,0.15)]",children:(0,t.jsx)(d.default,{src:u.default,className:"w-4 h-4 max-md:w-4 max-md:h-4",alt:"close"})})]})]}),(0,t.jsxs)("div",{className:"relative p-3 max-md:p-3 backdrop-blur-[5px] border-t border-white/50",style:{background:"linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.15) 100%)",boxShadow:"inset 0 1px 1px rgba(255,255,255,0.6), inset 0 -1px 1px rgba(255,255,255,0.3)"},children:[(0,t.jsxs)("div",{className:"flex flex-row justify-between items-start gap-2 mb-1.5",children:[(0,t.jsx)("h3",{className:"flex text-[12px] max-md:text-[12px] font-semibold text-gray-900 cursor-pointer leading-tight drop-shadow-sm truncate pr-1",children:y?.split(" - ")[0]}),(0,t.jsx)("div",{className:" flex items-center gap-2 text-[10px] font-semibold text-charcoal ",children:s>0&&(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsxs)("span",{children:["â ",s?.toFixed(1)]}),n>0&&(0,t.jsxs)("span",{className:"opacity-80",children:["(",n,")"]})]})})]}),(0,t.jsxs)("div",{className:"flex flex-col space-y-0.5",children:[(0,t.jsx)("p",{className:"text-[11px] max-md:text-[11px] text-gray-800 font-medium drop-shadow-sm truncate",children:i}),M&&(0,t.jsx)("p",{className:"text-[10px] max-md:text-[10px] text-gray-700 truncate",children:M})]}),(0,t.jsx)("div",{className:"flex items-center justify-between text-[11px] max-md:text-[11px] font-semibold mt-3 max-md:mt-2 pt-2 max-md:pt-2 border-t border-white/50",children:(0,t.jsxs)("span",{className:"text-gray-900 drop-shadow-sm leading-tight",children:["â¹",(e=>{if(null==e||!Number.isFinite(e)||e<=0)return"";if(e>=1e5){let t=e%1e5==0?(e/1e5).toFixed(0):(e/1e5).toFixed(1);return`${t}L`}if(e>=1e3){let t=e%1e3==0?(e/1e3).toFixed(0):(e/1e3).toFixed(1);return`${t}k`}return e.toFixed(0)})(o),(0,t.jsx)("span",{className:"text-[10px] max-md:text-[10px] text-gray-700 font-normal",children:" /night + GST"})]})})]})]})};var p=e.i(93541);let f={src:e.i(14858).default,width:32,height:32,blurWidth:0,blurHeight:0};e.s(["default",0,f],30585);var g=e.i(30559),b=e.i(3828),v=e.i(90218);let w=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=null!=e?Number(e):t;return Number.isFinite(a)?a:t},y=a.default.memo(()=>(0,t.jsx)("svg",{width:"14",height:"12",viewBox:"0 0 14 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,t.jsx)("path",{d:"M1 11V7.5M1 7.5V5.5C1 5.22386 1.22386 5 1.5 5H5.5M1 7.5H13M13 11V7.5M13 7.5V5.5C13 5.22386 12.7761 5 12.5 5H8.5M5.5 5V3.5C5.5 3.22386 5.72386 3 6 3H8C8.27614 3 8.5 3.22386 8.5 3.5V5M5.5 5H8.5M1 5V1.5C1 1.22386 1.22386 1 1.5 1H12.5C12.7761 1 13 1.22386 13 1.5V5",stroke:"#888",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})}));y.displayName="BedroomSvg";let j=a.default.memo(e=>{let{loc:a,idx:r,isSelected:l,overlapOffset:s,overlapIndex:n,priceLabel:o,bedroomLabel:d,onSelect:c}=e,u=w(a.latitude),m=w(a.longitude),x=l?30:Math.max(1,10-n);return(0,t.jsx)(i.Marker,{latitude:u,longitude:m,offset:s,style:{zIndex:x},onClick:e=>{e.originalEvent.stopPropagation(),c(r,m,u)}
1,children:(0,t.jsx)("div",{className:`marker-style ${l?"selected-marker":""}`,children:o&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-semibold",children:o}),d&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"mx-0.5 opacity-30",children:"·"}),(0,t.jsxs)("span",{className:"marker-bedroom flex items-center gap-1 text-[#888]",children:[(0,t.jsx)(y,{}),d]})]})]})})},a.id??r)});j.displayName="MarkerItem",e.s(["MapComponent",0,e=>{let i,c,u,{openMap:m,setOpenMap:x,onMarkerClick:y}=e,{placeDetails:N,params:_,searchResults:k,seoData:F,showTax:C}=(0,a.useContext)(r.SearchContext),S=(0,b.useRouter)(),E=(0,v.useIsMobile)(),{id:M}=S.query,T=M?.toString().split("-").pop()?.replace(/_/g," ")??"",$=k?.data?.pages,L=(0,a.useMemo)(()=>($??[]).flatMap(e=>e.data?.data??[]),[$]),P=(0,a.useRef)(k);P.current=k;let R="number"==typeof N?.LATITUDE?N.LATITUDE:N?.LATITUDE,A="number"==typeof N?.LONGITUDE?N.LONGITUDE:N?.LONGITUDE,I=w(R,w(_?.lat)),z=w(A,w(_?.lon)),D=(0,a.useRef)({latitude:I,longitude:z}),[B,V]=(0,a.useState)({latitude:I,longitude:z}),[H,W]=(0,a.useState)(null),[O,G]=(0,a.useState)(n.MAP_STYLE_URL),[q,U]=(0,a.useState)(!1),[K,Y]=(0,a.useState)(0),X=(0,a.useRef)(null),[J,Z]=(0,a.useState)(null),Q=(0,a.useRef)(!1),ee=(0,a.useRef)(null),et=(0,a.useMemo)(()=>J??L,[J,L]);(0,a.useEffect)(()=>{if(Q.current)return;let e=0===I||0===z,t=I,a=z;if(e&&L.length){let e=L.filter(e=>null!=e.latitude&&null!=e.longitude);e.length&&(t=e.reduce((e,t)=>e+w(t.latitude),0)/e.length,a=e.reduce((e,t)=>e+w(t.longitude),0)/e.length)}D.current={latitude:t,longitude:a},V(e=>e.latitude===t&&e.longitude===a?e:{latitude:t,longitude:a})},[I,z,L]);let ea=(0,a.useCallback)(async()=>{try{await g.default.post("https://go.saffronstays.com/api/log-map-ip",{city:T})}catch(e){console.error(e)}},[T]),er=(0,a.useRef)(null),el=(0,a.useRef)(0),ei=(0,a.useRef)(null),es=F?.TYPE==="City"?9:F?.TYPE==="State"?5:9;(0,a.useEffect)(()=>{m&&er.current&&setTimeout(()=>{er.current?.resize()},200)},[m]);let en=(0,a.useRef)(!1);(0,a.useEffect)(()=>{if(!m||!er.current||en.current)return;en.current=!0;let e=L.filter(e=>null!=e.latitude&&null!=e.longitude&&0!==w(e.latitude)&&0!==w(e.longitude));if(e.length>=2){let t=1/0,a=-1/0,r=1/0,l=-1/0;for(let i of e){let e=w(i.latitude),s=w(i.longitude);e<t&&(t=e),e>a&&(a=e),s<r&&(r=s),s>l&&(l=s)}er.current.fitBounds([[r,t],[l,a]],{padding:{top:60,bottom:60,left:40,right:40},maxZoom:14,duration:500,easing:e=>e*(2-e)})}else er.current.easeTo({center:[D.current.longitude,D.current.latitude],duration:400,easing:e=>e*(2-e)})},[m,L]);let eo=(0,a.useRef)(null);(0,a.useEffect)(()=>{let e=eo.current;if(!e)return;let t=new IntersectionObserver(e=>{let[t]=e;t.isIntersecting&&m&&ea()},{threshold:.1});return t.observe(e),()=>t.disconnect()},[m,ea]),(0,a.useEffect)(()=>{m&&(!eo.current||E&&requestAnimationFrame(()=>{window.scrollTo({top:0,behavior:"smooth"})}))},[m,E]);let ed=(0,a.useCallback)(()=>{x(e=>{let t=!e;return t?el.current=window.scrollY:window.scrollTo({top:el.current,behavior:"auto"}),t})},[x]),ec=(0,a.useRef)(null);(0,a.useEffect)(()=>()=>{ec.current&&clearTimeout(ec.current)},[]);let eu=(0,a.useCallback)(()=>{if(!er.current)return;Q.current=!0;let e=er.current.getCenter(),t=er.current.getZoom();ee.current={latitude:e.lat,longitude:e.lng,zoom:t};let a=er.current.getBounds();
1if(a){let e=a.getNorthEast(),t=a.getSouthWest();X.current={north:e.lat,south:t.lat,east:e.lng,west:t.lng}}let r=er.current.getZoom();null!==ei.current&&r<ei.current&&(ec.current&&clearTimeout(ec.current),ec.current=setTimeout(()=>{let e=P.current;e.hasNextPage&&!e.isFetchingNextPage&&e.fetchNextPage()},500)),ei.current=r},[]);(0,a.useEffect)(()=>{Z(null),W(null),Q.current=!1,ee.current=null,en.current=!1},[_.location,_.lat,_.lon]),(0,a.useEffect)(()=>{if(m){let e=document.createElement("style");return e.innerHTML=` 2 @media (max-width: 768px) { 3 .petal-widget-minimized { 4 display: none; 5 } 6 } 7 `,document.body.appendChild(e),()=>{document.body.removeChild(e)}}},[m]),(0,a.useEffect)(()=>{y&&y(null!==H)},[H,y]);let em=(0,a.useCallback)((e,t)=>{if(!er.current)return;let a=E?-100:20;er.current.easeTo({center:[e,t],duration:400,offset:[0,a],easing:e=>e*(2-e)})},[E]),ex=(0,a.useCallback)((e,t,a)=>{W(r=>r===e?null:(em(t,a),e))},[em]),eh=(0,a.useMemo)(()=>{let e=new globalThis.Map;return et.map((t,a)=>{let r=w(t.latitude),l=w(t.longitude);if(0===r&&0===l)return null;let i=`${r.toFixed(6)},${l.toFixed(6)}`,s=e.get(i)||0;e.set(i,s+1);let n=C?Number.isFinite(Number(t.total_amount_with_tax))?Number(t.total_amount_with_tax):"":Number.isFinite(Number(t.price_per_night))?Number(t.price_per_night):"",o=Number(t.
7no_of_rooms),d=Number.isFinite(o)&&o>0?`${o}`:"",c=n?`â¹${(e=>{let t=null!=e?Number(e):NaN;if(!Number.isFinite(t)||t<=0)return"";if(t>=1e5){let e=t%1e5==0?(t/1e5).toFixed(0):(t/1e5).toFixed(1);return`${e}L`}if(t>=1e3){let e=t%1e3==0?(t/1e3).toFixed(0):(t/1e3).toFixed(1);return`${e}k`}return t.toFixed(0)})(n)}`:"";return{loc:t,idx:a,overlapOffset:(e=>{if(0===e)return[0,0];let t=30*(Math.floor((e-1)/8)+1);switch((e-1)%8){case 0:return[t,0];case 1:return[-t,0];case 2:return[0,-t];case 3:return[0,t];case 4:return[t,t];case 5:return[-t,t];case 6:return[t,-t];case 7:return[-t,-t];default:return[0,0]}})(s),overlapIndex:s,priceLabel:c,bedroomLabel:d}}).filter(Boolean)},[et,C]),ep=(0,a.useCallback)(()=>{W(null)},[]);return(0,t.jsxs)("div",{className:`w-full flex flex-row items-start justify-start max-w-full ${m?"p-0 md:p-4":"p-4 max-md:p-0 max-md:h-0 max-md:min-h-0 max-md:overflow-visible"}`,children:[(0,t.jsx)("div",{ref:eo,className:`transition-all duration-500 ease-in-out transform relative ${m?"scale-100 opacity-100 w-full border":"scale-95 opacity-0 w-0 p-0 border-0 max-md:hidden"} h-[calc(100dvh-120px)] max-md:h-dvh rounded-md border-gray-200 shadow-lg overflow-hidden max-md:p-0 relative`,children:m&&(et.length||0!==B.latitude&&0!==B.longitude?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.default,{attributionControl:!1,ref:er,initialViewState:ee.current??{latitude:B.latitude,longitude:B.longitude,zoom:es},style:{width:"100%",height:"100%"},mapLib:n.default,mapStyle:O,dragPan:!0,dragRotate:!1,touchPitch:!1,touchZoomRotate:!0,scrollZoom:!0,onLoad:e=>{e.target.addControl(new o.AttributionControl({compact:!0,customAttribution:"© Saffron Studios Pvt Ltd"}),"bottom-right"),ea(),eu()},onMoveEnd:eu,onError:e=>
7{console.error("Map style error:",e),q||(U(!0),G(n.MAP_STYLE_FALLBACK_URL),Y(e=>e+1))},onClick:()=>{W(null)},children:[eh.map(e=>(0,t.jsx)(j,{loc:e.loc,idx:e.idx,isSelected:H===e.idx,overlapOffset:e.overlapOffset,overlapIndex:e.overlapIndex,priceLabel:e.priceLabel,bedroomLabel:e.bedroomLabel,onSelect:ex},e.loc.id??e.idx)),!E&&null!==H&&et[H]&&(c=w((i=et[H]).latitude),u=w(i.longitude),0===c&&0===u?null:(0,t.jsx)(s.Popup,{latitude:c,longitude:u,anchor:"bottom",offset:[0,-35],closeButton:!1,closeOnClick:!1,onClose:ep,style:{padding:0,zIndex:1e3},className:"map-popup-custom",children:(0,t.jsx)(h,{imageUrl:i.images?.[0]??"",location:i.location??"",rating:i.rating??0,reviews:i.total_reviews??0,originalPrice:i.price_per_night??0,discountedPrice:i.total_cost??0,host:"",title:i.title??"",id:i.id??"",setSelected:W,seoUrl:i.seo_url??"",inDreamList:!!i.is_wishlist,bedroomCount:Number(i.no_of_rooms)||Number(i.bedrooms),minGuests:Number(i.capacity*Number(i.no_of_rooms)),maxGuests:Number(i.max_capacity)})}))]},K),E&&null!==H&&et[H]&&(0,t.jsx)("div",{className:"fixed bottom-[22%] left-4 right-4 z-100",onClick:e=>e.stopPropagation(),children:(0,t.jsx)("div",{className:"relative shadow-2xl rounded-xl w-full",children:(0,t.jsx)(h,{imageUrl:et[H].images?.[0]??"",location:et[H].location??"",rating:et[H].rating??0,reviews:et[H].total_reviews??0,originalPrice:et[H].price_per_night??0,discountedPrice:et[H].total_cost??0,host:"",title:et[H].title??"",id:et[H].id??"",setSelected:W,seoUrl:et[H].seo_url??"",inDreamList:!!et[H].is_wishlist,bedroomCount:Number(et[H].no_of_rooms)||Number(et[H].bedrooms),minGuests:Number(et[H].capacity*Number(et[H].no_of_rooms)),maxGuests:Number(et[H].max_capacity)})})})]}):(0,t.jsx)("div",{className:"animate-pulse flex h-full",children:(0,t.jsx)("div",{className:"flex-1 bg-gray-200 rounded-md h-full"})}))}),m&&k.isFetchingNextPage&&(0,t.jsxs)("div",{className:"absolute top-4 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 bg-white/90 backdrop-blur-sm px-3.5 py-1.5 rounded-full shadow-md border border-gray-100 pointer-events-none select-none",children:[(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"#373636",strokeWidth:"2.5",style:{animation:"spin 0.8s linear infinite"},children:[(0,t.jsx)("circle",{cx:"12",cy:"12",r:"10",opacity:"0.2"}),(0,t.jsx)("path",{d:"M12 2 A10 10 0 0 1 22 12",opacity:"0.9"})]}),(0,t.jsx)("span",{className:"text-[12px] font-avenir font-medium text-charcoal whitespace-nowrap",children:"Loading more villasâ¦"})]}),(0,t.jsx)("button",{type:"button",onClick:ed,className:`${m?"max-md:hidden":"fixed"} ${m?"":"left-0 max-md:bottom-[60px] max-md:left-1/2 max-md:translate-x-[-50%] max-md:z-40"} cursor-pointer bg-[#FDF8E7] max-md:bg-charcoal text-poppins text-[12px] rounded-br-xl rounded-tr-xl shadow transition-all hover:scale-105 p-2 z-3 max-md:rounded-xl max-md:flex max-md:items-center max-md:justify-center max-md:gap-2 max-md:text-white`,children:m?(0,t.jsx)(d.default,{src:p.default,width:20,height:20,alt:"Collapse map"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.default,{src:p.default,width:20,height:20,alt:"Expand map",className:"rotate-180 max-md:hidden"}),(0,t.jsx)("span",{children:"Show Map"}),(0,t.jsx)(d.default,{className:"hidden max-md:block",src:f,width:20,height:20,alt:"Show map"})]})})]})}],76611);let N={src:e.i(50966).default,width:20,height:20,blurWidth:0,blurHeight:0};e.s(["default",0,N],69512),e.s(["default",0,e=>{let{isOpen:r,onClose:l,title:i,children:s}=e,n=(0,v.useIsMobile)(),[o,c]=(0,a.useState)(!1),[m,x]=(0,a.useState)(!1);(0,a.useEffect)(()=>{r?(c(!0),requestAnimationFrame(()=>{requestAnimationFrame(()=>{x(!0)})})):x(!1)},[r]);let h=(0,a.useCallback)(()=>{m||r||c(!1)},[m,r]);return((0,a.useEffect)(()=>{let e=document.createElement("style");return r&&(e.innerHTML=` 8 @media (max-width: 768px) { 9 .petal-widget-minimized { 10 display: none; 11 } 12 } 13 `,document.body.appendChild(e)),()=>{e.parentNode&&document.body.removeChild(e)}},[r]),(0,a.useEffect)(()=>{let e=document.body;return r?(e.style.overflow="hidden",e.style.position="fixed",e.style.width="100%"):(e.style.overflow="",e.style.position=""),()=>{e.style.overflow="",e.style.position=""}},[r]),o)?(0,t.jsxs)("div",{className:"fixed inset-0 font-avenir z-40 flex items-end justify-center min-[1201px]:items-start min-[1201px]:justify-end",style:{pointerEvents:m?"auto":"none"},children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-md",onClick:l,style:{opacity:+!!m,transition:m?"opacity 400ms cubic-bezier(0.32, 0.72, 0, 1)":"opacity 300ms cubic-bezier(0.32, 0.72, 0, 1)"}}),(0,t.jsxs)("div",{id:"drawer",onTransitionEnd:h,className:"fixed bg-white w-full p-4 max-[1200px]:inset-x-0 max-[1200px]:bottom-0 max-[1200px]:max-h-[85dvh] max-[1200px]:overflow-y-auto max-[1200px]:rounded-t-2xl max-[1200px]:h-auto min-[1201px]:right-0 min-[1201px]:top-0 min-[1201px]:h-screen min-[1201px]:w-[400px] min-[1201px]:max-h-none min-[1201px]:overflow-y-hidden will-change-transform",style:{transform:m?"translate3d(0, 0, 0)":n?"translate3d(0, 100%, 0)":"translate3d(100%, 0, 0)",transition:m?"transform 745.6140350877179ms cubic-bezier(0.25, 1, 0.5, 1)":"transform 350ms cubic-bezier(0.32, 0.72, 0, 1)",boxShadow:m?n?"0 -8px 40px rgba(0,0,0,0.12), 0 -2px 12px rgba(0,0,0,0.06)":"-8px 0 40px rgba(0,0,0,0.12), -2px 0 12px rgba(0,0,0,0.06)":"none"},children:[(0,t.jsx)("div",{className:"flex justify-center pb-2 min-[1201px]:hidden",children:(0,t.jsx)("div",{className:"h-1 w-9 rounded-full bg-gray-300/80"})}),(0,t.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-[#ddd]",children:[i&&(0,t.jsx)("h5",{id:"drawer
13-label",className:"text-[20px] font-avenir font-medium tracking-[2px] leading-[170%] text-charcoal",children:i}),(0,t.jsx)("button",{type:"button",onClick:l,className:"cursor-pointer rounded-lg text-sm w-8 h-8 flex items-center justify-center","aria-label":"Close drawer",children:(0,t.jsx)(d.default,{src:u.default,width:20,height:20,alt:"close-btn"})})]}),s]})]}):null}],53268)},88955,2320,e=>{"use strict";var t=e.i(91398),a=e.i(91788),r=e.i(69512),l=e.i(26019),i=e.i(73965),s=e.i(6271),n=e.i(53268),o=e.i(88721),d=e.i(25525),c=e.i(54716),u=e.i(66471),m=e.i(19713),x=e.i(78908),h=e.i(58472),p=e.i(58292),f=e.i(30833),g=e.i(92078),b=e.i(74859),v=e.i(2037);let w=e=>{let{onClose:r}=e,{updateParams:i,params:s,searchResults:n}=(0,a.useContext)(p.SearchContext),w=(e,t,a)=>Math.max(t,Math.min(e,a)),y=e=>w(1999+1e3*Math.round((e-1999)/1e3),1999,249999),j=(e,t)=>{if(null==e||""===e)return t;let a=Number(e);return Number.isFinite(a)?a:t},[N,_]=a.default.useState(()=>y(w(j(s?.min,1999),1999,248999))),[k,F]=a.default.useState(()=>y(w(j(s?.max,249999),2999,249999))),[C,S]=a.default.useState(k),E=a.default.useRef(null),M=(0,a.useRef)(!1);(0,a.useEffect)(()=>{let e=document.createElement("style");return e.innerHTML=` 14 15 .petal-widget-minimized { 16 display: none; 17 } 18 `,document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{M.current=!0},2e3);return()=>clearTimeout(e)},[]),(0,a.useEffect)(()=>{let e=setTimeout(()=>{S(k)},300);return()=>clearTimeout(e)},[k]),(0,a.useEffect)(()=>{M.current&&((0,f.trackEvent)("Filter Applied",{"Filter Type":"Price","Filter Value":`${C}`}),(0,g.eventClarity)("Filter Applied",{"Filter Type":"Price","Filter Value":`${C}`}))},[C]);let T=(0,a.useCallback)(e=>{E.current&&clearTimeout(E.current),E.current=setTimeout(()=>{i(e)},300)},[i]);(0,a.useEffect)(()=>()=>{E.current&&clearTimeout(E.current)},[]),(0,a.useEffect)(()=>{let e=j(s?.min,1999),t=j(s?.max,249999),a=y(w(e,1999,248999)),r=y(w(t,2999,249999));_(e=>e!==a?a:e),F(e=>e!==r?r:e)},[s?.min,s?.max]),(0,a.useEffect)(()=>{let e=j(s?.min,1999),t=j(s?.max,249999),a=y(w(e,1999,248999)),r=y(w(t,2999,249999));_(e=>e!==a?a:e),F(e=>e!==r?r:e)},[s?.min,s?.max]);let $=[{id:1,title:"X-Series",value:"X-Series",icon:o.default},{id:2,title:"Signature Series",icon:d.default,value:"Signature"},{id:3,title:"Marriott Bonvoy",icon:c.default,value:"marriott"},{id:6,title:"Escape",icon:u.default,value:"escape"},{id:7,title:"Celebrations",icon:m.default,value:"celebration"},{id:8,title:"Mint Fresh - New/Renovated",icon:b.default,value:"mint_fresh"}];return(0,t.jsxs)("div",{className:"w-full h-full ",children:[(0,t.jsxs)("div",{className:"w-full h-[70dvh] md:h-full flex flex-col gap-5 pb-[100px] md:pb-32 overflow-y-scroll",children:[(0,t.jsxs)("div",{className:"w-full flex flex-col gap-5 border-b-2 border-[rgba(55,54,54,0.20)] pb-[24px]",children:[(0,t.jsxs)("p",{className:"flex flex-row items-center gap-2 text-[14px] font-avenir font-extrabold text-charcoal",children:["Price ",(0,t.jsx)("span",{className:"text-[12px] font-normal",children:"(per night)"})]}),(0,t.jsx)("div",{className:"w-full flex flex-wrap gap-2",children:[{label:"Under â¹5K",min:1999,max:4999},{label:"Under â¹10K",min:4999,max:9999},{label:"Under â¹15K",min:9999,max:14999},{label:"â¹15K-30K",min:14999,max:29999},{label:"â¹30K-50K",min:29999,max:49999},{label:"â¹50K+",min:49999,max:249999}].map((e,a)=>{let r=s.min===e.min.toString()&&s.max===e.max.toString();return(0,t.jsx)("button",{onClick:()=>{i({min:e.min.toString(),max:e.max.toString()}),(0,f.trackEvent)("Filter Applied",{"Filter Type":"Price Range Chip","Filter Value":e.label}),(0,g.eventClarity)("Filter Applied",{"Filter Type":"Price Range Chip","Filter Value":e.label})},className:`w-fit px-4 py-3 rounded-[100px] border transition-all duration-200 text-[12px] font-avenir font-medium ${r?"bg-[#373636] text-white border-[#373636]":"bg-white text-charcoal border-[rgba(55,54,54,0.20)] hover:border-[#373636]"}`,children:e.label},a)})}),(0,t.jsx)(h.default,{min:1999,max:249999,step:1e3,initialMin:N,initialMax:k,onChange:e=>{let t=y(w(e.min,1999,e.max-1e3)),a=y(w(e.max,t+1e3,249999));T({min:t.toString(),max:a.toString()}),_(t),F(a)}}),(0,t.jsxs)("div",{className:"flex justify-between items-center w-full",children:[(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("input",{type:"number",min:1999,max:Math.max(1999,k-1e3),step:1e3,value:N,onChange:e=>{let t=parseInt(e.target.value,10);if(isNaN(t))return;let a=Math.min(y(w(t,1999,248999)),k-1e3),r=w(Math.max(k,a+1e3),a+1e3,249999);_(a),F(r),T({min:a.toString(),max:r.toString()})},className:"w-[100px] px-4 py-2 border border-[rgba(55,54,54,0.20)] rounded-lg text-[12px] font-medium font-avenir text-charcoal text-center"}),(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-1 font-avenir",children:"Minimum"})]}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("input",{type:"number",value:k,step:1e3,max:249999,min:Math.min(249999,N+1e3),onChange:e=>{let t=parseInt(e.target.value,10);if(isNaN(t))return;let a=Math.max(y(w(t,2999,249999)),N+1e3),r=w(Math.min(N,a-1e3),1999,a-1e3);F(a),_(r),T({min:r.toString(),max:a.toString()})},className:"w-[100px] px-4 py-2 border border-[rgba(55,54,54,0.20)] rounded-lg text-[12px] font-medium font-avenir text-charcoal text-center"}),(0,t.jsx)("p",{className:"text-sm font-normal leading-[170%] text-gray-600 mt-1 font-avenir",children:"Maximum"})]})]})]}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-5 border-b-2 border-[rgba(55,54,54,0.20)] pb-[24px]",children:[(0,t.jsx)("p",{className:"flex flex-row items-center gap-2 text-[14px] font-avenir font-extrabold text-charcoal",children:"Categories"}),(0,t.jsx)("div",{className:"w-full flex flex-wrap gap-[12px]",children:$?.map((e,a)=>(0,t.jsxs)("div",{style:{backgroundColor:e.value===s.signature||"mint_fresh"===e.value&&"true"===s.mint_fresh?"#373636":"white",color:e.value===s.signature||"mint_fresh"===e.value&&"true"===s.mint_fresh?"white":"#373636",transition:"all 0.3s ease-in-out"},onClick:()=>{"mint_fresh"===e.value?T({mint_fresh:"true"}):s.signature===e.value?T({signature:""}):(T({signature:e.value}),(0,f.trackEvent)("Filter Applied",{"Filter Type":"Category","Filter Value":e.title}),(0,g.eventClarity)("Filter Applied",{"Filter Type":"Category","Filter Value":e.title}))},className:"h-[40px] flex items-center justify-center pr-[12px] pl-[4px] gap-[4px] rounded-[100px] border-1 border-[rgba(55,54,54,0.20)] cursor-pointer",children:[(0,t.jsx)(l.default,{src:e.icon,alt:e.title,width:20,height:20}),(0,t.jsx)("p",{className:"text-[12px] font-avenir font-medium",children:e.title})]},a))})]}),(0,t.jsx)(x.default,{title:"Top Filters",children:(0,t.jsx)("div",{className:"flex flex-col gap-[16px]",children:[{label:"Same Day Check-In",value:"same_day",type:"params"},{label:"Exclude Shared Spaces",value:"non_shared",type:"params"},{label:"Free Breakfast",value:"10",type:"amens"},{label:"Pet Friendly",value:"19",type:"amens"},{label:"Pocket Friendly",value:"pocket",type:"params"},{label:"Veg Only",value:"22",type:"amens"},{label:"Top Rated Villas",value:"top_rated",type:"params"},{label:"Elderly Friendly",value:"17",type:"amens"}].map((e,a)=>{let r="amens"===e.type,l="suitables"===e.type,i=!1;
18return i=r?(s?.amenities?.split(",").filter(Boolean)||[]).includes(e.value):l?s?.more===e.value:e.value in s&&"true"===s[e.value],(0,t.jsxs)("div",{className:"flex gap-[8px] items-center",children:[(0,t.jsx)("input",{checked:i,onChange:()=>{let t=!1;if(r){let a=s?.amenities?.split(",").filter(Boolean)||[],r=a.includes(e.value);t=!r,T({amenities:(r?a.filter(t=>t!==e.value):[...a,e.value]).join(",")})}else l?T({more:(t=s?.more!==e.value)?e.value:""}):(t="true"!==s[e.value],T({[e.value]:t?"true":""}));t&&((0,f.trackEvent)("Filter Applied",{"Filter Type":"Top Filters","Filter Value":e.label}),(0,g.eventClarity)("Filter Applied",{"Filter Type":"Top Filters","Filter Value":e.label}))},type:"checkbox",className:"w-[24px] h-[24px] cursor-pointer outline-none border-1 border-[rgba(55,54,54,0.20)]"}),(0,t.jsx)("p",{className:"text-[12px] font-avenir font-medium",children:e.label})]},a)})})}),(0,t.jsx)(x.default,{title:"Villa Features",children:(0,t.jsx)("div",{className:"flex flex-col gap-[16px]",children:[{label:"Water front",value:"14",type:"suitables"},{label:"Beach front",value:"12",type:"suitables"},{label:"Hill Station",value:"17",type:"suitables"},{label:"Farm Stay",value:"15",type:"suitables"},{label:"Plantation estates",value:"21",type:"suitables"},{label:"Disconnect in nature",value:"56",type:"suitables"},{label:"Old world experience",value:"42",type:"suitables"},{label:"Girls' getaway",value:"63",type:"suitables"},{label:"Road trips",value:"61",type:"suitables"}].map((e,a)=>(0,t.jsxs)("div",{className:"flex gap-[8px] items-center",children:[(0,t.jsx)("input",{checked:s.more===e.value,onChange:()=>{let t=s.more!==e.value;T({more:s.more===e.value?"":e.value}),t&&((0,f.trackEvent)("Filter Applied",{"Filter Type":"Villa Features","Filter Value":e.label}),(0,g.eventClarity)("Filter Applied",{"Filter Type":"Villa Features","Filter Value":e.label}))},type:"checkbox",className:"w-[24px] h-[24px] cursor-pointer outline-none border-1 border-[rgba(55,54,54,0.20)]"}),(0,t.jsx)("p",{className:"text-[12px] font-avenir font-medium",children:e.label})]},a))})})]}),(0,t.jsxs)("div",{className:"fixed bottom-0 left-0 right-0 bg-white border-t border-gray-200 px-4 py-4 flex gap-3 z-50",children:[(0,t.jsx)("button",{onClick:()=>{i({amenities:"",events:"",more:"",signature:"",couple:"",pocket:"",same_day:"",breakfast:"",lite:"",club:"",classification:"",top_rated:"",is_next:"",unavail:"",min:"",max:"",new_homes:"",non_shared:"",pets:"",mint_fresh:""})},className:"flex-1 px-4 py-3 text-gray-700 font-medium font-avenir border border-gray-300 rounded-lg hover:bg-gray-50 transition-all duration-200",children:"Clear all"}),(0,t.jsx)("button",{onClick:()=>{r()},className:"flex-[2] px-6 py-3 bg-[#373636] text-white font-semibold font-avenir rounded-lg hover:bg-gray-800 transition-all duration-200 flex items-center justify-center gap-2",children:n.isLoading||n.isFetching?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.default,{size:16,color:"#fff"}),(0,t.jsx)("span",{children:"Loading..."})]}):(()=>{if(!n?.data?.pages||n?.data?.pages.length===0)return"No Results Found";let e=n.data.pages.flatMap(e=>e.data?.data??[]).length||0;return 0===e?"No Results Found":`Show ${e} Results`})()})]})]})};var y=e.i(93639),j=e.i(69598),N=e.i(90218);let _={src:e.i(68381).default,width:20,height:20,blurWidth:0,blurHeight:0},k={src:e.i(78059).default,width:16,height:16,blurWidth:0,blurHeight:0},F={src:e.i(99177).default,width:16,height:16,blurWidth:0,blurHeight:0};e.s(["default",0,e=>{let{isFlutter:o,onMapToggle:d,isMapOpen:c}=e,{showTax:u,setShowTax:m,params:x,updateParams:h}=(0,a.useContext)(p.SearchContext),[f,g]=(0,a.useState)(!1),[v,C]=(0,a.useState)(!1),S=(0,N.useIsMobile)(),E=x.amenities?.split(",").filter(Boolean)??[],M=E.includes("19"),T=[{label:"Whatâs New",value:"Newest first"},{label:"Popularity",value:"Popularity"},{label:"Price - Low to High",value:"Price: Low to high"},{label:"Price - High to Low",value:"Price: High to low"}].find(e=>e.value===x?.sortby)?.label,$=x.amenities||x.events||x.more||x.signature||x.couple||x.pocket||x.same_day||x.breakfast||x.lite||x.club||x.classification||x.top_rated||x.is_next||x.unavail||x.max&&"249999"!==x.max||x.new_homes||x.non_shared||Number(x.pets)>0||M||x.mint_fresh,L=$||x.sortby,P=x.checkin&&x.checkout&&!o;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full max-w-full overflow-hidden border-b border-t border-gray-100 bg-linear-to-b from-white to-gray-50/40 py-3 backdrop-blur-sm md:py-4 shadow-sm",children:(0,t.jsx)("div",{className:"container mx-auto w-full min-w-0 max-w-full",children:(0,t.jsxs)("div",{className:"flex min-w-0 items-center justify-center gap-0 px-4 max-md:justify-start max-md:overflow-x-auto md:gap-7 scrollbar-hide",children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-center gap-2",children:[d&&(0,t.jsxs)("button",{onClick:d,className:`group flex shrink-0 items-center justify-center gap-1.5 rounded-[100px] px-3.5 py-2 text-[12px] font-semibold tracking-wide transition-all duration-200 ease-out focus:outline-none active:scale-[0.97] ${c?"border-[1.5px] border-[#3564e2] bg-[#eef3fc] text-[#3564e2] shadow-[0_2px_8px_rgba(53,100,226,0.15)]":"border-[1.5px] border-gray-300 bg-white text-gray-700 shadow-[0_1px_2px_rgba(0,0,0,0.05)]"}`,children:[(0,t.jsx)(l.default,{src:_,alt:"",className:"h-5 w-5 shrink-0"}),(0,t.jsx)("span",{children:"Maps"})]}),(0,t.jsxs)("button",{onClick:()=>g(!0),className:`group flex items-center justify-center gap-2 rounded-[100px] px-3.5 py-2 text-[12px] font-semibold tracking-wide transition-all duration-300 ease-out focus:outline-none active:scale-[0.97] ${$?"border border-[#3564e2]/30 bg-linear-to-r from-[#3564e2]/10 to-[#5b82f0]/10 text-[#3564e2] shadow-[0_2px_12px_rgba(53,100,226,0.15)] hover:shadow-[0_4px_16px_rgba(53,100,226,0.2)]":"border border-charcoal/30 bg-white text-gray-600 shadow-[0_1px_3px_rgba(0,0,0,0.04)] hover:border-gray-300 hover:bg-gray-50/50 hover:text-gray-800 hover:shadow-[0_2px_8px_rgba(0,0,0,0.06)]"}`,children:[(0,t.jsx)(l.default,{src:r.default,alt:"Filters",className:"h-3.5 w-3.5 shrink-0 opacity-70 transition-opacity duration-200 group-hover:opacity-100"}),(0,t.jsx)("span",{children:"Filters"}),$&&(0,t.jsx)("span",{className:"ml-0.5 inline-flex size-4 shrink-0 select-none items-center justify-center rounded-full bg-linear-to-br from-[#3564e2] to-[#5b82f0] text-[9px] font-bold leading-none text-white shadow-sm","aria-hidden":!0,
18children:"â"})]}),P&&(0,t.jsxs)("div",{className:`group flex shrink-0 items-center gap-2 rounded-[100px] px-3.5 py-1 transition-all duration-200 ease-out ${u?"border-[1.5px] border-[#3564e2]/30 bg-[#eef3fc] shadow-[0_2px_8px_rgba(53,100,226,0.1)]":"border-[1.5px] border-gray-300 bg-white shadow-[0_1px_2px_rgba(0,0,0,0.05)]"}`,children:[(0,t.jsx)("div",{className:"shrink-0 origin-left scale-[0.82]",children:(0,t.jsx)(s.default,{checked:u,onChange:()=>m(!u)})}),(0,t.jsxs)("p",{className:"flex min-w-0 flex-col gap-0 font-avenir leading-tight text-gray-700",children:[(0,t.jsx)("span",{className:"text-[11px] font-semibold tracking-wide",children:"Display Total"}),(0,t.jsx)("span",{className:"text-[9px] font-normal text-gray-400",children:"Incl. GST"})]})]}),(0,t.jsxs)("button",{onClick:()=>C(!v),className:`group relative flex items-center justify-center gap-1.5 rounded-[100px] py-2 text-[12px] font-semibold tracking-wide transition-all duration-300 ease-out focus:outline-none active:scale-[0.97] max-md:w-fit max-md:px-2 md:w-fit md:px-4 ${T?"border border-[#3564e2]/30 bg-linear-to-r from-[#3564e2]/10 to-[#5b82f0]/10 text-[#3564e2] shadow-[0_2px_12px_rgba(53,100,226,0.15)] hover:shadow-[0_4px_16px_rgba(53,100,226,0.2)]":"border border-charcoal/30 bg-white text-gray-600 shadow-[0_1px_3px_rgba(0,0,0,0.04)] hover:border-gray-300 hover:bg-gray-50/50 hover:text-gray-800 hover:shadow-[0_2px_8px_rgba(0,0,0,0.06)]"}`,children:[(0,t.jsx)(l.default,{src:j.default,alt:"Sort",className:"h-3.5 w-3.5 shrink-0 opacity-70 transition-opacity duration-200 group-hover:opacity-100"}),(0,t.jsx)("span",{className:"whitespace-nowrap",children:T??"Sort By"}),(0,t.jsx)(l.default,{className:`ml-0.5 h-3 w-3 shrink-0 opacity-50 transition-all duration-300 ease-in-out ${v?"rotate-180 opacity-80":""}`,src:i.default,alt:"Sort"}),!S&&v&&(0,t.jsx)("div",{className:"absolute top-full z-10 mt-3 w-full animate-in fade-in slide-in-from-top-1 duration-200 md:w-auto",children:(0,t.jsx)(y.default,{})})]}),!S&&L&&(0,t.jsx)("button",{onClick:()=>{h({sortby:"",amenities:"",events:"",more:"",signature:"",couple:"",pocket:"",same_day:"",breakfast:"",lite:"",club:"",classification:"",top_rated:"",is_next:"",unavail:"",min:"",max:"",new_homes:"",non_shared:"",pets:"",mint_fresh:""})},className:"group ml-1 flex items-center gap-1 font-avenir text-xs font-medium text-gray-400 transition-all duration-200 ease-out hover:text-red-500",children:(0,t.jsx)("span",{className:"border-b border-dashed border-gray-300 pb-px transition-colors duration-200 group-hover:border-red-300",children:"Clear All"})})]}),S&&(0,t.jsxs)("div",{className:"flex items-center gap-2.5 pl-2.5",children:[(0,t.jsx)("div",{className:"h-7 w-px shrink-0 bg-gray-300/60"}),(0,t.jsxs)("button",{onClick:()=>h({top_rated:"true"===x.top_rated?"":"true"}),className:`group flex shrink-0 items-center justify-center gap-1.5 rounded-[100px] px-3.5 py-2 text-[12px] font-semibold tracking-wide transition-all duration-200 ease-out focus:outline-none active:scale-[0.97] ${"true"===x.top_rated?"border-[1.5px] border-[#3564e2] bg-[#3564e2] text-white shadow-[0_2px_8px_rgba(53,100,226,0.25)]":"border-[1.5px] border-gray-300 bg-white text-gray-700 shadow-[0_1px_2px_rgba(0,0,0,0.05)]"}`,children:[(0,t.jsx)(l.default,{src:k,alt:"",className:`h-4 w-4 shrink-0 ${"true"===x.top_rated?"brightness-0 invert":""}`}),(0,t.jsx)("span",{children:"Top Rated"})]}),(0,t.jsxs)("button",{onClick:()=>{h({amenities:(M?E.filter(e=>"19"!==e):[...E,"19"]).join(",")})},className:`group flex shrink-0 items-center justify-center gap-1.5 rounded-[100px] px-3.5 py-2 text-[12px] font-semibold tracking-wide transition-all duration-200 ease-out focus:outline-none active:scale-[0.97] ${M?"border-[1.5px] border-[#3564e2] bg-[#3564e2] text-white shadow-[0_2px_8px_rgba(53,100,226,0.25)]":"border-[1.5px] border-gray-300 bg-white text-gray-700 shadow-[0_1px_2px_rgba(0,0,0,0.05)]"}`,children:[(0,t.jsx)(l.default,{src:F,alt:"",className:`h-4 w-4 shrink-0 ${M?"brightness-0 invert":""}`}),(0,t.jsx)("span",{children:"Pet Friendly"})]}),(0,t.jsxs)("button",{onClick:()=>h({mint_fresh:"true"===x.mint_fresh?"":"true"}),className:`group flex shrink-0 items-center justify-center gap-1.5 rounded-[100px] px-3.5 py-2 text-[12px] font-semibold tracking-wide transition-all duration-200 ease-out focus:outline-none active:scale-[0.97] ${"true"===x.mint_fresh?"border-[1.5px] border-[#3564e2] bg-[#3564e2] text-white shadow-[0_2px_8px_rgba(53,100,226,0.25)]":"border-[1.5px] border-gray-300 bg-white text-gray-700 shadow-[0_1px_2px_rgba(0,0,0,0.05)]"}`,children:[(0,t.jsx)(l.default,{src:b.default,alt:"",className:`h-4 w-4 shrink-0 ${"true"===x.mint_fresh?"brightness-0 invert":""}`}),(0,t.jsx)("span",{className:"whitespace-nowrap",children:"Mint Fresh - Newly Launc
18hed"})]})]}),P&&(0,t.jsx)("div",{className:"hidden h-8 w-px rounded-full bg-linear-to-b from-transparent via-gray-200 to-transparent md:block"})]})})}),(0,t.jsx)(n.default,{title:"Filters",isOpen:f,onClose:()=>g(!1),children:(0,t.jsx)(w,{onClose:()=>g(!1)})}),S&&(0,t.jsx)(n.default,{title:"Sort By",isOpen:v,onClose:()=>C(!1),children:(0,t.jsx)(y.default,{})})]})}],88955);let C=(0,a.forwardRef)((e,r)=>{let{children:l,minHeight:i=32,maxHeight:s,onExpandedChange:n}=e,[o,d]=(0,a.useState)(i),[c,u]=(0,a.useState)(i),[m,x]=(0,a.useState)(!1),h=(0,a.useRef)(null),p=(0,a.useRef)(null),f=(0,a.useRef)(null),g=(0,a.useRef)(0),b=(0,a.useRef)(i),v=(0,a.useRef)(0),w=(0,a.useRef)(0),y=(0,a.useRef)(0);(0,a.useImperativeHandle)(r,()=>({minimize:()=>{d(i),n?.(!1)},maximize:()=>{d(c),n?.(!0)}})),(0,a.useEffect)(()=>{let e=document.body;return e.style.overflow="hidden",()=>{e.style.overflow=""}},[]),(0,a.useEffect)(()=>{let e=s??window.innerHeight-100;u(e),d(t=>t<i?i:t>e?e:t)},[s,i]);let j=(0,a.useRef)(0),N=(0,a.useRef)(!1),_=(0,a.useCallback)(e=>{let t=e.touches[0];g.current=t.clientY,b.current=o,v.current=t.clientY,w.current=Date.now(),y.current=0,f.current&&e.target instanceof Node&&f.current.contains(e.target)?N.current=!0:N.current=!1,p.current&&(j.current=p.current.scrollTop),x(!0),h.current&&(h.current.style.transition="none")},[o]),k=(0,a.useCallback)(e=>{if(!m)return;let t=e.touches[0].clientY,a=t-g.current,r=!1,l=o>=c-2;if(N.current?r=!0:l?a>0&&j.current<=0&&(r=!0):r=!0,r){e.cancelable&&e.preventDefault();let a=Date.now(),r=a-w.current;r>0&&(y.current=(v.current-t)/r),v.current=t,w.current=a;let l=g.current-t,s=b.current+l,n=s;if(s<i){let e=i-s;n=i-.3*e}else if(s>c){let e=s-c;n=c+.3*e}d(Math.max(0,n))}else v.current=t,w.current=Date.now()},[m,c,i,o]),F=(0,a.useCallback)(()=>{x(!1),h.current&&(h.current.style.transition="height 0.3s cubic-bezier(0.4, 0, 0.2, 1)");let e=(c+i)/2;Math.abs(y.current)>1?y.current>0?(d(c),n?.(!0)):(d(i),n?.(!1)):o>e||o>i&&y.current>.5?(d(c),n?.(!0)):(d(i),n?.(!1)),y.current=0},[o,c,i,n]);(0,a.useEffect)(()=>
18{let e=[f.current,p.current].filter(Boolean),t={passive:!1};return e.forEach(e=>{e.addEventListener("touchstart",_,t),e.addEventListener("touchmove",k,t),e.addEventListener("touchend",F,{passive:!0}),e.addEventListener("touchcancel",F,{passive:!0})}),()=>{e.forEach(e=>{e.removeEventListener("touchstart",_),e.removeEventListener("touchmove",k),e.removeEventListener("touchend",F),e.removeEventListener("touchcancel",F)})}},[_,k,F]);let C=o>=c-2;return(0,t.jsxs)("div",{ref:h,style:{height:`${o}px`,transition:m?"none":"height 0.3s cubic-bezier(0.4, 0, 0.2, 1)"},className:"hidden max-md:block fixed bottom-0 left-0 right-0 bg-white rounded-t-2xl shadow-lg overflow-hidden z-20",children:[(0,t.jsx)("div",{ref:f,className:"w-full flex justify-center py-3 cursor-grab active:cursor-grabbing touch-none select-none",children:(0,t.jsx)("div",{className:"w-12 h-1.5 bg-gray-300 rounded-full"})}),(0,t.jsx)("div",{ref:p,className:"flex-1 overflow-y-auto overscroll-contain",style:{height:"calc(100% - 40px)",overflowY:C?"auto":"hidden",touchAction:C?"pan-y":"none",WebkitOverflowScrolling:"touch"},children:(0,t.jsx)("div",{className:"p-4",children:l})})]})});C.displayName="BottomDrawer",e.s(["default",0,C],2320)}]);
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.