1"use strict";(globalThis.webpackChunktrackxi_react_ui||=[]).push([[3439],{60011(e,l,a){a.d(l,{OG:()=>d,X1:()=>b,il:()=>n,jw:()=>p});var u=a(9950),t=a(46281);const r={cjState:{},setCJState:()=>{},updateCJState:()=>{}},v=(0,u.createContext)(r);function n(){return(0,u.useContext)(v)}const o={cjCategories:[],fetchCjCategories:()=>{}},i=(0,u.createContext)(o);function b(){return(0,u.useContext)(i)}const s={pageRows:[10,25,50],metaData:{...t.Cy},selectedFilterOptions:{},tableData:[],loading:!1,refreshTableData:()=>{},updateTableData:()=>{},updateQuery:()=>{},updateFilterOptions:()=>{},updateSortBy:()=>{},updatePagination:()=>{},handleDeleteClients:()=>{},updateRowData:()=>{},clearFilterOptions:()=>{},updateMultipleFilterOptions:()=>{},clearSelectedRows:!1},c=(0,u.createContext)(s);function d(){return(0,u.useContext)(c)}const E={graphData:{refreshing:!1,loading:!0,data:{}},refreshGraphData:()=>{}},$=(0,u.createContext)(E);function p(){return(0,u.useContext)($)}a.d(l,["Cq",0,v,"Dm",0,i,"Jp",0,$,"Rt",0,c])},46281(e,l,a){const u={ON_SCHEDULE:"ON_SCHEDULE",NEEDS_ATTENTION:"NEEDS_ATTENTION",DUE:"DUE",COMPLETED:"COMPLETED"},t=[{label:"On Schedule",value:u.ON_SCHEDULE},{label:"Needs Attention",value:u.NEEDS_ATTENTION},{label:"Due",value:u.DUE},{label:"Completed",value:u.COMPLETED}];a.d(l,["$F",0,{BUYER:"Add another Buyer",SELLER:"Add another Seller"},"$u",0,{CALL:"Call",TEXT:"Text",EMAIL:"Email",IN_PERSON:"In-Person",GROUP_MESSAGE:"Group Message",NONE:""},"BQ",0,{BUYER:"Buyer Form",SELLER:"Seller Form"},"CD",0,{BUYER:"BUYER",SELLER:"SELLER"},"Cy",0,{pagination:{currentPageNumber:1,size:25,totalPages:0,totalResults:0},sortBy:{direction:1,field:"nextContact"},query:""},"DP",0,t,"FZ",0,{BUYER:"buyer",SELLER:"seller"},"KZ",0,[{type:"buyers_funnel",displayName:"Buyers Funnel"},{type:"sellers_funnel",displayName:"Sellers Funnel"},{type:"bar_line",displayName:"Deals - Projected vs Actual"}],"Q3",0,{SUMMARY:"SUMMARY_DETAILS",NOTES:"NOTES",COMMENTS:"COMMENTS",FILES:"FILES",ACTIVITY:"ACTIVITY",EDIT_STAGES:"EDIT_STAGES",CLOUD_CMA:"CLOUD_CMA",CREATE_TRANS:"CREATE_TRANS",TRANS_PLAN:"TRANS_PLAN",DELETE:"DELETE"},"QM",0,{ACTIVE:"ACTIVE",PAUSED:"PAUSED",HOT:"HOT",WARM:"WARM",CLOSED:"CLOSED",CANCEL:"CANCEL"},"Yg",0,{BUYER:"Buyer Details",SELLER:"Seller Details"},"_P",0,{ACTIVE:"Active",PAUSED:"Paused",HOT:"Hot",WARM:"Warm",CLOSED:"Closed",CANCEL:"Cancel"},"gR",0,u,"ip",0,{OTHER_FILES:"Others",PRE_APPROVAL_FILES:"Pre-Approval",BUYER_AGREEMENT:"Listing/Buyer Agreement"},"n1",0,e=>({[u.ON_SCHEDULE]:e.onSchedule,[u.NEEDS_ATTENTION]:e.needsAttention,[u.DUE]:e.overdue,[u.COMPLETED]:e.completed}),"tj",0,{DETAILS:"details",REQUIREMENTS:"requirements",FILES:"files"},"u1",0,{SUMMARY_DETAILS:"Summary Details",NOTES:"Private Notes",COMMENTS:"Comments",FILES:"Files",ACTIVITY:"Last Contact Activity",EDIT_STAGES:"CUSTOM"},"y9",0,{BUYER:"Buyer",SELLER:"Seller"}])},73899(e,l,a){var u=a(19949),t=a(10116),r=a(94959);const v=(e,l)=>{if(e){return e.map((e,a)=>{const u=e;return u[l]=a+1,u})}return[]},n=e=>{const l=[];return Object.entries(e).forEach(e=>{let a={};const u=Array.isArray(e[1])?"ARRAY":(0,r.Gv)(e[1])?"OBJECT":"VALUE";a="ARRAY"===u?{field:e[0],value:[...e[1]]}:"OBJECT"===u?"min"in e[1]?{field:e[0],min:e[1].min||1,max:null===e[1].max?2e7:e[1].max}:{field:e[0],fromDate:e[1].fromDate,toDate:e[1].toDate}:{field:e[0],number:e[1]},l.push(a)}),l},o=e=>{try{if(e){const l=/<span\s*style\s*=\s*"display:\s*none\s*;">\s*([^<]+)\s*<\/span>/g,a=[];let u;for(;null!==(u=l.exec(e));)a.push(u[1].trim());return a}}catch{return[]}};a.d(l,["B4",0,function(e,l){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{if(e&&l){const u=o(l),t=Array.from(new Set(u)),r=e.filter(e=>!t.includes(e)).map(e=>({receiverId:e,isNewlyAdded:!1,isRemoved:!0})),v=t.map(l=>({receiverId:l,isNewlyAdded:!(e.includes(l)&&!a),isRemoved:!1}));return[...r,...v]}}catch{return[]}},"CC",0,function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};const{pagination:t,sortBy:v,query:o}=e;return{pagination:{...t,size:(0,r.Im)(u)?t.size:u},sortBy:(0,r.Im)(a)?{...v}:{...a},query:o,filter:[...n(l)]}},"Ee",0,e=>({currentPageNumber:e.current,size:e.size,totalResults:e.total_results,totalPages:e.total_pages}),"I9",0,()=>t.jQ.map(e=>({value:e.value})),"J6",0,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];try{return null===e||void 0===e?void 0:e.map(e=>null===(null===e||void 0===e?void 0:e.phone)?{...e,phone:{countryCode:null,number:null}}:e)}catch{return[]}},"Jl",0,e=>[u.Ao.MORTGAGE,u.Ao.PROJECT_MANAGEMENT,u.Ao.BUYER].includes(e),"LI",0,e=>{let l="";try{null===e||void 0===e||e.forEach((e,a)=>{const{firstName:u,middleName:t,lastName:r}=e;l+=`${0!==a?", ":""} ${u||""} ${t||""} ${r||""}`})}catch(a){}return l},"M",0,e=>{let l={};
1return null===e||void 0===e||e.forEach(e=>{const{value:a,label:u}=e;l={...l,[a]:[u]}}),l},"V3",0,e=>{let l="";try{null===e||void 0===e||e.forEach((e,a)=>{const{email:u}=e;l+=`${0!==a?", ":""} ${u||""}`})}catch(a){}return l},"XL",0,()=>"#"+Math.floor(16777215*Math.random()).toString(16),"Yb",0,function(e,l,a){let u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"order";const t=Array.from(e),[r]=t.splice(l,1);return t.splice(a,0,r),v(t,u)},"dc",0,e=>{if(e)return"#"+e.slice(-3,e.length)+e.slice(-3,e.length)},"jn",0,e=>{try{const l=/data-hyperlinked="true"/.test(e),a=/target="_blank"/.test(e);if(l){if(!a){return e.replace(/<a /g,'<a target="_blank" ')}return e}const u=e.split(/<br\s*\/?>|\n/g),t=u.map(e=>e.replace(/(<img.*?>)|(<a [^>]*?>.*?<\/a>)|((https?:\/\/\S+|www\.\S+))/g,(e,l,a,u)=>{if(l)return l;if(a){let e=a;return/target="_blank"/.test(a)||(e=a.replace(/<a /,'<a target="_blank" style="color: #0000EE;"')),e}if(u){let e=u.replace(/<[^>]*>/g,"");return/^https?:\/\//i.test(e)||(e=`http://${e}`),`<a href="${e}" target="_blank" rel="noopener noreferrer" style="color: #0000EE;">${u}</a>`}return e})).join("<br>").replace(/<a .*?>.*?<\/a>/g,e=>e.replace(/ /g,"").replace(/<\/p>/g,""));return t.replace("<p ",'<p data-hyperlinked="true" ')}catch{return e}},"lg",0,e=>{if(e)return e.some(l=>e.indexOf(l.trim())!==e.lastIndexOf(l.trim()))},"nZ",0,v,"p0",0,e=>{try{if(e){const l=e.replace(/^<p[^>]*>(<br>)+/,"<p>");return l.replace(/(<br>)+<\/p>$/,"</p>")}return e}catch{return e}},"sm",0,e=>[u.Ao.SELLER,u.Ao.SELLER_POST_CONTRACT,u.Ao.SELLER_PRE_CONTRACT].includes(e),"tu",0,e=>{if(e){return"."+e.split(".").at(-1)}return""},"wP",0,o])},10116(e,l,a){a.d(l,["AI",0,[{value:0,label:"No Preference"},{value:500,label:"500"},{value:750,label:"750"},{value:1e3,label:"1000"},{value:1100,label:"1100"},{value:1200,label:"1200"},{value:1300,label:"1300"},{value:1400,label:"1400"},{value:1500,label:"1500"},{value:1600,label:"1600"},{value:1700,label:"1700"},{value:1800,label:"1800"},{value:1900,label:"1900"},{value:2e3,label:"2000"},{value:2250,label:"2250"},{value:2500,label:"2500"},{value:2750,label:"2750"},{value:3e3,label:"3000"},{value:4e3,label:"4000"},{value:5e3,label:"5000"},{value:7500,label:"7500"},{value:1e4,label:"10000"}],"EH",0,[{value:0,label:"No Preference"},{value:1e3,label:"1,000 sq ft"},{value:2e3,label:"2,000 sq ft"},{value:3e3,label:"3,000 sq ft"},{value:4e3,label:"4,000 sq ft"},{value:5e3,label:"5,000 sq ft"},{value:7500,label:"7,500 sq ft"},{value:10890,label:"\xbc acre/10,890 sq ft"},{value:21780,label:"\xbd acre"},{value:43560,label:"1 acre"},{value:87120,label:"2 acres"},{value:130680,label:"3 acres"},{value:174240,label:"4 acres"},{value:217800,label:"5 acres"},{value:435600,label:"10 acres"},{value:871200,label:"20 acres"},{value:1742400,label:"40 acres"},{value:4356e3,label:"100 acres"}],"O2",0,[{value:"Primary Home",label:"Primary Home"},{value:"Secondary Home",label:"Secondary Home"},{value:"Investment",label:"Investment"},{value:"Other",label:"Other"}],"P4",0,[{value:2e7,label:"$20M"},{value:19e6,label:"$19M"},{value:18e6,label:"$18M"},{value:17e6,label:"$17M"},{value:16e6,label:"$16M"},{value:15e6,label:"$15M"},{value:14e6,label:"$14M"},{value:13e6,label:"$13M"},{value:12e6,label:"$12M"},{value:11e6,label:"$11M"},{value:1e7,label:"$10M"},{value:9e6,label:"$9M"},{value:8e6,label:"$8M"},{value:7e6,label:"$7M"},{value:6e6,label:"$6M"},{value:5e6,label:"$5M"},{value:45e5,label:"$4.5M"},{value:4e6,label:"$4M"},{value:35e5,label:"$3.5M"},{value:3e6,label:"$3M"},{value:25e5,label:"$2.5M"},{value:2e6,label:"$2M"},{value:19e5,label:"$1.9M"},{value:18e5,label:"$1.8M"},{value:17e5,label:"$1.7M"},{value:16e5,label:"$1.6M"},{value:15e5,label:"$1.5M"},{value:14e5,label:"$1.4M"},{value:13e5,label:"$1.3M"},{value:12e5,label:"$1.2M"},{value:11e5,label:"$1.1M"},{value:1e6,label:"$1M"},{value:975e3,label:"$975,000"},{value:95e4,label:"$950,000"},{value:925e3,label:"$925,000"},{value:9e5,label:"$900,000"},{value:875e3,label:"$875,000"},{value:85e4,label:"$850,000"},{value:825e3,label:"$825,000"},{value:8e5,label:"$800,000"},{value:775e3,label:"$775,000"},{value:75e4,label:"$750,000"},{value:725e3,label:"$725,000"},{value:7e5,label:"$700,000"},{value:675e3,label:"$675,000"},{value:65e4,label:"$650,000"},{value:625e3,label:"$625,000"},{value:6e5,label:"$600,000"},{value:575e3,label:"$575,000"},{value:55e4,label:"$550,000"},{value:525e3,label:"$525,000"},{value:5e5,label:"$500,000"},{value:475e3,label:"$475,000"},{value:45e4,label:"$450,000"},{value:425e3,label:"$425,000"},{value:4e5,label:"$400,000"},{value:375e3,label:"$375,000"},{value:35e4,label:"$350,000"},{value:325e3,label:"$325,000"},{value:3e5,label:"$300,000"},{value:275e3,label:"$275,000"},{value:25e4,label:"$250,000"},{value:225e3,label:"$225,000"},{value:2e5,label:"$200,000"},{value:19e4,label:"$190,000"},{value:18e4,label:"$180,000"},{value:17e4,label:"$170,000"},{value:16e4,label:"$160,000"},{value:15e4,label:"$150,000"},{value:14e4,label:"$140,000"},{value:13e4,label:"$130,000"},{value:12e4,label:"$120,000"},{value:11e4,label:"$110,000"},{value:1e5,label:"$100,000"},{value:9e4,label:"$90,000"},{value:8e4,label:"$80,000"},{value:7e4,label:"$70,000"},{value:6e4,label:"$60,000"},{value:5e4,label:"$50,000"},{value:0,label:"No Preference"}],"RA",0,[{value:"Call",label:"Call"},{value:"Email",label:"Email"},{value:"Text",label:"Text"},{value:"Whatsapp",label:"Whatsapp"}],"SS",0,[{value:"Quick Sale",label:"Quick Sale"},{value:"Highest Price",label:"Highest Price"},{value:"Less Contingencies",label:"Less Contingencies"},{value:"Great Customer Service from the Agent",label:"Great Customer Service from the Agent"},{value:"Turnkey Selling Experience",label:"Turnkey Selling Experience"}],"UC",0,[{value:0,label:"No Preference"},{value:1,label:"1 Story"},{value:2,label:"2 Stories"},{value:3,label:"3 Stories"},{value:4,label:"4 Stories"},{value:5,label:"5 Stories"}],"VG",0,[{value:1,label:"$1+"},{value:5e4,label:"$50,000+"},{value:6e4,label:"$60,000+"},{value:7e4,label:"$70,000+"},{value:8e4,label:"$80,000+"},{value:9e4,label:"$90,000+"},{value:1e5,label:"$100,000+"},{value:11e4,label:"$110,000+"},{value:12e4,label:"$120,000+"},{value:13e4,label:"$130,000+"},{value:14e4,label:"$140,000+"},{value:15e4,label:"$150,000+"},{value:16e4,label:"$160,000+"},{value:17e4,label:"$170,000+"},{value:18e4,label:"$180,000+"},{value:19e4,label:"$190,000+"},{value:2e5,label:"$200,000+"},{value:225e3,label:"$225,000+"},{value:25e4,label:"$250,000+"},{value:275e3,label:"$275,000+"},{value:3e5,label:"$300,000+"},{value:325e3,label:"$325,000+"},{value:35e4,label:"$350,000+"},{value:375e3,label:"$375,000+"},{value:4e5,label:"$400,000+"},{value:425e3,label:"$425,000+"},{value:45e4,label:"$450,000+"},{value:475e3,label:"$475,000+"},{value:5e5,label:"$500,000+"},{value:525e3,label:"$525,000+"},{value:55e4,label:"$550,000+"},{value:575e3,label:"$575,000+"},{value:6e5,label:"$600,000+"},{value:625e3,label:"$625,000+"},{value:65e4,label:"$650,000+"},{value:675e3,label:"$675,000+"},{value:7e5,label:"$700,000+"},{value:725e3,label:"$725,000+"},{value:75e4,label:"$750,000+"},{value:775e3,label:"$775,000+"},{value:8e5,label:"$800,000+"},{value:825e3,label:"$825,000+"},{value:85e4,label:"$850,000+"},{value:875e3,label:"$875,000+"},{value:9e5,label:"$900,000+"}
1,{value:925e3,label:"$925,000+"},{value:95e4,label:"$950,000+"},{value:975e3,label:"$975,000+"},{value:1e6,label:"$1+M"},{value:11e5,label:"$1.1+M"},{value:12e5,label:"$1.2+M"},{value:13e5,label:"$1.3+M"},{value:14e5,label:"$1.4+M"},{value:15e5,label:"$1.5+M"},{value:16e5,label:"$1.6+M"},{value:17e5,label:"$1.7+M"},{value:18e5,label:"$1.8+M"},{value:19e5,label:"$1.9+M"},{value:2e6,label:"$2+M"},{value:25e5,label:"$2.5+M"},{value:3e6,label:"$3+M"},{value:35e5,label:"$3.5+M"},{value:4e6,label:"$4+M"},{value:45e5,label:"$4.5+M"},{value:5e6,label:"$5+M"},{value:6e6,label:"$6+M"},{value:7e6,label:"$7+M"},{value:8e6,label:"$8+M"},{value:9e6,label:"$9+M"},{value:1e7,label:"$10+M"},{value:11e6,label:"$11+M"},{value:12e6,label:"$12+M"},{value:13e6,label:"$13+M"},{value:14e6,label:"$14+M"},{value:15e6,label:"$15+M"},{value:16e6,label:"$16+M"},{value:17e6,label:"$17+M"},{value:18e6,label:"$18+M"},{value:19e6,label:"$19+M"},{value:2e7,label:"$20+M"}],"cl",0,[{value:"As soon as possible",label:"As soon as possible"},{value:"1-3 months",label:"1-3 months"},{value:"3-6 months",label:"3-6 months"},{value:"After 6+ months",label:"After 6+ months"}],"jQ",0,[{value:0,label:"No Preference"},{value:2023,label:"2023+"},{value:2022,label:"2022+"},{value:2021,label:"2021+"},{value:2020,label:"2020+"},{value:2019,label:"2019+"},{value:2018,label:"2018+"},{value:2017,label:"2017+"},{value:2016,label:"2016+"},{value:2015,label:"2015+"},{value:2014,label:"2014+"},{value:2013,label:"2013+"},{value:2012,label:"2012+"},{value:2011,label:"2011+"},{value:2010,label:"2010+"},{value:2009,label:"2009+"},{value:2008,label:"2008+"},{value:2007,label:"2007+"},{value:2006,label:"2006+"},{value:2005,label:"2005+"},{value:2004,label:"2004+"},{value:2003,label:"2003+"},{value:2002,label:"2002+"},{value:2001,label:"2001+"},{value:1990,label:"1990+"},{value:1980,label:"1980+"},{value:1970,label:"1970+"},{value:1960,label:"1960+"},{value:1950,label:"1950+"},{value:1940,label:"1940+"},{value:1930,label:"1930+"},{value:1920,label:"1920+"},{value:1910,label:"1910+"},{value:1900,label:"1900+"}],"rh",0,[{value:"Primary Bedroom on Main Floor",label:"Primary Bedroom on Main Floor"},{value:"Full Bath on Main Floor",label:"Full Bath on Main Floor"},{value:"Basement",label:"Basement"},{value:"Has View",label:"Has View"},{value:"Fixer Upper",label:"Fixer Upper"},{value:"RV Parking",label:"RV Parking"},{value:"Accessible Home",label:"Accessible Home"}],"tf",0,[{value:"No Preference",label:"No Preference"},{value:"North",label:"North"},{value:"East",label:"East"},{value:"South",label:"South"},{value:"West",label:"West"}],"um",0,[{value:0,label:"No Preference"},{value:500,label:"500+"},{value:750,label:"750+"},{value:1e3,label:"1000+"},{value:1100,label:"1100+"},{value:1200,label:"1200+"},{value:1300,label:"1300+"},{value:1400,label:"1400+"},{value:1500,label:"1500+"},{value:1600,label:"1600+"},{value:1700,label:"1700+"},{value:1800,label:"1800+"},{value:1900,label:"1900+"},{value:2e3,label:"2000+"},{value:2250,label:"2250+"},{value:2500,label:"2500+"},{value:2750,label:"2750+"},{value:3e3,label:"3000+"},{value:4e3,label:"4000+"},{value:5e3,label:"5000+"},{value:7500,label:"7500+"},{value:1e4,label:"10000+"}],"xI",0,[{value:0,label:"No Preference"},{value:1,label:"1+"},{value:2,label:"2+"},{value:3,label:"3+"},{value:4,label:"4+"},{value:5,label:"5+"},{value:6,label:"6+"},{value:7,label:"7+"},{value:8,label:"8+"},{value:9,label:"9+"},{value:10,label:"10+"}]])},63439(e,l,a){a.r(l);var u=a(36684),t=a(33507),r=a(9950),v=a(28429),n=a(33737),o=a(39486),i=a(60011),b=a(73899),s=a(64834),c=a(46281),d=a(19949),E=a(38618),$=a(94959),p=a(8351),C=a(49318),S=a(38951),f=a(44414);const T=()=>{const{auth:e,setViewPreferences:l=()=>{}}=(0,t.A)(),{user:a}=e,{showSnack:T}=(0,E.A)(),{viewPreferences:m={}}=a,y=(0,v.zy)(),{companyMembers:M,isMembersListFetched:A,inactiveMembers:g}=(0,p.A)(),[h,N]=(0,r.useState)([]),[L,R]=(0,r.useState)({...c.Cy}),[I,D]=(0,r.useState)({}),[O,_]=(0,r.useState)([]),[P,U]=(0,r.useState)(!1),[F,B]=(0,r.useState)({loading:!0,refreshing:!1,data:{}}),[w,Y]=(0,r.useState)(!1),{state:J={}}=(0,v.zy)();(0,r.useEffect)(()=>{o.Gk.isCompanyView(a)?(G(),x()):N([])},[]),(0,r.useEffect)(()=>
1{if("/client"===(null===y||void 0===y?void 0:y.pathname)){var e,l,a,u;const r=(null===J||void 0===J?void 0:J.fromUrl)===d.wH.SINGLE_PROSPECT?{...null===J||void 0===J||null===(e=J.payload)||void 0===e?void 0:e.filters}:{...null===m||void 0===m||null===(l=m.clientJourneyTableFilterPreference)||void 0===l?void 0:l.filters},v=null===m||void 0===m||null===(a=m.clientJourneyTableFilterPreference)||void 0===a?void 0:a.sortBy,n=null===m||void 0===m||null===(u=m.clientJourneyTableFilterPreference)||void 0===u?void 0:u.paginationSize;D(r);const{filters:o,...i}=(null===J||void 0===J?void 0:J.payload)||{},s={...(0,b.CC)(c.Cy,r,v,n)};var t;if(A)V((0,$.Im)(null===J||void 0===J?void 0:J.payload)?s:null!==J&&void 0!==J&&null!==(t=J.payload)&&void 0!==t&&t.pagination?{...i}:{...(0,b.CC)(c.Cy,r)});else U(!0)}},[null===y||void 0===y?void 0:y.pathname,A]);const x=async()=>{const e=u.tl.CLIENT_JOURNEY.FETCH_FUNNEL_DATA(null===a||void 0===a?void 0:a.companyId),l=await(0,n.bQ)(e);if(l.status){const{graphData:e}=l.data;B({loading:!1,refreshing:!1,data:e})}else B(e=>({...e,loading:!1,refreshing:!1}))},k=(0,r.useCallback)(()=>{B(e=>({...e,loading:!1,refreshing:!0})),x()},[]),G=async()=>{const e=u.tl.CATEGORY.GET_CJ_CATEGORY(null===a||void 0===a?void 0:a.companyId),l=await(0,n.bQ)(e);if(l.status){const e=[...l.data.categories].filter(e=>e.name.trim());N([...e])}else N([])},V=async e=>{var l;U(!0);const t=u.tl.CLIENT_JOURNEY.GET_CLIENT_LIST,r={...e,companyId:null===a||void 0===a?void 0:a.companyId,workspaceId:null===a||void 0===a?void 0:a.workspaceId,query:null===e||void 0===e||null===(l=e.query)||void 0===l?void 0:l.trim(),filter:(0,s.LJ)(null===e||void 0===e?void 0:e.filter,[...M,...g])},v=await(0,n.LS)(t,r);if(v.status){var o;const l=null!==(o=v.data)&&void 0!==o&&o.clientDetails?[...v.data.clientDetails]:[],{page:a}=v.data.meta;_([...l]),R({sortBy:{...e.sortBy},pagination:{...(0,b.Ee)(a)},query:e.query})}U(!1)},H=(0,r.useCallback)(()=>G(),[]),q=(0,r.useCallback)(e=>V(e),[]),j=(0,r.useCallback)(function(e){return(async(e,l)=>{U(!0);const{filter:t,query:r}=(0,b.CC)(L,I),v=(0,s.LJ)(t),o=l?u.tl.CLIENT_JOURNEY.CLIENTS_BULK_DELETE:u.tl.CLIENT_JOURNEY.DELETE_CLIENT,i=l?{companyId:(null===a||void 0===a?void 0:a.companyId)||null,filter:v,query:r||""}:{...e},c=await(0,n.Wv)(o,i);if("SUCCESS"===c.data.status){T({open:!0,type:"success",message:c.data.message});const e={...(0,b.CC)(L,I),companyId:null===a||void 0===a?void 0:a.companyId};V(e),k(),Y(!w)}else{var E;T({open:!0,type:"error",message:(null===(E=c.data)||void 0===E?void 0:E.message)||d.et.ERROR_MESSAGE})}U(!1)})(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1])},[L,I]),Q=(0,r.useCallback)(function(){return async function(e,l){let a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];U(!0);const t=u.tl.CLIENT_JOURNEY.UPDATE_CLIENT_DETAILS;if((await(0,n.LS)(t,e)).status)if(T({open:!0,type:"success",message:d.et.CLIENT_JOURNEY_DETAILS_UPDATE}),a){const e={...(0,b.CC)(L,I)};V(e)}else z(l),U(!1);else T({open:!0,type:"error",message:d.et.ERROR_MESSAGE}),U(!1)}(...arguments)},[L,I]),z=e=>{_([...e])},W=e=>{D({...e});const l={...(0,b.CC)(L,e),pagination:{...null===L||void 0===L?void 0:L.pagination,currentPageNumber:1}};V(l)};return(0,f.jsx)(i.Dm.Provider,{value:{cjCategories:h,fetchCjCategories:H},children:(0,f.jsx)(i.Jp.Provider,{value:{graphData:F,refreshGraphData:k},children:(0,f.jsx)(i.Rt.Provider,{value:{metaData:L,selectedFilterOptions:I,tableData:O,loading:P,refreshTableData:q,updateTableData:Q,updateRowData:z,updateFilterOptions:function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"CHECKBOX";const a="DELETE"===(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ADD")?{...(0,s.ve)(I,e,l)}:{...(0,s.Po)(I,e,l)};Y(!w),W(a)},updateMultipleFilterOptions:e=>{W(e)},updateQuery:e=>{R({...L,query:e})},updatePagination:(e,u)=>{const t={...(0,b.CC)(L,I)};if(t.pagination[e]=u,"size"===e){var r;const e={companyId:(null===a||void 0===a?void 0:a.dashboardView)===S.XE.COMPANY_VIEW?null===a||void 0===a?void 0:a.companyId:null,userId:null===a||void 0===a?void 0:a.userId,dashboardViewType:null===a||void 0===a?void 0:a.dashboardView,preferenceType:S.kc.CLIENT_JOURNEY_TABLE_FILTER},u={...null!==(r=null===m||void 0===m?void 0:m.clientJourneyTableFilterPreference)&&void 0!==r?r:{},paginationSize:t.pagination.size};e.clientJourneyTableFilterPreference=JSON.stringify(u),(0,C.S)({payload:e},l,T),t.pagination.currentPageNumber=1}V(t)},updateSortBy:(e,u)=>{var t;const r={...(0,b.CC)(L,I),sortBy:{direction:e,field:u}},v={companyId:(null===a||void 0===a?void 0:a.dashboardView)===S.XE.COMPANY_VIEW?null===a||void 0===a?void 0:a.companyId:null,userId:null===a||void 0===a?void 0:a.userId,dashboardViewType:null===a||void 0===a?void 0:a.dashboardView,preferenceType:S.kc.CLIENT_JOURNEY_TABLE_FILTER},n={...null!==(t=null===m||void 0===m?void 0:m.clientJourneyTableFilterPreference)&&void 0!==t?t:{},sortBy:r.sortBy};v.clientJourneyTableFilterPreference=JSON.stringify(n),(0,C.S)({payload:v},l,T),V(r)},handleDeleteClients:j,clearFilterOptions:()=>{D({});const e={...(0,b.CC)(L,I),filter:[],pagination:{...null===L||void 0===L?void 0:L.pagination,currentPageNumber:1}};V(e)},clearSelectedRows:w},children:(0,f.jsx)(v.sv,{})})})})};a.d(l,["default",0,T])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.