1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[48594],{73486:function(n,t){t.Z={src:"/_next/static/media/no-fav-video-matching.40e0de3c.svg",height:413,width:571}},59066:function(n,t){t.Z={src:"/_next/static/media/no-chat.54f30794.svg",height:541,width:539}},15173:function(n,t){t.Z={src:"/_next/static/media/no-teams.88975693.svg",height:1110,width:1717}},32911:function(n,t,e){var i=e(51438),r=e(52951),o=e(3167),u=function(){function n(){(0,i.Z)(this,n),this.markConversationNotificationAsRead=function(n){return o.Z.post("firebase/fcm/read/conversation/".concat(n))},this.markChatRequestNotificationAsRead=function(){return o.Z.post("firebase/fcm/read/chat-request")},this.markCommunityNotificationAsRead=function(n){return o.Z.post("firebase/fcm/read/community/".concat(n))},this.markAllNotificationsAsRead=function(){return o.Z.post("firebase/fcm/read/all")}}return(0,r.Z)(n,null,[{key:"instance",get:function(){return this.classInstance||(this.classInstance=new n),this.classInstance}}]),n}();t.Z=u.instance},56702:function(n,t,e){e.d(t,{Z:function(){return d},a:function(){return a}});var i=e(7297),r=e(63922),o=e(87379);function u(){var n=(0,i.Z)(["\n .ant-badge-dot {\n width: 10px;\n height: 10px;\n }\n .ant-badge-dot.ant-scroll-number {\n transition: none !important;\n }\n"]);return u=function(){return n},n}function c(){var n=(0,i.Z)(["\n filter: ",";\n"]);return c=function(){return n},n}var a=(0,o.ZP)(r.Z).withConfig({componentId:"sc-fb51a48a-0"})(u()),d=o.ZP.div.withConfig({componentId:"sc-fb51a48a-1"})(c(),(function(n){return n.$active?"grayscale(0)":"grayscale(100%)"}))},74163:function(n,t,e){e.d(t,{Z:function(){return a}});var i=e(85893),r=e(24093),o=e(29941),u=e(46172),c=e(56702),a=function(n){var t=n.online,e=void 0!==t&&t,a=n.imageUrl,d=n.showDot,s=void 0===d||d,l=n.isDeleted,f=void 0!==l&&l,v=n.active,h=void 0===v||v,p=n.size,g=void 0===p?40:p;return(0,i.jsx)(c.Z,{$active:h,children:f?(0,i.jsx)(r.C,{size:g,src:u.Z.src}):s?(0,i.jsx)(c.a,{dot:!0,offset:[-6,34],color:e?"#1D9745":"#C4C4C4",children:(0,i.jsx)(r.C,{size:g,src:a||o.Z.src})}):(0,i.jsx)(r.C,{size:g,src:a||o.Z.src})})}},57323:function(n,t,e){e.d(t,{$c:function(){return En},BT:function(){return hn},Cs:function(){return Rn},G7:function(){return Un},II:function(){return Cn},Jo:function(){return vn},KB:function(){return Tn},KK:function(){return Zn},Pp:function(){return Nn},QH:function(){return An},WF:function(){return sn},YR:function(){return mn},Yz:function(){return Dn},_8:function(){return fn},_R:function(){return pn},b9:function(){return xn},bN:function(){return yn},jR:function(){return an},jh:function(){return In},kF:function(){return bn},mR:function(){return Pn},mg:function(){return wn},sz:function(){return kn},vv:function(){return Sn},wh:function(){return dn},wk:function(){return cn},z:function(){return gn}});var i=e(7297),r=e(84996),o=e(87379),u=e(61373),c=e(32171),a=e(62261),d=e(35081),s=e(28598);function l(){var n=(0,i.Z)(["\n border-width: 1px 1px 1px 0;\n "]);return l=function(){return n},n}function f(){var n=(0,i.Z)(["\n border-width: 0 1px 1px 0;\n "]);return f=function(){return n},n}function v(){var n=(0,i.Z)(["\n border-style: solid;\n border-color: ",";\n border-width: 0 1px 1px 0;\n display: flex;\n flex-direction: column;\n height: 100%;\n background-color: var(--color-background-primary);\n min-height: min-content;\n position: relative;\n overflow: hidden;\n\n ","\n\n ","\n\n ","\n"]);return v=function(){return n},n}function h(){var n=(0,i.Z)(["\n height: 56px;\n "]);return h=function(){return n},n}function p(){var n=(0,i.Z)(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: ",";\n border-bottom: 1px solid ",";\n background-color: #f9f9fa;\n height: 65px;\n\n "," {\n cursor: pointer;\n }\n\n ","\n\n ","\n"]);return p=function(){return n},n}function g(){var n=(0,i.Z)(["\n max-width: calc(100% - 265px);\n "]);return g=function(){return n},n}function m(){var n=(0,i.Z)(["\n max-width: calc(100% - 230px);\n "]);return m=function(){return n},n}function Z(){var n=(0,i.Z)(["\n font-weight: 600;\n font-size: ",";\n line-height: 20px;\n color: #0e1114;\n display: flex;\n align-items: center;\n gap: 2px;\n\n > *:not(:last-child) {\n margin-right: 16px;\n }\n\n ","\n\n ","\n"]);return Z=function(){return n},n}function x(){var n=(0,i.Z)(["\n display: flex;\n align-items: center;\n\n > *:not(:last-child) {\n margin-right: 23px;\n }\n\n "," {\n cursor: pointer;\n }\n\n .ant-dropdown {\n z-index: 2147483647;\n }\n"]);return x=function(){return n},n}function b(){var n=(0,i.Z)(["\n 0% {\n transform: scaleX(0);\n }\n 100% {\n transform: scaleX(1);\n }\n"]);return b=function(){return n},n}function w(){var n=(0,i.Z)(["\n animation: none;\n width: 187px;\n "]);return w=function(){return n},n}function C(){var n=(0,i.Z)(["\n display: flex;\n max-width: var(--container-width);\n z-index: 0;\n transition: width 0.3s ease-in-out;\n font-size: inherit;\n height: auto;\n "]);return C=function(){return n},n}function E(){var n=(0,i.Z)(["\n border: var(--border-primary);\n border-radius: 20px;\n background-color: var(--color-white);\n align-items: center;\n padding: 4px 10px;\n display: flex;\n width: 100%;\n max-width: 220px;\n font-size: 15px;\n height: 31px;\n animation: "," 0.3s;\n transform-origin: 100% 50%;\n\n > *:not(:last-child) {\n margin-right: 7px;\n }\n\n input,\n input:focus-visible {\n width: calc(100% - 46px);\n border: none;\n padding: 0;\n outline: none;\n }\n\n .ant-input:focus {\n box-shadow: none;\n }\n\n i {\n cursor: pointer;\n }\n\n i.icon-search {\n cursor: unset;\n color: var(--color-primary-disabled);\n }\n\n ","\n\n ","\n"]);return E=function(){return n},n}function y(){var n=(0,i.Z)(["\n display: grid;\n grid-template-columns: ",";\n "]);return y=function(){return n},n}function A(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n\n ","\n"]);return A=function(){return n},n}function I(){var n=(0,i.Z)(["\n border-right: 1px solid ",";\n "]);return I=function(){return n},n}function R(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n min-height: min-content;\n overflow: hidden;\n\n ","\n"]);return R=function(){return n},n}function U(){var n=(0,i.Z)(["\n flex: 1;\n overflow-y: auto;\n position: relative;\n"]);return U=function(){return n},n}function S(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n\n ","\n"]);return S=function(){return n},n}function N(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n background-color: var(--color-background-primary);\n\n position: absolute;\n z-index: 1;\n"]);return N=function(){return n},n}function P(){var n=(0,i.Z)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 56px;\n border-bottom: 1px solid ",";\n padding: 0 var(--layout-gutter-mobile);\n background-color: #f9f9fa;\n\n ","\n"]);return P=function(){return n},n}function k(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n background-color: var(--color-background-primary);\n\n position: absolute;\n top: 0;\n overflow: hidden;\n transition: all 0.3s;\n z-index: 5;\n right: -100%;\n\n &.in.visible {\n right: 0;\n }\n\n "," {\n justify-content: flex-end;\n }\n"]);return k=function(){return n},n}function T(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n background-color: var(--color-background-primary);\n\n position: absolute;\n top: 0;\n overflow: hidden;\n transition: all 0.3s;\n z-index: 2;\n right: -100%;\n\n &.in.visible {\n right: 0;\n }\n"]);return T=function(){return n},n}function D(){var n=(0,i.Z)(["\n padding: 0;\n "]);return D=function(){return n},n}function j(){var n=(0,i.Z)(["\n height: calc(100% - 56px);\n width: 100%;\n padding: 0 var(--layout-gutter-mobile) var(--layout-gutter-mobile);\n\n ","\n\n ","\n"]);return j=function(){return n},n}function O(){var n=(0,i.Z)(["\n font-weight: 600;\n line-height: 20px;\n font-size: ",";\n text-align: center;\n"]);return O=function(){return n},n}function F(){var n=(0,i.Z)(["\n font-size: ","\n "]);return F=function(){return n},n}function M(){var n=(0,i.Z)(["\n font-size: ","\n "]);return M=function(){return n},n}function _(){var n=(0,i.Z)(["\n width: 45%;\n padding: 0;\n "]);return _=function(){return n},n}function z(){var n=(0,i.Z)(["\n width: 50%;\n padding: 0;\n "]);return z=function(){return n},n}function G(){var n=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n\n ","\n p {\n text-align: center;\n font-size: ",";\n\n ","\n }\n\n .title {\n font-weight: 600;\n display: block;\n font-size: ",";\n\n ","\n }\n\n .content {\n width: 100%;\n text-align: center;\n\n > *:not(:last-child) {\n margin-bottom: 10px;\n }\n\n ","\n\n ",";\n }\n\n .content-group {\n width: 80%;\n text-align: center;\n\n > *:not(:last-child) {\n margin-bottom: 10px;\n }\n\n ",";\n }\n\n ","\n"]);return G=function(){return n},n}function B(){var n=(0,i.Z)(["\n height: 400px;\n "]);return B=function(){return n},n}function q(){var n=(0,i.Z)(["\n display: flex;\n align-items: center;\n height: 280px;\n flex-direction: column;\n width: 100%;\n\n ","\n > *:not(:last-child) {\n margin-bottom: 10px;\n }\n"]);return q=function(){return n},n}function $(){var n=(0,i.Z)(["\n height: 100%;\n width: 100%;\n position: relative;\n"]);return $=function(){return n},n}function X(){var n=(0,i.Z)(["\n padding: 27px 24px;\n "]);return X=function(){return n},n}function Y(){var n=(0,i.Z)(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 24px;\n background: var(--color-light-blue);\n border-bottom: 1px solid var(--color-primary-disabled);\n\n ","\n"]);return Y=function(){return n},n}function L(){var n=(0,i.Z)(["\n fontSize: ","\n "]);return L=function(){return n},n}function V(){var n=(0,i.Z)(["\n fontsize: ",";\n font-weight: 600;\n\n .search-term {\n color: var(--color-purple);\n font-weight: 700;\n }\n\n ","\n"]);return V=function(){return n},n}function Q(){var n=(0,i.Z)(["\n font-weight: 600;\n color: var(--color-primary);\n"]);return Q=function(){return n},n}function H(){var n=(0,i.Z)(["\n 0% {\n opacity: 0;\n transform: scale(0.1);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n "]);return H=function(){return n},n}function K(){var n=(0,i.Z)(["\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n 100% {\n opacity: 0;\n transform: scale(0.1);\n display: none;\n }\n "]);return K=function(){return n},n}function J(){var n=(0,i.Z)(["\n animation: "," 0.3s;\n "]);return J=function(){return n},n}function W(){var n=(0,i.Z)(["\n animation: "," 0.3s;\n "]);return W=function(){return n},n}function nn(){var n=(0,i.Z)(["\n ",";\n position: absolute;\n z-index: 2;\n display: flex;\n flex-direction: column;\n height: 100%;\n width: 100%;\n top: 0;\n background-color: #f4f4f6;\n"]);return nn=function(){return n},n}function tn(){var n=(0,i.Z)(["\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n height: calc(100% - 56px);\n"]);return tn=function(){return n},n}function en(){var n=(0,i.Z)(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 16px 0;\n"]);return en=function(){return n},n}function rn(){var n=(0,i.Z)(["\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n scrollbar-width: thin;\n\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: #d9d9d9;\n }\n\n &::-ms-scrollbar {\n width: 6px;\n }\n\n &::-ms-scrollbar-thumb {\n background-color: #d9d9d9;\n }\n"]);return rn=function(){return n},n}function on(){var n=(0,i.Z)(["\n height: auto;\n padding: 8px 12px;\n font-weight: 700;\n font-size: ",";\n color: #4088ff !important;\n\n &:hover,\n &:focus {\n color: #4088ff !important;\n }\n\n &:hover,\n &:focus,\n &:disabled {\n background-color: transparent;\n border-color: transparent;\n }\n"]);return on=function(){return n},n}function un(){var n=(0,i.Z)(["\n margin-top: 2px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n\n .ant-badge-status-dot {\n width: 10px;\n height: 10px;\n }\n\n .ant-badge-status-text {\n margin-left: 6px;\n font-size: ",";\n line-height: 20px;\n color: var(--color-secondary);\n font-weight: 400;\n }\n"]);return un=function(){return n},n}var cn=o.ZP.div.withConfig({componentId:"sc-cae077eb-0"})(v(),s.VY,d.c.md(l()),d.c.size1240(f()),(function(n){return n.$isEmptyState&&"\n justify-content: center;\n "})),an=o.ZP.div.withConfig({componentId:"sc-cae077eb-1"})(p(),(function(n){return n.$isSearching?"17px 24px":"24px"}),s.VY,u.J,(function(n){var t=n.$hidden;return"\n ".concat(dn,", ").concat(sn," {\n display: ").concat(t?"none":"flex",";\n }\n ")}),d.c.md(h())),dn=o.ZP.div.withConfig({componentId:"sc-cae077eb-2"})(Z(),s.Uw,d.c.md(g()),d.c.size1024(m())),sn=o.ZP.div.withConfig({componentId:"sc-cae077eb-3"})(x(),u.J),ln=(0,o.F4)(b()),fn=o.ZP.div.withConfig({componentId:"sc-cae077eb-4"})(E(),ln,d.c.md(w()),d.c.size1024(C())),vn=o.ZP.div.withConfig({componentId:"sc-cae077eb-5"})(A(),d.c.size1615(y(),(function(n){var t=n.$hidden;return void 0!==t&&t?"1fr":"1fr 343px"}))),hn=o.ZP.div.withConfig({componentId:"sc-cae077eb-6"})(R(),d.c.size1615(I(),s.VY)),pn=o.ZP.div.withConfig({componentId:"sc-cae077eb-7"})(U()),gn=o.ZP.div.withConfig({componentId:"sc-cae077eb-8"}
1)(S(),(function(n){return n.$hidden&&"display: none;"})),mn=o.ZP.div.withConfig({componentId:"sc-cae077eb-9"})(N()),Zn=o.ZP.div.withConfig({componentId:"sc-cae077eb-10"})(P(),s.VY,(function(n){var t=n.$hidden;return"\n > * {\n display: ".concat(t?"none":"block",";\n }\n ")})),xn=o.ZP.div.withConfig({componentId:"sc-cae077eb-11"})(k(),Zn),bn=o.ZP.div.withConfig({componentId:"sc-cae077eb-12"})(T()),wn=o.ZP.div.withConfig({componentId:"sc-cae077eb-13"})(j(),d.c.md(D()),(function(n){return n.$hidden&&"display: none;"})),Cn=o.ZP.p.withConfig({componentId:"sc-cae077eb-14"})(O(),s.u6),En=o.ZP.div.withConfig({componentId:"sc-cae077eb-15"})(G(),(function(n){return n.$isPopUp&&"\n height: 339px;\n\n ".concat(yn," {\n height: 100%;\n justify-content: center;\n\n .content > *:not(:last-child) {\n margin-bottom: 0;\n }\n\n p {\n font-size: ").concat(s.u6,";\n }\n\n p:last-child {\n padding: 0 35px;\n }\n }\n ")}),s.tf,d.c.md(F(),s.Uw),s.u6,d.c.md(M(),s.co),(function(n){var t=n.$type;return t===a.F9.INBOX?"padding: 0 52px;":t===a.F9.REQUEST?"padding: 0 30px;":"padding: 0 48px;"}),d.c.md(_()),d.c.xl(z()),(function(n){return n.$isPopUp&&"\n .content {\n width: 90%;\n padding: 0;\n }\n "})),yn=o.ZP.div.withConfig({componentId:"sc-cae077eb-16"})(q(),d.c.md(B())),An=o.ZP.div.withConfig({componentId:"sc-cae077eb-17"})($()),In=o.ZP.div.withConfig({componentId:"sc-cae077eb-18"})(Y(),d.c.md(X())),Rn=o.ZP.p.withConfig({componentId:"sc-cae077eb-19"})(V(),s.u6,d.c.md(L(),s.s)),Un=o.ZP.a.withConfig({componentId:"sc-cae077eb-20"})(Q()),Sn=o.ZP.div.withConfig({componentId:"sc-cae077eb-21"})(nn(),(function(n){var t=n.$isSearching,e=(0,o.F4)(H()),i=(0,o.F4)(K());return t?(0,o.iv)(J(),e):(0,o.iv)(W(),i)})),Nn=o.ZP.div.withConfig({componentId:"sc-cae077eb-22"})(tn()),Pn=o.ZP.div.withConfig({componentId:"sc-cae077eb-23"})(en()),kn=o.ZP.div.withConfig({componentId:"sc-cae077eb-24"})(rn()),Tn=(0,o.ZP)(c.Z).withConfig({componentId:"sc-cae077eb-25"})(on(),s.u6),Dn=(0,o.ZP)(r.Z).withConfig({componentId:"sc-cae077eb-26"})(un(),s.u6)},48594:function(n,t,e){e.d(t,{Z:function(){return Sn}});var i=e(47568),r=e(26042),o=e(69396),u=e(29815),c=e(20414),a=e(85893),d=e(67294),s=e(58533),l=e(15313),f=e(94829),v=e(45721),h=e(29951),p=e(32911),g=e(59066),m=e(63922),Z=e(27484),x=e.n(Z),b=e(11163),w="/_next/static/media/conversation-group.a4fa7422.svg",C=e(74163),E=e(80378),y=e(86804),A=e(78281),I=e(62261),R=e(4194),U=e(88283),S=e(88289),N=e(57326),P=e(96479),k=e(7297),T=e(85518),D=e(87379),j=e(28598);function O(){var n=(0,k.Z)(["\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: 1fr;\n grid-column-gap: 8px;\n grid-row-gap: 5px;\n"]);return O=function(){return n},n}function F(){var n=(0,k.Z)(["\n display: grid;\n grid-template-columns: 1fr auto;\n grid-column-gap: 8px;\n align-items: center;\n"]);return F=function(){return n},n}function M(){var n=(0,k.Z)(["\n font-weight: 700;\n font-size: ",";\n line-height: 20px;\n\n ","\n"]);return M=function(){return n},n}function _(){var n=(0,k.Z)(["\n font-size: 13px;\n line-height: 20px;\n font-weight: 400;\n color: var(--color-secondary);\n"]);return _=function(){return n},n}function z(){var n=(0,k.Z)(["\n color: var(--color-secondary);\n font-weight: 400;\n font-size: ",";\n line-height: 16px;\n"]);return z=function(){return n},n}function G(){var n=(0,k.Z)(["\n display: flex;\n justify-content: flex-end;\n align-items: center;\n\n > *:not(:last-child) {\n margin-right: 8px;\n }\n\n .ant-badge {\n &-count {\n background-color: #e4485b;\n font-weight: 600;\n min-width: 16px;\n height: 16px;\n padding: 0 4px;\n line-height: 16px;\n }\n }\n"]);return G=function(){return n},n}function B(){var n=(0,k.Z)(["\n width: 100%;\n overflow: hidden;\n position: relative;\n\n ","\n"]);return B=function(){return n},n}function q(){var n=(0,k.Z)(["\n width: calc(100% + 76px);\n display: flex;\n margin-left: ",";\n transition: margin-left 0.25s linear;\n"]);return q=function(){return n},n}function $(){var n=(0,k.Z)(["\n width: 76px;\n height: 77px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: #e26664;\n font-weight: 700;\n color: var(--color-white);\n"]);return $=function(){return n},n}function X(){var n=(0,k.Z)(["\n background-color: #f4f4f6;\n"]);return X=function(){return n},n}function Y(){var n=(0,k.Z)(["\n cursor: pointer;\n position: absolute;\n top: 32px;\n right: 24px;\n display: none;\n\n ","\n"]);return Y=function(){return n},n}function L(){var n=(0,k.Z)(["\n display: grid;\n grid-template-columns: 40px 1fr;\n grid-gap: 8px;\n padding: 16px 24px;\n cursor: pointer;\n width: calc(100% - 76px);\n border-right: 4px solid transparent;\n\n ","\n &:hover {\n background-color: rgba(226, 222, 250, 0.5);\n }\n\n ","\n\n ","\n\n ","\n"]);return L=function(){return n},n}function V(){var n=(0,k.Z)(["\n display: grid;\n grid-template-rows: auto auto;\n grid-template-columns: 1fr;\n grid-column-gap: 8px;\n"]);return V=function(){return n},n}var Q=D.ZP.div.withConfig({componentId:"sc-c1a804f7-0"})(O()),H=D.ZP.div.withConfig({componentId:"sc-c1a804f7-1"})(F()),K=D.ZP.p.withConfig({componentId:"sc-c1a804f7-2"})(M(),j.u6,(function(n){return n.$isDeletedUser&&"\n color: #c4c4c4;\n "})),J=D.ZP.p.withConfig({componentId:"sc-c1a804f7-3"})(_()),W=D.ZP.p.withConfig({componentId:"sc-c1a804f7-4"})(z(),j.tf),nn=D.ZP.div.withConfig({componentId:"sc-c1a804f7-5"}
1)(G()),tn=D.ZP.div.withConfig({componentId:"sc-c1a804f7-6"})(B(),(function(n){return!n.$isPopUp&&!T.tq&&!T.Em&&"&:hover {\n .right-info {\n display: none;\n }\n\n .archive-btn {\n display: block;\n }\n }"})),en=D.ZP.div.withConfig({componentId:"sc-c1a804f7-7"})(q(),(function(n){return n.$isShowArchiveButton?"-76px":"0"})),rn=D.ZP.div.withConfig({componentId:"sc-c1a804f7-8"})($()),on=(0,D.ZP)(rn).withConfig({componentId:"sc-c1a804f7-9"})(X()),un=(0,D.ZP)(E.Z).withConfig({componentId:"sc-c1a804f7-10"})(Y(),(function(n){return n.$disabled&&"\n cursor: not-allowed;\n "})),cn=D.ZP.div.withConfig({componentId:"sc-c1a804f7-11"})(L(),(function(n){return n.$isPopup&&"\n border-bottom: 1px solid #e4e8ee;\n\n &:last-child {\n border-bottom: none;\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n "}),(function(n){return n.$unRead&&"\n background-color: #ebf4ff;\n\n ".concat(J," {\n font-weight: 700;\n color: var(--color-primary);\n }\n ")}),(function(n){var t=n.$isSelected,e=n.$isPopup;return t&&!e&&"\n background-color: rgba(226, 222, 250, 0.5);\n border-right: 4px solid var(--color-purple);\n "}),(function(n){return n.$isSkeleton&&"\n width: 100%;\n "})),an=D.ZP.div.withConfig({componentId:"sc-c1a804f7-12"})(V()),dn=function(n){var t,e,r,o,u,s,f,v,p,g=n.conversation,Z=n.listType,k=n.onClose,T=n.isPopUp,D=(0,b.useRouter)(),j=g.recipients,O=g.createdAt,F=g.updatedAt,M=g.lastMessage,_=g.chatRequest,z=g.type,G=g.teamSchedule,B=g.blocks,q=(0,l.v9)(U.Z.getCurrentUser),$=(0,l.v9)(U.Z.getCurrentConversation),X=(0,l.v9)(U.Z.getUsersOnlineStatus),Y=null===j||void 0===j?void 0:j.find((function(n){return n.user.id!==(null===q||void 0===q?void 0:q.id)})),L=null===j||void 0===j?void 0:j.find((function(n){return n.isAdmin})),V=null===j||void 0===j?void 0:j.find((function(n){return n.user.id===(null===q||void 0===q?void 0:q.id)})),an=(0,d.useState)(0),dn=an[0],sn=an[1],ln=(0,d.useState)(0),fn=ln[0],vn=ln[1],hn=(0,d.useState)(!1),pn=hn[0],gn=hn[1],mn=(0,d.useState)(!1),Zn=mn[0],xn=mn[1],bn=!!(null===_||void 0===_?void 0:_.seenAt)&&I.Ge.includes(null===_||void 0===_?void 0:_.status),wn=function(){var n,t=(null===G||void 0===G||null===(n=G.info)||void 0===n?void 0:n.name)||(null===g||void 0===g?void 0:g.name),e=(0,N.ff)(t);return e?"#".concat(e):""},Cn=function(){return(null===_||void 0===_?void 0:_.status)===I.wr.PENDING},En=(0,d.useCallback)((function(n){return null===n||void 0===n?void 0:n.toString().replace(I.rI,(function(n,t){var e;return"@".concat(null===(e=null===j||void 0===j?void 0:j.find((function(n){return n.user.id===t})))||void 0===e?void 0:e.user.username)}))}),[j]),yn=function(){if(M){var n=M.author,t=M.type;if(z===I.i1.TEAM||z===I.i1.GROUP){if(n===(null===q||void 0===q?void 0:q.id))return t===I.Cs.DEFAULT||t===I.Cs.REPLY?"You: ":"You";var e=null===j||void 0===j?void 0:j.find((function(t){return t.user.id===n}));return"".concat((0,P.getNameOfUser)({user:null===e||void 0===e?void 0:e.user,config:{onlyUsername:!0,showNameDeletedUser:z===I.i1.GROUP}})).concat(t===I.Cs.DEFAULT?": ":"")}if(n===(null===q||void 0===q?void 0:q.id))return"You: "}return""},An=function(){var n=(0,i.Z)((function(){var n;return(0,c.__generator)(this,(function(t){switch(t.label){case 0:xn(!0),t.label=1;case 1:return t.trys.push([1,6,7,8]),Z!==I.F9.ARCHIVE?[3,3]:[4,h.Z.unarchiveConversation(g.id)];case 2:return t.sent(),[3,5];case 3:return[4,h.Z.archiveConversation(g.id)];case 4:t.sent(),t.label=5;case 5:return[3,8];case 6:return n=t.sent(),console.error(n),[3,8];case 7:return xn(!1),[7];case 8:return[2]}}
1))}));return function(){return n.apply(this,arguments)}}();return(0,a.jsxs)(tn,{$isPopUp:T,children:[(0,a.jsxs)(en,{$isShowArchiveButton:pn,children:[(0,a.jsxs)(cn,{onClick:function(){pn?gn(!1):(D.push("/inbox?cid=".concat(null===g||void 0===g?void 0:g.id),void 0,{shallow:!0}),k&&k())},$unRead:!(null===V||void 0===V?void 0:V.readAllMessage)&&!(null===V||void 0===V?void 0:V.muted)&&!bn,$isSelected:(null===$||void 0===$?void 0:$.id)===g.id,$isPopup:T,onTouchStart:function(n){vn(0),sn(n.targetTouches[0].clientX)},onTouchMove:function(n){return vn(n.targetTouches[0].clientX)},onTouchEnd:function(){if(!T&&dn&&fn){var n=dn-fn,t=n<-50;n>50?gn(!0):t&&gn(!1)}},children:[z===I.i1.DIRECT_MESSAGE?(0,a.jsx)(C.Z,{imageUrl:null===Y||void 0===Y||null===(t=Y.user)||void 0===t?void 0:t.avatarUrl,showDot:!!_&&!Cn()&&!(null===B||void 0===B?void 0:B.length),online:function(){var n,t,e,i,r,o=(null===Y||void 0===Y?void 0:Y.userChatSetting)||(null===Y||void 0===Y||null===(n=Y.user)||void 0===n?void 0:n.userChatSetting),u=!1!==(null===o||void 0===o?void 0:o.isAppearanceOnline),c=null===g||void 0===g||null===(t=g.chatRequest)||void 0===t?void 0:t.status,a=(null===g||void 0===g||null===(e=g.chatRequest)||void 0===e?void 0:e.requester)===(null===q||void 0===q?void 0:q.id),d=!(null===g||void 0===g?void 0:g.chatRequest)||c===I.wr.PENDING&&a,s=(null===Y||void 0===Y||null===(i=Y.user)||void 0===i?void 0:i.directMessagePrivacySettings)===S.yX.DISABLED&&d&&(null===g||void 0===g?void 0:g.type)===I.i1.DIRECT_MESSAGE;return u&&X[(null===Y||void 0===Y||null===(r=Y.user)||void 0===r?void 0:r.id)||""]&&!s}(),isDeleted:null===Y||void 0===Y||null===(e=Y.user)||void 0===e?void 0:e.isDeleted}):z===I.i1.GROUP&&Z===I.F9.REQUEST?(0,a.jsx)(C.Z,{imageUrl:null===L||void 0===L||null===(r=L.user)||void 0===r?void 0:r.avatarUrl,showDot:!1,online:!1,isDeleted:null===L||void 0===L||null===(o=L.user)||void 0===o?void 0:o.isDeleted}):(0,a.jsx)(y.Z,{src:w,alt:wn(),width:40,height:40}),(0,a.jsxs)(Q,{children:[(0,a.jsxs)(H,{children:[(0,a.jsx)(K,{className:"ellipsis",$isDeletedUser:z===I.i1.GROUP&&Z===I.F9.REQUEST?null===L||void 0===L||null===(u=L.user)||void 0===u?void 0:u.isDeleted:null===Y||void 0===Y||null===(s=Y.user)||void 0===s?void 0:s.isDeleted,children:z===I.i1.DIRECT_MESSAGE?(0,N.nP)({user:null===Y||void 0===Y?void 0:Y.user,config:{onlyUsername:!0}}):z===I.i1.GROUP&&Z===I.F9.REQUEST?(0,N.nP)({user:null===L||void 0===L?void 0:L.user,config:{onlyUsername:!0}}):wn()}),(0,a.jsx)(W,{className:"right-info",children:Cn()?(0,N.xN)({date:_.requestedAt}):_?(0,N.xN)({date:(null===M||void 0===M?void 0:M.createdAt)||F||O}):(0,N.xN)({date:F||O})})]}),(0,a.jsxs)(H,{children:[(0,a.jsx)(J,{className:"ellipsis",children:Z===I.F9.REQUEST?z===I.i1.DIRECT_MESSAGE?"Sent a chat request":(null===_||void 0===_?void 0:_.status)===I.wr.PENDING?"Sent a group chat invite":(null===_||void 0===_?void 0:_.status)===I.wr.REJECTED?"Group chat invite rejected":(null===_||void 0===_?void 0:_.status)===I.wr.WITHDREW&&"Group chat invite has been withdrawn":Z===I.F9.INBOX&&(null===_||void 0===_?void 0:_.status)===I.wr.PENDING?"Chat request pending approval":Z===I.F9.BLOCKED?"has been blocked":function(){var n,t;if(!(null===M||void 0===M?void 0:M._id)||(null===(n=null===j||void 0===j?void 0:j.filter((function(n){return n.user.isDeleted})))||void 0===n?void 0:n.length)&&z===I.i1.DIRECT_MESSAGE)return"";var e=null===j||void 0===j?void 0:j.find((function(n){return n.user.id===(null===q||void 0===q?void 0:q.id)}));if((null===e||void 0===e||null===(t=e.schedulePayload)||void 0===t?void 0:t.completedUserScheduleAt)&&x()(null===e||void 0===e?void 0:e.schedulePayload.completedUserScheduleAt).isAfter(M.createdAt))return"Your team challenge has been completed. You may leave this group chat if you wish, or you may stay to keep in touch with your teammates. Note that a new group chat will be formed even if you start a new team challenge with the same members.";var i=M.content,r=M.type,o=M.embeds,u=M.stickers,c="";if(null===u||void 0===u?void 0:u.length)c="Sent a Sticker";else if(null===o||void 0===o?void 0:o.length){var a=o[0].type;a===R.b.GIF&&(c="Sent a GIF"),a===R.b.IMAGE&&(c="Sent a file")}else c=En(i)||"";var d=M.author,s=d===(null===q||void 0===q?void 0:q.id),l=s?"have":"has";switch(r){case I.Cs.USER_ACCEPT_CHAT:return"Chat request approved";
1case I.Cs.USER_DELETED_ACCOUNT:return"".concat(z===I.i1.DIRECT_MESSAGE?"This user":yn()," has deleted their account");case I.Cs.USER_REQUEST_CHAT:return z===I.i1.DIRECT_MESSAGE?"Sent a chat request":"Sent a group chat invite";case I.Cs.USER_BLOCKED:return(0,N.X2)(g,null===q||void 0===q?void 0:q.id)?"has been blocked":"".concat((0,P.getNameOfUser)({user:null===Y||void 0===Y?void 0:Y.user,config:{onlyUsername:!0}})," has blocked you");case I.Cs.USER_UNBLOCKED:return d===(null===q||void 0===q?void 0:q.id)?"".concat((0,P.getNameOfUser)({user:null===Y||void 0===Y?void 0:Y.user,config:{onlyUsername:!0}})," has been unblocked"):"".concat((0,P.getNameOfUser)({user:null===Y||void 0===Y?void 0:Y.user,config:{onlyUsername:!0}})," has unblocked you");case I.Cs.GROUP_CREATED:return"".concat(yn()," ").concat(l," created the group");case I.Cs.RENAME:return"Group name has been changed";case I.Cs.USER_JOINED_GROUP:return"".concat(yn()," ").concat(l," ").concat(z===I.i1.GROUP?"joined the group":"been added to the group");case I.Cs.USER_REMOVED_FROM_GROUP:return"".concat(yn()," ").concat(l," been removed from the group");case I.Cs.USER_TRANSFER_ADMIN_IN_GROUP:return"".concat(yn()," ").concat(s?"are":"is"," now the group admin");case I.Cs.USER_LEFT_GROUP:return"".concat(yn()," ").concat(l," left the group");case I.Cs.TEAM_LOCKED_IN:return"Your team challenge has begun! Team members may not leave this group chat until they have completed the challenge.";default:return"".concat(yn()).concat(c)}}()}),(0,a.jsxs)(nn,{className:"right-info",children:[!((null===V||void 0===V?void 0:V.unreadMessageCount)&&V.unreadMessageCount>0)||Z!==I.F9.INBOX&&Z!==I.F9.ARCHIVE||(null===_||void 0===_?void 0:_.status)===I.wr.PENDING||((null===(f=null===j||void 0===j?void 0:j.filter((function(n){return n.user.isDeleted})))||void 0===f?void 0:f.length)||z!==I.i1.DIRECT_MESSAGE)&&((null===(p=null===(v=null===j||void 0===j?void 0:j.filter((function(n){return n.user.isDeleted})))||void 0===v?void 0:v.map((function(n){return n.user.id})))||void 0===p?void 0:p.includes(null===M||void 0===M?void 0:M.author))||z!==I.i1.TEAM&&z!==I.i1.GROUP)||(null===V||void 0===V?void 0:V.muted)?null:(0,a.jsx)(m.Z,{count:null===V||void 0===V?void 0:V.unreadMessageCount,overflowCount:9}),(null===V||void 0===V?void 0:V.muted)&&(0,a.jsx)(E.Z,{icon:"notification-off",size:16,color:"var(--color-secondary)"})]})]})]})]}),!T&&(Z===I.F9.ARCHIVE?(0,a.jsx)(on,{onClick:function(){return!Zn&&An()},children:(0,a.jsx)(E.Z,{icon:"unarchive",size:24,color:"var(--color-secondary)"})}):(0,a.jsx)(rn,{onClick:function(){return!Zn&&An()},children:"Archive"}))]}),!T&&(0,a.jsx)(A.Z,{title:Z===I.F9.ARCHIVE?"Unarchive":"Archive",placement:"top",children:(0,a.jsx)(un,{icon:Z===I.F9.ARCHIVE?"unarchive":"close",size:Z===I.F9.ARCHIVE?16:13,color:Zn?"var(--color-primary-disabled)":"var(--color-secondary)",className:"archive-btn",$disabled:Zn,onClick:function(){return!Zn&&An()}})})]})},sn=e(84849),ln=function(){return(0,a.jsxs)(cn,{$isSkeleton:!0,children:[(0,a.jsx)(sn.Z,{height:40,circle:!0}),(0,a.jsxs)(an,{children:[(0,a.jsx)(sn.Z,{height:14,width:"100%"}),(0,a.jsx)(sn.Z,{height:14,width:"100%"})]})]})},fn=e(30318),vn=e(13453),hn=e(28166),pn=e(35081),gn=e(57323);function mn(){var n=(0,k.Z)(["\n height: 100%;\n width: 100%;\n overflow: auto;\n\n ","\n"]);return mn=function(){return n},n}function Zn(){var n=(0,k.Z)(["\n height: 100%;\n width: 100%;\n overflow: auto;\n\n scrollbar-width: thin;\n &::-webkit-scrollbar {\n width: 6px;\n }\n &::-webkit-scrollbar-thumb {\n background-color: #d9d9d9;\n }\n &::-ms-scrollbar {\n width: 6px;\n }\n &::-ms-scrollbar-thumb {\n background-color: #d9d9d9;\n }\n"]);return Zn=function(){return n},n}function xn(){var n=(0,k.Z)(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n height: 100%;\n"]);return xn=function(){return n},n}function bn(){var n=(0,k.Z)(["\n width: 100%;\n padding: 12px 24px 12px 32px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid ",";\n background-color: #f4f4f6;\n cursor: pointer;\n"]);return bn=function(){return n},n}function wn(){var n=(0,k.Z)(["\n font-weight: 600;\n margin-left: 24px;\n"]);return wn=function(){return n},n}function Cn(){var n=(0,k.Z)(["\n font-weight: 600;\n font-size: ",";\n line-height: 13px;\n color: var(--color-secondary);\n"]);return Cn=function(){return n},n}var En=D.ZP.div.withConfig({componentId:"sc-a789155f-0"})(mn(),(function(n){return n.$isPopUp&&"\n >
1 div:last-child {\n border-bottom-left-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n "})),yn=D.ZP.div.withConfig({componentId:"sc-a789155f-1"})(Zn()),An=D.ZP.div.withConfig({componentId:"sc-a789155f-2"})(xn()),In=D.ZP.div.withConfig({componentId:"sc-a789155f-3"})(bn(),j.VY),Rn=D.ZP.p.withConfig({componentId:"sc-a789155f-4"})(wn()),Un=D.ZP.span.withConfig({componentId:"sc-a789155f-5"})(Cn(),j.tf),Sn=function(n){var t=n.isPopUp,e=void 0!==t&&t,m=n.conversationListType,Z=void 0===m?I.F9.INBOX:m,x=n.archiveCount,b=n.onClose,w=n.onGetConversations,C=n.onOpenArchiveList,y=n.isActive,A=(0,l.I0)(),R=(0,f.Z)("(max-width: ".concat(pn.u.sm,"px)"),!0),P=(0,d.useState)(!0),k=P[0],T=P[1],D=(0,d.useState)([]),j=D[0],O=D[1],F=(0,d.useState)(!1),M=F[0],_=F[1],z=(0,d.useState)(),G=z[0],B=z[1],q=(0,d.useState)(""),$=q[0],X=q[1],Y=(0,l.v9)(vn.getCurrentUser),L=(0,l.v9)(U.Z.getCurrentConversation),V=(0,l.v9)(U.Z.getUnreadChatArchiveCount),Q=(0,d.useMemo)((function(){return(null===Y||void 0===Y?void 0:Y.directMessagePrivacySettings)===S.yX.DISABLED&&Z===I.F9.REQUEST}),[null===Y||void 0===Y?void 0:Y.directMessagePrivacySettings,Z]);(0,d.useEffect)((function(){wn(),Z===I.F9.REQUEST&&p.Z.markChatRequestNotificationAsRead()}),[]);var H=(0,d.useRef)(y),K=(0,d.useRef)(0);(0,d.useEffect)((function(){y&&!H.current&&(K.current+=1,O([]),X(""),wn("")),H.current=y}),[y]);var J=function(n){O((function(t){return(0,u.Z)(t.map((function(t){return(0,o.Z)((0,r.Z)({},t),{recipients:t.recipients.map((function(t){var e;return(0,o.Z)((0,r.Z)({},t),{userChatSetting:(null===(e=t.userChatSetting)||void 0===e?void 0:e.user)===n.user?(0,r.Z)({},n):(0,r.Z)({},t.userChatSetting)})}))})})))})),n.user&&A((0,v.yM)([{userId:n.user,isOnline:!!n.isAppearanceOnline}])),_(!0)},W=(0,d.useCallback)((function(n){var t=n.chatRequest,e=t.status,i=t.recipient;e===I.wr.PENDING&&i===Y.id&&Z===I.F9.REQUEST&&(O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));-1!==i?e[i]=n:e.unshift(n);var r=e.sort((function(n,t){return new Date(t.updatedAt).getTime()-new Date(n.updatedAt).getTime()}));return(0,u.Z)(r)})),_(!0))}),[j]),nn=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));return-1!==i?Z===I.F9.REQUEST?e.splice(i,1):Z===I.F9.INBOX&&(e[i]=n):Z===I.F9.INBOX&&e.unshift(n),(0,u.Z)(e)})),_(!0)}),[j]),tn=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));if(-1!==i)Z===I.F9.REQUEST&&(e[i]=n);else{var r=n.chatRequest;Z===I.F9.INBOX&&(null===r||void 0===r?void 0:r.status)!==I.wr.REJECTED&&e.unshift(n)}return(0,u.Z)(e)})),_(!0)}),[j]),en=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.conversation}));return-1!==i&&Z===I.F9.REQUEST&&(e[i].chatRequest=n),(0,u.Z)(e)})),_(!0)}),[j]),rn=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id})),r=!!(0,N.X2)(n,null===Y||void 0===Y?void 0:Y.id);return-1!==i&&r?Z===I.F9.REQUEST||Z===I.F9.INBOX?e.splice(i,1):e[i]=n:-1===i&&r&&Z===I.F9.BLOCKED&&e.unshift(n),B(n),(0,u.Z)(e)})),_(!0)}),[j]),on=(0,d.useCallback)((function(n){var t=n.chatRequest;O((function(e){var i=(0,u.Z)(e),r=i.findIndex((function(t){return t.id===n.id}));return-1!==r?Z===I.F9.BLOCKED?i.splice(r,1):i[r]=n:(Z===I.F9.REQUEST&&(null===t||void 0===t?void 0:t.status)===I.wr.PENDING||Z===I.F9.INBOX&&(null===t||void 0===t?void 0:t.status)===I.wr.ACCEPTED||Z===I.F9.INBOX&&!t||Z===I.F9.INBOX&&(null===t||void 0===t?void 0:t.status)===I.wr.PENDING&&(null===t||void 0===t?void 0:t.requester)===(null===Y||void 0===Y?void 0:Y.id))&&i.unshift(n),B(n),(0,u.Z)(i)})),_(!0)}),[j]),un=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));return-1!==i&&(e[i]=(0,o.Z)((0,r.Z)({},e[i]),{recipients:n.recipients})),(0,u.Z)(e)})),_(!0)}),[j]),cn=(0,d.useCallback)((function(n){Z===I.F9.INBOX&&(O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));return-1!==i?e[i]=n:e.unshift(n),(0,u.Z)(e)})),_(!0))}),[j]),an=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));return-1!==i&&(e[i]=(0,o.Z)((0,r.Z)({},e[i]),{name:null===n||void 0===n?void 0:n.name})),(0,u.Z)(e)})),_(!0)}),[j]),sn=(0,d.useCallback)((function(n){O((function(t){var e=(0,u.Z)(t),i=e.findIndex((function(t){return t.id===n.id}));return-1!==i&&(e[i]=(0,r.Z)({},e[i],n)),(0,u.Z)(e)})),_(!0)}),[j]),mn=(0,d.useCallback)((function(n){n&&(O((function(t){var e=t.findIndex((function(t){return t.id===n.id}));if(-1!==e){var i=new Map;
1t[e].recipients.forEach((function(n){var t;i.set(null===(t=n.user)||void 0===t?void 0:t.id,{user:n.user,userChatSetting:n.userChatSetting})})),n.teamSchedule&&delete n.teamSchedule,t[e]=(0,o.Z)((0,r.Z)({},t[e],n),{recipients:n.recipients.map((function(n){var t,e=i.get((null===(t=n.user)||void 0===t?void 0:t.id)||n.user);return(0,o.Z)((0,r.Z)({},n),{user:null===e||void 0===e?void 0:e.user,userChatSetting:null===e||void 0===e?void 0:e.userChatSetting})}))})}else{var c,a=n.recipients.find((function(n){return n.user.id===Y.id}));(null===a||void 0===a||null===(c=a.actionPayload)||void 0===c?void 0:c.lastDeletedAt)&&t.push(n)}var d=t.sort((function(n,t){return new Date(t.updatedAt).getTime()-new Date(n.updatedAt).getTime()}));return(0,u.Z)(d)})),_(!0))}),[j,L,Y]),Zn=(0,d.useCallback)((function(n){n&&(O((function(t){if(Z===I.F9.ARCHIVE){var e=(0,u.Z)(t);e.unshift(n);var i=e.sort((function(n,t){return new Date(t.updatedAt).getTime()-new Date(n.updatedAt).getTime()}));return(0,u.Z)(i)}return Z===I.F9.BLOCKED?t.map((function(t){return t.id===n.id?n:t})):(0,u.Z)(t.filter((function(t){return n.id!==t.id})))})),_(!0))}),[j]),xn=(0,d.useCallback)((function(n){n&&(O((function(t){var e,i,r;if(Z===I.F9.ARCHIVE||!(Z===I.F9.BLOCKED&&(0,N.X2)(n,null===Y||void 0===Y?void 0:Y.id)||Z===I.F9.REQUEST&&!(null===n||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e.length)&&(null===(i=n.chatRequest)||void 0===i?void 0:i.status)===I.wr.PENDING&&n.createdBy!==Y.id)&&(Z!==I.F9.INBOX||(null===n||void 0===n||null===(r=n.blocks)||void 0===r?void 0:r.length)||n.chatRequest&&n.chatRequest.status!==I.wr.ACCEPTED&&n.createdBy!==Y.id))return(0,u.Z)(t.filter((function(t){return n.id!==t.id})));var o=t.filter((function(t){return t.id!==n.id}));o.unshift(n);var c=o.sort((function(n,t){return new Date(t.updatedAt).getTime()-new Date(n.updatedAt).getTime()}));return(0,u.Z)(c)})),_(!0))}),[j]),bn=(0,d.useCallback)((function(n){var t,e,i;if((null===(t=n.lastMessage)||void 0===t?void 0:t.author)!==Y.id){var r=null===(e=n.recipients)||void 0===e?void 0:e.find((function(n){return n.user.id===(null===Y||void 0===Y?void 0:Y.id)}));Z!==I.F9.REQUEST||(null===n||void 0===n||null===(i=n.chatRequest)||void 0===i?void 0:i.status)!==I.wr.PENDING||(null===r||void 0===r?void 0:r.archivedAt)||A((0,v.f0)()),Z===I.F9.ARCHIVE&&(null===r||void 0===r?void 0:r.archivedAt)&&A((0,v.Qt)())}}),[]);(0,d.useEffect)((function(){if(M){if(L){var n=j.find((function(n){return n.id===L.id}))||G;n&&A((0,v.Ft)(n))}_(!1),B(void 0)}}),[M,G]),(0,d.useEffect)((function(){if(hn.Z.socket)return hn.Z.onUserDeleted(sn),hn.Z.onUserStatusChanged(J),hn.Z.onConversationMessageUpdated(mn),hn.Z.onReceivedChatRequest(W),hn.Z.onAcceptedChatRequest(nn),hn.Z.onBlockedByUser(rn),hn.Z.onUnblockedByUser(on),hn.Z.onRejectedChatRequest(tn),hn.Z.onReadConversation(bn),hn.Z.onConversationRecipientsUpdated(un),hn.Z.onConversationCreated(cn),hn.Z.onGroupConversationCreated(cn),hn.Z.onConversationRename(an),hn.Z.onSeenChatRequest(en),hn.Z.onConversationArchive(Zn),hn.Z.onConversationUnarchive(xn),hn.Z.onConversationNotificationUpdated(sn),function(){hn.Z.offUserDeleted(sn),hn.Z.offUserStatusChanged(J),hn.Z.offConversationMessageUpdated(mn),hn.Z.offReceivedChatRequest(W),hn.Z.offAcceptedChatRequest(nn),hn.Z.offRejectedChatRequest(tn),hn.Z.offBlockedByUser(rn),hn.Z.offUnblockedByUser(on),hn.Z.offReadConversation(bn),hn.Z.offConversationRecipientsUpdated(un),hn.Z.offConversationCreated(cn),hn.Z.offGroupConversationCreated(cn),hn.Z.offConversationRename(an),hn.Z.offSeenChatRequest(en),hn.Z.offConversationArchive(Zn),hn.Z.offConversationUnarchive(xn),hn.Z.offConversationNotificationUpdated(sn)}}),[hn.Z.socket]);var wn=function(){var n=(0,i.Z)((function(){var n,t,i,r,o,a,d,s=arguments;return(0,c.__generator)(this,(function(c){switch(c.label){case 0:n=s.length>0&&void 0!==s[0]?s[0]:$,T(!0),t=K.current,c.label=1;case 1:return c.trys.push([1,3,4,5]),[4,h.Z.getConversations({listType:[Z],beforeConversationId:n,limit:e?I.M1:I.$d})];case 2:return i=c.sent(),t!==K.current?[2]:(r=i.items,O((function(n){return(0,u.Z)(n).concat((0,u.Z)(r))})),o=r[r.length-1],X(r.length===(e?I.M1:I.$d)?o.id:void 0),null===w||void 0===w||w(j.length),A((0,v.sm)(j.length)),a=[],null===r||void 0===r||r.forEach((function(n){var t;null===(t=n.recipients)||void 0===t||t.forEach((function(n){a.push({userId:n.user.id,isOnline:n.isOnline&&!n.user.lastOnlineAt})}))})),A((0,v.yM)(a)),[3,5]);case 3:return d=c.sent(),console.error(d),[3,5];case 4:return T(!1),[7];case 5:return[2]}}
1))}));return function(){return n.apply(this,arguments)}}(),Cn=function(){return(0,a.jsx)(En,{children:(0,u.Z)(Array(e?1:3)).map((function(n,t){return(0,a.jsx)(ln,{},t)}))})};return(0,a.jsxs)(yn,{id:"scroll-container-".concat(null===Z||void 0===Z?void 0:Z.toLowerCase()).concat(e?"-popup":""),children:[!!x&&!e&&(0,a.jsxs)(In,{onClick:function(){return null===C||void 0===C?void 0:C()},children:[(0,a.jsxs)("div",{className:"d-flex align-items--center",children:[(0,a.jsx)(E.Z,{icon:"archive",size:20,color:"var(--color-secondary)"}),(0,a.jsx)(Rn,{children:"Archived"})]}),V>0&&(0,a.jsx)(Un,{children:V})]}),k&&!j.length?Cn():(R||e)&&Q?(0,a.jsxs)(gn.$c,{$isPopUp:e,children:[(0,a.jsx)(gn.bN,{children:(0,a.jsx)(fn.Z,{src:g.Z.src,alt:"No-Conversations",height:160})}),(0,a.jsxs)("div",{className:"content",children:[(0,a.jsx)("p",{className:"title",children:"Chat request is disabled"}),(0,a.jsx)("p",{children:"No one is able to send you a chat request. Change your preferences to receive chat requests."})]})]}):j.length?(0,a.jsx)(s.Z,{dataLength:j.length,next:function(){$&&j.length&&wn()},hasMore:!!$,loader:Cn(),scrollableTarget:"scroll-container-".concat(null===Z||void 0===Z?void 0:Z.toLowerCase()).concat(e?"-popup":""),scrollThreshold:.9,children:(0,a.jsx)(En,{$isPopUp:e,children:j.map((function(n){return(0,a.jsx)(dn,{listType:Z,conversation:n,onClose:b,isPopUp:e},n.id)}))})}):(R||e)&&Z!==I.F9.ARCHIVE?function(n){var t=(0,N.Le)(n||I.F9.INBOX),i=t.title,r=t.content,o=t.image;return(0,a.jsx)(gn.$c,{$isPopUp:e,children:(0,a.jsxs)(gn.bN,{children:[(0,a.jsx)(fn.Z,{src:o.src,alt:"No-Conversations",width:160,height:160}),(0,a.jsxs)("div",{className:"content",children:[(0,a.jsx)("p",{className:"title",children:i}),(0,a.jsx)("p",{children:r})]})]})})}(Z):(0,a.jsx)(An,{children:(0,a.jsx)(E.Z,{icon:"conversation",size:180,color:"#E9E9EF"})})]})}},88289:function(n,t,e){e.d(t,{HR:function(){return a},Jn:function(){return o},NZ:function(){return l},e3:function(){return u},k:function(){return s},mb:function(){return i},yX:function(){return r}});var i,r,o,u,c=e(14924);!function(n){n.EVERYONE="everyone",n.ONLYME="onlyme"}(i||(i={})),function(n){n.EVERYONE="everyone",n.NOONE="noone",n.DISABLED="disabled"}(r||(r={})),function(n){n.NEW_ANNOUNCEMENT_OR_PROMOTIONAL_OFFERS="new_announcement_or_promotional_offers"}(o||(o={})),function(n){n.SCHEDULE="schedule",n.ANNOUNCEMENT="announcement"}(u||(u={}));var a,d,s=new Map([[o.NEW_ANNOUNCEMENT_OR_PROMOTIONAL_OFFERS,u.ANNOUNCEMENT]]);
1!function(n){n.DISCORD="discord",n.INSTAGRAM="instagram",n.YOUTUBE="youtube",n.TIKTOK="tiktok"}(a||(a={}));var l=(d={},(0,c.Z)(d,a.INSTAGRAM,""),(0,c.Z)(d,a.TIKTOK,""),(0,c.Z)(d,a.YOUTUBE,""),d)},57326:function(n,t,e){e.d(t,{xN:function(){return h},ff:function(){return x},X2:function(){return b},zO:function(){return g},Le:function(){return p},Es:function(){return Z},nP:function(){return m}});var i=e(27484),r=e.n(i),o=e(28734),u=e.n(o),c={src:"/_next/static/media/no-blocked.419d55f3.png",height:2246,width:2246,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAP1BMVEX///+xqaz37uXn29D+/v/x7eunl4v///9MaXH8+/1hTT5mU0XdxrWWgnDNxMzWzc3m4ebj08jJwcLt5+uCbVnjJQLOAAAADHRSTlMv/qzq9uv6sADr+frzMVKTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAPUlEQVR4nAXBiQGAMAgAsatSAYX++89qgqEiioGPUoaD7i/zHYr0E3GaIysjcjnan5hPV6i7tVnB0Hpf2A9RmAJIZhcXiAAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:8},a=e(73486),d=e(59066),s={src:"/_next/static/media/no-request.98a41af0.svg",height:541,width:539},l=e(15173),f=e(62261);var v=e(96479);i.extend(u());var h=function(n){var t=n.date,e=n.showTodayStr,i=n.format,o=n.dateOnly;if(!t)return"";var u=r()(t);return u.isSame(r()(),"day")?o&&e?"Today":"".concat(e?"Today at ":"").concat(u.format("h:mm A")):u.isSame(r()().subtract(1,"day"),"day")?o?"Yesterday":"Yesterday at ".concat(u.format("h:mm A")):o?u.format(i||"Do MMM YYYY"):"".concat(u.format(i||"Do MMM YYYY"))},p=function(n){switch(n){case f.F9.INBOX:return{title:"Start A Conversation",content:"You can send direct messages to other users when visiting their profile, or join a team challenge and be added to a group chat",image:d.Z};case f.F9.REQUEST:return{title:"Chat Requests",content:"Chat requests from other users of the website will appear here. Remember to be safe when communicating online with other users and report any unwanted behavior",image:s};case f.F9.BLOCKED:return{title:"Blocked Users",content:"Users that you have blocked from sending you chat messages or requests are shown here. Remember to be safe when communicating online with other users and report any unwanted behavior",image:c};default:return{title:"",content:"",image:null}}},g=function(n){return n?{title:"Create A Group Chat",content:"You can add up to 10 users in to a group chat, by selecting from the list of users who you\u2019ve had recent conversations with, or search for your friends via their username.",note:"Note: Group chats for team challenges are created automatically.",image:l.Z}:{title:"Start A New Conversation",content:"Search for a friend via their username to start a chat conversation.",subContent:"They will be sent a chat request for their approval.",note:"Only users who have enabled Direct Messaging can be searchable.",image:a.Z}},m=function(n){return n.user?function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;return n?n.length<=t?n:"".concat(n.slice(0,t),"..."):""}((0,v.getNameOfUser)(n)):""},Z=function(n){var t=n.match(RegExp("\\p{Emoji_Presentation}","gu"));return 4===(new TextEncoder).encode(n).length&&1===(null===t||void 0===t?void 0:t.length)},x=function(n){if(n)return null===n||void 0===n?void 0:n.split(" ").join("-").toLowerCase()},b=function(n,t){var e;return null===n||void 0===n||null===(e=n.blocks)||void 0===e?void 0:e.find((function(n){return n.blockedBy===t}))}}}]);
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.