1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="764580f0-e937-41a1-a66d-dd4b550ee111",e._sentryDebugIdIdentifier="sentry-dbid-764580f0-e937-41a1-a66d-dd4b550ee111")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[16262],{43088:(e,a,l)=>{"use strict";l.d(a,{b:()=>d});var r=l(561),t=l(19470),n=l(71864),s=l(19218),o=l(12013),c=l(13237),i=(0,s.F)()?function(e){var a,l,s=(0,o.c)(3);return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,n.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.1 3.75A10.15 10.15 0 1 1 7.76 21.2a1 1 0 0 0-.51-.04l-3.1.9-.03.01a1.8 1.8 0 0 1-2.23-2.1l.03-.1.97-2.98a1 1 0 0 0-.05-.55A10.14 10.14 0 0 1 6.1 3.75m6.57-.12a8.4 8.4 0 0 0-8.2 12.07 2.7 2.7 0 0 1 .1 1.68l-.96 2.97.01.03.03.01h.02l3.14-.92.08-.02q.68-.12 1.32.07l.18.06.06.03a8.4 8.4 0 1 0 4.22-15.98",clipRule:"evenodd"}),s[0]=a):a=s[0],s[1]!==e?(l=(0,n.Y)("svg",(0,t._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:a})),s[1]=e,s[2]=l):l=s[2],l}:function(e){return(0,n.Y)("svg",(0,t._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:(0,n.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M6.1 3.75A10.15 10.15 0 1 1 7.76 21.2a1 1 0 0 0-.51-.04l-3.1.9-.03.01a1.8 1.8 0 0 1-2.23-2.1l.03-.1.97-2.98a1 1 0 0 0-.05-.55A10.14 10.14 0 0 1 6.1 3.75m6.57-.12a8.4 8.4 0 0 0-8.2 12.07 2.7 2.7 0 0 1 .1 1.68l-.96 2.97.01.03.03.01h.02l3.14-.92.08-.02q.68-.12 1.32.07l.18.06.06.03a8.4 8.4 0 1 0 4.22-15.98",clipRule:"evenodd"})}))},d=(0,c.w)(i,"MessageIcon")},74623:(e,a,l)=>{"use strict";var r=l(59662);l(38209);var t=l(81866),n=l(20584);l(21547),l(16490),l(28337),l(9805);var s=function(e){return e&&e.__esModule?e:{default:e}}(r);a.A=t.withIconProps(e=>n.jsx("svg",s.default({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24"},e),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M8.04 3.999 10.043 2h4l1.999 1.999h3l.959 1v1H4v-1l1-1zm8.96 16V8h2v12l-2 2H7l-2-2V8h2v12zm-8-3 1 1 1-1V8H9zm5 1-1-1V8h2v9z",clipRule:"evenodd"})))},80437:(e,a,l)=>{"use strict";l.d(a,{C:()=>d});var r=l(561),t=l(19470),n=l(71864),s=l(19218),o=l(12013),c=l(13237),i=(0,s.F)()?function(e){var a,l,s=(0,o.c)(3);return s[0]===Symbol.for("react.memo_cache_sentinel")?(a=(0,n.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.9 2.87A5.7 5.7 0 0 1 21 4.61a6 6 0 0 1 1.81 5.26 11 11 0 0 1-2.38 5.06c-2.37 3.11-5.93 5.81-7.93 7.2-.3.21-.7.21-1 0-2-1.39-5.56-4.09-7.93-7.2a11 11 0 0 1-2.38-5.06 6 6 0 0 1 1.8-5.26 5.7 5.7 0 0 1 8.2 0l.81.84.81-.84a5.7 5.7 0 0 1 4.1-1.74m0 1.75c-1.02 0-2.05.4-2.84 1.22L12 7.96 9.94 5.84a3.95 3.95 0 0 0-5.69 0 4.3 4.3 0 0 0-1.33 3.79c.19 1.35.94 2.8 2.04 4.24C6.98 16.53 10 18.91 12 20.34c2-1.43 5.02-3.81 7.04-6.47a9.5 9.5 0 0 0 2.04-4.24 4.3 4.3 0 0 0-1.12-3.57l-.21-.22a4 4 0 0 0-2.84-1.22",clipRule:"evenodd"}),s[0]=a):a=s[0],s[1]!==e?(l=(0,n.Y)("svg",(0,t._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:a})),s[1]=e,s[2]=l):l=s[2],l}:function(e){return(0,n.Y)("svg",(0,t._)((0,r._)({fill:"none",viewBox:"0 0 24 24"},e),{children:(0,n.Y)("path",{fill:"currentColor",fillRule:"evenodd",d:"M16.9 2.87A5.7 5.7 0 0 1 21 4.61a6 6 0 0 1 1.81 5.26 11 11 0 0 1-2.38 5.06c-2.37 3.11-5.93 5.81-7.93 7.2-.3.21-.7.21-1 0-2-1.39-5.56-4.09-7.93-7.2a11 11 0 0 1-2.38-5.06 6 6 0 0 1 1.8-5.26 5.7 5.7 0 0 1 8.2 0l.81.84.81-.84a5.7 5.7 0 0 1 4.1-1.74m0 1.75c-1.02 0-2.05.4-2.84 1.22L12 7.96 9.94 5.84a3.95 3.95 0 0 0-5.69 0 4.3 4.3 0 0 0-1.33 3.79c.19 1.35.94 2.8 2.04 4.24C6.98 16.53 10 18.91 12 20.34c2-1.43 5.02-3.81 7.04-6.47a9.5 9.5 0 0 0 2.04-4.24 4.3 4.3 0 0 0-1.12-3.57l-.21-.22a4 4 0 0 0-2.84-1.22",clipRule:"evenodd"})}))},d=(0,c.w)(i,"HeartIcon")},83256:(e,a,l)=>{"use strict";l.r(a),l.d(a,{default:()=>U});var r=l(98319),t=l(71864),n=l(19218),s=l(12013),o=l(79361),c=l(73107),i=l(82209),d=l(98084),u=l(65162),v=l(89885),h=l(96944),m=l(82863),f=l(83148),_=l(10332),p=l(69058),g=l(38209),b=l(99202),w=l(76229),S=l(64399),y=l(49041),k=l(561),C=l(35259),x=()=>{var e=(0,C.z1)(),a=e.useLazyPageView,l=e.trackEvent,r=a(),t={touch_point_page:"my_observed_searches",web_platform:"optimus"};return{trackPageView:()=>{r("my_observed_searches",(0,k._)({},t))},trackRemoveAllSavedSearchesClick:()=>{l("favourite_searches_clear_click","click",(0,k._)({},t))},trackRemoveAllSavedSearchesClose:()=>{l("favourite_searches_clear_close","click",(0,k._)({},t))},trackRemoveAllSavedSearchesCancel:()=>{l("favourite_searches_clear_no","click",(0,k._)({},t))},trackRemoveAllSavedSearches:()=>l("favourite_searches_clear","click",(0,k._)({},t)),trackRemoveSavedSearchClick:e=>{l("favourite_search_delete_click","click",(0,k._)({search_id:e},t))},trackRemoveSavedSearchClose:e=>{l("favourite_search_delete_close","click",(0,k._)({search_id:e},t))},trackRemoveSavedSearchCancel:e=>{l("favourite_search_delete_no","click",(0,k._)({search_id:e},t))},trackRemoveSavedSearch:e=>l("favourite_search_deleted","click",(0,k._)({search_id:e},t))}},Y=l(19470),R=function(e){return e[e.TOGGLE_REMOVE_ALL_MODAL=0]="TOGGLE_REMOVE_ALL_MODAL",e[e.SHOW_REMOVE_MODAL=1]="SHOW_REMOVE_MODAL",e[e.CLOSE_REMOVE_MODAL=2]="CLOSE_REMOVE_MODAL",e}({}),A=(e,a)=>{switch(a.type){case 1:return(0,Y._)((0,k._)({},e),{shouldShowRemoveModal:!0,searchIdToRemove:a.payload.searchIdToRemove,searchUrl:a.payload.searchUrl});case 2:return(0,Y._)((0,k._)({},e),{shouldShowRemoveModal:!1,searchIdToRemove:void 0,searchUrl:void 0});case 0:return(0,Y._)((0,k._)({},e),{shouldShowRemoveAllModal:!e.shouldShowRemoveAllModal});default:throw Error("Unknown action type")}},M=l(87187),O=l(37966),L=l(74623),E=(0,n.F)()?e=>{var a,l,r=(0,s.c)(5),n=e.list,o=e.separator,c=void 0===o?"\xb7":o;return n.length?(r[0]!==n||r[1]!==c?(a=n.join(" ".concat(c," ")),r[0]=n,r[1]=c,r[2]=a):a=r[2],r[3]!==a?(l=(0,t.Y)(b.P2,{children:a}),r[3]=a,r[4]=l):l=r[4],l):null}:e=>{var a=e.list,l=e.separator;return a.length?(0,t.Y)(b.P2,{children:a.join(" ".concat(void 0===l?"\xb7":l," "))}):null},N=l(34085),D=l(61876),P=l(32719),F=l(11080),I=l(45453),T="flex w-fit items-center justify-start gap-[15px] [grid-area:title] [&_svg]:cursor-pointer",V=e=>{var a=e.title,l=e.name,n=e.newAds,s=void 0===n?0:n,o=e.searchTerms,c=e.url,i=e.id,d=e.notify,u=e.handleDelete,v=(0,F.A)("favorites").t,h=(0,g.useMemo)(()=>(null==c?void 0:c.length)>0?function(e,a){var l=new URL(e);return l.searchParams.get("min_id")&&l.searchParams.set("search_id",a||"0"),l.toString()}(c,i):"",[c,i]),m=(0,C.z1)().trackEvent,f=(0,r._)((0,g.useState)(d),2),p=f[0],w=f[1],S=(0,P.wV)().status,y=(0,g.useMemo)(()=>"authenticated"===S,[S]),k=(0,_.r)(),x=(0,N.h)()(D.VW7),Y=(0,r._)((0,g.useState)(!1),2),R=Y[0],A=Y[1],V=(0,r._)((0,g.useState)(l||a),2),z=V[0],H=V[1],B=(0,r._)((0,g.useState)(l||a),2),j=B[0],G=B[1],q=(0,g.useCallback)(async()=>{var e=z.trim();if(e===j)return void A(!1);try{await (null==k?void 0:k.updateSavedSearchName(i,e))?(m("name_change_saved_search_valid","click",{touch_point_page:"my_observed_searches"}),G(e)):(H(j),console.error("Failed to update saved search name: Server returned false"))}catch(e){H(j),console.error("Error updating saved search name:",e)}finally{A(!1)}},[z,i,k,j,m]),U=(0,g.useCallback)(()=>{H(j),A(!1)},[j]),K=(0,g.useCallback)(e=>{"Enter"===e.key&&(e.preventDefault(),q())},[q]),W=(0,g.useCallback)(e=>{H(e.target.value)},[]),$=(0,g.useCallback)(()=>{m("edit_click_name_saved_search","click",{touch_point_page:"my_observed_searches"}),A(!0)},[m]),X=(0,g.useCallback)(async()=>{try{k&&await (null==k?void 0:k.updateNotify(i,!0)),m("favourite_search_notify","click",{touch_point_page:"my_observed_searches"})}catch(e){console.error(e)}},[i,m,k]),J=(0,g.useCallback)(async()=>{try{k&&await (null==k?void 0:k.updateNotify(i,!1)),m("favourite_search_not_notify","click",{touch_point_page:"my_observed_searches"})}catch(e){console.error(e)}},[i,m,k]),Q=async()=>{p?await J():await X(),w(!p)};return y?(0,t.FD)("div",{className:"mb-300 grid grid-cols-[1fr_auto] gap-y-100 rounded-small border border-solid border-border-subtle p-200 [grid-template-areas:'badge'_'title'_'specs'_'divider'_'actions']",children:[(0,t.Y)(b.vw,{className:s>0?"font-semibold w-max bg-green-primary text-foreground-on-inverse [grid-area:badge]":"font-semibold w-max bg-background-secondary text-foreground-disabled [grid-area:badge]",content:v("saved-searches-new-ads",{newAds:s})}),x?(0,t.Y)(t.FK,{children:R?(0,t.FD)("div",{className:"flex w-full items-center justify-start gap-[15px] [grid-area:title]",children:[(0,t.Y)("div",{className:"relative flex h-400 flex-1 cursor-text items-center [&_>div]:w-full [&_[role=textbox]]:w-full",children:(0,t.Y)(b.ks,{className:"flex h-400 flex-1 items-center [&_input]:!h-400 [&_input]:w-full [&_input]:!px-150",value:z,onChange:W,onKeyDown:K,"aria-label":v("saved-searches-edit-title"),maxLength:50,minLength:1})}),(0,t.Y)(O.default,{size:"icon-small",onClick:()=>void q(),color:"var(--color-background-action-primary)",cursor:"pointer"}),(0,t.Y)(I.default,{size:"icon-small",onClick:U,color:"var(--color-foreground-secondary)",cursor:"pointer"})]}):(0,t.FD)("div",{className:T,children:[(0,t.Y)(b.P2,{className:"font-semibold m-0 flex h-400 flex-1 items-center",children:z}),(0,t.Y)(M.A,{onClick:$,"aria-label":v("saved-searches-edit-title")})]})}):(0,t.Y)("div",{className:T,children:(0,t.Y)(b.P2,{className:"font-semibold m-0 flex h-400 flex-1 items-center",children:l})}),(0,t.Y)("div",{className:"[grid-column:max-content/1] mb-100 [grid-area:specs]",children:(0,t.Y)(E,{list:void 0===o?[]:o})}),(0,t.Y)(b.cG,{className:"mb-100 [grid-area:divider]",variant:"secondary-light"}),(0,t.FD)("div",{className:"[grid-area:actions] lg:flex lg:justify-between",children:[(0,t.FD)("div",{className:"flex",children:[(0,t.Y)(b.dR,{id:"nexus-switch-".concat(i),onChange:Q,checked:p,disabled:!y,"aria-label":v("saved-searches-notify-me")}),(0,t.Y)(b.$X,{htmlFor:"nexus-switch-".concat(i),children:v("saved-searches-notify-me")})]}),(0,t.FD)("div",{className:"flex gap-200 max-lg:mt-300 max-lg:justify-between",children:[(0,t.Y)(b.$n,{onClick:u,"data-testid":"delete-cta",prefixIcon:L.A,variant:"flat",children:v("saved-searches-delete-cta")}),(0,t.Y)(b.$n,{onClick:()=>{m("view_listings_click","click",{touch_point_page:"my_observed_searches"})},href:h,variant:"primary",size:"small",children:v("see-results")})]})]})]}):(0,t.Y)("div",{"data-testid":"user-not-logged-in-message",children:v("saved-searches-notify-me-login-message")})},z=l(49076),H=l(66794),B=(0,t.Y)(z.v,{name:"saved-searches/no-searches",ext:"svg","data-testid":"saved-searches-empty-image",max:"100%",width:300}),j=(0,n.F)()?e=>{var a,l,r,n=(0,s.c)(8),o=e.isLoading,c=(0,F.A)("favorites").t;return n[0]!==c?(a=c("saved-search-page-empty-screen-title"),n[0]=c,n[1]=a):a=n[1],n[2]!==c?(l=c("saved-search-page-empty-screen-text"),n[2]=c,n[3]=l):l=n[3],n[4]!==o||n[5]!==a||n[6]!==l?(r=(0,t.Y)(H.A,{image:B,title:a,subtitle:l,isLoading:o}),n[4]=o,n[5]=a,n[6]=l,n[7]=r):r=n[7],r}:e=>{var a=e.isLoading,l=(0,F.A)("favorites").t;return(0,t.Y)(H.A,{image:B,title:l("saved-search-page-empty-screen-title"),subtitle:l("saved-search-page-empty-screen-text"),isLoading:a})};let G=function(e){var a,l,n=e.isLoading,s=(0,p.useRouter)(),o=(0,_.r)(),c=(0,S.Bd)("favorites").t,i=(0,g.useRef)(!0),d=(null==(a=s.query)?void 0:a.page)?Number.parseInt(s.query.page)-1:0,u=(0,r._)((0,g.useState)({searches:[],totalCount:0}),2),v=u[0],h=u[1],m={pageSize:5,totalCount:v.totalCount,current:d,offset:5*d},f=x(),k=f.trackRemoveAllSavedSearchesClick,C=f.trackRemoveAllSavedSearchesClose,Y=f.trackRemoveAllSavedSearchesCancel,M=f.trackRemoveAllSavedSearches,O=f.trackRemoveSavedSearchClick,L=f.trackRemoveSavedSearchClose,E=f.trackRemoveSavedSearchCancel,N=f.trackRemoveSavedSearch,D=(0,r._)((0,g.useReducer)(A,{shouldShowRemoveAllModal:!1,shouldShowRemoveModal:!1}),2),P=D[0],F=P.shouldShowRemoveAllModal,I=P.shouldShowRemoveModal,T=P.searchIdToRemove,z=D[1],H=e=>{var a=e.currentPage,l=e.itemsOnPage,r=e.action,t="".concat(window.location.pathname,"?page=").concat(a+1);2===r&&(t="".concat(window.location.pathname,"?page=").concat(1===l?a:a+1)),0===r&&(t="".concat(window.location.pathname,"?page=").concat(1===l?a:a+1)),1===r&&(t=window.location.pathname),i.current=!0,window.open("".concat("https://www.autovit.ro").concat(t),"_self")};(0,g.useEffect)(()=>{var e,a,l,r,t,n,s,c;h((e=null==o?void 0:o.savedSearches,c={searches:[],totalCount:0},(null==e||null==(a=e.listFull)?void 0:a.nodes)&&(c={searches:null==e||null==(r=e.listFull)||null==(l=r.nodes)?void 0:l.reduce((e,a)=>{var l,r,t,n,s,o,c,i=(e=>{for(var a=function(a){var r=l.findIndex(l=>l.id===e[a].name);-1===r?l.push({id:e[a].name,value:e[a].nameLabel,options:[e[a].valueLabel]}):l[r].options.push(e[a].valueLabel)},l=[],r=0;r<e.length;r++)a(r);return l.reduce((e,a)=>{var r=a.id,t=a.value,n=a.options;if(r.includes("category_id"))e.title=n[0];else if(r.includes(":from")||r.includes(":to")){var s=r.split(":")[0],o=l.find(e=>e.id==="".concat(s,":from")),c=l.find(e=>e.id==="".concat(s,":to")),i="".concat(t," ").concat([null==o?void 0:o.options[0],null==c?void 0:c.options[0]].filter(
1Boolean)).replace(","," ");e.labels.includes(i)||e.labels.push(i)}else n.length>1?e.labels.push("".concat(t,": ").concat(n.join(", "))):e.labels.push("".concat(t,": ").concat(n[0]));return e},{title:"",labels:[]})})(a.labels),d=null!=(l=null==i?void 0:i.title)?l:"",u=null!=(r=null==i?void 0:i.labels)?r:[];return e.push({searchTerms:u,title:d,url:null!=(t=null==a?void 0:a.url)?t:"",newAds:null!=(n=null==a?void 0:a.searchResultsCount)?n:0,id:null!=(s=null==a?void 0:a.id)?s:"",notify:null!=(o=null==a?void 0:a.notify)&&o,name:null!=(c=null==a?void 0:a.name)?c:""}),e},[]),totalCount:null!=(s=null==e||null==(n=e.list)||null==(t=n.totalCount)?void 0:t.value)?s:0}),c))},[null==o?void 0:o.savedSearches]);var B=async()=>{if(T)try{N(null!=T?T:""),await (null==o?void 0:o.removeSavedSearch(T||"")),await (null==o?void 0:o.loadSavedSearches(m.offset))}catch(e){console.error(e)}};if(!o)return null;var G=async()=>{try{await (null==o?void 0:o.removeAllSavedSearches()),M(),h({searches:[],totalCount:0})}catch(e){console.error(e)}},q=()=>{z({type:R.TOGGLE_REMOVE_ALL_MODAL})},U=()=>{z({type:R.CLOSE_REMOVE_MODAL})};return(0,t.Y)("main",{className:"flex flex-col gap-300 p-200 lg:gap-300 lg:p-300 xl:gap-200 xl:px-0 xl:py-400",children:(0,t.Y)("div",{className:"mb-300","data-testid":"saved-searches-list",children:(null==v||null==(l=v.searches)?void 0:l.length)?(0,t.FD)(t.FK,{children:[(0,t.Y)("div",{className:"text-end",children:(0,t.Y)(b.$n,{className:"my-[28px] mr-0 ml-auto",onClick:()=>{k(),q()},variant:"tertiary",children:c("saved-searches-delete-all-cta")})}),v.searches.map(e=>{var a=e.id,l=e.notify,r=e.searchTerms,n=e.title,s=e.url,o=e.newAds,c=e.name;return(0,t.Y)(V,{searchTerms:r,name:c,title:n,url:s,newAds:o,handleDelete:()=>{O(null!=a?a:""),z({type:R.SHOW_REMOVE_MODAL,payload:{searchIdToRemove:a,searchUrl:s}})},id:a,notify:l},a)}),(0,t.Y)(w.Ay,{pageSize:m.pageSize,current:m.current+1,total:m.totalCount,onChange:e=>{H({currentPage:e.nextPage-1,itemsOnPage:null==v?void 0:v.searches.length,action:2})}}),(0,t.Y)(y.i,{title:c("remove-all-saved-searches-modal-title"),description:c("remove-all-saved-searches-modal-description"),cancelText:c("remove-all-saved-searches-modal-cancel-button"),confirmText:c("remove-all-saved-searches-modal-confirm-button"),isOpen:F,onCancel:()=>{Y(),q()},onClose:()=>{C(),q()},onConfirm:()=>{M(),G().catch(e=>{console.warn(e)}),U(),H({currentPage:m.current,itemsOnPage:null==v?void 0:v.searches.length,action:1})}}),(0,t.Y)(y.i,{title:c("remove-saved-search-modal-title"),description:c("remove-saved-search-modal-description"),cancelText:c("remove-saved-search-modal-cancel-button"),confirmText:c("remove-saved-search-modal-confirm-button"),isOpen:I,onCancel:()=>{T&&(E(null!=T?T:""),U())},onClose:()=>{T&&(L(null!=T?T:""),U())},onConfirm:()=>{T&&(N(null!=T?T:""),B().catch(e=>{console.warn(e)}),U(),H({currentPage:m.current,itemsOnPage:v.searches.length,action:0}))}})]}):(0,t.Y)(j,{isLoading:n})})})};var q=(0,n.F)()?e=>{var a,l,r,n,c,v,f=(0,s.c)(13),_=e.children,p=e.totals;f[0]!==p?(a=void 0===p?{adverts:0,searches:0,professionalSearches:0}:p,f[0]=p,f[1]=a):a=f[1];var g=a,b=(0,h.s)();return f[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,t.Y)(i.default,{}),f[2]=l):l=f[2],f[3]!==g.adverts||f[4]!==g.professionalSearches||f[5]!==g.searches?(r=(0,t.Y)("div",{id:"page-sub-header",className:"bg-background-secondary",children:(0,t.Y)(d.A,{numberOfFavAds:g.adverts,numberOfFavSearches:g.searches,numberOfProfessionalSearches:g.professionalSearches,currentTab:d.K.savedSearches})}),f[3]=g.adverts,f[4]=g.professionalSearches,f[5]=g.searches,f[6]=r):r=f[6],f[7]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.Y)(o.A,{}),c=(0,t.Y)(u.A,{}),f[7]=n,f[8]=c):(n=f[7],c=f[8]),f[9]!==_||f[10]!==b||f[11]!==r?(v=(0,t.Y)(m.H,{header:K,sideMenuContent:l,subHeaderContent:r,footer:n,cookiesB
1anner:c,isInMobileBrowser:b,children:_}),f[9]=_,f[10]=b,f[11]=r,f[12]=v):v=f[12],v}:e=>{var a=e.children,l=e.totals,r=void 0===l?{adverts:0,searches:0,professionalSearches:0}:l,n=(0,h.s)();return(0,t.Y)(m.H,{header:e=>(0,t.Y)(c.Y,{onBurgerIconClick:e}),sideMenuContent:(0,t.Y)(i.default,{}),subHeaderContent:(0,t.Y)("div",{id:"page-sub-header",className:"bg-background-secondary",children:(0,t.Y)(d.A,{numberOfFavAds:r.adverts,numberOfFavSearches:r.searches,numberOfProfessionalSearches:r.professionalSearches,currentTab:d.K.savedSearches})}),footer:(0,t.Y)(o.A,{}),cookiesBanner:(0,t.Y)(u.A,{}),isInMobileBrowser:n,children:a})};function U(){var e,a,l,n,s,o,c,i=(0,p.useRouter)(),d=(0,_.r)(),u=x().trackPageView,h=(0,g.useRef)(!0),m=(0,r._)((0,g.useState)(!0),2),f=m[0],b=m[1],w=(null==(e=i.query)?void 0:e.page)?Number.parseInt(i.query.page)-1:0;h.current&&(u(),null==d||d.loadSavedSearches(5*w).finally(()=>{b(!1)}).catch(e=>{console.warn(e)}),h.current=!1);var S=(0,v.A)().dispatchHotjarEvent;return(0,g.useEffect)(()=>{S("saved_searches_intent")},[S]),(0,t.Y)(q,{totals:{adverts:f?"-":null!=(s=null==d?void 0:d.favoritesCount)?s:0,searches:f?"-":null!=(o=null==d?void 0:d.searchesCount)?o:0,professionalSearches:null!=(c=null==d||null==(n=d.savedSearches)||null==(l=n.professionalSavedSearchesList)||null==(a=l.totalCount)?void 0:a.value)?c:0},children:(0,t.Y)(G,{isLoading:f})})}function K(e){return(0,t.Y)(c.Y,{onBurgerIconClick:e})}U.getLayout=e=>{var a=e.children;return(0,t.Y)(f.HM,{children:a})}},83900:(e,a,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/cautari-salvate",function(){return l(83256)}])},87187:(e,a,l)=>{"use strict";var r=l(59662);l(38209);var t=l(81866),n=l(20584);l(21547),l(16490),l(28337),l(9805);var s=function(e){return e&&e.__esModule?e:{default:e}}(r);a.A=t.withIconProps(e=>n.jsx("svg",s.default({xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 24 24"},e),n.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M6 14.247 18.206 2h2.858l.937.937v2.858L9.754 17.999H6zM19.62 3.415l-1.09 1.09.968.966 1.089-1.09-.937-.966zM7.968 15.066l.01.956.957.01 9.147-9.147-.967-.966z",clipRule:"evenodd"}),n.jsx("path",{fill:"currentColor",d:"m2 4 1-1h9l1 1-1 1H4v15h13v-6l1-1 1 1v7l-1 1H3l-1-1z"})))}},e=>{e.O(0,[57744,93017,95304,79825,72168,68777,13164,78506,90636,46593,38792],()=>e(e.s=83900)),_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.