vendor: 2,726 bytes, line 1
1import{c as re,a as g}from"./vendor.8ad8d112.js";import{a as e,p as w,b as A,u as E,j as o,aR as J,I as v,aS as I,Z as ne,aT as oe,aC as L,A as X,aU as V,aV as Q,aW as ie,aX as ce,aL as de,aY as me}from"./index.ca05d714.js";import{C as j}from"./Card.cb3c9e2e.js";import{T as ue}from"./Textarea.334d39f2.js";import{B as pe}from"./Button.c4a90c81.js";import{_ as fe}from"./extends.d141bdfd.js";import{_ as he}from"./setPrototypeOf.a0b1958c.js";import{_ as xe,f as ve,a as q,c as ge}from"./Transition.5d718ec5.js";import{D as Y}from"./Dropdown.7c847034.js";function be(a,t){return a.classList?!!t&&a.classList.contains(t):(" "+(a.className.baseVal||a.className)+" ").indexOf(" "+t+" ")!==-1}function Ne(a,t){a.classList?a.classList.add(t):be(a,t)||(typeof a.className=="string"?a.className=a.className+" "+t:a.setAttribute("class",(a.className&&a.className.baseVal||"")+" "+t))}function H(a,t){return a.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}function Ce(a,t){a.classList?a.classList.remove(t):typeof a.className=="string"?a.className=H(a.className,t):a.setAttribute("class",H(a.className&&a.className.baseVal||"",t))}var ke=function(t,m){return t&&m&&m.split(" ").forEach(function(s){return Ne(t,s)})},R=function(t,m){return t&&m&&m.split(" ").forEach(function(s){return Ce(t,s)})},P=function(a){xe(t,a);function t(){for(var s,d=arguments.length,c=new Array(d),u=0;u<d;u++)c[u]=arguments[u];return s=a.call.apply(a,[this].concat(c))||this,s.appliedClasses={appear:{},enter:{},exit:{}},s.onEnter=function(l,n){var r=s.resolveArguments(l,n),h=r[0],x=r[1];s.removeClasses(h,"exit"),s.addClass(h,x?"appear":"enter","base"),s.props.onEnter&&s.props.onEnter(l,n)},s.onEntering=function(l,n){var r=s.resolveArguments(l,n),h=r[0],x=r[1],p=x?"appear":"enter";s.addClass(h,p,"active"),s.props.onEntering&&s.props.onEntering(l,n)},s.onEntered=function(l,n){var r=s.resolveArguments(l,n),h=r[0],x=r[1],p=x?"appear":"enter";s.removeClasses(h,p),s.addClass(h,p,"done"),s.props.onEntered&&s.props.onEntered(l,n)},s.onExit=function(l){var n=s.resolveArguments(l),r=n[0];s.removeClasses(r,"appear"),s.removeClasses(r,"enter"),s.addClass(r,"exit","base"),s.props.onExit&&s.props.onExit(l)},s.onExiting=function(l){var n=s.resolveArguments(l),r=n[0];s.addClass(r,"exit","active"),s.props.onExiting&&s.props.onExiting(l)},s.onExited=function(l){var n=s.resolveArguments(l),r=n[0];s.removeClasses(r,"exit"),s.addClass(r,"exit","done"),s.props.onExited&&s.props.onExited(l)},s.resolveArguments=function(l,n){return s.props.nodeRef?[s.props.nodeRef.current,l]:[l,n]},s.getClassNames=function(l){var n=s.props.classNames,r=typeof n=="string",h=r&&n?n+"-":"",x=r?""+h+l:n[l],p=r?x+"-active":n[l
1+"Active"],f=r?x+"-done":n[l+"Done"];return{baseClassName:x,activeClassName:p,doneClassName:f}},s}var m=t.prototype;return m.addClass=function(d,c,u){var l=this.getClassNames(c)[u+"ClassName"],n=this.getClassNames("enter"),r=n.doneClassName;c==="appear"&&u==="done"&&r&&(l+=" "+r),u==="active"&&d&&ve(d),l&&(this.appliedClasses[c][u]=l,ke(d,l))},m.removeClasses=function(d,c){var u=this.appliedClasses[c],l=u.base,n=u.active,r=u.done;this.appliedClasses[c]={},l&&R(d,l),n&&R(d,n),r&&R(d,r)},m.render=function(){var d=this.props;d.classNames;var c=he(d,["classNames"]);return e(q,{...c,onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited})},t}(re.Component);P.defaultProps={classNames:""};P.propTypes=fe({},q.propTypes,{classNames:ge,onEnter:w.exports.func,onEntering:w.exports.func,onEntered:w.exports.func,onExit:w.exports.func,onExiting:w.exports.func,onExited:w.exports.func});const we=P,C="/assets/profile.a45c64bc.png",U=[{value:"online",label:"Active",activeClass:"ring-success-500 border-success-500"},{value:"busy",label:"Do Not Disturb",activeClass:"ring-danger-500 border-danger-500"},{value:"away",label:"Away",activeClass:"ring-warning-500 border-warning-500"},{value:"offline",label:"Offline",activeClass:"ring-warning-500 border-warning-500"}],Ae=()=>{const{openProfile:a}=A(c=>c.chat),[t,m]=g.exports.useState("online"),s=g.exports.useRef(null),d=E();return e("div",{children:o("header",{children:[o("div",{className:"flex px-6 pt-6",children:[e("div",{className:"flex-1",children:o("div",{className:"flex space-x-3 rtl:space-x-reverse",children:[e("div",{className:"flex-none",children:e("div",{className:"h-10 w-10 rounded-full",children:e("img",{src:C,alt:"",className:"w-full h-full object-cover rounded-full"})})}),o("div",{className:"flex-1 text-start",children:[e("span",{className:"block text-slate-800 dark:text-slate-300 text-sm font-medium mb-[2px]",children:"+14085808980"}),e("span",{className:"block text-slate-500 dark:text-slate-300 text-xs font-normal",children:"Available"})]})]})}),e("div",{className:"flex-none",children:e("div",{className:"h-8 w-8 bg-slate-100 dark:bg-slate-900 dark:text-slate-400 flex flex-col justify-center items-center text-xl rounded-full cursor-pointer",onClick:()=>d(J(!0)),children:e(v,{icon:"heroicons-outline:dots-horizontal"})})})]}),e(we,{in:a,timeout:300,nodeRef:s,classNames:"profileAnimation",unmountOnExit:!0,children:e("div",{ref:s,className:"absolute bg-white dark:bg-slate-800 rounded-md h-full left-0 top-0 bottom-0 w-full z-[9]",children:o(I,{className:"h-full p-6",children:[e("div",{className:"text-right",children:e("div",{className:"h-8 w-8 bg-slate-100 dark:bg-slate-900 dark:text-slate-400 inline-flex ml-auto flex-col justify-center items-center text-xl rounded-full cursor-pointer",onClick:()=>d(J(!1)),children:e(v,{icon:"heroicons-outline:x"})})}),o("header",{className:"mx-auto max-w-[200px] mt-6 text-center",children:[o("div",{className:"h-16 w-16 rounded-full border border-slate-400 p-[2px] shadow-md mx-auto mb-3 relative",children:[e("img",{src:C,alt:"",className:"block w-full h-full rounded-full object-contain"}),e("span",{className:`status inline-block h-3 w-3 rounded-full absolute -right-1 top-3 border border-white 2 ${t==="online"?"bg-success-500":""} 3 ${t==="away"?"bg-warning-500":""} 4 ${t==="busy"?"bg-danger-500":""} 5 ${t==="offline"?"bg-secondary-500":""} 6 7 8 `})]}),e("span",{className:"block text-slate-600 dark:text-slate-300 text-sm",children:"+14085808980"}),e("span",{className:"block text-slate-500 dark:text-slate-300 text-xs",children:"Admin"})]}),e("div",{className:"my-8",children:e(ue,{label:"About",placeholder:"About ypur self"})}),o("div",{className:"mb-8",children:[e("span",{className:"form-label",children:"Status"}),U==null?void 0:U.map(c=>e(ne,{label:c.label,name:"status",value:c.value,checked:t===c.value,onChange:u=>m(u.target.value),activeClass:c.activeClass},c.value))]}),e(pe,{text:"Logout",className:"btn-dark "})]})})})]})})},ye="data:image/png;
8base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAABuwAAAbsBOuzj4gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAASbSURBVHic7ZtJbBtlGIbfbzL2jJ3FiRI3ZSdpUsoSAqWgVKpERZtSqaTiXo4UDkgcOCBOcKQgORcuoHJikRBCRWpKlQOCVKRCVFBo2kBTaEAqsp3dcYLrdGx/HJwxDbEz9iz/7yyPlMv8/9jv+8yimXGGmBnL0OV54zgz9xFhD5i2YyNBHGfGj0Q00BXynQTA+cXM+Hk6daeq+j4FsF9qSHEMZTLGscdbglEFAG2y8gCwf7kz0Uji1ktgfCA7kRQILyvM3Cc7hyyYuU/Nn/BWDiRThEvjChKLJCeZy4RDjO4dWQT8K5cTYY9a7Gz/w1UFf8YVUfk8Jzab35A9D2ZXDjBtL9pyan5jbPnbKdVJtVrx/tYcdnfmoPtcz+Qp00nC8KiCVHrtjWkpYN8jWQQ113IJoy7ASCwCF8Zq1pxneaCvx/Im5WTfOGc6m2wJkB1ANlsCZAeQzZYA2QFks+kFWF4JeoF/dhja3DAoZ2CpqQdLLb0yYgAQLIByaTSNvIhA9PPCsnoA6fBhzD32EXK+RpFxAAg+BBrG3lxR3kSfGkRo9FWRUQoIE0DZFOr+eq/keDD6GWpu3hAVp4AwAb6FKwBn156T/EVQmv8QJiCrtVrOyWnbBCRZiTgBgfuQqd1ZcjyntcJo6BYVp4DQk+Dcox+CFf/qAarBXNf7YEUXGQeAYAG3mnowte8C0uHDYLUBXBPEUvPTmNp7DultR0RGKSD8QsioewgzT54GwADnAFr7kZXXSLwUJunlgXV0L6AuTiM8+C6avv8YlMu497mufZKH+BJRtEcOwD95HQBQP/IVbhz/BKw4j1/1e4AvEUVb5GChPACELp7CPSdfcGVPqGoBvkQMbZGD0Cb/WDXmloSqFaDOx9DWX7y8iRsSqlKAOh9De6QX2sTvlnOdSnBdgPrPDO4+F0HLyBf21k/Gl8tfK3sdJxJcFaDNjmPX12+gyfgbd0yeR8fZ1yta3055E7sSXBOgzY6j87u3QbV1hWUBv1G2BDU5gfb+Q9DiY7Yz2JHgioBi5U3KkZAv3wstdtVxlkolOBagz4yjc/hE0fImAb+BHSUkqAuT+S3vQnmTSiQ4EqDPjKPj/AlQsNZybrCIBHVhEm39h6DFfnMSoyihi6fw8NBblvNsC6ikvMntEtSFKbT1Pws9+qvdCJboizHLObYupu2UNwn6DXSceQ3007fQo6N2vr4CrP/XqeI9QJ+5bru8SUBn6M0NttcvH7acUZGAfPl3HJUvsGs30LXX+ec4pGwBrpY3qQIJZQnwpLyJZAmWAjwtbyJRgqUAz8ubSJJgKUBIeRMJEqrveYBgCdUnABAqoToFAMIkWArgmynPQ5TEoYTp+tI/xppY3gucpedxIHkaKq39275n3PUA0mozjESyotUmwk/gy+ZXLOdZChhUjmJQP1rRl7vOvct/HlD0EGgs/Wxj3dJYV/zGSAVx/P/vDT21MwugBolFEdG8JxxidLfnVg8Qx+nS3NIAgZ4TH0s+DD6jENGA7CCyIKIBYma6nDC+weZ6dRYAhroafc8oADiTMY4BGJIcSCRDy52ZNvvr8/8Cn3+ZhRnTNRgAAAAASUVORK5CYII=",Ee=({contact:a})=>{const{from:t,to:m,message_media:s,message_string:d,created_at:c}=a,u=()=>{const n=new Date(c);return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric",hour12:!0,timeZone:"UTC"}).format(n)},l=E();return e("div",{children:m&&m!="+14085808980"?e("div",{className:"block w-full py-5 focus:ring-0 outline-none cursor-pointer group transition-all duration-150 hover:bg-slate-100 dark:hover:bg-slate-600 dark:hover:bg-opacity-70",onClick:()=>{l(oe({contact:a,activechat:!0}))},children:o("div",{className:"flex space-x-3 px-6 rtl:space-x-reverse",children:[e("div",{className:"flex-none",children:e("div",{className:"h-10 w-10 rounded-full relative",children:e("img",{src:C,alt:"",className:"block w-full h-full object-cover rounded-full"})})}),o("div",{className:"flex-1 text-start flex",children:[o("div",{className:"flex-1",children:[e("span",{className:"block text-slate-800 dark:text-slate-300 text-sm font-medium mb-[2px]",children:m}),o("div",{className:"flex items-center gap-1 ",children:[s&&e("img",{src:ye,width:"16px",height:"16px",alt:""}),e("span",{className:"block text-slate-600 dark:text-slate-300 text-xs font-normal",children:d.slice(0,14)+"..."})]})]}),e("div",{className:"flex-none ltr:text-right rtl:text-end",children:e("span",{className:"block text-xs text-slate-400 dark:text-slate-400 font-normal",children:u()})})]})]})}):""})},K=[{label:"Remove",link:"#"},{label:"Forward",link:"#"}],Se=({fetchLastConversation:a})=>{const{activechat:t,openinfo:m,mobileChatSidebar:s,messFeed:d,user:c}=A(i=>i.chat),{width:u,breakpoints:l}=L(),n=E(),{id:r}=A(i=>i.auth.user),[h,x]=g.exports.useState(""),[p,f]=g.exports.useState(null),[y,F]=g.exports.useState(null),[M,z]=g.exports.useState(!1),S="+14085808980",W=i=>{i.preventDefault();const b=i.target,N=b.files[0];if(f(N),N){const k=new FileReader;k.onloadend=()=>{F(k.result)},k.readAsDataURL(N),b.value=""}},B=()=>{f(null),F(null)},G=`${X.url}/conversations/${r}/${S}/${c.to}`;g.exports.useEffect(()=>{n(V(G)),B()},[c]);function ee(){const i=new Date,b=i.getTimezoneOffset()*6e4;return new Date(i.getTime()-b).toISOString()}const se=ee(),$=async()=>{if(h.trim()===""&&!p)return alert("Please Enter a message or Select a file."),!1;if(p){const b=p.name,N=`${r}/${r}/${b}`,k=new Blob([p],{type:p.type}),te=p.type;console.log(k);const le="https://jrk04qkvki.execute-api.us-east-2.amazonaws.com/stage/images";try{const T=await fetch(le,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fileName:N})});if(T.ok){const _=(await T.json()).url;console.log(_),(await fetch(_,{method:"PUT",body:k,headers:{"Content-Type":te}})).ok&&z(!0)}}catch(T){console.log(T)}}const i=[{member_id:c.member_id,to:c.to,from:S,message_string:h,message_media:p&&M?`https://harlo-message-image.s3.us-east-2.amazonaws.com/${r}/${r}/${p.name}`:"",created_at:se,status:"",error:""}];console.log(i),await n(ce(i)).then(()=>{n(V(G)).then(()=>{a()})}),x(""),B(),z(!1)},D=g.exports.useRef(null);g.exports.useEffect(()=>{D.current.scrollTop=D.current.scrollHeight},[d,p]);const O=i=>{const b=new Date(i);return new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"numeric",hour12:!0,timeZone:"UTC"}).format(b)},Z=g.exports.useRef(null),ae=()=>{Z.current.click()};return o("div",{className:"h-full",children:[e("header",{className:"border-b border-slate-100 dar
8k:border-slate-700",children:o("div",{className:"flex py-6 md:px-6 px-3 items-center",children:[e("div",{className:"flex-1",children:o("div",{className:"flex space-x-3 rtl:space-x-reverse",children:[u<=l.lg&&e("span",{onClick:()=>n(Q(!0)),className:"text-slate-900 dark:text-white cursor-pointer text-xl self-center ltr:mr-3 rtl:ml-3",children:e(v,{icon:"heroicons-outline:menu-alt-1"})}),e("div",{className:"flex-none",children:e("div",{className:"h-10 w-10 rounded-full relative",children:e("img",{src:C,alt:"",className:"w-full h-full object-cover rounded-full"})})}),e("div",{className:"flex-1 text-start",children:e("span",{className:"block text-slate-800 dark:text-slate-300 text-sm font-medium mb-[2px] truncate",children:c.to})})]})}),o("div",{className:"flex-none flex md:space-x-3 space-x-1 items-center rtl:space-x-reverse",children:[e("div",{className:"msg-action-btn",children:e(v,{icon:"heroicons-outline:phone"})}),e("div",{className:"msg-action-btn",children:e(v,{icon:"heroicons-outline:video-camera"})}),e("div",{onClick:()=>n(ie(!m)),className:"msg-action-btn",children:e(v,{icon:"heroicons-outline:dots-horizontal"})})]})]})}),e("div",{className:"chat-content parent-height",children:e("div",{className:`msgs overflow-y-auto msg-height pt-6 space-y-6 ${y?"pb-[100px]":""} `,ref:D,children:(d==null?void 0:d.length)>0?d.map((i,b)=>o("div",{className:"block md:px-6 px-4",children:[i.to===S&&o("div",{className:"flex space-x-2 items-start group rtl:space-x-reverse",children:[e("div",{className:"flex-none",children:e("div",{className:"h-8 w-8 rounded-full",children:e("img",{src:C,alt:"",className:"block w-full h-full object-cover rounded-full"})})}),o("div",{className:"flex-1 flex space-x-4 rtl:space-x-reverse",children:[o("div",{children:[o("div",{className:"text-contrent p-3 bg-slate-100 dark:bg-slate-600 dark:text-slate-300 text-slate-600 text-sm font-normal mb-1 rounded-md flex-1 whitespace-pre-wrap break-all",children:[i.message_media&&e("img",{src:i.message_media,alt:"",width:"50px",height:"50px",className:"my-2"}),i.message_string&&e("div",{className:"text-contrent p-3 bg-slate-300 dark:bg-slate-900 dark:text-slate-300 text-slate-800 text-sm font-normal rounded-md flex-1 mb-1",children:i.message_string})]}),e("span",{className:"font-normal text-xs text-slate-400 dark:text-slate-400",children:O(i.created_at)})]}),e("div",{className:"opacity-0 invisible group-hover:opacity-100 group-hover:visible",children:e(Y,{classMenuItems:" w-[100px] top-0",items:K,label:e("div",{className:"h-8 w-8 bg-slate-100 dark:bg-slate-600 dark:text-slate-300 text-slate-900 flex flex-col justify-center items-center text-xl rounded-full",children:e(v,{icon:"heroicons-outline:dots-horizontal"})})})})]})]}),i.from===S&&o("div",{className:"flex space-x-2 items-start justify-end group w-full rtl:space-x-reverse",children:[o("div",{className:"no flex space-x-4 rtl:space-x-reverse",children:[e("div",{className:"opacity-0 invisible group-hover:opacity-100 group-hover:visible",children:e(Y,{classMenuItems:" w-[100px] left-0 top-0 ",items:K,label:e("div",{className:"h-8 w-8 bg-slate-300 dark:bg-slate-900 dark:text-slate-400 flex flex-col justify-center items-center text-xl rounded-full text-slate-900",children:e(v,{icon:"heroicons-outline:dots-horizontal"})})})}),o("div",{className:"whitespace-pre-wrap break-all",children:[i.message_media&&e("img",{src:i.message_media,alt:"",width:"50px",height:"50px",className:"my-2"}),i.message_string&&e("div",{className:"text-contrent p-3 bg-slate-300 dark:bg-slate-900 dark:text-slate-300 text-slate-800 text-sm font-normal rounded-md flex-1 mb-1",children:i.message_string}),e("span",{className:"font-normal text-xs text-slate-400",children:O(i.created_at)})]})]}),e("div",{className:"flex-none",children:e("div",{className:"h-8 w-8 rounded-full",children:e("img",{src:C,alt:"",className:"block w-full h-full object-cover rounded-full"})})})]})]},b)):""})}),o("footer",{className:"md:px-6 px-4 sm:flex md:space-x-4 sm:space-x-2 rtl:space-x-reverse border-t md:pt-6 pt-4 border-slate-100 dark:border-slate-700 relative ",children:[e("div",{className:"absolute -top-[116px] bg-black-100 ",children:y?o("div",{className:"relative m-2 ",children:[e("img",{src:y,alt:"",style:{margin:"auto"},className:"max-h-[100px] max-w-full "}),e("div",{className:"absolute -top-3 -right-3 ",onClick:B,children:e(v,{icon:"heroicons-x-mark-16-solid",className:"w-6 h-6 cursor-pointer bg-black-500 text-black-200 bg-opacity-70 p-1 rounded-full "})})]}):""}),o("div",{className:"flex-none sm:flex hidden md:space-x-3 space-x-1 rtl:space-x-reverse",children:[o("div",{className:"h-8 w-8 cursor-pointer bg-slate-100 dar
8k:bg-slate-900 dark:text-slate-400 flex flex-col justify-center items-center text-xl rounded-full",onClick:ae,children:[e(v,{icon:"heroicons-outline:link"}),e("input",{type:"file",ref:Z,style:{display:"none"},onChange:W,accept:"image/*"})]}),e("div",{className:"h-8 w-8 cursor-pointer bg-slate-100 dark:bg-slate-900 dark:text-slate-400 flex flex-col justify-center items-center text-xl rounded-full",children:e(v,{icon:"heroicons-outline:emoji-happy"})})]}),o("div",{className:"flex-1 relative flex space-x-3 rtl:space-x-reverse",children:[e("div",{className:"flex-1",children:e("textarea",{type:"text",placeholder:"Type your message...",className:"focus:ring-0 focus:outline-0 block w-full bg-transparent dark:text-white resize-none",value:h,onKeyDown:i=>{i.key==="Enter"&&!i.shiftKey&&(i.preventDefault(),$())},onChange:i=>{x(i.target.value)}})}),e("div",{className:"flex-none md:pr-0 pr-3",onClick:$,children:e("button",{type:"button",className:"h-8 w-8 bg-slate-900 text-white flex flex-col justify-center items-center text-lg rounded-full",children:e(v,{icon:"heroicons-outline:paper-airplane",className:"transform rotate-[60deg]"})})})]})]})]})},Te="/assets/blank.a7cfb7a6.svg",Be=()=>{const{width:a,breakpoints:t}=L(),m=E();return o("div",{className:"h-full flex flex-col items-center justify-center xl:space-y-2 space-y-6",children:[e("img",{src:Te,alt:""}),e("h4",{className:"text-2xl text-slate-600 dark:text-slate-300 font-medium",children:"No message yet..."}),e("p",{className:"text-sm text-slate-500 lg:pt-0 pt-4",children:a>t.lg?e("span",{children:`don't worry, just take a deep breath & say "Hello"`}):e("span",{className:"btn btn-dark cursor-pointer",onClick:()=>m(Q(!0)),children:"Start Conversation"})})]})},De=()=>{const{activechat:a,user:t}=A(m=>m.chat);return console.log(t),o(I,{className:"h-full p-6",children:[e("h4",{className:"text-xl text-slate-900 font-medium mb-8",children:"About"}),e("div",{className:"h-[100px] w-[100px] rounded-full mx-auto mb-4",children:e("img",{src:C,alt:"",className:"block w-full h-full object-cover rounded-full"})}),e("div",{className:"text-center",children:e("h5",{className:"text-base text-slate-600 dark:text-slate-300 font-medium mb-1",children:t.to})})]})},Oe=()=>{const{width:a,breakpoints:t}=L(),m=E(),{activechat:s,openinfo:d,mobileChatSidebar:c,contacts:u,searchContact:l}=A(f=>f.chat),{user:n}=A(f=>f.auth),[r,h]=g.exports.useState([]);g.exports.useEffect(()=>{x()},[]);const x=async()=>{try{const f=await de(`${X.url}/last-conversation/${n.id}`);h(f)}catch(f){console.error(f)}},p=r==null?void 0:r.filter(f=>f.to.toLowerCase().includes(l.toLowerCase()));return o("div",{className:" mt-4 flex lg:space-x-5 chat-height overflow-hidden relative rtl:space-x-reverse",children:[e("div",{className:`transition-all duration-150 flex-none min-w-[260px] 9 ${a<t.lg?"absolute h-full top-0 md:w-[260px] w-[200px] z-[999]":"flex-none min-w-[260px]"} 10 ${a<t.lg&&c?"left-0 ":"-left-full "} 11 `,children:o(j,{bodyClass:" relative p-0 h-full overflow-hidden ",className:"h-full",children:[e("div",{className:"border-b border-slate-100 dark:border-slate-700 pb-4",children:e(Ae,{})}),e("div",{className:"border-b border-slate-100 dark:border-slate-700 py-1",children:o("div",{className:"search px-3 mx-6 rounded flex items-center space-x-3 rtl:space-x-reverse",children:[e("div",{className:"flex-none text-base text-slate-900 dark:text-slate-400",children:e(v,{icon:"bytesize:search"})}),e("input",{onChange:f=>m(me(f.target.value)),placeholder:"Search...",className:"w-full flex-1 block bg-transparent placeholder:font-normal placeholder:text-slate-400 py-2 focus:ring-0 focus:outline-none dark:text-slate-200 dark:placeholder:text-slate-400"})]})}),e(I,{className:"contact-height",children:p==null?void 0:p.map((f,y)=>e(Ee,{contact:f},y))})]})}),a<t.lg&&c&&e("div",{className:"overlay bg-slate-900 dark:bg-slate-900 dark:bg-opacity-60 bg-opacity-60 backdrop-filter backdrop-blur-sm absolute w-full flex-1 inset-0 z-[99] rounded-md",onClick:()=>m(Q(!c))}),e("div",{className:"flex-1",children:o("div",{className:"parent flex space-x-5 h-full rtl:space-x-reverse",children:[e("div",{className:"flex-1",children:e(j,{bodyClass:"p-0 h-full",className:"h-full",children:s?e("div",{className:"divide-y divide-slate-100 dar
11k:divide-slate-700 h-full",children:e(Se,{fetchLastConversation:x})}):e(Be,{})})}),a>t.lg&&d&&s&&e("div",{className:"flex-none w-[285px]",children:e(j,{bodyClass:"p-0 h-full",className:"h-full",children:e(De,{})})})]})})]})};export{Oe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.