1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7917],{51345:function(e,i,s){s.d(i,{Z:function(){return C}});var n=s(47568),a=s(20414),t=s(85893),l=s(67294),d=s(41664),c=s.n(d),o=s(50452),r=s(40996),m=s(41449),h=s(58533),u=s(40782),v=s(10086),x=s(7956),f=function(e){var i=e.item,s=e.my_customer_id,n=e.copyToClipboard,a=e.handleEditMessage,l=e.handleDeleteMessage,d=e.chat_texts;return(0,t.jsxs)("div",{className:"chat-room-message-options-desktop-container",children:[(0,t.jsx)("i",{className:"chat-room-message-options-icon fas fa-ellipsis-v","data-bs-toggle":"dropdown","aria-expanded":"false"}),(0,t.jsxs)("ul",{className:"dropdown-menu chat-room-message-options-dropdown",children:[(0,t.jsxs)("li",{className:"dropdown-item",onClick:function(){n(i.message)},children:[(0,t.jsx)("i",{className:"far fa-copy"}),(0,t.jsx)("span",{className:"ms-2",children:null===d||void 0===d?void 0:d.button_chat_modal_copy})]}),i.customer_id===s&&(0,t.jsxs)("li",{className:"dropdown-item",onClick:function(){a(i)},children:[(0,t.jsx)("i",{className:"far fa-edit"}),(0,t.jsx)("span",{className:"ms-2",children:null===d||void 0===d?void 0:d.button_edit})]}),(0,t.jsxs)("li",{className:"dropdown-item",onClick:function(){l(i,i.customer_id===s)},children:[(0,t.jsx)("i",{className:"fas fa-trash"}),(0,t.jsx)("span",{className:"ms-2",children:null===d||void 0===d?void 0:d.button_delete})]})]})]})},j=function(e){var i=e.item,s=e.my_customer_id,n=e.copyToClipboard,a=e.handleEditMessage,d=e.handleDeleteMessage,c=e.handleOpenOptionMobile,o=e.chat_texts,r=(0,l.useState)(null),m=r[0],h=r[1],u=function(){m&&(clearTimeout(m),h(null))},v=i.customer_id===s;return"1"==i.deleted?(0,t.jsxs)("div",{className:"chat-room-message-wrapper",children:[(0,t.jsx)("div",{className:"chat-room-message-inner-wrapper ".concat(v&&" chat-room-message-inner-wrapper-me"),children:(0,t.jsxs)("div",{className:"chat-room-message-container chat-room-message-deleted ".concat(v?" chat-room-my-message":""),children:[(0,t.jsx)("i",{className:"fas fa-comment-slash chat-room-message-deleted-icon"}),(0,t.jsx)("p",{className:"chat-room-message",children:(0,t.jsx)("span",{children:i.message})})]})}),(0,t.jsx)("span",{className:"".concat(v?"chat-room-my-message-date":"chat-room-message-date"),children:i.date_added})]}):(0,t.jsxs)("div",{className:"chat-room-message-wrapper",children:[(0,t.jsxs)("div",{className:"chat-room-message-inner-wrapper ".concat(v&&" chat-room-message-inner-wrapper-me"),children:[(0,t.jsxs)("div",{className:"chat-room-message-container".concat(v?" chat-room-my-message":""),children:[(0,t.jsx)("div",{onTouchStart:function(){h(window.setTimeout((function(){c(i)}),500))},onTouchEnd:u,onTouchCancel:u,className:"chat-room-message-text-unselectable",children:(0,t.jsx)("p",{className:"chat-room-message chat-room-message-mobile",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,x.Z)(i.message)}})})}),(0,t.jsx)("p",{className:"chat-room-message chat-room-message-desktop",children:(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,x.Z)(i.message)}})})]}),(0,t.jsx)(f,{item:i,my_customer_id:s,copyToClipboard:n,handleEditMessage:a,handleDeleteMessage:d,chat_texts:o})]}),(0,t.jsx)("span",{className:"".concat(v?"chat-room-my-message-date":"chat-room-message-date"),children:i.date_added})]})},p=function(e){var i=e.handleCancelEditMessage,s=e.editedMessageText,n=e.setEditedMessageText,a=e.editMesage,l=e.chat_texts;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{id:"open-edit-message-modal","data-bs-toggle":"modal","data-bs-target":"#modal-edit-message"}),(0,t.jsx)("div",{className:"modal fade",id:"modal-edit-message",tabIndex:-1,"aria-labelledby":"$modal-edit-message-label","aria-hidden":"true","data-bs-backdrop":"static",children:(0,t.jsx)("div",{className:"modal-dialog modal-dialog-centered modal-fullscreen-sm-down",children:(0,t.jsxs)("div",{className:"modal-content",children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h5",{className:"modal-title w-100 text-center",children:null===l||void 0===l?void 0:l.text_chat_modal_edit_message}),(0,t.jsx)("div",{className:"btn-close cursor-pointer",onClick:i})]}),(0,t.jsx)("div",{className:"modal-body",children:(0,t.jsx)("div",{className:"input-group mb-2",children:(0,t.jsx)("input",{type:"text",id:"login-email",className:"login-email-input form-control",onChange:function(e){n(e.target.value)},value:s})})}),(0,t.jsxs)("div",{className:"modal-footer justify-content-between",children:[(0,t.jsx)("div",{className:"btn btn-outline-secondary btn-sm",onClick:i,children:null===l||void 0===l?void 0:l.button_cancel}),(0,t.jsx)("div",{className:"btn btn-primary btn-sm ".concat(""==s&&"disabled"),onClick:a,children:null===l||void 0===l?void 0:l.button_save})]})]})})})]})},g=function(e){var i=e.messageToDelete,s=e.my_customer_id,n=e.handleCancelDeleteMessage,a=e.setDeletedMessageOption,l=e.deletedMessageOption,d=e.deleteMesage,c=e.chat_texts;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{id:"open-delete-message-modal","data-bs-toggle":"modal","data-bs-target":"#modal
1-delete-message"}),(0,t.jsx)("div",{className:"modal fade",id:"modal-delete-message",tabIndex:-1,"aria-labelledby":"$modal-delete-message-label","aria-hidden":"true","data-bs-backdrop":"static",children:(0,t.jsx)("div",{className:"modal-dialog modal-dialog-centered modal-fullscreen-sm-down",children:(0,t.jsxs)("div",{className:"modal-content",children:[(0,t.jsxs)("div",{className:"modal-header",children:[(0,t.jsx)("h5",{className:"modal-title w-100 text-center",children:null===c||void 0===c?void 0:c.text_chat_modal_delete_message}),(0,t.jsx)("div",{className:"btn-close cursor-pointer",onClick:n})]}),(0,t.jsxs)("div",{className:"modal-body",children:[(0,t.jsx)("div",{className:"heading-subtitle text-center mb-4",dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.text_chat_modal_delete_message_info}}),(null===i||void 0===i?void 0:i.customer_id)===s&&(0,t.jsxs)("div",{className:"input-group mb-3",children:[(0,t.jsx)("div",{className:"input-group-prepend",children:(0,t.jsx)("div",{className:"input-group-text h-100",children:(0,t.jsx)("input",{id:"input-delete-message-option-1",type:"radio",name:"deleted_message_option",value:"1",className:"form-check-input mt-0",onClick:function(){return a("1")},checked:"1"==l})})}),(0,t.jsx)("label",{htmlFor:"input-delete-message-option-1",className:"form-control",children:null===c||void 0===c?void 0:c.text_chat_modal_delete_message_option_1})]}),(0,t.jsxs)("div",{className:"input-group",children:[(0,t.jsx)("div",{className:"input-group-prepend",children:(0,t.jsx)("div",{className:"input-group-text h-100",children:(0,t.jsx)("input",{id:"input-delete-message-option-2",type:"radio",name:"deleted_message_option",value:"2",className:"form-check-input mt-0",onClick:function(){return a("2")},checked:"2"==l})})}),(0,t.jsx)("label",{htmlFor:"input-delete-message-option-2",className:"form-control",children:null===c||void 0===c?void 0:c.text_chat_modal_delete_message_option_2})]})]}),(0,t.jsxs)("div",{className:"modal-footer justify-content-between",children:[(0,t.jsx)("div",{className:"btn btn-outline-secondary btn-sm",onClick:n,children:null===c||void 0===c?void 0:c.button_cancel}),(0,t.jsx)("div",{className:"btn btn-primary btn-sm",onClick:d,children:null===c||void 0===c?void 0:c.button_delete})]})]})})})]})},_=s(26042),N=s(69396),b=s(828),w=s(97998),y=s(81472),k=function(e){var i=e.isModalItemOptionMobile,s=e.setModalItemOptionMobile,n=e.item,a=e.my_customer_id,d=e.copyToClipboard,c=e.handleEditMessage,o=e.handleDeleteMessage,r=e.chat_texts;(0,l.useEffect)((function(){i?x({canceled:!1}):f()}),[i]);var m=2e3,h=(0,b.Z)((0,y.useSpring)((function(){return{y:m}})),2),u=h[0].y,v=h[1],x=function(e){var i=e.canceled;v.start({y:0,immediate:!1,config:i?y.config.wobbly:y.config.stiff})},f=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;s(null),v.start({y:m,immediate:!1,config:(0,N.Z)((0,_.Z)({},y.config.stiff),{velocity:e})})},j=(0,w.useDrag)((function(e){var i=e.last,s=(0,b.Z)(e.velocity,2)[1],n=(0,b.Z)(e.direction,2)[1],a=(0,b.Z)(e.movement,2)[1],t=e.cancel,l=e.canceled;a<-70&&t(),i?a>800||s>1.2&&n>0?f(s):x({canceled:l}):v.start({y:a,immediate:!0})}),{from:function(){return[0,u.get()]},filterTaps:!0,bounds:{top:0},rubberband:!0}),p=u.to((function(e){return e<m?"flex":"none"}));return n?(0,t.jsx)("div",{className:"flex modal-feed-head-options",style:{overflow:"hidden"},children:(0,t.jsx)(y.a.div,(0,N.Z)((0,_.Z)({className:"modal-feed-head-options-cont"},j()),{style:{display:p,bottom:"0px",y:u,backgroundColor:"rgba(34, 41, 47, 0.4)"},children:(0,t.jsxs)("div",{className:"modal-feed-head-options-main modal-chat-message-options-main",children:[(0,t.jsx)("div",{className:"modal-feed-head-options-grip-line mt-2 mb-2"}),(0,t.jsxs)("div",{className:"ps-2 pe-2 w-100",children:[(0,t.jsxs)("div",{className:"modal-feed-head-options-btn-cont p-3 mb-3",children:[(0,t.jsxs)("div",{className:"modal-feed-head-options-btn mb-2",onClick:function(){f(),setTimeout((function(){d(n.message)}),200)},children:[(0,t.jsx)("div",{className:"social-feed-head-profile-options-icon",children:(0,t.jsx)("i",{className:"fas fa-copy",
1style:{fontSize:14}})}),(0,t.jsx)("span",{className:"ms-2",children:null===r||void 0===r?void 0:r.button_chat_modal_copy})]}),n.customer_id===a&&(0,t.jsxs)("div",{className:"modal-feed-head-options-btn mb-2",onClick:function(){f(),setTimeout((function(){c(n)}),200)},children:[(0,t.jsx)("div",{className:"social-feed-head-profile-options-icon",children:(0,t.jsx)("i",{className:"fas fa-pen",style:{fontSize:14}})}),(0,t.jsx)("span",{className:"ms-2",children:null===r||void 0===r?void 0:r.button_edit})]}),(0,t.jsxs)("div",{className:"modal-feed-head-options-btn",onClick:function(){f(),setTimeout((function(){o(n,n.customer_id===a)}),200)},children:[(0,t.jsx)("div",{className:"social-feed-head-profile-options-icon",children:(0,t.jsx)("i",{className:"fas fa-minus",style:{fontSize:14}})}),(0,t.jsx)("span",{className:"ms-2",children:null===r||void 0===r?void 0:r.button_delete})]})]}),(0,t.jsx)("div",{className:"modal-feed-head-options-btn-cont p-3",children:(0,t.jsxs)("div",{className:"modal-feed-head-options-btn",onClick:function(){f()},children:[(0,t.jsx)("div",{className:"social-feed-head-profile-options-icon",children:(0,t.jsx)("i",{className:"fas fa-times",style:{fontSize:14}})}),(0,t.jsx)("span",{className:"ms-2",children:r.button_cancel})]})})]})]})}))}):null},F=s(61646);var C=function(){var e,i,s,d,x,f,_,N=(0,o.Ok)().connection,b=(0,r.mx)(),w=b.activeChat,y=b.me,C=b.pageMessages,Z=b.getChatHistory,M=b.messages,E=b.setMessages,S=b.hasMoreMessages,q=b.friendTyping,T=b.chatMessagesLoading,I=b.refreshView,L=b.setRefreshView,O=(0,l.useState)(""),B=O[0],P=O[1],H=(0,l.useState)(""),D=H[0],A=H[1],z=(0,l.useState)(!1),W=z[0],R=z[1],J=(0,l.useState)(!0),U=J[0],V=J[1],Y=(0,l.useRef)(null),$=function(){var e=(0,n.Z)((function(){var e,i,s,n,t,l,d,c,o;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return null!==y&&y.logged&&w?W?[2]:""===B?[3,2]:(R(!0),s={chat_message_id:"0",date_added:null===y||void 0===y||null===(e=y.chat_texts)||void 0===e?void 0:e.text_chat_active_now,message:B,customer_id:y.customer_id,type:"text"},(n=M||[]).unshift(s),E(n),P(""),A(""),Q(!0),(t=new FormData).append("chat_id",w.chat_id),t.append("my_customer_id",y.customer_id),t.append("customer_id",w.users[0].customer_id),t.append("message",B),t.append("version","2"),[4,F.Z.post("/index.php?route=account/chat/sendMessage",t,{})]):[2];case 1:(null===(l=a.sent())||void 0===l||null===(i=l.data)||void 0===i?void 0:i.new_message)&&((c=M||[])[0]=null===l||void 0===l||null===(d=l.data)||void 0===d?void 0:d.new_message,E(c),o=JSON.stringify({message:l.data.new_message,from_customer_id:y.customer_id,message_type:"chat"}),N.send(JSON.stringify({action:"OnMessage",message:o,customer_id:w.users[0].customer_id}))),R(!1),L(I+1),a.label=2;case 2:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),G=(0,l.useState)(!1),X=G[0],K=G[1];(0,l.useEffect)((function(){if(N&&w&&X){var e=JSON.stringify({from_customer_id:y.customer_id,message_type:"typing"});N.send(JSON.stringify({action:"IsTyping",message:e,customer_id:w.users[0].customer_id}))}}),[X]),(0,l.useEffect)((function(){Q(!0)}),[M]);var Q=function(e){if(document&&M){var i=document.getElementById("chat-page-room-wrapper");null!==i&&(e?U&&(i.scrollTop=i.scrollHeight):i.scrollTop=i.scrollHeight)}};(0,l.useEffect)((function(){if(P(""),A(""),w&&N){var e=null===document||void 0===document?void 0:document.getElementById("chat-page-room-wrapper");null!==e&&(null===e||void 0===e||e.addEventListener("scroll",(function(e){var i=document.getElementById("chat-page-room-wrapper");if(null!==i){var s=i.scrollTop;V(!(s<-200))}})))}}),[w,N]),(0,l.useEffect)((function(){if(w&&N){var e=null===document||void 0===document?void 0:document.getElementById("chat-message");null===e||void 0===e||e.addEventListener("keyup",(function(e){var i;"Enter"===e.key&&(null===(i=null===document||void 0===document?void 0:document.getElementById("send-message"))||void 0===i||i.click())}))}}),[w,N]);var ee=(0,l.useState)(null),ie=ee[0],se=ee[1],ne=(0,l.useState)(""),ae=ne[0],te=ne[1],le=function(){var e=(0,n.Z)((function(e){var i;return(0,a.__generator)(this,(function(s){return te(null===e||void 0===e?void 0:e.message),se(e),null===(i=null===document||void 0===document?void 0:document.getElementById("open-edit-message-modal"))||void 0===i||i.click(),[2]}))}));return function(i){return e.apply(this,arguments)}}(),de=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(i){return null===(e=null===document||void 0===document?void 0:document.getElementById("open-edit-message-modal"))||void 0===e||e.click(),setTimeout((function(){se(null),te("")}),500),[2]}))}));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=(0,n.Z)((function(){var e,i,s,n,t,l,d;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return null!==y&&y.logged&&(w&&ie)?""===ae||-1===(i=(e=M||[]).findIndex((function(e){return e.chat_message_id===(null===ie||void 0===ie?void 0:ie.chat_message_id)})))?[3,2]:(e[i].message=ae,E(e),(t=new FormData).append("chat_id",w.chat_id),t.append("chat_message_id",null===ie||void 0===ie?void 0:ie.chat_message_id),t.append("edited_message",ae),[4,F.Z.post("/index.php?route=account/chat/editMessage",t,{})]):[2];case 1:(null===(l=a.sent())||void 0===l||null===(s=l.data)||void 0===s?void 0:s.success)&&(d=JSON.stringify({from_customer_id:y.customer_id,message_type:"chat"}),N.send(JSON.stringify({action:"OnMessage",message:d,customer_id:w.users[0].customer_id}))),null===(n=null===document||void 0===document?void 0:document.getElementById("open-edit-message-modal"))||void 0===n||n.click(),te(""),se(null),a.label=2;case 2:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),oe=(0,l.useState)(null),re=oe[0],me=oe[1],he=(0,l.useState)("1"),ue=he[0],ve=he[1],xe=function(){var e=(0,n.Z)((function(e,i){var s;return(0,a.__generator)(this,(function(n){return ve(i?"1":"2"),me(e),null===(s=null===document||void 0===document?void 0:document.getElementById("open-delete-message-modal"))||void 0===s||s.click(),[2]}))}));return function(i,s){return e.apply(this,arguments)}}(),fe=function(){var e=(0,n.Z)((function(){var e;return(0,a.__generator)(this,(function(i){return null===(e=null===document||void 0===document?void 0:document.getElementById("open-delete-message-modal"))||void 0===e||e.click(),setTimeout((function(){me(null),ve("1")}),500),[2]}))}));return function(){return e.apply(this,arguments)}}(),je=function(){var e=(0,n.Z)((function(){var e,i,s,n,t,l,d,c;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return null!==y&&y.logged&&(w&&re)?["1","2"].includes(ue)?-1===(i=(e=M||[]).findIndex((function(e){return e.chat_message_id===(null===re||void 0===re?void 0:re.chat_message_id)})))?[3,2]:("1"==ue?(e[i].message=null===y||void 0===y||null===(t=y.chat_texts)||void 0===t?void 0:t.text_chat_message_deleted,e[i].deleted="1",E(e)):"2"==ue&&(e.splice(i,1),E(e)),(l=new FormData).append("chat_id",w.chat_id),l.append("chat_message_id",null===re||void 0===re?void 0:re.chat_message_id),l.append("customer_id",y.customer_id),l.append("delete_option",ue),[4,F.Z.post("/index.php?route=account/chat/deleteMessage",l,{})]):[3,2]:[2];case 1:(null===(d=a.sent())||void 0===d||null===(s=d.data)||void 0===s?void 0:s.success)&&"1"==ue&&(c=JSON.stringify({from_customer_id:y.customer_id,message_type:"chat"}),N.send(JSON.stringify({action:"OnMessage",message:c,customer_id:w.users[0].customer_id}))),null===(n=null===document||void 0===document?void 0:document.getElementById("open-delete-message-modal"))||void 0===n||n.click(),ve("1"),me(null),a.label=2;case 2:return[2]}}
1))}));return function(){return e.apply(this,arguments)}}(),pe=(0,l.useState)(!1),ge=pe[0],_e=pe[1],Ne=(0,l.useState)(null),be=Ne[0],we=Ne[1],ye=function(){var e=(0,n.Z)((function(e){return(0,a.__generator)(this,(function(i){return we(e),_e(!0),[2]}))}));return function(i){return e.apply(this,arguments)}}(),ke=function(e){navigator.clipboard.writeText(e),(0,u.Am)((function(){var i;return(0,v.Z)({icon:"fas fa-check-circle",title:null===y||void 0===y||null===(i=y.chat_texts)||void 0===i?void 0:i.text_chat_message_copied,message:e})}),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0})};return w?N?(0,t.jsxs)("div",{className:"chat-page-room-container",children:[T&&(0,t.jsx)("div",{className:"chat-messages-loading-cont",children:(0,t.jsx)(m.Z,{height:300})}),(0,t.jsx)("div",{className:"chat-page-room-header",children:(0,t.jsxs)("div",{className:"d-flex",children:[(0,t.jsxs)("div",{className:"chat-list-item-image-cont",children:[w.users[0].profile_image&&(0,t.jsx)(c(),{href:"".concat(w.users[0].profile_url),children:(0,t.jsx)("a",{children:(0,t.jsx)("div",{className:"chat-list-item-profile-image-cont",children:(0,t.jsx)("div",{style:{backgroundImage:"url('".concat(w.users[0].profile_image,"')")},className:"chat-list-item-profile-image"})})})}),(0,t.jsx)("span",{className:"chat-header-online-status ".concat("1"==w.users[0].is_online?"chat-header-online":"chat-header-offline")})]}),(0,t.jsx)("div",{className:"chat-list-item-text",children:(0,t.jsxs)("div",{className:"chat-list-item-main-info",children:[(0,t.jsx)(c(),{href:"".concat(w.users[0].profile_url),children:(0,t.jsx)("a",{children:(0,t.jsx)("p",{className:"chat-list-item-name",children:w.users[0].username})})}),q?(0,t.jsx)("p",{className:"chat-list-item-text-typing",children:null===y||void 0===y||null===(e=y.chat_texts)||void 0===e?void 0:e.text_chat_typing}):"1"==w.users[0].is_online?(0,t.jsx)("p",{className:"chat-list-item-email",children:"".concat(null===y||void 0===y||null===(i=y.chat_texts)||void 0===i?void 0:i.text_chat_active," ").concat(null===y||void 0===y||null===(s=y.chat_texts)||void 0===s?void 0:s.text_chat_active_now)}):(0,t.jsx)("p",{className:"chat-list-item-email",children:"".concat(null===y||void 0===y||null===(d=y.chat_texts)||void 0===d?void 0:d.text_chat_active," ").concat(w.users[0].last_online)})]})})]})}),(0,t.jsxs)("div",{id:"chat-page-room-outer-wrapper",children:[(0,t.jsx)("div",{className:"chat-page-room",id:"chat-page-room-wrapper","data-id":w.users[0].customer_id,"data-chat-id":w.chat_id,children:M?(0,t.jsxs)(h.Z,{dataLength:(null===M||void 0===M?void 0:M.length)||0,next:function(){Z(C)},hasMore:S,loader:(0,t.jsx)(m.Z,{height:200}),style:{display:"flex",flexDirection:"column-reverse"},inverse:!0,scrollThreshold:.1,scrollableTarget:"chat-page-room-wrapper",endMessage:(0,t.jsx)("span",{style:{textAlign:"center"},children:(0,t.jsx)("div",{dangerouslySetInnerHTML:{__html:M.length<1?null===y||void 0===y||null===(x=y.chat_texts)||void 0===x?void 0:x.text_chat_empty_messages:" "}})}),children:[M.map((function(e,i){return(0,t.jsx)(j,{item:e,my_customer_id:y.customer_id,copyToClipboard:ke,handleEditMessage:le,handleDeleteMessage:xe,handleOpenOptionMobile:ye,chat_texts:null===y||void 0===y?void 0:y.chat_texts},i)})),(0,t.jsx)("div",{style:{float:"left",clear:"both"},ref:Y})]}):S?(0,t.jsx)(m.Z,{height:200}):(0,t.jsx)("p",{style:{textAlign:"center"},children:(0,t.jsx)("div",{children:null===y||void 0===y||null===(f=y.chat_texts)||void 0===f?void 0:f.text_chat_empty_messages})})}),!U&&(0,t.jsx)("div",{id:"scroll-to-bottom",onClick:function(){return Q(!1)},children:(0,t.jsx)("i",{className:"fas fa-chevron-down"})})]}),(0,t.jsxs)("div",{className:"chat-page-room-footer position-relative",children:[(0,t.jsx)("input",{type:"text",id:"chat-message",name:"chat_message",className:"form-control",placeholder:null===y||void 0===y||null===(_=y.chat_texts)||void 0===_?void 0:_.text_chat_write,value:D,onChange:function(e){P(e.target.value),A(e.target.value),X||(K(!0),setTimeout((function(){K(!1)}),2500))}}),(0,t.jsx)("i",{className:"fas fa-paper-plane",id:"send-message",onClick:$})]}),(0,t.jsx)(p,{handleCancelEditMessage:de,editedMessageText:ae,setEditedMessageText:te,editMesage:ce,chat_texts:null===y||void 0===y?void 0:y.chat_texts}),(0,t.jsx)(g,{messageToDelete:re,my_customer_id:y.customer_id,handleCancelDeleteMessage:fe,setDeletedMessageOption:ve,deletedMessageOption:ue,deleteMesage:je,chat_texts:null===y||void 0===y?void 0:y.chat_texts}),(0,t.jsx)(k,{isModalItemOptionMobile:ge,setModalItemOptionMobile:_e,item:be,my_customer_id:y.customer_id,copyToClipboard:ke,handleEditMessage:le,handleDeleteMessage:xe,chat_texts:null===y||void 0===y?void 0:y.chat_texts})]}):(0,t.jsx)("div",{className:"chat-page-room-container",children:(0,t.jsx)(m.Z,{})}):(0,t.jsx)("div",{className:"chat-page-room-container"})}},20034:function(e,i,s){var n=s(47568),a=s(828),t=s(20414),l=s(85893),d=s(67294),c=s(50452),o=s(40996),r=s(41449),m=s(58533);i.Z=function(){var e,i,s,h=(0,c.Ok)().connection,u=(0,o.mx)(),v=u.chat,x=u.activeChat,f=u.setActiveChat,j=u.me,p=u.chatLoading,g=u.setChatLoading,_=u.requestChats,N=u.refreshView,b=u.setMessages,w=u.setPageMessages,y=u.setHasMoreMessages,
1k=u.setOpenChat,F=u.searchPeople,C=u.peopleList,Z=u.setPeopleList,M=u.setFriendsToggle,E=u.setChatMessagesLoading,S=(0,d.useState)(""),q=S[0],T=S[1],I=function(){var e=(0,n.Z)((function(e){var i;return(0,t.__generator)(this,(function(s){return i=null===e||void 0===e?void 0:e.target.value.trim(),T(i),i.length>2?(T(i),F(i)):(T(""),Z([])),[2]}))}));return function(i){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){h&&v&&null!==j&&j.logged&&_()}),[N]),(0,l.jsxs)("div",{className:"chat-page-sidebar-container",children:[p&&(0,l.jsx)("div",{className:"chat-messages-loading-cont",children:(0,l.jsx)(r.Z,{height:300})}),(0,l.jsx)("div",{className:"chat-page-search",children:(0,l.jsxs)("div",{className:"chat-search-with-icon",children:[(0,l.jsx)("input",{type:"text",id:"chat-search",name:"chat_search",className:"form-control",placeholder:null===j||void 0===j||null===(e=j.chat_texts)||void 0===e?void 0:e.text_chat_search,onChange:I,defaultValue:q}),(0,l.jsx)("i",{className:"fas fa-search"})]})}),(0,l.jsx)("div",{className:"chat-page-friends-list",children:q.length>0?(0,l.jsx)(l.Fragment,{children:C.length>0?(0,l.jsx)(m.Z,{dataLength:C.length,next:C,hasMore:!1,loader:(0,l.jsx)(r.Z,{height:200}),style:{overflow:"visible"},children:C.map((function(e,i){var s,n,a,t,d;return(0,l.jsxs)(l.Fragment,{children:[e.is_friend>0&&e.is_first_friend_index>0?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{fontWeight:"bold",marginTop:12},children:null===j||void 0===j||null===(s=j.chat_texts)||void 0===s?void 0:s.text_chat_search_friends})}):null,e.is_friend<1&&e.is_first_nonfriend_index>0?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{style:{fontWeight:"bold",marginTop:12},children:null===j||void 0===j||null===(n=j.chat_texts)||void 0===n?void 0:n.text_chat_search_users})}):null,(0,l.jsx)("div",{className:"chat-list-item-container",onClick:function(){g(!0),E(!0),M(!1),T(""),Z([]),k({friend_id:e.customer_id,username:e.username}),(document&&(null===document||void 0===document?void 0:document.getElementById("chat-search"))).value=""},children:(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsxs)("div",{className:"chat-list-item-image-cont",children:[e.profile_image&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"chat-list-item-profile-image-cont",children:(0,l.jsx)("div",{style:{backgroundImage:"url('".concat(e.profile_image,"')")},className:"chat-list-item-profile-image"})})}),"1"==e.is_online?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("span",{className:"chat-header-online-status chat-header-online"})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("span",{className:"chat-header-online-status chat-header-offline"})})]}),(0,l.jsx)("div",{className:"chat-list-item-text",children:(0,l.jsxs)("div",{className:"chat-list-item-main-info",children:[(0,l.jsx)("p",{className:"chat-list-item-name",children:e.username}),"1"==e.is_online?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("p",{className:"chat-list-item-email",children:"".concat(null===j||void 0===j||null===(a=j.chat_texts)||void 0===a?void 0:a.text_chat_active," ").concat(null===j||void 0===j||null===(t=j.chat_texts)||void 0===t?void 0:t.text_chat_active_now)})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("p",{className:"chat-list-item-email",children:"".concat(null===j||void 0===j||null===(d=j.chat_texts)||void 0===d?void 0:d.text_chat_active," ").concat(e.last_online)})})]})})]})},v.chat_id)]})}))}):(0,l.jsx)("div",{className:"d-flex justify-content-center flex-column align-items-center mt-4 mb-4",children:(0,l.jsx)("span",{className:"mt-4",children:null===j||void 0===j||null===(i=j.chat_texts)||void 0===i?void 0:i.text_chat_empty_people})})}):(0,l.jsx)(l.Fragment,{children:v?0===(null===v||void 0===v?void 0:v.length)?(0,l.jsx)("div",{className:"d-flex justify-content-center flex-column align-items-center mt-4 mb-4",children:(0,l.jsx)("span",{className:"mt-4",children:null===j||void 0===j||null===(s=j.chat_texts)||void 0===s?void 0:s.text_chat_empty_chats})}):(0,l.jsx)(m.Z,{dataLength:v.length,next:function(){_()},hasMore:!0,loader:(0,l.jsx)(r.Z,{height:200}),style:{overflow:"visible"},children:v.map((function(e){var i,s,n=(null===x||void 0===x?void 0:x.chat_id)===e.chat_id,t="chat-list-item-container".concat(n?" active":""),d=(0,a.Z)(e.users,1)[0];return(0,l.jsx)("div",{className:t,onClick:function(){var i;i=e,b(null),w(1),y(!0),f(i)},children:(0,l.jsxs)("div",{className:"d-flex",children:[(0,l.jsxs)("div",{className:"chat-list-item-image-cont",children:[d.profile_image&&(0,l.jsx)("div",{className:"chat-list-item-profile-image-cont",children:(0,l.jsx)("div",{style:{backgroundImage:"url('".concat(d.profile_image,"')")},className:"chat-list-item-profile-image"})}),(0,l.jsx)("span",{className:"chat-header-online-status ".concat("1"==d.is_online?"chat-header-online":"chat-header-offline")})]}),(0,l.jsxs)("div",{className:"chat-list-item-text",children:[(0,l.jsxs)("div",{className:"chat-list-item-main-info",children:[(0,l.jsx)("p",{className:"chat-list-item-name",children:d.username}),(0,l.jsx)("p",{className:"chat-list-item-email",children:"".concat(null===j||void 0===j||null===(i=j.chat_texts)||void 0===i?void 0:i.text_chat_active," ").concat("1"==d.is_online?null===j||void 0===j||null===(s=j.chat_texts)||void 0===s?void 0:s.text_chat_active_now:d.last_online)})]}),!n&&parseInt(e.viewed)>0&&(0,l.jsx)("div",{className:"chat-list-item-unread-messages",children:e.viewed})]})]})},e.chat_id)}))}):(0,l.jsx)("div",{className:"chat-messages-loading-cont",children:(0,l.jsx)(r.Z,{height:300})})})})]})}},75210:function(e,i,s){var n=s(85893),a=(s(67294),s(41664)),t=s.n(a),l=s(55120);i.Z=function(e){var i=e.header,s=e.setmobileMenuActive,a=e.mobileMenuActive,d=e.texts,c=e.dataType,o=e.feedPostHeader,r=e.uniqueIncrementor,m=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("account-drop-down-desktop-".concat(c)))||void 0===e||e.click())},h=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("account-drop-down-desktop-small-".concat(c,"-").concat(r)))||void 0===e||e.click())};return o?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"logged-header-cont position-relative",onClick:h,children:[(0,n.jsx)("div",{className:"logged-header-icon-title-cont",id:"account-drop-down-desktop-small-".concat(c,"-").concat(r),"data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:h,children:(0,n.jsxs)("div",{className:"logged-header-icon-cont me-2",children:[(0,n.jsx)("div",{className:"logged-header-icon",children:(0,n.jsx)(l.Z,{src:i.user_profile_image,alt:"profile",height:500,width:500,priority:!0,objectFit:"cover"})}),i.logged?(0,n.jsx)("span",{className:"logged-header-online"}):(0,n.jsx)("span",{className:"logged-header-offline"})]})}),(0,n.jsx)("div",{className:"dropdown-menu dropdown-menu-end account-header-dropdown",children:i.logged?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"account-header-user",children:(0,n.jsxs)("div",{className:"account-header-username",children:[d.text_hello,i.username]})}),(0,n.jsx)("hr",{}),(0,n.jsxs)("ul",{className:"account-header-link-list",children:[(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/a/account",children:[(0,n.jsx)("i",{className:"far fa-user"})," ",d.text_my_account]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/a/orders",children:[(0,n.jsx)("i",{className:"fas fa-history"})," ",d.text_my_orders]})}),i.config_booking_status?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/a/bookings",children:[(0,n.jsx)("i",{className:"far fa-bookmark"})," ",d.text_my_bookings]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/booking",children:[(0,n.jsx)("i",{className:"far fa-address-book"})," ",d.text_booking]})})]}):null,(0,n.jsxs)("li",{children:[(0,n.jsx)("hr",{}),(0,n.jsx)("div",{className:"ps-3 pe-3 account-header-username",children:d.text_social}),(0,n.jsx)("hr",{})]}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:i.user_profile_url,children:[(0,n.jsx)("i",{className:"fas fa-user-circle"})," ",d.text_my_profile]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/s/feed",children:[(0,n.jsx)("i",{className:"fas fa-thumbs-up"})," ",d.text_comunity]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/s/invitations",children:[(0,n.jsx)("i",{className:"far fa-envelope"})," ",d.text_invitations]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/s/friends",children:[(0,n.jsx)("i",{className:"fas fa-users"})," ",d.text_friends]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/s/events",children:[(0,n.jsx)("i",{className:"far fa-calendar-alt"})," ",d.text_events]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/s/groups",children:[(0,n.jsx)("i",{className:"fas fa-user-fr
1iends"})," ",d.text_groups]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/s/articles",children:[(0,n.jsx)("i",{className:"far fa-newspaper"})," ",d.text_articles]})})]}),(0,n.jsx)("hr",{}),(0,n.jsx)("ul",{className:"account-header-link-list",children:(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/a/logout",children:[(0,n.jsx)("i",{className:"fas fa-power-off"})," ",d.text_disconnect]})})})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{className:"account-header-link-list",children:[(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/login",children:[(0,n.jsx)("i",{className:"far fa-user"})," ",d.text_enter_in_account]})}),(0,n.jsx)("li",{children:(0,n.jsxs)("a",{href:"/login",children:[(0,n.jsx)("i",{className:"fas fa-user-plus"})," ",d.text_new_account]})})]})})})]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"account-header-mobile",children:(0,n.jsx)("div",{className:"icon-header",children:(null===i||void 0===i?void 0:i.logged)?(0,n.jsx)("div",{className:"icon-header-cont",onClick:function(){return s(!a)},children:(0,n.jsx)(l.Z,{src:(null===i||void 0===i?void 0:i.user_profile_image)?null===i||void 0===i?void 0:i.user_profile_image:"https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/image/profile_icon.jpg",alt:"profile",height:500,width:500,priority:!0,objectFit:"cover"})}):(0,n.jsx)("div",{className:"icon-header-cont",onClick:function(){return s(!a)},children:(0,n.jsx)(l.Z,{src:"".concat("https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/","image/profile_icon.jpg"),alt:"profile",height:500,width:500,priority:!0,objectFit:"cover"})})})}),(0,n.jsx)("div",{className:"account-header-desktop",children:d?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"logged-header-cont position-relative",onMouseEnter:m,onMouseLeave:m,children:[(0,n.jsxs)("div",{className:"logged-header-icon-title-cont",id:"account-drop-down-desktop-".concat(c),"data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:m,children:[(0,n.jsxs)("div",{className:"logged-header-icon-cont",children:[(0,n.jsx)("div",{className:"logged-header-icon",children:(0,n.jsx)(l.Z,{src:(null===i||void 0===i?void 0:i.user_profile_image)?null===i||void 0===i?void 0:i.user_profile_image:"https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/image/profile_icon.jpg",alt:"profile",height:500,width:500,priority:!0,objectFit:"cover"})}),(null===i||void 0===i?void 0:i.logged)?(0,n.jsx)("span",{className:"logged-header-online"}):(0,n.jsx)("span",{className:"logged-header-offline"})]}),(0,n.jsxs)("span",{className:"cont-title-header",children:[(null===d||void 0===d?void 0:d.text_my_account)?null===d||void 0===d?void 0:d.text_my_account:"Contul meu "," ",(0,n.jsx)("i",{className:"fas fa-caret-down"})]})]}),(0,n.jsx)("div",{className:"dropdown-menu dropdown-menu-end account-header-dropdown",children:(null===i||void 0===i?void 0:i.logged)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"account-header-user",children:(0,n.jsxs)("div",{className:"account-header-username",children:[null===d||void 0===d?void 0:d.text_hello,null===i||void 0===i?void 0:i.username]})}),(0,n.jsx)("hr",{}),(0,n.jsxs)("ul",{className:"account-header-link-list",children:[(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/a/account",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-user"})," ",null===d||void 0===d?void 0:d.text_my_account]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/a/orders",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-history"})," ",null===d||void 0===d?void 0:d.text_my_orders]})})}),(null===i||void 0===i?void 0:i.config_booking_status)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/a/bookings",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-bookmark"})," ",null===d||void 0===d?void 0:d.text_my_bookings]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/booking",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-address-book"})," ",null===d||void 0===d?void 0:d.text_booking]})})})]}):null,(0,n.jsxs)("li",{children:[(0,n.jsx)("hr",{}),(0,n.jsx)("div",{className:"ps-3 pe-3 account-header-username",children:null===d||void 0===d?void 0:d.text_social}),(0,n.jsx)("hr",{})]}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:null===i||void 0===i?void 0:i.user_profile_url,children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-user-circle"})," ",null===d||void 0===d?void 0:d.text_my_profile]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/s/feed",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-thumbs-up"})," ",null===d||void 0===d?void 0:d.text_comunity]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/s/invitations",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-envelope"})," ",null===d||void 0===d?void 0:d.text_invitations]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/s/friends",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-users"})," ",null===d||void 0===d?void 0:d.text_friends]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/s/events",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-calendar-alt"})," ",null===d||void 0===d?void 0:d.text_events]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/s/groups",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-user-fr
1iends"})," ",null===d||void 0===d?void 0:d.text_groups]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/s/articles",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-newspaper"})," ",null===d||void 0===d?void 0:d.text_articles]})})})]}),(0,n.jsx)("hr",{}),(0,n.jsx)("ul",{className:"account-header-link-list",children:(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/a/logout",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-power-off"})," ",null===d||void 0===d?void 0:d.text_disconnect]})})})})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("ul",{className:"account-header-link-list",children:[(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/login",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"far fa-user"})," ",null===d||void 0===d?void 0:d.text_enter_in_account]})})}),(0,n.jsx)("li",{children:(0,n.jsx)(t(),{href:"/login",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("i",{className:"fas fa-user-plus"})," ",null===d||void 0===d?void 0:d.text_new_account]})})})]})})})]})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"logged-header-cont position-relative",children:(0,n.jsxs)("div",{className:"logged-header-icon-title-cont",children:[(0,n.jsxs)("div",{className:"logged-header-icon-cont",children:[(0,n.jsx)("div",{className:"logged-header-icon",children:(0,n.jsx)(l.Z,{src:(null===i||void 0===i?void 0:i.user_profile_image)?null===i||void 0===i?void 0:i.user_profile_image:"https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/image/profile_icon.jpg",alt:"profile",height:500,width:500,priority:!0,objectFit:"cover"})}),(null===i||void 0===i?void 0:i.logged)?(0,n.jsx)("span",{className:"logged-header-online"}):(0,n.jsx)("span",{className:"logged-header-offline"})]}),(0,n.jsxs)("span",{className:"cont-title-header",children:[(null===d||void 0===d?void 0:d.text_my_account)?null===d||void 0===d?void 0:d.text_my_account:"Contul meu "," ",(0,n.jsx)("i",{className:"fas fa-caret-down"})]})]})})})})]})}},47473:function(e,i,s){var n=s(85893),a=s(41664),t=s.n(a),l=s(40996);i.Z=function(e){e.userId,e.user_profile_url,e.texts;var i=e.feedPostHeader,s=(0,l.mx)().totalNewMessages;return i?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("a",{href:"/chat",children:(0,n.jsxs)("div",{className:"full-feed-post-header-btn-cont me-2",children:[(0,n.jsx)("div",{className:"icon-header-chat",children:(0,n.jsx)("img",{src:"/images/chat.svg",alt:"chat",className:"img-fluid"})}),s>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"full-feed-post-chat-list-item-unread-messages",children:s})})]})})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(t(),{href:"/chat",children:(0,n.jsxs)("a",{className:"icon-header icon-header-chat",children:[(0,n.jsx)("img",{src:"/images/chat.svg",alt:"friends",className:"img-fluid"}),s>0&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"chat-list-item-unread-messages",children:s})})]})})})}},80291:function(e,i,s){var n=s(47568),a=s(20414),t=s(85893),l=(s(67294),s(47041)),d=s(66435);i.Z=function(e){var i,s,c=e.header,o=(0,d.SJ)().nav;if(void 0!==(0,l.getCookie)("policy"))return(0,t.jsx)(t.Fragment,{});var r=function(){var e=(0,n.Z)((function(){return(0,a.__generator)(this,(function(e){return(0,l.setCookie)("policy",Date.now(),{maxAge:31536e7}),(null===document||void 0===document?void 0:document.getElementById("cookiePo
1pupCont")).style.display="none",[2]}))}));return function(){return e.apply(this,arguments)}}();return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{children:(0,t.jsxs)("div",{id:"cookiePopupCont",children:[(0,t.jsx)("div",{className:"cookie-popup-info",dangerouslySetInnerHTML:{__html:null===c||void 0===c?void 0:c.text_cookie}}),(0,t.jsx)("div",{className:"btn btn-sm btn-primary cookie-popup-button",onClick:function(){return r()},children:null===o||void 0===o||null===(i=o.header)||void 0===i||null===(s=i.texts)||void 0===s?void 0:s.button_accept})]})})})}},10880:function(e,i,s){var n=s(85893),a=(s(67294),s(41664)),t=s.n(a);i.Z=function(e){var i=e.header,s=e.texts,a=e.noLogged;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"cont-fanindex-main",children:(0,n.jsx)(t(),{href:null===i||void 0===i?void 0:i.fanindex_page_url,children:(0,n.jsxs)("a",{children:[(0,n.jsx)("img",{src:null===i||void 0===i?void 0:i.fanindex_icon,alt:"fanindex"}),(0,n.jsxs)("span",{children:[s.text_red_dog_index,!(null===i||void 0===i?void 0:i.is_superadmin)&&(0,n.jsx)(n.Fragment,{children:((null===i||void 0===i?void 0:i.logged)||a)&&(0,n.jsxs)(n.Fragment,{children:["\xa0(",null===i||void 0===i?void 0:i.fanindex_score,")"]})})]}),!(null===i||void 0===i?void 0:i.is_superadmin)&&(0,n.jsx)(n.Fragment,{children:((null===i||void 0===i?void 0:i.logged)||a)&&(0,n.jsx)("span",{className:"fanindex-mobile",children:null===i||void 0===i?void 0:i.fanindex_score})})]})})})})}},14574:function(e,i,s){var n=s(47568),a=s(29815),t=s(20414),l=s(85893),d=s(67294),c=s(41664),o=s.n(c),r=s(55120),m=s(80243),h=s(41449),u=s(37546),v=s(58533),x=s(50452),f=s(61646);i.Z=function(e){var i=e.userId,s=e.user_profile_url,c=e.texts,j=e.feedPostHeader,p=e.uniqueIncrementor,g=void 0===p?1:p,_=(0,d.useState)([]),N=_[0],b=_[1],w=(0,d.useState)(0),y=w[0],k=w[1],F=(0,d.useState)(!0),C=F[0],Z=F[1],M=(0,x.Ok)(),E=M.newNotification,S=M.sendNotification;(0,d.useEffect)((function(){q(1)}),[]),(0,d.useEffect)((function(){q(1)}),[E]);for(var q=function(){var e=(0,n.Z)((function(e){var s,n;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:return[4,f.Z.get("/index.php?route=account/friend/getFriendRequests&customer_id=".concat(i,"&page=").concat(null!==e&&void 0!==e?e:y+1))];case 1:return(s=t.sent().data).friend_requests&&0!==s.friend_requests.length?(n=1===e?(0,a.Z)(s.friend_requests):(0,a.Z)(N).concat((0,a.Z)(s.friend_requests)),b(n),k(y+1),[2]):(Z(!1),[2])}}))}));return function(i){return e.apply(this,arguments)}}(),T=function(){var e=(0,n.Z)((function(e){var i,s,n;return(0,t.__generator)(this,(function(a){switch(a.label){case 0:return(i=new FormData).append("customer_id",String(e)),[4,f.Z.post("/index.php?route=account/friend/confirmFriend",i,{})];case 1:return s=a.sent(),(n=s.data).error?((0,u.P)(n.error),[2]):(n.success&&((0,u.b)(n.success),S(e,"friend_confirm"),k(0),b([]),q(1)),[2])}}))}));return function(i){return e.apply(this,arguments)}}(),I=function(){var e=(0,n.Z)((function(e){var i,s,n;return(0,t.__generator)(this,(function(a){switch(a.label){case 0:return(i=new FormData).append("customer_id",String(e)),[4,f.Z.post("/index.php?route=account/friend/removeFriend",
1i,{})];case 1:return s=a.sent(),(n=s.data).error?((0,u.P)(n.error),[2]):(n.success&&((0,u.b)(n.success),q(1)),[2])}}))}));return function(i){return e.apply(this,arguments)}}(),L=0,O=0;O<N.length;O++)N[O].my_request||L++;var B=L,P=B>0,H=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("friend-requests-drop-down-desktop"))||void 0===e||e.click())},D=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("friend-requests-drop-down-desktop-mdl-".concat(g)))||void 0===e||e.click())};return j?(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"position-relative",onClick:function(){D()},children:[(0,l.jsxs)("button",{className:"btn p-0",type:"button",id:"friend-requests-drop-down-desktop-mdl-".concat(g),"data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:function(){D()},children:[(0,l.jsx)("div",{className:"position-relative full-feed-post-header-btn-cont me-2",children:(0,l.jsx)("img",{src:"/images/friends.svg",alt:"friends",className:"img-fluid"})}),P&&(0,l.jsxs)("span",{className:"full-feed-post-header-cart-badge badge rounded-pill bg-danger",children:[B,(0,l.jsx)("span",{className:"visually-hidden",children:c.text_friend_requests})]})]}),(0,l.jsx)("div",{className:"friend-request-dropdown cart-button-dropdown dropdown-menu dropdown-menu-end header-friend-requests-dropdwon-menu-desktop full-feed-post-header-friend-requests","aria-labelledby":"friend-request-drop-down",children:P?(0,l.jsxs)("div",{className:"cart-dropdown-filled",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:c.text_friend_requests}),(0,l.jsx)("div",{className:"cont-products-cart-header ".concat(0==(null===N||void 0===N?void 0:N.length)&&"cont-products-cart-header-hide-scrollbar"),children:N?0===(null===N||void 0===N?void 0:N.length)?(0,l.jsx)("div",{className:"cart-dropdown-empty",children:(0,l.jsx)("div",{className:"cont-empty-cart-header",children:c.text_no_friend_requests})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(v.Z,{dataLength:N.length,next:q,hasMore:C,loader:(0,l.jsx)(h.Z,{height:200}),style:{overflow:"visible"},children:N.map((function(e,i){if(!e.my_request)return(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item align-items-center ms-2 me-2",children:[(0,l.jsx)("a",{className:"social-item-icon social-item-icon-sm me-1",href:"".concat(e.profile_url),children:(0,l.jsx)(r.Z,{src:e.profile_image,alt:"profile-image",width:400,height:400,objectFit:"cover",nowidthcheck:!0})}),(0,l.jsxs)("div",{className:"info-cont-social-feed-friends-list main-cont-dd-social-feed-list",children:[(0,l.jsxs)("a",{className:"user-general-name",href:"".concat(e.profile_url),children:[e.username,e.is_official&&(0,l.jsxs)(l.Fragment,{children:["\xa0",(0,l.jsx)("i",{className:"fas fa-check-circle social-feed-official-account",style:{fontSize:14}})]})]}),(0,l.jsx)("span",{className:"mt-1",children:e.date_added}),(0,l.jsxs)("div",{className:"cont-btns-social-feed-list-full-post",children:[(0,l.jsx)("div",{className:"btn btn-sm btn-primary mb-1",onClick:function(){return T(e.friend_id)},children:c.button_confirm}),(0,l.jsx)("div",{className:"btn btn-sm btn-outline-secondary",onClick:function(){return I(e.friend_id)},children:c.button_delete})]})]})]})},i)}))})}):(0,l.jsx)(h.Z,{height:300})}),(0,l.jsx)("div",{className:"cart-dropdown-footer",children:(0,l.jsx)("div",{children:(0,l.jsx)("a",{className:"btn btn-primary w-100",href:"".concat(s,"/friends"),children:c.text_view_friends})})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"cart-dropdown-empty",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:c.text_friend_requests}),(0,l.jsx)("div",{className:"cont-products-cart-header cont-products-cart-header-hide-scrollbar",children:(0,l.jsx)("div",{className:"cont-empty-cart-header",children:c.text_no_friend_requests})})]})})})]})}):(0,l.jsxs)("div",{className:"icon-header icon-header-first",children:[(0,l.jsx)("div",{className:"friend-requests-header-mobile position-relative",children:(0,l.jsx)(o(),{href:"".concat(s,"/friends"),children:(0,l.jsxs)("a",{id:"friend-requests-drop-down",className:"btn p-0",children:[(0,l.jsx)("img",{src:"/images/friends.svg",alt:"friends",className:"img-fluid"}),P&&(0,l.jsxs)("span",{className:"header-cart-badge badge rounded-pill bg-danger",children:[B,(0,l.jsx)("span",{className:"visually-hidden",children:c.text_friend_requests})]})]})})}),(0,l.jsx)("div",{className:"friend-requests-header-desktop",children:(0,l.jsxs)("div",{className:"position-relative",onMouseEnter:H,onMouseLeave:H,children:[(0,l.jsx)("button",{className:"btn p-0",type:"button",id:"friend-requests-drop-down-desktop","data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:H,children:(0,l.jsxs)("div",{className:"position-relative",children:[(0,l.jsx)("img",{src:"/images/friends.svg",alt:"friends",className:"img-fluid"}),P&&(0,l.jsxs)("span",{className:"header-cart-badge badge rounded-pill bg-danger",children:[B,(0,l.jsx)("span",{className:"visually-hidden",children:c.text_friend_requests})]})]})}),(0,l.jsx)("div",{className:"friend-request-dropdown cart-button-dropdown dropdown-menu dropdown-menu-end header-friend-requests-dropdwon-menu-desktop","aria-labelledby":"friend-request-drop-down",children:P?(0,l.jsxs)("div",{className:"cart-dropdown-filled",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:c.text_friend_requests}),(0,l.jsx)("div",{className:"cont-products-cart-header ".concat(0==(null===N||void 0===N?void 0:N.length)&&"cont-products-cart-header-hide-scrollbar"),children:N?0===(null===N||void 0===N?void 0:N.length)?(0,l.jsx)("div",{className:"cart-dropdown-empty",children:(0,l.jsx)("div",{className:"cont-empty-cart-header",children:c.text_no_friend_requests})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(v.Z,{dataLength:N.length,next:q,hasMore:C,loader:(0,l.jsx)(h.Z,{height:200}),style:{overflow:"visible"},children:N.map((function(e,i){if(!e.my_request)return(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsx)(m.Z,{user:e,view_position:"header",showButtons:!0,myProfile:{logged:!0},confirmFriend:function(){return T(e.friend_id)},removeFriend:function(){return I(e.friend_id)},texts:c})},i)}))})}):(0,l.jsx)(h.Z,{height:300})}),(0,l.jsx)("div",{className:"cart-dropdown-footer",children:(0,l.jsx)("div",{children:(0,l.jsx)(o(),{href:"".concat(s,"/friends"),children:(0,l.jsx)("a",{className:"btn btn-primary w-100",children:c.text_view_friends})})})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"cart-dropdown-empty",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:c.text_friend_requests}),(0,l.jsx)("div",{className:"cont-products-cart-header cont-products-cart-header-hide-scrollbar",children:(0,l.jsx)("div",{className:"cont-empty-cart-header",children:c.text_no_friend_requests})})]})})})]})})]})}},24752:function(e,i,s){var n=s(47568),a=s(29815),t=s(20414),l=s(85893),d=s(67294),c=s(41664),o=s.n(c),r=s(41449),m=s(58533),h=s(55120),u=s(50452),v=s(61646);i.Z=function(e){var i=e.userId,s=e.texts,c=e.dataType,x=e.feedPostHeader,f=e.uniqueIncrementor,j=(0,d.useState)([]),p=j[0],g=j[1],_=(0,d.useState)(0),N=_[0],b=_[1],w=(0,d.useState)(!0),y=w[0],k=w[1],F=(0,u.Ok)().newNotification;(0,d.useEffect)((function(){C(1)}),[]),(0,d.useEffect)((function(){C(1)}),[F]);for(var C=function(){var e=(0,n.Z)((function(e){var s,n;return(0,t.__generator)(this,(function(t){switch(t.label){case 0:return[4,v.Z.get("/index.php?route=account/notification/getNotifications&customer_id=".concat(i,"&viewed=0&page=").concat(null!==e&&void 0!==e?e:N+1))];case 1:return(s=t.sent().data).notifications&&0!==s.notifications.length?(n=1===e?(0,a.Z)(s.notifications):(0,a.Z)(p).concat((0,a.Z)(s.notifications)),g(n),b(N+1),[2]):(k(!1),[2])}}))}));return function(i){return e.apply(this,arguments)}}(),Z=0,M=0;M<p.length;M++)Z++;var E=Z,S=E>0,q=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("notifications-requests-drop-down-desktop-".concat(c)))||void 0===e||e.click(),E>0&&v.Z.get("/index.php?route=account/notification/setViewed&customer_id=".concat(i)))},T=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("notifications-requests-drop-down-desktop-small-".concat(c,"-").concat(f)))||void 0===e||e.click(),E>0&&v.Z.get("/index.php?route=account/notification/setViewed&customer_id=".concat(i)))};return x?(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"position-relative",onClick:function(){T()},children:[(0,l.jsxs)("button",{className:"btn p-0",type:"button",id:"notifications-requests-drop-down-desktop-small-".concat(c,"-").concat(f),"data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:function(){T()},children:[(0,l.jsx)("div",{className:"position-relative full-feed-post-header-btn-cont me-2 ".concat(2!==f&&""),children:(0,l.jsx)("img",{src:"/images/bell.svg",alt:"friends",className:"img-fluid"})}),S&&(0,l.jsxs)("span",{className:"full-feed-post-header-cart-badge badge rounded-pill bg-danger ".concat(2!==f&&""),children:[E,(0,l.jsx)("span",{className:"visually-hidden",children:s.text_notifications})]})]}),(0,l.jsx)("div",{className:"friend-request-dropdown cart-button-dropdown dropdown-menu dropdown-menu-end header-notifications-dropdwon-menu-desktop","aria-labelledby":"notifications-request-drop-down",children:S?(0,l.jsxs)("div",{className:"cart-dropdown-filled",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:s.text_notifications}),(0,l.jsx)("div",{className:"cont-products-cart-header ".concat(0==p.length&&"cont-products-cart-header-hide-scrollbar"),children:p?0===(null===p||void 0===p?void 0:p.length)?(0,l.jsx)("div",{className:"cart-dropdown-empty",children:(0,l.jsx)("div",{className:"cont-empty-cart-header",children:s.text_no_new_notifications})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(m.Z,{dataLength:p.length,next:C,hasMore:y,loader:(0,l.jsx)(r.Z,{height:200}),style:{overflow:"visible"},children:p.map((function(e,i){return"friend_confirm"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(e.profile_url),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-users notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(e.profile_url),children:[(0,l.jsx)("b",{children:e.username}),e.description.replace(e.username,"")]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"friend_request"==e.notification_type?(0,l.jsx)(d.Fragment,{children:!e.confirmed_friend_request&&(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(e.profile_url),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-users notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(e.profile_url),children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]}),(0,l.jsx)("span",{className:"title-notification",children:e.confirm_friend_request_description}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})})},i):"like_received"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-thumbs-up notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"comment_received"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-comment notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_article"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(e.article_url),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.article_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-newspaper notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(e.article_url),children:[e.description," ",(0,l.jsx)("b",{children:e.article_title})]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_post"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-stream notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_event"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-calendar notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:[e.description," ",(0,l.jsx)("b",{children:e.event_name})]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e
1.custom_data.title}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.custom_data.description}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_personalised"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-hand-point-right notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:[e.description," ",(0,l.jsx)("b",{children:e.custom_data.title})]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.custom_data.description}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):(0,l.jsx)(l.Fragment,{})}))})}):(0,l.jsx)(r.Z,{height:300})}),(0,l.jsx)("div",{className:"cart-dropdown-footer",children:(0,l.jsx)("div",{children:(0,l.jsx)("a",{className:"btn btn-primary w-100",href:"/notifications",children:s.text_see_all})})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"cart-dropdown-empty",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:s.text_notifications}),(0,l.jsxs)("div",{className:"cont-products-cart-header cont-products-cart-header-hide-scrollbar",children:[(0,l.jsx)("div",{className:"cont-empty-cart-header",children:s.text_no_new_notifications}),(0,l.jsx)("div",{className:"cart-dropdown-footer",children:(0,l.jsx)("div",{children:(0,l.jsx)("a",{className:"btn btn-primary w-100",href:"/notifications",children:s.text_see_all})})})]})]})})})]})}):(0,l.jsxs)("div",{className:"icon-header icon-header-first",children:[(0,l.jsx)("div",{className:"friend-requests-header-mobile position-relative",children:(0,l.jsx)(o(),{href:"/notifications",children:(0,l.jsxs)("a",{id:"notifications-requests-drop-down",className:"btn",onClick:function(){v.Z.get("/index.php?route=account/notification/setViewed&customer_id=".concat(i))},children:[(0,l.jsx)("img",{src:"/images/bell.svg",alt:"friends",className:"img-fluid"}),S&&(0,l.jsxs)("span",{className:"header-cart-badge badge rounded-pill bg-danger",children:[E,(0,l.jsx)("span",{className:"visually-hidden",children:null===s||void 0===s?void 0:s.text_notifications})]})]})})}),(0,l.jsx)("div",{className:"friend-requests-header-desktop",children:(0,l.jsxs)("div",{className:"position-relative",onMouseEnter:q,onMouseLeave:q,children:[(0,l.jsx)("button",{className:"btn p-0",type:"button",id:"notifications-requests-drop-down-desktop-".concat(c),"data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:q,children:(0,l.jsxs)("div",{className:"position-relative",children:[(0,l.jsx)("img",{src:"/images/bell.svg",alt:"friends",className:"img-fluid"}),S&&(0,l.jsxs)("span",{className:"header-cart-badge badge rounded-pill bg-danger",children:[E,(0,l.jsx)("span",{className:"visually-hidden",children:null===s||void 0===s?void 0:s.text_notifications})]})]})}),(0,l.jsx)("div",{className:"friend-request-dropdown cart-button-dropdown dropdown-menu dropdown-menu-end header-notifications-dropdwon-menu-desktop","aria-labelledby":"friend-request-drop-down",children:S?(0,l.jsxs)("div",{className:"cart-dropdown-filled",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:null===s||void 0===s?void 0:s.text_notifications}),(0,l.jsx)("div",{className:"cont-products-cart-header ".concat(0==p.length&&"cont-products-cart-header-hide-scrollbar"),children:p?0===(null===p||void 0===p?void 0:p.length)?(0,l.jsx)("div",{className:"cart-dropdown-empty",children:(0,l.jsx)("div",{className:"cont-empty-cart-header",children:null===s||void 0===s?void 0:s.text_no_new_notifications})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(m.Z,{dataLength:p.length,next:C,hasMore:y,loader:(0,l.jsx)(r.Z,{height:200}),style:{overflow:"visible"},children:p.map((function(e,i){return"friend_confirm"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)(o(),{href:"".concat(e.profile_url),children:(0,l.jsxs)("a",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-users notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)(o(),{href:"".concat(e.profile_url),children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username}),e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"friend_request"==e.notification_type?(0,l.jsx)(d.Fragment,{children:!e.confirmed_friend_request&&(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)(o(),{href:"".concat(e.profile_url),children:(0,l.jsxs)("a",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-users notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)(o(),{href:"".concat(e.profile_url),children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"title-notification",children:e.confirm_friend_request_description}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})})},i):"like_received"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-thumbs-up notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"comment_received"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-comment notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_article"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(e.article_url),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.article_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-newspaper notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(e.article_url),children:[e.description," ",(0,l.jsx)("b",{children:e.article_title})]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_post"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-stream notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsx)("div",{children:(0,l.jsxs)("a",{className:"title-notification",children:[(0,l.jsx)("b",{children:e.username})," ",e.description.replace(e.username,"")]})}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_event"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-calendar notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:[e.description," ",(0,l.jsx)("b",{children:e.event_name})]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.custom_data.title}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.custom_data.description}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):"push_notification_personalised"==e.notification_type?(0,l.jsx)("div",{className:"col-12 col-user-friends-item",children:(0,l.jsxs)("div",{className:"social-feed-friends-list-item",children:[(0,l.jsx)("a",{href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:(0,l.jsxs)("span",{className:"social-item-icon social-item-icon-sm me-1",children:[(0,l.jsx)(h.Z,{src:e.profile_image,alt:"profile-image",width:50,height:50,objectFit:"cover",nowidthcheck:!0}),(0,l.jsx)("div",{children:(0,l.jsx)("i",{className:"fas fa-hand-point-right notifications-list-icon"})})]})}),(0,l.jsxs)("div",{className:"info-cont-notification",children:[(0,l.jsxs)("a",{className:"title-notification",href:"".concat(""!==e.custom_data.link_web?e.custom_data.link_web:""),children:[e.description," ",(0,l.jsx)("b",{children:e.custom_data.title})]}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.custom_data.description}),(0,l.jsx)("span",{className:"user-general-date-added",children:e.date_added})]})]})},i):(0,l.jsx)(l.Fragment,{})}))})}):(0,l.jsx)(r.Z,{height:300})}),(0,l.jsx)("div",{className:"cart-dropdown-footer",children:(0,l.jsx)("div",{children:(0,l.jsx)(o(),{href:"/notifications",children:(0,l.jsx)("a",{className:"btn btn-primary w-100",children:null===s||void 0===s?void 0:s.text_see_all})})})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"cart-dropdown-empty",children:[(0,l.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:null===s||void 0===s?void 0:s.text_notifications}),(0,l.jsxs)("div",{className:"cont-products-cart-header cont-products-cart-header-hide-scrollbar",children:[(0,l.jsx)("div",{className:"cont-empty-cart-header",children:null===s||void 0===s?void 0:s.text_no_new_notifications}),(0,l.jsx)("div",{className:"cart-dropdown-footer",children:(0,l.jsx)("div",{children:(0,l.jsx)(o(),{href:"/notifications",children:(0,l.jsx)("a",{className:"btn btn-primary w-100",children:null===s||void 0===s?void 0:s.text_see_all})})})})]})]})})})]})})]})}},7917:function(e,i,s){s.d(i,{Z:function(){return D}});var n=s(85893),a=s(67294),t=s(41664),l=s.n(t),d=s(67599),c=s(55120),o=s(93970),r=s(58776),m=s(41431),h=s(11163),u=function(e){var i,s=e.bottomPosition,a=e.texts,t=((0,o.Yu)().data||{}).wishlist,d=(null===t||void 0===t||null===(i=t.products)||void 0===i?void 0:i.length)||0,u=d>0,v=((0,h.useRouter)()||{}).pathname,x=function(){var e;document&&(null===(e=null===document||void 0===document?void 0:document.getElementById("wishlist-drop-down-desktop"))||void 0===e||e.click())},f=(0,r.Z)({}).handleRemoveFromWishlist,j=(0,m.Z)({}),p=(j.cartLoading,j.handleAddToCart);return(0,n.jsxs)("div",{className:"icon-header w-100",children:[s?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"".concat("/a/wishlist"!==v?"wishlist-header-mobile":"wishlist-header-mobile wishlist-header-mobile-selected"),children:(0,n.jsx)(l(),{href:"/a/wishlist",children:(0,n.jsxs)("a",{id:"wishlist-drop-down",className:"home-header-mobile",children:[(0,n.jsx)("div",{className:"home-header-mobile-img-cont",children:(0,n.jsx)("img",{src:"/images/wishlist.png",alt:"wishlist",className:"img-fluid"})}),(0,n.jsx)("div",{className:"".concat("/a/wishlist"!==v?"home-header-unselected-route":"home-header-selected-route"),children:null===a||void 0===a?void 0:a.text_mobile_nav_wishlist}),(0,n.jsx)("div",{className:"home-header-mobile-badge-cont",children:u&&(0,n.jsxs)("span",{className:"header-cart-badge badge rounded-pill",children:[d,(0,n.jsx)("span",{className:"visually-hidden",children:(null===a||void 0===a?void 0:a.text_favourites)?null===a||void 0===a?void 0:a.text_favourites:"Favorite"})]})})]})})})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"wishlist-header-top-mobile",children:(0,n.jsx)(l(),{href:"/a/wishlist",children:(0,n.jsxs)("a",{id:"wishlist-drop-down",children:[(0,n.jsx)("div",{className:"home-header-mobile-img-cont",children:(0,n.jsx)("img",{src:"/images/wishlist.png",alt:"wishlist",className:"img-fluid"})}),u&&(0,n.jsxs)("span",{className:"header-cart-badge badge rounded-pill",children:[d,(0,n.jsx)("span",{className:"visually-hidden",children:(null===a||void 0===a?void 0:a.text_favourites)?null===a||void 0===a?void 0:a.text_favourites:"Favorite"})]})]})})})}),(0,n.jsx)("div",{className:"wishlist-header-desktop",children:(0,n.jsxs)("div",{className:"position-relative",onMouseEnter:x,onMouseLeave:x,children:[(0,n.jsxs)("button",{className:"btn",type:"button",id:"wishlist-drop-down-desktop","data-bs-toggle":"dropdown","data-bs-auto-close":"outside","aria-expanded":"false",onClick:x,children:[(0,n.jsxs)("div",{className:"position-relative",children:[(0,n.jsx)("img",{src:"/images/wishlist.svg",alt:"wishlist",className:"img-fluid"}),u&&(0,n.jsxs)("span",{className:"header-cart-badge badge rounded-pill bg-danger",children:[d,(0,n.jsx)("span",{className:"visually-hidden",children:(null===a||void 0===a?void 0:a.text_favourites)?null===a||void 0===a?void 0:a.text_favourites:"Favorite"})]})]}),(0,n.jsxs)("span",{className:"cont-title-header",children:[(null===a||void 0===a?void 0:a.text_favourites)?null===a||void 0===a?void 0:a.text_favourites:"Favorite"," ",(0,n.jsx)("i",{className:"fas fa-caret-down"})]})]}),(0,n.jsx)("div",{className:"cart-button-dropdown dropdown-menu dropdown-menu-end header-wishlist-dropdwon-menu-desktop","aria-labelledby":"
1cart-drop-down",children:u?(0,n.jsxs)("div",{className:"cart-dropdown-filled",children:[(0,n.jsx)("div",{className:"cart-dropdown-header cart-dropdown-module",children:(null===a||void 0===a?void 0:a.text_last_added)?null===a||void 0===a?void 0:a.text_last_added:"Ultimele adaugate"}),(0,n.jsx)("div",{className:"cont-products-cart-header ".concat(0==t.products.length&&"cont-products-cart-header-hide-scrollbar"),children:t.products.slice(0,6).map((function(e,i){var s=e.name.length>64?"".concat(e.name.slice(0,64),"..."):e.name;return(0,n.jsxs)("div",{className:"cart-product-list-item cart-dropdown-module",children:[(0,n.jsx)("div",{className:"cart-product-image-cont",children:(0,n.jsx)(l(),{href:"/".concat(e.href,"?ref=").concat(e.product_id),children:(0,n.jsx)("a",{children:(0,n.jsx)("div",{children:(0,n.jsx)(c.Z,{src:e.image,alt:e.name,height:300,width:300,priority:!0})})})})}),(0,n.jsxs)("div",{className:"cart-product-info",children:[(0,n.jsx)("h6",{children:s.replace(/&/g,"&").replace(/"/g,'"')}),(0,n.jsxs)("div",{className:"cart-wishlist-list-item-add-cont",onClick:function(){return p(e.id,1,[],e.name.replace(/&/g,"&").replace(/"/g,'"'))},children:[(0,n.jsx)("i",{className:"fas fa-shopping-cart"})," ",(0,n.jsx)("span",{children:(null===a||void 0===a?void 0:a.button_cart)?null===a||void 0===a?void 0:a.button_cart:"Adauga in cos"})]})]}),(0,n.jsxs)("div",{className:"cart-product-list-item-price",children:[e.special?(0,n.jsxs)("div",{style:{minWidth:90},children:[(0,n.jsx)("div",{className:"cart-product-list-price-text-old",dangerouslySetInnerHTML:{__html:"PRP: "+e.price}}),(0,n.jsx)("div",{className:"cart-product-list-price-text",dangerouslySetInnerHTML:{__html:e.special}})]}):(0,n.jsx)("div",{className:"cart-product-list-price-text",dangerouslySetInnerHTML:{__html:e.price}}),(0,n.jsx)("div",{className:"cart-product-remove-item",children:(0,n.jsx)("button",{className:"btn btn-danger btn-sm",onClick:function(){return f(e.id,e.name)},children:(0,n.jsx)("i",{className:"fas fa-times"})})})]})]},i)}))}),(0,n.jsx)("div",{className:"cart-dropdown-footer",children:(0,n.jsx)("div",{children:(0,n.jsx)(l(),{href:"/a/wishlist",children:(0,n.jsx)("a",{className:"btn btn-primary w-100",children:(null===a||void 0===a?void 0:a.text_view_all_favourites)?null===a||void 0===a?void 0:a.text_view_all_favourites:"Vezi toate produsele favorite"})})})})]}):(0,n.jsx)("div",{className:"cart-dropdown-empty",children:(0,n.jsx)("div",{className:"cont-empty-cart-header",children:(null===a||void 0===a?void 0:a.text_no_favourites)?null===a||void 0===a?void 0:a.text_no_favourites:"Nu ai produse favorite"})})})]})})]})},v=s(75210),x=s(14574),f=s(24752),j=s(47473),p=function(e){var i=e.mobileSearchActiveClass,s=e.placeholder_search,t=e.pathname,l=(0,h.useRouter)(),d=function(){var e="";(null===t||void 0===t?void 0:t.includes("/s/"))&&(e="?pref=social");var i=null===document||void 0===document?void 0:document.getElementById("header-search-input"),s=null===i||void 0===i?void 0:i.value;s.trim().length>1&&(s=s.replace(/ /g,"+"),s=encodeURI(s),l.push("/search/"+s+e))};return(0,a.useEffect)((function(){var e;null===(e=null===document||void 0===document?void 0:document.getElementById("header-search-input"))||void 0===e||e.addEventListener("keyup",(function(e){"Enter"===e.key&&(e.preventDefault(),d())}))}),[]),(0,n.jsx)("div",{className:"col-search-header ".concat(i),children:(0,n.jsx)("div",{className:"w-100",children:(0,n.jsx)("div",{className:"option-item w-100",children:(0,n.jsx)("div",{className:"search-overlay search-popup",children:(0,n.jsx)("div",{className:"search-box",children:(0,n.jsxs)("div",{className:"search-form",children:[(0,n.jsx)("input",{className:"search-input form-control",name:"search",placeholder:s,type:"text",id:"header-search-input"}),(0,n.jsx)("button",{onClick:function(){return d()},className:"search-button",children:(0,n.jsx)("img",{src:"/images/search.svg",alt:"search",className:"img-fluid"})})]})})})})})})},g=s(828),_=s(2566),N=s(47568),b=s(20414),w=s(61646),y=function(e){var i=e.header,s=(e.texts,(0,h.useRouter)()),t=(0,a.useState)(!1),l=t[0],d=t[1],c=l?" show":"",o=function(){var e=(0,N.Z)((function(e){var i,n,a;return(0,b.__generator)(this,(function(t){switch(t.label){case 0:return[4,w.Z.get("/api_language_language&code=".concat(e,"¤t_url=").concat(encodeURIComponent(s.asPath)),{},{usePrefix:!0})];case 1:return(null===(n=t.sent().data)||void 0===n||null===(i=n.data)||void 0===i?void 0:i.redirect)&&("reload_page"==(null===n||void 0===n||null===(a=n.data)||void 0===a?void 0:a.redirect)?location.reload():window?window.location=n.data.redirect:location.reload()),[2]}}))}));return function(i){return e.apply(this,arguments)}}();return(null===i||void 0===i?void 0:i.language_module.languages.length)<2?(0,n.jsx)(n.Fragment,{}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"main-cont-language-select",children:(0,n.jsxs)("div",{className:"dropdown",children:[(0,n.jsx)("div",{className:"dropdown-button-language-select",id:"dropdownLanguage","data-bs-toggle":"dropdown","aria-expanded":"false",onClick:function(){d(!l)},children:(null===i||void 0===i?void 0:i.language_module.code)&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("img",{src:"".concat("https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/","image/catalog/language/").concat(null===i||void 0===i?void 0:i.language_module.code,".png")}),(0,n.jsx)("i",{className:"fas fa-caret-down"})]})}),(0,n.jsx)("ul",{className:"dropdown-language dropdown-menu".concat(c),"aria-labelledby":"dropdownLanguage",children:null===i||void 0===i?void 0:i.language_module.languages.map((function(e,i){return(0,n.jsx)("li",{children:(0,n.jsxs)("div",{className:"dropdown-item",onClick:function(){o(e.code)},children:[e.short_name&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("img",{src:"".concat("https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/","image/catalog/language/").concat(e.short_name,".png")})}),(0,n.jsx)("span",{children:e.name})]})},i)}))})]})})})},k=s(53482);function F(){return{width:window.innerWidth,height:window.innerHeight}}var C=function(e){var i,s,t,d,c,o=e.header,r=e.footer,m=e.mobileMenuState,h=(e.menuSecondaryList,e.texts),u=(0,k.Xh)().menu,v=(0,a.useState)(F),x=v[0],f=v[1],j=(0,g.Z)(m||[!1,function(){return null}],2),p=j[0],N=j[1],b=p?"active":"";(0,a.useEffect)((function(){var e=function(){f(F())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]);var w,C;"undefined"!==typeof document&&(p?null===(w=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===w||w.classList.add("open-menu-mobile"):null===(C=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===C||C.classList.remove("open-menu-mobile"));var Z=u?(0,n.jsx)(n.Fragment,{children:u.map((function(e,i){return(0,n.jsx)("li",{className:"list-item-level1-key-".concat(i),children:(0,n.jsx)("div",{className:"row",children:e.children.length?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"col-lg-3 col-menu-main-item",children:(0,n.jsx)(l(),{href:"/".concat(e.slug,"?ref=").concat(e.id),children:(0,n.jsxs)("a",{onClick:function(e){return function(e,i){var s,n;"undefined"!==typeof document&&x.width<991&&(e.preventDefault(),null===(s=null===document||void 0===document?void 0:document.getElementsByClassName("list-item-level1-key-"+i)[0])||void 0===s||s.classList.toggle("open-item"),null===(n=null===document||void 0===document?void 0:document.getElementsByClassName("megamenu-submenu")[0])||void 0===n||n.classList.toggle("open-item"))}(e,i)},children:[e.icon&&(0,n.jsx)("img",{src:e.icon,width:25,height:22}),(0,n.jsx)("span",{children:(0,n.jsx)(_.Z,{text:e.name})})]})})}),(0,n.jsx)("div",{className:"col-lg-9 col-menu-children-item",children:(0,n.jsx)("ul",{className:"main-cont-category2",children:e.children.map((function(e,i){return(0,n.jsxs)("li",{children:[(0,n.jsx)(l(),{href:"/".concat(e.slug,"?ref=").concat(e.id),children:(0,n.jsx)("a",{className:"main-link-category2",onClick:function(){return N(!1)},children:"1"==(null===o||void 0===o?void 0:o.show_menu_images)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"image-child-menu",style:{backgroundImage:"url('"+e.thumb+"')"}}),(0,n.jsx)("span",{className:"title-with-image-menu",children:(0,n.jsx)(_.Z,{text:e.name})})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("span",{children:(0,n.jsx)(_.Z,{text:e.name})})})})}),e.children&&(0,n.jsx)("ul",{className:"main-cont-category3",children:e.children.map((function(e,i){return(0,n.jsx)("li",{children:(0,n.jsx)(l(),{href:"/".concat(e.slug,"?ref=").concat(e.id),children:(0,n.jsx)("a",{className:"main-link-category3",onClick:function(){return N(!1)},children:(0,n.jsx)("span",{children:(0,n.jsx)(_.Z,{text:e.name})})})})},"lvl-2-".concat(i))}))})]},"lvl-1-".concat(i))}))})})]}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"col-lg-3 col-menu-main-item",children:(0,n.jsx)(l(),{href:"/".concat(e.slug,"?ref=").concat(e.id),children:(0,n.jsxs)("a",{className:"menu-direct-link",onClick:function(){return N(!1)},children:[e.icon&&(0,n.jsx)("img",{src:e.icon,width:25,height:22}),(0,n.jsx)("span",{children:(0,n.jsx)(_.Z,{text:e.name})})]})})})})})},"lvl-0-".concat(i))}))}):(0,n.jsx)("div",{className:"d-flex justify-content-center align-items-center mt-4 mb-4",children:(0,n.jsx)("span",{className:"spinner-border text-danger",role:"status",children:(0,n.jsx)("span",{className:"visually-hidden",children:"Loading..."})})});return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{id:"main-menu",className:"col-menu-header ".concat(b),children:(0,n.jsx)("nav",{className:"navbar navbar-expand-md",children:(0,n.jsx)("div",{className:"collapse navbar-collapse",children:(0,n.jsx)("ul",{className:"navbar-nav",children:(0,n.jsxs)("li",{className:"nav-item megamenu",children:[(0,n.jsx)(l(),{href:"store",children:(0,n.jsxs)("a",{className:"nav-link",onClick:function(e){return e.preventDefault()},children:[(0,n.jsx)("i",{className:"fas fa-bars"}),(0,n.jsx)("span",{className:"ms-2",children:(null===h||void 0===h?void 0:h.text_products)?null===h||void 0===h?void 0:h.text_products:"Produse"})]})}),(0,n.jsx)("ul",{className:"dropdown-menu",children:(0,n.jsx)("li",{className:"nav-item",children:(0,n.jsxs)("ul",{className:"megamenu-submenu",children:[(0,n.jsxs)("li",{className:"close-menu-mobile",children:[(null===o||void 0===o?void 0:o.language_module.languages.length)<2?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("span",{})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(y,{header:o,texts:null===o||void 0===o?void 0:o.texts})}),(0,n.jsx)("i",{className:"fas fa-times",onClick:function(){return N(!1)}})]}),(0,n.jsx)("div",{className:"menu-desktop-cont",children:Z}),r&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"menu-mobile-cont",children:[(0,n.jsx)("div",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsxs)("div",{className:"col-menu-main-title",children:[(0,n.jsx)("strong",{children:null===(i=null===r||void 0===r?void 0:r.account_list.texts)||void 0===i?void 0:i.entry_my_account}),(0,n.jsx)("hr",{})]})})})}),(null===o||void 0===o?void 0:o.logged)?(0,n.jsx)(n.Fragment,{children:null===r||void 0===r?void 0:r.account_list.account_list.map((function(e,i){return(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"".concat(e.href),children:(0,n.jsxs)("a",{onClick:function(){return N(!1)},children:[(0,n.jsx)("i",{className:e.icon}),(0,n.jsx)("span",{children:e.name})]})})})})},i)}))}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"/login",children:(0,n.jsxs)("a",{onClick:function(){return N(!1)},children:[(0,n.jsx)("i",{className:"far fa-user"}),(0,n.jsx)("span",{children:null===h||void 0===h?void 0:h.text_enter_in_account})]})})})})}),(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"/login",children:(0,n.jsxs)("a",{onClick:function(){return N(!1)},children:[(0,n.jsx)("i",{className:"fas fa-user-plus"}),(0,n.jsx)("span",{children:null===h||void 0===h?void 0:h.text_new_account})]})})})})})]}),(0,n.jsx)("div",{className:"col-menu-main-item-mobile mt-4",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsxs)("div",{className:"col-menu-main-title",children:[(0,n.jsx)("strong",{children:null===(s=null===r||void 0===r?void 0:r.account_list.texts)||void 0===s?void 0:s.entry_social}),(0,n.jsx)("hr",{})]})})})}),(null===o||void 0===o?void 0:o.logged)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"".concat(null===o||void 0===o?void 0:o.user_profile_url),children:(0,n.jsxs)("a",{onClick:function(){return N(!1)},children:[(0,n.jsx)("i",{className:"fas fa-user-plus"}),(0,n.jsx)("span",{children:null===o||void 0===o||null===(t=o.texts)||void 0===t?void 0:t.text_my_profile})]})})})})})}):null,null===r||void 0===r?void 0:r.social_list.social_list.map((function(e,i){return(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"".concat(e.href),children:(0,n.jsxs)("a",{onClick:function(){return N(!1)},children:[(0,n.jsx)("i",{className:e.icon}),(0,n.jsx)("span",{children:e.name})]})})})})},i)})),(0,n.jsx)("div",{className:"col-menu-main-item-mobile mt-4",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsxs)("div",{className:"col-menu-main-title",children:[(0,n.jsx)("strong",{children:null===r||void 0===r||null===(d=r.texts)||void 0===d?void 0:d.text_information}),(0,n.jsx)("hr",{})]})})})}),null===r||void 0===r?void 0:r.bottom_info_1.map((function(e,i){return(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"/".concat(e.href),children:(0,n.jsx)("a",{className:"pb-0",onClick:function(){return N(!1)},children:(0,n.jsx)("span",{children:e.title})})})})})},i)})),(0,n.jsx)("div",{className:"col-menu-main-item-mobile mt-4",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsxs)("div",{className:"col-menu-main-title",children:[(0,n.jsx)("strong",{children:null===r||void 0===r||null===(c=r.texts)||void 0===c?void 0:c.text_legal_information}),(0,n.jsx)("hr",{})]})})})}),null===r||void 0===r?void 0:r.bottom_info_3.map((function(e,i){return(0,n.jsx)("li",{className:"col-menu-main-item-mobile",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsx)("div",{className:"col-menu-main-item col-menu-main-item-single col-12",children:(0,n.jsx)(l(),{href:"/".concat(e.href),children:(0,n.jsx)("a",{className:"pb-0",onClick:function(){return N(!1)},children:(0,n.jsx)("span",{children:e.title})})})})})},i)}))]})})]})})})]})})})})})})},Z=function(e){var i=((null===e||void 0===e?void 0:e.menu)||{menu:[]}).menu;return(0,n.jsx)(n.Fragment,{children:i.length>0&&(0,n.jsx)("div",{id:"main-cont-menu-sec",children:(0,n.jsx)("ul",{children:i.map((function(e,i){return(0,n.jsx)("li",{children:(0,n.jsx)(l(),{href:"/".concat(e.slug),children:(0,n.jsx)("a",{children:e.name})})},i)}))})})})},M=s(10880),E=function(e){var i=e.header;e.texts;return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"cont-
1invitations-header-main",children:(0,n.jsx)(l(),{href:"/s/invitations",children:(0,n.jsxs)("a",{children:[(0,n.jsx)("span",{children:null===i||void 0===i?void 0:i.user_invites}),(0,n.jsx)("i",{className:"fas fa-envelope"})]})})})})},S=s(80291),q=s(50452),T=s(40996),I=function(e){var i=e.header,s=(e.widgetOpen,e.setWidgetOpen),t=(0,q.Ok)().requestLoggedUser,l=(0,T.mx)(),d=l.me,c=l.totalNewMessages;(0,a.useEffect)((function(){t()}),[]);var o=(0,h.useRouter)();return"1"===e.showChat||d&&!d.show_chat?(0,n.jsx)(n.Fragment,{}):(0,n.jsxs)(n.Fragment,{children:[(null===i||void 0===i?void 0:i.logged)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"chat-header-mobile",onClick:function(){s(!0)},children:(0,n.jsxs)("a",{className:"icon-header icon-header-chat",children:[(0,n.jsx)("img",{src:"/images/chat.svg",alt:"friends",className:"img-fluid"}),c>0&&(0,n.jsx)("div",{className:"chat-list-item-unread-messages",children:c})]})})}),(null===i||void 0===i?void 0:i.logged)&&"/chat"!==o.pathname&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"chat-widget-desktop-button-cont",children:(0,n.jsxs)("div",{className:"chat-widget-button-cont",onClick:function(){s(!0)},title:"Chat",children:[(0,n.jsx)("img",{src:"/images/chat.svg",alt:"friends",className:"img-fluid"}),c>0&&(0,n.jsx)("div",{className:"chat-list-item-unread-messages",children:c})]})})})]})},L=s(41449),O=s(51345),B=s(20034),P=function(e){var i,s,t,l,d=e.widgetOpen,c=e.setWidgetOpen,o=(0,q.Ok)(),r=o.connection,m=o.requestLoggedUser,u=(0,T.mx)(),v=u.activeChat,x=u.me,f=u.updateViewedStatus,j=u.friendsToggle,p=u.setFriendsToggle,g=u.totalNewMessages,_=u.openChatWidget,N=u.setOpenChatWidget;(0,a.useEffect)((function(){m()}),[]);var b=((0,h.useRouter)()||{}).pathname;return"1"===e.showChat||x&&!x.show_chat||"/chat"==b?null:(0,n.jsx)("div",{className:"chat-widget-main-cont ".concat((d||!0===_)&&" chat-widget-open"),children:(0,n.jsxs)("div",{className:"card chat-widget-card-cont",children:[(0,n.jsxs)("div",{className:"card-header",children:[(0,n.jsx)("div",{className:"card-title",children:null===x||void 0===x||null===(i=x.chat_texts)||void 0===i?void 0:i.text_chat_heading}),(0,n.jsx)("i",{className:"fas fa-times",onClick:function(){c(!1),_&&N(!1)}})]}),(0,n.jsx)("div",{className:"chat-widget-body",children:r?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"inner-head-chat-widget",children:[v&&(0,n.jsx)("div",{className:"inner-head-item-chat-widget ".concat(j?"":" active "),onClick:function(){f(),p(!1)},children:null===(s=null===v||void 0===v?void 0:v.users[0])||void 0===s||null===(t=s.username)||void 0===t?void 0:t.slice(0,14)}),(0,n.jsxs)("div",{className:"inner-head-item-chat-widget ".concat(j?" active ":""),onClick:function(){p(!0)},children:[(0,n.jsx)("span",{children:null===x||void 0===x||null===(l=x.chat_texts)||void 0===l?void 0:l.text_chat_chats}),g>0&&(0,n.jsx)("div",{className:"chat-list-item-unread-messages",children:g})]})]}),(0,n.jsxs)("div",{className:"inner-body-chat-widget",children:[(0,n.jsx)("div",{className:"cont-tab-chat-widget ".concat(j&&" active"),children:(0,n.jsx)(B.Z,{})}),(0,n.jsx)("div",{className:"cont-tab-chat-widget ".concat(!j&&" active"),children:(0,n.jsx)(O.Z,{})})]})]}):(0,n.jsx)(L.Z,{})})]})})},H=s(66435),D=function(e){var i,s,t,o,r,m,g,_,N,b,w,k,F,q,T,L,O,B,D,A,z,W,R,J,U,V,Y,$,G,X,K,Q,ee,ie,se,ne,ae,te,le,de,ce,oe,re,me,he,ue,ve,xe,fe,je,pe,ge,_e,Ne,be,we,ye,ke,Fe,Ce,Ze,Me,Ee,
1Se,qe=(0,H.SJ)(),Te=qe.nav,Ie=qe.requestUpdateNavCheck;(0,a.useEffect)((function(){Te&&Ie()}),[]);var Le=((0,h.useRouter)()||{}).pathname,Oe=e.hideBackArrow,Be=(0,a.useState)(!1),Pe=Be[0],He=Be[1],De=Pe?"header-fixed":"",Ae=(0,a.useState)(!1),ze=Ae[0],We=Ae[1],Re=ze?"active":"",Je=(0,a.useState)(!1),Ue=Je[0],Ve=Je[1];(0,a.useEffect)((function(){window.addEventListener("scroll",(function(){window.scrollY>0?He(!0):He(!1)}))}),[]),(0,a.useEffect)((function(){var e,i=function(e,i){this.settings=Object.assign({digits:5,delay:5e3,direction:""},i||{});var s=document.querySelector(e),n=Array(this.settings.digits+1).join('<div><b data-value="0"></b></div>');s.innerHTML=n,this.DOM={scope:s,digits:s.querySelectorAll("b")},this.DOM.scope.addEventListener("transitionend",(function(e){"::before"===e.pseudoElement&&"margin-top"==e.propertyName&&e.target.classList.remove("blur")})),this.count()};(i.prototype.count=function(e){var i,s=this.settings,n=this.DOM.digits;this.value=e||0|this.DOM.scope.dataset.value,this.value&&(i=(this.value+"").split(""),"rtl"==s.direction&&(i=i.reverse(),n=[].slice.call(n).reverse()),n.forEach((function(e,n){+e.dataset.value!=i[n]&&i[n]>=0&&setTimeout((function(s){var n=Math.abs(i[s]-+e.dataset.value);e.dataset.value=i[s],n>3&&(e.className="blur")}),n*s.delay,n)})))},Array.from(document.getElementsByClassName("numCounterHeader")).length>0)&&new i(".numCounterHeader",{direction:"rtl",delay:200,digits:7}).count(parseInt(null===Te||void 0===Te||null===(e=Te.header)||void 0===e?void 0:e.text_sum))}),[null===Te||void 0===Te?void 0:Te.header]);var Ye=0,$e=0,Ge=function(){var e=null===document||void 0===document?void 0:document.getElementById("sub-header-cont");if(e)if(window.innerWidth<991){if(window.scrollY>$e){var i=Ye+2.5;i>42&&(i=42),e.style.marginTop="-"+String(i)+"px",Ye=i}else{var s=Ye-2.5;window.scrollY<30&&(s=0),e.style.marginTop="-"+String(s)+"px",Ye=s}$e=window.scrollY}else e.style.marginTop="0px"};(0,a.useEffect)((function(){window.addEventListener("scroll",Ge)}),[]);var Xe=(0,a.useState)(!1),Ke=Xe[0],Qe=Xe[1];return(0,a.useEffect)((function(){var e;document&&(null===Te||void 0===Te||null===(e=Te.header)||void 0===e?void 0:e.logged)&&window.OneSignal.push((function(){var e,i,s,n;window.OneSignal.setExternalUserId(null===Te||void 0===Te||null===(e=Te.header)||void 0===e?void 0:e.customer_id),window.OneSignal.sendTag("Personalised",String(null===Te||void 0===Te||null===(i=Te.header)||void 0===i?void 0:i.notification_personalized_status),(function(e){})),window.OneSignal.sendTag("Articles",String(null===Te||void 0===Te||null===(s=Te.header)||void 0===s?void 0:s.notification_articles_status),(function(e){})),window.OneSignal.sendTag("customer_id",String(null===Te||void 0===Te||null===(n=Te.header)||void 0===n?void 0:n.customer_id),(function(e){}))}))}),[Te]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S.Z,{header:null===Te||void 0===Te?void 0:Te.header}),(0,n.jsx)("div",{className:"header-height-comp ".concat(De)}),(0,n.jsx)(P,{header:null===Te||void 0===Te?void 0:Te.header,widgetOpen:Ke,setWidgetOpen:Qe}),(0,n.jsx)("header",{className:"".concat(De),children:(0,n.jsx)("div",{className:"navbar-area",children:(0,n.jsxs)("div",{id:"navbar",className:"header-store",children:[(0,n.jsx)("div",{id:"search-header-backdrop-inside"}),(0,n.jsx)("div",{className:"main-header-cont",children:(0,n.jsx)("div",{className:"container position-relative",children:(0,n.jsxs)("div",{className:"row",children:[(0,n.jsxs)("div",{className:"col-lg-5 col-12 col-left-header",children:[(0,n.jsx)("div",{className:"header-wrap-resp",children:(0,n.jsxs)("div",{className:"navbar-brand-main-cont",children:[(null===Te||void 0===Te||null===(i=Te.header)||void 0===i?void 0:i.logged)?(0,n.jsx)(l(),{href:"/store",children:(0,n.jsx)("a",{className:"navbar-brand",children:(0,n.jsx)(c.Z,{src:(null===Te||void 0===Te||null===(s=Te.header)||void 0===s?void 0:s.logo)?null===Te||void 0===Te||null===(t=Te.header)||void 0===t?void 0:t.logo:"".concat("https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/","image/catalog/").concat("UCraiova","/logo/logo.png"),alt:"logo",width:150,height:40,priority:!0,objectFit:"contain",className:"main-logo img-fluid"})})}):(0,n.jsx)(l(),{href:"/",children:(0,n.jsx)("a",{className:"navbar-brand",children:(0,n.jsx)(c.Z,{src:(null===Te||void 0===Te||null===(o=Te.header)||void 0===o?void 0:o.logo)?null===Te||void 0===Te||null===(r=Te.header)||void 0===r?void 0:r.logo:"".concat("https://opencart-uploaded-images-a9b8be80.s3.eu-central-1.amazonaws.com/","image/catalog/").concat("UCraiova","/logo/logo.png"),alt:"logo",width:150,height:40,priority:!0,objectFit:"contain",className:"main-logo img-fluid"})})}),(null===Te||void 0===Te||null===(m=Te.header)||void 0===m?void 0:m.beta_status)&&(0,n.jsx)("div",{className:"beta-logo-icon","data-bs-toggle":"modal","data-bs-target":"#modal
1-beta",children:null===Te||void 0===Te||null===(g=Te.header)||void 0===g||null===(_=g.texts)||void 0===_?void 0:_.button_beta})]})}),(null===Te||void 0===Te||null===(N=Te.header)||void 0===N?void 0:N.language_module.languages.length)>1&&(0,n.jsx)("div",{className:"cont-language-desktop",children:(0,n.jsx)(y,{header:null===Te||void 0===Te?void 0:Te.header,texts:null===Te||void 0===Te||null===(b=Te.header)||void 0===b?void 0:b.texts})}),(0,n.jsx)(p,{mobileSearchActiveClass:Re,placeholder_search:null===Te||void 0===Te||null===(w=Te.header)||void 0===w||null===(k=w.search_info)||void 0===k?void 0:k.texts.placeholder_search,pathname:Le}),(0,n.jsxs)("div",{className:"cont-header-buttons-resp",children:[(0,n.jsx)("div",{id:"toggle-search-header-resp",children:(0,n.jsx)("img",{src:"/images/search.svg",alt:"search",className:"img-fluid",onClick:function(){We(!ze)}})}),(null===Te||void 0===Te||null===(F=Te.header)||void 0===F?void 0:F.logged)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"cont-header-notification-mobile",children:(0,n.jsx)(f.Z,{userId:null===Te||void 0===Te||null===(q=Te.header)||void 0===q?void 0:q.customer_id,user_profile_url:null===Te||void 0===Te||null===(T=Te.header)||void 0===T?void 0:T.user_profile_url,texts:null===Te||void 0===Te||null===(L=Te.header)||void 0===L?void 0:L.texts,dataType:"mobile"})})}),(0,n.jsx)("div",{className:"cont-header-notification-mobile",children:(0,n.jsx)(I,{header:null===Te||void 0===Te?void 0:Te.header,widgetOpen:Ke,setWidgetOpen:Qe})}),(0,n.jsx)("div",{className:"cont-header-notification-mobile",children:(0,n.jsx)(v.Z,{header:null===Te||void 0===Te?void 0:Te.header,setmobileMenuActive:Ve,mobileMenuActive:Ue,texts:null===Te||void 0===Te||null===(O=Te.header)||void 0===O?void 0:O.texts,dataType:"mobile"})})]})]}),(0,n.jsxs)("div",{className:"col-lg-7 col-12 col-right-header",children:[(null===Te||void 0===Te||null===(B=Te.header)||void 0===B?void 0:B.logged)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"col-header-desktop-items",children:[(0,n.jsx)(x.Z,{userId:null===Te||void 0===Te||null===(D=Te.header)||void 0===D?void 0:D.customer_id,user_profile_url:null===Te||void 0===Te||null===(A=Te.header)||void 0===A?void 0:A.user_profile_url,texts:null===Te||void 0===Te||null===(z=Te.header)||void 0===z?void 0:z.texts}),(null===Te||void 0===Te||null===(W=Te.header)||void 0===W?void 0:W.show_chat)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(j.Z,{userId:null===Te||void 0===Te||null===(R=Te.header)||void 0===R?void 0:R.customer_id,user_profile_url:null===Te||void 0===Te||null===(J=Te.header)||void 0===J?void 0:J.user_profile_url,texts:null===Te||void 0===Te||null===(U=Te.header)||void 0===U?void 0:U.texts})}),(0,n.jsx)(f.Z,{userId:null===Te||void 0===Te||null===(V=Te.header)||void 0===V?void 0:V.customer_id,user_profile_url:null===Te||void 0===Te||null===(Y=Te.header)||void 0===Y?void 0:Y.user_profile_url,texts:null===Te||void 0===Te||null===($=Te.header)||void 0===$?void 0:$.texts,dataType:"desktop"})]})}),(0,n.jsx)("div",{className:"home-header-desktop-wishlist",children:(0,n.jsx)(v.Z,{header:null===Te||void 0===Te?void 0:Te.header,texts:null===Te||void 0===Te||null===(G=Te.header)||void 0===G?void 0:G.texts,dataType:"desktop"})}),(0,n.jsx)("div",{className:"home-header-desktop-wishlist",children:(0,n.jsx)(u,{bottomPosition:!0,texts:null===Te||void 0===Te||null===(X=Te.header)||void 0===X?void 0:X.texts})}),(0,n.jsx)(l(),{href:"/store",children:(0,n.jsxs)("a",{className:"".concat("/store"!==Le?"home-header-mobile":"home-header-mobile home-header-mobile-selected"),children:[(0,n.jsx)("div",{className:"home-header-mobile-img-cont",children:(0,n.jsx)("img",{src:"/images/percent.png",alt:"search",className:"img-fluid"})}),(0,n.jsx)("div",{className:"".concat("/store"!==Le?"home-header-unselected-route":"home-header-selected-route"),children:null===Te||void 0===Te||null===(K=Te.header)||void 0===K||null===(Q=K.texts)||void 0===Q?void 0:Q.text_mobile_nav_home})]})}),(0,n.jsx)(l(),{href:"/c/marketplace",children:(0,n.jsxs)("a",{className:"".concat((null===Le||void 0===Le?void 0:Le.includes("/c/"))||(null===Le||void 0===Le?void 0:Le.includes("/p/"))?"home-header-mobile home-header-mobile-selected":"home-header-mobile"),children:[(0,n.jsx)("div",{className:"home-header-mobile-img-cont",children:(0,n.jsx)("img",{src:"/images/menu.png",alt:"search",className:"img-fluid"})}),(0,n.jsx)("div",{className:"".concat((null===Le||void 0===Le?void 0:Le.includes("/c/"))||(null===Le||void 0===Le?void 0:Le.includes("/p/"))?"home-header-selected-route":"home-header-unselected-route"),children:null===Te||void 0===Te||null===(ee=Te.header)||void 0===ee||null===(ie=ee.texts)||void 0===ie?void 0:ie.text_mobile_nav_marketplace})]})}),(0,n.jsx)(l(),{href:"/s/feed",children:(0,n.jsxs)("a",{className:"".concat("/s/feed"!==Le?"home-header-mobile":"home-header-mobile home-header-mobile-selected"),children:[(0,n.jsx)("div",{className:"home-header-mobile-img-cont",children:(0,n.jsx)("img",{src:"/images/house.png",alt:"search",className:"img-fluid"})}),(0,n.jsx)("div",{className:"".concat("/s/feed"!==Le?"home-header-unselected-route":"home-header-selected-route"),children:null===Te||void 0===Te||null===(se=Te.header)||void 0===se||null===(ne=se.texts)||void 0===ne?void 0:ne.text_mobile_nav_social})]})}),(0,n.jsx)("div",{className:"home-header-mobile home-header-mobile-v-desktop",children:(0,n.jsx)(d.Z,{texts:null===Te||void 0===Te||null===(ae=Te.header)||void 0===ae?void 0:ae.texts})}),"1"==(null===Te||void 0===Te||null===(te=Te.header)||void 0===te?void 0:te.config_booking_status)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(l(),{href:"/booking",children:(0,n.jsxs)("a",{className:"".concat("/booking"!==Le?"home-header-mobile":"home-header-mobile home-header-mobile-selected"),children:[(0,n.jsx)("div",{className:"home-header-mobile-img-cont",children:(0,n.jsx)("img",{src:"/images/field.png",alt:"search",className:"img-fluid"})}),(0,n.jsx)("div",{className:"".concat("/booking"!==Le?"home-header-unselected-route":"home-header-selected-route"),children:null===Te||void 0===Te||null===(le=Te.header)||void 0===le||null===(de=le.texts)||void 0===de?void 0:de.text_mobile_nav_booking})]})})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"home-header-mobile",children:(0,n.jsx)(u,{bottomPosition:!0,texts:null===Te||void 0===Te||null===(ce=Te.header)||void 0===ce?void 0:ce.texts})})})]})]})})}),(0,n.jsx)("div",{id:"sub-header-cont",className:"active-sub-header-cont",children:(0,n.jsx)("div",{className:"container",children:(0,n.jsx)("div",{className:"row",children:(0,n.jsxs)("div",{className:"col-12 sub-header-col",children:[!Oe&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"cont-btn-back-header",onClick:function(){history.back()},children:(0,n.jsxs)("div",{className:"btn-back-header",children:[(0,n.jsx)("i",{className:"fas fa-arrow-left"}),(0,n.jsx)("span",{children:null===Te||void 0===Te||null===(oe=Te.header)||void 0===oe||null===(re=oe.texts)||void 0===re?void 0:re.button_back})]})})}),(0,n.jsxs)("div",{className:"menus-main-cont",children:[(0,n.jsx)(C,{header:null===Te||void 0===Te?void 0:Te.header,footer:null===Te||void 0===Te?void 0:Te.footer,mobileMenuState:[Ue,Ve],menuSecondaryList:null===Te||void 0===Te?void 0:Te.menu_secondary,texts:null===Te||void 0===Te||null===(me=Te.header)||void 0===me?void 0:me.texts}),(0,n.jsx)(Z,{menu:null===Te||void 0===Te?void 0:Te.menu_secondary})]}),"1"==(null===Te||void 0===Te||null===(he=Te.header)||void 0===he?void 0:he.status_sum)&&"1"==(null===Te||void 0===Te||null===(ue=Te.header)||void 0===ue?void 0:ue.show_sum)&&(null===Te||void 0===Te||null===(ve=Te.header)||void 0===ve?void 0:ve.logged)?(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{className:"cont-sum-header-home cont-sum-header-header",children:[(0,n.jsx)("div",{className:"text-date-header-home",children:""!==(null===Te||void 0===Te||null===(xe=Te.header)||void 0===xe?void 0:xe.info_sum)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("i",{className:"fas fa-info-circle","data-bs-toggle":"modal","data-bs-target":"#info-sum-modal-header"})})}),(0,n.jsxs)("div",{className:"text-sum-header-home",children:[(0,n.jsx)("div",{className:"numCounterHeader"})," ",null===Te||void 0===Te||null===(fe=Te.header)||void 0===fe?void 0:fe.text_currency]})]})}):(0,n.jsx)(n.Fragment,{}),(0,n.jsxs)("div",{className:"d-flex",children:["1"==(null===Te||void 0===Te||null===(je=Te.header)||void 0===je?void 0:je.config_booking_status)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"home-header-mobile-wishlist",children:(0,n.jsx)(u,{bottomPosition:!1,texts:null===Te||void 0===Te||null===(pe=Te.header)||void 0===pe?void 0:pe.texts})})}):null,(null===Te||void 0===Te||null===(ge=Te.header)||void 0===ge?void 0:ge.logged)&&"1"==(null===Te||void 0===Te||null===(_e=Te.header)||void 0===_e?void 0:_e.config_invites_header_status)?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(E,{header:null===Te||void 0===Te?void 0:Te.header,texts:null===Te||void 0===Te||null===(Ne=Te.header)||void 0===Ne?void 0:Ne.texts})}):null,(null===Te||void 0===Te||null===(be=Te.header)||void 0===be?void 0:be.fanindex_status)>0&&""!==(null===Te||void 0===Te||null===(we=Te.header)||void 0===we?void 0:we.fanindex_page_url)&&(0,n.jsx)(M.Z,{header:null===Te||void 0===Te?void 0:Te.header,texts:null===Te||void 0===Te||null===(ye=Te.header)||void 0===ye?void 0:ye.texts})]})]})})})})]})})}),(null===Te||void 0===Te||null===(ke=Te.header)||void 0===ke?void 0:ke.beta_status)&&(0,n.jsx)("div",{className:"modal fade",id:"modal-beta",tabIndex:-1,"aria-labelledby":"modal-beta-label","aria-hidden":"true",children:(0,n.jsx)("div",{className:"modal-dialog modal-dialog-centered",children:(0,n.jsxs)("div",{className:"modal-content",children:[(0,n.jsxs)("div",{className:"modal-header",children:[(0,n.jsx)("h5",{className:"modal-title text-center w-100 fw-bold",id:"modal-beta-label",children:null===Te||void 0===Te||null===(Fe=Te.header)||void 0===Fe||null===(Ce=Fe.texts)||void 0===Ce?void 0:Ce.button_beta}),(0,n.jsx)("button",{id:"close-modal-beta",type:"button",className:"btn btn-close","data-bs-dismiss":"modal","aria-label":"Close"})]}),(0,n.jsx)("div",{className:"modal-body",children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:null===Te||void 0===Te||null===(Ze=Te.header)||void 0===Ze?void 0:Ze.beta_de
1scription}})})]})})}),""!==(null===Te||void 0===Te||null===(Me=Te.header)||void 0===Me?void 0:Me.info_sum)&&(0,n.jsx)("div",{id:"info-sum-modal-header",className:"modal fade","aria-hidden":"true",children:(0,n.jsx)("div",{className:"modal-dialog modal-dialog-centered ",children:(0,n.jsxs)("div",{className:"modal-content",children:[(0,n.jsxs)("div",{className:"modal-header",children:[(0,n.jsx)("h5",{className:"modal-title text-center w-100",id:"agree-modal-title",children:null===Te||void 0===Te||null===(Ee=Te.header)||void 0===Ee?void 0:Ee.date_sum}),(0,n.jsx)("div",{className:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"})]}),(0,n.jsx)("div",{className:"modal-body text-center",id:"agree-modal-body",dangerouslySetInnerHTML:{__html:null===Te||void 0===Te||null===(Se=Te.header)||void 0===Se?void 0:Se.info_sum}})]})})})]})}},80243:function(e,i,s){var n=s(85893),a=s(67294),t=s(41664),l=s.n(t),d=s(55120),c=s(40996);function o(){return{width:window.innerWidth,height:window.innerHeight}}i.Z=function(e){var i=e.user,s=e.view_position,t=e.showButtons,r=e.myProfile,m=e.addFriend,h=e.confirmFriend,u=e.removeFriend,v=e.texts,x=(0,c.mx)(),f=x.setOpenChatWidget,j=x.setOpenChat,p=x.setFriendsToggle,g=x.setChatLoading,_=x.setChatMessagesLoading,N=(0,a.useState)(!1),b=N[0],w=N[1],y=(0,a.useState)(!1),k=y[0],F=y[1],C=(0,a.useState)(!1),Z=C[0],M=C[1],E=(0,a.useState)(""),S=E[0],q=E[1];(0,a.useEffect)((function(){var e,i;b?null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===e||e.classList.add("open-modal-cancel-friend-requests"):null===(i=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===i||i.classList.remove("open-modal-cancel-friend-requests")}),[b]),(0,a.useEffect)((function(){var e,i;k?null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===e||e.classList.add("open-modal-cancel-friend-requests"):null===(i=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===i||i.classList.remove("open-modal-cancel-friend-requests")}),[k]),(0,a.useEffect)((function(){var e,i;Z?null===(e=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===e||e.classList.add("open-modal-cancel-friend-requests"):null===(i=null===document||void 0===document?void 0:document.getElementsByTagName("body")[0])||void 0===i||i.classList.remove("open-modal-cancel-friend-requests")}),[Z]);var T=(0,a.useState)(o),I=T[0],L=T[1];return(0,a.useEffect)((function(){var e=function(){L(o())};return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[]),(0,n.jsxs)("div",{className:"social-feed-friends-list-item align-items-center",children:[""!==i.profile_url?(0,n.jsx)(l(),{href:"".concat(i.profile_url),children:(0,n.jsx)("a",{className:"social-item-icon social-item-icon-sm me-1",style:{minWidth:50},children:(0,n.jsx)(d.Z,{src:i.profile_image,alt:"profile-image",width:400,height:400,objectFit:"cover",nowidthcheck:!0})})}):(0,n.jsx)("span",{className:"social-item-icon social-item-icon-sm me-1",style:{minWidth:50},children:(0,n.jsx)(d.Z,{src:i.profile_image,alt:"profile-image",width:400,height:400,objectFit:"cover",nowidthcheck:!0})}),(0,n.jsxs)("div",{className:"info-cont-social-feed-friends-list main-cont-dd-social-feed-list",children:[""!==i.profile_url?(0,n.jsx)(l(),{href:"".concat(i.profile_url),children:(0,n.jsxs)("a",{className:"user-general-name",children:[i.username,i.is_official&&(0,n.jsxs)(n.Fragment,{children:["\xa0",(0,n.jsx)("i",{className:"fas fa-check-circle social-feed-official-account",style:{fontSize:14}})]})]})}):(0,n.jsxs)("span",{className:"user-general-name",children:[i.username,i.is_official&&(0,n.jsxs)(n.Fragment,{children:["\xa0",(0,n.jsx)("i",{className:"fas fa-check-circle social-feed-official-account",style:{fontSize:14}})]})]}),(null===r||void 0===r?void 0:r.logged)&&r.logged&&t?(0,n.jsx)(n.Fragment,{children:1==i.is_friend?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"d-flex justify-content-center social-feed-friends-list-actions-btn pt-2 pb-2 w-100 align-items-center",children:[I.width>991?(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("a",{className:"w-100",href:"/chat?friend_id=".concat(i.friend_id,"&username=").concat(i.username),children:(0,n.jsxs)("div",{className:"d-flex justify-content-center btn btn-primary btn-sm p-1 me-3",children:[(0,n.jsx)("i",{className:"fas fa-comment-alt align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_send_message})]})})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"w-100",onClick:function(){g(!0),_(!0),p(!1),f(!0),setTimeout((function(){j({friend_id:i.friend_id,username:i.username})}),500)},children:(0,n.jsxs)("div",{className:"d-flex justify-content-center btn btn-primary p-1 me-3 btn-sm",children:[(0,n.jsx)("i",{className:"fas fa-comment-alt align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_send_message})]})})}),(0,n.jsxs)("div",{className:"d-flex justify-content-center btn btn-outline-secondary p-1 w-100 btn-sm",onClick:function(){w(!0),q(i.friend_id)},children:[(0,n.jsx)("i",{className:"fas fa-user-slash align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_delete_friend})]})]}),(0,n.jsx)("span",{children:i.date_confirmed}),(0,n.jsx)("div",{className:"".concat(b?"modal-feed-post-likes-actions":"d-none"),children:(0,n.jsxs)("div",{className:"modal-feed-post-likes-actions-cont",children:[(0,n.jsxs)("div",{className:"modal-feed-post-likes-header",children:[(0,n.jsx)("div",{className:"modal-title",children:null===v||void 0===v?void 0:v.button_delete_friend}),(0,n.jsx)("div",{className:"modal-feed-post-likes-close-btn",onClick:function(){w(!1),q("")},children:(0,n.jsx)("i",{className:"fas fa-times"})})]}),(0,n.jsx)("div",{className:"p-0",children:(0,n.jsxs)("div",{className:"modal-feed-post-likes-body",children:[(0,n.jsx)("div",{className:"p-3",children:null===v||void 0===v?void 0:v.text_confirm_delete}),(0,n.jsxs)("div",{className:"d-flex flex-row justify-content-between p-3",children:[(0,n.jsx)("div",{className:"d-flex w-100 justify-content-center btn btn-primary p-2 me-3",onClick:function(){u(S),w(!1),q("")},children:(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_delete})}),(0,n.jsx)("div",{className:"d-flex w-100 justify-content-center btn btn-outline-secondary p-2",onClick:function(){w(!1),q("")},children:(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_cancel})})]})]})})]})})]}):2==i.is_friend?(0,n.jsx)(n.Fragment,{children:"header"==s?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"mt-1",children:i.date_added}),(0,n.jsxs)("div",{className:"cont-btns-social-feed-list",children:[(0,n.jsx)("div",{className:"btn btn-sm btn-primary",onClick:function(){return h(i.friend_id)},children:null===v||void 0===v?void 0:v.button_confirm}),(0,n.jsx)("div",{className:"btn btn-sm btn-outline-secondary",onClick:function(){return u(i.friend_id)},children:null===v||void 0===v?void 0:v.button_delete})]})]}):(0,n.jsxs)(n.Fragment,{children:[i.my_request?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"d-flex justify-content-center social-feed-friends-list-actions-btn pt-2 pb-2 w-100 align-items-center",children:(0,n.jsxs)("div",{className:"d-flex justify-content-center btn btn-outline-secondary btn-sm p-1 w-100",onClick:function(){F(!0),q(i.friend_id)},children:[(0,n.jsx)("i",{className:"fas fa-user-slash align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_cancel_request})]})}),(0,n.jsx)("div",{className:"".concat(k?"modal-feed-post-likes-actions":"d-none"),children:(0,n.jsxs)("div",{className:"modal-feed-post-likes-actions-cont",children:[(0,n.jsxs)("div",{className:"modal-feed-post-likes-header",children:[(0,n.jsx)("div",{className:"modal-title",children:null===v||void 0===v?void 0:v.button_cancel_request}),(0,n.jsx)("div",{className:"modal-feed-post-likes-close-btn",onClick:function(){F(!1),q("")},children:(0,n.jsx)("i",{className:"fas fa-times"})})]}),(0,n.jsx)("div",{className:"p-0",children:(0,n.jsxs)("div",{className:"modal-feed-post-likes-body",children:[(0,n.jsx)("div",{className:"p-3",children:null===v||void 0===v?void 0:v.text_confirm_cancel_request}),(0,n.jsxs)("div",{className:"d-flex flex-row justify-content-between p-3",children:[(0,n.jsx)("div",{className:"d-flex w-100 justify-content-center btn btn-primary p-2 me-3",onClick:function(){u(S),F(!1),q("")},children:(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_cancel_request})}),(0,n.jsx)("div",{className:"d-flex w-100 justify-content-center btn btn-outline-secondary p-2",onClick:function(){F(!1),q("")},children:(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_cancel})})]})]})})]})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"d-flex justify-content-center social-feed-friends-list-actions-btn pt-2 pb-2 w-100 align-items-center",children:[(0,n.jsxs)("div",{className:"d-flex justify-content-center align-items-center btn btn-primary btn-sm p-1 w-100 me-3",onClick:function(){h(i.friend_id)},children:[(0,n.jsx)("i",{className:"fas fa-check align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_confirm})]}),(0,n.jsxs)("div",{className:"d-flex justify-content-center btn btn-outline-secondary btn-sm p-1 w-100",onClick:function(){M(!0),q(i.friend_id)},children:[(0,n.jsx)("i",{className:"fas fa-ban align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_deny})]})]}
1),(0,n.jsx)("div",{className:"".concat(Z?"modal-feed-post-likes-actions":"d-none"),children:(0,n.jsxs)("div",{className:"modal-feed-post-likes-actions-cont",children:[(0,n.jsxs)("div",{className:"modal-feed-post-likes-header",children:[(0,n.jsx)("div",{className:"modal-title",children:null===v||void 0===v?void 0:v.button_deny_request}),(0,n.jsx)("div",{className:"modal-feed-post-likes-close-btn",onClick:function(){M(!1),q("")},children:(0,n.jsx)("i",{className:"fas fa-times"})})]}),(0,n.jsx)("div",{className:"p-0",children:(0,n.jsxs)("div",{className:"modal-feed-post-likes-body",children:[(0,n.jsx)("div",{className:"p-3",children:null===v||void 0===v?void 0:v.text_confirm_deny_request}),(0,n.jsxs)("div",{className:"d-flex flex-row justify-content-between p-3",children:[(0,n.jsx)("div",{className:"d-flex w-100 justify-content-center btn btn-primary p-2 me-3",onClick:function(){u(S),M(!1),q("")},children:(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_deny_request})}),(0,n.jsx)("div",{className:"d-flex w-100 justify-content-center btn btn-outline-secondary p-2",onClick:function(){M(!1),q("")},children:(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_cancel})})]})]})})]})})]}),(0,n.jsx)("span",{children:i.date_added})]})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{className:"d-flex justify-content-center social-feed-friends-list-actions-btn pt-2 pb-2 w-100 align-items-center",children:(0,n.jsxs)("div",{className:"d-flex justify-content-center align-items-center btn btn-primary btn-sm p-1 w-100",onClick:function(){m(i.friend_id)},children:[(0,n.jsx)("i",{className:"fas fa-users align-self-center"}),(0,n.jsx)("div",{children:null===v||void 0===v?void 0:v.button_add_friend})]})})})}):(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("span",{className:"user-general-date-added",children:i.date_added})})]})]})}},41449:function(e,i,s){var n=s(85893);i.Z=function(e){var i=e.height;return(0,n.jsx)("div",{className:"d-flex justify-content-center align-items-center w-100 h-100 mt-4 mb-4",style:{height:i||"100%"},children:(0,n.jsx)("span",{className:"spinner-border main-platform-spinner",role:"status",children:(0,n.jsx)("span",{className:"visually-hidden",children:"Loading..."})})})}},2566:function(e,i,s){var n=s(85893);i.Z=function(e){return(0,n.jsx)(n.Fragment,{children:decodeURIComponent(encodeURIComponent(e.text)).replace(/&/g,"&").replace(/"/g,'"')})}},7956:function(e,i,s){s.d(i,{G:function(){return n},Z:function(){return a}});var n=function(e,i){if(""==e||""==e.trim())return"";var s="",n=0,a=!0,t=!1,l=void 0;try{for(var d,c=e[Symbol.iterator]();!(a=(d=c.next()).done);a=!0){var o=d.value;if(!(n+o.length<=i))break;s+=o,n+=o.length}}catch(r){t=!0,l=r}finally{try{a||null==c.return||c.return()}finally{if(t)throw l}}return s},a=function(e){var i=e.match(/((((ftp|https?):\/\/)|(w{3}\.))[\-\w@:%_\+.~#?,&\/\/=]+)/g);return i&&i.forEach((function(i){e=e.replace(i,'<a target="_blank" href="'+i+'">'+i+"</a>")})),e.replace("(","<br/>(")}},58776:function(e,i,s){s.d(i,{Z:function(){return m}});var n=s(47568),a=s(20414),t=s(67294),l=s(40782),d=s(10086),c=s(93970),o=s(66435),r=s(61646);function m(e){var i=e.product,s=(0,c.Yu)(),m=s.favourites,h=s.updateWishlist,u=(0,o.SJ)().nav,v=(0,t.useState)(!1),x=v[0],f=v[1],j=(0,t.useState)(!1),p=j[0],g=j[1];(0,t.useEffect)((function(){f(!!(null===i||void 0===i?void 0:i.id)&&m[i.id])}),[m]);var _=function(){var e=(0,n.Z)((function(e,s){var n,t,c,o,m,v;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return c=String(null===i||void 0===i?void 0:i.id),e&&(c=String(e)),c?(g(!0),f(!0),(o=new FormData).append("product_id",c),[4,r.Z.post("/api_wishlist",o,{},{usePrefix:!0})]):(console.error("ERROR"),[2]);case 1:return m=a.sent(),(v=null===m||void 0===m||null===(n=m.data)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.wishlist)&&(null===v||void 0===v?void 0:v.wishlist)?(null===v||void 0===v?void 0:v.error)?((0,l.Am)((function(){var e,n,a,t;return(0,d.Z)({icon:"fas fa-exclamation-circle",title:null===u||void 0===u||null===(e=u.header)||void 0===e||null===(n=e.texts)||void 0===n?void 0:n.toast_error,message:"".concat(null!==s&&void 0!==s?s:null===i||void 0===i?void 0:i.name.replace(/&/g,"&").replace(/"/g,'"')," ").concat(null===u||void 0===u||null===(a=u.header)||void 0===a||null===(t=a.texts)||void 0===t?void 0:t.text_not_added_to_wishlist),error:!0})}),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),f(!0),g(!1),[2]):(h(v.wishlist),g(!1),v.success&&(0,l.Am)((function(){var e,n,a,t;return(0,d.Z)({icon:"fas fa-check-circle",title:null===u||void 0===u||null===(e=u.header)||void 0===e||null===(n=e.texts)||void 0===n?void 0:n.toast_success,message:"".concat(null!==s&&void 0!==s?s:null===i||void 0===i?void 0:i.name.replace(/&/g,"&").replace(/"/g,'"')," ").concat(null===u||void 0===u||null===(a=u.header)||void 0===a||null===(t=a.texts)||void 0===t?void 0:t.text_added_to_wishlist)})}),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),[2]):(f(!0),g(!1),[2])}}))}));return function(i,s){return e.apply(this,arguments)}}(),N=function(){var e=(0,n.Z)((function(e,s){var n,t,c,o,m;return(0,a.__generator)(this,(function(a){switch(a.label){case 0:return c=String(null===i||void 0===i?void 0:i.id),e&&(c=String(e)),c?(g(!0),f(!1),[4,r.Z.delete("/api_wishlist&product_id=".concat(c),{},{},{usePrefix:!0})]):[2];case 1:return o=a.sent(),(m=null===o||void 0===o||null===(n=o.data)||void 0===n||null===(t=n.data)||void 0===t?void 0:t.wishlist)&&m.wishlist?m.error?((0,l.Am)((function(){var e,n,a,t;return(0,d.Z)({icon:"fas fa-exclamation-circle",title:null===u||void 0===u||null===(e=u.header)||void 0===e||null===(n=e.texts)||void 0===n?void 0:n.toast_error,message:"".concat(null!==s&&void 0!==s?s:null===i||void 0===i?void 0:i.name.replace(/&/g,"&").replace(/"/g,'"')," ").concat(null===u||void 0===u||null===(a=u.header)||void 0===a||null===(t=a.texts)||void 0===t?void 0:t.text_not_added_to_wishlist),error:!0})}),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),f(!0),g(!1),[2]):(h(m.wishlist),g(!1),(0,l.Am)((function(){var e,n,a,t;return(0,d.Z)({icon:"fas fa-check-circle",title:null===u||void 0===u||null===(e=u.header)||void 0===e||null===(n=e.texts)||void 0===n?void 0:n.toast_success,message:"".concat(null!==s&&void 0!==s?s:null===i||void 0===i?void 0:i.name.replace(/&/g,"&").replace(/"/g,'"')," ").concat(null===u||void 0===u||null===(a=u.header)||void 0===a||null===(t=a.texts)||void 0===t?void 0:t.text_removed_from_wishlist)})}),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),[2]):(f(!0),g(!1),[2])}}))}));return function(i,s){return e.apply(this,arguments)}}();return{inWishlist:x,wishlistLoading:p,handleToggleWishlist:function(){x?N():_()},handleAddToWishlist:_,handleRemoveFromWishlist:N}}}}]);
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.