PageSourceSearch

https://www.app.aisensy.com/static/js/5960.59577779.chunk.js

js aisensy.com collected 2026-09-24 18:22:07 UTC 60,051 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkwhatsapp_dashboard=self.webpackChunkwhatsapp_dashboard||[]).push([[5960,8867],{40027:(e,t,s)=>{s.d(t,{Z:()=>f});var i=s(47313),a=s(70816),n=s.n(a),o=s(73908),r=s(21144),l=s(57009),c=s(54070),d=s(67710),h=s(20337),p=s(65681),u=s(59411),g=s(59688),m=s(20176),y=(s(64343),s(87255),s(81533),s(46417));class x extends i.Component{constructor(e){super(e),this.setFocus=(e,t)=>{const s=document.getElementsByClassName("DateInput");s[0]&&"Last Seen"===t&&(s[0].style.border="startDate"===e?"1px solid grey":"1px solid lightgrey"),s[1]&&"Last Seen"===t&&(s[1].style.border="endDate"===e?"1px solid grey":"1px solid lightgrey"),s[2]&&(s[2].style.border="startDate"===e?"1px solid grey":"1px solid lightgrey"),s[3]&&(s[3].style.border="endDate"===e?"1px solid grey":"1px solid lightgrey");const{dates:i}=this.props;i.focusedInput=e,this.props.setFilter(i)},this.setDate=(e,t)=>{const{dates:s}=this.props,i=e||this.state.startDate,a=t||this.state.endDate,n="Created At"===this.props.filterName?"createdAt":"lastActive";this.props.setDateFilter(n,s),e&&t&&e.isSame(t,"day")&&(e=e.clone().startOf("day"),t=t.clone().endOf("day")),s.startDate=e,s.endDate=null===t?null:t.set({hour:23,minute:59,second:59}),this.props.setFilter(s)},this.clearDate=()=>{const{dates:e}=this.props;e.startDate=null,e.endDate=null,this.props.setFilter(e)},this.setGap=e=>{const{dates:t}=this.props,s=n()(),i=n()().subtract(1,e);s.set({hour:23,minute:59,second:59}),t.startDate=i,t.endDate=s,t.focusedInput=null,this.props.setFilter(t)},this.state={startDate:e.dates.startDate,endDate:e.dates.endDate}}render(){const{filterName:e,dates:t,disabled:s}=this.props;return(0,y.jsxs)(o.Z,{mt:2,mb:2,children:[(0,y.jsxs)(r.Z,{container:!0,style:{height:"30px"},alignItems:"center",children:[(0,y.jsx)(r.Z,{item:!0,children:(0,y.jsx)(l.Z,{variant:"body1",children:e})}),!s&&t.startDate&&t.endDate?(0,y.jsx)(r.Z,{item:!0,children:(0,y.jsx)(c.Z,{color:"primary",size:"small",variant:"filled",onClick:this.clearDate,children:(0,y.jsx)(p.Z,{})})}):""]}),(0,y.jsxs)(r.Z,{spacing:1,container:!0,alignItems:"flex-end",children:[!0===s&&(0,y.jsx)(r.Z,{item:!0,xs:12,children:(0,y.jsx)(l.Z,{variant:"h6",color:"primary",children:"This message will be sent to active user only."})}),(0,y.jsx)(r.Z,{item:!0,children:(0,y.jsxs)(d.Z,{size:"small",children:[(0,y.jsx)(h.Z,{onClick:()=>this.setGap("day"),disabled:s,children:"Last Seen"==e?"In 24hr":"Today"}),(0,y.jsx)(h.Z,{onClick:()=>this.setGap("week"),disabled:s,children:"This Week"}),(0,y.jsx)(h.Z,{onClick:()=>this.setGap("month"),disabled:s,children:"This Month"})]})}),(0,y.jsx)(r.Z,{item:!0,xs:!0,children:(0,y.jsx)(m.DateRangePicker,{startDatePlaceholderText:"From",endDatePlaceholderText:"To",startDateId:"startDate"+e,endDateId:"endDate"+e,startDate:t.startDate,endDate:t.endD
1ate,onDatesChange:e=>{let{startDate:t,endDate:s}=e;return this.setDate(t,s)},focusedInput:t.focusedInput,onFocusChange:e=>this.setFocus(e),navPosition:"navPositionTop",numberOfMonths:1,navPrev:(0,y.jsx)(v,{children:(0,y.jsx)(u.Z,{})}),navNext:(0,y.jsx)(v,{children:(0,y.jsx)(g.Z,{})}),isOutsideRange:e=>e.isAfter(n()(),"day"),hideKeyboardShortcutsPanel:!0,customArrowIcon:null,screenReaderInputMessage:" ",small:!0,readOnly:!0,disabled:s,minimumNights:0,renderDayContents:e=>{const t=e.isSame(n()(),"day");return(0,y.jsx)("div",{style:{backgroundColor:t?"#ffe58f":"transparent",borderRadius:"50%",width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:t?"bold":"normal"},children:e.date()})}})})]})]})}}function v(e){return(0,y.jsx)("div",{children:(0,y.jsx)(c.Z,{size:"small",children:e.children})})}const f=x},88186:(e,t,s)=>{s.d(t,{Z:()=>D});var i=s(47313),a=s(21144),n=s(72728),o=s(57009),r=s(54070),l=s(73908),c=s(34882),d=s(91734),h=s(3873),p=s(20337),u=s(52376),g=s(26395),m=s(65681),y=s(9823),x=s(56342),v=s(40027),f=s(45788),b=s(46417);const w=[{key:"userName",name:"Name",type:"String"},{key:"userNumber",name:"Mobile Number",type:"String"},{key:"tags",name:"Tags",type:"List"},{key:"source",name:"Source",type:"String"},{key:"firstMessage",name:"First Message",type:"String"},{key:"campaigns",name:"Campaigns",type:"List"},{key:"isIntervened",name:"Intervened",type:"Boolean"},{key:"isClosed",name:"Closed",type:"Boolean"},{key:"isRequesting",name:"Requested",type:"Boolean"},{key:"agentOwners",name:"Intervened By Agent",type:"List"}],j={String:["is","is not","contains","not contains"],Boolean:["is"],Status:["is"],List:["has","not has"]},S={attributeName:"",attributeKey:"",attributeType:"String",operators:[],operator:"is",value:"",freeSolo:!0,options:["SET","NOT SET"],condition:"and"},C={lastActive:{startDate:null,toDate:null,focusedInput:null},createdAt:{startDate:null,toDate:null,focusedInput:null},tags:[]},k={filters:[{...S}],dateFilters:{...C},optedIn:"yes",blocked:"no",readStatus:"all"};class Z extends i.Component{constructor(){super(...arguments),this.state={...k},this.setDateFilter=(e,t)=>{const{dateFilters:s}=this.state;s[e]={...t},this.setState({dateFilters:s},this.sendStateToParent)},this.sendStateToParent=()=>{const{filters:e,dateFilters:t,optedIn:s,blocked:i,readStatus:a}=this.state;this.props.getFilterState({filters:e,dateFilters:t,optedIn:s,blocked:i,readStatus:a})},this.apply=()=>{const{filters:e,dateFilters:t,optedIn:s,blocked:i,readStatus:a}=this.state,{apply:n}=this.props,{attributeKey:o,value:r}=e[0];let l=structuredClone(e);"agentOwners"===o&&(l[0].options=[],l[0].value=r.name),n({optedIn:s,blocked:i,readStatus:a,dateFilters:t,filters:structuredClone(l)})},this.clearAll=()=>{this.setState({...k},this.sendStateToParent);const e={startDate:null,endDate:null};this.setDateFilter("lastActive",e),this.setDateFilter("createdAt",e),this.props.clearFilters()},this.handleOptin=e=>{this.setState({optedIn:e.target.value})},this.handleBlocked=e=>{this.setState({blocked:e.target.value})},this.handleReadstatus=e=>{this.setState({readStatus:e.target.value})},this.handleAutoCompleteInput=(e,t,s,i)=>{const a={...this.state.filters[i]};if("input"===s&&a.freeSolo||"select-option"===s){a[e]=t;const s=[...this.state.filters];s[i]=a,this.setState({filters:s},this.sendStateToParent)}},this.handleAttribute=(e,t,s,i)=>{const a=[...this.state.filters],n=t;if("select-option"===s){const e={...S},s=this.getStringTypeOptions(null===n||void 0===n?void 0:n.name);e.attributeKey=n.key,e.attributeName=t,e.attributeType=n.type,e.operators=j[n.type],e.operator=e.operators[0],e.options="Boolean"===n.type?["Yes","No"]:"Status"===n.type?["Active","Inactive"]:"List"===n.type?[...s]:["SET","NOT SET",...s],e.options=[...e.options],e.freeSolo=0===s.length&&"String"===n.type,a[i]=e,this.setState({filters:a},this.sendStateToParent)}},this.getStringTypeOptions=e=>{var t;const{tags:s,campaigns:i,agents:a}=this.props;switch(e){case"Tags":return null===(t=Object.values(s||{}))||void 0===t?void 0:t.filter((e=>!0!==e.disabled));case"Campaigns":return Object.keys(i);case"First Message":return Object.values(s||{}).filter((e=>e.isFirstMessage));case"Intervened By Agent":return Object.values(a).filter((e=>!e.disabled&&!e.businessArchived));default:return[]}},this.addRow=()=>{this.setState({filters:[...this.state.filters,{...S}]},this.sendStateToParent)},this.removeRow=e=>{this.setState({filters:this.state.filters.filter(((t,s)=>s!==e))},this.sendStateToParent)},this.filterRowUI=(e,t,s)=>{var l;const{filters:c}=this.state,{assistantDetails:d}=this.props,{providerType:h,type:p,cbpType:u,planActivatedOn:x,attributes:v}=d,f=[];("v2"===h||"v3"===h)&&("v3"===p||"v4"===p)&&x&&f.push({key:"sessionPeriod",name:"MAU Status",type:"Status"}
1),u&&f.push({key:"whatsappConvoExpTime",name:"WhatsApp Conversation Status",type:"Status"});const S=v?v.filter((e=>!0!==e.disabled)).map((e=>({key:e.action?"params.".concat(e.action,"_").concat(e.name):"params.".concat(e.name),name:e.name,type:"String"}))):[];return(0,b.jsxs)(i.Fragment,{children:[(0,b.jsxs)(a.Z,{item:!0,container:!0,xs:9,spacing:1,alignItems:"center",children:[(0,b.jsx)(a.Z,{item:!0,xs:!0,children:(0,b.jsx)(g.ZP,{disableClearable:!0,autoHighlight:!0,options:[...w,...S,...f],getOptionLabel:e=>(null===e||void 0===e?void 0:e.name)||"",onChange:(e,t,i)=>this.handleAttribute(e,t,i,s),value:t.attributeName,renderInput:t=>(0,b.jsx)(n.Z,{...t,variant:"outlined",classes:{root:e.textFieldRoot},InputProps:{...t.InputProps},placeholder:"Select Attribute",name:"name"})})}),(0,b.jsx)(a.Z,{item:!0,xs:2,children:(0,b.jsx)(g.ZP,{disableClearable:!0,autoHighlight:!0,disabled:!t.attributeName,options:[...j[t.attributeType]],onChange:(e,t,i)=>this.handleAutoCompleteInput("operator",t,i,s),value:t.operator,renderInput:t=>(0,b.jsx)(n.Z,{...t,variant:"outlined",classes:{root:e.textFieldRoot},InputProps:{...t.InputProps},placeholder:"Operator",name:"operator"})})}),(0,b.jsx)(a.Z,{item:!0,xs:!0,children:(0,b.jsx)(g.ZP,{disableClearable:!0,value:t.value,freeSolo:t.freeSolo,autoHighlight:!t.freeSolo,disabled:!t.attributeName,id:s+t.attributeKey,options:null===(l=t.options)||void 0===l?void 0:l.map((e=>e)),getOptionLabel:e=>e.tagName||e.displayName||e||"",onChange:(e,t,i)=>this.handleAutoCompleteInput("value",t,i,s),onInputChange:(e,t,i)=>this.handleAutoCompleteInput("value",t,i,s),renderOption:t=>(0,b.jsx)(a.Z,{option:!0,children:(0,b.jsx)(o.Z,{className:e.optionText,children:t.tagName||t.displayName||t||""})}),renderInput:t=>(0,b.jsx)(n.Z,{...t,name:"value",variant:"outlined",placeholder:"Attribute Value",InputProps:{...t.InputProps},classes:{root:e.textFieldRoot}})})})]}),(0,b.jsx)(a.Z,{item:!0,container:!0,xs:3,alignItems:"center",spacing:1,children:c.length-1!==s?(0,b.jsxs)(i.Fragment,{children:[(0,b.jsx)(a.Z,{item:!0,xs:!0,children:(0,b.jsx)(g.ZP,{id:"free-solo-2-demo",disableClearable:!0,value:t.condition,options:["and","or"].map((e=>e)),onChange:(e,t,i)=>this.handleAutoCompleteInput("condition",t,i,s),renderInput:t=>(0,b.jsx)(n.Z,{...t,variant:"outlined",classes:{root:e.textFieldRoot},InputProps:{...t.InputProps},placeholder:"Condition",name:"condition"})})}),(0,b.jsx)(a.Z,{item:!0,children:(0,b.jsx)(r.Z,{onClick:()=>this.removeRow(s),children:(0,b.jsx)(m.Z,{})})})]}):(0,b.jsx)(a.Z,{item:!0,xs:!0,children:(0,b.jsx)(r.Z,{onClick:this.addRow,children:(0,b.jsx)(y.Z,{})})})})]},s)}}componentDidMount(){const{allFilters:e,agents:t}=this.props;if(null!==e){const{filters:s,dateFilters:i,optedIn:a,blocked:n,readStatus:o}=e;if(s&&s[0]){const{attributeKey:e,value:i}=s[0];"agentOwners"===e&&(s[0].value=Object.values(t).find((e=>e.name===(null===i||void 0===i?void 0:i.name)||e.name===i)))}const r=s||[{...S}],l=i||{...C};this.setState({filters:[...r],dateFilters:{...l},optedIn:a||"yes",blocked:n||"no",readStatus:o||"all"})}}render(){const{classes:e,isLoading:t,disableLastActive:s,isFromContactsPage:n}=this.props,{filters:r,dateFilters:u,optedIn:g,blocked:m,readStatus:y}=this.state;return(0,b.jsxs)(a.Z,{container:!0,className:e.root,children:[(0,b.jsx)(a.Z,{item:!0,xs:12,children:(0,b.jsx)(v.Z,{filterName:"Last Seen",dates:u.lastActive,setFilter:e=>this.setDateFilter("lastActive",e),setDateFilter:this.setDateFilter,disabled:s})}),(0,b.jsx)(a.Z,{item:!0,xs:12,children:(0,b.jsx)(v.Z,{filterName:"Created At",dates:u.createdAt,setDateFilter:this.setDateFilter,setFilter:e=>this.setDateFilter("createdAt",e)})}),(0,b.jsx)(a.Z,{item:!0,xs:12,md:4,children:(0,b.jsxs)(l.Z,{py:2,children:[(0,b.jsxs)(a.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,b.jsx)(o.Z,{variant:"body1",children:"Opted In"}),(0,b.jsx)(l.Z,{ml:1,children:(0,b.jsx)(c.ZP,{enterTouchDelay:0,style:{fontSize:"1em"},placement:"top",title:"Opted In for campaigns.",children:(0,b.jsx)(x.Z,{color:"disabled"})})})]}),(0,b.jsxs)(a.Z,{container:!0,spacing:1,style:{marginLeft:"-12px"},children:[(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"yes"===g,color:"primary",onChange:this.handleOptin,value:"yes",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"Yes"})]}),(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"no"===g,color:"primary",onChange:this.handleOptin,value:"no",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"No"})]}),(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"all"===g,color:"primary",onChange:this.handleOptin,value:"all",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"All"})]})]})]})}),(0,b.jsx)(a.Z,{item:!0,xs:12,md:4,children:(0,b.jsxs)(l.Z,{py:2,children:[(0,b.jsxs)(a.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,b.jsx)(o.Z,{variant:"body1",children:"Incoming Blocked"}),(0,b.jsx)(l.Z,{ml:1,children:(0,b.jsx)(c.ZP,{enterTouchDelay:0,style:{fontSize:"1em"},placement:"top",title:"User blocked due to spam/abusive behaviour.",children:(0,b.jsx)(x.Z,{color:"disabled"})})})]}),(0,b.jsxs)(a.Z,{container:!0,spacing:1,style:{marginLeft:"-12px"},children:[(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"yes"===m,color:"primary",onChange:this.handleBlocked,value:"yes",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"Yes"})]}),(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"no"===m,color:"primary",onChange:this.handleBlocked,value:"no",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"No"})]}),(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"all"===m,color:"primary",onChange:this.handleBlocked,value:"all",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"All"})]})]})]})}),n?null:(0,b.jsx)(a.Z,{item:!0,xs:12,md:4,children:(0,b.jsxs)(l.Z,{py:2,children:[(0,b.jsxs)(a.Z,{item:!0,xs:12,container:!0,alignItems:"center",children:[(0,b.jsx)(o.Z,{variant:"body1",children:"Read 
1Status"}),(0,b.jsx)(l.Z,{ml:1,children:(0,b.jsx)(c.ZP,{enterTouchDelay:0,style:{fontSize:"1em"},placement:"top",title:"Users based on read or unread messages.",children:(0,b.jsx)(x.Z,{color:"disabled"})})})]}),(0,b.jsxs)(a.Z,{container:!0,spacing:1,style:{marginLeft:"-12px"},children:[(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"read"===y,color:"primary",onChange:this.handleReadstatus,value:"read",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"Read"})]}),(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"unread"===y,color:"primary",onChange:this.handleReadstatus,value:"unread",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"Unread"})]}),(0,b.jsxs)(a.Z,{item:!0,xs:3,style:{display:"flex"},alignItems:"center",children:[(0,b.jsx)(d.Z,{checked:"all"===y,color:"primary",onChange:this.handleReadstatus,value:"all",size:"small"}),(0,b.jsx)(o.Z,{variant:"body2",children:"All"})]})]})]})}),(0,b.jsx)(a.Z,{item:!0,xs:12,children:(0,b.jsxs)(l.Z,{mt:2,mb:2,className:e.filterTypeContainer,children:[(0,b.jsx)(o.Z,{variant:"body1",style:{minHeight:30},children:"Attributes"}),(0,b.jsx)(a.Z,{item:!0,container:!0,spacing:1,alignItems:"center",xs:12,children:r.map(((t,s)=>this.filterRowUI(e,t,s)))})]})}),(0,b.jsx)(a.Z,{item:!0,xs:12,container:!0,children:!0===t?(0,b.jsx)(l.Z,{m:"0.7em 2em",children:(0,b.jsx)(h.Z,{})}):(0,b.jsxs)(i.Fragment,{children:[(0,b.jsx)(a.Z,{item:!0,children:(0,b.jsx)(l.Z,{mt:2,mb:2,mr:2,className:e.filterTypeContainer,children:(0,b.jsx)(p.Z,{variant:"contained",color:"primary",onClick:this.apply,children:"Apply"})})}),(0,b.jsx)(a.Z,{item:!0,children:(0,b.jsx)(l.Z,{mt:2,mb:2,className:e.filterTypeContainer,children:(0,b.jsx)(p.Z,{onClick:this.clearAll,children:"Clear All"})})})]})})]})}}const _=(0,f.connect)((e=>({tags:e.tags.tags,campaigns:e.campaignsList.campaignsList,agents:e.agents.agents,attributes:e.tags.attributes,assistantDetails:e.assistantDetails.data})))(Z),D=(0,u.Z)((e=>({root:{marginBottom:"30px"},textFieldRoot:{backgroundColor:"rgb(240,240,240)",outline:"none",border:"none",borderRadius:"8px",width:"100%",padding:"0",boxShadow:"none",boxSizing:"border-box",fontFamily:"Roboto, sans-serif",fontSize:"15px",fontWeight:500},inputPadding:{padding:"12px 10px"},optionText:{width:"210px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})))(_)},32413:(e,t,s)=>{s.d(t,{Z:()=>x});var i=s(47313),a=s(21144),n=s(73908),o=s(20337),r=s(11652),l=s(57009),c=s(61809),d=s(78371),h=s(52376),p=s(36642),u=s(19206),g=s(49904),m=(s(59017),s(1805),s(29882)),y=(s(29618),s(46417));const x=(0,h.Z)((e=>({linkText:{"&:hover":{textDecoration:"underline"}},formDialog:{padding:"0px",height:"80vh"},dialogClasses:{"& .MuiPaper-root":{margin:"auto",background:"transparent",boxShadow:"none",minWidth:"80vw",[e.breakpoints.down("md")]:{height:"40vh"},[e.breakpoints.up("md")]:{height:"80vh"}}}})))((e=>{let{prospectId:t,section:s,includeSection:h,singleColumn:x,justifyContent:v,inChatBox:f,includeVideo:b,classes:w,overideStyles:j,color:S=!1}=e;const C=[...g.g[s].docLinks,...h?g.g[h].docLinks:[]],[k,Z]=(0,i.useState)("");return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(a.Z,{container:!0,spacing:2,justify:f?"center":"flex-start",alignItems:"center",style:j||{},children:C.map(((e,i)=>(0,y.jsx)(a.Z,{item:!0,xs:12,md:x?12:6,style:{maxWidth:f?"300px":"unset"},children:e.isVideo?b?(0,y.jsx)(n.Z,{color:S||"primary",className:e.url,children:(0,y.jsx)(o.Z,{startIcon:(0,y.jsx)(p.Z,{}),color:S||"primary",onClick:async()=>{e.trackEvent&&await(0,m.Q)({triggerEvent:e.triggerEvent,triggerNote:e.title,relatedProspectId:t,activityCode:220})},children:e.title})}):"":e.isYTVideo?(0,y.jsx)(n.Z,{color:S||"primary",className:e.url,children:(0,y.jsx)(o.Z,{startIcon:(0,y.jsx)(p.Z,{}),color:S||"primary",onClick:()=>{Z(e.url)},children:e.title})}):(0,y.jsx)(r.Z,{color:S||"primary",href:e.url,target:"_blank",onClick:async s=>{s.preventDefault(),e.triggerEvent&&await(0,m.Q)({triggerEvent:e.triggerEvent,triggerNote:e.title,relatedProspectId:t,activityCode:220}),window.open(e.url,"_blank")},children:(0,y.jsxs)(n.Z,{display:"flex",alignItems:"flex-start",justifyContent:v||"normal",style:"whatsappPaySettings"===s?{padding:"8px 6px"}:{},children:[(0,y.jsx)(u.Z,{style:{marginRight:6,fontSize:18}}),(0,y.jsx)(l.Z,{className:w.linkText,children:e.title})]})})},i)))}),(0,y.jsx)(c.Z,{open:k,onClose:(e,t)=>{"backdropClick"!==t&&"escapeKeyDown"!==t||Z("")},maxWidth:"xs",fullWidth:!0,className:w.dialogClasses,children:(0,y.jsx)(d.Z,{className:w.formDialog,children:(0,y.jsx)("iframe",{width:"100%",height:"100%",src:k,title:"WhatsApp Pay Demo| HRX by Eatfit",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
1 web-share",referrerpolicy:"strict-origin-when-cross-origin",allowfullscreen:!0})})})]})}))},49904:(e,t,s)=>{s.d(t,{g:()=>i});const i={template:{sectionDisplayName:"Template Message",section:"template",docLinks:[{url:"https://faq.aisensy.com/how-to-create-whatsapp-template-messages-in-aisensy/",title:"How to Create WhatsApp Template Message?",triggerEvent:"explore_template_page_tutorial"},{url:"https://m.aisensy.com/how-to-use-parameters-in-whatsapp-template-message",title:"Use chatbot parameters for leads",triggerEvent:"explore_template_page_tutorial"},{url:"https://m.aisensy.com/how-to-add-quick-reply-to-whatsapp-template-message",title:"Add Quick Reply to WhatsApp Template Message",triggerEvent:"explore_template_page_tutorial"},{url:"https://faq.aisensy.com/whatsapp-template-message-guidelines/",title:"Message formatting guideline (Bold, Italic & more)",triggerEvent:"explore_template_page_tutorial"}]},tag:{sectionDisplayName:"Tag",section:"tag",docLinks:[{url:"https://faq.aisensy.com/chat-profile/",title:"Chat Profile & First Message Tag",triggerEvent:"explore_tags_page_tutorial"},{url:"https://wiki.aisensy.com/en/articles/11501925-how-to-add-and-manage-tags-in-aisensy",title:"How to create & add tags to contacts",triggerEvent:"explore_tags_page_tutorial"}]},liveChat:{sectionDisplayName:"Live Chat",section:"liveChat",docLinks:[{url:"https://m.aisensy.com/how-to-add-user-attributes-manually",title:"Add user attributes manually",triggerEvent:"explore_live_page_tutorial"},{url:"https://m.aisensy.com/how-to-set-tags-and-attributes-from-user-profile",title:"Add/Remove Tag & update attribute",triggerEvent:"explore_live_page_tutorial"},{url:"https://m.aisensy.com/how-to-create-media-link-whatsapp-template-message",title:"Send & Generate media link",triggerEvent:"explore_live_page_tutorial"}]},attribute:{sectionDisplayName:"Attribute",section:"attribute",docLinks:[{url:"https://m.aisensy.com/how-to-add-user-attributes-manually",title:"Add user attributes manually",triggerEvent:"add_user_attributes_manually"},{url:"https://wiki.aisensy.com/en/articles/11502709-attributes-in-aisensy",title:"Attributes in AiSensy",triggerEvent:"attributes_in_aisensy"}]},globalVariable:{sectionDisplayName:"GlobalAttribute",section:"globalAttribute",docLinks:[{url:"https://help.aisensy.com/en/articles/9267658-how-to-use-global-attributes-in-aisensy",title:"Global attributes in AiSensy",triggerEvent:"attributes_in_aisensy"}]},campaign:{sectionDisplayName:"Campaign",section:"campaign",docLinks:[{url:"https://m.aisensy.com/how-to-use-filters-to-refine-whatsapp-broadcast",title:"Audience segregation for WhatsApp Broadcast",triggerEvent:"explore_campaigns_page_tutorial"},{url:"https://m.aisensy.com/how-to-upgrade-whatsapp-tier-limit",title:"Upgrade WhatsApp Tier Limit",triggerEvent:"explore_campaigns_page_tutorial"}]},contact:{sectionDisplayName:"Contacts",section:"contact",docLinks:[{url:"https://faq.aisensy.com/how-to-import-export-contacts-in-aisensy/",title:"Import upto 2 lakh contacts in one go",triggerEvent:"explore_contacts_page_tutorial"},{isVideo:!0,url:"wistia_embed wistia_async_cg750v82cx popover=true popoverContent=link wistia_embed_initialize playerColor=04454D",title:"Watch Tutorial",triggerEvent:"explore_contacts_page_tutorial"}]},chatbot:{sectionDisplayName:"Chatbot",section:"chatbot",docLinks:[{url:"https://faq.aisensy.com/how-to-create-drag-drop-chatbot-in-just-10-minutes-chatbot-flow-builder/",title:"Setup Welcome WhatsApp Chatbot",triggerEvent:"explore_chatbot_page_tutorial"}]},integration:{sectionDisplayName:"Integration",section:"integration",docLinks:[{url:"https://faq.aisensy.com/how-to-create-free-whatsapp-button-for-your-website/",title:"Create WhatsApp Button for Free",triggerEvent:"explore_integration_tutorial"},{url:"https://m.aisensy.com/blog/how-to-create-whatsapp-link",title:"Create WhatsApp Link for Free",triggerEvent:"explore_integration_tutorial"}]},migration:{sectionDisplayName:"Dashboard",section:"migration",docLinks:[{url:"https://m.aisensy.com/how-to-add-agents-and-managers-in-aisensy-app",title:"2fa disabled",triggerEvent:"explore_migraton_page_tutorial"}]},agent:{sectionDisplayName:"Agent",section:"agent",docLinks:[{url:"https://m.aisensy.com/how-to-add-agents-and-managers-in-aisensy-app",title:"Learn how to manage team members & managers",triggerEvent:"explore_agents_page_tutorial"}]},facebook:{sectionDisplayName:"Facebook Verification",section:"facebook",docLinks:[{url:"https://m.aisensy.com/how-to-ver
1ify-facebook-business-manager-account",title:"How to apply for FB Verification?",triggerEvent:"explore_facebook_tutorial"},{url:"https://m.aisensy.com/what-if-the-facebook-verification-start-button-is-greyed",title:"FB Verification button greyed out?",triggerEvent:"explore_facebook_tutorial"}]},display_and_phone:{sectionDisplayName:"Display Name & Phone Number",section:"display_and_phone",docLinks:[{url:"https://help.aisensy.com/en/articles/5348553-phone-number-rules",title:"Phone Number Rules",triggerEvent:"explore_display_name_tutorial"},{url:"https://help.aisensy.com/en/articles/5348554-display-name-rules",title:"Display Name Rules",triggerEvent:"explore_display_name_tutorial"}]},waba:{sectionDisplayName:"WABA",section:"waba",docLinks:[{url:"https://faq.aisensy.com/steps-to-apply-for-whatsapp-business-api/",title:"How to apply for WhatsApp Business API?",triggerEvent:"explore_waba_tutorial"}]},greenTick:{sectionDisplayName:"Green Tick",section:"greenTick",docLinks:[{url:"https://faq.aisensy.com/how-to-apply-for-whatsapp-green-tick/",title:"WhatsApp Blue Tick",triggerEvent:"explore_green_tick_tutorial"}]},profileEdit:{sectionDisplayName:"Customize WhatsApp Profile",section:"profileEdit",docLinks:[{url:"https://m.aisensy.com/how-to-edit-whatsapp-business-profile-in-aisensy",title:"How to Edit Business Profile?",triggerEvent:"explore_profile_edit_tutorial"}]},canned:{sectionDisplayName:"Canned Message",section:"canned",docLinks:[{url:"https://faq.aisensy.com/what-are-canned-messages-how-to-add-them-in-aisensy/",title:"How to create Canned Message?",triggerEvent:"explore_canned_message_tutorial"}]},billingAndUsage:{sectionDisplayName:"Billing and Usage",section:"billingAndUsage",docLinks:[{url:"https://faq.aisensy.com/aisensy-billing-cycle-whatsapp-pricing-details/",title:"How does AiSensy billing works?",triggerEvent:"explore_billing_and_usage_tutorial"}]},catalogue:{sectionDisplayName:"Catalogue",section:"catalogue",docLinks:[{url:"https://m.aisensy.com/how-to-create-canned-messages-in-aisensy",title:"How to create Cart Catalogue ?",triggerEvent:"explore_catalogue_tutorial"}]},opt:{sectionDisplayName:"Opt-out/Opt-in User",section:"opt",docLinks:[{url:"https://faq.aisensy.com/how-to-opt-in-opt-out-users-from-your-whatsapp-broadcasts-in-aisensy/",title:"How to create Opt-out/Opt-in User?",triggerEvent:"explore_canned_message_tutorial"}]},liveChatSettings:{sectionDisplayName:"Live Chat Settings",section:"liveChatSettings",docLinks:[{url:"https://faq.aisensy.com/how-to-set-up-welcome-off-hours-auto-replies-in-aisensy-app/",title:"How to enable Auto Resolve Chats?",triggerEvent:"explore_live_chat_tutorial"}]},notification:{sectionDisplayName:"Notification",section:"notification",docLinks:[{url:"https://wiki.aisensy.com/en/articles/11502615-notification-preferences-customize-sound-push-notifications-for-requesting-chats",title:"How to enable Sound & Push Notifications?",triggerEvent:"explore_notification_preference_tutorial"}]},shopify:{sectionDisplayName:"Ecomm",section:"ecomm",docLinks:[{url:"https://wiki.aisensy.com/en/articles/11484725-how-to-setup-messages-for-your-shopify-store-aisensy-x-shopify-2",title:"How to setup automated shopify messages",triggerEvent:"explore_shopify_in_ecomm"}]},shopifySetup:{sectionDisplayName:"Ecomm",section:"ecomm",docLinks:[{url:"https://help.aisensy.com/en/articles/7029056-how-to-create-access-token-api-secret-key-from-shopify-aisensy-x-shopify-1",title:"How to get Access Token and API Secret Key",triggerEvent:"explore_shopify_in_ecomm"}]},woocommerce:{sectionDisplayName:"Ecomm",section:"ecomm",docLinks:[{url:"https://help.aisensy.com/en/articles/7040525-woocommerce-x-aisensy-how-to-integrate-woocommerce-with-aisensy",title:"How to setup automated woocommerce messages",triggerEvent:"explore_woocommerce_in_ecomm"}]},woocommerceSetup:{sectionDisplayName:"Ecomm",section:"ecomm",docLinks:[{url:"https://help.aisensy.com/en/articles/7034328-how-to-create-woocommerce-secret-api-keys",title:"How to get Consumer Key and Secret Key",triggerEvent:"explore_woocommerce_in_ecomm"}]},metaAds:{sectionDisplayName:"Meta Ads",section:"metaAds",docLinks:[{url:"https://wiki.aisensy.com/en/?q=meta%20ads",title:"How to run Ads",triggerEvent:"explore_meta_ads"},{isYTVideo:!0,url:"https://youtube.com/embed/Q3H_Qmd0cys",title:"Click to WhatsApp Ads setup tutorial",triggerEvent:"explore_meta_ad"}]},metaAudiences:{sectionDisplayName:"Meta Audiences",section:"metaAudiences",docLinks:[{url:"https://www.facebook.com/business/help/610516375684216?id=2469097953376494",title:"How to create Website Audiences",triggerEvent:"explore_meta_audie
1nces"}]},shopifyAccessScopesEdit:{sectionDisplayName:"Chat",section:"chat",docLinks:[{url:"https://help.aisensy.com/en/articles/7628493-how-to-give-read-customer-permission-in-an-existing-shopify-app",title:"Read docs",triggerEvent:"add_customer_access_scopes_for_shopify"}]},whatsappPaySettings:{sectionDisplayName:"Whatsapp Pay Settings",section:"whatsappPaySettings",docLinks:[{url:"https://help.aisensy.com/en/articles/8300048-how-to-connect-whatsapp-pay-with-aisensy",title:"Read User Guide",triggerEvent:"explore_whatsapp_pay_settings_doc"},{isYTVideo:!0,url:"https://www.youtube.com/embed/k_MzrqOoZK4",title:"WhatsApp Payment Journey",triggerEvent:"explore_whatsapp_pay_journey_doc"},{isVideo:!0,url:"wistia_embed wistia_async_lstj0e9045 popover=true popoverContent=link wistia_embed_initialize playerColor=04454D",title:"WhatsApp Payment Setup Video",triggerEvent:"explore_whatsapp_pay_journey_doc"},{isVideo:!0,url:"wistia_embed wistia_async_2lpyv64wag popover=true popoverContent=link wistia_embed_initialize playerColor=04454D",title:"How to use WhatsApp Payment",triggerEvent:"explore_whatsapp_pay_journey_doc"}]}}},69642:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Ce});var i=s(47313),a=s(21144),n=s(42445),o=s(74993),r=s(52376),l=s(45788),c=s(50122),d=s(63830),h=s(1805),p=s(57009),u=s(3873),g=s(73908),m=s(72728),y=s(84747),x=s(54070),v=s(52194),f=s(61809),b=s(20337),w=s(12599),j=s(93936),S=s(35984),C=s(88186),k=s(2186),Z=s(14489),_=s(98677),D=s(46417);const{isAiSensy:I}=(0,_.K)();class N extends i.Component{constructor(e){super(e),this.USE_NEW_FILTER_BUILDER=I,this.handleChange=e=>{this.setState({[e.target.name]:e.target.value})},this.handleFilterIconClick=e=>{this.setState({filterAnchor:e.currentTarget,openFilter:!this.state.openFilter})},this.handleFilterClose=(e,t)=>{"backdropClick"!==t&&this.setState({filterAnchor:null,openFilter:!1})},this.getFilterState=e=>{this.setState({allFiltersLocal:{...e}})},this.apply=e=>{this.setState({tempSearch:"",searchString:""}),this.props.changeSearchString(""),this.props.changeFilters({...e}),this.props.loadHistory(),this.handleFilterClose()},this.clearFilters=()=>{this.setState({tempSearch:"",searchString:""}),this.props.changeSearchString(""),this.props.changeFilters(null),this.handleFilterClose(),this.props.loadHistory()},this.onChange=e=>{this.setState({tempSearch:e.target.value}),this.state.searchString&&this.setState({searchString:""},(()=>{this.props.changeSearchString(""),this.props.changeFilters(null),this.handleFilterClose(),this.props.loadHistory(),this.getFilterState(null)}))},this.search=()=>{if(this.state.searchString){const e={dateFilters:{lastActive:{startDate:null,toDate:null,focusedInput:null},createdAt:{startDate:null,toDate:null,focusedInput:null},tags:[]},filters:[{key:"userNumber",name:"Mobile Number",type:"String"},{key:"userName",name:"Name",type:"String"}].map(((e,t,s)=>({attributeKey:e.key,attributeName:e,attributeType:e.type,condition:t<s.length-1?"or":"and",freeSolo:!0,operator:"contains",operators:["is","is not","contains","not contains"],options:["SET","NOT SET"],value:this.state.searchString})))};this.getFilterState(e),this.props.changeFilters(e),this.props.changeSearchString(this.state.searchString),this.props.loadHistory(),this.handleFilterClose()}},this.handleSearch=e=>{"Enter"===e.key&&this.setState({searchString:e.target.value},(()=>{this.search()}))},this.state={filterAnchor:null,openFilter:!1,allFiltersLocal:null,searchString:"",tempSearch:"",inputFocused:!1,showDropDown:!1,selectedDays:null}}componentDidMount(){this.setState({tempSearch:this.props.searchString,searchString:this.props.searchString}),this.props.isChatSearch&&this.setState({tempSearch:this.props.searchText,searchString:this.props.searchText})}render(){const{classes:e,allFilters:t,isChatSearch:s,changeChatSearchState:i,updateSearchText:a,searchText:n,fetchChats:o,selectUser:r,assistantDetails:l}=this.props,{openFilter:c,allFiltersLocal:d,searchString:h,tempSearch:u,inputFocused:Z}=this.state,_=d||t;return(0,D.jsxs)(g.Z,{display:"flex",alignItems:"center",height:"60px",p:"0em 14px",style:{background:"#FDFFFC"},children:[(0,D.jsx)(m.Z,{placeholder:s?"Search message ":"Search name or mobile number",color:"primary",value:u,style:{backgroundColor:u||Z?"rgb(247,247,247)":"#f0f0f0"},onFocus:()=>{this.setState({inputFocused:!0})},onBlur:()=>{this.setState({inputFocused:!1})},className:e.textFieldRoot,onChange:this.onChange,onKeyDown:this.handleSearch,InputProps:{endAdornment:(0,D.jsx)(y.Z,{position:"end",children:h||n?(0,D.jsx)(x.Z,{color:"primary",className:e.iconButton,onClick:()=>{this.setState({tempSearch:""}),h&&this.setState({searchString:""},(()=>{this.clearFilters(),this.getFilterState(null)})),s&&(a(""),r(null),i(!1))},children:(0,D.jsx)(w.Z,{})}):(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(x.Z,{color:"primary",className:e.iconButton,style:{backgroundColor:s?"transparent":"#d6ede9"},onClick:()=>{i(!1),this.setState({searchString:this.state.tempSearch},(()=>{this.search()}))},children:(0,D.jsx)(j.Z,{})})})})}}),(0,D.jsx)(x.Z,{onClick:s?null:this.handleFilterIconClick,children:(0,D.jsx)(v.Z,{color:"primary",variant:"dot",invisible:s||null===t,children:(0,D.jsx)(S.Z,{className:e.icon})})}),(0,D.jsx)(f.Z,{open:c,onClose:this.handleFilterClose,maxWidth:"md",fullWidth:!0,classes:{root:e.dialogContainer,paper:e.dialogPaper},children:(0,D.jsxs)(g.Z,{className:e.dialogContent,children:[(0,D.jsxs)(g.Z,{className:e.dialogHeader,children:[(0,D.jsxs)(g.Z,{children:[(0,D.jsx)(p.Z,{variant:"h3",className:e.dialogTitle,children:"Filters"}),(0,D.jsx)(p.Z,{className:e.dialogSubtitle,children:"Refine the history list by adding one or more filters."})]}),(0,D.jsx)(b.Z,{variant:"outlined",onClick:this.handleFilterClose,className:e.closeButton,children:"Close"})]}),this.USE_NEW_FILTER_BUILDER?(0,D.jsx)(k.Z,{assistantId:this.props.match.params.projectId,filterOnly:!0,includeReadStatus:!0,allFilters:_,onFiltersChange:e=>{e?this.apply(e):this.clearFilters()}}):(0,D.jsx)(C.Z,{getFilterState:this.getFilterState,apply:this.apply,allFilters:_,clearFilters:this.clearFilters,currentPage:"history"})]})})]})}}const A=(0,l.connect)((e=>({allFilters:e.history.allFilters,searchString:e.history.searchString,isChatSearch:e.chatsSearch.isChatSearch,searchText:e.chatsSearch.searchText,assistantDetails:e.assistantDetails.data})),{changeFilters:c.P7,changeSearchString:c.bE,updateSearchText:Z.AR,changeChatSearchState:Z.Yv,fetchChats:Z.gE,selectUser:c.dy})((0,d.withRouter)(N)),F=(0,r.Z)((e=>({dialogContainer:{zIndex:"3400 !important"},dialogPaper:{borderRadius:6,backgroundColor:"#f7fbf9",width:"min(860px, calc(100% - 32px))",maxWidth:"860px",overflow:"hidden",[e.breakpoints.down("sm")]:{width:"calc(100% - 24px)",maxWidth:"calc(100% - 24px)",borderRadius:6}},dialogContent:{padding:"24px",display:"flex",flexDirection:"column",gap:18,[e.breakpoints.down("sm")]:{padding:"16px",gap:14}},dialogHeader:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",gap:16},dialogTitle:{color:"#11332c",fontWeight:600,lineHeight:1.2},dialogSubtitle:{marginTop:6,color:"#5f6f69",fontSize:13,lineHeight:1.5},closeButton:{minWidth:92,borderColor:"#cfdad5",backgroundColor:"#fff",textTransform:"none",boxShadow:"none","&:hover":{borderColor:"#b7c8c1",backgroundColor:"#fdfefe",boxShadow:"none"}},select:{cursor:"pointer",paddingRight:"0px !important"},icon:{fontSize:"1em"},searchField:{margin:"0.4em 0.2em"},textFieldRoot:{padding:"2px 6px 2px 15px",flexGrow:1,marginRight:8,"&:focus":{background:"white !important"}},iconButton:{padding:"6px",background:"#d6ede9","& svg":{fontSize:15,cursor:"pointer"},"&:hover":{background:"#d6ede9"}}})))(A);var L=s(79657),T=s(34882),U=s(96083),E=s(47735),P=s(26773),O=s(83061),M=s(77560),R=s.n(M),H=s(70089),B=s(70816),W=s.n(B),z=s(306),V=s(93553),q=Object.defineProperty,Y=(e,t,s)=>((e,t,s)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!==typeof t?t+"":t,s),K=new Map,G=new WeakMap,X=0,Q=void 0;function $(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return"".concat(t,"_").concat("root"===t?(s=e.root)?(G.has(s)||(X+=1,G.set(s,X.toString())),G.get(s)):"0":e[t]);var s})).toString()}function J(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Q;if("undefined"===typeof window.IntersectionObserver&&void 0!==i){const a=e.getBoundingClientRect();return t(i,{isIntersecting:i,target:e,intersectionRatio:"number"===typeof s.threshold?s.threshold:0,time:0,boundingClientRect:a,intersectionRect:a,rootBounds:a}),()=>{}}const{id:a,observer:n,elements:o}=function(e){const t=$(e);let s=K.get(t);if(!s){const i=new Map;let a;const n=new IntersectionObserver((t=>{t.forEach((t=>{var s;const n=t.isIntersecting&&a.some((e=>t.intersectionRatio>=e));e.trackVisibility&&"undefined"===typeof t.isVisible&&(t.isVisible=n),null==(s=i.get(t.target))||s.forEac
1h((e=>{e(n,t)}))}))}),e);a=n.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),s={id:t,observer:n,elements:i},K.set(t,s)}return s}(s),r=o.get(e)||[];return o.has(e)||o.set(e,r),r.push(t),n.observe(e),function(){r.splice(r.indexOf(t),1),0===r.length&&(o.delete(e),n.unobserve(e)),0===o.size&&(n.disconnect(),K.delete(a))}}i.Component;var ee=s(30832);const te=(0,l.connect)((e=>({isChatSearch:e.chatsSearch.isChatSearch,searchText:e.chatsSearch.searchText,selectedMessage:e.chatsSearch.selectedMessage,selectedUser:e.history.selectedUser,isChatLoading:e.chatsSearch.isLoading,selectedUserData:e.chatsSearch.selectedUserData,firstLoadedMessageOfUser:e.chatsSearch.firstLoadedMessageOfUser})),{selectUser:c.dy,switchDialogOpen:c.fV,selectConversationMessage:Z.W_,readLiveChats:z.zB,updateUsersChat:z.XO,updateUserAndDialog:z.M7,updateUserAndDialogHistory:c.M7,selectUserData:Z.tT,updateHistoryUsersChat:c.XO,fetchMoreChats:Z.M0,loadNext:c.wY,updateInactiveUsers:c.I9})((function(e){var t;const{classes:s,selectUser:n,users:o,isLoading:r,searchText:l,isChatSearch:c,selectedMessage:m,selectConversationMessage:y,updateUserAndDialog:x,selectedUser:v,isChatLoading:f,fetchMoreChats:b,updateInactiveUsers:w}=e,{dialogOpen:j,switchDialogOpen:S}=e,[C,k]=(0,i.useState)(!1),[Z,_]=(0,i.useState)(null),I=(0,i.useRef)(null),N=(0,i.useRef)(null),A=null===(t=(0,d.useHistory)().location.state)||void 0===t?void 0:t.isFromLive,F=(0,d.useParams)(),{ref:M,inView:B}=function(){let{threshold:e,delay:t,trackVisibility:s,rootMargin:a,root:n,triggerOnce:o,skip:r,initialInView:l,fallbackInView:c,onChange:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var h;const[p,u]=i.useState(null),g=i.useRef(),[m,y]=i.useState({inView:!!l,entry:void 0});g.current=d,i.useEffect((()=>{if(r||!p)return;let i;return i=J(p,((e,t)=>{y({inView:e,entry:t}),g.current&&g.current(e,t),t.isIntersecting&&o&&i&&(i(),i=void 0)}),{root:n,rootMargin:a,threshold:e,trackVisibility:s,delay:t},c),()=>{i&&i()}}),[Array.isArray(e)?e.toString():e,p,n,a,o,r,s,c,t]);const x=null==(h=m.entry)?void 0:h.target,v=i.useRef();p||!x||o||r||v.current===x||(v.current=x,y({inView:!!l,entry:void 0}));const f=[u,m.inView,m.entry];return f.ref=f[0],f.inView=f[1],f.entry=f[2],f}({triggerOnce:!1,onChange:t=>{t&&(c?b(null===F||void 0===F?void 0:F.projectId):e.loadNext(null===F||void 0===F?void 0:F.projectId))}});(0,i.useEffect)((()=>{A&&N.current&&I.current&&(I.current.scrollTop=N.current.offsetTop-I.current.offsetTop)}),[A]);const z=e=>{var t=W()(e),s=W()(Date.now()-864e5).format("DD MMM YYYY hh:mm a");return t.isAfter(s)},q=(e,t)=>{let s=t;if(e&&e.split(" ").length){let t=e.split(" ")[0];s=t+" "+(s.split(t).length>1?s.split(t)[1]:"")}for(let i=0;i<e.split(" ").length;i++)s=R()(s,e.split(" ")[i],(e=>e?(0,D.jsxs)("mark",{children:[e," "]}):""));return s},Y=async(t,s)=>{var i;if(c)if(y(s),(null===v||void 0===v?void 0:v._id)!=t._id){k(!0),_(null===s||void 0===s?void 0:s._id),n(null),e.selectUserData({selectedUserData:null,firstLoadedMessageOfUser:[]});const i=await H.Z.post(h.URL+"/api/get-user",{assistantId:t.assistantId,conversationId:t._id,isFetchAll:!0}).then((e=>{const t=e.data;for(let s of null===t||void 0===t?void 0:t.chats)if(null!==s&&void 0!==s&&s.payload){const e=s.payload;if(null!==e&&void 0!==e&&e.buttons&&!Array.isArray(null===e||void 0===e?void 0:e.buttons)&&(e.buttons=[]),null!==e&&void 0!==e&&e.formattedButtons&&!Array.isArray(null===e||void 0===e?void 0:e.formattedButtons)&&(e.formattedButtons=[]),null!==e&&void 0!==e&&e.formattedButtons&&Array.isArray(e.formattedButtons))for(let t of e.formattedButtons)null!==t&&void 0!==t&&t.parameters&&!Array.isArray(t.parameters)&&(t.parameters=[])}return t})).catch((e=>{}));if(k(!1),_(null),z(t.lastActive)){n(null);const a=i.chats.findIndex(((e,t,i)=>e._id===(null===s||void 0===s?void 0:s._id))),o=i.chats.slice(a,a+30);e.selectUserData({selectedUserData:i,firstLoadedMessageOfUser:o}),e.updateUsersChat({...i,chats:o}),x(null===t||void 0===t?void 0:t._id,!1),e.history.push("/projects/".concat(t.assistantId,"/live?convoId=").concat(t._id),{isFromHistory:!0})}else{const a=i.chats.findIndex(((e,t,i)=>e._id===(null===s||void 0===s?void 0:s._id))),n=i.chats.slice(a,a+30);e.selectUserData({selectedUserData:i,firstLoadedMessageOfUser:n}),e.updateUserAndDialogHistory({...null!==i&&void 0!==i?i:t,chats:n},!1),e.history.push("/projects/".concat(t.assistantId,"/history?convoId=").concat(t._id))}}else!function(t,s){if(!t||null===t||void 0===t||!t.chats||!s)return;const i=t.chats,a=e.firstLoadedMessageOfUser.findIndex(((e,t,i)=>(null===e||void 0===e?void 0:e._id)===s)),n=i.findIndex((e=>e._id===s));if(a<0&&n>=0){const s=t.chats.findIndex(((t,s,i)=>t._id===e.firstLoadedMessageOfUser[0]._id));if(n<s){const a=n,o=s;e.updateHistoryUsersChat({...t,chats:[...i.slice(a,o),...e.firstLoadedMessageOfUser]}),e.selectUserData({selectedUserData:t,firstLoadedMessageOfUser:[...i.slice(a,o),...e.firstLoadedMessageOfUser]})}else if(n>=s+30){const a=s+30,o=n+1;e.updateHistoryUsersChat({...t,chats:[...e.firstLoadedMessageOfUser,...i.slice(a,o)]}),e.selectUserData({selectedUserData:t,firstLoadedMessageOfUser:[...e.firstLoadedMessageOfUser,...i.slice(a,o)]})}}}(e.selectedUserData,null===s||void 0===s?void 0:s._id);else e.history.push("/projects/".concat(t.assistantId,"/history?convoId=").concat(t._id)),n(t),S(!1);const a=null===t||void 0===t||null===(i=t.chats)||void 0===i?void 0:i.find((e=>"USER"===(null===e||void 0===e?void 0:e.sender)));if(a&&"READ"!==(null===a||void 0===a?void 0:a.status)){var o;(0,ee.L$)(null===a||void 0===a?void 0:a.conversationId,t.assistantId,a._id);const e=null===t||void 0===t||null===(o=t.chats)||void 0===o?void 0:o.map((e=>e._id===a._id?{...e,status:"READ"}:e)),s={...t,chats:e};w(s)}};return new RegExp("(".concat(l.split(" ").map((e=>"".concat(e))).join("|"),")"),"g"),console.log("users",o),(0,D.jsxs)("div",{ref:I,id:"maplist",className:s.root,children:[o.length>0?o.map(((t,n)=>{var o,d,h,y,x,v,b,w,j,S,k,_,I,A,F,M,R,H,B;const{chats:W}=t,K=e.selectedUser||{},G=c?!!(W&&W.length>0)&&(null===(o=W[W.length-1])||void 0===o?void 0:o._id)===(null===m||void 0===m?void 0:m._id):t._id&&K._id===t._id;let X=0;if(!r)for(const e of W){if("USER"!==e.sender||"READ"===e.status){if(t.unReadMessages)continue;break}X++}const Q=W&&W.length>0?W[W.length-1]:null;return(0,V.Yr)(null===t||void 0===t?void 0:t._id),(0,D.jsx)(L.Z,{disabled:C,ref:(null===m||void 0===m?void 0:m._id)===(null===Q||void 0===Q?void 0:Q._id)?N:null,onClick:"Loading..."===t.userName&&"AiSensy"===t.secret?()=>{}:()=>{c&&W.length>0?Y(t,W[W.length-1]):Y(t)},style:{width:"100%",opacity:c&&C&&Z!==(null===Q||void 0===Q?void 0:Q._id)?.5:1},children:(0,D.jsxs)(a.Z,{container:!0,alignItems:"center",className:(0,O.Z)(s.userButton,{[s.chatSelected]:G}),children:[(0,D.jsx)(a.Z,{item:!0,children:(0,D.jsx)("div",{className:s.profilePicContainer,style:{color:t.displayColor},children:"Loading..."===t.userName?(0,D.jsx)(E.Z,{variant:"circle",height:"40px",width:"40px"}):(0,D.jsx)(p.Z,{variant:"h3",children:(null===(d=t.userName)||void 0===d?void 0:d.substring(0,1).toUpperCase())||"?"})})}),(0,D.jsx)(a.Z,{item:!0,xs:!0,zeroMinWidth:!0,children:(0,D.jsx)(g.Z,{pl:1,pr:2,textAlign:"left",children:"Loading..."===t.userName&&"AiSensy"===t.secret?(0,D.jsxs)(i.Fragment,{children:[(0,D.jsx)(E.Z,{variant:"rect",height:"15px",width:"90px",style:{borderRadius:"8px",marginBottom:"8px"}}),(0,D.jsx)(E.Z,{variant:"rect",height:"10px",width:"250px",style:{borderRadius:"8px"}})]}):(0,D.jsxs)(i.Fragment,{children:[(0,D.jsx)(T.ZP,{enterDelay:500,enterTouchDelay:500,placement:"bottom-start",title:(null===(h=t.userName)||void 0===h?void 0:h.toUpperCase())||"",children:(0,D.jsx)(p.Z,{variant:"h5",className:s.userNameHeader,children:(null===(y=t.userName)||void 0===y?void 0:y.toUpperCase())||"?"})}),(0,D.jsx)(p.Z,{variant:"body2",className:s.lastMessage,noWrap:!0,children:c?(0,D.jsx)(p.Z,{variant:"body2",className:s.lastMessage,noWrap:!0,children:q(l,(null===W||void 0===W?void 0:W.length)>0&&null!==(x=W[W.length-1])&&void 0!==x&&null!==(v=x.payload)&&void 0!==v&&v.text?(null===(b=W[W.length-1])||void 0===b?void 0:b.sender)+": "+(null===(w=W[W.length-1])||void 0===w||null===(j=w.payload)||void 0===j?void 0:j.text):W.length>0&&null!==(S=W[W.length-1])&&void 0!==S&&null!==(k=S.payload)&&void 0!==k&&k.caption?(null===(_=W[W.length-1])||void 0===_?void 0:_.sender)+": "+(null===(I=W[W.length-1])||void 0===I||null===(A=I.payload)||void 0===A?void 0:A.caption):"")}):(0,D.jsx)(P.gb,{text:(null===W||void 0===W?void 0:W.length)>0&&null!==(F=W[0])&&void 0!==F&&null!==(M=F.payload)&&void 0!==M&&M.text?(null===(R=W[0])||void 0===R?void 0:R.sender)+": "+(null===(H=W[0])||void 0===H||null===(B=H.payload)||void 0===B?void 0:B.text):""})})]})})}),(0,D.jsx)(a.Z,{item:!0,xs:1,children:X>0&&(0,D.jsx)("div",{className:s.unreadCountContainer,children:(0,D.jsxs)(p.Z,{variant:"h6",children:[X,"+"]})})}),!f&&c&&(0,D.jsx)("div",{style:{marginRight:"8px"},children:!f&&c&&(0,D.jsx)("div",{style:{marginRight:"8px"},children:z(null===t||void 0===t?void 0:t.lastActive)?(0,D.jsx)(U.Z,{size:"small",label:Z===(null===Q||void 0===Q?void 0:Q._id)&&C?"":"Live Chat",icon:Z===(null===Q||void 0===Q?void 0:Q._id)&&C?(0,D.jsx)(u.Z,{size:16,color:"white"}):null,style:{background:"#28c152",padding:"4px",color:"white",fontWeight:"600",fontSize:"12px"}}):(0,D.jsx)(U.Z,{size:"small",label:Z===(null===Q||void 0===Q?void 0:Q._id)&&C?"":"History Chat",icon:Z===(null===Q||void 0===Q?void 0:Q._id)&&C?(0,D.jsx)(u.Z,{size:16,color:"white"}):null,style:{background:"rgba(173, 173, 173, 0.85)",padding:"4px",color:"white",fontWeight:"600",fontSize:"12px"}})})})]})},n)})):(0,D.jsx)(a.Z,{container:!0,alignItems:"center",justify:"center",style:{height:"100%"},children:(0,D.jsx)(p.Z,{variant:"h5",children:"No chats yet !"})}),(0,D.jsx)("div",{ref:M,style:{height:"1px"}})]})})),se=(0,r.Z)((e=>({root:{width:"100%",overflowX:"hidden",height:"calc(100% - 110px)",[e.breakpoints.down("sm")]:{height:"initial"}},userButton:{width:"100%",height:"60px",borderBottom:"1px solid #f2f2f2",background:"white",cursor:"pointer",overflow:"hidden"},profilePicContainer:{height:"40px",width:"40px",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"50%",marginLeft:e.spacing(1),background:"#F5EFDF"},unreadCountContainer:{alignItems:"center",background:e.palette.primary.main,borderRadius:"50%",color:"white",display:"flex",width:"28px",height:"28px",justifyContent:"center",marginLeft:-e.spacing(1)},lastMessage:{maxHeight:"40px",color:"grey",fontWeight:"600"},chatSelected:{background:"whitesmoke"}
1,userNameHeader:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}})))((0,d.withRouter)(te)),ie=[{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"},{userName:"Loading...",secret:"AiSensy"}];class ae extends i.Component{constructor(e){super(e),this.state={rowsPerPage:null}}componentDidUpdate(){}render(){const{classes:e,isLoading:t,dialogOpen:s,totalChats:i,isChatSearch:a}=this.props,{inactiveUsers:n,selectedUser:o,page:r,rowsPerPage:l}=this.props,c=t?[...n,...ie]:n;return(0,D.jsxs)("div",{className:e.root,children:[(0,D.jsx)(F,{loadHistory:this.props.loadHistory}),(0,D.jsx)(se,{isLoading:t,users:c,dialogOpen:s,selectedUser:o}),a?null:(0,D.jsx)("div",{className:e.fixedBottomContainer,children:(0,D.jsxs)(p.Z,{variant:"body2",color:"textSecondary",paragraph:!0,children:[t&&(0,D.jsxs)(D.Fragment,{children:["".concat((n||[]).length?"1":"0"," - ").concat((n||[]).length," of "),(0,D.jsx)(u.Z,{size:12,style:{marginLeft:"8px"}})]}),!t&&0===i&&"0",!t&&i>0&&"".concat((n||[]).length?"1":"0"," - ").concat((n||[]).length," of ").concat(i)]})})]})}}const ne=(0,l.connect)((e=>({inactiveUsers:e.chatsSearch.isChatSearch?e.chatsSearch.chats:e.history.inactiveUsers,selectedUser:e.history.selectedUser,isLoading:e.chatsSearch.isChatSearch?e.chatsSearch.isLoading:e.history.isLoading,error:e.history.error,dialogOpen:e.history.dialogOpen,totalChats:e.chatsSearch.isChatSearch?e.chatsSearch.chats.length:e.history.totalChats,page:e.history.page,rowsPerPage:e.history.rowsPerPage,skip:e.history.skip,isChatSearch:e.chatsSearch.isChatSearch,searchText:e.chatsSearch.searchText,searchedChats:e.chatsSearch.chats})),{changeRowsPerPage:c.l7,loadNext:c.wY,loadPrev:c.OD})(ae),oe=(0,r.Z)((e=>({root:{width:"100%",height:"100%",background:"rgb(254,254,254)",position:"relative",[e.breakpoints.down("sm")]:{width:"100vw",height:"calc(100vh - 50px)",overflowX:"hidden"}},stickyContainer:{position:"sticky",top:"0",width:"100%"},hideOnDesktop:{[e.breakpoints.up("sm")]:{display:"none"}},fixedBottomContainer:{position:"absoulte",height:"60px",padding:"10px 0px",boxSizing:"border-box",width:"100%",background:"white",bottom:"0",left:"0px",right:"0",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",[e.breakpoints.down("sm")]:{left:"0px",height:"50px"}}})))(ne);var re=s(93407),le=s(81463);const ce=(0,l.connect)((e=>({user:e.history.selectedUser,dialogOpen:e.history.dialogOpen,agent:e.login.user})),{selectUser:c.dy,switchDialogOpen:c.fV})((function(e){const{classes:t,user:s,selectUser:n,agent:o}=e,{dialogOpen:r,switchDialogOpen:l,viewProfile:c}=e,{userName:d,userNumber:h}=s||{};return(0,D.jsx)("div",{className:null!==o&&void 0!==o&&o.liveChatOnly?t.rootIF:t.root,children:(0,D.jsx)(g.Z,{height:"100%",display:"flex",flexDirection:"column",width:"100%",children:(0,D.jsx)(a.Z,{container:!0,alignItems:"center",className:null!==o&&void 0!==o&&o.liveChatOnly?t.userDetailsContainerIF:t.userDetailsContainer,justify:"space-between",children:s&&(0,D.jsxs)(i.Fragment,{children:[(0,D.jsx)(a.Z,{item:!0,children:(0,D.jsx)(x.Z,{className:!(null!==o&&void 0!==o&&o.liveChatOnly)&&t.iconButton,onClick:()=>{n(null),l(r),e.history.push("/projects/".concat(s.assistantId,"/history"))},children:null!==o&&void 0!==o&&o.liveChatOnly?(0,D.jsx)(re.Z,{}):(0,D.jsx)(le.Z,{})})}),(0,D.jsx)(a.Z,{item:!0,xs:10,md:10,container:!0,justify:"space-between",alignItems:"center",children:(0,D.jsxs)(a.Z,{item:!0,xs:12,md:12,children:[(0,D.jsxs)(p.Z,{variant:"h4",onClick:c,noWrap:!0,display:"block",children:[(null===d||void 0===d?void 0:d.toUpperCase())||"?","(+",h,")"]}),(null===o||void 0===o?void 0:o.liveChatOnly)&&(0,D.jsx)(p.Z,{variant:"subtitle1",style:{fontSize:"12px",color:"#484848"},children:"View Profile"})]})})]})})})})})),de=(0,r.Z)((e=>({root:{width:"100%",position:"sticky",top:"0",backgroundColor:e.palette.primary.main,color:"white"},rootIF:{width:"100%",position:"sticky",top:"0",borderTop:"1px solid #f2f2f2"},iconButton:{color:"white"},closeButton:{color:"white"},userDetailsContainer:{height:"50px",paddinTop:e.spacing(1),width:"100%"},userDetailsContainerIF:{height:"50px",paddinTop:e.spacing(1),width:"100%",backgroundColor:"#fcfcfc"}})))((0,d.withRouter)(ce));var he=s(75735),pe=s(25010),ue=s(97347);class ge extends i.Component{constructor(e){super(e),this.sendMessage=e=>{let{type:t,payload:s,uploading:i,dummyLoaderMessage:a,fileName:n,fileSize:o}=e;const{selectedUser:r,agent:l,match:c,assistant:d}=this.props;let h=a?{...a}:{_id:r._id+r.chats.length,tempId:r._id+r.chats.length,assistantId:c.params.projectId,clientId:l.clientId,conversationId:r._id,userId:r.userId,userNumber:r.userNumber,payload:s,sender:"AGENT",sentAt:new Date,type:t,isHSM:!1,agentId:l.id,isSearchable:d.chatSearchEnabled||!1,partnerId:d.partnerId||"",bsuid:r.bsuid};if(i&&(h.uploading=i,h.fileName=n,h.fileSize=o),a||this.props.addNewMessage(h),i)return h;(0,ee._N)(h)},this.state={}}render(){const{classes:e,selectedUser:t,intervene:s,agent:i}=this.props,{viewProfile:a}=this.props;return(0,D.jsxs)("div",{className:null!==i&&void 0!==i&&i.liveChatOnly?e.rootIF:e.root,children:[(0,D.jsx)(de,{viewProfile:a}),(0,D.jsx)(he.Z,{user:t,interveneUser:s,sendMessage:this.sendMessage,sendTemplateMessage:!0})]})}}const me=(0,l.connect)((e=>({selectedUser:e.history.selectedUser,agent:e.login.user,assistant:e.assistantDetails.data})),{addNewMessage:c.PL})(ge),ye=(0,r.Z)((e=>({root:{height:"100%",width:"100%",display:"flex",flexDirection:"column",position:"relative",overflowX:"hidden",overflowY:"auto",scrollBehavior:"smooth",backgroundColor:"#F5EFDF !important",background:"url(".concat(pe.Z,") repeat left top")},rootIF:{height:"100%",width:"100%",display:"flex",flexDirection:"column",position:"relative",overflowX:"hidden",overflowY:"auto",scrollBehavior:"smooth",background:"url(".concat(ue,")"),backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}})))((0,d.withRouter)(me));var xe=s(21649),ve=s(88132);class fe extends i.Component{constructor(e){super(e),this.viewProfile=()=>{this.setState({viewingProfile:!0})},this.viewChats=()=>{this.setState({viewingProfile:!1})},this.state={viewingProfile:!1}}render(){const{viewingProfile:e}=this.state,{open:t,classes:s,sendMessage:a,intervene:n,close:o,selectedUser:r}=this.props;return(0,D.jsx)(i.Fragment,{children:t&&(0,D.jsxs)("div",{className:s.root,children:[(0,D.jsx)(ve.Z,{in:e,children:(0,D.jsx)(g.Z,{className:s.root,zIndex:"2700",children:(0,D.jsx)(xe.Z,{user:r,viewChats:this.viewChats,addTag:this.props.addTag,removeTag:this.props.removeTag,removeFirstMessage:this.props.removeFirstMessage,updateConvoParams:this.props.updateConvoParams,assistantId:this.props.assistantId})})}),(0,D.jsx)(ye,{viewProfile:this.viewProfile,sendMessage:a,intervene:n,close:o})]})})}}const be=(0,r.Z)((e=>({root:{display:"flex",padding:"0px",position:"fixed",bottom:"0",left:"0",zIndex:"2600",width:"100%",height:"calc(100% - 0px)",flexDirection:"column",[e.breakpoints.down("sm")]:{height:"calc(100% - 50px)"}}})))(fe),{isAiSensy:we}=(0,_.K)();
1class je extends i.Component{constructor(e){super(e),this.cancelTokenSource=null,this.cancelTokenLoadHistory=null,this.initialLoad=()=>{const{match:e}=this.props,t=this.props.location.search,s=new URLSearchParams(t).get("convoId"),{projectId:i}=e.params,a=new Date;this.cancelTokenLoadHistory=H.Z.CancelToken.source(),this.cancelTokenSource=H.Z.CancelToken.source(),this.props.loadHistory(i,a,s,this.cancelTokenLoadHistory),this.props.loadHistoryCount(i,a,this.cancelTokenSource)},this.loadAssistantDetails=e=>{const{agent:t}=this.props;return H.Z.post(h.URL+"/api/get-assistant-details",{agentId:t.id,assistantId:e})}}componentDidMount(){this.initialLoad();const e=this.props.location.search,t=(new URLSearchParams(e).get("convoId"),window.innerWidth<959);if(we&&window.Intercom&&t){const e=document.getElementsByClassName("intercom-lightweight-app");e&&e[0]}}componentWillUnmount(){this.props.match.params.projectId;this.props.selectUser(null),this.props.switchDialogOpen(!0);window.innerWidth;this.cancelTokenSource&&this.cancelTokenSource.cancel("Operation canceled due to component unmounting."),this.cancelTokenLoadHistory&&this.cancelTokenLoadHistory.cancel("Operation canceled due to component unmounting.")}render(){const{classes:e,dialogOpen:t,match:s,selectedUser:i,isChatSearch:r}=this.props,{projectId:l}=s.params,c=this.props.location.search,d=new URLSearchParams(c).get("convoId");return r?d||(this.props.switchDialogOpen(!0),this.props.selectUser(null)):(!d&&t&&(this.props.switchDialogOpen(!0),this.props.selectUser(null)),!t&&d&&this.props.switchDialogOpen(!1)),d&&i&&d!=i._id&&this.props.history.push("/projects/".concat(this.props.match.params.projectId,"/history")),(0,D.jsx)("div",{className:e.root,children:(0,D.jsxs)(a.Z,{container:!0,style:{height:"100%",flexWrap:"nowrap"},children:[(0,D.jsx)(a.Z,{item:!0,className:e.usersColumnWidth,children:(0,D.jsx)(oe,{loadHistory:this.initialLoad,assistantId:l})}),(0,D.jsx)(n.Z,{smDown:!0,children:(0,D.jsxs)(a.Z,{item:!0,container:!0,className:e.quickChatWidth,children:[(0,D.jsx)(a.Z,{item:!0,md:!0,container:!0,className:e.fixHeight,children:(0,D.jsx)(ye,{})}),(0,D.jsx)(a.Z,{item:!0,className:e.chatProfileColumnWidth,children:(0,D.jsx)(xe.Z,{assistantId:this.props.match.params.projectId,user:i,addTag:this.props.addTag,removeTag:this.props.removeTag,removeFirstMessage:this.props.removeFirstMessage,updateConvoParams:this.props.updateConvoParams})})]})}),(0,D.jsx)(n.Z,{mdUp:!0,children:(0,D.jsx)(o.Z,{direction:"up",in:t&&i&&i._id===d,mountOnEnter:!0,unmountOnExit:!0,timeout:100,children:(0,D.jsx)(be,{open:t,sendMessage:this.sendMessage,intervene:this.intervene,close:this.close,selectedUser:i,addTag:this.props.addTag,removeTag:this.props.removeTag,removeFirstMessage:this.props.removeFirstMessage,updateConvoParams:this.props.updateConvoParams,assistantId:this.props.match.params.projectId})})})]})})}}const Se=(0,l.connect)((e=>({dialogOpen:e.history.dialogOpen,agent:e.login.user,selectedUser:e.history.selectedUser,assistant:e.assistantDetails.data,isChatSearch:e.chatsSearch.isChatSearch})),{loadHistory:c.td,addTag:c._U,removeTag:c.tc,removeFirstMessage:c.yt,selectUser:c.dy,switchDialogOpen:c.fV,updateConvoParams:c.Ms,loadHistoryCount:c.HI})(je),Ce=(0,r.Z)((e=>({root:{maxWidth:"100%",height:"100%",display:"flex",[e.breakpoints.down("sm")]:{height:"100%",overflow:"hidden"}},fixHeight:{display:"flex",height:"100vh",width:"calc(100% - 400px)"},usersColumnWidth:{flexBasis:"400px",flexGrow:"0",overflow:"hidden",height:"100%",boxSizing:"border-box",[e.breakpoints.down("md")]:{flexBasis:"380px"},[e.breakpoints.down("sm")]:{flexBasis:"100vw",height:"100vh"}},chatProfileColumnWidth:{flexBasis:"381px",display:"flex",height:"calc(100vh - 0px)",boxSizing:"border-box",[e.breakpoints.down("md")]:{flexBasis:"340px"},[e.breakpoints.down("sm")]:{width:"100vw",height:"calc(100vh - 50px)"},[e.breakpoints.up("sm")]:{width:"calc(100% - 380px)"}},quickChatWidth:{width:"calc(100% - 400px)",[e.breakpoints.down("md")]:{width:"calc(100% - 380px)"},[e.breakpoints.down("sm")]:{width:"100vw"}}})))((0,d.withRouter)(Se))},40258:(e,t,s)=>{s.d(t,{$:()=>a});var i=s(91925);function a(e){return i.PLAN_TIERS[e.split("_")[0]]}},38912:(e,t,s)=>{var i=s(64836),a=s(75263);t.Z=void 0;var n=a(s(47313)),o=(0,i(s(52293)).default)(n.createElement("path",{d:"M9.78 18.65l.28-4.23 7.68-6.92c.34-.31-.07-.46-.52-.19L7.74 13.3 3.64 12c-.88-.25-.89-.86.2-1.3l15.97-6.16c.73-.33 1.43.18 1.15 1.3l-2.72 12.81c-.19.91-.74 1.13-1.5.71L12.6 16.3l-1.99 1.93c-.23.23-.42.42-.83.42z"}),"Telegram");t.Z=o},93759:(e,t,s)=>{var i=s(64836),a=s(75263);t.Z=void 0;var n=a(s(47313)),o=(0,i(s(52293)).default)(n.createElement("path",{d:"M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"}),"ViewCarousel");t.Z=o},97347:(e,t,s)=>{e.exports=s.p+"static/media/chatbg.d4aedf190ebe971c99c1.png"},82751:(e,t,s)=>{s.d(t,{kP:()=>a});let i=e=>crypto.getRandomValues(new Uint8Array(e)),a=function(e){return((e,t,s)=>{let i=(2<<Math.log(e.length-1)/Math.LN2)-1,a=-~(1.6*i*t/e.length);return function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t,o="";for(;;){let t=s(a),r=0|a;for(;r--;)if(o+=e[t[r]&i]||"",o.length===n)return o}}})(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,i)}}}]);

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.