PageSourceSearch

https://triboapp.com/_next/static/chunks/6060-6f36b634621c540e.js

js triboapp.com collected 2026-10-09 22:17:03 UTC 12,978 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},s=(new e.Error).stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="86031199-5a26-43a7-95a1-d99e91d32156",e._sentryDebugIdIdentifier="sentry-dbid-86031199-5a26-43a7-95a1-d99e91d32156")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6060],{23917:(e,s,t)=>{t.d(s,{M:()=>h});var a=t(37876),l=t(19040);let r=(0,t(97814).A)("puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);var n=t(46443),i=t(96851),c=t(48230),d=t.n(c);let o=e=>{let{href:s="/t",action:t,message:l}=e,c=(0,i.c)();return(0,a.jsx)("div",{className:"animate-fadeIn delay-1000 duration-1000",children:(0,a.jsxs)("div",{className:"container flex min-h-[calc(100dvh-65px)] max-w-4xl mx-auto  flex-col items-center justify-center px-4 py-12",children:[(0,a.jsx)(r,{className:"text-primary w-32 h-32 mb-6"}),(0,a.jsx)("div",{className:"text-secondary text-2xl font-bold",children:c("no_tribo_message")}),(0,a.jsx)("div",{className:"text-secondary text-2xl",children:l||c("no_tribo_details")}),(0,a.jsxs)(d(),{prefetch:!1,href:s,className:"btn btn-accent my-12 mt-6 w-64",children:[t||c("back_to_list"),(0,a.jsx)(n.A,{})]})]})})};var u=t(89099),x=t.n(u),m=t(14232);let h=e=>{let{children:s}=e,{query:t}=(0,u.useRouter)(),{alias:r}=t,{tribo:n,triboerror:i}=(0,l.A)();return(0,m.useEffect)(()=>{(null==i?void 0:i.status)===421&&x().push("/t/public/".concat(r))},[i,r]),n?s:i?(0,a.jsx)(o,{href:(null==i?void 0:i.status)===421?"/t/public/".concat(r):"/t",action:(null==i?void 0:i.status)===421?"Join":"Back to homepage",message:null==i?void 0:i.message}):null}},24249:(e,s,t)=>{t.d(s,{S:()=>d});var a=t(37876),l=t(48230),r=t.n(l),n=t(14232),i=t(19915),c=t(93005);let d=e=>{let{user:s,prefix:t,message:l,children:d,onIntersect:o}=e,u=(0,n.useRef)();return(0,n.useEffect)(()=>{if(!(null==u?void 0:u.current))return;let e=new IntersectionObserver(e=>{let[s]=e;o&&s.isIntersecting&&o(s)});return e.observe(u.current),()=>e.disconnect()},[o]),(0,a.jsx)("li",{ref:u,children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 px-2",children:[(0,a.jsx)(r(),{prefetch:!1,href:"".concat(t).concat(s.id),className:"flex flex-1",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(i.A,{user:s}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col",children:[(0,a.jsx)("div",{children:s.displayName}),l&&(0,a.jsx)("div",{className:"text-xs italic",children:l}),s.role&&s.role!==c.fo.user&&(0,a.jsx)("div",{className:"text-xs opacity-60",children:s.primary_user?"owner":s.role})]})]})}),(0,a.jsx)("div",{className:"flex justify-end max-sm:flex-1",children:d})]})})}},26451:(e,s,t)=>{t.d(s,{A:()=>A});var a=t(37876),l=t(59435),r=t(28249),n=t(96851),i=t(72991),c=t(19095),d=t(55204),o=t(34356),u=t(19040),x=t(52755),m=t(64890),h=t(41885),f=t(48230),g=t.n(f),p=t(14232),v=t(19915),b=t(82962);let j=e=>{let{user:s}=e,t=s.tags||[];return 0===t.length?null:(0,a.jsx)("div",{className:"w-full flex gap-2 items-center justify-center flex-wrap",children:t.map(e=>(0,a.jsx)(b.E,{tag:e},e.id))})};var N=t(73375);let y=e=>{let{user:s,prefix:t,onIntersect:l}=e,r=(0,p.useRef)(null);(0,p.useEffect)(()=>{if(!(null==r?void 0:r.current))return;let e=new IntersectionObserver(e=>{let[s]=e;l&&s.isIntersecting&&l(s)});return e.observe(r.current),()=>e.disconnect()},[l]);let{id:n,displayName:i}=s;return(0,a.jsxs)("div",{ref:r,className:"hover:shadow-xl border border-transparent hover:border-separator/25 rounded-xl py-4 px-2",children:[(0,a.jsxs)(g(),{prefetch:!1,href:"".concat(t).concat(n),className:"flex flex-col items-center gap-1",children:[(0,a.jsx)(v.A,{user:s,size:"xxl"}),(0,a.jsx)("div",{className:"text-sm font-semibold mt-4 text-center",children:i})]}),(0,a.jsxs)("div",{className:"mt-1 flex flex-col items-center gap-1",children:[(0,a.jsx)(j,{user:s}),(0,a.jsx)(N.t,{user:s})]})]})},A=e=>{let{tribo_id:s,prefix:t}=e,f=(0,n.c)(),{user:g}=(0,o.A)(),{tribo:p}=(0,u.A)(),{data:v}=(0,d.M1)((null==g?void 0:g.id)?"users/".concat(g.id):void 0,{tribo_id:s}),b=(null==g?void 0:g.id)?{id:g.id,displayName:g.displayName,photoURL:g.photoURL,first_name:g.first_name,last_name:g.last_name,role:null==p?void 0:p.role,primary_user:null==p?void 0:p.primary_user,relation:null,tags:(null==v?void 0:v.tags)||[],segmentations:[],updatedAt:g.updatedAt||""}:null,{users:j,received:N,hasMoreUsers:A,onAccept:w,onDecline:_,onMessage:k,loadMore:C,search:R,setSearch:T,isLoadingUsers:I}=(0,m.H)({tribo_id:s});return(0,a.jsxs)("div",{className:"@container space-y-6",children:[(0,a.jsx)("div",{className:"sticky top-16 z-10 bg-background/50 backdrop-blur-sm py-1",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,a.jsx)(c.FT.TextInput,{title:"Search participants",placeholder:f("placeholder_users_toolbar"),value:R||"",onChange:e=>T(e.target.value),leading:I?(0,a.jsx)(i.A,{size:"sm",className:"mx-0.5"}):(0,a.jsx)(l.A,{className:"text-base-content/50 size-5"}),trailing:(null==R?void 0:R.length)?(0,a.jsx)("button",{"data-testid":"btn-clearsearch",type:"button",className:"btn btn-sm btn-circle btn-ghost",onClick:()=>T(""),children:(0,a.jsx)(r.A,{className:"size-4"})}):null}),(0,a.jsx)(h.F,{tribo_id:s,max:2})]})}),N.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"text-sm font-semibold",children:"New connection requests"}),(0,a.jsx)("ul",{className:"menu w-full divide-y divide-separator/50 px-0",children:(0,a.jsx)(x.k,{items:N,prefix:t,onAccept:w,onDecline:_})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 @lg:grid-cols-3 @3xl:grid-cols-4 gap-4",children:[b&&(0,a.jsx)(y,{user:b,prefix:t},"me"),j.map((e,s)=>(0,a.jsx)(y,{user:e,prefix:t,onIntersect:A&&s===j.length-1?C:void 0},e.id))]}),0===j.length&&(0,a.jsx)("div",{className:"blurred-menu alert my-4",children:f("no_fit_users")})]})}},29689:(e,s,t)=>{t.d(s,{C:()=>c});var a=t(37876),l=t(93784),r=t(96851),n=t(96969);let i=e=>{let{title:s,message:t,className:l="",icon:n,children:i}=e,c=(0,r.c)();return(0,a.jsxs)("div",{className:"alert shadow-lg ".concat(l),children:[n,(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"font-bold",children:[" ",c(s)]}),(0,a.jsx)("div",{className:"text-xs",children:t})]}),i]})},c=e=>{let{onReload:s,...t}=e,c=(0,r.c)();return(0,a.jsx)("div",{children:(0,a.jsx)(i,{className:"alert-error",title:"error",icon:(0,a.jsx)(l.A,{}),...t,children:(0,a.jsx)(n.Ay,{title:c("reload"),color:"accent",className:"btn-sm",onClick:s})})})}},41885:(e,s,t)=>{t.d(s,{F:()=>m});var a=t(37876),l=t(96851),r=t(65984),n=t(14232),i=t(5199),c=t(59688),d=t(19095),o=t(34356),u=t(93005);let x=new Map,m=e=>{let{tribo_id:s,param:t="tags",max:m,hideTitle:h=!1}=e,f=(0,l.c)(),{token:g}=(0,o.A)(),[p,v]=(0,r.ZA)(t,r.tU.withDefault("")),[b,j]=(0,n.use
1State)([]);(0,n.useEffect)(()=>{if(!s||!g)return;let e=!1;return(async()=>{try{let t=await ((e,s)=>{let t=String(e),a=x.get(t);if(!a){let{get:l}=(0,d.nC)({token:s});(a=l("/t/".concat(e,"/segmentations")).then(e=>e||[])).catch(()=>x.delete(t)),x.set(t,a)}return a})(s,g);e||j(t)}catch(s){e||c.oR.error(s.message)}})(),()=>{e=!0}},[s,g]);let N=p?p.split(",").filter(Boolean).map(Number):[],y=new Set(N),A=null!=m&&N.length>=m,w=e=>u.JH[e]||u.JH.interest,_=N.map(e=>{var s;let t=b.find(s=>s.id===e);return{value:e,label:null!=(s=null==t?void 0:t.name)?s:String(e),kind:null==t?void 0:t.kind}}),k=A?[]:b.filter(e=>!y.has(e.id)).map(e=>({value:e.id,label:e.name,kind:e.kind}));return(0,a.jsxs)("div",{className:"tags-filter flex flex-col",children:[!h&&(0,a.jsx)("span",{className:"text-sm font-medium pb-1",children:f("filter_by_tags")}),(0,a.jsx)(i.ReactTags,{allowNew:!1,collapseOnSelect:!1,labelText:f("filter_by_tags"),placeholderText:N.length>0?"":f(h?"filter_by_tags":"search_segmentation"),noOptionsText:f("no_items_segmentation"),selected:_,suggestions:k,onAdd:e=>{let s=Number(e.value);!s||y.has(s)||A||v([...N,s].join(","))},onDelete:e=>{v(N.filter((s,t)=>t!==e).join(","))},renderTag:e=>{let{classNames:s,tag:t,...l}=e;return(0,a.jsxs)("button",{type:"button",className:s.tag,...l,children:[(0,a.jsx)("span",{className:"badge badge-xs me-1 align-middle ".concat(w(t.kind))}),(0,a.jsx)("span",{className:"".concat(s.tagName," max-w-32 truncate inline-block align-middle"),children:t.label})]})},renderOption:e=>{let{classNames:s,option:t,children:l,...r}=e;return(0,a.jsxs)("div",{className:"".concat(s.option," ").concat(t.active?s.optionIsActive:""),...r,children:[(0,a.jsx)("span",{className:"badge badge-xs me-2 align-middle ".concat(w(t.kind))}),l]})}})]})}},52755:(e,s,t)=>{t.d(s,{k:()=>d});var a=t(37876),l=t(32257),r=t(28249),n=t(96851),i=t(96969),c=t(24249);let d=e=>{let{items:s,prefix:t,onAccept:d,onDecline:o}=e,u=(0,n.c)();return s.map((e,s)=>(0,a.jsx)(c.S,{user:e,message:e.message,prefix:t,children:(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsx)(i.Ay,{color:"success",variant:"soft",title:u("accept"),trailing:(0,a.jsx)(l.A,{}),onClick:()=>d(e.connection_id),className:"btn-sm flex-nowrap"}),(0,a.jsx)(i.Ay,{color:"error",variant:"soft",title:u("decline"),trailing:(0,a.jsx)(r.A,{}),onClick:()=>o(e.connection_id),className:"btn-sm flex-nowrap"})]})},e.id))}},64890:(e,s,t)=>{t.d(s,{H:()=>f});var a=t(89099),l=t(65984),r=t(14232),n=t(31777),i=t(59688),c=t(63853),d=t(19095),o=t(34356),u=t(69454),x=t(93005),m=t(68339),h=t(47224);let f=e=>{let{tribo_id:s=null}=e,t=(0,n.wA)(),f=(0,a.useRouter)(),{query:g}=f,{alias:p}=g,{token:v}=(0,o.A)(),[b,j]=(0,l.ZA)("search",l.tU.withDefault("")),[N]=(0,l.ZA)("tags",l.tU.withDefault("")),[y]=(0,c.d7)(b,500),{users:A,received:w,isLoadingUsers:_,isLoadingReceived:k,hasMoreUsers:C}=(0,u.A)();(0,r.useEffect)(()=>{t(h.A.loadReceived({tribo_id:s,limit:12}))},[t,s]),(0,r.useEffect)(()=>{t(h.A.searchUsers({search:y,tags:N,tribo_id:s,limit:12}))},[t,v,s,y,N]),(0,r.useEffect)(()=>{let e=()=>{setTrigger(e=>!e)};return m.A.on("user:connect",e),()=>{m.A.off("user:connect",e)}},[]);let R=(0,r.useCallback)(async e=>{try{let{post:s}=(0,d.nC)({token:v}),a=await s("/users/connections/".concat(e));t(h.A.updateRelation(a)),setTrigger(e=>!e)}catch(e){i.oR.error(e.message)}},[v,t]),T=(0,r.useCallback)(async e=>{try{let{put:s}=(0,d.nC)({token:v}),a=await s("/users/connections/".concat(e));t(h.A.updateRelation(a)),setTrigger(e=>!e)}catch(e){i.oR.error(e.message)}},[v,t]);(0,r.useCallback)(async e=>{try{let{post:s}=(0,d.nC)({token:v}),a=await s("/users/".concat(e,"/unblock"));t(h.A.updateRelation(a)),setTrigger(e=>!e)}catch(e){i.oR.error(e.message)}},[v,t]);let I=(0,r.useCallback)(async e=>{try{let{post:t}=(0,d.nC)({token:v}),a=await t("/conversations",{type:x.mM.p2p,tribo_id:s,users:[e]});f.push(p?"/t/".concat(p,"/chat/").concat(a.id):"/chat/".concat(a.id))}catch(e){i.oR.error(e.message)}},[v,t]),E=(0,r.useCallback)(()=>{_||t(h.A.searchUsers({tribo_id:s,search:y,tags:N,offset:A.length,limit:12}))},[v,t,_,A.length,s,y,N]);return{isLoadingUsers:_,isLoadingReceived:k,users:A,received:w.filter(e=>e.displayName.toLowerCase().includes(b)),hasMoreUsers:C,loadMore:E,search:b,setSearch:j,onAccept:R,onDecline:T,onMessage:I}}},69454:(e,s,t)=>{t.d(s,{A:()=>l});var a=t(31777);let l=()=>(0,a.d4)(e=>e.users)},73375:(e,s,t)=>{t.d(s,{t:()=>r});var a=t(37876),l=t(93005);let r=e=>{let{user:s}=e,{role:t,primary_user:r}=s;return t&&t!==l.fo.user&&(0,a.jsx)("div",{className:"badge badge-xs badge-primary badge-soft",children:r?"owner":t})}},73888:(e,s,t)=>{t.d(s,{A:()=>x});var a=t(37876),l=t(31777),r=t(89099),n=t(29689),i=t(45466),c=t(19040);let d=()=>{let e=(0,l.wA)(),{alias:s}=(0,r.useRouter)().query,{error:t}=(0,c.A)();return t&&s?(0,a.jsx)(n.C,{error:t,onReload:()=>e(i.A.loadTribo(s))}):null};var o=t(23917),u=t(6062);let x=e=>{let{children:s,isFeed:t,wide:l}=e;return(0,a.jsxs)(u.A,{bodyClass:"px-4 ".concat(t?"":l?"max-w-8xl":"max-w-7xl"," mx-auto min-h-[calc(100dvh-64px-0px)]"),children:[(0,a.jsx)(d,{}),(0,a.jsx)(o.M,{children:s})]})}},82962:(e,s,t)=>{t.d(s,{E:()=>c});var a=t(37876),l=t(48230),r=t.n(l),n=t(89099),i=t(93005);let c=e=>{let{tag:s,href:t}=e,l=(0,n.useRouter)(),c=i.JH[s.kind]||i.JH.interest,d="badge badge-sm rounded-full ".concat(c),o=null!=t?t:((e,s)=>(null==e?void 0:e.alias)?"/t/".concat(e.alias,"/users?tags=").concat(s):(null==e?void 0:e.tribo_id)?"/ta/".concat(e.tribo_id,"/users?segmentations=").concat(s):null)(l.query,s.id);return o?(0,a.jsx)(r(),{href:o,className:d,onClick:e=>e.stopPropagation(),children:s.name}):(0,a.jsx)("span",{className:d,children:s.name})}}}]);

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.