PageSourceSearch

https://baserni.lovable.app/assets/ShareToCommunity-DrqyTSEu.js

js baserni.lovable.app collected 2026-10-03 03:25:01 UTC 1,234 bytes, 1 lines download raw bytes

1import{a as S,u as b,b as j,r as u,j as e,B as C,L as v,s as w,d as c}from"./index-BeCqPhpy.js";const L=({readingType:d,title:h,content:a,emoji:m="✨"})=>{const{user:n}=S(),{language:r}=b(),g=j(),[s,p]=u.useState(!1),[i,o]=u.useState(!1),l={en:{share:"Share to Community",shared:"Shared!",login:"Sign in to share"},ar:{share:"شارك في المجتمع",shared:"تمت المشاركة!",login:"سجل دخول للمشاركة"},fr:{share:"Partager",shared:"Partagé !",login:"Connectez-vous"}},t=l[r]||l.en;if(!n)return null;const x=async()=>{if(s||i)return;o(!0);const f=a.length>280?a.slice(0,277)+"...":a,{error:y}=await w.from("community_posts").insert({user_id:n.id,reading_type:d,title:h.slice(0,100),content:f,emoji:m});y?c.error("Failed to share"):(p(!0),c.success(t.shared,{action:{label:r==="ar"?"عرض":r==="fr"?"Voir":"View",onClick:()=>g("/community")}})),o(!1)};return e.jsx(C,{onClick:x,disabled:s||i,variant:"outline",size:"sm",className:`gap-1.5 rounded-xl h-9 text-xs border-primary/20 transition-all ${s?"bg-primary/10 text-primary border-primary/30":""}`,children:s?e.jsxs(e.Fragment,{children:["✓ ",t.shared]}):e.jsxs(e.Fragment,{children:[e.jsx(v,{className:"w-3.5 h-3.5"}),t.share]})})};export{L as 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.