1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3582],{8444:(e,r,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/user/[user]/conversations",function(){return n(52085)}])},15369:(e,r,n)=>{"use strict";n.d(r,{A:()=>s});class t extends Error{name="PageError";statusCode=400}class s extends t{name="PageNotFoundError";statusCode=404;constructor(e="Oh no! This page does not exist."){super(e)}}},52085:(e,r,n)=>{"use strict";n.r(r),n.d(r,{__N_SSP:()=>E,default:()=>k});var t=n(18153),s=n(42720),i=n(39955),a=n(99407),l=n(63973),d=n(2665),c=n(55791),o=n(43043),h=n(64435),u=n(91921),p=n(89099),_=n(3489),m=n(92592),A=n(46915),v=n(55720),f=n(4724),N=n(54443),x=n(15369),T=n(61110),Y=n(46304),y=n(65082),w=n(49783),C=n(46860),g=n(68359);let j=(0,T.A)(function(){let e=(0,p.useRouter)(),r=(0,N.I)(),n=(0,f.U)(),T=Number.parseInt(`${e.query.user}`,10),j=r.one(v.Ay.where({id:T,paranoid:!1}))(v.Ay.id);if(!n.dryRun&&null==j)throw new x.A("Oh no! This user account does not exist.");let E=r.many(m.A.where({userId:T,include:[{association:"Conversation",required:!0,paranoid:!1,include:[{association:"Series",paranoid:!1,required:!1}]}],paranoid:!1,order:[[m.A.created_at,"desc"]]}))??[];return(0,t.Y)(w.A,{title:`User#${j}`,children:(0,t.FD)(s.m,{maxW:"container.xl",py:8,children:[(0,t.Y)(y.A,{queryUserId:T,currentTab:"Conversations"}),(0,t.Y)(i.a,{overflowX:"auto",children:(0,t.FD)(a.X,{children:[(0,t.Y)(l.d,{children:(0,t.FD)(d.Tr,{children:[(0,t.Y)(c.Th,{children:"Conversation"}),(0,t.Y)(c.Th,{children:"Members"}),(0,t.Y)(c.Th,{children:"Series Title"}),(0,t.Y)(c.Th,{children:"Type"}),(0,t.Y)(c.Th,{children:"Created At"}),(0,t.Y)(c.Th,{children:"Status"})]})}),(0,t.Y)(o.N,{children:E.map(e=>{let r=e(m.A.conversation_id)??0,n=e(_.A.type),s=e(m.A.created_at),i=e(m.A.deleted_at),a=e(m.A.countConversationParticipants({conversationId:_.A.id}))??0,l=e.many(m.A.getConversationParticipant({conversationId:_.A.id,selfUserId:T,limit:10}))??[];return(0,t.FD)(d.Tr,{children:[(0,t.Y)(h.Td,{children:(0,t.FD)(C.A,{href:(0,Y.Cjk)(r),children:["Conversation #",r]})}),(0,t.Y)(h.Td,{children:l.length>0?(0,t.FD)(t.FK,{children:[l.map((e,r)=>{let n=e(m.A.user_id),s=e(v.Ay.display_name);return(0,t.FD)("span",{children:[(0,t.Y)(C.A,{href:(0,Y.hTK)(`user/${n}`),children:s}),r<9?", ":""]},e(m.A.id)??0)}),(0,t.Y)(u.E,{as:"span",color:"fg.subtle",whiteSpace:"nowrap",children:a>10?` +${a-10} more`:""})]}):"N/A"}),(0,t.Y)(h.Td,{children:e(A.A.title)??"N/A"}),(0,t.Y)(h.Td,{children:n??"N/A"}),(0,t.Y)(h.Td,{children:null!=s?(0,t.Y)(g.A,{time:s}):"N/A"}),(0,t.Y)(h.Td,{children:null!=i?(0,t.Y)(u.E,{as:"span",color:"fg.error",children:"No longer in conversation"}):"Active"})]},r)})})]})})]})})},{authScopes:["admin:users:read"]});var E=!0;let k=j},55791:(e,r,n)=>{"use strict";n.d(r,{Th:()=>l});var t=n(37876),s=n(99407),i=n(11842),a=n(85696);let l=(0,i.R)(({isNumeric:e,...r},n)=>{let i=(0,s.k)();return(0,t.jsx)(a.B.th,{...r,ref:n,__css:i.th,"data-is-numeric":e})})},63973:(e,r,n)=>{"use strict";n.d(r,{d:()=>l});var t=n(37876),s=n(99407),i=n(11842),a=n(85696);let l=(0,i.R)((e,r)=>{let n=(0,s.k)();return(0,t.jsx)(a.B.thead,{...e,ref:r,__css:n.thead})})},83328:(e,r,n)=>{"use strict";n.d(r,{C:()=>c});var t=n(37876),s=n(29185),i=n(75255),a=n(11842),l=n(66394),d=n(85696);let c=(0,a.R)(function(e,r){let n=(0,l.V)("Code",e),{className:a,...c}=(0,s.M)(e);return(0,t.jsx)(d.B.code,{ref:r,className:(0,i.cx)("chakra-code",e.className),...c,__css:{display:"inline-block",...n}})});c.displayName="Code"},84878:(e,r,n)=>{"use strict";n.d(r,{l:()=>m});var t=n(37876),s=n(29185),i=n(33527),a=n(46396),l=n(71851),d=n(14232),c=n(75255),o=n(11842),h=n(85696);let u=(0,o.R)(function(e,r){let{children:n,placeholder:s,className:i,...a}=e;return(0,t.jsxs)(h.B.select,{...a,ref:r,className:(0,c.cx)("chakra-select",i),children:[s&&(0,t.jsx)("option",{value:"",children:s}),n]})});u.displayName="SelectField";var p=n(70667),_=n(66394);let m=(0,o.R)((e,r)=>{let n=(0,_.o)("Select",e),{rootProps:d,placeholder:c,icon:o,color:m,height:A,h:v,minH:N,minHeight:x,iconColor:T,iconSize:Y,...y}=(0,s.M)(e),[w,C]=(0,a.l)(y,i.GF),g=(0,p.t)(C),j={paddingEnd:"2rem",...n.field,_focus:{zIndex:"unset",...n.field?._focus}};return(0,t.jsxs)(h.B.div,{className:"chakra-select__wrapper",__css:{width:"100%",height:"fit-content",position:"relative",color:m},...w,...d,children:[(0,t.jsx)(u,{ref:r,height:v??A,minH:N??x,placeholder:c,...g,__css:j,children:e.children}),(0,t.jsx)(f,{"data-disabled":(0,l.s)(g.disabled),...(T||m)&&{color:T||m},__css:n.icon,...Y&&{fontSize:Y}
1,children:o})]})});m.displayName="Select";let A=e=>(0,t.jsx)("svg",{viewBox:"0 0 24 24",...e,children:(0,t.jsx)("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}),v=(0,h.B)("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),f=e=>{let{children:r=(0,t.jsx)(A,{}),...n}=e,s=(0,d.cloneElement)(r,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return(0,t.jsx)(v,{...n,className:"chakra-select__icon-wrapper",children:(0,d.isValidElement)(r)?s:null})};f.displayName="SelectIcon"}},e=>{e.O(0,[6425,2035,636,6593,8792],()=>e(e.s=8444)),_N_E=e.O()}]); 2//# sourceMappingURL=conversations-3bfa491de316f767.js.map
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.