1import{j as t}from"./client-By3tlFYA.js";import{r as c}from"./index-TEHZzOO_.js";import{u as D,a as j,a1 as z,au as F,A as P,D as R,a5 as C}from"./useSelectableClick-CnnB_wkC.js";import{E as W,a as B,b as U}from"./embedded_status_content-TMzUAQoM.js";import{ag as X}from"./status_quoted-C2JPhWEt.js";import{c as Y}from"./short_number-C9zm8Jg6.js";import{M}from"./message-CVkQtbZv.js";const Q=({statusId:o})=>{const p=Y(),n=c.useRef(),u=D(),e=j(a=>a.statuses.get(o)),r=j(a=>a.accounts.get(e==null?void 0:e.get("account"))),N=c.useCallback(({clientX:a,clientY:d})=>{n.current=[a,d]},[n]),S=c.useCallback(({clientX:a,clientY:d,target:v,button:m,ctrlKey:_,metaKey:f})=>{var x;const[y,E]=(x=n.current)!=null?x:[0,0],[A,w]=[Math.abs(a-y),Math.abs(d-E)];let s=v;for(;s;){if(s.localName==="button"||s.localName==="a"||s.localName==="label")return;s=s.parentNode}if(A+w<5&&r){const b="/@".concat(r.acct,"/").concat(o);m===0&&!(_||f)?p.push(b):(m===1||m===0&&(_||f))&&window.open(b,"_blank","noopener")}n.current=null},[n,o,r,p]),k=c.useCallback(()=>{u(z(o))},[u,o]);if(!e)return null;const h=!!e.get("spoiler_text"),g=e.get("poll"),i=!e.get("hidden")||!h,l=e.get("media_attachments").size;return t.jsxs(F,{className:"notification-group__embedded-status",role:"button",tabIndex:-1,onMouseDown:N,onMouseUp:S,children:[t.jsxs("div",{className:"notification-group__embedded-status__account",children:[t.jsx(P,{account:r,size:16}),t.jsx(R,{account:r})]}),t.jsx(X,{status:e,onClick:k,expanded:i}),(!h||i)&&t.jsx(W,{className:"notification-group__embedded-status__content reply-indicator__content translate",status:e}),i&&(g||l>0)&&t.jsxs("div",{className:"notification-group__embedded-status__attachments reply-indicator__attachments",children:[!!g&&t.jsxs(t.Fragment,{children:[t.jsx(C,{icon:B,id:"bar-chart-4-bars"}),t.jsx(M,{id:"reply_indicator.poll",defaultMessage:"Poll"})]}),l>0&&t.jsxs(t.Fragment,{children:[t.jsx(C,{icon:U,id:"photo-library"}),t.jsx(M,{id:"reply_indicator.attachments",defaultMessage:"{count, plural, one {# attachment} other {# attachments}}",values:{count:l}})]})]})]})};export{Q as E}; 2//# sourceMappingURL=embedded_status-DoylrNwX.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.