isometrik-chat 3.5.8 → 3.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.css +1 -2
- package/build/index.js +1 -1
- package/package.json +1 -1
package/build/index.css
CHANGED
package/build/index.js
CHANGED
|
@@ -203,4 +203,4 @@ t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,c=(1<<s)-1,f=c>>1,u=-7,l=n?i-1:0,d=
|
|
|
203
203
|
animation-iteration-count: infinite;
|
|
204
204
|
animation-delay: 200ms;
|
|
205
205
|
}
|
|
206
|
-
`),dm.rippleVisible,ym,550,({theme:e})=>e.transitions.easing.easeInOut,dm.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,dm.child,dm.childLeaving,wm,550,({theme:e})=>e.transitions.easing.easeInOut,dm.childPulsate,_m,({theme:e})=>e.transitions.easing.easeInOut);var km=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=n,s=Object(ue.a)(n,hm),[c,u]=r.useState([]),l=r.useRef(0),d=r.useRef(null);r.useEffect(()=>{d.current&&(d.current(),d.current=null)},[c]);const h=r.useRef(!1),p=r.useRef(0),v=r.useRef(null),b=r.useRef(null);r.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=r.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;u(e=>[...e,Object(f.jsx)(jm,{classes:{ripple:Object(le.a)(o.ripple,dm.ripple),rippleVisible:Object(le.a)(o.rippleVisible,dm.rippleVisible),ripplePulsate:Object(le.a)(o.ripplePulsate,dm.ripplePulsate),child:Object(le.a)(o.child,dm.child),childLeaving:Object(le.a)(o.childLeaving,dm.childLeaving),childPulsate:Object(le.a)(o.childPulsate,dm.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},l.current)]),l.current+=1,d.current=a},[o]),g=r.useCallback((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const s=a?null:b.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let f,u,l;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(c.width/2),u=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;f=Math.round(t-c.left),u=Math.round(n-c.top)}if(o)l=Math.sqrt((2*c.width**2+c.height**2)/3),l%2==0&&(l+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-f),f)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;l=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===v.current&&(v.current=()=>{m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},p.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},80)):m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},[i,m]),y=r.useCallback(()=>{g({},{pulsate:!0})},[g]),w=r.useCallback((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&v.current)return v.current(),v.current=null,void(p.current=setTimeout(()=>{w(e,t)}));v.current=null,u(e=>e.length>0?e.slice(1):e),d.current=t},[]);return r.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:w}),[y,g,w]),Object(f.jsx)(xm,Object(fe.a)({className:Object(le.a)(dm.root,o.root,a),ref:b},s,{children:Object(f.jsx)(fm,{component:null,exit:!0,children:c})}))}));function Om(e){return Object(ke.a)("MuiButtonBase",e)}var Sm=Object(je.a)("MuiButtonBase",["root","disabled","focusVisible"]);const Em=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Cm=Object(we.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&."+Sm.disabled]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var Am=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:c="button",disabled:u=!1,disableRipple:l=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:v,onClick:b,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:w,onKeyDown:_,onKeyUp:x,onMouseDown:j,onMouseLeave:k,onMouseUp:O,onTouchEnd:S,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:P,touchRippleRef:M,type:R}=n,I=Object(ue.a)(n,Em),T=r.useRef(null),L=r.useRef(null),D=Object(Me.a)(L,M),{isFocusVisibleRef:B,onFocus:N,onBlur:U,ref:F}=Object(rm.a)(),[z,W]=r.useState(!1);u&&z&&W(!1),r.useImperativeHandle(i,()=>({focusVisible:()=>{W(!0),T.current.focus()}}),[]);const[V,H]=r.useState(!1);r.useEffect(()=>{H(!0)},[]);const Y=V&&!l&&!u;function G(e,t,n=d){return Object(nm.a)(r=>{t&&t(r);return!n&&L.current&&L.current[e](r),!0})}r.useEffect(()=>{z&&h&&!l&&V&&L.current.pulsate()},[l,h,z,V]);const q=G("start",j),X=G("stop",m),K=G("stop",g),Z=G("stop",O),$=G("stop",e=>{z&&e.preventDefault(),k&&k(e)}),Q=G("start",C),J=G("stop",S),ee=G("stop",E),te=G("stop",e=>{U(e),!1===B.current&&W(!1),v&&v(e)},!1),ne=Object(nm.a)(e=>{T.current||(T.current=e.currentTarget),N(e),!0===B.current&&(W(!0),w&&w(e)),y&&y(e)}),re=()=>{const e=T.current;return c&&"button"!==c&&!("A"===e.tagName&&e.href)},ie=r.useRef(!1),oe=Object(nm.a)(e=>{h&&!ie.current&&z&&L.current&&" "===e.key&&(ie.current=!0,L.current.stop(e,()=>{L.current.start(e)})),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),_&&_(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!u&&(e.preventDefault(),b&&b(e))}),ae=Object(nm.a)(e=>{h&&" "===e.key&&L.current&&z&&!e.defaultPrevented&&(ie.current=!1,L.current.stop(e,()=>{L.current.pulsate(e)})),x&&x(e),b&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&b(e)});let se=c;"button"===se&&(I.href||I.to)&&(se=p);const ce={};"button"===se?(ce.type=void 0===R?"button":R,ce.disabled=u):(I.href||I.to||(ce.role="button"),u&&(ce["aria-disabled"]=u));const he=Object(Me.a)(t,F,T);const pe=Object(fe.a)({},n,{centerRipple:o,component:c,disabled:u,disableRipple:l,disableTouchRipple:d,focusRipple:h,tabIndex:A,focusVisible:z}),ve=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=Object(de.a)(o,Om,i);return n&&r&&(a.root+=" "+r),a})(pe);return Object(f.jsxs)(Cm,Object(fe.a)({as:se,className:Object(le.a)(ve.root,s),ownerState:pe,onBlur:te,onClick:b,onContextMenu:X,onFocus:ne,onKeyDown:oe,onKeyUp:ae,onMouseDown:q,onMouseLeave:$,onMouseUp:Z,onDragLeave:K,onTouchEnd:J,onTouchMove:ee,onTouchStart:Q,ref:he,tabIndex:u?-1:A,type:R},ce,I,{children:[a,Y?Object(f.jsx)(km,Object(fe.a)({ref:D,center:o},P)):null]}))}));n(99);var Pm=Object(je.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var Mm=Object(je.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Rm(e){return Object(ke.a)("MuiListItemSecondaryAction",e)}Object(je.a)("MuiListItemSecondaryAction",["root","disableGutters"]);const Im=["className"],Tm=Object(we.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>Object(fe.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Lm=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=n,o=Object(ue.a)(n,Im),a=r.useContext(xe),s=Object(fe.a)({},n,{disableGutters:a.disableGutters}),c=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return Object(de.a)(r,Rm,n)})(s);return Object(f.jsx)(Tm,Object(fe.a)({className:Object(le.a)(c.root,i),ownerState:s,ref:t},o))}));Lm.muiName="ListItemSecondaryAction";Object(we.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Object(fe.a)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{["& > ."+Mm.root]:{paddingRight:48}},{["&."+Pm.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+Pm.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+Pm.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&."+Pm.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Object(we.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"});Object(we.a)(Am,{shouldForwardProp:e=>Object(we.b)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&."+Mm.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+Mm.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&."+Mm.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+Mm.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}));Object(je.a)("MuiListItemIcon",["root","alignItemsFlexStart"]);Object(we.a)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>Object(fe.a)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}));var Dm=n(31);function Bm(e){return Object(ke.a)("MuiTypography",e)}Object(je.a)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Nm=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Um=Object(we.a)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align"+Object(Dm.a)(n.align)],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>Object(fe.a)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Fm={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},zm={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Wm=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTypography"}),r=(e=>zm[e]||e)(n.color),i=Yb(Object(fe.a)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:c=!1,noWrap:u=!1,paragraph:l=!1,variant:d="body1",variantMapping:h=Fm}=i,p=Object(ue.a)(i,Nm),v=Object(fe.a)({},i,{align:o,color:r,className:a,component:s,gutterBottom:c,noWrap:u,paragraph:l,variant:d,variantMapping:h}),b=s||(l?"p":h[d]||Fm[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align"+Object(Dm.a)(t),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Object(de.a)(s,Bm,a)})(v);return Object(f.jsx)(Um,Object(fe.a)({as:b,ref:t,ownerState:v,className:Object(le.a)(m.root,a)},p))}));var Vm=Object(je.a)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);Object(we.a)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+Vm.primary]:t.primary},{["& ."+Vm.secondary]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>Object(fe.a)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}));n(139),n(140);let Hm;function Ym(){if(Hm)return Hm;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Hm="reverse",e.scrollLeft>0?Hm="default":(e.scrollLeft=1,0===e.scrollLeft&&(Hm="negative")),document.body.removeChild(e),Hm}function Gm(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Ym()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function qm(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Xm=["onChange"],Km={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Zm=Object(Rb.a)(Object(f.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),$m=Object(Rb.a)(Object(f.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Qm(e){return Object(ke.a)("MuiTabScrollButton",e)}var Jm=Object(je.a)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const eg=["className","slots","slotProps","direction","orientation","disabled"],tg=Object(we.a)(Am,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>Object(fe.a)({width:40,flexShrink:0,opacity:.8,["&."+Jm.disabled]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}));var ng=r.forwardRef((function(e,t){var n,r;const i=Object(_e.a)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:c}=i,u=Object(ue.a)(i,eg),l="rtl"===Je().direction,d=Object(fe.a)({isRtl:l},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return Object(de.a)(i,Qm,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Zm,v=null!=(r=a.EndScrollButtonIcon)?r:$m,b=ge({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=ge({elementType:v,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return Object(f.jsx)(tg,Object(fe.a)({component:"div",className:Object(le.a)(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},u,{children:"left"===c?Object(f.jsx)(p,Object(fe.a)({},b)):Object(f.jsx)(v,Object(fe.a)({},m))}))}));function rg(e){return Object(ke.a)("MuiTabs",e)}var ig=Object(je.a)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const og=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ag=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,sg=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,cg=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},fg=Object(we.a)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+ig.scrollButtons]:t.scrollButtons},{["& ."+ig.scrollButtons]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>Object(fe.a)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{["& ."+ig.scrollButtons]:{[t.breakpoints.down("sm")]:{display:"none"}}})),ug=Object(we.a)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>Object(fe.a)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),lg=Object(we.a)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>Object(fe.a)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),dg=Object(we.a)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>Object(fe.a)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),hg=Object(we.a)((function(e){const{onChange:t}=e,n=Object(ue.a)(e,Xm),i=r.useRef(),o=r.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return Object(Re.a)(()=>{const e=Object(Ue.a)(()=>{const e=i.current;a(),e!==i.current&&t(i.current)}),n=Object(Fe.a)(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),r.useEffect(()=>{a(),t(i.current)},[t]),Object(f.jsx)("div",Object(fe.a)({style:Km,ref:o},n))}),{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),pg={};var vg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTabs"}),i=Je(),o="rtl"===i.direction,{"aria-label":a,"aria-labelledby":s,action:c,centered:u=!1,children:l,className:d,component:h="div",allowScrollButtonsMobile:p=!1,indicatorColor:v="primary",onChange:b,orientation:m="horizontal",ScrollButtonComponent:g=ng,scrollButtons:y="auto",selectionFollowsFocus:w,slots:_={},slotProps:x={},TabIndicatorProps:j={},TabScrollButtonProps:k={},textColor:O="primary",value:S,variant:E="standard",visibleScrollbar:C=!1}=n,A=Object(ue.a)(n,og),P="scrollable"===E,M="vertical"===m,R=M?"scrollTop":"scrollLeft",I=M?"top":"left",T=M?"bottom":"right",L=M?"clientHeight":"clientWidth",D=M?"height":"width",B=Object(fe.a)({},n,{component:h,allowScrollButtonsMobile:p,indicatorColor:v,orientation:m,vertical:M,scrollButtons:y,textColor:O,variant:E,visibleScrollbar:C,fixed:!P,hideScrollbar:P&&!C,scrollableX:P&&!M,scrollableY:P&&M,centered:u&&!P,scrollButtonsHideMobile:!p}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:c}=e,f={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return Object(de.a)(f,rg,c)})(B),U=ge({elementType:_.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:B}),F=ge({elementType:_.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:B});const[z,W]=r.useState(!1),[V,H]=r.useState(pg),[Y,G]=r.useState(!1),[q,X]=r.useState(!1),[K,Z]=r.useState(!1),[$,Q]=r.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,ee=r.useRef(null),te=r.useRef(null),ne=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Gm(e,i.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==S){const e=te.current.children;if(e.length>0){const t=e[J.get(S)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=Object(nm.a)(()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;if(M)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[D]:t?t[D]:0};if(isNaN(V[n])||isNaN(V[D]))H(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[D]-i[D]);(e>=1||t>=1)&&H(i)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=(()=>{})){const{ease:o=qm,duration:a=300}=r;let s=null;const c=t[e];let f=!1;const u=()=>{f=!0},l=r=>{if(f)return void i(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=o(u)*(n-c)+c,u>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(l)};c===n?i(new Error("Element already at target position")):requestAnimationFrame(l)}(R,ee.current,e,{duration:i.transitions.duration.standard}):ee.current[R]=e},oe=e=>{let t=ee.current[R];M?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Ym()?-1:1),ie(t)},ae=()=>{const e=ee.current[L];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[L]>e){0===r&&(t=e);break}t+=i[L]}return t},se=()=>{oe(-1*ae())},ce=()=>{oe(ae())},he=r.useCallback(e=>{Q({overflow:null,scrollbarWidth:e})},[]),pe=Object(nm.a)(e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[I]<t[I]){const r=t[R]+(n[I]-t[I]);ie(r,{animation:e})}else if(n[T]>t[T]){const r=t[R]+(n[T]-t[T]);ie(r,{animation:e})}}),ve=Object(nm.a)(()=>{P&&!1!==y&&Z(!K)});r.useEffect(()=>{const e=Object(Ue.a)(()=>{ee.current&&re()}),t=Object(Fe.a)(ee.current);let n;return t.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e),Array.from(te.current.children).forEach(e=>{n.observe(e)})),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}},[re]),r.useEffect(()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&P&&!1!==y){const n=e[0],r=e[t-1],i={root:ee.current,threshold:.99},o=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[P,y,K,null==l?void 0:l.length]),r.useEffect(()=>{W(!0)},[]),r.useEffect(()=>{re()}),r.useEffect(()=>{pe(pg!==V)},[pe,V]),r.useImperativeHandle(c,()=>({updateIndicator:re,updateScrollButtons:ve}),[re,ve]);const be=Object(f.jsx)(dg,Object(fe.a)({},j,{className:Object(le.a)(N.indicator,j.className),ownerState:B,style:Object(fe.a)({},V,j.style)}));let me=0;const we=r.Children.map(l,e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?me:e.props.value;J.set(t,me);const n=t===S;return me+=1,r.cloneElement(e,Object(fe.a)({fullWidth:"fullWidth"===E,indicator:n&&!z&&be,selected:n,selectionFollowsFocus:w,onChange:b,textColor:O,value:t},1!==me||!1!==S||e.props.tabIndex?{}:{tabIndex:0}))}),xe=(()=>{const e={};e.scrollbarSizeListener=P?Object(f.jsx)(hg,{onChange:he,className:Object(le.a)(N.scrollableX,N.hideScrollbar)}):null;const t=P&&("auto"===y&&(Y||q)||!0===y);return e.scrollButtonStart=t?Object(f.jsx)(g,Object(fe.a)({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:U},orientation:m,direction:o?"right":"left",onClick:se,disabled:!Y},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e.scrollButtonEnd=t?Object(f.jsx)(g,Object(fe.a)({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:m,direction:o?"left":"right",onClick:ce,disabled:!q},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e})();return Object(f.jsxs)(fg,Object(fe.a)({className:Object(le.a)(N.root,d),ownerState:B,ref:t,as:h},A,{children:[xe.scrollButtonStart,xe.scrollbarSizeListener,Object(f.jsxs)(ug,{className:N.scroller,ownerState:B,style:{overflow:$.overflow,[M?"margin"+(o?"Left":"Right"):"marginBottom"]:C?void 0:-$.scrollbarWidth},ref:ee,children:[Object(f.jsx)(lg,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:B,onKeyDown:e=>{const t=te.current,n=Object(ye.a)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),cg(t,n,sg);break;case i:e.preventDefault(),cg(t,n,ag);break;case"Home":e.preventDefault(),cg(t,null,ag);break;case"End":e.preventDefault(),cg(t,null,sg)}},ref:te,role:"tablist",children:we}),z&&be]}),xe.scrollButtonEnd]}))}));function bg(e){return Object(ke.a)("MuiTab",e)}var mg=Object(je.a)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const gg=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],yg=Object(we.a)(Am,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor"+Object(Dm.a)(n.textColor)],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>Object(fe.a)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > ."+mg.iconWrapper]:Object(fe.a)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,["&."+mg.selected]:{opacity:1},["&."+mg.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+mg.selected]:{color:(e.vars||e).palette.primary.main},["&."+mg.disabled]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+mg.selected]:{color:(e.vars||e).palette.secondary.main},["&."+mg.disabled]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}));var wg,_g,xg,jg,kg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:s,icon:c,iconPosition:u="top",indicator:l,label:d,onChange:h,onClick:p,onFocus:v,selected:b,selectionFollowsFocus:m,textColor:g="inherit",value:y,wrapped:w=!1}=n,_=Object(ue.a)(n,gg),x=Object(fe.a)({},n,{disabled:o,disableFocusRipple:a,selected:b,icon:!!c,iconPosition:u,label:!!d,fullWidth:s,textColor:g,wrapped:w}),j=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:c}=e,f={root:["root",o&&a&&"labelIcon","textColor"+Object(Dm.a)(n),r&&"fullWidth",i&&"wrapped",s&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Object(de.a)(f,bg,t)})(x),k=c&&d&&r.isValidElement(c)?r.cloneElement(c,{className:Object(le.a)(j.iconWrapper,c.props.className)}):c;return Object(f.jsxs)(yg,Object(fe.a)({focusRipple:!a,className:Object(le.a)(j.root,i),ref:t,role:"tab","aria-selected":b,disabled:o,onClick:e=>{!b&&h&&h(e,y),p&&p(e)},onFocus:e=>{m&&!b&&h&&h(e,y),v&&v(e)},ownerState:x,tabIndex:b?0:-1},_,{children:["top"===u||"start"===u?Object(f.jsxs)(r.Fragment,{children:[k,d]}):Object(f.jsxs)(r.Fragment,{children:[d,k]}),l]}))}));function Og(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Sg=Q.b.div(wg||(wg=Og(["\n display: flex;\n padding: 0px 30px;\n overflow: scroll;\n ::-webkit-scrollbar {\n display: none;\n } \n -ms-overflow-style: none;\n scrollbar-width: none; \n"]))),Eg=Q.b.div(_g||(_g=Og(["\n height: 100px;\n width: 100px;\n margin: 4px;\n"]))),Cg=Q.b.div(xg||(xg=Og(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 100px;\n width: 100px;\n padding: 5px;\n backgroundrepeat: no-repeat;\n backgroundsize: cover;\n object-fit: cover;\n }\n"]))),Ag=Q.b.div(jg||(jg=Og(["\n height: 100px;\n width: 100px;\n background-image: linear-gradient( rgba(0,0,0,0) 70%, rgba(0,0,0,0.6) 100% );\n border-radius: 10px;\n padding: 5px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 90px; !important;\n border-radius: 10px;\n }\n .video_player{\n width: 90px;\n height: 100%;\n z-index: -1;\n }\n \n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n \n"])));var Pg,Mg,Rg,Ig,Tg,Lg,Dg=function(e){var t,n=e.conversationId,r=e.message,i=e.setTotalMediaFiles,o=(e.totalMediaFiles,null==r||null===(t=r.messages[n])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0}))),s=null==o?void 0:o.filter((function(e){var t,n;return Object(a.y)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.z)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)}));return i(s.length),Object(f.jsx)(Sg,{children:null==s?void 0:s.map((function(e){var t,n,r,i,o=null==e||null===(t=e.attachments[0])||void 0===t?void 0:t.extension;return Object(a.y)(o)?Object(f.jsx)(Eg,{children:Object(f.jsx)(Cg,{children:Object(f.jsx)($,{className:"media-images",src:null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl})})},null==e?void 0:e.id):Object(a.z)(o)?Object(f.jsx)(Eg,{children:Object(f.jsx)(Cg,{children:Object(f.jsx)(Ag,{children:Object(f.jsx)(Kd,{className:"custom_video_player",videoLink:null===(r=e.attachments[0])||void 0===r?void 0:r.mediaUrl,thumbUrl:null===(i=e.attachments[0])||void 0===i?void 0:i.thumbnailUrl})})})},null==e?void 0:e.id):void 0}))})},Bg="https://chatstorage.isometrik.io/chat-assets/images/watsappbg.png",Ng="https://chatstorage.isometrik.io/chat-assets/images/drkbg.jpg",Ug="https://chatstorage.isometrik.io/chat-assets/icons/right-arrow.svg";function Fg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Vg=Q.b.div(Pg||(Pg=Wg(["\n display: flex;\n box-sizing: border-box;\n flex-wrap: wrap;\n justify-content: flex-start;\n cursor: pointer;\n margin-right: 1rem;\n"]))),Hg=Q.b.div(Mg||(Mg=Wg(["\n height: 112px;\n width: 112px;\n margin: 4px 4px 10px;\n display: flex;\n"]))),Yg=Q.b.div(Rg||(Rg=Wg(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 112px;\n width: 112px;\n padding: 10px;\n background-repeat: no-repeat;\n object-fit: cover;\n }\n"]))),Gg=Q.b.div(Ig||(Ig=Wg(["\n display: flex;\n overflow: scroll;\n flex-wrap: wrap;\n padding-top: 1rem;\n"]))),qg=Q.b.div(Tg||(Tg=Wg(["\n display: flex;\n width: 100%;\n height: 80vh;\n\n .no_media{\n margin: auto;\n }\n"]))),Xg=Q.b.div(Lg||(Lg=Wg(["\n height: 110px;\n width: 110px;\n border-radius: 10px;\n padding: 8px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 95px !important;\n }\n .play_icon{\n left: 40%;\n top: 40%;\n }\n .video_player{\n width: 95px;\n height: 100%;\n z-index: -1;\n }\n\n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n"])));var Kg,Zg,$g,Qg,Jg=function(e){var t=e.handleImgVidClick,n=e.filteredData;return Object(f.jsx)(f.Fragment,{children:(null==n?void 0:n.length)>0?Object.entries(function(e){var t={};return null==e||e.forEach((function(e){var n,r,i,o=Object(a.u)(e.sentAt);t.hasOwnProperty(o)||(t[o]=[]),"document"!==(null==e?void 0:e.customType)&&t[o].push({timeStamp:null==e?void 0:e.sentAt,mediaUrl:null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl,extension:null==e||null===(r=e.attachments[0])||void 0===r?void 0:r.extension,mediaId:null==e||null===(i=e.attachments[0])||void 0===i?void 0:i.mediaId})})),t}(n)).map((function(e){var n=Fg(e,2),r=n[0],i=n[1];return Object(f.jsxs)(f.Fragment,{children:[(null==i?void 0:i.length)>0&&Object(f.jsx)("span",{className:"letter",id:"".concat(r.toUpperCase()),children:r}),Object(f.jsx)(Gg,{children:(null==i?void 0:i.length)>0?i.map((function(e){var n=e.extension;return Object(a.y)(n)?Object(f.jsx)(Vg,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Hg,{children:Object(f.jsx)(Yg,{children:Object(f.jsx)($,{className:"media-images",src:null==e?void 0:e.mediaUrl})})})}):Object(a.z)(n)?Object(f.jsx)(Vg,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Hg,{children:Object(f.jsx)(Yg,{children:Object(f.jsx)(Xg,{children:Object(f.jsx)(Kd,{className:"custom_video_player",videoLink:e.mediaUrl,thumbUrl:e.thumbnailUrl})})})})}):Object(f.jsx)("p",{children:"Unsupported media format"})})):Object(f.jsx)(qg,{children:Object(f.jsx)("p",{className:"no_media",children:"No media"})})})]})})):Object(f.jsx)(qg,{children:Object(f.jsx)("p",{children:"No media"})})})};function ey(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ty(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ty(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ty(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ny(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ry=Q.b.div(Kg||(Kg=ny(["\n position: relative;\n flex-wrap: wrap;\n"]))),iy=Q.b.p(Zg||(Zg=ny(["\n color: var(--black);\n"]))),oy=Q.b.div($g||($g=ny([" \n margin: 0.25rem 0;\n padding: 0.5rem;\n width: fit-content;\n border-bottom-right-radius: 7.5px;\n border-bottom-left-radius: 7.5px;\n --tw-bg-opacity: 1;\n background-color: ",";\n position: relative;\n"])),(function(e){return e.selfChat?"var(--sender_chatbg)":"var(--toast-background)"})),ay=Q.b.div(Qg||(Qg=ny(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 80vh; \n"]))),sy=function(e){var t,n=e.mediaDocs,i=Object(o.b)("isometrikUserId"),a=ey(Object(r.useState)(),2),s=a[0],c=a[1];return Object(f.jsx)(ry,{children:(null==n||null===(t=n.filter((function(e){return"document"===(null==e?void 0:e.customType)})))||void 0===t?void 0:t.length)>0?n.filter((function(e){return"document"===(null==e?void 0:e.customType)})).map((function(e){var t;return Object(f.jsx)(oy,{selfChat:i===(null==e||null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||i===(null==e?void 0:e.senderId),children:Object(f.jsx)(Pd,{isNotShowDropDown:!0,chat:e,messageLength:s,setmessageLength:c})})})):Object(f.jsx)(ay,{children:Object(f.jsx)(iy,{children:"No Docs"})})})};function cy(e){return(cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fy,uy,ly,dy,hy,py,vy,by,my,gy,yy,wy=["children","value","index"];function _y(e){return function(e){if(Array.isArray(e))return ky(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jy(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||jy(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jy(e,t){if(e){if("string"==typeof e)return ky(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ky(e,t):void 0}}function ky(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oy(Object(n),!0).forEach((function(t){Ey(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ey(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==cy(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==cy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===cy(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ay(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Py=Q.b.div(fy||(fy=Ay(["\n margin: 20px;\n max-width: auto%;\n border-radius: 7.5px;\n --wt-bg-opacity: 1;\n padding: 0.2rem 0.4rem;\n background-color: var(--sender_chatbg);\n // word-break: break-word;\n text-align: end;\n width: fit-content;\n"]))),My=Q.b.div(uy||(uy=Ay(["\n max-height: 10rem;\n overflow: scroll;\n color: var(--black);\n"]))),Ry=Q.b.div(ly||(ly=Ay(["\n padding: 20px 40px;\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n color: var(--black);\n"]))),Iy=Q.b.div(dy||(dy=Ay(["\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n padding: 20px 40px;\n color: var(--black);\n"]))),Ty=Q.b.div(hy||(hy=Ay(["\n background-color: var(--primary-white);\n"]))),Ly=Q.b.div(py||(py=Ay(["\n position: relative;\n padding: 0 1rem;\n"]))),Dy=Q.b.p(vy||(vy=Ay(["\n font-size: 16px;\n font-weight: 500;\n color: var(--profile-color);\n margin-bottom: 0;\n cursor: pointer;\n"]))),By=Q.b.h5(by||(by=Ay(["\n color: var(--chat-msg-text);\n font-size: 14px;\n margin-top: 1rem;\n margin-bottom: 0;\n text-align: ",";\n padding: ",";\n"])),(function(e){return e.textCenter?"center":"left"}),(function(e){return e.customPadding?"2rem 0":""})),Ny=Q.b.div(my||(my=Ay(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n"])));Q.b.div(gy||(gy=Ay(["\n width:30vw;\n","\n"])),Cn(Object(Q.a)(yy||(yy=Ay(["\n width:100vw;\n"])))));function Uy(e){var t=e.children,n=e.value,r=e.index,i=Cy(e,wy);return Object(f.jsx)("div",Sy(Sy({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&Object(f.jsx)(Zb,{sx:{p:3},children:Object(f.jsx)(Wm,{children:t})})}))}function Fy(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}Uy.propTypes={children:D.a.node,index:D.a.number.isRequired,value:D.a.number.isRequired};var zy=function(e){var t,n,s,c,u,l,d,h,p,v,b,m,g,y,w,_,x,j,k=e.sidebarChatItem,E=e.setShowProfilePicture,C=e.setSearchedMessageArray,A=e.setDeleteChatModal,P=e.setUserBlockModal,M=e.userConversationDetail,R=e.theme,I=e.Messages,T=e.messageInfo,L=e.conversationId,D=e.messageChat,B=(e.mediaDocs,e.debounceSearchMessages),U=e.searchedMessageArray,F=e.searchMessageLoaderStatus,z=e.handleClosee,W=e.handler,V=(e.setMed,e.handleImgVidClick),H=e.enteredSearchQuery,Y=e.getPaginationMessagesData,G=e.setSearchShow,q=O(),X=q.baseImageUrl,K=q.manageProfile,Z=q.onViewProfilleClick,Q=q.dateFormat,J=q.renderChatMediaContainer,ee=q.mediaSidebarOutSideClick,te=q.state,ne=q.isSearchLoading,re=q.setIsSearchLoading,ie=q.s3ImageLinkGen,oe=xy(i.a.useState({top:!1,left:!1,bottom:!1,right:!1}),2),ae=oe[0],se=oe[1],ce=xy(i.a.useState(0),2),fe=ce[0],ue=ce[1],le=xy(Object(r.useState)(),2),de=le[0],he=le[1],pe=xy(Object(r.useState)(),2),ve=pe[0],be=pe[1],me=xy(Object(r.useState)(),2),ge=me[0],ye=me[1],we=Object(o.b)("isometrikUserId"),_e=Object(r.useRef)(null);Object(r.useEffect)((function(){e.searchShow&&document.getElementById("searchBar").focus()}),[null==e?void 0:e.searchShow]),Object(r.useEffect)((function(){if(D){var e={conversationId:L,messageId:null==D?void 0:D.messageId,limit:20,skip:0};Object(S.default)().message.getStatusDelivery(e).then((function(e){var t,n,r=Object(a.v)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));ye(r),ye((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error message ",e)})),Object(S.default)().message.getStatusRead(e).then((function(e){var t,n,r=Object(a.v)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));be(r),ye((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error while fetching message status",e)}))}}),[D]);var xe=function(e,t){return function(n){("keydown"!==n.type||"Tab"!==n.key&&"Shift"!==n.key)&&se(Sy(Sy({},ae),{},Ey({},e,t)))}},je=function(){z(),W()},ke=null==I||null===(t=I.messages[L])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0})),Oe=null==ke?void 0:ke.filter((function(e){var t,n;return Object(a.y)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.z)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)})),Se=function(e,t,n){G(!1);var r=document.getElementById("message_".concat(e)),i=e;if(_e.current=e,r){re(!1),_e.current=null,document.getElementById("allMessages").scroll(0,r.offsetTop-120);var o=document.querySelector(".isoChat .activeMsg");o&&o.classList.remove("activeMsg"),setTimeout((function(){r.classList.add("activeMsg")}),100)}else(function(e,t){return-1!==(t?_y(t):null!=te&&te.messages[L]?_y(null==te?void 0:te.messages[L]):[]).findIndex((function(t){return t.messageId===e}))})(i,n)||(re(!0),Y((function(e,t){null==e||e.length}),t))};return Object(r.useEffect)((function(){ne&&_e.current&&requestAnimationFrame((function(){Se(_e.current)}))}),[ne,te]),Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.slideShow||null!=e&&e.searchShow||T?Object(f.jsx)(N,{onClose:ee?function(e){return ee(e,je)}:je,children:ae.right||!K&&null!=e&&e.slideShow?Object(f.jsxs)("div",{className:"media_header mediaFiles",children:[Object(f.jsxs)("div",{className:"topHeader",children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header d-flex p-3":"contact_header d-flex p-3",children:[Object(f.jsx)($,{onClick:function(e){K?(xe("right",!1)(e),e.stopPropagation()):je()},src:wr,className:"closeIcon ".concat(null!=e&&e.theme?"darkicons":"lighticons")}),Object(f.jsx)("p",{className:"contactTitle ml-3",children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center p-2 topProfile",onClick:function(e){return Z?Z(null==k?void 0:k.opponentDetails,M):function(){return!0}},style:{cursor:"pointer"},children:[Object(f.jsx)("div",{className:"d-flex justify-content-between align-items-center",children:Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center ml-2",children:[Object(f.jsx)("div",{style:{cursor:"pointer"},children:Object(f.jsx)(Ub,{className:"profile_img mr-2",src:X?ie(X,null==k||null===(n=k.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,80,320,320):null==k||null===(s=k.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic})}),Object(f.jsxs)("div",{children:[null!=k&&null!==(c=k.opponentDetails)&&void 0!==c&&null!==(c=c.metaData)&&void 0!==c&&c.firstName?Object(f.jsx)("p",{className:"fullname m-0",children:(null==k||null===(u=k.opponentDetails)||void 0===u?void 0:u.metaData.firstName)+" "+(null==k||null===(l=k.opponentDetails)||void 0===l?void 0:l.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"username m-0",style:{cursor:"pointer"},children:["@",null==k||null===(d=k.opponentDetails)||void 0===d?void 0:d.userName]})]})]})}),Object(f.jsx)("div",{className:"viewProfile",children:Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:Ug,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})})]})]}),J?J({conversation:M,messages:I}):Object(f.jsx)("div",{className:"bg-white ss",children:Object(f.jsxs)(Zb,{sx:{width:"100%",marginTop:"20px"},children:[Object(f.jsx)(Zb,{sx:{borderBottom:1,borderColor:"divider"},children:Object(f.jsxs)(vg,{value:fe,onChange:function(e,t){ue(t)},"aria-label":"basic tabs example",sx:{width:"100%"},children:[Object(f.jsx)(kg,Sy({label:"Media"},Fy(0))),Object(f.jsx)(kg,Sy({label:"Docs"},Fy(1)))]})}),Object(f.jsx)(Uy,{value:fe,index:0,children:Object(f.jsx)(Jg,{handleImgVidClick:V,filteredData:Oe})}),Object(f.jsx)(Uy,{value:fe,index:1,children:Object(f.jsx)(sy,{mediaDocs:Oe})}),Object(f.jsx)(Uy,{value:fe,index:2,children:"No Link Items"})]})})]}):Object(f.jsxs)("div",{className:"contact_container d-flex flex-column",style:{overflow:"hidden"},children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header":"contact_header",children:[Object(f.jsx)($,{onClick:je,src:wr,className:null!=e&&e.theme?"darkicons":"lighticons"}),Object(f.jsx)("p",{children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),null!=e&&e.slideShow?Object(f.jsxs)("div",{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"showMe":"",children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(Ub,{className:"profile_image",src:X?ie(X,null==k||null===(h=k.opponentDetails)||void 0===h||null===(h=h.metaData)||void 0===h?void 0:h.profilePic,80,320,320):null==k||null===(p=k.opponentDetails)||void 0===p||null===(p=p.metaData)||void 0===p?void 0:p.profilePic,onClick:function(){return function(t){var n,r,i;E({showProfile:!0,userName:null==t||null===(n=t.opponentDetails)||void 0===n?void 0:n.userName,userImageSrc:X?ie(X,null==t||null===(r=t.opponentDetails)||void 0===r||null===(r=r.metaData)||void 0===r?void 0:r.profilePic,80,480,480):null==t||null===(i=t.opponentDetails)||void 0===i||null===(i=i.metaData)||void 0===i?void 0:i.profilePic,theme:null==e?void 0:e.theme})}(k)}})}),Object(f.jsx)("div",{className:"contact_name",children:Object(f.jsxs)("div",{children:[null!=k&&null!==(v=k.opponentDetails)&&void 0!==v&&null!==(v=v.metaData)&&void 0!==v&&v.firstName?Object(f.jsx)("p",{className:"fullname",children:(null==k||null===(b=k.opponentDetails)||void 0===b?void 0:b.metaData.firstName)+" "+(null==k||null===(m=k.opponentDetails)||void 0===m?void 0:m.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"text_Color d-flex justify-content-center username",children:["@",null==k||null===(g=k.opponentDetails)||void 0===g?void 0:g.userName]})]})}),Object(f.jsx)("div",{className:"viewProfile text-center",onClick:function(){return Z?Z(null==k?void 0:k.opponentDetails,M):function(){return!0}},children:"View Profile"})]}),Object(f.jsxs)("div",{children:[["right"].map((function(t){return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"contactsocialInfo showMe msgFont text_Color pointer":"contactsocialInfo pointer",onClick:xe(t,!0),children:[Object(f.jsx)("span",{children:"Media And docs - "}),Object(f.jsx)("div",{children:Object(f.jsxs)("span",{"data-testid":"chevron-right-alt","data-icon":"chevron-right-alt",class:"aft2yglh pointer",children:[Object(f.jsx)("span",{style:{marginRight:"10px"},children:null==Oe?void 0:Oe.length}),Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:Ug,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})]})})]}),Object(f.jsx)("div",{children:Object(f.jsx)(Dg,{message:I,conversationId:L,setTotalMediaFiles:he,totalMediaFiles:de})})]},t)})),K?Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"text textt showMe":"text textt",children:[Object(f.jsxs)("p",{className:"pointer",onClick:function(){return P(!0)},children:[Object(f.jsx)($,{src:"https://chatstorage.isometrik.io/chat-assets/icons/block.svg",className:"icons svgg ".concat(null!=M&&M.messagingDisabled?"user_unblock":"")}),Object(f.jsxs)("span",{className:"".concat(null!=M&&M.messagingDisabled?"user_unblock":""," pointer btnn"),children:[null!=M&&M.messagingDisabled?"Unblock":"Block"," ",null==M||null===(y=M.opponentDetails)||void 0===y?void 0:y.userName]})]}),Object(f.jsxs)("p",{onClick:function(){return A(!0)},className:"pointer pb-4",children:[Object(f.jsx)($,{src:mp,className:"icons"}),Object(f.jsx)("span",{className:"pointer btnn",children:"Delete Chat "})]})]}):""]})]}):"",null!=e&&e.searchShow?Object(f.jsx)("div",{className:"contact_container",style:{height:"100%"},children:Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(Pr,{setSearchedMessageArray:C,userSearchEnteredData:B,searchShow:null==e?void 0:e.searchShow,theme:R})}),Object(f.jsx)(Ly,{children:F?Object(f.jsx)(By,{textCenter:!0,customPadding:!0,children:"Looking for messages....."}):(null==U?void 0:U.length)>0?U.map((function(e){var t,n;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(By,{children:Object(a.t)(null==e?void 0:e.sentAt,Q)}),Object(f.jsxs)(Ny,{children:[((null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||(null==e?void 0:e.senderId))===we&&Object(f.jsx)(gl,{style:{marginLeft:"2px"},id:"singleTick"}),Object(f.jsx)(Dy,{onClick:function(){Se(e.messageId)},children:null===(n=Object(a.h)(null==e?void 0:e.body))||void 0===n?void 0:n.replace(/<br \/>/g," ")},e.messageId)]})]})})):(null==H?void 0:H.length)>0?Object(f.jsx)(By,{textCenter:!0,customPadding:!0,children:"No messages found"}):Object(f.jsx)("div",{className:"bg-white",children:Object(f.jsxs)("p",{className:"text_Color text-align-center searchmsg text-center",children:["Search for message with ",null==k||null===(w=k.opponentDetails)||void 0===w?void 0:w.userName," "]})})})]})}):"",T?Object(f.jsxs)("div",{className:"contact_container",style:{marginTop:"66px",backgroundColor:"var(--gray_color)"},children:[Object(f.jsx)(My,{style:{background:"url(".concat(null!=e&&e.theme?Ng:Bg,")"),backgroundRepeat:"no-repeat",backgroundSize:"cover"},className:"messageInfoBody",children:Object(f.jsx)(Py,{children:null!=D&&D.attachments&&0===(null==D||null===(_=D.attachments)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.attachmentType)&&(null==D||null===(x=D.attachments)||void 0===x||null===(x=x[0])||void 0===x?void 0:x.mediaUrl.length)>0?Object(f.jsx)($,{style:{width:"21rem",height:"11rem"},src:null==D||null===(j=D.attachments[0])||void 0===j?void 0:j.mediaUrl}):Object(a.h)(null==D?void 0:D.body).replace(/<br \/>/g," ")})}),Object(f.jsxs)(Ty,{children:[Object(f.jsxs)(Ry,{children:[Object(f.jsx)("span",{children:"Read"}),Object(f.jsx)("span",{children:ve||"-"})]}),Object(f.jsxs)(Iy,{children:[Object(f.jsx)("span",{children:"Delivered "}),Object(f.jsx)("span",{children:ge?ve:"-"})]})," "]})]}):""]})}):"",Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .contact_container {\n max-width: 100vw;\n z-index: 3\n }\n }\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .media_Container{\n width: 70vw;\n }\n }\n \n "})]})};function Wy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Hy,Yy,Gy,qy,Xy,Ky,Zy,$y,Qy,Jy,ew,tw,nw,rw=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(r.useState)(!0),o=Wy(i,2),a=o[0],s=o[1],c=Object(r.useRef)();Object(r.useEffect)((function(){c.current=e}),[e]);var f=Object(r.useCallback)((function(){a&&(s(!1),c.current.apply(c,arguments),n?s(!0):setTimeout((function(){return s(!0)}),t))}),[t,n,a,c]);return f};function iw(e){return(iw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ow(e){return function(e){if(Array.isArray(e))return pw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aw(Object(n),!0).forEach((function(t){cw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==iw(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==iw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===iw(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */fw=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==iw(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(iw(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function uw(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function lw(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){uw(o,r,i,a,s,"next",e)}function s(e){uw(o,r,i,a,s,"throw",e)}a(void 0)}))}}function dw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||hw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hw(e,t){if(e){if("string"==typeof e)return pw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pw(e,t):void 0}}function pw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bw=Q.b.div(Hy||(Hy=vw(["\n padding: 28px;\n background-color: var(--intro-background);\n position: absolute;\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n width: 70vw;\n height: 100%;\n flex-direction: column;\n ","\n"])),Cn(Object(Q.a)(Yy||(Yy=vw(["\n display: none;\n "]))))),mw=Q.b.div(Gy||(Gy=vw(["\n position: absolute;\n background: var(--modal_color);\n color: var(--black);\n top: 45px;\n right: 20px;\n z-index: 999;\n padding: 1rem 0;\n display: flex;\n justify-content: center;\n align-items: center;\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n width: 230px;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(qy||(qy=vw(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),gw=(Q.b.div(Xy||(Xy=vw(["\n background-color: var(--modal_color);\n position: absolute;\n top: 45px;\n right: 20px;\n z-index: 999;\n width: 230px;\n color: var(--black);\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n padding: 1rem 0;\n\n ","\n\n ","\n"])),(function(e){return e.isMenu&&Object(Q.a)(Ky||(Ky=vw(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))}),Cn(Object(Q.a)(Zy||(Zy=vw(["\n top: 50px;\n left: 150px;\n "]))))),Q.b.ul($y||($y=vw(["\n background: var(--modal_color);\n color: var(--black);\n box-shadow: -3px 0px 4px rgba(194, 194, 194, 0.25);\n border-radius: 4px;\n padding: 1rem 0;\n position: absolute;\n top: 8px;\n right: 0px;\n width: 180px;\n opacity: 0;\n cursor: pointer;\n visibility: hidden;\n transform: translateY(-10px);\n transform-origin: left top;\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n z-index: 999;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(Qy||(Qy=vw(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),Q.b.li(Jy||(Jy=vw(["\n padding: 0 2rem;\n margin: 0;\n line-height: 2.5rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14.5px;\n color: var(--primary);\n padding-right: 58px !important;\n"]))),function(e,t){var n=[{id:1,header:"Contact info"},{id:6,header:"Clear chat"},{id:7,header:"Delete chat"},{id:9,header:e?"Unblock":"Block"}];if(!t&&e){var r=n.findIndex((function(e){return 9===e.id}));-1!==r&&n.splice(r,1)}return n}),yw=Q.b.div(ew||(ew=vw(["\n","\n","\n"])),(function(e){e.maxHeight;return"height: 100vh;\nposition: relative;\n"}),Cn(Object(Q.a)(tw||(tw=vw(["\nheight: ",";"])),(function(e){var t=e.maxHeight;return"calc(100vh - ".concat(t,"px)")})))),ww=Q.b.div(nw||(nw=vw(["\n color: var(--black);\n visibility: visible;\n user-select: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n align-items: flex-start;\n font-size: 0.8125rem;\n line-height: 1.5385;\n min-height: 20px;\n"])));var _w,xw,jw,kw,Ow,Sw,Ew,Cw,Aw,Pw=function(e){var t,n,s,c,u,l,d,h=e.sidebarChatItem,p=(e.setSidebarChatItem,e.showSearchIcon),v=e.state,b=e.setState,m=e.setIsSidebarShow,g=e.preventMessageRef,y=e.getPaginationMessagesData,w=e.isSidebarShow,_=e.setShowProfilePicture,x=e.findUserId,j=e.setUserBlockModal,k=e.setClearChatModal,E=e.setDeleteChatModal,C=e.setslideShow,A=e.slideShow,P=e.setSearchShow,M=e.searchShow,R=e.setUserConversationDetail,I=e.userConversationDetail,L=e.setMessageInfo,D=e.messageInfo,B=e.debounceSearchMessages,U=e.enteredSearchQuery,F=e.searchedMessageArray,z=e.setSearchedMessageArray,W=e.searchMessageLoaderStatus,V=e.setMediaDocs,H=e.mediaDocs,G=e.sidebarData,q=e.userDetails,X=e.isPreviousMessageLoad,K=e.onChatChange,Z=e.placeHolder,Q=e.chatHeaderRightSlot,J=e.chatHeaderMoreMenu,ee=e.customSend,te=e.handleCustomSend,ne=void 0===te?function(){}:te,re=e.extraAttachmentOptions,ie=e.attachMentPosition,oe=e.ChatFooterRightSlot,ae=e.customSendOptions,se=e.RenderCustomSendOptions,ce=e.renderSelfMoremenu,fe=e.allowProfileClick,ue=e.renderProfileBadge,le=e.hasMessages,de=e.setHasMessages,he=Object(r.useRef)(),pe=dw(Object(r.useState)(!1),2),ve=(pe[0],pe[1]),be=dw(i.a.useState(null),2),me=be[0],ge=(be[1],dw(Object(r.useState)(!1),2)),ye=(ge[0],ge[1],dw(Object(r.useState)(!1),2)),we=ye[0],_e=ye[1],xe=dw(Object(r.useState)(!1),2),je=xe[0],ke=xe[1],Oe=dw(Object(r.useState)(""),2),Se=Oe[0],Ee=Oe[1],Ce=dw(Object(r.useState)(""),2),Ae=Ce[0],Pe=Ce[1],Me=dw(Object(r.useState)(""),2),Re=Me[0],Ie=Me[1],Te=dw(Object(r.useState)([]),2),Le=Te[0],De=Te[1],Be=dw(Object(r.useState)([]),2),Ne=Be[0],Ue=Be[1],Fe=dw(Object(r.useState)(0),2),ze=Fe[0],We=Fe[1],Ve=Object(r.useRef)(0),He=Object(r.useRef)(null),Ye=dw(Object(r.useState)(),2),Ge=Ye[0],qe=Ye[1],Xe=dw(Object(r.useState)({open:!1,message:"",variant:""}),2),Ke=Xe[0],Ze=Xe[1],$e=(Boolean(me),dw(Object(r.useState)(!1),2)),Qe=$e[0],Je=$e[1],et=dw(Object(r.useState)(!1),2),tt=et[0],nt=et[1],rt=O(),it=rt.theme,ot=(rt.manageProfile,rt.baseImageUrl),at=rt.showStatusMessages,st=rt.renderCustomChatMessageHeader,ct=rt.isGroup,ft=rt.s3ImageLinkGen,ut=function(){var e=lw(fw().mark((function e(){var t,n,r,i,a,s;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"userBlockConversation"!==(null==I||null===(t=I.lastMessageDetails)||void 0===t?void 0:t.action)||(null==I||null===(n=I.lastMessageDetails)||void 0===n?void 0:n.initiatorId)!==Object(o.b)("isometrikUserId")){e.next=6;break}return nt(!0),e.abrupt("return");case 6:nt(!1);case 7:return e.next=9,Object(S.default)().user.getUserBlock({searchTag:null==I||null===(r=I.opponentDetails)||void 0===r?void 0:r.userName});case 9:i=e.sent,a=(null==i?void 0:i.users)||[],s=a.find((function(e){return e.userId===Object(o.b)("isometrikUserId")})),nt(!!s),e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(0),nt(!1),e.abrupt("return");case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){(null!=I&&I.updateBlockStatus||null!=I&&I.messagingDisabled)&&ut()}),[I]);var lt=function(){wt(),C(!0),P(!1),L(!1),ve(!0)},dt=function(){C(!1),P(!0),L(!1)},ht=rw(lw(fw().mark((function e(){var t;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={conversationId:null==h?void 0:h.conversationId},e.prev=1,!Re){e.next=5;break}return e.next=5,Object(S.default)().message.postIndicateTyping(t).then((function(e){}));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])}))),3e3,!1),pt=function(){var e=lw(fw().mark((function e(t){var n,r;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={conversationId:t},at||(n.includeConversationStatusMessagesInUnreadMessagesCount=!1),e.prev=2,!((null==Object||null===(r=Object.keys(t))||void 0===r?void 0:r.length)>0)){e.next=6;break}return e.next=6,Object(S.default)().Conversation.getConversationDetails(n,t).then((function(e){var t,n,r,i;-1===(null==e||null===(t=e.conversationDetails)||void 0===t||null===(t=t.opponentDetails)||void 0===t?void 0:t.lastSeen)?ke(!0):(ke(!1),console.log("last Seen from API - ",null==e||null===(n=e.conversationDetails)||void 0===n||null===(n=n.opponentDetails)||void 0===n?void 0:n.lastSeen,new Date(null==e||null===(r=e.conversationDetails)||void 0===r||null===(r=r.opponentDetails)||void 0===r?void 0:r.lastSeen)),Ee(null==e||null===(i=e.conversationDetails)||void 0===i||null===(i=i.opponentDetails)||void 0===i?void 0:i.lastSeen))}));case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e;if(h)return P(!1),Ee(null==h||null===(e=h.opponentDetails)||void 0===e?void 0:e.lastSeen),null!=h&&h.conversationId?he.current=setInterval((function(){pt(null==h?void 0:h.conversationId)}),3e4):clearInterval(he.current),function(){return clearInterval(he.current)}}),[h,at]),Object(r.useEffect)((function(){!function(e){if(!e)return Pe(!1),!1;try{var t=new Date(e),n=new Date;if(t.getTime()>n.getTime())console.log("Invalid input");else{var r=Math.round((n.getTime()-t.getTime())/An.t),i=Math.round((n.getTime()-t.getTime())/An.o),o=Math.round((n.getTime()-t.getTime())/An.b),s=Math.round((n.getTime()-t.getTime())/An.e),c=Math.round((n.getTime()-t.getTime())/An.m),f=Math.round((n.getTime()-t.getTime())/An.p);Pe(f<60?"🟢 last seen just now":c<60?"Last seen ".concat(1===c?"a minute":c+" min"," ago"):s<24?1===s?"Last seen at ".concat(Object(a.v)(t)):"Last seen ".concat(t.getDate()===n.getDate()?"at ".concat(Object(a.v)(t)):"yesterday"):"Last seen ".concat(o<30?1===o?"a day":o+" days":i<12?1===i?"a month":i+" months":1===r?"an year":r+" years"," ago"))}}catch(e){console.error("Error calculating lastSeen from getLastSeen()")}}(Se)}),[Se]),Object(r.useEffect)((function(){var e;-1===(null==h||null===(e=h.opponentDetails)||void 0===e?void 0:e.lastSeen)?ke(!0):ke(!1),ht()}),[x,Re,null==h?void 0:h.conversationId]);var vt=Object(o.b)("isometrikUserId");Object(r.useEffect)((function(){if("typingEvent"===(null==x?void 0:x.action)&&x.conversationId===(null==h?void 0:h.conversationId)&&x.userId!==vt&&_e(!0),x){var e=setTimeout((function(){return _e(!1)}),3e3);return function(){return clearTimeout(e)}}return _e(!0)}),[x]),Object(r.useEffect)((function(){null!=h&&h.conversationId?(K(!0,h),function(){var e=lw(fw().mark((function e(){var t;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(a.w)({id:null==h?void 0:h.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:at});case 2:t=e.sent,R(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()):K(!1)}),[h]),Object(r.useEffect)((function(){var e;de(!1);var t={conversationId:null==h?void 0:h.conversationId};at||(t.conversationStatusMessage=!1),b((function(e){return sw(sw({},e),{},{messagesLoading:!0})})),h&&(null===(e=Object(S.default)())||void 0===e||null===(e=e.message)||void 0===e||e.getMessages(t).then((function(e){var t=e.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse();null!=t&&t.length&&de(!0),b((function(e){return sw(sw({},e),{},{messagesLoading:!1,messages:sw(sw({},null==e?void 0:e.messages),{},cw({},null==h?void 0:h.conversationId,t))})})),requestAnimationFrame((function(){v.messages&&document.getElementById("allMessages")&&document.getElementById("allMessages").scrollTo({top:document.getElementById("allMessages").scrollHeight})}))})).catch((function(e){b((function(e){return sw(sw({},e),{},{messagesLoading:!1})})),console.log(e,"errrrrrrrrrrrrrrrrrrr")})))}),[h]),Object(r.useRef)(null);var bt=dw(Object(r.useState)(!1),2),mt=bt[0],gt=bt[1],yt=function(){m(!1),Object(o.d)("isShow",!1),b(sw(sw({},v),{},{selectedConvId:""})),G(null)},wt=function(){var e=lw(fw().mark((function e(){var t,n,r,i;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=null==h?void 0:h.conversationId,n={limit:20,skip:0,isGroup:ct,conversationId:t,attachmentTypes:0},e.prev=2,e.next=5,Object(S.default)().message.getMessages(n);case 5:return r=e.sent,Ue(ow(null==r?void 0:r.messages)),V(ow(null==r?void 0:r.messages)),i=[],null==r||r.messages.forEach((function(e){return e.attachments.forEach((function(e){return i.push(e)}))})),De([].concat(i)),e.abrupt("return",r);case 14:e.prev=14,e.t0=e.catch(2),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),_t=function(){var e=lw(fw().mark((function e(t){var n,r,i,o,a;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==(n=Le.findIndex((function(e){return e.mediaId===t})))){e.next=15;break}return e.prev=2,e.next=5,wt();case 5:(r=e.sent)&&(o=r.messages.findIndex((function(e){var n;return(null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaId)===t})),Ve.current=o,We(o),null===(i=He.current)||void 0===i||i.showModal()),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("error",e.t0),Ze({open:!0,variant:"error",message:e.t0.messages});case 13:e.next=18;break;case 15:Ve.current=n,We(n),null===(a=He.current)||void 0===a||a.showModal();case 18:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.sidebarChatItem?Object(f.jsxs)("div",{className:"mainChat",children:[st?st({arrowClick:yt,handleClickSlideShow:lt,baseImageUrl:ot,s3ImageLinkGen:ft,sidebarChatItem:h,isActive:mt,setIsActive:gt,getSelfMenuBar:gw,userConversationDetail:I,setClearChatModal:k,setDeleteChatModal:E,setUserBlockModal:j,searchShowHandler:dt}):Object(f.jsxs)("div",{className:"chat_header",children:[Object(f.jsx)("span",{className:"arrow_icon",children:Object(f.jsx)($,{src:yr,className:null!=e&&e.theme?"darkicons":"lighticons",style:{marginRight:"10px"},onClick:yt})}),null!=h&&null!==(t=h.opponentDetails)&&void 0!==t&&null!==(t=t.metaData)&&void 0!==t&&t.profilePic?Object(f.jsx)("img",{onClick:fe?lt:function(){},src:ot?ft(ot,null==h||null===(n=h.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,70,120,120):null==h||null===(s=h.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic,className:"user_image pointer",alt:"opponent_profile_picture"}):Object(f.jsx)("div",{onClick:fe?lt:function(){},class:"userContact_image d-flex align-items-center justify-content-center",style:{textAlign:"center",margin:0,height:"41px",width:"41px"},children:null!=h&&null!==(c=h.opponentDetails)&&void 0!==c&&c.userName?null==h||null===(u=h.opponentDetails)||void 0===u?void 0:u.userName.charAt(0).toUpperCase():""}),Object(f.jsxs)("div",{className:"chat_headerInfo",children:[Object(f.jsxs)("div",{className:"d-flex userNameWrap align-items-center",children:[Object(f.jsx)("p",{style:{fontSize:null==T?void 0:T.name},onClick:fe?lt:function(){},className:"pointer",children:null==h||null===(l=h.opponentDetails)||void 0===l?void 0:l.userName}),ue?ue(h,!1):""]}),Object(f.jsx)(ww,{children:function(){var e=-1;switch(we&&(null==x?void 0:x.conversationId)===(null==h?void 0:h.conversationId)?e=0:!we&&je?e=1:we||je||(e=2),e){case 0:return"typing...";case 1:return"Online";case 2:default:return Ae}}()}),Object(f.jsx)("div",{className:"chat_headerInfo",children:JSON.stringify(null==h?void 0:h.online)})]}),Object(f.jsxs)("div",{className:"chat_header_right",children:[Q?Object(f.jsx)(f.Fragment,{children:Q}):Object(f.jsx)(f.Fragment,{}),p?Object(f.jsx)("span",{className:"mx-2 icons pointer search_icon",children:Object(f.jsx)($,{onClick:dt,src:_r,className:it?"darkicons":"lighticons"})}):"",Object(f.jsxs)(N,{onClose:function(){return gt(!1)},children:[Object(f.jsx)("span",{className:"icons pointer menu_icon",children:Object(f.jsx)($,{isActive:mt,onClick:function(){return gt(!mt)},src:Lu,className:it?"darkicons":"lighticons"})}),Object(f.jsx)(mw,{isActive:mt,className:"selfMenuWrap",children:Object(f.jsx)(Y,{renderSelfMoremenu:ce,menuData:gw(null==I?void 0:I.messagingDisabled,tt),isMenu:mt,setIsMenu:gt,setClearChatModal:k,setDeleteChatModal:E,setUserBlockModal:j,handleClickSlideShow:lt,searchShowHandler:dt,userConversationDetail:I})})]})]}),J?Object(f.jsx)(f.Fragment,{children:J}):Object(f.jsx)(f.Fragment,{})]}),Object(f.jsx)(yw,{className:"chatBox d-flex flex-column",style:{background:"url(".concat(!0===(null==e?void 0:e.theme)?Ng:Bg,")")},maxHeight:null===(d=document.querySelector(".isoChat .chat_footer"))||void 0===d?void 0:d.offsetHeight,children:Object(f.jsx)(Mb,{extraAttachmentOptions:re,customSend:ee,handleCustomSend:ne,sidebarChatItem:h,messages:null==v?void 0:v.messages,theme:it,getPaginationMessagesData:y,preventMessageRef:g,findUserId:x,state:v,setState:b,setGetMessageTextLength:Ie,userConversationDetail:I,setslideShow:C,setMessageInfo:L,messageInfo:D,setMessageChat:qe,slideShow:A,setSearchShow:P,setMediaDocs:V,userDetails:q,handleImgVidClick:_t,setIsOpen:Je,isOpen:Qe,getMediaDocs:wt,setToastStatus:Ze,isPreviousMessageLoad:X,attachMentPosition:ie,ChatFooterRightSlot:oe,customSendOptions:ae,RenderCustomSendOptions:se,isBlocked:tt,hasMessages:le,setHasMessages:de})})]}):Object(f.jsx)(f.Fragment,{children:Z?Object(f.jsx)(f.Fragment,{children:Z}):Object(f.jsx)("div",{className:"chatbox_Bg",children:Object(f.jsx)(bw,{className:"bg",children:Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{children:Object(f.jsx)($,{src:"https://chatstorage.isometrik.io/chat-assets/icons/placeholder.svg"})}),Object(f.jsx)("div",{children:Object(f.jsx)("h1",{children:"Isometrik Chat"})}),Object(f.jsx)("div",{className:"text_Color text",children:"Isometrik web chat is fully sync with mobile isomterik chat , all charts are synced when connected to the network"})]})})})}),Object(f.jsx)("div",{className:"".concat(A||M||D?"contactInfo":"contact"," ").concat("sideBarFix"),children:h?Object(f.jsx)(zy,{handleClosee:function(){C(!1),P(!1),L(!1)},searchShow:M,sidebarChatItem:null==e?void 0:e.sidebarChatItem,handler:function(){ve(!1)},slideShow:A,mediaContact:function(){C(!0)},theme:it,setShowProfilePicture:_,setDeleteChatModal:E,userConversationDetail:I,setUserBlockModal:j,Messages:v,setMessageInfo:L,messageInfo:D,conversationId:null==h?void 0:h.conversationId,setMessageChat:qe,messageChat:Ge,mediaDocs:H,debounceSearchMessages:B,enteredSearchQuery:U,searchedMessageArray:F,setSearchedMessageArray:z,searchMessageLoaderStatus:W,handleImgVidClick:_t,getPaginationMessagesData:y,setSearchShow:P}):""}),!Qe&&Object(f.jsx)(sh,{dialogueBoxRef:He,style:{maxHeight:"100%"},children:Object(f.jsxs)("div",{className:"d-flex justify-content-center",style:{flexDirection:"column"},children:[Object(f.jsx)(fh,{chatMedia:Ne,selectedMediaIndex:ze,scrolledPositionRef:Ve}),Object(f.jsx)(Qd,{assets:Le,selectedMediaIndex:ze,scrolledPositionRef:Ve})]})}),Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(Ws,{message:Ke.message,variant:Ke.variant,open:Ke.open,onClose:function(){return Ze({open:!1})},theme:it})}),Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .mainChat {\n width: 100vw;\n display: ".concat(w?"block":"none",";\n }\n .contactInfo {\n width: 100vw;\n position: fixed;\n z-index: 999;\n top: 0;\n right: 0;\n }\n }\n @media (min-width: 48rem) {\n .mainChat .arrow_icon {\n display: none;\n }\n }\n\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .crausalView{\n height: 70vh;\n }\n }\n ")})]})};function Mw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Rw,Iw,Tw,Lw,Dw,Bw,Nw,Uw,Fw,zw=Q.b.div(_w||(_w=Mw(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),Cn(Object(Q.a)(xw||(xw=Mw(["\n max-width: 320px;\n "]))))),Ww=Q.b.h5(jw||(jw=Mw(["\n margin-top: 20px;\n ","\n"])),Cn(Object(Q.a)(kw||(kw=Mw(["\n font-size: 18px;\n"]))))),Vw=Q.b.p(Ow||(Ow=Mw(["\n font-size: 18px;\n ","\n"])),Cn(Object(Q.a)(Sw||(Sw=Mw(["\n font-size: 14px;\n"]))))),Hw=Q.b.div(Ew||(Ew=Mw(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),Cn(Object(Q.a)(Cw||(Cw=Mw(["\n margin:1.5rem 0 20px;\n"]))))),Yw=Q.b.button(Aw||(Aw=Mw(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),Gw=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(zw,{className:"isoChat",children:[Object(f.jsx)(Ww,{children:"Clear this chat ?"}),Object(f.jsx)(Vw,{className:"subTitle1",children:"Performing this action will cause the chat history to be deleted for you. You will be able to continue chatting with this user but will not be able to view the chat history once this action has been performed."}),Object(f.jsx)(Vw,{className:"subTitle mt-2",children:"Are you sure you want to Clear this chat?"}),Object(f.jsxs)(Hw,{className:"logoutActionbtn",children:[Object(f.jsx)(Yw,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(Yw,{className:"logoutBtn",onClick:n,children:"Clear chat"})]})]})};function qw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Xw,Kw,Zw,$w,Qw,Jw,e_,t_,n_,r_=Q.b.div(Rw||(Rw=qw(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),Cn(Object(Q.a)(Iw||(Iw=qw(["\n max-width: 320px;\n "]))))),i_=Q.b.h5(Tw||(Tw=qw(["\n margin-top: 20px;\n ","\n"])),Cn(Object(Q.a)(Lw||(Lw=qw(["\n font-size: 18px;\n"]))))),o_=Q.b.p(Dw||(Dw=qw(["\n font-size: 18px;\n ","\n"])),Cn(Object(Q.a)(Bw||(Bw=qw(["\n font-size: 14px;\n"]))))),a_=Q.b.div(Nw||(Nw=qw(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),Cn(Object(Q.a)(Uw||(Uw=qw(["\n margin:1.5rem 0 20px;\n"]))))),s_=Q.b.button(Fw||(Fw=qw(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),c_=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(r_,{className:"isoChat sureDelete",children:[Object(f.jsx)(i_,{children:"Delete this chat?"}),Object(f.jsx)(o_,{className:"subTitle1",children:"Performing this action will cause the chat history and the conversation to be deleted from the chat list. You will be able to start a chat with this user again but the chat history will not be visible."}),Object(f.jsx)(o_,{className:"subTitle mt-2",children:"Are you sure you want to Delete this Chat?"}),Object(f.jsxs)(a_,{className:"logoutActionbtn",children:[Object(f.jsx)(s_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(s_,{className:"logoutBtn",onClick:n,children:"Delete chat"})]})]})};function f_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var u_,l_,d_,h_,p_,v_,b_,m_,g_,y_,w_,__=Q.b.div(Xw||(Xw=f_(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),Cn(Object(Q.a)(Kw||(Kw=f_(["\n max-width: 320px;\n "]))))),x_=Q.b.h5(Zw||(Zw=f_(["\n margin-top: 20px;\n ","\n"])),Cn(Object(Q.a)($w||($w=f_(["\n font-size: 18px;\n"]))))),j_=Q.b.p(Qw||(Qw=f_(["\n font-size: 18px;\n ","\n"])),Cn(Object(Q.a)(Jw||(Jw=f_(["\n font-size: 14px;\n"]))))),k_=Q.b.div(e_||(e_=f_(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),Cn(Object(Q.a)(t_||(t_=f_(["\n margin:1.5rem 0 20px;\n"]))))),O_=Q.b.button(n_||(n_=f_(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),S_=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick,r=e.isUserBlocked,i=e.userName;return Object(f.jsxs)(__,{children:[Object(f.jsx)(x_,{children:r?"Unblock ".concat(i," ?"):"Block ".concat(i," ?")}),Object(f.jsx)(j_,{children:"".concat(r?" ":"Are you sure you want to block ".concat(i,", blocked users will no longer be able to message you ?"))}),Object(f.jsxs)(k_,{className:"logoutActionbtn",children:[Object(f.jsx)(O_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(O_,{className:"logoutBtn",onClick:n,children:r?"Unblock":"Block"})]})]})};function E_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var C_,A_,P_,M_=Q.b.div(u_||(u_=E_(["\n width: 100vw;\n height: 100vh;\n position: absolute;\n top: 0;\n background: var(--primary-white);\n padding: 1rem 3rem;\n display: flex;\n flex-direction: column;\n z-index: 999;\n ","\n .user_profile_picture_major{\n width: 512px;\n height: 512px;\n margin: auto;\n object-fit: cover;\n ","\n }\n"])),Cn(Object(Q.a)(l_||(l_=E_(["\n padding: 1rem 0;\n "])))),Cn(Object(Q.a)(d_||(d_=E_(["\n width: 100%;\n height: 100%;\n max-height: 400px;\n aspect-ratio: 1/1;\n "]))))),R_=Q.b.div(h_||(h_=E_(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n ","\n\n .cross_icon{\n height: 24px;\n width: 24px;\n cursor: pointer;\n ","\n }\n .dark__theme{\n filter: invert(1);\n }\n"])),Cn(Object(Q.a)(p_||(p_=E_(["\n padding-left: 2rem;\n "])))),Cn(Object(Q.a)(v_||(v_=E_(["\n display: none;\n "]))))),I_=Q.b.div(b_||(b_=E_(["\n display: flex;\n align-items: center;\n\n .user_profile_picture{\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n ","\n }\n\n .back_icon{\n display: none;\n ","\n }\n"])),Cn(Object(Q.a)(m_||(m_=E_(["\n display: none;\n "])))),Cn(Object(Q.a)(g_||(g_=E_(["\n height: 16px;\n width: 20px;\n cursor: pointer;\n display: block;\n margin-right: 1rem;\n "]))))),T_=Q.b.p(y_||(y_=E_(["\n margin-bottom: 0;\n color: var(--black);\n margin-left: 1rem;\n"]))),L_=Q.b.div(w_||(w_=E_(["\n max-width: 512px;\n max-height: 512px;\n margin: auto;\n"]))),D_=function(e){var t=e.userName,n=e.userImageSrc,r=e.closeHandler,i=e.theme;return Object(f.jsxs)(M_,{children:[Object(f.jsxs)(R_,{theme:i,children:[Object(f.jsxs)(I_,{children:[Object(f.jsx)($,{src:yr,className:"".concat(i?"dark__theme":""," back_icon"),onClick:r}),Object(f.jsx)($,{className:"user_profile_picture",src:n,alt:"user_profile_picture"}),Object(f.jsx)(T_,{children:t})]}),Object(f.jsx)($,{onClick:r,src:wr,className:"".concat(i?"dark__theme":""," cross_icon")})]}),Object(f.jsx)(L_,{children:Object(f.jsx)(N,{onClose:r,children:Object(f.jsx)($,{className:"user_profile_picture_major",src:n,alt:"user_profile_picture"})})})]})};function B_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var N_,U_,F_,z_,W_=Q.b.div(C_||(C_=B_(["\n max-width: 100%;\n position: relative;\n margin-right: auto;\n margin-left: auto;\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n\n @media only screen and (min-width: 75em) {\n width: 72rem;\n }\n\n ","\n ","\n"])),(N_=Object(Q.a)(A_||(A_=B_(["\n width: 61rem;\n "]))),Object(Q.a)(ln||(ln=vn(["\n @media (max-width: 64rem) {\n ",";\n }\n"])),N_)),Cn(Object(Q.a)(P_||(P_=B_(["\n width: 70rem;\n padding: 0.6rem;\n "])))));function V_(e){return(V_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H_(Object(n),!0).forEach((function(t){G_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G_(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==V_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==V_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===V_(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var X_,K_,Z_=Q.b.input(U_||(U_=q_(['\n background: #f3f3f9;\n border-radius: 8px;\n font-family: "Inter";\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 22px;\n display: flex;\n align-items: center;\n letter-spacing: 0.39996px;\n color: #1d1c21;\n border: ',";\n height: 3em;\n width: 100%;\n margin: ",";\n padding: 0 9px;\n\n ",'\n\n &:focus {\n outline: none;\n }\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-transition: "color 9999s ease-out, background-color 9999s ease-out";\n -webkit-transition-delay: 9999s;\n color: #8b8b8b;\n }\n'])),(function(e){return e.error?"1px solid #B00020":" 1px solid #b1b1b1"}),(function(e){return e.error?"8px auto":"8px auto 1rem auto"}),function(e){return Object(Q.a)(hn||(hn=vn(["\n @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {\n ",";\n }\n"])),e)}(Object(Q.a)(F_||(F_=q_(["\n margin: 6px auto;\n "]))))),$_=Q.b.div(z_||(z_=q_(["\n color: #b00020;\n padding: 2px 0;\n"]))),Q_=function(e){var t=e.type,n=void 0===t?"text":t,r=e.error;return Object(f.jsxs)("div",{children:[Object(f.jsx)(Z_,Y_(Y_({type:n},e),{},{error:e.error})),r&&""!==r&&Object(f.jsx)($_,{errorMessage:r,children:r})]})},J_=i.a.forwardRef(Q_);function ex(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var tx,nx,rx,ix=Q.b.div(X_||(X_=ex(["\n margin: 10px 0;\n"]))),ox=Q.b.a(K_||(K_=ex(["\n background: #F53872;\n color: #fff;\n border-radius: 10px;\n font-size: 16px;\n line-height: 22.4px;\n padding: 10px 32px;\n white-space: nowrap;\n font-weight: 500;\n text-decoration: none;\n display: inline-block;\n border: none;\n transition: 0.125s;\n text-align: center;\n width: 100%;\n cursor: pointer;\n\n &:not(.disable):hover {\n color: #fff;\n }\n"]))),ax=function(e){return Object(f.jsx)(ix,{children:Object(f.jsx)(ox,{href:e.url,children:e.title})})},sx=i.a.forwardRef(ax),cx="https://chatstorage.isometrik.io/chat-assets/icons/ic_uil_eye-slash.svg",fx="https://chatstorage.isometrik.io/chat-assets/icons/login_background.png",ux="https://chatstorage.isometrik.io/chat-assets/icons/ic_uil_eye.svg",lx=/(?=.*?[A-Z])/,dx=/(?=.*?[0-9])/,hx=/(?=.*?[#?!@$%^&*-])/,px=/.{8,}/;function vx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bx,mx,gx,yx,wx,_x,xx,jx,kx,Ox,Sx,Ex,Cx;Q.b.div(tx||(tx=vx(["\n top: 20px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: absolute;\n border: 1px solid lightpink;\n background: antiquewhite;\n border-radius: 5px;\n padding: 0px 20px;\n display: flex;\n transition: all 1s ease-in-out !important;\n\n ","\n"])),Cn(Object(Q.a)(nx||(nx=vx(["\n width: 70%;\n right: 20px;\n "]))))),Q.b.div(rx||(rx=vx(["\n padding: 15px;\n color: brown;\n"])));function Ax(e){return(Ax="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Px(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Px(Object(n),!0).forEach((function(t){Rx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Px(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ax(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ax(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ax(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ix(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tx(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Dx,Bx,Nx,Ux,Fx,zx,Wx,Vx,Hx,Yx,Gx,qx,Xx,Kx=Q.b.section(bx||(bx=Lx(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),fx,Cn(Object(Q.a)(mx||(mx=Lx(["\n padding: 1rem;\n"]))))),Zx=Q.b.div(gx||(gx=Lx(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n background:#fff;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),Cn(Object(Q.a)(yx||(yx=Lx(["\n border-radius: 10px;\n "]))))),$x=Q.b.div(wx||(wx=Lx(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),Cn(Object(Q.a)(_x||(_x=Lx(["\n padding: 1rem;\n "]))))),Qx=Q.b.div(xx||(xx=Lx(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color: var(--black);\n text-transform: capitalize;\n opacity: 1;\n"]))),Jx=(Q.b.div(jx||(jx=Lx(["\n text-align: center;\n font-size: 26px;\n letter-spacing: 0px;\n color: red;\n text-transform: capitalize;\n opacity: 1;\n"]))),Q.b.div(kx||(kx=Lx(["\n position: relative;\n"])))),ej=Q.b.span(Ox||(Ox=Lx(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),tj=Q.b.div(Sx||(Sx=Lx(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),nj=Q.b.p(Ex||(Ex=Lx(["\n text-align: center;\n color: var(--danger);\n "]))),rj=Q.b.div(Cx||(Cx=Lx(["\ntext-align: center;\n"]))),ij=function(e){var t=e.setLoginPage,n=e.theme,i=Ix(Object(r.useState)(!1),2),a=i[0],c=i[1],u=Ix(Object(r.useState)(),2),l=u[0],d=u[1],h=Ix(Object(r.useState)({email:"",password:""}),2),p=h[0],v=h[1],b=Ix(Object(r.useState)({open:!1,message:"",variant:""}),2),m=b[0],g=b[1],y=Ix(Object(r.useState)({email:"",password:""}),2),w=y[0],_=y[1],x=function(e,t){switch(e){case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"email is required";case"password":return t?lx.test(t)?dx.test(t)?hx.test(t)?px.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";default:return""}},j=function(e){v(Mx(Mx({},p),{},Rx({},e.target.name,e.target.value))),_(Mx(Mx({},w),{},Rx({},e.target.name,x(e.target.name,e.target.value)))),d()};return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Kx,{children:Object(f.jsx)(W_,{children:Object(f.jsx)(Zx,{children:Object(f.jsxs)($x,{children:[Object(f.jsx)(rj,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(Qx,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(nj,{children:l}),Object(f.jsx)(J_,{name:"email",type:"email",placeholder:"Enter your email",value:p.email,error:null==w?void 0:w.email,onChange:j}),Object(f.jsxs)(Jx,{children:[Object(f.jsx)(J_,{name:"password",type:a?"text":"password",placeholder:"Enter your password",value:null==p?void 0:p.password,error:null==w?void 0:w.password,onChange:j}),Object(f.jsx)("div",{onClick:function(){return c(!a)},children:Object(f.jsx)(ej,{children:Object(f.jsx)($,{src:a?ux:cx,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(p).forEach((function(e){var n=x(e,p[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)_(t);else{var n={userIdentifier:null==p?void 0:p.email,password:null==p?void 0:p.password};Object(S.default)().user.postUserAuthenticate(n).then((function(e){g({open:!0,variant:"success",message:e.msg}),Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),window.location.href="/"})).catch((function(e){var t,n;console.log({error:e}),g({open:!0,variant:"error",message:null==e?void 0:e.message}),d((null===(t={error:e})||void 0===t||null===(t=t.error)||void 0===t?void 0:t.errorMsg)||(null===(n={error:e})||void 0===n||null===(n=n.error)||void 0===n?void 0:n.message))}))}},children:Object(f.jsx)(sx,{title:"Log In"})}),Object(f.jsx)(tj,{onClick:function(){return t(!1)},children:"Sign Up"})]})})})}),Object(f.jsx)(Ws,{message:m.message,variant:m.variant,open:m.open,onClose:function(){return g({open:!1})},theme:n})]})};function oj(e){return(oj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aj(Object(n),!0).forEach((function(t){cj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==oj(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==oj(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===oj(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return uj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var dj=Q.b.form(Dx||(Dx=lj(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),fx,Cn(Object(Q.a)(Bx||(Bx=lj(["\n padding:1rem;\n"]))))),hj=Q.b.div(Nx||(Nx=lj(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n background:#fff;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),Cn(Object(Q.a)(Ux||(Ux=lj(["\n border-radius: 20px;\n "]))))),pj=Q.b.div(Fx||(Fx=lj(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),Cn(Object(Q.a)(zx||(zx=lj(["\n padding: 1rem;\n "]))))),vj=Q.b.div(Wx||(Wx=lj(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color:var(--black);\n font-family: LogoText;\n text-transform: capitalize;\n opacity: 1;\n"]))),bj=Q.b.div(Vx||(Vx=lj(["\n position: relative;\n"]))),mj=Q.b.span(Hx||(Hx=lj(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),gj=Q.b.div(Yx||(Yx=lj(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),yj=(Q.b.div(Gx||(Gx=lj(["\n text-align: center;\n letter-spacing: -0.22px;\n color:red;\n padding: 10px 0 0 0;\n"]))),Q.b.p(qx||(qx=lj(["\n text-align: center;\n color: var(--danger);\n"])))),wj=Q.b.div(Xx||(Xx=lj(["\ntext-align: center;\n"]))),_j=function(e){var t=e.setLoginPage,n=e.theme,c=fj(Object(r.useState)(!1),2),u=c[0],l=c[1],d=fj(Object(r.useState)(!1),2),h=d[0],p=d[1],v=fj(Object(r.useState)(),2),b=v[0],m=v[1],g=fj(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),y=g[0],w=g[1],_=fj(Object(r.useState)({open:!1,message:"",variant:""}),2),x=_[0],j=_[1],k=fj(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),O=k[0],E=k[1],C=function(e,t){switch(e){case"fname":return t&&""!==t.trim()?t.match(/^[A-Z ]{3,50}$/i)?Object(a.c)(t)?"":"First letter should be capital in name":"User name should not contain any special characters":"User name is required";case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"Email is required";case"Password":return t?lx.test(t)?dx.test(t)?hx.test(t)?px.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";case"confirmPassword":return t?t!==y.password?"Confirm password did not match":"":"Confirm password is required";default:return""}},A=function(e){w(sj(sj({},y),{},cj({},e.target.name,e.target.value))),m(),E(sj(sj({},O),{},cj({},e.target.name,C(e.target.name,e.target.value))))};return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsx)(dj,{children:Object(f.jsx)(W_,{children:Object(f.jsx)(hj,{children:Object(f.jsxs)(pj,{children:[Object(f.jsx)(wj,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(vj,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(yj,{children:b}),Object(f.jsx)(J_,{name:"fname",type:"text",placeholder:"Enter your name",value:null==y?void 0:y.fname,onChange:A,error:null==O?void 0:O.fname}),Object(f.jsx)(J_,{name:"email",type:"email",placeholder:"Enter your email",value:null==y?void 0:y.email,error:null==O?void 0:O.email,onChange:A}),Object(f.jsxs)(bj,{children:[Object(f.jsx)(J_,{name:"password",type:u?"text":"password",placeholder:"Enter your password",value:null==y?void 0:y.password,error:null==O?void 0:O.password,onChange:A}),Object(f.jsx)("div",{onClick:function(){return l(!u)},children:Object(f.jsx)(mj,{children:Object(f.jsx)($,{src:u?ux:cx,height:"22px",width:"22px"})})})]}),Object(f.jsxs)(bj,{children:[Object(f.jsx)(J_,{name:"confirmPassword",type:h?"text":"password",placeholder:"Enter your confirm password",value:null==y?void 0:y.confirmPassword,error:null==O?void 0:O.confirmPassword,onChange:A}),Object(f.jsx)("div",{onClick:function(){return p(!h)},children:Object(f.jsx)(mj,{children:Object(f.jsx)($,{src:h?ux:cx,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(y).forEach((function(e){var n=C(e,y[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)E(t);else{var n={userProfileImageUrl:a.E,userName:y.fname,userIdentifier:y.email,password:y.password,confirmPassword:y.confirmPassword,metaData:{country:"IN"}};Object(S.default)().user.postUser(n).then((function(e){Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),e&&(j({open:!0,variant:"success",message:e.msg}),window.location.href="/")})).catch((function(e){var t=JSON.stringify(e.errorProperties.password);if(t){var n=JSON.parse(t);j({open:!0,variant:"error",message:"Please enter a valid password!"}),m("".concat(n[0]))}}))}},children:Object(f.jsx)(sx,{title:"Sign Up"})}),Object(f.jsx)(gj,{onClick:function(){return t(!0)},children:"Log In"})]})})})}),Object(f.jsx)(Ws,{message:x.message,variant:x.variant,open:x.open,onClose:function(){return j({open:!1})},theme:n})]})};function xj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kj,Oj,Sj,Ej,Cj,Aj,Pj,Mj,Rj,Ij,Tj,Lj,Dj=function(e){var t=e.theme,n=xj(Object(r.useState)(!0),2),i=n[0],o=n[1];return Object(f.jsxs)("div",{children:[i&&Object(f.jsx)(ij,{setLoginPage:o,theme:t}),!i&&Object(f.jsx)(_j,{setLoginPage:o,theme:t})]})};function Bj(e){return(Bj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nj(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Nj=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==Bj(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Bj(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Uj(e){return function(e){if(Array.isArray(e))return qj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gj(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fj(Object(n),!0).forEach((function(t){Wj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Bj(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Bj(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Bj(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vj(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Hj(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Vj(o,r,i,a,s,"next",e)}function s(e){Vj(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Yj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||Gj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gj(e,t){if(e){if("string"==typeof e)return qj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qj(e,t):void 0}}function qj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Kj=Q.b.section(kj||(kj=Xj(["\n height: 100%;\n background-color: #dadbd3;\n // display: grid;\n"]))),Zj=Q.b.div(Oj||(Oj=Xj(["\n background: var(--gray_color);\n max-width: 70%;\n flex: 1 1 70%;\n position: relative;\n ","\n"])),Cn(Object(Q.a)(Sj||(Sj=Xj(["\n max-width: 100%;\n flex: 1 1 100%;\n"]))))),$j=Q.b.div(Ej||(Ej=Xj(["\n display: none;\n background-color: var(--modal_color);\n position: absolute;\n bottom: 0px;\n padding: 20px 75px 20px 20px;\n width: 100%;\n align-items: center;\n\n .userImg {\n height: 65px;\n width: 65px;\n border-radius: 60px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n ","\n\n ","\n"])),function(e){return Object(Q.a)(dn||(dn=vn(["\n @media (min-width: 48rem) and (max-width: 64rem) {\n ",";\n }\n"])),e)}(Object(Q.a)(Cj||(Cj=Xj(["\n display: none;\n "])))),Cn(Object(Q.a)(Aj||(Aj=Xj(["\n display: flex;\n "]))))),Qj=Q.b.div(Pj||(Pj=Xj(["\n display: flex;\n justify-content: flex-end;\n margin-bottom: 20px;\n color: white;\n\n .cancleBtn {\n background: var(--iso_white);\n color: var(--button-primary-background);\n border: 1px solid var(--border_color);\n }\n\n .logoutBtn {\n background-color: var(--button-primary-background);\n color: var(--iso_white);\n }\n"]))),Jj=Q.b.div(Mj||(Mj=Xj(["\ndisplay:flex;\n"]))),ek=Q.b.div(Rj||(Rj=Xj(["\ncolor:var(--black);\nwidth:72%;\n\n.signOutBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:0px;\n}\n\n.cancelBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:10px;\n}\n"]))),tk=Q.b.button(Ij||(Ij=Xj(["\n margin-left: 15px;\n border-radius: 20px;\n border: none;\n padding: 5px 20px 5px 20px;\n"]))),nk=Q.b.div(Tj||(Tj=Xj(["\nwidth:100%;\nheight:100%;\ntop:0;\nbackground-color:var(--modal-backDrop);\nposition:absolute;\nborder:none;\n.logoutModal{\n background-color: var(--modal_color);\n color:var(--black);\n position: absolute; \n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n width:32rem;\n top:50%;\n left:50%;\n z-index:999;\n transform: translate(-50%,-50%);\n padding:20px 24px 6px 22px;\n line-height: 1.7;\n max-height:14rem\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n\n ","\n }"])),Cn(Object(Q.a)(Lj||(Lj=Xj(["\n display: none;\n "])))));var rk=function(e){var t,n,s,c,u=O(),l=u.fetchUserToken,d=u.sortByCustomType,h=u.showLoader,p=u.setShowLoader,v=u.theme,b=u.userDetails,m=u.setUserDetails,g=u.findUserId,y=u.state,w=u.setState,_=u.userloggedIn,x=u.loading,j=u.sidebarChatItem,k=u.setSidebarChatItem,E=u.showStatusMessages,C=u.hideHiddenConversations,A=u.isGroup,P=u.currFilter,M=u.setCurrFilter,R=u.currChat,I=u.setCurrChat,T=u.searchConvoText,L=u.setSearchConvoText,D=(u.isSearchLoading,u.setIsSearchLoading,e.showSideChatHeader),B=e.sideBarHeaderSlot,N=e.customSend,U=e.handleCustomSend,F=void 0===U?function(){}:U,z=e.onChatChange,W=void 0===z?function(){}:z,V=e.sideBarPlaceHolder,H=e.chatHeaderRightSlot,Y=e.chatHeaderMoreMenu,G=e.renderProfileBadge,q=e.placeHolder,X=e.extraAttachmentOptions,K=e.attachMentPosition,Z=e.ChatFooterRightSlot,Q=e.customSendOptions,J=e.RenderCustomSendOptions,ee=e.renderSelfMoremenu,te=e.showSearchIcon,ne=e.sortConversationList,re=e.allowProfileClick,ie=e.showSideBarSearch,oe=e.onNewConversation,ae=e.onConversationsFetch,se=Yj(Object(r.useState)(!1),2),ce=se[0],fe=se[1],ue=Object(r.useRef)(!1),le=Yj(Object(r.useState)(!1),2),de=le[0],he=le[1],pe=Yj(Object(r.useState)(!1),2),ve=pe[0],be=pe[1],me=Yj(Object(r.useState)(!1),2),ge=me[0],ye=me[1],we=Object(r.useRef)(!1),_e=Yj(Object(r.useState)(!1),2),xe=_e[0],je=_e[1],ke=Yj(Object(r.useState)(!1),2),Oe=ke[0],Se=ke[1],Ee=Yj(Object(r.useState)(!1),2),Ce=Ee[0],Ae=Ee[1],Pe=Yj(Object(r.useState)({}),2),Me=Pe[0],Re=Pe[1],Ie=Yj(Object(r.useState)(!1),2),Te=Ie[0],Le=Ie[1],De=Yj(Object(r.useState)(!1),2),Be=De[0],Ne=De[1],Ue=Yj(Object(r.useState)(!1),2),Fe=Ue[0],ze=Ue[1],We=Yj(Object(r.useState)({open:!1,message:"",variant:""}),2),Ve=We[0],He=We[1],Ye=Yj(Object(r.useState)([]),2),Ge=Ye[0],qe=Ye[1],Xe=Yj(Object(r.useState)(!1),2),Ke=Xe[0],Ze=Xe[1],$e=Yj(Object(r.useState)(!1),2),Qe=$e[0],Je=$e[1],et=Yj(Object(r.useState)(),2),tt=et[0],nt=et[1],rt=Yj(Object(r.useState)(""),2),it=rt[0],ot=rt[1],at=Yj(Object(r.useState)({showProfile:!1,userName:"",userImageSrc:"",theme:v}),2),st=at[0],ct=at[1],ft=Yj(Object(r.useState)(!1),2),ut=ft[0],lt=ft[1],dt=Yj(Object(r.useState)(0),2),ht=(dt[0],dt[1],i.a.useRef(!1));console.log("allMsg",ut);var pt=new URLSearchParams(window.location.search).get("c"),vt=function(e){var t=new URLSearchParams("");t.set("c",(null==e?void 0:e.conversationId)||"");var n="".concat(window.location.pathname,"?").concat(t.toString());window.history.pushState({path:n},"",n),k(e)},bt=function(){var e=Hj(Nj().mark((function e(t){var n,r,i,o,s=arguments;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:[],w((function(e){return zj(zj({},e),{},{selectedConvId:t})})),p(!0),e.prev=3,r=Uj(n),null==(i=r.find((function(e){return e.conversationId===t})))||!i.conversationId){e.next=11;break}Re(i),k(i),e.next=16;break;case 11:return e.next=13,Object(a.w)({id:t,includeConversationStatusMessagesInUnreadMessagesCount:E});case 13:o=e.sent,k(o),Re(o);case 16:he(!0),p(!1),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),p(!1);case 23:case"end":return e.stop()}}),e,null,[[3,20]])})));return function(t){return e.apply(this,arguments)}}(),mt={limit:20,skip:0,isGroup:A};Object(r.useEffect)((function(){var e=function(){var e,t,n=new URLSearchParams(window.location.search),r=n.get("c");r?(null==y||null===(t=y.conversations)||void 0===t?void 0:t.length)>0&&bt(r,null==y?void 0:y.conversations):(he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:""})})));n.get("unread")||null!==(e=y.conversations)&&void 0!==e&&e.length||wt(zj(zj({},mt),{},{sort:P}),!1,R||"ALL")};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[P,R,null==y?void 0:y.conversations]);var gt={limit:20,skip:0,isGroup:A,conversationId:null==j?void 0:j.conversationId},yt=function(e){I(e),wt(zj(zj({},mt),{},{sort:P}),!1,e)};Object(r.useEffect)((function(){return function(){I(""),M(),he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:""})})),L("")}}),[]);var wt=function(){var e=Hj(Nj().mark((function e(t,n){var r,i,o,a,s,c,f,u,l,h=arguments;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h.length>2&&void 0!==h[2]?h[2]:"ALL",i=zj({},t),t.sort?i.sort=t.sort:delete i.sort,d&&!t.sort&&(i.sortByCustomType=!0),E||(i.includeConversationStatusMessagesInUnreadMessagesCount=!1),C&&(i.hidden=!1),T?i.searchTag=T:delete i.searchTag,e.prev=7,n?ye(!0):p(!0),ue.current=!0,"UNREAD"!==r){e.next=16;break}return e.next=13,null===(c=Object(S.default)())||void 0===c||null===(c=c.Conversation)||void 0===c?void 0:c.getUnreadConversations(i);case 13:s=e.sent,e.next=19;break;case 16:return e.next=18,null===(f=Object(S.default)())||void 0===f||null===(f=f.Conversation)||void 0===f?void 0:f.getConversations(i);case 18:s=e.sent;case 19:u=n?[].concat(Uj(y.conversations),Uj(null===(o=s)||void 0===o?void 0:o.conversations)):(null===(a=s)||void 0===a?void 0:a.conversations)||[],w((function(e){return zj(zj({},e),{},{conversations:Uj(u)})})),!n&&ae&&ae((null===(l=s)||void 0===l?void 0:l.conversations)||[],pt),pt&&!n?bt(pt,u):p(!1),ye(!1),e.next=33;break;case 26:e.prev=26,e.t0=e.catch(7),1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&0===(null==i?void 0:i.skip)?w((function(e){return zj(zj({},e),{},{conversations:[]})})):w((function(e){return zj(zj({},e),{},{conversations:Uj(e.conversations)})})),Je(1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)),p(!1),ye(!1),console.log(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode,null===e.t0||void 0===e.t0?void 0:e.t0.message,"err");case 33:return e.prev=33,ye(!1),ue.current=!1,e.finish(33);case 37:case"end":return e.stop()}}),e,null,[[7,26,33,37]])})));return function(t,n){return e.apply(this,arguments)}}(),_t=function(){var e=Hj(Nj().mark((function e(t){var n,r,i;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ot(t),n={conversationId:null==j?void 0:j.conversationId,searchTag:t},e.prev=2,null==t||!t.length){e.next=12;break}return Ze(!0),e.next=7,null===(r=Object(S.default)())||void 0===r||null===(r=r.message)||void 0===r?void 0:r.getMessages(n);case 7:i=e.sent,qe(Uj(null==i?void 0:i.messages)),Ze(!1),e.next=13;break;case 12:qe([]);case 13:e.next=20;break;case 15:e.prev=15,e.t0=e.catch(2),console.error("error",e.t0),qe([]),Ze(!1);case 20:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}(),xt=Object(a.g)(_t,500),jt=function(){var e=Hj(Nj().mark((function e(t){var n,r,i,o,a,s,c,f,u=arguments;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:function(){return!0},e.prev=1,!we.current&&!ht.current){e.next=4;break}return e.abrupt("return");case 4:return i=document.getElementById("allMessages"),o=i.scrollHeight-i.scrollTop,null!=t&&t.skip&&(we.current=!0),i.scrollHeight,ht.current=!0,e.next=11,null===(r=Object(S.default)())||void 0===r||null===(r=r.message)||void 0===r?void 0:r.getMessages(t);case 11:a=e.sent,ht.current=!1,s=a.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse(),w((function(e){return we.current=!1,n([].concat(Uj(s),Uj(e.messages[null==j?void 0:j.conversationId])),t.limit),zj(zj({},e),{},{messages:zj(zj({},e.messages),{},Wj({},null==j?void 0:j.conversationId,[].concat(Uj(s),Uj(e.messages[null==j?void 0:j.conversationId]))))})})),c=i.scrollHeight,i.scrollTop=c-o,e.next=23;break;case 19:e.prev=19,e.t0=e.catch(1),ht.current=!1,1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&null!=y&&null!==(f=y.messages)&&void 0!==f&&null!==(f=f[null==j?void 0:j.conversationId])&&void 0!==f&&f.length||He({open:!0,variant:"error",message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||"No messages"});case 23:return e.prev=23,ht.current=!1,we.current=!1,e.finish(23);case 27:case"end":return e.stop()}}),e,null,[[1,19,23,27]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e=new URLSearchParams(window.location.search).get("unread");"true"===e?(he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:"",conversations:[]})})),yt("UNREAD"),localStorage.setItem("isoChatTab",2)):"false"!==e&&e||(he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:"",conversations:[]})})),yt("ALL"),localStorage.setItem("isoChatTab",1))}),[]),Object(r.useEffect)((function(){b||x||!Object(o.b)("isometrikToken")||l()}),[b,x]);var kt=function(){be(!1),setTimeout((function(){p(!0),Object(o.a)()}),100),p(!1)},Ot=function(){Le(!1),Ne(!1)},St=function(){var e=Hj(Nj().mark((function e(){var t;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,je(!1),e.next=4,Object(a.d)(null==j?void 0:j.conversationId);case 4:t=e.sent,He({open:!0,variant:"success",message:t.msg}),w((function(e){return zj(zj({},e),{},{messages:Wj({},null==j?void 0:j.conversationId,[])})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),je(!1),He({open:!0,variant:"error",message:e.t0.messages});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),Et=function(){var e=Hj(Nj().mark((function e(){var t,n,r;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ae(!1),e.next=4,Object(a.B)(null==j||null===(t=j.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,e.next=7,Object(a.w)({id:null==j?void 0:j.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:E});case 7:r=e.sent,Re(r),He({open:!0,variant:"success",message:n.msg}),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ae(!1),He({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),Ct=function(){var e=Hj(Nj().mark((function e(){var t,n,r;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ae(!1),e.next=4,Object(a.C)(null==j||null===(t=j.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,He({open:!0,variant:"success",message:n.msg}),e.next=8,Object(a.w)({id:null==j?void 0:j.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:E});case 8:r=e.sent,Re(r),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ae(!1),He({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){if(null!=y&&y.conversations&&(null==y?void 0:y.conversations.length)>0&&null!=Me&&Me.conversationId){var e=null==y?void 0:y.conversations.find((function(e){return e.conversationId===Me.conversationId}));e&&Re((function(t){return zj({},e)}))}}),[null==y?void 0:y.conversations]);var At=function(){var e=Hj(Nj().mark((function e(){var t;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Se(!1),e.next=4,Object(a.i)(null==j?void 0:j.conversationId);case 4:t=e.sent,He({open:!0,variant:"success",message:t.msg}),Ot(),he(!1),w((function(e){return zj(zj({},e),{},{selectedConvId:""})})),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),console.error("error",e.t0),He({open:!0,variant:"error",message:e.t0.messages}),Se(!1),Ot();case 17:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("div",{className:"true"===v||v?"dark-theme":"light-theme",children:[Object(f.jsxs)(Kj,{className:"overflow-hidden",children:[_&&!x?Object(f.jsxs)("div",{className:"d-flex",onClick:function(){return fe(!ce)},children:[Object(f.jsx)(nl,{sideBarPlaceHolder:V,sideBarHeaderSlot:B,state:y,setState:w,sideData:null==y?void 0:y.conversations,sidebarData:vt,disabledKey:ce,userDetails:b,getPaginationHomePageData:function(){var e,t,n;ue.current||(null==y||null===(e=y.conversations)||void 0===e?void 0:e.length)<mt.limit||(null==y||null===(t=y.conversations)||void 0===t?void 0:t.length)%mt.limit!=0||(mt.skip=(null==y||null===(n=y.conversations)||void 0===n?void 0:n.length)/mt.limit*mt.limit,!Qe&&wt(zj(zj({},mt),{},{sort:P}),!0,R||"ALL"))},preventConversationRef:ue,setIsSidebarShow:he,isSidebarShow:de,isLogOut:ve,setIsLogOut:be,findUserId:g,sidebarChatItem:j,getHomePageConversationData:wt,setUserDetails:m,setShowLoader:p,setShowProfilePicture:ct,showConversationPagingLoader:ge,setToastStatus:He,setUserConversationDetail:Re,profileClose:Ot,setMediaDocs:nt,showSideChatHeader:D,renderProfileBadge:G,sortConversationList:ne,showSideBarSearch:ie,handleFilterSelect:function(e){"0"===e?M():M(e),wt(zj(zj({},mt),{},{sort:"0"===e?"":e}),!1,R||"ALL")},handleActiveChatTab:yt,onNewConversation:oe,setSidebarChatItem:k}),Object(f.jsx)(Zj,{className:"d-flex",children:h?"":Object(f.jsx)(Pw,{customSend:N,extraAttachmentOptions:X,handleCustomSend:F,placeHolder:q,onChatChange:W,theme:v,setClearChatModal:je,setDeleteChatModal:Se,setUserBlockModal:Ae,state:y,setState:w,sidebarChatItem:j,setSidebarChatItem:k,setIsSidebarShow:he,isSidebarShow:de,getPaginationMessagesData:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0;we.current||0===Object.keys(null==y?void 0:y.messages).length||(null==y||null===(e=y.messages[null==j?void 0:j.conversationId])||void 0===e?void 0:e.length)<gt.limit||(null==y||null===(t=y.messages[null==j?void 0:j.conversationId])||void 0===t?void 0:t.length)%gt.limit!=0||(gt.skip=i||(null==y||null===(n=y.messages[null==j?void 0:j.conversationId])||void 0===n?void 0:n.length)/gt.limit*gt.limit,E||(gt.conversationStatusMessage=!1),jt(gt,r))},preventMessageRef:we,setShowProfilePicture:ct,findUserId:g,sidebarData:vt,setToastStatus:He,setslideShow:Le,slideShow:Te,setSearchShow:Ne,searchShow:Be,setUserConversationDetail:Re,userConversationDetail:Me,setMessageInfo:ze,messageInfo:Fe,debounceSearchMessages:xt,searchedMessageArray:Ge,setSearchedMessageArray:qe,searchMessageLoaderStatus:Ke,handleClosee:Ot,setMediaDocs:nt,mediaDocs:tt,userDetails:b,enteredSearchQuery:it,isPreviousMessageLoad:we.current,chatHeaderRightSlot:H,chatHeaderMoreMenu:Y,attachMentPosition:K,ChatFooterRightSlot:Z,customSendOptions:Q,RenderCustomSendOptions:J,renderSelfMoremenu:ee,showSearchIcon:te,allowProfileClick:re,renderProfileBadge:G,hasMessages:ut,setHasMessages:lt})})]}):"",ve?Object(f.jsx)(nk,{children:Object(f.jsxs)("div",{className:"logoutModal",children:[Object(f.jsx)("h5",{children:"Log out? "}),Object(f.jsx)("p",{children:"Are you sure you want to logout"}),Object(f.jsx)("div",{children:Object(f.jsxs)(Qj,{className:"logoutActionbtn",children:[Object(f.jsx)(tk,{className:"cancleBtn",onClick:function(){return be(!1)},children:"Cancel"}),Object(f.jsx)(tk,{className:"logoutBtn",onClick:kt,children:"Log out"})]})})]})}):"",ve&&Object(f.jsxs)($j,{className:"signOut",children:[Object(f.jsx)("div",{style:{width:"28%"},children:Object(f.jsx)($,{className:"userImg",src:null==e||null===(t=e.userDetails)||void 0===t?void 0:t.userProfileImageUrl})}),Object(f.jsxs)(ek,{className:"actionBtn",children:[Object(f.jsx)("h5",{children:null==e||null===(n=e.userDetails)||void 0===n?void 0:n.userName}),Object(f.jsx)("p",{children:null==e||null===(s=e.userDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.description}),Object(f.jsxs)(Jj,{children:[Object(f.jsx)(tk,{className:"signOutBtn",onClick:kt,children:"Sign Out"}),Object(f.jsx)(tk,{className:"cancelBtn",onClick:function(){return be(!1)},children:"Cancel"})]})]})]}),xe&&Object(f.jsx)(bs,{open:xe,backDropClick:!0,onClose:function(){return je(!1)},children:Object(f.jsx)(Gw,{cancelButtonClick:function(){return je(!1)},confirmButtonClick:St})}),Oe&&Object(f.jsx)(bs,{open:Oe,backDropClick:!0,onClose:function(){return Se(!1)},children:Object(f.jsx)(c_,{cancelButtonClick:function(){return Se(!1)},confirmButtonClick:At})}),Ce&&Object(f.jsx)(bs,{open:Ce,backDropClick:!0,onClose:function(){return Ae(!1)},children:Object(f.jsx)(S_,{isUserBlocked:null==Me?void 0:Me.messagingDisabled,userName:null==j||null===(c=j.opponentDetails)||void 0===c?void 0:c.userName,cancelButtonClick:function(){return Ae(!1)},confirmButtonClick:null!=Me&&Me.messagingDisabled?Ct:Et})}),Object(f.jsx)(Ws,{message:Ve.message,variant:Ve.variant,open:Ve.open,onClose:function(){return He({open:!1})}}),st.showProfile&&Object(f.jsx)(D_,{userName:st.userName,userImageSrc:st.userImageSrc,theme:st.theme,closeHandler:function(){return ct({showProfile:!1})}}),x||h?Object(f.jsx)(vs,{className:"mainLoader",height:"100vh",width:"100%",theme:v,position:"absolute"}):Object(f.jsx)(f.Fragment,{}),!_&&!x&&!h&&Object(f.jsx)(Dj,{theme:v})]}),Object(f.jsx)("style",{jsx:!0,children:"\n .mainLoader {\n top: 0;\n left: 0;\n }\n .logoutModal * {\n margin-top: 20px;\n }\n\n @media (max-width: 48rem) {\n .sidebar_header {\n width: 100vw;\n }\n }\n @media (max-width: 48rem) {\n .sidebar .sidebar_header .sliderr {\n width: 100vw;\n }\n .sidebar {\n display: ".concat(de||null!=y&&y.selectedConvId?"none":"block",";\n }\n }\n ")})]})})};t.default=function(e){var t=e.showSideBarSearch,n=void 0===t||t,r=e.attachMentPosition,i=void 0===r?"right":r,o=e.sortConversationList,a=e.renderSelfMoremenu,s=e.showSearchIcon,c=void 0===s||s,u=e.ChatFooterRightSlot,l=void 0===u?function(){return Object(f.jsx)(f.Fragment,{})}:u,d=e.customSendOptions,h=void 0!==d&&d,p=e.RenderCustomSendOptions,v=void 0===p?function(){return Object(f.jsx)(f.Fragment,{})}:p,b=e.showSideChatHeader,m=e.extraAttachmentOptions,g=void 0===m?[]:m,y=e.renderProfileBadge,w=void 0===y?function(e){return Object(f.jsx)(f.Fragment,{})}:y,_=e.customSend,x=void 0!==_&&_,j=e.handleCustomSend,k=void 0===j?function(){return!1}:j,O=e.sideBarHeaderSlot,S=e.chatHeaderRightSlot,E=e.chatHeaderMoreMenu,C=e.onChatChange,A=e.placeHolder,P=e.sideBarPlaceHolder,M=e.allowProfileClick,R=void 0===M||M,I=e.onNewConversation,T=e.onConversationsFetch;return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)("div",{className:"isoChat",children:Object(f.jsx)(rk,{onConversationsFetch:T,onNewConversation:I,showSideBarSearch:n,allowProfileClick:R,sortConversationList:o,renderSelfMoremenu:a,showSearchIcon:c,attachMentPosition:i,ChatFooterRightSlot:l,customSendOptions:h,RenderCustomSendOptions:v,extraAttachmentOptions:g,customSend:x,renderProfileBadge:w,handleCustomSend:k,sideBarHeaderSlot:O,chatHeaderRightSlot:S,chatHeaderMoreMenu:E,sideBarPlaceHolder:P,showSideChatHeader:b,onChatChange:C,placeHolder:A})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(478);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t,n="Mui"){const o=i[t];return o?`${n}-${o}`:`${r.a.generate(e)}-${t}`}},function(e,t,n){"use strict";const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})();t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),i=n(212);function o(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{Object(i.a)(e,t)})},e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(221);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(1),i=n(222);t.a=function(e){const t=r.useRef(e);return Object(i.a)(()=>{t.current=e}),r.useCallback((...e)=>(0,t.current)(...e),[])}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(477);function i(e,t,n="Mui"){const i={};return t.forEach(t=>{i[t]=Object(r.a)(e,t,n)}),i}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n(107);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Object(r.a)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error(Object(r.a)(10,i))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:n,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=r[1]+"%",r[2]=r[2]+"%"),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:""+r.join(", "),`${t}(${r})`}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),c=(e,t=(e+n/30)%12)=>i-s*Math.max(Math.min(t-3,9-t,1),-1);let f="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(f+="a",u.push(t[3])),a({type:f,values:u})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/"+t:e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function l(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3),i=n(5),o=n(220);const a=["values","unit","step"];function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,s=Object(i.a)(e,a),c=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>Object(r.a)({},e,{[t.key]:t.val}),{})})(t),f=Object.keys(c);function u(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function d(e,r){const i=f.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[f[i]]?t[f[i]]:r)-o/100}${n})`}return Object(r.a)({keys:f,values:c,up:u,down:l,between:d,only:function(e){return f.indexOf(e)+1<f.length?d(e,f[f.indexOf(e)+1]):u(e)},not:function(e){const t=f.indexOf(e);return 0===t?u(f[1]):t===f.length-1?l(f[t]):d(e,f[f.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}var c={borderRadius:4},f=n(11);var u=n(211),l=n(64);const d=["breakpoints","palette","spacing","shape"];t.a=function(e={},...t){const{breakpoints:n={},palette:a={},spacing:h,shape:p={}}=e,v=Object(i.a)(e,d),b=s(n),m=function(e=8){if(e.mui)return e;const t=Object(f.a)({spacing:e}),n=(...e)=>{return(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?n+"px":n}).join(" ")};return n.mui=!0,n}(h);let g=Object(o.a)({breakpoints:b,direction:"ltr",components:{},palette:Object(r.a)({mode:"light"},a),spacing:m,shape:Object(r.a)({},c,p)},v);return g=t.reduce((e,t)=>Object(o.a)(e,t),g),g.unstable_sxConfig=Object(r.a)({},l.a,null==v?void 0:v.unstable_sxConfig),g.unstable_sx=function(e){return Object(u.a)({sx:e,theme:this})},g}}])}));
|
|
206
|
+
`),dm.rippleVisible,ym,550,({theme:e})=>e.transitions.easing.easeInOut,dm.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,dm.child,dm.childLeaving,wm,550,({theme:e})=>e.transitions.easing.easeInOut,dm.childPulsate,_m,({theme:e})=>e.transitions.easing.easeInOut);var km=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:a}=n,s=Object(ue.a)(n,hm),[c,u]=r.useState([]),l=r.useRef(0),d=r.useRef(null);r.useEffect(()=>{d.current&&(d.current(),d.current=null)},[c]);const h=r.useRef(!1),p=r.useRef(0),v=r.useRef(null),b=r.useRef(null);r.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]);const m=r.useCallback(e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;u(e=>[...e,Object(f.jsx)(jm,{classes:{ripple:Object(le.a)(o.ripple,dm.ripple),rippleVisible:Object(le.a)(o.rippleVisible,dm.rippleVisible),ripplePulsate:Object(le.a)(o.ripplePulsate,dm.ripplePulsate),child:Object(le.a)(o.child,dm.child),childLeaving:Object(le.a)(o.childLeaving,dm.childLeaving),childPulsate:Object(le.a)(o.childPulsate,dm.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},l.current)]),l.current+=1,d.current=a},[o]),g=r.useCallback((e={},t={},n=(()=>{}))=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&h.current)return void(h.current=!1);"touchstart"===(null==e?void 0:e.type)&&(h.current=!0);const s=a?null:b.current,c=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let f,u,l;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)f=Math.round(c.width/2),u=Math.round(c.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;f=Math.round(t-c.left),u=Math.round(n-c.top)}if(o)l=Math.sqrt((2*c.width**2+c.height**2)/3),l%2==0&&(l+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-f),f)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;l=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===v.current&&(v.current=()=>{m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},p.current=setTimeout(()=>{v.current&&(v.current(),v.current=null)},80)):m({pulsate:r,rippleX:f,rippleY:u,rippleSize:l,cb:n})},[i,m]),y=r.useCallback(()=>{g({},{pulsate:!0})},[g]),w=r.useCallback((e,t)=>{if(clearTimeout(p.current),"touchend"===(null==e?void 0:e.type)&&v.current)return v.current(),v.current=null,void(p.current=setTimeout(()=>{w(e,t)}));v.current=null,u(e=>e.length>0?e.slice(1):e),d.current=t},[]);return r.useImperativeHandle(t,()=>({pulsate:y,start:g,stop:w}),[y,g,w]),Object(f.jsx)(xm,Object(fe.a)({className:Object(le.a)(dm.root,o.root,a),ref:b},s,{children:Object(f.jsx)(fm,{component:null,exit:!0,children:c})}))}));function Om(e){return Object(ke.a)("MuiButtonBase",e)}var Sm=Object(je.a)("MuiButtonBase",["root","disabled","focusVisible"]);const Em=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Cm=Object(we.a)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&."+Sm.disabled]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});var Am=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:a,className:s,component:c="button",disabled:u=!1,disableRipple:l=!1,disableTouchRipple:d=!1,focusRipple:h=!1,LinkComponent:p="a",onBlur:v,onClick:b,onContextMenu:m,onDragLeave:g,onFocus:y,onFocusVisible:w,onKeyDown:_,onKeyUp:x,onMouseDown:j,onMouseLeave:k,onMouseUp:O,onTouchEnd:S,onTouchMove:E,onTouchStart:C,tabIndex:A=0,TouchRippleProps:P,touchRippleRef:M,type:R}=n,I=Object(ue.a)(n,Em),T=r.useRef(null),L=r.useRef(null),D=Object(Me.a)(L,M),{isFocusVisibleRef:B,onFocus:N,onBlur:U,ref:F}=Object(rm.a)(),[z,W]=r.useState(!1);u&&z&&W(!1),r.useImperativeHandle(i,()=>({focusVisible:()=>{W(!0),T.current.focus()}}),[]);const[V,H]=r.useState(!1);r.useEffect(()=>{H(!0)},[]);const Y=V&&!l&&!u;function G(e,t,n=d){return Object(nm.a)(r=>{t&&t(r);return!n&&L.current&&L.current[e](r),!0})}r.useEffect(()=>{z&&h&&!l&&V&&L.current.pulsate()},[l,h,z,V]);const q=G("start",j),X=G("stop",m),K=G("stop",g),Z=G("stop",O),$=G("stop",e=>{z&&e.preventDefault(),k&&k(e)}),Q=G("start",C),J=G("stop",S),ee=G("stop",E),te=G("stop",e=>{U(e),!1===B.current&&W(!1),v&&v(e)},!1),ne=Object(nm.a)(e=>{T.current||(T.current=e.currentTarget),N(e),!0===B.current&&(W(!0),w&&w(e)),y&&y(e)}),re=()=>{const e=T.current;return c&&"button"!==c&&!("A"===e.tagName&&e.href)},ie=r.useRef(!1),oe=Object(nm.a)(e=>{h&&!ie.current&&z&&L.current&&" "===e.key&&(ie.current=!0,L.current.stop(e,()=>{L.current.start(e)})),e.target===e.currentTarget&&re()&&" "===e.key&&e.preventDefault(),_&&_(e),e.target===e.currentTarget&&re()&&"Enter"===e.key&&!u&&(e.preventDefault(),b&&b(e))}),ae=Object(nm.a)(e=>{h&&" "===e.key&&L.current&&z&&!e.defaultPrevented&&(ie.current=!1,L.current.stop(e,()=>{L.current.pulsate(e)})),x&&x(e),b&&e.target===e.currentTarget&&re()&&" "===e.key&&!e.defaultPrevented&&b(e)});let se=c;"button"===se&&(I.href||I.to)&&(se=p);const ce={};"button"===se?(ce.type=void 0===R?"button":R,ce.disabled=u):(I.href||I.to||(ce.role="button"),u&&(ce["aria-disabled"]=u));const he=Object(Me.a)(t,F,T);const pe=Object(fe.a)({},n,{centerRipple:o,component:c,disabled:u,disableRipple:l,disableTouchRipple:d,focusRipple:h,tabIndex:A,focusVisible:z}),ve=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o={root:["root",t&&"disabled",n&&"focusVisible"]},a=Object(de.a)(o,Om,i);return n&&r&&(a.root+=" "+r),a})(pe);return Object(f.jsxs)(Cm,Object(fe.a)({as:se,className:Object(le.a)(ve.root,s),ownerState:pe,onBlur:te,onClick:b,onContextMenu:X,onFocus:ne,onKeyDown:oe,onKeyUp:ae,onMouseDown:q,onMouseLeave:$,onMouseUp:Z,onDragLeave:K,onTouchEnd:J,onTouchMove:ee,onTouchStart:Q,ref:he,tabIndex:u?-1:A,type:R},ce,I,{children:[a,Y?Object(f.jsx)(km,Object(fe.a)({ref:D,center:o},P)):null]}))}));n(99);var Pm=Object(je.a)("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]);var Mm=Object(je.a)("MuiListItemButton",["root","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","selected"]);function Rm(e){return Object(ke.a)("MuiListItemSecondaryAction",e)}Object(je.a)("MuiListItemSecondaryAction",["root","disableGutters"]);const Im=["className"],Tm=Object(we.a)("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.disableGutters&&t.disableGutters]}})(({ownerState:e})=>Object(fe.a)({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},e.disableGutters&&{right:0})),Lm=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiListItemSecondaryAction"}),{className:i}=n,o=Object(ue.a)(n,Im),a=r.useContext(xe),s=Object(fe.a)({},n,{disableGutters:a.disableGutters}),c=(e=>{const{disableGutters:t,classes:n}=e,r={root:["root",t&&"disableGutters"]};return Object(de.a)(r,Rm,n)})(s);return Object(f.jsx)(Tm,Object(fe.a)({className:Object(le.a)(c.root,i),ownerState:s,ref:t},o))}));Lm.muiName="ListItemSecondaryAction";Object(we.a)("div",{name:"MuiListItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters,!n.disablePadding&&t.padding,n.button&&t.button,n.hasSecondaryAction&&t.secondaryAction]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!t.disablePadding&&Object(fe.a)({paddingTop:8,paddingBottom:8},t.dense&&{paddingTop:4,paddingBottom:4},!t.disableGutters&&{paddingLeft:16,paddingRight:16},!!t.secondaryAction&&{paddingRight:48}),!!t.secondaryAction&&{["& > ."+Mm.root]:{paddingRight:48}},{["&."+Pm.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+Pm.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+Pm.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},["&."+Pm.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"flex-start"===t.alignItems&&{alignItems:"flex-start"},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},t.button&&{transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Pm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}}},t.hasSecondaryAction&&{paddingRight:48})),Object(we.a)("li",{name:"MuiListItem",slot:"Container",overridesResolver:(e,t)=>t.container})({position:"relative"});Object(we.a)(Am,{shouldForwardProp:e=>Object(we.b)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,"flex-start"===n.alignItems&&t.alignItemsFlexStart,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})(({theme:e,ownerState:t})=>Object(fe.a)({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&."+Mm.selected]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity),["&."+Mm.focusVisible]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${Mm.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Object(Nt.a)(e.palette.primary.main,e.palette.action.selectedOpacity)}},["&."+Mm.focusVisible]:{backgroundColor:(e.vars||e).palette.action.focus},["&."+Mm.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},t.divider&&{borderBottom:"1px solid "+(e.vars||e).palette.divider,backgroundClip:"padding-box"},"flex-start"===t.alignItems&&{alignItems:"flex-start"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.dense&&{paddingTop:4,paddingBottom:4}));Object(je.a)("MuiListItemIcon",["root","alignItemsFlexStart"]);Object(we.a)("div",{name:"MuiListItemIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"flex-start"===n.alignItems&&t.alignItemsFlexStart]}})(({theme:e,ownerState:t})=>Object(fe.a)({minWidth:56,color:(e.vars||e).palette.action.active,flexShrink:0,display:"inline-flex"},"flex-start"===t.alignItems&&{marginTop:8}));var Dm=n(31);function Bm(e){return Object(ke.a)("MuiTypography",e)}Object(je.a)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const Nm=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],Um=Object(we.a)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align"+Object(Dm.a)(n.align)],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>Object(fe.a)({margin:0},"inherit"===t.variant&&{font:"inherit"},"inherit"!==t.variant&&e.typography[t.variant],"inherit"!==t.align&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Fm={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},zm={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"};var Wm=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTypography"}),r=(e=>zm[e]||e)(n.color),i=Yb(Object(fe.a)({},n,{color:r})),{align:o="inherit",className:a,component:s,gutterBottom:c=!1,noWrap:u=!1,paragraph:l=!1,variant:d="body1",variantMapping:h=Fm}=i,p=Object(ue.a)(i,Nm),v=Object(fe.a)({},i,{align:o,color:r,className:a,component:s,gutterBottom:c,noWrap:u,paragraph:l,variant:d,variantMapping:h}),b=s||(l?"p":h[d]||Fm[d])||"span",m=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:a}=e,s={root:["root",o,"inherit"!==e.align&&"align"+Object(Dm.a)(t),n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Object(de.a)(s,Bm,a)})(v);return Object(f.jsx)(Um,Object(fe.a)({as:b,ref:t,ownerState:v,className:Object(le.a)(m.root,a)},p))}));var Vm=Object(je.a)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);Object(we.a)("div",{name:"MuiListItemText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+Vm.primary]:t.primary},{["& ."+Vm.secondary]:t.secondary},t.root,n.inset&&t.inset,n.primary&&n.secondary&&t.multiline,n.dense&&t.dense]}})(({ownerState:e})=>Object(fe.a)({flex:"1 1 auto",minWidth:0,marginTop:4,marginBottom:4},e.primary&&e.secondary&&{marginTop:6,marginBottom:6},e.inset&&{paddingLeft:56}));n(139),n(140);let Hm;function Ym(){if(Hm)return Hm;const e=document.createElement("div"),t=document.createElement("div");return t.style.width="10px",t.style.height="1px",e.appendChild(t),e.dir="rtl",e.style.fontSize="14px",e.style.width="4px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.overflow="scroll",document.body.appendChild(e),Hm="reverse",e.scrollLeft>0?Hm="default":(e.scrollLeft=1,0===e.scrollLeft&&(Hm="negative")),document.body.removeChild(e),Hm}function Gm(e,t){const n=e.scrollLeft;if("rtl"!==t)return n;switch(Ym()){case"negative":return e.scrollWidth-e.clientWidth+n;case"reverse":return e.scrollWidth-e.clientWidth-n;default:return n}}function qm(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}const Xm=["onChange"],Km={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};var Zm=Object(Rb.a)(Object(f.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),$m=Object(Rb.a)(Object(f.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function Qm(e){return Object(ke.a)("MuiTabScrollButton",e)}var Jm=Object(je.a)("MuiTabScrollButton",["root","vertical","horizontal","disabled"]);const eg=["className","slots","slotProps","direction","orientation","disabled"],tg=Object(we.a)(Am,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.orientation&&t[n.orientation]]}})(({ownerState:e})=>Object(fe.a)({width:40,flexShrink:0,opacity:.8,["&."+Jm.disabled]:{opacity:0}},"vertical"===e.orientation&&{width:"100%",height:40,"& svg":{transform:`rotate(${e.isRtl?-90:90}deg)`}}));var ng=r.forwardRef((function(e,t){var n,r;const i=Object(_e.a)({props:e,name:"MuiTabScrollButton"}),{className:o,slots:a={},slotProps:s={},direction:c}=i,u=Object(ue.a)(i,eg),l="rtl"===Je().direction,d=Object(fe.a)({isRtl:l},i),h=(e=>{const{classes:t,orientation:n,disabled:r}=e,i={root:["root",n,r&&"disabled"]};return Object(de.a)(i,Qm,t)})(d),p=null!=(n=a.StartScrollButtonIcon)?n:Zm,v=null!=(r=a.EndScrollButtonIcon)?r:$m,b=ge({elementType:p,externalSlotProps:s.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),m=ge({elementType:v,externalSlotProps:s.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return Object(f.jsx)(tg,Object(fe.a)({component:"div",className:Object(le.a)(h.root,o),ref:t,role:null,ownerState:d,tabIndex:null},u,{children:"left"===c?Object(f.jsx)(p,Object(fe.a)({},b)):Object(f.jsx)(v,Object(fe.a)({},m))}))}));function rg(e){return Object(ke.a)("MuiTabs",e)}var ig=Object(je.a)("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]);const og=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],ag=(e,t)=>e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:e.firstChild,sg=(e,t)=>e===t?e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:e.lastChild,cg=(e,t,n)=>{let r=!1,i=n(e,t);for(;i;){if(i===e.firstChild){if(r)return;r=!0}const t=i.disabled||"true"===i.getAttribute("aria-disabled");if(i.hasAttribute("tabindex")&&!t)return void i.focus();i=n(e,i)}},fg=Object(we.a)("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& ."+ig.scrollButtons]:t.scrollButtons},{["& ."+ig.scrollButtons]:n.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,n.vertical&&t.vertical]}})(({ownerState:e,theme:t})=>Object(fe.a)({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},e.vertical&&{flexDirection:"column"},e.scrollButtonsHideMobile&&{["& ."+ig.scrollButtons]:{[t.breakpoints.down("sm")]:{display:"none"}}})),ug=Object(we.a)("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.scroller,n.fixed&&t.fixed,n.hideScrollbar&&t.hideScrollbar,n.scrollableX&&t.scrollableX,n.scrollableY&&t.scrollableY]}})(({ownerState:e})=>Object(fe.a)({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},e.fixed&&{overflowX:"hidden",width:"100%"},e.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},e.scrollableX&&{overflowX:"auto",overflowY:"hidden"},e.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),lg=Object(we.a)("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.flexContainer,n.vertical&&t.flexContainerVertical,n.centered&&t.centered]}})(({ownerState:e})=>Object(fe.a)({display:"flex"},e.vertical&&{flexDirection:"column"},e.centered&&{justifyContent:"center"})),dg=Object(we.a)("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(e,t)=>t.indicator})(({ownerState:e,theme:t})=>Object(fe.a)({position:"absolute",height:2,bottom:0,width:"100%",transition:t.transitions.create()},"primary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.primary.main},"secondary"===e.indicatorColor&&{backgroundColor:(t.vars||t).palette.secondary.main},e.vertical&&{height:"100%",width:2,right:0})),hg=Object(we.a)((function(e){const{onChange:t}=e,n=Object(ue.a)(e,Xm),i=r.useRef(),o=r.useRef(null),a=()=>{i.current=o.current.offsetHeight-o.current.clientHeight};return Object(Re.a)(()=>{const e=Object(Ue.a)(()=>{const e=i.current;a(),e!==i.current&&t(i.current)}),n=Object(Fe.a)(o.current);return n.addEventListener("resize",e),()=>{e.clear(),n.removeEventListener("resize",e)}},[t]),r.useEffect(()=>{a(),t(i.current)},[t]),Object(f.jsx)("div",Object(fe.a)({style:Km,ref:o},n))}),{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),pg={};var vg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTabs"}),i=Je(),o="rtl"===i.direction,{"aria-label":a,"aria-labelledby":s,action:c,centered:u=!1,children:l,className:d,component:h="div",allowScrollButtonsMobile:p=!1,indicatorColor:v="primary",onChange:b,orientation:m="horizontal",ScrollButtonComponent:g=ng,scrollButtons:y="auto",selectionFollowsFocus:w,slots:_={},slotProps:x={},TabIndicatorProps:j={},TabScrollButtonProps:k={},textColor:O="primary",value:S,variant:E="standard",visibleScrollbar:C=!1}=n,A=Object(ue.a)(n,og),P="scrollable"===E,M="vertical"===m,R=M?"scrollTop":"scrollLeft",I=M?"top":"left",T=M?"bottom":"right",L=M?"clientHeight":"clientWidth",D=M?"height":"width",B=Object(fe.a)({},n,{component:h,allowScrollButtonsMobile:p,indicatorColor:v,orientation:m,vertical:M,scrollButtons:y,textColor:O,variant:E,visibleScrollbar:C,fixed:!P,hideScrollbar:P&&!C,scrollableX:P&&!M,scrollableY:P&&M,centered:u&&!P,scrollButtonsHideMobile:!p}),N=(e=>{const{vertical:t,fixed:n,hideScrollbar:r,scrollableX:i,scrollableY:o,centered:a,scrollButtonsHideMobile:s,classes:c}=e,f={root:["root",t&&"vertical"],scroller:["scroller",n&&"fixed",r&&"hideScrollbar",i&&"scrollableX",o&&"scrollableY"],flexContainer:["flexContainer",t&&"flexContainerVertical",a&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",s&&"scrollButtonsHideMobile"],scrollableX:[i&&"scrollableX"],hideScrollbar:[r&&"hideScrollbar"]};return Object(de.a)(f,rg,c)})(B),U=ge({elementType:_.StartScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:B}),F=ge({elementType:_.EndScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:B});const[z,W]=r.useState(!1),[V,H]=r.useState(pg),[Y,G]=r.useState(!1),[q,X]=r.useState(!1),[K,Z]=r.useState(!1),[$,Q]=r.useState({overflow:"hidden",scrollbarWidth:0}),J=new Map,ee=r.useRef(null),te=r.useRef(null),ne=()=>{const e=ee.current;let t,n;if(e){const n=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollLeftNormalized:Gm(e,i.direction),scrollWidth:e.scrollWidth,top:n.top,bottom:n.bottom,left:n.left,right:n.right}}if(e&&!1!==S){const e=te.current.children;if(e.length>0){const t=e[J.get(S)];0,n=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:n}},re=Object(nm.a)(()=>{const{tabsMeta:e,tabMeta:t}=ne();let n,r=0;if(M)n="top",t&&e&&(r=t.top-e.top+e.scrollTop);else if(n=o?"right":"left",t&&e){const i=o?e.scrollLeftNormalized+e.clientWidth-e.scrollWidth:e.scrollLeft;r=(o?-1:1)*(t[n]-e[n]+i)}const i={[n]:r,[D]:t?t[D]:0};if(isNaN(V[n])||isNaN(V[D]))H(i);else{const e=Math.abs(V[n]-i[n]),t=Math.abs(V[D]-i[D]);(e>=1||t>=1)&&H(i)}}),ie=(e,{animation:t=!0}={})=>{t?function(e,t,n,r={},i=(()=>{})){const{ease:o=qm,duration:a=300}=r;let s=null;const c=t[e];let f=!1;const u=()=>{f=!0},l=r=>{if(f)return void i(new Error("Animation cancelled"));null===s&&(s=r);const u=Math.min(1,(r-s)/a);t[e]=o(u)*(n-c)+c,u>=1?requestAnimationFrame(()=>{i(null)}):requestAnimationFrame(l)};c===n?i(new Error("Element already at target position")):requestAnimationFrame(l)}(R,ee.current,e,{duration:i.transitions.duration.standard}):ee.current[R]=e},oe=e=>{let t=ee.current[R];M?t+=e:(t+=e*(o?-1:1),t*=o&&"reverse"===Ym()?-1:1),ie(t)},ae=()=>{const e=ee.current[L];let t=0;const n=Array.from(te.current.children);for(let r=0;r<n.length;r+=1){const i=n[r];if(t+i[L]>e){0===r&&(t=e);break}t+=i[L]}return t},se=()=>{oe(-1*ae())},ce=()=>{oe(ae())},he=r.useCallback(e=>{Q({overflow:null,scrollbarWidth:e})},[]),pe=Object(nm.a)(e=>{const{tabsMeta:t,tabMeta:n}=ne();if(n&&t)if(n[I]<t[I]){const r=t[R]+(n[I]-t[I]);ie(r,{animation:e})}else if(n[T]>t[T]){const r=t[R]+(n[T]-t[T]);ie(r,{animation:e})}}),ve=Object(nm.a)(()=>{P&&!1!==y&&Z(!K)});r.useEffect(()=>{const e=Object(Ue.a)(()=>{ee.current&&re()}),t=Object(Fe.a)(ee.current);let n;return t.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(e),Array.from(te.current.children).forEach(e=>{n.observe(e)})),()=>{e.clear(),t.removeEventListener("resize",e),n&&n.disconnect()}},[re]),r.useEffect(()=>{const e=Array.from(te.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&P&&!1!==y){const n=e[0],r=e[t-1],i={root:ee.current,threshold:.99},o=new IntersectionObserver(e=>{G(!e[0].isIntersecting)},i);o.observe(n);const a=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},i);return a.observe(r),()=>{o.disconnect(),a.disconnect()}}},[P,y,K,null==l?void 0:l.length]),r.useEffect(()=>{W(!0)},[]),r.useEffect(()=>{re()}),r.useEffect(()=>{pe(pg!==V)},[pe,V]),r.useImperativeHandle(c,()=>({updateIndicator:re,updateScrollButtons:ve}),[re,ve]);const be=Object(f.jsx)(dg,Object(fe.a)({},j,{className:Object(le.a)(N.indicator,j.className),ownerState:B,style:Object(fe.a)({},V,j.style)}));let me=0;const we=r.Children.map(l,e=>{if(!r.isValidElement(e))return null;const t=void 0===e.props.value?me:e.props.value;J.set(t,me);const n=t===S;return me+=1,r.cloneElement(e,Object(fe.a)({fullWidth:"fullWidth"===E,indicator:n&&!z&&be,selected:n,selectionFollowsFocus:w,onChange:b,textColor:O,value:t},1!==me||!1!==S||e.props.tabIndex?{}:{tabIndex:0}))}),xe=(()=>{const e={};e.scrollbarSizeListener=P?Object(f.jsx)(hg,{onChange:he,className:Object(le.a)(N.scrollableX,N.hideScrollbar)}):null;const t=P&&("auto"===y&&(Y||q)||!0===y);return e.scrollButtonStart=t?Object(f.jsx)(g,Object(fe.a)({slots:{StartScrollButtonIcon:_.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:U},orientation:m,direction:o?"right":"left",onClick:se,disabled:!Y},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e.scrollButtonEnd=t?Object(f.jsx)(g,Object(fe.a)({slots:{EndScrollButtonIcon:_.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:F},orientation:m,direction:o?"left":"right",onClick:ce,disabled:!q},k,{className:Object(le.a)(N.scrollButtons,k.className)})):null,e})();return Object(f.jsxs)(fg,Object(fe.a)({className:Object(le.a)(N.root,d),ownerState:B,ref:t,as:h},A,{children:[xe.scrollButtonStart,xe.scrollbarSizeListener,Object(f.jsxs)(ug,{className:N.scroller,ownerState:B,style:{overflow:$.overflow,[M?"margin"+(o?"Left":"Right"):"marginBottom"]:C?void 0:-$.scrollbarWidth},ref:ee,children:[Object(f.jsx)(lg,{"aria-label":a,"aria-labelledby":s,"aria-orientation":"vertical"===m?"vertical":null,className:N.flexContainer,ownerState:B,onKeyDown:e=>{const t=te.current,n=Object(ye.a)(t).activeElement;if("tab"!==n.getAttribute("role"))return;let r="horizontal"===m?"ArrowLeft":"ArrowUp",i="horizontal"===m?"ArrowRight":"ArrowDown";switch("horizontal"===m&&o&&(r="ArrowRight",i="ArrowLeft"),e.key){case r:e.preventDefault(),cg(t,n,sg);break;case i:e.preventDefault(),cg(t,n,ag);break;case"Home":e.preventDefault(),cg(t,null,ag);break;case"End":e.preventDefault(),cg(t,null,sg)}},ref:te,role:"tablist",children:we}),z&&be]}),xe.scrollButtonEnd]}))}));function bg(e){return Object(ke.a)("MuiTab",e)}var mg=Object(je.a)("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]);const gg=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],yg=Object(we.a)(Am,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.label&&n.icon&&t.labelIcon,t["textColor"+Object(Dm.a)(n.textColor)],n.fullWidth&&t.fullWidth,n.wrapped&&t.wrapped]}})(({theme:e,ownerState:t})=>Object(fe.a)({},e.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},t.label&&{flexDirection:"top"===t.iconPosition||"bottom"===t.iconPosition?"column":"row"},{lineHeight:1.25},t.icon&&t.label&&{minHeight:72,paddingTop:9,paddingBottom:9,["& > ."+mg.iconWrapper]:Object(fe.a)({},"top"===t.iconPosition&&{marginBottom:6},"bottom"===t.iconPosition&&{marginTop:6},"start"===t.iconPosition&&{marginRight:e.spacing(1)},"end"===t.iconPosition&&{marginLeft:e.spacing(1)})},"inherit"===t.textColor&&{color:"inherit",opacity:.6,["&."+mg.selected]:{opacity:1},["&."+mg.disabled]:{opacity:(e.vars||e).palette.action.disabledOpacity}},"primary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+mg.selected]:{color:(e.vars||e).palette.primary.main},["&."+mg.disabled]:{color:(e.vars||e).palette.text.disabled}},"secondary"===t.textColor&&{color:(e.vars||e).palette.text.secondary,["&."+mg.selected]:{color:(e.vars||e).palette.secondary.main},["&."+mg.disabled]:{color:(e.vars||e).palette.text.disabled}},t.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},t.wrapped&&{fontSize:e.typography.pxToRem(12)}));var wg,_g,xg,jg,kg=r.forwardRef((function(e,t){const n=Object(_e.a)({props:e,name:"MuiTab"}),{className:i,disabled:o=!1,disableFocusRipple:a=!1,fullWidth:s,icon:c,iconPosition:u="top",indicator:l,label:d,onChange:h,onClick:p,onFocus:v,selected:b,selectionFollowsFocus:m,textColor:g="inherit",value:y,wrapped:w=!1}=n,_=Object(ue.a)(n,gg),x=Object(fe.a)({},n,{disabled:o,disableFocusRipple:a,selected:b,icon:!!c,iconPosition:u,label:!!d,fullWidth:s,textColor:g,wrapped:w}),j=(e=>{const{classes:t,textColor:n,fullWidth:r,wrapped:i,icon:o,label:a,selected:s,disabled:c}=e,f={root:["root",o&&a&&"labelIcon","textColor"+Object(Dm.a)(n),r&&"fullWidth",i&&"wrapped",s&&"selected",c&&"disabled"],iconWrapper:["iconWrapper"]};return Object(de.a)(f,bg,t)})(x),k=c&&d&&r.isValidElement(c)?r.cloneElement(c,{className:Object(le.a)(j.iconWrapper,c.props.className)}):c;return Object(f.jsxs)(yg,Object(fe.a)({focusRipple:!a,className:Object(le.a)(j.root,i),ref:t,role:"tab","aria-selected":b,disabled:o,onClick:e=>{!b&&h&&h(e,y),p&&p(e)},onFocus:e=>{m&&!b&&h&&h(e,y),v&&v(e)},ownerState:x,tabIndex:b?0:-1},_,{children:["top"===u||"start"===u?Object(f.jsxs)(r.Fragment,{children:[k,d]}):Object(f.jsxs)(r.Fragment,{children:[d,k]}),l]}))}));function Og(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Sg=Q.b.div(wg||(wg=Og(["\n display: flex;\n padding: 0px 30px;\n overflow: scroll;\n ::-webkit-scrollbar {\n display: none;\n } \n -ms-overflow-style: none;\n scrollbar-width: none; \n"]))),Eg=Q.b.div(_g||(_g=Og(["\n height: 100px;\n width: 100px;\n margin: 4px;\n"]))),Cg=Q.b.div(xg||(xg=Og(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 100px;\n width: 100px;\n padding: 5px;\n backgroundrepeat: no-repeat;\n backgroundsize: cover;\n object-fit: cover;\n }\n"]))),Ag=Q.b.div(jg||(jg=Og(["\n height: 100px;\n width: 100px;\n background-image: linear-gradient( rgba(0,0,0,0) 70%, rgba(0,0,0,0.6) 100% );\n border-radius: 10px;\n padding: 5px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 90px; !important;\n border-radius: 10px;\n }\n .video_player{\n width: 90px;\n height: 100%;\n z-index: -1;\n }\n \n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n \n"])));var Pg,Mg,Rg,Ig,Tg,Lg,Dg=function(e){var t,n=e.conversationId,r=e.message,i=e.setTotalMediaFiles,o=(e.totalMediaFiles,null==r||null===(t=r.messages[n])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0}))),s=null==o?void 0:o.filter((function(e){var t,n;return Object(a.y)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.z)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)}));return i(s.length),Object(f.jsx)(Sg,{children:null==s?void 0:s.map((function(e){var t,n,r,i,o=null==e||null===(t=e.attachments[0])||void 0===t?void 0:t.extension;return Object(a.y)(o)?Object(f.jsx)(Eg,{children:Object(f.jsx)(Cg,{children:Object(f.jsx)($,{className:"media-images",src:null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl})})},null==e?void 0:e.id):Object(a.z)(o)?Object(f.jsx)(Eg,{children:Object(f.jsx)(Cg,{children:Object(f.jsx)(Ag,{children:Object(f.jsx)(Kd,{className:"custom_video_player",videoLink:null===(r=e.attachments[0])||void 0===r?void 0:r.mediaUrl,thumbUrl:null===(i=e.attachments[0])||void 0===i?void 0:i.thumbnailUrl})})})},null==e?void 0:e.id):void 0}))})},Bg="https://chatstorage.isometrik.io/chat-assets/images/watsappbg.png",Ng="https://chatstorage.isometrik.io/chat-assets/images/drkbg.jpg",Ug="https://chatstorage.isometrik.io/chat-assets/icons/right-arrow.svg";function Fg(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return zg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zg(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Vg=Q.b.div(Pg||(Pg=Wg(["\n display: flex;\n box-sizing: border-box;\n flex-wrap: wrap;\n justify-content: flex-start;\n cursor: pointer;\n margin-right: 1rem;\n"]))),Hg=Q.b.div(Mg||(Mg=Wg(["\n height: 112px;\n width: 112px;\n margin: 4px 4px 10px;\n display: flex;\n"]))),Yg=Q.b.div(Rg||(Rg=Wg(["\n display: flex;\n background-color: var(--chat-info-drawer-media-background);\n border-radius: 10px;\n background-image: linear-gradient(\n rgba(0, 0, 0, 0) 70%,\n rgba(0, 0, 0, 0.6) 100%\n );\n\n .media-images {\n height: 112px;\n width: 112px;\n padding: 10px;\n background-repeat: no-repeat;\n object-fit: cover;\n }\n"]))),Gg=Q.b.div(Ig||(Ig=Wg(["\n display: flex;\n overflow: scroll;\n flex-wrap: wrap;\n padding-top: 1rem;\n"]))),qg=Q.b.div(Tg||(Tg=Wg(["\n display: flex;\n width: 100%;\n height: 80vh;\n\n .no_media{\n margin: auto;\n }\n"]))),Xg=Q.b.div(Lg||(Lg=Wg(["\n height: 110px;\n width: 110px;\n border-radius: 10px;\n padding: 8px;\n > div{\n height: 100%;\n width: 100%;\n }\n .plyr--full-ui{\n height: 100%;\n min-width: 95px !important;\n }\n .play_icon{\n left: 40%;\n top: 40%;\n }\n .video_player{\n width: 95px;\n height: 100%;\n z-index: -1;\n }\n\n .play_icon{\n left: 40%;\n top: 40%;\n width: 10px;\n height: 10px;\n }\n\n .play_icon_wrapper{\n width: 30px !important;\n height: 30px !important;\n }\n"])));var Kg,Zg,$g,Qg,Jg=function(e){var t=e.handleImgVidClick,n=e.filteredData;return Object(f.jsx)(f.Fragment,{children:(null==n?void 0:n.length)>0?Object.entries(function(e){var t={};return null==e||e.forEach((function(e){var n,r,i,o=Object(a.u)(e.sentAt);t.hasOwnProperty(o)||(t[o]=[]),"document"!==(null==e?void 0:e.customType)&&t[o].push({timeStamp:null==e?void 0:e.sentAt,mediaUrl:null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaUrl,extension:null==e||null===(r=e.attachments[0])||void 0===r?void 0:r.extension,mediaId:null==e||null===(i=e.attachments[0])||void 0===i?void 0:i.mediaId})})),t}(n)).map((function(e){var n=Fg(e,2),r=n[0],i=n[1];return Object(f.jsxs)(f.Fragment,{children:[(null==i?void 0:i.length)>0&&Object(f.jsx)("span",{className:"letter",id:"".concat(r.toUpperCase()),children:r}),Object(f.jsx)(Gg,{children:(null==i?void 0:i.length)>0?i.map((function(e){var n=e.extension;return Object(a.y)(n)?Object(f.jsx)(Vg,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Hg,{children:Object(f.jsx)(Yg,{children:Object(f.jsx)($,{className:"media-images",src:null==e?void 0:e.mediaUrl})})})}):Object(a.z)(n)?Object(f.jsx)(Vg,{onClick:function(){return t(e.mediaId)},children:Object(f.jsx)(Hg,{children:Object(f.jsx)(Yg,{children:Object(f.jsx)(Xg,{children:Object(f.jsx)(Kd,{className:"custom_video_player",videoLink:e.mediaUrl,thumbUrl:e.thumbnailUrl})})})})}):Object(f.jsx)("p",{children:"Unsupported media format"})})):Object(f.jsx)(qg,{children:Object(f.jsx)("p",{className:"no_media",children:"No media"})})})]})})):Object(f.jsx)(qg,{children:Object(f.jsx)("p",{children:"No media"})})})};function ey(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ty(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ty(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ty(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ny(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ry=Q.b.div(Kg||(Kg=ny(["\n position: relative;\n flex-wrap: wrap;\n"]))),iy=Q.b.p(Zg||(Zg=ny(["\n color: var(--black);\n"]))),oy=Q.b.div($g||($g=ny([" \n margin: 0.25rem 0;\n padding: 0.5rem;\n width: fit-content;\n border-bottom-right-radius: 7.5px;\n border-bottom-left-radius: 7.5px;\n --tw-bg-opacity: 1;\n background-color: ",";\n position: relative;\n"])),(function(e){return e.selfChat?"var(--sender_chatbg)":"var(--toast-background)"})),ay=Q.b.div(Qg||(Qg=ny(["\n display: flex;\n justify-content: center;\n align-items: center;\n height: 80vh; \n"]))),sy=function(e){var t,n=e.mediaDocs,i=Object(o.b)("isometrikUserId"),a=ey(Object(r.useState)(),2),s=a[0],c=a[1];return Object(f.jsx)(ry,{children:(null==n||null===(t=n.filter((function(e){return"document"===(null==e?void 0:e.customType)})))||void 0===t?void 0:t.length)>0?n.filter((function(e){return"document"===(null==e?void 0:e.customType)})).map((function(e){var t;return Object(f.jsx)(oy,{selfChat:i===(null==e||null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||i===(null==e?void 0:e.senderId),children:Object(f.jsx)(Pd,{isNotShowDropDown:!0,chat:e,messageLength:s,setmessageLength:c})})})):Object(f.jsx)(ay,{children:Object(f.jsx)(iy,{children:"No Docs"})})})};function cy(e){return(cy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fy,uy,ly,dy,hy,py,vy,by,my,gy,yy,wy=["children","value","index"];function _y(e){return function(e){if(Array.isArray(e))return ky(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jy(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||jy(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jy(e,t){if(e){if("string"==typeof e)return ky(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ky(e,t):void 0}}function ky(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Oy(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Sy(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Oy(Object(n),!0).forEach((function(t){Ey(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Oy(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ey(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==cy(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==cy(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===cy(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cy(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Ay(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Py=Q.b.div(fy||(fy=Ay(["\n margin: 20px;\n max-width: auto%;\n border-radius: 7.5px;\n --wt-bg-opacity: 1;\n padding: 0.2rem 0.4rem;\n background-color: var(--sender_chatbg);\n // word-break: break-word;\n text-align: end;\n width: fit-content;\n"]))),My=Q.b.div(uy||(uy=Ay(["\n max-height: 10rem;\n overflow: scroll;\n color: var(--black);\n"]))),Ry=Q.b.div(ly||(ly=Ay(["\n padding: 20px 40px;\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n color: var(--black);\n"]))),Iy=Q.b.div(dy||(dy=Ay(["\n border-bottom: 1px solid var(--border_color);\n display: flex;\n flex-direction: column;\n padding: 20px 40px;\n color: var(--black);\n"]))),Ty=Q.b.div(hy||(hy=Ay(["\n background-color: var(--primary-white);\n"]))),Ly=Q.b.div(py||(py=Ay(["\n position: relative;\n padding: 0 1rem;\n"]))),Dy=Q.b.p(vy||(vy=Ay(["\n font-size: 16px;\n font-weight: 500;\n color: var(--profile-color);\n margin-bottom: 0;\n cursor: pointer;\n"]))),By=Q.b.h5(by||(by=Ay(["\n color: var(--chat-msg-text);\n font-size: 14px;\n margin-top: 1rem;\n margin-bottom: 0;\n text-align: ",";\n padding: ",";\n"])),(function(e){return e.textCenter?"center":"left"}),(function(e){return e.customPadding?"2rem 0":""})),Ny=Q.b.div(my||(my=Ay(["\n display: flex;\n align-items: center;\n gap: 0.5rem;\n"])));Q.b.div(gy||(gy=Ay(["\n width:30vw;\n","\n"])),Cn(Object(Q.a)(yy||(yy=Ay(["\n width:100vw;\n"])))));function Uy(e){var t=e.children,n=e.value,r=e.index,i=Cy(e,wy);return Object(f.jsx)("div",Sy(Sy({role:"tabpanel",hidden:n!==r,id:"simple-tabpanel-".concat(r),"aria-labelledby":"simple-tab-".concat(r)},i),{},{children:n===r&&Object(f.jsx)(Zb,{sx:{p:3},children:Object(f.jsx)(Wm,{children:t})})}))}function Fy(e){return{id:"simple-tab-".concat(e),"aria-controls":"simple-tabpanel-".concat(e)}}Uy.propTypes={children:D.a.node,index:D.a.number.isRequired,value:D.a.number.isRequired};var zy=function(e){var t,n,s,c,u,l,d,h,p,v,b,m,g,y,w,_,x,j,k=e.sidebarChatItem,E=e.setShowProfilePicture,C=e.setSearchedMessageArray,A=e.setDeleteChatModal,P=e.setUserBlockModal,M=e.userConversationDetail,R=e.theme,I=e.Messages,T=e.messageInfo,L=e.conversationId,D=e.messageChat,B=(e.mediaDocs,e.debounceSearchMessages),U=e.searchedMessageArray,F=e.searchMessageLoaderStatus,z=e.handleClosee,W=e.handler,V=(e.setMed,e.handleImgVidClick),H=e.enteredSearchQuery,Y=e.getPaginationMessagesData,G=e.setSearchShow,q=O(),X=q.baseImageUrl,K=q.manageProfile,Z=q.onViewProfilleClick,Q=q.dateFormat,J=q.renderChatMediaContainer,ee=q.mediaSidebarOutSideClick,te=q.state,ne=q.isSearchLoading,re=q.setIsSearchLoading,ie=q.s3ImageLinkGen,oe=xy(i.a.useState({top:!1,left:!1,bottom:!1,right:!1}),2),ae=oe[0],se=oe[1],ce=xy(i.a.useState(0),2),fe=ce[0],ue=ce[1],le=xy(Object(r.useState)(),2),de=le[0],he=le[1],pe=xy(Object(r.useState)(),2),ve=pe[0],be=pe[1],me=xy(Object(r.useState)(),2),ge=me[0],ye=me[1],we=Object(o.b)("isometrikUserId"),_e=Object(r.useRef)(null);Object(r.useEffect)((function(){e.searchShow&&document.getElementById("searchBar").focus()}),[null==e?void 0:e.searchShow]),Object(r.useEffect)((function(){if(D){var e={conversationId:L,messageId:null==D?void 0:D.messageId,limit:20,skip:0};Object(S.default)().message.getStatusDelivery(e).then((function(e){var t,n,r=Object(a.v)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));ye(r),ye((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error message ",e)})),Object(S.default)().message.getStatusRead(e).then((function(e){var t,n,r=Object(a.v)(new Date((null==e?void 0:e.users)&&(null==e||null===(t=e.users[0])||void 0===t?void 0:t.timestamp)));be(r),ye((null==e?void 0:e.users)&&(null==e||null===(n=e.users[0])||void 0===n?void 0:n.timestamp))})).catch((function(e){console.log("error while fetching message status",e)}))}}),[D]);var xe=function(e,t){return function(n){("keydown"!==n.type||"Tab"!==n.key&&"Shift"!==n.key)&&se(Sy(Sy({},ae),{},Ey({},e,t)))}},je=function(){z(),W()},ke=null==I||null===(t=I.messages[L])||void 0===t?void 0:t.filter((function(e){var t;return(null==e?void 0:e.attachments)&&(null==e||null===(t=e.attachments)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.mediaUrl.length)>0})),Oe=null==ke?void 0:ke.filter((function(e){var t,n;return Object(a.y)(null===(t=e.attachments[0])||void 0===t?void 0:t.extension)||Object(a.z)(null===(n=e.attachments[0])||void 0===n?void 0:n.extension)})),Se=function(e,t,n){G(!1);var r=document.getElementById("message_".concat(e)),i=e;if(_e.current=e,r){re(!1),_e.current=null,document.getElementById("allMessages").scroll(0,r.offsetTop-120);var o=document.querySelector(".isoChat .activeMsg");o&&o.classList.remove("activeMsg"),setTimeout((function(){r.classList.add("activeMsg")}),100)}else(function(e,t){return-1!==(t?_y(t):null!=te&&te.messages[L]?_y(null==te?void 0:te.messages[L]):[]).findIndex((function(t){return t.messageId===e}))})(i,n)||(re(!0),Y((function(e,t){null==e||e.length}),t))};return Object(r.useEffect)((function(){ne&&_e.current&&requestAnimationFrame((function(){Se(_e.current)}))}),[ne,te]),Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.slideShow||null!=e&&e.searchShow||T?Object(f.jsx)(N,{onClose:ee?function(e){return ee(e,je)}:je,children:ae.right||!K&&null!=e&&e.slideShow?Object(f.jsxs)("div",{className:"media_header mediaFiles",children:[Object(f.jsxs)("div",{className:"topHeader",children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header d-flex p-3":"contact_header d-flex p-3",children:[Object(f.jsx)($,{onClick:function(e){K?(xe("right",!1)(e),e.stopPropagation()):je()},src:wr,className:"closeIcon ".concat(null!=e&&e.theme?"darkicons":"lighticons")}),Object(f.jsx)("p",{className:"contactTitle ml-3",children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center p-2 topProfile",onClick:function(e){return Z?Z(null==k?void 0:k.opponentDetails,M):function(){return!0}},style:{cursor:"pointer"},children:[Object(f.jsx)("div",{className:"d-flex justify-content-between align-items-center",children:Object(f.jsxs)("div",{className:"d-flex justify-content-between align-items-center ml-2",children:[Object(f.jsx)("div",{style:{cursor:"pointer"},children:Object(f.jsx)(Ub,{className:"profile_img mr-2",src:X?ie(X,null==k||null===(n=k.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,80,320,320):null==k||null===(s=k.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic})}),Object(f.jsxs)("div",{children:[null!=k&&null!==(c=k.opponentDetails)&&void 0!==c&&null!==(c=c.metaData)&&void 0!==c&&c.firstName?Object(f.jsx)("p",{className:"fullname m-0",children:(null==k||null===(u=k.opponentDetails)||void 0===u?void 0:u.metaData.firstName)+" "+(null==k||null===(l=k.opponentDetails)||void 0===l?void 0:l.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"username m-0",style:{cursor:"pointer"},children:["@",null==k||null===(d=k.opponentDetails)||void 0===d?void 0:d.userName]})]})]})}),Object(f.jsx)("div",{className:"viewProfile",children:Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:Ug,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})})]})]}),J?J({conversation:M,messages:I}):Object(f.jsx)("div",{className:"bg-white ss",children:Object(f.jsxs)(Zb,{sx:{width:"100%",marginTop:"20px"},children:[Object(f.jsx)(Zb,{sx:{borderBottom:1,borderColor:"divider"},children:Object(f.jsxs)(vg,{value:fe,onChange:function(e,t){ue(t)},"aria-label":"basic tabs example",sx:{width:"100%"},children:[Object(f.jsx)(kg,Sy({label:"Media"},Fy(0))),Object(f.jsx)(kg,Sy({label:"Docs"},Fy(1)))]})}),Object(f.jsx)(Uy,{value:fe,index:0,children:Object(f.jsx)(Jg,{handleImgVidClick:V,filteredData:Oe})}),Object(f.jsx)(Uy,{value:fe,index:1,children:Object(f.jsx)(sy,{mediaDocs:Oe})}),Object(f.jsx)(Uy,{value:fe,index:2,children:"No Link Items"})]})})]}):Object(f.jsxs)("div",{className:"contact_container d-flex flex-column",style:{overflow:"hidden"},children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow||null!=e&&e.searchShow||T?"contact_header header":"contact_header",children:[Object(f.jsx)($,{onClick:je,src:wr,className:null!=e&&e.theme?"darkicons":"lighticons"}),Object(f.jsx)("p",{children:"".concat(null!=e&&e.slideShow?"Contact info":""," ").concat(null!=e&&e.searchShow?"Search Messages":""," ").concat(T?"Message Info":"")})]}),null!=e&&e.slideShow?Object(f.jsxs)("div",{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"showMe":"",children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(Ub,{className:"profile_image",src:X?ie(X,null==k||null===(h=k.opponentDetails)||void 0===h||null===(h=h.metaData)||void 0===h?void 0:h.profilePic,80,320,320):null==k||null===(p=k.opponentDetails)||void 0===p||null===(p=p.metaData)||void 0===p?void 0:p.profilePic,onClick:function(){return function(t){var n,r,i;E({showProfile:!0,userName:null==t||null===(n=t.opponentDetails)||void 0===n?void 0:n.userName,userImageSrc:X?ie(X,null==t||null===(r=t.opponentDetails)||void 0===r||null===(r=r.metaData)||void 0===r?void 0:r.profilePic,80,480,480):null==t||null===(i=t.opponentDetails)||void 0===i||null===(i=i.metaData)||void 0===i?void 0:i.profilePic,theme:null==e?void 0:e.theme})}(k)}})}),Object(f.jsx)("div",{className:"contact_name",children:Object(f.jsxs)("div",{children:[null!=k&&null!==(v=k.opponentDetails)&&void 0!==v&&null!==(v=v.metaData)&&void 0!==v&&v.firstName?Object(f.jsx)("p",{className:"fullname",children:(null==k||null===(b=k.opponentDetails)||void 0===b?void 0:b.metaData.firstName)+" "+(null==k||null===(m=k.opponentDetails)||void 0===m?void 0:m.metaData.lastName)}):"",Object(f.jsxs)("p",{className:"text_Color d-flex justify-content-center username",children:["@",null==k||null===(g=k.opponentDetails)||void 0===g?void 0:g.userName]})]})}),Object(f.jsx)("div",{className:"viewProfile text-center",onClick:function(){return Z?Z(null==k?void 0:k.opponentDetails,M):function(){return!0}},children:"View Profile"})]}),Object(f.jsxs)("div",{children:[["right"].map((function(t){return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"contactsocialInfo showMe msgFont text_Color pointer":"contactsocialInfo pointer",onClick:xe(t,!0),children:[Object(f.jsx)("span",{children:"Media And docs - "}),Object(f.jsx)("div",{children:Object(f.jsxs)("span",{"data-testid":"chevron-right-alt","data-icon":"chevron-right-alt",class:"aft2yglh pointer",children:[Object(f.jsx)("span",{style:{marginRight:"10px"},children:null==Oe?void 0:Oe.length}),Object(f.jsx)($,{style:{filter:"brightness(0.5)"},src:Ug,className:null!=e&&e.theme?"dark_footer_icon":"light_footer_icon"})]})})]}),Object(f.jsx)("div",{children:Object(f.jsx)(Dg,{message:I,conversationId:L,setTotalMediaFiles:he,totalMediaFiles:de})})]},t)})),K?Object(f.jsxs)("div",{className:null!=e&&e.slideShow?"text textt showMe":"text textt",children:[Object(f.jsxs)("p",{className:"pointer",onClick:function(){return P(!0)},children:[Object(f.jsx)($,{src:"https://chatstorage.isometrik.io/chat-assets/icons/block.svg",className:"icons svgg ".concat(null!=M&&M.messagingDisabled?"user_unblock":"")}),Object(f.jsxs)("span",{className:"".concat(null!=M&&M.messagingDisabled?"user_unblock":""," pointer btnn"),children:[null!=M&&M.messagingDisabled?"Unblock":"Block"," ",null==M||null===(y=M.opponentDetails)||void 0===y?void 0:y.userName]})]}),Object(f.jsxs)("p",{onClick:function(){return A(!0)},className:"pointer pb-4",children:[Object(f.jsx)($,{src:mp,className:"icons"}),Object(f.jsx)("span",{className:"pointer btnn",children:"Delete Chat "})]})]}):""]})]}):"",null!=e&&e.searchShow?Object(f.jsx)("div",{className:"contact_container",style:{height:"100%"},children:Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{className:"contact_profile",children:Object(f.jsx)(Pr,{setSearchedMessageArray:C,userSearchEnteredData:B,searchShow:null==e?void 0:e.searchShow,theme:R})}),Object(f.jsx)(Ly,{children:F?Object(f.jsx)(By,{textCenter:!0,customPadding:!0,children:"Looking for messages....."}):(null==U?void 0:U.length)>0?U.map((function(e){var t,n;return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(By,{children:Object(a.t)(null==e?void 0:e.sentAt,Q)}),Object(f.jsxs)(Ny,{children:[((null===(t=e.senderInfo)||void 0===t?void 0:t.userId)||(null==e?void 0:e.senderId))===we&&Object(f.jsx)(gl,{style:{marginLeft:"2px"},id:"singleTick"}),Object(f.jsx)(Dy,{onClick:function(){Se(e.messageId)},children:null===(n=Object(a.h)(null==e?void 0:e.body))||void 0===n?void 0:n.replace(/<br \/>/g," ")},e.messageId)]})]})})):(null==H?void 0:H.length)>0?Object(f.jsx)(By,{textCenter:!0,customPadding:!0,children:"No messages found"}):Object(f.jsx)("div",{className:"bg-white",children:Object(f.jsxs)("p",{className:"text_Color text-align-center searchmsg text-center",children:["Search for message with ",null==k||null===(w=k.opponentDetails)||void 0===w?void 0:w.userName," "]})})})]})}):"",T?Object(f.jsxs)("div",{className:"contact_container",style:{marginTop:"66px",backgroundColor:"var(--gray_color)"},children:[Object(f.jsx)(My,{style:{background:"url(".concat(null!=e&&e.theme?Ng:Bg,")"),backgroundRepeat:"no-repeat",backgroundSize:"cover"},className:"messageInfoBody",children:Object(f.jsx)(Py,{children:null!=D&&D.attachments&&0===(null==D||null===(_=D.attachments)||void 0===_||null===(_=_[0])||void 0===_?void 0:_.attachmentType)&&(null==D||null===(x=D.attachments)||void 0===x||null===(x=x[0])||void 0===x?void 0:x.mediaUrl.length)>0?Object(f.jsx)($,{style:{width:"21rem",height:"11rem"},src:null==D||null===(j=D.attachments[0])||void 0===j?void 0:j.mediaUrl}):Object(a.h)(null==D?void 0:D.body).replace(/<br \/>/g," ")})}),Object(f.jsxs)(Ty,{children:[Object(f.jsxs)(Ry,{children:[Object(f.jsx)("span",{children:"Read"}),Object(f.jsx)("span",{children:ve||"-"})]}),Object(f.jsxs)(Iy,{children:[Object(f.jsx)("span",{children:"Delivered "}),Object(f.jsx)("span",{children:ge?ve:"-"})]})," "]})]}):""]})}):"",Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .contact_container {\n max-width: 100vw;\n z-index: 3\n }\n }\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .media_Container{\n width: 70vw;\n }\n }\n \n "})]})};function Wy(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Vy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Vy(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Hy,Yy,Gy,qy,Xy,Ky,Zy,$y,Qy,Jy,ew,tw,nw,rw=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=Object(r.useState)(!0),o=Wy(i,2),a=o[0],s=o[1],c=Object(r.useRef)();Object(r.useEffect)((function(){c.current=e}),[e]);var f=Object(r.useCallback)((function(){a&&(s(!1),c.current.apply(c,arguments),n?s(!0):setTimeout((function(){return s(!0)}),t))}),[t,n,a,c]);return f};function iw(e){return(iw="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ow(e){return function(e){if(Array.isArray(e))return pw(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hw(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function aw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sw(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aw(Object(n),!0).forEach((function(t){cw(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aw(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cw(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==iw(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==iw(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===iw(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fw(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */fw=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==iw(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(iw(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function uw(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function lw(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){uw(o,r,i,a,s,"next",e)}function s(e){uw(o,r,i,a,s,"throw",e)}a(void 0)}))}}function dw(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||hw(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hw(e,t){if(e){if("string"==typeof e)return pw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pw(e,t):void 0}}function pw(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bw=Q.b.div(Hy||(Hy=vw(["\n padding: 28px;\n background-color: var(--intro-background);\n position: absolute;\n box-sizing: border-box;\n display: flex;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n width: 70vw;\n height: 100%;\n flex-direction: column;\n ","\n"])),Cn(Object(Q.a)(Yy||(Yy=vw(["\n display: none;\n "]))))),mw=Q.b.div(Gy||(Gy=vw(["\n position: absolute;\n background: var(--modal_color);\n color: var(--black);\n top: 45px;\n right: 20px;\n z-index: 999;\n padding: 1rem 0;\n display: flex;\n justify-content: center;\n align-items: center;\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n width: 230px;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(qy||(qy=vw(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),gw=(Q.b.div(Xy||(Xy=vw(["\n background-color: var(--modal_color);\n position: absolute;\n top: 45px;\n right: 20px;\n z-index: 999;\n width: 230px;\n color: var(--black);\n box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);\n visibility: hidden;\n transform: translateY(-10px);\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n transform-origin: right top;\n padding: 1rem 0;\n\n ","\n\n ","\n"])),(function(e){return e.isMenu&&Object(Q.a)(Ky||(Ky=vw(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))}),Cn(Object(Q.a)(Zy||(Zy=vw(["\n top: 50px;\n left: 150px;\n "]))))),Q.b.ul($y||($y=vw(["\n background: var(--modal_color);\n color: var(--black);\n box-shadow: -3px 0px 4px rgba(194, 194, 194, 0.25);\n border-radius: 4px;\n padding: 1rem 0;\n position: absolute;\n top: 8px;\n right: 0px;\n width: 180px;\n opacity: 0;\n cursor: pointer;\n visibility: hidden;\n transform: translateY(-10px);\n transform-origin: left top;\n transition: opacity 331ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,\n transform 220ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n z-index: 999;\n ","\n"])),(function(e){return e.isActive&&Object(Q.a)(Qy||(Qy=vw(["\n opacity: 1;\n visibility: visible;\n transform: translateY(0);\n "])))})),Q.b.li(Jy||(Jy=vw(["\n padding: 0 2rem;\n margin: 0;\n line-height: 2.5rem;\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 14.5px;\n color: var(--primary);\n padding-right: 58px !important;\n"]))),function(e,t){var n=[{id:1,header:"Contact info"},{id:6,header:"Clear chat"},{id:7,header:"Delete chat"},{id:9,header:e?"Unblock":"Block"}];if(!t&&e){var r=n.findIndex((function(e){return 9===e.id}));-1!==r&&n.splice(r,1)}return n}),yw=Q.b.div(ew||(ew=vw(["\n","\n","\n"])),(function(e){e.maxHeight;return"height: 100vh;\nposition: relative;\n"}),Cn(Object(Q.a)(tw||(tw=vw(["\nheight: ",";"])),(function(e){var t=e.maxHeight;return"calc(100vh - ".concat(t,"px)")})))),ww=Q.b.div(nw||(nw=vw(["\n color: var(--black);\n visibility: visible;\n user-select: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex-grow: 1;\n align-items: flex-start;\n font-size: 0.8125rem;\n line-height: 1.5385;\n min-height: 20px;\n"])));var _w,xw,jw,kw,Ow,Sw,Ew,Cw,Aw,Pw=function(e){var t,n,s,c,u,l,d,h=e.sidebarChatItem,p=(e.setSidebarChatItem,e.showSearchIcon),v=e.state,b=e.setState,m=e.setIsSidebarShow,g=e.preventMessageRef,y=e.getPaginationMessagesData,w=e.isSidebarShow,_=e.setShowProfilePicture,x=e.findUserId,j=e.setUserBlockModal,k=e.setClearChatModal,E=e.setDeleteChatModal,C=e.setslideShow,A=e.slideShow,P=e.setSearchShow,M=e.searchShow,R=e.setUserConversationDetail,I=e.userConversationDetail,L=e.setMessageInfo,D=e.messageInfo,B=e.debounceSearchMessages,U=e.enteredSearchQuery,F=e.searchedMessageArray,z=e.setSearchedMessageArray,W=e.searchMessageLoaderStatus,V=e.setMediaDocs,H=e.mediaDocs,G=e.sidebarData,q=e.userDetails,X=e.isPreviousMessageLoad,K=e.onChatChange,Z=e.placeHolder,Q=e.chatHeaderRightSlot,J=e.chatHeaderMoreMenu,ee=e.customSend,te=e.handleCustomSend,ne=void 0===te?function(){}:te,re=e.extraAttachmentOptions,ie=e.attachMentPosition,oe=e.ChatFooterRightSlot,ae=e.customSendOptions,se=e.RenderCustomSendOptions,ce=e.renderSelfMoremenu,fe=e.allowProfileClick,ue=e.renderProfileBadge,le=e.hasMessages,de=e.setHasMessages,he=Object(r.useRef)(),pe=dw(Object(r.useState)(!1),2),ve=(pe[0],pe[1]),be=dw(i.a.useState(null),2),me=be[0],ge=(be[1],dw(Object(r.useState)(!1),2)),ye=(ge[0],ge[1],dw(Object(r.useState)(!1),2)),we=ye[0],_e=ye[1],xe=dw(Object(r.useState)(!1),2),je=xe[0],ke=xe[1],Oe=dw(Object(r.useState)(""),2),Se=Oe[0],Ee=Oe[1],Ce=dw(Object(r.useState)(""),2),Ae=Ce[0],Pe=Ce[1],Me=dw(Object(r.useState)(""),2),Re=Me[0],Ie=Me[1],Te=dw(Object(r.useState)([]),2),Le=Te[0],De=Te[1],Be=dw(Object(r.useState)([]),2),Ne=Be[0],Ue=Be[1],Fe=dw(Object(r.useState)(0),2),ze=Fe[0],We=Fe[1],Ve=Object(r.useRef)(0),He=Object(r.useRef)(null),Ye=dw(Object(r.useState)(),2),Ge=Ye[0],qe=Ye[1],Xe=dw(Object(r.useState)({open:!1,message:"",variant:""}),2),Ke=Xe[0],Ze=Xe[1],$e=(Boolean(me),dw(Object(r.useState)(!1),2)),Qe=$e[0],Je=$e[1],et=dw(Object(r.useState)(!1),2),tt=et[0],nt=et[1],rt=O(),it=rt.theme,ot=(rt.manageProfile,rt.baseImageUrl),at=rt.showStatusMessages,st=rt.renderCustomChatMessageHeader,ct=rt.isGroup,ft=rt.s3ImageLinkGen,ut=function(){var e=lw(fw().mark((function e(){var t,n,r,i,a,s;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,"userBlockConversation"!==(null==I||null===(t=I.lastMessageDetails)||void 0===t?void 0:t.action)||(null==I||null===(n=I.lastMessageDetails)||void 0===n?void 0:n.initiatorId)!==Object(o.b)("isometrikUserId")){e.next=6;break}return nt(!0),e.abrupt("return");case 6:nt(!1);case 7:return e.next=9,Object(S.default)().user.getUserBlock({searchTag:null==I||null===(r=I.opponentDetails)||void 0===r?void 0:r.userName});case 9:i=e.sent,a=(null==i?void 0:i.users)||[],s=a.find((function(e){return e.userId===Object(o.b)("isometrikUserId")})),nt(!!s),e.next=19;break;case 15:return e.prev=15,e.t0=e.catch(0),nt(!1),e.abrupt("return");case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){(null!=I&&I.updateBlockStatus||null!=I&&I.messagingDisabled)&&ut()}),[I]);var lt=function(){wt(),C(!0),P(!1),L(!1),ve(!0)},dt=function(){C(!1),P(!0),L(!1)},ht=rw(lw(fw().mark((function e(){var t;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={conversationId:null==h?void 0:h.conversationId},e.prev=1,!Re){e.next=5;break}return e.next=5,Object(S.default)().message.postIndicateTyping(t).then((function(e){}));case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error(e.t0);case 10:case"end":return e.stop()}}),e,null,[[1,7]])}))),3e3,!1),pt=function(){var e=lw(fw().mark((function e(t){var n,r;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={conversationId:t},at||(n.includeConversationStatusMessagesInUnreadMessagesCount=!1),e.prev=2,!((null==Object||null===(r=Object.keys(t))||void 0===r?void 0:r.length)>0)){e.next=6;break}return e.next=6,Object(S.default)().Conversation.getConversationDetails(n,t).then((function(e){var t,n,r,i;-1===(null==e||null===(t=e.conversationDetails)||void 0===t||null===(t=t.opponentDetails)||void 0===t?void 0:t.lastSeen)?ke(!0):(ke(!1),console.log("last Seen from API - ",null==e||null===(n=e.conversationDetails)||void 0===n||null===(n=n.opponentDetails)||void 0===n?void 0:n.lastSeen,new Date(null==e||null===(r=e.conversationDetails)||void 0===r||null===(r=r.opponentDetails)||void 0===r?void 0:r.lastSeen)),Ee(null==e||null===(i=e.conversationDetails)||void 0===i||null===(i=i.opponentDetails)||void 0===i?void 0:i.lastSeen))}));case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),console.error(e.t0);case 11:case"end":return e.stop()}}),e,null,[[2,8]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e;if(h)return P(!1),Ee(null==h||null===(e=h.opponentDetails)||void 0===e?void 0:e.lastSeen),null!=h&&h.conversationId?he.current=setInterval((function(){pt(null==h?void 0:h.conversationId)}),3e4):clearInterval(he.current),function(){return clearInterval(he.current)}}),[h,at]),Object(r.useEffect)((function(){!function(e){if(!e)return Pe(!1),!1;try{var t=new Date(e),n=new Date;if(t.getTime()>n.getTime())console.log("Invalid input");else{var r=Math.round((n.getTime()-t.getTime())/An.t),i=Math.round((n.getTime()-t.getTime())/An.o),o=Math.round((n.getTime()-t.getTime())/An.b),s=Math.round((n.getTime()-t.getTime())/An.e),c=Math.round((n.getTime()-t.getTime())/An.m),f=Math.round((n.getTime()-t.getTime())/An.p);Pe(f<60?"🟢 last seen just now":c<60?"Last seen ".concat(1===c?"a minute":c+" min"," ago"):s<24?1===s?"Last seen at ".concat(Object(a.v)(t)):"Last seen ".concat(t.getDate()===n.getDate()?"at ".concat(Object(a.v)(t)):"yesterday"):"Last seen ".concat(o<30?1===o?"a day":o+" days":i<12?1===i?"a month":i+" months":1===r?"an year":r+" years"," ago"))}}catch(e){console.error("Error calculating lastSeen from getLastSeen()")}}(Se)}),[Se]),Object(r.useEffect)((function(){var e;-1===(null==h||null===(e=h.opponentDetails)||void 0===e?void 0:e.lastSeen)?ke(!0):ke(!1),ht()}),[x,Re,null==h?void 0:h.conversationId]);var vt=Object(o.b)("isometrikUserId");Object(r.useEffect)((function(){if("typingEvent"===(null==x?void 0:x.action)&&x.conversationId===(null==h?void 0:h.conversationId)&&x.userId!==vt&&_e(!0),x){var e=setTimeout((function(){return _e(!1)}),3e3);return function(){return clearTimeout(e)}}return _e(!0)}),[x]),Object(r.useEffect)((function(){null!=h&&h.conversationId?(K(!0,h),function(){var e=lw(fw().mark((function e(){var t;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(a.w)({id:null==h?void 0:h.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:at});case 2:t=e.sent,R(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()()):K(!1)}),[h]),Object(r.useEffect)((function(){var e;de(!1);var t={conversationId:null==h?void 0:h.conversationId};at||(t.conversationStatusMessage=!1),b((function(e){return sw(sw({},e),{},{messagesLoading:!0})})),h&&(null===(e=Object(S.default)())||void 0===e||null===(e=e.message)||void 0===e||e.getMessages(t).then((function(e){var t=e.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse();null!=t&&t.length&&de(!0),b((function(e){return sw(sw({},e),{},{messagesLoading:!1,messages:sw(sw({},null==e?void 0:e.messages),{},cw({},null==h?void 0:h.conversationId,t))})})),requestAnimationFrame((function(){v.messages&&document.getElementById("allMessages")&&document.getElementById("allMessages").scrollTo({top:document.getElementById("allMessages").scrollHeight})}))})).catch((function(e){b((function(e){return sw(sw({},e),{},{messagesLoading:!1})})),console.log(e,"errrrrrrrrrrrrrrrrrrr")})))}),[h]),Object(r.useRef)(null);var bt=dw(Object(r.useState)(!1),2),mt=bt[0],gt=bt[1],yt=function(){m(!1),Object(o.d)("isShow",!1),b(sw(sw({},v),{},{selectedConvId:""})),G(null)},wt=function(){var e=lw(fw().mark((function e(){var t,n,r,i;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=null==h?void 0:h.conversationId,n={limit:20,skip:0,isGroup:ct,conversationId:t,attachmentTypes:0},e.prev=2,e.next=5,Object(S.default)().message.getMessages(n);case 5:return r=e.sent,Ue(ow(null==r?void 0:r.messages)),V(ow(null==r?void 0:r.messages)),i=[],null==r||r.messages.forEach((function(e){return e.attachments.forEach((function(e){return i.push(e)}))})),De([].concat(i)),e.abrupt("return",r);case 14:e.prev=14,e.t0=e.catch(2),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[2,14]])})));return function(){return e.apply(this,arguments)}}(),_t=function(){var e=lw(fw().mark((function e(t){var n,r,i,o,a;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(-1!==(n=Le.findIndex((function(e){return e.mediaId===t})))){e.next=15;break}return e.prev=2,e.next=5,wt();case 5:(r=e.sent)&&(o=r.messages.findIndex((function(e){var n;return(null==e||null===(n=e.attachments[0])||void 0===n?void 0:n.mediaId)===t})),Ve.current=o,We(o),null===(i=He.current)||void 0===i||i.showModal()),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(2),console.error("error",e.t0),Ze({open:!0,variant:"error",message:e.t0.messages});case 13:e.next=18;break;case 15:Ve.current=n,We(n),null===(a=He.current)||void 0===a||a.showModal();case 18:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}();return Object(f.jsxs)(f.Fragment,{children:[null!=e&&e.sidebarChatItem?Object(f.jsxs)("div",{className:"mainChat",children:[st?st({arrowClick:yt,handleClickSlideShow:lt,baseImageUrl:ot,s3ImageLinkGen:ft,sidebarChatItem:h,isActive:mt,setIsActive:gt,getSelfMenuBar:gw,userConversationDetail:I,setClearChatModal:k,setDeleteChatModal:E,setUserBlockModal:j,searchShowHandler:dt}):Object(f.jsxs)("div",{className:"chat_header",children:[Object(f.jsx)("span",{className:"arrow_icon",children:Object(f.jsx)($,{src:yr,className:null!=e&&e.theme?"darkicons":"lighticons",style:{marginRight:"10px"},onClick:yt})}),null!=h&&null!==(t=h.opponentDetails)&&void 0!==t&&null!==(t=t.metaData)&&void 0!==t&&t.profilePic?Object(f.jsx)("img",{onClick:fe?lt:function(){},src:ot?ft(ot,null==h||null===(n=h.opponentDetails)||void 0===n||null===(n=n.metaData)||void 0===n?void 0:n.profilePic,70,120,120):null==h||null===(s=h.opponentDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.profilePic,className:"user_image pointer",alt:"opponent_profile_picture"}):Object(f.jsx)("div",{onClick:fe?lt:function(){},class:"userContact_image d-flex align-items-center justify-content-center",style:{textAlign:"center",margin:0,height:"41px",width:"41px"},children:null!=h&&null!==(c=h.opponentDetails)&&void 0!==c&&c.userName?null==h||null===(u=h.opponentDetails)||void 0===u?void 0:u.userName.charAt(0).toUpperCase():""}),Object(f.jsxs)("div",{className:"chat_headerInfo",children:[Object(f.jsxs)("div",{className:"d-flex userNameWrap align-items-center",children:[Object(f.jsx)("p",{style:{fontSize:null==T?void 0:T.name},onClick:fe?lt:function(){},className:"pointer",children:null==h||null===(l=h.opponentDetails)||void 0===l?void 0:l.userName}),ue?ue(h,!1):""]}),Object(f.jsx)(ww,{children:function(){var e=-1;switch(we&&(null==x?void 0:x.conversationId)===(null==h?void 0:h.conversationId)?e=0:!we&&je?e=1:we||je||(e=2),e){case 0:return"typing...";case 1:return"Online";case 2:default:return Ae}}()}),Object(f.jsx)("div",{className:"chat_headerInfo",children:JSON.stringify(null==h?void 0:h.online)})]}),Object(f.jsxs)("div",{className:"chat_header_right",children:[Q?Object(f.jsx)(f.Fragment,{children:Q}):Object(f.jsx)(f.Fragment,{}),p?Object(f.jsx)("span",{className:"mx-2 icons pointer search_icon",children:Object(f.jsx)($,{onClick:dt,src:_r,className:it?"darkicons":"lighticons"})}):"",Object(f.jsxs)(N,{onClose:function(){return gt(!1)},children:[Object(f.jsx)("span",{className:"icons pointer menu_icon",children:Object(f.jsx)($,{isActive:mt,onClick:function(){return gt(!mt)},src:Lu,className:it?"darkicons":"lighticons"})}),Object(f.jsx)(mw,{isActive:mt,className:"selfMenuWrap",children:Object(f.jsx)(Y,{renderSelfMoremenu:ce,menuData:gw(null==I?void 0:I.messagingDisabled,tt),isMenu:mt,setIsMenu:gt,setClearChatModal:k,setDeleteChatModal:E,setUserBlockModal:j,handleClickSlideShow:lt,searchShowHandler:dt,userConversationDetail:I})})]})]}),J?Object(f.jsx)(f.Fragment,{children:J}):Object(f.jsx)(f.Fragment,{})]}),Object(f.jsx)(yw,{className:"chatBox d-flex flex-column",style:{background:"url(".concat(!0===(null==e?void 0:e.theme)?Ng:Bg,")")},maxHeight:null===(d=document.querySelector(".isoChat .chat_footer"))||void 0===d?void 0:d.offsetHeight,children:Object(f.jsx)(Mb,{extraAttachmentOptions:re,customSend:ee,handleCustomSend:ne,sidebarChatItem:h,messages:null==v?void 0:v.messages,theme:it,getPaginationMessagesData:y,preventMessageRef:g,findUserId:x,state:v,setState:b,setGetMessageTextLength:Ie,userConversationDetail:I,setslideShow:C,setMessageInfo:L,messageInfo:D,setMessageChat:qe,slideShow:A,setSearchShow:P,setMediaDocs:V,userDetails:q,handleImgVidClick:_t,setIsOpen:Je,isOpen:Qe,getMediaDocs:wt,setToastStatus:Ze,isPreviousMessageLoad:X,attachMentPosition:ie,ChatFooterRightSlot:oe,customSendOptions:ae,RenderCustomSendOptions:se,isBlocked:tt,hasMessages:le,setHasMessages:de})})]}):Object(f.jsx)(f.Fragment,{children:Z?Object(f.jsx)(f.Fragment,{children:Z}):Object(f.jsx)("div",{className:"chatbox_Bg",children:Object(f.jsx)(bw,{className:"bg",children:Object(f.jsxs)("div",{children:[Object(f.jsx)("div",{children:Object(f.jsx)($,{src:"https://chatstorage.isometrik.io/chat-assets/icons/placeholder.svg"})}),Object(f.jsx)("div",{children:Object(f.jsx)("h1",{children:"Isometrik Chat"})}),Object(f.jsx)("div",{className:"text_Color text",children:"Isometrik web chat is fully sync with mobile isomterik chat , all charts are synced when connected to the network"})]})})})}),Object(f.jsx)("div",{className:"".concat(A||M||D?"contactInfo":"contact"," ").concat("sideBarFix"),children:h?Object(f.jsx)(zy,{handleClosee:function(){C(!1),P(!1),L(!1)},searchShow:M,sidebarChatItem:null==e?void 0:e.sidebarChatItem,handler:function(){ve(!1)},slideShow:A,mediaContact:function(){C(!0)},theme:it,setShowProfilePicture:_,setDeleteChatModal:E,userConversationDetail:I,setUserBlockModal:j,Messages:v,setMessageInfo:L,messageInfo:D,conversationId:null==h?void 0:h.conversationId,setMessageChat:qe,messageChat:Ge,mediaDocs:H,debounceSearchMessages:B,enteredSearchQuery:U,searchedMessageArray:F,setSearchedMessageArray:z,searchMessageLoaderStatus:W,handleImgVidClick:_t,getPaginationMessagesData:y,setSearchShow:P}):""}),!Qe&&Object(f.jsx)(sh,{dialogueBoxRef:He,style:{maxHeight:"100%"},children:Object(f.jsxs)("div",{className:"d-flex justify-content-center",style:{flexDirection:"column"},children:[Object(f.jsx)(fh,{chatMedia:Ne,selectedMediaIndex:ze,scrolledPositionRef:Ve}),Object(f.jsx)(Qd,{assets:Le,selectedMediaIndex:ze,scrolledPositionRef:Ve})]})}),Object(f.jsx)(f.Fragment,{children:Object(f.jsx)(Ws,{message:Ke.message,variant:Ke.variant,open:Ke.open,onClose:function(){return Ze({open:!1})},theme:it})}),Object(f.jsx)("style",{jsx:!0,children:"\n @media (max-width: 48rem) {\n .mainChat {\n width: 100vw;\n display: ".concat(w?"block":"none",";\n }\n .contactInfo {\n width: 100vw;\n position: fixed;\n z-index: 999;\n top: 0;\n right: 0;\n }\n }\n @media (min-width: 48rem) {\n .mainChat .arrow_icon {\n display: none;\n }\n }\n\n @media screen and (min-width: 1024px) and (max-width: 1300px){\n .crausalView{\n height: 70vh;\n }\n }\n ")})]})};function Mw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Rw,Iw,Tw,Lw,Dw,Bw,Nw,Uw,Fw,zw=Q.b.div(_w||(_w=Mw(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),Cn(Object(Q.a)(xw||(xw=Mw(["\n max-width: 320px;\n "]))))),Ww=Q.b.h5(jw||(jw=Mw(["\n margin-top: 20px;\n ","\n"])),Cn(Object(Q.a)(kw||(kw=Mw(["\n font-size: 18px;\n"]))))),Vw=Q.b.p(Ow||(Ow=Mw(["\n font-size: 18px;\n ","\n"])),Cn(Object(Q.a)(Sw||(Sw=Mw(["\n font-size: 14px;\n"]))))),Hw=Q.b.div(Ew||(Ew=Mw(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),Cn(Object(Q.a)(Cw||(Cw=Mw(["\n margin:1.5rem 0 20px;\n"]))))),Yw=Q.b.button(Aw||(Aw=Mw(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),Gw=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(zw,{className:"isoChat",children:[Object(f.jsx)(Ww,{children:"Clear this chat ?"}),Object(f.jsx)(Vw,{className:"subTitle1",children:"Performing this action will cause the chat history to be deleted for you. You will be able to continue chatting with this user but will not be able to view the chat history once this action has been performed."}),Object(f.jsx)(Vw,{className:"subTitle mt-2",children:"Are you sure you want to Clear this chat?"}),Object(f.jsxs)(Hw,{className:"logoutActionbtn",children:[Object(f.jsx)(Yw,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(Yw,{className:"logoutBtn",onClick:n,children:"Clear chat"})]})]})};function qw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Xw,Kw,Zw,$w,Qw,Jw,e_,t_,n_,r_=Q.b.div(Rw||(Rw=qw(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),Cn(Object(Q.a)(Iw||(Iw=qw(["\n max-width: 320px;\n "]))))),i_=Q.b.h5(Tw||(Tw=qw(["\n margin-top: 20px;\n ","\n"])),Cn(Object(Q.a)(Lw||(Lw=qw(["\n font-size: 18px;\n"]))))),o_=Q.b.p(Dw||(Dw=qw(["\n font-size: 18px;\n ","\n"])),Cn(Object(Q.a)(Bw||(Bw=qw(["\n font-size: 14px;\n"]))))),a_=Q.b.div(Nw||(Nw=qw(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),Cn(Object(Q.a)(Uw||(Uw=qw(["\n margin:1.5rem 0 20px;\n"]))))),s_=Q.b.button(Fw||(Fw=qw(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),c_=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick;return Object(f.jsxs)(r_,{className:"isoChat sureDelete",children:[Object(f.jsx)(i_,{children:"Delete this chat?"}),Object(f.jsx)(o_,{className:"subTitle1",children:"Performing this action will cause the chat history and the conversation to be deleted from the chat list. You will be able to start a chat with this user again but the chat history will not be visible."}),Object(f.jsx)(o_,{className:"subTitle mt-2",children:"Are you sure you want to Delete this Chat?"}),Object(f.jsxs)(a_,{className:"logoutActionbtn",children:[Object(f.jsx)(s_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(s_,{className:"logoutBtn",onClick:n,children:"Delete chat"})]})]})};function f_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var u_,l_,d_,h_,p_,v_,b_,m_,g_,y_,w_,__=Q.b.div(Xw||(Xw=f_(["\n background-color: var(--modal_color);\n color: var(--black);\n position: absolute;\n width: 32rem;\n top: 50%;\n left: 50%;\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n -webkit-transform: translate(-50%,-50%);\n -ms-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n padding: 20px 24px 6px 22px;\n ","\n"])),Cn(Object(Q.a)(Kw||(Kw=f_(["\n max-width: 320px;\n "]))))),x_=Q.b.h5(Zw||(Zw=f_(["\n margin-top: 20px;\n ","\n"])),Cn(Object(Q.a)($w||($w=f_(["\n font-size: 18px;\n"]))))),j_=Q.b.p(Qw||(Qw=f_(["\n font-size: 18px;\n ","\n"])),Cn(Object(Q.a)(Jw||(Jw=f_(["\n font-size: 14px;\n"]))))),k_=Q.b.div(e_||(e_=f_(["\ndisplay:flex;\njustify-content: flex-end;\nmargin:3rem 0 20px;\n\n","\n\n.cancleBtn{\n background:var(--iso_white);\n color:var(--button-primary-background);\n border:1px solid var(--border_color);}\n\n.logoutBtn{\n background-color:var(--button-primary-background);\n color:var(--iso_white);\n} \n"])),Cn(Object(Q.a)(t_||(t_=f_(["\n margin:1.5rem 0 20px;\n"]))))),O_=Q.b.button(n_||(n_=f_(["\n margin-left:15px;\n border-radius:20px;\n border:none;\n padding:5px 20px 5px 20px;\n"]))),S_=function(e){var t=e.cancelButtonClick,n=e.confirmButtonClick,r=e.isUserBlocked,i=e.userName;return Object(f.jsxs)(__,{children:[Object(f.jsx)(x_,{children:r?"Unblock ".concat(i," ?"):"Block ".concat(i," ?")}),Object(f.jsx)(j_,{children:"".concat(r?" ":"Are you sure you want to block ".concat(i,", blocked users will no longer be able to message you ?"))}),Object(f.jsxs)(k_,{className:"logoutActionbtn",children:[Object(f.jsx)(O_,{className:"cancleBtn",onClick:t,children:"Cancel"}),Object(f.jsx)(O_,{className:"logoutBtn",onClick:n,children:r?"Unblock":"Block"})]})]})};function E_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var C_,A_,P_,M_=Q.b.div(u_||(u_=E_(["\n width: 100vw;\n height: 100vh;\n position: absolute;\n top: 0;\n background: var(--primary-white);\n padding: 1rem 3rem;\n display: flex;\n flex-direction: column;\n z-index: 999;\n ","\n .user_profile_picture_major{\n width: 512px;\n height: 512px;\n margin: auto;\n object-fit: cover;\n ","\n }\n"])),Cn(Object(Q.a)(l_||(l_=E_(["\n padding: 1rem 0;\n "])))),Cn(Object(Q.a)(d_||(d_=E_(["\n width: 100%;\n height: 100%;\n max-height: 400px;\n aspect-ratio: 1/1;\n "]))))),R_=Q.b.div(h_||(h_=E_(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n\n ","\n\n .cross_icon{\n height: 24px;\n width: 24px;\n cursor: pointer;\n ","\n }\n .dark__theme{\n filter: invert(1);\n }\n"])),Cn(Object(Q.a)(p_||(p_=E_(["\n padding-left: 2rem;\n "])))),Cn(Object(Q.a)(v_||(v_=E_(["\n display: none;\n "]))))),I_=Q.b.div(b_||(b_=E_(["\n display: flex;\n align-items: center;\n\n .user_profile_picture{\n width: 40px;\n height: 40px;\n border-radius: 50%;\n object-fit: cover;\n ","\n }\n\n .back_icon{\n display: none;\n ","\n }\n"])),Cn(Object(Q.a)(m_||(m_=E_(["\n display: none;\n "])))),Cn(Object(Q.a)(g_||(g_=E_(["\n height: 16px;\n width: 20px;\n cursor: pointer;\n display: block;\n margin-right: 1rem;\n "]))))),T_=Q.b.p(y_||(y_=E_(["\n margin-bottom: 0;\n color: var(--black);\n margin-left: 1rem;\n"]))),L_=Q.b.div(w_||(w_=E_(["\n max-width: 512px;\n max-height: 512px;\n margin: auto;\n"]))),D_=function(e){var t=e.userName,n=e.userImageSrc,r=e.closeHandler,i=e.theme;return Object(f.jsxs)(M_,{children:[Object(f.jsxs)(R_,{theme:i,children:[Object(f.jsxs)(I_,{children:[Object(f.jsx)($,{src:yr,className:"".concat(i?"dark__theme":""," back_icon"),onClick:r}),Object(f.jsx)($,{className:"user_profile_picture",src:n,alt:"user_profile_picture"}),Object(f.jsx)(T_,{children:t})]}),Object(f.jsx)($,{onClick:r,src:wr,className:"".concat(i?"dark__theme":""," cross_icon")})]}),Object(f.jsx)(L_,{children:Object(f.jsx)(N,{onClose:r,children:Object(f.jsx)($,{className:"user_profile_picture_major",src:n,alt:"user_profile_picture"})})})]})};function B_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var N_,U_,F_,z_,W_=Q.b.div(C_||(C_=B_(["\n max-width: 100%;\n position: relative;\n margin-right: auto;\n margin-left: auto;\n padding-right: 0.5rem;\n padding-left: 0.5rem;\n\n @media only screen and (min-width: 75em) {\n width: 72rem;\n }\n\n ","\n ","\n"])),(N_=Object(Q.a)(A_||(A_=B_(["\n width: 61rem;\n "]))),Object(Q.a)(ln||(ln=vn(["\n @media (max-width: 64rem) {\n ",";\n }\n"])),N_)),Cn(Object(Q.a)(P_||(P_=B_(["\n width: 70rem;\n padding: 0.6rem;\n "])))));function V_(e){return(V_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function H_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Y_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H_(Object(n),!0).forEach((function(t){G_(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function G_(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==V_(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==V_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===V_(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function q_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var X_,K_,Z_=Q.b.input(U_||(U_=q_(['\n background: #f3f3f9;\n border-radius: 8px;\n font-family: "Inter";\n font-style: normal;\n font-weight: 400;\n font-size: 16px;\n line-height: 22px;\n display: flex;\n align-items: center;\n letter-spacing: 0.39996px;\n color: #1d1c21;\n border: ',";\n height: 3em;\n width: 100%;\n margin: ",";\n padding: 0 9px;\n\n ",'\n\n &:focus {\n outline: none;\n }\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-transition: "color 9999s ease-out, background-color 9999s ease-out";\n -webkit-transition-delay: 9999s;\n color: #8b8b8b;\n }\n'])),(function(e){return e.error?"1px solid #B00020":" 1px solid #b1b1b1"}),(function(e){return e.error?"8px auto":"8px auto 1rem auto"}),function(e){return Object(Q.a)(hn||(hn=vn(["\n @media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {\n ",";\n }\n"])),e)}(Object(Q.a)(F_||(F_=q_(["\n margin: 6px auto;\n "]))))),$_=Q.b.div(z_||(z_=q_(["\n color: #b00020;\n padding: 2px 0;\n"]))),Q_=function(e){var t=e.type,n=void 0===t?"text":t,r=e.error;return Object(f.jsxs)("div",{children:[Object(f.jsx)(Z_,Y_(Y_({type:n},e),{},{error:e.error})),r&&""!==r&&Object(f.jsx)($_,{errorMessage:r,children:r})]})},J_=i.a.forwardRef(Q_);function ex(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var tx,nx,rx,ix=Q.b.div(X_||(X_=ex(["\n margin: 10px 0;\n"]))),ox=Q.b.a(K_||(K_=ex(["\n background: #F53872;\n color: #fff;\n border-radius: 10px;\n font-size: 16px;\n line-height: 22.4px;\n padding: 10px 32px;\n white-space: nowrap;\n font-weight: 500;\n text-decoration: none;\n display: inline-block;\n border: none;\n transition: 0.125s;\n text-align: center;\n width: 100%;\n cursor: pointer;\n\n &:not(.disable):hover {\n color: #fff;\n }\n"]))),ax=function(e){return Object(f.jsx)(ix,{children:Object(f.jsx)(ox,{href:e.url,children:e.title})})},sx=i.a.forwardRef(ax),cx="https://chatstorage.isometrik.io/chat-assets/icons/ic_uil_eye-slash.svg",fx="https://chatstorage.isometrik.io/chat-assets/icons/login_background.png",ux="https://chatstorage.isometrik.io/chat-assets/icons/ic_uil_eye.svg",lx=/(?=.*?[A-Z])/,dx=/(?=.*?[0-9])/,hx=/(?=.*?[#?!@$%^&*-])/,px=/.{8,}/;function vx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var bx,mx,gx,yx,wx,_x,xx,jx,kx,Ox,Sx,Ex,Cx;Q.b.div(tx||(tx=vx(["\n top: 20px;\n display: flex;\n align-items: center;\n justify-content: space-between;\n position: absolute;\n border: 1px solid lightpink;\n background: antiquewhite;\n border-radius: 5px;\n padding: 0px 20px;\n display: flex;\n transition: all 1s ease-in-out !important;\n\n ","\n"])),Cn(Object(Q.a)(nx||(nx=vx(["\n width: 70%;\n right: 20px;\n "]))))),Q.b.div(rx||(rx=vx(["\n padding: 15px;\n color: brown;\n"])));function Ax(e){return(Ax="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Px(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Mx(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Px(Object(n),!0).forEach((function(t){Rx(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Px(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Rx(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Ax(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Ax(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ax(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ix(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Tx(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Tx(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tx(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lx(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Dx,Bx,Nx,Ux,Fx,zx,Wx,Vx,Hx,Yx,Gx,qx,Xx,Kx=Q.b.section(bx||(bx=Lx(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),fx,Cn(Object(Q.a)(mx||(mx=Lx(["\n padding: 1rem;\n"]))))),Zx=Q.b.div(gx||(gx=Lx(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n background:#fff;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),Cn(Object(Q.a)(yx||(yx=Lx(["\n border-radius: 10px;\n "]))))),$x=Q.b.div(wx||(wx=Lx(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),Cn(Object(Q.a)(_x||(_x=Lx(["\n padding: 1rem;\n "]))))),Qx=Q.b.div(xx||(xx=Lx(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color: var(--black);\n text-transform: capitalize;\n opacity: 1;\n"]))),Jx=(Q.b.div(jx||(jx=Lx(["\n text-align: center;\n font-size: 26px;\n letter-spacing: 0px;\n color: red;\n text-transform: capitalize;\n opacity: 1;\n"]))),Q.b.div(kx||(kx=Lx(["\n position: relative;\n"])))),ej=Q.b.span(Ox||(Ox=Lx(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),tj=Q.b.div(Sx||(Sx=Lx(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),nj=Q.b.p(Ex||(Ex=Lx(["\n text-align: center;\n color: var(--danger);\n "]))),rj=Q.b.div(Cx||(Cx=Lx(["\ntext-align: center;\n"]))),ij=function(e){var t=e.setLoginPage,n=e.theme,i=Ix(Object(r.useState)(!1),2),a=i[0],c=i[1],u=Ix(Object(r.useState)(),2),l=u[0],d=u[1],h=Ix(Object(r.useState)({email:"",password:""}),2),p=h[0],v=h[1],b=Ix(Object(r.useState)({open:!1,message:"",variant:""}),2),m=b[0],g=b[1],y=Ix(Object(r.useState)({email:"",password:""}),2),w=y[0],_=y[1],x=function(e,t){switch(e){case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"email is required";case"password":return t?lx.test(t)?dx.test(t)?hx.test(t)?px.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";default:return""}},j=function(e){v(Mx(Mx({},p),{},Rx({},e.target.name,e.target.value))),_(Mx(Mx({},w),{},Rx({},e.target.name,x(e.target.name,e.target.value)))),d()};return Object(f.jsxs)(f.Fragment,{children:[Object(f.jsx)(Kx,{children:Object(f.jsx)(W_,{children:Object(f.jsx)(Zx,{children:Object(f.jsxs)($x,{children:[Object(f.jsx)(rj,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(Qx,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(nj,{children:l}),Object(f.jsx)(J_,{name:"email",type:"email",placeholder:"Enter your email",value:p.email,error:null==w?void 0:w.email,onChange:j}),Object(f.jsxs)(Jx,{children:[Object(f.jsx)(J_,{name:"password",type:a?"text":"password",placeholder:"Enter your password",value:null==p?void 0:p.password,error:null==w?void 0:w.password,onChange:j}),Object(f.jsx)("div",{onClick:function(){return c(!a)},children:Object(f.jsx)(ej,{children:Object(f.jsx)($,{src:a?ux:cx,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(p).forEach((function(e){var n=x(e,p[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)_(t);else{var n={userIdentifier:null==p?void 0:p.email,password:null==p?void 0:p.password};Object(S.default)().user.postUserAuthenticate(n).then((function(e){g({open:!0,variant:"success",message:e.msg}),Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),window.location.href="/"})).catch((function(e){var t,n;console.log({error:e}),g({open:!0,variant:"error",message:null==e?void 0:e.message}),d((null===(t={error:e})||void 0===t||null===(t=t.error)||void 0===t?void 0:t.errorMsg)||(null===(n={error:e})||void 0===n||null===(n=n.error)||void 0===n?void 0:n.message))}))}},children:Object(f.jsx)(sx,{title:"Log In"})}),Object(f.jsx)(tj,{onClick:function(){return t(!1)},children:"Sign Up"})]})})})}),Object(f.jsx)(Ws,{message:m.message,variant:m.variant,open:m.open,onClose:function(){return g({open:!1})},theme:n})]})};function oj(e){return(oj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function aj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aj(Object(n),!0).forEach((function(t){cj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function cj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==oj(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==oj(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===oj(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return uj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function lj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var dj=Q.b.form(Dx||(Dx=lj(["\n height: 100vh;\n display: flex;\n justify-content: space-between;\n align-items: center;\n background:url(",");\n object-fit: contain;\n background-size: cover !important;\n ","\n"])),fx,Cn(Object(Q.a)(Bx||(Bx=lj(["\n padding:1rem;\n"]))))),hj=Q.b.div(Nx||(Nx=lj(["\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n background:#fff;\n word-wrap: break-word;\n box-shadow: 0px 3px 6px #161148;\n border-radius: 20px;\n max-width: 28rem;\n margin: auto;\n\n ","\n"])),Cn(Object(Q.a)(Ux||(Ux=lj(["\n border-radius: 20px;\n "]))))),pj=Q.b.div(Fx||(Fx=lj(["\n padding: 2rem;\n flex: 1 1 auto;\n\n ","\n"])),Cn(Object(Q.a)(zx||(zx=lj(["\n padding: 1rem;\n "]))))),vj=Q.b.div(Wx||(Wx=lj(["\n text-align: center;\n font-size: 24px;\n letter-spacing: 0px;\n color:var(--black);\n font-family: LogoText;\n text-transform: capitalize;\n opacity: 1;\n"]))),bj=Q.b.div(Vx||(Vx=lj(["\n position: relative;\n"]))),mj=Q.b.span(Hx||(Hx=lj(["\n position: absolute;\n top: 10px;\n right: 16px;\n color: #8b8b8b;\n cursor: pointer;\n"]))),gj=Q.b.div(Yx||(Yx=lj(["\n text-align: center;\n letter-spacing: -0.22px;\n color: #F53872;\n padding: 10px 0 0 0;\n cursor: pointer;\n"]))),yj=(Q.b.div(Gx||(Gx=lj(["\n text-align: center;\n letter-spacing: -0.22px;\n color:red;\n padding: 10px 0 0 0;\n"]))),Q.b.p(qx||(qx=lj(["\n text-align: center;\n color: var(--danger);\n"])))),wj=Q.b.div(Xx||(Xx=lj(["\ntext-align: center;\n"]))),_j=function(e){var t=e.setLoginPage,n=e.theme,c=fj(Object(r.useState)(!1),2),u=c[0],l=c[1],d=fj(Object(r.useState)(!1),2),h=d[0],p=d[1],v=fj(Object(r.useState)(),2),b=v[0],m=v[1],g=fj(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),y=g[0],w=g[1],_=fj(Object(r.useState)({open:!1,message:"",variant:""}),2),x=_[0],j=_[1],k=fj(Object(r.useState)({fname:"",email:"",password:"",confirmPassword:""}),2),O=k[0],E=k[1],C=function(e,t){switch(e){case"fname":return t&&""!==t.trim()?t.match(/^[A-Z ]{3,50}$/i)?Object(a.c)(t)?"":"First letter should be capital in name":"User name should not contain any special characters":"User name is required";case"email":return t?t.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)?"":"Enter a valid email address":"Email is required";case"Password":return t?lx.test(t)?dx.test(t)?hx.test(t)?px.test(t)?"":"Password length should be more than 8 characters":"Password should contain one special character":"Password should contain atleast one digit":"Password should contain atleast one uppercase":"Please enter your password";case"confirmPassword":return t?t!==y.password?"Confirm password did not match":"":"Confirm password is required";default:return""}},A=function(e){w(sj(sj({},y),{},cj({},e.target.name,e.target.value))),m(),E(sj(sj({},O),{},cj({},e.target.name,C(e.target.name,e.target.value))))};return Object(f.jsxs)(i.a.Fragment,{children:[Object(f.jsx)(dj,{children:Object(f.jsx)(W_,{children:Object(f.jsx)(hj,{children:Object(f.jsxs)(pj,{children:[Object(f.jsx)(wj,{children:Object(f.jsx)($,{src:s})}),Object(f.jsx)(vj,{children:"ISOMETRIK CHAT"}),Object(f.jsx)(yj,{children:b}),Object(f.jsx)(J_,{name:"fname",type:"text",placeholder:"Enter your name",value:null==y?void 0:y.fname,onChange:A,error:null==O?void 0:O.fname}),Object(f.jsx)(J_,{name:"email",type:"email",placeholder:"Enter your email",value:null==y?void 0:y.email,error:null==O?void 0:O.email,onChange:A}),Object(f.jsxs)(bj,{children:[Object(f.jsx)(J_,{name:"password",type:u?"text":"password",placeholder:"Enter your password",value:null==y?void 0:y.password,error:null==O?void 0:O.password,onChange:A}),Object(f.jsx)("div",{onClick:function(){return l(!u)},children:Object(f.jsx)(mj,{children:Object(f.jsx)($,{src:u?ux:cx,height:"22px",width:"22px"})})})]}),Object(f.jsxs)(bj,{children:[Object(f.jsx)(J_,{name:"confirmPassword",type:h?"text":"password",placeholder:"Enter your confirm password",value:null==y?void 0:y.confirmPassword,error:null==O?void 0:O.confirmPassword,onChange:A}),Object(f.jsx)("div",{onClick:function(){return p(!h)},children:Object(f.jsx)(mj,{children:Object(f.jsx)($,{src:h?ux:cx,height:"22px",width:"22px"})})})]}),Object(f.jsx)("div",{onClick:function(e){e.preventDefault();var t={};if(Object.keys(y).forEach((function(e){var n=C(e,y[e]);n&&n.length>0&&(t[e]=n)})),Object.keys(t).length>0)E(t);else{var n={userProfileImageUrl:a.E,userName:y.fname,userIdentifier:y.email,password:y.password,confirmPassword:y.confirmPassword,metaData:{country:"IN"}};Object(S.default)().user.postUser(n).then((function(e){Object(o.d)("isometrikToken",null==e?void 0:e.userToken),Object(o.d)("isometrikUserId",null==e?void 0:e.userId),e&&(j({open:!0,variant:"success",message:e.msg}),window.location.href="/")})).catch((function(e){var t=JSON.stringify(e.errorProperties.password);if(t){var n=JSON.parse(t);j({open:!0,variant:"error",message:"Please enter a valid password!"}),m("".concat(n[0]))}}))}},children:Object(f.jsx)(sx,{title:"Sign Up"})}),Object(f.jsx)(gj,{onClick:function(){return t(!0)},children:"Log In"})]})})})}),Object(f.jsx)(Ws,{message:x.message,variant:x.variant,open:x.open,onClose:function(){return j({open:!1})},theme:n})]})};function xj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return jj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jj(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kj,Oj,Sj,Ej,Cj,Aj,Pj,Mj,Rj,Ij,Tj,Lj,Dj=function(e){var t=e.theme,n=xj(Object(r.useState)(!0),2),i=n[0],o=n[1];return Object(f.jsxs)("div",{children:[i&&Object(f.jsx)(ij,{setLoginPage:o,theme:t}),!i&&Object(f.jsx)(_j,{setLoginPage:o,theme:t})]})};function Bj(e){return(Bj="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Nj(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Nj=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof b?t:b,a=Object.create(o.prototype),s=new A(r||[]);return i(a,"_invoke",{value:O(e,n,s)}),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var d="suspendedStart",h="executing",p="completed",v={};function b(){}function m(){}function g(){}var y={};f(y,a,(function(){return this}));var w=Object.getPrototypeOf,_=w&&w(w(P([])));_&&_!==n&&r.call(_,a)&&(y=_);var x=g.prototype=b.prototype=Object.create(y);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function k(e,t){function n(i,o,a,s){var c=l(e[i],e,o);if("throw"!==c.type){var f=c.arg,u=f.value;return u&&"object"==Bj(u)&&r.call(u,"__await")?t.resolve(u.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(u).then((function(e){f.value=e,a(f)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;i(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,i){n(e,r,t,i)}))}return o=o?o.then(i,i):i()}})}function O(t,n,r){var i=d;return function(o,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var c=S(s,r);if(c){if(c===v)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var f=l(t,n,r);if("normal"===f.type){if(i=r.done?p:"suspendedYield",f.arg===v)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(i=p,r.method="throw",r.arg=f.arg)}}}function S(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),v;var o=l(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,v;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,v):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function P(t){if(t||""===t){var n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(r.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(Bj(t)+" is not iterable")}return m.prototype=g,i(x,"constructor",{value:g,configurable:!0}),i(g,"constructor",{value:m,configurable:!0}),m.displayName=f(g,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,f(e,c,"GeneratorFunction")),e.prototype=Object.create(x),e},t.awrap=function(e){return{__await:e}},j(k.prototype),f(k.prototype,s,(function(){return this})),t.AsyncIterator=k,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new k(u(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},j(x),f(x,c,"Generator"),f(x,a,(function(){return this})),f(x,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(C),!t)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function i(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(c&&f){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,v):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:P(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),v}},t}function Uj(e){return function(e){if(Array.isArray(e))return qj(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Gj(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fj(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zj(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fj(Object(n),!0).forEach((function(t){Wj(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fj(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Wj(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Bj(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==Bj(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Bj(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vj(e,t,n,r,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function Hj(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){Vj(o,r,i,a,s,"next",e)}function s(e){Vj(o,r,i,a,s,"throw",e)}a(void 0)}))}}function Yj(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,f=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){f=!0,i=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(f)throw i}}return s}}(e,t)||Gj(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gj(e,t){if(e){if("string"==typeof e)return qj(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?qj(e,t):void 0}}function qj(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xj(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Kj=Q.b.section(kj||(kj=Xj(["\n height: 100%;\n background-color: #dadbd3;\n // display: grid;\n"]))),Zj=Q.b.div(Oj||(Oj=Xj(["\n background: var(--gray_color);\n max-width: 70%;\n flex: 1 1 70%;\n position: relative;\n ","\n"])),Cn(Object(Q.a)(Sj||(Sj=Xj(["\n max-width: 100%;\n flex: 1 1 100%;\n"]))))),$j=Q.b.div(Ej||(Ej=Xj(["\n display: none;\n background-color: var(--modal_color);\n position: absolute;\n bottom: 0px;\n padding: 20px 75px 20px 20px;\n width: 100%;\n align-items: center;\n\n .userImg {\n height: 65px;\n width: 65px;\n border-radius: 60px;\n background-size: cover;\n background-repeat: no-repeat;\n }\n\n ","\n\n ","\n"])),function(e){return Object(Q.a)(dn||(dn=vn(["\n @media (min-width: 48rem) and (max-width: 64rem) {\n ",";\n }\n"])),e)}(Object(Q.a)(Cj||(Cj=Xj(["\n display: none;\n "])))),Cn(Object(Q.a)(Aj||(Aj=Xj(["\n display: flex;\n "]))))),Qj=Q.b.div(Pj||(Pj=Xj(["\n display: flex;\n justify-content: flex-end;\n margin-bottom: 20px;\n color: white;\n\n .cancleBtn {\n background: var(--iso_white);\n color: var(--button-primary-background);\n border: 1px solid var(--border_color);\n }\n\n .logoutBtn {\n background-color: var(--button-primary-background);\n color: var(--iso_white);\n }\n"]))),Jj=Q.b.div(Mj||(Mj=Xj(["\ndisplay:flex;\n"]))),ek=Q.b.div(Rj||(Rj=Xj(["\ncolor:var(--black);\nwidth:72%;\n\n.signOutBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:0px;\n}\n\n.cancelBtn{\n padding:7px 15px;\n border:none;\n border-radius:20px;\n background:var(--button-primary-background);\n color:white;\n margin-left:10px;\n}\n"]))),tk=Q.b.button(Ij||(Ij=Xj(["\n margin-left: 15px;\n border-radius: 20px;\n border: none;\n padding: 5px 20px 5px 20px;\n"]))),nk=Q.b.div(Tj||(Tj=Xj(["\nwidth:100%;\nheight:100%;\ntop:0;\nbackground-color:var(--modal-backDrop);\nposition:absolute;\nborder:none;\n.logoutModal{\n background-color: var(--modal_color);\n color:var(--black);\n position: absolute; \n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n width:32rem;\n top:50%;\n left:50%;\n z-index:999;\n transform: translate(-50%,-50%);\n padding:20px 24px 6px 22px;\n line-height: 1.7;\n max-height:14rem\n box-shadow: 0 4px 8px 0 rgb(0 0 0 / 20%), 0 6px 20px 0 rgb(0 0 0 / 19%);\n\n ","\n }"])),Cn(Object(Q.a)(Lj||(Lj=Xj(["\n display: none;\n "])))));var rk=function(e){var t,n,s,c,u=O(),l=u.fetchUserToken,d=u.sortByCustomType,h=u.showLoader,p=u.setShowLoader,v=u.theme,b=u.userDetails,m=u.setUserDetails,g=u.findUserId,y=u.state,w=u.setState,_=u.userloggedIn,x=u.loading,j=u.sidebarChatItem,k=u.setSidebarChatItem,E=u.showStatusMessages,C=u.hideHiddenConversations,A=u.isGroup,P=u.currFilter,M=u.setCurrFilter,R=u.currChat,I=u.setCurrChat,T=u.searchConvoText,L=u.setSearchConvoText,D=(u.isSearchLoading,u.setIsSearchLoading,e.showSideChatHeader),B=e.sideBarHeaderSlot,N=e.customSend,U=e.handleCustomSend,F=void 0===U?function(){}:U,z=e.onChatChange,W=void 0===z?function(){}:z,V=e.sideBarPlaceHolder,H=e.chatHeaderRightSlot,Y=e.chatHeaderMoreMenu,G=e.renderProfileBadge,q=e.placeHolder,X=e.extraAttachmentOptions,K=e.attachMentPosition,Z=e.ChatFooterRightSlot,Q=e.customSendOptions,J=e.RenderCustomSendOptions,ee=e.renderSelfMoremenu,te=e.showSearchIcon,ne=e.sortConversationList,re=e.allowProfileClick,ie=e.showSideBarSearch,oe=e.onNewConversation,ae=e.onConversationsFetch,se=Yj(Object(r.useState)(!1),2),ce=se[0],fe=se[1],ue=Object(r.useRef)(!1),le=Yj(Object(r.useState)(!1),2),de=le[0],he=le[1],pe=Yj(Object(r.useState)(!1),2),ve=pe[0],be=pe[1],me=Yj(Object(r.useState)(!1),2),ge=me[0],ye=me[1],we=Object(r.useRef)(!1),_e=Yj(Object(r.useState)(!1),2),xe=_e[0],je=_e[1],ke=Yj(Object(r.useState)(!1),2),Oe=ke[0],Se=ke[1],Ee=Yj(Object(r.useState)(!1),2),Ce=Ee[0],Ae=Ee[1],Pe=Yj(Object(r.useState)({}),2),Me=Pe[0],Re=Pe[1],Ie=Yj(Object(r.useState)(!1),2),Te=Ie[0],Le=Ie[1],De=Yj(Object(r.useState)(!1),2),Be=De[0],Ne=De[1],Ue=Yj(Object(r.useState)(!1),2),Fe=Ue[0],ze=Ue[1],We=Yj(Object(r.useState)({open:!1,message:"",variant:""}),2),Ve=We[0],He=We[1],Ye=Yj(Object(r.useState)([]),2),Ge=Ye[0],qe=Ye[1],Xe=Yj(Object(r.useState)(!1),2),Ke=Xe[0],Ze=Xe[1],$e=Yj(Object(r.useState)(!1),2),Qe=$e[0],Je=$e[1],et=Yj(Object(r.useState)(),2),tt=et[0],nt=et[1],rt=Yj(Object(r.useState)(""),2),it=rt[0],ot=rt[1],at=Yj(Object(r.useState)({showProfile:!1,userName:"",userImageSrc:"",theme:v}),2),st=at[0],ct=at[1],ft=Yj(Object(r.useState)(!1),2),ut=ft[0],lt=ft[1],dt=Yj(Object(r.useState)(0),2),ht=(dt[0],dt[1],i.a.useRef(!1));console.log("allMsg",ut);var pt=new URLSearchParams(window.location.search).get("c"),vt=function(e){var t=new URLSearchParams("");t.set("c",(null==e?void 0:e.conversationId)||"");var n="".concat(window.location.pathname,"?").concat(t.toString());window.history.pushState({path:n},"",n),k(e)},bt=function(){var e=Hj(Nj().mark((function e(t){var n,r,i,o,s=arguments;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:[],w((function(e){return zj(zj({},e),{},{selectedConvId:t})})),p(!0),e.prev=3,r=Uj(n),null==(i=r.find((function(e){return e.conversationId===t})))||!i.conversationId){e.next=11;break}Re(i),k(i),e.next=16;break;case 11:return e.next=13,Object(a.w)({id:t,includeConversationStatusMessagesInUnreadMessagesCount:E});case 13:o=e.sent,k(o),Re(o);case 16:he(!0),p(!1),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(3),p(!1);case 23:case"end":return e.stop()}}),e,null,[[3,20]])})));return function(t){return e.apply(this,arguments)}}(),mt={limit:20,skip:0,isGroup:A};Object(r.useEffect)((function(){var e=function(){var e,t,n=new URLSearchParams(window.location.search),r=n.get("c");r?(null==y||null===(t=y.conversations)||void 0===t?void 0:t.length)>0&&bt(r,null==y?void 0:y.conversations):(he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:""})})));n.get("unread")||null!==(e=y.conversations)&&void 0!==e&&e.length||wt(zj(zj({},mt),{},{sort:P}),!1,R||"ALL")};return window.addEventListener("popstate",e),function(){window.removeEventListener("popstate",e)}}),[P,R,null==y?void 0:y.conversations]);var gt={limit:20,skip:0,isGroup:A,conversationId:null==j?void 0:j.conversationId},yt=function(e){I(e),wt(zj(zj({},mt),{},{sort:P}),!1,e)};Object(r.useEffect)((function(){return function(){I(""),M(),he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:""})})),L("")}}),[]);var wt=function(){var e=Hj(Nj().mark((function e(t,n){var r,i,o,a,s,c,f,u,l,h=arguments;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=h.length>2&&void 0!==h[2]?h[2]:"ALL",i=zj({},t),t.sort?i.sort=t.sort:delete i.sort,d&&!t.sort&&(i.sortByCustomType=!0),E||(i.includeConversationStatusMessagesInUnreadMessagesCount=!1),C&&(i.hidden=!1),T?i.searchTag=T:delete i.searchTag,e.prev=7,n?ye(!0):p(!0),ue.current=!0,"UNREAD"!==r){e.next=16;break}return e.next=13,null===(c=Object(S.default)())||void 0===c||null===(c=c.Conversation)||void 0===c?void 0:c.getUnreadConversations(i);case 13:s=e.sent,e.next=19;break;case 16:return e.next=18,null===(f=Object(S.default)())||void 0===f||null===(f=f.Conversation)||void 0===f?void 0:f.getConversations(i);case 18:s=e.sent;case 19:u=n?[].concat(Uj(y.conversations),Uj(null===(o=s)||void 0===o?void 0:o.conversations)):(null===(a=s)||void 0===a?void 0:a.conversations)||[],w((function(e){return zj(zj({},e),{},{conversations:Uj(u)})})),!n&&ae&&ae((null===(l=s)||void 0===l?void 0:l.conversations)||[],pt),pt&&!n?bt(pt,u):p(!1),ye(!1),e.next=33;break;case 26:e.prev=26,e.t0=e.catch(7),1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&0===(null==i?void 0:i.skip)?w((function(e){return zj(zj({},e),{},{conversations:[]})})):w((function(e){return zj(zj({},e),{},{conversations:Uj(e.conversations)})})),Je(1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)),p(!1),ye(!1),console.log(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode,null===e.t0||void 0===e.t0?void 0:e.t0.message,"err");case 33:return e.prev=33,ye(!1),ue.current=!1,e.finish(33);case 37:case"end":return e.stop()}}),e,null,[[7,26,33,37]])})));return function(t,n){return e.apply(this,arguments)}}(),_t=function(){var e=Hj(Nj().mark((function e(t){var n,r,i;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ot(t),n={conversationId:null==j?void 0:j.conversationId,searchTag:t},e.prev=2,null==t||!t.length){e.next=12;break}return Ze(!0),e.next=7,null===(r=Object(S.default)())||void 0===r||null===(r=r.message)||void 0===r?void 0:r.getMessages(n);case 7:i=e.sent,qe(Uj(null==i?void 0:i.messages)),Ze(!1),e.next=13;break;case 12:qe([]);case 13:e.next=20;break;case 15:e.prev=15,e.t0=e.catch(2),console.error("error",e.t0),qe([]),Ze(!1);case 20:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}(),xt=Object(a.g)(_t,500),jt=function(){var e=Hj(Nj().mark((function e(t){var n,r,i,o,a,s,c,f,u=arguments;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:function(){return!0},e.prev=1,!we.current&&!ht.current){e.next=4;break}return e.abrupt("return");case 4:return i=document.getElementById("allMessages"),o=i.scrollHeight-i.scrollTop,null!=t&&t.skip&&(we.current=!0),i.scrollHeight,ht.current=!0,e.next=11,null===(r=Object(S.default)())||void 0===r||null===(r=r.message)||void 0===r?void 0:r.getMessages(t);case 11:a=e.sent,ht.current=!1,s=a.messages.filter((function(e){var t;return(null==e||null===(t=e.body)||void 0===t?void 0:t.length)>0})).reverse(),w((function(e){return we.current=!1,n([].concat(Uj(s),Uj(e.messages[null==j?void 0:j.conversationId])),t.limit),zj(zj({},e),{},{messages:zj(zj({},e.messages),{},Wj({},null==j?void 0:j.conversationId,[].concat(Uj(s),Uj(e.messages[null==j?void 0:j.conversationId]))))})})),c=i.scrollHeight,i.scrollTo({top:c-o,behavior:"smooth"}),e.next=23;break;case 19:e.prev=19,e.t0=e.catch(1),ht.current=!1,1===(null===e.t0||void 0===e.t0?void 0:e.t0.errorCode)&&null!=y&&null!==(f=y.messages)&&void 0!==f&&null!==(f=f[null==j?void 0:j.conversationId])&&void 0!==f&&f.length||He({open:!0,variant:"error",message:(null===e.t0||void 0===e.t0?void 0:e.t0.message)||"No messages"});case 23:return e.prev=23,ht.current=!1,we.current=!1,e.finish(23);case 27:case"end":return e.stop()}}),e,null,[[1,19,23,27]])})));return function(t){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){var e=new URLSearchParams(window.location.search).get("unread");"true"===e?(he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:"",conversations:[]})})),yt("UNREAD"),localStorage.setItem("isoChatTab",2)):"false"!==e&&e||(he(!1),k(),w((function(e){return zj(zj({},e),{},{selectedConvId:"",conversations:[]})})),yt("ALL"),localStorage.setItem("isoChatTab",1))}),[]),Object(r.useEffect)((function(){b||x||!Object(o.b)("isometrikToken")||l()}),[b,x]);var kt=function(){be(!1),setTimeout((function(){p(!0),Object(o.a)()}),100),p(!1)},Ot=function(){Le(!1),Ne(!1)},St=function(){var e=Hj(Nj().mark((function e(){var t;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,je(!1),e.next=4,Object(a.d)(null==j?void 0:j.conversationId);case 4:t=e.sent,He({open:!0,variant:"success",message:t.msg}),w((function(e){return zj(zj({},e),{},{messages:Wj({},null==j?void 0:j.conversationId,[])})})),e.next=13;break;case 9:e.prev=9,e.t0=e.catch(0),je(!1),He({open:!0,variant:"error",message:e.t0.messages});case 13:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),Et=function(){var e=Hj(Nj().mark((function e(){var t,n,r;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ae(!1),e.next=4,Object(a.B)(null==j||null===(t=j.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,e.next=7,Object(a.w)({id:null==j?void 0:j.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:E});case 7:r=e.sent,Re(r),He({open:!0,variant:"success",message:n.msg}),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ae(!1),He({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}(),Ct=function(){var e=Hj(Nj().mark((function e(){var t,n,r;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Ae(!1),e.next=4,Object(a.C)(null==j||null===(t=j.opponentDetails)||void 0===t?void 0:t.userId);case 4:return n=e.sent,He({open:!0,variant:"success",message:n.msg}),e.next=8,Object(a.w)({id:null==j?void 0:j.conversationId,includeConversationStatusMessagesInUnreadMessagesCount:E});case 8:r=e.sent,Re(r),e.next=17;break;case 12:e.prev=12,e.t0=e.catch(0),Ae(!1),He({open:!0,variant:"error",message:e.t0.messages}),console.error("error",e.t0);case 17:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)((function(){if(null!=y&&y.conversations&&(null==y?void 0:y.conversations.length)>0&&null!=Me&&Me.conversationId){var e=null==y?void 0:y.conversations.find((function(e){return e.conversationId===Me.conversationId}));e&&Re((function(t){return zj({},e)}))}}),[null==y?void 0:y.conversations]);var At=function(){var e=Hj(Nj().mark((function e(){var t;return Nj().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,Se(!1),e.next=4,Object(a.i)(null==j?void 0:j.conversationId);case 4:t=e.sent,He({open:!0,variant:"success",message:t.msg}),Ot(),he(!1),w((function(e){return zj(zj({},e),{},{selectedConvId:""})})),e.next=17;break;case 11:e.prev=11,e.t0=e.catch(0),console.error("error",e.t0),He({open:!0,variant:"error",message:e.t0.messages}),Se(!1),Ot();case 17:case"end":return e.stop()}}),e,null,[[0,11]])})));return function(){return e.apply(this,arguments)}}();return Object(f.jsx)(f.Fragment,{children:Object(f.jsxs)("div",{className:"true"===v||v?"dark-theme":"light-theme",children:[Object(f.jsxs)(Kj,{className:"overflow-hidden",children:[_&&!x?Object(f.jsxs)("div",{className:"d-flex",onClick:function(){return fe(!ce)},children:[Object(f.jsx)(nl,{sideBarPlaceHolder:V,sideBarHeaderSlot:B,state:y,setState:w,sideData:null==y?void 0:y.conversations,sidebarData:vt,disabledKey:ce,userDetails:b,getPaginationHomePageData:function(){var e,t,n;ue.current||(null==y||null===(e=y.conversations)||void 0===e?void 0:e.length)<mt.limit||(null==y||null===(t=y.conversations)||void 0===t?void 0:t.length)%mt.limit!=0||(mt.skip=(null==y||null===(n=y.conversations)||void 0===n?void 0:n.length)/mt.limit*mt.limit,!Qe&&wt(zj(zj({},mt),{},{sort:P}),!0,R||"ALL"))},preventConversationRef:ue,setIsSidebarShow:he,isSidebarShow:de,isLogOut:ve,setIsLogOut:be,findUserId:g,sidebarChatItem:j,getHomePageConversationData:wt,setUserDetails:m,setShowLoader:p,setShowProfilePicture:ct,showConversationPagingLoader:ge,setToastStatus:He,setUserConversationDetail:Re,profileClose:Ot,setMediaDocs:nt,showSideChatHeader:D,renderProfileBadge:G,sortConversationList:ne,showSideBarSearch:ie,handleFilterSelect:function(e){"0"===e?M():M(e),wt(zj(zj({},mt),{},{sort:"0"===e?"":e}),!1,R||"ALL")},handleActiveChatTab:yt,onNewConversation:oe,setSidebarChatItem:k}),Object(f.jsx)(Zj,{className:"d-flex",children:h?"":Object(f.jsx)(Pw,{customSend:N,extraAttachmentOptions:X,handleCustomSend:F,placeHolder:q,onChatChange:W,theme:v,setClearChatModal:je,setDeleteChatModal:Se,setUserBlockModal:Ae,state:y,setState:w,sidebarChatItem:j,setSidebarChatItem:k,setIsSidebarShow:he,isSidebarShow:de,getPaginationMessagesData:function(){var e,t,n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){},i=arguments.length>1?arguments[1]:void 0;we.current||0===Object.keys(null==y?void 0:y.messages).length||(null==y||null===(e=y.messages[null==j?void 0:j.conversationId])||void 0===e?void 0:e.length)<gt.limit||(null==y||null===(t=y.messages[null==j?void 0:j.conversationId])||void 0===t?void 0:t.length)%gt.limit!=0||(gt.skip=i||(null==y||null===(n=y.messages[null==j?void 0:j.conversationId])||void 0===n?void 0:n.length)/gt.limit*gt.limit,E||(gt.conversationStatusMessage=!1),jt(gt,r))},preventMessageRef:we,setShowProfilePicture:ct,findUserId:g,sidebarData:vt,setToastStatus:He,setslideShow:Le,slideShow:Te,setSearchShow:Ne,searchShow:Be,setUserConversationDetail:Re,userConversationDetail:Me,setMessageInfo:ze,messageInfo:Fe,debounceSearchMessages:xt,searchedMessageArray:Ge,setSearchedMessageArray:qe,searchMessageLoaderStatus:Ke,handleClosee:Ot,setMediaDocs:nt,mediaDocs:tt,userDetails:b,enteredSearchQuery:it,isPreviousMessageLoad:we.current,chatHeaderRightSlot:H,chatHeaderMoreMenu:Y,attachMentPosition:K,ChatFooterRightSlot:Z,customSendOptions:Q,RenderCustomSendOptions:J,renderSelfMoremenu:ee,showSearchIcon:te,allowProfileClick:re,renderProfileBadge:G,hasMessages:ut,setHasMessages:lt})})]}):"",ve?Object(f.jsx)(nk,{children:Object(f.jsxs)("div",{className:"logoutModal",children:[Object(f.jsx)("h5",{children:"Log out? "}),Object(f.jsx)("p",{children:"Are you sure you want to logout"}),Object(f.jsx)("div",{children:Object(f.jsxs)(Qj,{className:"logoutActionbtn",children:[Object(f.jsx)(tk,{className:"cancleBtn",onClick:function(){return be(!1)},children:"Cancel"}),Object(f.jsx)(tk,{className:"logoutBtn",onClick:kt,children:"Log out"})]})})]})}):"",ve&&Object(f.jsxs)($j,{className:"signOut",children:[Object(f.jsx)("div",{style:{width:"28%"},children:Object(f.jsx)($,{className:"userImg",src:null==e||null===(t=e.userDetails)||void 0===t?void 0:t.userProfileImageUrl})}),Object(f.jsxs)(ek,{className:"actionBtn",children:[Object(f.jsx)("h5",{children:null==e||null===(n=e.userDetails)||void 0===n?void 0:n.userName}),Object(f.jsx)("p",{children:null==e||null===(s=e.userDetails)||void 0===s||null===(s=s.metaData)||void 0===s?void 0:s.description}),Object(f.jsxs)(Jj,{children:[Object(f.jsx)(tk,{className:"signOutBtn",onClick:kt,children:"Sign Out"}),Object(f.jsx)(tk,{className:"cancelBtn",onClick:function(){return be(!1)},children:"Cancel"})]})]})]}),xe&&Object(f.jsx)(bs,{open:xe,backDropClick:!0,onClose:function(){return je(!1)},children:Object(f.jsx)(Gw,{cancelButtonClick:function(){return je(!1)},confirmButtonClick:St})}),Oe&&Object(f.jsx)(bs,{open:Oe,backDropClick:!0,onClose:function(){return Se(!1)},children:Object(f.jsx)(c_,{cancelButtonClick:function(){return Se(!1)},confirmButtonClick:At})}),Ce&&Object(f.jsx)(bs,{open:Ce,backDropClick:!0,onClose:function(){return Ae(!1)},children:Object(f.jsx)(S_,{isUserBlocked:null==Me?void 0:Me.messagingDisabled,userName:null==j||null===(c=j.opponentDetails)||void 0===c?void 0:c.userName,cancelButtonClick:function(){return Ae(!1)},confirmButtonClick:null!=Me&&Me.messagingDisabled?Ct:Et})}),Object(f.jsx)(Ws,{message:Ve.message,variant:Ve.variant,open:Ve.open,onClose:function(){return He({open:!1})}}),st.showProfile&&Object(f.jsx)(D_,{userName:st.userName,userImageSrc:st.userImageSrc,theme:st.theme,closeHandler:function(){return ct({showProfile:!1})}}),x||h?Object(f.jsx)(vs,{className:"mainLoader",height:"100vh",width:"100%",theme:v,position:"absolute"}):Object(f.jsx)(f.Fragment,{}),!_&&!x&&!h&&Object(f.jsx)(Dj,{theme:v})]}),Object(f.jsx)("style",{jsx:!0,children:"\n .mainLoader {\n top: 0;\n left: 0;\n }\n .logoutModal * {\n margin-top: 20px;\n }\n\n @media (max-width: 48rem) {\n .sidebar_header {\n width: 100vw;\n }\n }\n @media (max-width: 48rem) {\n .sidebar .sidebar_header .sliderr {\n width: 100vw;\n }\n .sidebar {\n display: ".concat(de||null!=y&&y.selectedConvId?"none":"block",";\n }\n }\n ")})]})})};t.default=function(e){var t=e.showSideBarSearch,n=void 0===t||t,r=e.attachMentPosition,i=void 0===r?"right":r,o=e.sortConversationList,a=e.renderSelfMoremenu,s=e.showSearchIcon,c=void 0===s||s,u=e.ChatFooterRightSlot,l=void 0===u?function(){return Object(f.jsx)(f.Fragment,{})}:u,d=e.customSendOptions,h=void 0!==d&&d,p=e.RenderCustomSendOptions,v=void 0===p?function(){return Object(f.jsx)(f.Fragment,{})}:p,b=e.showSideChatHeader,m=e.extraAttachmentOptions,g=void 0===m?[]:m,y=e.renderProfileBadge,w=void 0===y?function(e){return Object(f.jsx)(f.Fragment,{})}:y,_=e.customSend,x=void 0!==_&&_,j=e.handleCustomSend,k=void 0===j?function(){return!1}:j,O=e.sideBarHeaderSlot,S=e.chatHeaderRightSlot,E=e.chatHeaderMoreMenu,C=e.onChatChange,A=e.placeHolder,P=e.sideBarPlaceHolder,M=e.allowProfileClick,R=void 0===M||M,I=e.onNewConversation,T=e.onConversationsFetch;return Object(f.jsx)(f.Fragment,{children:Object(f.jsx)("div",{className:"isoChat",children:Object(f.jsx)(rk,{onConversationsFetch:T,onNewConversation:I,showSideBarSearch:n,allowProfileClick:R,sortConversationList:o,renderSelfMoremenu:a,showSearchIcon:c,attachMentPosition:i,ChatFooterRightSlot:l,customSendOptions:h,RenderCustomSendOptions:v,extraAttachmentOptions:g,customSend:x,renderProfileBadge:w,handleCustomSend:k,sideBarHeaderSlot:O,chatHeaderRightSlot:S,chatHeaderMoreMenu:E,sideBarPlaceHolder:P,showSideChatHeader:b,onChatChange:C,placeHolder:A})})})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(478);const i={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function o(e,t,n="Mui"){const o=i[t];return o?`${n}-${o}`:`${r.a.generate(e)}-${t}`}},function(e,t,n){"use strict";const r=e=>e,i=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})();t.a=i},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(1),i=n(212);function o(...e){return r.useMemo(()=>e.every(e=>null==e)?null:t=>{e.forEach(e=>{Object(i.a)(e,t)})},e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(221);function i(e){return Object(r.a)(e).defaultView||window}},function(e,t,n){"use strict";var r=n(1),i=n(222);t.a=function(e){const t=r.useRef(e);return Object(i.a)(()=>{t.current=e}),r.useCallback((...e)=>(0,t.current)(...e),[])}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,t,n){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((e,r)=>{if(r){const i=t(r);""!==i&&e.push(i),n&&n[r]&&e.push(n[r])}return e},[]).join(" ")}),r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(477);function i(e,t,n="Mui"){const i={};return t.forEach(t=>{i[t]=Object(r.a)(e,t,n)}),i}},function(e,t,n){"use strict";n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return l}));var r=n(107);function i(e,t=0,n=1){return Math.min(Math.max(t,e),n)}function o(e){if(e.type)return e;if("#"===e.charAt(0))return o(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map(e=>e+e)),n?`rgb${4===n.length?"a":""}(${n.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error(Object(r.a)(9,e));let i,a=e.substring(t+1,e.length-1);if("color"===n){if(a=a.split(" "),i=a.shift(),4===a.length&&"/"===a[3].charAt(0)&&(a[3]=a[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i))throw new Error(Object(r.a)(10,i))}else a=a.split(",");return a=a.map(e=>parseFloat(e)),{type:n,values:a,colorSpace:i}}function a(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map((e,t)=>t<3?parseInt(e,10):e):-1!==t.indexOf("hsl")&&(r[1]=r[1]+"%",r[2]=r[2]+"%"),r=-1!==t.indexOf("color")?`${n} ${r.join(" ")}`:""+r.join(", "),`${t}(${r})`}function s(e){let t="hsl"===(e=o(e)).type||"hsla"===e.type?o(function(e){e=o(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),c=(e,t=(e+n/30)%12)=>i-s*Math.max(Math.min(t-3,9-t,1),-1);let f="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return"hsla"===e.type&&(f+="a",u.push(t[3])),a({type:f,values:u})}(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=s(e),r=s(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function f(e,t){return e=o(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/"+t:e.values[3]=t,a(e)}function u(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return a(e)}function l(e,t){if(e=o(e),t=i(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return a(e)}},function(e,t,n){"use strict";function r(...e){return e.reduce((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)},()=>{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(3),i=n(5),o=n(220);const a=["values","unit","step"];function s(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:o=5}=e,s=Object(i.a)(e,a),c=(e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>Object(r.a)({},e,{[t.key]:t.val}),{})})(t),f=Object.keys(c);function u(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-o/100}${n})`}function d(e,r){const i=f.indexOf(r);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[f[i]]?t[f[i]]:r)-o/100}${n})`}return Object(r.a)({keys:f,values:c,up:u,down:l,between:d,only:function(e){return f.indexOf(e)+1<f.length?d(e,f[f.indexOf(e)+1]):u(e)},not:function(e){const t=f.indexOf(e);return 0===t?u(f[1]):t===f.length-1?l(f[t]):d(e,f[f.indexOf(e)+1]).replace("@media","@media not all and")},unit:n},s)}var c={borderRadius:4},f=n(11);var u=n(211),l=n(64);const d=["breakpoints","palette","spacing","shape"];t.a=function(e={},...t){const{breakpoints:n={},palette:a={},spacing:h,shape:p={}}=e,v=Object(i.a)(e,d),b=s(n),m=function(e=8){if(e.mui)return e;const t=Object(f.a)({spacing:e}),n=(...e)=>{return(0===e.length?[1]:e).map(e=>{const n=t(e);return"number"==typeof n?n+"px":n}).join(" ")};return n.mui=!0,n}(h);let g=Object(o.a)({breakpoints:b,direction:"ltr",components:{},palette:Object(r.a)({mode:"light"},a),spacing:m,shape:Object(r.a)({},c,p)},v);return g=t.reduce((e,t)=>Object(o.a)(e,t),g),g.unstable_sxConfig=Object(r.a)({},l.a,null==v?void 0:v.unstable_sxConfig),g.unstable_sx=function(e){return Object(u.a)({sx:e,theme:this})},g}}])}));
|