1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4033],{54033:(e,t,i)=>{i.r(t),i.d(t,{default:()=>D});var n=i(26514),a=i(24322),l=i.n(a),r=i(46225),o=i(75834),s=i(93794),p=i(54907),c=i(41507),d=i(27621),m=i(75996),x=i(16341),g=i(54004),u=i(2141),h=i(2991),y=i(81132),b=i(34453),f=i(33872),A=i(58751),k=i(13436),w=i(42920),_=i(98938),j=i(52597);let v="SearchResultFilters",S=[{key:"all",label:"Wszystko"},{key:"product",label:"Produkty"},{key:"newspost",label:"AktualnoÅci"},{key:"aboutbank",label:"O banku"},{key:"help",label:"Pomoc"}],N=s.Df.withName("PKOBPSearchResultFilters").create(()=>({box:{[g.Ay.breakpoints.down("md")]:{marginTop:"9px",marginBottom:"9px",display:"flex",flexWrap:"nowrap",overflow:"auto",paddingBottom:"5px"},[g.Ay.breakpoints.up("md")]:{marginTop:"22px",marginLeft:"-2px",marginBottom:"22px"}},pill:{lineHeight:1,whiteSpace:"nowrap","&:not(:last-of-type)":{marginRight:"8px"},[g.Ay.breakpoints.down("md")]:{height:"32px",minHeight:"auto",fontSize:"14px",padding:"10px 20px"},[g.Ay.breakpoints.up("md")]:{padding:"17px 19px 15px 19px",marginTop:0}}})),T=e=>{let{aggregates:t,activeKey:i,onSelectFilter:a}=e,{classes:l}=N(),r=e=>{var i;if(e===(null==(i=S[0])?void 0:i.key))return(null==t?void 0:t.length)?t.reduce((e,t)=>e+(null==t?void 0:t.doc_count),0):0;let n=null==t?void 0:t.find(t=>t.key===e);return(null==n?void 0:n.doc_count)||0};return(0,n.jsx)(_.A,{"data-cy":"".concat(v,"--container"),className:l.box,children:(0,n.jsx)(()=>(0,n.jsx)(n.Fragment,{children:S.map(e=>{let{label:t,key:o}=e;return(0,n.jsx)(j.A,{id:o,label:"".concat(t," (").concat(r(o),")"),cy:v,isActive:i===o,enableMobileStyles:!0,handleClickCallback:()=>(e=>{if(r(e)>0)return a(e)})(o),classname:l.pill},o)})}),{})})};var z=i(69001),C=i.n(z),H=i(1425),R=i(2058),B=i(38264),L=i(19957),F=i(39305);let P=s.Df.withName("PKOBPSearchResult").create(()=>({item:{margin:"33px 0",[g.Ay.breakpoints.up("md")]:{margin:"54px 0",display:"flex",flexWrap:"nowrap",width:"100%"}},item__person:{display:"flex",width:"100%",margin:"50px 0",[g.Ay.breakpoints.down("sm")]:{margin:"33px 0"}},imgContainer:{[g.Ay.breakpoints.down("md")]:{display:"none"},marginRight:"29px",width:"180px",height:"101px","& img":{objectFit:"cover",borderRadius:"10px"},["& .".concat(R.KR)]:{width:"180px",height:"101px","& img":{maxWidth:"180px !important",maxHeight:"101px !important"}},["& img.".concat(R.$F)]:{width:"180px",height:"101px"}},imgContainer__person:{alignSelf:"center",width:"72px",height:"72px",marginRight:"26px",[g.Ay.breakpoints.down("md")]:{display:"block"},[g.Ay.breakpoints.down("sm")]:{alignSelf:"start",width:"40px",height:"40px",marginRight:"16px",marginTop:"8px"},"& img":{borderRadius:"50%"},["& .".concat(R.KR)]:{width:"72px",height:"72px","& img":{maxWidth:"72px !important",maxHeight:"72px !important"},[g.Ay.breakpoints.down("sm")]:{width:"40px",height:"40px","& img":{maxWidth:"40px !important",maxHeight:"40px !important"}}},["& img.".concat(R.$F)]:{width:"72px",height:"72px"}},poiIcon:{width:"47px",height:"47px",marginRight:"25px","& svg":{width:"100%",height:"100%",fill:g.Ay.palette.primary.main}},linkContainer:{textDecoration:"none",color:"inherit"},linkContainer__withImg:{marginTop:"4px"},badge:{padding:"3px 6px",background:g.Ay.palette.sale.main,color:g.Ay.palette.common.white,fontSize:"14px",lineHeight:"16px",marginRight:"12px",borderRadius:"4px"},subtitle:{fontSize:"14px",fontWeight:300,lineHeight:"16px",margin:0},subtitle__person:{[g.Ay.breakpoints.down("sm")]:{display:"none"}},title:{...g.Ay.typography.h4,color:g.Ay.palette.primary.main,marginBottom:0,marginTop:"7px",[g.Ay.breakpoints.up("md")]:{marginTop:"1px"}},title__person:{[g.Ay.breakpoints.down("sm")]:{fontSize:"16px",lineHeight:1.25,marginTop:0}},description:{marginTop:"2px",marginBottom:0,fontSize:"14px",lineHeight:"20px"},description__person:{[g.Ay.breakpoints.down("sm")]:{fontSize:"12px",lineHeight:16/12},"& > *":{margin:0}},wrapEllipsis:{pointerEvents:"auto",overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box","-webkit-line-clamp":"3","-webkit-box-orient":"vertical",[g.Ay.breakpoints.up("md")]:{"-webkit-line-clamp":"2"}}}
1)),W=e=>{let{result:t}=e,{id:i,title:a,excerpt:l,promoted_label:r,image_url:s,modified_at:c,full_slug:d,branch_name:g="",type_of_content:u,content:h}=t,{classes:y}=P(),b=()=>{if(!h)return{sale_foreign:0,buy_foreign:0};try{return JSON.parse(h)}catch(e){return console.error("Cannot json parse on: ",h),{sale_foreign:0,buy_foreign:0}}};return(0,o.createElement)(p.A,{"data-cy":"".concat("SearchResult","--container"),key:"search-result-".concat(i),className:C()(y.item,y["item__".concat(u)]),children:[s&&(0,n.jsx)(p.A,{className:C()(y.imgContainer,y["imgContainer__".concat(u)]),children:(0,n.jsx)(R.Ay,{src:s,formatFilepath:!(0,F.xB)(t)})}),(0,F.EL)(t)&&(0,n.jsx)(p.A,{className:y.poiIcon,children:(0,n.jsx)(B.A,{})}),(0,n.jsxs)(x.A,{className:C()(y.linkContainer,y["linkContainer__".concat(u)]),isExternal:!0,href:d,ariaLabel:a?(0,m.sd)(a):"",children:[(0,n.jsxs)(p.A,{display:"flex",alignItems:"center",flexWrap:"wrap",rowGap:"10px",children:[r&&(0,n.jsx)(H.A,{className:y.badge,color:"default",children:r}),c&&(0,n.jsxs)(w.A,{variant:"body4",className:C()(y.subtitle,y["subtitle__".concat(u)]),children:[(0,F.F7)(t)&&"".concat((0,L.Y)(new Date(c))," | "),(0,F.xB)(t)?"Waluty":(0,F.EL)(t)?"OddziaÅ":g]})]}),(0,n.jsx)(p.A,{children:(0,n.jsx)(w.A,{className:C()(y.title,y.wrapEllipsis,y["title__".concat(u)]),variant:"body1",dangerouslySetInnerHTML:{__html:(0,m.H6)(a)}})}),l&&(0,n.jsx)(p.A,{children:(0,n.jsx)(w.A,{className:C()(y.description,y.wrapEllipsis,y["description__".concat(u)]),variant:"body2",dangerouslySetInnerHTML:{__html:(()=>{var e,i,n,a;if((0,F.xB)(t))return"".concat(l,": kupno: ").concat(null==(i=b())||null==(e=i.buy_foreign)?void 0:e.toFixed(4),", sprzedaż: ").concat(null==(a=b())||null==(n=a.sale_foreign)?void 0:n.toFixed(4));{let e=null==l?void 0:l.match(/<p[^>]*>(.*?)<\/p>/i);return e?e[1]:l}})()}})})]})]})},E="SearchResults",I={count:0,next:0,previous:0,facets:{},results:[],aggregates:[]},q=s.Df.withName("PKOBPSearchResults").create(()=>({title:{display:"none",[g.Ay.breakpoints.up("sm")]:{display:"block",marginTop:"27px",marginBottom:"45px",fontSize:24,lineHeight:32/24,fontWeight:600},[g.Ay.breakpoints.up("md")]:{margin:0,fontSize:40,lineHeight:56/48}},inputContainer:{marginTop:"26px",[g.Ay.breakpoints.up("md")]:{marginTop:"45px",marginBottom:"31px"}},quantity:{[g.Ay.breakpoints.down("md")]:{marginTop:"-4px",marginBottom:"0px","&>p":{fontSize:"14px"}},[g.Ay.breakpoints.up("md")]:{marginTop:"19px",marginBottom:"4px",paddingTop:"19px",borderTop:"1px solid ".concat(g.Ay.palette.secondary.borders)}},loading:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",padding:"40px 0",minHeight:"200px"},noresults:{[g.Ay.breakpoints.up("md")]:{marginTop:"4px"}},noresultsLink:{margin:0,textDecoration:"none",color:g.Ay.palette.primary.main,"&:hover, &:focus":{color:g.Ay.palette.primary.light},"&>span":{fontSize:"16px"}},suggestions:{marginTop:"56px",marginBottom:"64px"},suggestionsTitle:{margin:0},suggestionsList:{margin:0,"& ul":{marginTop:"12px",paddingLeft:"20px"},"& li":{"&:not(:first-of-type)":{marginTop:"8px"}}},results:{marginTop:"-3px",[g.Ay.breakpoints.up("md")]:{marginTop:"53px"}},quantityText:{fontSize:"14px",lineHeight:"21px",margin:0,[g.Ay.breakpoints.up("sm")]:{lineHeight:"24px"},[g.Ay.breakpoints.up("md")]:{fontSize:"16px"}},bold:{fontWeight:"bold"},pagination:{}})),D=e=>{var t,i,a;let{input:s,title:g}=e,_=(0,r.useRouter)(),{classes:j}=q(),v=(0,u.A)(),[S,N]=(0,o.useState)("all"),[z,C]=(0,o.useState)(""),[H,R]=(0,o.useState)(1),[B,L]=(0,o.useState)(I),[F,P]=(0,o.useState)(!1),[D,K]=(0,o.useState)(""),O=(0,o.useContext)(k.G),M=null==_||null==(t=_.query)?void 0:t.query,G=Number(null==_||null==(i=_.query)?void 0:i.page)||1,J=null==_||null==(a=_.query)?void 0:a["type-of-content"];(0,o.useEffect)(()=>{C(M||""),R(G),N(J||"all"),M?Y(M,G,J||"all"):L(I)},[M,G,J]);let Y=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2?arguments[2]:void 0;if(!(null==e?void 0:e.trim())){L(I),K("");return}let n="".concat(e.trim(),"-").concat(t,"-").concat(i||"all");if(n!==D||F){P(!0),K(n);try{let n=await v.apiSearchList({"page-size":7,page:t,search:e.trim(),"domain-search":(0,m.Yg)(null==s?void 0:s.domains_rendered),"type-of-content":i&&"all"!==i?i:""},{checkToken:!1});L((null==n?void 0:n.data)||I)}catch(e){console.error("Search API error:",e),L(I)}finally{P(!1)}}},$=(e,t,i)=>{let n=i||z,a=n?"&query=".concat(encodeURIComponent(n.trim())):"",l=n&&t&&"all"!==t?"&type-of-content=".concat(t):"",r=_.asPath.split("?")[0];return"".concat(r,"?page=").concat(e).concat(a).concat(l)},{count:Q=0,aggregates:U,results:V=[]}=B||{},X=Math.ceil(Q/7);return(0,n.jsxs)(p.A,{className:j.container,id:O,children:[(0,n.jsxs)(l(),{children:[X>1&&H>1&&(0,n.jsx)("link",{rel:"prev",href:"".concat($(H-1,S))}),X>1&&H<X&&(0,n.jsx)("link",{rel:"next",href:"".concat($(H+1,S))})]}),(0,n.jsxs)(p.A,{"data-cy":"".concat(E,"--container"),className:j.box,children:[(0,n.jsx)(w.A,{variant:(0,b.a)(null==g?void 0:g.hx),className:j.title,dangerouslySetInnerHTML:{__html:null==g?void 0:g.text},"data-cy":"".concat(E,"--title")}),(0,n.jsx)(p.A,{className:j.inputContainer,children:(0,n.jsx)(d.A,{inSearchResultsPage:!0,...s,onClickSearchQuery:e=>{if(e.trim()===z.trim())return;C(e),R(1);let t=$(1,S,e);_.replace(t,void 0,{shallow:!0})}})}),!F&&!!(null==V?void 0:V.length)&&(0,n.jsx)(T,{aggregates:U,activeKey:S,onSelectFilter:e=>(e=>{N(e),R(1);let t=$(1,e);_.replace(t,void 0,{shallow:!0})})(e)}),z&&!F&&(0,n.jsx)(p.A,{className:j.quantity,children:(0,n.jsxs)(w.A,{variant:"body2",className:j.quantityText,children:[Q," wynik\xf3w wyszukiwania dla ",(0,n.jsx)("span",{className:j.bold,children:z})]})}),F&&(0,n.jsxs)(p.A,{className:j.loading,children:[(0,n.jsx)(c.A,{size:40}),(0,n.jsx)(w.A,{variant:"body2",style:{marginTop:16},children:"Wyszukiwanie..."})]}),z&&!F&&!(null==V?void 0:V.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{className:j.noresults,children:(0,n.jsx)(x.A,{...(0,f.zf)({link:s.no_results_url,idGTM:(0,y.bJ)(O,h.JH.LINK,s.no_results_url.id)}),className:j.noresultsLink,ariaLabel:s.no_results_url.aria_label,children:(0,n.jsx)(w.A,{children:s.no_results_url.label})})}),(0,n.jsxs)(p.A,{className:j.suggestions,children:[(0,n.jsx)(w.A,{variant:"body2",className:j.suggestionsTitle,children:"Podpowiedzi:"}),(0,n.jsx)(w.A,{variant:"body2",className:j.suggestionsList,children:(0,n.jsxs)("ul",{children:[(0,n.jsx)("li",{children:"Sprawdź, czy wszystkie sÅowa zostaÅy poprawnie napisane."}),(0,n.jsx)("li",{children:"Spr\xf3buj użyÄ innych sÅ\xf3w kluczowych."}),(0,n.jsx)("li",{children:"Spr\xf3buj użyÄ bardziej og\xf3lnych sÅ\xf3w kluczowych."})]})})]})]}),!F&&!!(null==V?void 0:V.length)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(p.A,{className:j.results,children:V.filter(e=>null!==e.full_slug).map((e,t)=>(0,n.jsx)(W,{result:e},"".concat(e.full_slug,"-").concat(t)))}),(0,n.jsx)(p.A,{className:j.pagination,children:(0,n.jsx)(A.A,{current:H,pages:X,onChangePage:e=>{R(e);let t=$(e,S);_.replace(t,void 0,{shallow:!0})}})})]})]})]})}}}]);
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.