1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89095,87358,37682],{873402:function(e,a,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard/leads-list",function(){return l(594486)}])},755052:function(e,a,l){"use strict";l.d(a,{Ez:function(){return c},FX:function(){return o},GL:function(){return i},J9:function(){return r},UB:function(){return d},yx:function(){return u}});var s=l(672031),n=l(407354),t=l(267474);let i=async e=>{var a,l;let t={};(null==e?void 0:null===(a=e.profileImage)||void 0===a?void 0:a.includes("data:image"))&&(t.photo=e.profileImage),(null==e?void 0:null===(l=e.companyLogo)||void 0===l?void 0:l.includes("data:image"))&&(t.companyLogo=e.companyLogo),(0,n.cS)(t.photo)&&(0,n.cS)(t.companyLogo)||await (0,s.yn)("/profile/info/save",t)},o=async e=>{e&&await (0,s.yn)("/profile/info/save",e)},r=async(e,a,l,n,t,i)=>{try{let o=await (0,s.yn)("/v1/emails/email-feedback",{agent_token:e,state:a,reason:l,email:n,user_email:t,type:i});if("success"===o.data.status)return o.data.data;throw o.data.error}catch(e){throw e}},d=async function(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"redirect";try{let n=await (0,s.yn)("/v1/auth/login-ads-registered-user",{previous_register_source:e.previous_register_source,key:e.key,email:a}),i=(0,t.kT)()+"/login";if("success"===n.data.status&&(i=n.data.data.redirect_url),"redirect"!==l)return i;window.location.href=i}catch(a){let e=(0,t.kT)()+"/login";if("redirect"!==l)return e;window.location.href=e}},c=async(e,a)=>{try{(await (0,s.yn)("/v1/agent-dashboard/intercom/start-new-conversation",{user_id:e,conversation_type:a})).data.status}catch(e){}},u=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"style1",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",t=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;try{let o=await (0,s.yn)("/agent/overlay/".concat(e,"/").concat(i,"?force-remove-cache=true"),{brokerage:a,name2:l,name:n,phone:t},{baseUrlType:"website-base-url"});if(200===o.status)return o.data;throw o.data.errors}catch(e){return e}}},592193:function(e,a,l){"use strict";l.d(a,{Z:function(){return s}});class s{static getBaseURL(){return"https://".concat(s.CLOUDFRONT_DEFAULT_DOMAIN_NAME,"/")}static getSmartAdsURLAsset(e){return"".concat(s.getBaseURL(),"smart/").concat(e)}static getPlatinumPlanURLAsset(e){return"".concat(s.getBaseURL(),"platinum-plan/").concat(e)}static getIconsURLAsset(e){return"".concat(s.getBaseURL(),"icons/").concat(e)}static getPricingAsset(e){return"".concat(s.getBaseURL(),"pricing/").concat(e)}static getLeadsManagementAsset(e){return"".concat(s.getBaseURL(),"leads-management/").concat(e)}static getWebinarAsset(e){return"".concat(s.getBaseURL(),"webinars/").concat(e)}}s.S3_DEFAULT_BUCKET="roomvu-storage",s.S3_DEFAULT_REGION="ca-central-1",s.CLOUDFRONT_DEFAULT_DOMAIN_NAME="dofimomuk6s4.cloudfront.net"},876488:function(e,a,l){"use strict";function s(e){if(!navigator.clipboard){!function(e){var a=document.createElement("textarea");a.value=e,a.style.top="0",a.style.left="0",a.style.position="fixed",document.body.appendChild(a),a.focus(),a.select();try{document.execCommand("copy")}catch(e){}document.body.removeChild(a)}(e);return}navigator.clipboard.writeText(e).then(()=>null).catch(()=>null)}l.d(a,{v:function(){return s}})},594486:function(e,a,l){"use strict";l.r(a),l.d(a,{__N_SSP:function(){return e5},default:function(){return e3}});var s,n,t,i,o=l(511527),r=l(45938),d=l.n(r),c=l(50959),u=l(673954),m=l.n(u),p=l(907831),h=l(991044),_=l(668788),g=l(429415),x=l(946500),v=l(984387),j=l(305341),f=l(573457),y=l(672031),b=l(468880),w=l(706550),L=l(302651),N=l(638319),C=l(239724),S=l(633454),W=l(869023),M=l(343710),k=l(755052),I=l(921859),T=l(369596),B=l.n(T),R=l(363369),E=l(596866),A=l(52395),F=l.n(A),P=e=>{let{onClose:a,autoFL:l,handleChangeAutoFollowupSetting:s,saving:n,setIsModalVisible:t}=e;return(0,b.I0)(),(0,o.jsx)("div",{className:F().modalContent,children:(0,o.jsxs)("div",{className:F().container,children:[(0,o.jsx)("div",{className:F().iconWrapper,children:(0,o.jsx)(x.J,{name:"monitor-01",fontSize:24,color:"#2F9262"})}),(0,o.jsxs)("div",{className:F().heading,children:[(0,o.jsx)("h3",{children:"Desktop only"}),(0,o.jsxs)("p",{children:["These features are not available on our mobile website. Go to"," ",(0,o.jsx)("b",{children:"roomvu.com"})," on desktop for below features."," "]})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"download-01",fontSize:16}),(0,o.jsx)("span",{children:"Import Your Leads"})]})}),(0,o.jsxs)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:[(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"luggage-02",fontSize:16}),(0,o.jsx)("span",{children:"Journey builder"})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItemRight,children:(0,o.jsx)("span",{className:F().drawerContentContainerItemRightBadge,children:"Beta"})})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"mail-05",fontSize:16}),(0,o.jsx)("span",{children:"Try CRM lead follow-ups"})]})}),(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"trash-01",fontSize:16}),(0,o.jsx)("span",{children:"Delete"})]})}),(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:(0,o.jsx)(v.z,{color:"primary",size:"lg",onClick:()=>{t(!0),a()},fullWidth:!0,children:"Confirm"})})]})})},z=e=>{let{onClose:a,autoFL:l,handleChangeAutoFollowupSetting:s,saving:n,setIsModalVisible:t,setShowTryCrmModal:i,aiCallerEnabled:r,aiCallerLoading:d,onAiCallerChange:c,onOpenFollowUpSettings:u,isPlatinumOrHigherUser:m}=e,p=(0,b.I0)();return(0,o.jsx)("div",{className:F().drawerContent,children:(0,o.jsxs)("div",{className:F().drawerContentContainer,children:[(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"download-01",fontSize:16}),(0,o.jsx)("span",{children:"Import Your Leads"})]})}),(0,o.jsxs)("div",{className:F().drawerContentContainerItem,onClick:()=>{a(),setTimeout(()=>{u&&u()},300)},children:[(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"settings-01",fontSize:16}),(0,o.jsx)("span",{children:"Auto follow up"})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItemRight,children:(0,o.jsx)("span",{className:F().drawerContentContainerItemRightBadge,children:(()=>{let e=!!l;if(!m)return e?"On":"Off";let a=(e?1:0)+(r?1:0);return 0===a?"Off":2===a?"All":"1/2"})()})})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{p((0,w.YJ)("connect-crm-popup")),a()},children:(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"users-plus",fontSize:16}),(0,o.jsx)("span",{children:"Get leads on your CRM"})]})}),(0,o.jsxs)("div",{className:F().drawerContentContainerItem,onClick:()=>{t(!0),a()},children:[(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"luggage-02",fontSize:16}),(0,o.jsx)("span",{children:"Journey builder"})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItemRight,children:(0,o.jsx)("span",{className:F().drawerContentContainerItemRightBadge,children:"Beta"})})]}),(0,o.jsx)("div",{className:F().drawerContentContainerItem,onClick:()=>{i&&i(!0),a()},children:(0,o.jsxs)("div",{className:F().drawerContentContainerItemLeft,children:[(0,o.jsx)(x.J,{name:"mail-05",fontSize:16}),(0,o.jsx)("span",{children:"Try CRM lead follow-ups"})]})})]})})},D=l(304880),H=l(204799),O=l(173247),J=l(735693),U=l(237229),V=l(201149),Z=l(343386),G=l(891306),q=l.n(G);let Y=d()(()=>l.e(35137).then(l.bind(l,135137)),{loadableGenerated:{webpack:()=>[135137]}});
1function K(e){let{loading:a,onExportListClick:l}=e,s=(0,b.I0)(),n=(0,C.useRouter)(),t=(0,Z.d)("(max-width:1293px)"),i=(0,Z.d)("(max-width:1520px)"),r=(0,Z.d)("(max-width:1590px)"),d=(0,c.useMemo)(()=>{let e=[];return t&&e.push("export-leads"),i&&e.push("import-leads"),r&&e.push("delete-all-leads"),e},[t,i,r]),u=(0,c.useCallback)(e=>d.includes(e),[d]),m=()=>{s((0,w.dL)("Delete All Leads","Are you sure you want to delete all of your leads ?",()=>{p().then(()=>s((0,w.Zl)()))},()=>{s((0,w.Zl)())},"Yes","No"))},p=async()=>{try{var e;let a=await (0,y.yn)("/leads/deleteAll",[]);if(a.data.error)throw"Api has error";(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.status)==="success"?((0,f.t5)("Removed successfully"),window.location.reload()):(0,f.cB)("Failed to remove leads.")}catch(e){(0,f.cB)("Failed to remove leads!")}},h=(0,c.useMemo)(()=>[(0,o.jsx)(v.z,{color:u("import-leads")?"secondary-list-item-gray":"secondary-gray",fullWidth:u("import-leads"),startIcon:"download-01",size:"md",variant:"default",onClick:()=>{s((0,w.YJ)("crm-upload-csv-popup"))},disabled:a,loading:a,children:"Import Your Leads"},"import-leads"),(0,o.jsx)(v.z,{color:u("export-leads")?"secondary-list-item-gray":"secondary-gray",fullWidth:u("export-leads"),startIcon:"upload-01",onClick:()=>{l()},disabled:a,loading:a,children:"Export Your Leads"},"export-leads"),(0,o.jsx)(v.z,{color:"secondary-gray",startIcon:"users-plus",onClick:()=>{s((0,w.YJ)("connect-crm-popup"))},disabled:a,loading:a,children:"Get Leads On Your CRM"}
1,"get-leads-crm"),(0,o.jsxs)(v.z,{color:"secondary-gray",startIcon:"brush-01",onClick:()=>{n.push("/agent-dashboard/crm/journeys/")},disabled:a,loading:a,className:q().journeyBuilderButton,children:["Journey Builder ",(0,o.jsx)("span",{children:"Beta"})]},"journey-builder"),(0,o.jsx)(v.z,{color:u("delete-all-leads")?"secondary-list-item-gray":"secondary-gray",fullWidth:u("delete-all-leads"),startIcon:"trash-01",onClick:()=>{m()},disabled:a,loading:a,className:q().journeyBuilderButton,children:"Delete All Leads"},"delete-all-leads")],[u,a]);return d.length<1?(0,o.jsx)(o.Fragment,{children:c.Children.map(h,e=>e)}):(0,o.jsxs)(o.Fragment,{children:[c.Children.map(h,e=>u(e.key)?null:e),d.length>0&&(0,o.jsx)(Y,{placement:"topLeft",trigger:["click"],content:c.Children.map(h,e=>u(e.key)?e:null),children:(0,o.jsxs)(v.z,{color:"secondary-gray",children:[(0,o.jsx)(x.J,{name:"dots-vertical",fontSize:16})," More Actions"]})})]})}(s=t||(t={})).ImportLeads="import-leads",s.ExportLeads="export-leads",s.GetLeadsCrm="get-leads-crm",s.JourneyBuilder="journey-builder",s.DeleteAll="delete-all-leads";var X=l(28786),Q=l(112434),$=l(139932),ee=l(4986),ea=l(54064),el=l(230995),es=l(61005),en=l.n(es),et=l(824972),ei=l.n(et);function eo(e){let{autoFL:a,aiCallerEnabled:l,aiCallerLoading:s,saving:n,onEmailSmsChange:t,onAiCallerChange:i,isPlatinumOrHigherUser:r}=e,d=(0,Z.d)();return(0,o.jsxs)("div",{className:ei().container,children:[(0,o.jsx)("label",{className:ei().followUpOptionLabel,children:(0,o.jsx)(X.X,{size:d?"md":"sm",className:ei().checkbox,classes:{label:ei().checkboxLabel,labelWrapper:ei().checkboxLabelWrapper},id:"email-sms-checkbox",checked:!!a,disabled:n,onChange:e=>t(e.target.checked),label:"Email & SMS"})}),(0,o.jsx)("label",{className:ei().followUpOptionLabel,children:(0,o.jsx)(X.X,{size:d?"md":"sm",className:ei().checkbox,classes:{label:ei().checkboxLabel,labelWrapper:ei().checkboxLabelWrapper},id:"ai-caller-checkbox",checked:l,disabled:s||n,onChange:e=>i(e.target.checked),label:"AI Caller".concat(r?"":" (Platinum+)")})})]})}function er(e){let{onClose:a,autoFL:l,aiCallerEnabled:s,aiCallerLoading:n,saving:t,onEmailSmsChange:i,onAiCallerChange:r,isPlatinumOrHigherUser:d}=e;return(0,o.jsx)(O.Z,{open:!0,onClose:a,title:"Follow-up Settings",children:(0,o.jsx)("div",{className:en().container,children:(0,o.jsx)(eo,{autoFL:l,aiCallerEnabled:s,aiCallerLoading:n,saving:t,onEmailSmsChange:i,onAiCallerChange:r,isPlatinumOrHigherUser:d})})})}var ed=l(700296),ec=l(358222),eu=l.n(ec);let em=e=>{let{leadId:a,tags:l,availableTags:s,onTagsUpdate:n,onRefreshAvailableTags:t}=e,[i,r]=(0,c.useState)(!1),[d,u]=(0,c.useState)(null),[m,p]=(0,c.useState)(!1),[h,_]=(0,c.useState)(""),g=(0,c.useRef)(null),v=c.useMemo(()=>Array.isArray(l)?l.filter(Boolean):[],[l]),y=async e=>{if(!e||!e.trim())return;let l=e.trim();if(v.some(e=>e.toLowerCase()===l.toLowerCase())){(0,f.cB)("Tag already exists");return}let i=!s.some(e=>e.value.toLowerCase()===l.toLowerCase());try{r(!0),(await (0,S.Kl)(a,[l])).success&&((0,f.t5)("Tag added successfully"),n(),i&&t&&t(),p(!1),g.current&&g.current.blur())}catch(e){console.error("Failed to add tag:",e)}finally{r(!1)}},b=async e=>{try{u(e),(await (0,S.ie)(a,e)).success&&((0,f.t5)("Tag removed successfully"),n())}catch(e){console.error("Failed to remove tag:",e)}finally{u(null)}},w=c.useMemo(()=>{let e=s.filter(e=>!v.some(a=>a.toLowerCase()===e.value.toLowerCase()));return h&&h.trim()&&!e.some(e=>e.value.toLowerCase()===h.trim().toLowerCase())&&!v.some(e=>e.toLowerCase()===h.trim().toLowerCase())?[...e,{value:h.trim(),label:'Create "'.concat(h.trim(),'"')}]:e},[s,v,h]);return(0,o.jsxs)("div",{className:(0,j.W)(eu().tagsColumn),children:[(0,o.jsx)("div",{className:(0,j.W)(eu().tagsContainer),children:v&&v.length>0?v.map((e,l)=>(0,o.jsx)(ed.C,{size:"sm",type:"pill-color",color:"gray",onClose:d===e?void 0:()=>b(e),className:(0,j.W)(eu().tagBadge),children:e},"".concat(a,"-").concat(e,"-").concat(l))):(0,o.jsx)("span",{className:(0,j.W)(eu().noTags),children:"No tags"})}),(0,o.jsx)("div",{className:(0,j.W)(eu().addTagContainer),children:(0,o.jsx)(W.default,{ref:g,showSearch:!0,allowClear:!0,placeholder:"Add tag",className:(0,j.W)(eu().tagSelect),loading:i,open:m,onDropdownVisibleChange:p,onChange:e=>{e&&(y(e),_(""))},onSearch:e=>(_(e),!0),searchValue:h,value:null,filterOption:(e,a)=>{var l;return(null!==(l=null==a?void 0:a.label)&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())},notFoundContent:(0,o.jsx)("div",{className:(0,j.W)(eu().notFoundContent),children:"No tags found. Type to create a new tag."}),dropdownRender:e=>(0,o.jsxs)("div",{children:[e,h&&h.trim()&&(0,o.jsxs)("div",{className:(0,j.W)(eu().selectFooter),children:[(0,o.jsx)(x.J,{name:"info-circle",fontSize:12}),(0,o.jsx)("span",{children:"Select option above to create new tag"})]})]}),suffixIcon:(0,o.jsx)(x.J,{name:"plus",fontSize:16}),options:w})})]})};var ep=l(383664),eh=l(873384),e_=l.n(eh);function eg(e){let{open:a,message:l,onClose:s}=e,n=null!=l?l:"",t=(0,ep.ug)(n);return(0,o.jsx)(E.default,{open:a,onCancel:s,footer:null,title:"Full Message",width:720,destroyOnClose:!0,children:t?(0,o.jsx)("iframe",{className:e_().htmlFrame,sandbox:"",srcDoc:n,title:"Email integration message"}):(0,o.jsx)("pre",{className:e_().plainText,children:n})})}var ex=l(184738),ev=l(756843);let ej={needs_follow_up:"Needs follow up",upgrade_follow_up:"Upgrade Follow Up",not_interested:"Not interested",price_objection:"Price objection",not_qualified:"Not qualified",next_demo_booked:"Next demo booked",sold:"Sold"};function ef(e){var a,l,s;let n,{leads:t,deletedLeadsCount:i,setShowDeletedLeads:r,availableSources:d,getCaptureLeads:u,selectedSourcesChange:T,selectedStatesChange:A,selectedTagsChange:F,sortChange:G,pageChange:q,total:Y,exportList:es,loading:en,selectedPage:et,limit:ei,searchPhrase:eo,onSalesReminderCreated:ed}=e,ec=(0,b.v9)(M.S8),eu="roomvu_sales"===(0,ev.hi)(null==ec?void 0:ec.user_t
1ype_id),ep=(0,b.v9)(M.ns),[eh,e_]=(0,c.useState)(null===(a=ec.auto_leads_followup)||void 0===a||a),{data:ef,isLoading:ey}=(0,Q.Y)({enabled:ep}),[eb,ew]=(0,c.useState)(null),{mutate:eL,isLoading:eN}=(0,ee.D)(ea.b,void 0),eC=ep&&(ey||eN),eS=(0,el.NL)(),eW=(0,C.useRouter)(),eM=(0,b.I0)(),[ek,eI]=(0,c.useState)(!1),[eT,eB]=(0,c.useState)(!1),[eR,eE]=(0,c.useState)(!1),[eA,eF]=(0,c.useState)(void 0),[eP,ez]=(0,c.useState)(void 0),[eD,eH]=(0,c.useState)([]),[eO,eJ]=(0,c.useState)("desc"),[eU,eV]=(0,c.useState)(!1),[eZ,eG]=(0,c.useState)(!1),[eq,eY]=(0,c.useState)(!1),[eK,eX]=(0,c.useState)(!1),[eQ,e$]=(0,c.useState)(0),[e0,e1]=(0,c.useState)([]),[e5,e3]=(0,c.useState)(!1),[e2,e4]=(0,c.useState)(null),[e8,e6]=(0,c.useState)("needs_follow_up"),[e9,e7]=(0,c.useState)(""),[ae,aa]=(0,c.useState)(""),[al,as]=(0,c.useState)(!1),[an,at]=(0,c.useState)(!1),[ai,ao]=(0,c.useState)(null),[ar,ad]=(0,c.useState)(!1),[ac,au]=(0,c.useState)([]),[am,ap]=(0,c.useState)(!1),[ah,a_]=(0,c.useState)(null),ag=(0,Z.d)();(0,c.useEffect)(()=>{var e;!((null==t?void 0:t.length)>1)||(null===(e=t[0])||void 0===e?void 0:e.hasOwnProperty("email"))||eE(!0),eI(!0),ay().then(()=>{eI(!1)}),ax()},[]);let ax=async()=>{try{let e=await (0,S.df)();if(e.success&&e.data){let a=e.data.map(e=>({value:e.name,label:e.name}));e1(a)}}catch(e){console.error("Failed to fetch available tags:",e)}};(0,c.useEffect)(()=>{ef&&null!==eb&&ef.lead_call_policy===eb&&ew(null)},[ef,eb]);let av=()=>{eM((0,w.Sh)({selectedPlan:V.q.diamond,introType:U.zd.General,source:"calendar-post",trigger:"calendar-lock-icon"}))},aj=()=>{(0,f.cB)("AI Caller for leads is exclusively available to Platinum and Diamond Agents."),window.setTimeout(()=>{eM((0,w.Sh)({selectedPlan:V.q.platinum,introType:U.zd.General,source:"leads-list",trigger:"ai-caller-follow-up"}))},700)},af=e=>{if("object"==typeof e&&null!==e&&"response"in e&&"object"==typeof e.response&&null!==e.response&&"data"in e.response){let a=e.response.data;if(a.message)return a.message;if(a.error)return a.error;if(Array.isArray(a.errors))return a.errors[0];if(a.errors){let e=Object.values(a.errors)[0];if(Array.isArray(e))return e[0]}}return e instanceof Error?e.message:"Something went wrong"},ay=async()=>{eF(await (0,S.ev)(1,100))},ab=()=>{var e;eM((0,w.dL)("Assign Journeys","The leads last journey will be stopped and they will be enrolled in ".concat(null!==(e=null==eA?void 0:eA.filter(e=>(null==e?void 0:e.id)===eP)[0].name)&&void 0!==e?e:"selected Journey",". Are you sure?"),()=>{aC().then(()=>eM((0,w.Zl)()))},()=>{aA()},"Yes","No"))},aw=(e,a,l)=>{var s,n;eM((0,w.dL)("Assign Journeys",l?"The Lead Last Journey will be Stopped and will be Enrolled in ".concat(null!==(s=null==eA?void 0:eA.filter(e=>(null==e?void 0:e.id)===a)[0].name)&&void 0!==s?s:"selected Journey",". Are you sure?"):"The Lead will be Enrolled in ".concat(null!==(n=null==eA?void 0:eA.filter(e=>(null==e?void 0:e.id)===a)[0].name)&&void 0!==n?n:"selected Journey",". Are you sure?"),()=>{aS(e,a).then(()=>eM((0,w.Zl)()))},()=>{aA()},"Yes","No"))},aL=(0,c.useRef)(null),aN=(e,a)=>{clearTimeout(aL.current),aL.current=setTimeout(async()=>{(await (0,S.je)(e,a)).success&&(0,f.t5)("Note saved")},2e3)},aC=async()=>{(await (0,S.mz)(eD,eP)).success&&(0,f.t5)("Assign journey completed")},aS=async(e,a)=>{(await (0,S.mz)([e],a)).success&&(0,f.t5)("Assign journey completed")},aW=e=>"home afford"===e?"Homes I Can Afford":e?e.charAt(0).toUpperCase()+e.slice(1):e,aM=async e=>{try{let a=await (0,y.yn)("/v1/agent-dashboard/lead/".concat(e,"/stop-follow"),{});if("success"===a.data.status&&a.data.data.follow_up_stopped)(0,f.t5)("Follow-up stopped"),u();else throw(0,f.cB)("Please try again"),a.data.error;N.AnalyticApis.gaEvent("stop_followup_clicked",{page_location:window.location.pathname,page_name:"leads-management",is_mobile:ag})}catch(e){return(0,f.cB)("Something went wrong"),e.response}},ak=e=>{eM((0,w.wR)(e)),N.AnalyticApis.gaEvent("view_message_clicked",{page_location:window.location.pathname,page_name:"leads-management",is_mobile:ag})},aI=e=>{a_(e),ap(!0)},aT=(e,a,l)=>{var s,n;T(a.source),A(a.follow_up_state),G("ascend"===l.order?"asc":"desc"),q(e),u(e.current,e.pageSize,eo,"created_at",eO,void 0,null!==(s=a.source)&&void 0!==s?s:[],null!==(n=a.follow_up_state)&&void 0!==n?n:[])},aB=eD.length>0,aR=()=>null==eA?void 0:eA.filter(e=>(null==e?void 0:e.status)==="ACTIVE").map(e=>({value:e.id,label:"".concat(e.name," ").concat(e.user_id?"":"- Default Journey")})),aE=e=>{eM((0,w.dL)("Delete Lead","Are you sure you want to delete lead ?",()=>{aF(e).then(()=>eM((0,w.Zl)()))},()=>{aA()},"Yes","No"))}
1,aA=()=>{eM((0,w.Zl)())},aF=async e=>{try{eI(!0);let a=await (0,y.yn)("/leads/delete",{id:e});if(a.data.error)throw"Api has error";a.data.data?(0,f.t5)("Removed successfully"):(0,f.cB)("Failed to remove lead."),u(),eI(!1)}catch(e){(0,f.cB)("Failed to remove lead!"),eI(!1)}await N.AnalyticApis.gaEvent("remove_lead_clicked",{page_location:window.location.pathname,page_name:"leads-management",is_mobile:ag})},aP=e=>{navigator.clipboard.writeText(e).then(()=>{(0,f.t5)("Copied to clipboard")}).catch(e=>{(0,f.t5)("Failed to copy text:",e)})},az=e=>{e4(e),e6("needs_follow_up"),e7(""),aa(""),e3(!0)},aD=()=>{al||(e3(!1),e4(null),e6("needs_follow_up"),e7(""),aa(""))},aH=async()=>{var e;if(!(null==e2?void 0:e2.id)){(0,f.cB)("Lead not found");return}let a=ae.trim(),l=null;if(""!==a){let e=Number(a);if(!Number.isInteger(e)||e<1||e>365){(0,f.cB)("Follow up in x days must be an integer between 1 and 365");return}l=e}as(!0);let s=await (0,S.vQ)({leadId:e2.id,outcome:e8,note:e9.trim(),callerName:null!==(e=null==ec?void 0:ec.name)&&void 0!==e?e:"",followUpDays:l});as(!1),s.success&&((0,f.t5)("Call info saved successfully"),e3(!1),u(),null==ed||ed())},aO=async e=>{if(!(null==e?void 0:e.id)){(0,f.cB)("Lead not found");return}ao(e),au([]),ad(!0),at(!0);let a=await (0,S.db)(e.id);a.success?au(a.data):"error"in a?(0,f.cB)(a.error):(0,f.cB)("Something went wrong"),ad(!1)},aJ=()=>{ar||(at(!1),ao(null),au([]))},aU=e=>{if(!e)return"-";let a=(0,ex.default)(e);return a.isValid()?a.format("MMM DD, YYYY hh:mm A"):"-"};n=[{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(eO),m().columnHeader),children:"Name"}),dataIndex:"name",key:"name",className:"info_td",sorter:!1,render:e=>(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsx)("div",{className:(0,j.W)(m().info),children:(0,o.jsx)("span",{className:(0,j.W)(m().name),children:e})})})},{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(eO)),children:"Status"}),dataIndex:["follow_up_state"],key:"follow_up_state",className:"info_td",width:120,render:(e,a)=>{var l,s,n;return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(m().info),children:[(null==a?void 0:null===(l=a.tags)||void 0===l?void 0:l.length)>0&&(null==a?void 0:a.tags.includes("Hot"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().hot),children:"Hot"}),(null==a?void 0:null===(s=a.tags)||void 0===s?void 0:s.length)>0&&(null==a?void 0:a.tags.includes("Fresh"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().nurturing),children:"Fresh"}),(null==a?void 0:null===(n=a.call_follow_ups)||void 0===n?void 0:n.length)>0&&(0,o.jsx)(D.Z,{className:(0,j.W)(m().callTooltip),title:null==a?void 0:a.call_follow_ups.map(e=>(0,o.jsxs)("div",{style:{fontSize:"16px"},children:["Called the lead on ",(0,o.jsx)("strong",{children:null==e?void 0:e.call_date}),(0,o.jsx)("br",{}),"Status : ",null==e?void 0:e.state]},"call-"+e.id)),color:"#000",trigger:["hover","click"],children:(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().called),children:"Called"})})]})})})}},{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(eO),m().columnHeader),children:"contact"}),dataIndex:"email",key:"email",sorter:!1,className:"info_td",render:(e,a)=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(m().info),children:[(0,o.jsxs)("span",{className:(0,j.W)(m().email),children:[null==a?void 0:a.email," ",(0,o.jsx)(x.J,{name:"copy-01",onClick:()=>{var e;return aP(null!==(e=null==a?void 0:a.email)&&void 0!==e?e:"")}})]}),(0,o.jsxs)("span",{className:(0,j.W)(m().phone),children:[null==a?void 0:a.phone,(0,o.jsx)(x.J,{name:"copy-01",onClick:()=>{var e;return aP(null!==(e=null==a?void 0:a.phone)&&void 0!==e?e:"")}})]})]})})})},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Source"}),width:250,minWidth:250,filters:!!d&&d.map(e=>({text:e,value:e})),onFilter:(e,a)=>0===a.src.indexOf(e),sorter:!1,filterIcon:(0,o.jsx)(x.J,{name:"filter-funnel-01",fontSize:16}),dataIndex:"created_at",key:"source",className:"src_td",render:(e,a)=>(0,o.jsxs)("div",{onClick:()=>{(null==a?void 0:a.reference_url)&&window.open(a.reference_url,"_blank")},className:(null==a?void 0:a.reference_url)&&m().srcLink,children:["/",(0,o.jsxs)("div",{className:(0,j.W)(m().leadSource),children:[(0,o.jsx)("span",{className:(0,j.W)(m().sourceTitle),children:aW(a.src)})," ",(0,o.jsx)("br",{}),a.src_extra?(0,o.jsx)(g.Z,{trigger:"hover",placement:"topLeft",getPopupContainer:e=>{var a;return null!==(a=e.parentElement)&&void 0!==a?a:document.body},content:(0,o.jsx)("div",{className:(0,j.W)(m().srcExtraPopover),children:(0,o.jsx)("div",{className:(0,j.W)(m().srcExtraText),children:a.src_extra})}),children:(0,o.jsxs)("span",{className:(0,j.W)(m().srcDescriptionWithBadge),children:[a.src_description,(0,o.jsx)("span",{className:(0,j.W)(m().srcExtraBadge),"aria-hidden":!0,
1children:(0,o.jsx)(x.J,{name:"info-circle",fontSize:18})})]})}):a.src_description,(a.src_description||a.src_extra)&&(0,o.jsx)("br",{}),new Date(null==a?void 0:a.created_at).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),(0,o.jsx)("br",{}),new Date(null==a?void 0:a.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})]})},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Tags"}),dataIndex:"tags",key:"tags",className:"tags_td",width:250,minWidth:200,sorter:!1,render:(e,a)=>(0,o.jsx)(em,{leadId:a.id,tags:e||[],availableTags:e0,onTagsUpdate:()=>{u()},onRefreshAvailableTags:ax})},{title:(0,o.jsx)("div",{className:(0,j.W)("stat-header ".concat(eO),m().columnHeader),children:"Follow-up"}),dataIndex:"stats",key:"stat",className:"stat_td",width:100,minWidth:100,sortDirections:["ascend","descend","ascend"],sortOrder:"asc"===eO?"ascend":"descend",render:(e,a)=>{var l,s,n,t,i;return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(m().leadStats),children:(0,o.jsxs)("div",{className:(0,j.W)(m().stats),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().message,a.has_messages&&m().hasMessage),onClick:()=>a.has_messages&&ak(a),children:[(0,o.jsx)("div",{className:(0,j.W)(m().iconWrapper),children:(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null!==(t=null==a?void 0:a.smsCount)&&void 0!==t?t:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().email,a.has_messages&&m().hasMessage),onClick:()=>a.has_messages&&ak(a),children:[(0,o.jsx)("div",{className:(0,j.W)(m().iconWrapper),children:(0,o.jsx)(x.J,{name:"mail-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null!==(i=null==a?void 0:a.emailCount)&&void 0!==i?i:0})]}),(0,o.jsx)(D.Z,{title:(null==a?void 0:null===(l=a.call_follow_ups)||void 0===l?void 0:l.length)?null==a?void 0:a.call_follow_ups.map(e=>(0,o.jsxs)("div",{style:{fontSize:"16px"},children:["Called the lead on"," ",(0,o.jsx)("strong",{children:null==e?void 0:e.call_date})]},"call-"+e.id)):void 0,color:"#000",trigger:["hover"],children:(0,o.jsx)("div",{className:(0,j.W)(m().call,m().hasMessage),onClick:()=>{ep?(0,f.t5)("Call follow-up is enabled for you"):av()},children:(0,o.jsxs)("div",{className:(0,j.W)(m().iconWrapper),children:[(0,o.jsx)(x.J,{name:"phone",fontSize:16}),(null==a?void 0:null===(s=a.call_follow_ups)||void 0===s?void 0:s.length)>0&&(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null==a?void 0:null===(n=a.call_follow_ups)||void 0===n?void 0:n.length})]})})})]})})})}},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Message"}),dataIndex:"message",key:"details",className:"details_td",onCell:(e,a)=>({colspan:eR&&(0!==a||1!==et)?2:1}),render:(e,a)=>{var l;return(0,o.jsxs)("div",{className:m().leadMessage,children:[(0,o.jsxs)("div",{className:m().messageWrapper,children:[(0,o.jsxs)("div",{className:m().row,children:[(null==a?void 0:a.rent)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Rent:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.rent.toLocaleString()]})]}),(null==a?void 0:a.mortgageRate)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Mortgage Rate:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.mortgageRate.toLocaleString()]})]})]}),(0,o.jsx)("div",{className:m().row,children:(null==a?void 0:a.income)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Savings:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.income.toLocaleString()]})]})}),(null==a?void 0:a.message)&&(0,o.jsx)("div",{className:m().row,children:(0,o.jsxs)("span",{style:{whiteSpace:"pre-line"},children:[(0,o.jsx)("b",{children:"Last Message: "}),(0,o.jsx)(D.Z,{placement:"left",title:a.message,children:a.message})]})})]}),(0,o.jsx)("div",{className:m().buttonWrapper,children:(0,o.jsxs)("div",{className:m().row,children:[(null==a?void 0:null===(l=a.email_integration)||void 0===l?void 0:l.message)&&(0,o.jsx)(v.z,{color:"tertiary",onClick:()=>aI(a.email_integration.message),children:"Show Lead Email"}),(0,o.jsx)(v.z,{color:"tertiary",onClick:()=>ak(a),startIcon:"message-text-square-01",children:(0,o.jsx)("span",{children:"View messages"})})]})})]})}},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader)}),dataIndex:"id",key:"action",width:100,minWidth:100,className:"actions_td",onCell:(e,a)=>({colSpan:eR&&(0!==a||1!==et)?0:1}),render:(e,a)=>{var l,s;return(0,o.jsxs)("div",{className:(0,j.W)(m().leadAction),children:[(0,o.jsx)(g.Z,{className:(0,j.W)(m().notePopOver),trigger:"hover",getPopupContainer:e=>e.parentElement,content:(0,o.jsx)("div",{className:(0,j.W)(m().filtersList),children:(0,o.jsx)(I.default,{rows:3,style:{width:300},name:"leads-note-"+(null==a?void 0:a.id),placeholder:"Note",defaultValue:null!==(s=null==a?void 0:null===(l=a.note)||void 0===l?void 0:l.description)&&void 0!==s?s:"",onCh
1ange:e=>{aN(a.id,e.target.value)},required:!0})}),placement:"topLeft",children:(0,o.jsx)("span",{className:m().actionIconButton,children:(0,o.jsx)(x.J,{name:"file-plus-02",fontSize:20})})},"note_popover"+(null==a?void 0:a.id)),eu&&(0,o.jsx)(D.Z,{title:"Add call log",placement:"top",children:(0,o.jsx)("span",{className:(0,j.W)(m().actionIconButton,m().salesReminderActionButton,(null==a?void 0:a.has_sales_reminders)&&m().salesReminderActionButtonHasReminder),onClick:()=>az(a),role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),az(a))},children:(0,o.jsx)(x.J,{name:"alarm-clock",fontSize:20})})}),(0,o.jsx)(L.default,{overlay:(0,o.jsxs)(_.default,{children:[eu&&(null==a?void 0:a.has_sales_reminders)&&(0,o.jsxs)(_.default.Item,{onClick:()=>aO(a),children:[(0,o.jsx)(x.J,{name:"alarm-clock"})," View call logs",(null==a?void 0:a.sales_reminders_count)?" (".concat(a.sales_reminders_count,")"):""]},"sales-reminders-history"),(0,o.jsxs)(_.default.Item,{onClick:()=>aM(e),children:[(0,o.jsx)(x.J,{name:"lock-unlocked-01"})," Stop auto follow-up"]},"0"),(0,o.jsxs)(_.default.Item,{onClick:()=>aE(null==a?void 0:a.id),children:[(0,o.jsx)(x.J,{name:"trash-01"})," Delete"]},"1")]}),children:(0,o.jsx)("a",{children:(0,o.jsx)(x.J,{name:"dots-vertical",fontSize:20})})})]})}}],eR||ag||n.splice(4,0,{title:(0,o.jsx)("div",{className:(0,j.W)("journey",m().columnHeader,m().columnHeaderJourney),children:aB?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{style:{marginLeft:8},children:aB?"Assign journey to ".concat(eD.length," leads"):""}),(0,o.jsxs)("div",{className:(0,j.W)(m().multiSelectorAction),children:[(0,o.jsx)(W.default,{showSearch:!0,id:"batch_assign_journey",onChange:e=>{ez(e)},placeholder:"Please select a journey",className:(0,j.W)(B()["rv-input-small"],"templateSelector",m().journeySelector),"aria-required":!0,filterOption:(e,a)=>{var l;return(null!==(l=String(null==a?void 0:a.label))&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())},options:aR()}),(0,o.jsx)(v.z,{className:m().ctaButton,onClick:()=>{ab()},disabled:ek||en,loading:ek||en,children:(0,o.jsx)("span",{children:"Submit"})})]})]}):"Enrolled journey"}),dataIndex:"journey",key:"journey",className:"journey_td",width:200,minWidth:200,render:(e,a,l)=>{var s,n,t,i;return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(m().leadStats),children:(0,o.jsx)("div",{className:(0,j.W)(m().stats),children:(0,o.jsxs)("div",{className:(0,j.W)(m().enrolledJourney),children:[(0,o.jsx)(W.default,{showSearch:!0,id:"assign_journey_".concat(l),onChange:e=>{var l;aw(a.id,e,(null==a?void 0:null===(l=a.active_journey_ids)||void 0===l?void 0:l.length)>0)},defaultValue:null!==(i=!!(null==a?void 0:a.active_journeys)&&{value:null==a?void 0:null===(s=a.active_journeys[0])||void 0===s?void 0:s.crm_journey_id,label:null==a?void 0:null===(n=a.active_journeys[0])||void 0===n?void 0:n.name})&&void 0!==i?i:null,placeholder:"Please select a journey","aria-required":!0,filterOption:(e,a)=>{var l;return(null!==(l=String(null==a?void 0:a.label))&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())},disabled:aB,options:aR()}),(null==a?void 0:null===(t=a.active_journey_ids)||void 0===t?void 0:t.length)>0&&(0,o.jsx)(D.Z,{title:"Journey details",children:(0,o.jsx)("span",{children:(0,o.jsx)(x.J,{onClick:()=>eW.push({pathname:"/agent-dashboard/crm/journeys",query:{journeyId:null==a?void 0:a.active_journey_ids[0]}}),name:"link-external-01",fontSize:20})})})]})})})})}});let aV=()=>{var e;return!!ep&&(!!Array.isArray(ef)&&0===ef.length||(null!==eb?eb:null!==(e=null==ef?void 0:ef.lead_call_policy)&&void 0!==e&&e))},aZ=(e,a)=>{if("ai_caller"===e){if(!ep){aj();return}let e=aV();ew(a),eL(a,{onSuccess:()=>{eS.invalidateQueries({queryKey:[$.i]}),(0,f.t5)("AI Caller ".concat(a?"enabled":"disabled"," successfully"))},onError:()=>{ew(e),(0,f.cB)("Failed to update AI Caller policy")}})}else"email_sms"===e&&aG()},aG=()=>{eB(!0),eh?eM((0,w.dL)("Change Setting","Your leads won't get follow-up messages anymore. Are you sure?",async()=>{try{await (0,k.FX)({autoLeadsFollowup:!eh}),(0,f.t5)("Auto follow-up ".concat(eh?"disabled":"enabled"," successfully")),e_(!eh),eM((0,w.Zl)())}catch(e){(0,f.cB)(af(e))}finally{eB(!1)}},()=>{aA(),eB(!1)},"Yes","No")):(0,k.FX)({autoLeadsFollowup:!eh}).then(()=>{(0,f.t5)("Auto follow-up ".concat(eh?"disabled":"enabled"," successfully")),e_(!eh)}).catch(e=>{(0,f.cB)(af(e))}).finally(()=>{eB(!1)})},aq=e=>{if(!ep&&e){aj();return}aZ("ai_caller",e)},aY=()=>
1{eV(!1)},aK=()=>{eG(!1)},aX=()=>eY(!0),aQ=()=>eY(!1);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("section",{className:(0,j.W)(m().leadsListSection),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().tableHeader),children:[(0,o.jsx)("div",{className:m().tableHeaderButtons,children:ag?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.z,{color:"secondary-gray",startIcon:"upload-01",onClick:()=>{es()},disabled:ek||en,loading:ek||en,fullWidth:!0,children:(0,o.jsx)("span",{children:"Export Leads"})}),(0,o.jsx)(v.z,{color:"secondary-gray",onClick:()=>eV(!0),children:(0,o.jsx)(x.J,{name:"dots-vertical",fontSize:22})})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.z,{color:"primary",onClick:()=>aX(),disabled:ek||en,loading:ek||en,children:"Try CRM Lead Follow-ups"}),(0,o.jsx)(K,{loading:en||ek,onExportListClick:es}),(0,o.jsx)(W.default,{className:m().timePicker,size:"large",defaultValue:"Newest leads",onChange:e=>{eJ(e),aT({current:1,pageSize:10},{},{order:"asc"===e?"ascend":"descend",field:"created_at"},t)},suffixIcon:(0,o.jsx)(x.J,{name:"chevron-down",className:m().selectMore}),options:[{label:"Newest leads",value:"asc"},{label:"Oldest leads",value:"desc"}]})]})}),!ag&&(0,o.jsx)("div",{className:m().tableHeaderMore,children:(0,o.jsx)("div",{className:(0,j.W)(m().rightSide),children:(0,o.jsx)(g.Z,{trigger:"click",placement:"bottomRight",content:(0,o.jsxs)("div",{className:m().followUpPopoverContent,children:[(0,o.jsx)("div",{className:m().followUpPopoverTitle,children:"Follow-up Options"}),(0,o.jsxs)("div",{className:m().followUpOptionsContainer,children:[(0,o.jsxs)("label",{className:m().followUpOptionLabel,children:[(0,o.jsx)(X.X,{id:"email-sms-checkbox",checked:!!eh,disabled:eT,onChange:e=>aZ("email_sms",e.target.checked)}),"Email & SMS"]}),(0,o.jsxs)("label",{className:m().followUpOptionLabel,children:[(0,o.jsx)(X.X,{id:"ai-caller-checkbox",checked:aV(),disabled:eC,onChange:e=>aZ("ai_caller",e.target.checked)}),"AI Caller"]})]})]}),children:(0,o.jsx)(v.z,{className:m().followUpButton,color:"secondary-gray",startIcon:"settings-01",loading:eC||eT,disabled:eC||eT,children:(()=>{let e=(eh?1:0)+(aV()?1:0);return 0===e?"Auto Follow-up":2===e?"Auto Follow-up (All)":"Auto Follow-up (1)"})()})})})})]}),(0,o.jsx)("div",{className:(0,j.W)(m().listHolder),children:(0,o.jsxs)(h.Z,{active:!0,loading:ek,children:[ag?(0,o.jsxs)("div",{className:(0,j.W)(m().leadsTableMobile),children:[t.map((e,a)=>{var l,s,n,t,i,r,d,c,p,h,_,g;return(0,o.jsxs)("div",{className:(0,j.W)(m().leadContainer),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().nameSection),children:[(0,o.jsx)("div",{className:(0,j.W)(m().nameWrapper),children:e.name}),(0,o.jsxs)("div",{className:(0,j.W)(m().dataWrapper),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().badgeWrapper),children:[(null==e?void 0:null===(l=e.tags)||void 0===l?void 0:l.length)>0&&(null==e?void 0:e.tags.includes("Hot"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().hot)}),(null==e?void 0:null===(s=e.tags)||void 0===s?void 0:s.length)>0&&(null==e?void 0:e.tags.includes("Fresh"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().nurturing)})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().statWrapper),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().message),onClick:()=>e.has_messages&&ak(e),children:[(0,o.jsx)("div",{className:(0,j.W)(m().iconWrapper),children:(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null!==(c=null==e?void 0:e.smsCount)&&void 0!==c?c:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().email),onClick:()=>e.has_messages&&ak(e),children:[(0,o.jsx)("div",{className:(0,j.W)(m().iconWrapper),children:(0,o.jsx)(x.J,{name:"mail-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null!==(p=null==e?void 0:e.emailCount)&&void 0!==p?p:0})]}),(0,o.jsx)(D.Z,{title:(null==e?void 0:null===(n=e.call_follow_ups)||void 0===n?void 0:n.length)?null==e?void 0:e.call_follow_ups.map(e=>(0,o.jsxs)("div",{style:{fontSize:"16px"},children:["Called the lead on"," ",(0,o.jsx)("strong",{children:null==e?void 0:e.call_date})]},"call-"+e.id)):void 0,color:"#000",trigger:["hover"],children:(0,o.jsx)("div",{className:(0,j.W)(m().call),onClick:()=>{ep?(0,f.t5)("Call follow-up is enabled for you"):window.location.href="https://www.roomvu.com/pricing-platinum"},children:(0,o.jsxs)("div",{className:(0,j.W)(m().iconWrapper),children:[(0,o.jsx)(x.J,{name:"phone",fontSize:16}),(null==e?void 0:null===(t=e.call_follow_ups)||void 0===t?void 0:t.length)>0&&(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null==e?void 0:null===(i=e.call_follow_ups)||void 0===i?void 0:i.length})]})})})]}),(0,o.jsx)("div",{className:(0,j.W)(m().collapseWrapper),onClick:()=>{eQ!=a?e$(a):e$(void 0)},children:(0,o.jsx)(x.J,{name:eQ==a?"chevron-up":"chevron-down",fontSize:20})})]})]}),eQ==a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:(0,j.W)(m().contactSection),children:[(0,o.jsx)("div",{className:(0,j.W)(m().headWrapper),children:"Contact"}),(0,o.jsx)("div",{className:(0,j.W)(m().dataWrapper),children:(0,o.jsxs)("span",{className:(0,j.W)(m().email),children:[null==e?void 0:e.email," ",null==e?void 0:e.phone]})})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().sourceSection),children:[(0,o.jsx)("div",{className:(0,j.W)(m().headWrapper),children:"Source"}),(0,o.jsx)("div",{className:(0,j.W)(m().leadSource),children:(0,o.jsxs)("span",{className:(0,j.W)(m().source),onClick:()=>{(null==e?void 0:e.reference_url)&&window.open(e.reference_url,"_blank")},children:[aW(null==e?void 0:e.src)," ",null==e?void 0:e.src_description,new Date(null!==(h=null==e?void 0:e.src_date)&&void 0!==h?h:null==e?void 0:e.created_at).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})," ",new Date(null!==(_=null==e?void 0:e.src_date)&&void 0!==_?_:null==e?void 0:e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().journeySection),children:[(0,o.jsx)("div",{className:(0,j.W)(m().headWrapper),children:"Journey"}),(0,o.jsx)("div",{className:(0,j.W)(m().dataWrapper),children:(0,o.jsx)(W.default,{showSearch:!0,id:"assign_journey_".concat(a),onChange:a=>{var l;aw(e.id,a,(null==e?void 0:null===(l=e.active_journey_ids)||void 0===l?void 0:l.length)>0)},defaultValue:null!==(g=!!(null==e?void 0:e.active_journeys)&&{value:null==e?void 0:null===(r=e.active_journeys[0])||void 0===r?void 0:r.crm_journey_id,label:null==e?void 0:null===(d=e.active_journeys[0])||void 0===d?void 0:d.name})&&void 0!==g?g:null,placeholder:"Please select a journey",className:(0,j.W)(B()["rv-input-small"],"templateSelector"),"aria-required":!0,filterOption:(e,a)=>{var l;return(null!==(l=String(null==a?void 0:a.label))&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())},disabled:aB,options:aR()})})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().messageSection),children:[(0,o.jsx)("div",{className:(0,j.W)(m().headWrapper),children:"Message"}),(0,o.jsx)("div",{className:(0,j.W)(m().dataWrapper),children:(0,o.jsx)(v.z,{className:(0,j.W)(m().noPadding),color:"tertiary",onClick:()=>ak(e),startIcon:"message-text-square-01",children:(0,o.jsx)("span",{children:"View Messages"})})})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().tagsSection),children:[(0,o.jsx)("div",{className:(0,j.W)(m().headWrapper),children:"Tags"}),(0,o.jsx)("div",{className:(0,j.W)(m().dataWrapper),children:(0,o.jsx)(em,{leadId:e.id,tags:e.tags||[],availableTags:e0,onTagsUpdate:()=>{u()},onRefreshAvailableTags:ax})})]})]})]},"lead-"+a)}),(0,o.jsx)("div",{className:(0,j.W)(m().mobilePaginationWrapper),children:(0,o.jsx)(R.default,{total:Y,itemRender:(e,a,l)=>"prev"===a?(0,o.jsx)("div",{className:(0,j.W)(m().paginationMobilePrev),children:(0,o.jsx)(x.J,{name:"arrow-left",fontSize:12})}):"next"===a?(0,o.jsx)("div",{className:(0,j.W)(m().paginationMobileNext),children:(0,o.jsx)(x.J,{name:"arrow-right",fontSize:12})}):l,pageSize:ei,current:null!=et?et:1,hideOnSinglePage:!0,pageSizeOptions:[10],simple:!0,onChange:e=>{q({current:e,pageSize:10}),u(e,10,eo,"desc",void 0,[],[])}})})]}):(0,o.jsxs)("div",{className:(0,j.W)(m().leadsTable),children:[ek&&(0,o.jsx)(J.default,{}),(0,o.jsx)(p.Z,{className:(0,j.W)(m().dataTable),showSorterTooltip:!1,columns:n,dataSource:t,pagination:{position:["bottomCenter"],pageSize:ei,total:Y,current:null!=et?et:1,hideOnSinglePage:!0,pageSizeOptions:[5,10,20,50]},onChange:aT,rowKey:e=>null==e?void 0:e.id}),i>0&&(0,o.jsx)(v.z,{color:"secondary",className:(0,j.W)(m().shoDeletedLeadsButton),onClick:()=>{r(!0)},disabled:ek||en,loading:ek||en,children:(0,o.jsx)("span",{children:"Show Deleted leads"})})]}),(0,o.jsx)(O.Z,{open:eU,onClose:aY,classes:{body:m().drawerContainer},children:(0,o.jsx)(z,{saving:eT,onClose:aY,autoFL:eh,handleChangeAutoFollowupSetting:aG,setIsModalVisible:eG,setShowTryCrmModal:eY,aiCallerEnabled:aV(),aiCallerLoading:eC,onAiCallerChange:aq,onOpenFollowUpSettings:()=>{eX(!0)},isPlatinumOrHigherUser:ep})}),eK&&(0,o.jsx)(er,{onClose:()=>{eX(!1),eV(!0)},autoFL:eh,aiCallerEnabled:aV(),aiCallerLoading:eC,saving:eT,onEmailSmsChange:e=>{e!==eh&&aG()},onAiCallerChange:aq,isPlatinumOrHigherUser:ep}),(0,o.jsx)(E.default,{open:eZ,footer:null,title:null,onCancel:aK,children:(0,o.jsx)(P,{onClose:aK,saving:eT,autoFL:eh,handleChangeAutoFollowupSetting:aG,setIsModalVisible:eG})}
1),(0,o.jsx)(E.default,{open:eq,footer:null,title:null,onCancel:aQ,width:800,children:(0,o.jsx)(H.default,{onClose:aQ})}),(0,o.jsx)(E.default,{open:e5,onCancel:aD,footer:null,title:null,width:560,destroyOnClose:!0,children:(0,o.jsxs)("div",{className:m().salesReminderModal,children:[(0,o.jsxs)("div",{className:m().salesReminderModalHeader,children:[(0,o.jsx)("div",{className:m().salesReminderModalTitle,children:"Enter your call information"}),(0,o.jsxs)("div",{className:m().salesReminderModalSubtitle,children:[null!==(l=null==e2?void 0:e2.name)&&void 0!==l?l:"Lead",(null==e2?void 0:e2.email)?" (".concat(e2.email,")"):""]})]}),(0,o.jsxs)("div",{className:m().salesReminderModalField,children:[(0,o.jsx)("label",{children:"Lead status"}),(0,o.jsx)("div",{className:m().callInfoOutcomeGrid,children:S.Jg.map(e=>(0,o.jsxs)("label",{className:(0,j.W)(m().callInfoOutcomeOption,e8===e&&m().callInfoOutcomeOptionActive),children:[(0,o.jsx)("input",{type:"radio",name:"sales-reminder-outcome",value:e,checked:e8===e,onChange:()=>e6(e)}),(0,o.jsx)("span",{children:ej[e]})]},e))})]}),(0,o.jsxs)("div",{className:m().salesReminderModalField,children:[(0,o.jsx)("label",{children:"Notes"}),(0,o.jsx)(I.default,{rows:5,placeholder:"Add your call notes here...",value:e9,onChange:e=>e7(e.target.value)})]}),(0,o.jsxs)("div",{className:m().salesReminderModalField,children:[(0,o.jsx)("label",{children:"Follow up in x days (optional)"}),(0,o.jsx)("input",{type:"number",min:1,max:365,value:ae,onChange:e=>aa(e.target.value),placeholder:"e.g. 7",style:{width:"100%"}})]}),(0,o.jsxs)("div",{className:m().salesReminderModalFooter,children:[(0,o.jsx)(v.z,{color:"secondary-gray",onClick:aD,disabled:al,children:"Cancel"}),(0,o.jsx)(v.z,{color:"primary",onClick:aH,loading:al,disabled:al,children:"Save"})]})]})}),(0,o.jsx)(E.default,{open:an,onCancel:aJ,footer:null,title:null,width:620,destroyOnClose:!0,children:(0,o.jsxs)("div",{className:m().salesReminderHistoryModal,children:[(0,o.jsxs)("div",{className:m().salesReminderModalHeader,children:[(0,o.jsx)("div",{className:m().salesReminderModalTitle,children:"Call Log History"}),(0,o.jsxs)("div",{className:m().salesReminderModalSubtitle,children:[null!==(s=null==ai?void 0:ai.name)&&void 0!==s?s:"Lead",(null==ai?void 0:ai.email)?" (".concat(ai.email,")"):""]})]}),ar?(0,o.jsx)("div",{className:m().salesReminderHistoryEmpty,children:"Loading call logs..."}):ac.length>0?(0,o.jsx)("div",{className:m().salesReminderHistoryList,children:ac.map(e=>(0,o.jsxs)("div",{className:m().salesReminderHistoryItem,children:[(0,o.jsxs)("div",{className:m().salesReminderHistoryItemHeader,children:[(0,o.jsx)("span",{children:aU(e.scheduled_at)}),(0,o.jsx)("strong",{children:e.status})]}),(0,o.jsx)("div",{className:m().salesReminderHistoryItemNote,children:e.note}),!!e.outcome_label&&(0,o.jsxs)("div",{className:m().salesReminderHistoryMeta,children:["Lead status: ",e.outcome_label]}),e.sent_at&&(0,o.jsxs)("div",{className:m().salesReminderHistoryMeta,children:["Sent at: ",aU(e.sent_at)]}),!!e.failure_reason&&(0,o.jsxs)("div",{className:m().salesReminderHistoryMeta,children:["Failure: ",e.failure_reason]})]},"sales-reminder-history-".concat(e.id)))}):(0,o.jsx)("div",{className:m().salesReminderHistoryEmpty,children:"No call logs found for this lead."}),(0,o.jsx)("div",{className:m().salesReminderModalFooter,children:(0,o.jsx)(v.z,{color:"secondary-gray",onClick:aJ,disabled:ar,children:"Close"})})]})}),(0,o.jsx)(eg,{open:am,message:ah,onClose:()=>{ap(!1),a_(null)}})]})})]})})}var ey=l(882031),eb=l.n(ey),ew=l(558715),eL=l(592193);function eN(){let[e,a]=(0,c.useState)(1),l=ew.default.TabPane;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("section",{className:"jsx-e80448937a0acf55",children:(0,o.jsxs)(ew.default,{defaultActiveKey:"1",activeKey:e.toString(),onChange:e=>{a(parseInt(e))},centered:!0,children:[(0,o.jsx)(l,{tab:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.J,{name:"message-dots-circle"})," ",(0,o.jsx)("span",{className:"jsx-e80448937a0acf55",children:"Email Follow-up"})]}),className:"jsx-e80448937a0acf55",children:(0,o.jsxs)("div",{className:"jsx-e80448937a0acf55 "+((0,j.W)(m().inner)||""),children:[(0,o.jsxs)("div",{className:"jsx-e80448937a0acf55 "+((0,j.W)(m().textWrapper)||""),children:[(0,o.jsx)("p",{className:"jsx-e80448937a0acf55",children:"When someone clicks on your ad, your lead enters their info in Facebookâs form, and is sent directly to your leads management panel."}
1),(0,o.jsx)("b",{className:"jsx-e80448937a0acf55",children:"Then we send follow-up messages as Email on your behalf. And you can take over anytime."})]}),(0,o.jsx)("div",{className:"jsx-e80448937a0acf55 "+((0,j.W)(m().imageWrapper)||""),children:(0,o.jsx)("video",{src:"".concat(eL.Z.getLeadsManagementAsset("leads-email-followup.mp4")),autoPlay:!0,muted:!0,playsInline:!0,disablePictureInPicture:!0,controlsList:"nodownload",preload:"none",onContextMenu:e=>(e.preventDefault(),!1),className:"jsx-e80448937a0acf55"})})]})},"1"),(0,o.jsx)(l,{tab:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.J,{name:"message-dots-circle"})," ",(0,o.jsx)("span",{className:"jsx-e80448937a0acf55",children:"SMS Follow-up"})]}),className:"jsx-e80448937a0acf55",children:(0,o.jsxs)("div",{className:"jsx-e80448937a0acf55 "+((0,j.W)(m().inner)||""),children:[(0,o.jsxs)("div",{className:"jsx-e80448937a0acf55 "+((0,j.W)(m().textWrapper)||""),children:[(0,o.jsx)("p",{className:"jsx-e80448937a0acf55",children:"When someone clicks on your ad, your lead enters their info in Facebookâs form, and is sent directly to your leads management panel."}),(0,o.jsx)("b",{className:"jsx-e80448937a0acf55",children:"Then we send follow-up messages as SMS on your behalf. And you can take over anytime."})]}),(0,o.jsx)("div",{className:"jsx-e80448937a0acf55 "+((0,j.W)(m().imageWrapper)||""),children:(0,o.jsx)("video",{src:"".concat(eL.Z.getLeadsManagementAsset("leads-sms-followup.mp4")),autoPlay:!0,muted:!0,playsInline:!0,disablePictureInPicture:!0,controlsList:"nodownload",preload:"none",onContextMenu:e=>(e.preventDefault(),!1),className:"jsx-e80448937a0acf55"})})]})},"2")]})}),(0,o.jsx)(eb(),{id:"e80448937a0acf55",children:".ant-tabs.jsx-e80448937a0acf55{color:#fff!important}.ant-tabs-nav.jsx-e80448937a0acf55{-webkit-box-shadow:0 10px 20px 10px rgba(29,41,54,.05);-moz-box-shadow:0 10px 20px 10px rgba(29,41,54,.05);box-shadow:0 10px 20px 10px rgba(29,41,54,.05);display:-webkit-box!important;display:-webkit-flex!important;display:-moz-box!important;display:-ms-flexbox!important;display:flex!important;width:100%}.ant-tabs-nav-list.jsx-e80448937a0acf55{width:50%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 px(42)}.ant-tabs-tab-btn.jsx-e80448937a0acf55{fontsize:px(14)}.ant-tabs-nav-wrap.jsx-e80448937a0acf55{padding:0 px(12);-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center}.ant-tabs-ink-bar.jsx-e80448937a0acf55{display:none}.ant-tabs-content-holder.jsx-e80448937a0acf55{padding:px(12)px(48)}.ant-tabs-tab.jsx-e80448937a0acf55{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;text-align:left;width:50%;color:#fff!important;background-color:red!important}.ant-tabs-tab.ant-tabs-tab-active.jsx-e80448937a0acf55{border-bottom:3px solid $clear-blue}.ant-tabs-tab.ant-tabs-tab-active.jsx-e80448937a0acf55 .ant-tabs-tab-btn.jsx-e80448937a0acf55{font-weight:600}.ant-tabs-tab-btn.jsx-e80448937a0acf55{font-size:px(14);font-weight:600}.ant-tabs-nav-operations.jsx-e80448937a0acf55{width:2px!important;display:block!important}"})]})}var eC=l(876488),eS=l(667360),eW=l.n(eS);function eM(){let e=(0,b.v9)(M.S8),a=(0,c.useMemo)(()=>"".concat((null==e?void 0:e.agent_profile_name)||"","[email protected]"),[null==e?void 0:e.agent_profile_name]);return(0,o.jsxs)("div",{className:eW().banner,children:[(0,o.jsx)("div",{className:eW().header,children:(0,o.jsxs)("div",{className:eW().titleGroup,children:[(0,o.jsx)(x.J,{name:"mail-01",className:eW().headerIcon,"aria-hidden":!0}),(0,o.jsx)("h2",{className:eW().title,children:"Your lead receptionist"})]})}),(0,o.jsxs)("p",{className:eW().subtext,children:["Forward any lead source to this email, and your lead"," ",(0,o.jsx)("strong",{children:"automatically receives"})," in follow-up journeys."]}),(0,o.jsxs)("div",{className:eW().emailBox,children:[(0,o.jsx)("span",{className:eW().emailValue,children:a}),(0,o.jsx)("button",{type:"button",className:eW().copyButton,onClick:()=>{(0,eC.v)(a),(0,f.t5)("Email address copied to clipboard")},title:"Copy to clipboard","aria-label":"Copy email address to clipboard",children:(0,o.jsx)(x.J,{name:"copy-05",fontSize:16})})]}),(0,o.jsxs)("a",{className:eW().howItWorksButton,href:"https://help.roomvu.com/en/articles/14182177-how-to-use-ai-lead-receptionist-to-capture-and-follow-up-with-leads-automatically",target:"_blank",rel:"noreferrer",children:["How it works",(0,o.jsx)(x.J,{name:"arrow-right",fontSize:18})]})]})}var ek=l(1359);function eI(e){let{totalLeadsCount:a,useSampleData:l,setSearch:s,availableTags:n=[],selectedTags:t=[],onTagsChange:i}=e,r=e=>s(e),d=(0,Z.d)();return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("section",{children:[(0,o.jsxs)("div",{className:(0,j.W)(m().mainTitle),children:[(0,o.jsx)("span",{children:"Leads & Follow Ups"}),d?(0,o.jsxs)("div",{className:(0,j.W)(m().mobileLeadsCount),children:[(0,o.jsx)(x.J,{name:"user-01",fontSize:16})," ",(0,o.jsx)("span",{children:a})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:(0,j.W)(m().leadsCount),children:a})," ",(0,o.jsx)("span",{className:(0,j.W)(m().grayColor),children:"Leads"})]})]}),(0,o.jsx)("h3",{className:(0,j.W)(m().subTitle,d&&m().isMobile),children:"Roomvu follows up with potential buyers & sellers on your behalf."}
1),!l&&(0,o.jsxs)("div",{className:(0,j.W)(m().searchWrapper),children:[(0,o.jsx)(ek._,{id:"search-lead",placeholder:"Search person name, message, ...",disabled:l,innerElements:{end:(0,o.jsx)(x.J,{name:"search-sm"})},onChange:e=>{r(e.currentTarget.value)}}),n.length>0&&i&&(0,o.jsx)(W.default,{mode:"multiple",showSearch:!0,placeholder:"Filter by tags",value:t||[],onChange:e=>{i&&i(Array.isArray(e)?e:[])},options:n,allowClear:!0,style:{minWidth:200},maxTagCount:"responsive",filterOption:(e,a)=>{var l;return String(null!==(l=null==a?void 0:a.label)&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())}})]})]})})}var eT=l(619533);function eB(){let[e,a]=(0,c.useState)(1),l=ew.default.TabPane,s=(0,b.v9)(M.Nu);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("section",{className:"jsx-1d701f31e359236b",children:(0,o.jsx)(ew.default,{defaultActiveKey:"1",activeKey:e.toString(),onChange:e=>{a(parseInt(e))},centered:!0,addIcon:!0,children:(0,o.jsx)(l,{tab:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x.J,{name:"phone"})," ",(0,o.jsx)("span",{className:"jsx-1d701f31e359236b",children:"Call Follow-up"})]}),className:"jsx-1d701f31e359236b",children:(0,o.jsxs)("div",{className:"jsx-1d701f31e359236b "+((0,j.W)(m().inner)||""),children:[(0,o.jsxs)("div",{className:"jsx-1d701f31e359236b "+((0,j.W)(m().textWrapper)||""),children:[(0,o.jsx)("p",{className:"jsx-1d701f31e359236b",children:"When someone clicks on your ad, your lead enters their info in Facebookâs form, and is sent directly to your leads management panel. They are now your Hot Leads."}),(0,o.jsx)("b",{className:"jsx-1d701f31e359236b",children:"Then we follow up the Hot Leads by calling them on your be-half. You can take over any time."})]}),(0,o.jsxs)("div",{className:"jsx-1d701f31e359236b "+((0,j.W)(m().imageWrapper)||""),children:[(0,o.jsx)(eT.Z,{src:"/images/agent-dashboard/leads-management/call-service.png",alt:"mobile-follow-up",height:"80",width:"100",layout:"fixed"}),(0,o.jsx)("h4",{className:"jsx-1d701f31e359236b",children:"Available on"}),(0,o.jsxs)("h2",{className:"jsx-1d701f31e359236b",children:[(0,o.jsx)(x.J,{name:"diamond-01"})," DIAMOND PLAN"]}),!s&&(0,o.jsx)(v.z,{color:"primary",size:"lg",className:(0,j.W)(m().menuItem,m().upgradeButton),"data-tr":"header_upgrade_button",onClick:()=>window.location.href="https://www.roomvu.com/pricing-diamond",children:"View DIAMOND"})]})]})},"1")})}),(0,o.jsx)(eb(),{id:"1d701f31e359236b",children:".ant-tabs.jsx-1d701f31e359236b{color:#fff!important}.ant-tabs-nav.jsx-1d701f31e359236b{-webkit-box-shadow:0 10px 20px 10px rgba(29,41,54,.05);-moz-box-shadow:0 10px 20px 10px rgba(29,41,54,.05);box-shadow:0 10px 20px 10px rgba(29,41,54,.05);display:-webkit-box!important;display:-webkit-flex!important;display:-moz-box!important;display:-ms-flexbox!important;display:flex!important;width:100%}.ant-tabs-nav-list.jsx-1d701f31e359236b{width:50%;-webkit-box-pack:justify;-webkit-justify-content:space-between;-moz-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:0 px(42)}.ant-tabs-tab-btn.jsx-1d701f31e359236b{fontsize:px(14)}.ant-tabs-nav-wrap.jsx-1d701f31e359236b{padding:0 px(12);-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center}.ant-tabs-ink-bar.jsx-1d701f31e359236b{display:none}.ant-tabs-content-holder.jsx-1d701f31e359236b{padding:px(12)px(48)}.ant-tabs-tab.jsx-1d701f31e359236b{-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;flex:1;text-align:left;width:50%;color:#fff!important;background-color:red!important}.ant-tabs-tab.ant-tabs-tab-active.jsx-1d701f31e359236b{border-bottom:3px solid $clear-blue}.ant-tabs-tab.ant-tabs-tab-active.jsx-1d701f31e359236b .ant-tabs-tab-btn.jsx-1d701f31e359236b{font-weight:600}.ant-tabs-tab-btn.jsx-1d701f31e359236b{font-size:px(14);font-weight:600}"})]})}var eR=l(184047);function eE(){let e=(0,C.useRouter)(),a=(0,Z.d)();return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(m().noLeadsSection),children:(0,o.jsxs)("div",{className:(0,j.W)(m().contentWrapper),children:[a?(0,o.jsx)("h2",{children:"Get leads"}):(0,o.jsxs)("h2",{children:["You have no leads ",(0,o.jsx)(x.J,{name:"user-01"})," ","0"," "]}),(0,o.jsx)("p",{children:"Run Facebook & Instagram ad to get lead"}),(0,o.jsx)(v.z,{color:"primary",size:"md",className:(0,j.W)(m().runFacebookAdsButton,a&&m().isMobile),onClick:()=>{e.push((0,eR.r9)(eR.Z5.smartAds(null,"leads-list_no-leads-box")))},children:"Run Fb & Instagram ad"})]})})})}var eA=l(937781);function eF(e){let{deletedLeads:a,setShowDeletedLeads:l,availableSources:s,getDeletedLeads:n,selectedSourcesChange:t,selectedStatesChange:i,sortChange:r,pageChange:d,total:u,selectedPage:_,limit:g}=e,f=(0,C.useRouter)(),y=(0,b.I0)(),[L,S]=(0,c.useState)(!1),[M,k]=(0,c.useState)("desc"),I=(0,Z.d)(),T=e=>"home afford"===e?"Homes I Can Afford":e?e.charAt(0).toUpperCase()+e.slice(1):e,B=e=>{y((0,w.wR)(e)),N.AnalyticApis.gaEvent("view_message_clicked",{page_location:window.location.pathname,page_name:"leads-management",is_mobile:I})},R=e=>{if(!e)return"-";let a=new Date(e);return Number.isNaN(a.getTime())?"-":a.toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})},E=e=>{if(!e)return"";let a=new Date(e);return Number.isNaN(a.getTime())?"":a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},A=e=>{var a,l;return"number"==typeof(null==e?void 0:e.callCount)?e.callCount:null!==(l=null==e?void 0:null===(a=e.call_follow_ups)||void 0===a?void 0:a.length)&&void 0!==l?l:0},F=e=>{var a,l,s,n,t;let i=null==e?void 0:null===(a=e.active_journeys)||void 0===a?void 0:a[0],o=null!==(n=null!==(s=null==i?void 0:i.crm_journey_id)&&void 0!==s?s:null==e?void 0:null===(l=e.active_journey_ids)||void 0===l?void 0:l[0])&&void 0!==n?n:null;return o?{value:o,label:null!==(t=null==i?void 0:i.name)&&void 0!==t?t:"Assigned journey"}:null},P=I?[{title:(0,o.jsxs)("div",{className:m().columnHeader,children:[(0,o.jsx)(x.J,{name:"user-01",fontSize:16})," Lead Info"]}),key:"leadInfo",className:"info_td",render:(e,a)=>{var l,s,n,t;return(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(m().info),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().dataRow),children:[(0,o.jsx)("span",{className:(0,j.W)(m().name),children:(null==a?void 0:a.name)||"-"}),(null==a?void 0:null===(l=a.tags)||void 0===l?void 0:l.includes("Hot"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().hot),children:"Hot"}),(null==a?void 0:null===(s=a.tags)||void 0===s?void 0:s.includes("Fresh"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().nurturing),children:"Fresh"})]}),(0,o.jsx)("span",{className:(0,j.W)(m().email),children:(null==a?void 0:a.email)||"-"}),(0,o.jsx)("span",{className:(0,j.W)(m().phone),children:(null==a?void 0:a.phone)||"-"}),(0,o.jsxs)("div",{className:(0,j.W)(m().leadSource),children:[(0,o.jsx)("span",{className:(0,j.W)(m().sourceTitle),children:T(null==a?void 0:a.src)||"-"}),(0,o.jsxs)("span",{children:[" - ",R(null==a?void 0:a.created_at)]})]}),(0,o.jsx)("div",{className:(0,j.W)(m().leadStats),children:(0,o.jsxs)("div",{className:(0,j.W)(m().stats),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().message,(null==a?void 0:a.has_messages)&&m().hasMessage),onClick:()=>(null==a?void 0:a.has_messages)&&B(a),children:[(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:16}),(0,o.jsx)("span",{children:null!==(n=null==a?void 0:a.smsCount)&&void 0!==n?n:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().email,(null==a?void 0:a.has_messages)&&m().hasMessage),onClick:()=>(null==a?void 0:a.has_messages)&&B(a),children:[(0,o.jsx)(x.J,{name:"mail-01",fontSize:16}),(0,o.jsx)("span",{children:null!==(t=null==a?void 0:a.emailCount)&&void 0!==t?t:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().call),children:[(0,o.jsx)(x.J,{name:"phone",fontSize:16}),(0,o.jsx)("span",{children:A(a)})]})]})}),(null==a?void 0:a.message)&&(0,o.jsxs)("div",{className:m().lastMessage,children:[(0,o.jsx)("b",{children:"Last Message: "}),a.message]}),(0,o.jsx)(v.z,{color:"tertiary",onClick:()=>B(a),startIcon:"message-text-square-01",children:(0,o.jsx)("span",{children:"View messages"})})]})})}}]:[{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(M),m().columnHeader),children:"Name"}),dataIndex:"name",key:"name",className:"info_td",render:e=>(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsx)("div",{className:(0,j.W)(m().info),children:(0,o.jsx)("span",{className:(0,j.W)(m().name),children:e||"-"})})})},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Status"}),dataIndex:["follow_up_state"],key:"follow_up_state",className:"info_td",width:130,render:(e,a)=>{var l,s;return(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(m().info),children:[(null==a?void 0:null===(l=a.tags)||void 0===l?void 0:l.includes("Hot"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().hot),children:"Hot"}),(null==a?void 0:null===(s=a.tags)||void 0===s?void 0:s.includes("Fresh"))&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().nurturing),children:"Fresh"}),A(a)>
10&&(0,o.jsx)("span",{className:(0,j.W)(m().statusTag,m().called),children:"Called"})]})})}},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Contact"}),dataIndex:"email",key:"email",className:"info_td",render:(e,a)=>(0,o.jsx)("div",{className:(0,j.W)(m().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(m().info),children:[(0,o.jsx)("span",{className:(0,j.W)(m().email),children:(null==a?void 0:a.email)||"-"}),(0,o.jsx)("span",{className:(0,j.W)(m().phone),children:(null==a?void 0:a.phone)||"-"})]})})},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Source"}),width:250,minWidth:250,filters:!!s&&s.map(e=>({text:e,value:e})),filterIcon:(0,o.jsx)(x.J,{name:"filter-funnel-01",fontSize:16}),dataIndex:"created_at",key:"source",className:"src_td",render:(e,a)=>{var l,s;return(0,o.jsx)("div",{onClick:()=>{(null==a?void 0:a.reference_url)&&window.open(a.reference_url,"_blank")},className:(null==a?void 0:a.reference_url)&&m().srcLink,children:(0,o.jsxs)("div",{className:(0,j.W)(m().leadSource),children:[(0,o.jsx)("span",{className:(0,j.W)(m().sourceTitle),children:T(null==a?void 0:a.src)||"-"}),(0,o.jsx)("br",{}),null==a?void 0:a.src_description,(null==a?void 0:a.src_description)&&(0,o.jsx)("br",{}),R(null!==(l=null==a?void 0:a.src_date)&&void 0!==l?l:null==a?void 0:a.created_at),(0,o.jsx)("br",{}),(null==a?void 0:a.src_time)||E(null!==(s=null==a?void 0:a.src_date)&&void 0!==s?s:null==a?void 0:a.created_at)]})})}},{title:(0,o.jsx)("div",{className:(0,j.W)("stat-header ".concat(M),m().columnHeader),children:"Follow-up"}),dataIndex:"stats",key:"stat",className:"stat_td",width:120,minWidth:120,sortDirections:["ascend","descend","ascend"],sortOrder:"asc"===M?"ascend":"descend",render:(e,a)=>{var l,s,n;return(0,o.jsx)("div",{className:(0,j.W)(m().leadStats),children:(0,o.jsxs)("div",{className:(0,j.W)(m().stats),children:[(0,o.jsxs)("div",{className:(0,j.W)(m().message,(null==a?void 0:a.has_messages)&&m().hasMessage),onClick:()=>(null==a?void 0:a.has_messages)&&B(a),children:[(0,o.jsx)("div",{className:(0,j.W)(m().iconWrapper),children:(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null!==(s=null==a?void 0:a.smsCount)&&void 0!==s?s:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().email,(null==a?void 0:a.has_messages)&&m().hasMessage),onClick:()=>(null==a?void 0:a.has_messages)&&B(a),children:[(0,o.jsx)("div",{className:(0,j.W)(m().iconWrapper),children:(0,o.jsx)(x.J,{name:"mail-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(m().count),children:null!==(n=null==a?void 0:a.emailCount)&&void 0!==n?n:0})]}),(0,o.jsx)(D.Z,{title:(null==a?void 0:null===(l=a.call_follow_ups)||void 0===l?void 0:l.length)?a.call_follow_ups.map(e=>(0,o.jsxs)("div",{style:{fontSize:"16px"},children:["Called the lead on"," ",(0,o.jsx)("strong",{children:null==e?void 0:e.call_date})]},"call-"+e.id)):void 0,color:"#000",trigger:["hover"],children:(0,o.jsx)("div",{className:(0,j.W)(m().call,m().hasMessage),children:(0,o.jsxs)("div",{className:(0,j.W)(m().iconWrapper),children:[(0,o.jsx)(x.J,{name:"phone",fontSize:16}),A(a)>0&&(0,o.jsx)("span",{className:(0,j.W)(m().count),children:A(a)})]})})})]})})}},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Enrolled journey"}),dataIndex:"journey",key:"journey",className:"journey_td",width:220,minWidth:220,render:(e,a,l)=>{let s=F(a);return(0,o.jsx)("div",{className:(0,j.W)(m().leadStats),children:(0,o.jsx)("div",{className:(0,j.W)(m().stats),children:(0,o.jsxs)("div",{className:(0,j.W)(m().enrolledJourney),children:[(0,o.jsx)(W.default,{showSearch:!0,id:"deleted_lead_journey_".concat(l),defaultValue:s,placeholder:"No journey","aria-required":!0,disabled:!0,options:s?[s]:[]}),!!s&&(0,o.jsx)(D.Z,{title:"Journey details",children:(0,o.jsx)("span",{children:(0,o.jsx)(x.J,{onClick:()=>f.push({pathname:"/agent-dashboard/crm/journeys",query:{journeyId:s.value}}),name:"link-external-01",fontSize:20})})})]})})})}},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader),children:"Message"}),dataIndex:"message",key:"details",className:"details_td",render:(e,a)=>(0,o.jsxs)("div",{className:m().leadMessage,children:[(0,o.jsxs)("div",{className:m().messageWrapper,children:[(0,o.jsxs)("div",{className:m().row,children:[(null==a?void 0:a.rent)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Rent:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.rent.toLocaleStr
1ing()]})]}),(null==a?void 0:a.mortgageRate)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Mortgage Rate:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.mortgageRate.toLocaleString()]})]})]}),(0,o.jsxs)("div",{className:m().row,children:[(null==a?void 0:a.income)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Savings:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.income.toLocaleString()]})]}),(null==a?void 0:a.purchasePrice)&&(0,o.jsxs)("div",{className:m().column,children:[(0,o.jsx)("span",{className:(0,j.W)(m().columnTitle),children:"Purchase Price:"}),(0,o.jsxs)("span",{className:(0,j.W)(m().columnValue),children:["$",a.purchasePrice.toLocaleString()]})]})]}),(null==a?void 0:a.message)&&(0,o.jsx)("div",{className:m().row,children:(0,o.jsxs)("span",{style:{whiteSpace:"pre-line"},children:[(0,o.jsx)("b",{children:"Last Message: "}),(0,o.jsx)(D.Z,{placement:"left",title:a.message,children:a.message})]})})]}),(0,o.jsx)("div",{className:m().buttonWrapper,children:(0,o.jsx)("div",{className:m().row,children:(0,o.jsx)(v.z,{color:"tertiary",onClick:()=>B(a),startIcon:"message-text-square-01",children:(0,o.jsx)("span",{children:"View messages"})})})})]})},{title:(0,o.jsx)("div",{className:(0,j.W)(m().columnHeader)}),dataIndex:"id",key:"action",width:80,minWidth:80,className:"actions_td",render:(e,a)=>(0,o.jsx)("div",{className:(0,j.W)(m().leadAction),children:(0,o.jsx)(D.Z,{title:"View messages",placement:"top",children:(0,o.jsx)("span",{className:m().actionIconButton,onClick:()=>B(a),children:(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:20})})})})}];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:(0,j.W)(m().backButtonSection),children:[(0,o.jsxs)(v.z,{className:(0,j.W)(m().backButton),color:"link",fullWidth:!1,onClick:()=>l(!1),children:[(0,o.jsx)(x.J,{name:"arrow-left",fontSize:22}),"Back to leads list"]}),(0,o.jsx)("h2",{className:(0,j.W)(m().tableTitle),children:"Deleted Leads"})]}),(0,o.jsx)("section",{className:(0,j.W)(m().leadsListSection),children:(0,o.jsx)("div",{className:(0,j.W)(m().listHolder),children:(0,o.jsx)(h.Z,{active:!0,loading:L,children:(0,o.jsxs)("div",{className:(0,j.W)(m().leadsTable,m().dataTable,I&&m().leadsTableMobile),children:[L&&(0,o.jsx)(J.default,{}),a&&(0,o.jsx)(p.Z,{showSorterTooltip:!1,columns:P,dataSource:a,pagination:{position:["bottomCenter"],pageSize:g,total:u,current:null!=_?_:1,hideOnSinglePage:!0,pageSizeOptions:[5,10,20,50]},onChange:(e,a,l)=>{var s,o,c,u;let m="ascend"===l.order?"asc":"desc";t(null!==(s=a.source)&&void 0!==s?s:[]),i(null!==(o=a.follow_up_state)&&void 0!==o?o:[]),r(m),k(m),d(e),S(!0),n(e.current,e.pageSize,"","created_at",m,void 0,null!==(c=a.source)&&void 0!==c?c:[],null!==(u=a.follow_up_state)&&void 0!==u?u:[]).finally(()=>S(!1))},rowKey:e=>null==e?void 0:e.id})]})})})})]})}var eP=l(804521),ez=l.n(eP),eD=l(697e3),eH=l.n(eD);let eO=d()(()=>l.e(35137).then(l.bind(l,135137)),{loadableGenerated:{webpack:()=>[135137]}});function eJ(e){let{loading:a,onExportListClick:l}=e,s=(0,b.I0)(),n=(0,C.useRouter)(),t=(0,Z.d)("(max-width:1445px)"),i=(0,Z.d)("(max-width:1375px)"),r=(0,Z.d)("(max-width:1149px)"),d=()=>{s((0,w.dL)("Delete All Leads","Are you sure you want to delete all of your leads ?",()=>{u().then(()=>s((0,w.Zl)()))},()=>{s((0,w.Zl)())},"Yes","No"))},u=async()=>{try{var e;let a=await (0,y.yn)("/leads/deleteAll",[]);if(a.data.error)throw"Api has error";(null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.status)=="success"?(0,f.t5)("Removed successfully"):(0,f.cB)("Failed to remove leads.")}catch(e){(0,f.cB)("Failed to remove leads!")}},m=(0,c.useMemo)(()=>{let e=[];return t&&e.push("journey-builder"),i&&e.push("get-leads-crm"),r&&e.push("export-leads"),e},[t,i,r]),p=(0,c.useCallback)(e=>m.includes(e),[m]),h=(0,c.useMemo)(()=>[(0,o.jsx)(v.z,{color:p("import-leads")?"secondary-list-item-gray":"secondary-gray",fullWidth:p("import-leads"),startIcon:"download-01",size:"md",variant:"default",onClick:()=>{s((0,w.YJ)("crm-upload-csv-popup"))},disabled:a,loading:a,children:"Import Your Leads"},"import-leads"),(0,o.jsx)(v.z,{color:p("export-leads")?"secondary-list-item-gray":"secondary-gray",fullWidth:p("export-leads"),startIcon:"upload-01",onClick:()=>{l()},disabled:a,loading:a,children:"Export Your Leads"},"export-leads"),(0,o.jsx)(v.z,{color:p("get-leads-crm")?"secondary-list-item-gray":"secondary-gray",fullWidth:p("get-leads-crm"),startIcon:"users-plus",onClick:()=>{s((0,w.YJ)("connect-crm-popup"))},disabled:a,loading:a,children:"Get Leads On Your CRM"}
1,"get-leads-crm"),(0,o.jsxs)(v.z,{color:p("journey-builder")?"secondary-list-item-gray":"secondary-gray",fullWidth:p("journey-builder"),startIcon:"brush-01",onClick:()=>{n.push("/agent-dashboard/crm/journeys/")},disabled:a,loading:a,className:eH().journeyBuilderButton,children:["Journey Builder ",(0,o.jsx)("span",{children:"Beta"})]},"journey-builder"),(0,o.jsx)(v.z,{color:p("delete-all-leads")?"secondary-list-item-gray":"secondary-gray",fullWidth:p("delete-all-leads"),startIcon:"trash-01",onClick:()=>{d()},disabled:a,loading:a,className:eH().journeyBuilderButton,children:"Delete All Leads"},"delete-all-leads")],[p,a]);return m.length<1?(0,o.jsx)(o.Fragment,{children:c.Children.map(h,e=>e)}):(0,o.jsxs)(o.Fragment,{children:[c.Children.map(h,e=>p(e.key)?null:e),m.length>0&&(0,o.jsx)(eO,{placement:"topLeft",trigger:["click"],content:c.Children.map(h,e=>p(e.key)?e:null),children:(0,o.jsxs)(v.z,{color:"secondary-gray",children:[(0,o.jsx)(x.J,{name:"dots-vertical",fontSize:16})," More Actions"]})})]})}function eU(e){var a;let l,{deletedLeadsCount:s,setShowDeletedLeads:n,total:t,exportList:i,loading:r,selectedPage:d,limit:u}=e,m=[{id:0,src:"home afford",src_date:"Feb 23, 2023",src_time:"04:00pm",name:"Lead Name Here!",email:"[email protected]",phone:"123-4567",message:"",created_at:"2023-01-03 00:59:33",reference:null,follow_up:!0,user_id:0,buyer_id:0,follow_up_state:"nurturing",follow_up_stage:null,can_follow_up:!1,has_messages:!1,reference_url:"",src_description:"",status:"hot",smsCount:8,emailCount:16,rent:2e3,mortgageRate:16500,income:2e4,purchasePrice:18e4,stats:{messages:[],messageCount:8,emails:[],emailCount:16,cals:[],callCount:8},ad_details:{rent:"$2,000",mortgage_rate:"$16,500",income:"$20,000",purchase_price:"$180,000"},tags:["Hot"]},{id:0,src:"facebook Ads",src_date:"Mar 11, 2023",src_time:"04:00pm",name:"Lead Name Here.",email:"[email protected]",phone:"123-4567",message:"Hey Laura. Hope you are doing well. Watch this video on Explori...",created_at:"2023-01-03 00:59:33",reference:null,follow_up:!0,user_id:0,buyer_id:0,follow_up_state:"hot-lead",follow_up_stage:null,can_follow_up:!1,has_messages:!1,reference_url:"",src_description:"Get A List of Townhouses",status:"hot",smsCount:8,emailCount:16,rent:null,mortgageRate:null,income:null,purchasePrice:null,stats:{messages:[],messageCount:8,emails:[],emailCount:16,cals:[],callCount:8},ad_details:{rent:"$2,000",mortgage_rate:"$16,500",income:"$20,000",purchase_price:"$180,000"},tags:["Fresh"]}],y=(0,b.v9)(M.S8),N=(0,b.v9)(M.ns),[C,T]=(0,c.useState)(null===(a=y.auto_leads_followup)||void 0===a||a),[R,A]=(0,c.useState)([]),[F,G]=(0,c.useState)(!1),q=(0,b.I0)(),[Y,K]=(0,c.useState)(!1),[Q,$]=(0,c.useState)(!1),[ee,ea]=(0,c.useState)(void 0),[el,es]=(0,c.useState)([]),[en]=(0,c.useState)("desc"),[et,ei]=(0,c.useState)(!1),[eo,er]=(0,c.useState)(!1),[ed,ec]=(0,c.useState)(!1),[eu,em]=(0,c.useState)(!1),[ep,eh]=(0,c.useState)(!1),[e_,eg]=(0,c.useState)(0),ev=(0,Z.d)(),ej=e=>"home afford"===e?"Homes I Can Afford":e?e.charAt(0).toUpperCase()+e.slice(1):e,ef=el.length>0;(0,c.useEffect)(()=>{K(!0),ey().then(()=>{K(!1)})},[]);let ey=async()=>{ea(await (0,S.ev)(1,100))},eb=()=>null==ee?void 0:ee.filter(e=>(null==e?void 0:e.status)==="ACTIVE").map(e=>({value:e.id,label:"".concat(e.name," ").concat(e.user_id?"":"- Default Journey")})),ew=e=>{navigator.clipboard.writeText(e).then(()=>{(0,f.t5)("Copied to clipboard")}).catch(e=>{(0,f.t5)("Failed to copy text:",e)})};l=ev?[]:[{dataIndex:["name"],key:"name",className:"info_td",onCell:(e,a)=>({rowSpan:0==a?2:0}),render:(e,a,l)=>0===l?(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(ez().sampleRow),children:"Sample data"})}):null},{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(en)),children:"Name"}),dataIndex:["name"],key:"name",className:"info_td",width:170,render:e=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(ez().leadInfo),children:(0,o.jsx)("div",{className:(0,j.W)(ez().info),children:(0,o.jsx)("span",{className:(0,j.W)(ez().name),children:e})})})})},{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(en)),children:"Status"}),dataIndex:["follow_up_state"],key:"follow_up_state",className:"info_td",width:120,render:(e,a)=>{var l,s;return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(ez().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(ez().info),children:[(null==a?void 0:null===(l=a.tags)||void 0===l?void 0:l.length)>0&&(null==a?void 0:a.tags.includes("Hot"))&&(0,o.jsx)("span",{className:(0,j.W)(ez().statusTag,ez().hot),children:"Hot"}),(null==a?void 0:null===(s=a.tags)||void 0===s?void 0:s.length)>0&&(null==a?void 0:a.tags.includes("Fresh"))&&(0,o.jsx)("span",{className:(0,j.W)(ez().statusTag,ez().nurturing),children:"Fresh"})]})})})}},{title:(0,o.jsx)("div",{className:(0,j.W)("date-header ".concat(en),ez().columnHeader),children:"contact"}),dataIndex:["phone","email"],key:"email",className:"info_td",render:(e,a,l)=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:(0,j.W)(ez().leadInfo),children:(0,o.jsxs)("div",{className:(0,j.W)(ez().info),children:[(0,o.jsxs)("span",{className:(0,j.W)(ez().email),children:[null==a?void 0:a.email," ",(0,o.jsx)(x.J,{name:"copy-01",onClick:()=>{var e;return ew(null!==(e=null==a?void 0:a.email)&&void 0!==e?e:"")}})]}),(0,o.jsxs)("span",{className:(0,j.W)(ez().phone),children:[null==a?void 0:a.phone,(0,o.jsx)(x.J,{name:"copy-01",onClick:()=>{var e;return ew(null!==(e=null==a?void 0:a.phone)&&void 0!==e?e:"")}})]})]})})})},{title:(0,o.jsx)("div",{className:(0,j.W)(ez().columnHeader),children:"Source"}),width:250,minWidth:250,onFilter:(e,a)=>0===a.src.indexOf(e),sorter:(e,a)=>(0,ex.default)(e.created_at).unix()-(0,ex.default)(a.created_at).unix(),dataIndex:["src","created_at"],key:"src",className:"src_td",render:(e,a)=>{var l,s;return(0,o.jsxs)("div",{className:(0,j.W)(ez().leadSource),children:[(0,o.jsx)("span",{className:(0,j.W)(ez().source),children:ej(null==a?void 0:a.src)}),(0,o.jsx)("br",{}),null==a?void 0:a.src_description,!!a.src_description&&(0,o.jsx)("br",{}),new Date(null!==(l=null==a?void 0:a.src_date)&&void 0!==l?l:null==a?void 0:a.created_at).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"}),(0,o.jsx)("br",{}),new Date(null!==(s=null==a?void 0:a.src_date)&&void 0!==s?s:null==a?void 0:a.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})}},{title:(0,o.jsx)("div",{className:(0,j.W)("stat-header ".concat(en),ez().columnHeader),children:"Follow-up"}),dataIndex:"stats",key:"stat",className:"stat_td",width:100,minWidth:100,sortDirections:["ascend","descend","ascend"],sortOrder:"asc"===en?"ascend":"descend",render:(e,a)=>{var l,s;return(0,o.jsx)("div",{className:(0,j.W)(ez().leadStats),children:(0,o.jsxs)("div",{className:(0,j.W)(ez().stats),children:[(0,o.jsxs)("div",{className:(0,j.W)(ez().message),onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().iconWrapper),children:(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(ez().count),children:null!==(l=null==a?void 0:a.smsCount)&&void 0!==l?l:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(ez().email),onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().iconWrapper),children:(0,o.jsx)(x.J,{name:"mail-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(ez().count),children:null!==(s=null==a?void 0:a.emailCount)&&void 0!==s?s:0})]}),(0,o.jsx)("div",{className:(0,j.W)(ez().call),onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:(0,o.jsx)("div",{className:(0,j.W)(ez().iconWrapper),children:(0,o.jsx)(x.J,{name:"phone",fontSize:16})})})]})})}},{title:(0,o.jsx)("div",{className:(0,j.W)(ez().columnHeader),children:"Message"}),dataIndex:"message",key:"details",className:"details_td",render:(e,a)=>(0,o.jsxs)("div",{className:ez().leadMessage,children:[(0,o.jsxs)("div",{className:ez().messageWrapper,children:[(0,o.jsxs)("div",{className:ez().row,children:[(null==a?void 0:a.rent)&&(0,o.jsxs)("div",{className:ez().column,children:[(0,o.jsx)("span",{className:(0,j.W)(ez().columnTitle),children:"Rent:"}),(0,o.jsxs)("span",{className:(0,j.W)(ez().columnValue),children:["$",a.rent.toLocaleStr
1ing()]})]}),(null==a?void 0:a.mortgageRate)&&(0,o.jsxs)("div",{className:ez().column,children:[(0,o.jsx)("span",{className:(0,j.W)(ez().columnTitle),children:"Mortgage Rate:"}),(0,o.jsxs)("span",{className:(0,j.W)(ez().columnValue),children:["$",a.mortgageRate.toLocaleString()]})]})]}),(0,o.jsxs)("div",{className:ez().row,children:[(null==a?void 0:a.income)&&(0,o.jsxs)("div",{className:ez().column,children:[(0,o.jsx)("span",{className:(0,j.W)(ez().columnTitle),children:"Savings:"}),(0,o.jsxs)("span",{className:(0,j.W)(ez().columnValue),children:["$",a.income.toLocaleString()]})]}),(null==a?void 0:a.purchasePrice)&&(0,o.jsxs)("div",{className:ez().column,children:[(0,o.jsx)("span",{className:(0,j.W)(ez().columnTitle),children:"Purchase Price:"}),(0,o.jsxs)("span",{className:(0,j.W)(ez().columnValue),children:["$",a.purchasePrice.toLocaleString()]})]})]}),(0,o.jsx)("div",{className:ez().row,children:(null==a?void 0:a.message)&&(0,o.jsxs)("span",{className:ez().lastMessage,children:[(0,o.jsx)("b",{children:"Last Message: "}),(0,o.jsx)(D.Z,{placement:"left",title:a.message,children:a.message})]})})]}),(0,o.jsx)("div",{className:ez().buttonWrapper,children:(0,o.jsx)("div",{className:ez().row,children:(0,o.jsx)(v.z,{className:(0,j.W)(ez().noPadding),color:"tertiary-gray",onClick:()=>(0,f.t5)("This action became available when you get a lead"),startIcon:"message-text-square-01",children:(0,o.jsx)("span",{children:"View Messages"})})})})]})},{title:(0,o.jsx)("div",{className:(0,j.W)(ez().columnHeader),children:" "}),dataIndex:"id",key:"action",width:100,minWidth:100,className:"actions_td",render:(e,a)=>{var l,s;return(0,o.jsxs)("div",{className:(0,j.W)(ez().leadAction),children:[(0,o.jsx)(g.Z,{className:(0,j.W)(ez().notePopOver),trigger:"hover",getPopupContainer:e=>e.parentElement,content:(0,o.jsx)("div",{className:(0,j.W)(ez().filtersList),children:(0,o.jsx)(I.default,{rows:3,style:{width:300},name:"leads-note-"+(null==a?void 0:a.id),placeholder:"Note",defaultValue:null!==(s=null==a?void 0:null===(l=a.note)||void 0===l?void 0:l.description)&&void 0!==s?s:"",onChange:()=>(0,f.t5)("This action became available when you get a lead"),required:!0})}),placement:"topLeft",children:(0,o.jsx)(x.J,{name:"file-plus-02",fontSize:20})},"note_popover"+(null==a?void 0:a.id)),(0,o.jsx)(L.default,{overlay:(0,o.jsxs)(_.default,{children:[(0,o.jsxs)(_.default.Item,{onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:[(0,o.jsx)(x.J,{name:"lock-unlocked-01"})," Stop auto follow-up"]},"0"),(0,o.jsxs)(_.default.Item,{onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:[(0,o.jsx)(x.J,{name:"trash-01"})," Delete"]},"1")]}),children:(0,o.jsx)("a",{children:(0,o.jsx)(x.J,{name:"dots-vertical",fontSize:20})})})]})}}],ev||l.splice(5,0,{title:(0,o.jsx)("div",{className:(0,j.W)("journey",ez().columnHeader,ez().columnHeaderJourney),children:"Enrolled journey"}),dataIndex:"journey",key:"journey",className:"journey_td",width:200,minWidth:200,render:(e,a,l)=>{var s,n;return(0,o.jsx)("div",{className:(0,j.W)(ez().leadStats),children:(0,o.jsx)("div",{className:(0,j.W)(ez().stats),children:(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(W.default,{showSearch:!0,id:"assign_journey_".concat(l),onChange:()=>(0,f.t5)("This action became available when you get a lead"),defaultValue:{value:null==ee?void 0:null===(s=ee[0])||void 0===s?void 0:s.id,label:null==ee?void 0:null===(n=ee[0])||void 0===n?void 0:n.name},placeholder:"Please select a journey",className:(0,j.W)(B()["rv-input-small"],"templateSelector"),"aria-required":!0,filterOption:(e,a)=>{var l;return(null!==(l=String(null==a?void 0:a.label))&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())},disabled:ef,options:eb()})})})})}});let eL=()=>{q((0,w.Zl)())},eN=e=>{A(e),console.log("Auto follow-up options changed:",e)},eC=()=>{(0,f.cB)("AI Caller for leads is exclusively available to Platinum and Diamond Agents."),window.setTimeout(()=>{q((0,w.Sh)({selectedPlan:V.q.platinum,introType:U.zd.General,source:"leads-list",trigger:"ai-caller-follow-up"}))},700)},eS=(e,a)=>{if("ai_caller"===e&&a&&!N){eC();return}a?eN([...R,e]):eN(R.filter(a=>a!==e))},eW=()=>{$(!0),C?q((0,w.dL)("Change Setting","Your leads won't get follow-up messages anymore. Are you sure?",()=>{(0,k.FX)({autoLeadsFollowup:!C}).finally(()=>{(0,f.t5)("Auto follow-up ".concat(C?"disabled":"enabled"," successfully")),T(!C),$(!1)}),q((0,w.Zl)())},()=>{eL(),$(!1)},"Yes","No")):(0,k.FX)({autoLeadsFollowup:!C}).finally(()=>{(0,f.t5)("Auto follow-up ".concat(C?"disabled":"enabled"," successfully")).then(()=>{T(!C),$(!1)})})},eM=()=>{ec(!1)},ek=()=>{em(!1)},eI=()=>eh(!0),eT=()=>eh(!1);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("section",{className:(0,j.W)(ez().leadsListSectionSample),children:[(0,o.jsxs)("div",{className:(0,j.W)(ez().tableHeader),children:[(0,o.jsx)("div",{className:ez().tableHeaderButtons,children:ev?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.z,{color:"secondary-gray",startIcon:"upload-01",onClick:()=>(0,f.t5)("This action became available when you get a lead"),fullWidth:!0,loading:Y||r,disabled:Y||r,children:(0,o.jsx)("span",{children:"Export Leads"})}),(0,o.jsx)(v.z,{color:"secondary-gray",onClick:()=>ec(!0),startIcon:"dots-vertical"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(v.z,{color:"primary",onClick:()=>eI(),disabled:Y||r,loading:Y||r,children:"Try CRM Lead Follow-ups"}
1),(0,o.jsx)(eJ,{onExportListClick:()=>(0,f.t5)("This action became available when you get a lead"),loading:Y||r})]})}),!ev&&(0,o.jsx)("div",{className:ez().tableHeaderMore,children:(0,o.jsx)("div",{className:(0,j.W)(ez().rightSide),children:(0,o.jsx)(g.Z,{trigger:"click",placement:"bottomRight",content:(0,o.jsxs)("div",{className:ez().followUpPopoverContent,children:[(0,o.jsx)("div",{className:ez().followUpPopoverTitle,children:"Follow-up Options"}),(0,o.jsxs)("div",{className:ez().followUpOptionsContainer,children:[(0,o.jsxs)("label",{className:ez().followUpOptionLabel,children:[(0,o.jsx)(X.X,{id:"sample-email-sms-checkbox",checked:null==R?void 0:R.includes("email_sms"),onChange:e=>eS("email_sms",e.target.checked)}),"Email & SMS"]}),(0,o.jsxs)("label",{className:ez().followUpOptionLabel,children:[(0,o.jsx)(X.X,{id:"sample-ai-caller-checkbox",checked:null==R?void 0:R.includes("ai_caller"),onChange:e=>eS("ai_caller",e.target.checked)}),"AI Caller"]})]})]}),children:(0,o.jsx)(v.z,{color:"secondary-gray",startIcon:"settings-01",loading:Q,disabled:Q,children:0===R.length?"Auto Follow-up":2===R.length?"Auto Follow-up (All)":"Auto Follow-up (1)"})})})})]}),(0,o.jsx)("div",{className:(0,j.W)(ez().listHolder),children:(0,o.jsxs)(h.Z,{active:!0,loading:Y,children:[ev?(0,o.jsxs)("div",{className:(0,j.W)(ez().leadsTableMobile),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().sampleHeader),children:(0,o.jsx)("span",{children:"Sample Lead"})}),m.map((e,a)=>{var l,s,n,t,i,r,d,c;return(0,o.jsxs)("div",{className:(0,j.W)(ez().leadContainer),children:[(0,o.jsxs)("div",{className:(0,j.W)(ez().nameSection),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().nameWrapper),children:e.name}),(0,o.jsxs)("div",{className:(0,j.W)(ez().dataWrapper),children:[(0,o.jsxs)("div",{className:(0,j.W)(ez().badgeWrapper),children:[(null==e?void 0:null===(l=e.tags)||void 0===l?void 0:l.length)>0&&(null==e?void 0:e.tags.includes("Hot"))&&(0,o.jsx)("span",{className:(0,j.W)(ez().statusTag,ez().hot)}),(null==e?void 0:null===(s=e.tags)||void 0===s?void 0:s.length)>0&&(null==e?void 0:e.tags.includes("Fresh"))&&(0,o.jsx)("span",{className:(0,j.W)(ez().statusTag,ez().nurturing)})]}),(0,o.jsxs)("div",{className:(0,j.W)(ez().statWrapper),children:[(0,o.jsxs)("div",{className:(0,j.W)(ez().message),onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().iconWrapper),children:(0,o.jsx)(x.J,{name:"message-text-square-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(ez().count),children:null!==(i=null==e?void 0:e.smsCount)&&void 0!==i?i:0})]}),(0,o.jsxs)("div",{className:(0,j.W)(ez().email),onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().iconWrapper),children:(0,o.jsx)(x.J,{name:"mail-01",fontSize:16})}),(0,o.jsx)("span",{className:(0,j.W)(ez().count),children:null!==(r=null==e?void 0:e.emailCount)&&void 0!==r?r:0})]}),(0,o.jsx)("div",{className:(0,j.W)(ez().call),onClick:()=>(0,f.t5)("This action became available when you get a lead"),children:(0,o.jsx)("div",{className:(0,j.W)(ez().iconWrapper),children:(0,o.jsx)(x.J,{name:"phone",fontSize:16})})})]}),(0,o.jsx)("div",{className:(0,j.W)(ez().collapseWrapper),onClick:()=>{e_!=a?eg(a):eg(void 0)},children:(0,o.jsx)(x.J,{name:e_==a?"chevron-up":"chevron-down",fontSize:20})})]})]}),e_==a&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:(0,j.W)(ez().contactSection),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().headWrapper),children:"Contact"}),(0,o.jsx)("div",{className:(0,j.W)(ez().dataWrapper),children:(0,o.jsxs)("span",{className:(0,j.W)(ez().email),children:[null==e?void 0:e.email," ",null==e?void 0:e.phone]})})]}),(0,o.jsxs)("div",{className:(0,j.W)(ez().sourceSection),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().headWrapper),children:"Source"}),(0,o.jsx)("div",{className:(0,j.W)(ez().leadSource),children:(0,o.jsxs)("span",{className:(0,j.W)(ez().source),children:[ej(null==e?void 0:e.src)," ",null==e?void 0:e.src_description,new Date(null!==(d=null==e?void 0:e.src_date)&&void 0!==d?d:null==e?void 0:e.created_at).toLocaleDateString("en-US",{month:"short",day:"2-digit",year:"numeric"})," ",new Date(null!==(c=null==e?void 0:e.src_date)&&void 0!==c?c:null==e?void 0:e.created_at).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})]})})]}),(0,o.jsxs)("div",{className:(0,j.W)(ez().journeySection),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().headWrapper),children:"Journey"}),(0,o.jsx)("div",{className:(0,j.W)(ez().dataWrapper),children:(0,o.jsx)(W.default,{showSearch:!0,id:"assign_journey_".concat(a),onChange:()=>(0,f.t5)("This action became available when you get a lead"),defaultValue:{value:null==ee?void 0:null===(n=ee[0])||void 0===n?void 0:n.id,label:null==ee?void 0:null===(t=ee[0])||void 0===t?void 0:t.name},placeholder:"Please select a journey",className:(0,j.W)(B()["rv-input-small"],"templateSelector"),"aria-required":!0,filterOption:(e,a)=>{var l;return(null!==(l=String(null==a?void 0:a.label))&&void 0!==l?l:"").toLowerCase().includes(e.toLowerCase())},disabled:ef,options:eb()})})]}),(0,o.jsxs)("div",{className:(0,j.W)(ez().messageSection),children:[(0,o.jsx)("div",{className:(0,j.W)(ez().headWrapper),children:"Message"}),(0,o.jsx)("div",{className:(0,j.W)(ez().dataWrapper),children:(0,o.jsx)(v.z,{className:(0,j.W)(ez().noPadding),color:"tertiary-gray",onClick:()=>(0,f.t5)("This action became available when you get a lead"),startIcon:"message-text-square-01",children:(0,o.jsx)("span",{children:"View Messages"})})})]})]})]},"lead-"+a)})]}):(0,o.jsxs)("div",{className:(0,j.W)(ez().sampleLeadsTable),children:[Y&&(0,o.jsx)(J.default,{}),(0,o.jsx)(p.Z,{className:(0,j.W)(ez().dataTable),showSorterTooltip:!1,columns:l,dataSource:m,pagination:{position:["bottomCenter"],pageSize:u,total:t,current:null!=d?d:1,hideOnSinglePage:!0,pageSizeOptions:[5,10,20,50]},rowKey:e=>null==e?void 0:e.id}),!ev&&(0,o.jsxs)("div",{className:(0,j.W)(ez().sampleDataCaution),children:[(0,o.jsx)(x.J,{name:"info-circle"}
1)," These are sample leads about how its works!"]}),s>0&&(0,o.jsx)(v.z,{color:"secondary",className:(0,j.W)(ez().shoDeletedLeadsButton),onClick:()=>{n(!0)},disabled:Y||r,loading:Y||r,children:(0,o.jsx)("span",{children:"Show Deleted leads"})})]}),(0,o.jsx)(O.Z,{open:ed,onClose:eM,classes:{body:ez().drawerContainer},children:(0,o.jsx)(z,{saving:Q,onClose:eM,autoFL:C,handleChangeAutoFollowupSetting:eW,setIsModalVisible:em,aiCallerEnabled:F,aiCallerLoading:!1,onAiCallerChange:e=>{if(e&&!N){eC();return}G(e),(0,f.t5)("AI Caller ".concat(e?"enabled":"disabled"," (Sample)"))},onOpenFollowUpSettings:()=>{(0,f.t5)("Follow-up settings opened (Sample)")},isPlatinumOrHigherUser:N})}),(0,o.jsx)(E.default,{open:eu,footer:null,title:null,onCancel:ek,children:(0,o.jsx)(P,{onClose:ek,saving:Q,autoFL:C,handleChangeAutoFollowupSetting:eW,setIsModalVisible:em})}),(0,o.jsx)(E.default,{open:ep,footer:null,title:null,onCancel:eT,width:800,children:(0,o.jsx)(H.default,{onClose:eT})})]})})]})})}(n=i||(i={})).ImportLeads="import-leads",n.ExportLeads="export-leads",n.GetLeadsCrm="get-leads-crm",n.JourneyBuilder="journey-builder",n.DeleteAll="delete-all-leads";var eV=l(237945),eZ=l(267474),eG=l(394716),eq=l(30355),eY=l(904054);let eK=d()(()=>Promise.all([l.e(14387),l.e(46114)]).then(l.bind(l,682871)),{loadableGenerated:{webpack:()=>[682871]}}),eX=d()(()=>Promise.all([l.e(33200),l.e(70473),l.e(1446)]).then(l.bind(l,470473)),{loadableGenerated:{webpack:()=>[470473]},ssr:!1,loading:()=>(0,o.jsx)("div",{className:m().loadMore,children:"Loading..."})}),eQ=d()(()=>Promise.all([l.e(94763),l.e(1512)]).then(l.bind(l,1512)),{loadableGenerated:{webpack:()=>[1512]},ssr:!1,loading:()=>(0,o.jsx)("div",{className:m().loadMore,children:"Loading..."})});function e$(){let[e,a]=(0,c.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:m().similarListingsBanner,children:(0,o.jsxs)("div",{className:m().similarListingsBannerContent,children:[(0,o.jsx)("h2",{children:"Send similar listings to your leads"}),(0,o.jsx)("p",{children:"Automatically share relevant properties nearby so your leads stay engaged."}),(0,o.jsxs)("div",{className:m().leadInfoCardTags,children:[(0,o.jsx)("span",{children:"Matched by area"}),(0,o.jsx)("span",{children:"Matched by price"})]}),(0,o.jsxs)("button",{className:m().similarListingsBannerButton,type:"button",onClick:()=>a(!0),children:["How it Works",(0,o.jsx)(x.J,{name:"arrow-right",fontSize:20})]})]})}),(0,o.jsxs)(eG.Z,{open:e,onClose:()=>a(!1),closeOnOverlayClick:!0,hiddenHeader:!0,classes:{root:m().similarListingsPopupRoot,popup:m().similarListingsPopup,body:m().similarListingsPopupBody},children:[(0,o.jsx)("button",{className:m().similarListingsPopupClose,type:"button",onClick:()=>a(!1),"aria-label":"Close",children:(0,o.jsx)(x.J,{name:"x-close",fontSize:18})}),(0,o.jsxs)("div",{className:m().similarListingsPopupHeader,children:[(0,o.jsx)("div",{className:m().similarListingsPopupIcon,children:(0,o.jsx)(x.J,{name:"mail-01",fontSize:18})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{children:"Roomvu keeps your leads engaged"}),(0,o.jsx)("p",{children:"We include relevant listings in follow-up messages! Matching Buyers with homes similar to their search and Sellers with listings similar to their property."})]})]}),(0,o.jsxs)("div",{className:m().similarListingsEmailPreview,children:[(0,o.jsxs)("div",{className:m().similarListingsEmailTop,children:[(0,o.jsxs)("span",{children:[(0,o.jsx)(x.J,{name:"mail-01",fontSize:13}),"Sent automatically by Roomvu"]}),(0,o.jsx)("strong",{children:"SAMPLE EMAIL"})]}),(0,o.jsx)("div",{className:m().similarListingsEmailGreeting,children:"Hi John,"}),(0,o.jsx)("div",{className:m().similarListingsEmailText,children:"Here are a few similar homes you may like."}),[615e3,675e3,625e3].map((e,a)=>(0,o.jsxs)("div",{className:m().similarListingsEmailRow,children:[(0,o.jsx)("div",{className:(0,j.W)(m().similarListingsEmailPhoto,m()["similarListingsEmailPhoto".concat(a+1)])}),(0,o.jsxs)("div",{className:m().similarListingsEmailLines,children:[(0,o.jsx)("span",{}),(0,o.jsx)("em",{})]}
1),(0,o.jsxs)("strong",{children:["$",e.toLocaleString()]})]},"similar-email-row-".concat(e)))]}),(0,o.jsxs)("div",{className:m().similarListingsPopupFooter,children:["To see what your leads might receive, click"," ",(0,o.jsx)("span",{children:"âView Messagesâ"})," next to each lead."]})]})]})}function e0(){let[e,a]=(0,c.useState)(!1);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:m().leadInfoCard,children:[(0,o.jsx)("h2",{children:"What each lead gets"}),(0,o.jsx)("p",{children:"Every new lead enters a follow-up journey automatically. Roomvu emails, texts and calls on your behalf."}),(0,o.jsxs)("div",{className:m().leadInfoCardTags,children:[(0,o.jsx)("span",{children:"Email all"}),(0,o.jsx)("span",{children:"Text \xb7 not imports"}),(0,o.jsx)("span",{children:"AI caller \xb7 not imports"})]}),(0,o.jsxs)("button",{className:m().leadInfoCardButton,type:"button",onClick:()=>a(!0),children:["See rules",(0,o.jsx)(x.J,{name:"arrow-right",fontSize:18})]})]}),(0,o.jsxs)(eG.Z,{open:e,onClose:()=>a(!1),closeOnOverlayClick:!0,hiddenHeader:!0,classes:{root:m().followUpRulesPopupRoot,popup:m().followUpRulesPopup,body:m().followUpRulesPopupBody},children:[(0,o.jsx)("h2",{children:"Follow-up rules"}),(0,o.jsxs)("div",{className:m().followUpRulesList,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:m().followUpRulesTagSuccess,children:"Email"}),(0,o.jsx)("p",{children:"Every lead."})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:m().followUpRulesTagSuccess,children:"Text"}),(0,o.jsx)("p",{children:"Roomvu forms, ads and integrations. Not manual imports."})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:m().followUpRulesTagWarning,children:"AI caller"}),(0,o.jsx)("p",{children:"Same leads with a phone number, on Brand Builder and above."})]})]}),(0,o.jsx)("button",{className:m().followUpRulesButton,type:"button",onClick:()=>a(!1),children:"Got it"})]})]})}function e1(){let e=(0,b.I0)(),a=(0,b.v9)(M.S8),l=(0,ev.hi)(null==a?void 0:a.user_type_id),s="roomvu_sales"===l,n=["individual_agent","broker","commercial_agent"].includes(l),[t,i]=(0,c.useState)(!1),[r,d]=(0,c.useState)([]),[u,p]=(0,c.useState)([]),[h,_]=(0,c.useState)([]),[g,v]=(0,c.useState)([]),[L,C]=(0,c.useState)([]),[W,k]=(0,c.useState)("created_at"),[I,T]=(0,c.useState)("desc"),[B,R]=(0,c.useState)([]),[E,A]=(0,c.useState)([]),[F,P]=(0,c.useState)(!0),[z,D]=(0,c.useState)(0),[H,O]=(0,c.useState)(0),[U,V]=(0,c.useState)(null),[G,q]=(0,c.useState)(1),[Y,K]=(0,c.useState)(10),[X,Q]=(0,c.useState)(1),[$,ee]=(0,c.useState)(10),[ea,el]=(0,c.useState)("desc"),[es,en]=(0,c.useState)(!1),[et,ei]=(0,c.useState)(!1),[eo,er]=(0,c.useState)(!1),[ed]=(0,c.useState)(void 0),[ec,eu]=(0,c.useState)(null),[em,ep]=(0,c.useState)({hot_leads:0,needs_call:0,today_calls:0,tomorrow_calls:0,due_calls:0,total:0,today:0,tomorrow:0,this_week:0}),eh=(0,Z.d)();(0,eq._)({popup:eY.uY.LEADS_OVERVIEW,onMatch:()=>{let e=document.querySelector('[data-popup-deep-link="leads-overview"]');null==e||e.scrollIntoView({behavior:"smooth",block:"start"})}}),(0,eq._)({popup:eY.uY.IMPORT_LEADS,onMatch:()=>{e((0,w.YJ)("crm-upload-csv-popup"))}});let e_=()=>{if(F){(0,f.QD)("You need to upgrade first.");return}(async()=>{try{en(!0);let e=await (0,y.Xt)("/leads/export",{filter:null!=U?U:"",sort:null!=W?W:"created_at",sort_direction:null!=I?I:"desc",sources:null!=h?h:[],states:null!=g?g:[],tags:null!=L?L:[],fromDate:void 0});eg((0,eZ.kT)()+"/temp/"+e.data.data)}catch(e){(0,f.cB)("Failed to export leads list")}})().finally(()=>{en(!1)}),N.AnalyticApis.gaEvent("export_leads_clicked",{page_location:window.location.pathname,page_name:"leads-management",is_mobile:eh})},eg=e=>{if(e){let a=document.createElement("a");a.href=e,a.setAttribute("download","roomvu-leads-export.csv"),a.click()}},ej=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:G,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:U,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"created_at",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"desc",t=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:h,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:g,r=arguments.length>8&&void 0!==arguments[8]?arguments[8]:L,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:ec;switch(en(!et),P(!1),t){case"today":t=(0,ex.default)().startOf("day").format();break;case"yesterday":t=(0,ex.default)().startOf("day").subtract(1,"days").format();break;case"3days":t=(0,ex.default)().startOf("day").subtract(3,"days").format();break;case"last-month":t=(0,ex.default)().startOf("day").subtract(30,"days").format()}try{let u=await (0,y.Xt)("/leads/list",{page:e,limit:a,filter:l,sort:s,sort_direction:n,sources:i,tags:r,fromDate:t,salesReminderFilter:null!=c?c:void 0});u.data.total>0||i.length||U||o.length||r.length||l||c?(P(!1),d(u.data.data),R(u.data.sources_filter),D(u.data.total)):P(!0),en(!1)}catch(e){(0,f.cB)("Failed to fetch data")}},ey=e=>{let a=ec===e?null:e;eu(a),q(1),ej(1,Y,U,W,I,ed,h,g,L,a)},eb=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:X,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:U,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"created_at",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:ea,t=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:h,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:g;switch(en(!et),t){case"today":t=(0,ex.default)().startOf("day").format();break;case"yesterday":t=(0,ex.default)().startOf("day").subtract(1,"days").format();break;case"3days":t=(0,ex.default)().startOf("day").subtract(3,"days").format();break;case"last-month":t=(0,ex.default)().startOf("day").subtract(30,"days").format()}try{let r=await (0,y.Xt)("/leads/deletedList",{page:e,limit:a,filter:l,sort:s,sort_direction:n,sources:i,states:o,fromDate:t});r.data.total>0?(p(r.data.data),O(r.data.total)):(p([]),O(0)),en(!1)}catch(e){(0,f.cB)("Failed to fetch data")}},ew=async()=>
1{if(!s)return;let e=await (0,S.AU)();e.success&&ep(e.data)};(0,c.useEffect)(()=>{(async()=>{try{let e=await (0,S.df)();if(e.success&&e.data){let a=e.data.map(e=>({value:e.name,label:e.name}));A(a)}}catch(e){console.error("Failed to fetch available tags:",e)}})(),ej(),eb()},[]),(0,c.useEffect)(()=>{ew()},[s]),(0,c.useEffect)(()=>{i(!0)},[]);let eL=(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:eh?m().dashboardMobile:m().dashboardDesktop,children:[!eo&&(0,o.jsxs)("div",{className:(0,j.W)(m().leadManagementHeader),"data-popup-deep-link":"leads-overview",children:[!eh&&(0,o.jsxs)("div",{className:m().topBannerSection,children:[(0,o.jsx)(e0,{}),n&&(0,o.jsx)(eM,{}),n&&(0,o.jsx)(e$,{})]}),(0,o.jsxs)("div",{className:m().titleAndSummarySection,children:[(0,o.jsxs)("div",{className:(0,j.W)(m().titleSection),children:[(0,o.jsx)(eI,{totalLeadsCount:z,useSampleData:F,setSearch:e=>{ei(!0),V(e),ej(G,Y,e,W,I,ed,h,g,L,ec).then(()=>{ei(!1)})},availableTags:E,selectedTags:L,onTagsChange:e=>{let a=Array.isArray(e)?e:[];C(a),ej(G,Y,U,W,I,ed,h,g,a)}}),F&&(0,o.jsx)(eE,{})]}),s&&(0,o.jsxs)("div",{className:m().salesReminderSummaryCard,children:[(0,o.jsxs)("div",{className:m().summaryCardHeader,children:[(0,o.jsx)("div",{className:m().summaryCardTitle,children:"Your action plan"}),(0,o.jsxs)("div",{className:(0,j.W)(m().summaryCardBadge,"needs-call"===ec&&m().summaryCardBadgeActive),role:"button",tabIndex:0,onClick:()=>ey("needs-call"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ey("needs-call"))},children:[em.needs_call," pending"]})]}),(0,o.jsxs)("div",{className:m().summaryCardActionGrid,children:[(0,o.jsxs)("div",{className:(0,j.W)(m().summaryCardItem,m().summaryCardItemClickable,m().summaryCardHotItem,"hot"===ec&&m().summaryCardItemActive),role:"button",tabIndex:0,onClick:()=>ey("hot"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ey("hot"))},children:[(0,o.jsx)("span",{children:"Hot Leads"}),(0,o.jsx)("strong",{children:em.hot_leads}),(0,o.jsx)("div",{className:m().summaryCardSubtleText,children:"Follow up now"})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().summaryCardItem,m().summaryCardCallsItem),children:[(0,o.jsxs)("div",{className:m().summaryCallsHeader,children:[(0,o.jsx)(x.J,{name:"calendar",fontSize:16}),(0,o.jsx)("span",{children:"Calls To Make"})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().summaryCallRow,m().summaryCardItemClickable,"today-calls"===ec&&m().summaryCardItemActive),role:"button",tabIndex:0,onClick:()=>ey("today-calls"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ey("today-calls"))},children:[(0,o.jsx)("span",{children:"Today"}),(0,o.jsx)("strong",{children:em.today_calls})]}),(0,o.jsxs)("div",{className:(0,j.W)(m().summaryCallRow,m().summaryCardItemClickable,"due-calls"===ec&&m().summaryCardItemActive),role:"button",tabIndex:0,onClick:()=>ey("due-calls"),onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ey("due-calls"))},children:[(0,o.jsxs)("div",{className:m().summaryCallDueLabel,children:[(0,o.jsx)("span",{children:"Due"}),(0,o.jsx)("small",{children:"Today + overdue"})]}),(0,o.jsx)("strong",{children:em.due_calls})]})]})]})]})]})]}),es&&(0,o.jsx)(J.default,{}),et&&(0,o.jsx)(eA.default,{className:m().loader}),F&&!eo&&(0,o.jsx)(eU,{deletedLeadsCount:null==u?void 0:u.length,setShowDeletedLeads:er,total:2,exportList:e_,loading:es,selectedPage:G,limit:10}),!eo&&!F&&(0,o.jsx)(ef,{leads:r,availableSources:B,getCaptureLeads:ej,setShowDeletedLeads:er,deletedLeadsCount:null==u?void 0:u.length,sortChange:k,selectedSourcesChange:_,selectedStatesChange:v,selectedTagsChange:C,pageChange:e=>{q(e.current),K(e.pageSize)},exportList:e_,total:z,loading:es,selectedPage:G,limit:Y,searchPhrase:U,onSalesReminderCreated:ew}),!!u.length&&eo&&(0,o.jsx)(eF,{deletedLeads:!es&&u,getDeletedLeads:eb,setShowDeletedLeads:er,availableSources:B,selectedSourcesChange:_,selectedStatesChange:v,sortChange:el,pageChange:e=>{Q(e.current),ee(e.pageSize)},total:H,selectedPage:X,limit:$}),!eo&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:(0,j.W)(m().leadManagementFooter,F&&m().leadManagementHeaderSample),children:[F&&eh&&(0,o.jsx)("div",{className:(0,j.W)(m().howItWorksSectionSample),children:(0,o.jsx)(eM,{})}),!F&&!eh&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:(0,j.W)(m().howItWorksSection),"data-popup-deep-link":"leads-overview",children:(0,o.jsx)(eN,{})}),(0,o.jsx)("div",{className:(0,j.W)(m().callFollowUpSection),children:(0,o.jsx)(eB,{})})]})]})}),(0,o.jsx)(eK,{source:"leads-list"})]})});return(0,o.jsxs)(o.Fragment,{children:[t?eh?(0,o.jsx)(eQ,{children:eL}):(0,o.jsx)(eX,{minimize:!0,currentPath:eR.Z5.leadsList(),children:eL}
1):(0,o.jsx)("div",{className:m().loadMore,children:"Loading..."}),(0,o.jsx)(eV.Z,{})]})}e1.withIntercomChatBot=!0,e1.pageName="leads-management",e1.isDashboard=!0;var e5=!0,e3=e1},204799:function(e,a,l){"use strict";l.r(a);var s=l(511527);l(50959);var n=l(571222),t=l.n(n),i=l(288781);a.default=e=>{let{onClose:a}=e;return(0,s.jsx)("div",{className:t().modalContent,children:(0,s.jsx)("div",{className:t().container,children:(0,s.jsx)(i.e,{onClose:a})})})}},700296:function(e,a,l){"use strict";l.d(a,{C:function(){return d}});var s=l(511527),n=l(305341),t=l(911771),i=l.n(t),o=l(45938);let r=l.n(o)()(()=>l.e(36832).then(l.bind(l,536832)),{loadableGenerated:{webpack:()=>[536832]}});function d(e){let{className:a,children:l,size:t="md",type:o="pill-color",color:d="gray",onClose:c,startElement:u,endElement:m}=e,p=null!=c;return(0,s.jsxs)("div",{className:(0,n.W)(i().betaBadge,a,{[i().sm]:"sm"===t,[i().lg]:"lg"===t,[i().pillColor]:"pill-color"===o,[i().pillOutline]:"pill-outline"===o,[i().badgeColor]:"badge-color"===o,[i().badgeModern]:"badge-modern"===o,[i().gray]:"gray"===d,[i().brand]:"brand"===d,[i().error]:"error"===d,[i().warning]:"warning"===d,[i().success]:"success"===d,[i().withStartElement]:null!=u,[i().withEndElement]:null!=m||p}),children:[u,l,p?(0,s.jsx)(r,{className:i().closeButton,onClick:c}):m]})}},173247:function(e,a,l){"use strict";l.d(a,{Z:function(){return u}});var s=l(511527);l(50959);var n=l(30747),t=l.n(n),i=l(45938),o=l.n(i),r=l(305341),d=l(237662);let c=o()(()=>Promise.all([l.e(98956),l.e(14131),l.e(80388),l.e(65952)]).then(l.bind(l,65952)),{loadableGenerated:{webpack:()=>[65952]}});function u(e){let{open:a,onClose:l,children:n,classes:i,hiddenHeader:o,title:u,onBackClick:m,className:p}=e,h=()=>{l()};return(0,s.jsxs)(d.Z,{placement:"bottom",open:a,onClose:h,className:(0,r.W)(t().drawer,p),classNames:{body:(0,r.W)(t().body,null==i?void 0:i.body),header:t().header},styles:{wrapper:{height:"auto"}},children:[!o&&(0,s.jsx)(c,{onClose:h,onBackClick:m,className:null==i?void 0:i.headerRoot,classes:{title:null==i?void 0:i.title,closeButton:null==i?void 0:i.closeButton},children:u}),(0,s.jsx)("div",{className:(0,r.W)(t().container,null==i?void 0:i.contentWrapper),children:n})]})}},28786:function(e,a,l){"use strict";l.d(a,{X:function(){return r}});var s=l(511527),n=l(50959),t=l(305341),i=l(385522),o=l.n(i);function r(e){let{checked:a,onChange:l,size:i="md",className:r,id:d,label:c,secondary:u,classes:m,...p}
1=e,[h,_]=(0,n.useState)(null!=a&&a);return(0,n.useEffect)(()=>{_(a)},[a]),(0,s.jsxs)("label",{htmlFor:d,className:(0,t.W)(r,o().container),children:[(0,s.jsx)("input",{...p,id:d,className:(0,t.W)(o().checkbox,{[o().sm]:"sm"===i},null==m?void 0:m.checkbox),type:"checkbox",checked:h,onChange:e=>{l&&l(e)}}),(c||u)&&(0,s.jsxs)("span",{className:(0,t.W)(o().labelWrapper,{[o().sm]:"sm"===i},null==m?void 0:m.labelWrapper),children:[c&&(0,s.jsx)("span",{className:(0,t.W)(o().label,null==m?void 0:m.label),children:c}),u&&(0,s.jsx)("span",{className:o().secondary,children:u})]})]})}},881879:function(e,a,l){"use strict";l.d(a,{N:function(){return o}});var s=l(511527),n=l(305341),t=l(9198),i=l.n(t);function o(e){let{className:a,disabled:l,fullWidth:t,children:o}=e;return(0,s.jsx)("div",{className:(0,n.W)(i().formControl,{[i().disabled]:l,[i().fullWidth]:t},a),children:o})}},1359:function(e,a,l){"use strict";l.d(a,{_:function(){return m}});var s=l(511527),n=l(50959),t=l(45938),i=l.n(t),o=l(249416),r=l(881879);let d=i()(()=>Promise.all([l.e(73830),l.e(1773)]).then(l.bind(l,701773)).then(e=>e.InputLabel),{loadableGenerated:{webpack:()=>[701773]}}),c=i()(()=>Promise.all([l.e(26584),l.e(16003)]).then(l.bind(l,116003)).then(e=>e.InputHelperText),{loadableGenerated:{webpack:()=>[116003]}}),u=i()(()=>Promise.all([l.e(29376),l.e(33666)]).then(l.bind(l,333666)).then(e=>e.InputWrapper),{loadableGenerated:{webpack:()=>[333666]}}),m=(0,n.forwardRef)((e,a)=>{let{id:l,label:n,helperText:t,innerElements:i,outerElements:m,size:p="md",className:h,error:_,disabled:g,classes:x,fullWidth:v=!0,...j}=e,f=(0,s.jsx)(o.I,{...j,id:l,ref:a,startElement:null==i?void 0:i.start,endElement:null==i?void 0:i.end,classes:x,error:_,disabled:g,size:p,fullWidth:v,hasOuterStartElement:(null==m?void 0:m.start)!=null,hasOuterEndElement:(null==m?void 0:m.end)!=null});return(0,s.jsxs)(r.N,{className:h,disabled:g,fullWidth:v,children:[n&&(0,s.jsx)(d,{htmlFor:l,className:null==x?void 0:x.label,required:j.required,
1children:n}),(null==m?void 0:m.start)!=null||(null==m?void 0:m.end)!=null?(0,s.jsx)(u,{startElement:null==m?void 0:m.start,endElement:null==m?void 0:m.end,size:p,fullWidth:v,classes:{outerElements:null==x?void 0:x.outerElements},children:f}):f,t&&(0,s.jsx)(c,{className:null==x?void 0:x.helperText,error:_,children:t})]})});m.displayName="InnerInput"},249416:function(e,a,l){"use strict";l.d(a,{I:function(){return m}});var s=l(511527),n=l(50959),t=l(305341),i=l(45938),o=l.n(i),r=l(819666),d=l.n(r);let c=o()(()=>l.e(40391).then(l.bind(l,140391)).then(e=>e.Icon),{loadableGenerated:{webpack:()=>[140391]}}),u=o()(()=>Promise.all([l.e(49248),l.e(29825)]).then(l.bind(l,329825)).then(e=>e.InputElement),{loadableGenerated:{webpack:()=>[329825]}}),m=(0,n.forwardRef)((e,a)=>{let{startElement:l,endElement:n,error:i,disabled:o,classes:r,fullWidth:m,size:p,className:h,hasOuterStartElement:_,hasOuterEndElement:g,...x}=e;return(0,s.jsxs)("div",{className:(0,t.W)(d().inputWrapper,{[d().error]:i,[d().disabled]:o,[d().fullWidth]:m,[d().sm]:"sm"===p,[d().withStartElement]:null!=l,[d().withEndElement]:null!=n,[d().hasOuterStartElement]:_,[d().hasOuterEndElement]:g},h),children:[l&&(0,s.jsx)(u,{position:"start",className:(0,t.W)(d().element,null==r?void 0:r.startElement),children:l}),(0,s.jsx)("input",{...x,ref:a,disabled:o,className:(0,t.W)(d().input,null==r?void 0:r.input)}),n&&(0,s.jsx)(u,{position:"end",className:(0,t.W)(d().element,null==r?void 0:r.endElement),children:i?(0,s.jsx)(c,{name:"alert-circle"}):n})]})});m.displayName="Input"},342694:function(e,a,l){"use strict";l.d(a,{Z:function(){return L}});var s=l(511527),n=l(50959),t=l(590670),i=l.n(t),o=l(189045),r=l(929320),d=l(1359),c=l(619533);let u=(e,a)=>Number(parseInt(e,16)+a).toString(16),m="abcdefghijklmnopqrstuvwxyz".split("").reduce((e,a,l)=>({...e,[a]:u("1f1e6",l)}),{}),p=e=>[m[e[0]],m[e[1]]].join("-"),h=e=>{let{iso2:a,src:l,protocol:t="https",className:i}=e,o=(0,n.useMemo)(()=>{if(l)return l;let e=p(a);return"".concat(t,"://cdnjs.cloudflare.com/ajax/libs/twemoji/14.0.2/svg/").concat(e,".svg")},[a,t,l]);return(0,s.jsx)(c.Z,{className:i,src:o,fill:!0,draggable:!1,"data-country":a,alt:""})};var _=l(300576),g=l(946500),x=l(861653),v=l.n(x),j=l(110367),f=l(305341),y=l(879750),b=(0,n.memo)(function(e){let{value:a,onChange:l,position:t="top",height:i=300,dialCode:o}=e,[d,c]=(0,n.useState)(!1),u=(0,n.useRef)(null),m=(0,n.useRef)(null);(0,y.t)(m,()=>{c(!1)}),(0,n.useEffect)(()=>{if(d&&u.current){let e=r.Z8.findIndex(e=>(0,r.ow)(e).iso2===a);e>-1&&u.current.scrollToItem(e,"center")}},[d,a]);let p=e=>{l(e),c(!1)};return(0,s.jsxs)("div",{ref:m,className:(0,f.W)(v().select),onClick:()=>c(!d),children:[(0,s.jsxs)("button",{className:v().selectedOption,type:"button","data-testid":"international-phone-input-country-select-button",children:[(0,s.jsx)("span",{className:v().icon,children:(0,s.jsx)(h,{iso2:a})}),(0,s.jsx)(g.J,{name:"chevron-down",className:v().moreIcon})]}),(0,s.jsxs)(_.Z,{tag:"span",variant:"text",size:"md",fontWeight:"regular",className:v().dialCode,children:["+",o]}),d&&(0,s.jsx)("div",{className:(0,f.W)(v().menu,{[v().positionTop]:"top"===t,[v().positionBottom]:"bottom"===t}),style:{height:i},children:(0,s.jsx)(j.t7,{ref:u,itemCount:r.Z8.length,itemSize:35,width:300,height:i,children:e=>{let{index:l,style:n}=e,t=(0,r.ow)(r.Z8[l]);return(0,s.jsx)("div",{style:n,onClick:()=>p(t.iso2),"data-testid":"international-phone-input-country-select-".concat(t.iso2),children:(0,s.jsxs)("div",{autoFocus:t.iso2===a,className:(0,f.W)(v().menuItem,{[v().selected]:t.iso2===a}),children:[(0,s.jsx)("span",{className:v().countryFlag,children:(0,s.jsx)(h,{iso2:t.iso2,className:v().countryFlag})}),(0,s.jsxs)(_.Z,{variant:"text",size:"md",fontWeight:"regular",tag:"span",children:["+",t.dialCode]}),(0,s.jsx)(_.Z,{variant:"text",size:"md",fontWeight:"semibold",tag:"span",children:t.name})]})})}})})]})});let w=(e,a)=>{(0,n.useEffect)(()=>{try{if(!e||"string"!=typeof e||"function"!=typeof a)return;let l=e.replace(/[^\d+]/g,"").replace(/(\+)(?=.*\+)/g,"");l!==e&&a(l)}catch(e){return}},[e,a])};function L(e){var a,l,n;let{id:t,placeholder:c,label:u,value:m,onChange:p,onBlur:h,onFocus:_,required:g,readOnly:x,className:v,autoFocus:j,helperText:y,error:L,showCountrySelect:N=!0,selectProps:C,...S}=e,W=(0,o.ke)(m)?"":m;w(W,p);let{inputValue:M,handlePhoneValueChange:k,inputRef:I,country:T,setCountry:B}=(0,r.m5)({defaultCountry:null!==(n=null==S?void 0:S.defaultCountry)&&void 0!==n?n:"us",value:null!=W?W:"",countries:r.Z8,disableDialCodeAndPrefix:!0,disableDialCodePrefill:!0,onChange:e=>{let a=e.phone.replace("+".concat(e.country.dialCode),"");p((0,o.ke)(a)?"":e.phone)}});return(0,s.jsx)(d._,{className:v,id:t,label:u,placeholder:c,ref:I,value:M,onFocus:_,onBlur:h,required:g,autoFocus:j,helperText:y,error:L,readOnly:x,classes:{input:N?(0,f.Z)(i().input,{[i().twoDigits]:(null==T?void 0:null===(a=T.dialCode)||void 0===a?void 0:a.length)===2,[i().threeDigits]:(null==T?void 0:null===(l=T.dialCode)||void 0===l?void 0:l.length)===3}):void 0},"data-testid":S["data-testid"],onChange:e=>{k(e)},innerElements:{start:N?(0,s.jsx)(b,{value:T.iso2,onChange:B,position:null==C?void 0:C.position,height:null==C?void 0:C.height,dialCode:null==T?void 0:T.dialCode}):void 0}})}},429415:function(e,a,l){"use strict";l.d(a,{Z:function(){return r}});var s=l(511527),n=l(508640),t=l(294633),i=l.n(t),o=l(305341);function r(e){let{children:a,arrow:l=!1,overlayClassName:t,...r}=e;return(0,s.jsx)(n.Z,{...r,arrow:l,overlayClassName:(0,o.Z)(i().overlay,t),children:a})}},394716:function(e,a,l){"use strict";l.d(a,{Z:function(){return y}});var s=l(511527),n=l(882031),t=l.n(n),i=l(50959),o=l(305341),r=l(210422),d=l(768148),c=l.n(d),u=l(45938),m=l.n(u),p=l(685450),h=l.n(p);let _=(0,i.forwardRef)((e,a)=>{let{children:l,className:n}=e;return(0,s.jsx)("div",{ref:a,className:(0,o.W)(h().popupBody,n),children:l})});_.displayName="PopupBody";let g=m()(()=>Promise.all([l.e(73411),l.e(69508)]).then(l.bind(l,369508)),{loadableGenerated:{webpack:()=>[369508]}}),x=m()(()=>Promise.all([l.e(60340),l.e(64528),l.e(37781),l.e(87201)]).then(l.bind(l,215427)),{loadableGenerated:{webpack:()=>[215427]}}),v=m()(()=>Promise.all([l.e(73830),l.e(14131),l.e(80388),l.e(78861)]).then(l.bind(l,978861)),{loadableGenerated:{webpack:()=>[978861]}}),j=m()(()=>Promise.all([l.e(58942),l.e(14131),l.e(80388),l.e(12959)]).then(l.bind(l,112959)),{loadableGenerated:{webpack:()=>[112959]}}),f=(0,i.forwardRef)((e,a)=>{let{open:l,onClose:n,children:d,variant:u="default",hiddenHeader:m,HeaderProps:p,title:h="",loading:f=!1,classes:y,LoadingProps:b,hiddenCloseButton:w,closeOnOverlayClick:L=!1,onBackClick:N,closeButtonPosition:C="default",hidden:S,...W}=e,[M,k]=(0,i.useState)(!1);if((0,i.useEffect)(()=>(k(!0),()=>k(!1)),[]),!l||!M)return null;let I=()=>{n&&n()},T=w?null:(0,s.jsx)(v,{variant:"default"===C?"default":"outside",onClick:I,className:null==y?void 0:y.closeButton,"data-testid":W["close-button-data-testid"]}),B=null!=N?(0,s.jsx)(j,{onClick:N,className:null==y?void 0:y.backButton,"data-testid":W["back-button-data-testid"]}):null;return(0,r.createPortal)((0,s.jsxs)(s.Fragment,{children:[l&&(0,s.jsx)(t(),{id:"eefa747b40ee4016",children:"body{overflow:hidden!important;position:relative!important}"}),(0,s.jsx)("div",{"data-roomvu-popup-overlay":!0,onClick:L?I:void 0,className:(0,o.W)(c().outerWrapper,{[c().fullScreen]:"full-screen"===u,[c().stickToBottom]:"stick-to-bottom-on-mobile"===u,[c().fullScreenOnMobile]:"full-screen-on-mobile"===u,[c().hidden]:S},null==y?void 0:y.root),children:(0,s.jsxs)("div",{className:(0,o.W)(c().popup,null==y?void 0:y.popup),onClick:L?e=>e.stopPropagation():void 0,"data-testid":W["data-testid"],children:["outside-right"===C&&T,(0,s.jsxs)("div",{className:(0,o.W)(c().contentWrapper,null==y?void 0:y.contentWrapper),children:[!m&&(0,s.jsxs)(g,{hiddenBottomBorder:null==p?void 0:p.hiddenBottomBorder,className:null==y?void 0:y.header,children:[B,h,"default"===C&&T]}),(0,s.jsxs)(_,{ref:a,className:(0,o.W)(null==y?void 0:y.body,{[c().loadingBody]:f}),children:[d,f&&(0,s.jsx)(x,{message:null==b?void 0:b.message,className:null==y?void 0:y.loading})]})]})]})})]}),document.body)});f.displayName="Popup";var y=f},300576:function(e,a,l){"use strict";l.d(a,{Z:function(){return o}});var s=l(511527),n=l(305341),t=l(996587),i=l.n(t);function o(e){let{tag:a="p",children:l,className:t,variant:o,fontWeight:r,size:d,...c}=e;return(0,s.jsx)(a,{className:(0,n.W)(t,{[i().display]:"display"===o,[i().text]:"text"===o,[i().heading]:"heading"===o,[i().label]:"label"===o,[i().navLabel]:"nav-label"===o,[i().body]:"body"===o,[i().xxl]:"2xl"===d,[i().xl]:"xl"===d,[i().lg]:"lg"===d,[i().md]:"md"===d,[i().sm]:"sm"===d,[i().xs]:"xs"===d,[i().h1]:"h1"===d,[i().h2]:"h2"===d,[i().h3]:"h3"===d,[i().h4]:"h4"===d,[i().h5]:"h5"===d,[i().h6]:"h6"===d,[i().h7]:"h7"===d,[i().standardPrimary]:"standard-primary"===d,[i().standardSecondary]:"standard-secondary"===d,[i().extraSmallSecondary]:"extra-small-secondary"===d,[i().extraSmallPrimary]:"extra-small-primary"===d,[i().large]:"large"===d,[i().default]:"default"===d,[i().small]:"small"===d,[i().regular]:"regular"===r,[i().medium]:"medium"===r,[i().semibold]:"semibold"===r,[i().bold]:"bold"===r}),...c,children:l})}},904054:function(e,a,l){"use strict";l.d(a,{LV:function(){return t},gW:function(){return i},uY:function(){return s}});let s={IMPORT_LISTING:"import-listing",BRANDING_EDIT:"edit",LANDING_CREATE:"create",PROFILE_EDIT:"edit",CREATE_CONTENT:"create-content",VOICE:"voice",AVATAR_CREATE:"create",SMART_ADS_CREATE:"create",EMAIL_CREATE:"create",BOOK_CALL:"book-call",PORTRAIT_GENERATE:"generate",POSTING_SETTINGS:"posting-settings",VIDEO_SLIDES_EDIT:"edit",LEADS_OVERVIEW:"overview",IMPORT_REVIEWS:"import-reviews",CONTENT_SETTING_EDIT:"edit",IMMERSIVE_TOUR:"immersive-tour",IMPORT_LEADS:"import-leads",CONNECT_CRM:"connect-crm",DOWNGRADE_PLAN:"downgrade-plan"},n="connect-";function t(e){return e.startsWith(n)}function i(e){return t(e)&&e.slice(n.length)||null}},30355:function(e,a,l){"use strict";l.d(a,{_:function(){return t}});var s=l(50959),n=l(239724);function t(e){let{popup:a,enabled:l=!0,onMatch:t,clear:i=!0}=e,o=(0,n.useRouter)(),r=(0,s.useRef)(!1),d=(0,s.useRef)(t);d.current=t,(0,s.useEffect)(()=>
1{if(!o.isReady||!l||r.current)return;let e=o.query.popup;if(!(!e||Array.isArray(e))&&("function"==typeof a?!!a(e):a===e)&&(r.current=!0,d.current(e),i)){let{popup:e,...a}=o.query;o.replace({pathname:o.pathname,query:a},void 0,{shallow:!0})}},[o.isReady,o.query.popup,o,a,l,i])}},714501:function(e,a,l){"use strict";l.d(a,{O:function(){return t}});var s=l(50959),n=l(671142);function t(e,a,l,t){let i=(0,s.useRef)(a);(0,n.L)(()=>{i.current=a},[a]),(0,s.useEffect)(()=>{var a;let s=null!==(a=null==l?void 0:l.current)&&void 0!==a?a:window;if(!(s&&s.addEventListener))return;let n=e=>i.current(e);return s.addEventListener(e,n,t),()=>{s.removeEventListener(e,n,t)}},[e,l,t])}},671142:function(e,a,l){"use strict";l.d(a,{L:function(){return s}});let s=l(50959).useLayoutEffect},879750:function(e,a,l){"use strict";l.d(a,{t:function(){return n}});var s=l(714501);function n(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"mousedown";(0,s.O)(l,l=>{let s=l.target;s&&s.isConnected&&(Array.isArray(e)?e.every(e=>e.current&&!e.current.contains(s)):e.current&&!e.current.contains(s))&&a&&a(l)})}},673954:function(e){e.exports={loading:"LeadManagement_loading__v15Qs",lastMessage:"LeadManagement_lastMessage__TF5YM",followUpButton:"LeadManagement_followUpButton__1Ey9O",leadManagementFooter:"LeadManagement_leadManagementFooter__1k9Xj",callFollowUpSection:"LeadManagement_callFollowUpSection__egvYs",inner:"LeadManagement_inner__WO7k_",textWrapper:"LeadManagement_textWrapper__Sb76y",imageWrapper:"LeadManagement_imageWrapper__x5jMz",upgradeButton:"LeadManagement_upgradeButton__2fbra",emailFollowUpTextSection:"LeadManagement_emailFollowUpTextSection__RchVP",howItWorksSection:"LeadManagement_howItWorksSection___R1K_",howItWorksSectionSample:"LeadManagement_howItWorksSectionSample___tvq_",leadManagementHeaderSample:"LeadManagement_leadManagementHeaderSample__uTfbb",noLeadsSection:"LeadManagement_noLeadsSection__tdfB9",contentWrapper:"LeadManagement_contentWrapper__VIE0l",runFacebookAdsButton:"LeadManagement_runFacebookAdsButton__exJK8",isMobile:"LeadManagement_isMobile__7j6Af",leadManagementHeader:"LeadManagement_leadManagementHeader__TZBwx",titleSection:"LeadManagement_titleSection__dHnfI",mainTitle:"LeadManagement_mainTitle__RIPLV",leadsCount:"LeadManagement_leadsCount__6JuTe",grayColor:"LeadManagement_grayColor__Tyu7u",mobileLeadsCount:"LeadManagement_mobileLeadsCount__ebdVF",subTitle:"LeadManagement_subTitle___wEqv",searchWrapper:"LeadManagement_searchWrapper__0LH9Z",ctaButton:"LeadManagement_ctaButton__4XAfk",white:"LeadManagement_white___i9QQ",titleAndSummarySection:"LeadManagement_titleAndSummarySection__v0Tak",salesReminderSummaryCard:"LeadManagement_salesReminderSummaryCard__lIKv_",summaryCardHeader:"LeadManagement_summaryCardHeader__jObqh",summaryCardTitle:"LeadManagement_summaryCardTitle__u05iy",summaryCardBadge:"LeadManagement_summaryCardBadge__fI7PO",summaryCardBadgeActive:"LeadManagement_summaryCardBadgeActive__5nVDI",summaryCardActionGrid:"LeadManagement_summaryCardActionGrid__odXQS",summaryCardItem:"LeadManagement_summaryCardItem__VppoI",summaryCardHotItem:"LeadManagement_summaryCardHotItem__iEACe",summaryCardSubtleText:"LeadManagement_summaryCardSubtleText__tM0AL",summaryCardCallsItem:"LeadManagement_summaryCardCallsItem__CWBya",summaryCallsHeader:"LeadManagement_summaryCallsHeader__XgaUr",summaryCallRow:"LeadManagement_summaryCallRow__VuKoL",summaryCallDueLabel:"LeadManagement_summaryCallDueLabel__n5O5W",summaryCardItemClickable:"LeadManagement_summaryCardItemClickable__WbVVx",summaryCardItemActive:"LeadManagement_summaryCardItemActive__RzS8G",topBannerSection:"LeadManagement_topBannerSection__NShNS",similarListingsBanner:"LeadManagement_similarListingsBanner__jzH4B",similarListingsBannerContent:"LeadManagement_similarListingsBannerContent__ySABt",similarListingsBannerButton:"LeadManagement_similarListingsBannerButton__8gV_i",leadInfoCard:"LeadManagement_leadInfoCard__yqZrp",leadInfoCardTags:"LeadManagement_leadInfoCardTags__SoTvt",leadInfoCardButton:"LeadManagement_leadInfoCardButton__usg5R",similarListingsBannerVisual:"LeadManagement_similarListings
1BannerVisual__pggAa",similarListingsPlane:"LeadManagement_similarListingsPlane___01K5",similarListingsMiniCard:"LeadManagement_similarListingsMiniCard__SWrZD",similarListingsMiniPhoto:"LeadManagement_similarListingsMiniPhoto__JrYsI",diamondBanner:"LeadManagement_diamondBanner__MUBZa",diamondBannerWrapper:"LeadManagement_diamondBannerWrapper__dPzql",diamondBannerButton:"LeadManagement_diamondBannerButton__JP2z_",similarListingsPopupRoot:"LeadManagement_similarListingsPopupRoot__B7oqq",similarListingsPopup:"LeadManagement_similarListingsPopup__FDYZ1",similarListingsPopupBody:"LeadManagement_similarListingsPopupBody__CdoDn",similarListingsPopupClose:"LeadManagement_similarListingsPopupClose__B5Hkr",similarListingsPopupHeader:"LeadManagement_similarListingsPopupHeader__rzTzA",similarListingsPopupIcon:"LeadManagement_similarListingsPopupIcon__uyJgP",similarListingsEmailPreview:"LeadManagement_similarListingsEmailPreview__ntPhi",similarListingsEmailTop:"LeadManagement_similarListingsEmailTop__iOsRB",similarListingsEmailGreeting:"LeadManagement_similarListingsEmailGreeting__iTUsh",similarListingsEmailText:"LeadManagement_similarListingsEmailText__SPKW_",similarListingsEmailRow:"LeadManagement_similarListingsEmailRow__1co7R",similarListingsEmailPhoto:"LeadManagement_similarListingsEmailPhoto__TcM5z",similarListingsEmailPhoto2:"LeadManagement_similarListingsEmailPhoto2__Gl4Q8",similarListingsEmailPhoto3:"LeadManagement_similarListingsEmailPhoto3__ICp4_",similarListingsEmailLines:"LeadManagement_similarListingsEmailLines__rdI0j",similarListingsPopupFooter:"LeadManagement_similarListingsPopupFooter__7xcsh",followUpRulesPopupRoot:"LeadManagement_followUpRulesPopupRoot__CvrDu",followUpRulesPopup:"LeadManagement_followUpRulesPopup__YGFhS",followUpRulesPopupBody:"LeadManagement_followUpRulesPopupBody__rZW_3",followUpRulesList:"LeadManagement_followUpRulesList__kmHhl",followUpRulesTagSuccess:"LeadManagement_followUpRulesTagSuccess__i5B1u",followUpRulesTagWarning:"LeadManagement_followUpRulesTagWarning__OKvYu",followUpRulesButton:"LeadManagement_followUpRulesButton__5lrsL",backButtonSection:"LeadManagement_backButtonSection__KOMGV",backButton:"LeadManagement_backButton__weLPz",tableTitle:"LeadManagement_tableTitle__TFnJK",dashboardMobile:"LeadManagement_dashboardMobile__rF3dN",loadMore:"LeadManagement_loadMore__r_HoB",dashboardDesktop:"LeadManagement_dashboardDesktop__CLrbU",filtersList:"LeadManagement_filtersList__8QrMs",leadsListSection:"LeadManagement_leadsListSection__brli9",tableHeader:"LeadManagement_tableHeader__ZPB0E",tableHeaderButtons:"LeadManagement_tableHeaderButtons__MtIGC",journeyBuilderButton:"LeadManagement_journeyBuilderButton__CVy0B",tableHeaderMore:"LeadManagement_tableHeaderMore__Fd2tu",rightSide:"LeadManagement_rightSide__fPJeB",leadsTable:"LeadManagement_leadsTable__e3TJ1",deletedLeadsTitle:"LeadManagement_deletedLeadsTitle__6o1_4",deletedLeadsTable:"LeadManagement_deletedLeadsTable__uxjMR",deleteIcon:"LeadManagement_deleteIcon__DoxIl",listHolder:"LeadManagement_listHolder__BpEZw",dataTable:"LeadManagement_dataTable__ZGxsw",leadInfo:"LeadManagement_leadInfo__4j4tC",info:"LeadManagement_info__hG56x",callTooltip:"LeadManagement_callTooltip___z92B",name:"LeadManagement_name__xD9l_",statusTag:"LeadManagement_statusTag__29Gsx",hot:"LeadManagement_hot__5h_X5",nurturing:"LeadManagement_nurturing__OpMLA",called:"LeadManagement_called__C5VWn",phone:"LeadManagement_phone__AjMgc",email:"LeadManagement_email__KL4Ui","lead-status":"LeadManagement_lead-status__w5fsp",normal:"LeadManagement_normal__V3Jog",leadStats:"LeadManagement_leadStats__XU1sF",stats:"LeadManagement_stats__udx_a",message:"LeadManagement_message__3zLf1",call:"LeadManagement_call__CTrfD",enrolledJourney:"LeadManagement_enrolledJourney__jgnnr",leadMessage:"LeadManagement_leadMessage__1__eG",messageWrapper:"LeadManagement_messageWrapper__8704k",buttonWrapper:"LeadManagement_buttonWrapper__X_gmf",row:"LeadManagement_row__e00q7",column:"LeadManagement_column__8L5C0",columnTitle:"LeadManagement_columnTitle__Iu_S2",columnValue:"LeadManagement_columnValue__DG5zP",source:"LeadManagement_source__KgmxI",noPadding:"LeadManagement_noPadding__y3aht",leadAction:"LeadManagement_leadAction__xI1Xy",leadsTableMobile:"LeadManagement_leadsTableMobile__0OTHy",sampleHeader:"LeadManagement_sampleHeader__l1OUn",leadContainer:"LeadManagement_leadContainer__cVcZ2",nameSection:"LeadManagement_nameSection__lS7C1",dataWrapper:"LeadManagement_dataWrapper__xrkAl",badgeWrapper:"LeadManagement_badgeWrapper__D_4Cs",statWrapper:"LeadManagement_statWrapper__EQ4pG",contactSection:"LeadManagement_c
1ontactSection__Nv3n0",headWrapper:"LeadManagement_headWrapper__exhjO",sourceSection:"LeadManagement_sourceSection__KrL74",journeySection:"LeadManagement_journeySection__PDKt0",messageSection:"LeadManagement_messageSection__Kc4_E",tagsSection:"LeadManagement_tagsSection__bwXVY",mobilePaginationWrapper:"LeadManagement_mobilePaginationWrapper__JGve_",paginationMobilePrev:"LeadManagement_paginationMobilePrev__yXgbz",paginationMobileNext:"LeadManagement_paginationMobileNext__sNQK6",listHolderMinHeight:"LeadManagement_listHolderMinHeight__T0_a_",outside:"LeadManagement_outside__iGIX1",upgradeBanner:"LeadManagement_upgradeBanner__VS2GE","ant-table-content":"LeadManagement_ant-table-content__To6i8",bluryOverlay:"LeadManagement_bluryOverlay__HL6C1",freeUserActionSection:"LeadManagement_freeUserActionSection__f0dN3",freeUserActionContent:"LeadManagement_freeUserActionContent__Lx8iN",dataRow:"LeadManagement_dataRow__3ugDl",hasMessage:"LeadManagement_hasMessage__1XRGh",iconWrapper:"LeadManagement_iconWrapper__7tgji",journey:"LeadManagement_journey__BCtmv",srcLink:"LeadManagement_srcLink__47Y3i",sourceTitle:"LeadManagement_sourceTitle__BRdwJ",leadSource:"LeadManagement_leadSource__WqMD4",srcDescriptionWithBadge:"LeadManagement_srcDescriptionWithBadge__TMnTu",srcExtraBadge:"LeadManagement_srcExtraBadge__NqYnf",srcExtraPopover:"LeadManagement_srcExtraPopover__C27_1",srcExtraText:"LeadManagement_srcExtraText__OKwqr",srcDescriptionInPopover:"LeadManagement_srcDescriptionInPopover__sikNB",actionIconButton:"LeadManagement_actionIconButton__WsrNw",salesReminderActionButton:"LeadManagement_salesReminderActionButton__C7yAl",salesReminderActionButtonHasReminder:"LeadManagement_salesReminderActionButtonHasReminder__PTM4i",viewButton:"LeadManagement_viewButton__JYOQm",viewButtonDisabled:"LeadManagement_viewButtonDisabled__oeWon",columnHeader:"LeadManagement_columnHeader__JQQz5",columnHeaderJourney:"LeadManagement_columnHeaderJourney__eBzoh",journeySelector:"LeadManagement_journeySelector__4xEJm",multiSelectorAction:"LeadManagement_multiSelectorAction__NVnGZ","ant-table-thead":"LeadManagement_ant-table-thead__IV14K","ant-table-cell":"LeadManagement_ant-table-cell__sOxUG","ant-table-column-sorters":"LeadManagement_ant-table-column-sorters__Ths7O","date-header":"LeadManagement_date-header__uErUC","material-icons-outlined":"LeadManagement_material-icons-outlined__3vvH7",actions_td:"LeadManagement_actions_td__sz2pn",date_td:"LeadManagement_date_td__sB28a","ant-table-column-sorter-inner":"LeadManagement_ant-table-column-sorter-inner__f6kI_",anticon:"LeadManagement_anticon__VK8I6",active:"LeadManagement_active__pXnLX","followup-thead":"LeadManagement_followup-thead__JdONC",followUpPopoverContent:"LeadManagement_followUpPopoverContent__AnEpx",followUpPopoverTitle:"LeadManagement_followUpPopoverTitle__QNDAC",followUpOptionsContainer:"LeadManagement_followUpOptionsContainer__MJ_0y",followUpOptionLabel:"LeadManagement_followUpOptionLabel__cEbp8",salesReminderModal:"LeadManagement_salesReminderModal__6O1Zs",callInfoModal:"LeadManagement_callInfoModal__PsVlL",salesReminderHistoryModal:"LeadManagement_salesReminderHistoryModal__dU_Bq",salesReminderModalHeader:"LeadManagement_salesReminderModalHeader__HNKYN",salesReminderModalTitle:"LeadManagement_salesReminderModalTitle__zpQgu",salesReminderModalSubtitle:"LeadManagement_salesReminderModalSubtitle__THC5a",salesReminderModalField:"LeadManagement_salesReminderModalField__AilYS",salesReminderModalFooter:"LeadManagement_salesReminderModalFooter__zhTag",salesReminderHistoryList:"LeadManagement_salesReminderHistoryList__EDJPf",salesReminderHistoryItem:"LeadManagement_salesReminderHistoryItem__1_hyk",
1salesReminderHistoryItemHeader:"LeadManagement_salesReminderHistoryItemHeader__sxh8w",salesReminderHistoryItemNote:"LeadManagement_salesReminderHistoryItemNote__Mzki4",salesReminderHistoryMeta:"LeadManagement_salesReminderHistoryMeta__L70F3",salesReminderHistoryEmpty:"LeadManagement_salesReminderHistoryEmpty__zSpur",callInfoOutcomeGrid:"LeadManagement_callInfoOutcomeGrid__VEsAj",callInfoOutcomeOption:"LeadManagement_callInfoOutcomeOption__PLAt4",callInfoOutcomeOptionActive:"LeadManagement_callInfoOutcomeOptionActive__GJTUw"}},667360:function(e){e.exports={banner:"LeadReceptionistBanner_banner__br6rH",header:"LeadReceptionistBanner_header__okUlG",titleGroup:"LeadReceptionistBanner_titleGroup__PfeIw",headerIcon:"LeadReceptionistBanner_headerIcon__bfkKT",title:"LeadReceptionistBanner_title__BJOT3",subtext:"LeadReceptionistBanner_subtext__PDMth",emailBox:"LeadReceptionistBanner_emailBox__JACtf",emailValue:"LeadReceptionistBanner_emailValue__3K6ja",copyButton:"LeadReceptionistBanner_copyButton__6FhOz",howItWorksButton:"LeadReceptionistBanner_howItWorksButton__DHe_6"}},824972:function(e){e.exports={container:"FollowUpSettings_container__VmWKS",followUpOptionLabel:"FollowUpSettings_followUpOptionLabel__ffubI",checkbox:"FollowUpSettings_checkbox__z_OoH",checkboxLabel:"FollowUpSettings_checkboxLabel__b5sAq",checkboxLabelWrapper:"FollowUpSettings_checkboxLabelWrapper__aKyBQ"}},61005:function(e){e.exports={container:"FollowUpSettingsBottomSheet_container__sw1Op",description:"FollowUpSettingsBottomSheet_description__dX6hR"}},52395:function(e){e.exports={drawerContainer:"DrawerDesktopView_drawerContainer__1dODR",drawerContentContainer:"DrawerDesktopView_drawerContentContainer__ZaR_6",drawerContentContainerItem:"DrawerDesktopView_drawerContentContainerItem__CwHxJ",drawerContentContainerItemLeft:"DrawerDesktopView_drawerContentContainerItemLeft__o9ihY",drawerContentContainerItemRightBadge:"DrawerDesktopView_drawerContentContainerItemRightBadge__zuI72",drawerContentTextBox:"DrawerDesktopView_drawerContentTextBox__3Qs3r",modalContent:"DrawerDesktopView_modalContent__rqNEy",container:"DrawerDesktopView_container__o5tGt",iconWrapper:"DrawerDesktopView_iconWrapper__jKKYR",heading:"DrawerDesktopView_heading__OD356",containerItem:"DrawerDesktopView_containerItem__gjMeY",containerItemLeft:"DrawerDesktopView_containerItemLeft__FWuJV",containerItemRightBadge:"DrawerDesktopView_containerItemRightBadge__arbxZ",modalContentTextBox:"DrawerDesktopView_modalContentTextBox__2FDow"}},873384:function(e){e.exports={htmlFrame:"EmailIntegrationMessageModal_htmlFrame__xkTVw",plainText:"EmailIntegrationMessageModal_plainText__d8n1U"}},891306:function(e){e.exports={journeyBuilderButton:"MoreActions_journeyBuilderButton__3jBFk"}},697e3:function(e){e.exports={journeyBuilderButton:"MoreActions_journeyBuilderButton__pbs_N"}},804521:function(e){e.exports={leadsListSectionSample:"SampleLeadsList_leadsListSectionSample__4j3tK",lastMessage:"SampleLeadsList_lastMessage__yYlgk",tableHeader:"SampleLeadsList_tableHeader__NFAUv",tableHeaderButtons:"SampleLeadsList_tableHeaderButtons__F6plA",journeyBuilderButton:"SampleLeadsList_journeyBuilderButton__ZX1kI",tableHeaderMore:"SampleLeadsList_tableHeaderMore__3kpMi",rightSide:"SampleLeadsList_rightSide__LOrYG",listHolder:"SampleLeadsList_listHolder__ycdsw",sampleLeadsTable:"SampleLeadsList_sampleLeadsTable__XqByp",dataTable:"SampleLeadsList_dataTable__dCt0v",leadInfo:"SampleLeadsList_leadInfo___xI6L",info:"SampleLeadsList_info__yb_T_",name:"SampleLeadsList_name___R2BU",statusTag:"SampleLeadsList_statusTag__9pV2u",hot:"SampleLeadsList_hot__Js7yR",nurturing:"SampleLeadsList_nurturing__tkYtp",phone:"SampleLeadsList_phone__GdA_G",email:"SampleLeadsList_email__z3HOS","lead-status":"SampleLeadsList_lead-status__iqwO4",normal:"SampleLeadsList_normal__y3yXY",leadStats:"SampleLeadsList_leadStats__6QCyF",stats:"SampleLeadsList_stats__v0rB0",message:"SampleLeadsList_message__n4rmN",call:"SampleLeadsList_call__w63U0",leadMessage:"SampleLeadsList_leadMessage__ftnYl",messageWrapper:"SampleLeadsList_messageWrapper__W_lDk",buttonWrapper:"SampleLeadsList_buttonWrapper__v4A5f",row:"SampleLeadsList_row__dOsQe",column:"SampleLeadsList_column__mjkg_",columnTitle:"SampleLeadsList_columnTitle__I5S2O",columnValue:"SampleLeadsList_columnValue__7P3Fk",source:"SampleLeadsList_source__lcc18",noPadding:"SampleLeadsList_noPadding__V5DaC",leadAction:"SampleLeadsList_leadAction__aLKzS",leadsTableMobile:"SampleLeadsList_leadsTableMobile__nBOln",sampleHeader:"SampleLeadsList_sampleHeader__mfHa2",leadContainer:"SampleLeadsList_leadContainer__2h_Jx",nameSection:"SampleLeadsList_nameSection__Q_6sx",dataWrapper:"SampleLeadsList_dataWrapper__XpJ3d",badgeWrapper:"SampleLeadsList_badgeWrapper__HQxX_",statWrapper:"SampleLeadsList_statWrapper__7l__W",contactSection:"SampleLeadsList_contactSection__pjRcW",headWrapper:"SampleLeadsList_headWrapper__sVwXy",sourceSection:"SampleLeadsList_sourceSection__fo1rZ",leadSource:"SampleLeadsList_leadSource__yh8bH",journeySection:"SampleLeadsList_journeySection__9iPNW",messageSection:"SampleLeadsList_messageSection__2g1l_",sampleDataCaution:"SampleLeadsList_sampleDataCaution__j0GLk",shoDeletedLeadsButton:"SampleLeadsList_shoDeletedLeadsButton__VEnWX",followUpPopoverContent:"SampleLeadsList_followUpPopoverContent__5q8v3",followUpPopoverTitle:"SampleLeadsList_followUpPopoverTitle__FORVp",followUpOptionsContainer:"SampleLeadsList_followUpOptionsContainer__Ge5Cc",followUpOptionLabel:"SampleLeadsList_followUpOptionLabel__Jnej5"}},358222:function(e){e.exports={tagsColumn:"TagsColumn_tagsColumn__WDlzB",tagsContainer:"TagsColumn_tagsContainer__uqDFY",tagBadge:"TagsColumn_tagBadge__y16z9",noTags:"TagsColumn_noTags__tNs1N",addTagContainer:"TagsColumn_addTagContainer__qtNa
1d",tagSelect:"TagsColumn_tagSelect__HrJph",notFoundContent:"TagsColumn_notFoundContent__1KqDj",selectFooter:"TagsColumn_selectFooter__YWfDc"}},571222:function(e){e.exports={modalContent:"TryCrm_modalContent__JXUoD",container:"TryCrm_container__fR6c4",iconWrapper:"TryCrm_iconWrapper__McsB2",heading:"TryCrm_heading__swQNd",containerItem:"TryCrm_containerItem__ESVpS",containerItemLeft:"TryCrm_containerItemLeft__k_beq",containerItemRightBadge:"TryCrm_containerItemRightBadge___0cje",modalContentTextBox:"TryCrm_modalContentTextBox__7BzcO"}},911771:function(e){e.exports={betaBadge:"Badge_betaBadge__dqE22",sm:"Badge_sm__DkSKH",lg:"Badge_lg__09qdz",pillColor:"Badge_pillColor__17q6Y",pillOutline:"Badge_pillOutline__CnuGc",gray:"Badge_gray__PMk6y",badgeColor:"Badge_badgeColor__VG3sO",brand:"Badge_brand__kItxx",error:"Badge_error__s2h1d",warning:"Badge_warning__oIGTP",success:"Badge_success__DLxsR",badgeModern:"Badge_badgeModern__L5LUU",closeButton:"Badge_closeButton__7jNi5",withStartElement:"Badge_withStartElement__W5RcL",withEndElement:"Badge_withEndElement__o_DxR"}},30747:function(e){e.exports={drawer:"BottomSheet_drawer__FtE4c",body:"BottomSheet_body__dOC9H",header:"BottomSheet_header__ZzoRG",container:"BottomSheet_container__lV_Aj"}},385522:function(e){e.exports={container:"Checkbox_container__pLh2f",checkbox:"Checkbox_checkbox__FnUX9",sm:"Checkbox_sm__BqvI9",labelWrapper:"Checkbox_labelWrapper__AoLcz",label:"Checkbox_label__9UXOs",secondary:"Checkbox_secondary__v8Q0P"}},9198:function(e){e.exports={formControl:"FormControl_formControl__W6vWQ",disabled:"FormControl_disabled__FcHJ_",fullWidth:"FormControl_fullWidth__hHO_A"}},819666:function(e){e.exports={inputWrapper:"Input_inputWrapper__siHvA",input:"Input_input__Cuyv_",sm:"Input_sm__cDMH8",withStartElement:"Input_withStartElement__qWEiB",withEndElement:"Input_withEndElement__mzVOI",error:"Input_error__9aKKG",element:"Input_element___iKaH",disabled:"Input_disabled__lXtIb",fullWidth:"Input_fullWidth__bZg_i",hasOuterStartElement:"Input_hasOuterStartElement__eLXOw",hasOuterEndElement:"Input_hasOuterEndElement__ymUTD"}},861653:function(e){e.exports={select:"CountrySelect_select__lmVLt",selectedOption:"CountrySelect_selectedOption__F4jqZ",icon:"CountrySelect_icon__HSHiV",moreIcon:"CountrySelect_moreIcon__TBu_2",dialCode:"CountrySelect_dialCode__Y_ZPq",menu:"CountrySelect_menu__jsqMp",menuItem:"CountrySelect_menuItem__Fdw6g",countryFlag:"CountrySelect_countryFlag__RFKzr",selected:"CountrySelect_selected__OVJ7B",positionTop:"CountrySelect_positionTop__I3cWK",positionBottom:"CountrySelect_positionBottom__sqjGn"}},590670:function(e){e.exports={input:"InternationalPhoneInput_input__QeTve",twoDigits:"InternationalPhoneInput_twoDigits__PaLfN",threeDigits:"InternationalPhoneInput_threeDigits__yViMw",countrySelectWrapper:"InternationalPhoneInput_countrySelectWrapper__hqt9z"}},294633:function(e){e.exports={overlay:"Popover_overlay__l6vt6"}},768148:function(e){e.exports={outerWrapper:"Popup_outerWrapper__h1_w7",popup:"Popup_popup__D_nCO",contentWrapper:"Popup_contentWrapper__XzPn_",stickToBottom:"Popup_stickToBottom__p5IPG",fullScreen:"Popup_fullScreen__0nF5n",fullScreenOnMobile:"Popup_fullScreenOnMobile__4bTFT",hidden:"Popup_hidden__pdbb1",loadingBody:"Popup_loadingBody__svbU0"}},685450:function(e){e.exports={popupBody:"PopupBody_popupBody__lzUwf"}},996587:function(e){e.exports={display:"Typography_display__l2C05",xxl:"Typography_xxl__Y7ErS",regular:"Typography_regular__KTWbd",medium:"Typography_medium__mtjgA",semibold:"Typography_semibold__TIHxg",bold:"Typography_bold___gquo",xl:"Typography_xl__La3HI",lg:"Typography_lg__j4v0c",md:"Typography_md__wuzXH",sm:"Typography_sm__ucYNS",xs:"Typography_xs__g_FvF",text:"Typography_text__QmJL9",heading:"Typography_heading__oXhCK",h1:"Typography_h1__XE1DN",h2:"Typography_h2__XWgNG",h3:"Typography_h3__axdG_",h4:"Typography_h4__IexF5",h5:"Typography_h5__Qpuaa",h6:"Typography_h6__Njhxx",h7:"Typography_h7__QHfkq",label:"Typography_label__VUS41",standardPrimary:"Typography_standardPrimary___0umb",standardSecondary:"Typography_standardSecondary__mOTUD",smallSecondary:"Typography_smallSecondary__TOz_W",extraSmallSecondary:"Typography_extraSmallSecondary__7da9R",navLabel:"Typography_navLabel__Zd221",extraSmallPrimary:"Typography_extraSmallPrimary__55FgU",body:"Typography_body__b_Zob",large:"Typography_large__Dbf2c",default:"Typography_default__rl2M4",small:"Typography_small__ONkD5"}}},function(e){e.O(0,[1888,80388,64528,6406,22375,49689,33490,82298,86173,21661,45559,63282,62938,58416,69023,90224,96866,10367,29320,37662,8821,21859,37781,13468,74426,2651,63369,7831,58715,8457,14991,88781,3240,92888,49774,40179],function(){return e(e.s=873402)}),_N_E=e.O()}]);
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.