1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[77615,22466],{24026:function(e,t,n){var r=n(65724);t.Z=e=>{let{className:t="h-5 w-5"}=e;return(0,r.jsx)("svg",{viewBox:"0 0 512 512",fill:"currentColor",className:t,"aria-hidden":"true",focusable:"false",children:(0,r.jsxs)("g",{transform:"translate(256, 256)",children:[(0,r.jsx)("rect",{x:"-18",y:"-185",width:"36",height:"120",rx:"18"}),(0,r.jsx)("rect",{x:"-18",y:"-131",width:"36",height:"85",rx:"18",transform:"rotate(45)"}),(0,r.jsx)("rect",{x:"65",y:"-18",width:"120",height:"36",rx:"18"}),(0,r.jsx)("rect",{x:"-18",y:"46",width:"36",height:"85",rx:"18",transform:"rotate(45)"}),(0,r.jsx)("rect",{x:"-18",y:"65",width:"36",height:"120",rx:"18"}),(0,r.jsx)("rect",{x:"-18",y:"46",width:"36",height:"85",rx:"18",transform:"rotate(-45)"}),(0,r.jsx)("rect",{x:"-185",y:"-18",width:"120",height:"36",rx:"18"}),(0,r.jsx)("rect",{x:"-18",y:"-131",width:"36",height:"85",rx:"18",transform:"rotate(-45)"})]})})}},74046:function(e,t,n){n.d(t,{Avatar:function(){return s},AvatarFallback:function(){return u},AvatarImage:function(){return l}});var r=n(65724),o=n(36739),a=n(2512),i=n(76205);let s=(0,a.forwardRef)((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(o.fC,{ref:t,className:(0,i.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",n),...a})});s.displayName=o.fC.displayName;let l=(0,a.forwardRef)((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(o.Ee,{ref:t,className:(0,i.cn)("aspect-square h-full w-full",n),...a})});l.displayName=o.Ee.displayName;let u=(0,a.forwardRef)((e,t)=>{let{className:n,...a}=e;return(0,r.jsx)(o.NY,{ref:t,className:(0,i.cn)("flex h-full w-full items-center justify-center rounded-full bg-muted",n),...a})});u.displayName=o.NY.displayName},6749:function(e,t,n){n.d(t,{d:function(){return l},z:function(){return u}});var r=n(65724),o=n(16427),a=n(44365),i=n(2512),s=n(76205);let l=(0,a.j)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium ring-offset-background transition-all duration-200 ease-in-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98]",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow-md",brand:"bg-brand text-brand-foreground shadow-sm hover:bg-brand-emphasis hover:shadow-brand-glow",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground hover:shadow-md",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 hover:shadow-md",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-brand underline-offset-4 hover:underline",success:"bg-emerald-600 text-white shadow-sm hover:bg-emerald-700 hover:shadow-md",warning:"bg-amber-500 text-white shadow-sm hover:bg-amber-600 hover:shadow-md"},size:{default:"h-10 px-4 py-2",xs:"h-8 rounded-md px-2.5 text-xs",sm:"h-9 rounded-md px-3 text-xs",lg:"h-11 rounded-md px-8 text-base",xl:"h-12 rounded-lg px-10 text-base font-semibold",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),u=(0,i.forwardRef)((e,t)=>{let{className:n,variant:a,size:i,asChild:u=!1,loading:c=!1,children:d,disabled:f,...h}=e,p=u?o.g7:"button";return(0,r.jsx)(p,{className:(0,s.cn)(l({variant:a,size:i,className:n})),ref:t,disabled:f||c,...h,children:c?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("svg",{className:"h-4 w-4 animate-spin",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),(0,r.jsx)("span",{children:d})]}):d})});u.displayName="Button"},62728:function(e,t,n){n.d(t,{L:function(){return r}});let r=()=>{let e=0;return{begin:()=>{let t=e+=1;return{isLatest:()=>t===e}}}}},59316:function(e,t,n){n.d(t,{x:function(){return i}});var r=n(16584),o=n(22466);class a{constructor(e,t){this.get=async(e,t)=>(await this.axiosInstance.get("".concat(e),t)).data,this.getAll=async e=>(await this.axiosInstance.get(e)).data,this.post=async(e,t)=>(await this.axiosInstance.post(e,t)).data,this.put=async(e,t)=>(await this.axiosInstance.put(e,t)).data,this.delete=async e=>(await this.axiosInstance.delete(e)).data,this.patch=async(e,t)=>(await this.axiosInstance.patch(e,t)).data,this.postMultiPart=async(e,t,n)=>(await this.axiosInstance.post(e,t,n)).data,this.axiosInstance=r.default.create({baseURL:e}),this.axiosInstance.interceptors.request.use(e=>((null==t?void 0:t.headers)&&(e.headers={...e.headers,...t.headers}),e),e=>Promise.reject(e)),(0,o.H)(this.axiosInstance)}}let i=new a("/api/v2")},54211:function(e,t,n){n.d(t,{Ei:function(){return r},M2:function(){return a},SG:function(){return c},wj:function(){return o},y6:function(){return d},y9:function(){return u}});let r=2,o=4,a=25,i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;return new Date(e.closes_at).getTime()<=t.getTime()},s=e=>{let t=e.reduce((e,t)=>
1e+t,0);if(t<=0)return e.map(()=>0);let n=e.map(e=>100*e/t),r=n.map(Math.floor),o=100-r.reduce((e,t)=>e+t,0),a=n.map((e,t)=>({index:t,remainder:e-Math.floor(e)})).sort((e,t)=>t.remainder-e.remainder||e.index-t.index),i=[...r];for(let{index:e}of a){if(o<=0)break;i[e]+=1,o-=1}return i},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date;if(i(e,t))return"Final results";let n=Math.floor((new Date(e.closes_at).getTime()-t.getTime())/6e4);if(n<1)return"Less than a minute left";if(n<60)return"".concat(n," ").concat(1===n?"minute":"minutes"," left");let r=Math.floor(n/60);if(r<24)return"".concat(r," ").concat(1===r?"hour":"hours"," left");let o=Math.floor(r/24);return"".concat(o," ").concat(1===o?"day":"days"," left")},u=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n=i(e,t),r=!!e.viewer_option_id,o=r||n,a=[...e.options].sort((e,t)=>e.position-t.position),u=a.map(e=>Math.max(0,e.vote_count||0)),c=u.reduce((e,t)=>e+t,0),d=s(u),f=u.length>0?Math.max(...u):0;return{isClosed:n,hasVoted:r,showResults:o,canVote:!n&&!r,totalVotes:c,statusLabel:l(e,t),options:a.map((t,n)=>({...t,vote_count:u[n],percentage:d[n],isLeading:o&&c>0&&u[n]===f,isViewerChoice:t.option_id===e.viewer_option_id}))}},c=e=>{let t=[],n=e.options.map(e=>e.trim()),i=n.filter(e=>e.length>0);return i.length<r&&t.push("too_few_options"),n.length>o&&t.push("too_many_options"),i.length>=r&&n.slice(0,i.length).some(e=>0===e.length)&&t.push("blank_option"),n.some(e=>e.length>
1a)&&t.push("option_too_long"),new Set(i.map(e=>e.toLowerCase())).size!==i.length&&t.push("duplicate_options"),e.durationMinutes<5&&t.push("duration_too_short"),e.durationMinutes>10080&&t.push("duration_too_long"),{valid:0===t.length,errors:t}},d=e=>{switch(e){case"too_few_options":return"A poll needs at least ".concat(r," choices.");case"too_many_options":return"A poll can have at most ".concat(o," choices.");case"blank_option":return"Fill in every choice, or remove the empty ones.";case"option_too_long":return"Each choice can be up to ".concat(a," characters.");case"duplicate_options":return"Each choice needs to be different.";case"duration_too_short":return"A poll has to run for at least ".concat(5," minutes.");case"duration_too_long":return"A poll can run for at most 7 days."}}},61323:function(e,t,n){n.d(t,{L:function(){return g},default:function(){return w},W:function(){return v}});var r=n(65724),o=n(2512),a=n(62728),i=n(56558);let s="community:hidden-post-ids",l="community:feed-snapshot",u=()=>{try{let e=window.localStorage.getItem(s),t=e?JSON.parse(e):[];return new Set(Array.isArray(t)?t:[])}catch(e){return new Set}},c=e=>{window.localStorage.setItem(s,JSON.stringify(Array.from(e)))},d=(e,t,n)=>(0,i.ai)(e,t,{exclude:n}),f=()=>{try{let e=window.sessionStorage.getItem(l);if(!e)return null;let t=JSON.parse(e);return Array.isArray(null==t?void 0:t.posts)?t:null}catch(e){return null}},h=e=>{try{window.sessionStorage.setItem(l,JSON.stringify({...e,posts:e.posts.slice(0,60)}))}catch(e){}},p=e=>{var t,n,r,o;let a=(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.posts)?e.data:null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.data;return{posts:null!==(o=null==a?void 0:a.posts)&&void 0!==o?o:[],hasMore:!!(null==a?void 0:null===(r=a.pagination)||void 0===r?void 0:r.hasMore)}},m=e=>{let{initialPosts:t,source:n,initialFeedType:r}=e,i="global-feed"===n,[s,l]=(0,o.useState)(()=>u()),[m,g]=(0,o.useState)(()=>t.filter(e=>!s.has(e.post_id))),[v,w]=(0,o.useState)(!1),[y,x]=(0,o.useState)(t.length>=12||i),[b,_]=(0,o.useState)(1),[S,C]=(0,o.useState)(!1),[k,A]=(0,o.useState)(r),[N,E]=(0,o.useState)(""),[M,j]=(0,o.useState)([]),[L,I]=(0,o.useState)(!1),[z,R]=(0,o.useState)(!1),[D,P]=(0,o.useState)(0),[F,T]=(0,o.useState)(1),[U,Z]=(0,o.useState)(!1),[q,O]=(0,o.useState)([]),W=(0,o.useRef)(!1),Y=(0,o.useRef)((0,a.L)()),$=(0,o.useRef)(m);$.current=m;let B=(0,o.useRef)(q);B.current=q;let J=N.trim(),H=i&&J.length>=2;(0,o.useEffect)(()=>{g(e=>e.filter(e=>!s.has(e.post_id))),j(e=>e.filter(e=>!s.has(e.post_id)))},[s]);let K=(0,o.useCallback)(e=>{l(t=>{let n=new Set(t);return n.add(e),c(n),n}),g(t=>t.filter(t=>t.post_id!==e)),j(t=>t.filter(t=>t.post_id!==e))},[]),V=(0,o.useCallback)(e=>{s.has(e.post_id)||g(t=>[e,...t])},[s]),G=(0,o.useCallback)((e,t)=>{let n=n=>n.map(n=>n.post_id===e?{...n,...t}:n);g(n),j(n)},[]),Q=(0,o.useCallback)(e=>i?"/api/v2/community/feed?feedType=".concat(k,"&page=").concat(e,"&pageSize=").concat(12):"/api/v2/community/posts?page=".concat(e,"&pageSize=").concat(12),[k,i]),X=(0,o.useCallback)(async(e,t)=>{let n=Y.current.begin();W.current=!0,w(!0),C(!1);try{let r=await fetch(Q(e));if(!r.ok)throw Error("Failed to fetch posts (".concat(r.status,")"));let o=await r.json(),{posts:a,hasMore:i}=p(o);if(!n.isLatest())return;let s=u();"replace"===t?g(d([],a,s)):g(e=>d(e,a,s)),_(e),x(a.length>0&&i)}catch(e){if(!n.isLatest())return;console.error("Failed to load posts:",e),C(!0)}finally{n.isLatest()&&(w(!1),W.current=!1)}},[Q]),ee=(0,o.useCallback)(async(e,t,n,r)=>{I(!0),R(!1);try{var o,a,i,s;let l=await fetch("/api/v2/community/posts/search?q=".concat(encodeURIComponent(e),"&page=").concat(t,"&pageSize=").concat(12),{signal:r});if(!l.ok)throw Error("Search failed (".concat(l.status,")"));let c=await l.json(),f=null!==(s=null==c?void 0:null===(o=c.data)||void 0===o?void 0:o.posts)&&void 0!==s?s:[],h=u();"replace"===n?j(d([],f,h)):j(e=>d(e,f,h)),T(t),Z(!!(null==c?void 0:null===(i=c.data)||void 0===i?void 0:null===(a=i.pagination)||void 0===a?void 0:a.hasMore))}catch(e){if((null==e?void 0:e.name)==="AbortError")return;console.error("Post search failed:",e),R(!0),"replace"===n&&(j([]),Z(!1))}finally{(null==r?void 0:r.aborted)||I(!1)}},[]),et=(0,o.useCallback)(async()=>
1{if(H){if(L||!U)return;await ee(J,F+1,"append");return}!W.current&&y&&await X(b+1,"append")},[X,ee,y,H,L,b,U,F,J]),en=(0,o.useCallback)(async()=>{i&&(O([]),await X(1,"replace"))},[X,i]),er=(0,o.useCallback)(e=>{O([]),A(e)},[]),eo=(0,o.useCallback)(e=>{E(e)},[]),ea=(0,o.useCallback)(()=>{P(e=>e+1)},[]),ei=(0,o.useRef)(null),es=(0,o.useRef)(null),el=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(!i||el.current)return;el.current=!0;let e=f();if(!e||e.feedType!==k||Date.now()-e.savedAt>18e5)return;let t=d([],e.posts,u());0!==t.length&&(g(t),_(e.page),x(e.hasMore),ei.current=k,es.current=e.scrollY)},[k,i]),(0,o.useEffect)(()=>{let e=es.current;if(null===e||0===m.length)return;es.current=null;let t=requestAnimationFrame(()=>{requestAnimationFrame(()=>window.scrollTo(0,e))});return()=>cancelAnimationFrame(t)},[m.length]),(0,o.useEffect)(()=>{if(!i)return;let e=()=>{H||0===$.current.length||h({feedType:k,posts:$.current,page:b,hasMore:y,scrollY:window.scrollY,savedAt:Date.now()})};return window.addEventListener("pagehide",e),()=>{window.removeEventListener("pagehide",e),e()}},[k,y,i,H,b]);let eu=(0,o.useRef)(t.length>0?r:null);(0,o.useEffect)(()=>{if(i){if(ei.current===k){ei.current=null,eu.current=null;return}if(k===eu.current){eu.current=null;return}X(1,"replace")}},[k,X,i]),(0,o.useEffect)(()=>{if(!i)return;if(!H){j([]),I(!1),R(!1),T(1),Z(!1);return}let e=new AbortController;I(!0);let t=setTimeout(()=>{ee(J,1,"replace",e.signal)},300);return()=>{e.abort(),clearTimeout(t)}},[ee,i,H,D,J]),(0,o.useEffect)(()=>{if(!i||H||S)return;let e=!1,t=new AbortController,n=setInterval(async()=>{if("visible"===document.visibilityState)try{let n=await fetch(Q(1),{signal:t.signal});if(!n.ok)return;let{posts:r}=p(await n.json());if(e)return;let o=new Set([...$.current.map(e=>e.post_id),...B.current.map(e=>e.post_id)]),a=u(),i=r.filter(e=>(null==e?void 0:e.post_id)&&!o.has(e.post_id)&&!a.has(e.post_id));i.length>0&&O(e=>[...i,...e])}catch(e){}},45e3);return()=>{e=!0,t.abort(),clearInterval(n)}},[Q,i,H,S]);let ec=(0,o.useCallback)(()=>{O(e=>0===e.length?e:(g(t=>{let n=new Set(t.map(e=>e.post_id));return[...e.filter(e=>!n.has(e.post_id)),...t]}),[]))},[]),ed=H?M:m;return(0,o.useMemo)(()=>({posts:ed,setPosts:g,isLoading:H?L:v,hasMore:H?U:y,loadError:H?z:S,page:b,removePost:K,addPost:V,updatePost:G,loadMore:et,refresh:en,feedType:k,setFeedType:er,searchQuery:N,setSearchQuery:eo,retrySearch:ea,isSearchActive:H,pendingPostCount:H?0:q.length,showPendingPosts:ec}),[ed,H,L,v,y,U,z,S,b,K,V,G,et,en,k,er,N,eo,ea,q.length,ec])},g=(0,o.createContext)(void 0),v=()=>{let e=(0,o.useContext)(g);if(!e)throw Error("usePostsContext must be used within PostsProvider");return e};var w=e=>{let{children:t,initialPosts:n=[],source:o="manual",initialFeedType:a="for_you"}=e,i=m({initialPosts:n,source:o,initialFeedType:a});return(0,r.jsx)(g.Provider,{value:i,children:t})}},60997:function(e,t,n){n.d(t,{b:function(){return a}});var r=n(2512),o=n(61323);let a=()=>(0,r.useContext)(o.L);t.Z=()=>{let e=(0,r.useContext)(o.L);if(!e)throw Error("usePostsContext must be used inside PostsProvider");return e}},29787:function(e,t,n){n.d(t,{BD:function(){return a},qb:function(){return o}});var r=n(59316);let o=e=>r.x.post("/community/".concat(e.community_id,"/posts"),e),a=e=>r.x.get("/community/".concat(e,"/posts"))},56558:function(e,t,n){n.d(t,{ai:function(){return o}});let r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=new Set;for(let t of e)(null==t?void 0:t.post_id)&&r.add(t.post_id);let o=[];for(let e of t){var a;let t=null==e?void 0:e.post_id;!(!t||(null===(a=n.exclude)||void 0===a?void 0:a.has(t)))&&(r.has(t)||(r.add(t),o.push(e)))}return o},o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return[...e,...r(e,t,n)]}},43834:function(e,t,n){n.d(t,{a:function(){return r.a}});var r=n(98280)},58682:function(e,t,n){n.d(t,{N$:function(){return i},hA:function(){return r}});let r=1e3,o=e=>{var t;return(null!==(t=null==e?void 0:e.trim())&&void 0!==t?t:"").slice(0,r)},a=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return o(null===(t=e.image_alts)||void 0===t?void 0:t[n])||(0===n?o(e.image_alt):"")},i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return a(e,t)||(n>1?"Image ".concat(t+1," of ").concat(n):"Image")}},98280:function(e,t,n){n.d(t,{AuthProvider:function(){return d},a:function(){return f}});var r=n(65724),o=n(2512),a=n(79449);let i=(0,o.createContext)({session:null,user:null,communityUser:null,profile:null,isLoading:!0,error:null}),s=e=>{var t;return(null==e?void 0:null===(t=e.message)||void 0===t?void 0:t.includes("Auth session missing"))||(null==e?void 0:e.name)==="AuthSessionMissingError"},l=()=>({session:null,user:null,communityUser:null,profile:null,isLoading:!1,error:null}),u=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{session:e,user:e.user,communityUser:t,profile:n,isLoading:!1,error:r}},c=async e=>{let[{data:t},{data:n}]=await Promise.all([a.supabase.from("community_user").select("*").eq("user_id",e).single(),a.supabase.from("profiles").select("*").eq("id",e).single()]);return{communityUser:t,profile:n}};function d(e){var t,n,d;let{children:f,initialSession:h=null,initialCommunityUser:p=null,initialProfile:m=null}=e,[g,v]=(0,o.useState)({session:h,user:null!==(n=null==h?void 0:h.user)&&void 0!==n?n:null,communityUser:null!=p?p:null,profile:null!=m?m:null,isLoading:!h,error:null}),w=(0,o.useRef)(null!==(d=null==h?void 0:null===(t=h.user)||void 0===t?void 0:t.id)&&void 0!==d?d:null),y=(0,o.useRef)(0),x=(0,o.useCallback)(async e=>{let t=e.user.id;if(w.current===t){v(t=>({...t,session:e,user:e.user,isLoading:!1}));return}let n=++y.current;w.current=t;try{let{communityUser:r,profile:o}=await c(t);n===y.current&&v(u(e,r,o))}catch(t){n===y.current&&(console.error("Error fetching user data:",t),v(u(e,null,null,t)))}},[]);return(0,o.useEffect)(()=>{let e=async()=>{try{let{data:{session:e},error:t}=await a.supabase.auth.getSession();if(t){if(s(t)){v(l());return}console.error("Session error:",t),v(e=>({...e,isLoading:!1,error:t}));return}if(!(null==e?void 0:e.user)){v(l());return}await x(e)}catch(e){console.error("Error initializing auth:",e),v({...l(),error:e})}};h||e();let{data:{subscription:t}}=a.supabase.auth.onAuthStateChange(async(e,t)=>{if("SIGNED_OUT"===e||!t){w.current=null,y.current++,v(l());return}if("INITIAL_SESSION"===e){var n;if(w.current===(null===(n=t.user)||void 0===n?void 0:n.id))return;t.user&&await x(t);return}if(("SIGNED_IN"===e||"TOKEN_REFRESHED"===e)&&(null==t?void 0:t.user)){await x(t);return}t&&v(e=>({...e,session:t,user:t.user,isLoading:!1}))});return()=>{t.unsubscribe()}},[h,x]),(0,r.jsx)(i.Provider,{value:g,children:f})}function f(){let e=(0,o.useContext)(i);if(!e)throw Error("useAuth must be used within an AuthProvider");return e}},62134:function(e,t,n){n.d(t,{CZ:function(){return o},J$:function(){return l},Qm:function(){return i},Sy:function(){return d},Uy:function(){return c},_6:function(){return a},v2:function(){return s}});let r=e=>e.replace(/\.0$/,""),o=e=>{if("number"!=typeof e||!Number.isFinite(e))return"0";let t=Math.abs(e);return t>=1e6?"".concat(r((e/1e6).toFixed(1)),"M"):t>=1e4?"".concat(Math.round(e/1e3),"K"):t>
1=1e3?"".concat(r((e/1e3).toFixed(1)),"K"):e.toLocaleString("en-US")},a=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"".concat(t,"s");return"".concat(o(e)," ").concat(1===e?t:n)},i=e=>{let t=(null!=e?e:"").trim().split(/\s+/).filter(Boolean).slice(0,2);return 0===t.length?"?":t.map(e=>[...e][0]).join("").toUpperCase()},s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Member";return[null==e?void 0:e.first_name,null==e?void 0:e.last_name].filter(e=>!!e&&e.trim()).join(" ").trim()||t},l=e=>{if(!e)return null;let t=e.trim().replace(/'::text/g,"").replace(/::text/g,"").replace(/^['"]|['"]$/g,"").replace(/^'?https:\/([^/])/,"https://$1"),n="SzuSp5K29QFsFnrI2fDbPQ";return(n&&(t=t.replace(/^https?:\/\/(www\.)?instaloops\.com\/images\//,"https://imagedelivery.net/".concat(n,"/"))),/^https?:\/\//i.test(t)||t.startsWith("/"))?t:null},u=["from-blue-500 to-indigo-600","from-violet-500 to-fuchsia-600","from-sky-500 to-blue-600","from-emerald-500 to-teal-600","from-rose-500 to-pink-600","from-amber-500 to-orange-600","from-indigo-500 to-violet-600","from-cyan-500 to-sky-600"],c=e=>{let t=null!=e?e:"",n=0;for(let e=0;e<t.length;e+=1)n=31*n+t.charCodeAt(e)|0;return u[Math.abs(n)%u.length]},d=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();if(!e)return"";let n=Date.parse(e);if(!Number.isFinite(n))return"";let r=Math.max(0,t-n);if(r<6e4)return"now";if(r<36e5)return"".concat(Math.floor(r/6e4),"m");if(r<864e5)return"".concat(Math.floor(r/36e5),"h");if(r<6048e5)return"".concat(Math.floor(r/864e5),"d");if(r<2592e6)return"".concat(Math.floor(r/6048e5),"w");let o=new Date(n),a=o.getUTCFullYear()===new Date(t).getUTCFullYear();return o.toLocaleDateString("en-US",{month:"short",day:"numeric",timeZone:"UTC",...a?{}:{year:"numeric"}})}},1702:function(e,t,n){n.d(t,{om:function(){return s},sL:function(){return u},t8:function(){return l}});let r=/(?:https?:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)|(?:www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{1,}(?:\.[a-zA-Z0-9][-a-zA-Z0-9]*)+\.(?:com|org|net|edu|gov|io|co|app|dev|me|info|biz|tv|us|uk|ca|au|de|fr|jp|cn|in|br|ru|nl|se|no|fi|dk|pl|es|it|ch|at|be|nz|za|mx|ar|kr|tw|hk|sg|my|th|id|ph|vn|pt|gr|cz|hu|ro|bg|sk|hr|si|rs|ua|by|kz|ae|sa|il|eg|ng|ke|gh|tz|ug|rw|et|ma|dz|tn|ly|sd)\b(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*))/gi,o=RegExp("[#ï¼][\\p{L}\\p{N}_]{1,50}|@[A-Za-z0-9_.]{2,30}","gu"),a=e=>!e||/[\s([{<"'ââââ\-ââ/]/.test(e),i=e=>{let t;let n=[],r=0;for(o.lastIndex=0;null!==(t=o.exec(e));){let o=t[0],i=o.startsWith("#")||o.startsWith("ï¼"),s=o.replace(/[.]+$/,""),l=s.slice(1);a(e[t.index-1])&&l.length>0&&!(i&&RegExp("^[\\p{N}_]+$","u").test(l))&&(t.index>r&&n.push({type:"text",content:e.slice(r,t.index)}),n.push({type:i?"hashtag":"mention",content:s}),r=t.index+s.length)}return r<e.length&&n.push({type:"text",content:e.slice(r)}),n},s=e=>{let t;if(!e)return[];let n=[],o=0;for(r.lastIndex=0;null!==(t=r.exec(e));)t.index>o&&n.push(...i(e.slice(o,t.index))),n.push({type:"link",content:t[0]}),o=t.index+t[0].length;return o<e.length&&n.push(...i(e.slice(o))),n},l=e=>{let t=s(e).find(e=>"link"===e.type);return t?t.content.startsWith("http")?t.content:"https://".concat(t.content):null},u=e=>e.some(e=>"text"!==e.type)},22466:function(e,t,n){function r(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&t>=0)return 1e3*t;let n=Date.parse(e);return isNaN(n)?null:Math.max(0,n-Date.now())}function o(e){let t=1e3*Math.pow(2,e);return Math.min(t+.25*t*Math.random(),3e4)}function a(e){e.interceptors.response.use(e=>e,async t=>{var n,a,i,s,l;let u=t.config;if(!u||(null===(n=t.response)||void 0===n?void 0:n.status)!==429||(u.__retryCount=null!==(s=u.__retryCount)&&void 0!==s?s:0,u.__retryCount>=3))return Promise.reject(t);u.__retryCount+=1;let c=r(null===(i=t.response)||void 0===i?void 0:null===(a=i.headers)||void 0===a?void 0:a["retry-after"]),d=null!=c?c:o(u.__retryCount-1);return console.error("[rate-limit] 429 on ".concat((null!==(l=u.method)&&void 0!==l?l:"").toUpperCase()," ").concat(u.url," â ")+"retry ".concat(u.__retryCount,"/").concat(3," in ").concat(Math.round(d),"ms")),await new Promise(e=>setTimeout(e,d)),e.request(u)})}async function i(e,t){let n;for(let a=0;a<=3;a++){let i=await fetch(e,t);if(429!==i.status)return i;if(n=i,a>=3)break;let s=r(i.headers.get("retry-after")),l=null!=s?s:o(a),u="string"==typeof e?e:e instanceof URL?e.toString():e.url;
1console.error("[rate-limit] 429 on ".concat(u," â retry ").concat(a+1,"/").concat(3," in ").concat(Math.round(l),"ms")),await new Promise(e=>setTimeout(e,l))}return n}function s(e){if(e&&"object"==typeof e&&"response"in e){var t;return(null===(t=e.response)||void 0===t?void 0:t.status)===429}return!!e&&"object"==typeof e&&"status"in e&&429===e.status}n.d(t,{H:function(){return a},fetchWithRateLimitRetry:function(){return i},l:function(){return s}})}}]);
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.