1import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{n as t,t as n}from"./jsx-runtime-D3F0h15I.js";import{a as r}from"./react-intl-CZJDGRhA.js";import{$ as i,H as a,R as o,ft as s}from"./poll-rj_1n99k.js";import{_i as c}from"./render-DyBowztl.js";import{s as l}from"./react-router-D0L-bsDO.js";import{o as u,s as d}from"./typed_functions-D7HVi0V_.js";import{Bn as f}from"./content-D3UIwcbY.js";import{n as p,r as m,t as h}from"./embedded_status_content-C_p0Cd2B.js";import{l as g}from"./quoted-DlfesCIQ.js";var _=e(t()),v=n(),y=({statusId:e})=>{let t=l(),n=(0,_.useRef)(null),y=u(),b=d(t=>t.statuses.get(e)),x=d(e=>e.accounts.get(b?.get(`account`))),S=(0,_.useCallback)(({clientX:e,clientY:t})=>{n.current=[e,t]},[n]),C=(0,_.useCallback)(({clientX:r,clientY:i,target:a,button:o,ctrlKey:s,metaKey:c})=>{let[l,u]=n.current??[0,0],[d,p]=[Math.abs(r-l),Math.abs(i-u)],m=a;for(;m;){if(m.localName===`button`||m.localName===`a`||m.localName===`label`)return;m=m.parentNode}if(d+p<5&&x){let n=`/@${x.acct}/${e}`;o===0&&!(s||c)?t.push(n,{focusTarget:f.POST}):(o===1||o===0&&(s||c))&&window.open(n,`_blank`,`noopener`)}n.current=null},[n,e,x,t]),w=(0,_.useCallback)(()=>{y(c(e))},[y,e]);if(!b)return null;let T=!!b.get(`spoiler_text`),E=b.get(`poll`),D=!b.get(`hidden`)||!T,O=b.get(`media_attachments`).size;return(0,v.jsxs)(i,{className:`notification-group__embedded-status`,role:`button`,tabIndex:-1,onMouseDown:S,onMouseUp:C,children:[(0,v.jsxs)(`div`,{className:`notification-group__embedded-status__account`,children:[(0,v.jsx)(a,{account:x,size:16}),(0,v.jsx)(o,{account:x})]}),(0,v.jsx)(g,{statusId:b.get(`id`),onClick:w,expanded:D}),(!T||D)&&(0,v.jsx)(h,{className:`notification-group__embedded-status__content reply-indicator__content translate`,status:b}),D&&(E||O>0)&&(0,v.jsxs)(`div`,{className:`notification-group__embedded-status__attachments reply-indicator__attachments`,children:[!!E&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s,{icon:m,id:`bar-chart-4-bars`}),(0,v.jsx)(r,{id:`reply_indicator.poll`,defaultMessage:`Poll`})]}),O>0&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(s,{icon:p,id:`photo-library`}),(0,v.jsx)(r,{id:`reply_indicator.attachments`,defaultMessage:`{count, plural, one {# attachment} other {# attachments}}`,values:{count:O}})]})]})]})};export{y as t}; 2//# sourceMappingURL=embedded_status-ChNHlkwK.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.