1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35],{3998:(e,s,t)=>{t.d(s,{$:()=>o});var r=t(95155),l=t(12115),a=t(46673),i=t(83101),n=t(64269);let c=(0,i.F)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",outlineWhite:"border border-white bg-transparent text-white hover:bg-white hover:text-blue-600",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),o=l.forwardRef((e,s)=>{let{className:t,variant:l,size:i,asChild:o=!1,...d}=e,x=o?a.DX:"button";return(0,r.jsx)(x,{className:(0,n.cn)(c({variant:l,size:i,className:t})),ref:s,...d})});o.displayName="Button"},17918:(e,s,t)=>{t.d(s,{A:()=>a});var r=t(95155),l=t(64269);function a(e){let{icon:s,label:t,isSelected:a,onClick:i}=e;return s?(0,r.jsxs)("div",{onClick:i,className:(0,l.cn)("relative flex flex-col items-center justify-center p-4 sm:p-6 rounded-xl border-2 cursor-pointer transition-all duration-200","bg-white/60 border-gray-200 backdrop-blur-sm","hover:border-blue-400 hover:bg-white/80 hover:shadow-md",a&&"border-blue-500 bg-blue-50 ring-2 ring-blue-100 shadow-md"),children:[(0,r.jsx)("div",{className:(0,l.cn)("transition-colors duration-200 mb-3",a?"text-blue-600":"text-gray-600"),children:(0,r.jsx)(s,{})}),a&&(0,r.jsx)("div",{className:"absolute -top-2 -right-2 h-5 w-5 bg-blue-500 rounded-full border-2 border-white flex items-center justify-center",children:(0,r.jsx)("svg",{className:"h-3 w-3 text-white",fill:"currentColor",viewBox:"0 0 20 20",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})})}),(0,r.jsx)("p",{className:(0,l.cn)("font-semibold text-center text-sm sm:text-base transition-colors duration-200",a?"text-blue-700":"text-gray-700"),children:t})]}):(console.error("SelectionCard: Icon is undefined for label:",t),null)}},80035:(e,s,t)=>{t.r(s),t.d(s,{default:()=>E});var r=t(95155),l=t(12115),a=t(3998),i=t(54354),n=t(11636),c=t(15239),o=t(35299),d=t(61654),x=t(71360),m=t(42529),u=t(78874),g=t(64269),h=t(94747);function p(e){let{onFilesUpdate:s,existingFiles:t=[],maxFiles:i=10}=e,p=(0,l.useRef)(null),{files:b,isProcessing:j,stats:f,addFiles:v,removeFile:y,processBatch:N,clearAll:w,formatSize:k}=(0,h.Iv)({onSuccess:()=>{},onError:e=>{console.error("Upload error:",e)}}),[C,A]=(0,l.useState)({});(0,l.useEffect)(()=>{let e={};b.forEach(s=>{if(s.file&&!C[s.id]){let t=URL.createObjectURL(s.file);e[s.id]=t}}),Object.keys(e).length>0&&A(s=>({...s,...e}))},[b]),(0,l.useEffect)(()=>{let e=new Set(b.map(e=>e.id)),s=[];Object.entries(C).forEach(t=>{let[r,l]=t;e.has(r)||s.push(l)}),s.length>0&&(s.forEach(e=>URL.revokeObjectURL(e)),A(s=>{let t={...s};return Object.keys(t).forEach(s=>{e.has(s)||delete t[s]}),t}))},[b,C]),(0,l.useEffect)(()=>()=>{Object.values(C).forEach(e=>{URL.revokeObjectURL(e)})},[]),(0,l.useEffect)(()=>{s(b.filter(e=>"compressed"===e.status&&e.result).map(e=>e.result.file))},[b,s]);let R=(0,l.useCallback)(async e=>{let s=i-b.length;s<=0||(v(e.slice(0,s),"gallery"),await N())},[b.length,i,v,N]),{getRootProps:P,getInputProps:U,isDragActive:S}=(0,n.VB)({onDrop:R,accept:{"image/jpeg":[],"image/png":[],"image/webp":[]},multiple:!0,disabled:b.length>=i||j}),L=f.errors>0,O=f.ready===f.total&&f.total>0;return(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{...P(),onClick:()=>{var e;return!(b.length>=i||j)&&(null==(e=p.current)?void 0:e.click())},className:(0,g.cn)("border-2 border-dashed rounded-lg p-6 text-center transition-colors",b.length>=i||j?"border-gray-300 bg-gray-100 cursor-not-allowed opacity-60":S?"border-green-500 bg-green-100 cursor-pointer":"border-blue-400 bg-blue-50 hover:bg-blue-100 cursor-pointer"),children:[(0,r.jsx)("input",{...U(),ref:p}),j?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{className:"mx-auto h-12 w-12 mb-3 animate-spin text-blue-500"}),(0,r.jsxs)("p",{className:"text-gray-700",children:["Compressing ",f.compressing," image",1!==f.compressing?"s":"","..."]}
1),(0,r.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:[f.pending," pending, ",f.ready," ready"]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:(0,g.cn)("mx-auto h-12 w-12 mb-3",b.length>=i?"text-gray-400":"text-blue-400")}),(0,r.jsx)("p",{className:(0,g.cn)(b.length>=i?"text-gray-500":"text-gray-700"),children:b.length>=i?"Maximum images reached (".concat(i,"/").concat(i,")"):"Drag & drop photos here, or click to select"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"JPEG, PNG, WebP only. Max 1MB after compression."})]}),b.length>0&&!j&&(0,r.jsxs)("p",{className:(0,g.cn)("text-sm font-medium mt-1",b.length>=i?"text-orange-600":"text-blue-600",L&&"text-red-600"),children:[f.ready,"/",b.length," ready",f.errors>0&&" ⢠".concat(f.errors," failed"),O&&" ⢠All images compressed!"]})]}),b.length>0&&(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,r.jsx)("div",{className:"text-gray-600",children:f.total>0&&(0,r.jsxs)(r.Fragment,{children:["Total: ",k(f.totalOriginalSize)," â ",k(f.totalOriginalSize-(f.totalOriginalSize-f.totalCompressedSize)),f.totalCompressedSize>0&&(0,r.jsxs)("span",{className:"text-green-600 ml-2",children:["(",Math.round((f.totalOriginalSize-f.totalCompressedSize)/f.totalOriginalSize*100),"% saved)"]})]})}),b.length>0&&(0,r.jsx)(a.$,{variant:"ghost",size:"sm",onClick:()=>{w(),s([])},className:"text-red-600 hover:text-red-700 hover:bg-red-50",children:"Clear all"})]}),b.length>0&&(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-4",children:b.map(e=>{let s=C[e.id],t="compressed"===e.status,l="error"===e.status,i="compressing"===e.status;return(0,r.jsxs)("div",{className:(0,g.cn)("relative group aspect-video rounded-lg overflow-hidden shadow-md border-2",t?"border-green-400":l?"border-red-400":"border-gray-200"),children:[s&&(0,r.jsx)(c.default,{src:s,alt:e.file.name,fill:!0,style:{objectFit:"cover"},className:"transition-transform duration-200"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/40 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center",children:(0,r.jsx)(a.$,{variant:"destructive",size:"icon",className:"rounded-full",onClick:s=>{s.stopPropagation(),y(e.id)},children:(0,r.jsx)(x.A,{className:"h-4 w-4"})})}),(0,r.jsxs)("div",{className:(0,g.cn)("absolute top-2 left-2 px-2 py-1 rounded text-xs font-medium text-white",t?"bg-green-500":l?"bg-red-500":"bg-blue-500"),children:[t&&(0,r.jsx)(m.A,{className:"h-3 w-3 inline mr-1"}),l&&(0,r.jsx)(u.A,{className:"h-3 w-3 inline mr-1"}),i&&(0,r.jsx)(o.A,{className:"h-3 w-3 inline mr-1 animate-spin"}),t?"Ready":l?"Failed":i?"Compressing":"Pending"]}),e.result&&(0,r.jsx)("div",{className:"absolute bottom-0 left-0 right-0 bg-black/60 text-white text-xs p-1 text-center",children:k(e.result.compressedSize)})]},e.id)})})]})}function b(e){let{onFileUpdate:s,existingFile:t=null}=e,i=(0,l.useRef)(null),x=(0,l.useRef)(null),[p,b]=(0,l.useState)(null),j=(0,l.useRef)(null),{isCompressing:f,progress:v,error:y,result:N,compressAndPrepare:w,clear:k,getStats:C,formatSize:A}=(0,h.uo)({onSuccess:e=>{s(e.file)},onError:e=>{console.error("Floor plan compression error:",e),s(null)}});(0,l.useEffect)(()=>{!t&&N&&(k(),x.current&&(URL.revokeObjectURL(x.current),x.current=null,b(null),j.current=null))},[t,N,k]),(0,l.useEffect)(()=>{if(N&&N.file.name!==j.current){x.current&&URL.revokeObjectURL(x.current);let e=URL.createObjectURL(N.file);x.current=e,j.current=N.file.name,b(e)}return()=>{x.current&&(URL.revokeObjectURL(x.current),x.current=null)}},[N]);let R=(0,l.useCallback)(async e=>{if(0===e.length)return;let s=e[0];k(),j.current=null,await w(s,"gallery")},[w,k]),{getRootProps:P,getInputProps:U,isDragActive:S}=(0,n.VB)({onDrop:R,accept:{"image/jpeg":[],"image/png":[],"image/webp":[]},multiple:!1,disabled:f}),L=C();return(0,r.jsxs)("div",{className:"space-y-4",children:[!N&&(0,r.jsxs)("div",{...P(),onClick:()=>{var e;return!f&&(null==(e=i.current)?void 0:e.click())},className:(0,g.cn)("border-2 border-dashed rounded-lg p-6 text-center transition-colors",f?"border-gray-300 bg-gray-100 cursor-not-allowed opacity-60":S?"border-green-500 bg-green-100 cursor-pointer":"border-purple-400 bg-purple-50 hover:bg-purple-100 cursor-pointer"),children:[(0,r.jsx)("input",{...U(),ref:i}),f?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.A,{className:"mx-auto h-12 w-12 mb-3 animate-spin text-purple-500"}),(0,r.jsx)("p",{className:"text-gray-700",children:"Compressing floor plan..."}),(0,r.jsxs)("p",{className:"text-sm text-gray-500 mt-1",children:[v,"% complete"]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.A,{className:"mx-auto h-12 w-12 text-purple-400 mb-3"}),(0,r.jsx)("p",{className:"text-gray-700",children:"Drag & drop your floor plan here, or click to select"}),(0,r.jsx)("p",{className:"text-sm text-gray-500 mt-2",children:"JPEG, PNG, WebP only. Max 1MB."})]})]}),y&&!f&&(0,r.jsx)("div",{className:"p-3 bg-red-50 border border-red-200 rounded-lg",children:(0,r.jsxs)("p",{className:"text-red-600 text-sm flex items-center",children:[(0,r.jsx)(u.A,{className:"h-4 w-4 mr-2"}),"string"==typeof y?y:y.message]})}),N&&(0,r.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(m.A,{className:"h-5 w-5 text-green-500"}),(0,r.jsx)("p",{className:"text-sm font-medium text-gray-700",children:"Floor Plan Ready"})]}),(0,r.jsxs)(a.$,{variant:"outline",size:"sm",className:"text-red-600 border-red-200 hover:bg-red-50 hover:border-red-300",onClick:()=>{k(),s(null),b(null),j.current=null,x.current&&(URL.revokeObjectURL(x.current),x.current=null),i.current&&(i.current.value="")},children:[(0,r.jsx)(u.A,{className:"h-4 w-4 mr-1"}),"Remove"]})]}),L&&(0,r.jsxs)("div",{className:"text-sm text-gray-600 bg-gray-50 p-3 rounded-lg",children:[(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Original:"}),(0,r.jsx)("span",{children:L.original})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Compressed:"}),(0,r.jsx)("span",{className:"text-green-600 font-medium",children:L.compressed})]}),(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsx)("span",{children:"Saved:"}),(0,r.jsx)("span",{className:"text-green-600",children:L.ratio})]}),(0,r.jsxs)("div",{className:"flex justify-between text-xs text-gray-400 mt-1",children:[(0,r.jsx)("span",{children:"Dimensions:"}),(0,r.jsx)("span",{children:L.dimensions})]})]}),(0,r.jsxs)("div",{className:"relative aspect-video rounded-lg overflow-hidden shadow-md group",children:[p&&(0,r.jsx)(c.default,{src:p,alt:"Floor Plan Preview",fill:!0,style:{objectFit:"cover"},className:"transition-transform duration-200"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-black/0 group-hover:bg-black/10 transition-colors duration-200"})]})]})]})}var j=t(17918),f=t(71871),v=t(65993),y=t(81358),N=t(19408),w=t(55136),k=t(23164),C=t(46994),A=t(24947),R=t(45345),P=t(16485),U=t(10598);let S={apartment:f.A,house:v.A,villa:y.A,office:N.A,retail_space:w.A,land:k.A,commercial:C.A,garage:A.A},L={sale:R.A,rent:P.A},O=U.Ikc({title:U.YjP().min(5,{message:"Title must be at least 5 characters."}),property_type:U.YjP().min(1,{message:"Please select a property type."}),listing_type:U.YjP().min(1,{message:"Please select a listing type."})});function E(e){let{nextStep:s,updateFormData:t,formData:n}=e,[c,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{o(O.safeParse(n).success)},[n]);let d=(e,s)=>{t({[e]:s})};return(0,r.jsxs)("div",{className:"space-y-8 pb-24",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:["Are you looking to sell or rent? ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("p",{className:"text-gray-600 text-sm",children:"Choose your listing type to get started"})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:i.W.map(e=>(0,r.jsx)("div",{className:"relative group",children:(0,r.jsx)(j.A,{icon:L[e.value],label:e.label,isSelected:n.listing_type===e.value,onClick:()=>d("listing_type",e.value)})},e.value))})]}),(0,r.jsx)("div",{className:"bg-gray-50/80 p-6 rounded-2xl border border-gray-200 backdrop-blur-sm",children:(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:["Give your listing a catchy title ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("p",{className:"text-gray-600 text-sm",children:"Great titles get 3x more clicks. Be specific and highlight
1key features."})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"text",id:"title",name:"title",value:n.title||"",onChange:e=>{let{name:s,value:r}=e.target;t({[s]:r})},required:!0,className:"w-full px-6 py-4 bg-white border-2 border-gray-200 rounded-xl focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-gray-900 placeholder-gray-400 text-lg transition-all duration-200",placeholder:"e.g., Modern 2BR Apartment in Blloku with Balcony & Parking",maxLength:100}),(0,r.jsxs)("div",{className:"absolute bottom-2 right-4 text-xs text-gray-400",children:[(n.title||"").length,"/100"]})]})]})}),(0,r.jsxs)("div",{className:"space-y-6",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:["What type of property is it? ",(0,r.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,r.jsx)("p",{className:"text-gray-600 text-sm",children:"Select the category that best describes your property"})]}),(0,r.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4",children:i.JV.map(e=>(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(j.A,{icon:S[e.value],label:e.label,isSelected:n.property_type===e.value,onClick:()=>d("property_type",e.value)}),"apartment"===e.value&&(0,r.jsx)("div",{className:"absolute -top-2 -right-2 bg-orange-500 text-white text-xs px-2 py-1 rounded-full font-semibold",children:"Popular"})]},e.value))})]}),(0,r.jsxs)("div",{className:"bg-gray-50/80 p-6 rounded-2xl border border-gray-200 backdrop-blur-sm space-y-8",children:[(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"\uD83D\uDCF8 Upload Property Photos"}),(0,r.jsxs)("p",{className:"text-gray-600 text-sm",children:["Properties with great photos get ",(0,r.jsx)("span",{className:"text-blue-600 font-semibold",children:"5x more views"}),". Upload at least 3 high-quality images (maximum 10)."]})]}),(0,r.jsx)(p,{onFilesUpdate:e=>{t({images:e})},existingFiles:n.images})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 flex items-center",children:(0,r.jsx)("div",{className:"w-full border-t border-gray-200"})}),(0,r.jsx)("div",{className:"relative flex justify-center text-xs",children:(0,r.jsx)("span",{className:"bg-white px-3 py-1 rounded-full text-gray-500 border border-gray-200",children:"Optional"})})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsx)("h3",{className:"text-xl font-bold text-gray-900 mb-2",children:"\uD83D\uDCD0 Upload Floor Plan"}),(0,r.jsxs)("p",{className:"text-gray-600 text-sm",children:["Listings with floor plans get ",(0,r.jsx)("span",{className:"text-blue-600 font-semibold",children:"40% more inquiries"}),"."]})]}),(0,r.jsx)(b,{onFileUpdate:e=>{t({floor_plan_image:e})},existingFile:n.floor_plan_image})]})]}),(0,r.jsx)("div",{className:"fixed bottom-0 left-0 right-0 bg-white/80 backdrop-blur-sm p-4 border-t border-gray-200 shadow-lg z-10",children:(0,r.jsxs)("div",{className:"max-w-4xl mx-auto flex justify-between items-center",children:[(0,r.jsx)("div",{className:"text-sm text-gray-600",children:"Step 1 of 3 ⢠Next: Property Details"}),(0,r.jsx)(a.$,{onClick:()=>{c&&s()},disabled:!c,className:"bg-blue-600 hover:bg-blue-700 text-white font-semibold px-8 py-4 rounded-xl transition-all duration-200 shadow-md hover:shadow-lg flex items-center gap-2 disabled:bg-gray-400 disabled:cursor-not-allowed disabled:shadow-none",children:"Continue to Details"})]})})]})}}}]);
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.