1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8445],{3221:function(t,e,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/legacy/contact-lists/unlocked",function(){return l(87863)}])},87863:function(t,e,l){"use strict";l.r(e),l.d(e,{default:function(){return E}});var n=l(85893),o=l(67294),i=l(11163),a=l(23100),s=l(31708),u=l(2962),r=l(49369),d=l(57350),c=l(73975),v=l(8100),p=l(60374),m=l(38280),f=l(74044),w=l(31186),y=l(88270),g=l(62720),h=l(88417);let C=()=>{var t,e,l,a,s,u,r,C,x,_,E,R,Z,b,j;let P=(0,i.useRouter)(),I=(0,d.p)(),O=(0,o.useMemo)(()=>{var t;if(P.isReady)return(0,g.Xi)(null===(t=P.query)||void 0===t?void 0:t.slug)},[P.isReady,P.query]),{clearSelectedRows:k,selectedRows:L}=(0,m.Z)(t=>({clearSelectedRows:t.clearSelectedRows,selectedRows:t.selectedRows}),p.Z),S=(0,o.useMemo)(()=>(L||[]).map(e=>null!==(t=null==e?void 0:e.original)&&void 0!==t?t:e).map(t=>{let e=null==t?void 0:t.itemId,l=null==t?void 0:t.associatedType;return"number"!=typeof e||"Company"!==l&&"Investor"!==l?null:{id:e,type:l}}).filter(Boolean),[L]),T=(0,o.useMemo)(()=>(L||[]).map(t=>null!==(e=null==t?void 0:t.original)&&void 0!==e?e:t).map(t=>({id:null==t?void 0:t.contactId,type:null==t?void 0:t.associatedType})).filter(t=>"number"==typeof t.id&&("Company"===t.type||"Investor"===t.type)),[L]),[D,N]=(0,o.useState)(1);(0,o.useEffect)(()=>{N(1),k()},[O,k]);let{data:V,error:M,mutate:X}=(0,v.ZP)("/system/contact-list/recent",h.ZP,{revalidateOnFocus:!1,revalidateIfStale:!1}),q=(0,o.useMemo)(()=>["/system/contact-list/recent/items",D,15],[D,15]),{data:z,error:B,mutate:F,isValidating:W}=(0,v.ZP)(q,(t,e,l)=>(0,h.v_)(t,{page:e,size:l}),{revalidateOnFocus:!1}),G=(0,o.useRef)(null);(0,o.useEffect)(()=>{z&&!B&&(G.current=z)},[z,B]);let H=null!=z?z:G.current,J=null!==(l=null==M?void 0:M.status)&&void 0!==l?l:null==B?void 0:B.status,K=null!==(a=null==H?void 0:H.items)&&void 0!==a?a:[],Y=null!==(s=null==H?void 0:H.totalResults)&&void 0!==s?s:0,A=null!==(u=null==H?void 0:H.totalPages)&&void 0!==u?u:0,Q=async t=>{try{if(!t.length)return;await (0,h.Jl)("/system/contact-list-item/bulk-delete",{items:t}),await F(),await X(),k()}catch(t){I({title:"Error",description:"There was a problem removing contacts from the contact list, please try again later",status:"error",duration:3e3,isClosable:!0})}};return(0,n.jsxs)(c.K,{direction:"column",overflowY:"hidden",spacing:"0",children:[(0,n.jsx)(w.Z,{mutateContactlistDetails:X,canWrite:null!==(r=null==V?void 0:V.canWrite)&&void 0!==r&&r,groupCanView:null!==(C=null==V?void 0:V.groupCanView)&&void 0!==C&&C,groupCanEdit:null!==(x=null==V?void 0:V.groupCanEdit)&&void 0!==x&&x,publicCanView:null!==(_=null==V?void 0:V.publicCanView)&&void 0!==_&&_,contactlistId:null!==(E=null==V?void 0:V.id)&&void 0!==E?E:0,slug:null!==(R=null==V?void 0:V.slug)&&void 0!==R?R:O,isOwner:null!==(Z=null==V?void 0:V.isOwner)&&void 0!==Z&&Z,name:null!==(b=null==V?void 0:V.name)&&void 0!==b?b:"",owner:null!==(j=null==V?void 0:V.owner)&&void 0!==j?j:"",errorStatus:J,isLoading:!V&&!M,selectedContactIds:T,totalContacts:Y}),(0,n.jsx)(y.Z,{data:K,isLoading:!H&&!B||W,errorStatus:J,page:D,size:15,totalPages:A,totalResults:Y,onPageChange:t=>N(t)}),(0,n.jsx)(f.Z,{exportType:"contactlist",onDeleteContactlist:(null==V?void 0:V.isOwner)?()=>Q(S):void 0})]})};var x=l(64218);let _=()=>{let t=(0,i.useRouter)(),{pathname:e}=t,l=(0,x.Z)("contactList");return(0,o.useEffect)(()=>{!1===l&&t.push("/")},[l,t]),(0,n.jsxs)(a.xu,{h:"100%",display:"flex",flexDirection:"column",children:[(0,n.jsx)(u.PB,{title:"Contact Download List",canonical:"https://system.privco.com".concat(e),openGraph:{title:"Contact Download List",url:"https://system.privco.com".concat(e)}}),(0,n.jsx)(s.r,{templateColumns:"1fr",flex:1,minH:0,children:(0,n.jsx)(C,{})})]})};_.getLayout=t=>(0,n.jsx)(r.Z,{children:t});var E=_}},function(t){t.O(0,[3662,2013,4517,6986,6018,7009,3881,3183,156,3974,9521,9858,7936,9369,3584,6708,6013,105,4143,5974,1227,1951,9774,2888,179],function(){return t(t.s=3221)}),_N_E=t.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.