phanpy-cz/assets/status-FORkhePO.js

73 lines
91 KiB
JavaScript
Raw Permalink Normal View History

2024-06-16 18:14:43 +00:00
import{L as Bo,F as ae,_ as pe,b as e,V as Fo,p as q,u as Ge,a0 as jo,e as qo,m as Ko,a1 as Wo,a2 as Go,a3 as Yo,M as J,a4 as Zo,x as pt,k as $,a5 as Xo,a6 as Ne,a7 as Qo,a8 as Jo,y as ea,q as ye,a9 as ta,aa as na,z as oa,ab as aa,W as ra,K as ia,ac as sa,ad as ca,ae as la,af as da,ag as ua,ah as ma,ai as ha,aj as pa,ak as fa,n as ga,al as _a,h as no,am as va,g as Ct,A as zn,an as Bn,ao as ya,a as ft,P as oo,d as it,J as ao,C as ba,f as rn,ap as Ea,aq as Ta,ar as ka}from"./vendor-GrW-f9CX.js";import{_ as h,x as De,s as S,h as wa,p as mn,L as ro,a as sn,g as hn,j as Se,c as Fn,b as Ie,n as io,y as La,z as Aa}from"./useTitle-dCp14HlU.js";window._showToast=ce;function ce(t){typeof t=="string"&&(t={text:t});const{onClick:n,delay:o,...a}=t,r=Bo({className:`${n||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...a,onClick:()=>{n==null||n(r)}});return o?setTimeout(()=>{r.showToast()},o):r.showToast(),r}function qr(t,n,o,a){const r=ae(t);pe(()=>{r.current=t},[t,o]),pe(()=>{!a||n===null||n===!1||r.current()},[a]),pe(()=>{if(n===null||n===!1)return;const c=setInterval(()=>r.current(),n);return()=>clearInterval(c)},[n])}function $a(t){const n=new URL("/compose/",window.location),{width:o,height:a}=window.screen,r=Math.max(0,(o-600)/2),s=Math.max(0,(a-450)/2),c=Math.min(o,600),l=Math.min(a,450),p=(t==null?void 0:t.uid)||Math.random(),d=window.open(n,"compose"+p,`width=${c},height=${l},left=${r},top=${s}`);return d?d.__COMPOSE__=t:alert("Looks like your browser is blocking popups."),d}const Ia=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function Pa(){if(Ia){const t=document.createElement("input");t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.opacity="0",document.body.appendChild(t),t.focus(),setTimeout(()=>{document.body.removeChild(t)},500)}}const so={x:()=>h(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>h(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>h(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>h(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>h(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>h(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>h(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":()=>h(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),"arrow-right":()=>h(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),"arrow-up":()=>h(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>h(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>h(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>h(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>h(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>h(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>h(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>h(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:()=>h(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),comment2:()=>h(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),home:()=>h(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>h(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>h(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>h(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>h(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>h(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>h(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>h(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>h(()=>import("./ic
`)),m.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(m)}),l&&[...s.querySelectorAll("p")].filter(m=>/^```/g.test(m.innerText)).forEach(m=>{const _=[m];let k=!1,b=m;for(;b.nextElementSibling;){const E=b.nextElementSibling;if(E&&E.tagName==="P")if(/```$/g.test(E.innerText)){_.push(E),k=!0;break}else _.push(E);else break;b=E}if(k){const E=document.createElement("pre");_.forEach(D=>{D.querySelectorAll("br").forEach(T=>T.replaceWith(`
`))});const w=_.map(D=>D.innerHTML).join(`
`);E.innerHTML=`<code tabindex="0">${w}</code>`,m.replaceWith(E),_.forEach(D=>D.remove())}}),r.includes("`")&&(p=Xt(s),p.forEach(d=>{let u=d.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/`[^`]+`/g.test(u)&&(u=u.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),qe.innerHTML=u,d.replaceWith(...qe.childNodes)})),/twitter\.com/i.test(r)&&(p=Xt(s,{rejectFilter:["A"]}),p.forEach(d=>{let u=d.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/@[a-zA-Z0-9_]+@twitter\.com/g.test(u)&&(u=u.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),qe.innerHTML=u,d.replaceWith(...qe.childNodes)})),r.includes("#")){let d=null;const u=[...s.querySelectorAll("p")].filter((m,_)=>{let k=0;for(let b=0;b<m.childNodes.length;b++){const E=m.childNodes[b];if(E.nodeType===Node.TEXT_NODE){if(E.textContent.trim()!=="")return!1}else if(E.tagName!=="BR")if(E.tagName==="A"){const w=E.textContent.trim();if(!w||!w.startsWith("#"))return!1;k++}else return!1}if(k>3||k>1&&d&&_===d+1)return d=_,!0});u!=null&&u.length&&u.forEach(m=>{m.classList.add("hashtag-stuffing"),m.title=m.innerText})}return r.includes("<img")&&s.querySelectorAll("img").forEach(d=>{const u=d.getAttribute("width")||d.naturalWidth,m=d.getAttribute("height")||d.naturalHeight;u&&m&&d.style.setProperty("--original-aspect-ratio",`${u}/${m}`)}),a&&queueMicrotask(()=>a(s)),r=s.innerHTML,r}const po=De(Za),Xa=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Qa=Object.fromEntries(Xa.map(t=>[t,!0])),Ja=/^(https?:\/\/(www\.)?|xmpp:)/,Zt=30;function er(t){var n;if(!(!t||(n=t.querySelector)!=null&&n.call(t,"*")))try{const o=t.innerText.trim(),a=(o.match(Ja)||[])[0]||"";if(!a)return;const r=o.slice(a.length,a.length+Zt),s=o.slice(a.length+Zt),c=o.slice(a.length).length>Zt;t.innerHTML=`<span class="invisible">${a}</span><span class=${c?"ellipsis":""}>${r}</span><span class="invisible">${s}</span>`}catch{}}function Xt(t,n={}){var c;const o=[],a=Object.assign({},Qa,(c=n.rejectFilter)==null?void 0:c.reduce((l,p)=>(l[p]=!0,l),{})),r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(l){return a[l.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let s;for(;s=r.nextNode();)o.push(s);return o}const Ke=document.createElement("div");function tr(t,n){if(!t)return"";const{preProcess:o}=n||{};return Ke.innerHTML=t.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),Ke.querySelectorAll("br").forEach(a=>{a.replaceWith(`
`)}),o==null||o(Ke),Ke.querySelectorAll(".invisible").forEach(a=>{a.remove()}),Ke.querySelectorAll(".ellipsis").forEach(a=>{a.append("...")}),Ke.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const Ot=De(tr);function nr(t){const{mentions:n=[],instance:o,previewMode:a,statusURL:r}=t||{};return s=>{var u,m;let{target:c}=s;if(c=c.closest("a"),!c||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const l=(u=c.previousSibling)==null?void 0:u.textContent,p=l==null?void 0:l.endsWith("@"),d=c.innerText.startsWith("@");if((c.classList.contains("u-url")||c.classList.contains("mention"))&&d||p&&!d){const _=(c.querySelector("span")||c).innerText.trim(),k=_.replace(/^@/,""),b=c.getAttribute("href"),E=n.find(w=>w.url===b)||n.find(w=>w.acct===k||w.username===k);if(E)s.preventDefault(),s.stopPropagation(),S.showAccount={account:E.acct,instance:o};else if(!/^http/i.test(_)){s.preventDefault(),s.stopPropagation();const w=c.getAttribute("href");S.showAccount={account:w,instance:o}}}else if(!a){const _=l==null?void 0:l.endsWith("#");if(c.classList.contains("hashtag")||_){s.preventDefault(),s.stopPropagation();const k=c.innerText.replace(/^#/,"").trim(),b=o?`#/${o}/t/${k}`:`#/t/${k}`;location.hash=b}else(m=S.unfurledLinks[c.href])!=null&&m.url&&r!==c.href&&(s.preventDefault(),s.stopPropagation(),S.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${S.unfurledLinks[c.href].url}`)}}}const{locale:or}=new Intl.DateTimeFormat().resolvedOptions(),ar=t=>{const{dateYear:n,hideTime:o,formatOpts:a}=t||{},r=new Date().getFullYear();return Intl.DateTimeFormat(or,{year:n===r?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...a})},rr=De(ar);function ht(t,n){return t instanceof Date||(t=new Date(t)),rr({dateYear:t.getFullYear(),...n}).format(t)}const{locale:ir}=Intl.NumberFormat().resolvedOptions(),Ce=Intl.NumberFormat(ir,{notation:"compact",roundingMode:"floor"}).format,Kn=5e3;function Pt(t){if(t||(t=!0),S.showCompose){S.composerState.minimized?ce({duration:Kn,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):ce({duration:Kn,text:"A post is currently open. Post or discard it before creating a new one."});return}Pa(),S.showCompose=t}const sr={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3"},Wn=/pixelfed/i,Pe=/^(?!.*pixelfed).*$/i,Gn={"@mastodon/lists":Pe,"@mastodon/filters":Pe,"@mastodon/mentions":Pe,"@mastodon/trending-hashtags":Pe,"@mastodon/trending-links":Pe,"@mastodon/post-bookmark":Pe,"@mastodon/post-edit":Pe,"@mastodon/profile-edit":Pe,"@mastodon/profile-private-note":Pe,"@pixelfed/trending":Wn,"@pixelfed/home-include-reblogs":Wn},St={};function Rt(t){try{const{version:n,domain:o}=wa(),a=`${o}-${t}`;if(St[a])return St[a];if(Gn[t])return St[a]=Gn[t].test(n);const r=sr[t];return r?St[a]=na(n,r,{includePrerelease:!0,loose:!0}):!1}catch{return!1}}function Kr({skeleton:t,account:n,avatarSize:o="xl",useAvatarStatic:a=!1,instance:r,external:s,internal:c,onClick:l,showActivity:p=!1,showStats:d=!1,accountInstance:u,hideDisplayName:m=!1,relationship:_={},excludeRelationshipAttrs:k=[]}){if(t)return e("div",{class:"account-block skeleton",children:[e(Re,{size:o}),e("span",{children:[e("b",{children:"████████"}),e("br",{}),e("span",{class:"account-block-acct",children:"██████"})]})]});if(!n)return null;const{id:b,acct:E,avatar:w,avatarStatic:D,displayName:T,username:R,emojis:f,url:g,statusesCount:x,lastStatusAt:P,bot:M,fields:A,note:I,group:U,followersCount:z,createdAt:C,locked:Y}=n;let[le,be,Z]=E.match(/([^@]+)(@.+)/i)||[,E];u&&(Z=`@${u}`);const ke=A==null?void 0:A.find(L=>!!L.verifiedAt&&!!L.value),F={};for(const L in _)k.includes(L)||(F[L]=_[L]);const X=F.following||F.followedBy||F.requested;return e("a",{class:"account-block",href:g,target:s?"_blank":null,title:Z?E:`@${E}`,onClick:L=>{if(!s){if(L.preventDefault(),l)return l(L);c?location.hash=`/${r}/a/${b}`:S.showAccount={account:n,instance:r}}},children:[e(Re,{url:a?D:w||D,size:o,squircle:M}),e("span",{class:"account-block-content",children:[!m&&e($,{children:T?e("b",{children:e(Ze,{text:T,emojis:f})}):e("b
📊:
${a.options.map(l=>`${a.multiple?"▪️":"•"} ${l.title}`).join(`
`)}`),r!=null&&r.length&&(s+=" "+r.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),s}function xt({className:t="truncated"}={}){const n=ae(),o=ga(({height:a})=>{if(n.current){const{scrollHeight:r}=n.current;let s=r>a;if(s){const{height:c,maxHeight:l}=getComputedStyle(n.current),p=parseInt(l||c,10);s=r>p}n.current.classList.toggle(t,s)}},300);return _a({ref:n,box:"border-box",onResize:o}),n}const un={public:"earth",unlisted:"group",private:"lock",direct:"message"};function nn(t){if(!t)return;let n=Math.floor(t/3600),o=Math.floor(t%3600/60),a=Math.round(t%60);return n===0?`${o}:${a.toString().padStart(2,"0")}`:`${n}:${o.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`}const vr=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),yr="ALT",on=t=>{const{alt:n,lang:o,index:a,...r}=t;return!n||!n.trim()?null:e("button",{type:"button",class:"alt-badge clickable",...r,onClick:s=>{s.stopPropagation(),s.preventDefault(),S.showMediaAlt={alt:n,lang:o}},title:"Media description",children:[yr,!!a&&e("sup",{children:a})]})},br=140,Er=280,bo=De(t=>t!=null&&t.length?t.length>br||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Eo({class:t="",media:n,to:o,lang:a,showOriginal:r,autoAnimate:s,showCaption:c,allowLongerCaption:l,altIndex:p,onClick:d=()=>{}}){let{blurhash:u,description:m,meta:_,previewRemoteUrl:k,previewUrl:b,remoteUrl:E,url:w,type:D}=n;/no\-preview\./i.test(b)&&(b=null);const{original:T={},small:R,focus:f}=_||{},g=r?T==null?void 0:T.width:(R==null?void 0:R.width)||(T==null?void 0:T.width),x=r?T==null?void 0:T.height:(R==null?void 0:R.height)||(T==null?void 0:T.height),P=r?w:b||w,M=r?E:k||E,A=g&&x,I=A?g>x?"landscape":"portrait":null,U=u?no(u):null,z=ae();let C;if(f){const B=(f.x+1)/2*100,W=(1-f.y)/2*100;C=`${B.toFixed(0)}% ${W.toFixed(0)}%`}const Y=ae(),le=Ct(({x:B,y:W,scale:V})=>{const{current:te}=Y;if(te){const ve=va({x:B,y:W,scale:V});V===1?te.style.removeProperty("transform"):te.style.setProperty("transform",ve),te.closest(".media-zoom").style.touchAction=V<=1.01?"pan-x":""}},[]),[be,Z]=q(!1),ke={enabled:be,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:le},F=ye(()=>o?B=>e(Ye,{to:o,...B}):"div",[o]),X=M?Tr(M):null,L=D==="unknown"&&X&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(X.pathname),de=D==="unknown"&&X&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(X.pathname),K=D==="image"||D==="unknown"&&b&&!L&&!de,ie=ae(),[he,Ae]=q(!1);zn(()=>{if(!K||!r||!ie.current)return;const{offsetWidth:B,offsetHeight:W}=ie.current,V=g<B&&x<W;V&&Ae(V)},[g,x]);const fe=window.innerHeight*(I==="portrait"?.45:.33),ge=I==="portrait"?0:160,we={"--average-color":U&&`rgb(${U.join(",")})`},_e=g&&x?{"--width":`${g}px`,"--height":`${x}px`,"--aspectWidth":`${g/x*Math.max(ge,fe)}px`,aspectRatio:`${g} / ${x}`,...we}:{...we},ee=bo(m);let N=!!c&&!r&&!!m&&!ee;l&&!N&&(m==null?void 0:m.length)<=Er&&(N=!0);const Ee=N?B=>{const{children:W,...V}=B;return e("figure",{...V,children:[W,e("figcaption",{class:"media-caption",lang:a,dir:"auto",onClick:te=>{te.preventDefault(),te.stopPropagation(),S.showMediaAlt={alt:m,lang:a}},children:m})]})}:$;if(K)return ke.containerProps.style.display="inherit",zn(()=>{vr&&r&&(async()=>{try{await fetch(P,{mode:"no-cors"}),Y.current.src=P}catch{}})()},[P]),e(Ee,{children:e(F,{ref:ie,class:`media media-image ${t}`,onClick:d,"data-orientation":I,"data-has-alt":!N,style:r?{backgroundImage:`url(${b})`,backgroundSize:he?`${g}px ${x}px`:void 0,...we}:_e,children:r?e(Bn,{...ke,children:e("img",{ref:Y,src:P,alt:m,width:g,height:x,"data-orientation":I,loading:"eager",decoding:"sync",onLoad:B=>{B.target.closest(".media-image").style.backgroundImage="",B.target.closest(".media-zoom").style.display="",Z(!0)},onError:B=>{const{src:W}=B.target;W===P&&M&&P!==M&&(B.target.src=M)}})}):e($,{children:[e("img",{src:P,alt:N?"":m,width:g,height:x,"data-orientation":I,loading:"lazy",style:{objectPosition:C||"center","--anim-duration":`${Math.min(Math.max(Math.max(g,x)/100,5),120)}s`},onLoad:B=>{if(B.tar
<video
src="${w}"
poster="${b}"
width="${g}"
height="${x}"
data-orientation="${I}"
preload="auto"
autoplay
muted
playsinline
loop="${te}"
ondblclick="this.paused ? this.play() : this.pause()"
${Le?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`;return e(Ee,{children:e(F,{class:`media ${t} media-${V?"gif":"video"} ${ne?"media-contain":""} ${se?"media-hover-animate":""}`,"data-orientation":I,"data-formatted-duration":r?void 0:ve,"data-label":V&&!r&&!ne?"GIF":"","data-has-alt":!N,style:!r&&_e,onClick:Q=>{if(se)try{z.current.pause()}catch{}d(Q)},onMouseEnter:()=>{if(se)try{z.current.play()}catch{}},onMouseLeave:()=>{if(se)try{z.current.pause()}catch{}},onFocus:()=>{if(se)try{z.current.play()}catch{}},onBlur:()=>{if(se)try{z.current.pause()}catch{}},children:[r||ne?V&&r?e(Bn,{...ke,enabled:!0,children:e("div",{ref:Y,dangerouslySetInnerHTML:{__html:j}})}):V?e("div",{class:"video-container",dangerouslySetInnerHTML:{__html:j}}):e("div",{class:"video-container",children:e("video",{slot:"media",src:w,poster:b,width:g,height:x,"data-orientation":I,preload:"auto",autoplay:!0,playsinline:!0,loop:te,controls:!0})}):V?e("video",{ref:z,src:w,poster:b,width:g,height:x,"data-orientation":I,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Le?Q=>{const{target:ue}=Q,re=ue==null?void 0:ue.closest(".media-gif");if(re){const Te=ue.currentTime/ue.duration*100;re.style.setProperty("--progress",`${Te}%`)}}:void 0}):e($,{children:[b?e("img",{src:b,alt:N?"":m,width:g,height:x,"data-orientation":I,loading:"lazy",decoding:"async",onLoad:Q=>{if(!A){const ue=Q.target.closest(".media");if(ue){const{naturalHeight:re,naturalWidth:Te}=Q.target;ue.dataset.orientation=Te>re?"landscape":"portrait",ue.style.setProperty("--width",`${Te}px`),ue.style.setProperty("--height",`${re}px`),ue.style.aspectRatio=`${Te}/${re}`}}}}):e("video",{src:w+"#t=0.1",width:g,height:x,"data-orientation":I,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Q=>{if(!B){const{duration:ue}=Q.target;if(ue){const re=nn(ue),Te=Q.target.closest(".media-video");Te&&(Te.dataset.formattedDuration=re)}}}}),e("div",{class:"media-play",children:e(v,{icon:"play",size:"xl"})})]}),!r&&!N&&e(on,{alt:m,lang:a,index:p})]})})}else if(D==="audio"||de){const B=nn(T.duration);return e(Ee,{children:e(F,{class:`media media-audio ${t}`,"data-formatted-duration":r?void 0:B,"data-has-alt":!N,onClick:d,style:!r&&_e,children:[r?e("audio",{src:E||w,preload:"none",controls:!0,autoplay:!0}):b?e("img",{src:b,alt:N?"":m,width:g,height:x,"data-orientation":I,loading:"lazy",onError:W=>{var V,te;try{(te=(V=W.target)==null?void 0:V.remove)==null||te.call(V)}catch{}}}):null,!r&&e($,{children:[e("div",{class:"media-play",children:e(v,{icon:"play",size:"xl"})}),!N&&e(on,{alt:m,lang:a,index:p})]})]})})}}function Tr(t){try{return new URL(t,location.origin)}catch{return null}}const kr=280,wr=140;function Lr(t,n){return n.v1.accounts.$select(t).fetch()}const Ar=mn(Lr),ut={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},$r=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ir=new Intl.RelativeTimeFormat,eo=80;function Pr(t){var n;return(n=t==null?void 0:t.options)!=null&&n.length?`📊:
${t.options.map(o=>`- ${o.title}${o.votesCount>=0?` (${o.votesCount})`:""}`).join(`
`)}`:""}function an(t){const{spoilerText:n,content:o,poll:a}=t;return(n?`${n}
`:"")+Ot(o)+Pr(a)}const to=pt(({post:t,instance:n,previewMode:o})=>{const{content:a,emojis:r,language:s,mentions:c,url:l}=t;return e("div",{lang:s,dir:"auto",class:"inner-content",onClick:nr({mentions:c,instance:n,previewMode:o,statusURL:l}),dangerouslySetInnerHTML:{__html:po(a,{emojis:r,postEnhanceDOM:p=>{p.querySelectorAll('a.u-url[target="_blank"]').forEach(d=>{/http/i.test(d.innerText.trim())||d.removeAttribute("target")})}})}})},(t,n)=>{const{post:o}=t,{post:a}=n;return o.content===a.content}),Sr={s:"small",m:"medium",l:"large"},Rr=De(t=>{if(t=t==null?void 0:t.trim(),(t==null?void 0:t.length)>500)return null;const o=ya(t)[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null});function Xe({statusID:t,status:n,instance:o,size:a="m",contentTextWeight:r,readOnly:s,enableCommentHint:c,withinContext:l,skeleton:p,enableTranslate:d,forceTranslate:u,previewMode:m,onMediaClick:_,quoted:k,onStatusLinkClick:b=()=>{},showFollowedTags:E,allowContextMenu:w,showActionsBar:D,showReplyParent:T,mediaFirst:R}){var Un,Nn,Hn;if(p)return e("div",{class:`status skeleton ${R?"status-media-first small":""}`,children:[!R&&e(Re,{size:"xxl"}),e("div",{class:"container",children:[e("div",{class:"meta",children:[(a==="s"||R)&&e(Re,{size:"m"})," ███ ████████"]}),e("div",{class:"content-container",children:[R&&e("div",{class:"media-first-container"}),e("div",{class:`content ${R?"media-first-content":""}`,children:e("p",{children:"████ ████████"})})]})]})]});const{masto:f,instance:g,authenticated:x}=sn({instance:o}),{instance:P}=sn(),M=g===P;let A=Se(t||(n==null?void 0:n.id),g);const I=ft(S);if(n||(n=I.statuses[A]||I.statuses[t],A=Se(n==null?void 0:n.id,g)),!n)return null;const{account:{acct:U,avatar:z,avatarStatic:C,id:Y,url:le,displayName:be,username:Z,emojis:ke,bot:F,group:X},id:L,repliesCount:de,reblogged:K,reblogsCount:ie,favourited:he,favouritesCount:Ae,bookmarked:fe,poll:ge,muted:we,sensitive:_e,spoilerText:ee,visibility:N,language:Ee,editedAt:B,filtered:W,card:V,createdAt:te,inReplyToId:ve,inReplyToAccountId:se,content:ne,mentions:Le,mediaAttachments:j,reblog:Q,uri:ue,url:re,emojis:Te,tags:zr,_deleted:ze,_pinned:Be,emojiReactions:gt}=n,[fn,ko]=q(null);pe(()=>{if(!ne||Ee)return;let i;return i=setTimeout(()=>{let y=Rr(Ot(ne,{preProcess:O=>{O.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(H=>{H.remove()}),O.querySelectorAll("a").forEach(H=>{const me=H.innerText.trim();(me.startsWith("https://")||me.startsWith("http://"))&&H.remove()})}}));ko(y)},1e3),()=>clearTimeout(i)},[ne,Ee]);const oe=Ee||fn,Vt=!!(j!=null&&j.length);R&&Vt&&(a="s");const Qe=ye(()=>hn(),[]),Me=ye(()=>Qe&&Qe===Y,[Y,Qe]),wo=oo(vo),Je=!Me&&!s&&!m&&pn(W,wo);if((Je==null?void 0:Je.action)==="hide")return null;const et=i=>{i.shiftKey};if(a!=="l"&&Je)return e(Nr,{status:n,filterInfo:Je,instance:g,containerProps:{onMouseEnter:et},showFollowedTags:!0,quoted:k});const Oe=new Date(te),gn=new Date(B);let Ut=Le==null?void 0:Le.find(i=>i.id===se);!Ut&&se===L&&(Ut={url:le,username:Z,displayName:be});const[_t,_n]=q(Ut);if(!l&&!_t&&se){const i=S.accounts[se];i?_n(i):Ar(se,f).then(y=>{_n(y),S.accounts[y.id]=y}).catch(y=>{})}const vn=se===Qe||(Le==null?void 0:Le.find(i=>i.id===Qe)),xe=ye(()=>!!(Fn.account.get("preferences")||{})["reading:expand:spoilers"],[]),yn=ye(()=>(Fn.account.get("preferences")||{})["reading:expand:media"]||"default",[]),$e=m||xe||!!I.spoilers[L],tt=m||yn==="show_all"||!!I.spoilersMedia[L];if(Q)return X?e("div",{"data-state-post-id":A,class:"status-group",onMouseEnter:et,children:[e("div",{class:"status-pre-meta",children:[e(v,{icon:"group",size:"l",alt:"Group"})," ",e(lt,{account:n.account,instance:g,showAvatar:!0})]}),e(Xe,{status:t?null:Q,statusID:t?Q.id:null,instance:g,size:a,contentTextWeight:r,readOnly:s,mediaFirst:R})]}):e("div",{"data-state-post-id":A,class:"status-reblog",onMouseEnter:et,children:[e("div",{class:"status-pre-meta",children:[e(v,{icon:"rocket",size:"l"})," ",e(lt,{account:n.account,instance:g,showAvatar:!0})," ",e("span",{children:"boosted"})]}),e(Xe,{statu
Some media have no descriptions.`),!confirm(i))return!1}if(S.statuses[A]={...n,reblogged:!K,reblogsCount:ie+(K?-1:1)},K){const i=await f.v1.statuses.$select(L).unreblog();return Ie(i,g),!0}else{const i=await f.v1.statuses.$select(L).reblog();return Ie(i,g),!0}}catch{return S.statuses[A]=n,!1}},qt=async()=>{if(!M||!x)return alert(nt),!1;try{if(S.statuses[A]={...n,reblogged:!K,reblogsCount:ie+(K?-1:1)},K){const i=await f.v1.statuses.$select(L).unreblog();Ie(i,g)}else{const i=await f.v1.statuses.$select(L).reblog();Ie(i,g)}return!0}catch{return S.statuses[A]=n,!1}},Pn=async()=>{if(!M||!x)return alert(nt),!1;try{if(S.statuses[A]={...n,favourited:!he,favouritesCount:Ae+(he?-1:1)},he){const i=await f.v1.statuses.$select(L).unfavourite();Ie(i,g)}else{const i=await f.v1.statuses.$select(L).favourite();Ie(i,g)}return!0}catch{return S.statuses[A]=n,!1}},Kt=async()=>{try{const i=await Pn();!G&&i&&ce(he?`Unliked @${Z||U}'s post`:`Liked @${Z||U}'s post`)}catch{}},Sn=async()=>{if(Rt("@mastodon/post-bookmark")){if(!M||!x)return alert(nt),!1;try{if(S.statuses[A]={...n,bookmarked:!fe},fe){const i=await f.v1.statuses.$select(L).unbookmark();Ie(i,g)}else{const i=await f.v1.statuses.$select(L).bookmark();Ie(i,g)}return!0}catch{return S.statuses[A]=n,!1}}},Rn=async()=>{try{const i=await Sn();!G&&i&&ce(fe?`Unbookmarked @${Z||U}'s post`:`Bookmarked @${Z||U}'s post`)}catch{}},bt=!!oe&&oe!==bn&&!dn([oe],[bn])&&!Io.find(i=>oe===i||dn([oe],[i])),Dn=ae(),xn=ae();async function Ro(i){var H,me,je,Wt;i&&(Dn.current=f.v1.statuses.$select(t).rebloggedBy.list({limit:eo}),xn.current=f.v1.statuses.$select(t).favouritedBy.list({limit:eo}));const[{value:y},{value:O}]=await Promise.allSettled([Dn.current.next(),xn.current.next()]);if((H=y.value)!=null&&H.length||(me=O.value)!=null&&me.length){const Ve=[];return(je=y.value)!=null&&je.length&&Ve.push(...y.value.map(Ue=>(Ue._types=["reblog"],Ue))),(Wt=O.value)!=null&&Wt.length&&Ve.push(...O.value.map(Ue=>(Ue._types=["favourite"],Ue))),{value:Ve,done:y.done&&O.done}}return{value:[],done:!0}}const Do=ae(),Cn=["public","unlisted"].includes(N),xo=["public","unlisted","private"].includes(N),Mn=e($,{children:[!G&&M&&e($,{children:e("div",{class:"menu-control-group-horizontal status-menu",children:[e(J,{onClick:yt,children:[e(v,{icon:"comment"}),e("span",{children:de>0?Ce(de):"Reply"})]}),e(Gt,{subMenu:!0,confirmLabel:e($,{children:[e(v,{icon:"rocket"}),e("span",{children:K?"Unboost":"Boost"})]}),className:`menu-reblog ${K?"checked":""}`,menuExtras:e(J,{onClick:()=>{Pt({draftStatus:{status:`
${re}`}})},children:[e(v,{icon:"quote"}),e("span",{children:"Quote"})]}),menuFooter:jt&&!K?e("div",{class:"footer",children:[e(v,{icon:"alert"}),"Some media have no descriptions."]}):In>=3&&e("div",{class:"footer",children:[e(v,{icon:"info"}),e("span",{children:["Old post (",e("strong",{children:Ir.format(-In,"month")}),")"]})]}),disabled:!ot,onClick:async()=>{try{const i=await qt();!G&&i&&ce(K?`Unboosted @${Z||U}'s post`:`Boosted @${Z||U}'s post`)}catch{}},children:[e(v,{icon:"rocket"}),e("span",{children:ie>0?Ce(ie):K?"Unboost":"Boost…"})]}),e(J,{onClick:Kt,className:`menu-favourite ${he?"checked":""}`,children:[e(v,{icon:"heart"}),e("span",{children:Ae>0?Ce(Ae):he?"Unlike":"Like"})]}),Rt("@mastodon/post-bookmark")&&e(J,{onClick:Rn,className:`menu-bookmark ${fe?"checked":""}`,children:[e(v,{icon:"bookmark"}),e("span",{children:fe?"Unbookmark":"Bookmark"})]})]})}),!G&&M&&(G||D)&&e(it,{}),(G||D)&&e($,{children:e(J,{onClick:()=>{S.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Ro,instance:g,showReactions:!0,postID:A}},children:[e(v,{icon:"react"}),e("span",{children:["Boosted/Liked by",e("span",{class:"more-insignificant",children:"…"})]})]})}),!R&&e($,{children:[(d||!oe||bt)&&e(it,{}),d?e("div",{class:dt?"menu-horizontal":"",children:[e(J,{disabled:Nt,onClick:()=>{$o(!0)},children:[e(v,{icon:"translate"}),e("span",{children:"Translate"})]}),dt&&e(J,{onClick:()=>{const i=an(n);i&&Jn(i,oe)},children:[e(v,{icon:"speak"}),e("span",{children:"Speak"})]})]}):(!oe||bt)&&e("div",{class:dt?"menu-horizontal":"",children:[e(Yn,{to:`${g?`/${g}`:""}/s/${L}?translate=1`,children:[e(v,{icon:"translate"}),e("span",{children:"Translate"})]}),dt&&e(J,{onClick:()=>{const i=an(n);i&&Jn(i,oe)},children:[e(v,{icon:"speak"}),e("span",{children:"Speak"})]})]})]}),(!G&&M||d||!oe||bt)&&e(it,{}),!G&&e($,{children:e(Yn,{to:g?`/${g}/s/${L}`:`/s/${L}`,onClick:i=>{b(i,n)},children:[e(v,{icon:"arrows-right"}),e("small",{children:["View post by @",Z||U,e("br",{}),e("span",{class:"more-insignificant",children:[ut[N]," • ",An]})]})]})}),!!B&&e($,{children:e(J,{onClick:()=>{vt(L)},children:[e(v,{icon:"history"}),e("small",{children:["Show Edit History",e("br",{}),e("span",{class:"more-insignificant",children:["Edited: ",$n]})]})]})}),e(J,{href:re,target:"_blank",children:[e(v,{icon:"external"}),e("small",{class:"menu-double-lines",children:Vr(re)})]}),e("div",{class:"menu-horizontal",children:[e(J,{onClick:()=>{try{navigator.clipboard.writeText(re),ce("Link copied")}catch{ce("Unable to copy link")}},children:[e(v,{icon:"link"}),e("span",{children:"Copy"})]}),Cn&&(navigator==null?void 0:navigator.share)&&((Nn=navigator==null?void 0:navigator.canShare)==null?void 0:Nn.call(navigator,{url:re}))&&e(J,{onClick:()=>{try{navigator.share({url:re})}catch{alert("Sharing doesn't seem to work.")}},children:[e(v,{icon:"share"}),e("span",{children:"Share…"})]})]}),Cn&&G&&e(J,{onClick:()=>{Bt(!0)},children:[e(v,{icon:"code"}),e("span",{children:"Embed post"})]}),(Me||vn)&&e(it,{}),(Me||vn)&&e(J,{onClick:async()=>{try{const i=await f.v1.statuses.$select(L)[we?"unmute":"mute"]();Ie(i,g),ce(we?"Conversation unmuted":"Conversation muted")}catch{ce(we?"Unable to unmute conversation":"Unable to mute conversation")}},children:we?e($,{children:[e(v,{icon:"unmute"}),e("span",{children:"Unmute conversation"})]}):e($,{children:[e(v,{icon:"mute"}),e("span",{children:"Mute conversation"})]})}),Me&&xo&&e(J,{onClick:async()=>{try{const i=await f.v1.statuses.$select(L)[Be?"unpin":"pin"]();ce(Be?"Post unpinned from profile":"Post pinned to profile")}catch{ce(Be?"Unable to unpin post":"Unable to pin post")}},children:Be?e($,{children:[e(v,{icon:"unpin"}),e("span",{children:"Unpin from profile"})]}):e($,{children:[e(v,{icon:"pin"}),e("span",{children:"Pin to profile"})]})}),Me&&e("div",{class:"menu-horizontal",children:[Rt("@mastodon/post-edit")&&e(J,{onClick:()=>{Pt({editStatus:n})},children:[e(v,{icon:"pencil"}),e("span",{children:"Edit"})]}),G&&e(Gt,{subMenu:!0,confirmLabel:e($,{children:[e(v,{icon:"trash"}),e("span",{children:"Delete this post?"})]}),menuItem
${re}`}})},children:[e(v,{icon:"quote"}),e("span",{children:"Quote"})]}),menuFooter:jt&&!K&&e("div",{class:"footer",children:[e(v,{icon:"alert"}),"Some media have no descriptions."]}),children:e("div",{class:"action has-count",children:e(We,{checked:K,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:ie,disabled:!ot})})}),e("div",{class:"action has-count",children:e(We,{checked:he,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:Ae,onClick:Pn})}),Rt("@mastodon/post-bookmark")&&e("div",{class:"action",children:e(We,{checked:fe,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Sn})}),e(mo,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:e("div",{class:"action",children:e("button",{type:"button",title:"More",class:"plain more-button",children:e(v,{icon:"more",size:"l",alt:"More"})})}),children:Mn})]})]})]}),!!zt&&e(cn,{onClick:i=>{i.target===i.currentTarget&&vt(!1)},children:e(Mr,{statusID:zt,instance:g,fetchStatusHistory:()=>f.v1.statuses.$select(zt).history.list(),onClose:()=>{var i;vt(!1),(i=Fe.current)==null||i.focus()}})}),!!Po&&e(cn,{onClick:i=>{i.target===i.currentTarget&&Bt(!1)},children:e(Or,{post:n,instance:g,onClose:()=>{Bt(!1)}})})]})]})}function Dr(t){const{enabled:n,children:o,lang:a,captionChildren:r}=t;return!n||!r?o:e("figure",{class:"media-figure-multiple",children:[o,e("figcaption",{lang:a,dir:"auto",children:r})]})}function xr(t){const{mediaAttachments:n,language:o,postID:a,instance:r}=t,s=n.length>1,c=ae(),[l,p]=q(0);return pe(()=>{let d=()=>{const{clientWidth:u,scrollLeft:m}=c.current,_=Math.round(m/u);p(_)};return c.current&&c.current.addEventListener("scroll",d,{passive:!0}),()=>{c.current&&c.current.removeEventListener("scroll",d)}},[]),e($,{children:[e("div",{class:"media-first-container",children:[e("div",{class:"media-first-carousel",ref:c,children:n.map((d,u)=>e("div",{class:"media-first-item",children:e(Eo,{media:d,lang:o,to:`/${r}/s/${a}?media=${u+1}`})},d.id))}),s&&e("div",{class:"media-carousel-controls",children:[e("div",{class:"carousel-indexer",children:[l+1,"/",n.length]}),e("label",{class:"media-carousel-button",children:e("button",{type:"button",class:"carousel-button",hidden:l===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current.focus(),c.current.scrollTo({left:c.current.clientWidth*(l-1),behavior:"smooth"})},children:e(v,{icon:"arrow-left"})})}),e("label",{class:"media-carousel-button",children:e("button",{type:"button",class:"carousel-button",hidden:l===n.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),c.current.focus(),c.current.scrollTo({left:c.current.clientWidth*(l+1),behavior:"smooth"})},children:e(v,{icon:"arrow-right"})})})]})]}),s&&e("div",{class:"media-carousel-dots",style:{"--dots-count":n.length},children:n.map((d,u)=>e("span",{class:`carousel-dot ${u===l?"active":""}`},d.id))})]})}function Cr({card:t,selfReferential:n,instance:o}){var z;const a=ft(S),{blurhash:r,title:s,description:c,html:l,providerName:p,providerUrl:d,authorName:u,authorUrl:m,width:_,height:k,image:b,imageDescription:E,url:w,type:D,embedUrl:T,language:R,publishedAt:f}=t,g=s||p||u,P=_/k>=1.2?"large":"",[M,A]=q(null);if(pe(()=>{g&&b&&!n&&La(w)&&Aa(o,w).then(C=>{if(!C)return;const{id:Y,url:le}=C;A("#"+le)})},[g,b,n]),a.unfurledLinks[w])return null;const I=/<iframe/i.test(l),U=Ct(C=>{I&&(C.preventDefault(),S.showEmbedModal={html:l,url:w||T,width:_,height:k})},[I]);if(g&&(b||D==="photo"&&r)){const C=rn.toUnicode(new URL(w).hostname.replace(/^www\./,"").replace(/\/$/,""));let Y;const le=b&&r?no(r):null;if(!b){const ke=Ea(r,44,44),F=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");F.width=44,F.height=44;const X=F.getContext("2d");X.imageSmoothingEnabled=!1;const L=X.createImageData(44,44);L.data.set(ke),X.putImageData(L,0,0),Y=F.toDataURL()}return e("a",{href:M||w,target:M?null:"_blank",rel:"nofollow noopener noreferrer",class:`ca
`+P+`
`+((U=m==null?void 0:m.options)!=null&&U.length?`
<p>📊:</p>
<ul>
${m.options.map(z=>`
<li>
${z.title}
${z.votesCount>=0?` (${z.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(D.length>0?`
`+D.map(z=>{const{description:C,meta:Y,previewRemoteUrl:le,previewUrl:be,remoteUrl:Z,url:ke,type:F}=z,{original:X={},small:L}=Y||{},de=(L==null?void 0:L.width)||(X==null?void 0:X.width),K=(L==null?void 0:L.height)||(X==null?void 0:X.height),ie=Z||ke,he=le||be,Ae=he||ie,fe=ie?new URL(ie):null,ge=F==="unknown"&&fe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(fe.pathname),we=F==="unknown"&&fe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(fe.pathname),_e=F==="image"||F==="unknown"&&he&&!ge&&!we,ee=F==="gifv"||F==="video"||ge,N=F==="audio"||we;let Ee="";return _e?Ee=`<img src="${Ae}" width="${de}" height="${K}" alt="${C}" loading="lazy" />`:ee?Ee=`
<video src="${ie}" width="${de}" height="${K}" controls preload="auto" poster="${he}" loading="lazy"></video>
${C?`<figcaption>${C}</figcaption>`:""}
`:N?Ee=`
<audio src="${ie}" controls preload="auto"></audio>
${C?`<figcaption>${C}</figcaption>`:""}
`:Ee=`
<a href="${ie}">📄 ${C||ie}</a>
`,`<figure>${Ee}</figure>`}).join(`
`):""),I=`
<blockquote lang="${k}" cite="${T}">
${_?`
<details>
<summary>${_}</summary>
${A}
</details>
`:A}
<footer>
${Mt(r,l)} (@${s}) <a href="${T}"><time datetime="${M.toISOString()}">${M.toLocaleString()}</time></a>
</footer>
</blockquote>
`;return Ta(I)}function Or({post:t,instance:n,onClose:o}){const{account:{url:a,displayName:r,username:s,emojis:c,bot:l,group:p},id:d,poll:u,spoilerText:m,language:_,editedAt:k,createdAt:b,content:E,mediaAttachments:w,url:D,emojis:T}=t,R=To(t,n);return e("div",{id:"embed-post",class:"sheet",children:[!!o&&e("button",{type:"button",class:"sheet-close",onClick:o,children:e(v,{icon:"x"})}),e("header",{children:e("h2",{children:"Embed post"})}),e("main",{tabIndex:"-1",children:[e("h3",{children:"HTML Code"}),e("textarea",{class:"embed-code",readonly:!0,onClick:f=>{f.target.select()},children:R}),e("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(R),ce("HTML code copied")}catch{ce("Unable to copy HTML code")}},children:[e(v,{icon:"clipboard"})," ",e("span",{children:"Copy"})]}),!!(w!=null&&w.length)&&e("section",{children:[e("p",{children:"Media attachments:"}),e("ol",{class:"links-list",children:w.map(f=>e("li",{children:e("a",{href:f.remoteUrl||f.url,target:"_blank",download:!0,children:f.remoteUrl||f.url})},f.id))})]}),!!(c!=null&&c.length)&&e("section",{children:[e("p",{children:"Account Emojis:"}),e("ul",{children:c.map(f=>e("li",{children:[e("picture",{children:[e("source",{srcset:f.staticUrl,media:"(prefers-reduced-motion: reduce)"}),e("img",{class:"shortcode-emoji emoji",src:f.url,alt:`:${f.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",e("code",{children:[":",f.shortcode,":"]})," (",e("a",{href:f.url,target:"_blank",download:!0,children:"url"}),")",f.staticUrl?e($,{children:[" ","(",e("a",{href:f.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},f.shortcode))})]}),!!(T!=null&&T.length)&&e("section",{children:[e("p",{children:"Emojis:"}),e("ul",{children:T.map(f=>e("li",{children:[e("picture",{children:[e("source",{srcset:f.staticUrl,media:"(prefers-reduced-motion: reduce)"}),e("img",{class:"shortcode-emoji emoji",src:f.url,alt:`:${f.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",e("code",{children:[":",f.shortcode,":"]})," (",e("a",{href:f.url,target:"_blank",download:!0,children:"url"}),")",f.staticUrl?e($,{children:[" ","(",e("a",{href:f.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},f.shortcode))})]}),e("section",{children:e("small",{children:[e("p",{children:"Notes:"}),e("ul",{children:[e("li",{children:"This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."}),e("li",{children:"Polls are not interactive, becomes a list with vote counts."}),e("li",{children:"Media attachments can be images, videos, audios or any file types."}),e("li",{children:"Post could be edited or deleted later."})]})]})}),e("h3",{children:"Preview"}),e("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:R}}),e("p",{children:e("small",{children:"Note: This preview is lightly styled."})})]})]})}function We({checked:t,count:n,class:o,title:a,alt:r,size:s,icon:c,iconSize:l="l",onClick:p,...d}){typeof a=="string"&&(a=[a,a]),typeof r=="string"&&(r=[r,r]);const[u,m]=q(a[0]||""),[_,k]=q(r[0]||"");return pe(()=>{t?(m(a[1]||""),k(r[1]||"")):(m(a[0]||""),k(r[0]||""))},[t,a,r]),e("button",{type:"button",title:u,class:`plain ${s?"small":""} ${o} ${t?"checked":""}`,onClick:b=>{p&&(b.preventDefault(),b.stopPropagation(),p(b))},...d,children:[e(v,{icon:c,size:l,alt:_}),!!n&&e($,{children:[" ",e("small",{title:n,children:Ce(n)})]})]})}function Vr(t){if(!t)return;const n=new URL(t),{host:o,pathname:a}=n,r=a.replace(/\/$/,""),[s,c,l]=r.match(/\/(@[^\/]+)\/(.*)/)||[];return e($,{children:[rn.toUnicode(o),c?e($,{children:["/",c,e("wbr",{}),e("span",{class:"more-insignificant",children:["/",l]})]}):e("span",{class:"more-insignificant",children:r})]})}function Ur({sKey:t}){const o=ft(S).statusReply[t];if(!o)return null;const{id:a,instance:r}=o,s=io(a,r);if(!s)return null;const{sensitive:c,spoilerText:l,account:{avatar:p,avatarStatic:d,bot:u}={},visibility:m,content:_,language:k,filtered:b}=s;if(c||l||!_)return null;const E=Se(a,r),w=yo(s),D=oo(vo),T=pn(b,D);if((T==null?void 0:T.ac
//# sourceMappingURL=status-FORkhePO.js.map