PageSourceSearch

https://immojidee.vercel.app/_next/static/chunks/select-extra-view-1.7ce215f3e1518599.js

js immojidee.vercel.app collected 2026-10-03 07:08:24 UTC 6,714 bytes, 1 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="c265e9b6-f5ec-4f13-8c3a-8ba36cb96f21",e._sentryDebugIdIdentifier="sentry-dbid-c265e9b6-f5ec-4f13-8c3a-8ba36cb96f21")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2786],{66249:(e,a,t)=>{t.r(a),t.d(a,{default:()=>c});var s=t(95155),l=t(12115),r=t(73321),n=t(90674),o=t(5514);let c=e=>{let{options:a,placeholder:t,dictionary:c,addAsParam:i,labelText:d,required:u=!1}=e,x=(0,r.useRouter)(),h=(0,l.useRef)(null),p=Object.fromEntries((0,r.useSearchParams)().entries()),m=(0,l.useMemo)(()=>a.filter(e=>p[e.value]&&parseInt(p[e.value]||"0",10)>0).map(e=>({...e,search:parseInt(p[e.value]||"0",10)})),[p,a]),b=(0,l.useMemo)(()=>JSON.stringify(m.map(e=>`${e.value}:${e.search}`)),[m]),[g,v]=(0,l.useState)(!1),[f,y]=(0,l.useState)(""),[w,j]=(0,l.useState)(()=>m),[N,k]=(0,l.useState)(b);N!==b&&(j(m),k(b));let D=t&&!d,S=D&&(g||w.length>0||f);(0,n.W)(h,()=>v(!1));let E=(e,t)=>{let s,l=w.findIndex(a=>a.value===e);if(-1!==l)s=[...w],t>0?s[l]={...s[l],search:t}:s.splice(l,1);else{if(!(t>0))return;let l=a.find(a=>a.value===e);if(!l)return;s=[...w,{...l,search:t}]}j(s),i&&$(s)},$=e=>{{var t,s;let l=null==(t=h.current)?void 0:t.closest("form");if((null==l||null==(s=l.dataset)?void 0:s.mobileStagedSearch)==="true"&&window.matchMedia("(max-width: 1023px)").matches)return;let r=new URLSearchParams(window.location.search);r.delete("page"),e.forEach(e=>{e.search>0?r.set(e.value,e.search.toString()):r.delete(e.value)}),a.forEach(a=>{e.some(e=>e.value===a.value)||r.delete(a.value)});let n=r.toString()?`${window.location.pathname}?${r.toString()}`:window.location.pathname;x.replace(n,{scroll:!1})}};return(0,s.jsxs)("div",{className:"relative block atom-select",ref:h,children:[d&&(0,s.jsxs)("label",{className:"block mb-2 text-gray-800",children:[d," ",u&&(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),D&&(0,s.jsxs)("label",{className:`absolute left-3 transition-all duration-200 ease-in-out pointer-events-none z-10 ${S?"top-0 text-xs text-gray-600 bg-gray-100 px-1 -translate-y-1/2 rounded-sm border-[1px] border-solid border-b-0":"top-1/2 text-gray-500 bg-gray-100 -translate-y-1/2"}`,children:[t," ",u&&(0,s.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,s.jsxs)("div",{className:"h-full bg-gray-100 text-gray-900 border border-solid px-4 relative cursor-pointer focus:outline-none py-3 rounded-md",onMouseDown:e=>{e.preventDefault(),e.stopPropagation(),v(!g)},children:[(0,s.jsxs)("div",{className:"flex items-center justify-between min-h-full",children:[(0,s.jsxs)("div",{className:"flex flex-wrap flex-1",children:[w.length>0&&w.map(e=>(0,s.jsxs)("span",{className:"inline-flex items-center px-2 py-1 my-1 mr-1 text-sm font-medium text-gray-700",children:["boolean"===e.type?(0,s.jsx)(s.Fragment,{children:e.label}):(0,s.jsxs)(s.Fragment,{children:[e.search," ",e.label]}),(0,s.jsxs)("button",{type:"button",className:"ml-2 focus:outline-none flex items-center",onMouseDown:a=>{a.preventDefault(),a.stopPropagation(),E(e.value,0)},"aria-label":`Remove ${e.label}`,children:[(0,s.jsx)("span",{className:"sr-only",children:"Remove"}),(0,s.jsx)(o.A,{icon:"FaX",width:20,height:20})]})]},e.value)),(0===w.length||g)&&(0,s.jsx)("div",{className:"inline-block flex-1 min-w-[50px]",children:(0,s.jsx)("input",{type:"text",value:f,placeholder:D?"":0===w.length?t:"",className:"h-full w-full bg-transparent border-0 outline-none placeholder:text-gray-500",onChange:e=>{e.target.value.length>0&&y(e.target.value)},onFocus:()=>{v(!0)},onMouseDown:e=>e.stopPropagation(),"aria-label":t,required:u})})]}),(0,s.jsx)("div",{className:"ml-2",children:(0,s.jsx)(o.A,{icon:"FaChevronDown",width:20,height:20,className:"text-xs text-gray-700"})})]}),g&&(0,s.jsx)("div",{"data-lenis-prevent":!0,className:"absolute left-0 right-0 mt-4 py-2 bg-background shadow-md z-20 max-h-80 overflow-y-auto rounded-md",onMouseDown:e=>e.stopPropagation(),children:a.filter(e=>{var a;return null==e||null==(a=e.label)?void 0:a.toLowerCase().includes(f.toLowerCase())}).map(e=>{var a;return(0,s.jsx)("div",{className:"px-4 py-3 text-left cursor-pointer hover:bg-background-50",children:(e=>{let{label:a,data:t,className:l}=e;return"boolean"===t.type?(0,s.jsxs)("div",{className:`select-extra-container flex gap-2 justify-between items-center ${l}`,children:[(0,s.jsx)("span",{className:"text-base xl:text-sm 2xl:text-base",children:a}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)("button",{"aria-label":c.No??"No",className:`block px-3 py-1 rounded text-sm ${2===t.search?"bg-primary text-white":"bg-background-50 hover:bg-background-100"}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(t.value,2*(2!==t.search))},children:c.No??"No"}),(0,s.jsx)("button",{"aria-label":c.Yes??"Yes",className:`block px-3 py-1 rounded text-sm ${1===t.search?"bg-primary text-white":"bg-background-50 hover:bg-background-100"}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(t.value,+(1!==t.search))},children:c.Yes??"Yes"})]})]}):(0,s.jsxs)("div",{className:`select-extra-container flex gap-2 justify-between items-center ${l}`,children:[(0,s.jsx)("span",{className:"text-base xl:text-sm 2xl:text-base",children:a}),(0,s.jsxs)("div",{className:"flex items-center gap-2 xl:gap-1 2xl:gap-2",children:[(0,s.jsx)("button",{"aria-label":"Decrease",className:`block mr-2 px-2 py-1 bg-background-50 rounded ${0===t.search?"opacity-50 cursor-not-allowed":""}`,onClick:e=>{e.preventDefault(),e.stopPropagation(),E(t.value,Math.max(0,t.search-1))},disabled:0===t.search,children:(0,s.jsx)("span",{className:"text-xl",children:"-"})}),(0,s.jsx)("span",{className:"text-center",children:t.search}),(0,s.jsx)("button",{"aria-label":"Increase",className:"block ml-2 px-2 py-1 bg-background-50 rounded",onClick:e=>{e.preventDefault(),e.stopPropagation(),E(t.value,Math.min(10,t.search+1))},disabled:10===t.search,children:(0,s.jsx)("span",{className:"text-xl ",children:"+"})})]})]})})({label:e.label,data:{...e,search:(null==(a=w.find(a=>a.value===e.value))?void 0:a.search)||0},type:e.type,className:""})},e.value)})})]}),w.map((e,a)=>(0,s.jsx)("input",{type:"hidden",readOnly:!0,name:e.value,value:e.search},a))]})}},90674:(e,a,t)=>{t.d(a,{W:()=>l});var s=t(12115);let l=(e,a)=>{(0,s.useEffect)(()=>{let t=t=>{!e.current||e.current.contains(t.target)||a(t)};return document.addEventListener("mousedown",t),document.addEventListener("touchstart",t),()=>{document.removeEventListener("mousedown",t),document.removeEventListener("touchstart",t)}},[e,a])}}}]);

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.