PageSourceSearch

https://www.efuturanetworks.com/_next/static/chunks/9243.7d25f825797b6612.js

js efuturanetworks.com collected 2026-10-05 03:20:38 UTC 33,477 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9243],{2043:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},3927:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},17549:(e,t,s)=>{"use strict";s.r(t),s.d(t,{PostDetailView:()=>D});var a=s(54568),n=s(7620),i=s(86319),l=s(51166),r=s(12598),o=s(18335),c=s(60844),d=s(74363),m=s(34518),u=s(75424),p=s(65390),h=s(70292),x=s(19134),v=s(3927),f=s(2167),g=s(38391),y=s(85973),b=s(889),j=s(29304),_=s(21973),w=s(97509),k=s(42588),N=s(63104),C=s(97637),A=s(90008),S=s(75640),z=s(74731),R=s(39998),E=s(6158),q=s(40281),M=s(63423),P=s(73880),I=s(45751),T=s(41863);s(35156);let F=e=>{var t,s,y,b,j;let{comment:_,user:k,onReply:A,onVote:z,onDelete:E,onReport:M,onEdit:P,onNavigateToProfile:I,postOwnerId:D,depth:U=0}=e,[L,O]=(0,n.useState)(!1),[H,V]=(0,n.useState)(_.content),[B,W]=(0,n.useState)(_.media_urls||[]),[X,J]=(0,n.use
1State)(null),[Y,G]=(0,n.useState)(null),[K,Q]=(0,n.useState)(!1),[$,Z]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(null),es=()=>{O(!1),V(_.content),W(_.media_urls||[]),J(null),G(null)},ea=async()=>{let e=[...B];if(X){Q(!0);try{let[t]=await (0,S.A)("posts",[{path:"".concat(k.id,"/").concat(Date.now(),"-").concat(X.name),file:X}],()=>{});e=[...e,t.publicUrl]}catch(e){Q(!1);return}}let t=H===_.content,s=JSON.stringify(e)===JSON.stringify(_.media_urls||[]);if(!H.trim()&&0===e.length)return void Q(!1);if(t&&s){Q(!1),O(!1);return}P(_.id,H.trim(),e),Q(!1),O(!1)};return(0,a.jsxs)("div",{className:"comment-node-container",children:[(0,a.jsxs)("div",{id:"comment-".concat(_.id),className:"comment-thread-item ".concat(U>0?"is-reply":""),style:U>0?{marginLeft:Math.min(24*U,48)+"px"}:void 0,children:[(0,a.jsx)(N.e,{url:null==(t=_.profiles)?void 0:t.avatar_url,name:(null==(s=_.profiles)?void 0:s.name)||"User",size:U>0?28:36}),(0,a.jsxs)("div",{className:"comment-body",children:[(0,a.jsxs)("div",{className:"comment-content-main",children:[(0,a.jsxs)("div",{className:"comment-header",children:[(0,a.jsxs)("span",{className:"comment-user",onClick:()=>_.profile_id&&(null==I?void 0:I(_.profile_id)),style:{cursor:"pointer"},children:[null==(y=_.profiles)?void 0:y.name,(0,T.I)(_.profile_id)&&(0,a.jsx)(i.A,{size:14,className:"bot-badge",style:{color:"var(--primary)",marginLeft:"4px",display:"inline"}})]}),(null==(b=_.profiles)?void 0:b.community)&&(0,a.jsxs)("span",{className:"post-location",style:{fontSize:"0.7rem",display:"flex",alignItems:"center",gap:"2px",color:"var(--primary)",fontWeight:"600"},children:[(0,a.jsx)(l.A,{size:10}),_.profiles.community]}),(0,a.jsx)("span",{className:"comment-date",children:(0,q.f)(_.created_at)})]}),L?(0,a.jsxs)("div",{className:"comment-edit-form-wrapper",children:[(B.length>0||Y)&&(0,a.jsxs)("div",{className:"comment-media-preview-row",children:[B.map(e=>(0,a.jsxs)("div",{className:"comment-media-preview",children:[(0,a.jsx)("img",{src:e,alt:"Attachment"}),(0,a.jsx)("button",{onClick:()=>W(t=>t.filter(t=>t!==e)),"aria-label":"Remove attachment",children:(0,a.jsx)(r.A,{size:14})})]},e)),Y&&(0,a.jsxs)("div",{className:"comment-media-preview",children:[(0,a.jsx)("img",{src:Y,alt:"New attachment"}),(0,a.jsx)("button",{onClick:()=>{J(null),G(null)},"aria-label":"Remove new attachment",children:(0,a.jsx)(r.A,{size:14})})]})]}),(0,a.jsxs)("div",{className:"comment-edit-form",children:[(0,a.jsx)("input",{type:"text",className:"comment-edit-input",value:H,onChange:e=>V(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ea(),"Escape"===e.key&&es()},autoFocus:!0}),!X&&(0,a.jsxs)("label",{className:"comment-media-btn",title:"Add image",children:[(0,a.jsx)("input",{type:"file",accept:"image/*",style:{display:"none"},onChange:e=>{var t;let s=null==(t=e.target.files)?void 0:t[0];s&&(J(s),G(URL.createObjectURL(s)),e.target.value="")}}),(0,a.jsx)(o.A,{size:16})]}),(0,a.jsx)("button",{className:"c-action-btn",onClick:ea,disabled:K,children:K?(0,a.jsx)(c.A,{className:"animate-spin",size:14}):"Save"}),(0,a.jsx)("button",{className:"c-action-btn",onClick:es,disabled:K,children:"Cancel"})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("p",{className:"comment-text",children:[(0,R.v)(_.content),_.edited_at&&(0,a.jsx)("span",{className:"comment-edited-tag",children:" (edited)"})]}),(null==(j=_.media_urls)?void 0:j.length)>0&&(0,a.jsx)("div",{className:"comment-media",children:_.media_urls.map((e,t)=>(0,a.jsx)(C.p,{src:e,alt:"Comment attachment",style:{cursor:"pointer"},onClick:()=>et(e)},t))})]}),(0,a.jsx)("div",{className:"comment-actions",children:(0,a.jsxs)("div",{className:"comment-action-group",children:[(0,a.jsxs)("button",{className:"c-action-btn up ".concat(1===_.my_vote?"active":""),onClick:()=>z(_.id,1),children:[(0,a.jsx)(d.A,{size:14,fill:1===_.my_vote?"currentColor":"none"})," ",(0,a.jsx)("span",{children:_.upvote_count||0})]}),(0,a.jsxs)("button",{className:"c-action-btn down ".concat(-1===_.my_vote?"active":""),onClick:()=>z(_.id,-1),children:[(0,a.jsx)(m.A,{size:14,fill:-1===_.my_vote?"currentColor":"none"})," ",(0,a.jsx)("span",{children:_.downvote_count||0})]}),(0,a.jsxs)("button",{className:"c-action-btn",onClick:()=>A(_),children:[(0,a.jsx)(u.A,{size:14})," ",(0,a.jsx)("span",{children:"Reply"})]}),(0,a.jsx)("button",{className:"c-action-btn",title:"Share Comment",onClick:e=>{var t;e.stopPropagation();let s="".concat(window.location.origin,"/?post=").concat(_.post_id,"&comment=").concat(_.id);null==(t=navigator.clipboard)||t.writeText(s).then(()=>{let e=document.createElement("div");e.textContent="✓ Link copied!",Object.assign(e.style,{position:"fixed",bottom:"80px",left:"50%",transform:"translateX(-50%)",background:"var(--primary)",color:"#fff",padding:"8px 18px",borderRadius:"24px",fontSize:"0.85rem",fontWeight:"600",zIndex:"9999"}),document.body.appendChild(e),setTimeout(()=>e.remove(),2e3)})},children:(0,a.jsx)(p.A,{size:14})}),k&&k.id!==_.profile_id&&(0,a.jsx)("button",{className:"c-action-btn",title:"Report Comment",onClick:()=>M(_.id),children:(0,a.jsx)(h.A,{size:14})})]})})]}),(0,a.jsxs)("div",{className:"comment-side-actions",children:[k&&k.id===_.profile_id?(0,a.jsxs)("div",{className:"comment-menu-wrapper",children:[(0,a.jsx)("button",{className:"comment-menu-btn",onClick:()=>Z(e=>!e),title:"Comment options","aria-label":"Comment options","aria-expanded":$,children:(0,a.jsx)(x.A,{size:16})}),$&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"comment-menu-backdrop",onClick:()=>Z(!1)}),(0,a.jsxs)("div",{className:"comment-menu-dropdown",children:[(0,a.jsxs)("button",{onClick:()=>{V(_.content),W(_.media_urls||[]),J(null),G(null),O(!0),Z(!1)},children:[(0,a.jsx)(v.A,{size:14})," Edit"]}),(0,a.jsxs)("button",{className:"danger",onClick:()=>{Z(!1),E(_.id)},children:[(0,a.jsx)(f.A,{size:14})," Delete"]})]})]})]}):k&&D&&k.id===D?(0,a.jsxs)("div",{className:"comment-menu-wrapper",children:[(0,a.jsx)("button",{className:"comment-menu-btn",onClick:()=>Z(e=>!e),title:"Comment options","aria-label":"Comment options","aria-expanded":$,children:(0,a.jsx)(x.A,{size:16})}),$&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"comment-menu-backdrop",onClick:()=>Z(!1)}),(0,a.jsx)("div",{className:"comment-menu-dropdown",children:(0,a.jsxs)("button",{className:"danger",onClick:()=>{Z(!1),E(_.id)},children:[(0,a.jsx)(f.A,{size:14}
1)," Remove comment"]})})]})]}):(0,a.jsx)("div",{style:{height:24}}),(0,a.jsxs)("div",{className:"comment-views",children:[(0,a.jsx)(g.A,{size:12})," ",(0,a.jsx)("span",{children:_.views||0})]})]})]})]}),_.replies&&_.replies.length>0&&(0,a.jsx)("div",{className:"comment-replies",children:_.replies.map(e=>(0,a.jsx)(F,{comment:e,user:k,onReply:A,onVote:z,onDelete:E,onReport:M,onEdit:P,onNavigateToProfile:I,postOwnerId:D,depth:U+1},e.id))}),ee&&(0,w.createPortal)((0,a.jsxs)("div",{onClick:()=>et(null),style:{position:"fixed",inset:0,background:"rgba(0,0,0,0.92)",zIndex:1e4,display:"flex",alignItems:"center",justifyContent:"center",padding:"24px"},children:[(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),et(null)},"aria-label":"Close image",style:{position:"fixed",top:"16px",right:"16px",background:"rgba(255,255,255,0.15)",border:"none",borderRadius:"50%",width:"40px",height:"40px",color:"#fff",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"20px",zIndex:10001},children:"\xd7"}),(0,a.jsx)("img",{src:ee,alt:"Full size",onClick:e=>e.stopPropagation(),style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:"4px"}})]}),document.body)]})},D=e=>{var t;let{postId:s,highlightCommentId:i,user:l,onBack:d,onNavigateToProfile:m}=e,[u,p]=(0,n.useState)(null),[h,x]=(0,n.useState)([]),[v,f]=(0,n.useState)(""),[g,w]=(0,n.useState)(null),[C,R]=(0,n.useState)(null),[q,T]=(0,n.useState)(!1),[D,U]=(0,n.useState)(null),[L,O]=(0,n.useState)(null),[H,V]=(0,n.useState)(null),[B,W]=(0,n.useState)(!0),[X,J]=(0,n.use
1State)(!1),[Y,G]=(0,n.useState)(!1),[K,Q]=(0,n.useState)(null),[$,Z]=(0,n.useState)(!1),[ee,et]=(0,n.useState)(void 0),es=n.useRef(null),{activeContext:ea,activeCounty:en,isDemoMode:ei}=(0,E.n)(),[el,er]=(0,n.useState)([]),eo=n.useRef(null),ec=n.useRef(null),ed=n.useRef("".concat(Date.now(),"-").concat(Math.random().toString(36).slice(2))),em=n.useRef(!1);(0,n.useEffect)(()=>{ex(),eu();let e=A.supabase.channel("post-comments-".concat(s)).on("postgres_changes",{event:"*",schema:"consumer",table:"comments",filter:"post_id=eq.".concat(s)},e=>{var t;(null==(t=e.new)?void 0:t.profile_id)==="bc1216fe-057f-4fed-8555-8c0e66ed29d3"&&G(!1),eh()}).subscribe(),t=A.supabase.channel("post-typing-".concat(s),{config:{presence:{key:ed.current}}}),a=()=>{er(Object.entries(t.presenceState()).filter(e=>{let[t]=e;return t!==ed.current}).map(e=>{var t;let[s,a]=e;return{id:s,name:(null==(t=a[0])?void 0:t.name)||"Someone"}}).filter((e,t,s)=>s.findIndex(e=>e.id===s[t].id)===t))};t.on("presence",{event:"sync"},a).subscribe(e=>{em.current="SUBSCRIBED"===e,"SUBSCRIBED"===e&&a()}),eo.current=t;let n=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",n),()=>{document.removeEventListener("visibilitychange",n),A.supabase.removeChannel(e),A.supabase.removeChannel(t),em.current=!1,es.current&&clearTimeout(es.current),ec.current&&clearTimeout(ec.current)}},[s,null==l?void 0:l.id]);let eu=async()=>{try{await A.supabase.rpc("increment_post_views",{post_id_val:s})}catch(e){console.error("Failed to increment views",e)}};(0,n.useEffect)(()=>{!B&&i&&setTimeout(()=>{let e=document.getElementById("comment-".concat(i));e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.classList.add("highlight-pulse"))},500)},[B,i]);let ep=async e=>{let t=Array.from(new Set(e.filter(Boolean)));if(0===t.length)return new Map;let{data:s}=await A.supabase.from("profiles").select("id, name, avatar_url, role, community, county, state, country").in("id",t);return new Map((s||[]).map(e=>[e.id,e]))},eh=async()=>{if(ei){let{data:e}=await A.supabase.from("demo_post_comments").select("*").eq("post_id",s).order("created_at",{ascending:!0});if(e&&e.length>0){let t=await ep(e.map(e=>e.author_id));x(e.map(e=>({...e,profile_id:e.author_id,profiles:t.get(e.author_id)||null,my_vote:null})))}else x([]);return}let{data:e}=await A.supabase.schema("consumer").from("comments").select("*").eq("post_id",s).order("priority",{ascending:!1}).order("created_at",{ascending:!0});if(e){let t=await ep(e.map(e=>e.profile_id)),s=new Map;if(l&&e.length>0){let{data:t}=await A.supabase.schema("consumer").from("comment_votes").select("comment_id, vote_type").eq("user_id",l.id).in("comment_id",e.map(e=>e.id));s=new Map((t||[]).map(e=>[e.comment_id,e.vote_type]))}x(e.map(e=>{var a;return{...e,profiles:t.get(e.profile_id)||null,my_vote:null!=(a=s.get(e.id))?a:null}}))}},ex=async()=>{var e,t,a;if(W(!0),ei){let{data:e,error:t}=await A.supabase.from("demo_posts").select("*").eq("id",s).single();if(t||!e){console.error("Error fetching demo post:",t),W(!1);return}let a=await ep([e.author_id]);p({...e,profile_id:e.author_id,author:a.get(e.author_id)||null,original_post:null}),await eh(),W(!1);return}let{data:n,error:i}=await A.supabase.schema("consumer").from("posts").select("*, original_post:original_post_id(*)").eq("id",s).single();if(i){console.error("Error fetching post:",i),W(!1);return}let r=await ep([n.profile_id,null==(e=n.original_post)?void 0:e.profile_id]);if(p({...n,author:r.get(n.profile_id)||null,original_post:n.original_post?{...n.original_post,author:r.get(n.original_post.profile_id)||null}:null}),l){let e=(null==(t=n.original_post)?void 0:t.id)||n.id,{data:s}=await A.supabase.schema("consumer").from("bookmarks").select("post_id").eq("profile_id",l.id).eq("post_id",e).maybeSingle();if(Z(!!s),n.poll_data){let{data:e}=await A.supabase.schema("consumer").from("poll_votes").select("option_index").eq("profile_id",l.id).eq("post_id",n.id).maybeSingle();et(null!=(a=null==e?void 0:e.option_index)?a:void 0)}}await eh(),W(!1)},ev=async e=>{if(l)if($){let{error:t}=await A.supabase.schema("consumer").from("bookmarks").delete().eq("profile_id",l.id).eq("post_id",e);t||Z(!1)}else{let{error:t}=await A.supabase.schema("consumer").from("bookmarks").insert({profile_id:l.id,post_id:e});t||Z(!0)}},ef=async(e,t)=>{if(!l)return;let{error:s}=await A.supabase.rpc("cast_poll_vote",{p_post_id:e.id,p_option_index:t});if(s)return void console.error("Poll vote failed",s);et(t),ex()},eg=async()=>
1{if(!u||!window.confirm("Are you sure you want to delete this post?"))return;let{error:e}=await A.supabase.schema("consumer").from("posts").delete().eq("id",u.id);if(e){console.error("Failed to delete post:",e),V(e.message);return}d()},ey=async()=>{var e;if(!v.trim()&&!g)return;J(!0),ec.current&&clearTimeout(ec.current),null==(e=eo.current)||e.untrack();let t=/@(tevis|sabine)/i.test(v),a=[];if(g){T(!0);try{let[e]=await (0,S.A)("posts",[{path:"".concat(l.id,"/").concat(Date.now(),"-").concat(g.name),file:g}],()=>{});a=[e.publicUrl]}catch(e){V(e.message||"Failed to upload image"),J(!1),T(!1);return}T(!1)}let{error:n}=await A.supabase.schema("consumer").from("comments").insert({post_id:s,profile_id:l.id,content:v,parent_id:(null==D?void 0:D.id)||null,media_urls:a.length>0?a:null});n?(console.error("Error posting comment:",n),V(n.message)):(f(""),w(null),R(null),U(null),t&&(G(!0),es.current&&clearTimeout(es.current),es.current=setTimeout(()=>G(!1),1e4)),p(e=>e?{...e,comments_count:(e.comments_count||0)+1}:e),(null==u?void 0:u.profile_id)&&u.profile_id!==l.id&&(A.supabase.schema("consumer").from("user_content_interactions").insert({user_id:l.id,post_id:s,author_id:u.profile_id,interaction_type:"comment",weight:3}).then(e=>{let{error:t}=e;t&&console.error("Failed to log comment interaction",t)}),(0,z.s)({category:"comments",recipientId:u.profile_id,title:l.name||"New comment",body:v.slice(0,120),url:"/?env=social&postId=".concat(s),tag:"comment-".concat(s)}))),J(!1)},eb=async(e,t)=>{var s;if(!l)return;let a=h.find(t=>t.id===e),n=null!=(s=null==a?void 0:a.my_vote)?s:null,i=n===t?null:t;x(t=>t.map(t=>{if(t.id!==e)return t;let s=t.upvote_count||0,a=t.downvote_count||0;return 1===n&&(s-=1),-1===n&&(a-=1),1===i&&(s+=1),-1===i&&(a+=1),{...t,upvote_count:s,downvote_count:a,my_vote:i}}));try{if(null===i){let{error:t}=await A.supabase.schema("consumer").from("comment_votes").delete().match({comment_id:e,user_id:l.id});if(t)throw t}else{let{error:t}=await A.supabase.schema("consumer").from("comment_votes").upsert({comment_id:e,user_id:l.id,vote_type:i},{onConflict:"comment_id,user_id"});if(t)throw t}}catch(t){console.error("Comment vote failed:",t.message),x(t=>t.map(t=>t.id===e?{...t,my_vote:n,upvote_count:null==a?void 0:a.upvote_count,downvote_count:null==a?void 0:a.downvote_count}:t))}},ej=async(e,t,s)=>{x(a=>a.map(a=>a.id===e?{...a,content:t,media_urls:null!=s?s:a.media_urls,edited_at:new Date().toISOString()}:a));let{error:a}=await A.supabase.schema("consumer").from("comments").update({content:t,media_urls:s&&s.length>0?s:null,edited_at:new Date().toISOString()}).eq("id",e);a&&(console.error("Error editing comment:",a),V(a.message),eh())},e_=async e=>{if(!window.confirm("Are you sure you want to delete this comment?"))return;x(t=>t.filter(t=>t.id!==e)),p(e=>e?{...e,comments_count:Math.max(0,(e.comments_count||0)-1)}:e);let{error:t}=await A.supabase.schema("consumer").from("comments").delete().eq("id",e);t&&(console.error("Error deleting comment:",t),V(t.message),ex())};return B?(0,a.jsx)("div",{className:"post-detail-loading",children:(0,a.jsx)(c.A,{className:"animate-spin",size:48,color:"var(--primary)"})}):u?u.deleted_at?(0,a.jsx)(I.n,{type:"Post",creatorId:u.profile_id}):(0,a.jsxs)("div",{className:"post-detail-view fade-in",children:[(0,a.jsx)("div",{className:"post-detail-header",children:(0,a.jsxs)("button",{className:"back-btn",onClick:d,children:[(0,a.jsx)(y.A,{size:24}),(0,a.jsx)("span",{children:"Back to Feed"})]})}),(0,a.jsxs)("div",{className:"post-detail-content",children:[(0,a.jsx)(k.R,{post:u,user:l,hideCommentPreview:!0,isBookmarked:$,userPollVote:ee,onToggleBookmark:()=>{var e;return ev((null==(e=u.original_post)?void 0:e.id)||u.id)},onPollVote:ef,onDelete:eg,onEdit:()=>Q(u),onRepost:async e=>{if(!l)return;let{error:t}=await A.supabase.schema("consumer").from("posts").insert({tenant_id:(null==l?void 0:l.county)||en,profile_id:l.id,page_id:(null==ea?void 0:ea.id)||null,type:"repost",original_post_id:e,content:""});if(t){console.error("Repost failed:",t),V("Couldn't repost this. Please try again.");return}let s=document.createElement("div");s.textContent="✓ Reposted to your timeline",Object.assign(s.style,{position:"fixed",bottom:"80px",left:"50%",transform:"translateX(-50%)",background:"var(--primary)",color:"#fff",padding:"10px 20px",borderRadius:"24px",fontSize:"0.9rem",fontWeight:"600",zIndex:"9999"}),document.body.appendChild(s),setTimeout(()=>s.remove(),2500)},onShare:async e=>{let t="".concat(window.location.origin,"/?env=social&postId=").concat(e);
1if(navigator.share)try{await navigator.share({title:"SETX 360",url:t})}catch(e){}else{var s;await (null==(s=navigator.clipboard)?void 0:s.writeText(t)),alert("Link copied!")}},onNavigateToProfile:m}),(0,a.jsxs)("div",{className:"comments-section",children:[(0,a.jsxs)("h3",{className:"comments-title",children:["Comments (",h.length,")"]}),(0,a.jsxs)("div",{className:"comments-list",children:[Y&&(0,a.jsxs)("div",{className:"tevis-thinking-indicator animate-pulse",children:[(0,a.jsx)(b.A,{size:16,color:"var(--primary)"}),(0,a.jsx)("span",{children:"Sabine is researching and typing..."})]}),0!==h.length||Y?(e=>{let t=new Map,s=[];return e.forEach(e=>{t.set(e.id,{...e,replies:[]})}),e.forEach(e=>{e.parent_id&&t.has(e.parent_id)?t.get(e.parent_id).replies.push(t.get(e.id)):s.push(t.get(e.id))}),s})(h).map(e=>(0,a.jsx)(F,{comment:e,user:l,onReply:U,onVote:eb,onDelete:e_,onReport:O,onEdit:ej,onNavigateToProfile:m,postOwnerId:null==u?void 0:u.profile_id},e.id)):(0,a.jsx)("div",{className:"empty-comments",children:(0,a.jsx)("p",{children:"No comments yet. Start the conversation!"})})]})]})]}),l&&(0,a.jsxs)("div",{className:"post-detail-footer",children:[el.length>0&&(0,a.jsxs)("div",{className:"typing-indicator animate-fade-in",children:[(0,a.jsxs)("span",{className:"typing-dots",children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]}),(0,a.jsx)("span",{children:1===el.length?"Someone is commenting...":"".concat(el.length," people are commenting...")})]}),H&&(0,a.jsxs)("div",{className:"error-indicator animate-fade-in",children:[(0,a.jsx)("span",{children:H}),(0,a.jsx)("button",{onClick:()=>V(null),children:"X"})]}),D&&(0,a.jsxs)("div",{className:"reply-indicator animate-fade-in",children:[(0,a.jsxs)("span",{children:["Replying to ",(0,a.jsx)("strong",{children:null==(t=D.profiles)?void 0:t.name})]}),(0,a.jsx)("button",{onClick:()=>U(null),children:"Cancel"})]}),C&&(0,a.jsxs)("div",{className:"comment-media-preview",children:[(0,a.jsx)("img",{src:C,alt:"Selected attachment"}),(0,a.jsx)("button",{onClick:()=>{w(null),R(null)},"aria-label":"Remove attachment",children:(0,a.jsx)(r.A,{size:14})})]}),(0,a.jsxs)("div",{className:"comment-input-wrapper glass",children:[(0,a.jsx)(N.e,{url:l.avatar_url,name:l.name,size:32,className:"comment-input-avatar"}),(0,a.jsx)("input",{type:"text",placeholder:D?"Write a reply...":"Add a comment... (or @sabine to ask AI)",maxLength:5e3,value:v,onChange:e=>{f(e.target.value),l&&eo.current&&em.current&&(eo.current.track({name:l.name,typing_at:Date.now()}),ec.current&&clearTimeout(ec.current),ec.current=setTimeout(()=>{var e;null==(e=eo.current)||e.untrack()},3e3))},onKeyDown:e=>"Enter"===e.key&&ey(),disabled:X}),(0,a.jsx)("button",{type:"button",className:"comment-media-btn",title:"Ask @sabine in this comment","aria-label":"Ask Sabine in this comment",onClick:()=>f(e=>/@(sabine|tevis)/i.test(e)?e:"@sabine "+e),style:{background:"none",border:"none",cursor:"pointer",color:"inherit",display:"flex"},children:(0,a.jsx)(_.W,{size:20})}),(0,a.jsxs)("label",{className:"comment-media-btn",title:"Attach image",children:[(0,a.jsx)("input",{type:"file",accept:"image/*",style:{display:"none"},disabled:X||q,onChange:e=>{var t;let s=null==(t=e.target.files)?void 0:t[0];s&&(w(s),R(URL.createObjectURL(s)),e.target.value="")}}),(0,a.jsx)(o.A,{size:20})]}),(0,a.jsx)("button",{className:"send-btn ".concat(v.trim()||g?"active":""),onClick:ey,disabled:X||q||!v.trim()&&!g,children:X||q?(0,a.jsx)(c.A,{className:"animate-spin",size:20}):(0,a.jsx)(j.A,{size:20})})]})]}),L&&l&&(0,a.jsx)(M.H,{isOpen:!!L,onClose:()=>O(null),contentType:"comment",contentId:L}),K&&(0,a.jsx)(P.s,{post:K,user:l,onClose:()=>{Q(null),ex()}})]}):(0,a.jsx)("div",{className:"flex-1 flex flex-col p-4 bg-[#0a0a0b] items-center justify-center",children:(0,a.jsx)("div",{className:"text-slate-400",children:"Post not found"})})}},19134:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]])},27541:(e,t,s)=>{"use strict";var a=s(43041);s.o(a,"usePathname")&&s.d(t,{usePathname:function(){return a.usePathname}}),s.o(a,"useRouter")&&s.d(t,{useRouter:function(){return a.useRouter}}),s.o(a,"useSearchParams")&&s.d(t,{useSearchParams:function(){return a.useSearchParams}})},35156:()=>{},44720:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("user-minus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},45230:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("bookmark",[["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]])},45751:(e,t,s)=>{"use strict";s.d(t,{n:()=>d});var a=s(54568);s(7620);var n=s(27541),i=s(74717),l=s(95355),r=s(64751),o=s(43002),c=s(89481);function d(e){let{type:t,storeId:s,storeName:d,creatorId:m}=e,u=(0,n.useRouter)();return(0,a.jsx)("div",{className:"min-h-[60vh] flex flex-col items-center justify-center p-6 text-center",children:(0,a.jsxs)(c.P.div,{initial:{opacity:0,scale:.9}
1,animate:{opacity:1,scale:1},className:"max-w-md w-full bg-slate-900/50 backdrop-blur-xl border border-slate-800 rounded-3xl p-8 shadow-2xl",children:[(0,a.jsx)("div",{className:"w-20 h-20 bg-slate-800/80 rounded-full flex items-center justify-center mx-auto mb-6 border border-slate-700/50 shadow-inner",children:(0,a.jsx)(i.A,{className:"w-10 h-10 text-slate-400"})}),(0,a.jsxs)("h2",{className:"text-2xl font-bold text-white mb-3",children:["This ",t," is no longer available"]}),(0,a.jsx)("p",{className:"text-slate-400 mb-8 leading-relaxed",children:"The creator has removed this content or it has expired. It may have been sold, cancelled, or archived."}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[s&&(0,a.jsxs)("button",{onClick:()=>u.push("/store/".concat(s)),className:"w-full flex items-center justify-center gap-2 bg-blue-600 hover:bg-blue-500 text-white py-3 px-6 rounded-xl font-medium transition-all duration-200 shadow-lg shadow-blue-500/20",children:[(0,a.jsx)(l.A,{className:"w-5 h-5"}),"View ",d?"".concat(d,"'s"):"More from this"," Store"]}),(0,a.jsxs)("button",{onClick:()=>u.back(),className:"w-full flex items-center justify-center gap-2 bg-slate-800 hover:bg-slate-700 text-slate-200 py-3 px-6 rounded-xl font-medium transition-all duration-200 border border-slate-700",children:[(0,a.jsx)(r.A,{className:"w-5 h-5"}),"Go Back"]}),(0,a.jsxs)("button",{onClick:()=>u.push("/"),className:"w-full flex items-center justify-center gap-2 bg-transparent hover:bg-slate-800/50 text-slate-400 hover:text-slate-200 py-3 px-6 rounded-xl font-medium transition-all duration-200",children:[(0,a.jsx)(o.A,{className:"w-5 h-5"}),"Return Home"]})]})]})})}},52137:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("flame",[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]])},57856:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("user-x",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]])},65390:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]])},67324:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]])},70292:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("flag",[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]])},73880:(e,t,s)=>{"use strict";s.d(t,{s:()=>p});var a=s(54568),n=s(7620),i=s(98890),l=s(12598),r=s(18335),o=s(60844),c=s(90008),d=s(83527),m=s(7564
10),u=s(34046);s(65011);let p=e=>{let{post:t,onClose:s,user:p}=e,[h,x]=(0,n.useState)(t.content||""),[v,f]=(0,n.useState)(!1),{info:g,warning:y,error:b,success:j}=(0,i.d)(),[_,w]=(0,n.useState)(t.media_urls||[]),[k,N]=(0,n.useState)([]),[C,A]=(0,n.useState)([]),[S,z]=(0,n.useState)(null),[R,E]=(0,n.useState)(null),q=(0,n.useRef)(null),M=(0,n.useRef)(null);(0,n.useEffect)(()=>{q.current&&(q.current.style.height="auto",q.current.style.height="".concat(q.current.scrollHeight,"px"));let e=setTimeout(()=>{z((0,d.P)(h))},600);return()=>clearTimeout(e)},[h]);let P=async()=>{if(f(!0),!p){g("You must be logged in to edit."),f(!1);return}try{let e=[..._];if(k.length>0){E(0);let t=k.map(e=>({path:"".concat(p.id,"/").concat(Date.now(),"-").concat(e.name),file:e})),s=await (0,m.A)("posts",t,E);e=[..._,...s.map(e=>e.publicUrl)],E(null)}let{error:a}=await c.supabase.schema("consumer").from("posts").update({content:h,media_urls:e}).eq("id",t.id);if(a)throw a;j("Post updated successfully!"),s()}catch(e){console.error("Error updating post:",e),b("Editing Error: ".concat(e.message||"Failed to update post."))}finally{f(!1),E(null)}};(0,n.useEffect)(()=>{if(null===R)return;let e=e=>{e.preventDefault(),e.returnValue=""};return window.addEventListener("beforeunload",e),()=>window.removeEventListener("beforeunload",e)},[R]);let I=()=>{if(null!==R)return void y("Your photo/video is still uploading -- don't close this yet.");s()};return(0,a.jsx)(u.a,{isOpen:!0,onClose:I,maxWidth:"600px",children:(0,a.jsxs)("div",{className:"redesign-modal fade-in",children:[(0,a.jsxs)("div",{className:"modal-tabs-row",style:{justifyContent:"space-between",padding:"16px 24px",borderBottom:"1px solid rgba(255,255,255,0.1)"},children:[(0,a.jsx)("h3",{style:{margin:0,fontSize:"1.2rem"},children:"Edit Post"}),(0,a.jsx)("button",{className:"close-btn-minimal",onClick:I,children:(0,a.jsx)(l.A,{size:20})})]}),null!==R&&(0,a.jsxs)("div",{className:"upload-progress-banner",children:[(0,a.jsx)("div",{className:"upload-progress-track",children:(0,a.jsx)("div",{className:"upload-progress-fill",style:{width:"".concat(Math.round(100*R),"%")}})}),(0,a.jsxs)("p",{className:"upload-progress-label",children:["Uploading ",Math.round(100*R),"% -- please don't close this window until it's done."]})]}),(0,a.jsx)("div",{className:"modal-content-scrollable",children:(0,a.jsx)("div",{className:"composer-wrapper",children:(0,a.jsxs)("div",{className:"input-field-container",children:[(0,a.jsx)("textarea",{ref:q,className:"post-textarea-redesign",placeholder:"What's on your mind?",value:h,onChange:e=>x(e.target.value),autoFocus:!0,disabled:v}),S&&0===_.length&&0===C.length&&(0,a.jsx)(d.f,{url:S,compact:!0}),(_.length>0||C.length>0)&&(0,a.jsxs)("div",{className:"media-previews-grid",children:[_.map((e,t)=>(0,a.jsxs)("div",{className:"preview-item",children:[e.match(/\.(mp4|webm|ogg)$/i)?(0,a.jsx)("video",{src:e,className:"preview-media",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,a.jsx)("img",{src:e,alt:"preview",className:"preview-media",style:{width:"100%",height:"100%",objectFit:"cover"}}),(0,a.jsx)("button",{onClick:()=>{w(e=>e.filter((e,s)=>s!==t))},children:(0,a.jsx)(l.A,{size:14})})]},"existing-".concat(t))),C.map((e,t)=>{var s;return(0,a.jsxs)("div",{className:"preview-item",children:[(null==(s=k[t])?void 0:s.type.startsWith("video/"))?(0,a.jsx)("video",{src:e,muted:!0,playsInline:!0,className:"preview-media",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,a.jsx)("img",{src:e,alt:"preview",className:"preview-media",style:{width:"100%",height:"100%",objectFit:"cover"}}),(0,a.jsx)("button",{onClick:()=>(e=>{N(t=>t.filter((t,s)=>s!==e)),A(t=>t.filter((t,s)=>s!==e))})(t),disabled:null!==R,children:(0,a.jsx)(l.A,{size:14})})]},"new-".concat(t))})]}),(0,a.jsxs)("div",{className:"composer-chips-row",children:[(0,a.jsx)("input",{type:"file",ref:M,onChange:e=>{let t=Array.from(e.target.files||[]);if(0===t.length)return;let s=t.map(e=>URL.createObjectURL(e));N(e=>[...e,...t]),A(e=>[...e,...s])},multiple:!0,accept:"image/*,video/*",style:{display:"none"}}),(0,a.jsxs)("button",{className:"action-chip",onClick:()=>{var e;return null==(e=M.current)?void 0:e.click()},children:[(0,a.jsx)(r.A,{size:16})," Add Media"]}),(0,a.jsx)("div",{className:"spacer"}),(0,a.jsx)("button",{className:"submit-post-btn-minimal ".concat(h.length>
10&&!v?"ready":""),disabled:0===h.length||v,onClick:P,children:v?(0,a.jsx)(o.A,{className:"animate-spin",size:18}):"Save Changes"})]})]})})})]})})}},75640:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(90008);async function n(e,t,s){let n=[];for(let i=0;i<t.length;i++){let{path:l,file:r}=t[i],o=await function(e,t,s,n){return new Promise((i,l)=>{(async()=>{let r="sb_publishable_fGDuWjxV_uYFmzPqkq2ECg_Qn3FX0dr",{data:{session:o}}=await a.supabase.auth.getSession(),c=(null==o?void 0:o.access_token)||r,d=t.split("/").map(encodeURIComponent).join("/"),m="".concat("https://okulcpbrikcumiomrzuh.supabase.co","/storage/v1/object/").concat(e,"/").concat(d),u=new FormData;u.append("cacheControl","3600"),u.append("",s);let p=new XMLHttpRequest;p.open("POST",m,!0),p.setRequestHeader("apikey",r),p.setRequestHeader("Authorization","Bearer ".concat(c)),p.setRequestHeader("x-upsert","false"),p.upload.onprogress=e=>{e.lengthComputable&&n(e.loaded/e.total)},p.onload=()=>{if(p.status>=200&&p.status<300){let{data:s}=a.supabase.storage.from(e).getPublicUrl(t);i({path:t,publicUrl:s.publicUrl})}else{let e="Upload failed (".concat(p.status,")");try{let t=JSON.parse(p.responseText);e=t.message||t.error||e}catch(e){}l(Error(e))}},p.onerror=()=>l(Error("Network error during upload")),p.onabort=()=>l(Error("Upload cancelled")),p.send(u)})().catch(l)})}(e,l,r,e=>{s((i+e)/t.length)});n.push(o)}return n}},76441:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},86319:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]])},87181:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(12119).A)("repeat",[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]])}}]);

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.