PageSourceSearch

https://edumateglobal.com/assets/HomesSearch-dWCtc7wU.js

js edumateglobal.com collected 2026-10-08 12:06:25 UTC 46,394 bytes, 11 lines download raw bytes

1import{c as J,r as m,j as e,f as o,b3 as ce,da as W,S as de,m as p,bi as X,a1 as ee,W as me,Y as xe,G as E,a as z,B as R,d as ue,b7 as se,c6 as he,aF as pe,u as ge,aH as L,db as be,dc as k,bm as fe,C as ye,dd as je,de as ve,df as Ne,dg as we,dh as ke,di as Ce,dj as Z,dk as Se,dl as Ie,dm as Me,dn as Le}from"./index-BHId71c2.js";import{C as Be,U as Re,m as Pe,a as q}from"./homes-BNt-pYip.js";import{F as K}from"./FlagText-DPCk5klm.js";import{M}from"./map-pin-UzlK3BIU.js";import{S as Te}from"./slider-DGoJi7rQ.js";import{T as Ae}from"./trending-up-CeyUaFth.js";import{W as Ee}from"./wallet-BrztsKEj.js";import{B as te,W as D,D as ze,a as De,b as F}from"./wifi-C7HoCIvI.js";import{U as H}from"./users-DPUtX6uP.js";import{B as Fe}from"./building-C5kbMZb4.js";import{Z as O}from"./zap-BdjXRbDD.js";import{B as We}from"./book-open-BG5UUAqi.js";import{A as He}from"./arrow-right-FCShX6YD.js";import{u as Oe}from"./useCurrencyConversion-B5Uc5WUs.js";import{C as Ue}from"./chevron-left-Cwh_Uk0q.js";import{B as $e}from"./building-2-CWwyuIlg.js";import{S as Ge}from"./star-D_wvDken.js";import{E as _e}from"./external-link-CMxre0Sa.js";import{S as Ve,a as Ye,b as Ze,c as qe,d as B}from"./select-BmExSQze.js";import{L as Ke}from"./list-D9DOKiao.js";import"./index-CecX0ych.js";import"./chevron-up-CTa1RtDO.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Qe=J("Grid3x3",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]]);/**
7 * @license lucide-react v0.462.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */const Je=J("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Xe=({message:s,isUser:r=!1,isTyping:n=!1,countryCode:i})=>{const t=()=>{if(i&&r){const l=s.replace(/^[\u{1F1E6}-\u{1F1FF}]{2}\s*/u,"").trim(),u=l.match(/I'm heading to (.+?)!/);return u?e.jsxs(e.Fragment,{children:["I'm heading to ",e.jsx(K,{countryCode:i,countryName:u[1],className:"inline"}),"!"]}):e.jsx(K,{countryCode:i,countryName:l})}return s};return e.jsx("div",{className:o("w-full py-6 px-4 md:px-6 transition-all duration-300","animate-fade-in"),children:e.jsx("div",{className:"max-w-3xl mx-auto",children:e.jsxs("div",{className:o("flex gap-4",r?"flex-row-reverse":"flex-row"),children:[e.jsx("div",{className:"flex-shrink-0 pt-1",children:r?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-card to-primary/5 border-2 border-border/50 flex items-center justify-center shadow-md backdrop-blur-sm overflow-hidden",children:e.jsx(ce,{className:"w-5 h-5 text-primary",strokeWidth:2.5})}),e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 bg-success rounded-full ring-2 ring-background"})]}):e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-primary to-[hsl(var(--homes-accent))] flex items-center justify-center shadow-md overflow-hidden",children:e.jsx(W,{className:"w-5 h-5 text-white"})}),e.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-3.5 h-3.5 bg-[hsl(var(--homes-accent))] rounded-full flex items-center justify-center ring-2 ring-background",children:e.jsx(de,{className:"w-2 h-2 text-white"})})]})}),e.jsxs("div",{className:o("flex-1 min-w-0",r?"flex flex-col items-end":""),children:[e.jsx("div",{className:o("flex items-center gap-2 mb-2",r?"flex-row-reverse":"flex-row"),children:e.jsx("span",{className:o("text-xs font-bold uppercase tracking-wide",r?"text-primary":"text-[hsl(var(--homes-accent))]"),children:r?"You":"Edumate Homes"})}),n?e.jsxs("div",{className:"inline-flex items-center gap-1.5 px-5 py-4 chat-bubble-ai",children:[e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce [animation-delay:-0.3s]"}),e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce [animation-delay:-0.15s]"}),e.jsx("span",{className:"w-2 h-2 bg-primary/60 rounded-full animate-bounce"})]}):e.jsx("div",{className:o("relative inline-block font-emoji",r?"chat-bubble-user":"chat-bubble-ai"),children:e.jsx("p",{className:"leading-relaxed",children:t()})}),!n&&e.jsx("div",{className:o("mt-1.5 text-[11px] text-muted-foreground
11/60",r?"text-right":"text-left"),children:"Just now"})]})]})})})},N=m.memo(Xe),Q=[{key:"country",label:"Country"},{key:"city",label:"City"},{key:"university",label:"University"},{key:"budget",label:"Budget"},{key:"preferences",label:"Preferences"},{key:"results",label:"Results"}],es=["country","city","university","budget","preferences","results"],ss=({currentStep:s,onStepClick:r})=>{const n=es.indexOf(s),i=n/(Q.length-1)*100;return e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsx("div",{className:"max-w-3xl mx-auto",children:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute top-4 left-0 right-0 h-1 bg-muted rounded-full"}),e.jsx(p.div,{className:"absolute top-4 left-0 h-1 bg-gradient-to-r from-primary to-[hsl(var(--homes-accent))] rounded-full",initial:{width:0},animate:{width:`${i}%`},transition:{duration:.4,ease:"easeOut"}}),e.jsx("div",{className:"relative flex justify-between",children:Q.map((t,l)=>{const u=l<n,x=l===n,d=l<n&&r;return e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx(p.button,{disabled:!d,onClick:()=>d&&r(t.key),className:o("relative z-10 flex items-center justify-center w-8 h-8 rounded-full transition-all duration-300","text-xs font-semibold",u&&"bg-primary text-primary-foreground cursor-pointer hover:scale-110",x&&"bg-gradient-to-br from-primary to-[hsl(var(--homes-accent))] text-white ring-4 ring-primary/20",!u&&!x&&"bg-muted text-muted-foreground"),whileHover:d?{scale:1.1}:{},whileTap:d?{scale:.95}:{},children:u?e.jsx(X,{className:"w-4 h-4"}):e.jsx("span",{children:l+1})}),e.jsx("span",{className:o("mt-2 text-[10px] sm:text-xs font-medium transition-colors hidden sm:block",x?"text-primary":u?"text-foreground":"text-muted-foreground"),children:t.label})]},t.key)})})]})})})},ts=m.memo(ss),as=({options:s,onSelect:r,selectedValue:n,columns:i=2,compact:t=!1,animate:l=!0,showImages:u=!1})=>{const x={1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-2 sm:grid-cols-3 lg:grid-cols-4"};return e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsx("div",{className:"max-w-3xl mx-auto",children:e.jsx("div",{className:o("grid gap-3","ml-[3.5rem]",x[i]),children:s.map((d,v)=>{const y=n===d.value;return e.jsxs(p.button,{initial:l?{opacity:0,y:15}:!1,animate:{opacity:1,y:0},transition:{delay:l?.1+v*.05:0,duration:.3},onClick:()=>
11r(d.value),className:o("option-card-base text-left",t?"p-3":"p-4",y?"option-card-selected":"option-card-hover"),children:[u&&d.image&&e.jsxs("div",{className:"relative h-24 -mx-4 -mt-4 mb-3 overflow-hidden rounded-t-xl",children:[e.jsx("img",{src:d.image,alt:d.label,className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"}),d.badge&&e.jsx("span",{className:"absolute bottom-2 left-2 px-2 py-0.5 rounded-md bg-white/90 text-xs font-medium text-foreground",children:d.badge})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[d.flag&&e.jsx("span",{className:"text-2xl flex-shrink-0",children:d.flag}),d.icon&&!d.flag&&e.jsx("div",{className:o("flex-shrink-0 w-10 h-10 rounded-lg flex items-center justify-center transition-colors",y?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:d.icon}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:o("font-medium truncate transition-colors",y?"text-primary":"text-foreground"),children:d.label}),d.description&&!t&&e.jsx("p",{className:"text-sm text-muted-foreground truncate mt-0.5",children:d.description}),d.subLabel&&e.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:d.subLabel})]}),e.jsx("div",{className:o("flex-shrink-0 w-6 h-6 rounded-full border-2 flex items-center justify-center transition-all",y?"border-primary bg-primary":"border-muted-foreground/30"),children:y?e.jsx(X,{className:"w-3.5 h-3.5 text-primary-foreground"}):e.jsx(ee,{className:"w-3.5 h-3.5 text-muted-foreground/50"})})]})]},d.value)})})})})},rs=m.memo(as),is=({countryCode:s,onSelect:r,selectedCity:n,currencySymbol:i})=>{const t=m.useMemo(()=>Be[s]||[],[s]);return t.length===0?e.jsxs("div",{className:"py-8 text-center text-muted-foreground",children:[e.jsx(M,{className:"w-12 h-12 mx-auto mb-3 opacity-50"}),e.jsx("p",{children:"No cities available for this country yet."})]}):e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:t.map((l,u)=>e.jsxs(p.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:u*.05,duration:.3},onClick:()=>r(l.name),className:o("group relative overflow-hidden rounded-xl border-2 transition-all duration-300","hover:shadow-xl hover:scale-[1.02] hover:border-primary/50","bg-card",n===l.name?"border-primary shadow-lg":"border-border/50"),children:[e.jsxs("div",{className:"relative h-32 overflow-hidden",children:[e.jsx("img",{src:l.image,alt:l.name,className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 via-black/20 to-transparent"}),e.jsxs("div",{className:"absolute bottom-3 left-3 px-2 py-1 rounded-md bg-white/90 backdrop-blur-sm text-xs font-medium text-foreground",children:["From ",i,l.avgPrice,"/week"]})]}),e.jsx("div",{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"text-left",children:[e.jsx("h3",{className:o("font-semibold transition-colors",n===l.name?"text-primary":"text-foreground"),children:l.name}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[l.listingCount,"+ listings"]})]}),e.jsx("div",{className:o("w-6 h-6 rounded-full border-2 flex items-center justify-center transition-all",n===l.name?"border-primary bg-primary":"border-muted-foreground/30"),children:n===l.name&&e.jsx(p.svg,{initial:{scale:0},animate:{scale:1},className:"w-3.5 h-3.5 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})]})})]},l.name))})},ls=m.memo(is),ns=({city:s,onSelect:r,selectedUniversity:n})=>{const[i,t]=m.useState(""),l=m.useMemo(()=>Re[s]||[],[s]),u=m.useMemo(()=>i?l.filter(x=>x.name.toLowerCase().includes(i.toLowerCase())):l,[l,i]);return e.jsxs("div",{className:"py-4 space-y-4",children:[e.jsxs("div",{className:"relative",children:[e.jsx(me,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),e.jsx(xe,{type:"text",placeholder:"Search universities...",value:i,onChange:x=>t(x.target.value),className:"pl-10 bg-background/50 border-border/50"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3 max-h-[400px] overflow-y-auto scrollbar-thin pr-1",children:[e.jsxs(p.button,{initial:{opacity:0,y:10}
11,animate:{opacity:1,y:0},onClick:()=>r("any"),className:o("flex items-center gap-3 p-4 rounded-xl border-2 transition-all duration-300 text-left","hover:shadow-md hover:border-primary/50",n==="any"?"border-primary bg-primary/5 shadow-sm":"border-border/50 bg-card/50"),children:[e.jsx("div",{className:o("w-10 h-10 rounded-lg flex items-center justify-center",n==="any"?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:e.jsx(M,{className:"w-5 h-5"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-foreground",children:"I haven't decided yet"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Show all accommodations"})]})]}),u.map((x,d)=>e.jsxs(p.button,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:(d+1)*.03},onClick:()=>r(x.name),className:o("flex items-center gap-3 p-4 rounded-xl border-2 transition-all duration-300 text-left","hover:shadow-md hover:border-primary/50",n===x.name?"border-primary bg-primary/5 shadow-sm":"border-border/50 bg-card/50"),children:[e.jsx("div",{className:o("w-10 h-10 rounded-lg flex items-center justify-center flex-shrink-0",n===x.name?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground"),children:e.jsx(E,{className:"w-5 h-5"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:o("font-medium truncate transition-colors",n===x.name?"text-primary":"text-foreground"),children:x.shortName||x.name}),e.jsx("p",{className:"text-sm text-muted-foreground truncate",children:x.name})]})]},x.name))]}),u.length===0&&i&&e.jsxs("div",{className:"py-6 text-center text-muted-foreground",children:[e.jsx(E,{className:"w-10 h-10 mx-auto mb-2 opacity-50"}),e.jsxs("p",{children:['No universities found matching "',i,'"']})]})]})},os=m.memo(ns),cs=[{label:"Budget",min:100,max:150,description:"Shared rooms, basic amenities"},{label:"Standard",min:150,max:200,description:"Private rooms, good locations"},{label:"Comfort",min:200,max:300,description:"Studios, premium amenities"},{label:"Premium",min:300,max:500,description:"Luxury apartments, prime areas"}],ds={London:220,Manchester:160,Birmingham:145,Sydney:280,Melbourne:240,Toronto:220,Vancouver:260,Dubai:300,"Abu Dhabi":280,Singapore:350,Berlin:180,Munich:220,Dublin:240,Cork:180,"New York":400,"Los Angeles":350,Boston:380},ms=({city:s,currencySymbol:r,onSelect:n,selectedBudget:i})=>{const[t,l]=m.useState([150,250]),[u,x]=m.useState(!1),d=ds[s]||200,v=a=>{x(!1),n({min:a.min,max:a.max})},y=a=>{l([a[0],a[1]]),x(!0),n({min:a[0],max:a[1]})},w=a=>!u&&(i==null?void 0:i.min)===a.min&&(i==null?void 0:i.max)===a.max;return e.jsxs("div",{className:"py-4 space-y-6",children:[e.jsxs(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex items-center gap-3 p-4 rounded-xl bg-primary/5 border border-primary/20",children:[e.jsx("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center",children:e.jsx(Ae,{className:"w-5 h-5 text-primary"})}),e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Average in ",s]}),e.jsxs("p",{className:"font-semibold text-foreground",children:[r,d,"/week"]})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3",children:cs.map((a,h)=>e.jsxs(p.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:h*.05},onClick:()=>v(a),className:o("relative flex flex-col items-start p-4 rounded-xl border-2 transition-all duration-300 text-left","hover:shadow-md hover:border-primary/50",w(a)?"border-primary bg-primary/5 shadow-sm":"border-border/50 bg-card/50"),children:[e.jsxs("div",{className:"flex items-center justify-between w-full mb-2",children:[e.jsx("span",{className:o("font-semibold",w(a)?"text-primary":"text-foreground"),children:a.label}),w(a)&&e.jsx(p.div,{initial:{scale:0},animate:{scale:1},className:"w-5 h-5 rounded-full bg-primary flex items-center justify-center",children:e.jsx("svg",{className:"w-3 h-3 text-primary-foreground",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})})]}),e.jsxs("span",{className:"text-lg font-bold text-foreground",children:[r,a.min," - ",r,a.max]}),e.jsx("span",{className:"text-xs text-muted-foreground mt-1",children:a.description})]},a.label))}),e.jsxs(p.div,{initial:{opacity:0,y:20}
11,animate:{opacity:1,y:0},transition:{delay:.25},className:o("p-4 rounded-xl border-2 transition-all duration-300",u?"border-primary bg-primary/5":"border-border/50 bg-card/50"),children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(Ee,{className:"w-5 h-5 text-muted-foreground"}),e.jsx("span",{className:"font-medium text-foreground",children:"Custom Range"})]}),e.jsx("div",{className:"px-2",children:e.jsx(Te,{defaultValue:t,min:50,max:600,step:10,onValueChange:y,className:"mb-4"})}),e.jsxs("div",{className:"flex items-center justify-between text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:["Min: ",e.jsxs("span",{className:"font-semibold text-foreground",children:[r,t[0]]})]}),e.jsxs("span",{className:"text-muted-foreground",children:["Max: ",e.jsxs("span",{className:"font-semibold text-foreground",children:[r,t[1]]})]})]})]})]})},xs=m.memo(ms),us=[{id:"private",label:"Private Room",icon:te,description:"Your own space"},{id:"shared",label:"Shared Room",icon:H,description:"Share with others"},{id:"studio",label:"Studio",icon:W,description:"Self-contained unit"},{id:"apartment",label:"Entire Apartment",icon:Fe,description:"Full apartment"}],hs=[{id:"wifi",label:"WiFi Included",icon:D},{id:"bills",label:"Bills Included",icon:O},{id:"gym",label:"Gym Access",icon:ze},{id:"laundry",label:"Laundry",icon:De},{id:"study",label:"Study Room",icon:We}],ps=[{id:"walking",label:"Walking distance",description:"< 15 mins walk",icon:M},{id:"30min",label:"Up to 30 min",description:"By public transport",icon:z},{id:"any",label:"Any distance",description:"No preference",icon:null}],gs=({onSelect:s,onSkip:r})=>{const[n,i]=m.useState([]),[t,l]=m.useState([]),[u,x]=m.useState(""),d=a=>{i(h=>h.includes(a)?h.filter(g=>g!==a):[...h,a])},v=a=>{l(h=>h.includes(a)?h.filter(g=>g!==a):[...h,a])},y=()=>{s({roomTypes:n,amenities:t,maxDistance:u})},w=n.length>0||t.length>0||u;return e.jsxs("div",{className:"py-4 space-y-6",children:[e.jsxs(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Room Type"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:us.map(a=>{const h=a.icon,g=n.includes(a.id);return e.jsxs("button",{onClick:()=>d(a.id),className:o("flex items-center gap-3 p-3 rounded-lg border-2 transition-all duration-200 text-left","hover:border-primary/50",g?"border-primary bg-primary/5":"border-border/50 bg-card/50"),children:[e.jsx(h,{className:o("w-5 h-5 flex-shrink-0",g?"text-primary":"text-muted-foreground")}),e.jsx("div",{children:e.jsx("p",{className:o("text-sm font-medium",g?"text-primary":"text-foreground"),children:a.label})})]},a.id)})})]}),e.jsxs(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Must-have Amenities"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:hs.map(a=>{const h=a.icon,g=t.includes(a.id);return e.jsxs("button",{onClick:()=>v(a.id),className:o("flex items-center gap-2 px-3 py-2 rounded-full border-2 transition-all duration-200","hover:border-primary/50",g?"border-primary bg-primary/5":"border-border/50 bg-card/50"),children:[e.jsx(h,{className:o("w-4 h-4",g?"text-primary":"text-muted-foreground")}),e.jsx("span",{className:o("text-sm font-medium",g?"text-primary":"text-foreground"),children:a.label})]},a.id)})})]}),e.jsxs(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Distance to University"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:ps.map(a=>{const h=a.icon,g=u===a.id;return e.jsxs("button",{onClick:()=>x(a.id),className:o("flex items-center gap-3 p-3 rounded-lg border-2 transition-all duration-200 text-left","hover:border-primary/50",g?"border-primary bg-primary/5":"border-border/50 bg-card/50"),children:[h&&e.jsx(h,{className:o("w-5 h-5 flex-shrink-0",g?"text-primary":"text-muted-foreground")}),e.jsxs("div",{children:[e.jsx("p",{className:o("text-sm font-medium",g?"text-primary":"text-foreground"),children:a.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a.description})]})]},a.id)})})]}),e.jsxs(p.div,{initial:{opacity:0,y:10}
11,animate:{opacity:1,y:0},transition:{delay:.3},className:"flex items-center gap-3 pt-2",children:[e.jsx(R,{variant:"outline",onClick:r,className:"flex-1",children:"Skip for now"}),e.jsxs(R,{onClick:y,className:"flex-1 bg-gradient-to-r from-primary to-[hsl(var(--homes-accent))] hover:opacity-90",children:[w?"Apply Filters":"Show All",e.jsx(He,{className:"w-4 h-4 ml-2"})]})]})]})},bs=m.memo(gs);ue.create({baseURL:"https://server.edumateglobal.com/api/v1/",headers:{"Content-Type":"application/json","x-api-key":"84211fdfb4c7c68a21327130295c933309821781287e39934942d968078cb15a","ngrok-skip-browser-warning":"true"}});const fs=(s,r,n,i)=>{const l=(n-s)*Math.PI/180,u=(i-r)*Math.PI/180,x=Math.sin(l/2)*Math.sin(l/2)+Math.cos(s*Math.PI/180)*Math.cos(n*Math.PI/180)*Math.sin(u/2)*Math.sin(u/2);return 6371*(2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x)))},ys={WiFi:e.jsx(D,{className:"w-3.5 h-3.5"}),Wifi:e.jsx(D,{className:"w-3.5 h-3.5"}),"Bills Included":e.jsx(O,{className:"w-3.5 h-3.5"}),"Shared Kitchen":e.jsx(H,{className:"w-3.5 h-3.5"}),"Private Bathroom":e.jsx(F,{className:"w-3.5 h-3.5"}),Ensuite:e.jsx(F,{className:"w-3.5 h-3.5"})},js=({accommodation:s,isWishlisted:r,onWishlistToggle:n,onClick:i,referenceLocation:t})=>{var $,G,_,V,Y;const[l,u]=m.useState(0),[x,d]=m.useState(!1),{preferredCurrency:v,exchangeRates:y,formatDirect:w}=Oe(),a=(()=>{const b=s.weeklyPrice??0,f=s.currency||"GBP";if(f===v)return w(b);const C=y[f]||1,ne=y[v]||1,oe=C>0?b/C*ne:b;return w(Math.round(oe))})(),h=(($=s.images)==null?void 0:$.length)>0?s.images:["/placeholder-property.jpg"],g=h.length>1,P=m.useCallback(b=>{b.stopPropagation(),u(f=>f===0?h.length-1:f-1)},[h.length]),c=m.useCallback(b=>{b.stopPropagation(),u(f=>f===h.length-1?0:f+1)},[h.length]),j={available:"bg-success/15 text-success border-success/30",limited:"bg-warning/15 text-warning border-warning/30",waitlist:"bg-muted/80 text-muted-foreground border-muted"},T={available:"Available",limited:"Limited",waitlist:"Waitlist"},S=(G=s.nearbyUniversities)==null?void 0:G[0],re=(S==null?void 0:S.name)??"University nearby",U=S==null?void 0:S.distance;(_=s.activeOffers)==null||_[0];const A=(()=>{var f,C;return!t||!((f=s.location)!=null&&f.lat)||!((C=s.location)!=null&&C.lng)?null:fs(t.lat,t.lng,s.location.lat,s.location.lng)})(),ie=t?t.isUniversity?t.name:`${t.name} Centre`:re,le=(t==null?void 0:t.isUniversity)!==!1;return e.jsxs(p.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},whileHover:{y:-2},transition:{duration:.2},className:o("group relative bg-card rounded-xl border border-border/60 overflow-hidden","shadow-sm hover:shadow-lg hover:border-primary/30 transition-all duration-300 cursor-pointer"),onClick:()=>i(s),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[e.jsxs("div",{className:"relative h-44 overflow-hidden bg-muted",children:[e.jsx(se,{mode:"wait",initial:!1,children:e.jsx(p.img,{src:h[l],alt:`${s.name} - Image ${l+1}`,className:"w-full h-full object-cover",initial:{opacity:0}
11,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}},l)}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 via-transparent to-black/10"}),g&&x&&e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:P,className:"absolute left-2 top-1/2 -translate-y-1/2 w-7 h-7 rounded-full bg-white/90 hover:bg-white flex items-center justify-center shadow-md transition-all opacity-0 group-hover:opacity-100",children:e.jsx(Ue,{className:"w-4 h-4 text-foreground"})}),e.jsx("button",{onClick:c,className:"absolute right-2 top-1/2 -translate-y-1/2 w-7 h-7 rounded-full bg-white/90 hover:bg-white flex items-center justify-center shadow-md transition-all opacity-0 group-hover:opacity-100",children:e.jsx(ee,{className:"w-4 h-4 text-foreground"})})]}),g&&e.jsxs("div",{className:"absolute bottom-2 left-1/2 -translate-x-1/2 flex gap-1",children:[h.slice(0,5).map((b,f)=>e.jsx("button",{onClick:C=>{C.stopPropagation(),u(f)},className:o("w-1.5 h-1.5 rounded-full transition-all",f===l?"bg-white w-3":"bg-white/60 hover:bg-white/80")},f)),h.length>5&&e.jsxs("span",{className:"text-[10px] text-white/80 ml-1",children:["+",h.length-5]})]}),e.jsx("button",{onClick:b=>{b.stopPropagation(),n(s.id)},className:o("absolute top-2.5 right-2.5 w-8 h-8 rounded-full flex items-center justify-center","transition-all duration-200 backdrop-blur-sm",r?"bg-destructive text-destructive-foreground":"bg-black/30 text-white hover:bg-black/50"),children:e.jsx(he,{className:o("w-4 h-4",r&&"fill-current")})}),e.jsxs("div",{className:"absolute top-2.5 left-2.5 flex flex-col gap-1.5",children:[e.jsx("div",{className:o("px-2 py-0.5 rounded-md text-[10px] font-semibold uppercase tracking-wide border backdrop-blur-sm",j[s.availability]),children:T[s.availability]}),s.propertyType&&e.jsxs("div",{className:"px-2 py-0.5 rounded-md text-[10px] font-medium bg-black/40 text-white backdrop-blur-sm flex items-center gap-1",children:[e.jsx($e,{className:"w-3 h-3"}),s.propertyType]})]})]}),e.jsxs("div",{className:"p-3.5",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[e.jsx(p.span,{initial:{opacity:0,y:-8,scale:.9},animate:{opacity:1,y:0,scale:1},transition:{type:"spring",stiffness:400,damping:25},className:"text-xl font-bold text-foreground",children:a},a),e.jsx("span",{className:"text-xs text-muted-foreground",children:"/week"})]}),e.jsxs("div",{className:"flex items-center gap-1 bg-muted/50 rounded-md px-1.5 py-0.5",children:[e.jsx(Ge,{className:"w-3.5 h-3.5 text-warning fill-warning"}),e.jsx("span",{className:"text-sm font-semibold text-foreground",children:s.rating}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",s.reviewCount,")"]})]})]}),e.jsx("h3",{className:"font-semibold text-foreground line-clamp-1 mb-1.5 group-hover:text-primary transition-colors text-sm",children:s.name}),e.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground mb-2.5",children:[e.jsx(M,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("span",{className:"text-xs line-clamp-1",children:[s.city,", ",s.country]})]}),e.jsxs("div",{className:"flex items-center gap-2 p-2 rounded-lg bg-primary/5 border border-primary/10 mb-2.5",children:[e.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center flex-shrink-0",children:le?e.jsx(E,{className:"w-4 h-4 text-primary"}):e.jsx(M,{className:"w-4 h-4 text-primary"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-foreground line-clamp-1",children:ie}),e.jsx("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:A!==null?e.jsxs(e.Fragment,{children:[e.jsx(M,{className:"w-3 h-3"}),e.jsxs("span",{className:"font-medium text-foreground",children:[A.toFixed(1)," km"]}),e.jsx("span",{children:"•"}),e.jsx(z,{className:"w-3 h-3"}),e.jsxs("span",{children:["~",Math.round(A*12)," min walk"]})]}):e.jsxs(e.Fragment,{children:[e.jsx(z,{className:"w-3 h-3"}),e.jsxs("span",{children:[s.walkingTime," min walk"]}),U&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"•"}),e.jsx("span",{children:U})]})]})})]})]}),e.jsxs("div",{className:"flex items-center gap-3 mb-2.5 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(te,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:[s.bedrooms," ",s.bedrooms===1?"Bed":"Beds"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(F,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:[s.bathrooms," ",s.bathrooms===1?"Bath":"Baths"]})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(H,{className:"w-3.5 h-3.5"}),e.jsxs("span",{children:[s.maxOccupants," max"]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 mb-3",children:[e.jsx("span",{className:"px-2 py-0.5 rounded-md bg-secondary text-secondary-foreground text-[10px] font-medium capitalize",children:((V=s.roomType)==null?void 0:V.replace("-"," "))||"Private Room"}),s.billsIncluded&&e.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-success/10 text-success text-[10px] font-medium flex items-center gap-1",children:[e.jsx(O,{className:"w-3 h-3"}),"Bills Inc."]}),(Y=s.amenities)==null?void 0:Y.slice(0,2).map(b=>e.jsxs("span",{className:"px-2 py-0.5 rounded-md bg-muted text-muted-foreground text-[10px] font-medium flex items-center gap-1",children:[ys[b]||null,b.length>12?b.slice(0,12)+"...":b]},b))]}),e.jsxs(R,{size:"sm",className:"w-full h-9 text-xs font-semibold bg-gradient-to-r from-primary to-[hsl(var(--homes-accent))] hover:opacity-90 transition-opacity",onClick:b=>{b.stopPropagation(),i(s)},children:["View Details",e.jsx(_e,{className:"w-3.5 h-3.5 ml-1.5"})]})]})]})},vs=m.memo(js),Ns=({accommodations:s,wishlist:r,viewMode:n,onViewModeChange:i,onWishlistToggle:t,onAccommodationClick:l,onSortChange:u,sortBy:x="recommended"})=>s.length===0?e.jsxs(p.div,{initial:{opacity:0,y:20}
11,animate:{opacity:1,y:0},className:"py-12 text-center",children:[e.jsx("div",{className:"w-16 h-16 rounded-full bg-muted mx-auto mb-4 flex items-center justify-center",children:e.jsx(W,{className:"w-8 h-8 text-muted-foreground"})}),e.jsx("h3",{className:"text-lg font-semibold text-foreground mb-2",children:"No accommodations found"}),e.jsx("p",{className:"text-muted-foreground max-w-md mx-auto",children:"Try adjusting your filters or budget range to see more options."})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs(p.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},className:"flex items-center justify-between gap-4 py-2",children:[e.jsxs("p",{className:"text-sm text-muted-foreground",children:[e.jsx("span",{className:"font-semibold text-foreground",children:s.length})," properties found"]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(Ve,{value:x,onValueChange:u,children:[e.jsx(Ye,{className:"w-[160px] h-9 text-sm",children:e.jsx(Ze,{placeholder:"Sort by"})}),e.jsxs(qe,{children:[e.jsx(B,{value:"recommended",children:"Recommended"}),e.jsx(B,{value:"price-low",children:"Price: Low to High"}),e.jsx(B,{value:"price-high",children:"Price: High to Low"}),e.jsx(B,{value:"rating",children:"Highest Rated"}),e.jsx(B,{value:"distance",children:"Closest to Uni"})]})]}),e.jsxs("div",{className:"flex items-center border border-border rounded-lg p-0.5",children:[e.jsx("button",{onClick:()=>i("grid"),className:o("p-1.5 rounded-md transition-colors",n==="grid"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:e.jsx(Qe,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>i("list"),className:o("p-1.5 rounded-md transition-colors",n==="list"?"bg-primary text-primary-foreground":"text-muted-foreground hover:text-foreground"),children:e.jsx(Ke,{className:"w-4 h-4"})})]})]})]}),e.jsx("div",{className:o("grid gap-4",n==="grid"?"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3":"grid-cols-1"),children:s.map((d,v)=>e.jsx(p.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:v*.05},children:e.jsx(vs,{accommodation:d,isWishlisted:r.includes(d.id),onWishlistToggle:t,onClick:l})},d.id))})]}),ws=m.memo(Ns),ks=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background via-background to-primary/5"}),e.jsx("div",{className:"absolute top-[10%] left-[5%] w-32 h-32 opacity-[0.03]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float"})}),e.jsx("div",{className:"absolute top-[60%] right-[8%] w-40 h-40 opacity-[0.04]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float",style:{animationDelay:"2s"}})}),e.jsx("div",{className:"absolute bottom-[15%] left-[15%] w-36 h-36 opacity-[0.03]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float",style:{animationDelay:"4s"}})}),e.jsx("div",{className:"absolute top-[35%] right-[25%] w-28 h-28 opacity-[0.02]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float",style:{animationDelay:"1s"}})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/80 via-transparent to-transparent"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background/60 via-trans
11parent to-transparent"})]}));ks.displayName="ChatBackgroundLogoFloat";const Cs=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-background"}),e.jsx("div",{className:"absolute inset-0 opacity-[0.025]",style:{backgroundImage:"url(/favicon.ico)",backgroundSize:"120px 120px",backgroundRepeat:"repeat",backgroundPosition:"center"}}),e.jsx("div",{className:"absolute inset-0 bg-gradient-radial from-transparent via-transparent to-background"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-transparent"})]}));Cs.displayName="ChatBackgroundLogoGrid";const ae=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background via-background to-primary/4"}),e.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] opacity-[0.02]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain",style:{filter:"blur(2px)"}})}),e.jsx("div",{className:"absolute top-8 right-8 w-16 h-16 opacity-[0.04]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain"})}),e.jsx("div",{className:"absolute bottom-8 left-8 w-16 h-16 opacity-[0.04]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain"})})]}));ae.displayName="ChatBackgroundLogoWatermark";const Ss=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background via-background to-primary/5"}),e.jsx("div",{className:"absolute top-0 -left-40 w-80 h-80 bg-primary/10 rounded-full blur-3xl animate-float"}),e.jsx("div",{className:"absolute top-1/4 -right-40 w-96 h-96 bg-accent/8 rounded-full blur-3xl animate-float",style:{animationDelay:"3s"}}),e.jsx("div",{className:"absolute top-[20%] right-[10%] w-24 h-24 opacity-[0.03]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain"})}),e.jsx("div",{className:"absolute bottom-[25%] left-[12%] w-28 h-28 opacity-[0.04]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain"})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/50 via-transparent to-transparent"})]}));Ss.displayName="ChatBackgroundLogoOrbs";const Is=m.memo(()=>{const s=[{top:"8%",left:"12%",size:"w-20 h-20",opacity:.2,delay:"0s",blur:!1},{top:"25%",right:"15%",size:"w-32 h-32",opacity:.1,delay:"1s",blur:!0},{top:"45%",left:"8%",size:"w-24 h-24",opacity:.15,delay:"2s",blur:!1},{top:"18%",left:"60%",size:"w-28 h-28",opacity:.1,delay:"0.5s",blur:!0},{bottom:"20%",right:"10%",size:"w-36 h-36",opacity:.2,delay:"1.5s",blur:!0},{bottom:"35%",left:"20%",size:"w-20 h-20",opacity:.2,delay:"3s",blur:!1},{top:"70%",right:"35%",size:"w-24 h-24",opacity:.15,delay:"2.5s",blur:!1}];return e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background via-background to-primary/6"}),e.jsxs("div",{className:"absolute inset-0 opacity-30",children:[e.jsx("svg",{className:"absolute bottom-0 left-0 w-full h-64",viewBox:"0 0 1440 320",preserveAspectRatio:"none",children:e.jsx("path",{fill:"hsl(var(--primary) / 0.1)",d:"M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,133.3C672,117,768,107,864,122.7C960,139,1056,181,1152,186.7C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"})}),e.jsx("svg",{className:"absolute bottom-0 left-0 w-full h-48",viewBox:"0 0 1440 320",preserveAspectRatio:"none",children:e.jsx("path",{fill:"hsl(var(--accent) / 0.05)",d:"M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,208C672,213,768,203,864,186.7C960,171,1056,149,1152,154.7C1248,160,1344,192,1392,208L1440,224L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"})})]}),s.map((r,n)=>e.jsx("div",{className:`absolute ${r.size}
11`,style:{top:r.top,bottom:r.bottom,left:r.left,right:r.right,opacity:r.opacity,animationDelay:r.delay},children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float",style:{filter:r.blur?"blur(3px)":"none"}})},n)),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/70 via-transparent to-background/50"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/3 via-transparent to-accent/3"})]})});Is.displayName="ChatBackgroundLogoScattered";const Ms=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-background"}),e.jsx("div",{className:"absolute inset-0 opacity-[0.03]",style:{transform:"rotate(-15deg) scale(1.5)"},children:e.jsx("div",{className:"flex flex-col gap-32",children:[...Array(8)].map((s,r)=>e.jsx("div",{className:"flex gap-32 justify-center",children:[...Array(8)].map((n,i)=>e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-16 h-16 object-contain",style:{opacity:Math.random()*.5+.5}},i))},r))})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-radial from-transparent via-background/50 to-background"}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-primary/5 to-accent/3"})]}));Ms.displayName="ChatBackgroundLogoDiagonal";const Ls=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background via-background to-primary/4"}),e.jsx("div",{className:"absolute -top-32 -left-32 w-80 h-80 opacity-[0.04]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain",style:{filter:"blur(40px)"}})}),e.jsx("div",{className:"absolute -bottom-32 -right-32 w-80 h-80 opacity-[0.04]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain",style:{filter:"blur(40px)"}})}),e.jsx("div",{className:"absolute top-[30%] right-[8%] w-20 h-20 opacity-[0.03]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float"})}),e.jsx("div",{className:"absolute bottom-[30%] left-[8%] w-20 h-20 opacity-[0.03]",children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain animate-float",style:{animationDelay:"2s"}})}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background/40 via-transparent to-background/40"})]}));Ls.displayName="ChatBackgroundLogoCorners";const Bs=m.memo(()=>e.jsxs("div",{className:"fixed inset-0 overflow-hidden pointer-events-none",style:{zIndex:0},children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-br from-background via-background to-primary/5"}),e.jsx("div",{className:"absolute inset-0",children:[{x:"10%",y:"80%",size:"w-16 h-16",opacity:.02},{x:"18%",y:"65%",size:"w-18 h-18",opacity:.025},{x:"28%",y:"52%",size:"w-20 h-20",opacity:.03},{x:"40%",y:"42%",size:"w-22 h-22",opacity:.035},{x:"54%",y:"35%",size:"w-24 h-24",opacity:.04},{x:"68%",y:"32%",size:"w-22 h-22",opacity:.035},{x:"80%",y:"25%",size:"w-20 h-20",opacity:.03},{x:"88%",y:"15%",size:"w-18 h-18",opacity:.025}].map((s,r)=>e.jsx("div",{className:`absolute ${s.size}`,style:{left:s.x,top:s.y,opacity:s.opacity,transform:"translate(-50%, -50%)"},children:e.jsx("img",{src:"../../../public/favicon.ico",alt:"",className:"w-full h-full object-contain",style:{filter:"blur(1px)"}})},r))}),e.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-background/60 via-trans
11parent to-background/30"})]}));Bs.displayName="ChatBackgroundLogoPath";const I={country:"Hey there! 👋 Where are you heading for your studies?",city:"Great choice! Which city will you be studying in? 🏙️",university:"Almost there! Which university are you joining? 🎓",budget:"What's your weekly budget for accommodation? 💰",preferences:"Any specific preferences? This helps us find the perfect match! ✨",results:"Here's what we found for you! 🏠"},Xs=()=>{const s=pe(),r=ge();m.useRef(null);const n=m.useRef(null),i=L(c=>c.homes.step),t=L(c=>c.homes.searchFilters),l=L(c=>c.homes.filteredListings),u=L(c=>c.homes.wishlist),x=L(c=>c.homes.viewMode);m.useEffect(()=>{s(be(Pe))},[s]),m.useEffect(()=>{const c=setTimeout(()=>{var j;(j=n.current)==null||j.scrollIntoView({behavior:"smooth",block:"end"})},100);return()=>clearTimeout(c)},[i]);const d=q.map(c=>({value:c.code,label:c.name,flag:c.flag,description:`${c.currency} • From ${c.currencySymbol}${c.averageWeeklyRent}/week`})),v=c=>{const j=q.find(T=>T.code===c);j&&(s(Ne({country:j.name,countryCode:j.code,currency:j.currency,currencySymbol:j.currencySymbol})),setTimeout(()=>s(k("city")),300))},y=c=>{s(we(c)),setTimeout(()=>s(k("university")),300)},w=c=>{s(ke(c)),setTimeout(()=>s(k("budget")),300)},a=c=>{s(Ce(c)),setTimeout(()=>s(k("preferences")),300)},h=c=>{c.roomTypes.forEach(j=>s(Se(j))),c.amenities.forEach(j=>s(Ie(j))),s(Me(c.maxDistance)),s(Z()),setTimeout(()=>s(k("results")),300)},g=()=>{s(Z()),s(k("results"))},P=c=>{s(Le(c)),r(`/homes/listing/${c.id}`)};return e.jsxs("div",{className:"flex-1 flex flex-col relative overflow-hidden bg-background",children:[e.jsx(ae,{}),e.jsx(ts,{currentStep:i,onStepClick:c=>s(k(c))}),e.jsx(fe,{className:"flex-1 relative z-10",children:e.jsxs("div",{className:"min-h-full pb-8",children:[e.jsxs(se,{mode:"wait",children:[i==="country"&&e.jsxs(p.div,{initial:{opacity:0}
11,animate:{opacity:1},exit:{opacity:0},children:[e.jsx(N,{message:I.country}),e.jsx(rs,{options:d,onSelect:v,selectedValue:t.countryCode,columns:2})]},"country"),i==="city"&&e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[e.jsx(N,{message:`I'm heading to ${t.country}!`,isUser:!0,countryCode:t.countryCode}),e.jsx(N,{message:I.city}),e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsx("div",{className:"max-w-3xl mx-auto ml-[3.5rem] lg:ml-auto lg:pl-[3.5rem]",children:e.jsx(ls,{countryCode:t.countryCode,currencySymbol:t.currencySymbol,onSelect:y,selectedCity:t.city})})})]},"city"),i==="university"&&e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[e.jsx(N,{message:`I'll be studying in ${t.city}!`,isUser:!0}),e.jsx(N,{message:I.university}),e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsx("div",{className:"max-w-3xl mx-auto ml-[3.5rem] lg:ml-auto lg:pl-[3.5rem]",children:e.jsx(os,{city:t.city,onSelect:w,selectedUniversity:t.university})})})]},"university"),i==="budget"&&e.jsxs(p.div,{initial:{opacity:0}
11,animate:{opacity:1},exit:{opacity:0},children:[e.jsx(N,{message:t.university==="any"?"I haven't decided on a university yet":`I'm joining ${t.university}!`,isUser:!0}),e.jsx(N,{message:I.budget}),e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsx("div",{className:"max-w-3xl mx-auto ml-[3.5rem] lg:ml-auto lg:pl-[3.5rem]",children:e.jsx(xs,{city:t.city,currencySymbol:t.currencySymbol,onSelect:a,selectedBudget:t.budgetRange.min>0?t.budgetRange:void 0})})})]},"budget"),i==="preferences"&&e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[e.jsx(N,{message:`My budget is ${t.currencySymbol}${t.budgetRange.min} - ${t.currencySymbol}${t.budgetRange.max} per week`,isUser:!0}),e.jsx(N,{message:I.preferences}),e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsx("div",{className:"max-w-3xl mx-auto ml-[3.5rem] lg:ml-auto lg:pl-[3.5rem]",children:e.jsx(bs,{onSelect:h,onSkip:g})})})]},"preferences"),i==="results"&&e.jsxs(p.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},children:[e.jsx(N,{message:"Show me what's available!",isUser:!0}),e.jsx(N,{message:I.results}),e.jsx("div",{className:"w-full py-4 px-4 md:px-6",children:e.jsxs("div",{className:"max-w-3xl mx-auto ml-[3.5rem] lg:ml-auto lg:pl-[3.5rem]",children:[e.jsxs(p.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.2},className:"mb-6 p-5 rounded-xl bg-gradient-to-br from-primary/5 to-[hsl(var(--homes-accent))]/5 border border-primary/20",children:[e.jsxs("div",{className:"flex items-center gap-2 text-sm text-[hsl(var(--homes-accent))] mb-4",children:[e.jsx(ye,{className:"w-5 h-5"}),e.jsxs("span",{className:"font-medium",children:["Found ",l.length," matching properties"]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-sm text-muted-foreground",children:[e.jsxs("span",{className:"px-2 py-1 rounded-md bg-background/80",children:["📍 ",t.city,", ",t.country]}),t.university&&t.university!=="any"&&e.jsxs("span",{className:"px-2 py-1 rounded-md bg-background/80",children:["🎓 Near ",t.university]}),e.jsxs("span",{className:"px-2 py-1 rounded-md bg-background/80",children:["💰 ",t.currencySymbol,t.budgetRange.min," - ",t.currencySymbol,t.budgetRange.max,"/week"]})]}),e.jsxs(R,{variant:"ghost",size:"sm",onClick:()=>s(k("preferences")),className:"mt-4 text-primary hover:text-primary/80",children:[e.jsx(Je,{className:"w-4 h-4 mr-2"}),"Refine Search"]})]}),e.jsx(ws,{accommodations:l,wishlist:u,viewMode:x,onViewModeChange:c=>s(ve(c)),onWishlistToggle:c=>s(je(c)),onAccommodationClick:P})]})})]},"results")]}),e.jsx("div",{ref:n})]})})]})};export{Xs as default};

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.