1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/packs/status-BrDY7azZ.js","/packs/rolldown-runtime-C0FnF6B9.js","/packs/jsx-runtime-D3F0h15I.js","/packs/react-intl-CZJDGRhA.js","/packs/preload-helper-C17SfWRL.js","/packs/initial_state-CQfWVRE7.js","/packs/locales-DZmLvkbO.js","/packs/async-mutex-DHaCcEsI.js","/packs/chevron_right-D7sFWRVh.js","/packs/detect-it.esm-DVND6rlI.js","/packs/isSymbol-3r8dk6Lb.js","/packs/react-router-D0L-bsDO.js","/packs/defineProperty-C0YrXxyM.js","/packs/time-BMcu91WH.js","/packs/ready-B3bZnx13.js","/packs/router-BsvNXDse.js","/packs/axios-BtwFZmtf.js","/packs/axios-BDoG55Be.js","/packs/api-CFnNWVnx.js","/packs/accounts_typed-Dtk3HjqX.js","/packs/typed_functions--Rew8955.js","/packs/utils-1cte5XkM.js","/packs/locale-BNeEG1rT.js","/packs/emoji-BrTouCaI.js","/packs/settings-Cq4pjZIN.js","/packs/modal-CxkWa4aF.js","/packs/react-router-dom-o_eSX_Kh.js","/packs/collection_preview_card-GfpBX_yC.js","/packs/classnames-CfLRLWYq.js","/packs/poll-CiSbVnkU.js","/packs/esm-DrOrXu-Y.js","/packs/short_number-CHNMv1Rn.js","/packs/numbers-BEp7e788.js","/packs/skeleton-B7DUl0I_.js","/packs/intl-CdMpGntF.js","/packs/bookmark-CtUZgtUD.js","/packs/toString-HjykfQcJ.js","/packs/insert_chart-BH_jJ4it.js","/packs/link-D9mUXM6-.js","/packs/assets/collection_preview_card-BXC2E0lB.css","/packs/display_name-t-NqU8eb.js","/packs/card-BOgEEYG0.js","/packs/Translate.es-DPDpDrNz.js","/packs/CaretDown.es-OLytXsgM.js","/packs/Heart.es-DWep4cX2.js","/packs/DotsThree.es-Cl_BxiJJ.js","/packs/Trash.es-DTABaRj0.js","/packs/redesign-CLBmXmGj.js","/packs/assets/redesign-CTz2Ep4g.css","/packs/menu-CId_C2wN.js","/packs/useBreakpoint-CcBSLRU4.js","/packs/useMergedRefs-CKvDylbq.js","/packs/toggle_field-B83uTBxb.js","/packs/a11y_live_region-DRkDyPsY.js","/packs/error-DhX5veYg.js","/packs/info-BnsNWy2K.js","/packs/assets/toggle_field-BAQID-r7.css","/packs/text_input_field-BODblSgE.js","/packs/assets/text_input_field-DhJXyILi.css","/packs/assets/menu-C6t7EZak.css","/packs/alternate_email-BuKNZDmn.js","/packs/useOverflow-2Akmjf53.js","/packs/useObserver-DnVQi0kY.js","/packs/filter_warning-DGH6S7z1.js","/packs/useAccountId-CQnKDth1.js","/packs/useRelationship-BfvM_psN.js","/packs/utils-kzbliKlq.js","/packs/assets/utils-CooU1Ra8.css","/packs/assets/status-wJQ-mdbl.css"])))=>i.map(i=>d[i]); 2import{o as e}from"./rolldown-runtime-C0FnF6B9.js";import{n as t,t as n}from"./jsx-runtime-D3F0h15I.js";import{a as r,c as i,o as a,s as o}from"./react-intl-CZJDGRhA.js";import{t as s}from"./preload-helper-C17SfWRL.js";import{A as c,d as l,o as u,u as d,w as f,y as p}from"./initial_state-CQfWVRE7.js";import{s as m}from"./locales-DZmLvkbO.js";import{d as h,f as g,h as _,i as v,l as y,m as b,p as x}from"./chevron_right-D7sFWRVh.js";import{zt as S}from"./detect-it.esm-DVND6rlI.js";import{C,Di as w,E as T,Ei as E,H as D,J as O,Jr as k,Ni as A,Oi as j,Qr as M,Ti as N,Ur as P,Wi as F,X as ee,Xt as te,Y as ne,Z as re,_i as ie,io as ae,jn as oe,mt as se,nt as ce,ot as le,q as ue,vi as de,wi as fe,xi as pe,yi as me}from"./time-BMcu91WH.js";import{b as he,d as ge}from"./react-router-D0L-bsDO.js";import{t as I}from"./defineProperty-C0YrXxyM.js";import{Z as _e,f as ve}from"./accounts_typed-Dtk3HjqX.js";import{o as ye,s as L}from"./typed_functions--Rew8955.js";import{n as R}from"./modal-CxkWa4aF.js";import{D as be,Ht as xe,Qt as Se,R as Ce,S as we,St as Te,T as Ee,_ as De,b as Oe,d as ke,en as Ae,f as je,k as Me,l as Ne,m as z,qt as Pe,t as Fe,u as Ie,x as Le,y as Re}from"./collection_preview_card-GfpBX_yC.js";import{t as ze}from"./classnames-CfLRLWYq.js";import{B,K as Be,L as Ve,V,c as He,i as Ue,l as We,o as Ge,u as Ke,v as qe,w as Je,z as Ye}from"./poll-CiSbVnkU.js";import{t as H}from"./intl-CdMpGntF.js";import{n as Xe,r as Ze}from"./display_name-t-NqU8eb.js";import{a as Qe,t as $e}from"./card-BOgEEYG0.js";import{i as et,n as tt,r as nt,t as rt}from"./react_router-DcESmpYJ.js";import{S as it,b as U,n as at,t as ot,x as st}from"./bookmark-CtUZgtUD.js";import{t as ct}from"./home-fill-CyA9QjcE.js";import{t as lt}from"./home-CQ5pGabv.js";import{t as ut}from"./edit-BKKsAV_5.js";import{t as dt}from"./insert_chart-BH_jJ4it.js";import{t as ft}from"./link-D9mUXM6-.js";import{t as pt}from"./visibility-BZenFkzt.js";var W=e(t()),G=n(),mt=({children:e})=>{let t=(0,W.useId)(),[n,i]=(0,W.useState)(!1),[a,o]=(0,W.useState)(null),s=(0,W.useCallback)(()=>{i(!n)},[n,i]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`button`,{className:`link-button`,ref:o,onClick:s,"aria-expanded":n,"aria-controls":t,type:`button`,children:(0,G.jsx)(r,{id:`learn_more_link.learn_more`,defaultMessage:`Learn more`})}),(0,G.jsx)(qe,{isOpen:n,onClose:s,offset:5,placement:`bottom-end`,reference:a,children:({props:n})=>(0,G.jsxs)(`div`,{...n,role:`region`,id:t,className:`account__domain-pill__popout learn-more__popout dropdown-animation`,children:[(0,G.jsx)(`div`,{className:`learn-more__popout__c
2ontent`,children:e}),(0,G.jsx)(`div`,{children:(0,G.jsx)(`button`,{className:`link-button`,onClick:s,type:`button`,children:(0,G.jsx)(r,{id:`learn_more_link.got_it`,defaultMessage:`Got it`})})})]})})]})},K=e(ze()),q=({statusId:e,account:t,className:n,avatarSize:r=48,wrapperProps:i,contentBeforeDate:a,contentAfterDate:o,onHeaderClick:s})=>{let c=L(t=>ce(t,e));if(!c)return null;let l=c.account;return(0,G.jsxs)(`header`,{onClick:s,onAuxClick:s,...i,className:(0,K.default)(`status__info`,n),children:[(0,G.jsx)(ht,{statusAccount:l,friendAccount:t,avatarSize:r}),a,o]})};a({id:`status.edited`,defaultMessage:`Edited {date}`});var ht=({statusAccount:e,friendAccount:t,avatarSize:n})=>(0,G.jsx)(Xe,{displayProps:{account:e},className:`status__display-name`,reference:`status`,children:(0,G.jsx)(`div`,{className:`status__avatar`,children:(0,G.jsx)(t?Me:Je,{account:e,friend:t,size:n})})}),J=e(he()),Y=e(v()),gt=(0,W.createContext)({hideMediaByDefault:!1}),_t=({hideMediaByDefault:e,children:t})=>{let n=(0,W.useMemo)(()=>({hideMediaByDefault:e}),[e]);return(0,G.jsx)(gt.Provider,{value:n,children:t})},vt=e=>e.split(`/`).pop().split(`#`)[0].split(`?`)[0],X=class extends U{render(){let{media:e,compact:t}=this.props;return(0,G.jsxs)(`div`,{className:(0,K.default)(`attachment-list`,{compact:t}),children:[!t&&(0,G.jsx)(`div`,{className:`attachment-list__icon`,children:(0,G.jsx)(V,{id:`link`,icon:ft})}),(0,G.jsx)(`ul`,{className:`attachment-list__list`,children:e.map(e=>{let n=e.get(`remote_url`)||e.get(`url`);return(0,G.jsx)(`li`,{children:(0,G.jsxs)(`a`,{href:n,target:`_blank`,rel:`noopener`,children:[t&&(0,G.jsx)(V,{id:`link`,icon:ft}),t&&` `,n?vt(n):(0,G.jsx)(r,{id:`attachments_list.unprocessed`,defaultMessage:`(unprocessed)`})]})},e.get(`id`))})})]})}};I(X,`propTypes`,{media:Y.default.list.isRequired,compact:J.default.bool});var yt=({status:e})=>e.get(`spoiler_text`).length===0||!e.get(`mentions`)||e.get(`mentions`).isEmpty()?null:(0,G.jsx)(`div`,{className:`status__content`,children:e.get(`mentions`).map(e=>(0,G.jsxs)(Ze,{to:`/@${e.get(`acct`)}`,href:e.get(`url`),className:`mention`,children:[`@`,(0,G.jsx)(`span`,{children:e.get(`username`)})]},e.get(`id`))).reduce((e,t)=>[...e,t,` `],[])}),Z=o({delete:{id:`status.delete`,defaultMessage:`Delete`},redraft:{id:`status.redraft`,defaultMessage:`Delete & re-draft`},edit:{id:`status.edit`,defaultMessage:`Edit`},direct:{id:`status.direct`,defaultMessage:`Privately mention @{name}`},mention:{id:`status.mention`,defaultMessage:`Mention @{name}`},mute:{id:`account.mute`,defaultMessage:`Mute @{name}`},block:{id:`account.block`,defaultMessage:`Block @{name}`},reply:{id:`status.reply`,defaultMessage:`Reply`},share:{id:`status.share`,defaultMessage:`Share`},more:{id:`status.more`,defaultMessage:`More`},replyAll:{id:`status.replyAll`,defaultMessage:`Reply to thread`},favourite:{id:`status.favourite`,defaultMessage:`Favorite`},removeFavourite:{id:`status.remove_favourite`,defaultMessage:`Remove from favorites`},bookmark:{id:`status.bookmark`,defaultMessage:`Bookmark`},removeBookmark:{id:`status.remove_bookmark`,defaultMessage:`Remove bookmark`},open:{id:`status.open`,defaultMessage:`Expand this status`},report:{id:`status.report`,defaultMessage:`Report @{name}`},muteConversation:{id:`status.mute_conversation`,defaultMessage:`Mute conversation`},unmuteConversation:{id:`status.unmute_conversation`,defaultMessage:`Unmute conversation`},pin:{id:`status.pin`,defaultMessage:`Pin on profile`},unpin:{id:`status.unpin`,defaultMessage:`Unpin from profile`},embed:{id:`status.embed`,defaultMessage:`Get embed code`},admin_account:{id:`status.admin_account`,defaultMessage:`Open moderation interface for @{name}`},admin_status:{id:`status.admin_status`,defaultMessage:`Open this post in the moderation interface`},admin_domain:{id:`status.admin_domain`,defaultMessage:`Open moderation interface for {domain}`},copy:{id:`status.copy`,defaultMessage:`Copy link to post`},hide:{id:`status.hide`,defaultMessage:`Hide post`},edited:{id:`status.edited`,defaultMessage:`Edited {date}`},filter:{id:`status.filter`,defaultMessage:`Filter this post`},openOriginalPage:{id:`account.open_original_page`,defaultMessage:`Open original page`},revokeQuote:{id:`status.revoke_quote`,defaultMessage:`Remove my post from @{name}âs post`},quotePolicyChange:{id:`status.quote_policy_change`,defaultMessage:`Change who can quote`}}
2),bt=(e,{status:t})=>{let n=t.getIn([`quote`,`quoted_status`]);return{quotedAccountId:n?e.getIn([`statuses`,n,`account`]):null,statusQuoteState:le(e,t.get(`id`))}},xt=class extends U{constructor(...e){super(...e),I(this,`updateOnProps`,[`status`,`quotedAccountId`,`showReplyCount`,`withCounters`,`withDismiss`]),I(this,`handleReplyClick`,()=>{let{signedIn:e}=this.props.identity;e?this.props.onReply(this.props.status):this.props.onInteractionModal(this.props.status,`reply`)}),I(this,`handleQuoteClick`,()=>{this.props.onQuote(this.props.status)}),I(this,`handleShareClick`,()=>{navigator.share({url:this.props.status.get(`url`)}).catch(e=>{e.name!==`AbortError`&&console.error(e)})}),I(this,`handleFavouriteClick`,e=>{let{signedIn:t}=this.props.identity;t?this.props.onFavourite(this.props.status,e):this.props.onInteractionModal(this.props.status,`favourite`)}),I(this,`handleBookmarkClick`,e=>{this.props.onBookmark(this.props.status,e)}),I(this,`handleDeleteClick`,()=>{this.props.onDelete(this.props.status)}),I(this,`handleRedraftClick`,()=>{this.props.onDelete(this.props.status,!0)}),I(this,`handleEditClick`,()=>{this.props.onEdit(this.props.status)}),I(this,`handlePinClick`,()=>{this.props.onPin(this.props.status)}),I(this,`handleMentionClick`,()=>{this.props.onMention(this.props.status.get(`account`))}),I(this,`handleDirectClick`,()=>{this.props.onDirect(this.props.status.get(`account`))}),I(this,`handleMuteClick`,()=>{this.props.onMute(this.props.status.get(`account`))}),I(this,`handleRevokeQuoteClick`,()=>{this.props.onRevokeQuote(this.props.status)}),I(this,`handleQuotePolicyChange`,()=>{this.props.onQuotePolicyChange(this.props.status)}),I(this,`handleBlockClick`,()=>{this.props.onBlock(this.props.status)}),I(this,`handleOpen`,()=>{this.props.history.push(`/@${this.props.status.getIn([`account`,`acct`])}/${this.props.status.get(`id`)}`)}),I(this,`handleEmbed`,()=>{this.props.onEmbed(this.props.status)}),I(this,`handleReport`,()=>{this.props.onReport(this.props.status)}),I(this,`handleConversationMuteClick`,()=>{this.props.onMuteConversation(this.props.status)}),I(this,`handleFilterClick`,()=>{this.props.onAddFilter(this.props.status)}),I(this,`handleCopy`,()=>{let e=this.props.status.get(`url`);navigator.clipboard.writeText(e)}),I(this,`handleHideClick`,()=>{this.props.onFilter()})}render(){let{status:e,statusQuoteState:t,quotedAccountId:n,contextType:r,intl:i,withDismiss:a,withCounters:o,showReplyCount:s,scrollKey:l}=this.props,{signedIn:u,permissions:d}=this.props.identity,p=[`public`,`unlisted`].includes(e.get(`visibility`)),m=[`public`,`unlisted`,`private`].includes(e.get(`visibility`)),h=e.get(`muted`),v=e.get(`account`),y=e.getIn([`account`,`id`])===f,S=e.getIn([`account`,`username`])!==e.getIn([`account`,`acct`]),C=n===f,w=[];if(w.push({text:i.formatMessage(Z.open),action:this.handleOpen}),p&&S&&w.push({text:i.formatMessage(Z.openOriginalPage),href:e.get(`url`)}),w.push({text:i.formatMessage(Z.copy),action:this.handleCopy}),p&&`share`in navigator&&w.push({text:i.formatMessage(Z.share),action:this.handleShareClick}),p&&!S&&w.push({text:i.formatMessage(Z.embed),action:this.handleEmbed}),c&&u){let e=Qe(t);w.push(null),w.push({text:i.formatMessage(e.title),description:e.meta?i.formatMessage(e.meta):void 0,disabled:e.disabled,action:this.handleQuoteClick})}if(u){if(w.push(null),y&&m&&(w.push({text:i.formatMessage(e.get(`pinned`)?Z.unpin:Z.pin),action:this.handlePinClick}),w.push(null)),(y||a)&&(w.push({text:i.formatMessage(h?Z.unmuteConversation:Z.muteConversation),action:this.handleConversationMuteClick}),y&&![`private`,`direct`].includes(e.get(`visibility`))&&w.push({text:i.formatMessage(Z.quotePolicyChange),action:this.handleQuotePolicyChange}),w.push(null)),y)w.push({text:i.formatMessage(Z.edit),action:this.handleEditClick}),w.push({text:i.formatMessage(Z.delete),action:this.handleDeleteClick,dangerous:!0}),w.push({text:i.formatMessage(Z.redraft),action:this.handleRedraftClick,dangerous:!0});else if(v.get(`invalid_handle`)||(w.push({text:i.formatMessage(Z.mention,{name:v.get(`username`)}),action:this.handleMentionClick}),w.push({text:i.formatMessage(Z.direct,{name:v.get(`username`)}),action:this.handleDirectClick}),w.push(null)),C&&w.push({text:i.formatMessage(Z.revokeQuote,{name:v.get(`username`)}),action:this.handleRevokeQuoteClick,dangerous:!0}),this.props.onFilter||(w.push(null),w.push({text:i.formatMessage(Z.filter),action:this.handleFilterClick,dangerous:!0}),w.push(null)),w.push({text:i.formatMessage(Z.mute,{name:v.get(`username`)}),action:this.handleMuteClick,dangerous:!0}),w.push({text:i.formatMessage(Z.block,{name:v.get(`username`)}),action:this.handleBlockClick,dangerous:!0}),w.push({text:i.formatMessage(Z.report,{name:v.get(`username`)}),action:this.handleReport,dangerous:!0}),((d&1024)==1024&&(z||De)||S&&(d&32)==32)&&(w.push(null),(d&1024)==1024&&(z!==void 0&&w.push({text:i.formatMessage(Z.admin_account,{name:v.get(`username`)}),href:z(e.getIn([`account`,`id`]))}),De!==void 0&&w.push({text:i.formatMessage(Z.admin_status),href:De(e.getIn([`account`,`id`]),e.get(`id`))})),S&&(d&32)==32)){let e=v.get(`acct`).split(`@`)[1];w.push({text:i.formatMessage(Z.admin_domain,{domain:e}),href:`/admin/instances/${e}`})}}let T,E,D;e.get(`in_reply_to_id`,null)===null?(T=`reply`,E=_,D=i.formatMessage(Z.reply
2)):(T=`reply-all`,E=b,D=i.formatMessage(Z.replyAll));let O=this.props.onFilter&&(0,G.jsx)(`div`,{className:`status__action-bar__button-wrapper`,children:(0,G.jsx)(B,{className:`status__action-bar-button`,title:i.formatMessage(Z.hide),icon:`eye`,iconComponent:pt,onClick:this.handleHideClick})}),k=i.formatMessage(e.get(`bookmarked`)?Z.removeBookmark:Z.bookmark),A=i.formatMessage(e.get(`favourited`)?Z.removeFavourite:Z.favourite),j=C&&r===`notifications`;return(0,G.jsxs)(`div`,{className:`status__action-bar`,children:[(0,G.jsx)(`div`,{className:`status__action-bar__button-wrapper`,children:(0,G.jsx)(B,{className:`status__action-bar-button`,title:D,icon:T,iconComponent:E,onClick:this.handleReplyClick,counter:s?e.get(`replies_count`):void 0,obfuscateCount:!0})}),(0,G.jsx)(`div`,{className:`status__action-bar__button-wrapper`,children:(0,G.jsx)(et,{statusId:e.get(`id`),counters:o})}),(0,G.jsx)(`div`,{className:`status__action-bar__button-wrapper`,children:(0,G.jsx)(B,{className:`status__action-bar-button star-icon`,animate:!0,active:e.get(`favourited`),title:A,icon:`star`,iconComponent:e.get(`favourited`)?x:g,onClick:this.handleFavouriteClick,counter:o?e.get(`favourites_count`):void 0})}),(0,G.jsx)(`div`,{className:`status__action-bar__button-wrapper`,children:(0,G.jsx)(B,{className:`status__action-bar-button bookmark-icon`,disabled:!u,active:e.get(`bookmarked`),title:k,icon:`bookmark`,iconComponent:e.get(`bookmarked`)?at:ot,onClick:this.handleBookmarkClick})}),O,(0,G.jsx)(je,{className:`status__action-bar__button-wrapper`,canShowHint:j,children:t=>(0,G.jsx)(Ke,{scrollKey:l,status:e,needsStatusRefresh:c&&e.get(`quote_approval`)===null,items:w,size:18,direction:`right`,ariaLabel:i.formatMessage(Z.more),onOpen:()=>(t(),!0),children:(0,G.jsx)(B,{className:`status__action-bar__button`,icon:`ellipsis-h`,iconComponent:it,title:i.formatMessage(Z.more)})})}),(0,G.jsx)(`div`,{className:`status__action-bar-spacer`}),(0,G.jsxs)(`a`,{href:e.get(`url`),className:`status__relative-time`,target:`_blank`,rel:`noopener`,children:[(0,G.jsx)(Ue,{timestamp:e.get(`created_at`)}),e.get(`edited_at`)&&(0,G.jsx)(`abbr`,{title:i.formatMessage(Z.edited,{date:i.formatDate(e.get(`edited_at`),{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`})}),children:` *`})]})]})}};I(xt,`propTypes`,{identity:Ve,status:Y.default.map.isRequired,statusQuoteState:J.default.object,quotedAccountId:J.default.string,contextType:J.default.string,onReply:J.default.func,onFavourite:J.default.func,onDelete:J.default.func,onRevokeQuote:J.default.func,onQuotePolicyChange:J.default.func,onDirect:J.default.func,onMention:J.default.func,onMute:J.default.func,onBlock:J.default.func,onReport:J.default.func,onEmbed:J.default.func,onMuteConversation:J.default.func,onPin:J.default.func,onBookmark:J.default.func,onFilter:J.default.func,onAddFilter:J.default.func,onInteractionModal:J.default.func,withDismiss:J.default.bool,withCounters:J.default.bool,showReplyCount:J.default.bool,scrollKey:J.default.string,intl:J.default.object.isRequired,...tt});var St=ge(Ye(S(bt)(H(xt)))),Ct=e=>(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:24,viewBox:`0 -960 960 960`,width:24,...e,children:(0,G.jsx)(`path`,{d:`M280-240q-17 0-28.5-11.5T240-280v-80h520v-360h80q17 0 28.5 11.5T880-680v600L720-240H280ZM80-280v-560q0-17 11.5-28.5T120-880h520q17 0 28.5 11.5T680-840v360q0 17-11.5 28.5T640-440H240L80-280Zm520-240v-280H160v280h440Zm-440 0v-280 280Z`})}),wt=o({inReplyTo:{id:`status.in_reply_to`,defaultMessage:`This toot is a reply`},localOnly:{id:`status.local_only`,defaultMessage:`Only visible from your instance`}}),Tt=({language:e})=>{if(!p)return null;let t=p.find(t=>t[0]===e);return t?(0,G.jsx)(`span`,{className:`text-icon`,title:`${t[2]} (${t[1]})`,"aria-hidden":`true`,children:t[0].toUpperCase()}):null},Et=class extends W.PureComponent{render(){let{status:e,mediaIcons:t,settings:n,intl:r}=this.props;return(0,G.jsxs)(`div`,{className:`status__info__icons`,children:[n.get(`language`)&&e.get(`language`)&&(0,G.jsx)(Tt,{language:e.get(`language`)}),n.get(`reply`)&&e.get(`in_reply_to_id`,null)!==null?(0,G.jsx)(V,{className:`status__reply-icon`,id:`comment`,icon:Ct,"aria-label":r.formatMessage(wt.inReplyTo)}):null,n.get(`local_only`)&&e.get(`local_only`)&&(0,G.jsx)(V,{id:`home`,icon:lt,"aria-label":r.formatMessage(wt.localOnly)}),n.get(`media`)&&!!t&&t.map(e=>(0,G.jsx)(Ee,{className:`status__media-icon`,icon:e},`media-icon--${e}`)),n.get(`visibility`)&&(0,G.jsx)(Ne,{visibility:e.get(`visibility`)})]})}},Dt=H(Et),Ot=e=>(0,G.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,height:24,viewBox:`0 -960 960 960`,width:24,...e,children:(0,G.jsx)(`path`,{d:`m640-480 80 80v80H520v240l-40 40-40-40v-240H240v-80l80-80v-280h-40v-80h400v80h-40v280Zm-286 80h252l-46-46v-314H400v314l-46 46Zm126 0Z`})}),kt=class extends W.PureComponent{constructor(...e){super(...e),I(this,`Message`,()=>{let{type:e,account:t}=this.props,n=(0,G.jsx)(Xe,{displayProps:{account:t,variant:`simple`}});switch(e){case`reblogged_by`:return(0,G.jsx)(r,{id:`status.reblogged_by`,defaultMessage:`{name} boosted`,values:{name:n}});case`favourite`:return(0,G.jsx)(r,{id:`notification.favourite`,defaultMessage:`{name} favorited your post`,values:{name:n}});case`reblog`:return(0,G.jsx)(r,{id:`notification.reblog`,defaultMessage:`{name} boosted your post`,values:{name:n}});case`status`:return(0,G.jsx)(r,{id:`notification.status`,defaultMessage:`{name} just posted`,values:{name:n}});case`poll`:return f===t.get(`id`)?(0,G.jsx)(r,{id:`notification.own_poll`,defaultMessage:`Your poll has ended`}):(0,G.jsx)(r,{id:`notification.poll`,defaultMessage:`A poll you voted in has ended`});case`update`:return(0,G.jsx)(r,{id:`notification.update`,defaultMessage:`{name} edited a post`,values:{name:n}});case`quoted_update`:return(0,G.jsx)(r,{id:`notification.quoted_update`,defaultMessage:`{name} edited a post you have quoted`,values:{name:n}});case`quote`:return(0,G.jsx)(r,{id:`notification.label.quote`,defaultMessage:`{name} quoted your post`,values:{name:n}})}return null})}render(){let{Message:e}=this,{type:t,children:n}=this.props,r,i;switch(t){case`favourite`:r=`star`,i=x;break;
2case`featured`:r=`thumb-tack`,i=Ot;break;case`poll`:r=`tasks`,i=dt;break;case`reblog`:case`reblogged_by`:r=`retweet`,i=y;break;case`status`:r=`bell`,i=ct;break;case`update`:case`quoted_update`:r=`pencil`,i=ut;break;case`quote`:r=`quote`,i=h}return t?(0,G.jsxs)(`aside`,{className:t===`reblogged_by`||t===`featured`?`status__prepend`:`notification__message`,children:[(0,G.jsx)(`div`,{className:`status__prepend__icon`,children:(0,G.jsx)(V,{className:t===`favourite`?`star-icon`:null,id:r,icon:i})}),(0,G.jsx)(`span`,{children:(0,G.jsx)(e,{})}),n]}):null}},At=new DOMParser,jt=o({quote_noun:{id:`status.quote_noun`,defaultMessage:`Quote`},contains_quote:{id:`status.contains_quote`,defaultMessage:`Contains quote`},quote_cancel:{id:`status.quote.cancel`,defaultMessage:`Cancel quote`}}),Mt=({intl:e,status:t,rebloggedByText:n=!1,isQuote:r=!1,expanded:i=!1})=>{let a=t.getIn([`account`,`display_name`]),o=t.getIn([`translation`,`spoiler_text`])||t.get(`spoiler_text`),s=t.getIn([`translation`,`contentHtml`])||t.get(`contentHtml`),c=At.parseFromString(s,`text/html`).documentElement.textContent;return[r?e.formatMessage(jt.quote_noun):void 0,a.length===0?t.getIn([`account`,`acct`]).split(`@`)[0]:a,o&&!i?o:c,t.get(`quote`)?e.formatMessage(jt.contains_quote):void 0,e.formatDate(t.get(`created_at`),{hour:`2-digit`,minute:`2-digit`,month:`short`,day:`numeric`}),t.getIn([`account`,`acct`]),n].filter(e=>!!e).join(`, `)},Q=(e,t)=>{if(e)return e.get(`reblog`,null)!==null&&typeof e.get(`reblog`)==`object`&&(e=e.get(`reblog`)),t.getIn([`media`,`reveal_behind_cw`])&&e.get(`spoiler_text`)?!0:!e.get(`matched_media_filters`)&&(d!==`hide_all`&&!e.get(`sensitive`)||d===`show_all`)},$=class extends U{constructor(...e){super(...e),I(this,`state`,{isExpanded:void 0,showMedia:Q(this.props.status,this.props.settings)&&!this.context?.hideMediaByDefault,revealBehindCW:void 0,showCard:!1,showDespiteFilter:void 0}),I(this,`updateOnProps`,[`status`,`account`,`settings`,`prepend`,`muted`,`notification`,`hidden`,`expanded`,`unread`,`pictureInPicture`,`headerRenderFn`,`previousId`,`nextInReplyToId`,`rootId`]),I(this,`updateOnStates`,[`isExpanded`,`showMedia`,`showDespiteFilter`]),I(this,`setExpansion`,e=>{this.props.settings.getIn([`content_warnings`,`shared_state`])&&this.props.status.get(`hidden`)===e&&this.props.onToggleHidden(this.props.status),this.setState({isExpanded:e})}),I(this,`handleToggleMediaVisibility`,()=>{this.setState({showMedia:!this.state.showMedia})}),I(this,`handleClick`,e=>{e.preventDefault(),e?.button===0&&!(e?.ctrlKey||e?.metaKey)?this._openStatus():(e?.button===1||e?.button===0&&(e?.ctrlKey||e?.metaKey))&&this._openStatus(!0)}),I(this,`handleHeaderClick`,e=>{e.target!==e.currentTarget&&e.detail>=1||this.handleClick(e)}),I(this,`handleExpandedToggle`,()=>{this.props.settings.getIn([`content_warnings`,`shared_state`])?this.props.onToggleHidden(this.props.status):this.props.status.get(`spoiler_text`)&&this.setExpansion(!this.state.isExpanded)}),I(this,`handleOpenVideo`,e=>{let{status:t}=this.props,n=t.getIn([`translation`,`language`])||t.get(`language`);this.props.onOpenVideo(t.get(`id`),t.getIn([`media_attachments`,0]),n,e)}),I(this,`handleOpenMedia`,(e,t)=>{let{status:n}=this.props,r=n.getIn([`translation`,`language`])||n.get(`language`);this.props.onOpenMedia(n.get(`id`),e,t,r)}),I(this,`handleHotkeyOpenMedia`,e=>{let{status:t,onOpenMedia:n,onOpenVideo:r}=this.props,i=t.get(`id`);if(e.preventDefault(),t.get(`media_attachments`).size>0){let e=t.getIn([`translation`,`language`])||t.get(`language`);t.getIn([`media_attachments`,0,`type`])===`video`?r(i,t.getIn([`media_attachments`,0]),e,{startTime:0}):n(i,t.get(`media_attachments`),0,e)}}),I(this,`handleDeployPictureInPicture`,(e,t)=>{let{deployPictureInPicture:n,status:r}=this.props;n(r,e,t)}),I(this,`handleHotkeyReply`,e=>{e.preventDefault(),this.props.onReply(this.props.status)}),I(this,`handleHotkeyFavourite`,e=>{this.props.onFavourite(this.props.status,e)}),I(this,`handleHotkeyBoost`,e=>{this.props.onReblog(this.props.status,e)}),I(this,`handleHotkeyBookmark`,e=>{this.props.onBookmark(this.props.status,e)}),I(this,`handleHotkeyQuote`,()=>{this.props.onQuote(this._properStatus())}),I(this,`handleHotkeyMention`,e=>{e.preventDefault(),this.props.onMention(this.props.status.get(`account`))}),I(this,`handleHotkeyOpen`,()=>{this._openStatus()}),I(this,`_openStatus`,(e=!1)=>
2{if(this.props.onOpen){this.props.onOpen();return}let{history:t}=this.props,n=this.props.status;if(!t)return;let r=`/@${n.getIn([`account`,`acct`])}/${n.get(`id`)}`;e?window.open(r,`_blank`,`noopener`):t.location.pathname.replace(`/deck/`,`/`)===r?t.replace(r,{focusTarget:Ae.POST}):t.push(r,{focusTarget:Ae.POST})}),I(this,`handleHotkeyOpenProfile`,()=>{this._openProfile()}),I(this,`_openProfile`,()=>{let{history:e}=this.props,t=this.props.status;e&&e.push(`/@${t.getIn([`account`,`acct`])}`)}),I(this,`handleHotkeyToggleSensitive`,()=>{this.handleToggleMediaVisibility()}),I(this,`handleUnfilterClick`,e=>{this.setState({showDespiteFilter:!1}),e.preventDefault()}),I(this,`handleFilterClick`,()=>{this.setState({showDespiteFilter:!0})}),I(this,`handleRef`,e=>{this.node=e}),I(this,`handleCollapsedToggle`,e=>{this.props.onToggleCollapsed(this.props.status,e)}),I(this,`handleTranslate`,()=>{this.props.onTranslate(this.props.status)})}static getDerivedStateFromProps(e,t){let n={},r=!1;return e.expanded!==t.expandedProp&&(n.expandedProp=e.expanded,r=!0),e.status?.get(`hidden`)!==t.statusPropHidden&&(n.statusPropHidden=e.status?.get(`hidden`),r=!0),e.expanded!==t.expandedProp&&e.expanded!==void 0&&(n.isExpanded=e.expanded,r=!0),t.isExpanded===void 0&&n.isExpanded===void 0&&(n.isExpanded=_e(e.settings,e.status),r=!0),e.settings.getIn([`media`,`reveal_behind_cw`])!==t.revealBehindCW&&(n.revealBehindCW=e.settings.getIn([`media`,`reveal_behind_cw`]),n.revealBehindCW&&(n.showMedia=Q(e.status,e.settings)),r=!0),r?n:null}componentDidMount(){let{node:e}=this;e!==void 0&&this.setState({showCard:!this.props.muted&&!this.props.hidden&&this.props.status&&this.props.status.get(`card`)&&this.props.settings.get(`inline_preview_cards`)})}getSnapshotBeforeUpdate(){if(!this.props.getScrollPosition)return null;let{muted:e,hidden:t,status:n,settings:r}=this.props,i=!e&&!t&&n&&n.get(`card`)&&r.get(`inline_preview_cards`);return i&&!this.state.showCard?(i&&this.setState({showCard:!0}),this.props.getScrollPosition()):null}componentDidUpdate(e,t,n){n!==null&&this.props.updateScrollBottom&&this.node.offsetTop<n.top&&this.props.updateScrollBottom(n.height-n.top),this.props.status?.get(`id`)!==e.status?.get(`id`)&&this.setState({showMedia:Q(this.props.status,this.props.settings)&&!this.context?.hideMediaByDefault,showDespiteFilter:void 0})}componentWillUnmount(){if(this.node&&this.props.getScrollPosition){let e=this.props.getScrollPosition();e!==null&&this.node.offsetTop<e.top&&requestAnimationFrame(()=>{this.props.updateScrollBottom(e.height-e.top)})}}renderLoadingMediaGallery(){return(0,G.jsx)(`div`,{className:`media-gallery`,style:{height:`110px`}})}renderLoadingVideoPlayer(){return(0,G.jsx)(`div`,{className:`video-player`,style:{height:`110px`}})}renderLoadingAudioPlayer(){return(0,G.jsx)(`div`,{className:`audio-player`,style:{height:`110px`}})}render(){let{intl:e,hidden:t,featured:n,unfocusable:i,unread:a,showActions:o=!0,isQuotedPost:s=!1,pictureInPicture:c,previousId:l,nextInReplyToId:u,rootId:d,skipPrepend:f,avatarSize:p=46,children:m}=this.props,{status:h,account:g,settings:_,muted:v,onOpenVideo:y,onOpenMedia:b,notification:x,history:S,...C}=this.props,w=null,T=[],E=[];if(h===null)return null;let D=(_.getIn([`content_warnings`,`shared_state`])?!h.get(`hidden`):this.state.isExpanded)||h.get(`spoiler_text`).length===0,O={reply:this.handleHotkeyReply,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,quote:this.handleHotkeyQuote,mention:this.handleHotkeyMention,open:this.handleHotkeyOpen,openProfile:this.handleHotkeyOpenProfile,toggleHidden:this.handleExpandedToggle,bookmark:this.handleHotkeyBookmark,toggleSensitive:this.handleHotkeyToggleSensitive,openMedia:this.handleHotkeyOpenMedia,onTranslate:this.handleTranslate},k,A,j=l&&l===h.get(`in_reply_to_id`),M=d&&d===h.get(`in_reply_to_id`),N=u&&u===h.get(`id`),P=h.get(`matched_filters`);if(t)return(0,G.jsx)(Se,{handlers:O,focusable:!i,children:(0,G.jsxs)(`div`,{ref:this.handleRef,className:`status focusable`,tabIndex:i?null:0,children:[(0,G.jsx)(`span`,{children:h.getIn([`account`,`display_name`])||h.getIn([`account`,`username`])}),h.get(`spoiler_text`).length>0&&(0,G.jsx)(`span`,{children:h.get(`spoiler_text`)}),D&&(0,G.jsx)(`span`,{children:h.get(`content`)})]})});if(this.state.showDespiteFilter===void 0?P:this.state.showDespiteFilter){let e=this.props.muted?{}:{moveUp:this.handleHotkeyMoveUp,moveDown:this.handleHotkeyMoveDown};return(0,G.jsx)(Se,{handlers:e,focusable:!i,children:(0,G.jsxs)(`div`,{className:`status__wrapper status__wrapper--filtered focusable`,tabIndex:i?null:0,ref:this.handleRef,children:[(0,G.jsx)(r,{id:`status.filtered`,defaultMessage:`Filtered`}),`: `,P.join(`, `),`.`,` `,(0,G.jsx)(`button`,{className:`status__wrapper--filtered__button`,onClick:this.handleUnfilterClick,children:(0,G.jsx)(r,{id:`status.show_filter_reason`,defaultMessage:`Show anyway`})})]})})}if(w=h.get(`media_attachments`),c.get(`inUse`))T.push((0,G.jsx)(Le,{})),E.push(`video-camera`);else if(w.size>0){let e=h.getIn([`translation`,`language`])||h.get(`language`);
2if(v||w.some(e=>e.get(`type`)===`unknown`))T.push((0,G.jsx)(X,{compact:!0,media:h.get(`media_attachments`)}));else if([`image`,`gifv`,`unknown`].includes(h.getIn([`media_attachments`,0,`type`]))||h.get(`media_attachments`).size>1)T.push((0,G.jsx)(Oe,{fetchComponent:Te,loading:this.renderLoadingMediaGallery,children:t=>(0,G.jsx)(t,{media:w,lang:e,sensitive:h.get(`sensitive`),letterbox:_.getIn([`media`,`letterbox`]),fullwidth:!d&&_.getIn([`media`,`fullwidth`]),hidden:!D,onOpenMedia:this.handleOpenMedia,cacheWidth:this.props.cacheMediaWidth,defaultWidth:this.props.cachedMediaWidth,visible:this.state.showMedia,onToggleVisibility:this.handleToggleMediaVisibility,matchedFilters:h.get(`matched_media_filters`)})},`gallery`)),E.push(`picture-o`);else if(w.getIn([0,`type`])===`audio`){let t=h.getIn([`media_attachments`,0]),n=t.getIn([`translation`,`description`])||t.get(`description`);T.push((0,G.jsx)(Oe,{fetchComponent:Ce,loading:this.renderLoadingAudioPlayer,children:r=>(0,G.jsx)(r,{src:t.get(`url`),alt:n,lang:e,poster:t.get(`preview_url`)||h.getIn([`account`,`avatar_static`]),backgroundColor:t.getIn([`meta`,`colors`,`background`]),foregroundColor:t.getIn([`meta`,`colors`,`foreground`]),accentColor:t.getIn([`meta`,`colors`,`accent`]),duration:t.getIn([`meta`,`original`,`duration`],0),deployPictureInPicture:c.get(`available`)?this.handleDeployPictureInPicture:void 0,sensitive:h.get(`sensitive`),blurhash:t.get(`blurhash`),visible:this.state.showMedia,onToggleVisibility:this.handleToggleMediaVisibility,matchedFilters:h.get(`matched_media_filters`)})},`audio`)),E.push(`music`)}else if(w.getIn([0,`type`])===`video`){let t=h.getIn([`media_attachments`,0]),n=t.getIn([`translation`,`description`])||t.get(`description`);T.push((0,G.jsx)(Oe,{fetchComponent:xe,loading:this.renderLoadingVideoPlayer,children:r=>(0,G.jsx)(r,{preview:t.get(`preview_url`),frameRate:t.getIn([`meta`,`original`,`frame_rate`]),aspectRatio:`${t.getIn([`meta`,`original`,`width`])} / ${t.getIn([`meta`,`original`,`height`])}`,blurhash:t.get(`blurhash`),src:t.get(`url`),alt:n,lang:e,inline:!0,sensitive:h.get(`sensitive`),letterbox:_.getIn([`media`,`letterbox`]),fullwidth:!d&&_.getIn([`media`,`fullwidth`]),preventPlayback:!D,onOpenVideo:this.handleOpenVideo,deployPictureInPicture:c.get(`available`)?this.handleDeployPictureInPicture:void 0,visible:this.state.showMedia,onToggleVisibility:this.handleToggleMediaVisibility,matchedFilters:h.get(`matched_media_filters`)})},`video`)),E.push(`video-camera`)}}else if(h.get(`card`)&&_.get(`inline_preview_cards`)&&!this.props.muted&&!h.get(`quote`)){let e=h.getIn([`card`,`url`]),t=h.get(`tagged_collections`).find(t=>ke(t.get(`url`),e));t?T.push((0,G.jsx)(Fe,{collection:t.toJS(),headingLevel:`h2`})):T.push((0,G.jsx)($e,{card:h.get(`card`),sensitive:h.get(`sensitive`)},`${h.get(`id`)}-${h.get(`edited_at`)}`)),E.push(`link`)}else if(h.get(`tagged_collections`).size&&!h.get(`quote`)&&_.get(`inline_preview_cards`)&&!this.props.muted){let e=h.get(`tagged_collections`).first();e&&(T=(0,G.jsx)(Fe,{collection:e.toJS(),headingLevel:`h2`}))}h.get(`poll`)&&E.push(`tasks`);let F={"data-status-by":`@${h.getIn([`account`,`acct`])}`};if(this.props.prepend&&g){let e={favourite:`favourited`,reblog:`boosted`,reblogged_by:`boosted`,status:`posted`}[this.props.prepend];F[`data-${e}-by`]=`@${g.get(`acct`)}`,k=(0,G.jsx)(kt,{type:this.props.prepend,account:g,notificationId:this.props.notificationId})}this.props.prepend===`reblog`&&(A=e.formatMessage({id:`status.reblogged_by`,defaultMessage:`{name} boosted`},{name:g.get(`acct`)}));let{statusContentProps:ee,hashtagBar:te}=Re(h),ne=this.props.headerRenderFn?this.props.headerRenderFn({statusId:h.get(`id`),account:g,avatarSize:p,messages:jt,onHeaderClick:this.handleHeaderClick,featured:n}):(0,G.jsx)(q,{statusId:h.get(`id`),account:g,avatarSize:p,onHeaderClick:this.handleHeaderClick,contentBeforeDate:(0,G.jsx)(Dt,{status:h,mediaIcons:E,settings:_.get(`status_icons`)})});return(0,G.jsx)(Se,{handlers:O,focusable:!i,children:(0,G.jsxs)(`div`,{className:(0,K.default)(`status__wrapper`,`focusable`,`status__wrapper-${h.get(`visibility`)}`,{"status__wrapper-reply":!!h.get(`in_reply_to_id`),"status__wrapper--in-thread":!!d,unread:a}),...F,tabIndex:i?null:0,"data-featured":n?`true`:null,"aria-label":Mt({intl:e,status:h,rebloggedByText:A,isQuote:s,expanded:!h.get(`hidden`)}
2),ref:this.handleRef,"data-nosnippet":h.getIn([`account`,`noindex`],!0)||void 0,children:[!f&&k,(0,G.jsxs)(`div`,{className:(0,K.default)(`status`,`status-${h.get(`visibility`)}`,{"status-reply":!!h.get(`in_reply_to_id`),"status--in-thread":!!d,"status--first-in-thread":l&&(!j||M),muted:this.props.muted,"status--is-quote":s,"status--has-quote":!!h.get(`quote`),"status--highlighted-entry":this.props.shouldHighlightOnMount}),"data-id":h.get(`id`),children:[(N||j||M)&&(0,G.jsx)(`div`,{className:(0,K.default)(`status__line`,{"status__line--full":N,"status__line--first":!h.get(`in_reply_to_id`)&&!M})}),!v&&ne,(0,G.jsx)(we,{statusId:h.get(`id`),expanded:D,onClick:this.handleExpandedToggle,icons:E}),D&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Ie,{status:h,onClick:this.handleClick,onTranslate:this.handleTranslate,collapsible:!0,media:T,onCollapsedToggle:this.handleCollapsedToggle,...ee}),T,te,m]}),!D&&(0,G.jsx)(yt,{status:h}),o&&!s&&(0,G.jsx)(St,{status:h,account:h.get(`account`),showReplyCount:_.get(`show_reply_count`),onFilter:P?this.handleFilterClick:null,...C})]})]})})}};I($,`contextType`,gt),I($,`propTypes`,{containerId:J.default.string,id:J.default.string,status:Y.default.map,account:Y.default.record,children:J.default.node,previousId:J.default.string,nextInReplyToId:J.default.string,rootId:J.default.string,onClick:J.default.func,onReply:J.default.func,onFavourite:J.default.func,onReblog:J.default.func,onQuote:J.default.func,onBookmark:J.default.func,onDelete:J.default.func,onDirect:J.default.func,onMention:J.default.func,onPin:J.default.func,onOpenMedia:J.default.func,onOpenVideo:J.default.func,onBlock:J.default.func,onAddFilter:J.default.func,onEmbed:J.default.func,onHeightChange:J.default.func,onToggleHidden:J.default.func,onToggleCollapsed:J.default.func,onTranslate:J.default.func,onInteractionModal:J.default.func,muted:J.default.bool,hidden:J.default.bool,unread:J.default.bool,featured:J.default.bool,showActions:J.default.bool,prepend:J.default.string,withDismiss:J.default.bool,isQuotedPost:J.default.bool,shouldHighlightOnMount:J.default.bool,getScrollPosition:J.default.func,updateScrollBottom:J.default.func,expanded:J.default.bool,intl:J.default.object.isRequired,cacheMediaWidth:J.default.func,cachedMediaWidth:J.default.number,scrollKey:J.default.string,skipPrepend:J.default.bool,avatarSize:J.default.number,deployPictureInPicture:J.default.func,unfocusable:J.default.bool,headerRenderFn:J.default.func,settings:Y.default.map.isRequired,pictureInPicture:Y.default.contains({inUse:J.default.bool,available:J.default.bool}),contextType:J.default.string,...rt});var Nt=nt(H($)),Pt=S(()=>{let e=He(),t=Ge();return(n,r)=>{let i=e(n,r),a=i?i.get(`reblog`,null):null,o,s;return typeof a==`object`&&a&&(o=i.get(`account`),i=a,s=`reblogged_by`),{containerId:r.containerId||r.id,status:i,nextInReplyToId:r.nextId?n.getIn([`statuses`,r.nextId,`in_reply_to_id`]):null,account:o||r.account,settings:n.get(`local_settings`),prepend:s||r.prepend,pictureInPicture:t(n,r)}}},(e,{contextType:t})=>({onReply(t){e((n,r)=>{let i=r();i.getIn([`local_settings`,`confirm_before_clearing_draft`])&&i.getIn([`compose`,`text`]).trim().length!==0?e(R({modalType:`CONFIRM_REPLY`,modalProps:{status:t}})):e(M(t))})},onQuote(t){e(F(t.get(`id`)))},onReblog(t,n){e(ne(t.get(`id`),n.shiftKey))},onBookmark(t){t.get(`bookmarked`)?e(ee(t)):e(D(t))},onFavourite(t,n){e(O(t.get(`id`),n.shiftKey))},onPin(t){t.get(`pinned`)?e(re(t)):e(ue(t))},onEmbed(t){e(R({modalType:`EMBED`,modalProps:{id:t.get(`id`)}}))},onDelete(t,n=!1){e(u?R({modalType:`CONFIRM_DELETE_STATUS`,modalProps:{statusId:t.get(`id`),withRedraft:n}}):ie(t.get(`id`),n))},onRevokeQuote(t){e(R({modalType:`CONFIRM_REVOKE_QUOTE`,modalProps:{statusId:t.get(`id`),quotedStatusId:t.getIn([`quote`,`quoted_status`])}}))},onQuotePolicyChange(t){let n=t.get(`id`);e(R({modalType:`COMPOSE_PRIVACY`,modalProps:{statusId:n,onChange:(t,r)=>{e(A({policy:r,statusId:n}))}}}))},onEdit(t){e((n,r)=>{r().getIn([`compose`,`text`]).trim().length===0?e(de(t.get(`id`))):e(R({modalType:`CONFIRM_EDIT_STATUS`,modalProps:{statusId:t.get(`id`)}}))})},onTranslate(t){t.get(`translation`)?e(w(t.get(`id`),t.get(`poll`))):e(E(t.get(`id`)))},onDirect(t){e(P(t))},onMention(t){e(k(t))}
2,onOpenMedia(t,n,r,i){e(R({modalType:`MEDIA`,modalProps:{statusId:t,media:n,index:r,lang:i}}))},onOpenVideo(t,n,r,i){e(R({modalType:`VIDEO`,modalProps:{statusId:t,media:n,lang:r,options:i}}))},onBlock(t){let n=t.get(`account`);e(T(n))},onReport(t){e(be(t.get(`account`),t))},onAddFilter(n){e(oe(n,{contextType:t}))},onMute(t){e(C(t))},onMuteConversation(t){t.get(`muted`)?e(j(t.get(`id`))):e(pe(t.get(`id`)))},onToggleHidden(t){e(N(t.get(`id`)))},onToggleCollapsed(t,n){e(fe(t.get(`id`),n))},deployPictureInPicture(t,n,r){e((i,a)=>{a().getIn([`local_settings`,`media`,`pop_in_player`])&&e(te({statusId:t.get(`id`),accountId:t.getIn([`account`,`id`]),playerType:n,props:r}))})},onInteractionModal(t,n){e(R({modalType:`INTERACTION`,modalProps:{intent:n,accountId:t.getIn([`account`,`id`]),url:t.get(`uri`)}}))}}))(Nt),Ft=1,It=({status:e})=>{let t=e.get(`account`),n=typeof t==`string`?t:t.id,i=L(e=>n?e.accounts.get(n):void 0)?.acct;return i?(0,G.jsx)(`div`,{className:`status__quote-author-button`,children:(0,G.jsx)(r,{id:`status.quote_post_author`,defaultMessage:`Quoted a post by @{name}`,values:{name:i}})}):null},Lt=({accountId:e})=>{let t=ye(),n=(0,W.useCallback)(()=>{t(ve({id:e}))},[t,e]);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(r,{id:`status.quote_error.limited_account_hint.title`,defaultMessage:`This account has been hidden by the moderators of {domain}.`,values:{domain:l}}),(0,G.jsx)(`button`,{onClick:n,className:`link-button`,type:`button`,children:(0,G.jsx)(r,{id:`status.quote_error.limited_account_hint.action`,defaultMessage:`Show anyway`})})]})},Rt=({reveal:e,quotedAccountId:t,quoteState:n})=>{let i=L(e=>t?e.accounts.get(t):void 0)?.acct,a=i?.split(`@`)[1],o;switch(n){case`blocked_account`:o=(0,G.jsx)(r,{id:`status.quote_error.blocked_account_hint.title`,defaultMessage:`This post is hidden because you've blocked @{name}.`,values:{name:i}});break;case`blocked_domain`:o=(0,G.jsx)(r,{id:`status.quote_error.blocked_domain_hint.title`,defaultMessage:`This post is hidden because you've blocked {domain}.`,values:{domain:a}});break;case`muted_account`:o=(0,G.jsx)(r,{id:`status.quote_error.muted_account_hint.title`,defaultMessage:`This post is hidden because you've muted @{name}.`,values:{name:i}})}return(0,G.jsxs)(G.Fragment,{children:[o,(0,G.jsx)(`button`,{onClick:e,className:`link-button`,type:`button`,children:(0,G.jsx)(r,{id:`status.quote_error.limited_account_hint.action`,defaultMessage:`Show anyway`})})]})},zt=a({id:`status.quote.cancel`,defaultMessage:`Cancel quote`}),Bt=({quote:e,contextType:t,parentQuotePostId:n,nestingLevel:a=1,variant:o=`full`,onQuoteCancel:s})=>{let c=ye(),l=L(t=>n?t.statuses.getIn([n,`quote`,`state`]):e.get(`state`)),u=e.get(`quoted_status`),d=(0,W.useMemo)(()=>We(),[]),{status:f,loadingState:p}=L(e=>d(e,{id:u,contextType:t})),m=f?.get(`account`)?f.get(`account`).id:null,h=L(e=>m&&se(e,m)),g=!f?.get(`isLoading`)&&l!==`deleted`&&p===`not-found`,_=p===`complete`,v=(0,W.useRef)(!1),[y,b]=(0,W.useState)(!1),x=(0,W.useCallback)(()=>{b(!0)},[b]);(0,W.useEffect)(()=>{_&&(v.current=!1)},[_]),(0,W.useEffect)(()=>{g&&u&&!v.current&&(c(me(u,{parentQuotePostId:n,alsoFetchContext:!1})),v.current=!0)},[g,u,n,c]),(0,W.useEffect)(()=>{m&&h&&c(ae([m]))},[m,h,c]);let S=i(),C=(0,W.useCallback)(e=>(0,G.jsx)(q,{...e,contentAfterDate:s&&(0,G.jsx)(B,{onClick:s,className:`status__quote-cancel`,title:S.formatMessage(zt),icon:`cancel-fill`,iconComponent:st})}),[S,s]),w=p===`filtered`,T=null;if(w?T=(0,G.jsx)(r,{id:`status.quote_error.filtered`,defaultMessage:`Hidden due to one of your filters`}):l===`pending`?T=(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(r,{id:`status.quote_error.pending_approval`,defaultMessage:`Post pending`}),(0,G.jsx)(mt,{children:(0,G.jsx)(`p`,{children:(0,G.jsx)(r,{id:`status.quote_error.pending_approval_popout.body`,defaultMessage:`On Mastodon, you can control whether someone can quote you. This post is pending while we're getting the original author's approval.`})})})]}):l===`revoked`?T=(0,G.jsx)(r,{id:`status.quote_error.revoked`,defaultMessage:`Post removed by author`}):(l===`blocked_account`||l===`blocked_domain`||l===`muted_account`)&&!y&&m?T=(0,G.jsx)(Rt,{quoteState:l,reveal:x,quotedAccountId:m}):!f||!u||l===`deleted`||l===`rejected`||l===`unauthorized`?T=(0,G.jsx)(r,{id:`status.quote_error.
2not_available`,defaultMessage:`Post unavailable`}):h&&m&&(T=(0,G.jsx)(Lt,{accountId:m})),T)return(0,G.jsxs)(`div`,{className:`status__quote status__quote--error`,children:[T,t===`composer`&&!!s&&(0,G.jsx)(Pe,{compact:!0,plain:!0,onClick:s,children:(0,G.jsx)(r,{id:`status.remove_quote`,defaultMessage:`Remove`})})]});if(o===`link`&&f)return(0,G.jsx)(It,{status:f});let E=f?.get(`quote`);return(0,G.jsx)(`div`,{className:`status__quote`,children:(0,G.jsx)(Pt,{isQuotedPost:!0,id:u,contextType:t,avatarSize:32,headerRenderFn:C,children:E&&a<=Ft&&(0,G.jsx)(Bt,{quote:E,parentQuotePostId:u,contextType:t,variant:a===Ft?`link`:`full`,nestingLevel:a+1})})})},Vt=e=>{let t=L(t=>{let n=t.statuses.get(e.id),r=n?.get(`reblog`);return r?t.statuses.get(r):n}),n=t?.get(`quote`);return m()?(0,G.jsx)(W.Suspense,{fallback:(0,G.jsx)(Be,{}),children:(0,G.jsx)(Ht,{...e})}):n?(0,G.jsx)(Pt,{...e,children:(0,G.jsx)(Bt,{quote:n,parentQuotePostId:t?.get(`id`),contextType:e.contextType})}):(0,G.jsx)(Pt,{...e})},Ht=(0,W.lazy)(()=>s(async()=>{let{StatusRedesign:e}=await import(`./status-BrDY7azZ.js`);return{StatusRedesign:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68]),import.meta.url).then(({StatusRedesign:e})=>({default:e})));export{yt as a,q as c,Mt as i,Vt as n,X as o,Q as r,_t as s,Bt as t}; 3//# sourceMappingURL=status_quoted-LqBx857P.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.