1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2797],{66479:function(e,l,a){Promise.resolve().then(a.bind(a,53120))},53120:function(e,l,a){"use strict";a.r(l),a.d(l,{default:function(){return G}});var t=a(57437),n=a(88644),s=a(2265),r=a(16463),o=a(50315),i=a(67686),c=a(66648),u=a(87138),d=a(15448),v=a(33999),h=a(52524),p=a(53161),x=a(34946),m=a(72895),g=a(54038);let b=[{key:"photos",header:"",className:"w-16",render:e=>(0,t.jsx)(c.default,{src:(null==e?void 0:e.length)?e[0]:"/default-building.png",alt:"property-image",width:64,height:32,className:"object-cover rounded w-full h-8"})},{key:"address",header:"Address",className:"w-64"},{key:"listingType",header:"Type",className:"w-24",render:e=>{var l;return null===(l=x.DW.find(l=>l.value===e))||void 0===l?void 0:l.label}},{key:"listingId",header:"MLS\xae",className:"w-24"},{key:"listingStatus",header:"Status",className:"w-24",render:e=>{let{label:l,color:a}=x.tm.find(l=>l.value===e)||{};return(0,t.jsx)("span",{className:a,children:l})}},{key:"listingDate",header:"Listing Date",className:"w-28"},{key:"listingPrice",header:"Listing Price",className:"w-28 ".concat(p.ZA),render:e=>e?"$".concat((0,h.uf)(e)):"-"},{key:"soldDate",header:"Sold Date",className:"w-28",render:(e,l)=>l?e||"-":(0,t.jsxs)(u.default,{href:"/sign-in?redirectTo=".concat(encodeURIComponent("/search".concat(window.location.search))),className:"relative","data-tooltip-id":"search-sold-data","data-tooltip-content":"Please login to view sold data",children:[(0,t.jsx)("span",{className:"absolute inset-x-0",children:(0,t.jsx)(v.Z,{className:"w-5 h-5 text-gray-600 mx-auto"})}),(0,t.jsx)("span",{className:"".concat(!l&&"blur-sm select-none relative"),children:"Sign in"})]}),hide:e=>e&&"SOLD"!=e},{key:"soldPrice",header:"Sold Price",className:"w-28 ".concat(p.hM),render:(e,l)=>l?e?"$".concat((0,h.uf)(e)):"-":(0,t.jsxs)(u.default,{href:"/sign-in?redirectTo=".concat(encodeURIComponent("/search".concat(window.location.search))),className:"relative","data-tooltip-id":"search-sold-data","data-tooltip-content":"Please login to view sold data",children:[(0,t.jsx)("span",{className:"absolute inset-x-0",children:(0,t.jsx)(v.Z,{className:"w-5 h-5 text-gray-600 mx-auto"})}),(0,t.jsx)("span",{className:"".concat(!l&&"blur-sm select-none relative"),children:"Sign in"})]}),hide:e=>e&&"SOLD"!=e},{key:"closeDate",header:"Termination Date",className:"w-32 ".concat(p.Ej)},{key:"age",header:"Age",className:"w-20",render:e=>e?(0,t.jsxs)(t.Fragment,{children:[e," ",(0,t.jsx)("span",{className:"inline text-xs",children:1==e?"year":"years"})]}):"-"},{key:"bedroom",header:"Bed",className:"w-14"},{key:"bathroom",header:"Bath",className:"w-14"},{key:"livingArea",header:"Floor Size",className:"w-32",render:e=>e?(0,t.jsxs)(t.Fragment,{children:[(0,h.uf)(e)," ",(0,t.jsx)("span",{className:"inline text-xs",children:m.VN})]}):"-"}],f=(0,s.memo)(e=>{let{data:l,pageIndex:a,pageSize:s,listingStatus:r}=e,{user:o}=(0,n.a)(),i=(a*s+(null==l?void 0:l.length)).toString().length,c="".concat(6*i,"px");return(null==l?void 0:l.length)?(0,t.jsxs)("div",{className:"relative overflow-x-auto w-full",style:{WebkitOverflowScrolling:"touch"},children:[(0,t.jsxs)("div",{className:"border border-gray-200 min-w-max",children:[(0,t.jsxs)("div",{className:"flex items-center bg-slate-100 font-semibold",children:[(0,t.jsx)("span",{className:"flex-none ml-1",style:{width:c,minWidth:c},children:"#"}),b.filter(e=>{var l;return!(null===(l=e.hide)||void 0===l?void 0:l.call(e,r))}).map(e=>(0,t.jsx)("span",{className:"flex-none pr-2 py-2 ".concat(e.className),children:e.header},e.key))]}),(0,t.jsx)("div",{className:"bg-white divide-y divide-gray-100 w-full",children:l.map((e,l)=>(0,t.jsxs)(u.default,{href:"/listing/".concat(e.listingId),className:"flex items-center odd:bg-white even:bg-gray-50 hover:bg-gray-100",target:"_blank",children:[(0,t.jsx)("span",{className:"flex-none mx-0.5 text-2xs",style:{width:c,minWidth:c},children:a*s+l+1}),b.filter(e=>{var l;return!(null===(l=e.hide)||void 0===l?void 0:l.call(e,r))}).map(l=>(0,t.jsx)("span",{className:"flex-none pr-2 py-2 break-words ".concat(l.className),children:l.render?l.render(e[l.key],o):e[l.key]||"-"},l.key))]},e.id))})]}),(0,t.jsx)(g.u,{id:"search-sold-data",className:"!bg-white !text-gray-800 text-sm px-3 py-2 rounded-lg shadow-lg border"})]}):(0,t.jsx)("div",{className:"flex items-center w-full h-96 border rounded",children:(0,t.jsx)(d.Z,{})})});f.displayName="SearchTable";var j=a(43518),y=a.n(j),w=a(38472);a(85378);var N=a(26956);function k(e){let{listingId:l,address:a,city:t,image:n}=e;return'\n <div style="font-size:13px">\n <img\n src="'.concat(n||"/default-building.png",'"\n style="height:60px;width:100%;object-fit:cover;border-radius:6px"\n />\n <div style="font-weight:600;margin-top:6px">').concat(a,'</div>\n <div style="color:#666">').concat(t,'</div>\n <a\n href="/listing/').concat(l,'"\n target="_blank"\n style="color:#2563eb;font-weight:600;margin-top:6px;display:inline-block"\n >\n View details â\n </a>\n </div>\n ')}function M(e){let{filters:l,city:a,address:n,content:s,...r}=e;return(0,t.jsx)(S,{filters:l,city:a,address:n,content:s})}function S(e){let{filters:l,address:a,city:n,content:r}
1=e,[o,i]=(0,s.useState)({shown:0,total:0}),[c,u]=(0,s.useState)(!1),[d,v]=(0,s.useState)(!1),[p,x]=(0,s.useState)([]),m=(0,s.useRef)(null),g=(0,s.useRef)(a),b=(0,s.useRef)(n),f=(0,s.useRef)(l),j=(0,s.useRef)(null),M=(0,s.useRef)(null);async function S(e){var l,a,t;null===(l=j.current)||void 0===l||l.abort(),j.current=new AbortController;try{v(!0);let l=await w.Z.get("".concat(N.Z.BASE_API_PATH,"/search"),{signal:j.current.signal,params:{"location.topLeftLatitude":e.getNorth(),"location.topLeftLongitude":e.getWest(),"location.bottomRightLatitude":e.getSouth(),"location.bottomRightLongitude":e.getEast(),listingTypes:null===(a=f.current)||void 0===a?void 0:a.listingType,listingStatuses:null===(t=f.current)||void 0===t?void 0:t.listingStatus,sortField:"listingDate",sortDirection:"DESC",page:0,size:750,address:g.current,cities:b.current,...f.current,listingType:void 0,listingStatus:void 0}});x(l.data.content),i({shown:l.data.numberOfElements,total:l.data.totalElements})}catch(e){"CanceledError"!==e.name&&console.error(e)}finally{v(!1)}}return(0,s.useEffect)(()=>{if(m.current)return;let e=new(y()).Map({container:"map",style:"https://api.maptiler.com/maps/streets/style.json?key=wuv7QSz64il0xxzHW9J7",center:[-123.1207,49.2827],zoom:12});return m.current=e,e.on("load",async()=>{navigator.geolocation&&navigator.geolocation.getCurrentPosition(l=>{var a;let{latitude:t,longitude:n}=l.coords;null===(a=M.current)||void 0===a||a.remove();let s=new(y()).Popup({offset:18,closeButton:!0}).setText("You are here"),r=document.createElement("div");r.className="relative w-[18px] h-[18px] cursor-pointer",r.innerHTML='\n <span class="absolute inset-0 rounded-full bg-green-500 opacity-40 animate-ping"></span>\n <span class="relative block w-[18px] h-[18px] rounded-full bg-green-600 border-2 border-white"></span>\n ',M.current=new(y()).Marker({element:r,anchor:"center"}).setLngLat([n,t]).setPopup(s).addTo(e),e.flyTo({center:[n,t],zoom:13,duration:1200})},e=>{console.log("Location unavailable",e)},{enableHighAccuracy:!0,timeout:8e3,maximumAge:0});let l=await e.loadImage("/map/red-map-pin.png");e.hasImage("property-pin")||e.addImage("property-pin",l.data),e.addSource("properties",{type:"geojson",data:{type:"FeatureCollection",features:[]},cluster:!0,clusterMaxZoom:15,clusterRadius:50}),e.addLayer({id:"clusters",type:"circle",source:"properties",filter:["has","point_count"],paint:{"circle-color":"blue","circle-radius":["step",["get","point_count"],20,100,26,500,32],"circle-opacity":.7}}),e.addLayer({id:"cluster-count",type:"symbol",source:"properties",filter:["has","point_count"],layout:{"text-field":"{point_count_abbreviated}","text-size":14,"text-font":["Open Sans Bold","Arial Unicode MS Bold"]},paint:{"text-color":"#ffffff","text-halo-color":"rgba(0,0,0,0.35)","text-halo-width":1.5}}),e.addLayer({id:"property-points",type:"symbol",source:"properties",filter:["!",["has","point_count"]],layout:{"icon-image":"property-pin","icon-size":.9,"icon-anchor":"bottom","icon-allow-overlap":!0}}),e.on("click","property-points",l=>{if(!l.features||!l.features[0])return;let a=l.features[0],{listingId:t,address:n,city:s,image:r}=a.properties,o=a.geometry.coordinates.slice();new(y()).Popup({offset:12}).setLngLat(o).setHTML(k({listingId:t,address:n,city:s,image:r})).addTo(e)}),e.on("click","clusters",async l=>{let a=e.queryRenderedFeatures(l.point,{layers:["clusters"]});if(!a.length)return;let t=a[0],n=t.properties.cluster_id,s=t.properties.point_count,r=t.geometry.coordinates,o=new(y()).Popup({offset:12,maxWidth:"300px"}).setLngLat(r).setHTML("<div>Loading ".concat(s," properties...</div>")).addTo(e),i=e.getSource("properties");try{let e=await i.getClusterLeaves(n,Math.min(s,50),0);o.setHTML('\n <div style="max-height: min(200px, 60vh);overflow-y: auto;padding-right:4px">\n '.concat(e.map(e=>{let l=e.properties;return'\n <div style="margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #eee">\n '.concat(k({listingId:l.listingId,address:l.address,city:l.city,image:l.image}),"\n </div>\n ")}).join(""),"\n </div>\n "))}catch(e){console.error(e),o.setHTML("<div>Failed to load properties</div>")}}),e.on("mouseenter","clusters",()=>{e.getCanvas().style.cursor="pointer"}),e.on("mouseleave","clusters",()=>{e.getCanvas().style.cursor=""}),e.on("mouseenter","property-points",()=>{e.getCanvas().style.cursor="pointer"}),e.on("mouseleave","property-points",()=>{e.getCanvas().style.cursor=""}
1),S(e.getBounds()),u(!0),e.addSource("city-boundaries",{type:"geojson",data:{type:"FeatureCollection",features:[]}}),e.addLayer({id:"city-fill",type:"fill",source:"city-boundaries",paint:{"fill-color":"#2563eb","fill-opacity":.1}}),e.addLayer({id:"city-outline",type:"line",source:"city-boundaries",paint:{"line-color":"#2563eb","line-width":2}}),e.on("moveend",()=>{S(e.getBounds())})}),()=>{e.remove(),m.current=null}},[]),(0,s.useEffect)(()=>{if(!m.current||!p)return;let e=m.current.getSource("properties");if(!e)return;let l={type:"FeatureCollection",features:p.filter(e=>{var l,a;return(null===(l=e.point)||void 0===l?void 0:l.lat)&&(null===(a=e.point)||void 0===a?void 0:a.lon)}).map(e=>{var l;return{type:"Feature",geometry:{type:"Point",coordinates:[e.point.lon,e.point.lat]},properties:{listingId:e.listingId,address:e.address,city:e.city,image:(null===(l=e.photos)||void 0===l?void 0:l.length)?e.photos[0]:"/default-building.png"}}})};e.setData(l)},[p]),(0,s.useEffect)(()=>{if(f.current=l,!m.current)return;let e=m.current;e.isStyleLoaded()&&S(e.getBounds())},[l]),(0,s.useEffect)(()=>{if(!m.current||!c||!n)return;b.current=n;let e=m.current;(async()=>{try{let l=await fetch("/map/boundary/".concat(n.toLowerCase().replace(/\s+/g,"_"),".json")),a=await l.json(),t=e.getSource("city-boundaries");if(!t)return;t.setData(a);let s=function(e){let l=new(y()).LngLatBounds;return e.geometry.coordinates[0].forEach(e=>{let[a,t]=e;return l.extend([a,t])}),l}(a);e.fitBounds(s,{padding:40,duration:800})}catch(e){console.error("Failed to load city boundary",e)}})()},[n,c]),(0,s.useEffect)(()=>{if(!m.current||n)return;b.current="";let e=m.current.getSource("city-boundaries");null==e||e.setData({type:"FeatureCollection",features:[]})},[n]),(0,s.useEffect)(()=>{if(!m.current||!c||(g.current=a,!a||!(null==r?void 0:r.length)))return;let e=new(y()).LngLatBounds,l=!1;if(r.forEach(a=>{var t,n;(null===(t=a.point)||void 0===t?void 0:t.lat)&&(null===(n=a.point)||void 0===n?void 0:n.lon)&&(e.extend([a.point.lon,a.point.lat]),l=!0)}),l){if(1===r.length){let{lon:e,lat:l}=r[0].point;m.current.flyTo({center:[e,l],zoom:14,duration:800})}else m.current.fitBounds(e,{padding:40,duration:800})}},[a,r,c]),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-full h-1 overflow-hidden relative",children:d&&(0,t.jsx)("div",{className:"h-full w-1/3 bg-blue-500 animate-slide"})}),(0,t.jsx)("div",{id:"map",className:"flex-1 w-full rounded-lg bg-gray-100 mb-1 shadow min-h-72 h-96"}),(0,t.jsxs)("span",{className:"absolute top-2 bg-white right-1 p-1 rounded-lg bg-opacity-75",children:["Showing ",o.shown," of"," ",o.total?(0,h.uf)(o.total):0," results"]})]})}var L=a(31458),C=a(31989),Z=a(66348);function F(e){let{activeUp:l,activeDown:a,...n}=e;return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...n,children:[(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3 12 7.5M7.5 3v13.5",stroke:l?"#155dfc":void 0}),(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21 16.5L16.5 21 12 16.5M16.5 21V7.5",stroke:a?"#155dfc":void 0})]})}var D=a(96062),B=a(70448),T=a(15079),P=a(61481);function A(e){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5"})})}var E=a(10866),W=a(82878);function I(e){let{activeFilters:l,removeFilter:a,children:n}=e;return 0===Object.keys(l).length?null:(0,t.jsxs)("div",{className:"flex flex-wrap gap-1 lg:contents",children:[n,Object.keys(l).map(e=>{let n=_.find(l=>l.key==e);return(0,t.jsxs)("span",{className:"inline-flex flex-none px-1 h-8 items-center border rounded",children:[(null==n?void 0:n.label)?"".concat(n.label,":"):null," ",(null==n?void 0:n.render)?null==n?void 0:n.render(l[e]):l[e],(0,t.jsx)(W.Tw,{className:"w-5 h-5 ml-1 cursor-pointer",onClick:()=>a(e)})]},e)})]})}var z=a(4490);let _=[{key:"buildingAddress",label:"Building"},{key:"listingType",render:e=>{var l;return null===(l=x.DW.find(l=>l.value==e))||void 0===l?void 0:l.label}},{key:"listingStatus",render:e=>{var l;return null===(l=x.tm.find(l=>l.value==e))||void 0===l?void 0:l.label}},{key:"bedroomsMin",label:"Min Bed"},{key:"bedroomsMax",label:"Max Bed"},{key:"bathroomsMin",label:"Min Bath"},{key:"bathroomsMax",label:"Max Bath"},{key:"listingPriceMin",label:"Min Price",render:e=>"$".concat((0,h.D)(e))}
1,{key:"listingPriceMax",label:"Max Price",render:e=>"$".concat((0,h.D)(e))},{key:"ageMin",label:"Min Age",render:e=>"".concat(e," ").concat(1==e?"year":"years")},{key:"ageMax",label:"Max Age",render:e=>"".concat(e," ").concat(1==e?"year":"years")},{key:"listingDateFrom",label:"Listing From",render:e=>(0,t.jsx)("span",{className:"".concat(p.ZA," ml-1"),children:e})},{key:"listingDateTo",label:"Listing To",render:e=>(0,t.jsx)("span",{className:"".concat(p.ZA," ml-1"),children:e})},{key:"soldDateFrom",label:"Sold From",render:e=>(0,t.jsx)("span",{className:"".concat(p.hM," ml-1"),children:e})},{key:"soldDateTo",label:"Sold To",render:e=>(0,t.jsx)("span",{className:"".concat(p.hM," ml-1"),children:e})},{key:"terminationDateFrom",label:"Termination From",render:e=>(0,t.jsx)("span",{className:"".concat(p.Ej," ml-1"),children:e})},{key:"terminationDateTo",label:"Termination To",render:e=>(0,t.jsx)("span",{className:"".concat(p.Ej," ml-1"),children:e})}],O=new Set(_.map(e=>e.key)),R=[10,20,40,50];function H(){let e=(0,r.useSearchParams)(),l=(0,r.useRouter)(),a=Number(e.get("size")),[n,o]=(0,s.useState)(Number(e.get("page"))||0),[c,u]=(0,s.useState)(a&&R.includes(a)?a:20),[d,v]=(0,s.useState)(e.get("sortField")||"listingDate"),[p,g]=(0,s.useState)(e.get("sortDirection")||m.jo),[b,j]=(0,s.useState)(e.get("address")||""),[y,w]=(0,s.useState)(e.get("city")||""),[N,k]=(0,s.useState)(Object.fromEntries(Array.from(e).filter(e=>{let[l]=e;return O.has(l)}))),S=(0,s.useRef)({...N}),P=(0,s.useCallback)(e=>{S.current={...S.current,...e}},[]),A=(0,s.useCallback)((e,l)=>{k(l=>{let a={...l};return delete a[e],S.current=a,a}),o(0)},[]),{data:W,loading:_,error:H}=(0,z.Z)({runOnMount:!0,options:{url:"search",params:{page:n,size:c,sortField:d,sortDirection:p,address:b,listingTypes:N.listingType,listingStatuses:N.listingStatus,cities:y,...N}},deps:[n,c,d,p,b,y,N]});(0,s.useEffect)(()=>{let e=new URLSearchParams;Object.entries({address:b,page:n,size:c,sortField:d,sortDirection:p,city:y,...N}).forEach(l=>{let[a,t]=l;t&&e.set(a,t)}),l.replace("/search?".concat(e.toString()))},[b,n,c,d,p,y,N]);let U=(0,s.useMemo)(()=>null==W?void 0:W.content,[null==W?void 0:W.content]),q={};return Object.keys(N).forEach(e=>{let l=N[e];l&&(q[e]=l)}),(0,t.jsxs)("div",{className:"flex flex-col flex-1",children:[(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row items-center gap-2 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex flex-none items-center gap-x-1 px-1 rounded w-full text-base md:text-sm md:w-96 border border-gray-300",children:[(0,t.jsx)(L.Z,{className:"w-5 h-5 flex-none"}),(0,t.jsx)("input",{value:b||"",placeholder:"Search by address",className:"px-2 h-8 w-full ring-0 focus:ring-0 outline-none focus:outline-none",onChange:e=>{j(e.target.value),o(0)}})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:flex lg:flex-row lg:flex-wrap gap-2 w-full md:w-96 lg:w-auto lg:flex-none",children:[(0,t.jsxs)("div",{className:"col-span-2 flex gap-1 lg:gap-2",children:[(0,t.jsxs)("select",{id:"city",name:"city",value:y||"",onChange:e=>{w(e.target.value),o(0)},className:"block w-full lg:w-48 h-8 rounded border border-gray-300 bg-white px-2 focus:outline-none focus:ring-0",children:[(0,t.jsx)("option",{value:"",disabled:!0,hidden:!0,children:"City"}),(0,t.jsx)("option",{value:"",children:"All cities"}),x._I.map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))]}),(0,t.jsxs)("select",{id:"listingType",name:"listingType",value:N.listingType||"",onChange:e=>{S.current.listingType=e.target.value,k({...N,listingType:e.target.value}),o(0)},className:"block w-full lg:w-48 h-8 rounded border border-gray-300 bg-white px-2 focus:outline-none focus:ring-0",children:[(0,t.jsx)("option",{value:"",disabled:!0,hidden:!0,children:"Listing type"}),(0,t.jsx)("option",{value:"",children:"All listings"}),x.DW.slice(0,7).map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))]}),(0,t.jsxs)("select",{id:"listingStatus",name:"listingStatus",value:N.listingStatus||"",onChange:e=>{S.current.listingStatus=e.target.value,k({...N,listingStatus:e.target.value,soldDateFrom:"SOLD"===e.target.value?N.soldDateFrom:void 0,soldDateTo:"SOLD"===e.target.value?N.soldDateTo:void 0}),o(0)},className:"block w-full lg:w-48 h-8 rounded border border-gray-300 bg-white px-2 focus:outline-none focus:ring-0",children:[(0,t.jsx)("option",{value:"",disabled:!0,hidden:!0,children:"Listing status"}),(0,t.jsx)("option",{value:"",children:"All statuses"}),x.tm.slice(0,3).map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))]})]}),(0,t.jsx)(B.Z,{component:e=>{let{toggle:l}=e;return(0,t.jsx)(T.H,{actionButton:(0,t.jsx)(D.Z,{css:{bg:"bg-blue-700",color:"text-white"},onClick:()=>{k(S.current),l()},children:"Apply"}),width:"w-full lg:w-2/3",onClose:l,children:(0,t.jsx)(K,{initial:N,updateFilters:P})})},globalClose:!1,children:e=>(0,t.jsx)(D.Z,{css:{bg:"bg-blue-700",color:"text-white"},onClick:e,children:"More Filters"})}),0===Object.keys(q).length?null:(0,t.jsx)(D.Z,{onClick:()=>{S.current={},k({}),w("")},children:"Clear All Filters"})]}),(0,t.jsx)(I,{activeFilters:q,removeFilter:A,children:y?(0,t.jsxs)("span",{className:"inline-flex flex-none px-1 h-8 items-center border rounded",children:[y,(0,t.jsx)(E.Z,{className:"w-5 h-5 ml-1 cursor-pointer",onClick:()=>w("")})]}):null})]}),(0,t.jsxs)(V,{initialShowMap:!e.get("buildingAddress"),children:[(0,t.jsx)(M,{filters:N,city:y,address:b,content:U}),(0,t.jsxs)(i.Z,{data:W,loading:_,error:H,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between py-2 text-2xs sm:text-sm gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-x-1",children:[(0,t.jsx)("span",{children:(0,t.jsx)("span",{className:"hidden md:inline",children:"Sort by"})}),(0,t.jsx)("select",{id:"sortField",name:"sortField",defaultValue:d,onChange:e=>{let l=e.target.value;l===d?g(e=>e==m.aW?m.jo:m.aW):(v(l),g(m.jo))},className:"block md:w-28 h-8 rounded border border-gray-300 bg-white px-2 focus:outline-none focus:ring-0",children:[{label:"Listing Date",value:"listingDate"},{label:"Listing Price",value:"listingPrice"},{label:"Sold Date",value:"soldDate"},{label:"Sold Price",value:"soldPrice"},{label:"Floor Size",value:"livingArea"},{label:"Bedroom",value:"bedroom"},{label:"Bathroom",value:"bathroom"},{label:"Age",value:"age"}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))}),(0,t.jsx)(F,{activeUp:p===m.aW,activeDown:p===m.jo,className:"w-7 h-7 rounded-full bg-slate-200 p-1 text-gray-400 inline cursor-pointer",onClick:()=>g(e=>e==m.aW?m.jo:m.aW)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("p",{children:[(null==W?void 0:W.numberOfElements)?n+1:0,"-",null==W?void 0:W.numberOfElements," ","of ",(null==W?void 0:W.totalElements)?(0,h.uf)(W.totalElements):0]}),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsx)("button",{className:"rounded-full bg-slate-200 p-1 ".concat((null==W?void 0:W.first)&&"cursor-not-allowed"),onClick:()=>!W.first&&o(n-1),children:(0,t.jsx)(C.Z,{className:"w-5 h-5"})}),(0,t.jsx)("button",{className:"rounded-full bg-slate-200 p-1 ".concat((null==W?void 0:W.last)&&"cursor-not-allowed"),onClick:()=>!W.last&&o(n+1),children:(0,t.jsx)(Z.Z,{className:"w-5 h-5"})}),(0,t.jsx)("select",{id:"size",name:"size",defaultValue:c,onChange:e=>u(Number(e.target.value)),className:"block w-max h-8 rounded border border-gray-300 bg-white px-2 focus:outline-none focus:ring-0",children:[{label:10,value:10},{label:20,value:20},{label:40,value:40},{label:50,value:50}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]})]}),(0,t.jsx)(f,{data:U,pageIndex:null==W?void 0:W.number,pageSize:null==W?void 0:W.size,listingStatus:N.listingStatus})]})]})]})}function V(e){let{children:l,initialShowMap:a=!0}
1=e,[n,r]=(0,s.useState)(a);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:n?"relative flex flex-col flex-1":"hidden",children:l[0]}),(0,t.jsx)("div",{className:n?"hidden":"block pb-24",children:l[1]}),(0,t.jsx)("div",{className:"fixed left-0 bottom-0 w-full text-center mb-2",children:(0,t.jsxs)(D.Z,{css:{bg:"bg-green-600",color:"text-white"},onClick:()=>r(e=>!e),children:["Switch to ",n?"List":"Map"]})})]})}function K(e){let{initial:l,updateFilters:a}=e;return(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 p-4 gap-8 text-xs md:text-sm",children:[(0,t.jsx)(U,{initial:l,updateFilters:a}),(0,t.jsx)(q,{initial:l,keyProp:"listing",className:p.ZA,updateFilters:a}),l.listingStatus&&"SOLD"!==l.listingStatus?null:(0,t.jsx)(q,{initial:l,keyProp:"sold",className:p.hM,updateFilters:a}),(0,t.jsx)(q,{initial:l,keyProp:"termination",className:p.Ej,updateFilters:a}),(0,t.jsx)($,{initial:l,updateFilters:a}),(0,t.jsx)(Q,{initial:l,updateFilters:a}),(0,t.jsx)(J,{initial:l,updateFilters:a})]})}function U(e){var l,a;let{initial:n,updateFilters:r}=e,{values:o,setMin:i,setMax:c}=Y({keyProp:"listingPrice",minInit:n.listingPriceMin,maxInit:n.listingPriceMax}),u=null!==(l=o.listingPriceMin)&&void 0!==l?l:"",d=null!==(a=o.listingPriceMax)&&void 0!==a?a:"";return(0,s.useEffect)(()=>{r({listingPriceMin:u,listingPriceMax:d})},[o]),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Min Price"," ",u?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>i({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("path",{d:"M12 2v20"}),(0,t.jsx)("path",{d:"M16.5 7.5c0-2-1.8-3.5-4.5-3.5S7.5 5.5 7.5 7.5 9 11 12 11s4.5 1.5 4.5 3.5-1.8 3.5-4.5 3.5-4.5-1.5-4.5-3.5"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:u,id:"minPrice",name:"minPrice",onChange:i,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(u?"border-amber-400":"border-gray-300"),children:[{label:"Select price",value:void 0},{label:"500K",value:5e5},{label:"600K",value:6e5},{label:"700K",value:7e5},{label:"800K",value:8e5},{label:"900K",value:9e5},{label:"1M",value:1e6},{label:"1.25M",value:125e4},{label:"1.5M",value:15e5},{label:"1.75M",value:175e4},{label:"2M",value:2e6},{label:"2.5M",value:25e5},{label:"3M",value:3e6},{label:"3.5M",value:35e5},{label:"4M",value:4e6},{label:"4.5M",value:45e5},{label:"5M",value:5e6},{label:"5.5M",value:55e5},{label:"6M",value:6e6},{label:"6.5M",value:65e5},{label:"7M",value:7e6},{label:"7.5M",value:75e5},{label:"8M",value:8e6},{label:"8.5M",value:85e5},{label:"9M",value:9e6},{label:"10M",value:1e7},{label:"20M",value:2e7},{label:"50M",value:5e7},{label:"100M",value:1e8}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Max Price"," ",d?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>c({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("path",{d:"M12 2v20"}),(0,t.jsx)("path",{d:"M16.5 7.5c0-2-1.8-3.5-4.5-3.5S7.5 5.5 7.5 7.5 9 11 12 11s4.5 1.5 4.5 3.5-1.8 3.5-4.5 3.5-4.5-1.5-4.5-3.5"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}
1),(0,t.jsx)("select",{value:d,id:"maxPrice",name:"maxPrice",onChange:c,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(d?"border-amber-400":"border-gray-300"),children:[{label:"Select price",value:void 0},{label:"500K",value:5e5},{label:"600K",value:6e5},{label:"700K",value:7e5},{label:"800K",value:8e5},{label:"900K",value:9e5},{label:"1M",value:1e6},{label:"1.25M",value:125e4},{label:"1.5M",value:15e5},{label:"1.75M",value:175e4},{label:"2M",value:2e6},{label:"2.5M",value:25e5},{label:"3M",value:3e6},{label:"3.5M",value:35e5},{label:"4M",value:4e6},{label:"4.5M",value:45e5},{label:"5M",value:5e6},{label:"5.5M",value:55e5},{label:"6M",value:6e6},{label:"6.5M",value:65e5},{label:"7M",value:7e6},{label:"7.5M",value:75e5},{label:"8M",value:8e6},{label:"8.5M",value:85e5},{label:"9M",value:9e6},{label:"10M",value:1e7},{label:"20M",value:2e7},{label:"50M",value:5e7},{label:"100M",value:1e8}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]})]})}function q(e){let{initial:l,keyProp:a,className:n,updateFilters:r}=e,[i,c]=(0,s.useState)(l["".concat(a,"DateFrom")]||""),[u,d]=(0,s.use
1State)(l["".concat(a,"DateTo")]||"");(0,s.useEffect)(()=>{r({["".concat(a,"DateFrom")]:i,["".concat(a,"DateTo")]:u})},[i,u]);let v=(0,h.Ez)(a),p=e=>{let l=e.target.value;if(u&&l>u){o.Am.info("".concat(v," Date From should be before or equal to ").concat(v," Date To"));return}c(l)},x=e=>{let l=e.target.value;if(!l)return d("");if(i&&l<i){o.Am.info("".concat(v," Date To should be after or equal to ").concat(v," Date From"));return}d(l)};return(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{className:n,children:[v," Date From"," ",i?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>p({target:{value:""}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(A,{className:"pointer-events-none absolute md:hidden left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500"}),(0,t.jsx)("input",{value:i,placeholder:"Select date",type:"date",className:"block w-full h-8 min-w-0 appearance-none rounded bg-white pl-8 md:pl-2 px-2 flex items-center focus:outline-none focus:ring-0 border\n ".concat(i?"border-amber-400":"border-gray-300"),onChange:p})]})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{className:n,children:[v," Date To"," ",u?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>x({target:{value:""}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(A,{className:"pointer-events-none absolute md:hidden left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500"}),(0,t.jsx)("input",{value:u,placeholder:"Select date",type:"date",className:"block w-full h-8 min-w-0 appearance-none rounded bg-white pl-8 md:pl-2 px-2 flex items-center focus:outline-none focus:ring-0 border\n ".concat(u?"border-amber-400":"border-gray-300"),onChange:x})]})]})]})}function $(e){var l,a;let{initial:n,updateFilters:r}=e,{values:o,setMin:i,setMax:c}=Y({keyProp:"bedrooms",minInit:n.bedroomsMin,maxInit:n.bedroomsMax}),u=null!==(l=o.bedroomsMin)&&void 0!==l?l:"",d=null!==(a=o.bedroomsMax)&&void 0!==a?a:"";return(0,s.useEffect)(()=>{r({bedroomsMin:u,bedroomsMax:d})},[o]),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Min Bedroom"," ",u?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>i({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("rect",{x:"3",y:"10",width:"18",height:"7",rx:"1"}),(0,t.jsx)("path",{d:"M3 10V7a2 2 0 012-2h4a2 2 0 012 2v3"}),(0,t.jsx)("path",{d:"M11 10V7a2 2 0 012-2h4a2 2 0 012 2v3"}),(0,t.jsx)("path",{d:"M3 17v2M21 17v2"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:u,id:"minBed",name:"minBed",onChange:i,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(u?"border-amber-400":"border-gray-300"),children:[{label:"Select bed",value:void 0},{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4},{label:5,value:5},{label:6,value:6},{label:7,value:7},{label:8,value:8},{label:9,value:9},{label:10,value:10}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Max Bedroom"," ",d?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>c({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("rect",{x:"3",y:"10",width:"18",height:"7",rx:"1"}),(0,t.jsx)("path",{d:"M3 10V7a2 2 0 012-2h4a2 2 0 012 2v3"}),(0,t.jsx)("path",{d:"M11 10V7a2 2 0 012-2h4a2 2 0 012 2v3"}),(0,t.jsx)("path",{d:"M3 17v2M21 17v2"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:d,id:"maxBed",name:"maxBed",onChange:c,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(d?"border-amber-400":"border-gray-300"),children:[{label:"Select bed",value:void 0},{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4},{label:5,value:5},{label:6,value:6},{label:7,value:7},{label:8,value:8},{label:9,value:9},{label:10,value:10}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]})]})}function Q(e){var l,a;let{initial:n,updateFilters:r}=e,{values:o,setMin:i,setMax:c}=Y({keyProp:"bathrooms",minInit:n.bathroomsMin,maxInit:n.bathroomsMax}),u=null!==(l=o.bathroomsMin)&&void 0!==l?l:"",d=null!==(a=o.bathroomsMax)&&void 0!==a?a:"";return(0,s.useEffect)(()=>{r({bathroomsMin:u,bathroomsMax:d})},[o]),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Min Bathroom"," ",u?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>i({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("path",{d:"M4 10h16v5a4 4 0 01-4 4H8a4 4 0 01-4-4v-5z"}),(0,t.jsx)("path",{d:"M6 10V6a2 2 0 012-2h2"}),(0,t.jsx)("circle",{cx:"10",cy:"6",r:"0.5"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:u,id:"minBath",name:"minBath",onChange:i,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(u?"border-amber-400":"border-gray-300"),children:[{label:"Select bath",value:void 0},{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4},{label:5,value:5},{label:6,value:6},{label:7,value:7},{label:8,value:8},{label:9,value:9},{label:10,value:10}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Max Bathroom"," ",d?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>c({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("path",{d:"M4 10h16v5a4 4 0 01-4 4H8a4 4 0 01-4-4v-5z"}),(0,t.jsx)("path",{d:"M6 10V6a2 2 0 012-2h2"}),(0,t.jsx)("circle",{cx:"10",cy:"6",r:"0.5"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:d,id:"maxBath",name:"maxBath",onChange:c,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(d?"border-amber-400":"border-gray-300"),children:[{label:"Select bath",value:void 0},{label:1,value:1},{label:2,value:2},{label:3,value:3},{label:4,value:4},{label:5,value:5},{label:6,value:6},{label:7,value:7},{label:8,value:8},{label:9,value:9},{label:10,value:10}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]})]})}function J(e){var l,a;let{initial:n,updateFilters:r}=e,{values:o,setMin:i,setMax:c}=Y({keyProp:"age",minInit:n.ageMin,maxInit:n.ageMax}),u=null!==(l=o.ageMin)&&void 0!==l?l:"",d=null!==(a=o.ageMax)&&void 0!==a?a:"";return(0,s.useEffect)(()=>{r({ageMin:u,ageMax:d})},[o]),(0,t.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Min Age"," ",u?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>i({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("path",{d:"M6 2h12"}),(0,t.jsx)("path",{d:"M6 22h12"}),(0,t.jsx)("path",{d:"M6 2c0 5 6 6 6 10s-6 5-6 10"}),(0,t.jsx)("path",{d:"M18 2c0 5-6 6-6 10s6 5 6 10"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:u,id:"minAge",name:"minAge",onChange:i,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(u?"border-amber-400":"border-gray-300"),children:[{label:"Select age",value:void 0},{label:"1 year",value:1},{label:"2 years",value:2},{label:"3 years",value:3},{label:"4 years",value:4},{label:"5 years",value:5},{label:"6 years",value:6},{label:"7 years",value:7},{label:"8 years",value:8},{label:"9 years",value:9},{label:"10 years",value:10},{label:"11 years",value:11},{label:"12 years",value:12},{label:"13 years",value:13},{label:"14 years",value:14},{label:"15 years",value:15}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsxs)("span",{children:["Max Age"," ",d?(0,t.jsx)(E.Z,{className:"cursor-pointer w-4 h-4 inline",onClick:()=>c({target:{value:void 0}})}):null]}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"pointer-events-none absolute left-2 top-1/2 h-5 w-5 -translate-y-1/2 text-gray-500",children:[(0,t.jsx)("path",{d:"M6 2h12"}),(0,t.jsx)("path",{d:"M6 22h12"}),(0,t.jsx)("path",{d:"M6 2c0 5 6 6 6 10s-6 5-6 10"}),(0,t.jsx)("path",{d:"M18 2c0 5-6 6-6 10s6 5 6 10"})]}),(0,t.jsx)(P.Z,{className:"pointer-events-none absolute right-2 top-1/2 w-2.5 h-auto -translate-y-1/2"}),(0,t.jsx)("select",{value:d,id:"maxAge",name:"maxAge",onChange:c,className:"block w-full h-8 rounded bg-white appearance-none pl-8 px-2 focus:outline-none focus:ring-0 border\n ".concat(d?"border-amber-400":"border-gray-300"),children:[{label:"Select age",value:void 0},{label:"1 year",value:1},{label:"2 years",value:2},{label:"3 years",value:3},{label:"4 years",value:4},{label:"5 years",value:5},{label:"6 years",value:6},{label:"7 years",value:7},{label:"8 years",value:8},{label:"9 years",value:9},{label:"10 years",value:10},{label:"11 years",value:11},{label:"12 years",value:12},{label:"13 years",value:13},{label:"14 years",value:14},{label:"15 years",value:15}].map((e,l)=>(0,t.jsx)("option",{value:e.value,children:e.label},l))})]})]})]})}function Y(){let{keyProp:e="",minInit:l,maxInit:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}
1,[t,n]=(0,s.useState)({["".concat(e,"Min")]:l,["".concat(e,"Max")]:a});return{values:t,setMin:l=>{let a=Number(l.target.value);if(isNaN(a)){n({...t,["".concat(e,"Min")]:void 0});return}let s=t["".concat(e,"Max")];if(s&&a>s)return o.Am.info("Min ".concat(e," should be smaller than max ").concat(e));n({...t,["".concat(e,"Min")]:a})},setMax:l=>{let a=Number(l.target.value);if(isNaN(a)){n({...t,["".concat(e,"Max")]:void 0});return}let s=t["".concat(e,"Min")];if(s&&s>a)return o.Am.info("Max ".concat(e," should be bigger than min ").concat(e));n({...t,["".concat(e,"Max")]:a})}}}function G(){let{loading:e}=(0,n.a)();return e?(0,t.jsxs)("div",{className:"flex flex-col gap-y-2 flex-1 animate-pulse",children:[(0,t.jsx)("div",{className:"h-10 bg-gray-300"}),(0,t.jsx)("div",{className:"bg-gray-300 flex-1"})]}):(0,t.jsx)(H,{})}},96062:function(e,l,a){"use strict";a.d(l,{Z:function(){return o}});var t=a(57437),n=a(12039),s=a(52524);let r={padding:"px-2",rounded:"rounded",color:"text-gray-800",bg:"bg-gray-200",hover:"hover:opacity-80",minWidth:"min-w-20",height:"h-8",display:"flex-none"};function o(e){let{children:l,loading:a=!1,css:o={},disabled:i=!1,loadingColor:c="gray",...u}=e;return(0,t.jsx)("button",{className:(0,s.QV)({...r,...o,cursor:(i||a)&&"opacity-60 cursor-not-allowed"}),disabled:i||a,...u,children:a?(0,t.jsx)(n.Z,{color:c}):l})}},10866:function(e,l,a){"use strict";a.d(l,{Z:function(){return n}});var t=a(57437);function n(e){return(0,t.jsx)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}},61481:function(e,l,a){"use strict";a.d(l,{Z:function(){return n}});var t=a(57437);function n(e){return(0,t.jsx)("svg",{viewBox:"0 0 12 8",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,t.jsx)("path",{d:"M1 1l5 5 5-5",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}},31989:function(e,l,a){"use strict";a.d(l,{Z:function(){return n}});var t=a(57437);function n(e){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5 8.25 12l7.5-7.5"})})}},33999:function(e,l,a){"use strict";a.d(l,{Z:function(){return n}});var t=a(57437);function n(e){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"})})}},66348:function(e,l,a){"use strict";a.d(l,{Z:function(){return n}});var t=a(57437);function n(e){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})}},31458:function(e,l,a){"use strict";a.d(l,{Z:function(){return n}});var t=a(57437);function n(e){return(0,t.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",...e,children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})})}},70448:function(e,l,a){"use strict";a.d(l,{Z:function(){return r}});var t=a(57437),n=a(2265),s=a(15079);function r(e){let{runOnMount:l=!1,globalClose:a,component:r,children:o}=e,[i,c]=(0,n.useState)(l),u=(0,n.useCallback)(()=>c(e=>!e),[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Z,{open:i,globalClose:a,onClose:u,children:r({open:i,toggle:u})}),o&&o(u)]})}},15079:function(e,l,a){"use strict";a.d(l,{H:function(){return u},Z:function(){return c}});var t=a(57437),n=a(2265),s=a(27070),r=a(35020),o=a(96062),i=a(53161);function c(e){let{open:l=!1,globalClose:a=!0,children:o,onClose:i=()=>null,cleanup:c}=e,u=(0,n.useRef)(null);return(0,n.useEffect)(()=>()=>{!l&&c&&c()},[l]),(0,t.jsx)(s.u,{show:l,as:n.Fragment,children:(0,t.jsxs)(r.Vq,{as:"div",className:"relative z-50",initialFocus:u,onClose:()=>a?i():null,onClick:e=>e.preventDefault(),children:[(0,t.jsx)(s.x,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,t.jsx)("div",{className:"fixed inset-0 bg-gray-500 bg-opacity-75"})}
1),(0,t.jsx)("div",{className:"fixed z-10 inset-0 h-full overflow-y-auto",children:(0,t.jsx)(s.x,{as:n.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:(0,t.jsx)("div",{className:"w-full h-full",children:(0,t.jsx)(r.EM,{className:"mt-20 p-8 lg:p-0",children:o})})})})]})})}function u(e){let{header:l,children:a,width:n="w-full lg:w-1/2",padding:s="p-2",wrapperClasName:r="overflow-y-auto",actionButton:c,rerender:u=!1,onClose:d}=e;return(0,t.jsxs)("div",{className:"flex flex-col justify-between gap-y-1 mx-auto ".concat(n," ").concat(s," min-h-[24rem] bg-white rounded-2xl"),children:[l&&(0,t.jsx)("h2",{color:"font-bold text-lg ".concat(i.Wd),children:l}),(0,t.jsx)("div",{className:"flex flex-col ".concat(r),style:{maxHeight:window.innerHeight-200},children:a}),(0,t.jsxs)("div",{className:"flex items-center justify-end gap-x-2 text-sm",children:[d&&(0,t.jsx)(o.Z,{onClick:d,children:"Close"}),c]})]})}}},function(e){e.O(0,[5025,1402,7943,7669,231,2262,8173,5770,8143,5020,5808,4588,2971,7023,1744],function(){return e(e.s=66479)}),_N_E=e.O()}]);
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.